Version 1.13.0-dev.0.0

Merge commit '17dbad18e9d9e811a4f035b9ac52de4b98485fb2' into dev
diff --git a/.gitignore b/.gitignore
index 8672f82..116adee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,16 +16,15 @@
 /.flaky.log
 /.debug.log
 /*.Makefile
-/*.opensdf
-/*.pyc
-/*.sdf
-/*.sln
-/*.suo
+*.opensdf
+*.sdf
+*.sln
+*.suo
 /*.target.mk
 *.host.mk
-/*.vcproj
-/*.vcxproj
-/*.vcxproj.filters
+*.vcproj
+*.vcxproj
+*.vcxproj.filters
 /*.vcxproj.user
 
 # End generated ignores. The following are hand-added because the svn:ignore
@@ -33,13 +32,16 @@
 
 # Gyp generated files
 *.xcodeproj
+*.intermediate
 
-# Dart Editor config files - also in all subdirectories.
+# Eclipse config files - also in all subdirectories.
 .children
 .project
+.settings
 
 # IntelliJ project files
 *.iml
+.idea
 
 # Built by chromebot and downloaded from Google Storage
 client/tests/drt
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9400ece..80077f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,21 @@
+## 1.13.0
+
+* `dart:core`
+  * `Uri` added `removeFragment` method.
+  * `String.allMatches` (implementing `Pattern.allMatches`) is now lazy,
+    as all `allMatches` implementations are intended to be.
+
+* `dart:io`
+  * `HttpClient` no longer sends URI fragments in the requeust. This is not
+    allowed by the HTTP protocol.
+    The `HttpServer` still gracefully receives fragments, but discards them
+    before delivering the request.
+
+* `dart:async`
+  * `StreamTransformer`s created with `fromHandlers` with no `handleError`
+    callback now forward stack traces along with errors to the resulting
+    streams.
+
 ## 1.12.0
 
 ### Language changes
@@ -24,6 +42,9 @@
     some leading "dot" segments.
     Also added `hasAbsolutePath`, `hasEmptyPath`, and `hasScheme` properties.
 
+* `dart:developer`
+  * New `log` function to transmit logging events to Observatory.
+
 * `dart:html`
   * `NodeTreeSanitizer` added the `const trusted` field. It can be used
     instead of defining a `NullTreeSanitizer` class when calling
@@ -41,8 +62,52 @@
   * Added `onError`, `onExit` and `errorsAreFatal` parameters to
     `Isolate.spawnUri`.
 
+* `dart:mirrors`
+  * `InstanceMirror.delegate` moved up to `ObjectMirror`.
+  * Fix InstanceMirror.getField optimization when the selector is an operator.
+  * Fix reflective NoSuchMethodErrors to match their non-reflective
+    counterparts when due to argument mismatches. (VM only)
+
 ### Tool changes
 
+* Documentation tools
+
+  * `dartdoc` is now the default tool to generate static HTML for API docs.
+    [Learn more](https://pub.dartlang.org/packages/dartdoc).
+
+  * `docgen` and `dartdocgen` have been deprecated. Currently plan is to remove
+    them in 1.13.
+
+* Formatter (`dartfmt`)
+
+  * Over 50 bugs fixed.
+
+  * Optimized line splitter is much faster and produces better output on
+    complex code.
+
+* Observatory
+  * Allocation profiling.
+
+  * New feature to display output from logging.
+
+  * Heap snapshot analysis works for 64-bit VMs.
+
+  * Improved ability to inspect typed data, regex and compiled code.
+
+  * Ability to break on all or uncaught exceptions from Observatory's debugger.
+
+  * Ability to set closure-specific breakpoints.
+
+  * 'anext' - step past await/yield.
+
+  * Preserve when a variable has been expanded/unexpanded in the debugger.
+
+  * Keep focus on debugger input box whenever possible.
+
+  * Echo stdout/stderr in the Observatory debugger.  Standalone-only so far.
+
+  * Minor fixes to service protocol documentation.
+
 * Pub
 
   * **Breaking:** various commands that previously ran `pub get` implicitly no
@@ -108,13 +173,6 @@
 
 [package spec proposal]: https://github.com/lrhn/dep-pkgspec
 
-* Formatter (`dartfmt`)
-
-  * Over 50 bugs fixed.
-
-  * Optimized line splitter is much faster and produces better output on
-    complex code.
-
 ### VM Service Protocol Changes
 
 * **BREAKING** The service protocol now sends JSON-RPC 2.0-compatible
@@ -205,7 +263,7 @@
 
 * This is the first release that does not include the Eclipse-based
   **Dart Editor**.
-  See [dartlang.org/tools](https://www.dartlang.org/tools/]) for alternatives.
+  See [dartlang.org/tools](https://www.dartlang.org/tools/) for alternatives.
 * This is the last release that ships the (unsupported)
   dart2dart (aka `dart2js --output-type=dart`) utility as part
   of dart2js
diff --git a/DEPS b/DEPS
index bb1cb58..8b2d8d8 100644
--- a/DEPS
+++ b/DEPS
@@ -38,10 +38,11 @@
 
   # Revisions of /third_party/* dependencies.
   "7zip_rev" : "@19997",
-  "analyzer_cli_rev" : "@4281dbf08ccc20b20b795b438766b57afb16ad13",
+  "analyzer_cli_rev" : "@0b89a16c0566f36676fa8f2016eb2c332178f616",
   "args_tag": "@0.13.0",
   "async_tag": "@1.2.0",
   "barback_tag" : "@0.15.2+6",
+  "boringssl_rev" : "@daeafc22c66ad48f6b32fc8d3362eb9ba31b774e",
   "charcode_tag": "@1.1.0",
   "chrome_rev" : "@19997",
   "clang_rev" : "@28450",
@@ -49,10 +50,11 @@
   "collection_rev": "@1da9a07f32efa2ba0c391b289e2037391e31da0e",
   "crypto_rev" : "@2df57a1e26dd88e8d0614207d4b062c73209917d",
   "csslib_tag" : "@0.12.0",
-  "dartdoc_rev" : "@23dbfa91819e3c6b72e635eb9cb64a0a3224ef84",
+  "dart2js_info_rev" : "@bad01369f1f605ab688d505c135db54de927318f",
+  "dartdoc_rev" : "@8ef4cae550ea7ad47c5eb997b36ad2ba14ff53f7",
   "dart_services_rev" : "@7aea2574e6f3924bf409a80afb8ad52aa2be4f97",
   "dart_style_tag": "@0.2.0",
-  "dev_compiler_rev": "@0.1.3",
+  "dev_compiler_rev": "@0.1.7",
   "fake_async_rev" : "@38614",
   "firefox_jsshell_rev" : "@45554",
   "glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
@@ -78,7 +80,7 @@
   "oauth2_rev": "@1bff41f4d54505c36f2d1a001b83b8b745c452f5",
   "observe_rev": "@eee2b8ec34236fa46982575fbccff84f61202ac6",
   "observatory_pub_packages_rev": "@cdc4b3d4c15b9c0c8e7702dff127b440afbb7485",
-  "package_config_tag": "@0.1.3",
+  "package_config_rev": "@0.1.3",
   "path_tag": "@1.3.6",
   "petitparser_rev" : "@37878",
   "ply_rev": "@604b32590ffad5cbb82e4afef1d305512d06ae93",
@@ -88,6 +90,7 @@
   "pub_cache_tag": "@v0.1.0",
   "pub_semver_tag": "@1.2.1",
   "quiver_tag": "@0.21.4",
+  "root_certificates_rev": "@c3a41df63afacec62fcb8135196177e35fe72f71",
   "scheduled_test_tag": "@0.12.1+2",
   "shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
   "smoke_rev" : "@f3361191cc2a85ebc1e4d4c33aec672d7915aba9",
@@ -142,6 +145,14 @@
       Var("chromium_git") + "/chromium/src/net/third_party/nss.git" +
       Var("net_nss_rev"),
 
+  Var("dart_root") + "/third_party/boringssl/src":
+      "https://boringssl.googlesource.com/boringssl.git" +
+      Var("boringssl_rev"),
+
+  Var("dart_root") + "/third_party/root_certificates":
+      "https://github.com/dart-lang/root_certificates.git" +
+      Var("root_certificates_rev"),
+
   Var("dart_root") + "/third_party/jinja2":
       Var("chromium_git") + "/chromium/src/third_party/jinja2.git" +
       Var("jinja2_rev"),
@@ -195,6 +206,8 @@
       (Var("github_mirror") % "csslib") + Var("csslib_tag"),
   Var("dart_root") + "/third_party/pkg_tested/dart_style":
       (Var("github_mirror") % "dart_style") + Var("dart_style_tag"),
+  Var("dart_root") + "/third_party/pkg/dart2js_info":
+      (Var("github_mirror") % "dart2js_info") + Var("dart2js_info_rev"),
   Var("dart_root") + "/third_party/pkg/dartdoc":
       (Var("github_mirror") % "dartdoc") + Var("dartdoc_rev"),
   Var("dart_root") + "/third_party/pkg/dev_compiler":
@@ -240,9 +253,9 @@
   Var("dart_root") + "/third_party/observatory_pub_packages":
      (Var("github_mirror") % "observatory_pub_packages")
       + Var("observatory_pub_packages_rev"),
-  Var("dart_root") + "/third_party/pkg/package_config":
+  Var("dart_root") + "/third_party/pkg_tested/package_config":
       (Var("github_mirror") % "package_config") +
-      Var("package_config_tag"),
+      Var("package_config_rev"),
   Var("dart_root") + "/third_party/pkg/path":
       (Var("github_mirror") % "path") + Var("path_tag"),
   Var("dart_root") + "/third_party/pkg/plugin":
diff --git a/README.md b/README.md
index 7b2589e..a95407c 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,13 @@
 Browse [pub.dartlang.org][pubsite] for more packages and libraries contributed
 by the community and the Dart team.
 
+## Building Dart
+
+Learn how to [get the source](https://github.com/dart-lang/sdk/wiki/Getting-The-Source)
+and [prepare your machine to build the SDK](https://github.com/dart-lang/sdk/wiki/Preparing-your-machine-to-build-the-Dart-SDK).
+
+There are more documents on our [wiki](https://github.com/dart-lang/sdk/wiki).
+
 ## Contributing to Dart
 
 The easiest way to contribute to Dart is to [file issues][dartbug].
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index efd9b0d..3850f20 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -2047,7 +2047,8 @@
 In both cases above, $C$ declares the same instance members as $M$ (respectively, $M_k$). If any of the instance fields of $M$ (respectively, $M_k$) have initializers, they are executed in the scope of $M$ (respectively, $M_k$) to initialize the corresponding fields of $C$. 
 
 \LMHash{}
-For each generative constructor named $q_i(T_{i1}$ $ a_{i1}, \ldots , T_{ik_i}$ $ a_{ik_i}), i \in 1..n$ of $S$, $C$ has an implicitly declared constructor named
+Let $L_M$ be the library in which $M$ is declared.
+For each generative constructor named $q_i(T_{i1}$ $ a_{i1}, \ldots , T_{ik_i}$ $ a_{ik_i}), i \in 1..n$ of $S$ that is accessible to $L_M$, $C$ has an implicitly declared constructor named
 $q'_i = [C/S]q_i$ of the form 
 
 $q'_i(a_{i1}, \ldots , a_{ik_i}):\SUPER(a_{i1}, \ldots , a_{ik_i});$.
@@ -6788,7 +6789,7 @@
 }
 
 \LMHash{}
-It is a static warning to import two different libraries with the same name.
+It is a static warning to import two different libraries with the same name unless their name is the empty string.
 
 \commentary{
 A widely disseminated library should be given a name that will not conflict with other such libraries. The preferred mechanism for this is using pub, the Dart package manager, which provides a global namespace for libraries, and conventions that leverage that namespace.
@@ -6879,7 +6880,7 @@
 We say that $L$ {\em re-exports library } $B$, and also that $L$ {\em re-exports namespace } $NS_n$. When no confusion can arise, we may simply state that $L$ {\em re-exports }$B$, or that $L$ {\em re-exports }$NS_n$.
 
 \LMHash{}
-It is a compile-time error if a name $N$ is re-exported by a library $L$ and $N$ is  introduced into the export namespace of $L$ by more than one export, unless all  exports refer to same declaration for the name $N$.  It is a static warning to export two different libraries with the same name.
+It is a compile-time error if a name $N$ is re-exported by a library $L$ and $N$ is  introduced into the export namespace of $L$ by more than one export, unless all  exports refer to same declaration for the name $N$.  It is a static warning to export two different libraries with the same name unless their name is the empty string.
 
 
 
@@ -7052,6 +7053,8 @@
 A type $T$ is {\em deferred} iff it is of the form $p.T$ where $p$ is a deferred prefix.
 It is a static warning to use a deferred type in a type annotation, type test, type cast or as a type parameter. However, all other static warnings must be issued under the assumption that all deferred libraries have successfully been loaded.
 
+% Now, when passed to a generic, p.T also has to be treated as dynamic - otherwise we have to fail immediately. Where do we say that? And how does this fit with idea that as a type object it fails? Should we say that the accessor on p returns dynamic instead of failing? Do we distinguish its use in a constructor vs its use in an annotation? It's not that we evaluate type objects in constructor args - these cannot represent parameterized types.
+
 
 \subsubsection{Type Promotion}   
 \LMLabel{typePromotion}
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index 815a2d3..7170448 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -40,6 +40,24 @@
 dt.typeDefinition {
   font-weight: bold;
 }
+
+*/
+* Styles for index
+*/
+
+.subindex {
+}
+
+.subindex ul {
+  padding-left: 0px;
+  margin-left: 0px;
+
+  -webkit-margin-before: 0px;
+  -webkit-margin-start: 0px;
+  -webkit-padding-start: 0px;
+
+  list-style-type: none;
+}
 </style></head>
   <body>
     <h1>Analysis Server API Specification</h1>
@@ -175,6 +193,9 @@
       the standard JSON primitives. These data structures are
       documented in the section titled <a href="#types">Types</a>.
     </p>
+    <p>
+      To get an overview of the API, you can consult the <a href="#index">index</a>.
+    </p>
     <h3>Command-line Arguments</h3>
     <p>
       The command-line arguments that can be passed to the server.
@@ -2358,6 +2379,12 @@
               True if the client wants to enable support for the
               proposed "null aware operators" feature.
             </p>
+          </dd><dt class="field"><b><i>enableSuperMixins ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
+            
+            <p>
+              True if the client wants to enable spport for the
+              proposed "less restricted mixins" proposal (DEP 34).
+            </p>
           </dd><dt class="field"><b><i>generateDart2jsHints ( <span style="color:#999999">optional</span> bool )</i></b></dt><dd>
             
             <p>
@@ -4100,6 +4127,5 @@
     <p>
       TBD
     </p>
-  
-
-</body></html>
\ No newline at end of file
+    <h2 class="domain"><a name="index">Index</a></h2>
+    <h3>Domains</h3><h4>server (<a href="#domain_server">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_server.getVersion">getVersion</a></li><li><a href="#request_server.shutdown">shutdown</a></li><li><a href="#request_server.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_server.connected">connected</a></li><li><a href="#notification_server.error">error</a></li><li><a href="#notification_server.status">status</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getErrors">getErrors</a></li><li><a href="#request_analysis.getHover">getHover</a></li><li><a href="#request_analysis.getLibraryDependencies">getLibraryDependencies</a></li><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.reanalyze">reanalyze</a></li><li><a href="#request_analysis.setAnalysisRoots">setAnalysisRoots</a></li><li><a href="#request_analysis.setGeneralSubscriptions">setGeneralSubscriptions</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li><li><a href="#request_analysis.updateOptions">updateOptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.analyzedFiles">analyzedFiles</a></li><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.flushResults">flushResults</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.invalidate">invalidate</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li><li><a href="#notification_analysis.overrides">overrides</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_completion.results">results</a></li></ul></div></div><h4>search (<a href="#domain_search">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_search.findElementReferences">findElementReferences</a></li><li><a href="#request_search.findMemberDeclarations">findMemberDeclarations</a></li><li><a href="#request_search.findMemberReferences">findMemberReferences</a></li><li><a href="#request_search.findTopLevelDeclarations">findTopLevelDeclarations</a></li><li><a href="#request_search.getTypeHierarchy">getTypeHierarchy</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_search.results">results</a></li></ul></div></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.format">format</a></li><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefactoring</a></li><li><a href="#request_edit.sortMembers">sortMembers</a></li><li><a href="#request_edit.organizeDirectives">organizeDirectives</a></li></ul></div><h4>execution (<a href="#domain_execution">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_execution.createContext">createContext</a></li><li><a href="#request_execution.deleteContext">deleteContext</a></li><li><a href="#request_execution.mapUri">mapUri</a></li><li><a href="#request_execution.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_execution.launchData">launchData</a></li></ul></div></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisOptions">AnalysisOptions</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_AnalysisStatus">AnalysisStatus</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_CompletionId">CompletionId</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_ExecutableFile">ExecutableFile</a></li><li><a href="#type_ExecutableKind">ExecutableKind</a></li><li><a href="#type_ExecutionContextId">ExecutionContextId</a></li><li><a href="#type_ExecutionService">ExecutionService</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_GeneralAnalysisService">GeneralAnalysisService</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_HoverInformation">HoverInformation</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_Override">Override</a></li><li><a href="#type_OverriddenMember">OverriddenMember</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PubStatus">PubStatus</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringFeedback">RefactoringFeedback</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_SearchId">SearchId</a></li><li><a href="#type_SearchResult">SearchResult</a></li><li><a href="#type_SearchResultKind">SearchResultKind</a></li><li><a href="#type_ServerService">ServerService</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_TypeHierarchyItem">TypeHierarchyItem</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div></body></html>
\ No newline at end of file
diff --git a/pkg/analysis_server/lib/completion/completion_core.dart b/pkg/analysis_server/lib/completion/completion_core.dart
index 39d6a83..5003faf 100644
--- a/pkg/analysis_server/lib/completion/completion_core.dart
+++ b/pkg/analysis_server/lib/completion/completion_core.dart
@@ -19,11 +19,9 @@
 abstract class CompletionContributor {
   /**
    * Compute a list of completion suggestions based on the given completion
-   * [request] and return a result that includes those suggestions. This method
-   * is called after specific phases of analysis until the contributor indicates
-   * computation is complete by setting [CompletionResult.isLast] to `true`.
+   * [request]. Return the suggestions that were computed.
    */
-  CompletionResult computeSuggestions(CompletionRequest request);
+  List<CompletionSuggestion> computeSuggestions(CompletionRequest request);
 }
 
 /**
@@ -33,13 +31,6 @@
  */
 abstract class CompletionRequest {
   /**
-   * Return the results that were returned the last time the contributor was
-   * asked for results, or `null` if this is the first request for results at
-   * this location.
-   */
-  //CompletionResult get previousResults;
-
-  /**
    * Return the analysis context in which the completion is being requested.
    */
   AnalysisContext get context;
@@ -68,20 +59,6 @@
  */
 abstract class CompletionResult {
   /**
-   * Return `true` if this result contains suggestions that were not in the
-   * previously returned completion results. This should also be `true` if this
-   * is the first result produced for a given location.
-   */
-  bool get hasNewSuggestions;
-
-  /**
-   * Return `true` if the contributor has contributed all possible completion
-   * suggestions, or `false` if the contributor should be consulted again after
-   * more analysis has been completed.
-   */
-  bool get isLast;
-
-  /**
    * Return the length of the text to be replaced. This will be zero (0) if the
    * suggestion is to be inserted, otherwise it will be greater than zero. For
    * example, if the remainder of the identifier containing the cursor is to be
diff --git a/pkg/analysis_server/lib/completion/completion_dart.dart b/pkg/analysis_server/lib/completion/completion_dart.dart
index ee21567..669b2ef 100644
--- a/pkg/analysis_server/lib/completion/completion_dart.dart
+++ b/pkg/analysis_server/lib/completion/completion_dart.dart
@@ -5,6 +5,7 @@
 library analysis_server.completion.completion_dart;
 
 import 'package:analysis_server/completion/completion_core.dart';
+import 'package:analysis_server/src/protocol.dart';
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -18,7 +19,7 @@
  */
 abstract class DartCompletionContributor extends CompletionContributor {
   @override
-  CompletionResult computeSuggestions(CompletionRequest request) {
+  List<CompletionSuggestion> computeSuggestions(CompletionRequest request) {
     if (request is DartCompletionRequest) {
       return internalComputeSuggestions(request);
     }
@@ -48,11 +49,10 @@
 
   /**
    * Compute a list of completion suggestions based on the given completion
-   * [request] and return a result that includes those suggestions. This method
-   * is called after specific phases of analysis until the contributor indicates
-   * computation is complete by setting [CompletionResult.isLast] to `true`.
+   * [request]. Return the suggestions that were computed.
    */
-  CompletionResult internalComputeSuggestions(DartCompletionRequest request);
+  List<CompletionSuggestion> internalComputeSuggestions(
+      DartCompletionRequest request);
 }
 
 /**
diff --git a/pkg/analysis_server/lib/src/analysis_logger.dart b/pkg/analysis_server/lib/src/analysis_logger.dart
index 5f73552..56f1435 100644
--- a/pkg/analysis_server/lib/src/analysis_logger.dart
+++ b/pkg/analysis_server/lib/src/analysis_logger.dart
@@ -21,7 +21,7 @@
   AnalysisLogger() {
     logging.Logger.root.onRecord.listen((logging.LogRecord record) {
       AnalysisEngine.instance.instrumentationService.logLogEntry(
-          record.level.name, record.time, record.message);
+          record.level.name, record.time, record.message, record.error, record.stackTrace);
     });
   }
 
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 21a0f7e..87c6509 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -183,7 +183,8 @@
    * A table mapping [AnalysisContext]s to the completers that should be
    * completed when analysis of this context is finished.
    */
-  Map<AnalysisContext, Completer<AnalysisDoneReason>> contextAnalysisDoneCompleters =
+  Map<AnalysisContext,
+          Completer<AnalysisDoneReason>> contextAnalysisDoneCompleters =
       new HashMap<AnalysisContext, Completer<AnalysisDoneReason>>();
 
   /**
@@ -291,9 +292,15 @@
    * exceptions to show up in unit tests, but it should be set to false when
    * running a full analysis server.
    */
-  AnalysisServer(this.channel, this.resourceProvider,
-      PubPackageMapProvider packageMapProvider, Index _index, this.serverPlugin,
-      this.options, this.defaultSdk, this.instrumentationService,
+  AnalysisServer(
+      this.channel,
+      this.resourceProvider,
+      PubPackageMapProvider packageMapProvider,
+      Index _index,
+      this.serverPlugin,
+      this.options,
+      this.defaultSdk,
+      this.instrumentationService,
       {ContextManager contextManager: null,
       ResolverProvider packageResolverProvider: null,
       this.rethrowExceptions: true})
@@ -490,8 +497,8 @@
       Uri uri = resourceProvider.pathContext.toUri(path);
       Source sdkSource = defaultSdk.fromFileUri(uri);
       if (sdkSource != null) {
-        AnalysisContext anyContext = folderMap.values.first;
-        return new ContextSourcePair(anyContext, sdkSource);
+        AnalysisContext sdkContext = defaultSdk.context;
+        return new ContextSourcePair(sdkContext, sdkSource);
       }
     }
     // try to find the deep-most containing context
@@ -1039,9 +1046,12 @@
       }
       // Fill the source map.
       bool contextFound = false;
+      if (preferredContext != null) {
+        sourceMap.putIfAbsent(preferredContext, () => <Source>[]).add(source);
+        contextFound = true;
+      }
       for (AnalysisContext context in folderMap.values) {
-        if (context == preferredContext ||
-            context.getKindOf(source) != SourceKind.UNKNOWN) {
+        if (context.getKindOf(source) != SourceKind.UNKNOWN) {
           sourceMap.putIfAbsent(context, () => <Source>[]).add(source);
           contextFound = true;
         }
@@ -1059,11 +1069,7 @@
       throw new RequestFailure(
           new Response.unanalyzedPriorityFiles(requestId, buffer.toString()));
     }
-    folderMap.forEach((Folder folder, AnalysisContext context) {
-      List<Source> sourceList = sourceMap[context];
-      if (sourceList == null) {
-        sourceList = Source.EMPTY_LIST;
-      }
+    sourceMap.forEach((context, List<Source> sourceList) {
       context.analysisPriorityOrder = sourceList;
       // Schedule the context for analysis so that it has the opportunity to
       // cache the AST's for the priority sources as soon as possible.
@@ -1462,7 +1468,6 @@
  * such as request latency.
  */
 class ServerPerformance {
-
   /**
    * The creation time and the time when performance information
    * started to be recorded here.
diff --git a/pkg/analysis_server/lib/src/computer/computer_overrides.dart b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
index 4c8cc8f..b817147 100644
--- a/pkg/analysis_server/lib/src/computer/computer_overrides.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_overrides.dart
@@ -51,8 +51,11 @@
     return _overrides;
   }
 
-  void _addInterfaceOverrides(List<engine.Element> elements, String name,
-      engine.InterfaceType type, bool checkType,
+  void _addInterfaceOverrides(
+      Set<engine.Element> elements,
+      String name,
+      engine.InterfaceType type,
+      bool checkType,
       Set<engine.InterfaceType> visited) {
     if (type == null) {
       return;
@@ -65,6 +68,7 @@
       engine.Element element = _lookupMember(type.element, name);
       if (element != null) {
         elements.add(element);
+        return;
       }
     }
     // check interfaces
@@ -85,9 +89,10 @@
       }
     }
     // interfaces
-    List<engine.Element> interfaceEngineElements = <engine.Element>[];
+    Set<engine.Element> interfaceEngineElements = new Set<engine.Element>();
     _addInterfaceOverrides(interfaceEngineElements, name, _currentClass.type,
         false, new Set<engine.InterfaceType>());
+    interfaceEngineElements.remove(superEngineElement);
     // is there any override?
     if (superEngineElement != null || interfaceEngineElements.isNotEmpty) {
       OverriddenMember superMember = superEngineElement != null
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index 3820db5..ac5bced 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -95,7 +95,7 @@
       : contextManager = contextManager,
         folder = folder,
         pathFilter = new PathFilter(
-            contextManager.resourceProvider.pathContext, folder.path, null) {
+            folder.path, null, contextManager.resourceProvider.pathContext) {
     packageDescriptionPath = packagespecFile.path;
     parent.children.add(this);
   }
@@ -312,7 +312,8 @@
    * Temporary flag to hide WIP .packages support (DEP 5).
    */
   static bool ENABLE_PACKAGESPEC_SUPPORT = serverOptions.isSet(
-      'ContextManagerImpl.ENABLE_PACKAGESPEC_SUPPORT', defaultValue: true);
+      'ContextManagerImpl.ENABLE_PACKAGESPEC_SUPPORT',
+      defaultValue: true);
 
   /**
    * The name of the `lib` directory.
@@ -438,7 +439,7 @@
    */
   ContextInfo getContextInfoFor(Folder folder) {
     ContextInfo info = _getInnermostContextInfoFor(folder.path);
-    if (folder == info.folder) {
+    if (info != null && folder == info.folder) {
       return info;
     }
     return null;
@@ -768,7 +769,7 @@
       try {
         if (ENABLE_PACKAGESPEC_SUPPORT) {
           // Try .packages first.
-          if (pathos.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) {
+          if (pathContext.basename(packagespecFile.path) == PACKAGE_SPEC_NAME) {
             Packages packages = _readPackagespec(packagespecFile);
             return new PackagesFileDisposition(packages);
           }
@@ -1012,14 +1013,14 @@
 
           // Check to see if we need to create a new context.
           if (info.isTopLevel) {
-
             // Only create a new context if this is not the same directory
             // described by our info object.
             if (info.folder.path != directoryPath) {
               if (_isPubspec(path)) {
                 // Check for a sibling .packages file.
-                if (!resourceProvider.getFile(
-                    pathos.join(directoryPath, PACKAGE_SPEC_NAME)).exists) {
+                if (!resourceProvider
+                    .getFile(pathContext.join(directoryPath, PACKAGE_SPEC_NAME))
+                    .exists) {
                   _extractContext(info, resource);
                   return;
                 }
@@ -1027,7 +1028,8 @@
               if (_isPackagespec(path)) {
                 // Check for a sibling pubspec.yaml file.
                 if (!resourceProvider
-                    .getFile(pathos.join(directoryPath, PUBSPEC_NAME)).exists) {
+                    .getFile(pathContext.join(directoryPath, PUBSPEC_NAME))
+                    .exists) {
                   _extractContext(info, resource);
                   return;
                 }
@@ -1071,8 +1073,9 @@
             if (info.folder.path == directoryPath) {
               if (_isPubspec(path)) {
                 // Check for a sibling .packages file.
-                if (!resourceProvider.getFile(
-                    pathos.join(directoryPath, PACKAGE_SPEC_NAME)).exists) {
+                if (!resourceProvider
+                    .getFile(pathContext.join(directoryPath, PACKAGE_SPEC_NAME))
+                    .exists) {
                   _mergeContext(info);
                   return;
                 }
@@ -1080,7 +1083,8 @@
               if (_isPackagespec(path)) {
                 // Check for a sibling pubspec.yaml file.
                 if (!resourceProvider
-                    .getFile(pathos.join(directoryPath, PUBSPEC_NAME)).exists) {
+                    .getFile(pathContext.join(directoryPath, PUBSPEC_NAME))
+                    .exists) {
                   _mergeContext(info);
                   return;
                 }
@@ -1242,7 +1246,8 @@
   /**
    * Initialize a newly created event to indicate which contexts have changed.
    */
-  ContextsChangedEvent({this.added: AnalysisContext.EMPTY_LIST,
+  ContextsChangedEvent(
+      {this.added: AnalysisContext.EMPTY_LIST,
       this.changed: AnalysisContext.EMPTY_LIST,
       this.removed: AnalysisContext.EMPTY_LIST});
 }
@@ -1267,7 +1272,8 @@
 
   @override
   Iterable<UriResolver> createPackageUriResolvers(
-      ResourceProvider resourceProvider) => <UriResolver>[resolver];
+          ResourceProvider resourceProvider) =>
+      <UriResolver>[resolver];
 }
 
 /**
@@ -1325,7 +1331,8 @@
 
   @override
   Iterable<UriResolver> createPackageUriResolvers(
-      ResourceProvider resourceProvider) => const <UriResolver>[];
+          ResourceProvider resourceProvider) =>
+      const <UriResolver>[];
 }
 
 /**
@@ -1365,7 +1372,7 @@
 
   @override
   Iterable<UriResolver> createPackageUriResolvers(
-      ResourceProvider resourceProvider) {
+          ResourceProvider resourceProvider) {
     if (packages != null) {
       // Construct package map for the SdkExtUriResolver.
       Map<String, List<Folder>> packageMap = <String, List<Folder>>{};
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 483f532..c0492bf 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -281,6 +281,11 @@
         options.lint = newOptions.generateLints;
       });
     }
+    if (newOptions.enableSuperMixins != null) {
+      updaters.add((engine.AnalysisOptionsImpl options) {
+        options.enableSuperMixins = newOptions.enableSuperMixins;
+      });
+    }
     server.updateOptions(updaters);
     return new AnalysisUpdateOptionsResult().toResponse(request.id);
   }
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index a956a7d..23536e2 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -192,15 +192,16 @@
     int notificationCount = 0;
     manager.results(completionRequest).listen((CompletionResult result) {
       ++notificationCount;
+      bool isLast = result is CompletionResultImpl ? result.isLast : true;
       performance.logElapseTime("notification $notificationCount send", () {
         sendCompletionNotification(completionId, result.replacementOffset,
-            result.replacementLength, result.suggestions, result.isLast);
+            result.replacementLength, result.suggestions, isLast);
       });
       if (notificationCount == 1) {
         performance.logFirstNotificationComplete('notification 1 complete');
         performance.suggestionCountFirst = result.suggestions.length;
       }
-      if (result.isLast) {
+      if (isLast) {
         performance.notificationCount = notificationCount;
         performance.suggestionCountLast = result.suggestions.length;
         performance.complete();
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 3213537..fa0f849 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -32,6 +32,10 @@
 bool test_simulateRefactoringException_final = false;
 bool test_simulateRefactoringException_init = false;
 
+bool test_simulateRefactoringReset_afterCreateChange = false;
+bool test_simulateRefactoringReset_afterFinalConditions = false;
+bool test_simulateRefactoringReset_afterInitialConditions = false;
+
 /**
  * Instances of the class [EditDomainHandler] implement a [RequestHandler]
  * that handles requests in the edit domain.
@@ -452,6 +456,7 @@
       }
       // validation and create change
       finalStatus = await refactoring.checkFinalConditions();
+      _checkForReset_afterFinalConditions();
       if (_hasFatalError) {
         _sendResultResponse();
         return;
@@ -463,15 +468,47 @@
       // create change
       result.change = await refactoring.createChange();
       result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
+      _checkForReset_afterCreateChange();
       _sendResultResponse();
     }, onError: (exception, stackTrace) {
-      server.instrumentationService.logException(exception, stackTrace);
-      server.sendResponse(
-          new Response.serverError(_request, exception, stackTrace));
+      if (exception is _ResetError) {
+        cancel();
+      } else {
+        server.instrumentationService.logException(exception, stackTrace);
+        server.sendResponse(
+            new Response.serverError(_request, exception, stackTrace));
+      }
       _reset();
     });
   }
 
+  void _checkForReset_afterCreateChange() {
+    if (test_simulateRefactoringReset_afterCreateChange) {
+      _reset();
+    }
+    if (refactoring == null) {
+      throw new _ResetError();
+    }
+  }
+
+  void _checkForReset_afterFinalConditions() {
+    if (test_simulateRefactoringReset_afterFinalConditions) {
+      _reset();
+    }
+    if (refactoring == null) {
+      throw new _ResetError();
+    }
+  }
+
+  void _checkForReset_afterInitialConditions() {
+    if (test_simulateRefactoringReset_afterInitialConditions) {
+      _reset();
+    }
+    if (refactoring == null) {
+      throw new _ResetError();
+    }
+  }
+
   /**
    * Initializes this context to perform a refactoring with the specified
    * parameters. The existing [Refactoring] is reused or created as needed.
@@ -581,6 +618,7 @@
     }
     // check initial conditions
     initStatus = await refactoring.checkInitialConditions();
+    _checkForReset_afterInitialConditions();
     if (refactoring is ExtractLocalRefactoring) {
       ExtractLocalRefactoring refactoring = this.refactoring;
       ExtractLocalVariableFeedback feedback = this.feedback;
@@ -692,3 +730,9 @@
     return new RefactoringStatus();
   }
 }
+
+/**
+ * [_RefactoringManager] throws instances of this class internally to stop
+ * processing in a manager that was reset.
+ */
+class _ResetError {}
diff --git a/pkg/analysis_server/lib/src/generated_protocol.dart b/pkg/analysis_server/lib/src/generated_protocol.dart
index f92288f..b6fe193 100644
--- a/pkg/analysis_server/lib/src/generated_protocol.dart
+++ b/pkg/analysis_server/lib/src/generated_protocol.dart
@@ -7540,6 +7540,7 @@
  *   "enableDeferredLoading": optional bool
  *   "enableEnums": optional bool
  *   "enableNullAwareOperators": optional bool
+ *   "enableSuperMixins": optional bool
  *   "generateDart2jsHints": optional bool
  *   "generateHints": optional bool
  *   "generateLints": optional bool
@@ -7554,6 +7555,8 @@
 
   bool _enableNullAwareOperators;
 
+  bool _enableSuperMixins;
+
   bool _generateDart2jsHints;
 
   bool _generateHints;
@@ -7629,6 +7632,20 @@
   }
 
   /**
+   * True if the client wants to enable spport for the proposed "less
+   * restricted mixins" proposal (DEP 34).
+   */
+  bool get enableSuperMixins => _enableSuperMixins;
+
+  /**
+   * True if the client wants to enable spport for the proposed "less
+   * restricted mixins" proposal (DEP 34).
+   */
+  void set enableSuperMixins(bool value) {
+    this._enableSuperMixins = value;
+  }
+
+  /**
    * True if hints that are specific to dart2js should be generated. This
    * option is ignored if generateHints is false.
    */
@@ -7670,11 +7687,12 @@
     this._generateLints = value;
   }
 
-  AnalysisOptions({bool enableAsync, bool enableDeferredLoading, bool enableEnums, bool enableNullAwareOperators, bool generateDart2jsHints, bool generateHints, bool generateLints}) {
+  AnalysisOptions({bool enableAsync, bool enableDeferredLoading, bool enableEnums, bool enableNullAwareOperators, bool enableSuperMixins, bool generateDart2jsHints, bool generateHints, bool generateLints}) {
     this.enableAsync = enableAsync;
     this.enableDeferredLoading = enableDeferredLoading;
     this.enableEnums = enableEnums;
     this.enableNullAwareOperators = enableNullAwareOperators;
+    this.enableSuperMixins = enableSuperMixins;
     this.generateDart2jsHints = generateDart2jsHints;
     this.generateHints = generateHints;
     this.generateLints = generateLints;
@@ -7701,6 +7719,10 @@
       if (json.containsKey("enableNullAwareOperators")) {
         enableNullAwareOperators = jsonDecoder._decodeBool(jsonPath + ".enableNullAwareOperators", json["enableNullAwareOperators"]);
       }
+      bool enableSuperMixins;
+      if (json.containsKey("enableSuperMixins")) {
+        enableSuperMixins = jsonDecoder._decodeBool(jsonPath + ".enableSuperMixins", json["enableSuperMixins"]);
+      }
       bool generateDart2jsHints;
       if (json.containsKey("generateDart2jsHints")) {
         generateDart2jsHints = jsonDecoder._decodeBool(jsonPath + ".generateDart2jsHints", json["generateDart2jsHints"]);
@@ -7713,7 +7735,7 @@
       if (json.containsKey("generateLints")) {
         generateLints = jsonDecoder._decodeBool(jsonPath + ".generateLints", json["generateLints"]);
       }
-      return new AnalysisOptions(enableAsync: enableAsync, enableDeferredLoading: enableDeferredLoading, enableEnums: enableEnums, enableNullAwareOperators: enableNullAwareOperators, generateDart2jsHints: generateDart2jsHints, generateHints: generateHints, generateLints: generateLints);
+      return new AnalysisOptions(enableAsync: enableAsync, enableDeferredLoading: enableDeferredLoading, enableEnums: enableEnums, enableNullAwareOperators: enableNullAwareOperators, enableSuperMixins: enableSuperMixins, generateDart2jsHints: generateDart2jsHints, generateHints: generateHints, generateLints: generateLints);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "AnalysisOptions", json);
     }
@@ -7733,6 +7755,9 @@
     if (enableNullAwareOperators != null) {
       result["enableNullAwareOperators"] = enableNullAwareOperators;
     }
+    if (enableSuperMixins != null) {
+      result["enableSuperMixins"] = enableSuperMixins;
+    }
     if (generateDart2jsHints != null) {
       result["generateDart2jsHints"] = generateDart2jsHints;
     }
@@ -7755,6 +7780,7 @@
           enableDeferredLoading == other.enableDeferredLoading &&
           enableEnums == other.enableEnums &&
           enableNullAwareOperators == other.enableNullAwareOperators &&
+          enableSuperMixins == other.enableSuperMixins &&
           generateDart2jsHints == other.generateDart2jsHints &&
           generateHints == other.generateHints &&
           generateLints == other.generateLints;
@@ -7769,6 +7795,7 @@
     hash = _JenkinsSmiHash.combine(hash, enableDeferredLoading.hashCode);
     hash = _JenkinsSmiHash.combine(hash, enableEnums.hashCode);
     hash = _JenkinsSmiHash.combine(hash, enableNullAwareOperators.hashCode);
+    hash = _JenkinsSmiHash.combine(hash, enableSuperMixins.hashCode);
     hash = _JenkinsSmiHash.combine(hash, generateDart2jsHints.hashCode);
     hash = _JenkinsSmiHash.combine(hash, generateHints.hashCode);
     hash = _JenkinsSmiHash.combine(hash, generateLints.hashCode);
diff --git a/pkg/analysis_server/lib/src/get_handler.dart b/pkg/analysis_server/lib/src/get_handler.dart
index 360b5da..7300d10 100644
--- a/pkg/analysis_server/lib/src/get_handler.dart
+++ b/pkg/analysis_server/lib/src/get_handler.dart
@@ -1054,6 +1054,7 @@
       _writeOption(buffer, 'Cache size', options.cacheSize);
       _writeOption(
           buffer, 'Enable strict call checks', options.enableStrictCallChecks);
+      _writeOption(buffer, 'Enable super mixins', options.enableSuperMixins);
       _writeOption(buffer, 'Generate hints', options.hint);
       _writeOption(buffer, 'Generate dart2js hints', options.dart2jsHint);
       _writeOption(buffer, 'Generate errors in implicit files',
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index 4f0b490..ea94457 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -105,7 +105,10 @@
   String elementParameters = _getParametersString(element);
   String elementReturnType = getReturnTypeString(element);
   ElementKind kind = newElementKind_fromEngineElement(element);
-  return new Element(kind, name, Element.makeFlags(
+  return new Element(
+      kind,
+      name,
+      Element.makeFlags(
           isPrivate: element.isPrivate,
           isDeprecated: element.isDeprecated,
           isAbstract: _isAbstract(element),
@@ -184,7 +187,8 @@
   if (element is engine.ClassElement && element.isEnum) {
     return ElementKind.ENUM;
   }
-  if (element is engine.FieldElement && element.isEnumConstant &&
+  if (element is engine.FieldElement &&
+      element.isEnumConstant &&
       // MyEnum.values and MyEnum.one.index return isEnumConstant = true
       // so these additional checks are necessary.
       // TODO(danrubel) MyEnum.values is constant, but is a list
@@ -353,16 +357,17 @@
       sb.write(', ');
     }
     if (closeOptionalString.isEmpty) {
-      if (parameter.kind == engine.ParameterKind.NAMED) {
+      engine.ParameterKind kind = parameter.parameterKind;
+      if (kind == engine.ParameterKind.NAMED) {
         sb.write('{');
         closeOptionalString = '}';
       }
-      if (parameter.kind == engine.ParameterKind.POSITIONAL) {
+      if (kind == engine.ParameterKind.POSITIONAL) {
         sb.write('[');
         closeOptionalString = ']';
       }
     }
-    sb.write(parameter.toString());
+    parameter.appendToWithoutDelimiters(sb);
   }
   sb.write(closeOptionalString);
   return '(' + sb.toString() + ')';
diff --git a/pkg/analysis_server/lib/src/services/completion/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/arglist_contributor.dart
index 56a6d73..3d8261a 100644
--- a/pkg/analysis_server/lib/src/services/completion/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/arglist_contributor.dart
@@ -136,6 +136,24 @@
           }
         }
       }
+      if (parent is InstanceCreationExpression) {
+        ConstructorName constructorName = parent.constructorName;
+        if (constructorName != null) {
+          String name = constructorName.toSource();
+          if (name.length > 0) {
+            /*
+             * If a local declaration is found, then return null
+             * indicating that suggestions were added
+             * and no further action is necessary
+             */
+            if (new _LocalArgSuggestionBuilder(request, request.offset, name)
+                .visit(node)) {
+              return null;
+            }
+            return new _ArgSuggestionBuilder(request, name);
+          }
+        }
+      }
     }
     return null;
   }
@@ -169,6 +187,15 @@
         }
       }
     }
+    if (parent is InstanceCreationExpression) {
+      ConstructorName constructorName = parent.constructorName;
+      if (constructorName != null) {
+        ConstructorElement element = constructorName.staticElement;
+        if (element is ExecutableElement) {
+          _addSuggestions(element.parameters);
+        }
+      }
+    }
     return new Future.value(false);
   }
 
@@ -211,13 +238,15 @@
     }
     Iterable<ParameterElement> requiredParam = parameters.where(
         (ParameterElement p) => p.parameterKind == ParameterKind.REQUIRED);
-    if (requiredParam.length > 0 && _isEmptyArgList(request)) {
+    int requiredCount = requiredParam.length;
+    if (requiredCount > 0 && _isEmptyArgList(request)) {
       _addArgListSuggestion(requiredParam);
       return;
     }
-    if (_isAppendingToArgList(request) &&
-        _argCount(request) > requiredParam.length) {
-      _addDefaultParamSuggestions(parameters);
+    if (_isAppendingToArgList(request)) {
+      if (requiredCount == 0 || requiredCount < _argCount(request)) {
+        _addDefaultParamSuggestions(parameters);
+      }
     }
   }
 
@@ -243,7 +272,26 @@
       : super(offset);
 
   @override
-  void declaredClass(ClassDeclaration declaration) {}
+  void declaredClass(ClassDeclaration declaration) {
+    String className = null;
+    if (declaration.name != null) {
+      className = declaration.name.name;
+    }
+    if (className != null && className.length > 0) {
+      for (ClassMember member in declaration.members) {
+        if (member is ConstructorDeclaration) {
+          String selector = className;
+          if (member.name != null) {
+            selector = '$selector.${member.name.name}';
+          }
+          if (selector == name) {
+            _addSuggestions(member.parameters);
+            finished();
+          }
+        }
+      }
+    }
+  }
 
   @override
   void declaredClassTypeAlias(ClassTypeAlias declaration) {}
@@ -330,13 +378,15 @@
     }
     Iterable<FormalParameter> requiredParam = parameters.parameters
         .where((FormalParameter p) => p.kind == ParameterKind.REQUIRED);
-    if (requiredParam.length > 0 && _isEmptyArgList(request)) {
+    int requiredCount = requiredParam.length;
+    if (requiredCount > 0 && _isEmptyArgList(request)) {
       _addArgListSuggestion(requiredParam);
       return;
     }
-    if (_isAppendingToArgList(request) &&
-        _argCount(request) > requiredParam.length) {
-      _addDefaultParamSuggestions(parameters);
+    if (_isAppendingToArgList(request)) {
+      if (requiredCount == 0 || requiredCount < _argCount(request)) {
+        _addDefaultParamSuggestions(parameters);
+      }
     }
   }
 
diff --git a/pkg/analysis_server/lib/src/services/completion/combinator_contributor.dart b/pkg/analysis_server/lib/src/services/completion/combinator_contributor.dart
index 402d4a2..a8ef022 100644
--- a/pkg/analysis_server/lib/src/services/completion/combinator_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/combinator_contributor.dart
@@ -67,7 +67,7 @@
 class _CombinatorSuggestionBuilder extends LibraryElementSuggestionBuilder {
   _CombinatorSuggestionBuilder(
       DartCompletionRequest request, CompletionSuggestionKind kind)
-      : super(request, kind, false);
+      : super(request, kind, false, false);
 
   Future<bool> execute(AstNode node) {
     var directive = node.getAncestor((parent) => parent is NamespaceDirective);
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_target.dart b/pkg/analysis_server/lib/src/services/completion/completion_target.dart
index 7c7badc..a1f315b 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_target.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_target.dart
@@ -320,6 +320,17 @@
       return token.type == TokenType.KEYWORD ||
           token.type == TokenType.IDENTIFIER ||
           token.length == 0;
+    } else if (!token.isSynthetic) {
+      return false;
+    }
+    // If the current token is synthetic, then check the previous token
+    // because it may have been dropped from the parse tree
+    Token previous = token.previous;
+    if (offset < previous.end) {
+      return true;
+    } else if (offset == previous.end) {
+      return token.type == TokenType.KEYWORD ||
+          previous.type == TokenType.IDENTIFIER;
     } else {
       return false;
     }
diff --git a/pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart b/pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart
index 574931b..498c289 100644
--- a/pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/import_uri_contributor.dart
@@ -5,7 +5,6 @@
 library services.completion.contributor.dart.importuri;
 
 import 'dart:async';
-import 'dart:collection';
 import 'dart:core' hide Resource;
 
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
@@ -13,7 +12,8 @@
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:path/path.dart';
+import 'package:path/path.dart' show posix;
+import 'package:path/src/context.dart';
 
 import '../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
@@ -39,7 +39,6 @@
 
 class _ImportUriSuggestionBuilder extends SimpleAstVisitor {
   final DartCompletionRequest request;
-  HashSet<String> _importedUris;
 
   _ImportUriSuggestionBuilder(this.request);
 
@@ -49,12 +48,25 @@
   }
 
   @override
+  visitImportDirective(ImportDirective node) {
+    StringLiteral uri = node.uri;
+    if (uri is SimpleStringLiteral) {
+      int offset = request.offset;
+      if (uri.offset < offset &&
+          (offset < uri.end || offset == uri.offset + 1)) {
+        // Handle degenerate case where import is only line in file
+        // and there is no semicolon
+        visitSimpleStringLiteral(uri);
+      }
+    }
+  }
+
+  @override
   visitSimpleStringLiteral(SimpleStringLiteral node) {
     AstNode parent = node.parent;
     if (parent is ImportDirective && parent.uri == node) {
       String partial = node.literal.lexeme.substring(
           node.contentsOffset - node.offset, request.offset - node.offset);
-      _computeImportedUris();
       request.replacementOffset = node.contentsOffset;
       request.replacementLength = node.contentsEnd - node.contentsOffset;
       _addDartSuggestions();
@@ -63,7 +75,6 @@
     } else if (parent is PartDirective && parent.uri == node) {
       String partial = node.literal.lexeme.substring(
           node.contentsOffset - node.offset, request.offset - node.offset);
-      _computeImportedUris();
       request.replacementOffset = node.contentsOffset;
       request.replacementLength = node.contentsEnd - node.contentsOffset;
       _addFileSuggestions(partial);
@@ -76,38 +87,51 @@
     for (SdkLibrary lib in factory.dartSdk.sdkLibraries) {
       if (!lib.isInternal && !lib.isImplementation) {
         if (!lib.shortName.startsWith('dart:_')) {
-          _addSuggestion(lib.shortName);
+          _addSuggestion(lib.shortName,
+              relevance: lib.shortName == 'dart:core'
+                  ? DART_RELEVANCE_LOW
+                  : DART_RELEVANCE_DEFAULT);
         }
       }
     }
   }
 
-  void _addFileSuggestions(String partial) {
+  void _addFileSuggestions(String partialUri) {
+    ResourceProvider resProvider = request.resourceProvider;
+    Context resContext = resProvider.pathContext;
     Source source = request.source;
-    String sourceFullName = source.fullName;
-    String sourceShortName = source.shortName;
-    String dirPath = (partial.endsWith('/') || partial.endsWith(separator))
-        ? partial
-        : dirname(partial);
-    String prefix = dirPath == '.' ? '' : dirPath;
-    if (isRelative(dirPath)) {
-      String sourceDir = dirname(sourceFullName);
-      if (isAbsolute(sourceDir)) {
-        dirPath = join(sourceDir, dirPath);
+
+    String parentUri;
+    if ((partialUri.endsWith('/'))) {
+      parentUri = partialUri;
+    } else {
+      parentUri = posix.dirname(partialUri);
+      if (parentUri != '.' && !parentUri.endsWith('/')) {
+        parentUri = '$parentUri/';
+      }
+    }
+    String uriPrefix = parentUri == '.' ? '' : parentUri;
+
+    String dirPath = resContext.normalize(parentUri);
+    if (resContext.isRelative(dirPath)) {
+      String sourceDirPath = resContext.dirname(source.fullName);
+      if (resContext.isAbsolute(sourceDirPath)) {
+        dirPath = resContext.join(sourceDirPath, dirPath);
       } else {
         return;
       }
     }
-    Resource dir = request.resourceProvider.getResource(dirPath);
+
+    Resource dir = resProvider.getResource(dirPath);
     if (dir is Folder) {
       for (Resource child in dir.getChildren()) {
         String completion;
         if (child is Folder) {
-          completion = '$prefix${child.shortName}$separator';
+          completion = '$uriPrefix${child.shortName}/';
         } else {
-          completion = '$prefix${child.shortName}';
+          completion = '$uriPrefix${child.shortName}';
         }
-        if (completion != sourceShortName && completion != sourceFullName) {
+        if (completion != source.shortName) {
           _addSuggestion(completion);
         }
       }
@@ -146,24 +170,15 @@
     }
   }
 
-  void _addSuggestion(String completion) {
-    if (!_importedUris.contains(completion)) {
-      request.addSuggestion(new CompletionSuggestion(
-          CompletionSuggestionKind.IMPORT, DART_RELEVANCE_DEFAULT, completion,
-          completion.length, 0, false, false));
-    }
-  }
-
-  void _computeImportedUris() {
-    _importedUris = new HashSet<String>();
-    _importedUris.add('dart:core');
-    for (Directive directive in request.unit.directives) {
-      if (directive is ImportDirective) {
-        String uri = directive.uriContent;
-        if (uri != null && uri.length > 0) {
-          _importedUris.add(uri);
-        }
-      }
-    }
+  void _addSuggestion(String completion,
+      {int relevance: DART_RELEVANCE_DEFAULT}) {
+    request.addSuggestion(new CompletionSuggestion(
+        CompletionSuggestionKind.IMPORT,
+        relevance,
+        completion,
+        completion.length,
+        0,
+        false,
+        false));
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
index 0fced1d..b6ea6ec 100644
--- a/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/imported_reference_contributor.dart
@@ -187,7 +187,7 @@
    */
   void _addInheritedSuggestions(AstNode node) {
     var classDecl = node.getAncestor((p) => p is ClassDeclaration);
-    if (classDecl is ClassDeclaration) {
+    if (classDecl is ClassDeclaration && !optype.inStaticMethodBody) {
       // Build a list of inherited types that are imported
       // and include any inherited imported members
       List<String> inheritedTypes = new List<String>();
diff --git a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
index 33dfa58..6aa3536 100644
--- a/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart
@@ -124,15 +124,8 @@
           !node.directives.any((d) => d is LibraryDirective)) {
         _addSuggestions([Keyword.LIBRARY], DART_RELEVANCE_HIGH);
       }
-      _addSuggestions([Keyword.EXPORT, Keyword.PART], DART_RELEVANCE_HIGH);
-      _addSuggestion2("import '';",
-          offset: 8, relevance: DART_RELEVANCE_HIGH + 1);
-      _addSuggestion2("import '' as ;",
-          offset: 8, relevance: DART_RELEVANCE_HIGH);
-      _addSuggestion2("import '' hide ;",
-          offset: 8, relevance: DART_RELEVANCE_HIGH);
-      _addSuggestion2("import '' show ;",
-          offset: 8, relevance: DART_RELEVANCE_HIGH);
+      _addSuggestions(
+          [Keyword.IMPORT, Keyword.EXPORT, Keyword.PART], DART_RELEVANCE_HIGH);
     }
     if (entity == null || entity is Declaration) {
       if (previousMember is FunctionDeclaration &&
@@ -145,14 +138,6 @@
   }
 
   @override
-  visitPropertyAccess(PropertyAccess node) {
-    // suggestions before '.' but not after
-    if (entity != node.propertyName) {
-      super.visitPropertyAccess(node);
-    }
-  }
-
-  @override
   visitExpression(Expression node) {
     _addExpressionKeywords(node);
   }
@@ -165,6 +150,27 @@
   }
 
   @override
+  visitForEachStatement(ForEachStatement node) {
+    if (entity == node.inKeyword) {
+      Token previous = node.inKeyword.previous;
+      if (previous is SyntheticStringToken && previous.lexeme == 'in') {
+        previous = previous.previous;
+      }
+      if (previous != null && previous.type == TokenType.EQ) {
+        _addSuggestions([
+          Keyword.CONST,
+          Keyword.FALSE,
+          Keyword.NEW,
+          Keyword.NULL,
+          Keyword.TRUE
+        ]);
+      } else {
+        _addSuggestion(Keyword.IN, DART_RELEVANCE_HIGH);
+      }
+    }
+  }
+
+  @override
   visitFormalParameterList(FormalParameterList node) {
     AstNode constructorDecl =
         node.getAncestor((p) => p is ConstructorDeclaration);
@@ -174,6 +180,14 @@
   }
 
   @override
+  visitForStatement(ForStatement node) {
+    if (entity == node.rightSeparator && entity.toString() != ';') {
+      // Handle the degenerate case while typing - for (int x i^)
+      _addSuggestion(Keyword.IN, DART_RELEVANCE_HIGH);
+    }
+  }
+
+  @override
   visitFunctionExpression(FunctionExpression node) {
     if (entity == node.body) {
       if (!node.body.isAsynchronous) {
@@ -203,7 +217,12 @@
         _addSuggestion(Keyword.DEFERRED, DART_RELEVANCE_HIGH);
       }
     }
-    if (entity == node.semicolon || node.combinators.contains(entity)) {
+    // Handle degenerate case where import statement does not have a semicolon
+    // and the cursor is in the uri string
+    if ((entity == node.semicolon &&
+            node.uri != null &&
+            node.uri.offset + 1 != request.offset) ||
+        node.combinators.contains(entity)) {
       _addImportDirectiveKeywords(node);
     }
   }
@@ -218,6 +237,15 @@
   }
 
   @override
+  visitIsExpression(IsExpression node) {
+    if (entity == node.isOperator) {
+      _addSuggestion(Keyword.IS, DART_RELEVANCE_HIGH);
+    } else {
+      _addExpressionKeywords(node);
+    }
+  }
+
+  @override
   visitLibraryIdentifier(LibraryIdentifier node) {
     // no suggestions
   }
@@ -263,6 +291,14 @@
   }
 
   @override
+  visitPropertyAccess(PropertyAccess node) {
+    // suggestions before '.' but not after
+    if (entity != node.propertyName) {
+      super.visitPropertyAccess(node);
+    }
+  }
+
+  @override
   visitReturnStatement(ReturnStatement node) {
     if (entity == node.expression) {
       _addExpressionKeywords(node);
@@ -345,7 +381,13 @@
   }
 
   void _addExpressionKeywords(AstNode node) {
-    _addSuggestions([Keyword.FALSE, Keyword.NEW, Keyword.NULL, Keyword.TRUE,]);
+    _addSuggestions([
+      Keyword.CONST,
+      Keyword.FALSE,
+      Keyword.NEW,
+      Keyword.NULL,
+      Keyword.TRUE,
+    ]);
     if (_inClassMemberBody(node)) {
       _addSuggestions([Keyword.SUPER, Keyword.THIS,]);
     }
@@ -355,12 +397,24 @@
   }
 
   void _addImportDirectiveKeywords(ImportDirective node) {
-    if (node.asKeyword == null) {
+    bool hasDeferredKeyword = node.deferredKeyword != null;
+    bool hasAsKeyword = node.asKeyword != null;
+    if (!hasAsKeyword) {
       _addSuggestion(Keyword.AS, DART_RELEVANCE_HIGH);
-      if (node.deferredKeyword == null) {
+    }
+    if (!hasDeferredKeyword) {
+      if (!hasAsKeyword) {
+        _addSuggestion2('deferred as', relevance: DART_RELEVANCE_HIGH);
+      } else if (entity == node.asKeyword) {
         _addSuggestion(Keyword.DEFERRED, DART_RELEVANCE_HIGH);
       }
     }
+    if (!hasDeferredKeyword || hasAsKeyword) {
+      if (node.combinators.isEmpty) {
+        _addSuggestion2('show', relevance: DART_RELEVANCE_HIGH);
+        _addSuggestion2('hide', relevance: DART_RELEVANCE_HIGH);
+      }
+    }
   }
 
   void _addStatementKeywords(AstNode node) {
@@ -370,12 +424,18 @@
     if (_inAsyncMethodOrFunction(node)) {
       _addSuggestion2(AWAIT);
     }
+    if (_inLoop(node)) {
+      _addSuggestions([Keyword.BREAK, Keyword.CONTINUE]);
+    }
+    if (_inSwitch(node)) {
+      _addSuggestions([Keyword.BREAK]);
+    }
     _addSuggestions([
       Keyword.ASSERT,
-      Keyword.CONTINUE,
+      Keyword.CONST,
       Keyword.DO,
       Keyword.FINAL,
-      //Keyword.FOR,
+      Keyword.FOR,
       Keyword.IF,
       Keyword.NEW,
       Keyword.RETURN,
@@ -386,7 +446,6 @@
       Keyword.VOID,
       Keyword.WHILE
     ]);
-    _addSuggestion2('for ()', offset: 5);
     _addSuggestion(Keyword.RETHROW, DART_RELEVANCE_KEYWORD - 1);
   }
 
@@ -401,8 +460,13 @@
       offset = completion.length;
     }
     request.addSuggestion(new CompletionSuggestion(
-        CompletionSuggestionKind.KEYWORD, relevance, completion, offset, 0,
-        false, false));
+        CompletionSuggestionKind.KEYWORD,
+        relevance,
+        completion,
+        offset,
+        0,
+        false,
+        false));
   }
 
   void _addSuggestions(List<Keyword> keywords,
@@ -430,4 +494,20 @@
       node = parent;
     }
   }
+
+  bool _inDoLoop(AstNode node) =>
+      node.getAncestor((p) => p is DoStatement) != null;
+
+  bool _inForLoop(AstNode node) =>
+      node.getAncestor((p) => p is ForStatement || p is ForEachStatement) !=
+          null;
+
+  bool _inLoop(AstNode node) =>
+      _inDoLoop(node) || _inForLoop(node) || _inWhileLoop(node);
+
+  bool _inSwitch(AstNode node) =>
+      node.getAncestor((p) => p is SwitchStatement) != null;
+
+  bool _inWhileLoop(AstNode node) =>
+      node.getAncestor((p) => p is WhileStatement) != null;
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart b/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
index ac99637..360774a 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
@@ -14,11 +14,18 @@
  * which catches the exception thrown by [finished()].
  */
 abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor {
-  static final TypeName STACKTRACE_TYPE = new TypeName(new SimpleIdentifier(
-      new StringToken(TokenType.IDENTIFIER, 'StackTrace', 0)), null);
+  static final TypeName STACKTRACE_TYPE = new TypeName(
+      new SimpleIdentifier(
+          new StringToken(TokenType.IDENTIFIER, 'StackTrace', 0)),
+      null);
 
   final int offset;
 
+  /**
+   * `true` if local inherited types should be visited.
+   */
+  bool includeLocalInheritedTypes = true;
+
   LocalDeclarationVisitor(this.offset);
 
   void declaredClass(ClassDeclaration declaration);
@@ -113,9 +120,11 @@
   void visitClassDeclaration(ClassDeclaration node) {
     _visitClassDeclarationMembers(node);
     // imported types are handled by the imported reference contributor
-    visitInheritedTypes(node, localDeclaration: (ClassDeclaration classNode) {
-      _visitClassDeclarationMembers(classNode);
-    });
+    if (includeLocalInheritedTypes) {
+      visitInheritedTypes(node, localDeclaration: (ClassDeclaration classNode) {
+        _visitClassDeclarationMembers(classNode);
+      });
+    }
     visitNode(node);
   }
 
@@ -231,7 +240,7 @@
   }
 
   void _visitClassDeclarationMembers(ClassDeclaration node) {
-    node.members.forEach((ClassMember member) {
+    for (ClassMember member in node.members) {
       if (member is FieldDeclaration) {
         member.fields.variables.forEach((VariableDeclaration varDecl) {
           declaredField(member, varDecl);
@@ -239,7 +248,7 @@
       } else if (member is MethodDeclaration) {
         declaredMethod(member);
       }
-    });
+    }
   }
 
   void _visitParamList(FormalParameterList paramList) {
diff --git a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
index 9cfbb0d..6fdb2b6 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
@@ -14,7 +14,6 @@
 import 'package:analysis_server/src/services/completion/local_suggestion_builder.dart';
 import 'package:analysis_server/src/services/completion/optype.dart';
 import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 /**
@@ -38,7 +37,8 @@
       }
       if (optype.includeStatementLabelSuggestions ||
           optype.includeCaseLabelSuggestions) {
-        _LabelVisitor labelVisitor = new _LabelVisitor(request,
+        _LabelVisitor labelVisitor = new _LabelVisitor(
+            request,
             optype.includeStatementLabelSuggestions,
             optype.includeCaseLabelSuggestions);
         labelVisitor.visit(request.target.containingNode);
@@ -188,8 +188,12 @@
     element.returnType = classDecl.name.name;
     CompletionSuggestion suggestion = new CompletionSuggestion(
         CompletionSuggestionKind.INVOCATION,
-        deprecated ? DART_RELEVANCE_LOW : DART_RELEVANCE_DEFAULT, completion,
-        completion.length, 0, deprecated, false,
+        deprecated ? DART_RELEVANCE_LOW : DART_RELEVANCE_DEFAULT,
+        completion,
+        completion.length,
+        0,
+        deprecated,
+        false,
         declaringType: classDecl.name.name,
         element: element,
         parameterNames: parameterNames,
@@ -325,8 +329,13 @@
       String completion = id.name;
       if (completion != null && completion.length > 0 && completion != '_') {
         CompletionSuggestion suggestion = new CompletionSuggestion(
-            CompletionSuggestionKind.IDENTIFIER, DART_RELEVANCE_DEFAULT,
-            completion, completion.length, 0, false, false);
+            CompletionSuggestionKind.IDENTIFIER,
+            DART_RELEVANCE_DEFAULT,
+            completion,
+            completion.length,
+            0,
+            false,
+            false);
         request.addSuggestion(suggestion);
         return suggestion;
       }
@@ -343,7 +352,9 @@
   final DartCompletionRequest request;
   final OpType optype;
 
-  _LocalVisitor(this.request, int offset, this.optype) : super(offset);
+  _LocalVisitor(this.request, int offset, this.optype) : super(offset) {
+    includeLocalInheritedTypes = !optype.inStaticMethodBody;
+  }
 
   @override
   void declaredClass(ClassDeclaration declaration) {
@@ -375,7 +386,8 @@
 
   @override
   void declaredField(FieldDeclaration fieldDecl, VariableDeclaration varDecl) {
-    if (optype.includeReturnValueSuggestions) {
+    if (optype.includeReturnValueSuggestions &&
+        (!optype.inStaticMethodBody || fieldDecl.isStatic)) {
       CompletionSuggestion suggestion =
           createFieldSuggestion(request.source, fieldDecl, varDecl);
       if (suggestion != null) {
@@ -440,8 +452,9 @@
 
   @override
   void declaredMethod(MethodDeclaration declaration) {
-    if (optype.includeReturnValueSuggestions ||
-        optype.includeVoidReturnSuggestions) {
+    if ((optype.includeReturnValueSuggestions ||
+            optype.includeVoidReturnSuggestions) &&
+        (!optype.inStaticMethodBody || declaration.isStatic)) {
       protocol.ElementKind elemKind;
       FormalParameterList param;
       TypeName typeName = declaration.returnType;
@@ -523,19 +536,23 @@
       }
       return typeId.name;
     }).toList();
-    suggestion.requiredParameterCount = paramList.where(
-        (FormalParameter param) => param is! DefaultFormalParameter).length;
+    suggestion.requiredParameterCount = paramList
+        .where((FormalParameter param) => param is! DefaultFormalParameter)
+        .length;
     suggestion.hasNamedParameters = paramList
         .any((FormalParameter param) => param.kind == ParameterKind.NAMED);
   }
 
   void _addSuggestion(
       SimpleIdentifier id, TypeName typeName, protocol.ElementKind elemKind,
-      {bool isAbstract: false, bool isDeprecated: false,
-      ClassDeclaration classDecl, FormalParameterList param,
+      {bool isAbstract: false,
+      bool isDeprecated: false,
+      ClassDeclaration classDecl,
+      FormalParameterList param,
       int relevance: DART_RELEVANCE_DEFAULT}) {
     CompletionSuggestion suggestion = createSuggestion(
-        id, isDeprecated, relevance, typeName, classDecl: classDecl);
+        id, isDeprecated, relevance, typeName,
+        classDecl: classDecl);
     if (suggestion != null) {
       request.addSuggestion(suggestion);
       suggestion.element = createElement(request.source, elemKind, id,
diff --git a/pkg/analysis_server/lib/src/services/completion/optype.dart b/pkg/analysis_server/lib/src/services/completion/optype.dart
index 7ab13f9..02c89bf 100644
--- a/pkg/analysis_server/lib/src/services/completion/optype.dart
+++ b/pkg/analysis_server/lib/src/services/completion/optype.dart
@@ -14,7 +14,6 @@
  * suggestions were requested.
  */
 class OpType {
-
   /**
    * Indicates whether constructor suggestions should be included.
    */
@@ -48,6 +47,11 @@
   bool includeCaseLabelSuggestions = false;
 
   /**
+   * Indicates whether the completion location is in the body of a static method.
+   */
+  bool inStaticMethodBody = false;
+
+  /**
    * Indicates whether the completion target is prefixed.
    */
   bool isPrefixed = false;
@@ -60,6 +64,10 @@
     OpType optype = new OpType._();
     target.containingNode
         .accept(new _OpTypeAstVisitor(optype, target.entity, offset));
+    var mthDecl =
+        target.containingNode.getAncestor((p) => p is MethodDeclaration);
+    optype.inStaticMethodBody =
+        mthDecl is MethodDeclaration && mthDecl.isStatic;
     return optype;
   }
 
@@ -74,7 +82,6 @@
 }
 
 class _OpTypeAstVisitor extends GeneralizingAstVisitor {
-
   /**
    * The entity (AstNode or Token) which will be replaced or displaced by the
    * added text.
@@ -472,7 +479,13 @@
 
   @override
   void visitPrefixedIdentifier(PrefixedIdentifier node) {
-    if (identical(entity, node.identifier)) {
+    if (identical(entity, node.identifier) ||
+        // In addition to the standard case,
+        // handle the exceptional case where the parser considers the would-be
+        // identifier to be a keyword and inserts a synthetic identifier
+        (node.identifier != null &&
+            node.identifier.isSynthetic &&
+            identical(entity, node.identifier.beginToken.previous))) {
       optype.isPrefixed = true;
       if (node.parent is TypeName && node.parent.parent is ConstructorName) {
         optype.includeConstructorSuggestions = true;
@@ -562,9 +575,9 @@
     if (entity is SwitchMember && entity != node.members.first) {
       SwitchMember member = entity as SwitchMember;
       if (offset <= member.offset) {
-          optype.includeReturnValueSuggestions = true;
-          optype.includeTypeNameSuggestions = true;
-          optype.includeVoidReturnSuggestions = true;
+        optype.includeReturnValueSuggestions = true;
+        optype.includeTypeNameSuggestions = true;
+        optype.includeVoidReturnSuggestions = true;
       }
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart b/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
index f3a9db4..0a6ca2c 100644
--- a/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
@@ -19,7 +19,6 @@
 
 import '../../protocol_server.dart'
     show CompletionSuggestion, CompletionSuggestionKind;
-import '../../protocol_server.dart' as protocol;
 
 /**
  * A contributor for calculating invocation / access suggestions
@@ -110,7 +109,6 @@
       ConstructorDeclaration constructorDecl =
           node.getAncestor((p) => p is ConstructorDeclaration);
       if (constructorDecl != null) {
-
         // Compute fields already referenced
         List<String> referencedFields = new List<String>();
         for (FormalParameter param in constructorDecl.parameters.parameters) {
@@ -213,7 +211,6 @@
  * and if found, tries to determine a type for that declaration.
  */
 class _LocalBestTypeVisitor extends LocalDeclarationVisitor {
-
   /**
    * The name for the declaration to be found.
    */
@@ -403,9 +400,13 @@
           if (directive.prefix.name == element.name) {
             // Suggest elements from the imported library
             LibraryElement library = directive.uriElement;
+            AstNode node = request.target.containingNode;
+            bool typesOnly = node.parent is TypeName;
+            bool instCreation =
+                typesOnly && node.parent.parent is ConstructorName;
             LibraryElementSuggestionBuilder.suggestionsFor(request,
-                CompletionSuggestionKind.INVOCATION, library,
-                request.target.containingNode.parent is TypeName);
+                CompletionSuggestionKind.INVOCATION, library, typesOnly,
+                instCreation);
             modified = true;
             if (directive.deferredKeyword != null) {
               FunctionElement loadLibFunct = library.loadLibraryFunction;
diff --git a/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
index c6e376a..a2379ac 100644
--- a/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart
@@ -25,14 +25,16 @@
  * If the suggestion is not currently in scope, then specify
  * importForSource as the source to which an import should be added.
  */
-CompletionSuggestion createSuggestion(Element element,
-    {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
+CompletionSuggestion createSuggestion(Element element, {String completion,
+    CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
     int relevance: DART_RELEVANCE_DEFAULT, Source importForSource}) {
   if (element is ExecutableElement && element.isOperator) {
     // Do not include operators in suggestions
     return null;
   }
-  String completion = element.displayName;
+  if (completion == null) {
+    completion = element.displayName;
+  }
   bool isDeprecated = element.isDeprecated;
   CompletionSuggestion suggestion = new CompletionSuggestion(kind,
       isDeprecated ? DART_RELEVANCE_LOW : relevance, completion,
@@ -189,7 +191,8 @@
   /**
    * Add a suggestion based upon the given element.
    */
-  void addSuggestion(Element element, {int relevance: DART_RELEVANCE_DEFAULT}) {
+  void addSuggestion(Element element,
+      {String prefix, int relevance: DART_RELEVANCE_DEFAULT}) {
     if (element.isPrivate) {
       LibraryElement elementLibrary = element.library;
       CompilationUnitElement unitElem = request.unit.element;
@@ -201,18 +204,25 @@
         return;
       }
     }
-    if (element.isSynthetic) {
+    if (prefix == null && element.isSynthetic) {
       if ((element is PropertyAccessorElement) ||
           element is FieldElement && !_isSpecialEnumField(element)) {
         return;
       }
     }
     String completion = element.displayName;
+    if (prefix != null && prefix.length > 0) {
+      if (completion == null || completion.length <= 0) {
+        completion = prefix;
+      } else {
+        completion = '$prefix.$completion';
+      }
+    }
     if (completion == null || completion.length <= 0) {
       return;
     }
-    CompletionSuggestion suggestion =
-        createSuggestion(element, kind: kind, relevance: relevance);
+    CompletionSuggestion suggestion = createSuggestion(element,
+        completion: completion, kind: kind, relevance: relevance);
     if (suggestion != null) {
       request.addSuggestion(suggestion);
     }
@@ -440,12 +450,18 @@
   final DartCompletionRequest request;
   final CompletionSuggestionKind kind;
   final bool typesOnly;
+  final bool instCreation;
 
-  LibraryElementSuggestionBuilder(this.request, this.kind, this.typesOnly);
+  LibraryElementSuggestionBuilder(
+      this.request, this.kind, this.typesOnly, this.instCreation);
 
   @override
   visitClassElement(ClassElement element) {
-    addSuggestion(element);
+    if (instCreation) {
+      element.visitChildren(this);
+    } else {
+      addSuggestion(element);
+    }
   }
 
   @override
@@ -460,6 +476,19 @@
   }
 
   @override
+  visitConstructorElement(ConstructorElement element) {
+    if (instCreation) {
+      ClassElement classElem = element.enclosingElement;
+      if (classElem != null) {
+        String prefix = classElem.name;
+        if (prefix != null && prefix.length > 0) {
+          addSuggestion(element, prefix: prefix);
+        }
+      }
+    }
+  }
+
+  @override
   visitElement(Element element) {
     // ignored
   }
@@ -473,7 +502,9 @@
 
   @override
   visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
-    addSuggestion(element);
+    if (!instCreation) {
+      addSuggestion(element);
+    }
   }
 
   @override
@@ -487,10 +518,11 @@
    * Add suggestions for the visible members in the given library
    */
   static void suggestionsFor(DartCompletionRequest request,
-      CompletionSuggestionKind kind, LibraryElement library, bool typesOnly) {
+      CompletionSuggestionKind kind, LibraryElement library, bool typesOnly,
+      bool instCreation) {
     if (library != null) {
-      library.visitChildren(
-          new LibraryElementSuggestionBuilder(request, kind, typesOnly));
+      library.visitChildren(new LibraryElementSuggestionBuilder(
+          request, kind, typesOnly, instCreation));
     }
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index dde87a0..e1f81f6 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -85,7 +85,7 @@
   static const CREATE_METHOD =
       const FixKind('CREATE_METHOD', 50, "Create method '{0}'");
   static const CREATE_MISSING_OVERRIDES = const FixKind(
-      'CREATE_MISSING_OVERRIDES', 50, "Create {0} missing override(s)");
+      'CREATE_MISSING_OVERRIDES', 49, "Create {0} missing override(s)");
   static const CREATE_NO_SUCH_METHOD = const FixKind(
       'CREATE_NO_SUCH_METHOD', 51, "Create 'noSuchMethod' method");
   static const IMPORT_LIBRARY_PREFIX = const FixKind('IMPORT_LIBRARY_PREFIX',
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
index b12ecb1..c7ea89e 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/scanner.dart';
-import 'dart:math';
 
 /**
  * Organizer of directives in the [unit].
@@ -57,7 +56,8 @@
 
   bool _isUnusedImport(UriBasedDirective directive) {
     for (AnalysisError error in errors) {
-      if (error.errorCode == HintCode.UNUSED_IMPORT &&
+      if ((error.errorCode == HintCode.DUPLICATE_IMPORT ||
+              error.errorCode == HintCode.UNUSED_IMPORT) &&
           directive.uri.offset == error.offset) {
         return true;
       }
diff --git a/pkg/analysis_server/lib/src/services/correction/sort_members.dart b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
index e6acec7..c27de98 100644
--- a/pkg/analysis_server/lib/src/services/correction/sort_members.dart
+++ b/pkg/analysis_server/lib/src/services/correction/sort_members.dart
@@ -15,6 +15,8 @@
 class MemberSorter {
   static List<_PriorityItem> _PRIORITY_ITEMS = [
     new _PriorityItem(false, _MemberKind.UNIT_FUNCTION_MAIN, false),
+    new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, false),
+    new _PriorityItem(false, _MemberKind.UNIT_VARIABLE_CONST, true),
     new _PriorityItem(false, _MemberKind.UNIT_VARIABLE, false),
     new _PriorityItem(false, _MemberKind.UNIT_VARIABLE, true),
     new _PriorityItem(false, _MemberKind.UNIT_ACCESSOR, false),
@@ -67,7 +69,8 @@
       String suffix = code.substring(code.length - suffixLength, code.length);
       int commonLength = findCommonOverlap(prefix, suffix);
       suffixLength -= commonLength;
-      SourceEdit edit = new SourceEdit(prefixLength,
+      SourceEdit edit = new SourceEdit(
+          prefixLength,
           initialCode.length - suffixLength - prefixLength,
           code.substring(prefixLength, code.length - suffixLength));
       edits.add(edit);
@@ -300,7 +303,11 @@
         List<VariableDeclaration> variables =
             variableDeclaration.variables.variables;
         if (!variables.isEmpty) {
-          kind = _MemberKind.UNIT_VARIABLE;
+          if (variableDeclaration.variables.isConst) {
+            kind = _MemberKind.UNIT_VARIABLE_CONST;
+          } else {
+            kind = _MemberKind.UNIT_VARIABLE;
+          }
           name = variables[0].name.name;
         }
       }
@@ -443,11 +450,12 @@
   static const UNIT_FUNCTION = const _MemberKind('UNIT_FUNCTION', 2);
   static const UNIT_FUNCTION_TYPE = const _MemberKind('UNIT_FUNCTION_TYPE', 3);
   static const UNIT_CLASS = const _MemberKind('UNIT_CLASS', 4);
-  static const UNIT_VARIABLE = const _MemberKind('UNIT_VARIABLE', 5);
-  static const CLASS_ACCESSOR = const _MemberKind('CLASS_ACCESSOR', 6);
-  static const CLASS_CONSTRUCTOR = const _MemberKind('CLASS_CONSTRUCTOR', 7);
-  static const CLASS_FIELD = const _MemberKind('CLASS_FIELD', 8);
-  static const CLASS_METHOD = const _MemberKind('CLASS_METHOD', 9);
+  static const UNIT_VARIABLE_CONST = const _MemberKind('UNIT_VARIABLE', 5);
+  static const UNIT_VARIABLE = const _MemberKind('UNIT_VARIABLE', 6);
+  static const CLASS_ACCESSOR = const _MemberKind('CLASS_ACCESSOR', 7);
+  static const CLASS_CONSTRUCTOR = const _MemberKind('CLASS_CONSTRUCTOR', 8);
+  static const CLASS_FIELD = const _MemberKind('CLASS_FIELD', 9);
+  static const CLASS_METHOD = const _MemberKind('CLASS_METHOD', 10);
 
   final String name;
   final int ordinal;
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index 5b5236c..1f5f937 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -254,6 +254,18 @@
     if (unit != null) {
       return unit;
     }
+    unit = entry.getValue(RESOLVED_UNIT6);
+    if (unit != null) {
+      return unit;
+    }
+    unit = entry.getValue(RESOLVED_UNIT7);
+    if (unit != null) {
+      return unit;
+    }
+    unit = entry.getValue(RESOLVED_UNIT8);
+    if (unit != null) {
+      return unit;
+    }
     return entry.getValue(RESOLVED_UNIT);
   }
 
@@ -1086,6 +1098,7 @@
       _writeOption(buffer, 'Cache size', options.cacheSize);
       _writeOption(
           buffer, 'Enable strict call checks', options.enableStrictCallChecks);
+      _writeOption(buffer, 'Enable super mixins', options.enableSuperMixins);
       _writeOption(buffer, 'Generate hints', options.hint);
       _writeOption(buffer, 'Generate dart2js hints', options.dart2jsHint);
       _writeOption(buffer, 'Generate errors in implicit files',
diff --git a/pkg/analysis_server/pubspec.yaml b/pkg/analysis_server/pubspec.yaml
index 2b14dd6..0029437 100644
--- a/pkg/analysis_server/pubspec.yaml
+++ b/pkg/analysis_server/pubspec.yaml
@@ -6,9 +6,9 @@
 environment:
   sdk: '>=1.9.0 <2.0.0'
 dependencies:
-  analyzer: '>=0.26.0-alpha.0 <0.27.0'
+  analyzer: '>=0.26.1+3 <0.27.0'
   args: '>=0.13.0 <0.14.0'
-  dart_style: '>=0.1.7 <0.2.0'
+  dart_style: '>=0.2.0 <0.3.0'
   logging: any
   path: any
   plugin: <0.2.0
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index 696a2ae..46f0dbf 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -41,7 +41,7 @@
   static final DartSdk SDK = new MockSdk();
   static final UriResolver SDK_RESOLVER = new DartUriResolver(SDK);
 
-  MemoryResourceProvider provider = new MemoryResourceProvider();
+  MemoryResourceProvider provider;
   Map<String, List<Folder>> packageMap;
   UriResolver resourceResolver;
   AnalysisContext context;
@@ -83,6 +83,7 @@
   }
 
   void setUp() {
+    setupResourceProvider();
     resourceResolver = new ResourceUriResolver(provider);
     packageMap = new Map<String, List<Folder>>();
     PackageMapUriResolver packageResolver =
@@ -92,6 +93,10 @@
         new SourceFactory([SDK_RESOLVER, packageResolver, resourceResolver]);
   }
 
+  void setupResourceProvider() {
+    provider = new MemoryResourceProvider();
+  }
+
   void tearDown() {
     context = null;
     provider = null;
diff --git a/pkg/analysis_server/test/analysis/get_errors_test.dart b/pkg/analysis_server/test/analysis/get_errors_test.dart
index 4cc0a2f..ee73e43 100644
--- a/pkg/analysis_server/test/analysis/get_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/get_errors_test.dart
@@ -13,9 +13,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(GetErrorsTest);
 }
 
@@ -50,7 +51,9 @@
 
   test_fileWithoutContext() {
     String file = '/outside.dart';
-    addFile(file, '''
+    addFile(
+        file,
+        '''
 main() {
   print(42);
 }
diff --git a/pkg/analysis_server/test/analysis/get_hover_test.dart b/pkg/analysis_server/test/analysis/get_hover_test.dart
index 7261b3c..bda7c91 100644
--- a/pkg/analysis_server/test/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/analysis/get_hover_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisHoverTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/get_navigation_test.dart b/pkg/analysis_server/test/analysis/get_navigation_test.dart
index 752ee27..a87a588 100644
--- a/pkg/analysis_server/test/analysis/get_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/get_navigation_test.dart
@@ -10,16 +10,17 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'notification_navigation_test.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(GetNavigationTest);
 }
 
 @reflectiveTest
 class GetNavigationTest extends AbstractNavigationTest {
-  static const String requestId = 'test-getNavigtion';
+  static const String requestId = 'test-getNavigation';
 
   @override
   void setUp() {
@@ -47,7 +48,9 @@
 
   test_fileWithoutContext() {
     String file = '/outside.dart';
-    addFile(file, '''
+    addFile(
+        file,
+        '''
 main() {
   print(42);
 }
diff --git a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
index c4fbf14..7e330a6 100644
--- a/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_analyzedFiles_test.dart
@@ -13,9 +13,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationAnalyzedFilesTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index 3375ba4..e03a380 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(NotificationErrorsTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test.dart b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
index 5e08e7b..0f1535e 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
@@ -12,8 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationHighlightsTest);
   defineReflectiveTests(HighlightTypeTest);
 }
@@ -995,7 +997,9 @@
   }
 
   void _addLibraryForTestPart() {
-    addFile('$testFolder/my_lib.dart', '''
+    addFile(
+        '$testFolder/my_lib.dart',
+        '''
 library lib;
 part 'test.dart';
     ''');
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
index 7659125..002bb1b 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test2.dart
@@ -12,8 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationHighlightsTest);
   defineReflectiveTests(HighlightTypeTest);
 }
@@ -1061,7 +1063,9 @@
   }
 
   void _addLibraryForTestPart() {
-    addFile('$testFolder/my_lib.dart', '''
+    addFile(
+        '$testFolder/my_lib.dart',
+        '''
 library lib;
 part 'test.dart';
     ''');
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 09de3e8..f518910 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -12,9 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationNavigationTest);
 }
 
@@ -44,7 +45,8 @@
     }
     fail(
         'Expected to find target (file=$file; offset=$offset; length=$length) in\n'
-        '${testRegion} in\n' '${testTargets.join('\n')}');
+        '${testRegion} in\n'
+        '${testTargets.join('\n')}');
   }
 
   void assertHasOperatorRegion(String regionSearch, int regionLength,
diff --git a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
index d7f8779..fbcc017 100644
--- a/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_occurrences_test.dart
@@ -12,9 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationOccurrencesTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/notification_outline_test.dart b/pkg/analysis_server/test/analysis/notification_outline_test.dart
index 6311762..2d459ac 100644
--- a/pkg/analysis_server/test/analysis/notification_outline_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_outline_test.dart
@@ -12,8 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(_AnalysisNotificationOutlineTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/notification_overrides_test.dart b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
index 86b1dc1..bd0343f 100644
--- a/pkg/analysis_server/test/analysis/notification_overrides_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_overrides_test.dart
@@ -12,9 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNotificationOverridesTest);
 }
 
@@ -226,6 +227,58 @@
     });
   }
 
+  test_interface_stopWhenFound() {
+    addTestFile('''
+class A {
+  m() {} // in A
+}
+class B extends A {
+  m() {} // in B
+}
+class C implements B {
+  m() {} // in C
+}
+''');
+    return prepareOverrides().then((_) {
+      assertHasOverride('m() {} // in C');
+      expect(override.interfaceMembers, hasLength(1));
+      assertHasInterfaceMember('m() {} // in B');
+    });
+  }
+
+  test_mix_sameMethod() {
+    addTestFile('''
+class A {
+  m() {} // in A
+}
+abstract class B extends A {
+}
+class C extends A implements A {
+  m() {} // in C
+}
+''');
+    return prepareOverrides().then((_) {
+      assertHasOverride('m() {} // in C');
+      assertHasSuperElement('m() {} // in A');
+      assertNoInterfaceMembers();
+    });
+  }
+
+  test_mix_sameMethod_Object_hashCode() {
+    addTestFile('''
+class A {}
+abstract class B {}
+class C extends A implements A {
+  int get hashCode => 42;
+}
+''');
+    return prepareOverrides().then((_) {
+      assertHasOverride('hashCode => 42;');
+      expect(override.superclassMember, isNotNull);
+      expect(override.interfaceMembers, isNull);
+    });
+  }
+
   test_staticMembers() {
     addTestFile('''
 class A {
diff --git a/pkg/analysis_server/test/analysis/reanalyze_test.dart b/pkg/analysis_server/test/analysis/reanalyze_test.dart
index 0884fdb..9354f74 100644
--- a/pkg/analysis_server/test/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/analysis/reanalyze_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ReanalyzeTest);
 }
 
diff --git a/pkg/analysis_server/test/analysis/set_priority_files_test.dart b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
new file mode 100644
index 0000000..bb52a5e
--- /dev/null
+++ b/pkg/analysis_server/test/analysis/set_priority_files_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.analysis.set_priority_files;
+
+import 'package:analysis_server/src/domain_analysis.dart';
+import 'package:analysis_server/src/protocol.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+import 'package:unittest/unittest.dart';
+
+import '../analysis_abstract.dart';
+import '../mocks.dart';
+import '../utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  defineReflectiveTests(SetPriorityFilesTest);
+}
+
+@reflectiveTest
+class SetPriorityFilesTest extends AbstractAnalysisTest {
+  @override
+  void setUp() {
+    super.setUp();
+    server.handlers = [new AnalysisDomainHandler(server),];
+    createProject();
+  }
+
+  test_fileDoesNotExist() async {
+    String file = '$projectPath/doesNotExist.dart';
+    Response response = await _setPriorityFile(file);
+    expect(response, isResponseSuccess('0'));
+  }
+
+  test_fileInAnalysisRoot() async {
+    addTestFile('');
+    Response response = await _setPriorityFile(testFile);
+    expect(response, isResponseSuccess('0'));
+  }
+
+  test_fileInSdk() async {
+    addTestFile('');
+    await server.onAnalysisComplete;
+    Response response = await _setPriorityFile('/lib/convert/convert.dart');
+    expect(response, isResponseSuccess('0'));
+  }
+
+  test_fileNotInAnalysisRoot() async {
+    String path = '/other/file.dart';
+    addFile(path, '');
+    Response response = await _setPriorityFile(path);
+    expect(response.error, isNotNull);
+    expect(response.error.code, RequestErrorCode.UNANALYZED_PRIORITY_FILES);
+  }
+
+  _setPriorityFile(String file) async {
+    Request request =
+        new AnalysisSetPriorityFilesParams(<String>[file]).toRequest('0');
+    return await serverChannel.sendRequest(request);
+  }
+}
diff --git a/pkg/analysis_server/test/analysis/test_all.dart b/pkg/analysis_server/test/analysis/test_all.dart
index 69e0e9b..67d28c2 100644
--- a/pkg/analysis_server/test/analysis/test_all.dart
+++ b/pkg/analysis_server/test/analysis/test_all.dart
@@ -5,6 +5,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'get_errors_test.dart' as get_errors_test;
 import 'get_hover_test.dart' as get_hover_test;
 import 'get_navigation_test.dart' as get_navigation_test;
@@ -17,13 +18,14 @@
 import 'notification_occurrences_test.dart' as notification_occurrences_test;
 import 'notification_outline_test.dart' as notification_outline_test;
 import 'notification_overrides_test.dart' as notification_overrides_test;
+import 'set_priority_files_test.dart' as set_priority_files_test;
 import 'update_content_test.dart' as update_content_test;
 
 /**
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('search', () {
     get_errors_test.main();
     get_hover_test.main();
@@ -36,6 +38,7 @@
     notification_occurrences_test.main();
     notification_outline_test.main();
     notification_overrides_test.main();
+    set_priority_files_test.main();
     update_content_test.main();
   });
 }
diff --git a/pkg/analysis_server/test/analysis/update_content_test.dart b/pkg/analysis_server/test/analysis/update_content_test.dart
index 135ce6a..9681c47 100644
--- a/pkg/analysis_server/test/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/analysis/update_content_test.dart
@@ -17,9 +17,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(UpdateContentTest);
 }
 
@@ -55,8 +56,9 @@
     createProject();
     addTestFile('');
     await server.onAnalysisComplete;
-    server.setAnalysisSubscriptions(
-        {AnalysisService.NAVIGATION: [testFile].toSet()});
+    server.setAnalysisSubscriptions({
+      AnalysisService.NAVIGATION: [testFile].toSet()
+    });
     // update file, analyze, but don't sent notifications
     navigationCount = 0;
     server.updateContent('1', {testFile: new AddContentOverlay('foo() {}')});
@@ -110,17 +112,23 @@
 
   test_multiple_contexts() async {
     String fooPath = '/project1/foo.dart';
-    resourceProvider.newFile(fooPath, '''
+    resourceProvider.newFile(
+        fooPath,
+        '''
 library foo;
 import '../project2/baz.dart';
 main() { f(); }''');
     String barPath = '/project2/bar.dart';
-    resourceProvider.newFile(barPath, '''
+    resourceProvider.newFile(
+        barPath,
+        '''
 library bar;
 import 'baz.dart';
 main() { f(); }''');
     String bazPath = '/project2/baz.dart';
-    resourceProvider.newFile(bazPath, '''
+    resourceProvider.newFile(
+        bazPath,
+        '''
 library baz;
 f(int i) {}
 ''');
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 467a170..0be6177 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -27,9 +27,10 @@
 
 import 'mock_sdk.dart';
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisServerTest);
 }
 
@@ -53,12 +54,16 @@
     // bar.dart.
     resourceProvider.newFolder('/foo');
     resourceProvider.newFolder('/bar');
-    File foo = resourceProvider.newFile('/foo/foo.dart', '''
+    File foo = resourceProvider.newFile(
+        '/foo/foo.dart',
+        '''
 libary foo;
 import "../bar/bar.dart";
 ''');
     Source fooSource = foo.createSource();
-    File bar = resourceProvider.newFile('/bar/bar.dart', '''
+    File bar = resourceProvider.newFile(
+        '/bar/bar.dart',
+        '''
 library bar;
 import "../foo/foo.dart";
 ''');
@@ -121,9 +126,16 @@
     ExtensionManager manager = new ExtensionManager();
     ServerPlugin serverPlugin = new ServerPlugin();
     manager.processPlugins([serverPlugin]);
-    server = new AnalysisServer(channel, resourceProvider, packageMapProvider,
-        null, serverPlugin, new AnalysisServerOptions(), new MockSdk(),
-        InstrumentationService.NULL_SERVICE, rethrowExceptions: true);
+    server = new AnalysisServer(
+        channel,
+        resourceProvider,
+        packageMapProvider,
+        null,
+        serverPlugin,
+        new AnalysisServerOptions(),
+        new MockSdk(),
+        InstrumentationService.NULL_SERVICE,
+        rethrowExceptions: true);
   }
 
   Future test_contextDisposed() {
@@ -405,8 +417,8 @@
 
   void test_rethrowExceptions() {
     Exception exceptionToThrow = new Exception('test exception');
-    MockServerOperation operation = new MockServerOperation(
-        ServerOperationPriority.ANALYSIS, (_) {
+    MockServerOperation operation =
+        new MockServerOperation(ServerOperationPriority.ANALYSIS, (_) {
       throw exceptionToThrow;
     });
     server.operationQueue.add(operation);
diff --git a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
index 4a5631b..776b6d2 100644
--- a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
+++ b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
@@ -14,8 +14,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
+  initializeTestEnvironment();
   group('ByteStreamClientChannel', () {
     setUp(ByteStreamClientChannelTest.setUp);
     test('close', ByteStreamClientChannelTest.close);
@@ -215,8 +217,9 @@
 
   static Future sendNotification() {
     channel.sendNotification(new Notification('foo'));
-    return outputLineStream.first.timeout(new Duration(seconds: 1)).then(
-        (String notification) {
+    return outputLineStream.first
+        .timeout(new Duration(seconds: 1))
+        .then((String notification) {
       var jsonNotification = new JsonCodec().decode(notification);
       expect(jsonNotification, isMap);
       expect(jsonNotification, contains('event'));
@@ -226,8 +229,9 @@
 
   static Future sendResponse() {
     channel.sendResponse(new Response('foo'));
-    return outputLineStream.first.timeout(new Duration(seconds: 1)).then(
-        (String response) {
+    return outputLineStream.first
+        .timeout(new Duration(seconds: 1))
+        .then((String response) {
       var jsonResponse = new JsonCodec().decode(response);
       expect(jsonResponse, isMap);
       expect(jsonResponse, contains('id'));
diff --git a/pkg/analysis_server/test/channel/test_all.dart b/pkg/analysis_server/test/channel/test_all.dart
index 896155e..d177863 100644
--- a/pkg/analysis_server/test/channel/test_all.dart
+++ b/pkg/analysis_server/test/channel/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'byte_stream_channel_test.dart' as byte_stream_channel_test;
 import 'web_socket_channel_test.dart' as web_socket_channel_test;
 
@@ -13,7 +14,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('computer', () {
     byte_stream_channel_test.main();
     web_socket_channel_test.main();
diff --git a/pkg/analysis_server/test/channel/web_socket_channel_test.dart b/pkg/analysis_server/test/channel/web_socket_channel_test.dart
index b7b6391..8dcaca9 100644
--- a/pkg/analysis_server/test/channel/web_socket_channel_test.dart
+++ b/pkg/analysis_server/test/channel/web_socket_channel_test.dart
@@ -12,8 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
+  initializeTestEnvironment();
   group('WebSocketChannel', () {
     setUp(WebSocketChannelTest.setUp);
     test('close', WebSocketChannelTest.close);
@@ -128,8 +130,9 @@
 
   static Future response() {
     server.sendResponse(new Response('myId'));
-    return client.responseStream.first.timeout(new Duration(seconds: 1)).then(
-        (Response response) {
+    return client.responseStream.first
+        .timeout(new Duration(seconds: 1))
+        .then((Response response) {
       expect(response.id, equals('myId'));
       expectMsgCount(responseCount: 1);
     });
diff --git a/pkg/analysis_server/test/completion_test.dart b/pkg/analysis_server/test/completion_test.dart
index bd78eda..0cebf2f 100644
--- a/pkg/analysis_server/test/completion_test.dart
+++ b/pkg/analysis_server/test/completion_test.dart
@@ -10,6 +10,13 @@
 import 'package:unittest/unittest.dart';
 
 import 'completion_test_support.dart';
+import 'utils.dart';
+
+main() {
+  initializeTestEnvironment();
+  CompletionTestBuilder builder = new CompletionTestBuilder();
+  builder.buildAll();
+}
 
 /**
  * Assigning the name of a single test to this string causes just that test to
@@ -17,11 +24,6 @@
  */
 const String SOLO_TEST = null;
 
-main() {
-  CompletionTestBuilder builder = new CompletionTestBuilder();
-  builder.buildAll();
-}
-
 /**
  * Type of functions used to create tests.
  */
@@ -53,193 +55,316 @@
   }
 
   void buildCommentSnippetTests() {
-    buildTests('testCommentSnippets001', '''
+    buildTests(
+        'testCommentSnippets001',
+        '''
 class X {static final num MAX = 0;num yc,xc;mth() {xc = yc = MA!1X;x!2c.abs();num f = M!3AX;}}''',
         <String>["1+MAX", "2+xc", "3+MAX"]);
 
-    buildTests('testCommentSnippets002', '''
+    buildTests(
+        'testCommentSnippets002',
+        '''
 class Y {String x='hi';mth() {x.l!1ength;int n = 0;x!2.codeUnitAt(n!3);}}''',
         <String>["1+length", "2+x", "3+n"]);
 
-    buildTests('testCommentSnippets004', '''
+    buildTests(
+        'testCommentSnippets004',
+        '''
 class A {!1int x; !2mth() {!3int y = this.!5x!6;}}class B{}''',
         <String>["1+A", "2+B", "3+x", "3-y", "5+mth", "6+x"]);
 
-    buildTests('testCommentSnippets005', '''
+    buildTests(
+        'testCommentSnippets005',
+        '''
 class Date { static Date JUN, JUL;}class X { m() { return Da!1te.JU!2L; }}''',
         <String>["1+Date", "2+JUN", "2+JUL"]);
 
-    buildTests('testCommentSnippets007', '''
+    buildTests(
+        'testCommentSnippets007',
+        '''
 class C {mth(Map x, !1) {}mtf(!2, Map x) {}m() {for (in!3t i=0; i<5; i++); A!4 x;}}class int{}class Arrays{}''',
         <String>["1+bool", "2+bool", "3+int", "4+Arrays"]);
 
-    buildTests('testCommentSnippets008', '''
-class Date{}final num M = Dat!1''', <String>["1+Date"]);
+    buildTests(
+        'testCommentSnippets008',
+        '''
+class Date{}final num M = Dat!1''',
+        <String>["1+Date"]);
 
     // space, char, eol are important
-    buildTests('testCommentSnippets009', '''
-class Maps{}class x extends!5 !2M!3 !4implements!6 !1\n{}''', <String>[
-      "1+Map",
-      "2+Maps",
-      "3+Maps",
-      "4-Maps",
-      "4+implements",
-      "5-Maps",
-      "6-Map",
-      "6+implements"
-    ], failingTests: '46');
+    buildTests(
+        'testCommentSnippets009',
+        '''
+class Maps{}class x extends!5 !2M!3 !4implements!6 !1\n{}''',
+        <String>[
+          "1+Map",
+          "2+Maps",
+          "3+Maps",
+          "4-Maps",
+          "4+implements",
+          "5-Maps",
+          "6-Map",
+          "6+implements"
+        ],
+        failingTests: '46');
 
     // space, char, eol are important
-    buildTests('testCommentSnippets010', '''
-class x implements !1{}''', <String>["1+Map"]);
+    buildTests(
+        'testCommentSnippets010',
+        '''
+class x implements !1{}''',
+        <String>["1+Map"]);
 
     // space, char, eol are important
-    buildTests('testCommentSnippets011', '''
-class x implements M!1{}''', <String>["1+Map"]);
+    buildTests(
+        'testCommentSnippets011',
+        '''
+class x implements M!1{}''',
+        <String>["1+Map"]);
 
     // space, char, eol are important
-    buildTests('testCommentSnippets012', '''
-class x implements M!1\n{}''', <String>["1+Map"]);
+    buildTests(
+        'testCommentSnippets012',
+        '''
+class x implements M!1\n{}''',
+        <String>["1+Map"]);
 
-    buildTests('testCommentSnippets013', '''
-class x !2{!1}!3''', <String>["1+num", "2-num", "3+num"]);
+    buildTests(
+        'testCommentSnippets013',
+        '''
+class x !2{!1}!3''',
+        <String>["1+num", "2-num", "3+num"]);
 
     // trailing space is important
-    buildTests('testCommentSnippets014', '''
-typedef n!1 ;''', <String>["1+num"]);
+    buildTests(
+        'testCommentSnippets014',
+        '''
+typedef n!1 ;''',
+        <String>["1+num"]);
 
-    buildTests('testCommentSnippets015', '''
-class D {f(){} g(){f!1(f!2);}}''', <String>["1+f", "2+f"]);
+    buildTests(
+        'testCommentSnippets015',
+        '''
+class D {f(){} g(){f!1(f!2);}}''',
+        <String>["1+f", "2+f"]);
 
-    buildTests('testCommentSnippets016', '''
-class F {m() { m(); !1}}''', <String>["1+m"]);
+    buildTests(
+        'testCommentSnippets016',
+        '''
+class F {m() { m(); !1}}''',
+        <String>["1+m"]);
 
-    buildTests('testCommentSnippets017', '''
-class F {var x = !1false;}''', <String>["1+true"]);
+    buildTests(
+        'testCommentSnippets017',
+        '''
+class F {var x = !1false;}''',
+        <String>["1+true"]);
 
-    buildTests('testCommentSnippets018', '''
+    buildTests(
+        'testCommentSnippets018',
+        '''
 class Map{}class Arrays{}class C{ m(!1){} n(!2 x, q)''',
         <String>["1+Map", "1-void", "1-null", "2+Arrays", "2-void", "2-null"]);
 
-    buildTests('testCommentSnippets019', '''
-class A{m(){Object x;x.!1/**/clear()''', <String>["1+toString"]);
+    buildTests(
+        'testCommentSnippets019',
+        '''
+class A{m(){Object x;x.!1/**/clear()''',
+        <String>["1+toString"]);
 
-    buildTests('testCommentSnippets020', '''
+    buildTests(
+        'testCommentSnippets020',
+        '''
 classMap{}class tst {var newt;void newf(){}test() {var newz;new!1/**/;}}''',
         <String>["1+newt", "1+newf", "1+newz", "1-Map"]);
 
-    buildTests('testCommentSnippets021', '''
+    buildTests(
+        'testCommentSnippets021',
+        '''
 class Map{}class tst {var newt;void newf(){}test() {var newz;new !1/**/;}}''',
         <String>["1+Map", "1-newt"]);
 
-    buildTests('testCommentSnippets022', '''
-class Map{}class F{m(){new !1;}}''', <String>["1+Map"]);
+    buildTests(
+        'testCommentSnippets022',
+        '''
+class Map{}class F{m(){new !1;}}''',
+        <String>["1+Map"]);
 
-    buildTests('testCommentSnippets022a', '''
-class Map{}class F{m(){new !1''', <String>["1+Map"]);
+    buildTests(
+        'testCommentSnippets022a',
+        '''
+class Map{}class F{m(){new !1''',
+        <String>["1+Map"]);
 
-    buildTests('testCommentSnippets022b', '''
+    buildTests(
+        'testCommentSnippets022b',
+        '''
 class Map{factory Map.qq(){return null;}}class F{m(){new Map.!1qq();}}''',
         <String>["1+qq"]);
 
-    buildTests('testCommentSnippets023', '''
+    buildTests(
+        'testCommentSnippets023',
+        '''
 class X {X c; X(this.!1c!3) : super() {c.!2}}''',
         <String>["1+c", "2+c", "3+c"]);
 
-    buildTests('testCommentSnippets024', '''
-class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''', <String>["1+x", "2+x"]);
+    buildTests(
+        'testCommentSnippets024',
+        '''
+class q {m(Map q){var x;m(!1)}n(){var x;n(!2)}}''',
+        <String>["1+x", "2+x"]);
 
-    buildTests('testCommentSnippets025', '''
+    buildTests(
+        'testCommentSnippets025',
+        '''
 class q {num m() {var q; num x=!1 q!3 + !2/**/;}}''',
         <String>["1+q", "2+q", "3+q"]);
 
-    buildTests('testCommentSnippets026', '''
-class List{}class a implements !1{}''', <String>["1+List"]);
+    buildTests(
+        'testCommentSnippets026',
+        '''
+class List{}class a implements !1{}''',
+        <String>["1+List"]);
 
-    buildTests('testCommentSnippets027', '''
+    buildTests(
+        'testCommentSnippets027',
+        '''
 class String{}class List{}class test <X extends !1String!2> {}''',
         <String>["1+List", "2+String", "2-List"]);
 
-    buildTests('testCommentSnippets028', '''
+    buildTests(
+        'testCommentSnippets028',
+        '''
 class String{}class List{}class DateTime{}typedef T Y<T extends !1>(List input);''',
         <String>["1+DateTime", "1+String"]);
 
-    buildTests('testCommentSnippets029', '''
+    buildTests(
+        'testCommentSnippets029',
+        '''
 interface A<X> default B<X extends !1List!2> {}''',
         <String>["1+DateTime", "2+List"]);
 
-    buildTests('testCommentSnippets030', '''
+    buildTests(
+        'testCommentSnippets030',
+        '''
 class Bar<T extends Foo> {const Bar(!1T!2 k);T!3 m(T!4 a, T!5 b){}final T!6 f = null;}''',
         <String>["1+T", "2+T", "3+T", "4+T", "5+T", "6+T"],
         failingTests: '123456');
 
-    buildTests('testCommentSnippets031', '''
+    buildTests(
+        'testCommentSnippets031',
+        '''
 class Bar<T extends Foo> {m(x){if (x is !1) return;if (x is!!!2)}}''',
-        <String>["1+Bar", "1+T", "2+T", "2+Bar"], failingTests: '12');
+        <String>["1+Bar", "1+T", "2+T", "2+Bar"],
+        failingTests: '12');
 
-    buildTests('testCommentSnippets032', '''
+    buildTests(
+        'testCommentSnippets032',
+        '''
 class Fit{}class Bar<T extends Fooa> {const !2F!1ara();}''',
-        <String>["1+Fit", "1+Fara", "1-Bar", "2+Fit"], failingTests: '1');
+        <String>["1+Fit", "1+Fara", "1-Bar", "2+Fit"],
+        failingTests: '1');
 
     // Type propagation
-    buildTests('testCommentSnippets033', '''
+    buildTests(
+        'testCommentSnippets033',
+        '''
 class List{add(){}length(){}}t1() {var x;if (x is List) {x.!1add(3);}}''',
         <String>["1+add", "1+length"]);
 
     // Type propagation
-    buildTests('testCommentSnippets035', '''
+    buildTests(
+        'testCommentSnippets035',
+        '''
 class List{clear(){}length(){}}t3() {var x=new List(), y=x.!1length();x.!2clear();}''',
         <String>["1+length", "2+clear"]);
 
-    buildTests('testCommentSnippets036', '''
-class List{}t3() {var x=new List!1}''', <String>["1+List"]);
+    buildTests(
+        'testCommentSnippets036',
+        '''
+class List{}t3() {var x=new List!1}''',
+        <String>["1+List"]);
 
-    buildTests('testCommentSnippets037', '''
+    buildTests(
+        'testCommentSnippets037',
+        '''
 class List{factory List.from(){}}t3() {var x=new List.!1}''',
         <String>["1+from"]);
 
-    buildTests('testCommentSnippets038', '''
-f(){int xa; String s = '\$x!1';}''', <String>["1+xa"]);
+    buildTests(
+        'testCommentSnippets038',
+        '''
+f(){int xa; String s = '\$x!1';}''',
+        <String>["1+xa"]);
 
-    buildTests('testCommentSnippets038a', '''
-int xa; String s = '\$x!1\'''', <String>["1+xa"]);
+    buildTests(
+        'testCommentSnippets038a',
+        '''
+int xa; String s = '\$x!1\'''',
+        <String>["1+xa"]);
 
-    buildTests('testCommentSnippets039', '''
-f(){int xa; String s = '\$!1';}''', <String>["1+xa"]);
+    buildTests(
+        'testCommentSnippets039',
+        '''
+f(){int xa; String s = '\$!1';}''',
+        <String>["1+xa"]);
 
-    buildTests('testCommentSnippets039a', '''
-int xa; String s = '\$!1\'''', <String>["1+xa"]);
+    buildTests(
+        'testCommentSnippets039a',
+        '''
+int xa; String s = '\$!1\'''',
+        <String>["1+xa"]);
 
-    buildTests('testCommentSnippets040', '''
+    buildTests(
+        'testCommentSnippets040',
+        '''
 class List{add(){}}class Map{}class X{m(){List list; list.!1 Map map;}}''',
         <String>["1+add"]);
 
-    buildTests('testCommentSnippets041', '''
+    buildTests(
+        'testCommentSnippets041',
+        '''
 class List{add(){}length(){}}class X{m(){List list; list.!1 zox();}}''',
         <String>["1+add"]);
 
-    buildTests('testCommentSnippets042', '''
+    buildTests(
+        'testCommentSnippets042',
+        '''
 class DateTime{static const int WED=3;int get day;}fd(){DateTime d=new DateTime.now();d.!1WED!2;}''',
         <String>["1+day", "2-WED"]);
 
-    buildTests('testCommentSnippets043', '''
-class L{var k;void.!1}''', <String>["1-k"]);
+    buildTests(
+        'testCommentSnippets043',
+        '''
+class L{var k;void.!1}''',
+        <String>["1-k"]);
 
-    buildTests('testCommentSnippets044', '''
+    buildTests(
+        'testCommentSnippets044',
+        '''
 class List{}class XXX {XXX.fisk();}main() {main(); new !1}}''',
         <String>["1+List", "1+XXX.fisk"]);
 
-    buildTests('testCommentSnippets047', '''
-f(){int x;int y=!1;}''', <String>["1+x"]);
+    buildTests(
+        'testCommentSnippets047',
+        '''
+f(){int x;int y=!1;}''',
+        <String>["1+x"]);
 
-    buildTests('testCommentSnippets048', '''
-import 'dart:convert' as json;f() {var x=new js!1}''', <String>["1+json"]);
+    buildTests(
+        'testCommentSnippets048',
+        '''
+import 'dart:convert' as json;f() {var x=new js!1}''',
+        <String>["1+json"]);
 
-    buildTests('testCommentSnippets049', '''
+    buildTests(
+        'testCommentSnippets049',
+        '''
 import 'dart:convert' as json;
 import 'dart:convert' as jxx;
 class JsonDecoderX{}
-f1() {var x=new !2j!1s!3}''', <String>[
+f1() {var x=new !2j!1s!3}''',
+        <String>[
       "1+json",
       "1+jxx",
       "2+json",
@@ -249,7 +374,9 @@
       "3-jxx"
     ]);
 
-    buildTests('testCommentSnippets050', '''
+    buildTests(
+        'testCommentSnippets050',
+        '''
 class xdr {
   xdr();
   const xdr.a(a,b,c);
@@ -260,7 +387,8 @@
 k() {
   new x!1dr().f();
   const x!2dr.!3a(1, 2, 3);
-}''', <String>[
+}''',
+        <String>[
       "1+xdr",
       "1+xa",
       "1+xdr.a",
@@ -274,7 +402,9 @@
     ]);
 
     // Type propagation.
-    buildTests('testCommentSnippets051', '''
+    buildTests(
+        'testCommentSnippets051',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r() {
   var v;
@@ -282,10 +412,13 @@
     v.!1length;
     v.!2getKeys;
   }
-}''', <String>["1+length", "2-getKeys"]);
+}''',
+        <String>["1+length", "2-getKeys"]);
 
     // Type propagation.
-    buildTests('testCommentSnippets052', '''
+    buildTests(
+        'testCommentSnippets052',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r() {
   List<String> values = ['a','b','c'];
@@ -293,10 +426,13 @@
     v.!1toUpperCase;
     v.!2getKeys;
   }
-}''', <String>["1+toUpperCase", "2-getKeys"]);
+}''',
+        <String>["1+toUpperCase", "2-getKeys"]);
 
     // Type propagation.
-    buildTests('testCommentSnippets053', '''
+    buildTests(
+        'testCommentSnippets053',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r() {
   var v;
@@ -304,9 +440,12 @@
     v.!1toUpperCase;
     v.!2getKeys;
   }
-}''', <String>["1+toUpperCase", "2-getKeys"]);
+}''',
+        <String>["1+toUpperCase", "2-getKeys"]);
 
-    buildTests('testCommentSnippets054', '''
+    buildTests(
+        'testCommentSnippets054',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r() {
   var v;
@@ -314,48 +453,67 @@
     v.!2toUpperCase;
     v.!3getKeys;
   }
-}''', <String>["1+isEmpty", "2+toUpperCase", "3-getKeys"]);
+}''',
+        <String>["1+isEmpty", "2+toUpperCase", "3-getKeys"]);
 
-    buildTests('testCommentSnippets055', '''
+    buildTests(
+        'testCommentSnippets055',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r() {
   String v;
   if (v is Object) {
     v.!1toUpperCase;
   }
-}''', <String>["1+toUpperCase"]);
+}''',
+        <String>["1+toUpperCase"]);
 
     // Type propagation.
-    buildTests('testCommentSnippets056', '''
+    buildTests(
+        'testCommentSnippets056',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void f(var v) {
   if (v is!! String) {
     return;
   }
   v.!1toUpperCase;
-}''', <String>["1+toUpperCase"]);
+}''',
+        <String>["1+toUpperCase"]);
 
     // Type propagation.
-    buildTests('testCommentSnippets057', '''
+    buildTests(
+        'testCommentSnippets057',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void f(var v) {
   if ((v as String).!2length == 0) {
     v.!1toUpperCase;
   }
-}''', <String>["1+toUpperCase", "2+length"]);
+}''',
+        <String>["1+toUpperCase", "2+length"]);
 
-    buildTests('testCommentSnippets058', '''
+    buildTests(
+        'testCommentSnippets058',
+        '''
 typedef vo!2id callback(int k);
 void x(callback q){}
 void r() {
   callback v;
   x(!1);
-}''', <String>["1+v", "2+void"], failingTests: '2');
+}''',
+        <String>["1+v", "2+void"],
+        failingTests: '2');
 
-    buildTests('testCommentSnippets059', '''
-f(){((int x) => x+4).!1call(1);}''', <String>["1-call"]);
+    buildTests(
+        'testCommentSnippets059',
+        '''
+f(){((int x) => x+4).!1call(1);}''',
+        <String>["1-call"]);
 
-    buildTests('testCommentSnippets060', '''
+    buildTests(
+        'testCommentSnippets060',
+        '''
 class Map{}
 abstract class MM extends Map{factory MM() => new Map();}
 class Z {
@@ -363,22 +521,30 @@
   f() {
     x!1
   }
-}''', <String>["1+x", "1-x[]"]);
+}''',
+        <String>["1+x", "1-x[]"]);
 
-    buildTests('testCommentSnippets061', '''
+    buildTests(
+        'testCommentSnippets061',
+        '''
 class A{m(){!1f(3);!2}}n(){!3f(3);!4}f(x)=>x*3;''',
         <String>["1+f", "1+n", "2+f", "2+n", "3+f", "3+n", "4+f", "4+n"]);
 
     // Type propagation.
-    buildTests('testCommentSnippets063', '''
+    buildTests(
+        'testCommentSnippets063',
+        '''
 class String{int length(){} String toUpperCase(){} bool isEmpty(){}}class Map{getKeys(){}}
 void r(var v) {
   v.!1toUpperCase;
   assert(v is String);
   v.!2toUpperCase;
-}''', <String>["1-toUpperCase", "2+toUpperCase"]);
+}''',
+        <String>["1-toUpperCase", "2+toUpperCase"]);
 
-    buildTests('testCommentSnippets064', '''
+    buildTests(
+        'testCommentSnippets064',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -401,7 +567,8 @@
   Spline h() {
     return null;
   }
-}''', <String>[
+}''',
+        <String>[
       "1+a",
       "2+b",
       "1-g",
@@ -415,7 +582,9 @@
       "9+h"
     ]);
 
-    buildTests('testCommentSnippets065', '''
+    buildTests(
+        'testCommentSnippets065',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -437,9 +606,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+a"]);
+}''',
+        <String>["1+a"]);
 
-    buildTests('testCommentSnippets066', '''
+    buildTests(
+        'testCommentSnippets066',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -461,9 +633,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+b"]);
+}''',
+        <String>["1+b"]);
 
-    buildTests('testCommentSnippets067', '''
+    buildTests(
+        'testCommentSnippets067',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -485,9 +660,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+b"]);
+}''',
+        <String>["1+b"]);
 
-    buildTests('testCommentSnippets068', '''
+    buildTests(
+        'testCommentSnippets068',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -509,9 +687,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+c"]);
+}''',
+        <String>["1+c"]);
 
-    buildTests('testCommentSnippets069', '''
+    buildTests(
+        'testCommentSnippets069',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -533,9 +714,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+c"]);
+}''',
+        <String>["1+c"]);
 
-    buildTests('testCommentSnippets070', '''
+    buildTests(
+        'testCommentSnippets070',
+        '''
 class Spline {
   Line c;
   Spline a() {
@@ -557,9 +741,12 @@
   Spline h() {
     return null;
   }
-}''', <String>["1+b"]);
+}''',
+        <String>["1+b"]);
 
-    buildTests('testCommentSnippets072', '''
+    buildTests(
+        'testCommentSnippets072',
+        '''
 class X {
   int _p;
   set p(int x) => _p = x;
@@ -567,9 +754,12 @@
 f() {
   X x = new X();
   x.!1p = 3;
-}''', <String>["1+p"]);
+}''',
+        <String>["1+p"]);
 
-    buildTests('testCommentSnippets073', '''
+    buildTests(
+        'testCommentSnippets073',
+        '''
 class X {
   m() {
     JSON.stri!1;
@@ -578,28 +768,41 @@
 }
 class JSON {
   static stringify() {}
-}''', <String>["1+stringify"]);
+}''',
+        <String>["1+stringify"]);
 
-    buildTests('testCommentSnippets074', '''
+    buildTests(
+        'testCommentSnippets074',
+        '''
 class X {
   m() {
     _x!1
   }
   _x1(){}
-}''', <String>["1+_x1"]);
+}''',
+        <String>["1+_x1"]);
 
-    buildTests('testCommentSnippets075', '''
-p(x)=>0;var E;f(q)=>!1p(!2E);''', <String>["1+p", "2+E"]);
+    buildTests(
+        'testCommentSnippets075',
+        '''
+p(x)=>0;var E;f(q)=>!1p(!2E);''',
+        <String>["1+p", "2+E"]);
 
-    buildTests('testCommentSnippets076', '''
+    buildTests(
+        'testCommentSnippets076',
+        '''
 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,in!2t>>,List<!3int>>();}''',
         <String>["1+List", "2+int", "3+int"]);
 
-    buildTests('testCommentSnippets076a', '''
+    buildTests(
+        'testCommentSnippets076a',
+        '''
 class Map<K,V>{}class List<E>{}class int{}main() {var m=new Map<Lis!1t<Map<int,in!2t>>,List<!3>>();}''',
         <String>["1+List", "2+int", "3+int"]);
 
-    buildTests('testCommentSnippets077', '''
+    buildTests(
+        'testCommentSnippets077',
+        '''
 class FileMode {
   static const READ = const FileMode._internal(0);
   static const WRITE = const FileMode._internal(1);
@@ -613,7 +816,8 @@
   factory File(String path) => null;
   factory File.fromPath(Path path) => null;
 }
-f() => new Fil!1''', <String>[
+f() => new Fil!1''',
+        <String>[
       "1+File",
       "1+File.fromPath",
       "1+FileMode",
@@ -621,60 +825,91 @@
       "1+FileMode._internal"
     ]);
 
-    buildTests('testCommentSnippets078', '''
+    buildTests(
+        'testCommentSnippets078',
+        '''
 class Map{static from()=>null;clear(){}}void main() { Map.!1 }''',
         <String>["1+from", "1-clear"]); // static method, instance method
 
-    buildTests('testCommentSnippets079', '''
+    buildTests(
+        'testCommentSnippets079',
+        '''
 class Map{static from()=>null;clear(){}}void main() { Map s; s.!1 }''',
         <String>["1-from", "1+clear"]); // static method, instance method
 
-    buildTests('testCommentSnippets080', '''
+    buildTests(
+        'testCommentSnippets080',
+        '''
 class RuntimeError{var message;}void main() { RuntimeError.!1 }''',
         <String>["1-message"]); // field
 
-    buildTests('testCommentSnippets081', '''
-class Foo {this.!1}''', <String>["1-Object"], failingTests: '1');
+    buildTests(
+        'testCommentSnippets081',
+        '''
+class Foo {this.!1}''',
+        <String>["1-Object"],
+        failingTests: '1');
 
-    buildTests('testCommentSnippets082', '''
+    buildTests(
+        'testCommentSnippets082',
+        '''
         class HttpRequest {}
         class HttpResponse {}
         main() {
           var v = (HttpRequest req, HttpResp!1)
-        }''', <String>["1+HttpResponse"]);
+        }''',
+        <String>["1+HttpResponse"]);
 
-    buildTests('testCommentSnippets083', '''
-main() {(.!1)}''', <String>["1-toString"]);
+    buildTests(
+        'testCommentSnippets083',
+        '''
+main() {(.!1)}''',
+        <String>["1-toString"]);
 
-    buildTests('testCommentSnippets083a', '''
-main() { .!1 }''', <String>["1-toString"]);
+    buildTests(
+        'testCommentSnippets083a',
+        '''
+main() { .!1 }''',
+        <String>["1-toString"]);
 
-    buildTests('testCommentSnippets083b', '''
-main() { null.!1 }''', <String>["1+toString"], failingTests: '1');
+    buildTests(
+        'testCommentSnippets083b',
+        '''
+main() { null.!1 }''',
+        <String>["1+toString"],
+        failingTests: '1');
 
-    buildTests('testCommentSnippets084', '''
-class List{}class Map{}typedef X = !1Lis!2t with !3Ma!4p;''', <String>[
-      "1+Map",
-      "2+List",
-      "2-Map",
-      "3+List",
-      "4+Map",
-      "4-List"
-    ], failingTests: '1234');
+    buildTests(
+        'testCommentSnippets084',
+        '''
+class List{}class Map{}typedef X = !1Lis!2t with !3Ma!4p;''',
+        <String>["1+Map", "2+List", "2-Map", "3+List", "4+Map", "4-List"],
+        failingTests: '1234');
 
-    buildTests('testCommentSnippets085', '''
+    buildTests(
+        'testCommentSnippets085',
+        '''
 class List{}class Map{}class Z extends List with !1Ma!2p {}''',
-        <String>["1+List", "1+Map", "2+Map", "2-List"], failingTests: '12');
+        <String>["1+List", "1+Map", "2+Map", "2-List"],
+        failingTests: '12');
 
-    buildTests('testCommentSnippets086', '''
-class Q{f(){xy() {!2};x!1y();}}''', <String>["1+xy", "2+f", "2-xy"],
+    buildTests(
+        'testCommentSnippets086',
+        '''
+class Q{f(){xy() {!2};x!1y();}}''',
+        <String>["1+xy", "2+f", "2-xy"],
         failingTests: '2');
 
-    buildTests('testCommentSnippets087', '''
+    buildTests(
+        'testCommentSnippets087',
+        '''
 class Map{}class Q extends Object with !1Map {}''',
-        <String>["1+Map", "1-HashMap"], failingTests: '1');
+        <String>["1+Map", "1-HashMap"],
+        failingTests: '1');
 
-    buildTests('testCommentSnippets088', '''
+    buildTests(
+        'testCommentSnippets088',
+        '''
 class A {
   int f;
   B m(){}
@@ -686,9 +921,12 @@
 class Z {
   B q;
   f() {q.!1}
-}''', <String>["1+f", "1+m"]); // f->num, m()->A
+}''',
+        <String>["1+f", "1+m"]); // f->num, m()->A
 
-    buildTests('testCommentSnippets089', '''
+    buildTests(
+        'testCommentSnippets089',
+        '''
 class Q {
   fqe() {
     xya() {
@@ -706,127 +944,170 @@
   fqi() {
     !5
   }
-}''', <String>[
-      "1+fqe",
-      "1+fqi",
-      "1+Q",
-      "1-xya",
-      "1-xyb",
-      "1-xza",
-      "2+fqe",
-      "2+fqi",
-      "2+Q",
-      "2-xya",
-      "2-xyb",
-      "2-xza",
-      "3+fqe",
-      "3+fqi",
-      "3+Q",
-      "3-xya",
-      "3+xyb",
-      "3-xza",
-      "4+fqe",
-      "4+fqi",
-      "4+Q",
-      "4+xya",
-      "4-xyb",
-      "4+xza",
-      "5+fqe",
-      "5+fqi",
-      "5+Q",
-      "5-xya",
-      "5-xyb",
-      "5-xza"
-    ], failingTests: '123');
+}''',
+        <String>[
+          "1+fqe",
+          "1+fqi",
+          "1+Q",
+          "1-xya",
+          "1-xyb",
+          "1-xza",
+          "2+fqe",
+          "2+fqi",
+          "2+Q",
+          "2-xya",
+          "2-xyb",
+          "2-xza",
+          "3+fqe",
+          "3+fqi",
+          "3+Q",
+          "3-xya",
+          "3+xyb",
+          "3-xza",
+          "4+fqe",
+          "4+fqi",
+          "4+Q",
+          "4+xya",
+          "4-xyb",
+          "4+xza",
+          "5+fqe",
+          "5+fqi",
+          "5+Q",
+          "5-xya",
+          "5-xyb",
+          "5-xza"
+        ],
+        failingTests: '123');
 
-    buildTests('testCommentSnippets090', '''
-class X { f() { var a = 'x'; a.!1 }}''', <String>["1+length"]);
+    buildTests(
+        'testCommentSnippets090',
+        '''
+class X { f() { var a = 'x'; a.!1 }}''',
+        <String>["1+length"]);
   }
 
   void buildCompletionTests() {
-    buildTests('testCompletion_alias_field', '''
-typedef int fnint(int k); fn!1int x;''', <String>["1+fnint"]);
+    buildTests(
+        'testCompletion_alias_field',
+        '''
+typedef int fnint(int k); fn!1int x;''',
+        <String>["1+fnint"]);
 
-    buildTests('testCompletion_annotation_argumentList', '''
+    buildTests(
+        'testCompletion_annotation_argumentList',
+        '''
 class AAA {",
   const AAA({int aaa, int bbb});",
 }",
 ",
 @AAA(!1)
 main() {
-}''', <String>["1+AAA" /*":" + ProposalKind.ARGUMENT_LIST*/, "1+aaa", "1+bbb"],
+}''',
+        <String>[
+          "1+AAA" /*":" + ProposalKind.ARGUMENT_LIST*/,
+          "1+aaa",
+          "1+bbb"
+        ],
         failingTests: '1');
 
-    buildTests('testCompletion_annotation_topLevelVar', '''
+    buildTests(
+        'testCompletion_annotation_topLevelVar',
+        '''
 const fooConst = null;
 final fooNotConst = null;
 const bar = null;
 
 @foo!1
 main() {
-}''', <String>["1+fooConst", "1-fooNotConst", "1-bar"], failingTests: '1');
+}''',
+        <String>["1+fooConst", "1-fooNotConst", "1-bar"],
+        failingTests: '1');
 
-    buildTests('testCompletion_annotation_type', '''
+    buildTests(
+        'testCompletion_annotation_type',
+        '''
 class AAA {
   const AAA({int a, int b});
   const AAA.nnn(int c, int d);
 }
 @AAA!1
 main() {
-}''', <String>[
-      "1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/,
-      "1+AAA.nnn" /*":" + ProposalKind.CONSTRUCTOR*/
-    ], failingTests: '1');
+}''',
+        <String>[
+          "1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/,
+          "1+AAA.nnn" /*":" + ProposalKind.CONSTRUCTOR*/
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_annotation_type_inClass_withoutMember', '''
+    buildTests(
+        'testCompletion_annotation_type_inClass_withoutMember',
+        '''
 class AAA {
   const AAA();
 }
 
 class C {
   @A!1
-}''', <String>["1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/]);
+}''',
+        <String>["1+AAA" /*":" + ProposalKind.CONSTRUCTOR*/]);
 
-    buildTests('testCompletion_argument_typeName', '''
+    buildTests(
+        'testCompletion_argument_typeName',
+        '''
 class Enum {
   static Enum FOO = new Enum();
 }
 f(Enum e) {}
 main() {
   f(En!1);
-}''', <String>["1+Enum"]);
+}''',
+        <String>["1+Enum"]);
 
-    buildTests('testCompletion_arguments_ignoreEmpty', '''
+    buildTests(
+        'testCompletion_arguments_ignoreEmpty',
+        '''
 class A {
   test() {}
 }
 main(A a) {
   a.test(!1);
-}''', <String>["1-test"]);
+}''',
+        <String>["1-test"]);
 
-    buildTests('testCompletion_as_asIdentifierPrefix', '''
+    buildTests(
+        'testCompletion_as_asIdentifierPrefix',
+        '''
 main(p) {
   var asVisible;
   var v = as!1;
-}''', <String>["1+asVisible"]);
+}''',
+        <String>["1+asVisible"]);
 
-    buildTests('testCompletion_as_asPrefixedIdentifierStart', '''
+    buildTests(
+        'testCompletion_as_asPrefixedIdentifierStart',
+        '''
 class A {
   var asVisible;
 }
 
 main(A p) {
   var v = p.as!1;
-}''', <String>["1+asVisible"]);
+}''',
+        <String>["1+asVisible"]);
 
-    buildTests('testCompletion_as_incompleteStatement', '''
+    buildTests(
+        'testCompletion_as_incompleteStatement',
+        '''
 class MyClass {}
 main(p) {
   var justSomeVar;
   var v = p as !1
-}''', <String>["1+MyClass", "1-justSomeVar"]);
+}''',
+        <String>["1+MyClass", "1-justSomeVar"]);
 
-    buildTests('testCompletion_cascade', '''
+    buildTests(
+        'testCompletion_cascade',
+        '''
 class A {
   aaa() {}
 }
@@ -834,61 +1115,91 @@
 
 main(A a) {
   a..!1 aaa();
-}''', <String>["1+aaa", "1-main"]);
+}''',
+        <String>["1+aaa", "1-main"]);
 
-    buildTests('testCompletion_combinator_afterComma', '''
+    buildTests(
+        'testCompletion_combinator_afterComma',
+        '''
 "import 'dart:math' show cos, !1;''',
-        <String>["1+PI", "1+sin", "1+Random", "1-String"], failingTests: '1');
+        <String>["1+PI", "1+sin", "1+Random", "1-String"],
+        failingTests: '1');
 
-    buildTests('testCompletion_combinator_ended', '''
+    buildTests(
+        'testCompletion_combinator_ended',
+        '''
 import 'dart:math' show !1;"''',
         <String>["1+PI", "1+sin", "1+Random", "1-String"]);
 
-    buildTests('testCompletion_combinator_export', '''
+    buildTests(
+        'testCompletion_combinator_export',
+        '''
 export 'dart:math' show !1;"''',
         <String>["1+PI", "1+sin", "1+Random", "1-String"]);
 
-    buildTests('testCompletion_combinator_hide', '''
+    buildTests(
+        'testCompletion_combinator_hide',
+        '''
 import 'dart:math' hide !1;"''',
         <String>["1+PI", "1+sin", "1+Random", "1-String"]);
 
-    buildTests('testCompletion_combinator_notEnded', '''
+    buildTests(
+        'testCompletion_combinator_notEnded',
+        '''
 import 'dart:math' show !1"''',
         <String>["1+PI", "1+sin", "1+Random", "1-String"]);
 
-    buildTests('testCompletion_combinator_usePrefix', '''
+    buildTests(
+        'testCompletion_combinator_usePrefix',
+        '''
 import 'dart:math' show s!1"''',
         <String>["1+sin", "1+sqrt", "1-cos", "1-String"]);
 
-    buildTests('testCompletion_constructor_field', '''
-class X { X(this.field); int f!1ield;}''', <String>["1+field"],
+    buildTests(
+        'testCompletion_constructor_field',
+        '''
+class X { X(this.field); int f!1ield;}''',
+        <String>["1+field"],
         failingTests: '1');
 
-    buildTests('testCompletion_constructorArguments_showOnlyCurrent', '''
+    buildTests(
+        'testCompletion_constructorArguments_showOnlyCurrent',
+        '''
 class A {
   A.first(int p);
   A.second(double p);
 }
 main() {
   new A.first(!1);
-}''', <String>["1+A.first", "1-A.second"], failingTests: '1');
+}''',
+        <String>["1+A.first", "1-A.second"],
+        failingTests: '1');
 
-    buildTests('testCompletion_constructorArguments_whenPrefixedType', '''
+    buildTests(
+        'testCompletion_constructorArguments_whenPrefixedType',
+        '''
 import 'dart:math' as m;
 main() {
   new m.Random(!1);
-}''', <String>["1+Random:ARGUMENT_LIST"], failingTests: '1');
+}''',
+        <String>["1+Random:ARGUMENT_LIST"],
+        failingTests: '1');
 
-    buildTests('testCompletion_dartDoc_reference_forClass', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_forClass',
+        '''
 /**
  * [int!1]
  * [method!2]
  */
 class AAA {
   methodA() {}
-}''', <String>["1+int", "1-method", "2+methodA", "2-int"]);
+}''',
+        <String>["1+int", "1-method", "2+methodA", "2-int"]);
 
-    buildTests('testCompletion_dartDoc_reference_forConstructor', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_forConstructor',
+        '''
 class A {
   /**
    * [aa!1]
@@ -897,43 +1208,54 @@
    */
   A.named(aaa, bbb) {}
   methodA() {}
-}''', <String>["1+aaa", "1-bbb", "2+int", "2-double", "3+methodA"]);
+}''',
+        <String>["1+aaa", "1-bbb", "2+int", "2-double", "3+methodA"]);
 
-    buildTests('testCompletion_dartDoc_reference_forFunction', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_forFunction',
+        '''
 /**
  * [aa!1]
  * [int!2]
  * [function!3]
  */
 functionA(aaa, bbb) {}
-functionB() {}''', <String>[
-      "1+aaa",
-      "1-bbb",
-      "2+int",
-      "2-double",
-      "3+functionA",
-      "3+functionB",
-      "3-int"
-    ], failingTests: '1');
+functionB() {}''',
+        <String>[
+          "1+aaa",
+          "1-bbb",
+          "2+int",
+          "2-double",
+          "3+functionA",
+          "3+functionB",
+          "3-int"
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_dartDoc_reference_forFunctionTypeAlias', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_forFunctionTypeAlias',
+        '''
 /**
  * [aa!1]
  * [int!2]
  * [Function!3]
  */
 typedef FunctionA(aaa, bbb) {}
-typedef FunctionB() {}''', <String>[
-      "1+aaa",
-      "1-bbb",
-      "2+int",
-      "2-double",
-      "3+FunctionA",
-      "3+FunctionB",
-      "3-int"
-    ], failingTests: '1');
+typedef FunctionB() {}''',
+        <String>[
+          "1+aaa",
+          "1-bbb",
+          "2+int",
+          "2-double",
+          "3+FunctionA",
+          "3+FunctionB",
+          "3-int"
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_dartDoc_reference_forMethod', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_forMethod',
+        '''
 class A {
   /**
    * [aa!1]
@@ -942,7 +1264,8 @@
    */
   methodA(aaa, bbb) {}
   methodB() {}
-}''', <String>[
+}''',
+        <String>[
       "1+aaa",
       "1-bbb",
       "2+int",
@@ -952,7 +1275,9 @@
       "3-int"
     ]);
 
-    buildTests('testCompletion_dartDoc_reference_incomplete', '''
+    buildTests(
+        'testCompletion_dartDoc_reference_incomplete',
+        '''
 /**
  * [doubl!1 some text
  * other text
@@ -966,7 +1291,8 @@
 /**
  * [!3] some text
  */
-class C {}''', <String>[
+class C {}''',
+        <String>[
       "1+double",
       "1-int",
       "2+int",
@@ -975,25 +1301,34 @@
       "3+String"
     ]);
 
-    buildTests('testCompletion_double_inFractionPart', '''
+    buildTests(
+        'testCompletion_double_inFractionPart',
+        '''
 main() {
   1.0!1
-}''', <String>["1-abs", "1-main"]);
+}''',
+        <String>["1-abs", "1-main"]);
 
-    buildTests('testCompletion_enum', '''
+    buildTests(
+        'testCompletion_enum',
+        '''
 enum MyEnum {A, B, C}
 main() {
   MyEnum.!1;
-}''', <String>["1+values", "1+A", "1+B", "1+C"]);
+}''',
+        <String>["1+values", "1+A", "1+B", "1+C"]);
 
-    buildTests('testCompletion_exactPrefix_hasHigherRelevance', '''
+    buildTests(
+        'testCompletion_exactPrefix_hasHigherRelevance',
+        '''
 var STR;
 main(p) {
   var str;
   str!1;
   STR!2;
   Str!3;
-}''', <String>[
+}''',
+        <String>[
       "1+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
       "1+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/,
       "2+STR" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 1)*/,
@@ -1003,68 +1338,115 @@
       "3+str" /*",rel=" + (CompletionProposal.RELEVANCE_DEFAULT + 0)*/
     ]);
 
-    buildTests('testCompletion_export_dart', '''
+    buildTests(
+        'testCompletion_export_dart',
+        '''
 import 'dart:math
 import 'dart:_chrome
 import 'dart:_collection.dev
-export 'dart:!1''', <String>[
-      "1+dart:core",
-      "1+dart:math",
-      "1-dart:_chrome",
-      "1-dart:_collection.dev"
-    ], failingTests: '1');
+export 'dart:!1''',
+        <String>[
+          "1+dart:core",
+          "1+dart:math",
+          "1-dart:_chrome",
+          "1-dart:_collection.dev"
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_export_noStringLiteral_noSemicolon', '''
+    buildTests(
+        'testCompletion_export_noStringLiteral_noSemicolon',
+        '''
 import !1
 
-class A {}''', <String>["1+'dart:!';", "1+'package:!';"], failingTests: '1');
+class A {}''',
+        <String>["1+'dart:!';", "1+'package:!';"],
+        failingTests: '1');
 
-    buildTests('testCompletion_forStmt_vars', '''
+    buildTests(
+        'testCompletion_forStmt_vars',
+        '''
 class int{}class Foo { mth() { for (in!1t i = 0; i!2 < 5; i!3++); }}''',
         <String>["1+int", "2+i", "3+i"]);
 
-    buildTests('testCompletion_function', '''
+    buildTests(
+        'testCompletion_function',
+        '''
 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1) => a.compareTo(b)); }}''',
         <String>["1+String"]);
 
-    buildTests('testCompletion_function_partial', '''
+    buildTests(
+        'testCompletion_function_partial',
+        '''
 class Foo { int boo = 7; mth() { PNGS.sort((String a, Str!1)); }}''',
         <String>["1+String"]);
 
-    buildTests('testCompletion_functionTypeParameter_namedArgument', '''
+    buildTests(
+        'testCompletion_functionTypeParameter_namedArgument',
+        '''
 typedef FFF(a, b, {x1, x2, y});
 main(FFF fff) {
   fff(1, 2, !1)!2;
-}''', <String>["1+x1", "2-x2"], failingTests: '1');
+}''',
+        <String>["1+x1", "2-x2"],
+        failingTests: '1');
 
-    buildTests('testCompletion_ifStmt_field1', '''
-class Foo { int myField = 7; mth() { if (!1) {}}}''', <String>["1+myField"]);
+    buildTests(
+        'testCompletion_ifStmt_field1',
+        '''
+class Foo { int myField = 7; mth() { if (!1) {}}}''',
+        <String>["1+myField"]);
 
-    buildTests('testCompletion_ifStmt_field1a', '''
-class Foo { int myField = 7; mth() { if (!1) }}''', <String>["1+myField"]);
+    buildTests(
+        'testCompletion_ifStmt_field1a',
+        '''
+class Foo { int myField = 7; mth() { if (!1) }}''',
+        <String>["1+myField"]);
 
-    buildTests('testCompletion_ifStmt_field2', '''
-class Foo { int myField = 7; mth() { if (m!1) {}}}''', <String>["1+myField"]);
+    buildTests(
+        'testCompletion_ifStmt_field2',
+        '''
+class Foo { int myField = 7; mth() { if (m!1) {}}}''',
+        <String>["1+myField"]);
 
-    buildTests('testCompletion_ifStmt_field2a', '''
-class Foo { int myField = 7; mth() { if (m!1) }}''', <String>["1+myField"]);
+    buildTests(
+        'testCompletion_ifStmt_field2a',
+        '''
+class Foo { int myField = 7; mth() { if (m!1) }}''',
+        <String>["1+myField"]);
 
-    buildTests('testCompletion_ifStmt_field2b', '''
-class Foo { myField = 7; mth() { if (m!1) {}}}''', <String>["1+myField"]);
+    buildTests(
+        'testCompletion_ifStmt_field2b',
+        '''
+class Foo { myField = 7; mth() { if (m!1) {}}}''',
+        <String>["1+myField"]);
 
-    buildTests('testCompletion_ifStmt_localVar', '''
-class Foo { mth() { int value = 7; if (v!1) {}}}''', <String>["1+value"]);
+    buildTests(
+        'testCompletion_ifStmt_localVar',
+        '''
+class Foo { mth() { int value = 7; if (v!1) {}}}''',
+        <String>["1+value"]);
 
-    buildTests('testCompletion_ifStmt_localVara', '''
-class Foo { mth() { value = 7; if (v!1) {}}}''', <String>["1-value"]);
+    buildTests(
+        'testCompletion_ifStmt_localVara',
+        '''
+class Foo { mth() { value = 7; if (v!1) {}}}''',
+        <String>["1-value"]);
 
-    buildTests('testCompletion_ifStmt_topLevelVar', '''
-int topValue = 7; class Foo { mth() { if (t!1) {}}}''', <String>["1+topValue"]);
+    buildTests(
+        'testCompletion_ifStmt_topLevelVar',
+        '''
+int topValue = 7; class Foo { mth() { if (t!1) {}}}''',
+        <String>["1+topValue"]);
 
-    buildTests('testCompletion_ifStmt_topLevelVara', '''
-topValue = 7; class Foo { mth() { if (t!1) {}}}''', <String>["1+topValue"]);
+    buildTests(
+        'testCompletion_ifStmt_topLevelVara',
+        '''
+topValue = 7; class Foo { mth() { if (t!1) {}}}''',
+        <String>["1+topValue"]);
 
-    buildTests('testCompletion_ifStmt_unionType_nonStrict', '''
+    buildTests(
+        'testCompletion_ifStmt_unionType_nonStrict',
+        '''
 class A { a() => null; x() => null}
 class B { a() => null; y() => null}
 void main() {
@@ -1076,9 +1458,13 @@
     x = new B();
   }
   x.!1;
-}''', <String>["1+a", "1+x", "1+y"], failingTests: '1');
+}''',
+        <String>["1+a", "1+x", "1+y"],
+        failingTests: '1');
 
-    buildTests('testCompletion_ifStmt_unionType_strict', '''
+    buildTests(
+        'testCompletion_ifStmt_unionType_strict',
+        '''
 class A { a() => null; x() => null}
 class B { a() => null; y() => null}
 void main() {
@@ -1090,74 +1476,116 @@
     x = new B();
   }
   x.!1;
-}''', <String>["1+a", "1-x", "1-y"], failingTests: '1');
+}''',
+        <String>["1+a", "1-x", "1-y"],
+        failingTests: '1');
 
-    buildTests('testCompletion_import', '''
-import '!1';''', <String>["1+dart:!", "1+package:!"]);
+    buildTests(
+        'testCompletion_import',
+        '''
+import '!1';''',
+        <String>["1+dart:!", "1+package:!"]);
 
-    buildTests('testCompletion_import_dart', '''
+    buildTests(
+        'testCompletion_import_dart',
+        '''
 import 'dart:math
 import 'dart:_chrome
 import 'dart:_collection.dev
-import 'dart:!1''', <String>[
-      "1+dart:core",
-      "1+dart:math",
-      "1-dart:_chrome",
-      "1-dart:_collection.dev"
-    ], failingTests: '1');
+import 'dart:!1''',
+        <String>[
+          "1+dart:core",
+          "1+dart:math",
+          "1-dart:_chrome",
+          "1-dart:_collection.dev"
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_import_hasStringLiteral_noSemicolon', '''
+    buildTests(
+        'testCompletion_import_hasStringLiteral_noSemicolon',
+        '''
 import '!1'
 
-class A {}''', <String>["1+dart:!", "1+package:!"]);
+class A {}''',
+        <String>["1+dart:!", "1+package:!"]);
 
-    buildTests('testCompletion_import_noSpace', '''
-import!1''', <String>["1+ 'dart:!';", "1+ 'package:!';"], failingTests: '1');
+    buildTests(
+        'testCompletion_import_noSpace',
+        '''
+import!1''',
+        <String>["1+ 'dart:!';", "1+ 'package:!';"],
+        failingTests: '1');
 
-    buildTests('testCompletion_import_noStringLiteral', '''
-import !1;''', <String>["1+'dart:!'", "1+'package:!'"], failingTests: '1');
+    buildTests(
+        'testCompletion_import_noStringLiteral',
+        '''
+import !1;''',
+        <String>["1+'dart:!'", "1+'package:!'"],
+        failingTests: '1');
 
-    buildTests('testCompletion_import_noStringLiteral_noSemicolon', '''
+    buildTests(
+        'testCompletion_import_noStringLiteral_noSemicolon',
+        '''
 import !1
 
-class A {}''', <String>["1+'dart:!';", "1+'package:!';"], failingTests: '1');
+class A {}''',
+        <String>["1+'dart:!';", "1+'package:!';"],
+        failingTests: '1');
 
-    buildTests('testCompletion_incompleteClassMember', '''
+    buildTests(
+        'testCompletion_incompleteClassMember',
+        '''
 class A {
   Str!1
   final f = null;
-}''', <String>["1+String", "1-bool"]);
+}''',
+        <String>["1+String", "1-bool"]);
 
-    buildTests('testCompletion_incompleteClosure_parameterType', '''
+    buildTests(
+        'testCompletion_incompleteClosure_parameterType',
+        '''
 f1(cb(String s)) {}
 f2(String s) {}
 main() {
   f1((Str!1));
   f2((Str!2));
-}''', <String>["1+String", "1-bool", "2+String", "2-bool"]);
+}''',
+        <String>["1+String", "1-bool", "2+String", "2-bool"]);
 
-    buildTests('testCompletion_inPeriodPeriod', '''
+    buildTests(
+        'testCompletion_inPeriodPeriod',
+        '''
 main(String str) {
   1 < str.!1.length;
   1 + str.!2.length;
   1 + 2 * str.!3.length;
-}''', <String>["1+codeUnits", "2+codeUnits", "3+codeUnits"],
+}''',
+        <String>["1+codeUnits", "2+codeUnits", "3+codeUnits"],
         failingTests: '123');
 
     // no checks, but no exceptions
-    buildTests('testCompletion_instanceCreation_unresolved', '''
+    buildTests(
+        'testCompletion_instanceCreation_unresolved',
+        '''
 class A {
 }
 main() {
   new NoSuchClass(!1);
   new A.noSuchConstructor(!2);
-}''', <String>["1+int", "2+int"]);
+}''',
+        <String>["1+int", "2+int"]);
 
-    buildTests('testCompletion_import_lib', '''
-import '!1''', <String>["1+my_lib.dart"],
-        extraFiles: <String, String>{"/my_lib.dart": ""}, failingTests: '1');
+    buildTests(
+        'testCompletion_import_lib',
+        '''
+import '!1''',
+        <String>["1+my_lib.dart"],
+        extraFiles: <String, String>{"/my_lib.dart": ""},
+        failingTests: '1');
 
-    buildTests('testCompletion_is', '''
+    buildTests(
+        'testCompletion_is',
+        '''
 class MyClass {}
 main(p) {
   var isVariable;
@@ -1165,23 +1593,29 @@
   var v1 = p is MyCla!2;
   var v2 = p is !3;
   var v2 = p is!4;
-}''', <String>[
-      "1+MyClass",
-      "2+MyClass",
-      "3+MyClass",
-      "3-v1",
-      "4+is",
-      "4-isVariable"
-    ], failingTests: '4');
+}''',
+        <String>[
+          "1+MyClass",
+          "2+MyClass",
+          "3+MyClass",
+          "3-v1",
+          "4+is",
+          "4-isVariable"
+        ]);
 
-    buildTests('testCompletion_is_asIdentifierStart', '''
+    buildTests(
+        'testCompletion_is_asIdentifierStart',
+        '''
 main(p) {
   var isVisible;
   var v1 = is!1;
   var v2 = is!2
-}''', <String>["1+isVisible", "2+isVisible"]);
+}''',
+        <String>["1+isVisible", "2+isVisible"]);
 
-    buildTests('testCompletion_is_asPrefixedIdentifierStart', '''
+    buildTests(
+        'testCompletion_is_asPrefixedIdentifierStart',
+        '''
 class A {
   var isVisible;
 }
@@ -1189,39 +1623,60 @@
 main(A p) {
   var v1 = p.is!1;
   var v2 = p.is!2
-}''', <String>["1+isVisible", "2+isVisible"]);
+}''',
+        <String>["1+isVisible", "2+isVisible"]);
 
-    buildTests('testCompletion_is_incompleteStatement1', '''
+    buildTests(
+        'testCompletion_is_incompleteStatement1',
+        '''
 class MyClass {}
 main(p) {
   var justSomeVar;
   var v = p is !1
-}''', <String>["1+MyClass", "1-justSomeVar"]);
+}''',
+        <String>["1+MyClass", "1-justSomeVar"]);
 
-    buildTests('testCompletion_is_incompleteStatement2', '''
+    buildTests(
+        'testCompletion_is_incompleteStatement2',
+        '''
 class MyClass {}
 main(p) {
   var isVariable;
   var v = p is!1
-}''', <String>["1+is", "1-isVariable"], failingTests: '1');
+}''',
+        <String>["1+is", "1-isVariable"]);
 
-    buildTests('testCompletion_keyword_in', '''
-class Foo { int input = 7; mth() { if (in!1) {}}}''', <String>["1+input"]);
+    buildTests(
+        'testCompletion_keyword_in',
+        '''
+class Foo { int input = 7; mth() { if (in!1) {}}}''',
+        <String>["1+input"]);
 
-    buildTests('testCompletion_keyword_syntheticIdentifier', '''
+    buildTests(
+        'testCompletion_keyword_syntheticIdentifier',
+        '''
 main() {
   var caseVar;
   var otherVar;
   var v = case!1
-}''', <String>["1+caseVar", "1-otherVar"]);
+}''',
+        <String>["1+caseVar", "1-otherVar"]);
 
-    buildTests('testCompletion_libraryIdentifier_atEOF', '''
-library int.!1''', <String>["1-parse", "1-bool"]);
+    buildTests(
+        'testCompletion_libraryIdentifier_atEOF',
+        '''
+library int.!1''',
+        <String>["1-parse", "1-bool"]);
 
-    buildTests('testCompletion_libraryIdentifier_notEOF', '''
-library int.!1''', <String>["1-parse", "1-bool"]);
+    buildTests(
+        'testCompletion_libraryIdentifier_notEOF',
+        '''
+library int.!1''',
+        <String>["1-parse", "1-bool"]);
 
-    buildTests('testCompletion_methodRef_asArg_incompatibleFunctionType', '''
+    buildTests(
+        'testCompletion_methodRef_asArg_incompatibleFunctionType',
+        '''
 foo( f(int p) ) {}
 class Functions {
   static myFuncInt(int p) {}
@@ -1230,12 +1685,16 @@
 bar(p) {}
 main(p) {
   foo( Functions.!1; );
-}''', <String>[
-      "1+myFuncInt" /*":" + ProposalKind.METHOD_NAME*/,
-      "1-myFuncDouble" /*":" + ProposalKind.METHOD_NAME*/
-    ], failingTests: '1');
+}''',
+        <String>[
+          "1+myFuncInt" /*":" + ProposalKind.METHOD_NAME*/,
+          "1-myFuncDouble" /*":" + ProposalKind.METHOD_NAME*/
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_methodRef_asArg_notFunctionType', '''
+    buildTests(
+        'testCompletion_methodRef_asArg_notFunctionType',
+        '''
 foo( f(int p) ) {}
 class Functions {
   static myFunc(int p) {}
@@ -1243,91 +1702,133 @@
 bar(p) {}
 main(p) {
   foo( (int p) => Functions.!1; );
-}''', <String>[
-      "1+myFunc" /*":" + ProposalKind.METHOD*/,
-      "1-myFunc" /*":" + ProposalKind.METHOD_NAME*/
-    ], failingTests: '1');
+}''',
+        <String>[
+          "1+myFunc" /*":" + ProposalKind.METHOD*/,
+          "1-myFunc" /*":" + ProposalKind.METHOD_NAME*/
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_methodRef_asArg_ofFunctionType', '''
+    buildTests(
+        'testCompletion_methodRef_asArg_ofFunctionType',
+        '''
 foo( f(int p) ) {}
 class Functions {
   static int myFunc(int p) {}
 }
 main(p) {
   foo(Functions.!1);
-}''', <String>[
+}''',
+        <String>[
       "1+myFunc" /*":" + ProposalKind.METHOD*/,
       "1+myFunc" /*":" + ProposalKind.METHOD_NAME*/
     ]);
 
-    buildTests('testCompletion_namedArgument_alreadyUsed', '''
-func({foo}) {} main() { func(foo: 0, fo!1); }''', <String>["1-foo"]);
+    buildTests(
+        'testCompletion_namedArgument_alreadyUsed',
+        '''
+func({foo}) {} main() { func(foo: 0, fo!1); }''',
+        <String>["1-foo"]);
 
-    buildTests('testCompletion_namedArgument_constructor', '''
+    buildTests(
+        'testCompletion_namedArgument_constructor',
+        '''
 class A {A({foo, bar}) {}} main() { new A(fo!1); }''',
-        <String>["1+foo", "1-bar"], failingTests: '1');
+        <String>["1+foo", "1-bar"],
+        failingTests: '1');
 
-    buildTests('testCompletion_namedArgument_empty', '''
-func({foo, bar}) {} main() { func(!1); }''', <String>[
-      "1+foo" /*":" + ProposalKind.NAMED_ARGUMENT*/,
-      "1-foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/
-    ], failingTests: '1');
+    buildTests(
+        'testCompletion_namedArgument_empty',
+        '''
+func({foo, bar}) {} main() { func(!1); }''',
+        <String>[
+          "1+foo" /*":" + ProposalKind.NAMED_ARGUMENT*/,
+          "1-foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_namedArgument_function', '''
+    buildTests(
+        'testCompletion_namedArgument_function',
+        '''
 func({foo, bar}) {} main() { func(fo!1); }''',
-        <String>["1+foo", "1-bar"], failingTests: '1');
+        <String>["1+foo", "1-bar"],
+        failingTests: '1');
 
-    buildTests('testCompletion_namedArgument_notNamed', '''
-func([foo]) {} main() { func(fo!1); }''', <String>["1-foo"]);
+    buildTests(
+        'testCompletion_namedArgument_notNamed',
+        '''
+func([foo]) {} main() { func(fo!1); }''',
+        <String>["1-foo"]);
 
-    buildTests('testCompletion_namedArgument_unresolvedFunction', '''
-main() { func(fo!1); }''', <String>["1-foo"]);
+    buildTests(
+        'testCompletion_namedArgument_unresolvedFunction',
+        '''
+main() { func(fo!1); }''',
+        <String>["1-foo"]);
 
-    buildTests('testCompletion_newMemberType1', '''
+    buildTests(
+        'testCompletion_newMemberType1',
+        '''
 class Collection{}class List extends Collection{}class Foo { !1 }''',
         <String>["1+Collection", "1+List"]);
 
-    buildTests('testCompletion_newMemberType2', '''
+    buildTests(
+        'testCompletion_newMemberType2',
+        '''
 class Collection{}class List extends Collection{}class Foo {!1}''',
         <String>["1+Collection", "1+List"]);
 
-    buildTests('testCompletion_newMemberType3', '''
+    buildTests(
+        'testCompletion_newMemberType3',
+        '''
 class Collection{}class List extends Collection{}class Foo {L!1}''',
         <String>["1-Collection", "1+List"]);
 
-    buildTests('testCompletion_newMemberType4', '''
+    buildTests(
+        'testCompletion_newMemberType4',
+        '''
 class Collection{}class List extends Collection{}class Foo {C!1}''',
         <String>["1+Collection", "1-List"]);
 
-    buildTests('testCompletion_positionalArgument_constructor', '''
+    buildTests(
+        'testCompletion_positionalArgument_constructor',
+        '''
 class A {
   A([foo, bar]);
 }
 main() {
   new A(!1);
   new A(0, !2);
-}''', <String>[
-      "1+foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/,
-      "1-bar",
-      "2-foo",
-      "2+bar" /*":"
+}''',
+        <String>[
+          "1+foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/,
+          "1-bar",
+          "2-foo",
+          "2+bar" /*":"
         + ProposalKind.OPTIONAL_ARGUMENT*/
-    ], failingTests: '12');
+        ],
+        failingTests: '12');
 
-    buildTests('testCompletion_positionalArgument_function', '''
+    buildTests(
+        'testCompletion_positionalArgument_function',
+        '''
 func([foo, bar]) {}
 main() {
   func(!1);
   func(0, !2);
-}''', <String>[
-      "1+foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/,
-      "1-bar",
-      "2-foo",
-      "2+bar" /*":"
+}''',
+        <String>[
+          "1+foo" /*":" + ProposalKind.OPTIONAL_ARGUMENT*/,
+          "1-bar",
+          "2-foo",
+          "2+bar" /*":"
         + ProposalKind.OPTIONAL_ARGUMENT*/
-    ], failingTests: '12');
+        ],
+        failingTests: '12');
 
-    buildTests('testCompletion_preferStaticType', '''
+    buildTests(
+        'testCompletion_preferStaticType',
+        '''
 class A {
   foo() {}
 }
@@ -1337,40 +1838,53 @@
 main() {
   A v = new B();
   v.!1
-}''', <String>[
-      "1+foo",
-      "1-bar,potential=false,declaringType=B",
-      "1+bar,potential=true,declaringType=B"
-    ], failingTests: '1');
+}''',
+        <String>[
+          "1+foo",
+          "1-bar,potential=false,declaringType=B",
+          "1+bar,potential=true,declaringType=B"
+        ],
+        failingTests: '1');
 
-    buildTests('testCompletion_privateElement_sameLibrary_constructor', '''
+    buildTests(
+        'testCompletion_privateElement_sameLibrary_constructor',
+        '''
 class A {
   A._c();
   A.c();
 }
 main() {
   new A.!1
-}''', <String>["1+_c", "1+c"]);
+}''',
+        <String>["1+_c", "1+c"]);
 
-    buildTests('testCompletion_privateElement_sameLibrary_member', '''
+    buildTests(
+        'testCompletion_privateElement_sameLibrary_member',
+        '''
 class A {
   _m() {}
   m() {}
 }
 main(A a) {
   a.!1
-}''', <String>["1+_m", "1+m"]);
+}''',
+        <String>["1+_m", "1+m"]);
 
-    buildTests('testCompletion_propertyAccess_whenClassTarget', '''
+    buildTests(
+        'testCompletion_propertyAccess_whenClassTarget',
+        '''
 class A {
   static int FIELD;
   int field;
 }
 main() {
   A.!1
-}''', <String>["1+FIELD", "1-field"]);
+}''',
+        <String>["1+FIELD", "1-field"]);
 
-    buildTests('testCompletion_propertyAccess_whenClassTarget_excludeSuper', '''
+    buildTests(
+        'testCompletion_propertyAccess_whenClassTarget_excludeSuper',
+        '''
 class A {
   static int FIELD_A;
   static int methodA() {}
@@ -1381,10 +1895,13 @@
 }
 main() {
   B.!1;
-}''', <String>["1+FIELD_B", "1-FIELD_A", "1+methodB", "1-methodA"],
+}''',
+        <String>["1+FIELD_B", "1-FIELD_A", "1+methodB", "1-methodA"],
         failingTests: '1');
 
-    buildTests('testCompletion_propertyAccess_whenInstanceTarget', '''
+    buildTests(
+        'testCompletion_propertyAccess_whenInstanceTarget',
+        '''
 class A {
   static int FIELD;
   int fieldA;
@@ -1398,19 +1915,30 @@
 main(B b, C c) {
   b.a.!1;
   c.!2;
-}''', <String>["1-FIELD", "1+fieldA", "2+fieldC", "2+fieldA"]);
+}''',
+        <String>["1-FIELD", "1+fieldA", "2+fieldC", "2+fieldA"]);
 
-    buildTests('testCompletion_return_withIdentifierPrefix', '''
-f() { var vvv = 42; return v!1 }''', <String>["1+vvv"]);
+    buildTests(
+        'testCompletion_return_withIdentifierPrefix',
+        '''
+f() { var vvv = 42; return v!1 }''',
+        <String>["1+vvv"]);
 
-    buildTests('testCompletion_return_withoutExpression', '''
-f() { var vvv = 42; return !1 }''', <String>["1+vvv"]);
+    buildTests(
+        'testCompletion_return_withoutExpression',
+        '''
+f() { var vvv = 42; return !1 }''',
+        <String>["1+vvv"]);
 
-    buildTests('testCompletion_staticField1', '''
+    buildTests(
+        'testCompletion_staticField1',
+        '''
 class num{}class Sunflower {static final n!2um MAX_D = 300;nu!3m xc, yc;Sun!4flower() {x!Xc = y!Yc = MA!1 }}''',
         <String>["1+MAX_D", "X+xc", "Y+yc", "2+num", "3+num", "4+Sunflower"]);
 
-    buildTests('testCompletion_super_superType', '''
+    buildTests(
+        'testCompletion_super_superType',
+        '''
 class A {
   var fa;
   ma() {}
@@ -1421,9 +1949,12 @@
   main() {
     super.!1
   }
-}''', <String>["1+fa", "1-fb", "1+ma", "1-mb"]);
+}''',
+        <String>["1+fa", "1-fb", "1+ma", "1-mb"]);
 
-    buildTests('testCompletion_superConstructorInvocation_noNamePrefix', '''
+    buildTests(
+        'testCompletion_superConstructorInvocation_noNamePrefix',
+        '''
 class A {
   A.fooA();
   A.fooB();
@@ -1431,9 +1962,13 @@
 }
 class B extends A {
   B() : super.!1
-}''', <String>["1+fooA", "1+fooB", "1+bar"], failingTests: '1');
+}''',
+        <String>["1+fooA", "1+fooB", "1+bar"],
+        failingTests: '1');
 
-    buildTests('testCompletion_superConstructorInvocation_withNamePrefix', '''
+    buildTests(
+        'testCompletion_superConstructorInvocation_withNamePrefix',
+        '''
 class A {
   A.fooA();
   A.fooB();
@@ -1441,44 +1976,71 @@
 }
 class B extends A {
   B() : super.f!1
-}''', <String>["1+fooA", "1+fooB", "1-bar"], failingTests: '1');
+}''',
+        <String>["1+fooA", "1+fooB", "1-bar"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_bad_inConstructorInitializer', '''
+    buildTests(
+        'testCompletion_this_bad_inConstructorInitializer',
+        '''
 class A {
   var f;
   A() : f = this.!1;
-}''', <String>["1-toString"], failingTests: '1');
+}''',
+        <String>["1-toString"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_bad_inFieldDeclaration', '''
+    buildTests(
+        'testCompletion_this_bad_inFieldDeclaration',
+        '''
 class A {
   var f = this.!1;
-}''', <String>["1-toString"], failingTests: '1');
+}''',
+        <String>["1-toString"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_bad_inStaticMethod', '''
+    buildTests(
+        'testCompletion_this_bad_inStaticMethod',
+        '''
 class A {
   static m() {
     this.!1;
   }
-}''', <String>["1-toString"], failingTests: '1');
+}''',
+        <String>["1-toString"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_bad_inTopLevelFunction', '''
+    buildTests(
+        'testCompletion_this_bad_inTopLevelFunction',
+        '''
 main() {
   this.!1;
-}''', <String>["1-toString"], failingTests: '1');
+}''',
+        <String>["1-toString"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_bad_inTopLevelVariableDeclaration', '''
-var v = this.!1;''', <String>["1-toString"], failingTests: '1');
+    buildTests(
+        'testCompletion_this_bad_inTopLevelVariableDeclaration',
+        '''
+var v = this.!1;''',
+        <String>["1-toString"],
+        failingTests: '1');
 
-    buildTests('testCompletion_this_OK_inConstructorBody', '''
+    buildTests(
+        'testCompletion_this_OK_inConstructorBody',
+        '''
 class A {
   var f;
   m() {}
   A() {
     this.!1;
   }
-}''', <String>["1+f", "1+m"]);
+}''',
+        <String>["1+f", "1+m"]);
 
-    buildTests('testCompletion_this_OK_localAndSuper', '''
+    buildTests(
+        'testCompletion_this_OK_localAndSuper',
+        '''
 class A {
   var fa;
   ma() {}
@@ -1489,49 +2051,70 @@
   main() {
     this.!1
   }
-}''', <String>["1+fa", "1+fb", "1+ma", "1+mb"]);
+}''',
+        <String>["1+fa", "1+fb", "1+ma", "1+mb"]);
 
-    buildTests('testCompletion_topLevelField_init2', '''
+    buildTests(
+        'testCompletion_topLevelField_init2',
+        '''
 class DateTime{static var JUN;}final num M = Dat!1eTime.JUN;''',
         <String>["1+DateTime", "1-void"]);
 
-    buildTests('testCompletion_while', '''
-class Foo { int boo = 7; mth() { while (b!1) {} }}''', <String>["1+boo"]);
+    buildTests(
+        'testCompletion_while',
+        '''
+class Foo { int boo = 7; mth() { while (b!1) {} }}''',
+        <String>["1+boo"]);
   }
 
   void buildLibraryTests() {
     Map<String, String> sources = new HashMap<String, String>();
 
-    buildTests('test_export_ignoreIfThisLibraryExports', '''
+    buildTests(
+        'test_export_ignoreIfThisLibraryExports',
+        '''
 export 'dart:math';
 libFunction() {};
 main() {
   !1
-}''', <String>["1-cos", "1+libFunction"]);
+}''',
+        <String>["1-cos", "1+libFunction"]);
 
     sources.clear();
     sources["/lib.dart"] = '''
 library lib;
 export 'dart:math' hide sin;
 libFunction() {};''';
-    buildTests('test_export_showIfImportLibraryWithExport', '''
+    buildTests(
+        'test_export_showIfImportLibraryWithExport',
+        '''
 import 'lib.dart' as p;
 main() {
   p.!1
-}''', <String>["1+cos", "1-sin", "1+libFunction"],
-        extraFiles: sources, failingTests: '1');
+}''',
+        <String>["1+cos", "1-sin", "1+libFunction"],
+        extraFiles: sources,
+        failingTests: '1');
 
-    buildTests('test_importPrefix_hideCombinator', '''
+    buildTests(
+        'test_importPrefix_hideCombinator',
+        '''
 import 'dart:math' as math hide PI;
 main() {
   math.!1
-}''', <String>["1-PI", "1+LN10"], failingTests: '1');
+}''',
+        <String>["1-PI", "1+LN10"],
+        failingTests: '1');
 
-    buildTests('test_importPrefix_showCombinator', '''
+    buildTests(
+        'test_importPrefix_showCombinator',
+        '''
 import 'dart:math' as math show PI;
 main() {
   math.!1
-}''', <String>["1+PI", "1-LN10"], failingTests: '1');
+}''',
+        <String>["1+PI", "1-LN10"],
+        failingTests: '1');
 
     sources.clear();
     sources["/lib.dart"] = '''
@@ -1541,11 +2124,16 @@
 
 class A extends _A {
 }''';
-    buildTests('test_memberOfPrivateClass_otherLibrary', '''
+    buildTests(
+        'test_memberOfPrivateClass_otherLibrary',
+        '''
 import 'lib.dart';
 main(A a) {
   a.!1
-}''', <String>["1+foo"], extraFiles: sources, failingTests: '1');
+}''',
+        <String>["1+foo"],
+        extraFiles: sources,
+        failingTests: '1');
 
     sources.clear();
     sources["/lib.dart"] = '''
@@ -1554,11 +2142,15 @@
   A.c();
   A._c();
 }''';
-    buildTests('test_noPrivateElement_otherLibrary_constructor', '''
+    buildTests(
+        'test_noPrivateElement_otherLibrary_constructor',
+        '''
 import 'lib.dart';
 main() {
   new A.!1
-}''', <String>["1-_c", "1+c"], failingTests: '1');
+}''',
+        <String>["1-_c", "1+c"],
+        failingTests: '1');
 
     sources.clear();
     sources["/lib.dart"] = '''
@@ -1567,12 +2159,16 @@
   var f;
   var _f;
 }''';
-    buildTests('test_noPrivateElement_otherLibrary_member', '''
+    buildTests(
+        'test_noPrivateElement_otherLibrary_member',
+        '''
               import 'lib.dart';
               main(A a) {
                 a.!1
-              }''', <String>["1-_f", "1+f"],
-        extraFiles: sources, failingTests: '1');
+              }''',
+        <String>["1-_f", "1+f"],
+        extraFiles: sources,
+        failingTests: '1');
 
     sources.clear();
     sources["/firth.dart"] = '''
@@ -1580,34 +2176,41 @@
 class SerializationException {
   const SerializationException();
 }''';
-    buildTests('testLibrary001', '''
+    buildTests(
+        'testLibrary001',
+        '''
 import 'firth.dart';
 main() {
-throw new Seria!1lizationException();}''', <String>["1+SerializationException"],
-        extraFiles: sources, failingTests: '1');
+throw new Seria!1lizationException();}''',
+        <String>["1+SerializationException"],
+        extraFiles: sources,
+        failingTests: '1');
 
     // Type propagation.
     // TODO Include corelib analysis (this works in the editor)
-    buildTests('testLibrary002',
+    buildTests(
+        'testLibrary002',
         '''t2() {var q=[0],z=q.!1length;q.!2clear();}''',
-        <String>["1+length", "1+isEmpty", "2+clear"], failingTests: '1');
+        <String>["1+length", "1+isEmpty", "2+clear"],
+        failingTests: '1');
 
     // TODO Include corelib analysis
-    buildTests('testLibrary003', '''class X{var q; f() {q.!1a!2}}''', <String>[
-      "1+end",
-      "2+abs",
-      "2-end"
-    ], failingTests: '12');
+    buildTests('testLibrary003', '''class X{var q; f() {q.!1a!2}}''',
+        <String>["1+end", "2+abs", "2-end"],
+        failingTests: '12');
 
     // TODO Include corelib analysis
     // Resolving dart:html takes between 2.5s and 30s; json, about 0.12s
-    buildTests('testLibrary004', '''
+    buildTests(
+        'testLibrary004',
+        '''
             library foo;
             import 'dart:convert' as json;
             class JsonDecoderX{}
             f1() {var x=new json.!1}
             f2() {var x=new json.JsonDe!2}
-            f3() {var x=new json.JsonDecoder!3}''', <String>[
+            f3() {var x=new json.JsonDecoder!3}''',
+        <String>[
       "1+JsonDecoder",
       "1-JsonDecoderX",
       "2+JsonDecoder",
@@ -1619,9 +2222,8 @@
     // TODO Enable after type propagation is implemented. Not yet.
     // TODO Include corelib analysis
     buildTests('testLibrary005',
-            '''var PHI;main(){PHI=5.3;PHI.abs().!1 Object x;}''', <String>[
-      "1+abs"
-    ], failingTests: '1');
+        '''var PHI;main(){PHI=5.3;PHI.abs().!1 Object x;}''', <String>["1+abs"],
+        failingTests: '1');
 
     // Exercise import and export handling.
     // Libraries are defined in partial order of increasing dependency.
@@ -1644,7 +2246,9 @@
 library imp2;
 export 'exp2a.dart';
 i2() {}''';
-    buildTests('testLibrary006', '''
+    buildTests(
+        'testLibrary006',
+        '''
 import 'imp1.dart';
 import 'imp2.dart';
 main() {!1
@@ -1653,8 +2257,10 @@
   e1a();
   e1b();
   e2a();
-}''', <String>["1+i1", "1+i2", "1+e1a", "1+e2a", "1+e1b"],
-        extraFiles: sources, failingTests: '1');
+}''',
+        <String>["1+i1", "1+i2", "1+e1a", "1+e2a", "1+e1b"],
+        extraFiles: sources,
+        failingTests: '1');
 
     // Exercise import and export handling.
     // Libraries are defined in partial order of increasing dependency.
@@ -1662,13 +2268,17 @@
     sources["/l1.dart"] = '''
 library l1;
 var _l1t; var l1t;''';
-    buildTests('testLibrary007', '''
+    buildTests(
+        'testLibrary007',
+        '''
 import 'l1.dart';
 main() {
   var x = l!1
   var y = _!2
-}''', <String>["1+l1t", "1-_l1t", "2-_l1t"],
-        extraFiles: sources, failingTests: '1');
+}''',
+        <String>["1+l1t", "1-_l1t", "2-_l1t"],
+        extraFiles: sources,
+        failingTests: '1');
 
     // Check private library exclusion
     sources.clear();
@@ -1685,7 +2295,9 @@
   void privateMethod() {
   }
 }''';
-    buildTests('testLibrary008', '''
+    buildTests(
+        'testLibrary008',
+        '''
 import 'private.dart';
 import 'public.dart';
 class Test {
@@ -1693,8 +2305,10 @@
     NonPrivate x = new NonPrivate();
     x.!1 //publicMethod but not privateMethod should appear
   }
-}''', <String>["1-privateMethod", "1+publicMethod"],
-        extraFiles: sources, failingTests: '1');
+}''',
+        <String>["1-privateMethod", "1+publicMethod"],
+        extraFiles: sources,
+        failingTests: '1');
 
     // Exercise library prefixes.
     sources.clear();
@@ -1703,7 +2317,9 @@
 int X = 1;
 void m(){}
 class Y {}''';
-    buildTests('testLibrary009', '''
+    buildTests(
+        'testLibrary009',
+        '''
 import 'lib.dart' as Q;
 void a() {
   var x = Q.!1
@@ -1716,27 +2332,33 @@
 }
 void d() {
   new Q.!4
-}''', <String>[
-      "1+X",
-      "1+m",
-      "1+Y",
-      "2+X",
-      "2+m",
-      "2+Y",
-      "3+X",
-      "3+m",
-      "3+Y",
-      "4+Y",
-      "4-m",
-      "4-X"
-    ], extraFiles: sources, failingTests: '1234');
+}''',
+        <String>[
+          "1+X",
+          "1+m",
+          "1+Y",
+          "2+X",
+          "2+m",
+          "2+Y",
+          "3+X",
+          "3+m",
+          "3+Y",
+          "4+Y",
+          "4-m",
+          "4-X"
+        ],
+        extraFiles: sources,
+        failingTests: '1234');
   }
 
   void buildNumberedTests() {
-    buildTests('test001', '''
+    buildTests(
+        'test001',
+        '''
 void r1(var v) {
   v.!1toString!2().!3hash!4Code
-}''', <String>[
+}''',
+        <String>[
       "1+toString",
       "1-==",
       "2+toString",
@@ -1746,160 +2368,199 @@
       "4-toString"
     ]);
 
-    buildTests('test002', '''
+    buildTests(
+        'test002',
+        '''
 void r2(var vim) {
   v!1.toString()
-}''', <String>["1+vim"]);
+}''',
+        <String>["1+vim"]);
 
-    buildTests('test003', '''
+    buildTests(
+        'test003',
+        '''
 class A {
   int a() => 3;
   int b() => this.!1a();
-}''', <String>["1+a"]);
+}''',
+        <String>["1+a"]);
 
-    buildTests('test004', '''
+    buildTests(
+        'test004',
+        '''
 class A {
   int x;
   A() : this.!1x = 1;
   A.b() : this();
   A.c() : this.!2b();
   g() => new A.!3c();
-}''', <String>["1+x", "2+b", "3+c"], failingTests: '12');
+}''',
+        <String>["1+x", "2+b", "3+c"],
+        failingTests: '12');
 
-    buildTests('test005', '''
+    buildTests(
+        'test005',
+        '''
 class A {}
 void rr(var vim) {
   var !1vq = v!2.toString();
   var vf;
   v!3.toString();
-}''', <String>[
-      "1-A",
-      "1-vim",
-      "1+vq",
-      "1-vf",
-      "1-this",
-      "1-void",
-      "1-null",
-      "1-false",
-      "2-A",
-      "2+vim",
-      "2-vf",
-      "2-vq",
-      "2-this",
-      "2-void",
-      "2-null",
-      "2-false",
-      "3+vf",
-      "3+vq",
-      "3+vim",
-      "3-A"
-    ], failingTests: '1');
+}''',
+        <String>[
+          "1-A",
+          "1-vim",
+          "1+vq",
+          "1-vf",
+          "1-this",
+          "1-void",
+          "1-null",
+          "1-false",
+          "2-A",
+          "2+vim",
+          "2-vf",
+          "2-vq",
+          "2-this",
+          "2-void",
+          "2-null",
+          "2-false",
+          "3+vf",
+          "3+vq",
+          "3+vim",
+          "3-A"
+        ],
+        failingTests: '1');
 
-    buildTests('test006', '''
+    buildTests(
+        'test006',
+        '''
 void r2(var vim, {va: 2, b: 3}) {
   v!1.toString()
-}''', <String>["1+va", "1-b"]);
+}''',
+        <String>["1+va", "1-b"]);
 
-    buildTests('test007', '''
+    buildTests(
+        'test007',
+        '''
 void r2(var vim, [va: 2, b: 3]) {
   v!1.toString()
-}''', <String>["1+va", "1-b"]);
+}''',
+        <String>["1+va", "1-b"]);
 
     // keywords
-    buildTests('test008', '''
+    buildTests(
+        'test008',
+        '''
 !1class Aclass {}
 class Bclass !2extends!3 !4Aclass {}
 !5typedef Ctype = !6Bclass with !7Aclass;
 class Dclass extends !8Ctype {}
 !9abstract class Eclass implements Dclass,!C Ctype, Bclass {}
-class Fclass extends Bclass !Awith !B Eclass {}''', <String>[
-      "1+class",
-      "1-implements",
-      "1-extends",
-      "1-with",
-      "2+extends",
-      "3+extends",
-      "4+Aclass",
-      "4-Bclass",
-      "5+typedef",
-      "6+Bclass",
-      "6-Ctype",
-      "7+Aclass",
-      "7-Bclass",
-      "8+Ctype",
-      "9+abstract",
-      "A+with",
-      "B+Eclass",
-      "B-Dclass",
-      "B-Ctype",
-      "C+Bclass",
-      "C-Eclass"
-    ], failingTests: '23467ABC');
+class Fclass extends Bclass !Awith !B Eclass {}''',
+        <String>[
+          "1+class",
+          "1-implements",
+          "1-extends",
+          "1-with",
+          "2+extends",
+          "3+extends",
+          "4+Aclass",
+          "4-Bclass",
+          "5+typedef",
+          "6+Bclass",
+          "6-Ctype",
+          "7+Aclass",
+          "7-Bclass",
+          "8+Ctype",
+          "9+abstract",
+          "A+with",
+          "B+Eclass",
+          "B-Dclass",
+          "B-Ctype",
+          "C+Bclass",
+          "C-Eclass"
+        ],
+        failingTests: '23467ABC');
 
     // keywords
-    buildTests('test009', '''
+    buildTests(
+        'test009',
+        '''
 typedef !1dy!2namic TestFn1();
 typedef !3vo!4id TestFn2();
-typ!7edef !5n!6''', <String>[
-      "1+void",
-      "1+TestFn2",
-      "2+dynamic",
-      "2-void",
-      "3+dynamic",
-      "4+void",
-      "4-dynamic",
-      "5+TestFn2",
-      "6+num",
-      "7+typedef"
-    ], failingTests: '1234');
+typ!7edef !5n!6''',
+        <String>[
+          "1+void",
+          "1+TestFn2",
+          "2+dynamic",
+          "2-void",
+          "3+dynamic",
+          "4+void",
+          "4-dynamic",
+          "5+TestFn2",
+          "6+num",
+          "7+typedef"
+        ],
+        failingTests: '1234');
 
-    buildTests('test010', '''
+    buildTests(
+        'test010',
+        '''
 class test !8<!1t !2 !3extends String,!4 List,!5 !6>!7 {}
-class tezetst !9<!BString,!C !DList>!A {}''', <String>[
-      "1-String",
-      "1-List",
-      "1-test",
-      "2-String",
-      "2-test",
-      "3+extends",
-      "4-tezetst",
-      "4-test",
-      "5-String",
-      "6-List",
-      "7-List",
-      "8-List",
-      "9-String",
-      "A-String",
-      "B-String",
-      "C-List",
-      "C-tezetst",
-      "D-List",
-      "D-test"
-    ], failingTests: '23');
+class tezetst !9<!BString,!C !DList>!A {}''',
+        <String>[
+          "1-String",
+          "1-List",
+          "1-test",
+          "2-String",
+          "2-test",
+          "3+extends",
+          "4-tezetst",
+          "4-test",
+          "5-String",
+          "6-List",
+          "7-List",
+          "8-List",
+          "9-String",
+          "A-String",
+          "B-String",
+          "C-List",
+          "C-tezetst",
+          "D-List",
+          "D-test"
+        ],
+        failingTests: '23');
 
     // name generation with conflicts
     buildTests('test011', '''r2(var object, Object object1, Object !1);''',
-        <String>["1+object2"], failingTests: '1');
+        <String>["1+object2"],
+        failingTests: '1');
 
     // reserved words
-    buildTests('test012', '''
+    buildTests(
+        'test012',
+        '''
 class X {
   f() {
     g(!1var!2 z) {!3true.!4toString();};
   }
-}''', <String>[
-      "1+var",
-      "1+dynamic",
-      "1-f",
-      "2+var",
-      "2-dynamic",
-      "3+false",
-      "3+true",
-      "4+toString"
-    ], failingTests: '123');
+}''',
+        <String>[
+          "1+var",
+          "1+dynamic",
+          "1-f",
+          "2+var",
+          "2-dynamic",
+          "3+false",
+          "3+true",
+          "4+toString"
+        ],
+        failingTests: '123');
 
     // conditions & operators
-    buildTests('test013', '''
+    buildTests(
+        'test013',
+        '''
 class Q {
   bool x;
   List zs;
@@ -1914,22 +2575,26 @@
     } on !5Object catch(a){}
     if (!7x !6) {} else {};
   }
-}''', <String>[
-      "1+x",
-      "2+x",
-      "3+zs",
-      "4+k",
-      "5+Q",
-      "5-a",
-      "6+==",
-      "7+x",
-      "8+==",
-      "9+==",
-      "0+k"
-    ], failingTests: '689');
+}''',
+        <String>[
+          "1+x",
+          "2+x",
+          "3+zs",
+          "4+k",
+          "5+Q",
+          "5-a",
+          "6+==",
+          "7+x",
+          "8+==",
+          "9+==",
+          "0+k"
+        ],
+        failingTests: '689');
 
     // keywords
-    buildTests('test014', '''
+    buildTests(
+        'test014',
+        '''
 class Q {
   bool x;
   List zs;
@@ -1947,64 +2612,74 @@
     !Jif (x) {} !Kelse {};
     !Lreturn;
   }
-}''', <String>[
-      "1+while",
-      "2+do",
-      "3+while",
-      "4+for (!)",
-      "5+in",
-      "6+for (!)",
-      "7+switch",
-      "8+case",
-      "9+default",
-      "A+try",
-      "B+on",
-      "C+catch",
-      "D+var",
-      "E+void",
-      "F+assert",
-      "G+continue",
-      "H+break",
-      "J+if",
-      "K+else",
-      "L+return"
-    ], failingTests: '35BCHK');
+}''',
+        <String>[
+          "1+while",
+          "2+do",
+          "3+while",
+          "4+for",
+          "5+in",
+          "6+for",
+          "7+switch",
+          "8+case",
+          "9+default",
+          "A+try",
+          "B+on",
+          "C+catch",
+          "D+var",
+          "E+void",
+          "F+assert",
+          "G+continue",
+          "H+break",
+          "J+if",
+          "K+else",
+          "L+return"
+        ],
+        failingTests: '3BCK');
 
     // operators in function
     buildTests('test015', '''f(a,b,c) => a + b * c !1;''', <String>["1+=="],
         failingTests: '1');
 
     // operators in return
-    buildTests('test016',
-        '''class X {dynamic f(a,b,c) {return a + b * c !1;}}''', <String>[
-      "1+=="
-    ], failingTests: '1');
+    buildTests(
+        'test016',
+        '''class X {dynamic f(a,b,c) {return a + b * c !1;}}''',
+        <String>["1+=="],
+        failingTests: '1');
 
     // keywords
-    buildTests('test017', '''
+    buildTests(
+        'test017',
+        '''
 !1!2import 'x' !5as r;
 !3export '!8uri' !6hide Q !7show X;
-!4part 'x';''', <String>[
-      "1+library",
-      "2+import '!';",
-      "3+export",
-      "4+part",
-      "5+as",
-      "6+hide",
-      "7+show",
-      "8-null"
-    ], failingTests: '567');
+!4part 'x';''',
+        <String>[
+          "1+library",
+          "2+import",
+          "3+export",
+          "4+part",
+          "5+as",
+          "6+hide",
+          "7+show",
+          "8-null"
+        ],
+        failingTests: '567');
 
     // keywords
     buildTests('test018', '''!1part !2of foo;''', <String>["1+part", "2+of"],
         failingTests: '2');
 
-    buildTests('test019', '''
+    buildTests(
+        'test019',
+        '''
 var truefalse = 0;
 var falsetrue = 1;
 main() {
   var foo = true!1
-}''', <String>["1+true", "1+truefalse", "1-falsetrue"]);
+}''',
+        <String>["1+true", "1+truefalse", "1-falsetrue"]);
 
     buildTests('test020', '''var x = null.!1''', <String>["1+toString"],
         failingTests: '1');
@@ -2013,7 +2688,9 @@
 
     buildTests('test022', '''var x = .!1;''', <String>["1-toString"]);
 
-    buildTests('test023', '''
+    buildTests(
+        'test023',
+        '''
 class Map{getKeys(){}}
 class X {
   static x1(Map m) {
@@ -2022,18 +2699,24 @@
   x2(Map m) {
     m.!2getKeys;
   }
-}''', <String>["1+getKeys", "2+getKeys"]);
+}''',
+        <String>["1+getKeys", "2+getKeys"]);
 
 // Note lack of semicolon following completion location
-    buildTests('test024', '''
+    buildTests(
+        'test024',
+        '''
 class List{factory List.from(Iterable other) {}}
 class F {
   f() {
     new List.!1
   }
-}''', <String>["1+from"]);
+}''',
+        <String>["1+from"]);
 
-    buildTests('test025', '''
+    buildTests(
+        'test025',
+        '''
 class R {
   static R _m;
   static R m;
@@ -2065,7 +2748,8 @@
     var g = R.!Em;
     var h = R.!Fg();
   }
-}''', <String>[
+}''',
+        <String>[
       "1+m",
       "2+_m",
       "3+g",
@@ -2094,11 +2778,14 @@
 
     buildTests('test030', '''n(){[1].forEach((x){!1});}''', <String>["1+x"]);
 
-    buildTests('test031',
+    buildTests(
+        'test031',
         '''class Caster {} m() {try {} on Cas!1ter catch (CastBlock) {!2}}''',
         <String>["1+Caster", "1-CastBlock", "2+Caster", "2+CastBlock"]);
 
-    buildTests('test032', '''
+    buildTests(
+        'test032',
+        '''
 const ONE = 1;
 const ICHI = 10;
 const UKSI = 100;
@@ -2112,7 +2799,8 @@
     case ONE!1: return;
     default: return;
   }
-}''', <String>[
+}''',
+        <String>[
       "1+ONE",
       "1-UKSI",
       "2+EIN",
@@ -2123,14 +2811,18 @@
       "3+ONE"
     ]);
 
-    buildTests('test033',
+    buildTests(
+        'test033',
         '''class A{}class B extends A{b(){}}class C implements A {c(){}}class X{x(){A f;f.!1}}''',
-        <String>["1+b", "1-c"], failingTests: '1');
+        <String>["1+b", "1-c"],
+        failingTests: '1');
 
     // TODO(scheglov) decide what to do with Type for untyped field (not
     // supported by the new store)
     // test analysis of untyped fields and top-level vars
-    buildTests('test034', '''
+    buildTests(
+        'test034',
+        '''
 var topvar;
 class Top {top(){}}
 class Left extends Top {left(){}}
@@ -2153,7 +2845,9 @@
     topvar.!1top();
     field.!2top();
   }
-}''', <String>["1+top", "2+top"], failingTests: '12');
+}''',
+        <String>["1+top", "2+top"],
+        failingTests: '12');
 
     // test analysis of untyped fields and top-level vars
     buildTests('test035', '''class Y {final x='hi';mth() {x.!1length;}}''',
@@ -2162,7 +2856,9 @@
     // TODO(scheglov) decide what to do with Type for untyped field (not
     // supported by the new store)
     // test analysis of untyped fields and top-level vars
-    buildTests('test036', '''
+    buildTests(
+        'test036',
+        '''
 class A1 {
   var field;
   A1() : field = 0;
@@ -2174,16 +2870,24 @@
 main() {
   A1 a = new A1();
   a.field.!2
-}''', <String>["1+round", "2+round"], failingTests: '12');
+}''',
+        <String>["1+round", "2+round"],
+        failingTests: '12');
 
-    buildTests('test037', '''
+    buildTests(
+        'test037',
+        '''
 class HttpServer{}
 class HttpClient{}
 main() {
   new HtS!1
-}''', <String>["1+HttpServer", "1-HttpClient"], failingTests: '1');
+}''',
+        <String>["1+HttpServer", "1-HttpClient"],
+        failingTests: '1');
 
-    buildTests('test038', '''
+    buildTests(
+        'test038',
+        '''
 class X {
   x(){}
 }
@@ -2197,35 +2901,38 @@
     ay.!1y;
     az.!2x;
   }
-}''', <String>["1+y", "1-x", "2+x", "2-y"], failingTests: '2');
+}''',
+        <String>["1+y", "1-x", "2+x", "2-y"],
+        failingTests: '2');
 
     // test analysis of untyped fields and top-level vars
-    buildTests('test039', '''class X{}var x = null as !1X;''', <String>[
-      "1+X",
-      "1-void"
-    ]);
+    buildTests('test039', '''class X{}var x = null as !1X;''',
+        <String>["1+X", "1-void"]);
 
     // test arg lists with named params
     buildTests('test040', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1)!2;}''',
-        <String>["1+x1", "2-x2"], failingTests: '1');
+        <String>["1+x1", "2-x2"],
+        failingTests: '1');
 
     // test arg lists with named params
     buildTests('test041', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1''',
-        <String>["1+x1", "1+x2", "1+y"], failingTests: '1');
+        <String>["1+x1", "1+x2", "1+y"],
+        failingTests: '1');
 
     // test arg lists with named params
     buildTests('test042', '''m(){f(a, b, {x1, x2, y}) {};f(1, 2, !1;!2''',
-        <String>["1+x1", "1+x2", "2-y"], failingTests: '1');
+        <String>["1+x1", "1+x2", "2-y"],
+        failingTests: '1');
   }
 
   void buildOtherTests() {
     buildTests('test_classMembers_inGetter',
         '''class A { var fff; get z {ff!1}}''', <String>["1+fff"]);
 
-    buildTests('testSingle',
-        '''class A {int x; !2mth() {int y = this.x;}}class B{}''', <String>[
-      "2+B"
-    ]);
+    buildTests(
+        'testSingle',
+        '''class A {int x; !2mth() {int y = this.x;}}class B{}''',
+        <String>["2+B"]);
   }
 
   /**
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 1c469f6..4045228 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -19,9 +19,10 @@
 import 'package:unittest/unittest.dart';
 
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AbstractContextManagerTest);
 }
 
@@ -96,10 +97,11 @@
   }
 
   void test_contextsInAnalysisRoot_nestedContext() {
-    String subProjPath = join(projPath, 'subproj');
+    String subProjPath = posix.join(projPath, 'subproj');
     Folder subProjFolder = resourceProvider.newFolder(subProjPath);
-    resourceProvider.newFile(join(subProjPath, 'pubspec.yaml'), 'contents');
-    String subProjFilePath = join(subProjPath, 'file.dart');
+    resourceProvider.newFile(
+        posix.join(subProjPath, 'pubspec.yaml'), 'contents');
+    String subProjFilePath = posix.join(subProjPath, 'file.dart');
     resourceProvider.newFile(subProjFilePath, 'contents');
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     // Make sure that there really are contexts for both the main project and
@@ -151,10 +153,11 @@
   }
 
   void test_isInAnalysisRoot_inNestedContext() {
-    String subProjPath = join(projPath, 'subproj');
+    String subProjPath = posix.join(projPath, 'subproj');
     Folder subProjFolder = resourceProvider.newFolder(subProjPath);
-    resourceProvider.newFile(join(subProjPath, 'pubspec.yaml'), 'contents');
-    String subProjFilePath = join(subProjPath, 'file.dart');
+    resourceProvider.newFile(
+        posix.join(subProjPath, 'pubspec.yaml'), 'contents');
+    String subProjFilePath = posix.join(subProjPath, 'file.dart');
     resourceProvider.newFile(subProjFilePath, 'contents');
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     // Make sure that there really is a context for the subproject.
@@ -214,7 +217,9 @@
     String sdkExtSrcPath = newFolder([projPath, 'sdk_ext', 'src']);
     newFile([sdkExtSrcPath, 'part.dart']);
     // Setup analysis options file with ignore list.
-    newFile([projPath, '.analysis_options'], r'''
+    newFile(
+        [projPath, '.analysis_options'],
+        r'''
 analyzer:
   exclude:
     - lib/nope.dart
@@ -235,17 +240,23 @@
     // Create files.
     String libPath = newFolder([projPath, LIB_NAME]);
     newFile([libPath, 'main.dart']);
-    newFile([libPath, 'pubspec.yaml'], r'''
+    newFile(
+        [libPath, 'pubspec.yaml'],
+        r'''
 name: foobar
 ''');
     String otherLibPath = newFolder([projPath, 'other_lib']);
     newFile([otherLibPath, 'entry.dart']);
-    newFile([otherLibPath, 'pubspec.yaml'], r'''
+    newFile(
+        [otherLibPath, 'pubspec.yaml'],
+        r'''
 name: other_lib
 ''');
     // Setup analysis options file with ignore list that ignores the 'other_lib'
     // directory by name.
-    newFile([projPath, '.analysis_options'], r'''
+    newFile(
+        [projPath, '.analysis_options'],
+        r'''
 analyzer:
   exclude:
     - 'other_lib'
@@ -254,38 +265,8 @@
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     // Verify that the context in other_lib wasn't created and that the
     // context in lib was created.
-    var contexts = manager.contextsInAnalysisRoot(
-        resourceProvider.newFolder(projPath));
-    expect(contexts.length, 2);
-    expect(contexts[0].name, equals('/my/proj'));
-    expect(contexts[1].name, equals('/my/proj/lib'));
-  }
-
-  test_path_filter_wildcard_child_contexts_option() async {
-    // Create files.
-    String libPath = newFolder([projPath, LIB_NAME]);
-    newFile([libPath, 'main.dart']);
-    newFile([libPath, 'pubspec.yaml'], r'''
-name: foobar
-''');
-    String otherLibPath = newFolder([projPath, 'other_lib']);
-    newFile([otherLibPath, 'entry.dart']);
-    newFile([otherLibPath, 'pubspec.yaml'], r'''
-name: other_lib
-''');
-    // Setup analysis options file with ignore list that ignores 'other_lib'
-    // and all immediate children.
-    newFile([projPath, '.analysis_options'], r'''
-analyzer:
-  exclude:
-    - 'other_lib/*'
-''');
-    // Setup context.
-    manager.setRoots(<String>[projPath], <String>[], <String, String>{});
-    // Verify that the context in other_lib wasn't created and that the
-    // context in lib was created.
-    var contexts = manager.contextsInAnalysisRoot(
-        resourceProvider.newFolder(projPath));
+    var contexts =
+        manager.contextsInAnalysisRoot(resourceProvider.newFolder(projPath));
     expect(contexts.length, 2);
     expect(contexts[0].name, equals('/my/proj'));
     expect(contexts[1].name, equals('/my/proj/lib'));
@@ -295,17 +276,23 @@
     // Create files.
     String libPath = newFolder([projPath, LIB_NAME]);
     newFile([libPath, 'main.dart']);
-    newFile([libPath, 'pubspec.yaml'], r'''
+    newFile(
+        [libPath, 'pubspec.yaml'],
+        r'''
   name: foobar
   ''');
     String otherLibPath = newFolder([projPath, 'other_lib']);
     newFile([otherLibPath, 'entry.dart']);
-    newFile([otherLibPath, 'pubspec.yaml'], r'''
+    newFile(
+        [otherLibPath, 'pubspec.yaml'],
+        r'''
   name: other_lib
   ''');
     // Setup analysis options file with ignore list that ignores 'other_lib'
     // and all descendants.
-    newFile([projPath, '.analysis_options'], r'''
+    newFile(
+        [projPath, '.analysis_options'],
+        r'''
 analyzer:
   exclude:
     - 'other_lib/**'
@@ -314,8 +301,44 @@
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     // Verify that the context in other_lib wasn't created and that the
     // context in lib was created.
-    var contexts = manager.contextsInAnalysisRoot(
-        resourceProvider.newFolder(projPath));
+    var contexts =
+        manager.contextsInAnalysisRoot(resourceProvider.newFolder(projPath));
+    expect(contexts.length, 2);
+    expect(contexts[0].name, equals('/my/proj'));
+    expect(contexts[1].name, equals('/my/proj/lib'));
+  }
+
+  test_path_filter_wildcard_child_contexts_option() async {
+    // Create files.
+    String libPath = newFolder([projPath, LIB_NAME]);
+    newFile([libPath, 'main.dart']);
+    newFile(
+        [libPath, 'pubspec.yaml'],
+        r'''
+name: foobar
+''');
+    String otherLibPath = newFolder([projPath, 'other_lib']);
+    newFile([otherLibPath, 'entry.dart']);
+    newFile(
+        [otherLibPath, 'pubspec.yaml'],
+        r'''
+name: other_lib
+''');
+    // Setup analysis options file with ignore list that ignores 'other_lib'
+    // and all immediate children.
+    newFile(
+        [projPath, '.analysis_options'],
+        r'''
+analyzer:
+  exclude:
+    - 'other_lib/*'
+''');
+    // Setup context.
+    manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+    // Verify that the context in other_lib wasn't created and that the
+    // context in lib was created.
+    var contexts =
+        manager.contextsInAnalysisRoot(resourceProvider.newFolder(projPath));
     expect(contexts.length, 2);
     expect(contexts[0].name, equals('/my/proj'));
     expect(contexts[1].name, equals('/my/proj/lib'));
@@ -513,8 +536,9 @@
     newFile([examplePath, ContextManagerImpl.PACKAGE_SPEC_NAME]);
     newFile([examplePath, 'example.dart']);
 
-    packageMapProvider.packageMap['proj'] =
-        [resourceProvider.getResource(libPath)];
+    packageMapProvider.packageMap['proj'] = [
+      resourceProvider.getResource(libPath)
+    ];
 
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
 
@@ -541,8 +565,9 @@
     newFile([examplePath, ContextManagerImpl.PUBSPEC_NAME]);
     newFile([examplePath, 'example.dart']);
 
-    packageMapProvider.packageMap['proj'] =
-        [resourceProvider.getResource(libPath)];
+    packageMapProvider.packageMap['proj'] = [
+      resourceProvider.getResource(libPath)
+    ];
 
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
 
@@ -640,8 +665,9 @@
     newFile([srcPath, 'internal.dart']);
     String testFilePath = newFile([testPath, 'main_test.dart']);
 
-    packageMapProvider.packageMap['proj'] =
-        [resourceProvider.getResource(libPath)];
+    packageMapProvider.packageMap['proj'] = [
+      resourceProvider.getResource(libPath)
+    ];
 
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     Set<Source> sources = callbacks.currentContextSources[projPath];
@@ -700,8 +726,12 @@
     resourceProvider.newFile(subProjectB_file, 'library b;');
     // configure package maps
     packageMapProvider.packageMaps = {
-      subProjectA: {'foo': [resourceProvider.newFolder('/package/foo')]},
-      subProjectB: {'bar': [resourceProvider.newFolder('/package/bar')]},
+      subProjectA: {
+        'foo': [resourceProvider.newFolder('/package/foo')]
+      },
+      subProjectB: {
+        'bar': [resourceProvider.newFolder('/package/bar')]
+      },
     };
     // set roots
     manager.setRoots(<String>[root], <String>[], <String, String>{});
@@ -722,14 +752,15 @@
     String packagePathFoo = '/package1/foo';
     String packageRootPath = '/package2/foo';
     Folder packageFolder = resourceProvider.newFolder(packagePathFoo);
-    packageMapProvider.packageMap = {'foo': [packageFolder]};
+    packageMapProvider.packageMap = {
+      'foo': [packageFolder]
+    };
     List<String> includedPaths = <String>[projPath];
     List<String> excludedPaths = <String>[];
     manager.setRoots(includedPaths, excludedPaths, <String, String>{});
     _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
-    manager.setRoots(includedPaths, excludedPaths, <String, String>{
-      projPath: packageRootPath
-    });
+    manager.setRoots(includedPaths, excludedPaths,
+        <String, String>{projPath: packageRootPath});
     _checkPackageRoot(projPath, equals(packageRootPath));
   }
 
@@ -738,13 +769,11 @@
     String packageRootPath2 = '/package2';
     List<String> includedPaths = <String>[projPath];
     List<String> excludedPaths = <String>[];
-    manager.setRoots(includedPaths, excludedPaths, <String, String>{
-      projPath: packageRootPath1
-    });
+    manager.setRoots(includedPaths, excludedPaths,
+        <String, String>{projPath: packageRootPath1});
     _checkPackageRoot(projPath, equals(packageRootPath1));
-    manager.setRoots(includedPaths, excludedPaths, <String, String>{
-      projPath: packageRootPath2
-    });
+    manager.setRoots(includedPaths, excludedPaths,
+        <String, String>{projPath: packageRootPath2});
     _checkPackageRoot(projPath, equals(packageRootPath2));
   }
 
@@ -874,16 +903,17 @@
 
   void test_setRoots_newFolderWithPackageRoot() {
     String packageRootPath = '/package';
-    manager.setRoots(<String>[projPath], <String>[], <String, String>{
-      projPath: packageRootPath
-    });
+    manager.setRoots(<String>[projPath], <String>[],
+        <String, String>{projPath: packageRootPath});
     _checkPackageRoot(projPath, equals(packageRootPath));
   }
 
   void test_setRoots_newlyAddedFoldersGetProperPackageMap() {
     String packagePath = '/package/foo';
     Folder packageFolder = resourceProvider.newFolder(packagePath);
-    packageMapProvider.packageMap = {'foo': [packageFolder]};
+    packageMapProvider.packageMap = {
+      'foo': [packageFolder]
+    };
     manager.setRoots(<String>[projPath], <String>[], <String, String>{});
     _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
   }
@@ -1016,12 +1046,13 @@
     String packagePathFoo = '/package1/foo';
     String packageRootPath = '/package2/foo';
     Folder packageFolder = resourceProvider.newFolder(packagePathFoo);
-    packageMapProvider.packageMap = {'foo': [packageFolder]};
+    packageMapProvider.packageMap = {
+      'foo': [packageFolder]
+    };
     List<String> includedPaths = <String>[projPath];
     List<String> excludedPaths = <String>[];
-    manager.setRoots(includedPaths, excludedPaths, <String, String>{
-      projPath: packageRootPath
-    });
+    manager.setRoots(includedPaths, excludedPaths,
+        <String, String>{projPath: packageRootPath});
     _checkPackageRoot(projPath, equals(packageRootPath));
     manager.setRoots(includedPaths, excludedPaths, <String, String>{});
     _checkPackageMap(projPath, equals(packageMapProvider.packageMap));
@@ -1351,7 +1382,17 @@
   }
 
   test_watch_deletePackagespec_fromSubFolder_withPubspec() {
-    // prepare paths
+    // prepare paths:
+    //
+    // root
+    //   root.dart
+    //   sub
+    //     aaa
+    //       .packages
+    //       pubspec.yaml
+    //       bin
+    //         a.dart
+    //
     String root = '/root';
     String rootFile = '$root/root.dart';
     String subProject = '$root/sub/aaa';
@@ -1564,8 +1605,8 @@
    * A map from the paths of contexts to a set of the sources that should be
    * explicitly analyzed in those contexts.
    */
-  final Map<String, Set<Source>> currentContextSources = <String, Set<Source>>{
-  };
+  final Map<String, Set<Source>> currentContextSources =
+      <String, Set<Source>>{};
 
   /**
    * Map from context to folder disposition.
@@ -1594,8 +1635,9 @@
     currentContextSources[path] = new HashSet<Source>();
     currentContextDispositions[path] = disposition;
     currentContext = AnalysisEngine.instance.createAnalysisContext();
-    List<UriResolver> resolvers = [new FileUriResolver()];
+    List<UriResolver> resolvers = [];
     resolvers.addAll(disposition.createPackageUriResolvers(resourceProvider));
+    resolvers.add(new FileUriResolver());
     currentContext.sourceFactory =
         new SourceFactory(resolvers, disposition.packages);
     return currentContext;
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 25b4d88..d90922b 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -21,9 +21,10 @@
 import 'analysis_abstract.dart';
 import 'mock_sdk.dart';
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
 
   defineReflectiveTests(AnalysisDomainTest);
   defineReflectiveTests(SetSubscriptionsTest);
@@ -39,9 +40,14 @@
     ExtensionManager manager = new ExtensionManager();
     ServerPlugin serverPlugin = new ServerPlugin();
     manager.processPlugins([serverPlugin]);
-    server = new AnalysisServer(serverChannel, resourceProvider,
-        new MockPackageMapProvider(), null, serverPlugin,
-        new AnalysisServerOptions(), new MockSdk(),
+    server = new AnalysisServer(
+        serverChannel,
+        resourceProvider,
+        new MockPackageMapProvider(),
+        null,
+        serverPlugin,
+        new AnalysisServerOptions(),
+        new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new AnalysisDomainHandler(server);
   });
@@ -132,8 +138,9 @@
 
     group('updateOptions', () {
       test('invalid', () {
-        var request = new Request(
-            '0', ANALYSIS_UPDATE_OPTIONS, {OPTIONS: {'not-an-option': true}});
+        var request = new Request('0', ANALYSIS_UPDATE_OPTIONS, {
+          OPTIONS: {'not-an-option': true}
+        });
         var response = handler.handleRequest(request);
         // Invalid options should be silently ignored.
         expect(response, isResponseSuccess('0'));
@@ -156,7 +163,9 @@
     helper.createSingleFileProject('// empty');
     return helper.onAnalysisComplete.then((_) {
       Request request = new Request('0', ANALYSIS_UPDATE_CONTENT, {
-        'files': {helper.testFile: {TYPE: 'foo',}}
+        'files': {
+          helper.testFile: {TYPE: 'foo',}
+        }
       });
       Response response = helper.handler.handleRequest(request);
       expect(response, isResponseFailure('0'));
@@ -291,7 +300,9 @@
     // Prepare a source file that has errors because it refers to an unknown
     // package.
     String pkgFile = '/packages/pkgA/libA.dart';
-    resourceProvider.newFile(pkgFile, '''
+    resourceProvider.newFile(
+        pkgFile,
+        '''
 library lib_a;
 class A {}
 ''');
@@ -322,12 +333,15 @@
   test_setRoots_packages() {
     // prepare package
     String pkgFile = '/packages/pkgA/libA.dart';
-    resourceProvider.newFile(pkgFile, '''
+    resourceProvider.newFile(
+        pkgFile,
+        '''
 library lib_a;
 class A {}
 ''');
-    packageMapProvider.packageMap['pkgA'] =
-        [resourceProvider.getResource('/packages/pkgA')];
+    packageMapProvider.packageMap['pkgA'] = [
+      resourceProvider.getResource('/packages/pkgA')
+    ];
     addTestFile('''
 import 'package:pkgA/libA.dart';
 main(A a) {
@@ -368,9 +382,14 @@
     ExtensionManager manager = new ExtensionManager();
     ServerPlugin serverPlugin = new ServerPlugin();
     manager.processPlugins([serverPlugin]);
-    server = new AnalysisServer(serverChannel, resourceProvider,
-        new MockPackageMapProvider(), null, serverPlugin,
-        new AnalysisServerOptions(), new MockSdk(),
+    server = new AnalysisServer(
+        serverChannel,
+        resourceProvider,
+        new MockPackageMapProvider(),
+        null,
+        serverPlugin,
+        new AnalysisServerOptions(),
+        new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new AnalysisDomainHandler(server);
     // listen for notifications
@@ -593,7 +612,9 @@
 
   test_afterAnalysis_packageFile_external() async {
     String pkgFile = '/packages/pkgA/lib/libA.dart';
-    resourceProvider.newFile(pkgFile, '''
+    resourceProvider.newFile(
+        pkgFile,
+        '''
 library lib_a;
 class A {}
 ''');
@@ -623,11 +644,15 @@
     String pkgB = '/pkgA';
     String pkgFileA = '$pkgA/lib/libA.dart';
     String pkgFileB = '$pkgA/lib/libB.dart';
-    resourceProvider.newFile(pkgFileA, '''
+    resourceProvider.newFile(
+        pkgFileA,
+        '''
 library lib_a;
 class A {}
 ''');
-    resourceProvider.newFile(pkgFileB, '''
+    resourceProvider.newFile(
+        pkgFileB,
+        '''
 import 'package:pkgA/libA.dart';
 main() {
   new A();
@@ -657,7 +682,9 @@
 
   test_afterAnalysis_packageFile_notUsed() async {
     String pkgFile = '/packages/pkgA/lib/libA.dart';
-    resourceProvider.newFile(pkgFile, '''
+    resourceProvider.newFile(
+        pkgFile,
+        '''
 library lib_a;
 class A {}
 ''');
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 08916ce..f09af0e 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -34,9 +34,10 @@
 import 'analysis_abstract.dart';
 import 'mock_sdk.dart';
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(CompletionManagerTest);
   defineReflectiveTests(CompletionTest);
   defineReflectiveTests(_NoSearchEngine);
@@ -262,7 +263,7 @@
   List<CompletionSuggestion> suggestions = [];
   bool suggestionsDone = false;
 
-  String addTestFile(String content, {offset}) {
+  String addTestFile(String content, {int offset}) {
     completionOffset = content.indexOf('^');
     if (offset != null) {
       expect(completionOffset, -1, reason: 'cannot supply offset and ^');
@@ -277,8 +278,10 @@
   }
 
   void assertHasResult(CompletionSuggestionKind kind, String completion,
-      [int relevance = DART_RELEVANCE_DEFAULT, bool isDeprecated = false,
-      bool isPotential = false]) {
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      bool isDeprecated: false,
+      bool isPotential: false,
+      int selectionOffset}) {
     var cs;
     suggestions.forEach((s) {
       if (s.completion == completion) {
@@ -295,7 +298,7 @@
     }
     expect(cs.kind, equals(kind));
     expect(cs.relevance, equals(relevance));
-    expect(cs.selectionOffset, equals(completion.length));
+    expect(cs.selectionOffset, selectionOffset ?? completion.length);
     expect(cs.selectionLength, equals(0));
     expect(cs.isDeprecated, equals(isDeprecated));
     expect(cs.isPotential, equals(isPotential));
@@ -379,6 +382,64 @@
     });
   }
 
+  test_imports_incremental() async {
+    addTestFile('''library foo;
+      e^
+      import "dart:async";
+      import "package:foo/foo.dart";
+      class foo { }''');
+    await waitForTasksFinished();
+    server.updateContent('uc1', {testFile: new AddContentOverlay(testCode)});
+    server.updateContent('uc2', {
+      testFile:
+          new ChangeContentOverlay([new SourceEdit(completionOffset, 0, 'xp')])
+    });
+    completionOffset += 2;
+    await getSuggestions();
+    expect(replacementOffset, completionOffset - 3);
+    expect(replacementLength, 3);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
+        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import',
+        relevance: DART_RELEVANCE_HIGH);
+    assertNoResult('extends');
+    assertNoResult('library');
+  }
+
+  test_imports_partial() async {
+    addTestFile('''^
+      import "package:foo/foo.dart";
+      import "package:bar/bar.dart";
+      class Baz { }''');
+
+    // Wait for analysis then edit the content
+    await waitForTasksFinished();
+    String revisedContent = testCode.substring(0, completionOffset) +
+        'i' +
+        testCode.substring(completionOffset);
+    ++completionOffset;
+    server.handleRequest(new AnalysisUpdateContentParams(
+        {testFile: new AddContentOverlay(revisedContent)}).toRequest('add1'));
+
+    // Request code completion immediately after edit
+    Response response = handleSuccessfulRequest(new CompletionGetSuggestionsParams(
+        testFile, completionOffset).toRequest('0'));
+    completionId = response.id;
+    assertValidId(completionId);
+    await waitForTasksFinished();
+    expect(replacementOffset, completionOffset - 1);
+    expect(replacementLength, 1);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'library',
+        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'import',
+        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
+        relevance: DART_RELEVANCE_HIGH);
+    assertHasResult(CompletionSuggestionKind.KEYWORD, 'part',
+        relevance: DART_RELEVANCE_HIGH);
+    assertNoResult('extends');
+  }
+
   test_imports_prefixed() {
     addTestFile('''
       import 'dart:html' as foo;
@@ -417,10 +478,10 @@
     return getSuggestions().then((_) {
       expect(replacementOffset, equals(completionOffset - 2));
       expect(replacementLength, equals(2));
-      assertHasResult(
-          CompletionSuggestionKind.KEYWORD, 'export', DART_RELEVANCE_HIGH);
-      assertHasResult(
-          CompletionSuggestionKind.KEYWORD, 'class', DART_RELEVANCE_HIGH);
+      assertHasResult(CompletionSuggestionKind.KEYWORD, 'export',
+          relevance: DART_RELEVANCE_HIGH);
+      assertHasResult(CompletionSuggestionKind.KEYWORD, 'class',
+          relevance: DART_RELEVANCE_HIGH);
     });
   }
 
@@ -440,12 +501,12 @@
       expect(replacementOffset, equals(completionOffset));
       expect(replacementLength, equals(0));
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'A');
-      assertHasResult(
-          CompletionSuggestionKind.INVOCATION, 'a', DART_RELEVANCE_LOCAL_FIELD);
+      assertHasResult(CompletionSuggestionKind.INVOCATION, 'a',
+          relevance: DART_RELEVANCE_LOCAL_FIELD);
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'b',
-          DART_RELEVANCE_LOCAL_VARIABLE);
+          relevance: DART_RELEVANCE_LOCAL_VARIABLE);
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'x',
-          DART_RELEVANCE_LOCAL_METHOD);
+          relevance: DART_RELEVANCE_LOCAL_METHOD);
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'DateTime');
     });
   }
@@ -470,7 +531,7 @@
       expect(replacementOffset, equals(completionOffset));
       expect(replacementLength, equals(0));
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'm',
-          DART_RELEVANCE_LOCAL_METHOD);
+          relevance: DART_RELEVANCE_LOCAL_METHOD);
     });
   }
 
@@ -541,7 +602,7 @@
       // Suggestions based upon imported elements are partially filtered
       //assertHasResult(CompletionSuggestionKind.INVOCATION, 'Object');
       assertHasResult(CompletionSuggestionKind.INVOCATION, 'test',
-          DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
+          relevance: DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE);
       assertNoResult('HtmlElement');
     });
   }
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index 2ff54e1..41ae718 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -25,8 +25,10 @@
 import 'mock_sdk.dart';
 import 'mocks.dart';
 import 'operation/operation_queue_test.dart';
+import 'utils.dart';
 
 main() {
+  initializeTestEnvironment();
   group('ExecutionDomainHandler', () {
     MemoryResourceProvider provider = new MemoryResourceProvider();
     AnalysisServer server;
@@ -36,9 +38,14 @@
       ExtensionManager manager = new ExtensionManager();
       ServerPlugin serverPlugin = new ServerPlugin();
       manager.processPlugins([serverPlugin]);
-      server = new AnalysisServer(new MockServerChannel(), provider,
-          new MockPackageMapProvider(), null, serverPlugin,
-          new AnalysisServerOptions(), new MockSdk(),
+      server = new AnalysisServer(
+          new MockServerChannel(),
+          provider,
+          new MockPackageMapProvider(),
+          null,
+          serverPlugin,
+          new AnalysisServerOptions(),
+          new MockSdk(),
           InstrumentationService.NULL_SERVICE);
       handler = new ExecutionDomainHandler(server);
     });
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart
index d76b376..a6d8bb3 100644
--- a/pkg/analysis_server/test/domain_server_test.dart
+++ b/pkg/analysis_server/test/domain_server_test.dart
@@ -16,20 +16,28 @@
 
 import 'mock_sdk.dart';
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
   AnalysisServer server;
   ServerDomainHandler handler;
 
+  initializeTestEnvironment();
+
   setUp(() {
     var serverChannel = new MockServerChannel();
     var resourceProvider = new MemoryResourceProvider();
     ExtensionManager manager = new ExtensionManager();
     ServerPlugin serverPlugin = new ServerPlugin();
     manager.processPlugins([serverPlugin]);
-    server = new AnalysisServer(serverChannel, resourceProvider,
-        new MockPackageMapProvider(), null, serverPlugin,
-        new AnalysisServerOptions(), new MockSdk(),
+    server = new AnalysisServer(
+        serverChannel,
+        resourceProvider,
+        new MockPackageMapProvider(),
+        null,
+        serverPlugin,
+        new AnalysisServerOptions(),
+        new MockSdk(),
         InstrumentationService.NULL_SERVICE);
     handler = new ServerDomainHandler(server);
   });
@@ -38,16 +46,19 @@
     test('getVersion', () {
       var request = new ServerGetVersionParams().toRequest('0');
       var response = handler.handleRequest(request);
-      expect(response.toJson(), equals({
-        Response.ID: '0',
-        Response.RESULT: {VERSION: AnalysisServer.VERSION}
-      }));
+      expect(
+          response.toJson(),
+          equals({
+            Response.ID: '0',
+            Response.RESULT: {VERSION: AnalysisServer.VERSION}
+          }));
     });
 
     group('setSubscriptions', () {
       test('invalid service name', () {
-        Request request = new Request(
-            '0', SERVER_SET_SUBSCRIPTIONS, {SUBSCRIPTIONS: ['noSuchService']});
+        Request request = new Request('0', SERVER_SET_SUBSCRIPTIONS, {
+          SUBSCRIPTIONS: ['noSuchService']
+        });
         var response = handler.handleRequest(request);
         expect(response, isResponseFailure('0'));
       });
diff --git a/pkg/analysis_server/test/edit/assists_test.dart b/pkg/analysis_server/test/edit/assists_test.dart
index 42ca88a..505212c 100644
--- a/pkg/analysis_server/test/edit/assists_test.dart
+++ b/pkg/analysis_server/test/edit/assists_test.dart
@@ -13,9 +13,10 @@
 import 'package:unittest/unittest.dart' hide ERROR;
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AssistsTest);
 }
 
@@ -53,7 +54,9 @@
 ''');
     await waitForTasksFinished();
     prepareAssists('v =');
-    _assertHasChange('Remove type annotation', '''
+    _assertHasChange(
+        'Remove type annotation',
+        '''
 main() {
   var v = 1;
 }
@@ -68,7 +71,9 @@
 ''');
     await waitForTasksFinished();
     prepareAssists('v =');
-    _assertHasChange('Split variable declaration', '''
+    _assertHasChange(
+        'Split variable declaration',
+        '''
 main() {
   int v;
   v = 1;
@@ -87,7 +92,9 @@
     int offset = findOffset('  print(1)');
     int length = findOffset('}') - offset;
     prepareAssistsAt(offset, length);
-    _assertHasChange("Surround with 'if'", '''
+    _assertHasChange(
+        "Surround with 'if'",
+        '''
 main() {
   if (condition) {
     print(1);
diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
index 800b9f8..c558b16 100644
--- a/pkg/analysis_server/test/edit/fixes_test.dart
+++ b/pkg/analysis_server/test/edit/fixes_test.dart
@@ -15,9 +15,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(FixesTest);
 }
 
diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
index 20dbdb3..b3a192b 100644
--- a/pkg/analysis_server/test/edit/format_test.dart
+++ b/pkg/analysis_server/test/edit/format_test.dart
@@ -14,9 +14,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(FormatTest);
 }
 
@@ -31,6 +32,24 @@
     handler = new EditDomainHandler(server);
   }
 
+  Future test_format_longLine() {
+    String content = '''
+fun(firstParam, secondParam, thirdParam, fourthParam) {
+  if (firstParam.noNull && secondParam.noNull && thirdParam.noNull && fourthParam.noNull) {}
+}
+''';
+    addTestFile(content);
+    return waitForTasksFinished().then((_) {
+      EditFormatResult formatResult = _formatAt(0, 3, lineLength: 100);
+
+      expect(formatResult.edits, isNotNull);
+      expect(formatResult.edits, hasLength(0));
+
+      expect(formatResult.selectionOffset, equals(0));
+      expect(formatResult.selectionLength, equals(3));
+    });
+  }
+
   Future test_format_noOp() {
     // Already formatted source
     addTestFile('''
@@ -86,24 +105,6 @@
     });
   }
 
-  Future test_format_longLine() {
-    String content = '''
-fun(firstParam, secondParam, thirdParam, fourthParam) {
-  if (firstParam.noNull && secondParam.noNull && thirdParam.noNull && fourthParam.noNull) {}
-}
-''';
-    addTestFile(content);
-    return waitForTasksFinished().then((_) {
-      EditFormatResult formatResult = _formatAt(0, 3, lineLength: 100);
-
-      expect(formatResult.edits, isNotNull);
-      expect(formatResult.edits, hasLength(0));
-
-      expect(formatResult.selectionOffset, equals(0));
-      expect(formatResult.selectionLength, equals(3));
-    });
-  }
-
   Future test_format_withErrors() {
     addTestFile('''
 main() { int x = 
@@ -115,9 +116,11 @@
     });
   }
 
-  EditFormatResult _formatAt(int selectionOffset, int selectionLength, {int lineLength}) {
+  EditFormatResult _formatAt(int selectionOffset, int selectionLength,
+      {int lineLength}) {
     Request request = new EditFormatParams(
-        testFile, selectionOffset, selectionLength, lineLength: lineLength).toRequest('0');
+        testFile, selectionOffset, selectionLength,
+        lineLength: lineLength).toRequest('0');
     Response response = handleSuccessfulRequest(request);
     return new EditFormatResult.fromResponse(response);
   }
diff --git a/pkg/analysis_server/test/edit/organize_directives_test.dart b/pkg/analysis_server/test/edit/organize_directives_test.dart
index e4402ef..deb4ed9 100644
--- a/pkg/analysis_server/test/edit/organize_directives_test.dart
+++ b/pkg/analysis_server/test/edit/organize_directives_test.dart
@@ -14,9 +14,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(OrganizeDirectivesTest);
 }
 
diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
index d59999f..c5d6156 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -16,9 +16,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ConvertGetterMethodToMethodTest);
   defineReflectiveTests(ConvertMethodToGetterTest);
   defineReflectiveTests(ExtractLocalVariableTest);
@@ -43,7 +44,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendConvertRequest('test =>');
-    }, '''
+    },
+        '''
 int test() => 42;
 main() {
   var a = 1 + test();
@@ -92,7 +94,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendConvertRequest('test => 2');
-    }, '''
+    },
+        '''
 class A {
   int test() => 1;
 }
@@ -116,8 +119,11 @@
 
   Future<Response> _sendConvertRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.CONVERT_GETTER_TO_METHOD, testFile, findOffset(search),
-        0, false).toRequest('0');
+        RefactoringKind.CONVERT_GETTER_TO_METHOD,
+        testFile,
+        findOffset(search),
+        0,
+        false).toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -134,7 +140,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendConvertRequest('test() =>');
-    }, '''
+    },
+        '''
 int get test => 42;
 main() {
   var a = 1 + test;
@@ -200,7 +207,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendConvertRequest('test() => 2');
-    }, '''
+    },
+        '''
 class A {
   int get test => 1;
 }
@@ -224,8 +232,11 @@
 
   Future<Response> _sendConvertRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.CONVERT_METHOD_TO_GETTER, testFile, findOffset(search),
-        0, false).toRequest('0');
+        RefactoringKind.CONVERT_METHOD_TO_GETTER,
+        testFile,
+        findOffset(search),
+        0,
+        false).toRequest('0');
     return serverChannel.sendRequest(request);
   }
 }
@@ -258,6 +269,9 @@
     test_simulateRefactoringException_init = false;
     test_simulateRefactoringException_final = false;
     test_simulateRefactoringException_change = false;
+    test_simulateRefactoringReset_afterInitialConditions = false;
+    test_simulateRefactoringReset_afterFinalConditions = false;
+    test_simulateRefactoringReset_afterCreateChange = false;
     super.tearDown();
   }
 
@@ -270,7 +284,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendStringRequest('1 + 2', 'res', true);
-    }, '''
+    },
+        '''
 main() {
   var res = 1 + 2;
   print(res);
@@ -288,7 +303,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendStringSuffixRequest('1 + 2', '); // marker', 'res', false);
-    }, '''
+    },
+        '''
 main() {
   print(1 + 2);
   var res = 1 + 2;
@@ -327,7 +343,9 @@
       assertResultProblemsWarning(result.optionsProblems,
           'Variable name should start with a lowercase letter.');
       // ...but there is still a change
-      assertTestRefactoringResult(result, '''
+      assertTestRefactoringResult(
+          result,
+          '''
 main() {
   var Name = 1 + 2;
   print(Name);
@@ -352,6 +370,48 @@
     });
   }
 
+  test_reset_afterCreateChange() {
+    test_simulateRefactoringReset_afterCreateChange = true;
+    addTestFile('''
+main() {
+  print(1 + 2);
+}
+''');
+    return waitForTasksFinished().then((_) {
+      return sendStringRequest('1 + 2', 'res', true).then((response) {
+        _expectRefactoringRequestCancelled(response);
+      });
+    });
+  }
+
+  test_reset_afterFinalConditions() {
+    test_simulateRefactoringReset_afterFinalConditions = true;
+    addTestFile('''
+main() {
+  print(1 + 2);
+}
+''');
+    return waitForTasksFinished().then((_) {
+      return sendStringRequest('1 + 2', 'res', true).then((response) {
+        _expectRefactoringRequestCancelled(response);
+      });
+    });
+  }
+
+  test_reset_afterInitialConditions() {
+    test_simulateRefactoringReset_afterInitialConditions = true;
+    addTestFile('''
+main() {
+  print(1 + 2);
+}
+''');
+    return waitForTasksFinished().then((_) {
+      return sendStringRequest('1 + 2', 'res', true).then((response) {
+        _expectRefactoringRequestCancelled(response);
+      });
+    });
+  }
+
   test_serverError_change() {
     test_simulateRefactoringException_change = true;
     addTestFile('''
@@ -396,6 +456,12 @@
       });
     });
   }
+
+  void _expectRefactoringRequestCancelled(Response response) {
+    expect(response.error, isNotNull);
+    expect(response,
+        isResponseFailure('0', RequestErrorCode.REFACTORING_REQUEST_CANCELLED));
+  }
 }
 
 @reflectiveTest
@@ -413,7 +479,9 @@
 }
 ''');
     _setOffsetLengthForString('1 + 2');
-    return assertSuccessfulRefactoring(_computeChange, '''
+    return assertSuccessfulRefactoring(
+        _computeChange,
+        '''
 main() {
   print(res());
   print(res());
@@ -433,7 +501,9 @@
 }
 ''');
     _setOffsetLengthForString('a + b');
-    return assertSuccessfulRefactoring(_computeChange, '''
+    return assertSuccessfulRefactoring(
+        _computeChange,
+        '''
 main() {
   int a = 1;
   int b = 2;
@@ -463,7 +533,9 @@
       parameters[1].type = 'num';
       parameters.insert(0, parameters.removeLast());
       options.parameters = parameters;
-      return assertSuccessfulRefactoring(_sendExtractRequest, '''
+      return assertSuccessfulRefactoring(
+          _sendExtractRequest,
+          '''
 main() {
   int a = 1;
   int b = 2;
@@ -542,7 +614,9 @@
 }
 ''');
     _setOffsetLengthForStartEnd();
-    return assertSuccessfulRefactoring(_computeChange, '''
+    return assertSuccessfulRefactoring(
+        _computeChange,
+        '''
 main() {
   int a = 1;
   int b = 2;
@@ -675,9 +749,13 @@
   }
 
   Future test_convertMethodToGetter_hasElement() {
-    return assertHasKind('''
+    return assertHasKind(
+        '''
 int getValue() => 42;
-''', 'getValue', RefactoringKind.CONVERT_METHOD_TO_GETTER, true);
+''',
+        'getValue',
+        RefactoringKind.CONVERT_METHOD_TO_GETTER,
+        true);
   }
 
   Future test_extractLocal() async {
@@ -693,108 +771,130 @@
   }
 
   Future test_rename_hasElement_class() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 class Test {}
 main() {
   Test v;
 }
-''', 'Test v');
+''',
+        'Test v');
   }
 
   Future test_rename_hasElement_constructor() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 class A {
   A.test() {}
 }
 main() {
   new A.test();
 }
-''', 'test();');
+''',
+        'test();');
   }
 
   Future test_rename_hasElement_function() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 main() {
   test();
 }
 test() {}
-''', 'test();');
+''',
+        'test();');
   }
 
   Future test_rename_hasElement_importElement_directive() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 import 'dart:math' as math;
 main() {
   math.PI;
 }
-''', 'import ');
+''',
+        'import ');
   }
 
   Future test_rename_hasElement_importElement_prefixDecl() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 import 'dart:math' as math;
 main() {
   math.PI;
 }
-''', 'math;');
+''',
+        'math;');
   }
 
   Future test_rename_hasElement_importElement_prefixRef() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 import 'dart:async' as test;
 import 'dart:math' as test;
 main() {
   test.PI;
 }
-''', 'test.PI;');
+''',
+        'test.PI;');
   }
 
   Future test_rename_hasElement_instanceGetter() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 class A {
   get test => 0;
 }
 main(A a) {
   a.test;
 }
-''', 'test;');
+''',
+        'test;');
   }
 
   Future test_rename_hasElement_instanceSetter() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 class A {
   set test(x) {}
 }
 main(A a) {
   a.test = 2;
 }
-''', 'test = 2;');
+''',
+        'test = 2;');
   }
 
   Future test_rename_hasElement_library() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 library my.lib;
-''', 'library ');
+''',
+        'library ');
   }
 
   Future test_rename_hasElement_localVariable() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 main() {
   int test = 0;
   print(test);
 }
-''', 'test = 0;');
+''',
+        'test = 0;');
   }
 
   Future test_rename_hasElement_method() {
-    return assertHasRenameRefactoring('''
+    return assertHasRenameRefactoring(
+        '''
 class A {
   test() {}
 }
 main(A a) {
   a.test();
 }
-''', 'test();');
+''',
+        'test();');
   }
 
   Future test_rename_noElement() async {
@@ -850,7 +950,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendInlineRequest('test + 2');
-    }, '''
+    },
+        '''
 main() {
   int a = 42 + 2;
   print(42);
@@ -860,7 +961,10 @@
 
   Future<Response> _sendInlineRequest(String search) {
     Request request = new EditGetRefactoringParams(
-        RefactoringKind.INLINE_LOCAL_VARIABLE, testFile, findOffset(search), 0,
+        RefactoringKind.INLINE_LOCAL_VARIABLE,
+        testFile,
+        findOffset(search),
+        0,
         false).toRequest('0');
     return serverChannel.sendRequest(request);
   }
@@ -921,7 +1025,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendInlineRequest('test(int p)');
-    }, '''
+    },
+        '''
 class A {
   int f;
   main() {
@@ -946,7 +1051,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return _sendInlineRequest('test(a');
-    }, '''
+    },
+        '''
 main() {
   print(1 + 2);
   print(10 + 20);
@@ -968,7 +1074,8 @@
     options.inlineAll = false;
     return assertSuccessfulRefactoring(() {
       return _sendInlineRequest('test(10,');
-    }, '''
+    },
+        '''
 test(a, b) {
   print(a + b);
 }
@@ -1000,7 +1107,8 @@
     _setOptions('/project/test.dart');
     return assertSuccessfulRefactoring(() {
       return _sendMoveRequest();
-    }, '''
+    },
+        '''
 import 'dart:math';
 import 'bin/lib.dart';
 ''');
@@ -1008,8 +1116,8 @@
 
   Future<Response> _sendMoveRequest() {
     Request request = new EditGetRefactoringParams(
-            RefactoringKind.MOVE_FILE, testFile, 0, 0, false, options: options)
-        .toRequest('0');
+        RefactoringKind.MOVE_FILE, testFile, 0, 0, false,
+        options: options).toRequest('0');
     return serverChannel.sendRequest(request);
   }
 
@@ -1063,7 +1171,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('Test {', 'NewName');
-    }, '''
+    },
+        '''
 class NewName {
   NewName() {}
   NewName.named() {}
@@ -1124,7 +1233,9 @@
       assertResultProblemsWarning(result.optionsProblems,
           'Class name should start with an uppercase letter.');
       // ...but there is still a change
-      assertTestRefactoringResult(result, '''
+      assertTestRefactoringResult(
+          result,
+          '''
 class newName {}
 main() {
   newName v;
@@ -1137,7 +1248,9 @@
       }).then((result) {
         assertResultProblemsOK(result);
         // ...and there is a new change
-        assertTestRefactoringResult(result, '''
+        assertTestRefactoringResult(
+            result,
+            '''
 class NewName {}
 main() {
   NewName v;
@@ -1159,7 +1272,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test = 0', 'newName');
-    }, '''
+    },
+        '''
 class A {
   var newName = 0;
   A(this.newName);
@@ -1182,7 +1296,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test);', 'newName');
-    }, '''
+    },
+        '''
 class A {
   var newName = 0;
   A(this.newName);
@@ -1205,7 +1320,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test: 42', 'newName');
-    }, '''
+    },
+        '''
 class A {
   final int newName;
   A({this.newName: 0});
@@ -1227,7 +1343,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test =>', 'newName');
-    }, '''
+    },
+        '''
 class A {
   get newName => 0;
   main() {
@@ -1251,7 +1368,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test() {}', 'newName');
-    }, '''
+    },
+        '''
 class A {
   newName() {}
   main() {
@@ -1302,7 +1420,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test = 0', 'newName');
-    }, '''
+    },
+        '''
 class A {
   set newName(x) {}
   main() {
@@ -1323,7 +1442,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('B;', 'newName');
-    }, '''
+    },
+        '''
 class A {
   A() = B.newName;
 }
@@ -1344,7 +1464,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test();', 'newName');
-    }, '''
+    },
+        '''
 class A {
   A.newName() {}
 }
@@ -1365,7 +1486,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('A();', 'newName');
-    }, '''
+    },
+        '''
 class A {
   A.newName() {}
 }
@@ -1386,7 +1508,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('new A();', 'newName');
-    }, '''
+    },
+        '''
 class A {
   A.newName() {}
 }
@@ -1423,7 +1546,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test() {}', 'newName');
-    }, '''
+    },
+        '''
 newName() {}
 main() {
   newName();
@@ -1443,7 +1567,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest("import 'dart:async';", 'new_name');
-    }, '''
+    },
+        '''
 import 'dart:math';
 import 'dart:async' as new_name;
 main() {
@@ -1464,7 +1589,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest("import 'dart:async' as test;", '');
-    }, '''
+    },
+        '''
 import 'dart:math' as test;
 import 'dart:async';
 main() {
@@ -1492,7 +1618,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('library aaa', 'my.new_name');
-    }, '''
+    },
+        '''
 library my.new_name;
 ''');
   }
@@ -1503,7 +1630,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('aaa', 'my.new_name');
-    }, '''
+    },
+        '''
 library my.new_name;
 ''');
   }
@@ -1514,7 +1642,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('.bbb', 'my.new_name');
-    }, '''
+    },
+        '''
 library my.new_name;
 ''');
   }
@@ -1530,7 +1659,8 @@
 ''');
     return assertSuccessfulRefactoring(() {
       return sendRenameRequest('test = 1', 'newName');
-    }, '''
+    },
+        '''
 main() {
   int newName = 0;
   newName = 1;
@@ -1701,8 +1831,8 @@
       RefactoringKind kind, int offset, int length, RefactoringOptions options,
       [bool validateOnly = false]) {
     Request request = new EditGetRefactoringParams(
-            kind, testFile, offset, length, validateOnly, options: options)
-        .toRequest('0');
+        kind, testFile, offset, length, validateOnly,
+        options: options).toRequest('0');
     return serverChannel.sendRequest(request);
   }
 
diff --git a/pkg/analysis_server/test/edit/sort_members_test.dart b/pkg/analysis_server/test/edit/sort_members_test.dart
index 194baa9..0d43184 100644
--- a/pkg/analysis_server/test/edit/sort_members_test.dart
+++ b/pkg/analysis_server/test/edit/sort_members_test.dart
@@ -14,9 +14,10 @@
 
 import '../analysis_abstract.dart';
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(SortMembersTest);
 }
 
diff --git a/pkg/analysis_server/test/edit/test_all.dart b/pkg/analysis_server/test/edit/test_all.dart
index e9a9ea1..ef861d8 100644
--- a/pkg/analysis_server/test/edit/test_all.dart
+++ b/pkg/analysis_server/test/edit/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'assists_test.dart' as assists_test;
 import 'fixes_test.dart' as fixes_test;
 import 'format_test.dart' as format_test;
@@ -17,7 +18,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('edit', () {
     assists_test.main();
     fixes_test.main();
diff --git a/pkg/analysis_server/test/integration/analysis/error_test.dart b/pkg/analysis_server/test/integration/analysis/error_test.dart
index 7337545..806958f 100644
--- a/pkg/analysis_server/test/integration/analysis/error_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/error_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisErrorIntegrationTest);
 }
 
@@ -19,7 +21,9 @@
     extends AbstractAnalysisServerIntegrationTest {
   test_detect_simple_error() {
     String pathname = sourcePath('test.dart');
-    writeFile(pathname, '''
+    writeFile(
+        pathname,
+        '''
 main() {
   print(null) // parse error: missing ';'
 }''');
@@ -31,4 +35,64 @@
       expect(errors[0].location.file, equals(pathname));
     });
   }
+
+  test_super_mixins_disabled() async {
+    String pathname = sourcePath('test.dart');
+    writeFile(
+        pathname,
+        '''
+class Test extends Object with C {
+  void foo() {}
+}
+abstract class B {
+  void foo();
+}
+abstract class C extends B {
+  void bar() {
+    super.foo();
+  }
+}
+''');
+    standardAnalysisSetup();
+    await analysisFinished;
+    expect(currentAnalysisErrors[pathname], isList);
+    List<AnalysisError> errors = currentAnalysisErrors[pathname];
+    expect(errors, hasLength(2));
+    Set<String> allErrorMessages =
+        errors.map((AnalysisError e) => e.message).toSet();
+    expect(
+        allErrorMessages,
+        contains(
+            "The class 'C' cannot be used as a mixin because it extends a class other than Object"));
+    expect(
+        allErrorMessages,
+        contains(
+            "The class 'C' cannot be used as a mixin because it references 'super'"));
+  }
+
+  test_super_mixins_enabled() async {
+    String pathname = sourcePath('test.dart');
+    writeFile(
+        pathname,
+        '''
+class Test extends Object with C {
+  void foo() {}
+}
+abstract class B {
+  void foo();
+}
+abstract class C extends B {
+  void bar() {
+    super.foo();
+  }
+}
+''');
+    await sendAnalysisUpdateOptions(
+        new AnalysisOptions()..enableSuperMixins = true);
+    standardAnalysisSetup();
+    await analysisFinished;
+    expect(currentAnalysisErrors[pathname], isList);
+    List<AnalysisError> errors = currentAnalysisErrors[pathname];
+    expect(errors, isEmpty);
+  }
 }
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_after_analysis_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_after_analysis_test.dart
index 091eea6..2024194 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_after_analysis_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_after_analysis_test.dart
@@ -6,9 +6,11 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../../utils.dart';
 import 'get_errors.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_before_analysis_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_before_analysis_test.dart
index 34fa7e7..51ef942 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_before_analysis_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_before_analysis_test.dart
@@ -6,9 +6,11 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../../utils.dart';
 import 'get_errors.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
index 3928d99..af43a3c 100644
--- a/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_hover_test.dart
@@ -11,9 +11,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisGetHoverIntegrationTest);
 }
 
@@ -62,9 +64,13 @@
    * expected propagated type of the element.
    */
   checkHover(String target, int length, List<String> descriptionRegexps,
-      String kind, List<String> staticTypeRegexps, {bool isLocal: false,
-      bool isCore: false, String docRegexp: null, bool isLiteral: false,
-      List<String> parameterRegexps: null, propagatedType: null}) {
+      String kind, List<String> staticTypeRegexps,
+      {bool isLocal: false,
+      bool isCore: false,
+      String docRegexp: null,
+      bool isLiteral: false,
+      List<String> parameterRegexps: null,
+      propagatedType: null}) {
     int offset = text.indexOf(target);
     return sendAnalysisGetHover(pathname, offset).then((result) {
       expect(result.hovers, hasLength(1));
@@ -141,10 +147,8 @@
     // request is made.  So wait for analysis to finish before testing anything.
     return analysisFinished.then((_) {
       List<Future> tests = [];
-      tests.add(checkHover('topLevelVar;', 11, [
-        'List',
-        'topLevelVar'
-      ], 'top level variable', ['List']));
+      tests.add(checkHover('topLevelVar;', 11, ['List', 'topLevelVar'],
+          'top level variable', ['List']));
       tests.add(checkHover(
           'func(', 4, ['func', 'int', 'param'], 'function', ['int', 'void'],
           docRegexp: 'Documentation for func'));
@@ -157,10 +161,8 @@
       tests.add(checkHover(
           'localVar =', 8, ['num', 'localVar'], 'local variable', ['num'],
           isLocal: true, propagatedType: 'int'));
-      tests.add(checkHover('topLevelVar.length;', 11, [
-        'List',
-        'topLevelVar'
-      ], 'top level variable', ['List']));
+      tests.add(checkHover('topLevelVar.length;', 11, ['List', 'topLevelVar'],
+          'top level variable', ['List']));
       tests.add(checkHover(
           'length;', 6, ['get', 'length', 'int'], 'getter', ['int'],
           isCore: true, docRegexp: '.*'));
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test.dart b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
index b466ff6..884c232 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisHighlightsTest);
 }
 
@@ -70,7 +72,9 @@
 ''';
     writeFile(pathname, text);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.HIGHLIGHTS: [pathname]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.HIGHLIGHTS: [pathname]
+    });
     // Map from highlight type to highlighted text
     Map<HighlightRegionType, Set<String>> highlights;
     onAnalysisHighlights.listen((AnalysisHighlightsParams params) {
@@ -96,21 +100,10 @@
         highlights.remove(type);
       }
       check(HighlightRegionType.ANNOTATION, ['@override']);
-      check(HighlightRegionType.BUILT_IN, [
-        'as',
-        'get',
-        'import',
-        'set',
-        'static',
-        'typedef'
-      ]);
-      check(HighlightRegionType.CLASS, [
-        'Class',
-        'Class2',
-        'Future',
-        'Map',
-        'int'
-      ]);
+      check(HighlightRegionType.BUILT_IN,
+          ['as', 'get', 'import', 'set', 'static', 'typedef']);
+      check(HighlightRegionType.CLASS,
+          ['Class', 'Class2', 'Future', 'Map', 'int']);
       check(HighlightRegionType.COMMENT_BLOCK, ['/* Block comment */']);
       check(HighlightRegionType.COMMENT_DOCUMENTATION,
           ['/**\n * Doc comment\n */']);
@@ -132,10 +125,8 @@
       check(HighlightRegionType.LITERAL_DOUBLE, ['1.0']);
       check(HighlightRegionType.LITERAL_INTEGER, ['2', '42']);
       check(HighlightRegionType.LITERAL_LIST, ['[]']);
-      check(HighlightRegionType.LITERAL_MAP, [
-        '{1.0: [].toList()}',
-        '{2: local}'
-      ]);
+      check(HighlightRegionType.LITERAL_MAP,
+          ['{1.0: [].toList()}', '{2: local}']);
       check(HighlightRegionType.LITERAL_STRING, ["'dart:async'", "'string'"]);
       check(HighlightRegionType.LOCAL_VARIABLE, ['local']);
       check(HighlightRegionType.LOCAL_VARIABLE_DECLARATION, ['local']);
@@ -145,10 +136,8 @@
       check(HighlightRegionType.METHOD_STATIC, ['wait']);
       check(HighlightRegionType.PARAMETER, ['parameter']);
       check(HighlightRegionType.SETTER_DECLARATION, ['setter']);
-      check(HighlightRegionType.TOP_LEVEL_VARIABLE, [
-        'override',
-        'topLevelVariable'
-      ]);
+      check(HighlightRegionType.TOP_LEVEL_VARIABLE,
+          ['override', 'topLevelVariable']);
       check(HighlightRegionType.TYPE_NAME_DYNAMIC, ['dynamic']);
       check(HighlightRegionType.TYPE_PARAMETER, ['TypeParameter']);
       expect(highlights, isEmpty);
diff --git a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
index 71913f0..bc999c0 100644
--- a/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
+++ b/pkg/analysis_server/test/integration/analysis/highlights_test2.dart
@@ -10,9 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisHighlightsTest);
 }
 
@@ -77,7 +79,9 @@
 ''';
     writeFile(pathname, text);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.HIGHLIGHTS: [pathname]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.HIGHLIGHTS: [pathname]
+    });
     // Map from highlight type to highlighted text
     Map<HighlightRegionType, Set<String>> highlights;
     onAnalysisHighlights.listen((AnalysisHighlightsParams params) {
@@ -103,21 +107,10 @@
         highlights.remove(type);
       }
       check(HighlightRegionType.ANNOTATION, ['@override']);
-      check(HighlightRegionType.BUILT_IN, [
-        'as',
-        'get',
-        'import',
-        'set',
-        'static',
-        'typedef'
-      ]);
-      check(HighlightRegionType.CLASS, [
-        'Class',
-        'Class2',
-        'Future',
-        'Map',
-        'int'
-      ]);
+      check(HighlightRegionType.BUILT_IN,
+          ['as', 'get', 'import', 'set', 'static', 'typedef']);
+      check(HighlightRegionType.CLASS,
+          ['Class', 'Class2', 'Future', 'Map', 'int']);
       check(HighlightRegionType.COMMENT_BLOCK, ['/* Block comment */']);
       check(HighlightRegionType.COMMENT_DOCUMENTATION,
           ['/**\n * Doc comment\n */']);
@@ -140,10 +133,8 @@
       check(HighlightRegionType.LITERAL_DOUBLE, ['1.0']);
       check(HighlightRegionType.LITERAL_INTEGER, ['2', '42']);
       check(HighlightRegionType.LITERAL_LIST, ['[]']);
-      check(HighlightRegionType.LITERAL_MAP, [
-        '{1.0: [].toList()}',
-        '{2: local}'
-      ]);
+      check(HighlightRegionType.LITERAL_MAP,
+          ['{1.0: [].toList()}', '{2: local}']);
       check(HighlightRegionType.LITERAL_STRING, ["'dart:async'", "'string'"]);
       check(HighlightRegionType.LOCAL_VARIABLE_DECLARATION, ['local']);
       check(HighlightRegionType.LOCAL_VARIABLE_REFERENCE, ['local']);
diff --git a/pkg/analysis_server/test/integration/analysis/navigation_test.dart b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
index c633811..57c04ce 100644
--- a/pkg/analysis_server/test/integration/analysis/navigation_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/navigation_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisNavigationTest);
 }
 
@@ -54,7 +56,9 @@
 ''';
     writeFile(pathname2, text2);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.NAVIGATION: [pathname1]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.NAVIGATION: [pathname1]
+    });
     List<NavigationRegion> regions;
     List<NavigationTarget> targets;
     List<String> targetFiles;
@@ -101,10 +105,12 @@
       checkLocal('Class<int>', 'Class<TypeParameter>', ElementKind.CLASS);
       checkRemote(
           "'test2.dart';", r'test2.dart$', ElementKind.COMPILATION_UNIT);
-      checkLocal('Class<int>.constructor',
+      checkLocal(
+          'Class<int>.constructor',
           'constructor(); /* constructor declaration */',
           ElementKind.CONSTRUCTOR);
-      checkLocal('constructor(); // usage',
+      checkLocal(
+          'constructor(); // usage',
           'constructor(); /* constructor declaration */',
           ElementKind.CONSTRUCTOR);
       checkLocal('field;', 'field;', ElementKind.FIELD);
diff --git a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
index 5b084ec..a1d25d0 100644
--- a/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/occurrences_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -31,7 +33,9 @@
 ''';
     writeFile(pathname, text);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.OCCURRENCES: [pathname]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.OCCURRENCES: [pathname]
+    });
     List<Occurrences> occurrences;
     onAnalysisOccurrences.listen((AnalysisOccurrencesParams params) {
       expect(params.file, equals(pathname));
diff --git a/pkg/analysis_server/test/integration/analysis/outline_test.dart b/pkg/analysis_server/test/integration/analysis/outline_test.dart
index 1369c3d..a4a7a81 100644
--- a/pkg/analysis_server/test/integration/analysis/outline_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/outline_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -53,7 +55,9 @@
 ''';
     writeFile(pathname, text);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.OUTLINE: [pathname]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.OUTLINE: [pathname]
+    });
     Outline outline;
     onAnalysisOutline.listen((AnalysisOutlineParams params) {
       expect(params.file, equals(pathname));
diff --git a/pkg/analysis_server/test/integration/analysis/overrides_test.dart b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
index 12872c2..a302eef 100644
--- a/pkg/analysis_server/test/integration/analysis/overrides_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/overrides_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -53,7 +55,9 @@
 ''';
     writeFile(pathname, text);
     standardAnalysisSetup();
-    sendAnalysisSetSubscriptions({AnalysisService.OVERRIDES: [pathname]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.OVERRIDES: [pathname]
+    });
     List<Override> overrides;
     onAnalysisOverrides.listen((AnalysisOverridesParams params) {
       expect(params.file, equals(pathname));
diff --git a/pkg/analysis_server/test/integration/analysis/package_root_test.dart b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
index bafba77..84f3fe6 100644
--- a/pkg/analysis_server/test/integration/analysis/package_root_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/package_root_test.dart
@@ -9,9 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -39,7 +41,9 @@
     writeFile(mainPath, mainText);
     String normalizedFooBarPath = writeFile(fooBarPath, fooBarText);
     sendServerSetSubscriptions([ServerService.STATUS]);
-    sendAnalysisSetSubscriptions({AnalysisService.NAVIGATION: [mainPath]});
+    sendAnalysisSetSubscriptions({
+      AnalysisService.NAVIGATION: [mainPath]
+    });
     List<NavigationRegion> navigationRegions;
     List<NavigationTarget> navigationTargets;
     List<String> navigationTargetFiles;
diff --git a/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart b/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
index 806b82c..443bab1 100644
--- a/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/reanalyze_concurrent_test.dart
@@ -14,9 +14,11 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
index 79aee38..f23101f 100644
--- a/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/reanalyze_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/analysis/test_all.dart b/pkg/analysis_server/test/integration/analysis/test_all.dart
index 8b820e0..54fdd0a 100644
--- a/pkg/analysis_server/test/integration/analysis/test_all.dart
+++ b/pkg/analysis_server/test/integration/analysis/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'error_test.dart' as error_test;
 import 'get_errors_after_analysis_test.dart' as get_errors_after_analysis_test;
 import 'get_errors_before_analysis_test.dart'
@@ -27,7 +28,7 @@
  * Utility for manually running all integration tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('analysis', () {
     error_test.main();
     get_errors_after_analysis_test.main();
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
index 6bf7cd3..a0568be 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_list_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/analysis/update_content_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
index 18da8a6..9936693 100644
--- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/asynchrony_test.dart b/pkg/analysis_server/test/integration/asynchrony_test.dart
index 79852cb..4f3f5cf 100644
--- a/pkg/analysis_server/test/integration/asynchrony_test.dart
+++ b/pkg/analysis_server/test/integration/asynchrony_test.dart
@@ -9,9 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
 //  defineReflectiveTests(AsynchronyIntegrationTest);
 }
 
@@ -58,7 +60,6 @@
     // received them all.  If the server is blocked waiting for us to read
     // its responses, the flush will never complete.
     return server.flushCommands().then((_) {
-
       // Begin processing responses from the server.
       server.listenToOutput((String event, params) {
         // The only expected notification is server.connected.
diff --git a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
index 12687e4..bf0f4d2 100644
--- a/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
+++ b/pkg/analysis_server/test/integration/completion/get_suggestions_test.dart
@@ -8,9 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -32,7 +34,9 @@
   }
 
   test_getSuggestions() async {
-    setTestSource('test.dart', r'''
+    setTestSource(
+        'test.dart',
+        r'''
 String test = '';
 main() {
   test.^
@@ -54,7 +58,9 @@
   }
 
   test_getSuggestions_onlyOverlay() async {
-    setTestSource('test.dart', r'''
+    setTestSource(
+        'test.dart',
+        r'''
 String test = '';
 main() {
   test.^
@@ -78,7 +84,9 @@
   }
 
   test_getSuggestions_onlyOverlay_noWait() async {
-    setTestSource('test.dart', r'''
+    setTestSource(
+        'test.dart',
+        r'''
 String test = '';
 main() {
   test.^
diff --git a/pkg/analysis_server/test/integration/completion/test_all.dart b/pkg/analysis_server/test/integration/completion/test_all.dart
index dc3e046..aae07f3 100644
--- a/pkg/analysis_server/test/integration/completion/test_all.dart
+++ b/pkg/analysis_server/test/integration/completion/test_all.dart
@@ -6,13 +6,14 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'get_suggestions_test.dart' as get_suggestions_test;
 
 /**
  * Utility for manually running all integration tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('completion', () {
     get_suggestions_test.main();
   });
diff --git a/pkg/analysis_server/test/integration/protocol_matchers.dart b/pkg/analysis_server/test/integration/protocol_matchers.dart
index 24cc21e..349e3f2 100644
--- a/pkg/analysis_server/test/integration/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/protocol_matchers.dart
@@ -1079,6 +1079,7 @@
  *   "enableDeferredLoading": optional bool
  *   "enableEnums": optional bool
  *   "enableNullAwareOperators": optional bool
+ *   "enableSuperMixins": optional bool
  *   "generateDart2jsHints": optional bool
  *   "generateHints": optional bool
  *   "generateLints": optional bool
@@ -1090,6 +1091,7 @@
     "enableDeferredLoading": isBool,
     "enableEnums": isBool,
     "enableNullAwareOperators": isBool,
+    "enableSuperMixins": isBool,
     "generateDart2jsHints": isBool,
     "generateHints": isBool,
     "generateLints": isBool
diff --git a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
index fdab854..94a57aa 100644
--- a/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/integration/search/get_type_hierarchy_test.dart
@@ -10,9 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/search/test_all.dart b/pkg/analysis_server/test/integration/search/test_all.dart
index e3c4459..7c58783 100644
--- a/pkg/analysis_server/test/integration/search/test_all.dart
+++ b/pkg/analysis_server/test/integration/search/test_all.dart
@@ -6,13 +6,14 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'get_type_hierarchy_test.dart' as get_type_hierarchy_test;
 
 /**
  * Utility for manually running all integration tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('search', () {
     get_type_hierarchy_test.main();
   });
diff --git a/pkg/analysis_server/test/integration/server/get_version_test.dart b/pkg/analysis_server/test/integration/server/get_version_test.dart
index 7f7b529..d1ba458 100644
--- a/pkg/analysis_server/test/integration/server/get_version_test.dart
+++ b/pkg/analysis_server/test/integration/server/get_version_test.dart
@@ -6,9 +6,11 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
index bcf15db..af778cf 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart
@@ -7,9 +7,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -18,9 +20,9 @@
   test_setSubscriptions_invalidService() {
     // TODO(paulberry): verify that if an invalid service is specified, the
     // current subscriptions are unchanged.
-    return server
-        .send("server.setSubscriptions", {'subscriptions': ['bogus']})
-        .then((_) {
+    return server.send("server.setSubscriptions", {
+      'subscriptions': ['bogus']
+    }).then((_) {
       fail('setSubscriptions should have produced an error');
     }, onError: (error) {
       // The expected error occurred.
diff --git a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
index 517445b..88df52e 100644
--- a/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
+++ b/pkg/analysis_server/test/integration/server/set_subscriptions_test.dart
@@ -10,9 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -31,7 +33,9 @@
     });
     return sendServerSetSubscriptions([]).then((_) {
       String pathname = sourcePath('test.dart');
-      writeFile(pathname, '''
+      writeFile(
+          pathname,
+          '''
 main() {
   var x;
 }''');
@@ -42,7 +46,9 @@
         expect(statusReceived, isFalse);
         return sendServerSetSubscriptions([ServerService.STATUS]).then((_) {
           // Tickle test.dart just in case analysis has already completed.
-          writeFile(pathname, '''
+          writeFile(
+              pathname,
+              '''
 main() {
   var y;
 }''');
diff --git a/pkg/analysis_server/test/integration/server/shutdown_test.dart b/pkg/analysis_server/test/integration/server/shutdown_test.dart
index 7a5de26..7ba89c7 100644
--- a/pkg/analysis_server/test/integration/server/shutdown_test.dart
+++ b/pkg/analysis_server/test/integration/server/shutdown_test.dart
@@ -9,9 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
diff --git a/pkg/analysis_server/test/integration/server/status_test.dart b/pkg/analysis_server/test/integration/server/status_test.dart
index c386b88..06a1739 100644
--- a/pkg/analysis_server/test/integration/server/status_test.dart
+++ b/pkg/analysis_server/test/integration/server/status_test.dart
@@ -10,9 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import '../integration_tests.dart';
 
 main() {
+  initializeTestEnvironment();
   defineReflectiveTests(Test);
 }
 
@@ -35,7 +37,9 @@
         }
       }
     });
-    writeFile(sourcePath('test.dart'), '''
+    writeFile(
+        sourcePath('test.dart'),
+        '''
 main() {
   var x;
 }''');
diff --git a/pkg/analysis_server/test/integration/server/test_all.dart b/pkg/analysis_server/test/integration/server/test_all.dart
index 499814e..2b81672 100644
--- a/pkg/analysis_server/test/integration/server/test_all.dart
+++ b/pkg/analysis_server/test/integration/server/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'get_version_test.dart' as get_version_test;
 import 'set_subscriptions_invalid_service_test.dart'
     as set_subscriptions_invalid_service_test;
@@ -17,7 +18,7 @@
  * Utility for manually running all integration tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('server', () {
     get_version_test.main();
     set_subscriptions_test.main();
diff --git a/pkg/analysis_server/test/integration/test_all.dart b/pkg/analysis_server/test/integration/test_all.dart
index 54d3fb2..dea62d4 100644
--- a/pkg/analysis_server/test/integration/test_all.dart
+++ b/pkg/analysis_server/test/integration/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'analysis/test_all.dart' as analysis_test_all;
 import 'asynchrony_test.dart' as asynchrony_test;
 import 'completion/test_all.dart' as completion_test_all;
@@ -16,7 +17,7 @@
  * Utility for manually running all integration tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('analysis_server_integration', () {
     analysis_test_all.main();
     asynchrony_test.main();
diff --git a/pkg/analysis_server/test/mocks.dart b/pkg/analysis_server/test/mocks.dart
index 3358b47..1ce0d9f 100644
--- a/pkg/analysis_server/test/mocks.dart
+++ b/pkg/analysis_server/test/mocks.dart
@@ -58,7 +58,7 @@
  * times. By default, this should pump the event queue enough times to allow
  * any code to run, as long as it's not waiting on some external event.
  */
-Future pumpEventQueue([int times = 500]) {
+Future pumpEventQueue([int times = 5000]) {
   if (times == 0) return new Future.value();
   // We use a delayed future to allow microtask events to finish. The
   // Future.value or Future() constructors use scheduleMicrotask themselves and
@@ -229,8 +229,8 @@
   @override
   void listen(void onRequest(Request request),
       {Function onError, void onDone()}) {
-    requestController.stream.listen(onRequest,
-        onError: onError, onDone: onDone);
+    requestController.stream
+        .listen(onRequest, onError: onError, onDone: onDone);
   }
 
   @override
@@ -330,8 +330,8 @@
       controller.close().then((_) => twin.controller.close());
 
   StreamSubscription<T> listen(void onData(T event),
-      {Function onError, void onDone(), bool cancelOnError}) => stream.listen(
-          onData,
+          {Function onError, void onDone(), bool cancelOnError}) =>
+      stream.listen(onData,
           onError: onError, onDone: onDone, cancelOnError: cancelOnError);
 
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
diff --git a/pkg/analysis_server/test/operation/operation_queue_test.dart b/pkg/analysis_server/test/operation/operation_queue_test.dart
index 47f0bcf..0be1a73 100644
--- a/pkg/analysis_server/test/operation/operation_queue_test.dart
+++ b/pkg/analysis_server/test/operation/operation_queue_test.dart
@@ -18,9 +18,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ServerOperationQueueTest);
 }
 
diff --git a/pkg/analysis_server/test/operation/operation_test.dart b/pkg/analysis_server/test/operation/operation_test.dart
index f9639fe..1972129 100644
--- a/pkg/analysis_server/test/operation/operation_test.dart
+++ b/pkg/analysis_server/test/operation/operation_test.dart
@@ -7,8 +7,10 @@
 import 'package:analysis_server/src/operation/operation.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
 
   group('ServerOperationPriority', () {
     test('toString', () {
diff --git a/pkg/analysis_server/test/operation/test_all.dart b/pkg/analysis_server/test/operation/test_all.dart
index ca3c425..4296f39 100644
--- a/pkg/analysis_server/test/operation/test_all.dart
+++ b/pkg/analysis_server/test/operation/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'operation_queue_test.dart' as operation_queue_test;
 import 'operation_test.dart' as operation_test;
 
@@ -13,7 +14,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('operation', () {
     operation_queue_test.main();
     operation_test.main();
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 6c9fedb..7abbe3f 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -19,9 +19,10 @@
 
 import 'abstract_context.dart';
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AnalysisErrorTest);
   defineReflectiveTests(ElementTest);
   defineReflectiveTests(ElementKindTest);
@@ -193,7 +194,9 @@
   }
 
   void test_fromElement_CLASS() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 @deprecated
 abstract class _A {}
 class B<K, V> {}''');
@@ -214,9 +217,11 @@
         expect(location.startColumn, 16);
       }
       expect(element.parameters, isNull);
-      expect(element.flags, Element.FLAG_ABSTRACT |
-          Element.FLAG_DEPRECATED |
-          Element.FLAG_PRIVATE);
+      expect(
+          element.flags,
+          Element.FLAG_ABSTRACT |
+              Element.FLAG_DEPRECATED |
+              Element.FLAG_PRIVATE);
     }
     {
       engine.ClassElement engineElement = findElementInUnit(unit, 'B');
@@ -230,7 +235,9 @@
   }
 
   void test_fromElement_CONSTRUCTOR() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 class A {
   const A.myConstructor(int a, [String b]);
 }''');
@@ -268,7 +275,9 @@
   }
 
   void test_fromElement_ENUM() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 @deprecated
 enum _E1 { one, two }
 enum E2 { three, four }''');
@@ -290,7 +299,8 @@
         expect(location.startColumn, 6);
       }
       expect(element.parameters, isNull);
-      expect(element.flags,
+      expect(
+          element.flags,
           (engineElement.isDeprecated ? Element.FLAG_DEPRECATED : 0) |
               Element.FLAG_PRIVATE);
     }
@@ -306,7 +316,9 @@
   }
 
   void test_fromElement_ENUM_CONSTANT() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 @deprecated
 enum _E1 { one, two }
 enum E2 { three, four }''');
@@ -330,7 +342,8 @@
       // TODO(danrubel) determine why enum constant is not marked as deprecated
       //engine.ClassElement classElement = engineElement.enclosingElement;
       //expect(classElement.isDeprecated, isTrue);
-      expect(element.flags,
+      expect(
+          element.flags,
           // Element.FLAG_DEPRECATED |
           Element.FLAG_CONST | Element.FLAG_STATIC);
     }
@@ -391,7 +404,9 @@
   }
 
   void test_fromElement_FIELD() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 class A {
   static const myField = 42;
 }''');
@@ -415,7 +430,9 @@
   }
 
   void test_fromElement_FUNCTION_TYPE_ALIAS() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 typedef int F<T>(String x);
 ''');
     engine.CompilationUnit unit = resolveLibraryUnit(source);
@@ -440,7 +457,9 @@
   }
 
   void test_fromElement_GETTER() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 class A {
   String get myGetter => 42;
 }''');
@@ -465,7 +484,9 @@
   }
 
   void test_fromElement_LABEL() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 main() {
 myLabel:
   while (true) {
@@ -492,9 +513,11 @@
   }
 
   void test_fromElement_METHOD() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 class A {
-  static List<String> myMethod(int a, {String b}) {
+  static List<String> myMethod(int a, {String b, int c}) {
     return null;
   }
 }''');
@@ -512,13 +535,15 @@
       expect(location.startLine, 2);
       expect(location.startColumn, 23);
     }
-    expect(element.parameters, '(int a, {String b})');
+    expect(element.parameters, '(int a, {String b, int c})');
     expect(element.returnType, 'List<String>');
     expect(element.flags, Element.FLAG_STATIC);
   }
 
   void test_fromElement_SETTER() {
-    engine.Source source = addSource('/test.dart', '''
+    engine.Source source = addSource(
+        '/test.dart',
+        '''
 class A {
   set mySetter(String x) {}
 }''');
@@ -560,8 +585,8 @@
   }
 
   void test_ElementKind() {
-    new EnumTester<engine.ElementKind, ElementKind>().run(
-        newElementKind_fromEngine, exceptions: {
+    new EnumTester<engine.ElementKind, ElementKind>()
+        .run(newElementKind_fromEngine, exceptions: {
       // TODO(paulberry): do any of the exceptions below constitute bugs?
       engine.ElementKind.DYNAMIC: ElementKind.UNKNOWN,
       engine.ElementKind.EMBEDDED_HTML_SCRIPT: ElementKind.UNKNOWN,
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart
index ddd1b35..16146ef 100644
--- a/pkg/analysis_server/test/protocol_test.dart
+++ b/pkg/analysis_server/test/protocol_test.dart
@@ -11,8 +11,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import 'utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(NotificationTest);
   defineReflectiveTests(RequestTest);
   defineReflectiveTests(RequestErrorTest);
@@ -77,7 +79,11 @@
     expect(notification.event, equals('foo'));
     expect(notification.toJson()['params'], equals({'x': 'y'}));
     expect(
-        notification.toJson(), equals({'event': 'foo', 'params': {'x': 'y'}}));
+        notification.toJson(),
+        equals({
+          'event': 'foo',
+          'params': {'x': 'y'}
+        }));
   }
 }
 
@@ -108,12 +114,10 @@
   void test_toJson() {
     var trace = 'a stack trace\r\nbar';
     RequestError error = new RequestError(
-        RequestErrorCode.UNKNOWN_REQUEST, 'msg', stackTrace: trace);
-    expect(error.toJson(), {
-      CODE: 'UNKNOWN_REQUEST',
-      MESSAGE: 'msg',
-      STACK_TRACE: trace
-    });
+        RequestErrorCode.UNKNOWN_REQUEST, 'msg',
+        stackTrace: trace);
+    expect(error.toJson(),
+        {CODE: 'UNKNOWN_REQUEST', MESSAGE: 'msg', STACK_TRACE: trace});
   }
 }
 
@@ -184,11 +188,13 @@
 
   void test_toJson_withParams() {
     Request request = new Request('one', 'aMethod', {'foo': 'bar'});
-    expect(request.toJson(), equals({
-      Request.ID: 'one',
-      Request.METHOD: 'aMethod',
-      Request.PARAMS: {'foo': 'bar'}
-    }));
+    expect(
+        request.toJson(),
+        equals({
+          Request.ID: 'one',
+          Request.METHOD: 'aMethod',
+          Request.PARAMS: {'foo': 'bar'}
+        }));
   }
 }
 
@@ -198,33 +204,45 @@
     Response response = new Response.invalidRequestFormat();
     expect(response.id, equals(''));
     expect(response.error, isNotNull);
-    expect(response.toJson(), equals({
-      Response.ID: '',
-      Response.ERROR: {'code': 'INVALID_REQUEST', 'message': 'Invalid request'}
-    }));
+    expect(
+        response.toJson(),
+        equals({
+          Response.ID: '',
+          Response.ERROR: {
+            'code': 'INVALID_REQUEST',
+            'message': 'Invalid request'
+          }
+        }));
   }
 
   void test_create_unanalyzedPriorityFiles() {
     Response response = new Response.unanalyzedPriorityFiles('0', 'file list');
     expect(response.id, equals('0'));
     expect(response.error, isNotNull);
-    expect(response.toJson(), equals({
-      Response.ID: '0',
-      Response.ERROR: {
-        'code': 'UNANALYZED_PRIORITY_FILES',
-        'message': "Unanalyzed files cannot be a priority: 'file list'"
-      }
-    }));
+    expect(
+        response.toJson(),
+        equals({
+          Response.ID: '0',
+          Response.ERROR: {
+            'code': 'UNANALYZED_PRIORITY_FILES',
+            'message': "Unanalyzed files cannot be a priority: 'file list'"
+          }
+        }));
   }
 
   void test_create_unknownRequest() {
     Response response = new Response.unknownRequest(new Request('0', ''));
     expect(response.id, equals('0'));
     expect(response.error, isNotNull);
-    expect(response.toJson(), equals({
-      Response.ID: '0',
-      Response.ERROR: {'code': 'UNKNOWN_REQUEST', 'message': 'Unknown request'}
-    }));
+    expect(
+        response.toJson(),
+        equals({
+          Response.ID: '0',
+          Response.ERROR: {
+            'code': 'UNKNOWN_REQUEST',
+            'message': 'Unknown request'
+          }
+        }));
   }
 
   void test_fromJson() {
diff --git a/pkg/analysis_server/test/search/element_references_test.dart b/pkg/analysis_server/test/search/element_references_test.dart
index dce6b8c..1c74865 100644
--- a/pkg/analysis_server/test/search/element_references_test.dart
+++ b/pkg/analysis_server/test/search/element_references_test.dart
@@ -11,10 +11,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'abstract_search_domain.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ElementReferencesTest);
   defineReflectiveTests(_NoSearchEngine);
 }
@@ -453,7 +454,9 @@
 ''');
     await findElementReferences('A {}', false);
     assertHasResult(SearchResultKind.REFERENCE, 'A a = null;');
-    expect(getPathString(result.path), '''
+    expect(
+        getPathString(result.path),
+        '''
 LOCAL_VARIABLE a
 CONSTRUCTOR named
 CLASS B
@@ -473,7 +476,9 @@
 ''');
     await findElementReferences('A {}', false);
     assertHasResult(SearchResultKind.REFERENCE, 'A a = null;');
-    expect(getPathString(result.path), '''
+    expect(
+        getPathString(result.path),
+        '''
 LOCAL_VARIABLE a
 CONSTRUCTOR 
 CLASS B
@@ -491,7 +496,9 @@
 ''');
     await findElementReferences('A {}', false);
     assertHasResult(SearchResultKind.REFERENCE, 'A a = null;');
-    expect(getPathString(result.path), '''
+    expect(
+        getPathString(result.path),
+        '''
 LOCAL_VARIABLE a
 FUNCTION main
 COMPILATION_UNIT test.dart
diff --git a/pkg/analysis_server/test/search/member_declarations_test.dart b/pkg/analysis_server/test/search/member_declarations_test.dart
index 849bb20..2b91238 100644
--- a/pkg/analysis_server/test/search/member_declarations_test.dart
+++ b/pkg/analysis_server/test/search/member_declarations_test.dart
@@ -10,10 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'abstract_search_domain.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(MemberDeclarationsTest);
 }
 
diff --git a/pkg/analysis_server/test/search/member_references_test.dart b/pkg/analysis_server/test/search/member_references_test.dart
index 79f159d..40a998f 100644
--- a/pkg/analysis_server/test/search/member_references_test.dart
+++ b/pkg/analysis_server/test/search/member_references_test.dart
@@ -10,10 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'abstract_search_domain.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(MemberReferencesTest);
 }
 
diff --git a/pkg/analysis_server/test/search/search_result_test.dart b/pkg/analysis_server/test/search/search_result_test.dart
index 1b6f918..2f3ef07 100644
--- a/pkg/analysis_server/test/search/search_result_test.dart
+++ b/pkg/analysis_server/test/search/search_result_test.dart
@@ -9,8 +9,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(SearchResultKindTest);
 }
 
diff --git a/pkg/analysis_server/test/search/test_all.dart b/pkg/analysis_server/test/search/test_all.dart
index 9818ebb..fc5de31 100644
--- a/pkg/analysis_server/test/search/test_all.dart
+++ b/pkg/analysis_server/test/search/test_all.dart
@@ -5,6 +5,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'element_references_test.dart' as element_references_test;
 import 'member_declarations_test.dart' as member_declarations;
 import 'member_references_test.dart' as member_references_test;
@@ -16,7 +17,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('search', () {
     element_references_test.main();
     member_declarations.main();
diff --git a/pkg/analysis_server/test/search/top_level_declarations_test.dart b/pkg/analysis_server/test/search/top_level_declarations_test.dart
index 96ef6c6..97e14c0 100644
--- a/pkg/analysis_server/test/search/top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/search/top_level_declarations_test.dart
@@ -10,10 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'abstract_search_domain.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(TopLevelDeclarationsTest);
 }
 
diff --git a/pkg/analysis_server/test/search/type_hierarchy_test.dart b/pkg/analysis_server/test/search/type_hierarchy_test.dart
index ac45e26..3dda479 100644
--- a/pkg/analysis_server/test/search/type_hierarchy_test.dart
+++ b/pkg/analysis_server/test/search/type_hierarchy_test.dart
@@ -14,9 +14,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../analysis_abstract.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(GetTypeHierarchyTest);
 }
 
@@ -109,13 +110,16 @@
   test_class_extends_fileAndPackageUris() async {
     // prepare packages
     String pkgFile = '/packages/pkgA/libA.dart';
-    resourceProvider.newFile(pkgFile, '''
+    resourceProvider.newFile(
+        pkgFile,
+        '''
 library lib_a;
 class A {}
 class B extends A {}
 ''');
-    packageMapProvider.packageMap['pkgA'] =
-        [resourceProvider.getResource('/packages/pkgA')];
+    packageMapProvider.packageMap['pkgA'] = [
+      resourceProvider.getResource('/packages/pkgA')
+    ];
     // reference the package from a project
     addTestFile('''
 import 'package:pkgA/libA.dart';
@@ -797,8 +801,8 @@
     Request request = _createGetTypeHierarchyRequest(search);
     Response response = await serverChannel.sendRequest(request);
     expect(serverErrors, isEmpty);
-    return new SearchGetTypeHierarchyResult.fromResponse(
-        response).hierarchyItems;
+    return new SearchGetTypeHierarchyResult.fromResponse(response)
+        .hierarchyItems;
   }
 
   List _toJson(List<TypeHierarchyItem> items) {
diff --git a/pkg/analysis_server/test/server_options_test.dart b/pkg/analysis_server/test/server_options_test.dart
index f3a3790..4a32152 100644
--- a/pkg/analysis_server/test/server_options_test.dart
+++ b/pkg/analysis_server/test/server_options_test.dart
@@ -10,8 +10,10 @@
 import 'package:analysis_server/src/server_options.dart';
 import 'package:unittest/unittest.dart';
 
+import 'utils.dart';
+
 void main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
 
   group('server_options', () {
     test('basic - []', () {
diff --git a/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
index 5218204..0f391e8 100644
--- a/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/arglist_contributor_test.dart
@@ -10,10 +10,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ArgListContributorTest);
 }
 
@@ -95,6 +96,26 @@
     });
   }
 
+  test_ArgumentList_imported_constructor_named_param() {
+    //
+    addSource('/libA.dart', 'library libA; class A{A({int one}){}}');
+    addTestSource('import "/libA.dart"; main() { new A(^);}');
+    computeFast();
+    return computeFull((bool result) {
+      assertSuggestArguments(namedArguments: ['one']);
+    });
+  }
+
+  test_ArgumentList_imported_constructor_named_param2() {
+    //
+    addSource('/libA.dart', 'library libA; class A{A.foo({int one}){}}');
+    addTestSource('import "/libA.dart"; main() { new A.foo(^);}');
+    computeFast();
+    return computeFull((bool result) {
+      assertSuggestArguments(namedArguments: ['one']);
+    });
+  }
+
   test_ArgumentList_imported_function_0() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     addSource('/libA.dart', '''
@@ -275,6 +296,28 @@
     });
   }
 
+  test_ArgumentList_local_constructor_named_param() {
+    //
+    addTestSource('''
+class A { A({int one, String two: 'defaultValue'}) { } }
+main() { new A(^);}''');
+    computeFast();
+    return computeFull((bool result) {
+      assertSuggestArguments(namedArguments: ['one', 'two']);
+    });
+  }
+
+  test_ArgumentList_local_constructor_named_param2() {
+    //
+    addTestSource('''
+class A { A.foo({int one, String two: 'defaultValue'}) { } }
+main() { new A.foo(^);}''');
+    computeFast();
+    return computeFull((bool result) {
+      assertSuggestArguments(namedArguments: ['one', 'two']);
+    });
+  }
+
   test_ArgumentList_local_function_1() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
     addTestSource('''
diff --git a/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart b/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
index 60e402c..db6a1d2 100644
--- a/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/combinator_contributor_test.dart
@@ -8,12 +8,12 @@
 import 'package:analysis_server/src/services/completion/combinator_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(CombinatorContributorTest);
 }
 
@@ -40,17 +40,23 @@
 
   test_Combinator_hide() {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       library libAB;
       part '/partAB.dart';
       class A { }
       class B { }''');
-    addSource('/partAB.dart', '''
+    addSource(
+        '/partAB.dart',
+        '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       class C { }
       class D { }''');
     addTestSource('''
@@ -81,19 +87,25 @@
 
   test_Combinator_show() {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       library libAB;
       part '/partAB.dart';
       class A { }
       class B { }''');
-    addSource('/partAB.dart', '''
+    addSource(
+        '/partAB.dart',
+        '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       typedef PB2 F2(int blat);
       class Clz = Object with Object;
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       class C { }
       class D { }''');
     addTestSource('''
diff --git a/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart b/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
index 9a46aac..60c0fe6 100644
--- a/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/common_usage_computer_test.dart
@@ -23,9 +23,10 @@
 
 import '../../analysis_abstract.dart';
 import '../../mocks.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(CommonUsageComputerTest);
 }
 
@@ -48,7 +49,8 @@
   }
 
   void assertHasResult(CompletionSuggestionKind kind, String completion,
-      [int relevance = DART_RELEVANCE_DEFAULT, bool isDeprecated = false,
+      [int relevance = DART_RELEVANCE_DEFAULT,
+      bool isDeprecated = false,
       bool isPotential = false]) {
     var cs;
     suggestions.forEach((s) {
@@ -99,9 +101,13 @@
     ContextSourcePair contextSource = server.getContextSourcePair(params.file);
     AnalysisContext context = contextSource.context;
     Source source = contextSource.source;
-    DartCompletionManager completionManager = new DartCompletionManager(context,
-        server.searchEngine, source, new DartCompletionCache(context, source),
-        null, new CommonUsageComputer(selectorRelevance));
+    DartCompletionManager completionManager = new DartCompletionManager(
+        context,
+        server.searchEngine,
+        source,
+        new DartCompletionCache(context, source),
+        null,
+        new CommonUsageComputer(selectorRelevance));
 
     Response response =
         domainHandler.processRequest(request, completionManager);
@@ -137,7 +143,9 @@
   test_ConstructorName() async {
     // SimpleIdentifier  ConstructorName  InstanceCreationExpression
     addTestFile('import "dart:async"; class A {x() {new Future.^}}');
-    await getSuggestions({'dart.async.Future': ['value', 'wait']});
+    await getSuggestions({
+      'dart.async.Future': ['value', 'wait']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 'delayed');
@@ -151,7 +159,9 @@
   test_PrefixedIdentifier_field() async {
     // SimpleIdentifier  PrefixedIdentifeir  ExpressionStatement
     addTestFile('class A {static int s1; static int s2; x() {A.^}}');
-    await getSuggestions({'.A': ['s2']});
+    await getSuggestions({
+      '.A': ['s2']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 's1');
@@ -165,7 +175,9 @@
   test_PrefixedIdentifier_getter() async {
     // SimpleIdentifier  PrefixedIdentifeir  ExpressionStatement
     addTestFile('class A {int get g1 => 1; int get g2 => 2; x() {new A().^}}');
-    await getSuggestions({'.A': ['g2']});
+    await getSuggestions({
+      '.A': ['g2']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 'g1');
@@ -179,7 +191,9 @@
   test_PrefixedIdentifier_setter() async {
     // SimpleIdentifier  PrefixedIdentifeir  ExpressionStatement
     addTestFile('class A {set s1(v) {}; set s2(v) {}; x() {new A().^}}');
-    await getSuggestions({'.A': ['s2']});
+    await getSuggestions({
+      '.A': ['s2']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 's1');
@@ -193,7 +207,9 @@
   test_PrefixedIdentifier_static_method() async {
     // SimpleIdentifier  PrefixedIdentifeir  ExpressionStatement
     addTestFile('import "dart:async"; class A {x() {Future.^}}');
-    await getSuggestions({'dart.async.Future': ['value', 'wait']});
+    await getSuggestions({
+      'dart.async.Future': ['value', 'wait']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 'wait',
@@ -206,7 +222,9 @@
   test_PropertyAccess() async {
     // SimpleIdentifier  PropertyAccess  ExpressionStatement
     addTestFile('import "dart:math"; class A {x() {new Random().^}}');
-    await getSuggestions({'dart.math.Random': ['nextInt', 'nextDouble']});
+    await getSuggestions({
+      'dart.math.Random': ['nextInt', 'nextDouble']
+    });
     expect(replacementOffset, equals(completionOffset));
     expect(replacementLength, equals(0));
     assertHasResult(CompletionSuggestionKind.INVOCATION, 'nextBool');
diff --git a/pkg/analysis_server/test/services/completion/completion_computer_test.dart b/pkg/analysis_server/test/services/completion/completion_computer_test.dart
index e69eaba..0cdeff9 100644
--- a/pkg/analysis_server/test/services/completion/completion_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_computer_test.dart
@@ -23,9 +23,10 @@
 
 import '../../abstract_single_unit.dart';
 import '../../operation/operation_queue_test.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(DartCompletionManagerTest);
 }
 
@@ -89,11 +90,12 @@
     CompletionRequest completionRequest =
         new CompletionRequestImpl(server, context, source, 0);
     manager.results(completionRequest).listen((CompletionResult r) {
+      bool isLast = r is CompletionResultImpl ? r.isLast : true;
       switch (++count) {
         case 1:
           contributor1.assertCalls(context, source, 0, searchEngine);
           contributor2.assertCalls(context, source, 0, searchEngine);
-          expect(r.isLast, isFalse);
+          expect(isLast, isFalse);
           expect(r.suggestions, hasLength(1));
           expect(r.suggestions, contains(suggestion1));
           resolveLibrary();
@@ -101,7 +103,7 @@
         case 2:
           contributor1.assertFull(0);
           contributor2.assertFull(1);
-          expect(r.isLast, isTrue);
+          expect(isLast, isTrue);
           expect(r.suggestions, hasLength(2));
           expect(r.suggestions, contains(suggestion1));
           expect(r.suggestions, contains(suggestion2));
@@ -128,11 +130,12 @@
     CompletionRequest completionRequest =
         new CompletionRequestImpl(server, context, source, 0);
     manager.results(completionRequest).listen((CompletionResult r) {
+      bool isLast = r is CompletionResultImpl ? r.isLast : true;
       switch (++count) {
         case 1:
           contributor1.assertCalls(context, source, 0, searchEngine);
           contributor2.assertCalls(context, source, 0, searchEngine);
-          expect(r.isLast, isTrue);
+          expect(isLast, isTrue);
           expect(r.suggestions, hasLength(2));
           expect(r.suggestions, contains(suggestion1));
           expect(r.suggestions, contains(suggestion2));
diff --git a/pkg/analysis_server/test/services/completion/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/completion_manager_test.dart
index 9efd78c..eab5223 100644
--- a/pkg/analysis_server/test/services/completion/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_manager_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(CompletionManagerTest);
 }
 
diff --git a/pkg/analysis_server/test/services/completion/completion_target_test.dart b/pkg/analysis_server/test/services/completion/completion_target_test.dart
index 072f97c..35bd5da 100644
--- a/pkg/analysis_server/test/services/completion/completion_target_test.dart
+++ b/pkg/analysis_server/test/services/completion/completion_target_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(CompletionTargetTest);
 }
 
@@ -138,6 +139,16 @@
     assertTarget('}', '{}');
   }
 
+  test_Block_keyword() {
+    addTestSource('class C { static C get instance => null; } main() {C.in^}');
+    assertTarget('in', 'C.in');
+  }
+
+  test_Block_keyword2() {
+    addTestSource('class C { static C get instance => null; } main() {C.i^n}');
+    assertTarget('in', 'C.in');
+  }
+
   test_FormalParameter_partialType() {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
     addTestSource('foo(b.^ f) { }');
diff --git a/pkg/analysis_server/test/services/completion/completion_test_util.dart b/pkg/analysis_server/test/services/completion/completion_test_util.dart
index 6bcbce1..2e357d6 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -95,7 +95,8 @@
       return;
     }
     CompletionSuggestion suggestion = request.suggestions.firstWhere(
-        (CompletionSuggestion cs) => cs.kind == kind, orElse: () => null);
+        (CompletionSuggestion cs) => cs.kind == kind,
+        orElse: () => null);
     if (suggestion != null) {
       failedCompletion('did not expect completion: $completion\n  $suggestion');
     }
@@ -113,9 +114,13 @@
 
   CompletionSuggestion assertSuggest(String completion,
       {CompletionSuggestionKind csKind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT, String importUri,
-      protocol.ElementKind elemKind: null, bool isDeprecated: false,
-      bool isPotential: false, String elemFile, int elemOffset}) {
+      int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
+      protocol.ElementKind elemKind: null,
+      bool isDeprecated: false,
+      bool isPotential: false,
+      String elemFile,
+      int elemOffset}) {
     CompletionSuggestion cs =
         getSuggest(completion: completion, csKind: csKind, elemKind: elemKind);
     if (cs == null) {
@@ -151,9 +156,12 @@
   }
 
   CompletionSuggestion assertSuggestClass(String name,
-      {int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      bool isDeprecated: false, String elemFile, int elemOffset}) {
+      bool isDeprecated: false,
+      String elemFile,
+      int elemOffset}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
@@ -187,7 +195,8 @@
   }
 
   CompletionSuggestion assertSuggestConstructor(String name,
-      {int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       int elemOffset}) {
     CompletionSuggestion cs = assertSuggest(name,
         relevance: relevance, importUri: importUri, elemOffset: elemOffset);
@@ -200,7 +209,8 @@
   }
 
   CompletionSuggestion assertSuggestField(String name, String type,
-      {int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
@@ -224,7 +234,8 @@
 
   CompletionSuggestion assertSuggestFunction(String name, String returnType,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      bool deprecated: false, int relevance: DART_RELEVANCE_DEFAULT,
+      bool deprecated: false,
+      int relevance: DART_RELEVANCE_DEFAULT,
       String importUri}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
@@ -276,7 +287,8 @@
   }
 
   CompletionSuggestion assertSuggestGetter(String name, String returnType,
-      {int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
@@ -323,7 +335,8 @@
 
   CompletionSuggestion assertSuggestMethod(
       String name, String declaringType, String returnType,
-      {int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
@@ -347,7 +360,8 @@
   }
 
   CompletionSuggestion assertSuggestNamedConstructor(
-      String name, String returnType, [int relevance = DART_RELEVANCE_DEFAULT,
+      String name, String returnType,
+      [int relevance = DART_RELEVANCE_DEFAULT,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION]) {
     if (contributor is PrefixedElementContributor) {
       CompletionSuggestion cs =
@@ -374,7 +388,8 @@
   }
 
   CompletionSuggestion assertSuggestSetter(String name,
-      [int relevance = DART_RELEVANCE_DEFAULT, String importUri,
+      [int relevance = DART_RELEVANCE_DEFAULT,
+      String importUri,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION]) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
@@ -469,7 +484,8 @@
     fail(sb.toString());
   }
 
-  CompletionSuggestion getSuggest({String completion: null,
+  CompletionSuggestion getSuggest(
+      {String completion: null,
       CompletionSuggestionKind csKind: null,
       protocol.ElementKind elemKind: null}) {
     CompletionSuggestion cs;
@@ -497,7 +513,6 @@
   }
 
   void resolve(bool fullAnalysis) {
-
     // Index SDK
     for (Source librarySource in context.librarySources) {
       CompilationUnit unit =
@@ -510,7 +525,6 @@
     var result = context.performAnalysisTask();
     bool resolved = false;
     while (result.hasMoreWork) {
-
       // Update the index
       result.changeNotices.forEach((ChangeNotice notice) {
         CompilationUnit unit = notice.resolvedDartUnit;
@@ -561,7 +575,6 @@
  * and `LocalContributorTest`.
  */
 abstract class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
-
   /**
    * Assert that the ImportedReferenceContributor uses cached results
    * to produce identical suggestions to the original set of suggestions.
@@ -590,7 +603,8 @@
 
   CompletionSuggestion assertSuggestImportedClass(String name,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       String elemFile}) {
     return assertNotSuggested(name);
   }
@@ -608,13 +622,15 @@
   CompletionSuggestion assertSuggestImportedFunction(
       String name, String returnType,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      bool deprecated: false, int relevance: DART_RELEVANCE_DEFAULT,
+      bool deprecated: false,
+      int relevance: DART_RELEVANCE_DEFAULT,
       String importUri}) {
     return assertNotSuggested(name);
   }
 
   CompletionSuggestion assertSuggestImportedFunctionTypeAlias(
-      String name, String returnType, [bool isDeprecated = false,
+      String name, String returnType,
+      [bool isDeprecated = false,
       int relevance = DART_RELEVANCE_DEFAULT,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION]) {
     return assertNotSuggested(name);
@@ -638,7 +654,8 @@
   }
 
   CompletionSuggestion assertSuggestImportedTopLevelVar(
-      String name, String returnType, [int relevance = DART_RELEVANCE_DEFAULT,
+      String name, String returnType,
+      [int relevance = DART_RELEVANCE_DEFAULT,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       String importUri]) {
     return assertNotSuggested(name);
@@ -701,8 +718,10 @@
 
   CompletionSuggestion assertSuggestLocalClass(String name,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT, bool isDeprecated: false,
-      String elemFile, int elemOffset}) {
+      int relevance: DART_RELEVANCE_DEFAULT,
+      bool isDeprecated: false,
+      String elemFile,
+      int elemOffset}) {
     return assertNotSuggested(name);
   }
 
@@ -722,7 +741,8 @@
   }
 
   CompletionSuggestion assertSuggestLocalFunction(
-      String name, String returnType, {bool deprecated: false,
+      String name, String returnType,
+      {bool deprecated: false,
       int relevance: DART_RELEVANCE_LOCAL_FUNCTION,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION}) {
     return assertNotSuggested(name);
@@ -776,7 +796,9 @@
 
   test_ArgumentList() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       bool hasLength(int expected) { }
       void baz() { }''');
@@ -803,7 +825,9 @@
 
   test_ArgumentList_imported_function() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       bool hasLength(int expected) { }
       expect(arg) { }
@@ -831,7 +855,9 @@
 
   test_ArgumentList_InstanceCreationExpression_functionalArg() {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       class A { A(f()) { } }
       bool hasLength(int expected) { }
@@ -866,7 +892,9 @@
 
   test_ArgumentList_InstanceCreationExpression_typedefArg() {
     // ArgumentList  InstanceCreationExpression  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       typedef Funct();
       class A { A(Funct f) { } }
@@ -902,7 +930,9 @@
 
   test_ArgumentList_local_function() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       bool hasLength(int expected) { }
       void baz() { }''');
@@ -930,7 +960,9 @@
 
   test_ArgumentList_local_method() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       bool hasLength(int expected) { }
       void baz() { }''');
@@ -958,7 +990,9 @@
 
   test_ArgumentList_MethodInvocation_functionalArg() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       class A { A(f()) { } }
       bool hasLength(int expected) { }
@@ -993,7 +1027,9 @@
 
   test_ArgumentList_MethodInvocation_methodArg() {
     // ArgumentList  MethodInvocation  ExpressionStatement  Block
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       class A { A(f()) { } }
       bool hasLength(int expected) { }
@@ -1026,7 +1062,9 @@
   test_ArgumentList_namedParam() {
     // SimpleIdentifier  NamedExpression  ArgumentList  MethodInvocation
     // ExpressionStatement
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
       library A;
       bool hasLength(int expected) { }''');
     addTestSource('''
@@ -1225,21 +1263,29 @@
 
   test_Block() {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -1327,21 +1373,29 @@
 
   test_Block_final() {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -1442,21 +1496,29 @@
 
   test_Block_final_final() {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -1541,21 +1603,29 @@
 
   test_Block_final_var() {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -1639,21 +1709,29 @@
   }
 
   test_Block_identifier_partial() {
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       class D3 { }
       int T3;
@@ -1722,7 +1800,9 @@
 
   test_Block_inherited_imported() {
     // Block  BlockFunctionBody  MethodDeclaration  ClassDeclaration
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       class F { var f1; f2() { } get f3 => 0; set f4(fx) { } var _pf; }
       class E extends F { var e1; e2() { } }
@@ -1778,21 +1858,29 @@
   }
 
   test_Block_local_function() {
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B {boo() { partBoo() {}} }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -1851,7 +1939,9 @@
 
   test_CascadeExpression_selector1() {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "/testB.dart";
@@ -1877,7 +1967,9 @@
 
   test_CascadeExpression_selector2() {
     // SimpleIdentifier  PropertyAccess  CascadeExpression  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "/testB.dart";
@@ -1901,7 +1993,9 @@
 
   test_CascadeExpression_selector2_withTrailingReturn() {
     // PropertyAccess  CascadeExpression  ExpressionStatement  Block
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "/testB.dart";
@@ -2002,7 +2096,9 @@
 
   test_ClassDeclaration_body() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "testB.dart" as x;
@@ -2036,7 +2132,9 @@
 
   test_ClassDeclaration_body_final() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "testB.dart" as x;
@@ -2055,9 +2153,57 @@
     });
   }
 
+  test_ClassDeclaration_body_final_field() {
+    // ClassDeclaration  CompilationUnit
+    addSource(
+        '/testB.dart',
+        '''
+      class B { }''');
+    addTestSource('''
+      import "testB.dart" as x;
+      class A {final ^ A(){}}
+      class _B {}
+      A T;''');
+    computeFast();
+    return computeFull((bool result) {
+      expect(request.replacementOffset, completionOffset);
+      expect(request.replacementLength, 0);
+      assertSuggestLocalClass('A');
+      assertSuggestLocalClass('_B');
+      assertSuggestImportedClass('String');
+      assertNotSuggested('T');
+      assertSuggestLibraryPrefix('x');
+    });
+  }
+
+  test_ClassDeclaration_body_final_field2() {
+    // ClassDeclaration  CompilationUnit
+    addSource(
+        '/testB.dart',
+        '''
+      class B { }''');
+    addTestSource('''
+      import "testB.dart" as Soo;
+      class A {final S^ A();}
+      class _B {}
+      A Sew;''');
+    computeFast();
+    return computeFull((bool result) {
+      expect(request.replacementOffset, completionOffset - 1);
+      expect(request.replacementLength, 1);
+      assertSuggestLocalClass('A');
+      assertSuggestLocalClass('_B');
+      assertSuggestImportedClass('String');
+      assertNotSuggested('Sew');
+      assertSuggestLibraryPrefix('Soo');
+    });
+  }
+
   test_ClassDeclaration_body_final_final() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "testB.dart" as x;
@@ -2078,7 +2224,9 @@
 
   test_ClassDeclaration_body_final_var() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       class B { }''');
     addTestSource('''
       import "testB.dart" as x;
@@ -2099,17 +2247,23 @@
 
   test_Combinator_hide() {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       library libAB;
       part '/partAB.dart';
       class A { }
       class B { }''');
-    addSource('/partAB.dart', '''
+    addSource(
+        '/partAB.dart',
+        '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       class C { }
       class D { }''');
     addTestSource('''
@@ -2124,19 +2278,25 @@
 
   test_Combinator_show() {
     // SimpleIdentifier  HideCombinator  ImportDirective
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       library libAB;
       part '/partAB.dart';
       class A { }
       class B { }''');
-    addSource('/partAB.dart', '''
+    addSource(
+        '/partAB.dart',
+        '''
       part of libAB;
       var T1;
       PB F1() => new PB();
       typedef PB2 F2(int blat);
       class Clz = Object with Object;
       class PB { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       class C { }
       class D { }''');
     addTestSource('''
@@ -2151,7 +2311,9 @@
 
   test_ConditionalExpression_elseExpression() {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2172,7 +2334,9 @@
 
   test_ConditionalExpression_elseExpression_empty() {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2199,7 +2363,9 @@
 
   test_ConditionalExpression_partial_thenExpression() {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2220,7 +2386,9 @@
 
   test_ConditionalExpression_partial_thenExpression_empty() {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2247,7 +2415,9 @@
 
   test_ConditionalExpression_thenExpression() {
     // SimpleIdentifier  ConditionalExpression  ReturnStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2269,7 +2439,9 @@
   test_ConstructorName_importedClass() {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       int T1;
       F1() { }
@@ -2294,7 +2466,9 @@
   test_ConstructorName_importedFactory() {
     // SimpleIdentifier  PrefixedIdentifier  TypeName  ConstructorName
     // InstanceCreationExpression
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       int T1;
       F1() { }
@@ -2397,7 +2571,9 @@
 
   test_ExpressionStatement_identifier() {
     // SimpleIdentifier  ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       _B F1() { }
       class A {int x;}
       class _B { }''');
@@ -2425,7 +2601,9 @@
 
   test_ExpressionStatement_name() {
     // ExpressionStatement  Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       B T1;
       class B{}''');
     addTestSource('''
@@ -2632,7 +2810,9 @@
 
   test_FunctionDeclaration_returnType_afterComment() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -2663,7 +2843,9 @@
 
   test_FunctionDeclaration_returnType_afterComment2() {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -2694,7 +2876,9 @@
 
   test_FunctionDeclaration_returnType_afterComment3() {
     // FunctionDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -2820,7 +3004,9 @@
 
   test_IndexExpression() {
     // ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2847,7 +3033,9 @@
 
   test_IndexExpression2() {
     // SimpleIdentifier IndexExpression ExpressionStatement  Block
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {int x;}''');
@@ -2868,7 +3056,9 @@
 
   test_InstanceCreationExpression_imported() {
     // SimpleIdentifier  TypeName  ConstructorName  InstanceCreationExpression
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       class A {A(this.x) { } int x;}''');
@@ -2915,7 +3105,9 @@
 
   test_InterpolationExpression() {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -2950,7 +3142,9 @@
 
   test_InterpolationExpression_block() {
     // SimpleIdentifier  InterpolationExpression  StringInterpolation
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3031,7 +3225,9 @@
 
   test_IsExpression() {
     // SimpleIdentifier  TypeName  IsExpression  IfStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       foo() { }
       class X {X.c(); X._d(); z() {}}''');
@@ -3104,7 +3300,9 @@
   }
 
   test_keyword() {
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       int newT1;
       int T1;
@@ -3165,7 +3363,9 @@
 
   test_MapLiteralEntry() {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3199,7 +3399,9 @@
 
   test_MapLiteralEntry1() {
     // MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3226,7 +3428,9 @@
 
   test_MapLiteralEntry2() {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3277,6 +3481,46 @@
     });
   }
 
+  test_MethodDeclaration_body_static() {
+    // Block  BlockFunctionBody  MethodDeclaration
+    addSource(
+        '/testC.dart',
+        '''
+      class C {
+        c1() {}
+        var c2;
+        static c3() {}
+        static var c4;}''');
+    addTestSource('''
+      import "/testC.dart";
+      class B extends C {
+        b1() {}
+        var b2;
+        static b3() {}
+        static var b4;}
+      class A extends B {
+        a1() {}
+        var a2;
+        static a3() {}
+        static var a4;
+        static a() {^}}''');
+    computeFast();
+    return computeFull((bool result) {
+      assertNotSuggested('a1');
+      assertNotSuggested('a2');
+      assertSuggestLocalMethod('a3', 'A', null);
+      assertSuggestLocalField('a4', null);
+      assertNotSuggested('b1');
+      assertNotSuggested('b2');
+      assertNotSuggested('b3');
+      assertNotSuggested('b4');
+      assertNotSuggested('c1');
+      assertNotSuggested('c2');
+      assertNotSuggested('c3');
+      assertNotSuggested('c4');
+    });
+  }
+
   test_MethodDeclaration_members() {
     // Block  BlockFunctionBody  MethodDeclaration
     addTestSource('class A {@deprecated X f; Z _a() {^} var _g;}');
@@ -3348,7 +3592,9 @@
 
   test_MethodDeclaration_returnType() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3378,7 +3624,9 @@
 
   test_MethodDeclaration_returnType_afterComment() {
     // ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3408,7 +3656,9 @@
 
   test_MethodDeclaration_returnType_afterComment2() {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3438,7 +3688,9 @@
 
   test_MethodDeclaration_returnType_afterComment3() {
     // MethodDeclaration  ClassDeclaration  CompilationUnit
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       int T1;
       F1() { }
       typedef D1();
@@ -3517,12 +3769,16 @@
 
   test_partFile_TypeName() {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       int T1;
       F1() { }
       class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       library libA;
       import "/testB.dart";
       part "$testFile";
@@ -3551,12 +3807,16 @@
 
   test_partFile_TypeName2() {
     // SimpleIdentifier  TypeName  ConstructorName
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       int T1;
       F1() { }
       class X {X.c(); X._d(); z() {}}''');
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       part of libA;
       class B { }''');
     addTestSource('''
@@ -3585,7 +3845,9 @@
 
   test_PrefixedIdentifier_class_const() {
     // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       class I {
         static const scI = 'boo';
@@ -3632,7 +3894,9 @@
 
   test_PrefixedIdentifier_class_imported() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       class I {X get f => new A();get _g => new A();}
       class A implements I {
@@ -3714,7 +3978,9 @@
 
   test_PrefixedIdentifier_library() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       var T1;
       class X { }
@@ -3741,7 +4007,9 @@
 
   test_PrefixedIdentifier_library_typesOnly() {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       var T1;
       class X { }
@@ -3768,7 +4036,9 @@
 
   test_PrefixedIdentifier_library_typesOnly2() {
     // SimpleIdentifier  PrefixedIdentifier  TypeName
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       var T1;
       class X { }
@@ -3795,7 +4065,9 @@
 
   test_PrefixedIdentifier_parameter() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       class _W {M y; var _z;}
       class X extends _W {}
@@ -3815,7 +4087,9 @@
 
   test_PrefixedIdentifier_prefix() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       class A {static int bar = 10;}
       _B() {}''');
     addTestSource('''
@@ -4017,11 +4291,12 @@
 
   test_SwitchStatement_case() {
     // SwitchStatement  Block  BlockFunctionBody  MethodDeclaration
-    addTestSource('class A {String g(int x) {switch(x) {case 0: ^}}}');
+    addTestSource('class A {String g(int x) {var t; switch(x) {case 0: ^}}}');
     computeFast();
     return computeFull((bool result) {
       assertSuggestLocalClass('A');
       assertSuggestLocalMethod('g', 'A', 'String');
+      assertSuggestLocalVariable('t', null);
       assertSuggestImportedClass('String');
     });
   }
@@ -4286,7 +4561,9 @@
 
   test_TypeArgumentList() {
     // SimpleIdentifier  BinaryExpression  ExpressionStatement
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       class C1 {int x;}
       F1() => 0;
       typedef String T1(int blat);''');
@@ -4313,7 +4590,9 @@
 
   test_TypeArgumentList2() {
     // TypeName  TypeArgumentList  TypeName
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
       class C1 {int x;}
       F1() => 0;
       typedef String T1(int blat);''');
@@ -4336,7 +4615,9 @@
   test_VariableDeclaration_name() {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement  Block
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       foo() { }
       class _B { }
@@ -4365,7 +4646,9 @@
   test_VariableDeclarationStatement_RHS() {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       foo() { }
       class _B { }
@@ -4391,7 +4674,9 @@
   test_VariableDeclarationStatement_RHS_missing_semicolon() {
     // VariableDeclaration  VariableDeclarationList
     // VariableDeclarationStatement
-    addSource('/testB.dart', '''
+    addSource(
+        '/testB.dart',
+        '''
       lib B;
       foo1() { }
       void bar1() { }
diff --git a/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
index e584c4d..527410e 100644
--- a/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/import_uri_contributor_test.dart
@@ -4,19 +4,21 @@
 
 library test.services.completion.contributor.dart.importuri;
 
-import 'dart:io';
-
 import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/src/services/completion/dart_completion_manager.dart';
 import 'package:analysis_server/src/services/completion/import_uri_contributor.dart';
+import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:path/path.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ImportUriContributorTest);
+  defineReflectiveTests(ImportUriContributorWindowsTest);
 }
 
 @reflectiveTest
@@ -27,6 +29,15 @@
   }
 
   test_import() {
+    addTestSource('import "^"');
+    computeFast();
+    expect(request.replacementOffset, completionOffset);
+    expect(request.replacementLength, 0);
+    assertSuggest('dart:', csKind: CompletionSuggestionKind.IMPORT);
+    assertSuggest('package:', csKind: CompletionSuggestionKind.IMPORT);
+  }
+
+  test_import2() {
     addTestSource('import "^" import');
     computeFast();
     expect(request.replacementOffset, completionOffset);
@@ -41,7 +52,8 @@
     expect(request.replacementOffset, completionOffset - 1);
     expect(request.replacementLength, 1);
     assertSuggest('dart:', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('dart:core');
+    assertSuggest('dart:core',
+        csKind: CompletionSuggestionKind.IMPORT, relevance: DART_RELEVANCE_LOW);
     assertNotSuggested('dart:_internal');
     assertSuggest('dart:async', csKind: CompletionSuggestionKind.IMPORT);
     assertSuggest('dart:math', csKind: CompletionSuggestionKind.IMPORT);
@@ -53,15 +65,14 @@
     expect(request.replacementOffset, completionOffset - 1);
     expect(request.replacementLength, 1);
     assertSuggest('dart:', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('dart:core');
+    assertSuggest('dart:core',
+        csKind: CompletionSuggestionKind.IMPORT, relevance: DART_RELEVANCE_LOW);
     assertNotSuggested('dart:_internal');
-    assertNotSuggested('dart:async');
+    assertSuggest('dart:async', csKind: CompletionSuggestionKind.IMPORT);
     assertSuggest('dart:math', csKind: CompletionSuggestionKind.IMPORT);
   }
 
   test_import_file() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -73,14 +84,12 @@
     assertNotSuggested('completion.dart');
     assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('foo');
-    assertSuggest('foo${separator}', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('foo${separator}bar.dart');
-    assertNotSuggested('..${separator}blat.dart');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
   }
 
   test_import_file2() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -92,14 +101,12 @@
     assertNotSuggested('completion.dart');
     assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('foo');
-    assertSuggest('foo${separator}', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('foo${separator}bar.dart');
-    assertNotSuggested('..${separator}blat.dart');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
   }
 
   test_import_file_child() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -111,14 +118,12 @@
     assertNotSuggested('completion.dart');
     assertNotSuggested('other.dart');
     assertNotSuggested('foo');
-    assertNotSuggested('foo${separator}');
-    assertSuggest('foo${separator}bar.dart', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('..${separator}blat.dart');
+    assertNotSuggested('foo/');
+    assertSuggest('foo/bar.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('../blat.dart');
   }
 
   test_import_file_parent() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -130,9 +135,26 @@
     assertNotSuggested('completion.dart');
     assertNotSuggested('other.dart');
     assertNotSuggested('foo');
-    assertNotSuggested('foo${separator}');
-    assertNotSuggested('foo${separator}bar.dart');
-    assertSuggest('..${separator}blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+  }
+
+  test_import_file_parent2() {
+    testFile = '/proj/completion.dart';
+    addSource('/proj/other.dart', 'library other;');
+    addSource('/proj/foo/bar.dart', 'library bar;');
+    addSource('/blat.dart', 'library blat;');
+    addTestSource('import "../b^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 4);
+    expect(request.replacementLength, 4);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
   }
 
   test_import_package() {
@@ -193,8 +215,6 @@
   }
 
   test_part_file() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -206,14 +226,12 @@
     assertNotSuggested('completion.dart');
     assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('foo');
-    assertSuggest('foo${separator}', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('foo${separator}bar.dart');
-    assertNotSuggested('..${separator}blat.dart');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
   }
 
   test_part_file2() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -225,14 +243,12 @@
     assertNotSuggested('completion.dart');
     assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
     assertNotSuggested('foo');
-    assertSuggest('foo${separator}', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('foo${separator}bar.dart');
-    assertNotSuggested('..${separator}blat.dart');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
   }
 
   test_part_file_child() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -244,14 +260,12 @@
     assertNotSuggested('completion.dart');
     assertNotSuggested('other.dart');
     assertNotSuggested('foo');
-    assertNotSuggested('foo${separator}');
-    assertSuggest('foo${separator}bar.dart', csKind: CompletionSuggestionKind.IMPORT);
-    assertNotSuggested('..${separator}blat.dart');
+    assertNotSuggested('foo/');
+    assertSuggest('foo/bar.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('../blat.dart');
   }
 
   test_part_file_parent() {
-    // TODO(danrubel) fix file uri suggestions on Windows
-    if (Platform.isWindows) return;
     testFile = '/proj/completion.dart';
     addSource('/proj/other.dart', 'library other;');
     addSource('/proj/foo/bar.dart', 'library bar;');
@@ -263,8 +277,179 @@
     assertNotSuggested('completion.dart');
     assertNotSuggested('other.dart');
     assertNotSuggested('foo');
-    assertNotSuggested('foo${separator}');
-    assertNotSuggested('foo${separator}bar.dart');
-    assertSuggest('..${separator}blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
   }
 }
+
+@reflectiveTest
+class ImportUriContributorWindowsTest extends AbstractCompletionTest {
+  @override
+  void setUpContributor() {
+    contributor = new ImportUriContributor();
+  }
+
+  @override
+  void setupResourceProvider() {
+    provider = new _TestWinResourceProvider();
+  }
+
+  test_import_file() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('import "^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset);
+    expect(request.replacementLength, 0);
+    assertNotSuggested('completion.dart');
+    assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_import_file2() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('import "..^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 2);
+    expect(request.replacementLength, 2);
+    assertNotSuggested('completion.dart');
+    assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_import_file_child() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('import "foo/^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 4);
+    expect(request.replacementLength, 4);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertSuggest('foo/bar.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_import_file_parent() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('import "../^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 3);
+    expect(request.replacementLength, 3);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+  }
+
+  test_import_file_parent2() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('import "../b^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 4);
+    expect(request.replacementLength, 4);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+  }
+
+  test_part_file() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('library x; part "^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset);
+    expect(request.replacementLength, 0);
+    assertNotSuggested('completion.dart');
+    assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_part_file2() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('library x; part "..^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 2);
+    expect(request.replacementLength, 2);
+    assertNotSuggested('completion.dart');
+    assertSuggest('other.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo');
+    assertSuggest('foo/', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('foo/bar.dart');
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_part_file_child() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('library x; part "foo/^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 4);
+    expect(request.replacementLength, 4);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertSuggest('foo/bar.dart', csKind: CompletionSuggestionKind.IMPORT);
+    assertNotSuggested('../blat.dart');
+  }
+
+  test_part_file_parent() {
+    testFile = '\\proj\\completion.dart';
+    addSource('\\proj\\other.dart', 'library other;');
+    addSource('\\proj\\foo\\bar.dart', 'library bar;');
+    addSource('\\blat.dart', 'library blat;');
+    addTestSource('library x; part "../^" import');
+    computeFast();
+    expect(request.replacementOffset, completionOffset - 3);
+    expect(request.replacementLength, 3);
+    assertNotSuggested('completion.dart');
+    assertNotSuggested('other.dart');
+    assertNotSuggested('foo');
+    assertNotSuggested('foo/');
+    assertNotSuggested('foo/bar.dart');
+    assertSuggest('../blat.dart', csKind: CompletionSuggestionKind.IMPORT);
+  }
+}
+
+class _TestWinResourceProvider extends MemoryResourceProvider {
+  @override
+  Context get pathContext => windows;
+}
diff --git a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
index 42a32cd..a539532 100644
--- a/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/imported_reference_contributor_test.dart
@@ -20,10 +20,11 @@
 
 import '../../abstract_context.dart';
 import '../../operation/operation_queue_test.dart';
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ImportedReferenceContributorTest);
 }
 
@@ -45,7 +46,8 @@
    */
   @override
   assertCachedCompute(_) {
-    if (!(contributor as ImportedReferenceContributor).shouldWaitForLowPrioritySuggestions) {
+    if (!(contributor as ImportedReferenceContributor)
+        .shouldWaitForLowPrioritySuggestions) {
       return null;
     }
     List<CompletionSuggestion> oldSuggestions = request.suggestions;
@@ -125,7 +127,8 @@
   @override
   CompletionSuggestion assertSuggestImportedClass(String name,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT, String importUri,
+      int relevance: DART_RELEVANCE_DEFAULT,
+      String importUri,
       String elemFile}) {
     return assertSuggestClass(name,
         relevance: relevance,
@@ -152,7 +155,8 @@
   CompletionSuggestion assertSuggestImportedFunction(
       String name, String returnType,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      bool deprecated: false, int relevance: DART_RELEVANCE_DEFAULT,
+      bool deprecated: false,
+      int relevance: DART_RELEVANCE_DEFAULT,
       String importUri}) {
     return assertSuggestFunction(name, returnType,
         kind: kind,
@@ -163,7 +167,8 @@
 
   @override
   CompletionSuggestion assertSuggestImportedFunctionTypeAlias(
-      String name, String returnType, [bool isDeprecated = false,
+      String name, String returnType,
+      [bool isDeprecated = false,
       int relevance = DART_RELEVANCE_DEFAULT,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       String importUri]) {
@@ -192,7 +197,8 @@
 
   @override
   CompletionSuggestion assertSuggestImportedTopLevelVar(
-      String name, String returnType, [int relevance = DART_RELEVANCE_DEFAULT,
+      String name, String returnType,
+      [int relevance = DART_RELEVANCE_DEFAULT,
       CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION,
       String importUri]) {
     return assertSuggestTopLevelVar(
@@ -284,21 +290,29 @@
 
   test_Block_partial_results() {
     // Block  BlockFunctionBody  MethodDeclaration
-    addSource('/testAB.dart', '''
+    addSource(
+        '/testAB.dart',
+        '''
       export "dart:math" hide max;
       class A {int x;}
       @deprecated D1() {int x;}
       class _B { }''');
-    addSource('/testCD.dart', '''
+    addSource(
+        '/testCD.dart',
+        '''
       String T1;
       var _T2;
       class C { }
       class D { }''');
-    addSource('/testEEF.dart', '''
+    addSource(
+        '/testEEF.dart',
+        '''
       class EE { }
       class F { }''');
     addSource('/testG.dart', 'class G { }');
-    addSource('/testH.dart', '''
+    addSource(
+        '/testH.dart',
+        '''
       class H { }
       int T3;
       var _T4;'''); // not imported
@@ -334,7 +348,9 @@
   }
 
   test_function_parameters_mixed_required_and_named() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m(x, {int y}) {}
 ''');
     addTestSource('''
@@ -356,7 +372,9 @@
   }
 
   test_function_parameters_mixed_required_and_positional() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m(x, [int y]) {}
 ''');
     addTestSource('''
@@ -378,7 +396,9 @@
   }
 
   test_function_parameters_named() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m({x, int y}) {}
 ''');
     addTestSource('''
@@ -400,7 +420,9 @@
   }
 
   test_function_parameters_none() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m() {}
 ''');
     addTestSource('''
@@ -420,7 +442,9 @@
   }
 
   test_function_parameters_positional() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m([x, int y]) {}
 ''');
     addTestSource('''
@@ -442,7 +466,9 @@
   }
 
   test_function_parameters_required() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 void m(x, int y) {}
 ''');
     addTestSource('''
@@ -464,7 +490,9 @@
   }
 
   test_InstanceCreationExpression() {
-    addSource('/testA.dart', '''
+    addSource(
+        '/testA.dart',
+        '''
 class A {foo(){var f; {var x;}}}
 class B {B(this.x, [String boo]) { } int x;}
 class C {C.bar({boo: 'hoo', int z: 0}) { } }''');
@@ -499,8 +527,7 @@
       expect(suggestion.hasNamedParameters, false);
 
       suggestion = assertSuggestImportedConstructor('C.bar');
-      expect(
-          suggestion.element.parameters, "({dynamic boo: 'hoo'}, {int z: 0})");
+      expect(suggestion.element.parameters, "({dynamic boo: 'hoo', int z: 0})");
       expect(suggestion.parameterNames, hasLength(2));
       expect(suggestion.parameterNames[0], 'boo');
       expect(suggestion.parameterTypes[0], 'dynamic');
@@ -526,7 +553,9 @@
   }
 
   test_method_parameters_mixed_required_and_named() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m(x, {int y}) {}
 }
@@ -551,7 +580,9 @@
   }
 
   test_method_parameters_mixed_required_and_positional() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m(x, [int y]) {}
 }
@@ -576,7 +607,9 @@
   }
 
   test_method_parameters_named() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m({x, int y}) {}
 }
@@ -601,7 +634,9 @@
   }
 
   test_method_parameters_none() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m() {}
 }
@@ -624,7 +659,9 @@
   }
 
   test_method_parameters_positional() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m([x, int y]) {}
 }
@@ -649,7 +686,9 @@
   }
 
   test_method_parameters_required() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   void m(x, int y) {}
 }
@@ -674,7 +713,9 @@
   }
 
   test_mixin_ordering() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class B {}
 class M1 {
   void m() {}
@@ -700,7 +741,6 @@
    * Ensure that completions in one context don't appear in another
    */
   test_multiple_contexts() {
-
     // Create a 2nd context with source
     var context2 = AnalysisEngine.instance.createAnalysisContext();
     context2.sourceFactory =
@@ -726,7 +766,9 @@
     }
 
     // Check that source in 2nd context does not appear in completion in 1st
-    addSource('/context1/libA.dart', '''
+    addSource(
+        '/context1/libA.dart',
+        '''
       library libA;
       class ClassInLocalContext {int x;}''');
     testFile = '/context1/completionTest.dart';
@@ -744,7 +786,9 @@
   }
 
   test_no_parameters_field() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   int x;
 }
@@ -762,7 +806,9 @@
   }
 
   test_no_parameters_getter() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   int get x => null;
 }
@@ -780,7 +826,9 @@
   }
 
   test_no_parameters_setter() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 class A {
   set x(int value) {};
 }
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
index 6db5b89..bf3c027 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -11,10 +11,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(KeywordContributorTest);
 }
 
@@ -78,6 +79,28 @@
 
   static const List<Keyword> STMT_START_IN_CLASS = const [
     Keyword.ASSERT,
+    Keyword.CONST,
+    Keyword.DO,
+    Keyword.FINAL,
+    Keyword.FOR,
+    Keyword.IF,
+    Keyword.NEW,
+    Keyword.RETHROW,
+    Keyword.RETURN,
+    Keyword.SUPER,
+    Keyword.SWITCH,
+    Keyword.THIS,
+    Keyword.THROW,
+    Keyword.TRY,
+    Keyword.VAR,
+    Keyword.VOID,
+    Keyword.WHILE
+  ];
+
+  static const List<Keyword> STMT_START_IN_LOOP_IN_CLASS = const [
+    Keyword.ASSERT,
+    Keyword.BREAK,
+    Keyword.CONST,
     Keyword.CONTINUE,
     Keyword.DO,
     Keyword.FINAL,
@@ -98,8 +121,9 @@
 
   static const List<Keyword> STMT_START_IN_SWITCH_IN_CLASS = const [
     Keyword.ASSERT,
+    Keyword.BREAK,
     Keyword.CASE,
-    Keyword.CONTINUE,
+    Keyword.CONST,
     Keyword.DEFAULT,
     Keyword.DO,
     Keyword.FINAL,
@@ -120,8 +144,9 @@
 
   static const List<Keyword> STMT_START_IN_SWITCH_OUTSIDE_CLASS = const [
     Keyword.ASSERT,
+    Keyword.BREAK,
     Keyword.CASE,
-    Keyword.CONTINUE,
+    Keyword.CONST,
     Keyword.DEFAULT,
     Keyword.DO,
     Keyword.FINAL,
@@ -140,6 +165,26 @@
 
   static const List<Keyword> STMT_START_OUTSIDE_CLASS = const [
     Keyword.ASSERT,
+    Keyword.CONST,
+    Keyword.DO,
+    Keyword.FINAL,
+    Keyword.FOR,
+    Keyword.IF,
+    Keyword.NEW,
+    Keyword.RETHROW,
+    Keyword.RETURN,
+    Keyword.SWITCH,
+    Keyword.THROW,
+    Keyword.TRY,
+    Keyword.VAR,
+    Keyword.VOID,
+    Keyword.WHILE
+  ];
+
+  static const List<Keyword> STMT_START_IN_LOOP_OUTSIDE_CLASS = const [
+    Keyword.ASSERT,
+    Keyword.BREAK,
+    Keyword.CONST,
     Keyword.CONTINUE,
     Keyword.DO,
     Keyword.FINAL,
@@ -157,6 +202,7 @@
   ];
 
   static const List<Keyword> EXPRESSION_START_INSTANCE = const [
+    Keyword.CONST,
     Keyword.FALSE,
     Keyword.NEW,
     Keyword.NULL,
@@ -166,23 +212,13 @@
   ];
 
   static const List<Keyword> EXPRESSION_START_NO_INSTANCE = const [
+    Keyword.CONST,
     Keyword.FALSE,
     Keyword.NEW,
     Keyword.NULL,
     Keyword.TRUE,
   ];
 
-  static final Map<String, List<String>> keywordTemplates =
-      <String, List<String>>{
-    Keyword.IMPORT.syntax: [
-      "import '^';",
-      "import '^' as ;",
-      "import '^' hide ;",
-      "import '^' show ;"
-    ],
-    Keyword.FOR.syntax: ['for (^)']
-  };
-
   void assertSuggestKeywords(Iterable<Keyword> expectedKeywords,
       {List<String> pseudoKeywords: NO_PSEUDO_KEYWORDS,
       int relevance: DART_RELEVANCE_KEYWORD}) {
@@ -191,18 +227,6 @@
     Set<String> actualCompletions = new Set<String>();
     expectedCompletions.addAll(expectedKeywords.map((k) => k.syntax));
     expectedCompletions.addAll(pseudoKeywords);
-    keywordTemplates.forEach((String key, List<String> templates) {
-      if (expectedCompletions.remove(key)) {
-        for (String t in templates) {
-          int offset = t.indexOf('^');
-          if (offset != -1) {
-            t = '${t.substring(0, offset)}${t.substring(offset + 1)}';
-            expectedOffsets[t] = offset;
-          }
-          expectedCompletions.add(t);
-        }
-      }
-    });
     for (CompletionSuggestion s in request.suggestions) {
       if (s.kind == CompletionSuggestionKind.KEYWORD) {
         Keyword k = Keyword.keywords[s.completion];
@@ -251,6 +275,35 @@
     }
   }
 
+  fail_import_partial() {
+    addTestSource('imp^ import "package:foo/foo.dart"; import "bar.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertNotSuggested('class');
+  }
+
+  fail_import_partial4() {
+    addTestSource('^ imp import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertNotSuggested('class');
+  }
+
+  fail_import_partial5() {
+    addTestSource('library libA; imp^ import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertNotSuggested('class');
+  }
+
+  fail_import_partial6() {
+    addTestSource(
+        'library bar; import "zoo.dart"; imp^ import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertNotSuggested('class');
+  }
+
   @override
   void setUpContributor() {
     contributor = new KeywordContributor();
@@ -532,6 +585,20 @@
     assertSuggestKeywords([Keyword.THIS]);
   }
 
+  test_do_break_continue() {
+    addTestSource('main() {do {^} while (true);}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_OUTSIDE_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
+  test_do_break_continue2() {
+    addTestSource('class A {foo() {do {^} while (true);}}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_IN_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
   test_empty() {
     addTestSource('^');
     expect(computeFast(), isTrue);
@@ -539,6 +606,44 @@
         relevance: DART_RELEVANCE_HIGH);
   }
 
+  test_for_break_continue() {
+    addTestSource('main() {for (int x in myList) {^}}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_OUTSIDE_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
+  test_for_break_continue2() {
+    addTestSource('class A {foo() {for (int x in myList) {^}}}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_IN_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
+  test_for_expression_in() {
+    addTestSource('main() {for (int x i^)}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+  }
+
+  test_for_expression_in2() {
+    addTestSource('main() {for (int x in^)}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+  }
+
+  test_for_expression_init() {
+    addTestSource('main() {for (int x = i^)}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+  }
+
+  test_for_expression_init2() {
+    addTestSource('main() {for (int x = in^)}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+  }
+
   test_function_async() {
     addTestSource('main()^');
     expect(computeFast(), isTrue);
@@ -741,7 +846,8 @@
   test_import() {
     addTestSource('import "foo" deferred as foo ^;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([],
+        pseudoKeywords: ['show', 'hide'], relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_as() {
@@ -777,63 +883,159 @@
   test_import_deferred3() {
     addTestSource('import "foo" d^ show foo;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as'], relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred4() {
     addTestSource('import "foo" d^ hide foo;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
-        relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as'], relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred5() {
     addTestSource('import "foo" d^');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred6() {
     addTestSource('import "foo" d^ import');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred_as() {
     addTestSource('import "foo" ^;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred_as2() {
     addTestSource('import "foo" d^;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred_as3() {
     addTestSource('import "foo" ^');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred_as4() {
     addTestSource('import "foo" d^');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([Keyword.AS, Keyword.DEFERRED],
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
+        relevance: DART_RELEVANCE_HIGH);
+  }
+
+  test_import_deferred_as5() {
+    addTestSource('import "foo" sh^ import "bar"; import "baz";');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords([Keyword.AS],
+        pseudoKeywords: ['deferred as', 'show', 'hide'],
         relevance: DART_RELEVANCE_HIGH);
   }
 
   test_import_deferred_not() {
     addTestSource('import "foo" as foo ^;');
     expect(computeFast(), isTrue);
-    assertSuggestKeywords([], relevance: DART_RELEVANCE_HIGH);
+    assertSuggestKeywords([],
+        pseudoKeywords: ['show', 'hide'], relevance: DART_RELEVANCE_HIGH);
+  }
+
+  test_import_deferred_partial() {
+    addTestSource('import "package:foo/foo.dart" def^ as foo;');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords([Keyword.DEFERRED], relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 30);
+    expect(request.replacementLength, 3);
+  }
+
+  test_import_incomplete() {
+    addTestSource('import "^"');
+    expect(computeFast(), isTrue);
+    assertNoSuggestions();
+  }
+
+  test_import_partial() {
+    addTestSource('imp^ import "package:foo/foo.dart"; import "bar.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_DECLARATION_AND_LIBRARY_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 0);
+    expect(request.replacementLength, 3);
+  }
+
+  test_import_partial2() {
+    addTestSource('^imp import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_DECLARATION_AND_LIBRARY_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 0);
+    expect(request.replacementLength, 3);
+  }
+
+  test_import_partial3() {
+    addTestSource(' ^imp import "package:foo/foo.dart"; import "bar.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_DECLARATION_AND_LIBRARY_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 1);
+    expect(request.replacementLength, 3);
+  }
+
+  test_import_partial4() {
+    addTestSource('^ imp import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_DECLARATION_AND_LIBRARY_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 0);
+    expect(request.replacementLength, 0);
+  }
+
+  test_import_partial5() {
+    addTestSource('library libA; imp^ import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_AND_DECLARATION_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 14);
+    expect(request.replacementLength, 3);
+  }
+
+  test_import_partial6() {
+    addTestSource(
+        'library bar; import "zoo.dart"; imp^ import "package:foo/foo.dart";');
+    expect(computeFast(), isTrue);
+    // TODO(danrubel) should not suggest declaration keywords
+    assertSuggestKeywords(DIRECTIVE_AND_DECLARATION_KEYWORDS,
+        relevance: DART_RELEVANCE_HIGH);
+    expect(request.replacementOffset, 32);
+    expect(request.replacementLength, 3);
+  }
+
+  test_is_expression() {
+    addTestSource('main() {if (x is^)}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords([Keyword.IS], relevance: DART_RELEVANCE_HIGH);
   }
 
   test_library() {
@@ -1167,6 +1369,20 @@
     assertSuggestKeywords(STMT_START_IN_SWITCH_IN_CLASS);
   }
 
+  test_while_break_continue() {
+    addTestSource('main() {while (true) {^}}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_OUTSIDE_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
+  test_while_break_continue2() {
+    addTestSource('class A {foo() {while (true) {^}}}');
+    expect(computeFast(), isTrue);
+    assertSuggestKeywords(STMT_START_IN_LOOP_IN_CLASS,
+        relevance: DART_RELEVANCE_KEYWORD);
+  }
+
   void _appendCompletions(
       StringBuffer msg, Iterable<String> completions, Iterable<String> other) {
     List<String> sorted = completions.toList();
diff --git a/pkg/analysis_server/test/services/completion/local_declaration_visitor_test.dart b/pkg/analysis_server/test/services/completion/local_declaration_visitor_test.dart
index 230291d..e1ab7da 100644
--- a/pkg/analysis_server/test/services/completion/local_declaration_visitor_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_declaration_visitor_test.dart
@@ -12,8 +12,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(LocalDeclarationVisitorTest);
 }
 
diff --git a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
index 36310da..2a537ed 100644
--- a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart
@@ -12,10 +12,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(LocalReferenceContributorTest);
 }
 
@@ -57,7 +58,8 @@
   CompletionSuggestion assertSuggestLocalFunction(
       String name, String returnType,
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      bool deprecated: false, int relevance: DART_RELEVANCE_LOCAL_FUNCTION}) {
+      bool deprecated: false,
+      int relevance: DART_RELEVANCE_LOCAL_FUNCTION}) {
     return assertSuggestFunction(name, returnType,
         kind: kind, deprecated: deprecated, relevance: relevance);
   }
diff --git a/pkg/analysis_server/test/services/completion/optype_test.dart b/pkg/analysis_server/test/services/completion/optype_test.dart
index 04ce497..efd355e 100644
--- a/pkg/analysis_server/test/services/completion/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/optype_test.dart
@@ -13,9 +13,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(OpTypeTest);
 }
 
@@ -42,19 +43,27 @@
     visitor = new OpType.forCompletion(completionTarget, offset);
   }
 
-  void assertOpType({bool prefixed: false, bool returnValue: false,
-      bool typeNames: false, bool voidReturn: false, bool statementLabel: false,
-      bool caseLabel: false, bool constructors: false}) {
-    expect(visitor.includeReturnValueSuggestions, returnValue,
-        reason: 'returnValue');
-    expect(visitor.includeTypeNameSuggestions, typeNames, reason: 'typeNames');
-    expect(visitor.includeVoidReturnSuggestions, voidReturn,
-        reason: 'voidReturn');
-    expect(visitor.includeStatementLabelSuggestions, statementLabel,
-        reason: 'statementLabel');
+  void assertOpType(
+      {bool caseLabel: false,
+      bool constructors: false,
+      bool prefixed: false,
+      bool returnValue: false,
+      bool statementLabel: false,
+      bool staticMethodBody: false,
+      bool typeNames: false,
+      bool voidReturn: false}) {
     expect(visitor.includeCaseLabelSuggestions, caseLabel, reason: 'caseLabel');
     expect(visitor.includeConstructorSuggestions, constructors,
         reason: 'constructors');
+    expect(visitor.includeReturnValueSuggestions, returnValue,
+        reason: 'returnValue');
+    expect(visitor.includeStatementLabelSuggestions, statementLabel,
+        reason: 'statementLabel');
+    expect(visitor.includeTypeNameSuggestions, typeNames, reason: 'typeNames');
+    expect(visitor.includeVoidReturnSuggestions, voidReturn,
+        reason: 'voidReturn');
+    expect(visitor.inStaticMethodBody, staticMethodBody,
+        reason: 'staticMethodBody');
     expect(visitor.isPrefixed, prefixed, reason: 'prefixed');
   }
 
@@ -237,6 +246,21 @@
     assertOpType(returnValue: true, typeNames: true, voidReturn: true);
   }
 
+  test_Block_keyword() {
+    addTestSource('class C { static C get instance => null; } main() {C.in^}');
+    assertOpType(
+        prefixed: true, returnValue: true, typeNames: true, voidReturn: true);
+  }
+
+  test_Block_static() {
+    addTestSource('class A {static foo() {^}}');
+    assertOpType(
+        returnValue: true,
+        typeNames: true,
+        staticMethodBody: true,
+        voidReturn: true);
+  }
+
   test_Break_after_label() {
     addTestSource('main() { foo: while (true) { break foo ^ ; } }');
     assertOpType(/* No valid completions */);
diff --git a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
index 7778869..1e3cb2f 100644
--- a/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart
@@ -12,10 +12,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'completion_test_util.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(PrefixedElementContributorTest);
 }
 
@@ -216,6 +217,13 @@
     });
   }
 
+  test_keyword() {
+    addTestSource('class C { static C get instance => null; } main() {C.in^}');
+    return computeFull((bool result) {
+      assertSuggestGetter('instance', 'C');
+    });
+  }
+
   test_libraryPrefix() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('import "dart:async" as bar; foo() {bar.^}');
@@ -233,6 +241,15 @@
     });
   }
 
+  test_libraryPrefix3() {
+    // SimpleIdentifier  MethodInvocation  ExpressionStatement
+    addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
+    return computeFull((bool result) {
+      assertSuggestConstructor('Future');
+      assertSuggestConstructor('Future.delayed');
+    });
+  }
+
   test_libraryPrefix_deferred() {
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
diff --git a/pkg/analysis_server/test/services/completion/test_all.dart b/pkg/analysis_server/test/services/completion/test_all.dart
index 3ccfb64..d2035b8 100644
--- a/pkg/analysis_server/test/services/completion/test_all.dart
+++ b/pkg/analysis_server/test/services/completion/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'arglist_contributor_test.dart' as arglist_test;
 import 'combinator_contributor_test.dart' as combinator_test;
 import 'common_usage_computer_test.dart' as common_usage_computer_test;
@@ -23,7 +24,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('completion', () {
     arglist_test.main();
     combinator_test.main();
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index e1c9f62..4d20cc0 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -14,9 +14,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(AssistProcessorTest);
 }
 
diff --git a/pkg/analysis_server/test/services/correction/change_test.dart b/pkg/analysis_server/test/services/correction/change_test.dart
index 3a551ca..0cc92b4 100644
--- a/pkg/analysis_server/test/services/correction/change_test.dart
+++ b/pkg/analysis_server/test/services/correction/change_test.dart
@@ -10,8 +10,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ChangeTest);
   defineReflectiveTests(EditTest);
   defineReflectiveTests(FileEditTest);
@@ -152,13 +154,10 @@
     expect(edit.offset, 1);
     expect(edit.length, 2);
     expect(edit.replacement, 'foo');
-    expect(edit.toJson(), {
-      'offset': 1,
-      'length': 2,
-      'replacement': 'foo',
-      'id': 'my-id'
-    });
+    expect(edit.toJson(),
+        {'offset': 1, 'length': 2, 'replacement': 'foo', 'id': 'my-id'});
   }
+
   void test_toJson() {
     SourceEdit edit = new SourceEdit(1, 2, 'foo');
     var expectedJson = {OFFSET: 1, LENGTH: 2, REPLACEMENT: 'foo'};
@@ -195,7 +194,9 @@
     SourceFileEdit fileEdit = new SourceFileEdit('/test.dart', 100);
     fileEdit.add(new SourceEdit(1, 2, 'aaa'));
     fileEdit.add(new SourceEdit(10, 20, 'bbb'));
-    expect(fileEdit.toString(), '{"file":"/test.dart","fileStamp":100,"edits":['
+    expect(
+        fileEdit.toString(),
+        '{"file":"/test.dart","fileStamp":100,"edits":['
         '{"offset":10,"length":20,"replacement":"bbb"},'
         '{"offset":1,"length":2,"replacement":"aaa"}]}');
   }
@@ -222,7 +223,10 @@
     LinkedEditGroup group = new LinkedEditGroup.empty();
     group.addPosition(new Position('/a.dart', 1), 2);
     group.addPosition(new Position('/b.dart', 10), 2);
-    expect(group.toString(), '{"positions":[' '{"file":"/a.dart","offset":1},'
+    expect(
+        group.toString(),
+        '{"positions":['
+        '{"file":"/a.dart","offset":1},'
         '{"file":"/b.dart","offset":10}],"length":2,"suggestions":[]}');
   }
 
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 13d3d99..5735dec 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -18,9 +18,10 @@
 
 import '../../abstract_context.dart';
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(FixProcessorTest);
 }
 
diff --git a/pkg/analysis_server/test/services/correction/levenshtein_test.dart b/pkg/analysis_server/test/services/correction/levenshtein_test.dart
index bf5d6e5..a1b0a92 100644
--- a/pkg/analysis_server/test/services/correction/levenshtein_test.dart
+++ b/pkg/analysis_server/test/services/correction/levenshtein_test.dart
@@ -8,8 +8,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(LevenshteinTest);
 }
 
diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
index e7aa554..4d49775 100644
--- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
+++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(VariableNameSuggestionTest);
 }
 
@@ -57,11 +58,13 @@
     DartType expectedType = (findElement('res') as LocalVariableElement).type;
     Expression assignedExpression = findNodeAtString('0.0;');
     // first choice for "double" is "d"
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             expectedType, assignedExpression, new Set.from([])),
         unorderedEquals(['d']));
     // if "d" is used, try "e", "f", etc
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             expectedType, assignedExpression, new Set.from(['d', 'e'])),
         unorderedEquals(['f']));
   }
@@ -75,11 +78,13 @@
     DartType expectedType = (findElement('res') as LocalVariableElement).type;
     Expression assignedExpression = findNodeAtString('0;');
     // first choice for "int" is "i"
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             expectedType, assignedExpression, new Set.from([])),
         unorderedEquals(['i']));
     // if "i" is used, try "j", "k", etc
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             expectedType, assignedExpression, new Set.from(['i', 'j'])),
         unorderedEquals(['k']));
   }
@@ -93,7 +98,8 @@
     DartType expectedType = (findElement('res') as LocalVariableElement).type;
     Expression assignedExpression = findNodeAtString("'abc';");
     // first choice for "String" is "s"
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             expectedType, assignedExpression, new Set.from([])),
         unorderedEquals(['s']));
   }
@@ -109,10 +115,12 @@
 }
 ''');
     var excluded = new Set.from([]);
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             null, findNodeAtString('new NoSuchClass()'), excluded),
         unorderedEquals(['noSuchClass', 'suchClass', 'class']));
-    expect(getVariableNameSuggestionsForExpression(
+    expect(
+        getVariableNameSuggestionsForExpression(
             null, findNodeAtString('new NoSuchClass.named()'), excluded),
         unorderedEquals(['noSuchClass', 'suchClass', 'class']));
     // TODO(scheglov) This test does not work.
@@ -238,9 +246,12 @@
 }
 ''');
     var excluded = new Set.from([]);
-    expect(getVariableNameSuggestionsForExpression(null,
-        findNodeAtString('p.sorted', (node) => node is PrefixedIdentifier),
-        excluded), unorderedEquals(['sortedNodes', 'nodes']));
+    expect(
+        getVariableNameSuggestionsForExpression(
+            null,
+            findNodeAtString('p.sorted', (node) => node is PrefixedIdentifier),
+            excluded),
+        unorderedEquals(['sortedNodes', 'nodes']));
   }
 
   void test_forExpression_privateName() {
@@ -251,12 +262,18 @@
 }
 ''');
     var excluded = new Set.from([]);
-    expect(getVariableNameSuggestionsForExpression(null,
-        findNodeAtString('p._name', (node) => node is PrefixedIdentifier),
-        excluded), unorderedEquals(['name']));
-    expect(getVariableNameSuggestionsForExpression(null,
-        findNodeAtString('p._compute', (node) => node is MethodInvocation),
-        excluded), unorderedEquals(['computeSuffix', 'suffix']));
+    expect(
+        getVariableNameSuggestionsForExpression(
+            null,
+            findNodeAtString('p._name', (node) => node is PrefixedIdentifier),
+            excluded),
+        unorderedEquals(['name']));
+    expect(
+        getVariableNameSuggestionsForExpression(
+            null,
+            findNodeAtString('p._compute', (node) => node is MethodInvocation),
+            excluded),
+        unorderedEquals(['computeSuffix', 'suffix']));
   }
 
   void test_forExpression_propertyAccess() {
@@ -293,8 +310,12 @@
 }
 ''');
     var excluded = new Set.from([]);
-    expect(getVariableNameSuggestionsForExpression(null, findNodeAtString(
-            'getSortedNodes();', (node) => node is MethodInvocation), excluded),
+    expect(
+        getVariableNameSuggestionsForExpression(
+            null,
+            findNodeAtString(
+                'getSortedNodes();', (node) => node is MethodInvocation),
+            excluded),
         unorderedEquals(['sortedNodes', 'nodes']));
   }
 
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index d9423a4..6c817b5 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -11,9 +11,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(OrganizeDirectivesTest);
 }
 
@@ -21,6 +22,26 @@
 class OrganizeDirectivesTest extends AbstractSingleUnitTest {
   List<AnalysisError> testErrors;
 
+  void test_remove_duplicateImports() {
+    _computeUnitAndErrors(r'''
+import 'dart:async';
+import 'dart:async';
+
+main() {
+  Future f;
+}''');
+    // validate change
+    _assertOrganize(
+        r'''
+import 'dart:async';
+
+main() {
+  Future f;
+}''',
+        removeUnresolved: true,
+        removeUnused: true);
+  }
+
   void test_remove_unresolvedDirectives() {
     addSource('/existing_part1.dart', 'part of lib;');
     addSource('/existing_part2.dart', 'part of lib;');
diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
index bbf1869..f0accb6 100644
--- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
+++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
@@ -10,9 +10,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(SortMembersTest);
 }
 
@@ -674,6 +675,24 @@
 ''');
   }
 
+  void test_unitMembers_topLevelVariable_withConst() {
+    _parseTestUnit(r'''
+int c;
+int a;
+const B = 2;
+int b;
+const A = 1;
+''');
+    // validate change
+    _assertSort(r'''
+const A = 1;
+const B = 2;
+int a;
+int b;
+int c;
+''');
+  }
+
   void _assertSort(String expectedCode) {
     MemberSorter sorter = new MemberSorter(testCode, testUnit);
     List<SourceEdit> edits = sorter.sort();
diff --git a/pkg/analysis_server/test/services/correction/source_range_test.dart b/pkg/analysis_server/test/services/correction/source_range_test.dart
index 4754b56..ebb0091 100644
--- a/pkg/analysis_server/test/services/correction/source_range_test.dart
+++ b/pkg/analysis_server/test/services/correction/source_range_test.dart
@@ -14,9 +14,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(SourceRangesTest);
 }
 
diff --git a/pkg/analysis_server/test/services/correction/status_test.dart b/pkg/analysis_server/test/services/correction/status_test.dart
index 9620aee..6405e01 100644
--- a/pkg/analysis_server/test/services/correction/status_test.dart
+++ b/pkg/analysis_server/test/services/correction/status_test.dart
@@ -15,9 +15,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RefactoringLocationTest);
   defineReflectiveTests(RefactoringStatusTest);
 }
diff --git a/pkg/analysis_server/test/services/correction/strings_test.dart b/pkg/analysis_server/test/services/correction/strings_test.dart
index 5f78332..2e30c37 100644
--- a/pkg/analysis_server/test/services/correction/strings_test.dart
+++ b/pkg/analysis_server/test/services/correction/strings_test.dart
@@ -8,8 +8,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart' hide isEmpty;
 
+import '../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(StringsTest);
 }
 
diff --git a/pkg/analysis_server/test/services/correction/test_all.dart b/pkg/analysis_server/test/services/correction/test_all.dart
index 418fa67..d1a6bb5 100644
--- a/pkg/analysis_server/test/services/correction/test_all.dart
+++ b/pkg/analysis_server/test/services/correction/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'assist_test.dart' as assist_test;
 import 'change_test.dart' as change_test;
 import 'fix_test.dart' as fix_test;
@@ -19,7 +20,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('correction', () {
     assist_test.main();
     change_test.main();
diff --git a/pkg/analysis_server/test/services/dependencies/library_dependencies_test.dart b/pkg/analysis_server/test/services/dependencies/library_dependencies_test.dart
index 75003c3..69ccf4b 100644
--- a/pkg/analysis_server/test/services/dependencies/library_dependencies_test.dart
+++ b/pkg/analysis_server/test/services/dependencies/library_dependencies_test.dart
@@ -9,9 +9,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(LibraryDependenciesTest);
 }
 
diff --git a/pkg/analysis_server/test/services/dependencies/test_all.dart b/pkg/analysis_server/test/services/dependencies/test_all.dart
index ccc4b9d..1874a07 100644
--- a/pkg/analysis_server/test/services/dependencies/test_all.dart
+++ b/pkg/analysis_server/test/services/dependencies/test_all.dart
@@ -6,11 +6,12 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'library_dependencies_test.dart' as library_dependencies_test;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('dependencies', () {
     library_dependencies_test.main();
   });
diff --git a/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart b/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
index a93591e..da11c93 100644
--- a/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
+++ b/pkg/analysis_server/test/services/index/dart_index_contributor_test.dart
@@ -17,9 +17,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(DartUnitContributorTest);
 }
 
@@ -43,8 +44,10 @@
       isResolved == actual.isResolved;
 }
 
-bool _equalsRecordedRelation(RecordedRelation recordedRelation,
-    IndexableObject expectedIndexable, RelationshipImpl expectedRelationship,
+bool _equalsRecordedRelation(
+    RecordedRelation recordedRelation,
+    IndexableObject expectedIndexable,
+    RelationshipImpl expectedRelationship,
     ExpectedLocation expectedLocation) {
   return expectedIndexable == recordedRelation.indexable &&
       (expectedRelationship == null ||
@@ -67,8 +70,8 @@
   void setUp() {
     super.setUp();
     when(store.aboutToIndexDart(context, anyObject)).thenReturn(true);
-    when(store.recordRelationship(anyObject, anyObject, anyObject))
-        .thenInvoke((IndexableObject indexable, RelationshipImpl relationship,
+    when(store.recordRelationship(anyObject, anyObject, anyObject)).thenInvoke(
+        (IndexableObject indexable, RelationshipImpl relationship,
             LocationImpl location) {
       recordedRelations
           .add(new RecordedRelation(indexable, relationship, location));
@@ -161,7 +164,8 @@
     Element methodElement = findElement("m");
     Element nameElement = new NameElement("m");
     // verify
-    _assertRecordedRelationForElement(nameElement,
+    _assertRecordedRelationForElement(
+        nameElement,
         IndexConstants.NAME_IS_DEFINED_BY,
         _expectedLocation(methodElement, 'm() {}'));
   }
@@ -175,7 +179,8 @@
     Element methodElement = findElement("+");
     Element nameElement = new NameElement("+");
     // verify
-    _assertRecordedRelationForElement(nameElement,
+    _assertRecordedRelationForElement(
+        nameElement,
         IndexConstants.NAME_IS_DEFINED_BY,
         _expectedLocation(methodElement, '+(o) {}', length: 1));
   }
@@ -189,7 +194,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementB = findElement("B");
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_EXTENDED_BY,
         _expectedLocation(classElementB, 'A {} // 2'));
   }
@@ -202,7 +208,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementObject = classElementA.supertype.element;
     // verify
-    _assertRecordedRelationForElement(classElementObject,
+    _assertRecordedRelationForElement(
+        classElementObject,
         IndexConstants.IS_EXTENDED_BY,
         _expectedLocation(classElementA, 'A {}', length: 0));
   }
@@ -217,7 +224,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementC = findElement("C");
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_EXTENDED_BY,
         _expectedLocation(classElementC, 'A with'));
   }
@@ -231,7 +239,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementB = findElement("B");
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_IMPLEMENTED_BY,
         _expectedLocation(classElementB, 'A {} // 2'));
   }
@@ -246,7 +255,8 @@
     ClassElement classElementB = findElement("B");
     ClassElement classElementC = findElement("C");
     // verify
-    _assertRecordedRelationForElement(classElementB,
+    _assertRecordedRelationForElement(
+        classElementB,
         IndexConstants.IS_IMPLEMENTED_BY,
         _expectedLocation(classElementC, 'B; // 3'));
   }
@@ -273,7 +283,9 @@
   }
 
   void test_isInvokedBy_FunctionElement() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 foo() {}
 ''');
@@ -343,7 +355,8 @@
     Element mainElement = findElement("main");
     Element methodElement = findElement("foo");
     // verify
-    _assertRecordedRelationForElement(methodElement,
+    _assertRecordedRelationForElement(
+        methodElement,
         IndexConstants.IS_INVOKED_BY,
         _expectedLocationQ(mainElement, 'foo();'));
   }
@@ -393,7 +406,8 @@
     // verify
     _assertRecordedRelationForElement(readElement, IndexConstants.IS_INVOKED_BY,
         _expectedLocationQ(mainElement, '[0]', length: 1));
-    _assertRecordedRelationForElement(writeElement,
+    _assertRecordedRelationForElement(
+        writeElement,
         IndexConstants.IS_INVOKED_BY,
         _expectedLocationQ(mainElement, '[1] =', length: 1));
   }
@@ -437,7 +451,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementB = findElement("B");
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_MIXED_IN_BY,
         _expectedLocation(classElementB, 'A {} // 2'));
   }
@@ -451,7 +466,8 @@
     ClassElement classElementA = findElement("A");
     ClassElement classElementB = findElement("B");
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_MIXED_IN_BY,
         _expectedLocation(classElementB, 'A; // 2'));
   }
@@ -495,7 +511,8 @@
     Element mainElement = findElement("main");
     Element parameterElement = findElement("p");
     // verify
-    _assertRecordedRelationForElement(parameterElement,
+    _assertRecordedRelationForElement(
+        parameterElement,
         IndexConstants.IS_READ_WRITTEN_BY,
         _expectedLocation(mainElement, 'p += 1'));
   }
@@ -511,7 +528,8 @@
     Element mainElement = findElement("main");
     Element variableElement = findElement("v");
     // verify
-    _assertRecordedRelationForElement(variableElement,
+    _assertRecordedRelationForElement(
+        variableElement,
         IndexConstants.IS_READ_WRITTEN_BY,
         _expectedLocation(mainElement, 'v += 1'));
   }
@@ -568,7 +586,9 @@
   }
 
   void test_isReferencedBy_CompilationUnitElement_export() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     _indexTestUnit('''
@@ -578,13 +598,16 @@
     LibraryElement libElement = testLibraryElement.exportedLibraries[0];
     CompilationUnitElement libUnitElement = libElement.definingCompilationUnit;
     // verify
-    _assertRecordedRelationForElement(libUnitElement,
+    _assertRecordedRelationForElement(
+        libUnitElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(testUnitElement, "'lib.dart'", length: 10));
   }
 
   void test_isReferencedBy_CompilationUnitElement_import() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     _indexTestUnit('''
@@ -594,7 +617,8 @@
     LibraryElement libElement = testLibraryElement.imports[0].importedLibrary;
     CompilationUnitElement libUnitElement = libElement.definingCompilationUnit;
     // verify
-    _assertRecordedRelationForElement(libUnitElement,
+    _assertRecordedRelationForElement(
+        libUnitElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(testUnitElement, "'lib.dart'", length: 10));
   }
@@ -608,7 +632,8 @@
     // prepare elements
     CompilationUnitElement myUnitElement = testLibraryElement.parts[0];
     // verify
-    _assertRecordedRelationForElement(myUnitElement,
+    _assertRecordedRelationForElement(
+        myUnitElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(testUnitElement, "'my_unit.dart';", length: 14));
   }
@@ -678,9 +703,11 @@
     // verify
     _assertRecordedRelationForElement(consA, IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, '(); // marker-main-1', length: 0));
-    _assertRecordedRelationForElement(consA_named,
-        IndexConstants.IS_REFERENCED_BY, _expectedLocation(
-            mainElement, '.named(); // marker-main-2', length: 6));
+    _assertRecordedRelationForElement(
+        consA_named,
+        IndexConstants.IS_REFERENCED_BY,
+        _expectedLocation(mainElement, '.named(); // marker-main-2',
+            length: 6));
   }
 
   void test_isReferencedBy_ConstructorElement_redirection() {
@@ -700,11 +727,13 @@
     ConstructorElement constructorA_bar =
         findNodeElementAtString("A.bar()", isConstructor);
     // A()
-    _assertRecordedRelationForElement(constructorA,
+    _assertRecordedRelationForElement(
+        constructorA,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(constructorA_foo, '(); // marker', length: 0));
     // A.foo()
-    _assertRecordedRelationForElement(constructorA_bar,
+    _assertRecordedRelationForElement(
+        constructorA_bar,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(constructorA, '.bar();', length: 4));
   }
@@ -743,7 +772,8 @@
         _expectedLocationQ(mainElement, 'field = 2; // q'));
     _assertRecordedRelation(indexableGetter, IndexConstants.IS_REFERENCED_BY,
         _expectedLocationQ(mainElement, 'field); // q'));
-    _assertRecordedRelationForElement(fieldElement,
+    _assertRecordedRelationForElement(
+        fieldElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'field: 3'));
   }
@@ -811,7 +841,9 @@
   }
 
   void test_isReferencedBy_ImportElement_noPrefix() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 var myVar;
 myFunction() {}
@@ -846,11 +878,15 @@
   }
 
   void test_isReferencedBy_ImportElement_withPrefix() {
-    addSource('/libA.dart', '''
+    addSource(
+        '/libA.dart',
+        '''
 library libA;
 var myVar;
 ''');
-    addSource('/libB.dart', '''
+    addSource(
+        '/libB.dart',
+        '''
 library libB;
 class MyClass {}
 ''');
@@ -867,16 +903,20 @@
     ImportElement importElementB = testLibraryElement.imports[1];
     Element mainElement = findElement('main');
     // verify
-    _assertRecordedRelationForElement(importElementA,
+    _assertRecordedRelationForElement(
+        importElementA,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.myVar = 1;', length: 5));
-    _assertRecordedRelationForElement(importElementB,
+    _assertRecordedRelationForElement(
+        importElementB,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.MyClass();', length: 5));
   }
 
   void test_isReferencedBy_ImportElement_withPrefix_combinators() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 class A {}
 class B {}
@@ -896,16 +936,20 @@
     ImportElement importElementB = testLibraryElement.imports[1];
     Element mainElement = findElement('main');
     // verify
-    _assertRecordedRelationForElement(importElementA,
+    _assertRecordedRelationForElement(
+        importElementA,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.A();', length: 5));
-    _assertRecordedRelationForElement(importElementB,
+    _assertRecordedRelationForElement(
+        importElementB,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.B();', length: 5));
   }
 
   void test_isReferencedBy_ImportElement_withPrefix_invocation() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 myFunc() {}
 ''');
@@ -919,13 +963,16 @@
     ImportElement importElement = testLibraryElement.imports[0];
     Element mainElement = findElement('main');
     // verify
-    _assertRecordedRelationForElement(importElement,
+    _assertRecordedRelationForElement(
+        importElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.myFunc();', length: 5));
   }
 
   void test_isReferencedBy_ImportElement_withPrefix_oneCandidate() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 class A {}
 class B {}
@@ -940,14 +987,17 @@
     ImportElement importElement = testLibraryElement.imports[0];
     Element mainElement = findElement('main');
     // verify
-    _assertRecordedRelationForElement(importElement,
+    _assertRecordedRelationForElement(
+        importElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(mainElement, 'pref.A();', length: 5));
   }
 
   void test_isReferencedBy_ImportElement_withPrefix_unresolvedElement() {
     verifyNoTestUnitErrors = false;
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     _indexTestUnit('''
@@ -994,7 +1044,9 @@
   }
 
   void test_isReferencedBy_libraryName() {
-    Source libSource = addSource('/lib.dart', '''
+    Source libSource = addSource(
+        '/lib.dart',
+        '''
 library lib;
 part 'test.dart';
 ''');
@@ -1005,7 +1057,8 @@
     testLibraryElement = testUnitElement.library;
     indexDartUnit(store, context, testUnit);
     // verify
-    _assertRecordedRelationForElement(testLibraryElement,
+    _assertRecordedRelationForElement(
+        testLibraryElement,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(testUnitElement, "lib;"));
   }
@@ -1067,7 +1120,9 @@
   }
 
   void test_isReferencedBy_TopLevelVariableElement() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 var V;
 ''');
@@ -1107,7 +1162,8 @@
     Element classElementA = findElement('A');
     Element variableElement = findElement('myVariable');
     // verify
-    _assertRecordedRelationForElement(classElementA,
+    _assertRecordedRelationForElement(
+        classElementA,
         IndexConstants.IS_REFERENCED_BY,
         _expectedLocation(variableElement, 'A myVariable'));
   }
@@ -1148,7 +1204,8 @@
     ConstructorElement constructorElement = classElement.constructors[0];
     FieldElement fieldElement = findElement("field");
     // verify
-    _assertRecordedRelationForElement(fieldElement,
+    _assertRecordedRelationForElement(
+        fieldElement,
         IndexConstants.IS_WRITTEN_BY,
         _expectedLocation(constructorElement, 'field = 5'));
   }
@@ -1164,7 +1221,8 @@
     FieldElement fieldElement = findElement("field");
     Element fieldParameterElement = findNodeElementAtString("field);");
     // verify
-    _assertRecordedRelationForElement(fieldElement,
+    _assertRecordedRelationForElement(
+        fieldElement,
         IndexConstants.IS_WRITTEN_BY,
         _expectedLocation(fieldParameterElement, 'field);'));
   }
@@ -1471,7 +1529,8 @@
   /**
    * Asserts that [recordedRelations] has an item with the expected properties.
    */
-  LocationImpl _assertRecordedRelation(IndexableObject expectedIndexable,
+  LocationImpl _assertRecordedRelation(
+      IndexableObject expectedIndexable,
       RelationshipImpl expectedRelationship,
       ExpectedLocation expectedLocation) {
     for (RecordedRelation recordedRelation in recordedRelations) {
@@ -1480,16 +1539,17 @@
         return recordedRelation.location;
       }
     }
-    fail(
-        "not found\n$expectedIndexable $expectedRelationship " "in $expectedLocation in\n" +
-            recordedRelations.join('\n'));
+    fail("not found\n$expectedIndexable $expectedRelationship "
+        "in $expectedLocation in\n" +
+        recordedRelations.join('\n'));
     return null;
   }
 
   /**
    * Asserts that [recordedRelations] has an item with the expected properties.
    */
-  LocationImpl _assertRecordedRelationForElement(Element expectedElement,
+  LocationImpl _assertRecordedRelationForElement(
+      Element expectedElement,
       RelationshipImpl expectedRelationship,
       ExpectedLocation expectedLocation) {
     return _assertRecordedRelation(new IndexableElement(expectedElement),
@@ -1499,7 +1559,8 @@
   /**
    * Asserts that [recordedRelations] has an item with the expected properties.
    */
-  LocationImpl _assertRecordedRelationForName(String expectedName,
+  LocationImpl _assertRecordedRelationForName(
+      String expectedName,
       RelationshipImpl expectedRelationship,
       ExpectedLocation expectedLocation) {
     return _assertRecordedRelationForElement(
@@ -1568,7 +1629,8 @@
   @override
   String toString() {
     return 'RecordedRelation(indexable=$indexable; relationship=$relationship; '
-        'location=$location; flags=' '${location.isQualified ? "Q" : ""}'
+        'location=$location; flags='
+        '${location.isQualified ? "Q" : ""}'
         '${location.isResolved ? "R" : ""})';
   }
 }
diff --git a/pkg/analysis_server/test/services/index/local_file_index_test.dart b/pkg/analysis_server/test/services/index/local_file_index_test.dart
index 794f32f..a92a22f 100644
--- a/pkg/analysis_server/test/services/index/local_file_index_test.dart
+++ b/pkg/analysis_server/test/services/index/local_file_index_test.dart
@@ -8,8 +8,10 @@
 import 'package:analysis_server/src/services/index/local_file_index.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   test('createLocalFileIndex', () {
     Index index = createLocalFileIndex();
     expect(index, isNotNull);
diff --git a/pkg/analysis_server/test/services/index/local_index_test.dart b/pkg/analysis_server/test/services/index/local_index_test.dart
index 3faa925..3435e63 100644
--- a/pkg/analysis_server/test/services/index/local_index_test.dart
+++ b/pkg/analysis_server/test/services/index/local_index_test.dart
@@ -14,10 +14,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 import 'store/single_source_container.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(LocalIndexTest);
 }
 
diff --git a/pkg/analysis_server/test/services/index/store/codec_test.dart b/pkg/analysis_server/test/services/index/store/codec_test.dart
index 3c0eb1a..2d6a068 100644
--- a/pkg/analysis_server/test/services/index/store/codec_test.dart
+++ b/pkg/analysis_server/test/services/index/store/codec_test.dart
@@ -15,9 +15,10 @@
 
 import '../../../abstract_single_unit.dart';
 import '../../../mocks.dart';
+import '../../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(_ContextCodecTest);
   defineReflectiveTests(_ElementCodecTest);
   defineReflectiveTests(_RelationshipCodecTest);
@@ -74,7 +75,9 @@
   }
 
   void test_encode_CompilationUnitElement() {
-    addSource('/my_part.dart', '''
+    addSource(
+        '/my_part.dart',
+        '''
 part of my_lib;
 ''');
     resolveTestUnit('''
diff --git a/pkg/analysis_server/test/services/index/store/collection_test.dart b/pkg/analysis_server/test/services/index/store/collection_test.dart
index 917afad..77e6bb7 100644
--- a/pkg/analysis_server/test/services/index/store/collection_test.dart
+++ b/pkg/analysis_server/test/services/index/store/collection_test.dart
@@ -8,8 +8,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(_IntArrayToIntMapTest);
   defineReflectiveTests(_IntToIntSetMapTest);
 }
diff --git a/pkg/analysis_server/test/services/index/store/split_store_test.dart b/pkg/analysis_server/test/services/index/store/split_store_test.dart
index b954996..c663dc4 100644
--- a/pkg/analysis_server/test/services/index/store/split_store_test.dart
+++ b/pkg/analysis_server/test/services/index/store/split_store_test.dart
@@ -20,11 +20,12 @@
 import 'package:unittest/unittest.dart';
 
 import '../../../mocks.dart';
+import '../../../utils.dart';
 import 'mocks.dart';
 import 'single_source_container.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(_FileNodeManagerTest);
   defineReflectiveTests(_IndexNodeTest);
   defineReflectiveTests(_LocationDataTest);
@@ -33,7 +34,8 @@
 }
 
 void _assertHasLocation(List<LocationImpl> locations, IndexableElement element,
-    int offset, int length, {bool isQualified: false, bool isResolved: true}) {
+    int offset, int length,
+    {bool isQualified: false, bool isResolved: true}) {
   for (LocationImpl location in locations) {
     if ((element == null || location.indexable == element) &&
         location.offset == offset &&
diff --git a/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart b/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart
index 3eaf5bc..a6974aa 100644
--- a/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart
+++ b/pkg/analysis_server/test/services/index/store/temporary_folder_file_manager_test.dart
@@ -11,8 +11,10 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(_SeparateFileManagerTest);
 }
 
diff --git a/pkg/analysis_server/test/services/index/store/test_all.dart b/pkg/analysis_server/test/services/index/store/test_all.dart
index 236b2e5..ab63c97 100644
--- a/pkg/analysis_server/test/services/index/store/test_all.dart
+++ b/pkg/analysis_server/test/services/index/store/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../../utils.dart';
 import 'codec_test.dart' as codec_test;
 import 'collection_test.dart' as collection_test;
 import 'split_store_test.dart' as split_store_test;
@@ -15,7 +16,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('store', () {
     codec_test.main();
     collection_test.main();
diff --git a/pkg/analysis_server/test/services/index/test_all.dart b/pkg/analysis_server/test/services/index/test_all.dart
index 5aff005..39bbe6e 100644
--- a/pkg/analysis_server/test/services/index/test_all.dart
+++ b/pkg/analysis_server/test/services/index/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'dart_index_contributor_test.dart' as dart_index_contributor_test;
 import 'local_file_index_test.dart' as local_file_index_test;
 import 'local_index_test.dart' as local_index_test;
@@ -15,7 +16,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('index', () {
     dart_index_contributor_test.main();
     local_file_index_test.main();
diff --git a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
index 1c90d2a..f333fc6 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart
@@ -11,12 +11,12 @@
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ConvertGetterToMethodTest);
 }
 
@@ -89,7 +89,9 @@
   }
 
   test_change_multipleFiles() {
-    indexUnit('/other.dart', r'''
+    indexUnit(
+        '/other.dart',
+        r'''
 class A {
   int get test => 1;
 }
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index 11f3f8a..a629d3e 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -11,12 +11,12 @@
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:analyzer/src/generated/element.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ConvertMethodToGetterTest);
 }
 
@@ -89,7 +89,9 @@
   }
 
   test_change_multipleFiles() {
-    indexUnit('/other.dart', r'''
+    indexUnit(
+        '/other.dart',
+        r'''
 class A {
   int test() => 1;
 }
diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
index a5c29c2..bba2a6e 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
@@ -13,10 +13,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ExtractLocalTest);
 }
 
@@ -35,7 +36,8 @@
     // conflicting name
     RefactoringStatus status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.WARNING,
-        expectedMessage: "A variable with name 'res' is already defined in the visible scope.");
+        expectedMessage:
+            "A variable with name 'res' is already defined in the visible scope.");
   }
 
   test_checkFinalConditions_sameVariable_before() async {
@@ -49,7 +51,8 @@
     // conflicting name
     RefactoringStatus status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.WARNING,
-        expectedMessage: "A variable with name 'res' is already defined in the visible scope.");
+        expectedMessage:
+            "A variable with name 'res' is already defined in the visible scope.");
   }
 
   test_checkInitialConditions_assignmentLeftHandSize() async {
@@ -127,7 +130,8 @@
     // check conditions
     RefactoringStatus status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Expression inside of function must be selected to activate this refactoring.');
+        expectedMessage:
+            'Expression inside of function must be selected to activate this refactoring.');
   }
 
   test_checkInitialConditions_stringSelection_leadingQuote() async {
@@ -140,7 +144,8 @@
     // check conditions
     RefactoringStatus status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Cannot extract only leading or trailing quote of string literal.');
+        expectedMessage:
+            'Cannot extract only leading or trailing quote of string literal.');
   }
 
   test_checkInitialConditions_stringSelection_trailingQuote() async {
@@ -153,7 +158,8 @@
     // check conditions
     RefactoringStatus status = await refactoring.checkAllConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Cannot extract only leading or trailing quote of string literal.');
+        expectedMessage:
+            'Cannot extract only leading or trailing quote of string literal.');
   }
 
   test_checkLocalName() {
@@ -933,7 +939,8 @@
   Future _assertInitialConditions_fatal_selection() async {
     RefactoringStatus status = await refactoring.checkInitialConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Expression must be selected to activate this refactoring.');
+        expectedMessage:
+            'Expression must be selected to activate this refactoring.');
   }
 
   /**
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index d33a930..dfa2b23 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -13,10 +13,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ExtractMethodTest);
 }
 
@@ -872,7 +873,8 @@
     // check
     RefactoringStatus status = await refactoring.checkInitialConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Cannot extract closure as method, it references 1 external variable(s).');
+        expectedMessage:
+            'Cannot extract closure as method, it references 1 external variable(s).');
   }
 
   test_closure_bad_referencesParameter() async {
@@ -886,7 +888,8 @@
     // check
     RefactoringStatus status = await refactoring.checkInitialConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
-        expectedMessage: 'Cannot extract closure as method, it references 1 external variable(s).');
+        expectedMessage:
+            'Cannot extract closure as method, it references 1 external variable(s).');
   }
 
   test_fromTopLevelVariableInitializerClosure() {
@@ -2668,7 +2671,9 @@
   }
 
   void _addLibraryReturningAsync() {
-    addSource('/asyncLib.dart', r'''
+    addSource(
+        '/asyncLib.dart',
+        r'''
 library asyncLib;
 import 'dart:async';
 Future<int> newFuture() => null;
diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
index 01c7467..3aa628b 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart
@@ -11,10 +11,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(InlineLocalTest);
 }
 
@@ -627,7 +628,7 @@
     expect(refactoring.referenceCount, 0);
     assertRefactoringStatus(status, RefactoringProblemSeverity.FATAL,
         expectedMessage: 'Local variable declaration or reference must be '
-        'selected to activate this refactoring.');
+            'selected to activate this refactoring.');
   }
 
   void _createRefactoring(String search) {
diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
index 92cbc76..4e63640 100644
--- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart
@@ -14,10 +14,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(InlineMethodTest);
 }
 
@@ -116,7 +117,8 @@
     // final conditions
     status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: 'All references must be inlined to remove the source.');
+        expectedMessage:
+            'All references must be inlined to remove the source.');
   }
 
   test_bad_notExecutableElement() {
diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
index cbae32f..859b8fa 100644
--- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart
@@ -12,13 +12,13 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(MoveFileTest);
 }
 
@@ -52,7 +52,9 @@
     assertNoFileChange(pathA);
     assertFileChangeResult(pathB, "import '22/new_name.dart';");
     assertNoFileChange(pathC);
-    assertFileChangeResult(testFile, '''
+    assertFileChangeResult(
+        testFile,
+        '''
 library lib;
 import 'dart:math';
 import 'c.dart';
@@ -65,7 +67,9 @@
   test_file_importedLibrary() async {
     String pathA = '/project/000/1111/a.dart';
     testFile = '/project/000/1111/sub/folder/test.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 import 'sub/folder/test.dart';
 ''');
     addTestSource('');
@@ -73,7 +77,9 @@
     // perform refactoring
     _createRefactoring('/project/000/new/folder/name/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 import '../new/folder/name/new_name.dart';
 ''');
     assertNoFileChange(testFile);
@@ -82,7 +88,9 @@
   test_file_importedLibrary_down() async {
     String pathA = '/project/000/1111/a.dart';
     testFile = '/project/000/1111/test.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 import 'test.dart';
 ''');
     addTestSource('');
@@ -90,7 +98,9 @@
     // perform refactoring
     _createRefactoring('/project/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 import '22/new_name.dart';
 ''');
     assertNoFileChange(testFile);
@@ -110,7 +120,9 @@
     ]);
     // do testing
     String pathA = '/project/bin/a.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 import 'package:my_pkg/aaa/test.dart';
 ''');
     addTestSource('');
@@ -118,7 +130,9 @@
     // perform refactoring
     _createRefactoring('/packages/my_pkg/bbb/ccc/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 import 'package:my_pkg/bbb/ccc/new_name.dart';
 ''');
     assertNoFileChange(testFile);
@@ -127,7 +141,9 @@
   test_file_importedLibrary_up() async {
     String pathA = '/project/000/1111/a.dart';
     testFile = '/project/000/1111/22/test.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 import '22/test.dart';
 ''');
     addTestSource('');
@@ -135,7 +151,9 @@
     // perform refactoring
     _createRefactoring('/project/000/1111/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 import 'new_name.dart';
 ''');
     assertNoFileChange(testFile);
@@ -144,7 +162,9 @@
   test_file_sourcedUnit() async {
     String pathA = '/project/000/1111/a.dart';
     testFile = '/project/000/1111/22/test.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 library lib;
 part '22/test.dart';
 ''');
@@ -155,7 +175,9 @@
     // perform refactoring
     _createRefactoring('/project/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 library lib;
 part '22/new_name.dart';
 ''');
@@ -166,11 +188,15 @@
     String pathA = '/project/000/1111/a.dart';
     String pathB = '/project/000/b.dart';
     testFile = '/project/000/1111/22/test.dart';
-    addSource(pathA, '''
+    addSource(
+        pathA,
+        '''
 library lib;
 part '22/test.dart';
 ''');
-    addSource(pathB, '''
+    addSource(
+        pathB,
+        '''
 library lib;
 part '1111/22/test.dart';
 ''');
@@ -181,11 +207,15 @@
     // perform refactoring
     _createRefactoring('/project/000/1111/22/new_name.dart');
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pathA, '''
+    assertFileChangeResult(
+        pathA,
+        '''
 library lib;
 part '22/new_name.dart';
 ''');
-    assertFileChangeResult(pathB, '''
+    assertFileChangeResult(
+        pathB,
+        '''
 library lib;
 part '1111/22/new_name.dart';
 ''');
@@ -195,13 +225,17 @@
   test_project() async {
     String pubspecPath = '/testName/pubspec.yaml';
     String appPath = '/testName/bin/myApp.dart';
-    provider.newFile(pubspecPath, '''
+    provider.newFile(
+        pubspecPath,
+        '''
 name: testName
 version: 0.0.1
 description: My pubspec file.
 ''');
     addSource('/testName/lib/myLib.dart', '');
-    addSource(appPath, '''
+    addSource(
+        appPath,
+        '''
 import 'package:testName/myLib.dart';
 export 'package:testName/myLib.dart';
 ''');
@@ -220,12 +254,16 @@
         provider, searchEngine, context, null, '/testName');
     refactoring.newFile = '/newName';
     await _assertSuccessfulRefactoring();
-    assertFileChangeResult(pubspecPath, '''
+    assertFileChangeResult(
+        pubspecPath,
+        '''
 name: newName
 version: 0.0.1
 description: My pubspec file.
 ''');
-    assertFileChangeResult(appPath, '''
+    assertFileChangeResult(
+        appPath,
+        '''
 import 'package:newName/myLib.dart';
 export 'package:newName/myLib.dart';
 ''');
diff --git a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
index b43fac4..f50b041 100644
--- a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart
@@ -9,12 +9,12 @@
 import 'package:analysis_server/src/services/refactoring/naming_conventions.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_refactoring.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(NamingConventionsTest);
 }
 
@@ -50,7 +50,8 @@
   void test_validateClassName_notIdentifierStart() {
     assertRefactoringStatus(
         validateClassName("-NewName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Class name must begin with an uppercase letter or underscore.");
+        expectedMessage:
+            "Class name must begin with an uppercase letter or underscore.");
   }
 
   void test_validateClassName_null() {
@@ -84,7 +85,8 @@
   void test_validateConstructorName_doesNotStartWithLowerCase() {
     assertRefactoringStatus(
         validateConstructorName("NewName"), RefactoringProblemSeverity.WARNING,
-        expectedMessage: "Constructor name should start with a lowercase letter.");
+        expectedMessage:
+            "Constructor name should start with a lowercase letter.");
   }
 
   void test_validateConstructorName_empty() {
@@ -94,7 +96,8 @@
   void test_validateConstructorName_leadingBlanks() {
     assertRefactoringStatus(
         validateConstructorName(" newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Constructor name must not start or end with a blank.");
+        expectedMessage:
+            "Constructor name must not start or end with a blank.");
   }
 
   void test_validateConstructorName_notIdentifierMiddle() {
@@ -106,7 +109,8 @@
   void test_validateConstructorName_notIdentifierStart() {
     assertRefactoringStatus(
         validateConstructorName("2name"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Constructor name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Constructor name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateConstructorName_null() {
@@ -126,7 +130,8 @@
   void test_validateConstructorName_trailingBlanks() {
     assertRefactoringStatus(
         validateConstructorName("newName "), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Constructor name must not start or end with a blank.");
+        expectedMessage:
+            "Constructor name must not start or end with a blank.");
   }
 
   void test_validateFieldName_doesNotStartWithLowerCase() {
@@ -156,7 +161,8 @@
   void test_validateFieldName_notIdentifierStart() {
     assertRefactoringStatus(
         validateFieldName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Field name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Field name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateFieldName_null() {
@@ -210,7 +216,8 @@
   void test_validateFunctionName_notIdentifierStart() {
     assertRefactoringStatus(
         validateFunctionName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Function name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Function name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateFunctionName_null() {
@@ -240,7 +247,8 @@
   void test_validateFunctionTypeAliasName_doesNotStartWithLowerCase() {
     assertRefactoringStatus(validateFunctionTypeAliasName("newName"),
         RefactoringProblemSeverity.WARNING,
-        expectedMessage: "Function type alias name should start with an uppercase letter.");
+        expectedMessage:
+            "Function type alias name should start with an uppercase letter.");
   }
 
   void test_validateFunctionTypeAliasName_empty() {
@@ -252,7 +260,8 @@
   void test_validateFunctionTypeAliasName_leadingBlanks() {
     assertRefactoringStatus(validateFunctionTypeAliasName(" NewName"),
         RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Function type alias name must not start or end with a blank.");
+        expectedMessage:
+            "Function type alias name must not start or end with a blank.");
   }
 
   void test_validateFunctionTypeAliasName_notIdentifierMiddle() {
@@ -264,7 +273,8 @@
   void test_validateFunctionTypeAliasName_notIdentifierStart() {
     assertRefactoringStatus(validateFunctionTypeAliasName("-NewName"),
         RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Function type alias name must begin with an uppercase letter or underscore.");
+        expectedMessage:
+            "Function type alias name must begin with an uppercase letter or underscore.");
   }
 
   void test_validateFunctionTypeAliasName_null() {
@@ -292,13 +302,15 @@
   void test_validateFunctionTypeAliasName_trailingBlanks() {
     assertRefactoringStatus(validateFunctionTypeAliasName("NewName "),
         RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Function type alias name must not start or end with a blank.");
+        expectedMessage:
+            "Function type alias name must not start or end with a blank.");
   }
 
   void test_validateImportPrefixName_doesNotStartWithLowerCase() {
     assertRefactoringStatus(
         validateImportPrefixName("NewName"), RefactoringProblemSeverity.WARNING,
-        expectedMessage: "Import prefix name should start with a lowercase letter.");
+        expectedMessage:
+            "Import prefix name should start with a lowercase letter.");
   }
 
   void test_validateImportPrefixName_empty() {
@@ -308,7 +320,8 @@
   void test_validateImportPrefixName_leadingBlanks() {
     assertRefactoringStatus(
         validateImportPrefixName(" newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Import prefix name must not start or end with a blank.");
+        expectedMessage:
+            "Import prefix name must not start or end with a blank.");
   }
 
   void test_validateImportPrefixName_notIdentifierMiddle() {
@@ -320,7 +333,8 @@
   void test_validateImportPrefixName_notIdentifierStart() {
     assertRefactoringStatus(
         validateImportPrefixName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Import prefix name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Import prefix name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateImportPrefixName_null() {
@@ -344,7 +358,8 @@
   void test_validateImportPrefixName_trailingBlanks() {
     assertRefactoringStatus(
         validateImportPrefixName("newName "), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Import prefix name must not start or end with a blank.");
+        expectedMessage:
+            "Import prefix name must not start or end with a blank.");
   }
 
   void test_validateLabelName_doesNotStartWithLowerCase() {
@@ -374,7 +389,8 @@
   void test_validateLabelName_notIdentifierStart() {
     assertRefactoringStatus(
         validateLabelName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Label name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Label name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateLabelName_null() {
@@ -420,19 +436,22 @@
         expectedMessage: "Library name identifier must not be empty.");
     assertRefactoringStatus(
         validateLibraryName("my. .name"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Library name identifier must not start or end with a blank.");
+        expectedMessage:
+            "Library name identifier must not start or end with a blank.");
   }
 
   void test_validateLibraryName_hasUpperCase() {
     assertRefactoringStatus(
         validateLibraryName("my.newName"), RefactoringProblemSeverity.WARNING,
-        expectedMessage: "Library name should consist of lowercase identifier separated by dots.");
+        expectedMessage:
+            "Library name should consist of lowercase identifier separated by dots.");
   }
 
   void test_validateLibraryName_leadingBlanks() {
     assertRefactoringStatus(
         validateLibraryName("my. name"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Library name identifier must not start or end with a blank.");
+        expectedMessage:
+            "Library name identifier must not start or end with a blank.");
   }
 
   void test_validateLibraryName_notIdentifierMiddle() {
@@ -444,7 +463,8 @@
   void test_validateLibraryName_notIdentifierStart() {
     assertRefactoringStatus(
         validateLibraryName("my.2bad.name"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Library name identifier must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Library name identifier must begin with a lowercase letter or underscore.");
   }
 
   void test_validateLibraryName_null() {
@@ -464,7 +484,8 @@
   void test_validateLibraryName_trailingBlanks() {
     assertRefactoringStatus(
         validateLibraryName("my.bad .name"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Library name identifier must not start or end with a blank.");
+        expectedMessage:
+            "Library name identifier must not start or end with a blank.");
   }
 
   void test_validateMethodName_doesNotStartWithLowerCase() {
@@ -500,7 +521,8 @@
   void test_validateMethodName_notIdentifierStart() {
     assertRefactoringStatus(
         validateMethodName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Method name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Method name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateMethodName_null() {
@@ -530,7 +552,8 @@
   void test_validateParameterName_doesNotStartWithLowerCase() {
     assertRefactoringStatus(
         validateParameterName("NewName"), RefactoringProblemSeverity.WARNING,
-        expectedMessage: "Parameter name should start with a lowercase letter.");
+        expectedMessage:
+            "Parameter name should start with a lowercase letter.");
   }
 
   void test_validateParameterName_empty() {
@@ -554,7 +577,8 @@
   void test_validateParameterName_notIdentifierStart() {
     assertRefactoringStatus(
         validateParameterName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Parameter name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Parameter name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateParameterName_null() {
@@ -608,7 +632,8 @@
   void test_validateVariableName_notIdentifierStart() {
     assertRefactoringStatus(
         validateVariableName("2newName"), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "Variable name must begin with a lowercase letter or underscore.");
+        expectedMessage:
+            "Variable name must begin with a lowercase letter or underscore.");
   }
 
   void test_validateVariableName_null() {
diff --git a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
index e88f489..51b7402 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart
@@ -9,10 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameClassMemberTest);
 }
 
@@ -30,7 +31,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Class 'A' already declares method with name 'newName'.",
+        expectedMessage:
+            "Class 'A' already declares method with name 'newName'.",
         expectedContextSearch: 'newName() {} // existing');
   }
 
@@ -61,7 +63,9 @@
   test() {}
 }
 ''');
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library my.lib;
 import 'test.dart';
 
@@ -92,7 +96,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Usage of renamed method will be shadowed by local variable 'newName'.",
+        expectedMessage:
+            "Usage of renamed method will be shadowed by local variable 'newName'.",
         expectedContextSearch: 'test(); // marker');
   }
 
@@ -113,7 +118,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Usage of renamed method will be shadowed by local variable 'newName'.",
+        expectedMessage:
+            "Usage of renamed method will be shadowed by local variable 'newName'.",
         expectedContextSearch: 'test(); // marker');
   }
 
@@ -164,7 +170,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Usage of renamed method will be shadowed by parameter 'newName'.",
+        expectedMessage:
+            "Usage of renamed method will be shadowed by parameter 'newName'.",
         expectedContextSearch: 'test(); // marker');
   }
 
@@ -229,7 +236,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Renamed method will be shadowed by method 'B.newName'.",
+        expectedMessage:
+            "Renamed method will be shadowed by method 'B.newName'.",
         expectedContextSearch: 'newName() {} // marker');
   }
 
@@ -284,7 +292,8 @@
     refactoring.newName = 'test';
     assertRefactoringStatus(
         refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "The new name must be different than the current name.");
+        expectedMessage:
+            "The new name must be different than the current name.");
     // OK
     refactoring.newName = 'newName';
     assertRefactoringStatusOK(refactoring.checkNewName());
@@ -559,7 +568,9 @@
   }
 
   test_createChange_MethodElement_potential_private_otherLibrary() async {
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library lib;
 main(p) {
   p._test();
diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
index 04ec5dc..03b1693 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
@@ -11,10 +11,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameConstructorTest);
 }
 
@@ -32,7 +33,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Class 'A' already declares constructor with name 'newName'.",
+        expectedMessage:
+            "Class 'A' already declares constructor with name 'newName'.",
         expectedContextSearch: 'newName() {} // existing');
   }
 
@@ -48,7 +50,8 @@
     refactoring.newName = 'newName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Class 'A' already declares method with name 'newName'.",
+        expectedMessage:
+            "Class 'A' already declares method with name 'newName'.",
         expectedContextSearch: 'newName() {} // existing');
   }
 
@@ -69,7 +72,8 @@
     refactoring.newName = 'test';
     assertRefactoringStatus(
         refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "The new name must be different than the current name.");
+        expectedMessage:
+            "The new name must be different than the current name.");
     // empty
     refactoring.newName = '';
     assertRefactoringStatusOK(refactoring.checkNewName());
diff --git a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
index 806eda4..2dac474 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart
@@ -9,10 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameImportTest);
 }
 
@@ -31,7 +32,8 @@
     refactoring.newName = 'test';
     assertRefactoringStatus(
         refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "The new name must be different than the current name.");
+        expectedMessage:
+            "The new name must be different than the current name.");
     // empty
     refactoring.newName = '';
     assertRefactoringStatusOK(refactoring.checkNewName());
diff --git a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
index dadf102..31734e6 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart
@@ -8,10 +8,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameLabelTest);
 }
 
diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
index 098ff7d..3a16a14 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart
@@ -9,10 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameLibraryTest);
 }
 
@@ -37,11 +38,14 @@
     refactoring.newName = 'my.app';
     assertRefactoringStatus(
         refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "The new name must be different than the current name.");
+        expectedMessage:
+            "The new name must be different than the current name.");
   }
 
   test_createChange() async {
-    Source unitSource = addSource('/part.dart', '''
+    Source unitSource = addSource(
+        '/part.dart',
+        '''
 part of my.app;
 ''');
     indexTestUnit('''
@@ -60,7 +64,9 @@
 library the.new.name;
 part 'part.dart';
 ''');
-    assertFileChangeResult('/part.dart', '''
+    assertFileChangeResult(
+        '/part.dart',
+        '''
 part of the.new.name;
 ''');
   }
diff --git a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
index 81bc8b8..dda32ed 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart
@@ -9,10 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameLocalTest);
 }
 
@@ -131,7 +132,7 @@
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
         expectedMessage: 'Usage of field "A.newName" declared in "test.dart" '
-        'will be shadowed by renamed local variable.',
+            'will be shadowed by renamed local variable.',
         expectedContextSearch: 'newName);');
   }
 
@@ -154,7 +155,7 @@
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
         expectedMessage: 'Usage of field "B.newName" declared in "test.dart" '
-        'will be shadowed by renamed parameter.',
+            'will be shadowed by renamed parameter.',
         expectedContextSearch: 'newName);');
   }
 
@@ -422,7 +423,9 @@
   A({test});
 }
 ''');
-    indexUnit('/test2.dart', '''
+    indexUnit(
+        '/test2.dart',
+        '''
 import 'test.dart';
 main() {
   new A(test: 2);
@@ -438,7 +441,9 @@
   A({newName});
 }
 ''');
-    assertFileChangeResult('/test2.dart', '''
+    assertFileChangeResult(
+        '/test2.dart',
+        '''
 import 'test.dart';
 main() {
   new A(newName: 2);
@@ -447,7 +452,9 @@
   }
 
   test_createChange_parameter_named_updateHierarchy() async {
-    indexUnit('/test2.dart', '''
+    indexUnit(
+        '/test2.dart',
+        '''
 library test2;
 class A {
   void foo({int test: 1}) {
@@ -491,7 +498,9 @@
   }
 }
 ''');
-    assertFileChangeResult('/test2.dart', '''
+    assertFileChangeResult(
+        '/test2.dart',
+        '''
 library test2;
 class A {
   void foo({int newName: 1}) {
diff --git a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
index 229d1be..82df4e8 100644
--- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart
@@ -9,10 +9,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'abstract_rename.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(RenameUnitMemberTest);
 }
 
@@ -42,7 +43,8 @@
     refactoring.newName = 'NewName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Library already declares function type alias with name 'NewName'.",
+        expectedMessage:
+            "Library already declares function type alias with name 'NewName'.",
         expectedContextSearch: 'NewName(); // existing');
   }
 
@@ -69,7 +71,9 @@
     indexTestUnit('''
 class Test {}
 ''');
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library my.lib;
 import 'test.dart';
 
@@ -100,7 +104,8 @@
     refactoring.newName = 'NewName';
     RefactoringStatus status = await refactoring.checkFinalConditions();
     assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
-        expectedMessage: "Reference to renamed class will be shadowed by method 'A.NewName'.",
+        expectedMessage:
+            "Reference to renamed class will be shadowed by method 'A.NewName'.",
         expectedContextSearch: 'NewName() {}');
   }
 
@@ -108,7 +113,9 @@
     indexTestUnit('''
 class Test {}
 ''');
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library my.lib;
 import 'test.dart';
 class A {
@@ -132,7 +139,9 @@
     indexTestUnit('''
 class Test {}
 ''');
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library my.lib;
 import 'test.dart' hide Test;
 class A {
@@ -173,7 +182,9 @@
   }
 
   test_checkFinalConditions_shadowsInSubClass_notImportedLib() async {
-    indexUnit('/lib.dart', '''
+    indexUnit(
+        '/lib.dart',
+        '''
 library my.lib;
 class A {
   NewName() {}
@@ -232,7 +243,8 @@
     refactoring.newName = 'Test';
     assertRefactoringStatus(
         refactoring.checkNewName(), RefactoringProblemSeverity.FATAL,
-        expectedMessage: "The new name must be different than the current name.");
+        expectedMessage:
+            "The new name must be different than the current name.");
     // OK
     refactoring.newName = 'NewName';
     assertRefactoringStatusOK(refactoring.checkNewName());
diff --git a/pkg/analysis_server/test/services/refactoring/test_all.dart b/pkg/analysis_server/test/services/refactoring/test_all.dart
index e80b9a7..1dcb857 100644
--- a/pkg/analysis_server/test/services/refactoring/test_all.dart
+++ b/pkg/analysis_server/test/services/refactoring/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'convert_getter_to_method_test.dart' as convert_getter_to_method_test;
 import 'convert_method_to_getter_test.dart' as convert_method_to_getter_test;
 import 'extract_local_test.dart' as extract_local_test;
@@ -24,7 +25,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('refactoring', () {
     convert_getter_to_method_test.main();
     convert_method_to_getter_test.main();
diff --git a/pkg/analysis_server/test/services/search/hierarchy_test.dart b/pkg/analysis_server/test/services/search/hierarchy_test.dart
index 8bb1c61..e1d0bfb 100644
--- a/pkg/analysis_server/test/services/search/hierarchy_test.dart
+++ b/pkg/analysis_server/test/services/search/hierarchy_test.dart
@@ -15,9 +15,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(HierarchyTest);
 }
 
@@ -222,8 +223,10 @@
     {
       ClassElement classB = findElement('B');
       List<Element> members = getMembers(classB);
-      expect(members.map((e) => e.name), unorderedEquals(
-          ['mb1', 'mb2', 'ma1', 'ma2', '==', 'toString', 'hashCode']));
+      expect(
+          members.map((e) => e.name),
+          unorderedEquals(
+              ['mb1', 'mb2', 'ma1', 'ma2', '==', 'toString', 'hashCode']));
     }
   }
 
diff --git a/pkg/analysis_server/test/services/search/search_engine_test.dart b/pkg/analysis_server/test/services/search/search_engine_test.dart
index 7eaf70b..5e1c0e6 100644
--- a/pkg/analysis_server/test/services/search/search_engine_test.dart
+++ b/pkg/analysis_server/test/services/search/search_engine_test.dart
@@ -17,9 +17,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_single_unit.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(SearchEngineImplTest);
 }
 
@@ -185,7 +186,9 @@
   }
 
   Future test_searchReferences_CompilationUnitElement() {
-    addSource('/my_part.dart', '''
+    addSource(
+        '/my_part.dart',
+        '''
 part of lib;
 ''');
     _indexTestUnit('''
@@ -211,8 +214,9 @@
 ''');
     ConstructorElement element = findElement('named');
     Element mainElement = findElement('main');
-    var expected =
-        [_expectId(mainElement, MatchKind.REFERENCE, '.named();', length: 6)];
+    var expected = [
+      _expectId(mainElement, MatchKind.REFERENCE, '.named();', length: 6)
+    ];
     return _verifyReferences(element, expected);
   }
 
@@ -313,8 +317,9 @@
     ImportElement element = testLibraryElement.imports[0];
     Element mainElement = findElement('main');
     var kind = MatchKind.REFERENCE;
-    var expected =
-        [_expectId(mainElement, kind, 'math.PI);', length: 'math.'.length)];
+    var expected = [
+      _expectId(mainElement, kind, 'math.PI);', length: 'math.'.length)
+    ];
     return _verifyReferences(element, expected);
   }
 
@@ -418,8 +423,9 @@
 ''');
     MethodMember method = findNodeElementAtString('m(); // ref');
     Element mainElement = findElement('main');
-    var expected =
-        [_expectIdQ(mainElement, MatchKind.INVOCATION, 'm(); // ref')];
+    var expected = [
+      _expectIdQ(mainElement, MatchKind.INVOCATION, 'm(); // ref')
+    ];
     return _verifyReferences(method, expected);
   }
 
@@ -505,7 +511,9 @@
   }
 
   Future test_searchReferences_TopLevelVariableElement() {
-    addSource('/lib.dart', '''
+    addSource(
+        '/lib.dart',
+        '''
 library lib;
 var V;
 ''');
diff --git a/pkg/analysis_server/test/services/search/test_all.dart b/pkg/analysis_server/test/services/search/test_all.dart
index 4f17bd7..187d3f3 100644
--- a/pkg/analysis_server/test/services/search/test_all.dart
+++ b/pkg/analysis_server/test/services/search/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'hierarchy_test.dart' as hierarchy_test;
 import 'search_engine_test.dart' as search_engine_test;
 
@@ -13,7 +14,7 @@
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('search', () {
     hierarchy_test.main();
     search_engine_test.main();
diff --git a/pkg/analysis_server/test/services/test_all.dart b/pkg/analysis_server/test/services/test_all.dart
index 8ccc397..baef17c 100644
--- a/pkg/analysis_server/test/services/test_all.dart
+++ b/pkg/analysis_server/test/services/test_all.dart
@@ -4,8 +4,7 @@
 
 library test.services;
 
-import 'package:unittest/unittest.dart';
-
+import '../utils.dart';
 import 'completion/test_all.dart' as completion_all;
 import 'correction/test_all.dart' as correction_all;
 import 'dependencies/test_all.dart' as dependencies_all;
@@ -15,7 +14,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   completion_all.main();
   correction_all.main();
   dependencies_all.main();
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index ba79457..a961aae 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -17,8 +17,10 @@
 import 'package:unittest/unittest.dart';
 
 import 'mocks.dart';
+import 'utils.dart';
 
 main() {
+  initializeTestEnvironment();
   group('SocketServer', () {
     test('createAnalysisServer_successful',
         SocketServerTest.createAnalysisServer_successful);
@@ -109,9 +111,13 @@
     ServerPlugin serverPlugin = new ServerPlugin();
     ExtensionManager manager = new ExtensionManager();
     manager.processPlugins([serverPlugin]);
-    return new SocketServer(new AnalysisServerOptions(),
-        DirectoryBasedDartSdk.defaultSdk, InstrumentationService.NULL_SERVICE,
-        serverPlugin, null, null);
+    return new SocketServer(
+        new AnalysisServerOptions(),
+        DirectoryBasedDartSdk.defaultSdk,
+        InstrumentationService.NULL_SERVICE,
+        serverPlugin,
+        null,
+        null);
   }
 }
 
diff --git a/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart b/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
index aaf8a0f..2c1d252 100644
--- a/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
+++ b/pkg/analysis_server/test/source/caching_put_package_map_provider_test.dart
@@ -16,8 +16,10 @@
 import 'package:analyzer/src/generated/sdk_io.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
 
   group('CachingPubPackageMapProvider', () {
     MemoryResourceProvider resProvider;
@@ -29,7 +31,9 @@
       'input_files': ['/tmp/proj1/pubspec.yaml']
     };
 
-    Map result1error = {'input_files': ['/tmp/proj1/pubspec.lock']};
+    Map result1error = {
+      'input_files': ['/tmp/proj1/pubspec.lock']
+    };
 
     Map result2 = {
       'packages': {'bar': '/tmp/proj2/packages/bar'},
@@ -66,8 +70,10 @@
     }
 
     CachingPubPackageMapProvider newPkgProvider() {
-      return new CachingPubPackageMapProvider(resProvider,
-          DirectoryBasedDartSdk.defaultSdk, mockRunner.runPubList,
+      return new CachingPubPackageMapProvider(
+          resProvider,
+          DirectoryBasedDartSdk.defaultSdk,
+          mockRunner.runPubList,
           mockWriteFile);
     }
 
@@ -79,7 +85,6 @@
     });
 
     group('computePackageMap', () {
-
       // Assert pub list called once and results are cached in memory
       test('cache memory', () {
         expect(mockRunner.runCount, 0);
diff --git a/pkg/analysis_server/test/source/test_all.dart b/pkg/analysis_server/test/source/test_all.dart
index 3a3e709..1389dd3 100644
--- a/pkg/analysis_server/test/source/test_all.dart
+++ b/pkg/analysis_server/test/source/test_all.dart
@@ -4,11 +4,11 @@
 
 library test.source;
 
+import '../utils.dart';
 import 'caching_put_package_map_provider_test.dart' as caching_provider_test;
-import 'package:unittest/unittest.dart';
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   caching_provider_test.main();
 }
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index d5f5729..a3642f6 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -6,13 +6,14 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'utilities/test_all.dart' as utilities_all;
 
 /**
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('analysis_server', () {
     utilities_all.main();
   });
diff --git a/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart b/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
index a378fad..0647a83 100644
--- a/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
+++ b/pkg/analysis_server/test/src/utilities/change_builder_core_test.dart
@@ -4,15 +4,17 @@
 
 library analysis_server.test.src.utilities.change_builder_core_test;
 
-import 'package:analysis_server/src/utilities/change_builder_core.dart';
 import 'package:analysis_server/src/protocol.dart';
+import 'package:analysis_server/src/utilities/change_builder_core.dart';
 import 'package:analysis_server/utilities/change_builder_core.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:unittest/unittest.dart';
+
 import '../../domain_execution_test.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(ChangeBuilderImplTest);
   defineReflectiveTests(EditBuilderImplTest);
   defineReflectiveTests(FileEditBuilderImplTest);
@@ -25,7 +27,8 @@
     ChangeBuilderImpl builder = new ChangeBuilderImpl();
     TestSource source = new TestSource('/test.dart');
     int timeStamp = 54;
-    FileEditBuilderImpl fileEditBuilder = builder.createFileEditBuilder(source, timeStamp);
+    FileEditBuilderImpl fileEditBuilder =
+        builder.createFileEditBuilder(source, timeStamp);
     expect(fileEditBuilder, new isInstanceOf<FileEditBuilder>());
     SourceFileEdit fileEdit = fileEditBuilder.fileEdit;
     expect(fileEdit.file, source.fullName);
@@ -190,7 +193,8 @@
     expect(edit, isNotNull);
     expect(edit.offset, offset);
     expect(edit.length, length);
-    expect(edit.replacement == '$text\n' || edit.replacement == '$text\r\n', isTrue);
+    expect(edit.replacement == '$text\n' || edit.replacement == '$text\r\n',
+        isTrue);
   }
 }
 
diff --git a/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart b/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
index 513fbd8..bfb9c6c 100644
--- a/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
+++ b/pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart
@@ -13,9 +13,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../abstract_context.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(DartChangeBuilderImplTest);
   defineReflectiveTests(DartEditBuilderImplTest);
   defineReflectiveTests(DartFileEditBuilderImplTest);
@@ -361,7 +362,8 @@
     DartChangeBuilderImpl builder = new DartChangeBuilderImpl(context);
     builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilderImpl builder) {
-        builder.writeGetterDeclaration('g', returnType: classA.element.type, returnTypeGroupName: 'returnType');
+        builder.writeGetterDeclaration('g',
+            returnType: classA.element.type, returnTypeGroupName: 'returnType');
       });
     });
     SourceEdit edit = getEdit(builder);
@@ -598,8 +600,8 @@
     LinkedEditGroup group = linkedEditGroups[0];
     List<LinkedEditSuggestion> suggestions = group.suggestions;
     expect(suggestions, hasLength(4));
-    Iterable<String> values = suggestions
-        .map((LinkedEditSuggestion suggestion) {
+    Iterable<String> values =
+        suggestions.map((LinkedEditSuggestion suggestion) {
       expect(suggestion.kind, LinkedEditSuggestionKind.TYPE);
       return suggestion.value;
     });
@@ -746,7 +748,8 @@
     builder.addFileEdit(source, 1, (DartFileEditBuilderImpl builder) {
       builder.addInsertion(content.length - 1, (DartEditBuilder builder) {
         (builder as DartEditBuilderImpl).writeTypes(
-            [classA.element.type, classB.element.type], prefix: 'implements ');
+            [classA.element.type, classB.element.type],
+            prefix: 'implements ');
       });
     });
     SourceEdit edit = getEdit(builder);
diff --git a/pkg/analysis_server/test/src/utilities/test_all.dart b/pkg/analysis_server/test/src/utilities/test_all.dart
index e2ce06e..cdb4f83 100644
--- a/pkg/analysis_server/test/src/utilities/test_all.dart
+++ b/pkg/analysis_server/test/src/utilities/test_all.dart
@@ -4,14 +4,13 @@
 
 library test.services;
 
-import 'package:unittest/unittest.dart';
-
+import '../../utils.dart';
 import 'change_builder_core_test.dart' as change_builder_core_test;
 import 'change_builder_dart_test.dart' as change_builder_dart_test;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   change_builder_core_test.main();
   change_builder_dart_test.main();
 }
diff --git a/pkg/analysis_server/test/src/watch_manager_test.dart b/pkg/analysis_server/test/src/watch_manager_test.dart
index a8d885d..99b76fc 100644
--- a/pkg/analysis_server/test/src/watch_manager_test.dart
+++ b/pkg/analysis_server/test/src/watch_manager_test.dart
@@ -14,9 +14,10 @@
 import 'package:watcher/watcher.dart';
 
 import '../mocks.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   defineReflectiveTests(WatchManagerTest);
   defineReflectiveTests(WatchNodeTest);
 }
diff --git a/pkg/analysis_server/test/test_all.dart b/pkg/analysis_server/test/test_all.dart
index 77faa63..102b4c7 100644
--- a/pkg/analysis_server/test/test_all.dart
+++ b/pkg/analysis_server/test/test_all.dart
@@ -17,17 +17,18 @@
 import 'protocol_server_test.dart' as protocol_server_test;
 import 'protocol_test.dart' as protocol_test;
 import 'search/test_all.dart' as search_all;
-import 'services/test_all.dart' as services_all;
 import 'server_options_test.dart' as server_options;
+import 'services/test_all.dart' as services_all;
 import 'socket_server_test.dart' as socket_server_test;
 import 'source/test_all.dart' as source_all;
 import 'src/test_all.dart' as src_all;
+import 'utils.dart';
 
 /**
  * Utility for manually running all tests.
  */
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('analysis_server', () {
     analysis_all.main();
     analysis_server_test.main();
diff --git a/pkg/analysis_server/test/utils.dart b/pkg/analysis_server/test/utils.dart
new file mode 100644
index 0000000..2ca53b7
--- /dev/null
+++ b/pkg/analysis_server/test/utils.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analysis_server.test.utils;
+
+import 'package:analyzer/src/generated/java_io.dart';
+import 'package:path/path.dart' as path;
+import 'package:unittest/unittest.dart';
+
+void initializeTestEnvironment() {
+  groupSep = ' | ';
+  JavaFile.pathContext = path.posix;
+}
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
index 755ed52..913b9b2 100644
--- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
+++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -121,7 +121,7 @@
       String dartTypeName = capitalize(impliedType.camelName);
       if (type == null) {
         emitEmptyObjectClass(dartTypeName, impliedType);
-      } else if (type is TypeObject || type == null) {
+      } else if (type is TypeObject) {
         writeln();
         emitObjectClass(dartTypeName, type, impliedType);
       } else if (type is TypeEnum) {
diff --git a/pkg/analysis_server/tool/spec/codegen_tools.dart b/pkg/analysis_server/tool/spec/codegen_tools.dart
index 078f809..45dd4be 100644
--- a/pkg/analysis_server/tool/spec/codegen_tools.dart
+++ b/pkg/analysis_server/tool/spec/codegen_tools.dart
@@ -15,7 +15,8 @@
 import 'html_tools.dart';
 import 'text_formatter.dart';
 
-final RegExp trailingWhitespaceRegExp = new RegExp(r' +$', multiLine: true);
+final RegExp trailingWhitespaceRegExp = new RegExp(r'[\n ]+$');
+final RegExp trailingSpacesInLineRegExp = new RegExp(r' +$', multiLine: true);
 
 /**
  * Join the given strings using camelCase.  If [doCapitalize] is true, the first
@@ -71,12 +72,17 @@
    * Execute [callback], collecting any code that is output using [write]
    * or [writeln], and return the result as a string.
    */
-  String collectCode(void callback()) {
+  String collectCode(void callback(), {bool removeTrailingNewLine: false}) {
     _CodeGeneratorState oldState = _state;
     try {
       _state = new _CodeGeneratorState();
       callback();
-      return _state.buffer.toString().replaceAll(trailingWhitespaceRegExp, '');
+      var text = _state.buffer.toString().replaceAll(trailingSpacesInLineRegExp, '');
+      if (!removeTrailingNewLine) {
+        return text;
+      } else {
+        return text.replaceAll(trailingWhitespaceRegExp, '');
+      }
     } finally {
       _state = oldState;
     }
@@ -88,15 +94,14 @@
    * When generating java code, the output is compatible with Javadoc, which
    * understands certain HTML constructs.
    */
-  void docComment(List<dom.Node> docs) {
-    if (containsOnlyWhitespace(docs)) {
-      return;
-    }
+  void docComment(List<dom.Node> docs, {bool removeTrailingNewLine: false}) {
+    if (containsOnlyWhitespace(docs)) return;
     writeln(codeGeneratorSettings.docCommentStartMarker);
     int width = codeGeneratorSettings.commentLineLength;
     bool javadocStyle = codeGeneratorSettings.languageName == 'java';
     indentBy(codeGeneratorSettings.docCommentLineLeader, () {
-      write(nodesToText(docs, width - _state.indent.length, javadocStyle));
+      write(nodesToText(docs, width - _state.indent.length, javadocStyle,
+        removeTrailingNewLine: removeTrailingNewLine));
     });
     writeln(codeGeneratorSettings.docCommentEndMarker);
   }
@@ -151,17 +156,17 @@
       header = '''
 /*
  * Copyright (c) 2014, the Dart project authors.
- * 
+ *
  * Licensed under the Eclipse Public License v1.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.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software distributed under the License
  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
- * 
+ *
  * This file has been automatically generated.  Please do not edit it manually.
  * To regenerate the file, use the script "pkg/analysis_server/tool/spec/generate_files".
  */''';
diff --git a/pkg/analysis_server/tool/spec/from_html.dart b/pkg/analysis_server/tool/spec/from_html.dart
index 72c1ee2..458142b 100644
--- a/pkg/analysis_server/tool/spec/from_html.dart
+++ b/pkg/analysis_server/tool/spec/from_html.dart
@@ -37,7 +37,8 @@
   'ref',
   'code',
   'version',
-  'union'
+  'union',
+  'index'
 ];
 
 /**
@@ -73,6 +74,9 @@
     },
     'version': (dom.Element element) {
       versions.add(innerText(element));
+    },
+    'index': (dom.Element element) {
+      /* Ignore; generated dynamically. */
     }
   });
   if (versions.length != 1) {
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
index fa91052..cefc511 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
@@ -73,6 +73,12 @@
   private final Boolean enableNullAwareOperators;
 
   /**
+   * True if the client wants to enable spport for the proposed "less restricted mixins" proposal
+   * (DEP 34).
+   */
+  private final Boolean enableSuperMixins;
+
+  /**
    * True if hints that are specific to dart2js should be generated. This option is ignored if
    * generateHints is false.
    */
@@ -91,11 +97,12 @@
   /**
    * Constructor for {@link AnalysisOptions}.
    */
-  public AnalysisOptions(Boolean enableAsync, Boolean enableDeferredLoading, Boolean enableEnums, Boolean enableNullAwareOperators, Boolean generateDart2jsHints, Boolean generateHints, Boolean generateLints) {
+  public AnalysisOptions(Boolean enableAsync, Boolean enableDeferredLoading, Boolean enableEnums, Boolean enableNullAwareOperators, Boolean enableSuperMixins, Boolean generateDart2jsHints, Boolean generateHints, Boolean generateLints) {
     this.enableAsync = enableAsync;
     this.enableDeferredLoading = enableDeferredLoading;
     this.enableEnums = enableEnums;
     this.enableNullAwareOperators = enableNullAwareOperators;
+    this.enableSuperMixins = enableSuperMixins;
     this.generateDart2jsHints = generateDart2jsHints;
     this.generateHints = generateHints;
     this.generateLints = generateLints;
@@ -110,6 +117,7 @@
         ObjectUtilities.equals(other.enableDeferredLoading, enableDeferredLoading) &&
         ObjectUtilities.equals(other.enableEnums, enableEnums) &&
         ObjectUtilities.equals(other.enableNullAwareOperators, enableNullAwareOperators) &&
+        ObjectUtilities.equals(other.enableSuperMixins, enableSuperMixins) &&
         ObjectUtilities.equals(other.generateDart2jsHints, generateDart2jsHints) &&
         ObjectUtilities.equals(other.generateHints, generateHints) &&
         ObjectUtilities.equals(other.generateLints, generateLints);
@@ -122,10 +130,11 @@
     Boolean enableDeferredLoading = jsonObject.get("enableDeferredLoading") == null ? null : jsonObject.get("enableDeferredLoading").getAsBoolean();
     Boolean enableEnums = jsonObject.get("enableEnums") == null ? null : jsonObject.get("enableEnums").getAsBoolean();
     Boolean enableNullAwareOperators = jsonObject.get("enableNullAwareOperators") == null ? null : jsonObject.get("enableNullAwareOperators").getAsBoolean();
+    Boolean enableSuperMixins = jsonObject.get("enableSuperMixins") == null ? null : jsonObject.get("enableSuperMixins").getAsBoolean();
     Boolean generateDart2jsHints = jsonObject.get("generateDart2jsHints") == null ? null : jsonObject.get("generateDart2jsHints").getAsBoolean();
     Boolean generateHints = jsonObject.get("generateHints") == null ? null : jsonObject.get("generateHints").getAsBoolean();
     Boolean generateLints = jsonObject.get("generateLints") == null ? null : jsonObject.get("generateLints").getAsBoolean();
-    return new AnalysisOptions(enableAsync, enableDeferredLoading, enableEnums, enableNullAwareOperators, generateDart2jsHints, generateHints, generateLints);
+    return new AnalysisOptions(enableAsync, enableDeferredLoading, enableEnums, enableNullAwareOperators, enableSuperMixins, generateDart2jsHints, generateHints, generateLints);
   }
 
   public static List<AnalysisOptions> fromJsonArray(JsonArray jsonArray) {
@@ -177,6 +186,14 @@
   }
 
   /**
+   * True if the client wants to enable spport for the proposed "less restricted mixins" proposal
+   * (DEP 34).
+   */
+  public Boolean getEnableSuperMixins() {
+    return enableSuperMixins;
+  }
+
+  /**
    * True if hints that are specific to dart2js should be generated. This option is ignored if
    * generateHints is false.
    */
@@ -205,6 +222,7 @@
     builder.append(enableDeferredLoading);
     builder.append(enableEnums);
     builder.append(enableNullAwareOperators);
+    builder.append(enableSuperMixins);
     builder.append(generateDart2jsHints);
     builder.append(generateHints);
     builder.append(generateLints);
@@ -225,6 +243,9 @@
     if (enableNullAwareOperators != null) {
       jsonObject.addProperty("enableNullAwareOperators", enableNullAwareOperators);
     }
+    if (enableSuperMixins != null) {
+      jsonObject.addProperty("enableSuperMixins", enableSuperMixins);
+    }
     if (generateDart2jsHints != null) {
       jsonObject.addProperty("generateDart2jsHints", generateDart2jsHints);
     }
@@ -249,6 +270,8 @@
     builder.append(enableEnums + ", ");
     builder.append("enableNullAwareOperators=");
     builder.append(enableNullAwareOperators + ", ");
+    builder.append("enableSuperMixins=");
+    builder.append(enableSuperMixins + ", ");
     builder.append("generateDart2jsHints=");
     builder.append(generateDart2jsHints + ", ");
     builder.append("generateHints=");
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index 6bd7e09..c8b8c3a 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -137,6 +137,9 @@
       the standard JSON primitives. These data structures are
       documented in the section titled <a href="#types">Types</a>.
     </p>
+    <p>
+      To get an overview of the API, you can consult the <a href="#index">index</a>.
+    </p>
     <h3>Command-line Arguments</h3>
     <p>
       The command-line arguments that can be passed to the server.
@@ -2053,6 +2056,13 @@
               proposed "null aware operators" feature.
             </p>
           </field>
+          <field name="enableSuperMixins" optional="true">
+            <ref>bool</ref>
+            <p>
+              True if the client wants to enable spport for the
+              proposed "less restricted mixins" proposal (DEP 34).
+            </p>
+          </field>
           <field name="generateDart2jsHints" optional="true">
             <ref>bool</ref>
             <p>
@@ -4226,5 +4236,7 @@
     <p>
       TBD
     </p>
+    <h2 class="domain"><a name="index">Index</a></h2>
+    <index />
   </body>
 </html>
diff --git a/pkg/analysis_server/tool/spec/text_formatter.dart b/pkg/analysis_server/tool/spec/text_formatter.dart
index 17a7996..44c9ba0 100644
--- a/pkg/analysis_server/tool/spec/text_formatter.dart
+++ b/pkg/analysis_server/tool/spec/text_formatter.dart
@@ -19,12 +19,13 @@
  * If [javadocStyle] is true, then the output is compatable with Javadoc,
  * which understands certain HTML constructs.
  */
-String nodesToText(List<dom.Node> desc, int width, bool javadocStyle) {
+String nodesToText(List<dom.Node> desc, int width, bool javadocStyle, {
+    bool removeTrailingNewLine: false}) {
   _TextFormatter formatter = new _TextFormatter(width, javadocStyle);
   return formatter.collectCode(() {
     formatter.addAll(desc);
     formatter.lineBreak(false);
-  });
+  }, removeTrailingNewLine: removeTrailingNewLine);
 }
 
 /**
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart
index 804db2d..005ce6a 100644
--- a/pkg/analysis_server/tool/spec/to_html.dart
+++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -61,6 +61,24 @@
 dt.typeDefinition {
   font-weight: bold;
 }
+
+*/
+* Styles for index
+*/
+
+.subindex {
+}
+
+.subindex ul {
+  padding-left: 0px;
+  margin-left: 0px;
+
+  -webkit-margin-before: 0px;
+  -webkit-margin-start: 0px;
+  -webkit-padding-start: 0px;
+
+  list-style-type: none;
+}
 '''.trim();
 
 final GeneratedFile target = new GeneratedFile('../../doc/api.html', () {
@@ -124,6 +142,7 @@
   }
   void h3(void callback()) => element('h3', {}, callback);
   void h4(void callback()) => element('h4', {}, callback);
+  void h5(void callback()) => element('h5', {}, callback);
   void hangingIndent(void callback()) =>
       element('div', {'class': 'hangingIndent'}, callback);
   void head(void callback()) => element('head', {}, callback);
@@ -232,9 +251,6 @@
           continue;
         }
         switch (node.localName) {
-          case 'api':
-            translateHtml(node, squashParagraphs: squashParagraphs);
-            break;
           case 'domain':
             visitDomain(apiMappings.domains[node]);
             break;
@@ -255,6 +271,9 @@
           case 'version':
             translateHtml(node, squashParagraphs: squashParagraphs);
             break;
+          case 'index':
+            generateIndex();
+            break;
           default:
             if (!specialElements.contains(node.localName)) {
               element(node.localName, node.attributes, () {
@@ -470,6 +489,94 @@
       super.visitTypes(types);
     });
   }
+
+  void generateIndex() {
+    h3(() => write('Domains'));
+    for (var domain in api.domains) {
+      if (domain.requests.length == 0 && domain.notifications == 0) continue;
+      generateDomainIndex(domain);
+    }
+
+    generateTypesIndex(definedTypes);
+    generateRefactoringsIndex(api.refactorings);
+  }
+
+  void generateDomainIndex(Domain domain) {
+    h4(() {
+      write(domain.name);
+      write(' (');
+      link('domain_${domain.name}', () => write('\u2191'));
+      write(')');
+    });
+    if (domain.requests.length > 0) {
+      element('div', {'class': 'subindex'}, () {
+        generateRequestsIndex(domain.requests);
+        if (domain.notifications.length > 0) {
+          generateNotificationsIndex(domain.notifications);
+        }
+      });
+    } else if (domain.notifications.length > 0) {
+      element('div', {'class': 'subindex'}, () {
+        generateNotificationsIndex(domain.notifications);
+      });
+    }
+  }
+
+  void generateRequestsIndex(Iterable<Request> requests) {
+    h5(() => write("Requests"));
+    element('ul', {}, () {
+      for (var request in requests) {
+        element('li', {}, () => link('request_${request.longMethod}', () =>
+          write(request.method)));
+      }
+    });
+  }
+
+  void generateNotificationsIndex(Iterable<Notification> notifications) {
+    h5(() => write("Notifications"));
+    element('div', {'class': 'subindex'}, () {
+      element('ul', {}, () {
+        for (var notification in notifications) {
+          element('li', {}, () => link('notification_${notification.longEvent}',
+            () => write(notification.event)));
+        }
+      });
+    });
+  }
+
+  void generateTypesIndex(Set<String> types) {
+    h3(() {
+      write("Types");
+      write(' (');
+      link('types', () => write('\u2191'));
+      write(')');
+    });
+    element('div', {'class': 'subindex'}, () {
+      element('ul', {}, () {
+        for (var type in types) {
+          element('li', {}, () => link('type_$type', () => write(type)));
+        }
+      });
+    });
+  }
+
+  void generateRefactoringsIndex(Iterable<Refactoring> refactorings) {
+    h3(() {
+      write("Refactorings");
+      write(' (');
+      link('refactorings', () => write('\u2191'));
+      write(')');
+    });
+    // TODO: Individual refactorings are not yet hyperlinked.
+    element('div', {'class': 'subindex'}, () {
+      element('ul', {}, () {
+        for (var refactoring in refactorings) {
+          element('li', {}, () => link('refactoring_${refactoring.kind}',
+            () => write(refactoring.kind)));
+        }
+      });
+    });
+  }
 }
 
 /**
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 7c67e09..2f46b64 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,29 +1,42 @@
+## 0.26.1+2
+
+* Extension point for WorkManagerFactory(s).
+* Resolve enum documentation comments.
+* Fix display of parameter lists in servers Element structure (issue 24194)
+* Band-aid fix for issue #24191.
+
+## 0.26.1+1
+
+* Removed a warning about importing unnamed libraries
+* Fix handling of empty URIs in `.packages` files (issue 24126)
+
+## 0.26.1
+
+* Fix line starts in multiline comments (issue 23919).
+* Various small fixes to Windows path handling.
+* Update LineInfo computation during incremental resolution.
+* Make exclude list apply to contexts (issue 23941).
+* Fix type propagation for asynchronous for-in statements.
+* Fix ToStringVisitor for external functions (issue 23968).
+* Fix sorting of compilation unit members.
+* Add forwarding for DefaultFormalParameter metadata.
+* Fix most implementations of UriResolver.restoreAbsolute.
+* Disable dart2js hints by default.
+* Support older SDKs (Dart 1.11).
+
 ## 0.26.0
 
-* No changes from 0.26.0-alpha.2.
-
-## 0.26.0-alpha.2
-
-* Fix highlight range for missing enum constant in switch (issue 23904).
-* Fix analyzer's treatment of `ClassName?.staticMember` to match spec.
-* Implement DEP 34 (less restricted mixins).
-* Fix some implementations of `UriResolver.resolveUri(..)` that did not
-  properly handle the new `actualUri` argument.
-
-## 0.26.0-alpha.1
-
-* Change `ResolutionCopier.visitAwaitExpression` to copy *Type fields.
-
-## 0.26.0-alpha.0
-
-* API change: `UriResolver.resolveUri(..)` now takes an optional `actualUri`.
-
-## 0.25.3-alpha.0
-
 * Add hook for listening to implicitly analyzed files
 * Add a PathFilter and AnalysisOptionsProvider utility classes to aid
   clients in excluding files from analysis when directed to do so by an
   options file.
+* API change: `UriResolver.resolveUri(..)` now takes an optional `actualUri`.
+* Change `ResolutionCopier.visitAwaitExpression` to copy *Type fields.
+* Fix highlight range for missing enum constant in switch (issue 23904).
+* Fix analyzer's treatment of `ClassName?.staticMember` to match spec.
+* Implement DEP 34 (less restricted mixins).
+* Fix some implementations of `UriResolver.resolveUri(..)` that did not
+  properly handle the new `actualUri` argument.
 
 ## 0.25.2
 
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index 788600b..7d3ed95 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -140,14 +140,14 @@
 
   /**
    * Return a [File] that corresponds to the given [path].
-   * 
+   *
    * A file may or may not exist at this location.
    */
   File getFile(String path);
 
   /**
    * Return a [Folder] that corresponds to the given [path].
-   * 
+   *
    * A folder may or may not exist at this location.
    */
   Folder getFolder(String path);
@@ -194,7 +194,8 @@
   }
 
   @override
-  Uri restoreAbsolute(Source source) => source.uri;
+  Uri restoreAbsolute(Source source) =>
+      _provider.pathContext.toUri(source.fullName);
 
   /**
    * Return `true` if the given [uri] is a `file` URI.
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index cfc3aa2..1684fe9 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -72,7 +72,7 @@
 
   @override
   Resource getResource(String path) {
-    path = posix.normalize(path);
+    path = pathContext.normalize(path);
     Resource resource = _pathToResource[path];
     if (resource == null) {
       resource = new _MemoryFile(this, path);
@@ -97,8 +97,8 @@
    * appears in its parent directory, but whose `exists` property is false)
    */
   File newDummyLink(String path) {
-    path = posix.normalize(path);
-    newFolder(posix.dirname(path));
+    path = pathContext.normalize(path);
+    newFolder(pathContext.dirname(path));
     _MemoryDummyLink link = new _MemoryDummyLink(this, path);
     _pathToResource[path] = link;
     _pathToTimestamp[path] = nextStamp++;
@@ -107,10 +107,10 @@
   }
 
   File newFile(String path, String content, [int stamp]) {
-    path = posix.normalize(path);
-    _MemoryResource folder = _pathToResource[posix.dirname(path)];
+    path = pathContext.normalize(path);
+    _MemoryResource folder = _pathToResource[pathContext.dirname(path)];
     if (folder == null) {
-      newFolder(posix.dirname(path));
+      newFolder(pathContext.dirname(path));
     } else if (folder is! Folder) {
       throw new ArgumentError('Cannot create file ($path) as child of file');
     }
@@ -123,13 +123,14 @@
   }
 
   Folder newFolder(String path) {
-    path = posix.normalize(path);
-    if (!path.startsWith('/')) {
-      throw new ArgumentError("Path must start with '/'");
+    path = pathContext.normalize(path);
+    if (!path.startsWith(pathContext.separator)) {
+      throw new ArgumentError(
+          "Path must start with '${pathContext.separator}' : $path");
     }
     _MemoryResource resource = _pathToResource[path];
     if (resource == null) {
-      String parentPath = posix.dirname(path);
+      String parentPath = pathContext.dirname(path);
       if (parentPath != path) {
         newFolder(parentPath);
       }
@@ -149,8 +150,8 @@
   }
 
   File updateFile(String path, String content, [int stamp]) {
-    path = posix.normalize(path);
-    newFolder(posix.dirname(path));
+    path = pathContext.normalize(path);
+    newFolder(pathContext.dirname(path));
     _MemoryFile file = new _MemoryFile(this, path);
     _pathToResource[path] = file;
     _pathToContent[path] = content;
@@ -178,7 +179,7 @@
   void _notifyWatchers(String path, ChangeType changeType) {
     _pathToWatchers.forEach((String watcherPath,
         List<StreamController<WatchEvent>> streamControllers) {
-      if (watcherPath == path || posix.isWithin(watcherPath, path)) {
+      if (watcherPath == path || pathContext.isWithin(watcherPath, path)) {
         for (StreamController<WatchEvent> streamController
             in streamControllers) {
           streamController.add(new WatchEvent(changeType, path));
@@ -261,7 +262,7 @@
   @override
   Source createSource([Uri uri]) {
     if (uri == null) {
-      uri = posix.toUri(path);
+      uri = _provider.pathContext.toUri(path);
     }
     return new _MemoryFileSource(this, uri);
   }
@@ -381,15 +382,15 @@
 
   @override
   String canonicalizePath(String relPath) {
-    relPath = posix.normalize(relPath);
-    String childPath = posix.join(path, relPath);
-    childPath = posix.normalize(childPath);
+    relPath = _provider.pathContext.normalize(relPath);
+    String childPath = _provider.pathContext.join(path, relPath);
+    childPath = _provider.pathContext.normalize(childPath);
     return childPath;
   }
 
   @override
   bool contains(String path) {
-    return posix.isWithin(this.path, path);
+    return _provider.pathContext.isWithin(this.path, path);
   }
 
   @override
@@ -419,7 +420,7 @@
     }
     List<Resource> children = <Resource>[];
     _provider._pathToResource.forEach((resourcePath, resource) {
-      if (posix.dirname(resourcePath) == path) {
+      if (_provider.pathContext.dirname(resourcePath) == path) {
         children.add(resource);
       }
     });
@@ -465,7 +466,7 @@
 
   @override
   Folder get parent {
-    String parentPath = posix.dirname(path);
+    String parentPath = _provider.pathContext.dirname(path);
     if (parentPath == path) {
       return null;
     }
@@ -473,7 +474,7 @@
   }
 
   @override
-  String get shortName => posix.basename(path);
+  String get shortName => _provider.pathContext.basename(path);
 
   @override
   bool operator ==(other) {
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index ee3c747..40db35e 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -150,12 +150,14 @@
    * entry has the given [level] and [message], and was created at the given
    * [time].
    */
-  void logLogEntry(String level, DateTime time, String message) {
+  void logLogEntry(String level, DateTime time, String message, Object exception, StackTrace stackTrace) {
     if (_instrumentationServer != null) {
       String timeStamp =
           time == null ? 'null' : time.millisecondsSinceEpoch.toString();
+      String exceptionText = exception.toString();
+      String stackTraceText = stackTrace.toString();
       _instrumentationServer
-          .log(_join([TAG_LOG_ENTRY, level, timeStamp, message]));
+          .log(_join([TAG_LOG_ENTRY, level, timeStamp, message, exceptionText, stackTraceText]));
     }
   }
 
diff --git a/pkg/analyzer/lib/plugin/task.dart b/pkg/analyzer/lib/plugin/task.dart
index 8ea132f..72c33fa 100644
--- a/pkg/analyzer/lib/plugin/task.dart
+++ b/pkg/analyzer/lib/plugin/task.dart
@@ -8,6 +8,7 @@
  */
 library analyzer.plugin.task;
 
+import 'package:analyzer/src/generated/engine.dart' hide WorkManager;
 import 'package:analyzer/src/plugin/engine_plugin.dart';
 import 'package:analyzer/task/model.dart';
 import 'package:plugin/plugin.dart';
@@ -19,3 +20,17 @@
  */
 final String TASK_EXTENSION_POINT_ID = Plugin.join(
     EnginePlugin.UNIQUE_IDENTIFIER, EnginePlugin.TASK_EXTENSION_POINT);
+
+/**
+ * The identifier of the extension point that allows plugins to register new
+ * work managers with the analysis engine. The object used as an extension must
+ * be a [WorkManagerFactory].
+ */
+final String WORK_MANAGER_EXTENSION_POINT_ID = Plugin.join(
+    EnginePlugin.UNIQUE_IDENTIFIER,
+    EnginePlugin.WORK_MANAGER_FACTORY_EXTENSION_POINT);
+
+/**
+ * A function that will create a new [WorkManager] for the given [context].
+ */
+typedef WorkManager WorkManagerFactory(InternalAnalysisContext context);
diff --git a/pkg/analyzer/lib/source/path_filter.dart b/pkg/analyzer/lib/source/path_filter.dart
index f4123f8..40e81a6 100644
--- a/pkg/analyzer/lib/source/path_filter.dart
+++ b/pkg/analyzer/lib/source/path_filter.dart
@@ -5,13 +5,13 @@
 library source.path_filter;
 
 import 'package:glob/glob.dart' as glob;
-import 'package:path/path.dart';
+import 'package:path/path.dart' as path;
 
 /// Filter paths against a set of [ignorePatterns] relative to a [root]
 /// directory. Paths outside of [root] are also ignored.
 class PathFilter {
   /// The path context to use when manipulating paths.
-  final Context pathContext;
+  final path.Context pathContext;
 
   /// Path that all ignore patterns are relative to.
   final String root;
@@ -20,7 +20,9 @@
   final List<glob.Glob> _ignorePatterns = new List<glob.Glob>();
 
   /// Construct a new path filter rooted at [root] with [ignorePatterns].
-  PathFilter(this.pathContext, this.root, List<String> ignorePatterns) {
+  /// If [pathContext] is not specified, then the system path context is used.
+  PathFilter(this.root, List<String> ignorePatterns, [path.Context pathContext])
+      : this.pathContext = pathContext != null ? pathContext : path.context {
     setIgnorePatterns(ignorePatterns);
   }
 
diff --git a/pkg/analyzer/lib/source/sdk_ext.dart b/pkg/analyzer/lib/source/sdk_ext.dart
index 7caad43..d16bb47 100644
--- a/pkg/analyzer/lib/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/source/sdk_ext.dart
@@ -76,13 +76,25 @@
 
   @override
   Uri restoreAbsolute(Source source) {
-    String libraryName = _libraryName(source.uri);
-    if (_registeredSdkExtension(libraryName)) {
-      return source.uri;
+    String extensionName = _findExtensionNameFor(source.fullName);
+    if (extensionName != null) {
+      return Uri.parse(extensionName);
     }
+    // TODO(johnmccutchan): Handle restoring parts.
     return null;
   }
 
+  /// Return the extension name for [fullName] or `null`.
+  String _findExtensionNameFor(String fullName) {
+    var result;
+    _urlMappings.forEach((extensionName, pathMapping) {
+      if (pathMapping == fullName) {
+        result = extensionName;
+      }
+    });
+    return result;
+  }
+
   /// Return the library name of [importUri].
   String _libraryName(Uri importUri) {
     var uri = importUri.toString();
@@ -152,11 +164,6 @@
     }
   }
 
-  /// Returns true if [libraryName] is a registered sdk extension.
-  bool _registeredSdkExtension(String libraryName) {
-    return _urlMappings[libraryName] != null;
-  }
-
   /// Resolve an import of an sdk extension.
   Source _resolveEntry(Uri libraryEntry, Uri importUri) {
     // Library entry.
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index c12262d..d45c729 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -12,7 +12,6 @@
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/task/model.dart';
 import 'package:analyzer/task/model.dart';
 
@@ -1117,46 +1116,6 @@
 }
 
 /**
- * A specification of a specific result computed for a specific target.
- */
-class TargetedResult {
-  /**
-   * An empty list of results.
-   */
-  static final List<TargetedResult> EMPTY_LIST = const <TargetedResult>[];
-
-  /**
-   * The target with which the result is associated.
-   */
-  final AnalysisTarget target;
-
-  /**
-   * The result associated with the target.
-   */
-  final ResultDescriptor result;
-
-  /**
-   * Initialize a new targeted result.
-   */
-  TargetedResult(this.target, this.result);
-
-  @override
-  int get hashCode {
-    return JenkinsSmiHash.combine(target.hashCode, result.hashCode);
-  }
-
-  @override
-  bool operator ==(other) {
-    return other is TargetedResult &&
-        other.target == target &&
-        other.result == result;
-  }
-
-  @override
-  String toString() => '$result for $target';
-}
-
-/**
  * A cache partition that contains all targets not contained in other partitions.
  */
 class UniversalCachePartition extends CachePartition {
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index e48a5cc..f472ed1 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -8,6 +8,7 @@
 import 'dart:collection';
 
 import 'package:analyzer/instrumentation/instrumentation.dart';
+import 'package:analyzer/plugin/task.dart';
 import 'package:analyzer/src/cancelable_future.dart';
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/generated/ast.dart';
@@ -33,8 +34,6 @@
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/task/dart_work_manager.dart';
 import 'package:analyzer/src/task/driver.dart';
-import 'package:analyzer/src/task/html.dart';
-import 'package:analyzer/src/task/html_work_manager.dart';
 import 'package:analyzer/src/task/incremental_element_builder.dart';
 import 'package:analyzer/src/task/manager.dart';
 import 'package:analyzer/task/dart.dart';
@@ -122,16 +121,16 @@
   TaskManager _taskManager;
 
   /**
+   * A list of all [WorkManager]s used by this context.
+   */
+  final List<WorkManager> workManagers = <WorkManager>[];
+
+  /**
    * The [DartWorkManager] instance that performs Dart specific scheduling.
    */
   DartWorkManager dartWorkManager;
 
   /**
-   * The work manager that performs HTML specific scheduling.
-   */
-  HtmlWorkManager htmlWorkManager;
-
-  /**
    * The analysis driver used to perform analysis.
    */
   AnalysisDriver driver;
@@ -219,11 +218,17 @@
     _privatePartition = new UniversalCachePartition(this);
     _cache = createCacheFromSourceFactory(null);
     _taskManager = AnalysisEngine.instance.taskManager;
-    // TODO(scheglov) Get WorkManager(Factory)(s) from plugins.
-    dartWorkManager = new DartWorkManager(this);
-    htmlWorkManager = new HtmlWorkManager(this);
-    driver = new AnalysisDriver(
-        _taskManager, <WorkManager>[dartWorkManager, htmlWorkManager], this);
+    for (WorkManagerFactory factory
+        in AnalysisEngine.instance.enginePlugin.workManagerFactories) {
+      WorkManager workManager = factory(this);
+      if (workManager != null) {
+        workManagers.add(workManager);
+        if (workManager is DartWorkManager) {
+          dartWorkManager = workManager;
+        }
+      }
+    }
+    driver = new AnalysisDriver(_taskManager, workManagers, this);
     _onSourcesChangedController =
         new StreamController<SourcesChangedEvent>.broadcast();
     _implicitAnalysisEventsController =
@@ -268,8 +273,9 @@
     this._options.lint = options.lint;
     this._options.preserveComments = options.preserveComments;
     if (needsRecompute) {
-      dartWorkManager.onAnalysisOptionsChanged();
-      htmlWorkManager.onAnalysisOptionsChanged();
+      for (WorkManager workManager in workManagers) {
+        workManager.onAnalysisOptionsChanged();
+      }
     }
   }
 
@@ -287,8 +293,9 @@
         _priorityOrder = sources;
       }
     }
-    dartWorkManager.applyPriorityTargets(_priorityOrder);
-    htmlWorkManager.applyPriorityTargets(_priorityOrder);
+    for (WorkManager workManager in workManagers) {
+      workManager.applyPriorityTargets(_priorityOrder);
+    }
   }
 
   @override
@@ -360,7 +367,8 @@
   /**
    * Make _pendingFutureSources available to unit tests.
    */
-  HashMap<AnalysisTarget, List<PendingFuture>> get pendingFutureSources_forTesting =>
+  HashMap<AnalysisTarget,
+      List<PendingFuture>> get pendingFutureSources_forTesting =>
       _pendingFutureTargets;
 
   @override
@@ -389,8 +397,9 @@
     factory.context = this;
     _sourceFactory = factory;
     _cache = createCacheFromSourceFactory(factory);
-    dartWorkManager.onSourceFactoryChanged();
-    htmlWorkManager.onSourceFactoryChanged();
+    for (WorkManager workManager in workManagers) {
+      workManager.onSourceFactoryChanged();
+    }
   }
 
   @override
@@ -531,10 +540,10 @@
     for (Source source in removedSources) {
       _sourceRemoved(source);
     }
-    dartWorkManager.applyChange(
-        changeSet.addedSources, changeSet.changedSources, removedSources);
-    htmlWorkManager.applyChange(
-        changeSet.addedSources, changeSet.changedSources, removedSources);
+    for (WorkManager workManager in workManagers) {
+      workManager.applyChange(
+          changeSet.addedSources, changeSet.changedSources, removedSources);
+    }
     _onSourcesChangedController.add(new SourcesChangedEvent(changeSet));
   }
 
@@ -635,8 +644,8 @@
       return new CancelableFuture.error(new AnalysisNotScheduledError());
     }
     var unitTarget = new LibrarySpecificUnit(librarySource, unitSource);
-    return new _AnalysisFutureHelper<CompilationUnit>(this).computeAsync(
-        unitTarget, (CacheEntry entry) {
+    return new _AnalysisFutureHelper<CompilationUnit>(this)
+        .computeAsync(unitTarget, (CacheEntry entry) {
       CacheState state = entry.getState(RESOLVED_UNIT);
       if (state == CacheState.ERROR) {
         throw entry.exception;
@@ -649,6 +658,7 @@
     });
   }
 
+  @override
   Object /*V*/ computeResult(
       AnalysisTarget target, ResultDescriptor /*<V>*/ descriptor) {
     CacheEntry entry = getCacheEntry(target);
@@ -701,7 +711,7 @@
     for (Source librarySource in containingLibraries) {
       LibrarySpecificUnit target =
           new LibrarySpecificUnit(librarySource, unitSource);
-      CompilationUnit unit = _cache.getValue(target, RESOLVED_UNIT);
+      CompilationUnit unit = getResult(target, RESOLVED_UNIT);
       if (unit == null) {
         units = null;
         break;
@@ -755,7 +765,7 @@
   CompilationUnitElement getCompilationUnitElement(
       Source unitSource, Source librarySource) {
     AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource);
-    return _cache.getValue(target, COMPILATION_UNIT_ELEMENT);
+    return getResult(target, COMPILATION_UNIT_ELEMENT);
   }
 
   @override
@@ -801,13 +811,13 @@
 
   @override
   AnalysisErrorInfo getErrors(Source source) {
-    String name = source.shortName;
-    if (AnalysisEngine.isDartFileName(name) || source is DartScript) {
-      return dartWorkManager.getErrors(source);
-    } else if (AnalysisEngine.isHtmlFileName(name)) {
-      return htmlWorkManager.getErrors(source);
+    List<AnalysisError> allErrors = <AnalysisError>[];
+    for (WorkManager workManager in workManagers) {
+      List<AnalysisError> errors = workManager.getErrors(source);
+      allErrors.addAll(errors);
     }
-    return new AnalysisErrorInfoImpl(AnalysisError.NO_ERRORS, null);
+    LineInfo lineInfo = getLineInfo(source);
+    return new AnalysisErrorInfoImpl(allErrors, lineInfo);
   }
 
   @override
@@ -828,7 +838,7 @@
     for (Source source in _cache.sources) {
       if (AnalysisEngine.isHtmlFileName(source.shortName)) {
         List<Source> referencedLibraries =
-            analysisCache.getValue(source, REFERENCED_LIBRARIES);
+            getResult(source, REFERENCED_LIBRARIES);
         if (_containsAny(referencedLibraries, librarySources)) {
           htmlSources.add(source);
         }
@@ -844,7 +854,7 @@
   SourceKind getKindOf(Source source) {
     String name = source.shortName;
     if (AnalysisEngine.isDartFileName(name)) {
-      return _cache.getValue(source, SOURCE_KIND);
+      return getResult(source, SOURCE_KIND);
     } else if (AnalysisEngine.isHtmlFileName(name)) {
       return SourceKind.HTML;
     }
@@ -891,10 +901,10 @@
 
   @override
   LibraryElement getLibraryElement(Source source) =>
-      _cache.getValue(source, LIBRARY_ELEMENT);
+      getResult(source, LIBRARY_ELEMENT);
 
   @override
-  LineInfo getLineInfo(Source source) => _cache.getValue(source, LINE_INFO);
+  LineInfo getLineInfo(Source source) => getResult(source, LINE_INFO);
 
   @override
   int getModificationStamp(Source source) {
@@ -945,7 +955,7 @@
         !AnalysisEngine.isDartFileName(librarySource.shortName)) {
       return null;
     }
-    return _cache.getValue(
+    return getResult(
         new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT);
   }
 
@@ -958,6 +968,11 @@
   }
 
   @override
+  Object getResult(AnalysisTarget target, ResultDescriptor result) {
+    return _cache.getValue(target, result);
+  }
+
+  @override
   List<Source> getSourcesWithFullName(String path) {
     return analysisCache.getSourcesWithFullName(path);
   }
@@ -1011,7 +1026,7 @@
 
   @override
   void invalidateLibraryHints(Source librarySource) {
-    List<Source> sources = _cache.getValue(librarySource, UNITS);
+    List<Source> sources = getResult(librarySource, UNITS);
     if (sources != null) {
       for (Source source in sources) {
         getCacheEntry(source).setState(HINTS, CacheState.INVALID);
@@ -1134,6 +1149,9 @@
       entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
       entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
+      entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
+      entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
+      entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
       // USED_IMPORTED_ELEMENTS
       // USED_LOCAL_ELEMENTS
       setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS);
@@ -1211,6 +1229,9 @@
     entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
+    entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
     entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
   }
 
@@ -1530,8 +1551,12 @@
    * related to it. If so, add the source to the set of sources that need to be
    * processed. This method is intended to be used for testing purposes only.
    */
-  void _getSourcesNeedingProcessing(Source source, CacheEntry entry,
-      bool isPriority, bool hintsEnabled, bool lintsEnabled,
+  void _getSourcesNeedingProcessing(
+      Source source,
+      CacheEntry entry,
+      bool isPriority,
+      bool hintsEnabled,
+      bool lintsEnabled,
       HashSet<Source> sources) {
     CacheState state = entry.getState(CONTENT);
     if (state == CacheState.INVALID ||
@@ -1763,10 +1788,10 @@
       }
       entry.setState(CONTENT, CacheState.INVALID);
     }
-    dartWorkManager.applyChange(
-        Source.EMPTY_LIST, <Source>[source], Source.EMPTY_LIST);
-    htmlWorkManager.applyChange(
-        Source.EMPTY_LIST, <Source>[source], Source.EMPTY_LIST);
+    for (WorkManager workManager in workManagers) {
+      workManager.applyChange(
+          Source.EMPTY_LIST, <Source>[source], Source.EMPTY_LIST);
+    }
   }
 
   /**
@@ -1846,11 +1871,18 @@
       // do resolution
       Stopwatch perfCounter = new Stopwatch()..start();
       PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver(
-          typeProvider, unitSource, null, sourceEntry, unitEntry, oldUnit,
-          analysisOptions.incrementalApi, analysisOptions);
+          typeProvider,
+          unitSource,
+          null,
+          sourceEntry,
+          unitEntry,
+          oldUnit,
+          analysisOptions.incrementalApi,
+          analysisOptions);
       bool success = resolver.resolve(newCode);
       AnalysisEngine.instance.instrumentationService.logPerformance(
-          AnalysisPerformanceKind.INCREMENTAL, perfCounter,
+          AnalysisPerformanceKind.INCREMENTAL,
+          perfCounter,
           'success=$success,context_id=$_id,code_length=${newCode.length}');
       if (!success) {
         return false;
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index f4a8ff3..7940662 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.ast;
 
 import 'dart:collection';
@@ -2730,7 +2727,7 @@
    * greater than the offset of the second node.
    */
   static Comparator<AstNode> LEXICAL_ORDER =
-      (AstNode first, AstNode second) => second.offset - first.offset;
+      (AstNode first, AstNode second) => first.offset - second.offset;
 
   /**
    * The parent of the node, or `null` if the node is the root of an AST
@@ -6024,6 +6021,9 @@
   @override
   bool get isFinal => _parameter != null && _parameter.isFinal;
 
+  @override
+  NodeList<Annotation> get metadata => _parameter.metadata;
+
   /**
    * Return the formal parameter with which the default value is associated.
    */
@@ -7528,6 +7528,11 @@
    * Return the kind of this parameter.
    */
   ParameterKind get kind;
+
+  /**
+   * Return the annotations associated with this parameter.
+   */
+  NodeList<Annotation> get metadata;
 }
 
 /**
@@ -13734,9 +13739,7 @@
     return ParameterKind.REQUIRED;
   }
 
-  /**
-   * Return the annotations associated with this parameter.
-   */
+  @override
   NodeList<Annotation> get metadata => _metadata;
 
   /**
@@ -17971,6 +17974,7 @@
   @override
   Object visitFunctionDeclaration(FunctionDeclaration node) {
     _visitNodeListWithSeparatorAndSuffix(node.metadata, " ", " ");
+    _visitTokenWithSuffix(node.externalKeyword, " ");
     _visitNodeWithSuffix(node.returnType, " ");
     _visitTokenWithSuffix(node.propertyKeyword, " ");
     _visitNode(node.name);
@@ -17988,7 +17992,9 @@
   Object visitFunctionExpression(FunctionExpression node) {
     _visitNode(node.typeParameters);
     _visitNode(node.parameters);
-    _writer.print(' ');
+    if (node.body is! EmptyFunctionBody) {
+      _writer.print(' ');
+    }
     _visitNode(node.body);
     return null;
   }
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 742f64d..999ae5b 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.constant;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 69beffe..45f52bf 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.element;
 
 import 'dart:collection';
@@ -556,6 +553,12 @@
   SourceRange withClauseRange;
 
   /**
+   * A flag indicating whether the types associated with the instance members of
+   * this class have been inferred.
+   */
+  bool hasBeenInferred = false;
+
+  /**
    * Initialize a newly created class element to have the given [name] at the
    * given [offset] in the file that contains the declaration of this element.
    */
@@ -3526,6 +3529,14 @@
   List<FunctionElement> get functions;
 
   /**
+   * Return `true` if this executable element did not have an explicit return
+   * type specified for it in the original source. Note that if there was no
+   * explicit return type, and if the element model is fully populated, then
+   * the [returnType] will not be `null`.
+   */
+  bool get hasImplicitReturnType;
+
+  /**
    * Return `true` if this executable element is abstract. Executable elements
    * are abstract if they are not external and have no body.
    */
@@ -3589,7 +3600,9 @@
   List<ParameterElement> get parameters;
 
   /**
-   * Return the return type defined by this executable element.
+   * Return the return type defined by this executable element. If the element
+   * model is fully populated, then the [returnType] will not be `null`, even
+   * if no return type was explicitly specified.
    */
   DartType get returnType;
 
@@ -3702,6 +3715,16 @@
   }
 
   @override
+  bool get hasImplicitReturnType => hasModifier(Modifier.IMPLICIT_TYPE);
+
+  /**
+   * Set whether this executable element has an implicit return type.
+   */
+  void set hasImplicitReturnType(bool hasImplicitReturnType) {
+    setModifier(Modifier.IMPLICIT_TYPE, hasImplicitReturnType);
+  }
+
+  @override
   bool get isAbstract => hasModifier(Modifier.ABSTRACT);
 
   @override
@@ -3888,6 +3911,9 @@
   }
 
   @override
+  bool get hasImplicitReturnType => baseElement.hasImplicitReturnType;
+
+  @override
   bool get isAbstract => baseElement.isAbstract;
 
   @override
@@ -4118,9 +4144,6 @@
       enclosingElement != null ? enclosingElement.isEnum : false;
 
   @override
-  bool get isStatic => hasModifier(Modifier.STATIC);
-
-  @override
   ElementKind get kind => ElementKind.FIELD;
 
   /**
@@ -4235,9 +4258,6 @@
   bool get isEnumConstant => baseElement.isEnumConstant;
 
   @override
-  bool get isStatic => baseElement.isStatic;
-
-  @override
   DartType get propagatedType => substituteFor(baseElement.propagatedType);
 
   @override
@@ -8257,45 +8277,52 @@
   static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 10);
 
   /**
+   * Indicates that the associated element did not have an explicit type
+   * associated with it. If the element is an [ExecutableElement], then the
+   * type being referred to is the return type.
+   */
+  static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 11);
+
+  /**
    * Indicates that a class can validly be used as a mixin.
    */
-  static const Modifier MIXIN = const Modifier('MIXIN', 11);
+  static const Modifier MIXIN = const Modifier('MIXIN', 12);
 
   /**
    * Indicates that a class is a mixin application.
    */
   static const Modifier MIXIN_APPLICATION =
-      const Modifier('MIXIN_APPLICATION', 12);
+      const Modifier('MIXIN_APPLICATION', 13);
 
   /**
    * Indicates that the value of a parameter or local variable might be mutated
    * within the context.
    */
   static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT =
-      const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 13);
+      const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 14);
 
   /**
    * Indicates that the value of a parameter or local variable might be mutated
    * within the scope.
    */
   static const Modifier POTENTIALLY_MUTATED_IN_SCOPE =
-      const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 14);
+      const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 15);
 
   /**
    * Indicates that a class contains an explicit reference to 'super'.
    */
   static const Modifier REFERENCES_SUPER =
-      const Modifier('REFERENCES_SUPER', 15);
+      const Modifier('REFERENCES_SUPER', 16);
 
   /**
    * Indicates that the pseudo-modifier 'set' was applied to the element.
    */
-  static const Modifier SETTER = const Modifier('SETTER', 16);
+  static const Modifier SETTER = const Modifier('SETTER', 17);
 
   /**
    * Indicates that the modifier 'static' was applied to the element.
    */
-  static const Modifier STATIC = const Modifier('STATIC', 17);
+  static const Modifier STATIC = const Modifier('STATIC', 18);
 
   /**
    * Indicates that the element does not appear in the source code but was
@@ -8303,7 +8330,7 @@
    * constructors, an implicit zero-argument constructor will be created and it
    * will be marked as being synthetic.
    */
-  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18);
+  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 19);
 
   static const List<Modifier> values = const [
     ABSTRACT,
@@ -8317,6 +8344,7 @@
     GENERATOR,
     GETTER,
     HAS_EXT_URI,
+    IMPLICIT_TYPE,
     MIXIN,
     MIXIN_APPLICATION,
     POTENTIALLY_MUTATED_IN_CONTEXT,
@@ -8657,6 +8685,12 @@
    */
   List<TypeParameterElement> get typeParameters;
 
+  /**
+   * Append the type, name and possibly the default value of this parameter to
+   * the given [buffer].
+   */
+  void appendToWithoutDelimiters(StringBuffer buffer);
+
   @override
   FormalParameter computeNode();
 }
@@ -8665,7 +8699,7 @@
  * A concrete implementation of a [ParameterElement].
  */
 class ParameterElementImpl extends VariableElementImpl
-    with PotentiallyConstVariableElement
+    with ParameterElementMixin, PotentiallyConstVariableElement
     implements ParameterElement {
   /**
    * An empty list of parameter elements.
@@ -8801,24 +8835,6 @@
     buffer.write(right);
   }
 
-  /**
-   * Append the type and name of this parameter to the given [buffer].
-   */
-  void appendToWithoutDelimiters(StringBuffer buffer) {
-    buffer.write(type);
-    buffer.write(" ");
-    buffer.write(displayName);
-    if (_defaultValueCode != null) {
-      if (parameterKind == ParameterKind.NAMED) {
-        buffer.write(": ");
-      }
-      if (parameterKind == ParameterKind.POSITIONAL) {
-        buffer.write(" = ");
-      }
-      buffer.write(_defaultValueCode);
-    }
-  }
-
   @override
   FormalParameter computeNode() =>
       getNodeMatching((node) => node is FormalParameter);
@@ -8864,6 +8880,28 @@
 }
 
 /**
+ * A mixin that provides a common implementation for methods defined in
+ * [ParameterElement].
+ */
+abstract class ParameterElementMixin implements ParameterElement {
+  @override
+  void appendToWithoutDelimiters(StringBuffer buffer) {
+    buffer.write(type);
+    buffer.write(" ");
+    buffer.write(displayName);
+    if (defaultValueCode != null) {
+      if (parameterKind == ParameterKind.NAMED) {
+        buffer.write(": ");
+      }
+      if (parameterKind == ParameterKind.POSITIONAL) {
+        buffer.write(" = ");
+      }
+      buffer.write(defaultValueCode);
+    }
+  }
+}
+
+/**
  * A type with type parameters, such as a class or function type alias.
  */
 abstract class ParameterizedType implements DartType {
@@ -8887,7 +8925,9 @@
  * A parameter element defined in a parameterized type where the values of the
  * type parameters are known.
  */
-class ParameterMember extends VariableMember implements ParameterElement {
+class ParameterMember extends VariableMember
+    with ParameterElementMixin
+    implements ParameterElement {
   /**
    * Initialize a newly created element to represent a constructor, based on the
    * [baseElement], defined by the [definingType].
@@ -9486,13 +9526,6 @@
   PropertyAccessorElement get getter;
 
   /**
-   * Return `true` if this element is a static element. A static element is an
-   * element that is not associated with a particular instance, but rather with
-   * an entire library or class.
-   */
-  bool get isStatic;
-
-  /**
    * Return the propagated type of this variable, or `null` if type propagation
    * has not been performed, for example because the variable is not final.
    */
@@ -10449,6 +10482,12 @@
   static const List<VariableElement> EMPTY_LIST = const <VariableElement>[];
 
   /**
+   * Return `true` if this variable element did not have an explicit type
+   * specified for it.
+   */
+  bool get hasImplicitType;
+
+  /**
    * Return a synthetic function representing this variable's initializer, or
    * `null` if this variable does not have an initializer. The function will
    * have no parameters. The return type of the function will be the
@@ -10485,6 +10524,19 @@
   bool get isPotentiallyMutatedInScope;
 
   /**
+   * Return `true` if this element is a static variable, as per section 8 of the
+   * Dart Language Specification:
+   *
+   * > A static variable is a variable that is not associated with a particular
+   * > instance, but rather with an entire library or class. Static variables
+   * > include library variables and class variables. Class variables are
+   * > variables whose declaration is immediately nested inside a class
+   * > declaration and includes the modifier static. A library variable is
+   * > implicitly static.
+   */
+  bool get isStatic;
+
+  /**
    * Return the declared type of this variable, or `null` if the variable did
    * not have a declared type (such as if it was declared using the keyword
    * 'var').
@@ -10557,6 +10609,16 @@
   }
 
   @override
+  bool get hasImplicitType => hasModifier(Modifier.IMPLICIT_TYPE);
+
+  /**
+   * Set whether this variable element has an implicit type.
+   */
+  void set hasImplicitType(bool hasImplicitType) {
+    setModifier(Modifier.IMPLICIT_TYPE, hasImplicitType);
+  }
+
+  @override
   FunctionElement get initializer => _initializer;
 
   /**
@@ -10583,6 +10645,9 @@
   bool get isPotentiallyMutatedInScope => false;
 
   @override
+  bool get isStatic => hasModifier(Modifier.STATIC);
+
+  @override
   void appendTo(StringBuffer buffer) {
     buffer.write(type);
     buffer.write(" ");
@@ -10612,6 +10677,9 @@
   VariableElement get baseElement => super.baseElement as VariableElement;
 
   @override
+  bool get hasImplicitType => baseElement.hasImplicitType;
+
+  @override
   FunctionElement get initializer {
     //
     // Elements within this element should have type parameters substituted,
@@ -10636,6 +10704,9 @@
       baseElement.isPotentiallyMutatedInScope;
 
   @override
+  bool get isStatic => baseElement.isStatic;
+
+  @override
   DartType get type => substituteFor(baseElement.type);
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/element_handle.dart b/pkg/analyzer/lib/src/generated/element_handle.dart
index e5921d6..94bb7a4 100644
--- a/pkg/analyzer/lib/src/generated/element_handle.dart
+++ b/pkg/analyzer/lib/src/generated/element_handle.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.element_handle;
 
 import 'ast.dart';
@@ -515,6 +512,9 @@
   List<FunctionElement> get functions => actualElement.functions;
 
   @override
+  bool get hasImplicitReturnType => actualElement.hasImplicitReturnType;
+
+  @override
   bool get isAbstract => actualElement.isAbstract;
 
   @override
@@ -610,9 +610,6 @@
   bool get isEnumConstant => actualElement.isEnumConstant;
 
   @override
-  bool get isStatic => actualElement.isStatic;
-
-  @override
   ElementKind get kind => ElementKind.FIELD;
 
   @override
@@ -895,6 +892,7 @@
  * `ParameterElement`.
  */
 class ParameterElementHandle extends VariableElementHandle
+    with ParameterElementMixin
     implements ParameterElement {
   /**
    * Initialize a newly created element handle to represent the given element.
@@ -1020,9 +1018,6 @@
   PropertyAccessorElement get getter => actualElement.getter;
 
   @override
-  bool get isStatic => actualElement.isStatic;
-
-  @override
   DartType get propagatedType => actualElement.propagatedType;
 
   @override
@@ -1091,6 +1086,9 @@
   VariableElement get actualElement => super.actualElement as VariableElement;
 
   @override
+  bool get hasImplicitType => actualElement.hasImplicitType;
+
+  @override
   FunctionElement get initializer => actualElement.initializer;
 
   @override
@@ -1108,8 +1106,12 @@
       actualElement.isPotentiallyMutatedInScope;
 
   @override
+  bool get isStatic => actualElement.isStatic;
+
+  @override
   DartType get type => actualElement.type;
 }
+
 /**
  * TODO(scheglov) invalid implementation
  */
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 5086437..0e8f9c8 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine;
 
 import 'dart:async';
@@ -556,6 +553,12 @@
       Source source, Source librarySource);
 
   /**
+   * Perform work until the given [result] has been computed for the given
+   * [target]. Return the computed value.
+   */
+  Object /*V*/ computeResult(AnalysisTarget target, ResultDescriptor /*<V>*/ result);
+
+  /**
    * Notifies the context that the client is going to stop using this context.
    */
   void dispose();
@@ -721,6 +724,14 @@
   ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource);
 
   /**
+   * Return the value of the given [result] for the given [target].
+   *
+   * If the corresponding [target] does not exist, or the [result] is not
+   * computed yet, then the default value is returned.
+   */
+  Object /*V*/ getResult(AnalysisTarget target, ResultDescriptor /*<V>*/ result);
+
+  /**
    * Return a list of the sources being analyzed in this context whose full path
    * is equal to the given [path].
    */
@@ -1092,7 +1103,8 @@
    */
   AnalysisContextImpl() {
     _resultRecorder = new AnalysisContextImpl_AnalysisTaskResultRecorder(this);
-    _privatePartition = new UniversalCachePartition(this,
+    _privatePartition = new UniversalCachePartition(
+        this,
         AnalysisOptionsImpl.DEFAULT_CACHE_SIZE,
         new AnalysisContextImpl_ContextRetentionPolicy(this));
     _cache = createCacheFromSourceFactory(null);
@@ -1118,6 +1130,7 @@
         this._options.dart2jsHint != options.dart2jsHint ||
         (this._options.hint && !options.hint) ||
         this._options.preserveComments != options.preserveComments ||
+        this._options.strongMode != options.strongMode ||
         this._options.enableStrictCallChecks !=
             options.enableStrictCallChecks ||
         this._options.enableSuperMixins != options.enableSuperMixins;
@@ -1153,6 +1166,7 @@
     this._options.incrementalValidation = options.incrementalValidation;
     this._options.lint = options.lint;
     this._options.preserveComments = options.preserveComments;
+    this._options.strongMode = options.strongMode;
     _generateImplicitErrors = options.generateImplicitErrors;
     _generateSdkErrors = options.generateSdkErrors;
     if (needsRecompute) {
@@ -1651,11 +1665,15 @@
             _getDartParseData(source, dartEntry, DartEntry.PARSE_ERRORS));
         dartEntry = _getReadableDartEntry(source);
         if (dartEntry.getValue(DartEntry.SOURCE_KIND) == SourceKind.LIBRARY) {
-          ListUtilities.addAll(errors, _getDartResolutionData(
-              source, source, dartEntry, DartEntry.RESOLUTION_ERRORS));
+          ListUtilities.addAll(
+              errors,
+              _getDartResolutionData(
+                  source, source, dartEntry, DartEntry.RESOLUTION_ERRORS));
           dartEntry = _getReadableDartEntry(source);
-          ListUtilities.addAll(errors, _getDartVerificationData(
-              source, source, dartEntry, DartEntry.VERIFICATION_ERRORS));
+          ListUtilities.addAll(
+              errors,
+              _getDartVerificationData(
+                  source, source, dartEntry, DartEntry.VERIFICATION_ERRORS));
           if (enableHints) {
             dartEntry = _getReadableDartEntry(source);
             ListUtilities.addAll(errors,
@@ -1669,20 +1687,28 @@
         } else {
           List<Source> libraries = getLibrariesContaining(source);
           for (Source librarySource in libraries) {
-            ListUtilities.addAll(errors, _getDartResolutionData(
-                source, librarySource, dartEntry, DartEntry.RESOLUTION_ERRORS));
+            ListUtilities.addAll(
+                errors,
+                _getDartResolutionData(source, librarySource, dartEntry,
+                    DartEntry.RESOLUTION_ERRORS));
             dartEntry = _getReadableDartEntry(source);
-            ListUtilities.addAll(errors, _getDartVerificationData(source,
-                librarySource, dartEntry, DartEntry.VERIFICATION_ERRORS));
+            ListUtilities.addAll(
+                errors,
+                _getDartVerificationData(source, librarySource, dartEntry,
+                    DartEntry.VERIFICATION_ERRORS));
             if (enableHints) {
               dartEntry = _getReadableDartEntry(source);
-              ListUtilities.addAll(errors, _getDartHintData(
-                  source, librarySource, dartEntry, DartEntry.HINTS));
+              ListUtilities.addAll(
+                  errors,
+                  _getDartHintData(
+                      source, librarySource, dartEntry, DartEntry.HINTS));
             }
             if (enableLints) {
               dartEntry = _getReadableDartEntry(source);
-              ListUtilities.addAll(errors, _getDartLintData(
-                  source, librarySource, dartEntry, DartEntry.LINTS));
+              ListUtilities.addAll(
+                  errors,
+                  _getDartLintData(
+                      source, librarySource, dartEntry, DartEntry.LINTS));
             }
           }
         }
@@ -1778,8 +1804,8 @@
   @override
   CancelableFuture<CompilationUnit> computeResolvedCompilationUnitAsync(
       Source unitSource, Source librarySource) {
-    return new _AnalysisFutureHelper<CompilationUnit>(this).computeAsync(
-        unitSource, (SourceEntry sourceEntry) {
+    return new _AnalysisFutureHelper<CompilationUnit>(this)
+        .computeAsync(unitSource, (SourceEntry sourceEntry) {
       if (sourceEntry is DartEntry) {
         if (sourceEntry.getStateInLibrary(
                 DartEntry.RESOLVED_UNIT, librarySource) ==
@@ -1793,6 +1819,11 @@
     });
   }
 
+  @override
+  Object computeResult(AnalysisTarget target, ResultDescriptor result) {
+    return result.defaultValue;
+  }
+
   /**
    * Create an analysis cache based on the given source [factory].
    */
@@ -2120,7 +2151,8 @@
       if (dartEntry == null) {
         AnalysisEngine.instance.logger.logError(
             "Could not compute the public namespace for ${library.source.fullName}",
-            new CaughtException(new AnalysisException(
+            new CaughtException(
+                new AnalysisException(
                     "A Dart file became a non-Dart file: ${source.fullName}"),
                 null));
         return null;
@@ -2170,6 +2202,11 @@
   }
 
   @override
+  Object getResult(AnalysisTarget target, ResultDescriptor result) {
+    return result.defaultValue;
+  }
+
+  @override
   List<Source> getSourcesWithFullName(String path) {
     List<Source> sources = <Source>[];
     MapIterator<Source, SourceEntry> iterator = _cache.iterator();
@@ -2315,7 +2352,8 @@
         _validateLastIncrementalResolutionResult();
         if (_performAnalysisTaskStopwatch != null) {
           AnalysisEngine.instance.instrumentationService.logPerformance(
-              AnalysisPerformanceKind.FULL, _performAnalysisTaskStopwatch,
+              AnalysisPerformanceKind.FULL,
+              _performAnalysisTaskStopwatch,
               'context_id=$_id');
           _performAnalysisTaskStopwatch = null;
         }
@@ -2569,7 +2607,8 @@
 
   @override
   CompilationUnit resolveCompilationUnit2(
-      Source unitSource, Source librarySource) => _getDartResolutionData2(
+          Source unitSource, Source librarySource) =>
+      _getDartResolutionData2(
           unitSource, librarySource, DartEntry.RESOLVED_UNIT, null);
 
   @override
@@ -2893,7 +2932,9 @@
       // source continues to change, this loop will eventually terminate.
       //
       dartEntry = _cacheDartScanData(source, dartEntry, DartEntry.TOKEN_STREAM);
-      dartEntry = new ParseDartTask(this, source,
+      dartEntry = new ParseDartTask(
+              this,
+              source,
               dartEntry.getValue(DartEntry.TOKEN_STREAM),
               dartEntry.getValue(SourceEntry.LINE_INFO))
           .perform(_resultRecorder) as DartEntry;
@@ -2957,8 +2998,8 @@
       //
       try {
         if (dartEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) {
-          dartEntry = new GetContentTask(this, source)
-              .perform(_resultRecorder) as DartEntry;
+          dartEntry = new GetContentTask(this, source).perform(_resultRecorder)
+              as DartEntry;
         }
         dartEntry = new ScanDartTask(
                 this, source, dartEntry.getValue(SourceEntry.CONTENT))
@@ -3034,8 +3075,8 @@
       //
       try {
         if (htmlEntry.getState(SourceEntry.CONTENT) != CacheState.VALID) {
-          htmlEntry = new GetContentTask(this, source)
-              .perform(_resultRecorder) as HtmlEntry;
+          htmlEntry = new GetContentTask(this, source).perform(_resultRecorder)
+              as HtmlEntry;
         }
         htmlEntry = new ParseHtmlTask(
                 this, source, htmlEntry.getValue(SourceEntry.CONTENT))
@@ -3171,8 +3212,14 @@
       if (contents != originalContents) {
         if (_options.incremental) {
           _incrementalAnalysisCache = IncrementalAnalysisCache.update(
-              _incrementalAnalysisCache, source, originalContents, contents,
-              offset, oldLength, newLength, _getReadableSourceEntry(source));
+              _incrementalAnalysisCache,
+              source,
+              originalContents,
+              contents,
+              offset,
+              oldLength,
+              newLength,
+              _getReadableSourceEntry(source));
         }
         _sourceChanged(source);
         changed = true;
@@ -3220,11 +3267,12 @@
     CompilationUnit unit =
         unitEntry.getValueInLibrary(DartEntry.RESOLVED_UNIT, librarySource);
     if (unit == null) {
-      CaughtException exception = new CaughtException(new AnalysisException(
+      CaughtException exception = new CaughtException(
+          new AnalysisException(
               "Entry has VALID state for RESOLVED_UNIT but null value for ${unitSource.fullName} in ${librarySource.fullName}"),
           null);
-      AnalysisEngine.instance.logger.logInformation(
-          exception.toString(), exception);
+      AnalysisEngine.instance.logger
+          .logInformation(exception.toString(), exception);
       unitEntry.recordResolutionError(exception);
       return new AnalysisContextImpl_TaskData(null, false);
     }
@@ -3322,8 +3370,10 @@
     }
     Token tokenStream = dartEntry.getValue(DartEntry.TOKEN_STREAM);
     dartEntry.setState(DartEntry.TOKEN_STREAM, CacheState.FLUSHED);
-    return new AnalysisContextImpl_TaskData(new ParseDartTask(this, source,
-        tokenStream, dartEntry.getValue(SourceEntry.LINE_INFO)), false);
+    return new AnalysisContextImpl_TaskData(
+        new ParseDartTask(this, source, tokenStream,
+            dartEntry.getValue(SourceEntry.LINE_INFO)),
+        false);
   }
 
   /**
@@ -3356,8 +3406,10 @@
       if (taskData != null) {
         return taskData;
       }
-      return new AnalysisContextImpl_TaskData(new ResolveDartLibraryCycleTask(
-          this, source, source, builder.librariesInCycle), false);
+      return new AnalysisContextImpl_TaskData(
+          new ResolveDartLibraryCycleTask(
+              this, source, source, builder.librariesInCycle),
+          false);
     } on AnalysisException catch (exception, stackTrace) {
       dartEntry
           .recordResolutionError(new CaughtException(exception, stackTrace));
@@ -3377,9 +3429,10 @@
     if (htmlEntry.getState(HtmlEntry.PARSED_UNIT) != CacheState.VALID) {
       return _createParseHtmlTask(source, htmlEntry);
     }
-    return new AnalysisContextImpl_TaskData(new ResolveHtmlTask(this, source,
-        htmlEntry.modificationTime,
-        htmlEntry.getValue(HtmlEntry.PARSED_UNIT)), false);
+    return new AnalysisContextImpl_TaskData(
+        new ResolveHtmlTask(this, source, htmlEntry.modificationTime,
+            htmlEntry.getValue(HtmlEntry.PARSED_UNIT)),
+        false);
   }
 
   /**
@@ -3723,8 +3776,11 @@
    * related to it. Return the task that should be performed, or `null` if there
    * is no more work to be done for the source.
    */
-  AnalysisContextImpl_TaskData _getNextAnalysisTaskForSource(Source source,
-      SourceEntry sourceEntry, bool isPriority, bool hintsEnabled,
+  AnalysisContextImpl_TaskData _getNextAnalysisTaskForSource(
+      Source source,
+      SourceEntry sourceEntry,
+      bool isPriority,
+      bool hintsEnabled,
       bool lintsEnabled) {
     // Refuse to generate tasks for html based files that are above 1500 KB
     if (_isTooBigHtmlSourceEntry(source, sourceEntry)) {
@@ -3914,7 +3970,8 @@
       DartEntry dartEntry = sourceEntry;
       if (dartEntry.getStateInLibrary(DartEntry.RESOLVED_UNIT, librarySource) ==
           CacheState.VALID) {
-        return new TimestampedData<CompilationUnit>(dartEntry.modificationTime,
+        return new TimestampedData<CompilationUnit>(
+            dartEntry.modificationTime,
             dartEntry.getValueInLibrary(
                 DartEntry.RESOLVED_UNIT, librarySource));
       }
@@ -3944,8 +4001,12 @@
    * [_getNextAnalysisTaskForSource]. This method is intended to be used for
    * testing purposes only.
    */
-  void _getSourcesNeedingProcessing(Source source, SourceEntry sourceEntry,
-      bool isPriority, bool hintsEnabled, bool lintsEnabled,
+  void _getSourcesNeedingProcessing(
+      Source source,
+      SourceEntry sourceEntry,
+      bool isPriority,
+      bool hintsEnabled,
+      bool lintsEnabled,
       HashSet<Source> sources) {
     if (sourceEntry is DartEntry) {
       DartEntry dartEntry = sourceEntry;
@@ -4132,23 +4193,6 @@
   bool _isTooBigHtmlSourceEntry(Source source, SourceEntry sourceEntry) =>
       false;
 
-  /**
-   * Log the given debugging [message].
-   */
-  void _logInformation(String message) {
-    AnalysisEngine.instance.logger.logInformation(message);
-  }
-
-  /**
-   * Notify all of the analysis listeners that a task is about to be performed.
-   */
-  void _notifyAboutToPerformTask(String taskDescription) {
-    int count = _listeners.length;
-    for (int i = 0; i < count; i++) {
-      _listeners[i].aboutToPerformTask(this, taskDescription);
-    }
-  }
-
 //  /**
 //   * Notify all of the analysis listeners that the given source is no longer included in the set of
 //   * sources that are being analyzed.
@@ -4228,6 +4272,23 @@
 //  }
 
   /**
+   * Log the given debugging [message].
+   */
+  void _logInformation(String message) {
+    AnalysisEngine.instance.logger.logInformation(message);
+  }
+
+  /**
+   * Notify all of the analysis listeners that a task is about to be performed.
+   */
+  void _notifyAboutToPerformTask(String taskDescription) {
+    int count = _listeners.length;
+    for (int i = 0; i < count; i++) {
+      _listeners[i].aboutToPerformTask(this, taskDescription);
+    }
+  }
+
+  /**
    * Notify all of the analysis listeners that the errors associated with the
    * given [source] has been updated to the given [errors].
    */
@@ -4799,11 +4860,18 @@
       // do resolution
       Stopwatch perfCounter = new Stopwatch()..start();
       PoorMansIncrementalResolver resolver = new PoorMansIncrementalResolver(
-          typeProvider, unitSource, getReadableSourceEntryOrNull(unitSource),
-          null, null, oldUnit, analysisOptions.incrementalApi, analysisOptions);
+          typeProvider,
+          unitSource,
+          getReadableSourceEntryOrNull(unitSource),
+          null,
+          null,
+          oldUnit,
+          analysisOptions.incrementalApi,
+          analysisOptions);
       bool success = resolver.resolve(newCode);
       AnalysisEngine.instance.instrumentationService.logPerformance(
-          AnalysisPerformanceKind.INCREMENTAL, perfCounter,
+          AnalysisPerformanceKind.INCREMENTAL,
+          perfCounter,
           'success=$success,context_id=$_id,code_length=${newCode.length}');
       if (!success) {
         return false;
@@ -5023,8 +5091,8 @@
       // library.
       AnalysisTask task = _taskData.task;
       if (task is ResolveDartLibraryTask) {
-        AnalysisContextImpl_this._workManager.addFirst(
-            task.librarySource, SourcePriority.LIBRARY);
+        AnalysisContextImpl_this._workManager
+            .addFirst(task.librarySource, SourcePriority.LIBRARY);
       }
       return;
     }
@@ -5252,8 +5320,8 @@
         AnalysisContextImpl_this._getReadableDartEntry(librarySource);
     if (libraryEntry != null &&
         libraryEntry.getState(DartEntry.PARSED_UNIT) != CacheState.ERROR) {
-      AnalysisContextImpl_this._workManager.addFirst(
-          librarySource, SourcePriority.LIBRARY);
+      AnalysisContextImpl_this._workManager
+          .addFirst(librarySource, SourcePriority.LIBRARY);
       if (_taskData == null) {
         _taskData = AnalysisContextImpl_this._createResolveDartLibraryTask(
             librarySource, libraryEntry);
@@ -6247,7 +6315,7 @@
    * A flag indicating whether analysis is to generate dart2js related hint
    * results.
    */
-  bool dart2jsHint = true;
+  bool dart2jsHint = false;
 
   /**
    * A flag indicating whether generic methods are to be supported (DEP 22).
@@ -6570,8 +6638,8 @@
       if (contextName == null) {
         contextName = 'unnamed';
       }
-      AnalysisEngine.instance.instrumentationService.logAnalysisTask(
-          contextName, taskDescription);
+      AnalysisEngine.instance.instrumentationService
+          .logAnalysisTask(contextName, taskDescription);
       internalPerform();
     } on AnalysisException {
       rethrow;
@@ -8405,8 +8473,11 @@
       //
       // Use the ErrorVerifier to compute the rest of the errors.
       //
-      ErrorVerifier errorVerifier = new ErrorVerifier(errorReporter,
-          libraryElement, typeProvider, new InheritanceManager(libraryElement),
+      ErrorVerifier errorVerifier = new ErrorVerifier(
+          errorReporter,
+          libraryElement,
+          typeProvider,
+          new InheritanceManager(libraryElement),
           context.analysisOptions.enableSuperMixins);
       _unit.accept(errorVerifier);
       _errors = errorListener.getErrorsForSource(source);
@@ -8441,8 +8512,10 @@
    * @param directive the directive to be verified
    * @param errorListener the error listener to which errors should be reported
    */
-  static void validateReferencedSource(AnalysisContext context,
-      Source librarySource, UriBasedDirective directive,
+  static void validateReferencedSource(
+      AnalysisContext context,
+      Source librarySource,
+      UriBasedDirective directive,
       AnalysisErrorListener errorListener) {
     Source source = directive.source;
     if (source != null) {
@@ -8456,8 +8529,11 @@
       }
     }
     StringLiteral uriLiteral = directive.uri;
-    errorListener.onError(new AnalysisError(librarySource, uriLiteral.offset,
-        uriLiteral.length, CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+    errorListener.onError(new AnalysisError(
+        librarySource,
+        uriLiteral.offset,
+        uriLiteral.length,
+        CompileTimeErrorCode.URI_DOES_NOT_EXIST,
         [directive.uriContent]));
   }
 }
@@ -8549,7 +8625,6 @@
 
 /// Generates lint feedback for a single Dart library.
 class GenerateDartLintsTask extends AnalysisTask {
-
   ///The compilation units that comprise the library, with the defining
   ///compilation unit appearing first in the list.
   final List<TimestampedData<CompilationUnit>> _units;
@@ -8679,8 +8754,8 @@
       TimestampedData<String> data = context.getContents(source);
       _content = data.data;
       _modificationTime = data.modificationTime;
-      AnalysisEngine.instance.instrumentationService.logFileRead(
-          source.fullName, _modificationTime, _content);
+      AnalysisEngine.instance.instrumentationService
+          .logFileRead(source.fullName, _modificationTime, _content);
     } catch (exception, stackTrace) {
       errors.add(new AnalysisError(
           source, 0, 0, ScannerErrorCode.UNABLE_GET_CONTENT, [exception]));
@@ -8965,8 +9040,14 @@
 
   int _newLength = 0;
 
-  IncrementalAnalysisCache(this.librarySource, this.source, this.resolvedUnit,
-      this.oldContents, this._newContents, this._offset, this._oldLength,
+  IncrementalAnalysisCache(
+      this.librarySource,
+      this.source,
+      this.resolvedUnit,
+      this.oldContents,
+      this._newContents,
+      this._offset,
+      this._oldLength,
       this._newLength);
 
   /**
@@ -9051,9 +9132,15 @@
    * @return the cache used for incremental analysis or `null` if incremental analysis cannot
    *         be performed
    */
-  static IncrementalAnalysisCache update(IncrementalAnalysisCache cache,
-      Source source, String oldContents, String newContents, int offset,
-      int oldLength, int newLength, SourceEntry sourceEntry) {
+  static IncrementalAnalysisCache update(
+      IncrementalAnalysisCache cache,
+      Source source,
+      String oldContents,
+      String newContents,
+      int offset,
+      int oldLength,
+      int newLength,
+      SourceEntry sourceEntry) {
     // Determine the cache resolved unit
     Source librarySource = null;
     CompilationUnit unit = null;
@@ -9479,8 +9566,9 @@
    * Initialize a newly created exception to represent the removal of the given
    * [source].
    */
-  ObsoleteSourceAnalysisException(Source source) : super(
-          "The source '${source.fullName}' was removed while it was being analyzed") {
+  ObsoleteSourceAnalysisException(Source source)
+      : super(
+            "The source '${source.fullName}' was removed while it was being analyzed") {
     this._source = source;
   }
 
@@ -10837,8 +10925,11 @@
     //
     PerformanceStatistics.errors.makeCurrentWhile(() {
       ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-      ErrorVerifier errorVerifier = new ErrorVerifier(errorReporter,
-          _libraryElement, typeProvider, inheritanceManager,
+      ErrorVerifier errorVerifier = new ErrorVerifier(
+          errorReporter,
+          _libraryElement,
+          typeProvider,
+          inheritanceManager,
           context.analysisOptions.enableSuperMixins);
       unit.accept(errorVerifier);
       // TODO(paulberry): as a temporary workaround for issue 21572,
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 0964a8c..93d1ce8 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3952,18 +3952,6 @@
           "The exported libraries '{0}' and '{1}' cannot have the same name '{2}'");
 
   /**
-   * 14.2 Exports: It is a static warning to export two different libraries with
-   * the same name.
-   *
-   * Parameters:
-   * 0: the uri pointing to a first library
-   * 1: the uri pointing to a second library
-   */
-  static const StaticWarningCode EXPORT_DUPLICATED_LIBRARY_UNNAMED =
-      const StaticWarningCode('EXPORT_DUPLICATED_LIBRARY_UNNAMED',
-          "The exported libraries '{0}' and '{1}' cannot both be unnamed");
-
-  /**
    * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt;
    * h</i> or if <i>m &gt; n</i>.
    *
@@ -4119,18 +4107,6 @@
           "The imported libraries '{0}' and '{1}' cannot have the same name '{2}'");
 
   /**
-   * 14.1 Imports: It is a static warning to import two different libraries with
-   * the same name.
-   *
-   * Parameters:
-   * 0: the uri pointing to a first library
-   * 1: the uri pointing to a second library
-   */
-  static const StaticWarningCode IMPORT_DUPLICATED_LIBRARY_UNNAMED =
-      const StaticWarningCode('IMPORT_DUPLICATED_LIBRARY_UNNAMED',
-          "The imported libraries '{0}' and '{1}' cannot both be unnamed");
-
-  /**
    * 14.1 Imports: It is a static warning if the specified URI of a deferred
    * import does not refer to a library declaration.
    *
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 9e25a85..9624115 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -584,6 +584,18 @@
   }
 
   @override
+  Object visitEnumDeclaration(EnumDeclaration node) {
+    ClassElement outerClass = _enclosingClass;
+    try {
+      _isInNativeClass = false;
+      _enclosingClass = node.element;
+      return super.visitEnumDeclaration(node);
+    } finally {
+      _enclosingClass = outerClass;
+    }
+  }
+
+  @override
   Object visitExportDirective(ExportDirective node) {
     ExportElement exportElement = node.element;
     if (exportElement != null) {
@@ -2999,13 +3011,7 @@
     LibraryElement prevLibrary = _nameToExportElement[name];
     if (prevLibrary != null) {
       if (prevLibrary != exportedLibrary) {
-        if (name.isEmpty) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_UNNAMED, directive, [
-            prevLibrary.definingCompilationUnit.displayName,
-            exportedLibrary.definingCompilationUnit.displayName
-          ]);
-        } else {
+        if (!name.isEmpty) {
           _errorReporter.reportErrorForNode(
               StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED, directive, [
             prevLibrary.definingCompilationUnit.displayName,
@@ -3512,13 +3518,7 @@
     LibraryElement prevLibrary = _nameToImportElement[name];
     if (prevLibrary != null) {
       if (prevLibrary != nodeLibrary) {
-        if (name.isEmpty) {
-          _errorReporter.reportErrorForNode(
-              StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_UNNAMED, directive, [
-            prevLibrary.definingCompilationUnit.displayName,
-            nodeLibrary.definingCompilationUnit.displayName
-          ]);
-        } else {
+        if (!name.isEmpty) {
           _errorReporter.reportErrorForNode(
               StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, directive, [
             prevLibrary.definingCompilationUnit.displayName,
diff --git a/pkg/analyzer/lib/src/generated/html.dart b/pkg/analyzer/lib/src/generated/html.dart
index 3bccaab..a72a1c8 100644
--- a/pkg/analyzer/lib/src/generated/html.dart
+++ b/pkg/analyzer/lib/src/generated/html.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.html;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 2fcef7b..ea1e0fa 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -24,7 +24,7 @@
 import 'package:analyzer/task/dart.dart'
     show DART_ERRORS, LibrarySpecificUnit, PARSED_UNIT, TOKEN_STREAM;
 import 'package:analyzer/task/general.dart' show CONTENT, LINE_INFO;
-import 'package:analyzer/task/model.dart' show ResultDescriptor;
+import 'package:analyzer/task/model.dart' show ResultDescriptor, TargetedResult;
 
 import 'ast.dart';
 import 'element.dart';
@@ -903,8 +903,13 @@
    * Initialize a newly created incremental resolver to resolve a node in the
    * given source in the given library.
    */
-  IncrementalResolver(this.oldEntry, this.newSourceEntry, this.newUnitEntry,
-      this._definingUnit, this._updateOffset, this._updateEndOld,
+  IncrementalResolver(
+      this.oldEntry,
+      this.newSourceEntry,
+      this.newUnitEntry,
+      this._definingUnit,
+      this._updateOffset,
+      this._updateEndOld,
       this._updateEndNew) {
     _updateDelta = _updateEndNew - _updateEndOld;
     _definingLibrary = _definingUnit.library;
@@ -1231,8 +1236,10 @@
     try {
       RecordingErrorListener errorListener = new RecordingErrorListener();
       ErrorReporter errorReporter = new ErrorReporter(errorListener, _source);
-      ErrorVerifier errorVerifier = new ErrorVerifier(errorReporter,
-          _definingLibrary, _typeProvider,
+      ErrorVerifier errorVerifier = new ErrorVerifier(
+          errorReporter,
+          _definingLibrary,
+          _typeProvider,
           new InheritanceManager(_definingLibrary),
           _context.analysisOptions.enableSuperMixins);
       if (_resolutionContext.enclosingClassDeclaration != null) {
@@ -1279,9 +1286,15 @@
   List<AnalysisError> _newScanErrors = <AnalysisError>[];
   List<AnalysisError> _newParseErrors = <AnalysisError>[];
 
-  PoorMansIncrementalResolver(this._typeProvider, this._unitSource,
-      this._oldEntry, this._newSourceEntry, this._newUnitEntry, this._oldUnit,
-      bool resolveApiChanges, this._options) {
+  PoorMansIncrementalResolver(
+      this._typeProvider,
+      this._unitSource,
+      this._oldEntry,
+      this._newSourceEntry,
+      this._newUnitEntry,
+      this._oldUnit,
+      bool resolveApiChanges,
+      this._options) {
     _resolveApiChanges = resolveApiChanges;
   }
 
@@ -1338,8 +1351,13 @@
             _shiftTokens(firstPair.oldToken);
             {
               IncrementalResolver incrementalResolver = new IncrementalResolver(
-                  _oldEntry, _newSourceEntry, _newUnitEntry, _unitElement,
-                  _updateOffset, _updateEndOld, _updateEndNew);
+                  _oldEntry,
+                  _newSourceEntry,
+                  _newUnitEntry,
+                  _unitElement,
+                  _updateOffset,
+                  _updateEndOld,
+                  _updateEndNew);
               incrementalResolver._updateElementNameOffsets();
               incrementalResolver._shiftEntryErrors();
             }
@@ -1385,7 +1403,8 @@
                 found = true;
               }
             }
-            if (oldParent is FunctionBody && newParent is FunctionBody) {
+            if (oldParent is BlockFunctionBody &&
+                newParent is BlockFunctionBody) {
               oldNode = oldParent;
               newNode = newParent;
               found = true;
@@ -1428,8 +1447,13 @@
         }
         // perform incremental resolution
         IncrementalResolver incrementalResolver = new IncrementalResolver(
-            _oldEntry, _newSourceEntry, _newUnitEntry, _unitElement,
-            _updateOffset, _updateEndOld, _updateEndNew);
+            _oldEntry,
+            _newSourceEntry,
+            _newUnitEntry,
+            _unitElement,
+            _updateOffset,
+            _updateEndOld,
+            _updateEndNew);
         bool success = incrementalResolver.resolve(newNode);
         // check if success
         if (!success) {
@@ -1493,9 +1517,14 @@
     // replace node
     NodeReplacer.replace(oldComment, newComment);
     // update elements
-    IncrementalResolver incrementalResolver = new IncrementalResolver(_oldEntry,
-        _newSourceEntry, _newUnitEntry, _unitElement, _updateOffset,
-        _updateEndOld, _updateEndNew);
+    IncrementalResolver incrementalResolver = new IncrementalResolver(
+        _oldEntry,
+        _newSourceEntry,
+        _newUnitEntry,
+        _unitElement,
+        _updateOffset,
+        _updateEndOld,
+        _updateEndNew);
     incrementalResolver._updateElementNameOffsets();
     incrementalResolver._shiftEntryErrors();
     _updateEntry();
@@ -1565,13 +1594,15 @@
     _newSourceEntry.setState(DART_ERRORS, CacheState.INVALID);
     // scan results
     _newSourceEntry.setState(SCAN_ERRORS, CacheState.INVALID);
-    List<TargetedResult> scanDeps =
-        <TargetedResult>[new TargetedResult(_unitSource, CONTENT)];
+    List<TargetedResult> scanDeps = <TargetedResult>[
+      new TargetedResult(_unitSource, CONTENT)
+    ];
     _newSourceEntry.setValue(LINE_INFO, _newLineInfo, scanDeps);
     _newSourceEntry.setValue(SCAN_ERRORS, _newScanErrors, scanDeps);
     // parse results
-    List<TargetedResult> parseDeps =
-        <TargetedResult>[new TargetedResult(_unitSource, TOKEN_STREAM)];
+    List<TargetedResult> parseDeps = <TargetedResult>[
+      new TargetedResult(_unitSource, TOKEN_STREAM)
+    ];
     _newSourceEntry.setState(PARSE_ERRORS, CacheState.INVALID);
     _newSourceEntry.setValue(PARSE_ERRORS, _newParseErrors, parseDeps);
     _newSourceEntry.setValue(PARSED_UNIT, _oldUnit, parseDeps);
diff --git a/pkg/analyzer/lib/src/generated/java_io.dart b/pkg/analyzer/lib/src/generated/java_io.dart
index e947d80a..000746f 100644
--- a/pkg/analyzer/lib/src/generated/java_io.dart
+++ b/pkg/analyzer/lib/src/generated/java_io.dart
@@ -2,29 +2,31 @@
 
 import "dart:io";
 
-import 'package:path/path.dart' as pathos;
+import 'package:path/path.dart' as path;
 
 import 'java_core.dart' show JavaIOException;
 
 class JavaFile {
+  static path.Context pathContext = path.context;
   static final String separator = Platform.pathSeparator;
   static final int separatorChar = Platform.pathSeparator.codeUnitAt(0);
   String _path;
   JavaFile(String path) {
     _path = path;
   }
-  JavaFile.fromUri(Uri uri) : this(pathos.fromUri(uri));
+  JavaFile.fromUri(Uri uri) : this(pathContext.fromUri(uri));
   JavaFile.relative(JavaFile base, String child) {
     if (child.isEmpty) {
       this._path = base._path;
     } else {
-      this._path = pathos.join(base._path, child);
+      this._path = pathContext.join(base._path, child);
     }
   }
   int get hashCode => _path.hashCode;
   bool operator ==(other) {
     return other is JavaFile && other._path == _path;
   }
+
   bool exists() {
     if (_newFile().existsSync()) {
       return true;
@@ -34,12 +36,14 @@
     }
     return false;
   }
+
   JavaFile getAbsoluteFile() => new JavaFile(getAbsolutePath());
   String getAbsolutePath() {
-    String path = pathos.absolute(_path);
-    path = pathos.normalize(path);
+    String path = pathContext.absolute(_path);
+    path = pathContext.normalize(path);
     return path;
   }
+
   JavaFile getCanonicalFile() => new JavaFile(getCanonicalPath());
   String getCanonicalPath() {
     try {
@@ -48,28 +52,34 @@
       throw new JavaIOException('IOException', e);
     }
   }
-  String getName() => pathos.basename(_path);
+
+  String getName() => pathContext.basename(_path);
   String getParent() {
-    var result = pathos.dirname(_path);
+    var result = pathContext.dirname(_path);
     // "." or  "/" or  "C:\"
     if (result.length < 4) return null;
     return result;
   }
+
   JavaFile getParentFile() {
     var parent = getParent();
     if (parent == null) return null;
     return new JavaFile(parent);
   }
+
   String getPath() => _path;
   bool isDirectory() {
     return _newDirectory().existsSync();
   }
+
   bool isExecutable() {
     return _newFile().statSync().mode & 0x111 != 0;
   }
+
   bool isFile() {
     return _newFile().existsSync();
   }
+
   int lastModified() {
     try {
       return _newFile().lastModifiedSync().millisecondsSinceEpoch;
@@ -77,6 +87,7 @@
       return -1;
     }
   }
+
   List<JavaFile> listFiles() {
     var files = <JavaFile>[];
     var entities = _newDirectory().listSync();
@@ -85,12 +96,14 @@
     }
     return files;
   }
+
   String readAsStringSync() => _newFile().readAsStringSync();
   String toString() => _path.toString();
   Uri toURI() {
     String path = getAbsolutePath();
-    return pathos.toUri(path);
+    return pathContext.toUri(path);
   }
+
   Directory _newDirectory() => new Directory(_path);
   File _newFile() => new File(_path);
 }
@@ -120,21 +133,25 @@
         String sdkPath;
         // may be "xcodebuild/ReleaseIA32/dart" with "sdk" sibling
         {
-          var outDir = pathos.dirname(pathos.dirname(exec));
-          sdkPath = pathos.join(pathos.dirname(outDir), "sdk");
+          var outDir =
+              JavaFile.pathContext.dirname(JavaFile.pathContext.dirname(exec));
+          sdkPath = JavaFile.pathContext
+              .join(JavaFile.pathContext.dirname(outDir), "sdk");
           if (new Directory(sdkPath).existsSync()) {
             _properties[name] = sdkPath;
             return sdkPath;
           }
         }
         // probably be "dart-sdk/bin/dart"
-        sdkPath = pathos.dirname(pathos.dirname(exec));
+        sdkPath =
+            JavaFile.pathContext.dirname(JavaFile.pathContext.dirname(exec));
         _properties[name] = sdkPath;
         return sdkPath;
       }
     }
     return null;
   }
+
   static String setProperty(String name, String value) {
     String oldValue = _properties[name];
     _properties[name] = value;
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index df3187b..47a4bc1 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.parser;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 6792538..bd316bf 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -2431,6 +2431,9 @@
       // exception
       LocalVariableElementImpl exception =
           new LocalVariableElementImpl.forNode(exceptionParameter);
+      if (node.exceptionType == null) {
+        exception.hasImplicitType = true;
+      }
       _currentHolder.addLocalVariable(exception);
       exceptionParameter.staticElement = exception;
       // stack trace
@@ -2600,6 +2603,9 @@
     element.setVisibleRange(declarationEnd, statementEnd - declarationEnd - 1);
     element.const3 = node.isConst;
     element.final2 = node.isFinal;
+    if (node.type == null) {
+      element.hasImplicitType = true;
+    }
     _currentHolder.addLocalVariable(element);
     variableName.staticElement = element;
     return super.visitDeclaredIdentifier(node);
@@ -2640,6 +2646,10 @@
     }
     // visible range
     _setParameterVisibleRange(node, parameter);
+    if (normalParameter is SimpleFormalParameter &&
+        normalParameter.type == null) {
+      parameter.hasImplicitType = true;
+    }
     _currentHolder.addParameter(parameter);
     parameterName.staticElement = parameter;
     normalParameter.accept(this);
@@ -2746,6 +2756,9 @@
             element.setVisibleRange(functionEnd, blockEnd - functionEnd - 1);
           }
         }
+        if (node.returnType == null) {
+          element.hasImplicitReturnType = true;
+        }
         _currentHolder.addFunction(element);
         expression.element = element;
         functionName.staticElement = element;
@@ -2783,6 +2796,9 @@
           getter.getter = true;
           getter.static = true;
           variable.getter = getter;
+          if (node.returnType == null) {
+            getter.hasImplicitReturnType = true;
+          }
           _currentHolder.addAccessor(getter);
           expression.element = getter;
           propertyNameNode.staticElement = getter;
@@ -2859,6 +2875,7 @@
       _functionTypesToFix.add(type);
     }
     element.type = type;
+    element.hasImplicitReturnType = true;
     _currentHolder.addFunction(element);
     node.element = element;
     holder.validate();
@@ -2961,6 +2978,9 @@
         if (body.isGenerator) {
           element.generator = true;
         }
+        if (node.returnType == null) {
+          element.hasImplicitReturnType = true;
+        }
         _currentHolder.addMethod(element);
         methodName.staticElement = element;
       } else {
@@ -2995,6 +3015,9 @@
           getter.getter = true;
           getter.static = isStatic;
           field.getter = getter;
+          if (node.returnType == null) {
+            getter.hasImplicitReturnType = true;
+          }
           _currentHolder.addAccessor(getter);
           propertyNameNode.staticElement = getter;
         } else {
@@ -3071,6 +3094,9 @@
       parameter.final2 = node.isFinal;
       parameter.parameterKind = node.kind;
       _setParameterVisibleRange(node, parameter);
+      if (node.type == null) {
+        parameter.hasImplicitType = true;
+      }
       _currentHolder.addParameter(parameter);
       parameterName.staticElement = parameter;
     }
@@ -3133,6 +3159,9 @@
         field = new FieldElementImpl.forNode(fieldName);
       }
       element = field;
+      if ((node.parent as VariableDeclarationList).type == null) {
+        field.hasImplicitType = true;
+      }
       _currentHolder.addField(field);
       fieldName.staticElement = field;
     } else if (_inFunction) {
@@ -3148,6 +3177,9 @@
       // TODO(brianwilkerson) This isn't right for variables declared in a for
       // loop.
       variable.setVisibleRange(enclosingBlock.offset, enclosingBlock.length);
+      if ((node.parent as VariableDeclarationList).type == null) {
+        variable.hasImplicitType = true;
+      }
       _currentHolder.addLocalVariable(variable);
       variableName.staticElement = element;
     } else {
@@ -3159,6 +3191,9 @@
         variable = new TopLevelVariableElementImpl.forNode(variableName);
       }
       element = variable;
+      if ((node.parent as VariableDeclarationList).type == null) {
+        variable.hasImplicitType = true;
+      }
       _currentHolder.addTopLevelVariable(variable);
       variableName.staticElement = element;
     }
@@ -3190,6 +3225,9 @@
       PropertyAccessorElementImpl getter =
           new PropertyAccessorElementImpl.forVariable(element);
       getter.getter = true;
+      if (element.hasImplicitType) {
+        getter.hasImplicitReturnType = true;
+      }
       _currentHolder.addAccessor(getter);
       element.getter = getter;
       if (!isConst && !isFinal) {
@@ -10318,6 +10356,15 @@
   }
 
   /**
+   * A client is about to resolve a member in the given class declaration.
+   */
+  void prepareToResolveMembersInClass(ClassDeclaration node) {
+    _enclosingClassDeclaration = node;
+    enclosingClass = node.element;
+    typeAnalyzer.thisType = enclosingClass == null ? null : enclosingClass.type;
+  }
+
+  /**
    * If the given [type] is valid, strongly more specific than the
    * existing static type of the given [expression], record it as a propagated
    * type of the given [expression]. Otherwise, reset it to `null`.
@@ -10668,6 +10715,11 @@
   @override
   Object visitDefaultFormalParameter(DefaultFormalParameter node) {
     super.visitDefaultFormalParameter(node);
+    ParameterElement element = node.element;
+    if (element.initializer != null && node.defaultValue != null) {
+      (element.initializer as FunctionElementImpl).returnType =
+          node.defaultValue.staticType;
+    }
     FormalParameterList parent = node.parent;
     AstNode grandparent = parent.parent;
     if (grandparent is ConstructorDeclaration &&
@@ -10714,9 +10766,21 @@
       ElementResolver.setMetadata(node.element, node);
     }
     //
-    // There is nothing else to do because everything else was resolved by the
-    // element builder.
+    // Continue the enum resolution.
     //
+    ClassElement outerType = enclosingClass;
+    try {
+      enclosingClass = node.element;
+      typeAnalyzer.thisType =
+          enclosingClass == null ? null : enclosingClass.type;
+      super.visitEnumDeclaration(node);
+      node.accept(elementResolver);
+      node.accept(typeAnalyzer);
+    } finally {
+      typeAnalyzer.thisType = outerType == null ? null : outerType.type;
+      enclosingClass = outerType;
+      _enclosingClassDeclaration = null;
+    }
     return null;
   }
 
@@ -11093,6 +11157,10 @@
   Object visitVariableDeclaration(VariableDeclaration node) {
     super.visitVariableDeclaration(node);
     VariableElement element = node.element;
+    if (element.initializer != null && node.initializer != null) {
+      (element.initializer as FunctionElementImpl).returnType =
+          node.initializer.staticType;
+    }
     // Note: in addition to cloning the initializers for const variables, we
     // have to clone the initializers for non-static final fields (because if
     // they occur in a class with a const constructor, they will be needed to
@@ -12049,6 +12117,38 @@
   }
 
   @override
+  Object visitEnumDeclaration(EnumDeclaration node) {
+    ClassElement classElement = node.element;
+    Scope outerScope = nameScope;
+    try {
+      if (classElement == null) {
+        AnalysisEngine.instance.logger.logInformation(
+            "Missing element for enum declaration ${node.name.name} in ${definingLibrary.source.fullName}",
+            new CaughtException(new AnalysisException(), null));
+        super.visitEnumDeclaration(node);
+      } else {
+        ClassElement outerClass = enclosingClass;
+        try {
+          enclosingClass = node.element;
+          nameScope = new ClassScope(nameScope, classElement);
+          visitEnumMembersInScope(node);
+        } finally {
+          enclosingClass = outerClass;
+        }
+      }
+    } finally {
+      nameScope = outerScope;
+    }
+    return null;
+  }
+
+  void visitEnumMembersInScope(EnumDeclaration node) {
+    safelyVisit(node.documentationComment);
+    node.metadata.accept(this);
+    node.constants.accept(this);
+  }
+
+  @override
   Object visitForEachStatement(ForEachStatement node) {
     Scope outerNameScope = nameScope;
     ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
@@ -14639,6 +14739,12 @@
    * Compute the least upper bound of two types.
    */
   DartType getLeastUpperBound(DartType type1, DartType type2);
+
+  /**
+   * Return `true` if the [leftType] is a subtype of the [rightType] (that is,
+   * if leftType <: rightType).
+   */
+  bool isSubtypeOf(DartType leftType, DartType rightType);
 }
 
 /**
@@ -14728,6 +14834,11 @@
       return typeProvider.dynamicType;
     }
   }
+
+  @override
+  bool isSubtypeOf(DartType leftType, DartType rightType) {
+    return leftType.isSubtypeOf(rightType);
+  }
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 2b4fc6e..1bf502b 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.sdk;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index bcdb33d..b155b9a 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.sdk.io;
 
 import 'dart:io';
@@ -342,8 +339,10 @@
   JavaFile get pubExecutable {
     if (_pubExecutable == null) {
       _pubExecutable = _verifyExecutable(new JavaFile.relative(
-          new JavaFile.relative(_sdkDirectory, _BIN_DIRECTORY_NAME), OSUtilities
-              .isWindows() ? _PUB_EXECUTABLE_NAME_WIN : _PUB_EXECUTABLE_NAME));
+          new JavaFile.relative(_sdkDirectory, _BIN_DIRECTORY_NAME),
+          OSUtilities.isWindows()
+              ? _PUB_EXECUTABLE_NAME_WIN
+              : _PUB_EXECUTABLE_NAME));
     }
     return _pubExecutable;
   }
@@ -400,6 +399,22 @@
     return _vmExecutable;
   }
 
+  /**
+   * Determine the search order for trying to locate the [_LIBRARIES_FILE].
+   */
+  Iterable<JavaFile> get _libraryMapLocations sync* {
+    yield new JavaFile.relative(
+        new JavaFile.relative(
+            new JavaFile.relative(
+                new JavaFile.relative(libraryDirectory, _INTERNAL_DIR),
+                _SDK_LIBRARY_METADATA_DIR),
+            _SDK_LIBRARY_METADATA_LIB_DIR),
+        _LIBRARIES_FILE);
+    yield new JavaFile.relative(
+        new JavaFile.relative(libraryDirectory, _INTERNAL_DIR),
+        _LIBRARIES_FILE);
+  }
+
   @override
   Source fromFileUri(Uri uri) {
     JavaFile file = new JavaFile.fromUri(uri);
@@ -474,23 +489,24 @@
    * is available. Return the initialized library map.
    */
   LibraryMap initialLibraryMap(bool useDart2jsPaths) {
-    JavaFile librariesFile = new JavaFile.relative(
-        new JavaFile.relative(
-          new JavaFile.relative(
-            new JavaFile.relative(libraryDirectory, _INTERNAL_DIR),
-            _SDK_LIBRARY_METADATA_DIR),
-          _SDK_LIBRARY_METADATA_LIB_DIR),
-        _LIBRARIES_FILE);
-    try {
-      String contents = librariesFile.readAsStringSync();
-      return new SdkLibrariesReader(useDart2jsPaths).readFromFile(
-          librariesFile, contents);
-    } catch (exception, stackTrace) {
-      AnalysisEngine.instance.logger.logError(
-          "Could not initialize the library map from ${librariesFile.getAbsolutePath()}",
-          new CaughtException(exception, stackTrace));
-      return new LibraryMap();
+    List<String> searchedPaths = <String>[];
+    var lastStackTrace = null;
+    var lastException = null;
+    for (JavaFile librariesFile in _libraryMapLocations) {
+      try {
+        String contents = librariesFile.readAsStringSync();
+        return new SdkLibrariesReader(useDart2jsPaths)
+            .readFromFile(librariesFile, contents);
+      } catch (exception, stackTrace) {
+        searchedPaths.add(librariesFile.getAbsolutePath());
+        lastException = exception;
+        lastStackTrace = stackTrace;
+      }
     }
+    AnalysisEngine.instance.logger.logError(
+        "Could not initialize the library map from $searchedPaths",
+        new CaughtException(lastException, lastStackTrace));
+    return new LibraryMap();
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 7db8cbe..e6d7a54 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.source;
 
 import 'dart:collection';
@@ -1076,11 +1073,10 @@
   Source resolveAbsolute(Uri uri, [Uri actualUri]);
 
   /**
-   * Return an absolute URI that represents the given source, or `null` if a valid URI cannot
-   * be computed.
+   * Return an absolute URI that represents the given [source], or `null` if a
+   * valid URI cannot be computed.
    *
-   * @param source the source to get URI for
-   * @return the absolute URI representing the given source
+   * The computation should be based solely on [source.fullName].
    */
   Uri restoreAbsolute(Source source) => null;
 }
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index fa32b4b..76d3396 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.source.io;
 
 import 'dart:collection';
@@ -286,10 +283,7 @@
 
   @override
   Uri restoreAbsolute(Source source) {
-    if (source is FileBasedSource) {
-      return new Uri.file(source.fullName);
-    }
-    return null;
+    return new Uri.file(source.fullName);
   }
 
   /**
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 096c14b..720f8bb 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -543,8 +543,10 @@
         }
       }
     }
-    _recordStaticType(node, _typeProvider.mapType
-        .substitute4(<DartType>[staticKeyType, staticValueType]));
+    _recordStaticType(
+        node,
+        _typeProvider.mapType
+            .substitute4(<DartType>[staticKeyType, staticValueType]));
     return null;
   }
 
@@ -1179,9 +1181,25 @@
     return null;
   }
 
+  void _inferLocalVariableType(
+      VariableDeclaration node, Expression initializer) {
+    if (initializer != null &&
+        (node.parent as VariableDeclarationList).type == null &&
+        (node.element is LocalVariableElementImpl) &&
+        (initializer.staticType != null) &&
+        (!initializer.staticType.isBottom)) {
+      LocalVariableElementImpl element = node.element;
+      element.type = initializer.staticType;
+      node.name.staticType = initializer.staticType;
+    }
+  }
+
   @override
   Object visitVariableDeclaration(VariableDeclaration node) {
     Expression initializer = node.initializer;
+    if (_resolver.definingLibrary.context.analysisOptions.strongMode) {
+      _inferLocalVariableType(node, initializer);
+    }
     if (initializer != null) {
       DartType rightType = initializer.bestType;
       SimpleIdentifier name = node.name;
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
index b0702c7..86f1e04 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_factory.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.testing.ast_factory;
 
 import 'package:analyzer/src/generated/ast.dart';
@@ -34,8 +31,11 @@
 
   static Annotation annotation2(Identifier name,
           SimpleIdentifier constructorName, ArgumentList arguments) =>
-      new Annotation(TokenFactory.tokenFromType(TokenType.AT), name,
-          TokenFactory.tokenFromType(TokenType.PERIOD), constructorName,
+      new Annotation(
+          TokenFactory.tokenFromType(TokenType.AT),
+          name,
+          TokenFactory.tokenFromType(TokenType.PERIOD),
+          constructorName,
           arguments);
 
   static ArgumentList argumentList([List<Expression> arguments]) =>
@@ -47,30 +47,39 @@
           expression, TokenFactory.tokenFromKeyword(Keyword.AS), type);
 
   static AssertStatement assertStatement(Expression condition) =>
-      new AssertStatement(TokenFactory.tokenFromKeyword(Keyword.ASSERT),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), condition,
+      new AssertStatement(
+          TokenFactory.tokenFromKeyword(Keyword.ASSERT),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          condition,
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static AssignmentExpression assignmentExpression(Expression leftHandSide,
-      TokenType operator, Expression rightHandSide) => new AssignmentExpression(
-      leftHandSide, TokenFactory.tokenFromType(operator), rightHandSide);
+          TokenType operator, Expression rightHandSide) =>
+      new AssignmentExpression(
+          leftHandSide, TokenFactory.tokenFromType(operator), rightHandSide);
 
   static BlockFunctionBody asyncBlockFunctionBody(
-      [List<Statement> statements]) => new BlockFunctionBody(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"), null,
-      block(statements));
+          [List<Statement> statements]) =>
+      new BlockFunctionBody(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"),
+          null,
+          block(statements));
 
   static ExpressionFunctionBody asyncExpressionFunctionBody(
-      Expression expression) => new ExpressionFunctionBody(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"),
-      TokenFactory.tokenFromType(TokenType.FUNCTION), expression,
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+          Expression expression) =>
+      new ExpressionFunctionBody(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"),
+          TokenFactory.tokenFromType(TokenType.FUNCTION),
+          expression,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static BlockFunctionBody asyncGeneratorBlockFunctionBody(
-      [List<Statement> statements]) => new BlockFunctionBody(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"),
-      TokenFactory.tokenFromType(TokenType.STAR), block(statements));
+          [List<Statement> statements]) =>
+      new BlockFunctionBody(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "async"),
+          TokenFactory.tokenFromType(TokenType.STAR),
+          block(statements));
 
   static AwaitExpression awaitExpression(Expression expression) =>
       new AwaitExpression(
@@ -78,11 +87,13 @@
           expression);
 
   static BinaryExpression binaryExpression(Expression leftOperand,
-      TokenType operator, Expression rightOperand) => new BinaryExpression(
-      leftOperand, TokenFactory.tokenFromType(operator), rightOperand);
+          TokenType operator, Expression rightOperand) =>
+      new BinaryExpression(
+          leftOperand, TokenFactory.tokenFromType(operator), rightOperand);
 
   static Block block([List<Statement> statements]) => new Block(
-      TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET), statements,
+      TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+      statements,
       TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
   static BlockFunctionBody blockFunctionBody(Block block) =>
@@ -91,31 +102,41 @@
   static BlockFunctionBody blockFunctionBody2([List<Statement> statements]) =>
       new BlockFunctionBody(null, null, block(statements));
 
-  static BooleanLiteral booleanLiteral(bool value) => new BooleanLiteral(value
-      ? TokenFactory.tokenFromKeyword(Keyword.TRUE)
-      : TokenFactory.tokenFromKeyword(Keyword.FALSE), value);
+  static BooleanLiteral booleanLiteral(bool value) => new BooleanLiteral(
+      value
+          ? TokenFactory.tokenFromKeyword(Keyword.TRUE)
+          : TokenFactory.tokenFromKeyword(Keyword.FALSE),
+      value);
 
   static BreakStatement breakStatement() => new BreakStatement(
-      TokenFactory.tokenFromKeyword(Keyword.BREAK), null,
+      TokenFactory.tokenFromKeyword(Keyword.BREAK),
+      null,
       TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static BreakStatement breakStatement2(String label) => new BreakStatement(
-      TokenFactory.tokenFromKeyword(Keyword.BREAK), identifier3(label),
+      TokenFactory.tokenFromKeyword(Keyword.BREAK),
+      identifier3(label),
       TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static IndexExpression cascadedIndexExpression(Expression index) =>
       new IndexExpression.forCascade(
           TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD),
-          TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET), index,
+          TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET),
+          index,
           TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
 
   static MethodInvocation cascadedMethodInvocation(String methodName,
-      [List<Expression> arguments]) => new MethodInvocation(null,
-      TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD),
-      identifier3(methodName), null, argumentList(arguments));
+          [List<Expression> arguments]) =>
+      new MethodInvocation(
+          null,
+          TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD),
+          identifier3(methodName),
+          null,
+          argumentList(arguments));
 
   static PropertyAccess cascadedPropertyAccess(String propertyName) =>
-      new PropertyAccess(null,
+      new PropertyAccess(
+          null,
           TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD),
           identifier3(propertyName));
 
@@ -142,47 +163,74 @@
       catchClause5(exceptionType, exceptionParameter, null, statements);
 
   static CatchClause catchClause5(TypeName exceptionType,
-      String exceptionParameter, String stackTraceParameter,
-      [List<Statement> statements]) => new CatchClause(exceptionType == null
-          ? null
-          : TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "on"),
-      exceptionType, exceptionParameter == null
-          ? null
-          : TokenFactory.tokenFromKeyword(Keyword.CATCH), exceptionParameter ==
-              null ? null : TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-      exceptionParameter == null ? null : identifier3(exceptionParameter),
-      stackTraceParameter == null
-          ? null
-          : TokenFactory.tokenFromType(TokenType.COMMA),
-      stackTraceParameter == null ? null : identifier3(stackTraceParameter),
-      exceptionParameter == null
-          ? null
-          : TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-      block(statements));
+          String exceptionParameter, String stackTraceParameter,
+          [List<Statement> statements]) =>
+      new CatchClause(
+          exceptionType == null
+              ? null
+              : TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "on"),
+          exceptionType,
+          exceptionParameter == null
+              ? null
+              : TokenFactory.tokenFromKeyword(Keyword.CATCH),
+          exceptionParameter == null
+              ? null
+              : TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          exceptionParameter == null ? null : identifier3(exceptionParameter),
+          stackTraceParameter == null
+              ? null
+              : TokenFactory.tokenFromType(TokenType.COMMA),
+          stackTraceParameter == null ? null : identifier3(stackTraceParameter),
+          exceptionParameter == null
+              ? null
+              : TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          block(statements));
 
-  static ClassDeclaration classDeclaration(Keyword abstractKeyword, String name,
-      TypeParameterList typeParameters, ExtendsClause extendsClause,
-      WithClause withClause, ImplementsClause implementsClause,
-      [List<ClassMember> members]) => new ClassDeclaration(null, null,
-      abstractKeyword == null
-          ? null
-          : TokenFactory.tokenFromKeyword(abstractKeyword),
-      TokenFactory.tokenFromKeyword(Keyword.CLASS), identifier3(name),
-      typeParameters, extendsClause, withClause, implementsClause,
-      TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET), members,
-      TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+  static ClassDeclaration classDeclaration(
+          Keyword abstractKeyword,
+          String name,
+          TypeParameterList typeParameters,
+          ExtendsClause extendsClause,
+          WithClause withClause,
+          ImplementsClause implementsClause,
+          [List<ClassMember> members]) =>
+      new ClassDeclaration(
+          null,
+          null,
+          abstractKeyword == null
+              ? null
+              : TokenFactory.tokenFromKeyword(abstractKeyword),
+          TokenFactory.tokenFromKeyword(Keyword.CLASS),
+          identifier3(name),
+          typeParameters,
+          extendsClause,
+          withClause,
+          implementsClause,
+          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+          members,
+          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
-  static ClassTypeAlias classTypeAlias(String name,
-      TypeParameterList typeParameters, Keyword abstractKeyword,
-      TypeName superclass, WithClause withClause,
-      ImplementsClause implementsClause) => new ClassTypeAlias(null, null,
-      TokenFactory.tokenFromKeyword(Keyword.CLASS), identifier3(name),
-      typeParameters, TokenFactory.tokenFromType(TokenType.EQ),
-      abstractKeyword == null
-          ? null
-          : TokenFactory.tokenFromKeyword(abstractKeyword), superclass,
-      withClause, implementsClause,
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+  static ClassTypeAlias classTypeAlias(
+          String name,
+          TypeParameterList typeParameters,
+          Keyword abstractKeyword,
+          TypeName superclass,
+          WithClause withClause,
+          ImplementsClause implementsClause) =>
+      new ClassTypeAlias(
+          null,
+          null,
+          TokenFactory.tokenFromKeyword(Keyword.CLASS),
+          identifier3(name),
+          typeParameters,
+          TokenFactory.tokenFromType(TokenType.EQ),
+          abstractKeyword == null
+              ? null
+              : TokenFactory.tokenFromKeyword(abstractKeyword),
+          superclass,
+          withClause,
+          implementsClause,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static CompilationUnit compilationUnit() =>
       compilationUnit8(null, null, null);
@@ -209,49 +257,82 @@
           String scriptTag, List<Directive> directives) =>
       compilationUnit8(scriptTag, directives, null);
 
-  static CompilationUnit compilationUnit8(String scriptTag,
-      List<Directive> directives,
-      List<CompilationUnitMember> declarations) => new CompilationUnit(
-      TokenFactory.tokenFromType(TokenType.EOF),
-      scriptTag == null ? null : AstFactory.scriptTag(scriptTag),
-      directives == null ? new List<Directive>() : directives,
-      declarations == null ? new List<CompilationUnitMember>() : declarations,
-      TokenFactory.tokenFromType(TokenType.EOF));
+  static CompilationUnit compilationUnit8(
+          String scriptTag,
+          List<Directive> directives,
+          List<CompilationUnitMember> declarations) =>
+      new CompilationUnit(
+          TokenFactory.tokenFromType(TokenType.EOF),
+          scriptTag == null ? null : AstFactory.scriptTag(scriptTag),
+          directives == null ? new List<Directive>() : directives,
+          declarations == null
+              ? new List<CompilationUnitMember>()
+              : declarations,
+          TokenFactory.tokenFromType(TokenType.EOF));
 
   static ConditionalExpression conditionalExpression(Expression condition,
           Expression thenExpression, Expression elseExpression) =>
-      new ConditionalExpression(condition,
-          TokenFactory.tokenFromType(TokenType.QUESTION), thenExpression,
-          TokenFactory.tokenFromType(TokenType.COLON), elseExpression);
+      new ConditionalExpression(
+          condition,
+          TokenFactory.tokenFromType(TokenType.QUESTION),
+          thenExpression,
+          TokenFactory.tokenFromType(TokenType.COLON),
+          elseExpression);
 
-  static ConstructorDeclaration constructorDeclaration(Identifier returnType,
-      String name, FormalParameterList parameters,
-      List<ConstructorInitializer> initializers) => new ConstructorDeclaration(
-      null, null, TokenFactory.tokenFromKeyword(Keyword.EXTERNAL), null, null,
-      returnType,
-      name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
-      name == null ? null : identifier3(name), parameters,
-      initializers == null || initializers.isEmpty
-          ? null
-          : TokenFactory.tokenFromType(TokenType.PERIOD), initializers == null
-          ? new List<ConstructorInitializer>()
-          : initializers, null, emptyFunctionBody());
+  static ConstructorDeclaration constructorDeclaration(
+          Identifier returnType,
+          String name,
+          FormalParameterList parameters,
+          List<ConstructorInitializer> initializers) =>
+      new ConstructorDeclaration(
+          null,
+          null,
+          TokenFactory.tokenFromKeyword(Keyword.EXTERNAL),
+          null,
+          null,
+          returnType,
+          name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
+          name == null ? null : identifier3(name),
+          parameters,
+          initializers == null || initializers.isEmpty
+              ? null
+              : TokenFactory.tokenFromType(TokenType.PERIOD),
+          initializers == null
+              ? new List<ConstructorInitializer>()
+              : initializers,
+          null,
+          emptyFunctionBody());
 
-  static ConstructorDeclaration constructorDeclaration2(Keyword constKeyword,
-      Keyword factoryKeyword, Identifier returnType, String name,
-      FormalParameterList parameters, List<ConstructorInitializer> initializers,
-      FunctionBody body) => new ConstructorDeclaration(null, null, null,
-      constKeyword == null ? null : TokenFactory.tokenFromKeyword(constKeyword),
-      factoryKeyword == null
-          ? null
-          : TokenFactory.tokenFromKeyword(factoryKeyword), returnType,
-      name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
-      name == null ? null : identifier3(name), parameters,
-      initializers == null || initializers.isEmpty
-          ? null
-          : TokenFactory.tokenFromType(TokenType.PERIOD), initializers == null
-          ? new List<ConstructorInitializer>()
-          : initializers, null, body);
+  static ConstructorDeclaration constructorDeclaration2(
+          Keyword constKeyword,
+          Keyword factoryKeyword,
+          Identifier returnType,
+          String name,
+          FormalParameterList parameters,
+          List<ConstructorInitializer> initializers,
+          FunctionBody body) =>
+      new ConstructorDeclaration(
+          null,
+          null,
+          null,
+          constKeyword == null
+              ? null
+              : TokenFactory.tokenFromKeyword(constKeyword),
+          factoryKeyword == null
+              ? null
+              : TokenFactory.tokenFromKeyword(factoryKeyword),
+          returnType,
+          name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
+          name == null ? null : identifier3(name),
+          parameters,
+          initializers == null || initializers.isEmpty
+              ? null
+              : TokenFactory.tokenFromType(TokenType.PERIOD),
+          initializers == null
+              ? new List<ConstructorInitializer>()
+              : initializers,
+          null,
+          body);
 
   static ConstructorFieldInitializer constructorFieldInitializer(
           bool prefixedWithThis, String fieldName, Expression expression) =>
@@ -259,16 +340,20 @@
           prefixedWithThis ? TokenFactory.tokenFromKeyword(Keyword.THIS) : null,
           prefixedWithThis
               ? TokenFactory.tokenFromType(TokenType.PERIOD)
-              : null, identifier3(fieldName),
-          TokenFactory.tokenFromType(TokenType.EQ), expression);
+              : null,
+          identifier3(fieldName),
+          TokenFactory.tokenFromType(TokenType.EQ),
+          expression);
 
   static ConstructorName constructorName(TypeName type, String name) =>
-      new ConstructorName(type,
+      new ConstructorName(
+          type,
           name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
           name == null ? null : identifier3(name));
 
   static ContinueStatement continueStatement([String label]) =>
-      new ContinueStatement(TokenFactory.tokenFromKeyword(Keyword.CONTINUE),
+      new ContinueStatement(
+          TokenFactory.tokenFromKeyword(Keyword.CONTINUE),
           label == null ? null : identifier3(label),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
@@ -278,21 +363,27 @@
 
   static DeclaredIdentifier declaredIdentifier2(
           Keyword keyword, TypeName type, String identifier) =>
-      new DeclaredIdentifier(null, null,
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), type,
+      new DeclaredIdentifier(
+          null,
+          null,
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          type,
           identifier3(identifier));
 
   static DeclaredIdentifier declaredIdentifier3(String identifier) =>
-      declaredIdentifier2(null, null, identifier);
+      declaredIdentifier2(Keyword.VAR, null, identifier);
 
   static DeclaredIdentifier declaredIdentifier4(
           TypeName type, String identifier) =>
       declaredIdentifier2(null, type, identifier);
 
   static DoStatement doStatement(Statement body, Expression condition) =>
-      new DoStatement(TokenFactory.tokenFromKeyword(Keyword.DO), body,
+      new DoStatement(
+          TokenFactory.tokenFromKeyword(Keyword.DO),
+          body,
           TokenFactory.tokenFromKeyword(Keyword.WHILE),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), condition,
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          condition,
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
@@ -307,9 +398,13 @@
 
   static EnumDeclaration enumDeclaration(
           SimpleIdentifier name, List<EnumConstantDeclaration> constants) =>
-      new EnumDeclaration(null, null,
-          TokenFactory.tokenFromKeyword(Keyword.ENUM), name,
-          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET), constants,
+      new EnumDeclaration(
+          null,
+          null,
+          TokenFactory.tokenFromKeyword(Keyword.ENUM),
+          name,
+          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+          constants,
           TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
   static EnumDeclaration enumDeclaration2(
@@ -325,17 +420,24 @@
   }
 
   static ExportDirective exportDirective(List<Annotation> metadata, String uri,
-      [List<Combinator> combinators]) => new ExportDirective(null, metadata,
-      TokenFactory.tokenFromKeyword(Keyword.EXPORT), string2(uri), combinators,
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+          [List<Combinator> combinators]) =>
+      new ExportDirective(
+          null,
+          metadata,
+          TokenFactory.tokenFromKeyword(Keyword.EXPORT),
+          string2(uri),
+          combinators,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static ExportDirective exportDirective2(String uri,
           [List<Combinator> combinators]) =>
       exportDirective(null, uri, combinators);
 
   static ExpressionFunctionBody expressionFunctionBody(Expression expression) =>
-      new ExpressionFunctionBody(null,
-          TokenFactory.tokenFromType(TokenType.FUNCTION), expression,
+      new ExpressionFunctionBody(
+          null,
+          TokenFactory.tokenFromType(TokenType.FUNCTION),
+          expression,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static ExpressionStatement expressionStatement(Expression expression) =>
@@ -347,7 +449,9 @@
 
   static FieldDeclaration fieldDeclaration(bool isStatic, Keyword keyword,
           TypeName type, List<VariableDeclaration> variables) =>
-      new FieldDeclaration(null, null,
+      new FieldDeclaration(
+          null,
+          null,
           isStatic ? TokenFactory.tokenFromKeyword(Keyword.STATIC) : null,
           variableDeclarationList(keyword, type, variables),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
@@ -357,61 +461,98 @@
       fieldDeclaration(isStatic, keyword, null, variables);
 
   static FieldFormalParameter fieldFormalParameter(
-      Keyword keyword, TypeName type, String identifier,
-      [FormalParameterList parameterList]) => new FieldFormalParameter(null,
-      null, keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-      type, TokenFactory.tokenFromKeyword(Keyword.THIS),
-      TokenFactory.tokenFromType(TokenType.PERIOD), identifier3(identifier),
-      null, parameterList);
+          Keyword keyword, TypeName type, String identifier,
+          [FormalParameterList parameterList]) =>
+      new FieldFormalParameter(
+          null,
+          null,
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          type,
+          TokenFactory.tokenFromKeyword(Keyword.THIS),
+          TokenFactory.tokenFromType(TokenType.PERIOD),
+          identifier3(identifier),
+          null,
+          parameterList);
 
   static FieldFormalParameter fieldFormalParameter2(String identifier) =>
       fieldFormalParameter(null, null, identifier);
 
   static ForEachStatement forEachStatement(DeclaredIdentifier loopVariable,
           Expression iterator, Statement body) =>
-      new ForEachStatement.withDeclaration(null,
+      new ForEachStatement.withDeclaration(
+          null,
           TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), loopVariable,
-          TokenFactory.tokenFromKeyword(Keyword.IN), iterator,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), body);
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          loopVariable,
+          TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterator,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body);
 
   static ForEachStatement forEachStatement2(
           SimpleIdentifier identifier, Expression iterator, Statement body) =>
-      new ForEachStatement.withReference(null,
+      new ForEachStatement.withReference(
+          null,
           TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), identifier,
-          TokenFactory.tokenFromKeyword(Keyword.IN), iterator,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), body);
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          identifier,
+          TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterator,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body);
 
   static FormalParameterList formalParameterList(
-      [List<FormalParameter> parameters]) => new FormalParameterList(
-      TokenFactory.tokenFromType(TokenType.OPEN_PAREN), parameters, null, null,
-      TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
+          [List<FormalParameter> parameters]) =>
+      new FormalParameterList(
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          parameters,
+          null,
+          null,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
 
   static ForStatement forStatement(Expression initialization,
           Expression condition, List<Expression> updaters, Statement body) =>
-      new ForStatement(TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), null,
-          initialization, TokenFactory.tokenFromType(TokenType.SEMICOLON),
-          condition, TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), body);
+      new ForStatement(
+          TokenFactory.tokenFromKeyword(Keyword.FOR),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          null,
+          initialization,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body);
 
   static ForStatement forStatement2(VariableDeclarationList variableList,
           Expression condition, List<Expression> updaters, Statement body) =>
-      new ForStatement(TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), variableList, null,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON), condition,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), body);
+      new ForStatement(
+          TokenFactory.tokenFromKeyword(Keyword.FOR),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          variableList,
+          null,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body);
 
   static FunctionDeclaration functionDeclaration(TypeName type, Keyword keyword,
           String name, FunctionExpression functionExpression) =>
-      new FunctionDeclaration(null, null, null, type,
+      new FunctionDeclaration(
+          null,
+          null,
+          null,
+          type,
           keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-          identifier3(name), functionExpression);
+          identifier3(name),
+          functionExpression);
 
   static FunctionDeclarationStatement functionDeclarationStatement(
-          TypeName type, Keyword keyword, String name,
+          TypeName type,
+          Keyword keyword,
+          String name,
           FunctionExpression functionExpression) =>
       new FunctionDeclarationStatement(
           functionDeclaration(type, keyword, name, functionExpression));
@@ -424,25 +565,28 @@
       new FunctionExpression(null, parameters, body);
 
   static FunctionExpression functionExpression3(
-          TypeParameterList typeParameters, FormalParameterList parameters,
+          TypeParameterList typeParameters,
+          FormalParameterList parameters,
           FunctionBody body) =>
       new FunctionExpression(typeParameters, parameters, body);
 
   static FunctionExpressionInvocation functionExpressionInvocation(
-          Expression function, [List<Expression> arguments]) =>
+          Expression function,
+          [List<Expression> arguments]) =>
       functionExpressionInvocation2(function, null, arguments);
 
   static FunctionExpressionInvocation functionExpressionInvocation2(
           Expression function,
-          [TypeArgumentList typeArguments, List<Expression> arguments]) =>
+          [TypeArgumentList typeArguments,
+          List<Expression> arguments]) =>
       new FunctionExpressionInvocation(
           function, typeArguments, argumentList(arguments));
 
   static FunctionTypedFormalParameter functionTypedFormalParameter(
-      TypeName returnType, String identifier,
-      [List<FormalParameter> parameters]) => new FunctionTypedFormalParameter(
-      null, null, returnType, identifier3(identifier), null,
-      formalParameterList(parameters));
+          TypeName returnType, String identifier,
+          [List<FormalParameter> parameters]) =>
+      new FunctionTypedFormalParameter(null, null, returnType,
+          identifier3(identifier), null, formalParameterList(parameters));
 
   static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) =>
       new HideCombinator(TokenFactory.tokenFromString("hide"), identifiers);
@@ -460,12 +604,13 @@
       TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, lexeme));
 
   static PrefixedIdentifier identifier4(
-      String prefix, SimpleIdentifier identifier) => new PrefixedIdentifier(
-      identifier3(prefix), TokenFactory.tokenFromType(TokenType.PERIOD),
-      identifier);
+          String prefix, SimpleIdentifier identifier) =>
+      new PrefixedIdentifier(identifier3(prefix),
+          TokenFactory.tokenFromType(TokenType.PERIOD), identifier);
 
   static PrefixedIdentifier identifier5(String prefix, String identifier) =>
-      new PrefixedIdentifier(identifier3(prefix),
+      new PrefixedIdentifier(
+          identifier3(prefix),
           TokenFactory.tokenFromType(TokenType.PERIOD),
           identifier3(identifier));
 
@@ -483,26 +628,35 @@
       ifStatement2(condition, thenStatement, null);
 
   static IfStatement ifStatement2(Expression condition, Statement thenStatement,
-      Statement elseStatement) => new IfStatement(
-      TokenFactory.tokenFromKeyword(Keyword.IF),
-      TokenFactory.tokenFromType(TokenType.OPEN_PAREN), condition,
-      TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), thenStatement,
-      elseStatement == null
-          ? null
-          : TokenFactory.tokenFromKeyword(Keyword.ELSE), elseStatement);
+          Statement elseStatement) =>
+      new IfStatement(
+          TokenFactory.tokenFromKeyword(Keyword.IF),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          condition,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          thenStatement,
+          elseStatement == null
+              ? null
+              : TokenFactory.tokenFromKeyword(Keyword.ELSE),
+          elseStatement);
 
   static ImplementsClause implementsClause(List<TypeName> types) =>
       new ImplementsClause(
           TokenFactory.tokenFromKeyword(Keyword.IMPLEMENTS), types);
 
   static ImportDirective importDirective(
-      List<Annotation> metadata, String uri, bool isDeferred, String prefix,
-      [List<Combinator> combinators]) => new ImportDirective(null, metadata,
-      TokenFactory.tokenFromKeyword(Keyword.IMPORT), string2(uri),
-      !isDeferred ? null : TokenFactory.tokenFromKeyword(Keyword.DEFERRED),
-      prefix == null ? null : TokenFactory.tokenFromKeyword(Keyword.AS),
-      prefix == null ? null : identifier3(prefix), combinators,
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+          List<Annotation> metadata, String uri, bool isDeferred, String prefix,
+          [List<Combinator> combinators]) =>
+      new ImportDirective(
+          null,
+          metadata,
+          TokenFactory.tokenFromKeyword(Keyword.IMPORT),
+          string2(uri),
+          !isDeferred ? null : TokenFactory.tokenFromKeyword(Keyword.DEFERRED),
+          prefix == null ? null : TokenFactory.tokenFromKeyword(Keyword.AS),
+          prefix == null ? null : identifier3(prefix),
+          combinators,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static ImportDirective importDirective2(
           String uri, bool isDeferred, String prefix,
@@ -514,50 +668,63 @@
       importDirective(null, uri, false, prefix, combinators);
 
   static IndexExpression indexExpression(Expression array, Expression index) =>
-      new IndexExpression.forTarget(array,
-          TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET), index,
+      new IndexExpression.forTarget(
+          array,
+          TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET),
+          index,
           TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
 
   static InstanceCreationExpression instanceCreationExpression(
-      Keyword keyword, ConstructorName name,
-      [List<Expression> arguments]) => new InstanceCreationExpression(
-      keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), name,
-      argumentList(arguments));
+          Keyword keyword, ConstructorName name,
+          [List<Expression> arguments]) =>
+      new InstanceCreationExpression(
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          name,
+          argumentList(arguments));
 
   static InstanceCreationExpression instanceCreationExpression2(
-          Keyword keyword, TypeName type, [List<Expression> arguments]) =>
+          Keyword keyword, TypeName type,
+          [List<Expression> arguments]) =>
       instanceCreationExpression3(keyword, type, null, arguments);
 
   static InstanceCreationExpression instanceCreationExpression3(
-      Keyword keyword, TypeName type, String identifier,
-      [List<Expression> arguments]) => instanceCreationExpression(keyword,
-          new ConstructorName(type, identifier == null
+          Keyword keyword, TypeName type, String identifier,
+          [List<Expression> arguments]) =>
+      instanceCreationExpression(
+          keyword,
+          new ConstructorName(
+              type,
+              identifier == null
                   ? null
                   : TokenFactory.tokenFromType(TokenType.PERIOD),
-              identifier == null ? null : identifier3(identifier)), arguments);
+              identifier == null ? null : identifier3(identifier)),
+          arguments);
 
   static IntegerLiteral integer(int value) => new IntegerLiteral(
       TokenFactory.tokenFromTypeAndString(TokenType.INT, value.toString()),
       value);
 
   static InterpolationExpression interpolationExpression(
-      Expression expression) => new InterpolationExpression(
-      TokenFactory.tokenFromType(TokenType.STRING_INTERPOLATION_EXPRESSION),
-      expression, TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+          Expression expression) =>
+      new InterpolationExpression(
+          TokenFactory.tokenFromType(TokenType.STRING_INTERPOLATION_EXPRESSION),
+          expression,
+          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
   static InterpolationExpression interpolationExpression2(String identifier) =>
       new InterpolationExpression(
           TokenFactory.tokenFromType(TokenType.STRING_INTERPOLATION_IDENTIFIER),
-          identifier3(identifier), null);
+          identifier3(identifier),
+          null);
 
   static InterpolationString interpolationString(
           String contents, String value) =>
       new InterpolationString(TokenFactory.tokenFromString(contents), value);
 
   static IsExpression isExpression(
-      Expression expression, bool negated, TypeName type) => new IsExpression(
-      expression, TokenFactory.tokenFromKeyword(Keyword.IS),
-      negated ? TokenFactory.tokenFromType(TokenType.BANG) : null, type);
+          Expression expression, bool negated, TypeName type) =>
+      new IsExpression(expression, TokenFactory.tokenFromKeyword(Keyword.IS),
+          negated ? TokenFactory.tokenFromType(TokenType.BANG) : null, type);
 
   static Label label(SimpleIdentifier label) =>
       new Label(label, TokenFactory.tokenFromType(TokenType.COLON));
@@ -570,8 +737,11 @@
 
   static LibraryDirective libraryDirective(
           List<Annotation> metadata, LibraryIdentifier libraryName) =>
-      new LibraryDirective(null, metadata,
-          TokenFactory.tokenFromKeyword(Keyword.LIBRARY), libraryName,
+      new LibraryDirective(
+          null,
+          metadata,
+          TokenFactory.tokenFromKeyword(Keyword.LIBRARY),
+          libraryName,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static LibraryDirective libraryDirective2(String libraryName) =>
@@ -579,7 +749,8 @@
           new List<Annotation>(), libraryIdentifier2([libraryName]));
 
   static LibraryIdentifier libraryIdentifier(
-      List<SimpleIdentifier> components) => new LibraryIdentifier(components);
+          List<SimpleIdentifier> components) =>
+      new LibraryIdentifier(components);
 
   static LibraryIdentifier libraryIdentifier2(List<String> components) {
     return new LibraryIdentifier(identifierList(components));
@@ -593,17 +764,23 @@
       listLiteral2(null, null, elements);
 
   static ListLiteral listLiteral2(
-      Keyword keyword, TypeArgumentList typeArguments,
-      [List<Expression> elements]) => new ListLiteral(
-      keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-      typeArguments, TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET),
-      elements, TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
+          Keyword keyword, TypeArgumentList typeArguments,
+          [List<Expression> elements]) =>
+      new ListLiteral(
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          typeArguments,
+          TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET),
+          elements,
+          TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
 
   static MapLiteral mapLiteral(Keyword keyword, TypeArgumentList typeArguments,
-      [List<MapLiteralEntry> entries]) => new MapLiteral(
-      keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-      typeArguments, TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
-      entries, TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+          [List<MapLiteralEntry> entries]) =>
+      new MapLiteral(
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          typeArguments,
+          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+          entries,
+          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
   static MapLiteral mapLiteral2([List<MapLiteralEntry> entries]) =>
       mapLiteral(null, null, entries);
@@ -612,54 +789,93 @@
       new MapLiteralEntry(
           string2(key), TokenFactory.tokenFromType(TokenType.COLON), value);
 
-  static MethodDeclaration methodDeclaration(Keyword modifier,
-      TypeName returnType, Keyword property, Keyword operator,
-      SimpleIdentifier name,
-      FormalParameterList parameters) => new MethodDeclaration(null, null,
-      TokenFactory.tokenFromKeyword(Keyword.EXTERNAL),
-      modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
-      returnType,
-      property == null ? null : TokenFactory.tokenFromKeyword(property),
-      operator == null ? null : TokenFactory.tokenFromKeyword(operator), name,
-      null, parameters, emptyFunctionBody());
+  static MethodDeclaration methodDeclaration(
+          Keyword modifier,
+          TypeName returnType,
+          Keyword property,
+          Keyword operator,
+          SimpleIdentifier name,
+          FormalParameterList parameters) =>
+      new MethodDeclaration(
+          null,
+          null,
+          TokenFactory.tokenFromKeyword(Keyword.EXTERNAL),
+          modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
+          returnType,
+          property == null ? null : TokenFactory.tokenFromKeyword(property),
+          operator == null ? null : TokenFactory.tokenFromKeyword(operator),
+          name,
+          null,
+          parameters,
+          emptyFunctionBody());
 
-  static MethodDeclaration methodDeclaration2(Keyword modifier,
-      TypeName returnType, Keyword property, Keyword operator,
-      SimpleIdentifier name, FormalParameterList parameters,
-      FunctionBody body) => new MethodDeclaration(null, null, null,
-      modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
-      returnType,
-      property == null ? null : TokenFactory.tokenFromKeyword(property),
-      operator == null ? null : TokenFactory.tokenFromKeyword(operator), name,
-      null, parameters, body);
+  static MethodDeclaration methodDeclaration2(
+          Keyword modifier,
+          TypeName returnType,
+          Keyword property,
+          Keyword operator,
+          SimpleIdentifier name,
+          FormalParameterList parameters,
+          FunctionBody body) =>
+      new MethodDeclaration(
+          null,
+          null,
+          null,
+          modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
+          returnType,
+          property == null ? null : TokenFactory.tokenFromKeyword(property),
+          operator == null ? null : TokenFactory.tokenFromKeyword(operator),
+          name,
+          null,
+          parameters,
+          body);
 
-  static MethodDeclaration methodDeclaration3(Keyword modifier,
-      TypeName returnType, Keyword property, Keyword operator,
-      SimpleIdentifier name, TypeParameterList typeParameters,
-      FormalParameterList parameters,
-      FunctionBody body) => new MethodDeclaration(null, null, null,
-      modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
-      returnType,
-      property == null ? null : TokenFactory.tokenFromKeyword(property),
-      operator == null ? null : TokenFactory.tokenFromKeyword(operator), name,
-      typeParameters, parameters, body);
+  static MethodDeclaration methodDeclaration3(
+          Keyword modifier,
+          TypeName returnType,
+          Keyword property,
+          Keyword operator,
+          SimpleIdentifier name,
+          TypeParameterList typeParameters,
+          FormalParameterList parameters,
+          FunctionBody body) =>
+      new MethodDeclaration(
+          null,
+          null,
+          null,
+          modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
+          returnType,
+          property == null ? null : TokenFactory.tokenFromKeyword(property),
+          operator == null ? null : TokenFactory.tokenFromKeyword(operator),
+          name,
+          typeParameters,
+          parameters,
+          body);
 
   static MethodInvocation methodInvocation(Expression target, String methodName,
-      [List<Expression> arguments,
-      TokenType operator = TokenType.PERIOD]) => new MethodInvocation(target,
-      target == null ? null : TokenFactory.tokenFromType(operator),
-      identifier3(methodName), null, argumentList(arguments));
+          [List<Expression> arguments,
+          TokenType operator = TokenType.PERIOD]) =>
+      new MethodInvocation(
+          target,
+          target == null ? null : TokenFactory.tokenFromType(operator),
+          identifier3(methodName),
+          null,
+          argumentList(arguments));
 
   static MethodInvocation methodInvocation2(String methodName,
           [List<Expression> arguments]) =>
       methodInvocation(null, methodName, arguments);
 
   static MethodInvocation methodInvocation3(
-      Expression target, String methodName, TypeArgumentList typeArguments,
-      [List<Expression> arguments,
-      TokenType operator = TokenType.PERIOD]) => new MethodInvocation(target,
-      target == null ? null : TokenFactory.tokenFromType(operator),
-      identifier3(methodName), typeArguments, argumentList(arguments));
+          Expression target, String methodName, TypeArgumentList typeArguments,
+          [List<Expression> arguments,
+          TokenType operator = TokenType.PERIOD]) =>
+      new MethodInvocation(
+          target,
+          target == null ? null : TokenFactory.tokenFromType(operator),
+          identifier3(methodName),
+          typeArguments,
+          argumentList(arguments));
 
   static NamedExpression namedExpression(Label label, Expression expression) =>
       new NamedExpression(label, expression);
@@ -670,16 +886,20 @@
 
   static DefaultFormalParameter namedFormalParameter(
           NormalFormalParameter parameter, Expression expression) =>
-      new DefaultFormalParameter(parameter, ParameterKind.NAMED,
+      new DefaultFormalParameter(
+          parameter,
+          ParameterKind.NAMED,
           expression == null
               ? null
-              : TokenFactory.tokenFromType(TokenType.COLON), expression);
+              : TokenFactory.tokenFromType(TokenType.COLON),
+          expression);
 
   static NativeClause nativeClause(String nativeCode) => new NativeClause(
       TokenFactory.tokenFromString("native"), string2(nativeCode));
 
   static NativeFunctionBody nativeFunctionBody(String nativeMethodName) =>
-      new NativeFunctionBody(TokenFactory.tokenFromString("native"),
+      new NativeFunctionBody(
+          TokenFactory.tokenFromString("native"),
           string2(nativeMethodName),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
@@ -687,13 +907,18 @@
       new NullLiteral(TokenFactory.tokenFromKeyword(Keyword.NULL));
 
   static ParenthesizedExpression parenthesizedExpression(
-      Expression expression) => new ParenthesizedExpression(
-      TokenFactory.tokenFromType(TokenType.OPEN_PAREN), expression,
-      TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
+          Expression expression) =>
+      new ParenthesizedExpression(
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          expression,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
 
   static PartDirective partDirective(List<Annotation> metadata, String url) =>
-      new PartDirective(null, metadata,
-          TokenFactory.tokenFromKeyword(Keyword.PART), string2(url),
+      new PartDirective(
+          null,
+          metadata,
+          TokenFactory.tokenFromKeyword(Keyword.PART),
+          string2(url),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static PartDirective partDirective2(String url) =>
@@ -704,14 +929,19 @@
 
   static PartOfDirective partOfDirective2(
           List<Annotation> metadata, LibraryIdentifier libraryName) =>
-      new PartOfDirective(null, metadata,
+      new PartOfDirective(
+          null,
+          metadata,
           TokenFactory.tokenFromKeyword(Keyword.PART),
-          TokenFactory.tokenFromString("of"), libraryName,
+          TokenFactory.tokenFromString("of"),
+          libraryName,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static DefaultFormalParameter positionalFormalParameter(
           NormalFormalParameter parameter, Expression expression) =>
-      new DefaultFormalParameter(parameter, ParameterKind.POSITIONAL,
+      new DefaultFormalParameter(
+          parameter,
+          ParameterKind.POSITIONAL,
           expression == null ? null : TokenFactory.tokenFromType(TokenType.EQ),
           expression);
 
@@ -724,21 +954,25 @@
       new PrefixExpression(TokenFactory.tokenFromType(operator), expression);
 
   static PropertyAccess propertyAccess(
-      Expression target, SimpleIdentifier propertyName) => new PropertyAccess(
-      target, TokenFactory.tokenFromType(TokenType.PERIOD), propertyName);
+          Expression target, SimpleIdentifier propertyName) =>
+      new PropertyAccess(
+          target, TokenFactory.tokenFromType(TokenType.PERIOD), propertyName);
 
   static PropertyAccess propertyAccess2(Expression target, String propertyName,
-      [TokenType operator = TokenType.PERIOD]) => new PropertyAccess(
-      target, TokenFactory.tokenFromType(operator), identifier3(propertyName));
+          [TokenType operator = TokenType.PERIOD]) =>
+      new PropertyAccess(target, TokenFactory.tokenFromType(operator),
+          identifier3(propertyName));
 
   static RedirectingConstructorInvocation redirectingConstructorInvocation(
           [List<Expression> arguments]) =>
       redirectingConstructorInvocation2(null, arguments);
 
   static RedirectingConstructorInvocation redirectingConstructorInvocation2(
-          String constructorName, [List<Expression> arguments]) =>
+          String constructorName,
+          [List<Expression> arguments]) =>
       new RedirectingConstructorInvocation(
-          TokenFactory.tokenFromKeyword(Keyword.THIS), constructorName == null
+          TokenFactory.tokenFromKeyword(Keyword.THIS),
+          constructorName == null
               ? null
               : TokenFactory.tokenFromType(TokenType.PERIOD),
           constructorName == null ? null : identifier3(constructorName),
@@ -769,8 +1003,11 @@
 
   static SimpleFormalParameter simpleFormalParameter2(
           Keyword keyword, TypeName type, String parameterName) =>
-      new SimpleFormalParameter(null, null,
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), type,
+      new SimpleFormalParameter(
+          null,
+          null,
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          type,
           identifier3(parameterName));
 
   static SimpleFormalParameter simpleFormalParameter3(String parameterName) =>
@@ -791,10 +1028,12 @@
       superConstructorInvocation2(null, arguments);
 
   static SuperConstructorInvocation superConstructorInvocation2(String name,
-      [List<Expression> arguments]) => new SuperConstructorInvocation(
-      TokenFactory.tokenFromKeyword(Keyword.SUPER),
-      name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
-      name == null ? null : identifier3(name), argumentList(arguments));
+          [List<Expression> arguments]) =>
+      new SuperConstructorInvocation(
+          TokenFactory.tokenFromKeyword(Keyword.SUPER),
+          name == null ? null : TokenFactory.tokenFromType(TokenType.PERIOD),
+          name == null ? null : identifier3(name),
+          argumentList(arguments));
 
   static SuperExpression superExpression() =>
       new SuperExpression(TokenFactory.tokenFromKeyword(Keyword.SUPER));
@@ -804,25 +1043,28 @@
       switchCase2(new List<Label>(), expression, statements);
 
   static SwitchCase switchCase2(List<Label> labels, Expression expression,
-      List<Statement> statements) => new SwitchCase(labels,
-      TokenFactory.tokenFromKeyword(Keyword.CASE), expression,
-      TokenFactory.tokenFromType(TokenType.COLON), statements);
+          List<Statement> statements) =>
+      new SwitchCase(labels, TokenFactory.tokenFromKeyword(Keyword.CASE),
+          expression, TokenFactory.tokenFromType(TokenType.COLON), statements);
 
   static SwitchDefault switchDefault(
-      List<Label> labels, List<Statement> statements) => new SwitchDefault(
-      labels, TokenFactory.tokenFromKeyword(Keyword.DEFAULT),
-      TokenFactory.tokenFromType(TokenType.COLON), statements);
+          List<Label> labels, List<Statement> statements) =>
+      new SwitchDefault(labels, TokenFactory.tokenFromKeyword(Keyword.DEFAULT),
+          TokenFactory.tokenFromType(TokenType.COLON), statements);
 
   static SwitchDefault switchDefault2(List<Statement> statements) =>
       switchDefault(new List<Label>(), statements);
 
   static SwitchStatement switchStatement(
-      Expression expression, List<SwitchMember> members) => new SwitchStatement(
-      TokenFactory.tokenFromKeyword(Keyword.SWITCH),
-      TokenFactory.tokenFromType(TokenType.OPEN_PAREN), expression,
-      TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-      TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET), members,
-      TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+          Expression expression, List<SwitchMember> members) =>
+      new SwitchStatement(
+          TokenFactory.tokenFromKeyword(Keyword.SWITCH),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          expression,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+          members,
+          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
 
   static SymbolLiteral symbolLiteral(List<String> components) {
     List<Token> identifierList = new List<Token>();
@@ -835,14 +1077,18 @@
   }
 
   static BlockFunctionBody syncBlockFunctionBody(
-      [List<Statement> statements]) => new BlockFunctionBody(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "sync"), null,
-      block(statements));
+          [List<Statement> statements]) =>
+      new BlockFunctionBody(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "sync"),
+          null,
+          block(statements));
 
   static BlockFunctionBody syncGeneratorBlockFunctionBody(
-      [List<Statement> statements]) => new BlockFunctionBody(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "sync"),
-      TokenFactory.tokenFromType(TokenType.STAR), block(statements));
+          [List<Statement> statements]) =>
+      new BlockFunctionBody(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "sync"),
+          TokenFactory.tokenFromType(TokenType.STAR),
+          block(statements));
 
   static ThisExpression thisExpression() =>
       new ThisExpression(TokenFactory.tokenFromKeyword(Keyword.THIS));
@@ -854,14 +1100,20 @@
           TokenFactory.tokenFromKeyword(Keyword.THROW), expression);
 
   static TopLevelVariableDeclaration topLevelVariableDeclaration(
-      Keyword keyword, TypeName type,
-      List<VariableDeclaration> variables) => new TopLevelVariableDeclaration(
-      null, null, variableDeclarationList(keyword, type, variables),
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+          Keyword keyword,
+          TypeName type,
+          List<VariableDeclaration> variables) =>
+      new TopLevelVariableDeclaration(
+          null,
+          null,
+          variableDeclarationList(keyword, type, variables),
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static TopLevelVariableDeclaration topLevelVariableDeclaration2(
           Keyword keyword, List<VariableDeclaration> variables) =>
-      new TopLevelVariableDeclaration(null, null,
+      new TopLevelVariableDeclaration(
+          null,
+          null,
           variableDeclarationList(keyword, null, variables),
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
@@ -874,16 +1126,25 @@
 
   static TryStatement tryStatement3(
           Block body, List<CatchClause> catchClauses, Block finallyClause) =>
-      new TryStatement(TokenFactory.tokenFromKeyword(Keyword.TRY), body,
-          catchClauses, finallyClause == null
+      new TryStatement(
+          TokenFactory.tokenFromKeyword(Keyword.TRY),
+          body,
+          catchClauses,
+          finallyClause == null
               ? null
-              : TokenFactory.tokenFromKeyword(Keyword.FINALLY), finallyClause);
+              : TokenFactory.tokenFromKeyword(Keyword.FINALLY),
+          finallyClause);
 
   static FunctionTypeAlias typeAlias(TypeName returnType, String name,
           TypeParameterList typeParameters, FormalParameterList parameters) =>
-      new FunctionTypeAlias(null, null,
-          TokenFactory.tokenFromKeyword(Keyword.TYPEDEF), returnType,
-          identifier3(name), typeParameters, parameters,
+      new FunctionTypeAlias(
+          null,
+          null,
+          TokenFactory.tokenFromKeyword(Keyword.TYPEDEF),
+          returnType,
+          identifier3(name),
+          typeParameters,
+          parameters,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static TypeArgumentList typeArgumentList(List<TypeName> typeNames) {
@@ -938,13 +1199,17 @@
       new VariableDeclaration(identifier3(name), null, null);
 
   static VariableDeclaration variableDeclaration2(
-      String name, Expression initializer) => new VariableDeclaration(
-      identifier3(name), TokenFactory.tokenFromType(TokenType.EQ), initializer);
+          String name, Expression initializer) =>
+      new VariableDeclaration(identifier3(name),
+          TokenFactory.tokenFromType(TokenType.EQ), initializer);
 
   static VariableDeclarationList variableDeclarationList(Keyword keyword,
           TypeName type, List<VariableDeclaration> variables) =>
-      new VariableDeclarationList(null, null,
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword), type,
+      new VariableDeclarationList(
+          null,
+          null,
+          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          type,
           variables);
 
   static VariableDeclarationList variableDeclarationList2(
@@ -952,19 +1217,24 @@
       variableDeclarationList(keyword, null, variables);
 
   static VariableDeclarationStatement variableDeclarationStatement(
-      Keyword keyword, TypeName type,
-      List<VariableDeclaration> variables) => new VariableDeclarationStatement(
-      variableDeclarationList(keyword, type, variables),
-      TokenFactory.tokenFromType(TokenType.SEMICOLON));
+          Keyword keyword,
+          TypeName type,
+          List<VariableDeclaration> variables) =>
+      new VariableDeclarationStatement(
+          variableDeclarationList(keyword, type, variables),
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
   static VariableDeclarationStatement variableDeclarationStatement2(
           Keyword keyword, List<VariableDeclaration> variables) =>
       variableDeclarationStatement(keyword, null, variables);
 
   static WhileStatement whileStatement(Expression condition, Statement body) =>
-      new WhileStatement(TokenFactory.tokenFromKeyword(Keyword.WHILE),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN), condition,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), body);
+      new WhileStatement(
+          TokenFactory.tokenFromKeyword(Keyword.WHILE),
+          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          condition,
+          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body);
 
   static WithClause withClause(List<TypeName> types) =>
       new WithClause(TokenFactory.tokenFromKeyword(Keyword.WITH), types);
@@ -972,11 +1242,14 @@
   static YieldStatement yieldEachStatement(Expression expression) =>
       new YieldStatement(
           TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"),
-          TokenFactory.tokenFromType(TokenType.STAR), expression,
+          TokenFactory.tokenFromType(TokenType.STAR),
+          expression,
           TokenFactory.tokenFromType(TokenType.SEMICOLON));
 
-  static YieldStatement yieldStatement(
-      Expression expression) => new YieldStatement(
-      TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), null,
-      expression, TokenFactory.tokenFromType(TokenType.SEMICOLON));
+  static YieldStatement yieldStatement(Expression expression) =>
+      new YieldStatement(
+          TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"),
+          null,
+          expression,
+          TokenFactory.tokenFromType(TokenType.SEMICOLON));
 }
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index d6a4c78..58d7bae 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.testing.element_factory;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/lib/src/generated/testing/html_factory.dart b/pkg/analyzer/lib/src/generated/testing/html_factory.dart
index 5006c02..a9ac412 100644
--- a/pkg/analyzer/lib/src/generated/testing/html_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/html_factory.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.testing.html_factory;
 
 import 'package:analyzer/src/generated/html.dart';
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 217a0d8..d0d9c00 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.testing.test_type_provider;
 
 import 'package:analyzer/src/generated/ast.dart';
diff --git a/pkg/analyzer/lib/src/generated/testing/token_factory.dart b/pkg/analyzer/lib/src/generated/testing/token_factory.dart
index e9324be..1b9a828 100644
--- a/pkg/analyzer/lib/src/generated/testing/token_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/token_factory.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.testing.token_factory;
 
 import 'package:analyzer/src/generated/scanner.dart';
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index e8abbbd..0d2afe8 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.utilities.collection;
 
 import "dart:math" as math;
diff --git a/pkg/analyzer/lib/src/generated/utilities_dart.dart b/pkg/analyzer/lib/src/generated/utilities_dart.dart
index 888cc11..882d182 100644
--- a/pkg/analyzer/lib/src/generated/utilities_dart.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_dart.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.utilities.dart;
 
 import 'java_core.dart';
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index 62f4029..83bfaa1 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.utilities.general;
 
 import 'dart:profiler';
diff --git a/pkg/analyzer/lib/src/plugin/engine_plugin.dart b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
index eb516de..93f61d1 100644
--- a/pkg/analyzer/lib/src/plugin/engine_plugin.dart
+++ b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
@@ -5,9 +5,13 @@
 library analyzer.src.plugin.engine_plugin;
 
 import 'package:analyzer/plugin/task.dart';
+import 'package:analyzer/src/generated/engine.dart'
+    show InternalAnalysisContext;
 import 'package:analyzer/src/task/dart.dart';
+import 'package:analyzer/src/task/dart_work_manager.dart';
 import 'package:analyzer/src/task/general.dart';
 import 'package:analyzer/src/task/html.dart';
+import 'package:analyzer/src/task/html_work_manager.dart';
 import 'package:analyzer/task/model.dart';
 import 'package:plugin/plugin.dart';
 
@@ -23,6 +27,13 @@
   static const String TASK_EXTENSION_POINT = 'task';
 
   /**
+   * The simple identifier of the extension point that allows plugins to
+   * register new work manager factories with the analysis engine.
+   */
+  static const String WORK_MANAGER_FACTORY_EXTENSION_POINT =
+      'workManagerFactory';
+
+  /**
    * The unique identifier of this plugin.
    */
   static const String UNIQUE_IDENTIFIER = 'analysis_engine.core';
@@ -34,6 +45,12 @@
   ExtensionPoint taskExtensionPoint;
 
   /**
+   * The extension point that allows plugins to register new work manager
+   * factories with the analysis engine.
+   */
+  ExtensionPoint workManagerFactoryExtensionPoint;
+
+  /**
    * Initialize a newly created plugin.
    */
   EnginePlugin();
@@ -46,14 +63,29 @@
   @override
   String get uniqueIdentifier => UNIQUE_IDENTIFIER;
 
+  /**
+   * Return a list containing all of the work manager factories that were
+   * contributed.
+   */
+  List<WorkManagerFactory> get workManagerFactories =>
+      workManagerFactoryExtensionPoint.extensions;
+
   @override
   void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
     taskExtensionPoint =
         registerExtensionPoint(TASK_EXTENSION_POINT, _validateTaskExtension);
+    workManagerFactoryExtensionPoint = registerExtensionPoint(
+        WORK_MANAGER_FACTORY_EXTENSION_POINT,
+        _validateWorkManagerFactoryExtension);
   }
 
   @override
   void registerExtensions(RegisterExtension registerExtension) {
+    _registerTaskExtensions(registerExtension);
+    _registerWorkManagerFactoryExtensions(registerExtension);
+  }
+
+  void _registerTaskExtensions(RegisterExtension registerExtension) {
     String taskId = TASK_EXTENSION_POINT_ID;
     //
     // Register general tasks.
@@ -73,15 +105,20 @@
     registerExtension(taskId, BuildTypeProviderTask.DESCRIPTOR);
     registerExtension(taskId, ComputeConstantDependenciesTask.DESCRIPTOR);
     registerExtension(taskId, ComputeConstantValueTask.DESCRIPTOR);
+    registerExtension(taskId, ComputeInferableStaticVariableDependenciesTask.DESCRIPTOR);
     registerExtension(taskId, ContainingLibrariesTask.DESCRIPTOR);
     registerExtension(taskId, DartErrorsTask.DESCRIPTOR);
     registerExtension(taskId, EvaluateUnitConstantsTask.DESCRIPTOR);
     registerExtension(taskId, GatherUsedImportedElementsTask.DESCRIPTOR);
     registerExtension(taskId, GatherUsedLocalElementsTask.DESCRIPTOR);
     registerExtension(taskId, GenerateHintsTask.DESCRIPTOR);
+    registerExtension(taskId, InferInstanceMembersInUnitTask.DESCRIPTOR);
+    registerExtension(taskId, InferStaticVariableTypesInUnitTask.DESCRIPTOR);
+    registerExtension(taskId, InferStaticVariableTypeTask.DESCRIPTOR);
     registerExtension(taskId, LibraryErrorsReadyTask.DESCRIPTOR);
     registerExtension(taskId, LibraryUnitErrorsTask.DESCRIPTOR);
     registerExtension(taskId, ParseDartTask.DESCRIPTOR);
+    registerExtension(taskId, PartiallyResolveUnitReferencesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryReferencesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveLibraryTypeNamesTask.DESCRIPTOR);
     registerExtension(taskId, ResolveUnitReferencesTask.DESCRIPTOR);
@@ -97,6 +134,15 @@
     registerExtension(taskId, ParseHtmlTask.DESCRIPTOR);
   }
 
+  void _registerWorkManagerFactoryExtensions(
+      RegisterExtension registerExtension) {
+    String taskId = WORK_MANAGER_EXTENSION_POINT_ID;
+    registerExtension(taskId,
+        (InternalAnalysisContext context) => new DartWorkManager(context));
+    registerExtension(taskId,
+        (InternalAnalysisContext context) => new HtmlWorkManager(context));
+  }
+
   /**
    * Validate the given extension by throwing an [ExtensionError] if it is not a
    * valid domain.
@@ -107,4 +153,16 @@
       throw new ExtensionError('Extensions to $id must be a TaskDescriptor');
     }
   }
+
+  /**
+   * Validate the given extension by throwing an [ExtensionError] if it is not a
+   * valid domain.
+   */
+  void _validateWorkManagerFactoryExtension(Object extension) {
+    if (extension is! WorkManagerFactory) {
+      String id = taskExtensionPoint.uniqueIdentifier;
+      throw new ExtensionError(
+          'Extensions to $id must be a WorkManagerFactory');
+    }
+  }
 }
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 6e3f7a4..65e391f 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -14,6 +14,7 @@
     hide AnalysisCache, AnalysisTask;
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/error_verifier.dart';
+import 'package:analyzer/src/generated/incremental_resolver.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -25,6 +26,7 @@
 import 'package:analyzer/src/task/html.dart';
 import 'package:analyzer/src/task/inputs.dart';
 import 'package:analyzer/src/task/model.dart';
+import 'package:analyzer/src/task/strong_mode.dart';
 import 'package:analyzer/task/dart.dart';
 import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/model.dart';
@@ -36,6 +38,18 @@
     const SimpleResultCachingPolicy(8192, 8192);
 
 /**
+ * The [ResultCachingPolicy] for [Element]s.
+ */
+const ResultCachingPolicy ELEMENT_CACHING_POLICY =
+    const SimpleResultCachingPolicy(-1, -1);
+
+/**
+ * The [ResultCachingPolicy] for [TOKEN_STREAM].
+ */
+const ResultCachingPolicy TOKEN_STREAM_CACHING_POLICY =
+    const SimpleResultCachingPolicy(1, 1);
+
+/**
  * The errors produced while resolving a library directives.
  *
  * The list will be empty if there were no errors, but will not be `null`.
@@ -58,12 +72,23 @@
         'BUILD_LIBRARY_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
+ * A list of the [ClassElement]s representing the classes defined in a
+ * compilation unit.
+ *
+ * The result is only available for [LibrarySpecificUnit]s, and only when strong
+ * mode is enabled.
+ */
+final ListResultDescriptor<ClassElement> CLASSES_IN_UNIT =
+    new ListResultDescriptor<ClassElement>('CLASSES_IN_UNIT', null);
+
+/**
  * A list of the [ConstantEvaluationTarget]s defined in a unit.  This includes
  * constants defined at top level, statically inside classes, and local to
  * functions, as well as constant constructors, annotations, and default values
  * of parameters to constant constructors.
  */
-final ListResultDescriptor<ConstantEvaluationTarget> COMPILATION_UNIT_CONSTANTS =
+final ListResultDescriptor<
+        ConstantEvaluationTarget> COMPILATION_UNIT_CONSTANTS =
     new ListResultDescriptor<ConstantEvaluationTarget>(
         'COMPILATION_UNIT_CONSTANTS', null,
         cachingPolicy: ELEMENT_CACHING_POLICY);
@@ -108,12 +133,6 @@
     new ListResultDescriptor<Source>('CONTAINING_LIBRARIES', Source.EMPTY_LIST);
 
 /**
- * The [ResultCachingPolicy] for [Element]s.
- */
-const ResultCachingPolicy ELEMENT_CACHING_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
  * The sources representing the export closure of a library.
  * The [Source]s include only library sources, not their units.
  *
@@ -143,6 +162,38 @@
     new ListResultDescriptor<Source>('IMPORT_EXPORT_SOURCE_CLOSURE', null);
 
 /**
+ * A list of the [VariableElement]s whose type should be inferred that another
+ * inferable static variable (the target) depends on.
+ *
+ * The result is only available for [VariableElement]s, and only when strong
+ * mode is enabled.
+ */
+final ListResultDescriptor<
+        VariableElement> INFERABLE_STATIC_VARIABLE_DEPENDENCIES =
+    new ListResultDescriptor<VariableElement>(
+        'INFERABLE_STATIC_VARIABLE_DEPENDENCIES', null);
+
+/**
+ * A list of the [VariableElement]s defined in a unit whose type should be
+ * inferred. This includes variables defined at the library level as well as
+ * static members inside classes.
+ *
+ * The result is only available for [LibrarySpecificUnit]s, and only when strong
+ * mode is enabled.
+ */
+final ListResultDescriptor<VariableElement> INFERABLE_STATIC_VARIABLES_IN_UNIT =
+    new ListResultDescriptor<VariableElement>(
+        'INFERABLE_STATIC_VARIABLES_IN_UNIT', null);
+
+/**
+ * An inferrable static variable ([VariableElement]) whose type has been
+ * inferred.
+ */
+final ResultDescriptor<VariableElement> INFERRED_STATIC_VARIABLE =
+    new ResultDescriptor<VariableElement>('INFERRED_STATIC_VARIABLE', null,
+        cachingPolicy: ELEMENT_CACHING_POLICY);
+
+/**
  * The partial [LibraryElement] associated with a library.
  *
  * The [LibraryElement] and its [CompilationUnitElement]s are attached to each
@@ -233,6 +284,17 @@
         'PARSE_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
+ * The errors produced while resolving references outside of function bodies.
+ *
+ * The list will be empty if there were no errors, but will not be `null`.
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ListResultDescriptor<AnalysisError> PARTIALLY_RESOLVE_REFERENCES_ERRORS =
+    new ListResultDescriptor<AnalysisError>(
+        'PARTIALLY_RESOLVE_REFERENCES_ERRORS', AnalysisError.NO_ERRORS);
+
+/**
  * The names (resolved and not) referenced by a unit.
  *
  * The result is only available for [Source]s representing a compilation unit.
@@ -307,8 +369,9 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
- * The resolved [CompilationUnit] associated with a compilation unit, with
- * constants not yet resolved.
+ * The resolved [CompilationUnit] associated with a compilation unit in which
+ * elements and types have been initially resolved outside of method bodies in
+ * addition to everything that is true of a [RESOLVED_UNIT4].
  *
  * The result is only available for [LibrarySpecificUnit]s.
  */
@@ -317,6 +380,38 @@
         cachingPolicy: AST_CACHING_POLICY);
 
 /**
+ * The resolved [CompilationUnit] associated with a compilation unit in which
+ * the types of static variables have been inferred in addition to everything
+ * that is true of a [RESOLVED_UNIT5].
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ResultDescriptor<CompilationUnit> RESOLVED_UNIT6 =
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT6', null,
+        cachingPolicy: AST_CACHING_POLICY);
+
+/**
+ * The resolved [CompilationUnit] associated with a compilation unit in which
+ * the types of class members have been inferred in addition to everything that
+ * is true of a [RESOLVED_UNIT7].
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ResultDescriptor<CompilationUnit> RESOLVED_UNIT7 =
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT7', null,
+        cachingPolicy: AST_CACHING_POLICY);
+
+/**
+ * The resolved [CompilationUnit] associated with a compilation unit, with
+ * constants not yet resolved.
+ *
+ * The result is only available for [LibrarySpecificUnit]s.
+ */
+final ResultDescriptor<CompilationUnit> RESOLVED_UNIT8 =
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT8', null,
+        cachingPolicy: AST_CACHING_POLICY);
+
+/**
  * The errors produced while scanning a compilation unit.
  *
  * The list will be empty if there were no errors, but will not be `null`.
@@ -328,12 +423,6 @@
         'SCAN_ERRORS', AnalysisError.NO_ERRORS);
 
 /**
- * The [ResultCachingPolicy] for [TOKEN_STREAM].
- */
-const ResultCachingPolicy TOKEN_STREAM_CACHING_POLICY =
-    const SimpleResultCachingPolicy(1, 1);
-
-/**
  * The [TypeProvider] of the [AnalysisContext].
  */
 final ResultDescriptor<TypeProvider> TYPE_PROVIDER =
@@ -399,11 +488,12 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildCompilationUnitElementTask', createTask, buildInputs,
-      <ResultDescriptor>[
+      'BuildCompilationUnitElementTask',
+      createTask,
+      buildInputs, <ResultDescriptor>[
+    COMPILATION_UNIT_CONSTANTS,
     COMPILATION_UNIT_ELEMENT,
-    RESOLVED_UNIT1,
-    COMPILATION_UNIT_CONSTANTS
+    RESOLVED_UNIT1
   ]);
 
   /**
@@ -446,15 +536,14 @@
     ConstantFinder constantFinder =
         new ConstantFinder(context, source, librarySpecificUnit.library);
     unit.accept(constantFinder);
-    List<ConstantEvaluationTarget> constants =
-        new List<ConstantEvaluationTarget>.from(
-            constantFinder.constantsToCompute);
+    List<ConstantEvaluationTarget> constants = new List<
+        ConstantEvaluationTarget>.from(constantFinder.constantsToCompute);
     //
     // Record outputs.
     //
+    outputs[COMPILATION_UNIT_CONSTANTS] = constants;
     outputs[COMPILATION_UNIT_ELEMENT] = element;
     outputs[RESOLVED_UNIT1] = unit;
-    outputs[COMPILATION_UNIT_CONSTANTS] = constants;
   }
 
   /**
@@ -521,10 +610,10 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildDirectiveElementsTask', createTask, buildInputs, <ResultDescriptor>[
-    LIBRARY_ELEMENT2,
-    BUILD_DIRECTIVES_ERRORS
-  ]);
+      'BuildDirectiveElementsTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[LIBRARY_ELEMENT2, BUILD_DIRECTIVES_ERRORS]);
 
   BuildDirectiveElementsTask(
       InternalAnalysisContext context, AnalysisTarget target)
@@ -629,8 +718,11 @@
             directive.element = exportElement;
             exports.add(exportElement);
             if (exportSourceKindMap[exportedSource] != SourceKind.LIBRARY) {
-              errors.add(new AnalysisError(exportedSource, uriLiteral.offset,
-                  uriLiteral.length, CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
+              errors.add(new AnalysisError(
+                  exportedSource,
+                  uriLiteral.offset,
+                  uriLiteral.length,
+                  CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
                   [uriLiteral.toSource()]));
             }
           }
@@ -740,7 +832,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildEnumMemberElementsTask', createTask, buildInputs,
+      'BuildEnumMemberElementsTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[RESOLVED_UNIT2]);
 
   BuildEnumMemberElementsTask(
@@ -801,7 +895,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildExportNamespaceTask', createTask, buildInputs,
+      'BuildExportNamespaceTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_ELEMENT4]);
 
   BuildExportNamespaceTask(
@@ -957,8 +1053,11 @@
             String partLibraryName =
                 _getPartLibraryName(partSource, partUnit, directivesToResolve);
             if (partLibraryName == null) {
-              errors.add(new AnalysisError(librarySource, partUri.offset,
-                  partUri.length, CompileTimeErrorCode.PART_OF_NON_PART,
+              errors.add(new AnalysisError(
+                  librarySource,
+                  partUri.offset,
+                  partUri.length,
+                  CompileTimeErrorCode.PART_OF_NON_PART,
                   [partUri.toSource()]));
             } else if (libraryNameNode == null) {
               if (partsLibraryName == _UNKNOWN_LIBRARY_NAME) {
@@ -967,11 +1066,12 @@
                 partsLibraryName = null;
               }
             } else if (libraryNameNode.name != partLibraryName) {
-              errors.add(new AnalysisError(librarySource, partUri.offset,
-                  partUri.length, StaticWarningCode.PART_OF_DIFFERENT_LIBRARY, [
-                libraryNameNode.name,
-                partLibraryName
-              ]));
+              errors.add(new AnalysisError(
+                  librarySource,
+                  partUri.offset,
+                  partUri.length,
+                  StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
+                  [libraryNameNode.name, partLibraryName]));
             }
           }
           if (entryPoint == null) {
@@ -1138,7 +1238,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildPublicNamespaceTask', createTask, buildInputs,
+      'BuildPublicNamespaceTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_ELEMENT3]);
 
   BuildPublicNamespaceTask(
@@ -1188,7 +1290,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildSourceExportClosureTask', createTask, buildInputs,
+      'BuildSourceExportClosureTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[EXPORT_SOURCE_CLOSURE]);
 
   BuildSourceExportClosureTask(
@@ -1243,7 +1347,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildSourceImportExportClosureTask', createTask, buildInputs,
+      'BuildSourceImportExportClosureTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[IMPORT_EXPORT_SOURCE_CLOSURE, IS_CLIENT]);
 
   BuildSourceImportExportClosureTask(
@@ -1305,7 +1411,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildTypeProviderTask', createTask, buildInputs,
+      'BuildTypeProviderTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[TYPE_PROVIDER]);
 
   BuildTypeProviderTask(
@@ -1355,7 +1463,7 @@
  */
 class ComputeConstantDependenciesTask extends ConstantEvaluationAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -1365,7 +1473,9 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeConstantDependenciesTask', createTask, buildInputs,
+      'ComputeConstantDependenciesTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[CONSTANT_DEPENDENCIES]);
 
   ComputeConstantDependenciesTask(
@@ -1385,7 +1495,6 @@
     // constant dependencies.
     //
     ConstantEvaluationTarget constant = target;
-    AnalysisContext context = constant.context;
     TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
     //
     // Compute dependencies.
@@ -1409,13 +1518,13 @@
       CompilationUnitElementImpl unit = target
           .getAncestor((Element element) => element is CompilationUnitElement);
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT5
+        UNIT_INPUT: RESOLVED_UNIT8
             .of(new LibrarySpecificUnit(unit.librarySource, target.source)),
         TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
       };
     } else if (target is ConstantEvaluationTarget_Annotation) {
       return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT5
+        UNIT_INPUT: RESOLVED_UNIT8
             .of(new LibrarySpecificUnit(target.librarySource, target.source)),
         TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
       };
@@ -1425,7 +1534,7 @@
   }
 
   /**
-   * Create a [ResolveUnitReferencesTask] based on the given [target] in
+   * Create a [ComputeConstantDependenciesTask] based on the given [target] in
    * the given [context].
    */
   static ComputeConstantDependenciesTask createTask(
@@ -1451,7 +1560,9 @@
   static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
 
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeConstantValueTask', createTask, buildInputs,
+      'ComputeConstantValueTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[CONSTANT_VALUE]);
 
   ComputeConstantValueTask(
@@ -1525,6 +1636,92 @@
 }
 
 /**
+ * A task that computes the [INFERABLE_STATIC_VARIABLE_DEPENDENCIES] for a
+ * static variable whose type should be inferred.
+ */
+class ComputeInferableStaticVariableDependenciesTask
+    extends ConstantEvaluationAnalysisTask {
+  /**
+   * The name of the [RESOLVED_UNIT5] input.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ComputeInferableStaticVariableDependenciesTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[INFERABLE_STATIC_VARIABLE_DEPENDENCIES]);
+
+  ComputeInferableStaticVariableDependenciesTask(
+      InternalAnalysisContext context, VariableElement variable)
+      : super(context, variable);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    //
+    // Prepare inputs.
+    //
+    VariableElement variable = target;
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    //
+    // Compute dependencies.
+    //
+    NodeLocator locator = new NodeLocator(variable.nameOffset);
+    AstNode node = locator.searchWithin(unit);
+    VariableDeclaration declaration =
+        node.getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
+    if (declaration == null || declaration.name != node) {
+      throw new AnalysisException(
+          "NodeLocator failed to find a variable's declaration");
+    }
+    VariableGatherer gatherer = new VariableGatherer(_isInferableStatic);
+    declaration.initializer.accept(gatherer);
+    //
+    // Record outputs.
+    //
+    outputs[INFERABLE_STATIC_VARIABLE_DEPENDENCIES] = gatherer.results.toList();
+  }
+
+  /**
+   * Return `true` if the given [variable] is a static variable whose type
+   * should be inferred.
+   */
+  bool _isInferableStatic(VariableElement variable) => variable.isStatic &&
+      variable.hasImplicitType &&
+      variable.initializer != null;
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the
+   * given [target].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    if (target is VariableElement) {
+      CompilationUnitElementImpl unit = target
+          .getAncestor((Element element) => element is CompilationUnitElement);
+      return <String, TaskInput>{
+        UNIT_INPUT: RESOLVED_UNIT5
+            .of(new LibrarySpecificUnit(unit.librarySource, unit.source))
+      };
+    }
+    throw new AnalysisException(
+        'Cannot build inputs for a ${target.runtimeType}');
+  }
+
+  /**
+   * Create a [ComputeInferableStaticVariableDependenciesTask] based on the
+   * given [target] in the given [context].
+   */
+  static ComputeInferableStaticVariableDependenciesTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new ComputeInferableStaticVariableDependenciesTask(context, target);
+  }
+}
+
+/**
  * A base class for analysis tasks whose target is expected to be a
  * [ConstantEvaluationTarget].
  */
@@ -1565,7 +1762,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ContainingLibrariesTask', createTask, buildInputs,
+      'ContainingLibrariesTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[CONTAINING_LIBRARIES]);
 
   ContainingLibrariesTask(
@@ -1774,9 +1973,8 @@
       BUILD_LIBRARY_ERRORS_INPUT: BUILD_LIBRARY_ERRORS.of(source),
       PARSE_ERRORS_INPUT: PARSE_ERRORS.of(source),
       SCAN_ERRORS_INPUT: SCAN_ERRORS.of(source),
-      LIBRARY_UNIT_ERRORS_INPUT: CONTAINING_LIBRARIES
-          .of(source)
-          .toMap((Source library) {
+      LIBRARY_UNIT_ERRORS_INPUT:
+          CONTAINING_LIBRARIES.of(source).toMap((Source library) {
         LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
         return LIBRARY_UNIT_ERRORS.of(unit);
       })
@@ -1798,7 +1996,7 @@
  */
 class EvaluateUnitConstantsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -1811,7 +2009,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'EvaluateUnitConstantsTask', createTask, buildInputs,
+      'EvaluateUnitConstantsTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[RESOLVED_UNIT]);
 
   EvaluateUnitConstantsTask(AnalysisContext context, LibrarySpecificUnit target)
@@ -1837,7 +2037,7 @@
     LibrarySpecificUnit unit = target;
     return <String, TaskInput>{
       'libraryElement': LIBRARY_ELEMENT.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT5.of(unit),
+      UNIT_INPUT: RESOLVED_UNIT8.of(unit),
       CONSTANT_VALUES:
           COMPILATION_UNIT_CONSTANTS.of(unit).toListOf(CONSTANT_VALUE)
     };
@@ -1961,7 +2161,7 @@
  */
 class GatherUsedImportedElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -1969,7 +2169,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GatherUsedImportedElementsTask', createTask, buildInputs,
+      'GatherUsedImportedElementsTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[USED_IMPORTED_ELEMENTS]);
 
   GatherUsedImportedElementsTask(
@@ -2003,7 +2205,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT5.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT8.of(unit)};
   }
 
   /**
@@ -2021,7 +2223,7 @@
  */
 class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String UNIT_INPUT = 'UNIT_INPUT';
 
@@ -2029,7 +2231,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GatherUsedLocalElementsTask', createTask, buildInputs,
+      'GatherUsedLocalElementsTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[USED_LOCAL_ELEMENTS]);
 
   GatherUsedLocalElementsTask(
@@ -2063,7 +2267,7 @@
    */
   static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
     LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT5.of(unit)};
+    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT8.of(unit)};
   }
 
   /**
@@ -2081,7 +2285,7 @@
  */
 class GenerateHintsTask extends SourceBasedAnalysisTask {
   /**
-   * The name of the [RESOLVED_UNIT5] input.
+   * The name of the [RESOLVED_UNIT8] input.
    */
   static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
 
@@ -2206,6 +2410,319 @@
 }
 
 /**
+ * A task that ensures that all of the inferrable instance members in a
+ * compilation unit have had their type inferred.
+ */
+class InferInstanceMembersInUnitTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the [TYPE_PROVIDER] input.
+   */
+  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
+
+  /**
+   * The name of the input whose value is the [RESOLVED_UNIT6] for the
+   * compilation unit.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'InferInstanceMembersInUnitTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[RESOLVED_UNIT7]);
+
+  /**
+   * Initialize a newly created task to build a library element for the given
+   * [unit] in the given [context].
+   */
+  InferInstanceMembersInUnitTask(
+      InternalAnalysisContext context, LibrarySpecificUnit unit)
+      : super(context, unit);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    //
+    // Prepare inputs.
+    //
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    //
+    // Infer instance members.
+    //
+    if (context.analysisOptions.strongMode) {
+      InstanceMemberInferrer inferrer =
+          new InstanceMemberInferrer(typeProvider);
+      inferrer.inferCompilationUnit(unit.element);
+    }
+    //
+    // Record outputs.
+    //
+    outputs[RESOLVED_UNIT7] = unit;
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the given
+   * [libSource].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      UNIT_INPUT: RESOLVED_UNIT6.of(unit),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
+    };
+  }
+
+  /**
+   * Create a [InferInstanceMembersInUnitTask] based on the given [target] in
+   * the given [context].
+   */
+  static InferInstanceMembersInUnitTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new InferInstanceMembersInUnitTask(context, target);
+  }
+}
+
+/**
+ * An abstract class that defines utility methods that are useful for tasks
+ * operating on static variables.
+ */
+abstract class InferStaticVariableTask extends ConstantEvaluationAnalysisTask {
+  InferStaticVariableTask(
+      InternalAnalysisContext context, VariableElement variable)
+      : super(context, variable);
+
+  /**
+   * Return the declaration of the target within the given compilation [unit].
+   * Throw an exception if the declaration cannot be found.
+   */
+  VariableDeclaration getDeclaration(CompilationUnit unit) {
+    VariableElement variable = target;
+    NodeLocator locator = new NodeLocator(variable.nameOffset);
+    AstNode node = locator.searchWithin(unit);
+    VariableDeclaration declaration =
+        node.getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
+    if (declaration == null || declaration.name != node) {
+      throw new AnalysisException(
+          "Failed to find the declaration of the variable ${variable.displayName} in ${variable.source}");
+    }
+    return declaration;
+  }
+}
+
+/**
+ * A task that ensures that all of the inferrable static variables in a
+ * compilation unit have had their type inferred.
+ */
+class InferStaticVariableTypesInUnitTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the input whose value is the [RESOLVED_UNIT5] for the
+   * compilation unit.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  /**
+   * The name of the input whose value is a list of the inferrable static
+   * variables whose types have been computed.
+   */
+  static const String INFERRED_VARIABLES_INPUT = 'INFERRED_VARIABLES_INPUT';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'InferStaticVariableTypesInUnitTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[RESOLVED_UNIT6]);
+
+  /**
+   * Initialize a newly created task to build a library element for the given
+   * [unit] in the given [context].
+   */
+  InferStaticVariableTypesInUnitTask(
+      InternalAnalysisContext context, LibrarySpecificUnit unit)
+      : super(context, unit);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    //
+    // Prepare inputs.
+    //
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    //
+    // Record outputs. There is no additional work to be done at this time
+    // because the work has implicitly been done by virtue of the task model
+    // preparing all of the inputs.
+    //
+    outputs[RESOLVED_UNIT6] = unit;
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the given
+   * [libSource].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      INFERRED_VARIABLES_INPUT: INFERABLE_STATIC_VARIABLES_IN_UNIT
+          .of(unit)
+          .toListOf(INFERRED_STATIC_VARIABLE),
+      UNIT_INPUT: RESOLVED_UNIT5.of(unit)
+    };
+  }
+
+  /**
+   * Create a [InferStaticVariableTypesInUnitTask] based on the given [target]
+   * in the given [context].
+   */
+  static InferStaticVariableTypesInUnitTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new InferStaticVariableTypesInUnitTask(context, target);
+  }
+}
+
+/**
+ * A task that computes the type of an inferrable static variable and
+ * stores it in the element model.
+ */
+class InferStaticVariableTypeTask extends InferStaticVariableTask {
+  /**
+   * The name of the input which ensures that dependent values have their type
+   * inferred before the target.
+   */
+  static const String DEPENDENCIES_INPUT = 'DEPENDENCIES_INPUT';
+
+  /**
+   * The name of the [TYPE_PROVIDER] input.
+   */
+  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
+
+  /**
+   * The name of the [RESOLVED_UNIT5] input.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'InferStaticVariableTypeTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[INFERRED_STATIC_VARIABLE]);
+
+  InferStaticVariableTypeTask(
+      InternalAnalysisContext context, VariableElement variable)
+      : super(context, variable);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  bool get handlesDependencyCycles => true;
+
+  @override
+  void internalPerform() {
+    //
+    // Prepare inputs.
+    //
+    // Note: DEPENDENCIES_INPUT is not needed.  It is merely a bookkeeping
+    // dependency to ensure that the variables that this variable references
+    // have types inferred before inferring the type of this variable.
+    //
+    VariableElementImpl variable = target;
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    if (dependencyCycle == null) {
+      //
+      // Re-resolve the variable's initializer so that the inferred types of other
+      // variables will be propagated.
+      //
+      NodeLocator locator = new NodeLocator(variable.nameOffset);
+      AstNode node = locator.searchWithin(unit);
+      VariableDeclaration declaration = node
+          .getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
+      if (declaration == null || declaration.name != node) {
+        throw new AnalysisException(
+            "NodeLocator failed to find a variable's declaration");
+      }
+      RecordingErrorListener errorListener = new RecordingErrorListener();
+      Expression initializer = declaration.initializer;
+      ResolutionContext resolutionContext =
+          ResolutionContextBuilder.contextFor(initializer, errorListener);
+      ResolverVisitor visitor = new ResolverVisitor(
+          variable.library, variable.source, typeProvider, errorListener,
+          nameScope: resolutionContext.scope);
+      if (resolutionContext.enclosingClassDeclaration != null) {
+        visitor.prepareToResolveMembersInClass(
+            resolutionContext.enclosingClassDeclaration);
+      }
+      visitor.initForIncrementalResolution();
+      initializer.accept(visitor);
+      //
+      // Record the type of the variable.
+      //
+      DartType newType = initializer.staticType;
+      if (newType == null || newType.isBottom) {
+        newType = typeProvider.dynamicType;
+      }
+      variable.type = newType;
+      (variable.initializer as ExecutableElementImpl).returnType = newType;
+      if (variable is PropertyInducingElementImpl) {
+        setReturnType(variable.getter, newType);
+        setParameterType(variable.setter, newType);
+      }
+    } else {
+      // TODO(brianwilkerson) For now we simply don't infer any type for
+      // variables or fields involved in a cycle. We could try to be smarter
+      // by re-resolving the initializer in a context in which the types of all
+      // of the variables in the cycle are assumed to be `null`, but it isn't
+      // clear to me that this would produce better results often enough to
+      // warrant the extra effort.
+    }
+    //
+    // Record outputs.
+    //
+    outputs[INFERRED_STATIC_VARIABLE] = variable;
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the given
+   * [target].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    VariableElement variable = target;
+    LibrarySpecificUnit unit =
+        new LibrarySpecificUnit(variable.library.source, variable.source);
+    return <String, TaskInput>{
+      DEPENDENCIES_INPUT: INFERABLE_STATIC_VARIABLE_DEPENDENCIES
+          .of(variable)
+          .toListOf(INFERRED_STATIC_VARIABLE),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
+      UNIT_INPUT: RESOLVED_UNIT5.of(unit)
+    };
+  }
+
+  /**
+   * Create a [InferStaticVariableTypeTask] based on the given [target] in the
+   * given [context].
+   */
+  static InferStaticVariableTypeTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new InferStaticVariableTypeTask(context, target);
+  }
+}
+
+/**
  * A task computes all of the errors of all of the units for a single
  * library source and sets the [LIBRARY_ERRORS_READY] flag.
  */
@@ -2214,7 +2731,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'LibraryErrorsReadyTask', createTask, buildInputs,
+      'LibraryErrorsReadyTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_ERRORS_READY]);
 
   LibraryErrorsReadyTask(InternalAnalysisContext context, AnalysisTarget target)
@@ -2287,7 +2806,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'LibraryUnitErrorsTask', createTask, buildInputs,
+      'LibraryUnitErrorsTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_UNIT_ERRORS]);
 
   LibraryUnitErrorsTask(InternalAnalysisContext context, AnalysisTarget target)
@@ -2363,8 +2884,8 @@
   /**
    * The task descriptor describing this kind of task.
    */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('ParseDartTask',
-      createTask, buildInputs, <ResultDescriptor>[
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ParseDartTask', createTask, buildInputs, <ResultDescriptor>[
     EXPLICITLY_IMPORTED_LIBRARIES,
     EXPORTED_LIBRARIES,
     IMPORTED_LIBRARIES,
@@ -2528,6 +3049,115 @@
 }
 
 /**
+ * A task that builds [RESOLVED_UNIT5] for a unit.
+ */
+class PartiallyResolveUnitReferencesTask extends SourceBasedAnalysisTask {
+  /**
+   * The name of the [LIBRARY_ELEMENT5] input.
+   */
+  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
+
+  /**
+   * The name of the [RESOLVED_UNIT4] input.
+   */
+  static const String UNIT_INPUT = 'UNIT_INPUT';
+
+  /**
+   * The name of the [TYPE_PROVIDER] input.
+   */
+  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
+
+  /**
+   * The task descriptor describing this kind of task.
+   */
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'PartiallyResolveUnitReferencesTask',
+      createTask,
+      buildInputs, <ResultDescriptor>[
+    CLASSES_IN_UNIT,
+    INFERABLE_STATIC_VARIABLES_IN_UNIT,
+    PARTIALLY_RESOLVE_REFERENCES_ERRORS,
+    RESOLVED_UNIT5
+  ]);
+
+  PartiallyResolveUnitReferencesTask(
+      InternalAnalysisContext context, AnalysisTarget target)
+      : super(context, target);
+
+  @override
+  TaskDescriptor get descriptor => DESCRIPTOR;
+
+  @override
+  void internalPerform() {
+    RecordingErrorListener errorListener = new RecordingErrorListener();
+    //
+    // Prepare inputs.
+    //
+    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
+    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
+    CompilationUnitElement unitElement = unit.element;
+    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
+    //
+    // Resolve references.
+    //
+    InheritanceManager inheritanceManager =
+        new InheritanceManager(libraryElement);
+    // TODO(brianwilkerson) Improve performance by not resolving anything inside
+    // function bodies. Function bodies will be resolved later so this is wasted
+    // effort.
+    AstVisitor visitor = new ResolverVisitor(
+        libraryElement, unitElement.source, typeProvider, errorListener,
+        inheritanceManager: inheritanceManager);
+    unit.accept(visitor);
+    //
+    // Prepare targets for inference.
+    //
+    List<VariableElement> staticVariables = <VariableElement>[];
+    List<ClassElement> classes = <ClassElement>[];
+    if (context.analysisOptions.strongMode) {
+      InferrenceFinder inferrenceFinder = new InferrenceFinder();
+      unit.accept(inferrenceFinder);
+      staticVariables = inferrenceFinder.staticVariables;
+      classes = inferrenceFinder.classes;
+    }
+    //
+    // Record outputs.
+    //
+    outputs[CLASSES_IN_UNIT] = classes;
+    outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = staticVariables;
+    outputs[PARTIALLY_RESOLVE_REFERENCES_ERRORS] =
+        removeDuplicateErrors(errorListener.errors);
+    outputs[RESOLVED_UNIT5] = unit;
+  }
+
+  /**
+   * Return a map from the names of the inputs of this kind of task to the task
+   * input descriptors describing those inputs for a task with the
+   * given [target].
+   */
+  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
+    LibrarySpecificUnit unit = target;
+    return <String, TaskInput>{
+      'fullyBuiltLibraryElements': IMPORT_EXPORT_SOURCE_CLOSURE
+          .of(unit.library)
+          .toListOf(LIBRARY_ELEMENT5),
+      LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
+      UNIT_INPUT: RESOLVED_UNIT4.of(unit),
+      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
+    };
+  }
+
+  /**
+   * Create a [PartiallyResolveUnitReferencesTask] based on the given [target]
+   * in the given [context].
+   */
+  static PartiallyResolveUnitReferencesTask createTask(
+      AnalysisContext context, AnalysisTarget target) {
+    return new PartiallyResolveUnitReferencesTask(context, target);
+  }
+}
+
+/**
  * The helper for building the public [Namespace] of a [LibraryElement].
  */
 class PublicNamespaceBuilder {
@@ -2675,7 +3305,7 @@
   static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
 
   /**
-   * The name of the list of [RESOLVED_UNIT5] input.
+   * The name of the list of [RESOLVED_UNIT8] input.
    */
   static const String UNITS_INPUT = 'UNITS_INPUT';
 
@@ -2683,7 +3313,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveLibraryReferencesTask', createTask, buildInputs,
+      'ResolveLibraryReferencesTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_ELEMENT, REFERENCED_NAMES]);
 
   ResolveLibraryReferencesTask(
@@ -2722,12 +3354,12 @@
     return <String, TaskInput>{
       LIBRARY_INPUT: LIBRARY_ELEMENT5.of(source),
       UNITS_INPUT: UNITS.of(source).toList((Source unit) =>
-          RESOLVED_UNIT5.of(new LibrarySpecificUnit(source, unit))),
+          RESOLVED_UNIT8.of(new LibrarySpecificUnit(source, unit))),
       'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
           .of(source)
           .toMapOf(UNITS)
           .toFlattenList((Source library, Source unit) =>
-              RESOLVED_UNIT5.of(new LibrarySpecificUnit(library, unit))),
+              RESOLVED_UNIT8.of(new LibrarySpecificUnit(library, unit))),
     };
   }
 
@@ -2755,7 +3387,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveLibraryTypeNamesTask', createTask, buildInputs,
+      'ResolveLibraryTypeNamesTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[LIBRARY_ELEMENT5]);
 
   ResolveLibraryTypeNamesTask(
@@ -2796,7 +3430,7 @@
 }
 
 /**
- * A task that builds [RESOLVED_UNIT5] for a unit.
+ * A task that builds [RESOLVED_UNIT8] for a unit.
  */
 class ResolveUnitReferencesTask extends SourceBasedAnalysisTask {
   /**
@@ -2818,10 +3452,10 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveUnitReferencesTask', createTask, buildInputs, <ResultDescriptor>[
-    RESOLVE_REFERENCES_ERRORS,
-    RESOLVED_UNIT5
-  ]);
+      'ResolveUnitReferencesTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[RESOLVE_REFERENCES_ERRORS, RESOLVED_UNIT8]);
 
   ResolveUnitReferencesTask(
       InternalAnalysisContext context, AnalysisTarget target)
@@ -2854,7 +3488,7 @@
     //
     outputs[RESOLVE_REFERENCES_ERRORS] =
         removeDuplicateErrors(errorListener.errors);
-    outputs[RESOLVED_UNIT5] = unit;
+    outputs[RESOLVED_UNIT8] = unit;
   }
 
   /**
@@ -2907,10 +3541,10 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveUnitTypeNamesTask', createTask, buildInputs, <ResultDescriptor>[
-    RESOLVE_TYPE_NAMES_ERRORS,
-    RESOLVED_UNIT3
-  ]);
+      'ResolveUnitTypeNamesTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[RESOLVE_TYPE_NAMES_ERRORS, RESOLVED_UNIT3]);
 
   ResolveUnitTypeNamesTask(
       InternalAnalysisContext context, AnalysisTarget target)
@@ -2992,7 +3626,9 @@
    * The task descriptor describing this kind of task.
    */
   static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveVariableReferencesTask', createTask, buildInputs,
+      'ResolveVariableReferencesTask',
+      createTask,
+      buildInputs,
       <ResultDescriptor>[RESOLVED_UNIT4, VARIABLE_REFERENCE_ERRORS]);
 
   ResolveVariableReferencesTask(
@@ -3064,12 +3700,11 @@
   /**
    * The task descriptor describing this kind of task.
    */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('ScanDartTask',
-      createTask, buildInputs, <ResultDescriptor>[
-    LINE_INFO,
-    SCAN_ERRORS,
-    TOKEN_STREAM
-  ]);
+  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
+      'ScanDartTask',
+      createTask,
+      buildInputs,
+      <ResultDescriptor>[LINE_INFO, SCAN_ERRORS, TOKEN_STREAM]);
 
   /**
    * Initialize a newly created task to access the content of the source
@@ -3110,7 +3745,8 @@
       }
       ScriptFragment fragment = fragments[0];
 
-      Scanner scanner = new Scanner(source,
+      Scanner scanner = new Scanner(
+          source,
           new SubSequenceReader(fragment.content, fragment.offset),
           errorListener);
       scanner.setSourceStart(fragment.line, fragment.column);
@@ -3218,8 +3854,11 @@
     //
     // Use the ErrorVerifier to compute errors.
     //
-    ErrorVerifier errorVerifier = new ErrorVerifier(errorReporter,
-        libraryElement, typeProvider, new InheritanceManager(libraryElement),
+    ErrorVerifier errorVerifier = new ErrorVerifier(
+        errorReporter,
+        libraryElement,
+        typeProvider,
+        new InheritanceManager(libraryElement),
         context.analysisOptions.enableSuperMixins);
     unit.accept(errorVerifier);
     //
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
index c02d594..f813fe9 100644
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/dart_work_manager.dart
@@ -21,8 +21,8 @@
 import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/task/driver.dart';
 import 'package:analyzer/task/dart.dart';
-import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/model.dart';
+import 'package:analyzer/src/task/html.dart';
 
 /**
  * The manager for Dart specific analysis.
@@ -113,9 +113,7 @@
     priorityResultQueue.add(new TargetedResult(target, result));
   }
 
-  /**
-   * Notifies the manager about changes in the explicit source list.
-   */
+  @override
   void applyChange(List<Source> addedSources, List<Source> changedSources,
       List<Source> removedSources) {
     addedSources = addedSources.where(_isDartSource).toList();
@@ -166,18 +164,16 @@
     }
   }
 
-  /**
-   * Return an [AnalysisErrorInfo] containing the list of all of the errors and
-   * the line info associated with the given [source]. The list of errors will
-   * be empty if the source is not known to the context or if there are no
-   * errors in the source. The errors contained in the list can be incomplete.
-   */
-  AnalysisErrorInfo getErrors(Source source) {
-    if (analysisCache.getState(source, DART_ERRORS) == CacheState.VALID) {
-      List<AnalysisError> errors = analysisCache.getValue(source, DART_ERRORS);
-      LineInfo lineInfo = analysisCache.getValue(source, LINE_INFO);
-      return new AnalysisErrorInfoImpl(errors, lineInfo);
+  @override
+  List<AnalysisError> getErrors(Source source) {
+    if (!_isDartSource(source) && source is! DartScript) {
+      return AnalysisError.NO_ERRORS;
     }
+    // If analysis is finished, use all the errors.
+    if (analysisCache.getState(source, DART_ERRORS) == CacheState.VALID) {
+      return analysisCache.getValue(source, DART_ERRORS);
+    }
+    // If analysis is in progress, combine all known partial results.
     List<AnalysisError> errors = <AnalysisError>[];
     for (ResultDescriptor descriptor in _SOURCE_ERRORS) {
       errors.addAll(analysisCache.getValue(source, descriptor));
@@ -188,8 +184,7 @@
         errors.addAll(analysisCache.getValue(unit, descriptor));
       }
     }
-    LineInfo lineInfo = analysisCache.getValue(source, LINE_INFO);
-    return new AnalysisErrorInfoImpl(errors, lineInfo);
+    return errors;
   }
 
   /**
@@ -315,7 +310,7 @@
         }
       });
       if (shouldSetErrors) {
-        AnalysisErrorInfo info = getErrors(target);
+        AnalysisErrorInfo info = context.getErrors(target);
         context.getNotice(target).setErrors(info.errors, info.lineInfo);
       }
     }
@@ -329,7 +324,7 @@
         }
       });
       if (shouldSetErrors) {
-        AnalysisErrorInfo info = getErrors(source);
+        AnalysisErrorInfo info = context.getErrors(source);
         context.getNotice(source).setErrors(info.errors, info.lineInfo);
       }
     }
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index ff5767d..e4210d5 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -9,7 +9,7 @@
 
 import 'package:analyzer/src/context/cache.dart';
 import 'package:analyzer/src/generated/engine.dart'
-    hide AnalysisTask, AnalysisContextImpl;
+    hide AnalysisTask, AnalysisContextImpl, WorkManager;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
@@ -44,7 +44,8 @@
   /**
    * The map of [ComputedResult] controllers.
    */
-  final Map<ResultDescriptor, StreamController<ComputedResult>> resultComputedControllers =
+  final Map<ResultDescriptor,
+          StreamController<ComputedResult>> resultComputedControllers =
       <ResultDescriptor, StreamController<ComputedResult>>{};
 
   /**
@@ -197,8 +198,10 @@
    * [descriptor] is computed.
    */
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    return resultComputedControllers.putIfAbsent(descriptor, () =>
-        new StreamController<ComputedResult>.broadcast(sync: true)).stream;
+    return resultComputedControllers
+        .putIfAbsent(descriptor,
+            () => new StreamController<ComputedResult>.broadcast(sync: true))
+        .stream;
   }
 
   /**
@@ -476,8 +479,9 @@
    * Initialize a newly created exception to represent a failed attempt to
    * perform the given [task] due to the given [dependencyCycle].
    */
-  InfiniteTaskLoopException(AnalysisTask task, this.dependencyCycle) : super(
-          'Infinite loop while performing task ${task.descriptor.name} for ${task.target}');
+  InfiniteTaskLoopException(AnalysisTask task, this.dependencyCycle)
+      : super(
+            'Infinite loop while performing task ${task.descriptor.name} for ${task.target}');
 }
 
 /**
@@ -565,10 +569,10 @@
    * described by the given descriptor.
    */
   WorkItem(this.context, this.target, this.descriptor, this.spawningResult) {
-    AnalysisTarget actualTarget = identical(
-            target, AnalysisContextTarget.request)
-        ? new AnalysisContextTarget(context)
-        : target;
+    AnalysisTarget actualTarget =
+        identical(target, AnalysisContextTarget.request)
+            ? new AnalysisContextTarget(context)
+            : target;
     Map<String, TaskInput> inputDescriptors =
         descriptor.createTaskInputs(actualTarget);
     builder = new TopLevelTaskInputBuilder(inputDescriptors);
@@ -672,42 +676,6 @@
 }
 
 /**
- * [AnalysisDriver] uses [WorkManager]s to select results to compute.
- *
- * They know specific of the targets and results they care about,
- * so they can request analysis results in optimal order.
- */
-abstract class WorkManager {
-  /**
-   * Notifies the managers that the given set of priority [targets] was set.
-   */
-  void applyPriorityTargets(List<AnalysisTarget> targets);
-
-  /**
-   * Return the next [TargetedResult] that this work manager wants to be
-   * computed, or `null` if this manager doesn't need any new results.
-   */
-  TargetedResult getNextResult();
-
-  /**
-   * Return the priority if the next work order this work manager want to be
-   * computed. The [AnalysisDriver] will perform the work order with
-   * the highest priority.
-   *
-   * Even if the returned value is [WorkOrderPriority.NONE], it still does not
-   * guarantee that [getNextResult] will return not `null`.
-   */
-  WorkOrderPriority getNextResultPriority();
-
-  /**
-   * Notifies the manager that the given [outputs] were produced for
-   * the given [target].
-   */
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs);
-}
-
-/**
  * A description of the work to be done to compute a desired analysis result.
  * The class implements a lazy depth-first traversal of the work item's input.
  */
@@ -774,31 +742,6 @@
 }
 
 /**
- * The priorities of work orders returned by [WorkManager]s.
- */
-enum WorkOrderPriority {
-  /**
-   * Responding to an user's action.
-   */
-  INTERACTIVE,
-
-  /**
-   * Computing information for priority sources.
-   */
-  PRIORITY,
-
-  /**
-   * A work should be done, but without any special urgency.
-   */
-  NORMAL,
-
-  /**
-   * Nothing to do.
-   */
-  NONE
-}
-
-/**
  * Specilaization of [CycleAwareDependencyWalker] for use by [WorkOrder].
  */
 class _WorkOrderDependencyWalker extends CycleAwareDependencyWalker<WorkItem> {
diff --git a/pkg/analyzer/lib/src/task/html_work_manager.dart b/pkg/analyzer/lib/src/task/html_work_manager.dart
index d438d51..faedfb2 100644
--- a/pkg/analyzer/lib/src/task/html_work_manager.dart
+++ b/pkg/analyzer/lib/src/task/html_work_manager.dart
@@ -20,7 +20,6 @@
 import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/task/driver.dart';
 import 'package:analyzer/src/task/html.dart';
-import 'package:analyzer/task/general.dart';
 import 'package:analyzer/task/html.dart';
 import 'package:analyzer/task/model.dart';
 
@@ -71,9 +70,7 @@
     priorityResultQueue.add(new TargetedResult(target, result));
   }
 
-  /**
-   * Notifies the manager about changes in the explicit source list.
-   */
+  @override
   void applyChange(List<Source> addedSources, List<Source> changedSources,
       List<Source> removedSources) {
     addedSources = addedSources.where(_isHtmlSource).toList();
@@ -103,26 +100,23 @@
     }
   }
 
-  /**
-   * Return an [AnalysisErrorInfo] containing the list of all of the errors and
-   * the line info associated with the given [source]. The list of errors will
-   * be empty if the source is not known to the context or if there are no
-   * errors in the source. The errors contained in the list can be incomplete.
-   */
-  AnalysisErrorInfo getErrors(Source source) {
-    if (analysisCache.getState(source, HTML_ERRORS) == CacheState.VALID) {
-      List<AnalysisError> errors = analysisCache.getValue(source, HTML_ERRORS);
-      LineInfo lineInfo = analysisCache.getValue(source, LINE_INFO);
-      return new AnalysisErrorInfoImpl(errors, lineInfo);
+  @override
+  List<AnalysisError> getErrors(Source source) {
+    if (!_isHtmlSource(source)) {
+      return AnalysisError.NO_ERRORS;
     }
+    // If analysis is finished, use all the errors.
+    if (analysisCache.getState(source, HTML_ERRORS) == CacheState.VALID) {
+      return analysisCache.getValue(source, HTML_ERRORS);
+    }
+    // If analysis is in progress, combine all known partial results.
     List<AnalysisError> errors = <AnalysisError>[];
     errors.addAll(analysisCache.getValue(source, HTML_DOCUMENT_ERRORS));
     List<DartScript> scripts = analysisCache.getValue(source, DART_SCRIPTS);
     for (DartScript script in scripts) {
       errors.addAll(context.getErrors(script).errors);
     }
-    LineInfo lineInfo = analysisCache.getValue(source, LINE_INFO);
-    return new AnalysisErrorInfoImpl(errors, lineInfo);
+    return errors;
   }
 
   @override
@@ -210,7 +204,7 @@
         }
       });
       if (shouldSetErrors) {
-        AnalysisErrorInfo info = getErrors(target);
+        AnalysisErrorInfo info = context.getErrors(target);
         context.getNotice(target).setErrors(info.errors, info.lineInfo);
       }
     }
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
new file mode 100644
index 0000000..3d13146
--- /dev/null
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -0,0 +1,557 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyzer.src.task.strong_mode;
+
+import 'dart:collection';
+
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+
+/**
+ * Set the type of the sole parameter of the given [element] to the given [type].
+ */
+void setParameterType(PropertyAccessorElement element, DartType type) {
+  if (element is PropertyAccessorElementImpl) {
+    ParameterElement parameter = _getParameter(element);
+    if (parameter is ParameterElementImpl) {
+      //
+      // Update the type of the parameter.
+      //
+      parameter.type = type;
+      //
+      // Update the type of the setter to reflect the new parameter type.
+      //
+      FunctionType functionType = element.type;
+      if (functionType is FunctionTypeImpl) {
+        element.type =
+            new FunctionTypeImpl(element, functionType.prunedTypedefs);
+      } else {
+        assert(false);
+      }
+    } else {
+      assert(false);
+    }
+  } else {
+    throw new StateError('element is an instance of ${element.runtimeType}');
+    assert(false);
+  }
+}
+
+/**
+ * Set the return type of the given [element] to the given [type].
+ */
+void setReturnType(ExecutableElement element, DartType type) {
+  if (element is ExecutableElementImpl) {
+    //
+    // Update the return type of the element, which is stored in two places:
+    // directly in the element and indirectly in the type of the element.
+    //
+    element.returnType = type;
+    FunctionType functionType = element.type;
+    if (functionType is FunctionTypeImpl) {
+      element.type = new FunctionTypeImpl(element, functionType.prunedTypedefs);
+    } else {
+      assert(false);
+    }
+  } else {
+    assert(false);
+  }
+}
+
+/**
+ * Return the element for the single parameter of the given [setter], or `null`
+ * if the executable element is not a setter or does not have a single
+ * parameter.
+ */
+ParameterElement _getParameter(ExecutableElement setter) {
+  if (setter is PropertyAccessorElement && setter.isSetter) {
+    List<ParameterElement> parameters = setter.parameters;
+    if (parameters.length == 1) {
+      return parameters[0];
+    }
+  }
+  return null;
+}
+
+/**
+ * A function that returns `true` if the given [variable] passes the filter.
+ */
+typedef bool VariableFilter(VariableElement element);
+
+/**
+ * An object used to find static variables whose types should be inferred and
+ * classes whose members should have types inferred. Clients are expected to
+ * visit a [CompilationUnit].
+ */
+class InferrenceFinder extends SimpleAstVisitor {
+  /**
+   * The static variables that should have types inferred for them.
+   */
+  final List<VariableElement> staticVariables = <VariableElement>[];
+
+  /**
+   * The classes defined in the unit.
+   *
+   * TODO(brianwilkerson) We don't currently remove classes whose members do not
+   * need to be processed, but we potentially could.
+   */
+  final List<ClassElement> classes = <ClassElement>[];
+
+  /**
+   * Initialize a newly created finder.
+   */
+  InferrenceFinder();
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    classes.add(node.element);
+    for (ClassMember member in node.members) {
+      member.accept(this);
+    }
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    classes.add(node.element);
+  }
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    for (CompilationUnitMember declaration in node.declarations) {
+      declaration.accept(this);
+    }
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    if (node.isStatic && node.fields.type == null) {
+      _addVariables(node.fields.variables);
+    }
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    if (node.variables.type == null) {
+      _addVariables(node.variables.variables);
+    }
+  }
+
+  /**
+   * Add all of the [variables] with initializers to the list of variables whose
+   * type can be inferred. Technically, we only infer the types of variables
+   * that do not have a static type, but all variables with initializers
+   * potentially need to be re-resolved after inference because they might
+   * refer to fields whose type was inferred.
+   */
+  void _addVariables(NodeList<VariableDeclaration> variables) {
+    for (VariableDeclaration variable in variables) {
+      if (variable.initializer != null) {
+        VariableElement element = variable.element;
+        if (element.hasImplicitType) {
+          staticVariables.add(element);
+        }
+      }
+    }
+  }
+}
+
+/**
+ * An object used to infer the type of instance fields and the return types of
+ * instance methods within a single compilation unit.
+ */
+class InstanceMemberInferrer {
+  /**
+   * The type provider used to look up types.
+   */
+  final TypeProvider typeProvider;
+
+  /**
+   * The type system used to compute the least upper bound of types.
+   */
+  TypeSystem typeSystem;
+
+  /**
+   * The inheritance manager used to find overridden method.
+   */
+  InheritanceManager inheritanceManager;
+
+  /**
+   * The classes that have been visited while attempting to infer the types of
+   * instance members of some base class.
+   */
+  HashSet<ClassElementImpl> elementsBeingInferred =
+      new HashSet<ClassElementImpl>();
+
+  /**
+   * Initialize a newly create inferrer.
+   */
+  InstanceMemberInferrer(this.typeProvider) {
+    typeSystem = new TypeSystemImpl(typeProvider);
+  }
+
+  /**
+   * Infer type information for all of the instance members in the given
+   * compilation [unit].
+   */
+  void inferCompilationUnit(CompilationUnitElement unit) {
+    inheritanceManager = new InheritanceManager(unit.library);
+    unit.types.forEach((ClassElement classElement) {
+      try {
+        _inferClass(classElement);
+      } on _CycleException {
+        // This is a short circuit return to prevent types that inherit from
+        // types containing a circular reference from being inferred.
+      }
+    });
+  }
+
+  /**
+   * Compute the best type for the [parameter] at the given [index] that must be
+   * compatible with the types of the corresponding parameters of the given
+   * [overriddenMethods].
+   *
+   * At the moment, this method will only return a type other than 'dynamic' if
+   * the types of all of the parameters are the same. In the future we might
+   * want to be smarter about it, such as by returning the least upper bound of
+   * the parameter types.
+   */
+  DartType _computeParameterType(ParameterElement parameter, int index,
+      List<ExecutableElement> overriddenMethods) {
+    DartType parameterType = null;
+    int length = overriddenMethods.length;
+    for (int i = 0; i < length; i++) {
+      DartType type = _getTypeOfCorrespondingParameter(
+          parameter, index, overriddenMethods[i]);
+      if (parameterType == null) {
+        parameterType = type;
+      } else if (parameterType != type) {
+        return typeProvider.dynamicType;
+      }
+    }
+    return parameterType == null ? typeProvider.dynamicType : parameterType;
+  }
+
+  /**
+   * Compute the best return type for a method that must be compatible with the
+   * return types of each of the given [overriddenMethods].
+   *
+   * At the moment, this method will only return a type other than 'dynamic' if
+   * the return types of all of the methods are the same. In the future we might
+   * want to be smarter about it.
+   */
+  DartType _computeReturnType(List<ExecutableElement> overriddenMethods) {
+    DartType returnType = null;
+    int length = overriddenMethods.length;
+    for (int i = 0; i < length; i++) {
+      DartType type = _getReturnType(overriddenMethods[i]);
+      if (returnType == null) {
+        returnType = type;
+      } else if (returnType != type) {
+        return typeProvider.dynamicType;
+      }
+    }
+    return returnType == null ? typeProvider.dynamicType : returnType;
+  }
+
+  DartType _getReturnType(ExecutableElement element) {
+    DartType returnType = element.returnType;
+    if (returnType == null) {
+      return typeProvider.dynamicType;
+    }
+    return returnType;
+  }
+
+  /**
+   * Given a [method], return the type of the parameter in the method that
+   * corresponds to the given [parameter]. If the parameter is positional, then
+   * it appears at the given [index] in its enclosing element's list of
+   * parameters.
+   */
+  DartType _getTypeOfCorrespondingParameter(
+      ParameterElement parameter, int index, ExecutableElement method) {
+    //
+    // Find the corresponding parameter.
+    //
+    List<ParameterElement> methodParameters = method.parameters;
+    ParameterElement matchingParameter = null;
+    if (parameter.parameterKind == ParameterKind.NAMED) {
+      //
+      // If we're looking for a named parameter, only a named parameter with
+      // the same name will be matched.
+      //
+      matchingParameter = methodParameters.lastWhere(
+          (ParameterElement methodParameter) =>
+              methodParameter.parameterKind == ParameterKind.NAMED &&
+                  methodParameter.name == parameter.name,
+          orElse: () => null);
+    } else {
+      //
+      // If we're looking for a positional parameter we ignore the difference
+      // between required and optional parameters.
+      //
+      if (index < methodParameters.length) {
+        matchingParameter = methodParameters[index];
+        if (matchingParameter.parameterKind == ParameterKind.NAMED) {
+          matchingParameter = null;
+        }
+      }
+    }
+    //
+    // Then return the type of the parameter.
+    //
+    return matchingParameter == null
+        ? typeProvider.dynamicType
+        : matchingParameter.type;
+  }
+
+  /**
+   * If the given [accessorElement] represents a non-synthetic instance getter
+   * for which no return type was provided, infer the return type of the getter.
+   */
+  void _inferAccessor(PropertyAccessorElement accessorElement) {
+    if (!accessorElement.isSynthetic &&
+        accessorElement.isGetter &&
+        !accessorElement.isStatic &&
+        accessorElement.hasImplicitReturnType) {
+      List<ExecutableElement> overriddenGetters = inheritanceManager
+          .lookupOverrides(
+              accessorElement.enclosingElement, accessorElement.name);
+      if (overriddenGetters.isNotEmpty && _onlyGetters(overriddenGetters)) {
+        DartType newType = _computeReturnType(overriddenGetters);
+        List<ExecutableElement> overriddenSetters = inheritanceManager
+            .lookupOverrides(
+                accessorElement.enclosingElement, accessorElement.name + '=');
+        PropertyAccessorElement setter = (accessorElement.enclosingElement
+            as ClassElement).getSetter(accessorElement.name);
+        if (setter != null) {
+          overriddenSetters.add(setter);
+        }
+        if (!_isCompatible(newType, overriddenSetters)) {
+          newType = typeProvider.dynamicType;
+        }
+        setReturnType(accessorElement, newType);
+        (accessorElement.variable as FieldElementImpl).type = newType;
+      }
+    }
+  }
+
+  /**
+   * Infer type information for all of the instance members in the given
+   * [classElement].
+   */
+  void _inferClass(ClassElement classElement) {
+    if (classElement is ClassElementImpl) {
+      if (classElement.hasBeenInferred) {
+        return;
+      }
+      if (!elementsBeingInferred.add(classElement)) {
+        // We have found a circularity in the class hierarchy. For now we just
+        // stop trying to infer any type information for any classes that
+        // inherit from any class in the cycle. We could potentially limit the
+        // algorithm to only not inferring types in the classes in the cycle,
+        // but it isn't clear that the results would be significantly better.
+        throw new _CycleException();
+      }
+      try {
+        //
+        // Ensure that all of instance members in the supertypes have had types
+        // inferred for them.
+        //
+        _inferType(classElement.supertype);
+        classElement.mixins.forEach(_inferType);
+        classElement.interfaces.forEach(_inferType);
+        //
+        // Then infer the types for the members.
+        //
+        classElement.fields.forEach(_inferField);
+        classElement.accessors.forEach(_inferAccessor);
+        classElement.methods.forEach(_inferMethod);
+        classElement.hasBeenInferred = true;
+      } finally {
+        elementsBeingInferred.remove(classElement);
+      }
+    }
+  }
+
+  /**
+   * If the given [fieldElement] represents a non-synthetic instance field for
+   * which no type was provided, infer the type of the field.
+   */
+  void _inferField(FieldElement fieldElement) {
+    if (!fieldElement.isSynthetic &&
+        !fieldElement.isStatic &&
+        fieldElement.hasImplicitType) {
+      //
+      // First look for overridden getters with the same name as the field.
+      //
+      List<ExecutableElement> overriddenGetters = inheritanceManager
+          .lookupOverrides(fieldElement.enclosingElement, fieldElement.name);
+      DartType newType = null;
+      if (overriddenGetters.isNotEmpty && _onlyGetters(overriddenGetters)) {
+        newType = _computeReturnType(overriddenGetters);
+        List<ExecutableElement> overriddenSetters = inheritanceManager
+            .lookupOverrides(
+                fieldElement.enclosingElement, fieldElement.name + '=');
+        if (!_isCompatible(newType, overriddenSetters)) {
+          newType = null;
+        }
+      }
+      //
+      // Then, if none was found, infer the type from the initialization
+      // expression.
+      //
+      if (newType == null) {
+        if (fieldElement.initializer != null &&
+            (fieldElement.isFinal || overriddenGetters.isEmpty)) {
+          newType = fieldElement.initializer.returnType;
+        }
+      }
+      if (newType == null || newType.isBottom) {
+        newType = typeProvider.dynamicType;
+      }
+      (fieldElement as FieldElementImpl).type = newType;
+      setReturnType(fieldElement.getter, newType);
+      if (!fieldElement.isFinal && !fieldElement.isConst) {
+         setParameterType(fieldElement.setter, newType);
+      }
+    }
+  }
+
+  /**
+   * If the given [methodElement] represents a non-synthetic instance method
+   * for which no return type was provided, infer the return type of the method.
+   */
+  void _inferMethod(MethodElement methodElement) {
+    if (methodElement.isSynthetic || methodElement.isStatic) {
+      return;
+    }
+    List<ExecutableElement> overriddenMethods = null;
+    //
+    // Infer the return type.
+    //
+    if (methodElement.hasImplicitReturnType) {
+      overriddenMethods = inheritanceManager.lookupOverrides(
+          methodElement.enclosingElement, methodElement.name);
+      if (overriddenMethods.isEmpty || !_onlyMethods(overriddenMethods)) {
+        return;
+      }
+      MethodElementImpl element = methodElement as MethodElementImpl;
+      setReturnType(element, _computeReturnType(overriddenMethods));
+    }
+    //
+    // Infer the parameter types.
+    //
+    List<ParameterElement> parameters = methodElement.parameters;
+    int length = parameters.length;
+    for (int i = 0; i < length; ++i) {
+      ParameterElement parameter = parameters[i];
+      if (parameter is ParameterElementImpl && parameter.hasImplicitType) {
+        if (overriddenMethods == null) {
+          overriddenMethods = inheritanceManager.lookupOverrides(
+              methodElement.enclosingElement, methodElement.name);
+        }
+        if (overriddenMethods.isEmpty || !_onlyMethods(overriddenMethods)) {
+          return;
+        }
+        parameter.type = _computeParameterType(parameter, i, overriddenMethods);
+      }
+    }
+  }
+
+  /**
+   * Infer type information for all of the instance members in the given
+   * interface [type].
+   */
+  void _inferType(InterfaceType type) {
+    if (type != null) {
+      ClassElement element = type.element;
+      if (element != null) {
+        _inferClass(element);
+      }
+    }
+  }
+
+  /**
+   * Return `true` if the given [type] is compatible with the argument types of
+   * all of the given [setters].
+   */
+  bool _isCompatible(DartType type, List<ExecutableElement> setters) {
+    for (ExecutableElement setter in setters) {
+      ParameterElement parameter = _getParameter(setter);
+      if (parameter != null && !typeSystem.isSubtypeOf(parameter.type, type)) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Return `true` if the list of [elements] contains only getters.
+   */
+  bool _onlyGetters(List<ExecutableElement> elements) {
+    for (ExecutableElement element in elements) {
+      if (!(element is PropertyAccessorElement && element.isGetter)) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  /**
+   * Return `true` if the list of [elements] contains only methods.
+   */
+  bool _onlyMethods(List<ExecutableElement> elements) {
+    for (ExecutableElement element in elements) {
+      if (element is! MethodElement) {
+        return false;
+      }
+    }
+    return true;
+  }
+}
+
+/**
+ * A visitor that will gather all of the variables referenced within a given
+ * AST structure. The collection can be restricted to contain only those
+ * variables that pass a specified filter.
+ */
+class VariableGatherer extends RecursiveAstVisitor {
+  /**
+   * The filter used to limit which variables are gathered, or `null` if no
+   * filtering is to be performed.
+   */
+  final VariableFilter filter;
+
+  /**
+   * The variables that were found.
+   */
+  final Set<VariableElement> results = new HashSet<VariableElement>();
+
+  /**
+   * Initialize a newly created gatherer to gather all of the variables that
+   * pass the given [filter] (or all variables if no filter is provided).
+   */
+  VariableGatherer([this.filter = null]);
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    if (!node.inDeclarationContext()) {
+      Element element = node.staticElement;
+      if (element is PropertyAccessorElement && element.isSynthetic) {
+        element = (element as PropertyAccessorElement).variable;
+      }
+      if (element is VariableElement && (filter == null || filter(element))) {
+        results.add(element);
+      }
+    }
+  }
+}
+
+/**
+ * A class of exception that is not used anywhere else.
+ */
+class _CycleException implements Exception {}
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 0a45766..9375576 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -7,8 +7,10 @@
 import 'dart:collection';
 
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask;
+import 'package:analyzer/src/generated/error.dart' show AnalysisError;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/task/driver.dart';
 import 'package:analyzer/src/task/model.dart';
 
@@ -390,6 +392,48 @@
 }
 
 /**
+ * A specification of the given [result] for the given [target].
+ *
+ * Clients are not expected to subtype this class.
+ */
+class TargetedResult {
+  /**
+   * An empty list of results.
+   */
+  static final List<TargetedResult> EMPTY_LIST = const <TargetedResult>[];
+
+  /**
+   * The target with which the result is associated.
+   */
+  final AnalysisTarget target;
+
+  /**
+   * The result associated with the target.
+   */
+  final ResultDescriptor result;
+
+  /**
+   * Initialize a new targeted result.
+   */
+  TargetedResult(this.target, this.result);
+
+  @override
+  int get hashCode {
+    return JenkinsSmiHash.combine(target.hashCode, result.hashCode);
+  }
+
+  @override
+  bool operator ==(other) {
+    return other is TargetedResult &&
+        other.target == target &&
+        other.result == result;
+  }
+
+  @override
+  String toString() => '$result for $target';
+}
+
+/**
  * A description of an [AnalysisTask].
  */
 abstract class TaskDescriptor {
@@ -514,3 +558,90 @@
    */
   bool moveNext();
 }
+
+/**
+ * [WorkManager]s are used to drive analysis.
+ *
+ * They know specific of the targets and results they care about,
+ * so they can request analysis results in optimal order.
+ */
+abstract class WorkManager {
+  /**
+   * Notifies the manager about changes in the explicit source list.
+   */
+  void applyChange(List<Source> addedSources, List<Source> changedSources,
+      List<Source> removedSources);
+
+  /**
+   * Notifies the managers that the given set of priority [targets] was set.
+   */
+  void applyPriorityTargets(List<AnalysisTarget> targets);
+
+  /**
+   * Return a list of all of the errors associated with the given [source].
+   * The list of errors will be empty if the source is not known to the context
+   * or if there are no errors in the source. The errors contained in the list
+   * can be incomplete.
+   */
+  List<AnalysisError> getErrors(Source source);
+
+  /**
+   * Return the next [TargetedResult] that this work manager wants to be
+   * computed, or `null` if this manager doesn't need any new results.
+   */
+  TargetedResult getNextResult();
+
+  /**
+   * Return the priority if the next work order this work manager want to be
+   * computed. The [AnalysisDriver] will perform the work order with
+   * the highest priority.
+   *
+   * Even if the returned value is [WorkOrderPriority.NONE], it still does not
+   * guarantee that [getNextResult] will return not `null`.
+   */
+  WorkOrderPriority getNextResultPriority();
+
+  /**
+   * Notifies the manager about analysis options changes.
+   */
+  void onAnalysisOptionsChanged();
+
+  /**
+   * Notifies the manager about [SourceFactory] changes.
+   */
+  void onSourceFactoryChanged();
+
+  /**
+   * Notifies the manager that the given [outputs] were produced for
+   * the given [target].
+   */
+  void resultsComputed(
+      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs);
+}
+
+/**
+ * The priorities of work orders returned by [WorkManager]s.
+ *
+ * New priorities may be added with time, clients need to tolerate this.
+ */
+enum WorkOrderPriority {
+  /**
+   * Responding to an user's action.
+   */
+  INTERACTIVE,
+
+  /**
+   * Computing information for priority sources.
+   */
+  PRIORITY,
+
+  /**
+   * A work should be done, but without any special urgency.
+   */
+  NORMAL,
+
+  /**
+   * Nothing to do.
+   */
+  NONE
+}
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 77b064e..27dd8fe 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,10 +1,10 @@
 name: analyzer
-version: 0.26.0
+version: 0.26.1+3
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: http://www.dartlang.org
 environment:
-  sdk: '>=1.12.0-dev.1.0 <2.0.0'
+  sdk: '>=1.11.0 <2.0.0'
 dependencies:
   args: '>=0.12.1 <0.14.0'
   glob: ^1.0.3
diff --git a/pkg/analyzer/test/cancelable_future_test.dart b/pkg/analyzer/test/cancelable_future_test.dart
index c9d88f2..b28c0f9 100644
--- a/pkg/analyzer/test/cancelable_future_test.dart
+++ b/pkg/analyzer/test/cancelable_future_test.dart
@@ -4,24 +4,293 @@
 
 library test.cancelable_future;
 
-import 'reflective_tests.dart';
-import 'package:analyzer/src/cancelable_future.dart';
 import 'dart:async';
+
+import 'package:analyzer/src/cancelable_future.dart';
 import 'package:unittest/unittest.dart';
 import 'package:watcher/src/utils.dart';
 
+import 'reflective_tests.dart';
+import 'utils.dart';
+
 void main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(CancelableCompleterTests);
   runReflectiveTests(CancelableFutureTests);
 }
 
 @reflectiveTest
-class CancelableFutureTests {
-  Future test_defaultConstructor_returnValue() {
+class CancelableCompleterTests {
+  CancelableCompleter<Object> completer;
+  int cancelCount = 0;
+
+  void setUp() {
+    completer = new CancelableCompleter<Object>(() {
+      cancelCount++;
+    });
+  }
+
+  Future test_cancel_after_cancel() {
+    // It is permissible to cancel multiple times, but only the first
+    // cancellation has any effect.
+    expect(cancelCount, 0);
+    completer.future.cancel();
+    expect(cancelCount, 1);
+    completer.future.cancel();
+    expect(cancelCount, 1);
+    // Make sure the future still completes with error.
+    return completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(error, new isInstanceOf<FutureCanceledError>());
+      // And make sure nothing else happens.
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(completer.isCompleted, isFalse);
+      expect(cancelCount, 1);
+    });
+  }
+
+  Future test_cancel_after_chaining() {
+    bool callbackInvoked = false;
+    completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(callbackInvoked, isFalse);
+      expect(error, new isInstanceOf<FutureCanceledError>());
+      callbackInvoked = true;
+    });
+    expect(cancelCount, 0);
+    completer.future.cancel();
+    // The cancel callback should have been invoked immediately.
+    expect(cancelCount, 1);
+    // But the completer should remain in the "not completed" state.
+    expect(completer.isCompleted, isFalse);
+    // The callback should be deferred to a microtask.
+    expect(callbackInvoked, isFalse);
+    return pumpEventQueue().then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isFalse);
+      expect(cancelCount, 1);
+    });
+  }
+
+  Future test_cancel_after_complete() {
+    Object obj = new Object();
+    completer.complete(obj);
+    completer.future.cancel();
+    // The cancel callback should not have been invoked, because it was too
+    // late to cancel.
+    expect(cancelCount, 0);
+    // Make sure the future still completes with the object.
+    return completer.future.then((result) {
+      expect(result, same(obj));
+      // And make sure nothing else happens.
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 0);
+    });
+  }
+
+  Future test_cancel_before_chaining() {
+    completer.future.cancel();
+    // The cancel callback should have been invoked immediately.
+    expect(cancelCount, 1);
+    // But the completer should remain in the "not completed" state.
+    expect(completer.isCompleted, isFalse);
+    bool callbackInvoked = false;
+    completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(callbackInvoked, isFalse);
+      expect(error, new isInstanceOf<FutureCanceledError>());
+      callbackInvoked = true;
+    });
+    // The callback should be deferred to a microtask.
+    expect(callbackInvoked, isFalse);
+    expect(completer.isCompleted, isFalse);
+    return pumpEventQueue().then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isFalse);
+      expect(cancelCount, 1);
+    });
+  }
+
+  Future test_complete_after_cancel() {
+    completer.future.cancel();
+    // The cancel callback should have been invoked immediately.
+    expect(cancelCount, 1);
+    // Completing should have no effect other than to set the isCompleted
+    // flag.
+    expect(completer.isCompleted, isFalse);
+    Object obj = new Object();
+    completer.complete(obj);
+    expect(completer.isCompleted, isTrue);
+    // Make sure the future still completer with error.
+    return completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(error, new isInstanceOf<FutureCanceledError>());
+      // And make sure nothing else happens.
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 1);
+    });
+  }
+
+  Future test_complete_after_chaining() {
     Object obj = new Object();
     bool callbackInvoked = false;
-    new CancelableFuture(() => obj).then((result) {
+    completer.future.then((result) {
+      expect(callbackInvoked, isFalse);
+      expect(result, same(obj));
+      callbackInvoked = true;
+    }, onError: (error) {
+      fail('Expected successful completion');
+    });
+    expect(completer.isCompleted, isFalse);
+    // Running the event loop should have no effect since the completer hasn't
+    // been completed yet.
+    return pumpEventQueue().then((_) {
+      completer.complete(obj);
+      expect(completer.isCompleted, isTrue);
+      // The callback should be deferred to a microtask.
+      expect(callbackInvoked, isFalse);
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 0);
+    });
+  }
+
+  void test_complete_after_complete() {
+    // As with an ordinary Completer, calling complete() (or completeError)
+    // after calling complete() should throw an exception.
+    completer.complete();
+    expect(() {
+      completer.complete();
+    }, throws);
+    expect(() {
+      completer.completeError(new Object());
+    }, throws);
+  }
+
+  void test_complete_after_completeError() {
+    // As with an ordinary Completer, calling complete() (or completeError)
+    // after calling completeError() should throw an exception.
+    completer.completeError(new Object());
+    expect(() {
+      completer.complete();
+    }, throws);
+    expect(() {
+      completer.completeError(new Object());
+    }, throws);
+    // Now absorb the error that's in the completer's future.
+    completer.future.catchError((_) => null);
+  }
+
+  Future test_complete_before_chaining() {
+    Object obj = new Object();
+    completer.complete(obj);
+    expect(completer.isCompleted, isTrue);
+    bool callbackInvoked = false;
+    completer.future.then((result) {
+      expect(callbackInvoked, isFalse);
+      expect(result, same(obj));
+      callbackInvoked = true;
+    }, onError: (error) {
+      fail('Expected successful completion');
+    });
+    // The callback should be deferred to a microtask.
+    expect(callbackInvoked, isFalse);
+    expect(completer.isCompleted, isTrue);
+    return pumpEventQueue().then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 0);
+    });
+  }
+
+  Future test_completeError_after_cancel() {
+    completer.future.cancel();
+    // The cancel callback should have been invoked immediately.
+    expect(cancelCount, 1);
+    // Completing should have no effect other than to set the isCompleted
+    // flag.
+    expect(completer.isCompleted, isFalse);
+    Object obj = new Object();
+    completer.completeError(obj);
+    expect(completer.isCompleted, isTrue);
+    // Make sure the future still completes with error.
+    return completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(error, new isInstanceOf<FutureCanceledError>());
+      // And make sure nothing else happens.
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 1);
+    });
+  }
+
+  Future test_completeError_after_chaining() {
+    Object obj = new Object();
+    bool callbackInvoked = false;
+    completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(callbackInvoked, isFalse);
+      expect(error, same(obj));
+      callbackInvoked = true;
+    });
+    expect(completer.isCompleted, isFalse);
+    // Running the event loop should have no effect since the completer hasn't
+    // been completed yet.
+    return pumpEventQueue().then((_) {
+      completer.completeError(obj);
+      expect(completer.isCompleted, isTrue);
+      // The callback should be deferred to a microtask.
+      expect(callbackInvoked, isFalse);
+    }).then((_) => pumpEventQueue()).then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 0);
+    });
+  }
+
+  Future test_completeError_before_chaining() {
+    Object obj = new Object();
+    completer.completeError(obj);
+    expect(completer.isCompleted, isTrue);
+    bool callbackInvoked = false;
+    completer.future.then((_) {
+      fail('Expected error completion');
+    }, onError: (error) {
+      expect(callbackInvoked, isFalse);
+      expect(error, same(obj));
+      callbackInvoked = true;
+    });
+    // The callback should be deferred to a microtask.
+    expect(callbackInvoked, isFalse);
+    expect(completer.isCompleted, isTrue);
+    return pumpEventQueue().then((_) {
+      expect(callbackInvoked, isTrue);
+      expect(completer.isCompleted, isTrue);
+      expect(cancelCount, 0);
+    });
+  }
+
+  void test_initialState() {
+    expect(completer.isCompleted, isFalse);
+    expect(cancelCount, 0);
+  }
+}
+
+@reflectiveTest
+class CancelableFutureTests {
+  Future test_defaultConstructor_returnFuture() {
+    Object obj = new Object();
+    bool callbackInvoked = false;
+    new CancelableFuture(() => new Future(() => obj)).then((result) {
       expect(callbackInvoked, isFalse);
       expect(result, same(obj));
       callbackInvoked = true;
@@ -34,10 +303,10 @@
     });
   }
 
-  Future test_defaultConstructor_returnFuture() {
+  Future test_defaultConstructor_returnValue() {
     Object obj = new Object();
     bool callbackInvoked = false;
-    new CancelableFuture(() => new Future(() => obj)).then((result) {
+    new CancelableFuture(() => obj).then((result) {
       expect(callbackInvoked, isFalse);
       expect(result, same(obj));
       callbackInvoked = true;
@@ -70,8 +339,8 @@
 
   Future test_delayed_noCallback() {
     DateTime start = new DateTime.now();
-    return new CancelableFuture.delayed(new Duration(seconds: 1)).then(
-        (result) {
+    return new CancelableFuture.delayed(new Duration(seconds: 1))
+        .then((result) {
       DateTime end = new DateTime.now();
       expect(result, isNull);
       expect(end.difference(start).inMilliseconds > 900, isTrue);
@@ -140,269 +409,3 @@
     });
   }
 }
-
-@reflectiveTest
-class CancelableCompleterTests {
-  CancelableCompleter<Object> completer;
-  int cancelCount = 0;
-
-  void setUp() {
-    completer = new CancelableCompleter<Object>(() {
-      cancelCount++;
-    });
-  }
-
-  void test_initialState() {
-    expect(completer.isCompleted, isFalse);
-    expect(cancelCount, 0);
-  }
-
-  void test_complete_after_complete() {
-    // As with an ordinary Completer, calling complete() (or completeError)
-    // after calling complete() should throw an exception.
-    completer.complete();
-    expect(() {
-      completer.complete();
-    }, throws);
-    expect(() {
-      completer.completeError(new Object());
-    }, throws);
-  }
-
-  void test_complete_after_completeError() {
-    // As with an ordinary Completer, calling complete() (or completeError)
-    // after calling completeError() should throw an exception.
-    completer.completeError(new Object());
-    expect(() {
-      completer.complete();
-    }, throws);
-    expect(() {
-      completer.completeError(new Object());
-    }, throws);
-    // Now absorb the error that's in the completer's future.
-    completer.future.catchError((_) => null);
-  }
-
-  Future test_complete_before_chaining() {
-    Object obj = new Object();
-    completer.complete(obj);
-    expect(completer.isCompleted, isTrue);
-    bool callbackInvoked = false;
-    completer.future.then((result) {
-      expect(callbackInvoked, isFalse);
-      expect(result, same(obj));
-      callbackInvoked = true;
-    }, onError: (error) {
-      fail('Expected successful completion');
-    });
-    // The callback should be deferred to a microtask.
-    expect(callbackInvoked, isFalse);
-    expect(completer.isCompleted, isTrue);
-    return pumpEventQueue().then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
-  }
-
-  Future test_completeError_before_chaining() {
-    Object obj = new Object();
-    completer.completeError(obj);
-    expect(completer.isCompleted, isTrue);
-    bool callbackInvoked = false;
-    completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(callbackInvoked, isFalse);
-      expect(error, same(obj));
-      callbackInvoked = true;
-    });
-    // The callback should be deferred to a microtask.
-    expect(callbackInvoked, isFalse);
-    expect(completer.isCompleted, isTrue);
-    return pumpEventQueue().then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
-  }
-
-  Future test_complete_after_chaining() {
-    Object obj = new Object();
-    bool callbackInvoked = false;
-    completer.future.then((result) {
-      expect(callbackInvoked, isFalse);
-      expect(result, same(obj));
-      callbackInvoked = true;
-    }, onError: (error) {
-      fail('Expected successful completion');
-    });
-    expect(completer.isCompleted, isFalse);
-    // Running the event loop should have no effect since the completer hasn't
-    // been completed yet.
-    return pumpEventQueue().then((_) {
-      completer.complete(obj);
-      expect(completer.isCompleted, isTrue);
-      // The callback should be deferred to a microtask.
-      expect(callbackInvoked, isFalse);
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
-  }
-
-  Future test_completeError_after_chaining() {
-    Object obj = new Object();
-    bool callbackInvoked = false;
-    completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(callbackInvoked, isFalse);
-      expect(error, same(obj));
-      callbackInvoked = true;
-    });
-    expect(completer.isCompleted, isFalse);
-    // Running the event loop should have no effect since the completer hasn't
-    // been completed yet.
-    return pumpEventQueue().then((_) {
-      completer.completeError(obj);
-      expect(completer.isCompleted, isTrue);
-      // The callback should be deferred to a microtask.
-      expect(callbackInvoked, isFalse);
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
-  }
-
-  Future test_cancel_before_chaining() {
-    completer.future.cancel();
-    // The cancel callback should have been invoked immediately.
-    expect(cancelCount, 1);
-    // But the completer should remain in the "not completed" state.
-    expect(completer.isCompleted, isFalse);
-    bool callbackInvoked = false;
-    completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(callbackInvoked, isFalse);
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      callbackInvoked = true;
-    });
-    // The callback should be deferred to a microtask.
-    expect(callbackInvoked, isFalse);
-    expect(completer.isCompleted, isFalse);
-    return pumpEventQueue().then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isFalse);
-      expect(cancelCount, 1);
-    });
-  }
-
-  Future test_cancel_after_chaining() {
-    bool callbackInvoked = false;
-    completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(callbackInvoked, isFalse);
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      callbackInvoked = true;
-    });
-    expect(cancelCount, 0);
-    completer.future.cancel();
-    // The cancel callback should have been invoked immediately.
-    expect(cancelCount, 1);
-    // But the completer should remain in the "not completed" state.
-    expect(completer.isCompleted, isFalse);
-    // The callback should be deferred to a microtask.
-    expect(callbackInvoked, isFalse);
-    return pumpEventQueue().then((_) {
-      expect(callbackInvoked, isTrue);
-      expect(completer.isCompleted, isFalse);
-      expect(cancelCount, 1);
-    });
-  }
-
-  Future test_cancel_after_complete() {
-    Object obj = new Object();
-    completer.complete(obj);
-    completer.future.cancel();
-    // The cancel callback should not have been invoked, because it was too
-    // late to cancel.
-    expect(cancelCount, 0);
-    // Make sure the future still completes with the object.
-    return completer.future.then((result) {
-      expect(result, same(obj));
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 0);
-    });
-  }
-
-  Future test_complete_after_cancel() {
-    completer.future.cancel();
-    // The cancel callback should have been invoked immediately.
-    expect(cancelCount, 1);
-    // Completing should have no effect other than to set the isCompleted
-    // flag.
-    expect(completer.isCompleted, isFalse);
-    Object obj = new Object();
-    completer.complete(obj);
-    expect(completer.isCompleted, isTrue);
-    // Make sure the future still completer with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 1);
-    });
-  }
-
-  Future test_completeError_after_cancel() {
-    completer.future.cancel();
-    // The cancel callback should have been invoked immediately.
-    expect(cancelCount, 1);
-    // Completing should have no effect other than to set the isCompleted
-    // flag.
-    expect(completer.isCompleted, isFalse);
-    Object obj = new Object();
-    completer.completeError(obj);
-    expect(completer.isCompleted, isTrue);
-    // Make sure the future still completes with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isTrue);
-      expect(cancelCount, 1);
-    });
-  }
-
-  Future test_cancel_after_cancel() {
-    // It is permissible to cancel multiple times, but only the first
-    // cancellation has any effect.
-    expect(cancelCount, 0);
-    completer.future.cancel();
-    expect(cancelCount, 1);
-    completer.future.cancel();
-    expect(cancelCount, 1);
-    // Make sure the future still completes with error.
-    return completer.future.then((_) {
-      fail('Expected error completion');
-    }, onError: (error) {
-      expect(error, new isInstanceOf<FutureCanceledError>());
-      // And make sure nothing else happens.
-    }).then((_) => pumpEventQueue()).then((_) {
-      expect(completer.isCompleted, isFalse);
-      expect(cancelCount, 1);
-    });
-  }
-}
diff --git a/pkg/analyzer/test/enum_test.dart b/pkg/analyzer/test/enum_test.dart
index 854f217b..706737f 100644
--- a/pkg/analyzer/test/enum_test.dart
+++ b/pkg/analyzer/test/enum_test.dart
@@ -18,9 +18,10 @@
 
 import 'generated/ast_test.dart';
 import 'reflective_tests.dart';
+import 'utils.dart';
 
 void main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(EnumTest);
 }
 
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart
index 8b072fe..3d239ae 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -16,9 +16,10 @@
 import 'package:watcher/watcher.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(FileSystemExceptionTest);
   runReflectiveTests(FileTest);
   runReflectiveTests(FolderTest);
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
index 7898bb9..87d976a 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -16,9 +16,10 @@
 import 'package:watcher/watcher.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(PhysicalResourceProviderTest);
   runReflectiveTests(FileTest);
   runReflectiveTests(FolderTest);
@@ -297,10 +298,12 @@
       return _delayed(() {
         expect(changesReceived, hasLength(1));
         if (io.Platform.isWindows) {
-          // TODO(danrubel) https://github.com/dart-lang/sdk/issues/23762
-          // This test fails on Windows but a similar test in the underlying
-          // watcher package passes on Windows.
-          expect(changesReceived[0].type, equals(ChangeType.MODIFY));
+          // See https://github.com/dart-lang/sdk/issues/23762
+          // Not sure why this breaks under Windows, but testing to see whether
+          // we are running Windows causes the type to change. For now we print
+          // the type out of curriosity.
+          print(
+              'PhysicalResourceProviderTest:test_watchFile_delete received an event with type = ${changesReceived[0].type}');
         } else {
           expect(changesReceived[0].type, equals(ChangeType.REMOVE));
         }
diff --git a/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart b/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
index b888c56..8d91d24 100644
--- a/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
+++ b/pkg/analyzer/test/file_system/resource_uri_resolver_test.dart
@@ -10,9 +10,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(ResourceUriResolverTest);
 }
 
@@ -53,5 +54,9 @@
     Source source = resolver.resolveAbsolute(uri);
     expect(source, isNotNull);
     expect(resolver.restoreAbsolute(source), uri);
+    expect(
+        resolver.restoreAbsolute(
+            new NonExistingSource(source.fullName, null, null)),
+        uri);
   }
 }
diff --git a/pkg/analyzer/test/file_system/test_all.dart b/pkg/analyzer/test/file_system/test_all.dart
index 3bacc6c..303df09 100644
--- a/pkg/analyzer/test/file_system/test_all.dart
+++ b/pkg/analyzer/test/file_system/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'memory_file_system_test.dart' as memory_file_system_test;
 import 'physical_resource_provider_test.dart'
     as physical_resource_provider_test;
@@ -13,7 +14,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('file_system', () {
     memory_file_system_test.main();
     physical_resource_provider_test.main();
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 1b13295..ec4b9c0 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.all_the_rest_test;
 
 import 'package:analyzer/file_system/physical_file_system.dart';
@@ -36,13 +33,14 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'engine_test.dart';
 import 'parser_test.dart';
 import 'resolver_test.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(ConstantEvaluatorTest);
   runReflectiveTests(ConstantFinderTest);
   runReflectiveTests(ConstantValueComputerTest);
@@ -103,21 +101,13 @@
   }
 
   void test_tokenize_declaration() {
-    _tokenize("<! foo ><html>", <Object>[
-      "<! foo >",
-      ht.TokenType.LT,
-      "html",
-      ht.TokenType.GT
-    ]);
+    _tokenize("<! foo ><html>",
+        <Object>["<! foo >", ht.TokenType.LT, "html", ht.TokenType.GT]);
   }
 
   void test_tokenize_declaration_malformed() {
-    _tokenize("<! foo /><html>", <Object>[
-      "<! foo />",
-      ht.TokenType.LT,
-      "html",
-      ht.TokenType.GT
-    ]);
+    _tokenize("<! foo /><html>",
+        <Object>["<! foo />", ht.TokenType.LT, "html", ht.TokenType.GT]);
   }
 
   void test_tokenize_directive_incomplete() {
@@ -178,30 +168,18 @@
   }
 
   void test_tokenize_script_partial() {
-    _tokenize("<script> <p> ", <Object>[
-      ht.TokenType.LT,
-      "script",
-      ht.TokenType.GT,
-      " <p> "
-    ]);
+    _tokenize("<script> <p> ",
+        <Object>[ht.TokenType.LT, "script", ht.TokenType.GT, " <p> "]);
   }
 
   void test_tokenize_script_partial2() {
-    _tokenize("<script> <p> <", <Object>[
-      ht.TokenType.LT,
-      "script",
-      ht.TokenType.GT,
-      " <p> <"
-    ]);
+    _tokenize("<script> <p> <",
+        <Object>[ht.TokenType.LT, "script", ht.TokenType.GT, " <p> <"]);
   }
 
   void test_tokenize_script_partial3() {
-    _tokenize("<script> <p> </", <Object>[
-      ht.TokenType.LT,
-      "script",
-      ht.TokenType.GT,
-      " <p> </"
-    ]);
+    _tokenize("<script> <p> </",
+        <Object>[ht.TokenType.LT, "script", ht.TokenType.GT, " <p> </"]);
   }
 
   void test_tokenize_script_ref() {
@@ -228,7 +206,10 @@
       ht.TokenType.LT_SLASH,
       "script",
       ht.TokenType.GT
-    ], <int>[0, 13]);
+    ], <int>[
+      0,
+      13
+    ]);
   }
 
   void test_tokenize_spaces_and_newlines() {
@@ -257,7 +238,16 @@
       "html",
       ht.TokenType.GT,
       " "
-    ], <int>[0, 9, 21, 25, 28, 38, 49]);
+    ],
+        <int>[
+      0,
+      9,
+      21,
+      25,
+      28,
+      38,
+      49
+    ]);
     token = token.next;
     expect(token.offset, 1);
     token = token.next;
@@ -278,13 +268,8 @@
   }
 
   void test_tokenize_string_partial() {
-    _tokenize("<p bob=\"foo", <Object>[
-      ht.TokenType.LT,
-      "p",
-      "bob",
-      ht.TokenType.EQ,
-      "\"foo"
-    ]);
+    _tokenize("<p bob=\"foo",
+        <Object>[ht.TokenType.LT, "p", "bob", ht.TokenType.EQ, "\"foo"]);
   }
 
   void test_tokenize_string_single_quote() {
@@ -299,13 +284,8 @@
   }
 
   void test_tokenize_string_single_quote_partial() {
-    _tokenize("<p bob='foo", <Object>[
-      ht.TokenType.LT,
-      "p",
-      "bob",
-      ht.TokenType.EQ,
-      "'foo"
-    ]);
+    _tokenize("<p bob='foo",
+        <Object>[ht.TokenType.LT, "p", "bob", ht.TokenType.EQ, "'foo"]);
   }
 
   void test_tokenize_tag_begin_end() {
@@ -635,6 +615,7 @@
   void test_divide_int_int() {
     _assertValue2(1.5, "3 / 2");
   }
+
   void test_divide_int_int_byZero() {
     EvaluationResult result = _getExpressionValue("3 / 0");
     expect(result.isValid, isTrue);
@@ -685,6 +666,7 @@
   void test_literal_boolean_false() {
     _assertValue(false, "false");
   }
+
   void test_literal_boolean_true() {
     _assertValue(true, "true");
   }
@@ -1019,8 +1001,13 @@
   ConstructorElement _setupConstructorDeclaration(String name, bool isConst) {
     Keyword constKeyword = isConst ? Keyword.CONST : null;
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(constKeyword, null, null, name,
-            AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            constKeyword,
+            null,
+            null,
+            name,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     ClassElement classElement = ElementFactory.classElement2(name);
     ConstructorElement element =
@@ -1032,13 +1019,17 @@
 
   VariableDeclaration _setupFieldDeclaration(
       String className, String fieldName, Keyword keyword,
-      {bool isInitialized: true, bool isStatic: false,
+      {bool isInitialized: true,
+      bool isStatic: false,
       bool hasConstConstructor: false}) {
     VariableDeclaration variableDeclaration = isInitialized
         ? AstFactory.variableDeclaration2(fieldName, AstFactory.integer(0))
         : AstFactory.variableDeclaration(fieldName);
-    VariableElement fieldElement = ElementFactory.fieldElement(fieldName,
-        isStatic, keyword == Keyword.FINAL, keyword == Keyword.CONST,
+    VariableElement fieldElement = ElementFactory.fieldElement(
+        fieldName,
+        isStatic,
+        keyword == Keyword.FINAL,
+        keyword == Keyword.CONST,
         _typeProvider.intType);
     variableDeclaration.name.staticElement = fieldElement;
     FieldDeclaration fieldDeclaration = AstFactory.fieldDeclaration2(
@@ -1052,9 +1043,13 @@
     classDeclaration.name.staticElement = classElement;
     if (hasConstConstructor) {
       ConstructorDeclaration constructorDeclaration = AstFactory
-          .constructorDeclaration2(Keyword.CONST, null,
-              AstFactory.identifier3(className), null,
-              AstFactory.formalParameterList(), null,
+          .constructorDeclaration2(
+              Keyword.CONST,
+              null,
+              AstFactory.identifier3(className),
+              null,
+              AstFactory.formalParameterList(),
+              null,
               AstFactory.blockFunctionBody2());
       classDeclaration.members.add(constructorDeclaration);
       ConstructorElement constructorElement =
@@ -1068,7 +1063,8 @@
   }
 
   VariableElement _setupVariableDeclaration(
-      String name, bool isConst, bool isInitialized, {isFinal: false}) {
+      String name, bool isConst, bool isInitialized,
+      {isFinal: false}) {
     VariableDeclaration variableDeclaration = isInitialized
         ? AstFactory.variableDeclaration2(name, AstFactory.integer(0))
         : AstFactory.variableDeclaration(name);
@@ -1302,12 +1298,16 @@
   }
 
   void test_computeValues_multipleSources() {
-    Source librarySource = addNamedSource("/lib.dart", r'''
+    Source librarySource = addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';
 const int c = b;
 const int a = 0;''');
-    Source partSource = addNamedSource("/part.dart", r'''
+    Source partSource = addNamedSource(
+        "/part.dart",
+        r'''
 part of lib;
 const int b = a;
 const int d = c;''');
@@ -1387,7 +1387,8 @@
 
   void test_dependencyOnConstructorArgument_unresolvedConstructor() {
     // "const A.a(x)" depends on x even if the constructor A.a can't be found.
-    _assertProperDependencies(r'''
+    _assertProperDependencies(
+        r'''
 class A {
 }
 const int x = 1;
@@ -1484,13 +1485,15 @@
     // Even though non-static consts are not allowed by the language, we need
     // to handle them for error recovery purposes.
     // a depends on A() depends on A.x
-    _assertProperDependencies('''
+    _assertProperDependencies(
+        '''
 class A {
   const A();
   const int x = 1;
 }
 const A a = const A();
-''', [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
+''',
+        [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
   }
 
   void test_dependencyOnNonFactoryRedirect() {
@@ -1530,11 +1533,13 @@
   void test_dependencyOnNonFactoryRedirect_toMissing() {
     // a depends on A.foo() which depends on nothing, since A.bar() is
     // missing.
-    _assertProperDependencies(r'''
+    _assertProperDependencies(
+        r'''
 const A a = const A.foo();
 class A {
   const A.foo() : this.bar();
-}''', [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
+}''',
+        [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
   }
 
   void test_dependencyOnNonFactoryRedirect_toNonConst() {
@@ -2147,7 +2152,8 @@
   }
 
   Map<String, DartObjectImpl> _assertFieldType(
-      Map<String, DartObjectImpl> fields, String fieldName,
+      Map<String, DartObjectImpl> fields,
+      String fieldName,
       String expectedType) {
     DartObjectImpl field = fields[fieldName];
     expect(field.type.displayName, expectedType);
@@ -2352,8 +2358,10 @@
   ConstantValueComputer _makeConstantValueComputer() {
     ConstantEvaluationValidator_ForTest validator =
         new ConstantEvaluationValidator_ForTest();
-    validator.computer = new ConstantValueComputer(analysisContext2,
-        analysisContext2.typeProvider, analysisContext2.declaredVariables,
+    validator.computer = new ConstantValueComputer(
+        analysisContext2,
+        analysisContext2.typeProvider,
+        analysisContext2.declaredVariables,
         validator);
     return validator.computer;
   }
@@ -2382,9 +2390,12 @@
     GatheringErrorListener errorListener = new GatheringErrorListener();
     ErrorReporter errorReporter =
         new ErrorReporter(errorListener, _dummySource());
-    _assertValue(0, expression.accept(new ConstantVisitor(
-        new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables()), errorReporter)));
+    _assertValue(
+        0,
+        expression.accept(new ConstantVisitor(
+            new ConstantEvaluationEngine(
+                new TestTypeProvider(), new DeclaredVariables()),
+            errorReporter)));
     errorListener.assertNoErrors();
   }
 
@@ -2399,7 +2410,8 @@
         new ErrorReporter(errorListener, _dummySource());
     DartObjectImpl result = expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables()), errorReporter));
+            new TestTypeProvider(), new DeclaredVariables()),
+        errorReporter));
     expect(result, isNull);
     errorListener
         .assertErrorsWithCodes([CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL]);
@@ -2415,7 +2427,8 @@
         new ErrorReporter(errorListener, _dummySource());
     DartObjectImpl result = expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables()), errorReporter));
+            new TestTypeProvider(), new DeclaredVariables()),
+        errorReporter));
     expect(result, isNull);
     errorListener
         .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
@@ -2431,7 +2444,8 @@
         new ErrorReporter(errorListener, _dummySource());
     DartObjectImpl result = expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables()), errorReporter));
+            new TestTypeProvider(), new DeclaredVariables()),
+        errorReporter));
     expect(result, isNull);
     errorListener
         .assertErrorsWithCodes([CompileTimeErrorCode.INVALID_CONSTANT]);
@@ -2445,9 +2459,12 @@
     GatheringErrorListener errorListener = new GatheringErrorListener();
     ErrorReporter errorReporter =
         new ErrorReporter(errorListener, _dummySource());
-    _assertValue(1, expression.accept(new ConstantVisitor(
-        new ConstantEvaluationEngine(
-            new TestTypeProvider(), new DeclaredVariables()), errorReporter)));
+    _assertValue(
+        1,
+        expression.accept(new ConstantVisitor(
+            new ConstantEvaluationEngine(
+                new TestTypeProvider(), new DeclaredVariables()),
+            errorReporter)));
     errorListener.assertNoErrors();
   }
 
@@ -2520,7 +2537,8 @@
     ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
     DartObjectImpl result = expression.accept(new ConstantVisitor(
         new ConstantEvaluationEngine(typeProvider, new DeclaredVariables()),
-        errorReporter, lexicalEnvironment: lexicalEnvironment));
+        errorReporter,
+        lexicalEnvironment: lexicalEnvironment));
     errorListener.assertNoErrors();
     return result;
   }
@@ -2641,6 +2659,7 @@
   void test_add_unknownString_unknownString() {
     _assertAdd(_stringValue(null), _stringValue(null), _stringValue(null));
   }
+
   void test_bitAnd_knownInt_knownInt() {
     _assertBitAnd(_intValue(2), _intValue(6), _intValue(3));
   }
@@ -2872,8 +2891,10 @@
   }
 
   void test_equals_list_false_differentSizes() {
-    expect(_listValue([_boolValue(true)]) ==
-        _listValue([_boolValue(true), _boolValue(false)]), isFalse);
+    expect(
+        _listValue([_boolValue(true)]) ==
+            _listValue([_boolValue(true), _boolValue(false)]),
+        isFalse);
   }
 
   void test_equals_list_false_sameSize() {
@@ -3898,8 +3919,11 @@
   }
 
   void test_shiftLeft_knownInt_tooLarge() {
-    _assertShiftLeft(_intValue(null), _intValue(6), new DartObjectImpl(
-        _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
+    _assertShiftLeft(
+        _intValue(null),
+        _intValue(6),
+        new DartObjectImpl(
+            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
   }
 
   void test_shiftLeft_knownInt_unknownInt() {
@@ -3927,8 +3951,11 @@
   }
 
   void test_shiftRight_knownInt_tooLarge() {
-    _assertShiftRight(_intValue(null), _intValue(48), new DartObjectImpl(
-        _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
+    _assertShiftRight(
+        _intValue(null),
+        _intValue(48),
+        new DartObjectImpl(
+            _typeProvider.intType, new IntState(LONG_MAX_VALUE)));
   }
 
   void test_shiftRight_knownInt_unknownInt() {
@@ -4919,7 +4946,8 @@
   DirectoryBasedDartSdk _createDartSdk() {
     JavaFile sdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory;
     expect(sdkDirectory, isNotNull,
-        reason: "No SDK configured; set the property 'com.google.dart.sdk' on the command line");
+        reason:
+            "No SDK configured; set the property 'com.google.dart.sdk' on the command line");
     return new DirectoryBasedDartSdk(sdkDirectory);
   }
 }
@@ -4946,6 +4974,7 @@
 @reflectiveTest
 class ElementBuilderTest extends EngineTestCase {
   void test_visitCatchClause() {
+    // } catch (e, s) {
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String exceptionParameterName = "e";
@@ -4953,11 +4982,13 @@
     CatchClause clause =
         AstFactory.catchClause2(exceptionParameterName, stackParameterName);
     clause.accept(builder);
+
     List<LocalVariableElement> variables = holder.localVariables;
     expect(variables, hasLength(2));
     VariableElement exceptionVariable = variables[0];
     expect(exceptionVariable, isNotNull);
     expect(exceptionVariable.name, exceptionParameterName);
+    expect(exceptionVariable.hasImplicitType, isTrue);
     expect(exceptionVariable.isSynthetic, isFalse);
     expect(exceptionVariable.isConst, isFalse);
     expect(exceptionVariable.isFinal, isFalse);
@@ -4971,6 +5002,23 @@
     expect(stackVariable.initializer, isNull);
   }
 
+  void test_visitCatchClause_withType() {
+    // } on E catch (e) {
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    String exceptionParameterName = "e";
+    CatchClause clause = AstFactory.catchClause4(
+        AstFactory.typeName4('E'), exceptionParameterName);
+    clause.accept(builder);
+
+    List<LocalVariableElement> variables = holder.localVariables;
+    expect(variables, hasLength(1));
+    VariableElement exceptionVariable = variables[0];
+    expect(exceptionVariable, isNotNull);
+    expect(exceptionVariable.name, exceptionParameterName);
+    expect(exceptionVariable.hasImplicitType, isFalse);
+  }
+
   void test_visitClassDeclaration_abstract() {
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
@@ -5015,10 +5063,13 @@
     String className = "C";
     String firstVariableName = "E";
     String secondVariableName = "F";
-    ClassDeclaration classDeclaration = AstFactory.classDeclaration(null,
+    ClassDeclaration classDeclaration = AstFactory.classDeclaration(
+        null,
         className,
         AstFactory.typeParameterList([firstVariableName, secondVariableName]),
-        null, null, null);
+        null,
+        null,
+        null);
     classDeclaration.accept(builder);
     List<ClassElement> types = holder.types;
     expect(types, hasLength(1));
@@ -5041,13 +5092,22 @@
     String typeParameterName = "E";
     String fieldName = "f";
     String methodName = "m";
-    ClassDeclaration classDeclaration = AstFactory.classDeclaration(null,
-        className, AstFactory.typeParameterList([typeParameterName]), null,
-        null, null, [
+    ClassDeclaration classDeclaration = AstFactory.classDeclaration(
+        null,
+        className,
+        AstFactory.typeParameterList([typeParameterName]),
+        null,
+        null,
+        null, [
       AstFactory.fieldDeclaration2(
           false, null, [AstFactory.variableDeclaration(fieldName)]),
-      AstFactory.methodDeclaration2(null, null, null, null,
-          AstFactory.identifier3(methodName), AstFactory.formalParameterList(),
+      AstFactory.methodDeclaration2(
+          null,
+          null,
+          null,
+          null,
+          AstFactory.identifier3(methodName),
+          AstFactory.formalParameterList(),
           AstFactory.blockFunctionBody2())
     ]);
     classDeclaration.accept(builder);
@@ -5144,9 +5204,13 @@
     ClassElementImpl classM = ElementFactory.classElement2('M', []);
     WithClause withClause =
         AstFactory.withClause([AstFactory.typeName(classM, [])]);
-    ClassTypeAlias classCAst = AstFactory.classTypeAlias('C',
-        AstFactory.typeParameterList(['T']), null,
-        AstFactory.typeName(classB, []), withClause, null);
+    ClassTypeAlias classCAst = AstFactory.classTypeAlias(
+        'C',
+        AstFactory.typeParameterList(['T']),
+        null,
+        AstFactory.typeName(classB, []),
+        withClause,
+        null);
     classCAst.accept(builder);
     List<ClassElement> types = holder.types;
     expect(types, hasLength(1));
@@ -5160,8 +5224,13 @@
     ElementBuilder builder = new ElementBuilder(holder);
     String className = "A";
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(null, null, AstFactory.identifier3(className),
-            null, AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3(className),
+            null,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     constructorDeclaration.externalKeyword =
         TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
@@ -5184,9 +5253,13 @@
     ElementBuilder builder = new ElementBuilder(holder);
     String className = "A";
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(null, Keyword.FACTORY,
-            AstFactory.identifier3(className), null,
-            AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            null,
+            Keyword.FACTORY,
+            AstFactory.identifier3(className),
+            null,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     constructorDeclaration.accept(builder);
     List<ConstructorElement> constructors = holder.constructors;
@@ -5207,8 +5280,13 @@
     ElementBuilder builder = new ElementBuilder(holder);
     String className = "A";
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(null, null, AstFactory.identifier3(className),
-            null, AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3(className),
+            null,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     constructorDeclaration.accept(builder);
     List<ConstructorElement> constructors = holder.constructors;
@@ -5230,8 +5308,13 @@
     String className = "A";
     String constructorName = "c";
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(null, null, AstFactory.identifier3(className),
-            constructorName, AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3(className),
+            constructorName,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     constructorDeclaration.accept(builder);
     List<ConstructorElement> constructors = holder.constructors;
@@ -5254,8 +5337,13 @@
     ElementBuilder builder = new ElementBuilder(holder);
     String className = "A";
     ConstructorDeclaration constructorDeclaration = AstFactory
-        .constructorDeclaration2(null, null, AstFactory.identifier3(className),
-            null, AstFactory.formalParameterList(), null,
+        .constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3(className),
+            null,
+            AstFactory.formalParameterList(),
+            null,
             AstFactory.blockFunctionBody2());
     constructorDeclaration.accept(builder);
     List<ConstructorElement> constructors = holder.constructors;
@@ -5272,6 +5360,110 @@
     expect(constructorDeclaration.element, same(constructor));
   }
 
+  void test_visitDeclaredIdentifier_noType() {
+    // var i
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    var variableName = 'i';
+    DeclaredIdentifier identifier =
+        AstFactory.declaredIdentifier3(variableName);
+    AstFactory.forEachStatement(
+        identifier, AstFactory.nullLiteral(), AstFactory.emptyStatement());
+    identifier.accept(builder);
+
+    List<LocalVariableElement> variables = holder.localVariables;
+    expect(variables, hasLength(1));
+    LocalVariableElement variable = variables[0];
+    expect(variable, isNotNull);
+    expect(variable.hasImplicitType, isTrue);
+    expect(variable.isConst, isFalse);
+    expect(variable.isDeprecated, isFalse);
+    expect(variable.isFinal, isFalse);
+    expect(variable.isOverride, isFalse);
+    expect(variable.isPrivate, isFalse);
+    expect(variable.isPublic, isTrue);
+    expect(variable.isSynthetic, isFalse);
+    expect(variable.name, variableName);
+  }
+
+  void test_visitDeclaredIdentifier_type() {
+    // E i
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    var variableName = 'i';
+    DeclaredIdentifier identifier =
+        AstFactory.declaredIdentifier4(AstFactory.typeName4('E'), variableName);
+    AstFactory.forEachStatement(
+        identifier, AstFactory.nullLiteral(), AstFactory.emptyStatement());
+    identifier.accept(builder);
+
+    List<LocalVariableElement> variables = holder.localVariables;
+    expect(variables, hasLength(1));
+    LocalVariableElement variable = variables[0];
+    expect(variable, isNotNull);
+    expect(variable.hasImplicitType, isFalse);
+    expect(variable.isConst, isFalse);
+    expect(variable.isDeprecated, isFalse);
+    expect(variable.isFinal, isFalse);
+    expect(variable.isOverride, isFalse);
+    expect(variable.isPrivate, isFalse);
+    expect(variable.isPublic, isTrue);
+    expect(variable.isSynthetic, isFalse);
+    expect(variable.name, variableName);
+  }
+
+  void test_visitDefaultFormalParameter_noType() {
+    // p = 0
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    String parameterName = 'p';
+    DefaultFormalParameter formalParameter = AstFactory
+        .positionalFormalParameter(
+            AstFactory.simpleFormalParameter3(parameterName),
+            AstFactory.integer(0));
+    formalParameter.accept(builder);
+
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElement parameter = parameters[0];
+    expect(parameter.hasImplicitType, isTrue);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isDeprecated, isFalse);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isInitializingFormal, isFalse);
+    expect(parameter.isOverride, isFalse);
+    expect(parameter.isPrivate, isFalse);
+    expect(parameter.isPublic, isTrue);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
+  }
+
+  void test_visitDefaultFormalParameter_type() {
+    // E p = 0
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    String parameterName = 'p';
+    DefaultFormalParameter formalParameter = AstFactory.namedFormalParameter(
+        AstFactory.simpleFormalParameter4(
+            AstFactory.typeName4('E'), parameterName),
+        AstFactory.integer(0));
+    formalParameter.accept(builder);
+
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElement parameter = parameters[0];
+    expect(parameter.hasImplicitType, isFalse);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isDeprecated, isFalse);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isInitializingFormal, isFalse);
+    expect(parameter.isOverride, isFalse);
+    expect(parameter.isPrivate, isFalse);
+    expect(parameter.isPublic, isTrue);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
+  }
+
   void test_visitEnumDeclaration() {
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
@@ -5291,8 +5483,8 @@
     ElementBuilder builder = new ElementBuilder(holder);
     String firstFieldName = "x";
     String secondFieldName = "y";
-    FieldDeclaration fieldDeclaration = AstFactory.fieldDeclaration2(false,
-        null, [
+    FieldDeclaration fieldDeclaration =
+        AstFactory.fieldDeclaration2(false, null, [
       AstFactory.variableDeclaration(firstFieldName),
       AstFactory.variableDeclaration(secondFieldName)
     ]);
@@ -5339,8 +5531,11 @@
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String parameterName = "p";
-    FieldFormalParameter formalParameter = AstFactory.fieldFormalParameter(null,
-        null, parameterName, AstFactory
+    FieldFormalParameter formalParameter = AstFactory.fieldFormalParameter(
+        null,
+        null,
+        parameterName,
+        AstFactory
             .formalParameterList([AstFactory.simpleFormalParameter3("a")]));
     formalParameter.accept(builder);
     List<ParameterElement> parameters = holder.parameters;
@@ -5373,15 +5568,20 @@
   }
 
   void test_visitFunctionDeclaration_external() {
+    // external f();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String functionName = "f";
-    FunctionDeclaration declaration = AstFactory.functionDeclaration(null, null,
-        functionName, AstFactory.functionExpression2(
-            AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    FunctionDeclaration declaration = AstFactory.functionDeclaration(
+        null,
+        null,
+        functionName,
+        AstFactory.functionExpression2(
+            AstFactory.formalParameterList(), AstFactory.emptyFunctionBody()));
     declaration.externalKeyword =
         TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     declaration.accept(builder);
+
     List<FunctionElement> functions = holder.functions;
     expect(functions, hasLength(1));
     FunctionElement function = functions[0];
@@ -5389,19 +5589,25 @@
     expect(function.name, functionName);
     expect(declaration.element, same(function));
     expect(declaration.functionExpression.element, same(function));
+    expect(function.hasImplicitReturnType, isTrue);
     expect(function.isExternal, isTrue);
     expect(function.isSynthetic, isFalse);
     expect(function.typeParameters, hasLength(0));
   }
 
   void test_visitFunctionDeclaration_getter() {
+    // get f() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String functionName = "f";
-    FunctionDeclaration declaration = AstFactory.functionDeclaration(null,
-        Keyword.GET, functionName, AstFactory.functionExpression2(
+    FunctionDeclaration declaration = AstFactory.functionDeclaration(
+        null,
+        Keyword.GET,
+        functionName,
+        AstFactory.functionExpression2(
             AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
     declaration.accept(builder);
+
     List<PropertyAccessorElement> accessors = holder.accessors;
     expect(accessors, hasLength(1));
     PropertyAccessorElement accessor = accessors[0];
@@ -5409,6 +5615,7 @@
     expect(accessor.name, functionName);
     expect(declaration.element, same(accessor));
     expect(declaration.functionExpression.element, same(accessor));
+    expect(accessor.hasImplicitReturnType, isTrue);
     expect(accessor.isGetter, isTrue);
     expect(accessor.isExternal, isFalse);
     expect(accessor.isSetter, isFalse);
@@ -5421,17 +5628,23 @@
   }
 
   void test_visitFunctionDeclaration_plain() {
+    // T f() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String functionName = "f";
-    FunctionDeclaration declaration = AstFactory.functionDeclaration(null, null,
-        functionName, AstFactory.functionExpression2(
+    FunctionDeclaration declaration = AstFactory.functionDeclaration(
+        AstFactory.typeName4('T'),
+        null,
+        functionName,
+        AstFactory.functionExpression2(
             AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
     declaration.accept(builder);
+
     List<FunctionElement> functions = holder.functions;
     expect(functions, hasLength(1));
     FunctionElement function = functions[0];
     expect(function, isNotNull);
+    expect(function.hasImplicitReturnType, isFalse);
     expect(function.name, functionName);
     expect(declaration.element, same(function));
     expect(declaration.functionExpression.element, same(function));
@@ -5441,17 +5654,23 @@
   }
 
   void test_visitFunctionDeclaration_setter() {
+    // set f() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String functionName = "f";
-    FunctionDeclaration declaration = AstFactory.functionDeclaration(null,
-        Keyword.SET, functionName, AstFactory.functionExpression2(
+    FunctionDeclaration declaration = AstFactory.functionDeclaration(
+        null,
+        Keyword.SET,
+        functionName,
+        AstFactory.functionExpression2(
             AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
     declaration.accept(builder);
+
     List<PropertyAccessorElement> accessors = holder.accessors;
     expect(accessors, hasLength(1));
     PropertyAccessorElement accessor = accessors[0];
     expect(accessor, isNotNull);
+    expect(accessor.hasImplicitReturnType, isFalse);
     expect(accessor.name, "$functionName=");
     expect(declaration.element, same(accessor));
     expect(declaration.functionExpression.element, same(accessor));
@@ -5467,20 +5686,24 @@
   }
 
   void test_visitFunctionDeclaration_typeParameters() {
+    // f<E>() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String functionName = 'f';
     String typeParameterName = 'E';
     FunctionExpression expression = AstFactory.functionExpression3(
         AstFactory.typeParameterList([typeParameterName]),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     FunctionDeclaration declaration =
         AstFactory.functionDeclaration(null, null, functionName, expression);
     declaration.accept(builder);
+
     List<FunctionElement> functions = holder.functions;
     expect(functions, hasLength(1));
     FunctionElement function = functions[0];
     expect(function, isNotNull);
+    expect(function.hasImplicitReturnType, isTrue);
     expect(function.name, functionName);
     expect(function.isExternal, isFalse);
     expect(function.isSynthetic, isFalse);
@@ -5504,6 +5727,7 @@
     FunctionElement function = functions[0];
     expect(function, isNotNull);
     expect(expression.element, same(function));
+    expect(function.hasImplicitReturnType, isTrue);
     expect(function.isSynthetic, isFalse);
     expect(function.typeParameters, hasLength(0));
   }
@@ -5593,17 +5817,25 @@
   }
 
   void test_visitMethodDeclaration_abstract() {
+    // m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.emptyFunctionBody());
     methodDeclaration.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5617,19 +5849,27 @@
   }
 
   void test_visitMethodDeclaration_external() {
+    // external m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.emptyFunctionBody());
     methodDeclaration.externalKeyword =
         TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     methodDeclaration.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5643,13 +5883,20 @@
   }
 
   void test_visitMethodDeclaration_getter() {
+    // get m() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, Keyword.GET, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        Keyword.GET,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5659,6 +5906,7 @@
     expect(field.setter, isNull);
     PropertyAccessorElement getter = field.getter;
     expect(getter, isNotNull);
+    expect(getter.hasImplicitReturnType, isTrue);
     expect(getter.isAbstract, isFalse);
     expect(getter.isExternal, isFalse);
     expect(getter.isGetter, isTrue);
@@ -5672,13 +5920,20 @@
   }
 
   void test_visitMethodDeclaration_getter_abstract() {
+    // get m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, Keyword.GET, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        Keyword.GET,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.emptyFunctionBody());
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5688,6 +5943,7 @@
     expect(field.setter, isNull);
     PropertyAccessorElement getter = field.getter;
     expect(getter, isNotNull);
+    expect(getter.hasImplicitReturnType, isTrue);
     expect(getter.isAbstract, isTrue);
     expect(getter.isExternal, isFalse);
     expect(getter.isGetter, isTrue);
@@ -5701,15 +5957,21 @@
   }
 
   void test_visitMethodDeclaration_getter_external() {
+    // external get m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration(null,
-        null, Keyword.GET, null, AstFactory.identifier3(methodName),
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration(
+        null,
+        null,
+        Keyword.GET,
+        null,
+        AstFactory.identifier3(methodName),
         AstFactory.formalParameterList());
     methodDeclaration.externalKeyword =
         TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5719,6 +5981,7 @@
     expect(field.setter, isNull);
     PropertyAccessorElement getter = field.getter;
     expect(getter, isNotNull);
+    expect(getter.hasImplicitReturnType, isTrue);
     expect(getter.isAbstract, isFalse);
     expect(getter.isExternal, isTrue);
     expect(getter.isGetter, isTrue);
@@ -5732,17 +5995,24 @@
   }
 
   void test_visitMethodDeclaration_minimal() {
+    // T m() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4('T'),
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     methodDeclaration.accept(builder);
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isFalse);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5756,19 +6026,26 @@
   }
 
   void test_visitMethodDeclaration_operator() {
+    // operator +(addend) {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "+";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, Keyword.OPERATOR, AstFactory.identifier3(methodName),
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        Keyword.OPERATOR,
+        AstFactory.identifier3(methodName),
         AstFactory
             .formalParameterList([AstFactory.simpleFormalParameter3("addend")]),
         AstFactory.blockFunctionBody2());
     methodDeclaration.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5782,13 +6059,20 @@
   }
 
   void test_visitMethodDeclaration_setter() {
+    // set m() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, Keyword.SET, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        Keyword.SET,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5798,6 +6082,7 @@
     expect(field.getter, isNull);
     PropertyAccessorElement setter = field.setter;
     expect(setter, isNotNull);
+    expect(setter.hasImplicitReturnType, isFalse);
     expect(setter.isAbstract, isFalse);
     expect(setter.isExternal, isFalse);
     expect(setter.isSetter, isTrue);
@@ -5812,13 +6097,20 @@
   }
 
   void test_visitMethodDeclaration_setter_abstract() {
+    // set m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, Keyword.SET, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.emptyFunctionBody());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        Keyword.SET,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.emptyFunctionBody());
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5828,6 +6120,7 @@
     expect(field.getter, isNull);
     PropertyAccessorElement setter = field.setter;
     expect(setter, isNotNull);
+    expect(setter.hasImplicitReturnType, isFalse);
     expect(setter.isAbstract, isTrue);
     expect(setter.isExternal, isFalse);
     expect(setter.isSetter, isTrue);
@@ -5842,15 +6135,21 @@
   }
 
   void test_visitMethodDeclaration_setter_external() {
+    // external m();
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration(null,
-        null, Keyword.SET, null, AstFactory.identifier3(methodName),
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration(
+        null,
+        null,
+        Keyword.SET,
+        null,
+        AstFactory.identifier3(methodName),
         AstFactory.formalParameterList());
     methodDeclaration.externalKeyword =
         TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     methodDeclaration.accept(builder);
+
     List<FieldElement> fields = holder.fields;
     expect(fields, hasLength(1));
     FieldElement field = fields[0];
@@ -5860,6 +6159,7 @@
     expect(field.getter, isNull);
     PropertyAccessorElement setter = field.setter;
     expect(setter, isNotNull);
+    expect(setter.hasImplicitReturnType, isFalse);
     expect(setter.isAbstract, isFalse);
     expect(setter.isExternal, isTrue);
     expect(setter.isSetter, isTrue);
@@ -5874,17 +6174,24 @@
   }
 
   void test_visitMethodDeclaration_static() {
+    // static m() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
     MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
-        Keyword.STATIC, null, null, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+        Keyword.STATIC,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     methodDeclaration.accept(builder);
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5898,18 +6205,26 @@
   }
 
   void test_visitMethodDeclaration_typeParameters() {
+    // m<E>() {}
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3(methodName),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     methodDeclaration.typeParameters = AstFactory.typeParameterList(['E']);
     methodDeclaration.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.functions, hasLength(0));
     expect(method.labels, hasLength(0));
@@ -5923,6 +6238,7 @@
   }
 
   void test_visitMethodDeclaration_withMembers() {
+    // m(p) { var v; try { l: return; } catch (e) {} }
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String methodName = "m";
@@ -5930,23 +6246,31 @@
     String localVariableName = "v";
     String labelName = "l";
     String exceptionParameterName = "e";
-    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3(methodName), AstFactory
-            .formalParameterList(
-                [AstFactory.simpleFormalParameter3(parameterName)]), AstFactory
-            .blockFunctionBody2([
-      AstFactory.variableDeclarationStatement2(
-          Keyword.VAR, [AstFactory.variableDeclaration(localVariableName)]),
-      AstFactory.tryStatement2(AstFactory.block([
-        AstFactory.labeledStatement(
-            [AstFactory.label2(labelName)], AstFactory.returnStatement())
-      ]), [AstFactory.catchClause(exceptionParameterName)])
-    ]));
+    MethodDeclaration methodDeclaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
+        AstFactory.formalParameterList(
+            [AstFactory.simpleFormalParameter3(parameterName)]),
+        AstFactory.blockFunctionBody2([
+          AstFactory.variableDeclarationStatement2(
+              Keyword.VAR, [AstFactory.variableDeclaration(localVariableName)]),
+          AstFactory.tryStatement2(
+              AstFactory.block([
+                AstFactory.labeledStatement([AstFactory.label2(labelName)],
+                    AstFactory.returnStatement())
+              ]),
+              [AstFactory.catchClause(exceptionParameterName)])
+        ]));
     methodDeclaration.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     MethodElement method = methods[0];
     expect(method, isNotNull);
+    expect(method.hasImplicitReturnType, isTrue);
     expect(method.name, methodName);
     expect(method.typeParameters, hasLength(0));
     expect(method.isAbstract, isFalse);
@@ -5964,10 +6288,12 @@
     VariableElement secondVariable = localVariables[1];
     expect(firstVariable, isNotNull);
     expect(secondVariable, isNotNull);
-    expect((firstVariable.name == localVariableName &&
-            secondVariable.name == exceptionParameterName) ||
-        (firstVariable.name == exceptionParameterName &&
-            secondVariable.name == localVariableName), isTrue);
+    expect(
+        (firstVariable.name == localVariableName &&
+                secondVariable.name == exceptionParameterName) ||
+            (firstVariable.name == exceptionParameterName &&
+                secondVariable.name == localVariableName),
+        isTrue);
     List<LabelElement> labels = method.labels;
     expect(labels, hasLength(1));
     LabelElement label = labels[0];
@@ -6004,7 +6330,8 @@
     expect(initializer.isSynthetic, isTrue);
   }
 
-  void test_visitSimpleFormalParameter() {
+  void test_visitSimpleFormalParameter_noType() {
+    // p
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String parameterName = "p";
@@ -6016,11 +6343,39 @@
     expect(parameters, hasLength(1));
     ParameterElement parameter = parameters[0];
     expect(parameter, isNotNull);
-    expect(parameter.name, parameterName);
+    expect(parameter.hasImplicitType, isTrue);
     expect(parameter.initializer, isNull);
     expect(parameter.isConst, isFalse);
     expect(parameter.isFinal, isFalse);
     expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
+    expect(parameter.parameterKind, ParameterKind.REQUIRED);
+    {
+      SourceRange visibleRange = parameter.visibleRange;
+      expect(100, visibleRange.offset);
+      expect(110, visibleRange.end);
+    }
+  }
+
+  void test_visitSimpleFormalParameter_type() {
+    // T p
+    ElementHolder holder = new ElementHolder();
+    ElementBuilder builder = new ElementBuilder(holder);
+    String parameterName = "p";
+    SimpleFormalParameter formalParameter = AstFactory.simpleFormalParameter4(
+        AstFactory.typeName4('T'), parameterName);
+    _useParameterInMethod(formalParameter, 100, 110);
+    formalParameter.accept(builder);
+    List<ParameterElement> parameters = holder.parameters;
+    expect(parameters, hasLength(1));
+    ParameterElement parameter = parameters[0];
+    expect(parameter, isNotNull);
+    expect(parameter.hasImplicitType, isFalse);
+    expect(parameter.initializer, isNull);
+    expect(parameter.isConst, isFalse);
+    expect(parameter.isFinal, isFalse);
+    expect(parameter.isSynthetic, isFalse);
+    expect(parameter.name, parameterName);
     expect(parameter.parameterKind, ParameterKind.REQUIRED);
     {
       SourceRange visibleRange = parameter.visibleRange;
@@ -6050,11 +6405,14 @@
     String aliasName = "F";
     String firstParameterName = "x";
     String secondParameterName = "y";
-    TypeAlias typeAlias = AstFactory.typeAlias(null, aliasName,
-        AstFactory.typeParameterList(), AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3(firstParameterName),
-      AstFactory.simpleFormalParameter3(secondParameterName)
-    ]));
+    TypeAlias typeAlias = AstFactory.typeAlias(
+        null,
+        aliasName,
+        AstFactory.typeParameterList(),
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3(firstParameterName),
+          AstFactory.simpleFormalParameter3(secondParameterName)
+        ]));
     typeAlias.accept(builder);
     List<FunctionTypeAliasElement> aliases = holder.typeAliases;
     expect(aliases, hasLength(1));
@@ -6078,9 +6436,11 @@
     String aliasName = "F";
     String firstTypeParameterName = "A";
     String secondTypeParameterName = "B";
-    TypeAlias typeAlias = AstFactory.typeAlias(null, aliasName, AstFactory
-            .typeParameterList(
-                [firstTypeParameterName, secondTypeParameterName]),
+    TypeAlias typeAlias = AstFactory.typeAlias(
+        null,
+        aliasName,
+        AstFactory.typeParameterList(
+            [firstTypeParameterName, secondTypeParameterName]),
         AstFactory.formalParameterList());
     typeAlias.accept(builder);
     List<FunctionTypeAliasElement> aliases = holder.typeAliases;
@@ -6126,16 +6486,22 @@
     Statement statement =
         AstFactory.variableDeclarationStatement2(null, [variable]);
     ConstructorDeclaration constructor = AstFactory.constructorDeclaration2(
-        null, null, AstFactory.identifier3("C"), "C",
-        AstFactory.formalParameterList(), null,
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        "C",
+        AstFactory.formalParameterList(),
+        null,
         AstFactory.blockFunctionBody2([statement]));
     constructor.accept(builder);
+
     List<ConstructorElement> constructors = holder.constructors;
     expect(constructors, hasLength(1));
     List<LocalVariableElement> variableElements =
         constructors[0].localVariables;
     expect(variableElements, hasLength(1));
     LocalVariableElement variableElement = variableElements[0];
+    expect(variableElement.hasImplicitType, isTrue);
     expect(variableElement.name, variableName);
   }
 
@@ -6143,31 +6509,37 @@
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     //
-    // m() {var v;}
+    // m() {T v;}
     //
     String variableName = "v";
     VariableDeclaration variable =
         AstFactory.variableDeclaration2(variableName, null);
-    Statement statement =
-        AstFactory.variableDeclarationStatement2(null, [variable]);
-    MethodDeclaration constructor = AstFactory.methodDeclaration2(null, null,
-        null, null, AstFactory.identifier3("m"),
+    Statement statement = AstFactory.variableDeclarationStatement(
+        null, AstFactory.typeName4('T'), [variable]);
+    MethodDeclaration method = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
         AstFactory.formalParameterList(),
         AstFactory.blockFunctionBody2([statement]));
-    constructor.accept(builder);
+    method.accept(builder);
+
     List<MethodElement> methods = holder.methods;
     expect(methods, hasLength(1));
     List<LocalVariableElement> variableElements = methods[0].localVariables;
     expect(variableElements, hasLength(1));
     LocalVariableElement variableElement = variableElements[0];
+    expect(variableElement.hasImplicitType, isFalse);
     expect(variableElement.name, variableName);
   }
 
-  void test_visitVariableDeclaration_localNestedInField() {
+  void test_visitVariableDeclaration_localNestedInFunction() {
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     //
-    // var f = () {var v;}
+    // var f = () {var v;};
     //
     String variableName = "v";
     VariableDeclaration variable =
@@ -6183,6 +6555,7 @@
     FieldDeclaration fieldDeclaration =
         AstFactory.fieldDeclaration2(false, null, [field]);
     fieldDeclaration.accept(builder);
+
     List<FieldElement> variables = holder.fields;
     expect(variables, hasLength(1));
     FieldElement fieldElement = variables[0];
@@ -6195,13 +6568,15 @@
         functionElements[0].localVariables;
     expect(variableElements, hasLength(1));
     LocalVariableElement variableElement = variableElements[0];
-    expect(variableElement.name, variableName);
+    expect(variableElement.hasImplicitType, isTrue);
     expect(variableElement.isConst, isFalse);
     expect(variableElement.isFinal, isFalse);
     expect(variableElement.isSynthetic, isFalse);
+    expect(variableElement.name, variableName);
   }
 
   void test_visitVariableDeclaration_noInitializer() {
+    // var v;
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String variableName = "v";
@@ -6209,10 +6584,12 @@
         AstFactory.variableDeclaration2(variableName, null);
     AstFactory.variableDeclarationList2(null, [variableDeclaration]);
     variableDeclaration.accept(builder);
+
     List<TopLevelVariableElement> variables = holder.topLevelVariables;
     expect(variables, hasLength(1));
     TopLevelVariableElement variable = variables[0];
     expect(variable, isNotNull);
+    expect(variable.hasImplicitType, isTrue);
     expect(variable.initializer, isNull);
     expect(variable.name, variableName);
     expect(variable.isConst, isFalse);
@@ -6223,6 +6600,7 @@
   }
 
   void test_visitVariableDeclaration_top_const_hasInitializer() {
+    // const v = 42;
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String variableName = "v";
@@ -6230,12 +6608,14 @@
         AstFactory.variableDeclaration2(variableName, AstFactory.integer(42));
     AstFactory.variableDeclarationList2(Keyword.CONST, [variableDeclaration]);
     variableDeclaration.accept(builder);
+
     List<TopLevelVariableElement> variables = holder.topLevelVariables;
     expect(variables, hasLength(1));
     TopLevelVariableElement variable = variables[0];
     expect(variable, new isInstanceOf<ConstTopLevelVariableElementImpl>());
     expect(variable.initializer, isNotNull);
     expect(variable.name, variableName);
+    expect(variable.hasImplicitType, isTrue);
     expect(variable.isConst, isTrue);
     expect(variable.isFinal, isFalse);
     expect(variable.isSynthetic, isFalse);
@@ -6244,6 +6624,7 @@
   }
 
   void test_visitVariableDeclaration_top_final() {
+    // final v;
     ElementHolder holder = new ElementHolder();
     ElementBuilder builder = new ElementBuilder(holder);
     String variableName = "v";
@@ -6255,6 +6636,7 @@
     expect(variables, hasLength(1));
     TopLevelVariableElement variable = variables[0];
     expect(variable, isNotNull);
+    expect(variable.hasImplicitType, isTrue);
     expect(variable.initializer, isNull);
     expect(variable.name, variableName);
     expect(variable.isConst, isFalse);
@@ -6270,9 +6652,14 @@
     block.leftBracket.offset = blockOffset;
     block.rightBracket.offset = blockEnd - 1;
     BlockFunctionBody body = AstFactory.blockFunctionBody(block);
-    AstFactory.methodDeclaration2(null, null, null, null,
+    AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
         AstFactory.identifier3("main"),
-        AstFactory.formalParameterList([formalParameter]), body);
+        AstFactory.formalParameterList([formalParameter]),
+        body);
   }
 }
 
@@ -6308,7 +6695,9 @@
   }
 
   void test_locate_AssignmentExpression() {
-    AstNode id = _findNodeIn("+=", r'''
+    AstNode id = _findNodeIn(
+        "+=",
+        r'''
 int x = 0;
 void main() {
   x += 1;
@@ -6340,7 +6729,10 @@
   }
 
   void test_locate_ConstructorDeclaration() {
-    AstNode id = _findNodeIndexedIn("bar", 0, r'''
+    AstNode id = _findNodeIndexedIn(
+        "bar",
+        0,
+        r'''
 class A {
   A.bar() {}
 }''');
@@ -6361,7 +6753,10 @@
   }
 
   void test_locate_Identifier_annotationClass_namedConstructor_forSimpleFormalParameter() {
-    AstNode id = _findNodeIndexedIn("Class", 2, r'''
+    AstNode id = _findNodeIndexedIn(
+        "Class",
+        2,
+        r'''
 class Class {
   const Class.name();
 }
@@ -6373,7 +6768,10 @@
   }
 
   void test_locate_Identifier_annotationClass_unnamedConstructor_forSimpleFormalParameter() {
-    AstNode id = _findNodeIndexedIn("Class", 2, r'''
+    AstNode id = _findNodeIndexedIn(
+        "Class",
+        2,
+        r'''
 class Class {
   const Class();
 }
@@ -6392,7 +6790,10 @@
   }
 
   void test_locate_Identifier_constructor_named() {
-    AstNode id = _findNodeIndexedIn("bar", 0, r'''
+    AstNode id = _findNodeIndexedIn(
+        "bar",
+        0,
+        r'''
 class A {
   A.bar() {}
 }''');
@@ -6402,7 +6803,10 @@
   }
 
   void test_locate_Identifier_constructor_unnamed() {
-    AstNode id = _findNodeIndexedIn("A", 1, r'''
+    AstNode id = _findNodeIndexedIn(
+        "A",
+        1,
+        r'''
 class A {
   A() {}
 }''');
@@ -6419,7 +6823,9 @@
   }
 
   void test_locate_Identifier_propertAccess() {
-    AstNode id = _findNodeIn("length", r'''
+    AstNode id = _findNodeIn(
+        "length",
+        r'''
 void main() {
  int x = 'foo'.length;
 }''');
@@ -6436,7 +6842,10 @@
   }
 
   void test_locate_IndexExpression() {
-    AstNode id = _findNodeIndexedIn("\\[", 1, r'''
+    AstNode id = _findNodeIndexedIn(
+        "\\[",
+        1,
+        r'''
 void main() {
   List x = [1, 2];
   var y = x[0];
@@ -6447,7 +6856,10 @@
   }
 
   void test_locate_InstanceCreationExpression() {
-    AstNode node = _findNodeIndexedIn("A(", 0, r'''
+    AstNode node = _findNodeIndexedIn(
+        "A(",
+        0,
+        r'''
 class A {}
 void main() {
  new A();
@@ -6503,7 +6915,9 @@
   }
 
   void test_locate_MethodDeclaration() {
-    AstNode id = _findNodeIn("m", r'''
+    AstNode id = _findNodeIn(
+        "m",
+        r'''
 class A {
   void m() {}
 }''');
@@ -6515,7 +6929,10 @@
   }
 
   void test_locate_MethodInvocation_method() {
-    AstNode id = _findNodeIndexedIn("bar", 1, r'''
+    AstNode id = _findNodeIndexedIn(
+        "bar",
+        1,
+        r'''
 class A {
   int bar() => 42;
 }
@@ -6551,7 +6968,9 @@
   }
 
   void test_locate_PrefixedIdentifier() {
-    AstNode id = _findNodeIn("int", r'''
+    AstNode id = _findNodeIn(
+        "int",
+        r'''
 import 'dart:core' as core;
 core.int value;''');
     PrefixedIdentifier identifier =
@@ -6800,7 +7219,8 @@
     ErrorReporter reporter = new ErrorReporter(listener, element.source);
     reporter.reportErrorForElement(
         StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
-        element, ['A']);
+        element,
+        ['A']);
     AnalysisError error = listener.errors[0];
     expect(error.offset, element.nameOffset);
   }
@@ -6809,11 +7229,14 @@
     ImportElementImpl element =
         ElementFactory.importFor(ElementFactory.library(null, ''), null);
     GatheringErrorListener listener = new GatheringErrorListener();
-    ErrorReporter reporter = new ErrorReporter(listener, new NonExistingSource(
-        '/test.dart', toUri('/test.dart'), UriKind.FILE_URI));
+    ErrorReporter reporter = new ErrorReporter(
+        listener,
+        new NonExistingSource(
+            '/test.dart', toUri('/test.dart'), UriKind.FILE_URI));
     reporter.reportErrorForElement(
         StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER,
-        element, ['A']);
+        element,
+        ['A']);
     AnalysisError error = listener.errors[0];
     expect(error.offset, element.nameOffset);
   }
@@ -6826,7 +7249,8 @@
         new ErrorReporter(listener, firstType.element.source);
     reporter.reportTypeErrorForNode(
         StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-        AstFactory.identifier3("x"), [firstType, secondType]);
+        AstFactory.identifier3("x"),
+        [firstType, secondType]);
     AnalysisError error = listener.errors[0];
     expect(error.message.indexOf("(") < 0, isTrue);
   }
@@ -6840,7 +7264,8 @@
         new ErrorReporter(listener, firstType.element.source);
     reporter.reportTypeErrorForNode(
         StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-        AstFactory.identifier3("x"), [firstType, secondType]);
+        AstFactory.identifier3("x"),
+        [firstType, secondType]);
     AnalysisError error = listener.errors[0];
     expect(error.message.indexOf("(") >= 0, isTrue);
   }
@@ -7766,6 +8191,18 @@
         resolver.resolveAbsolute(parseUriWithException("dart:core"));
     expect(result, isNull);
   }
+
+  void test_restore() {
+    UriResolver resolver = new FileUriResolver();
+    Uri uri = parseUriWithException('file:///foo/bar.dart');
+    Source source = resolver.resolveAbsolute(uri);
+    expect(source, isNotNull);
+    expect(resolver.restoreAbsolute(source), uri);
+    expect(
+        resolver.restoreAbsolute(
+            new NonExistingSource(source.fullName, null, null)),
+        uri);
+  }
 }
 
 @reflectiveTest
@@ -7791,11 +8228,13 @@
 </html>""");
     _validate(htmlUnit, [
       _t4("html", [
-        _t4("body",
-            [_t("script", _a(["type", "'application/dart'"]), scriptBody)])
+        _t4("body", [
+          _t("script", _a(["type", "'application/dart'"]), scriptBody)
+        ])
       ])
     ]);
   }
+
   ht.HtmlUnit parse(String contents) {
 //    TestSource source =
 //        new TestSource.con1(FileUtilities2.createFile("/test.dart"), contents);
@@ -7810,74 +8249,108 @@
     errorListener.assertNoErrors();
     return unit;
   }
+
   void test_parse_attribute() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsdf\"></body></html>");
-    _validate(
-        htmlUnit, [_t4("html", [_t("body", _a(["foo", "\"sdfsdf\""]), "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t("body", _a(["foo", "\"sdfsdf\""]), "")
+      ])
+    ]);
     ht.XmlTagNode htmlNode = htmlUnit.tagNodes[0];
     ht.XmlTagNode bodyNode = htmlNode.tagNodes[0];
     expect(bodyNode.attributes[0].text, "sdfsdf");
   }
+
   void test_parse_attribute_EOF() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsdf\"");
-    _validate(
-        htmlUnit, [_t4("html", [_t("body", _a(["foo", "\"sdfsdf\""]), "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t("body", _a(["foo", "\"sdfsdf\""]), "")
+      ])
+    ]);
   }
+
   void test_parse_attribute_EOF_missing_quote() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsd");
-    _validate(
-        htmlUnit, [_t4("html", [_t("body", _a(["foo", "\"sdfsd"]), "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t("body", _a(["foo", "\"sdfsd"]), "")
+      ])
+    ]);
     ht.XmlTagNode htmlNode = htmlUnit.tagNodes[0];
     ht.XmlTagNode bodyNode = htmlNode.tagNodes[0];
     expect(bodyNode.attributes[0].text, "sdfsd");
   }
+
   void test_parse_attribute_extra_quote() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsdf\"\"></body></html>");
-    _validate(
-        htmlUnit, [_t4("html", [_t("body", _a(["foo", "\"sdfsdf\""]), "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t("body", _a(["foo", "\"sdfsdf\""]), "")
+      ])
+    ]);
   }
+
   void test_parse_attribute_single_quote() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo='sdfsdf'></body></html>");
-    _validate(
-        htmlUnit, [_t4("html", [_t("body", _a(["foo", "'sdfsdf'"]), "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t("body", _a(["foo", "'sdfsdf'"]), "")
+      ])
+    ]);
     ht.XmlTagNode htmlNode = htmlUnit.tagNodes[0];
     ht.XmlTagNode bodyNode = htmlNode.tagNodes[0];
     expect(bodyNode.attributes[0].text, "sdfsdf");
   }
+
   void test_parse_comment_embedded() {
     ht.HtmlUnit htmlUnit = parse("<html <!-- comment -->></html>");
     _validate(htmlUnit, [_t3("html", "")]);
   }
+
   void test_parse_comment_first() {
     ht.HtmlUnit htmlUnit = parse("<!-- comment --><html></html>");
     _validate(htmlUnit, [_t3("html", "")]);
   }
+
   void test_parse_comment_in_content() {
     ht.HtmlUnit htmlUnit = parse("<html><!-- comment --></html>");
     _validate(htmlUnit, [_t3("html", "<!-- comment -->")]);
   }
+
   void test_parse_content() {
     ht.HtmlUnit htmlUnit = parse("<html>\n<p a=\"b\">blat \n </p>\n</html>");
     // ht.XmlTagNode.getContent() does not include whitespace
     // between '<' and '>' at this time
     _validate(htmlUnit, [
-      _t3("html", "\n<pa=\"b\">blat \n </p>\n",
-          [_t("p", _a(["a", "\"b\""]), "blat \n ")])
+      _t3("html", "\n<pa=\"b\">blat \n </p>\n", [
+        _t("p", _a(["a", "\"b\""]), "blat \n ")
+      ])
     ]);
   }
+
   void test_parse_content_none() {
     ht.HtmlUnit htmlUnit = parse("<html><p/>blat<p/></html>");
-    _validate(
-        htmlUnit, [_t3("html", "<p/>blat<p/>", [_t3("p", ""), _t3("p", "")])]);
+    _validate(htmlUnit, [
+      _t3("html", "<p/>blat<p/>", [_t3("p", ""), _t3("p", "")])
+    ]);
   }
+
   void test_parse_declaration() {
     ht.HtmlUnit htmlUnit = parse("<!DOCTYPE html>\n\n<html><p></p></html>");
-    _validate(htmlUnit, [_t4("html", [_t3("p", "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [_t3("p", "")])
+    ]);
   }
+
   void test_parse_directive() {
     ht.HtmlUnit htmlUnit = parse("<?xml ?>\n\n<html><p></p></html>");
-    _validate(htmlUnit, [_t4("html", [_t3("p", "")])]);
+    _validate(htmlUnit, [
+      _t4("html", [_t3("p", "")])
+    ]);
   }
+
   void test_parse_getAttribute() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsdf\"></body></html>");
     ht.XmlTagNode htmlNode = htmlUnit.tagNodes[0];
@@ -7886,6 +8359,7 @@
     expect(bodyNode.getAttribute("bar"), null);
     expect(bodyNode.getAttribute(null), null);
   }
+
   void test_parse_getAttributeText() {
     ht.HtmlUnit htmlUnit = parse("<html><body foo=\"sdfsdf\"></body></html>");
     ht.XmlTagNode htmlNode = htmlUnit.tagNodes[0];
@@ -7894,6 +8368,7 @@
     expect(bodyNode.getAttributeText("bar"), null);
     expect(bodyNode.getAttributeText(null), null);
   }
+
   void test_parse_headers() {
     String code = r'''
 <html>
@@ -7905,22 +8380,33 @@
   </body>
 </html>''';
     ht.HtmlUnit htmlUnit = parse(code);
-    _validate(
-        htmlUnit, [_t4("html", [_t4("body", [_t3("h2", "000"), _t4("div")])])]);
+    _validate(htmlUnit, [
+      _t4("html", [
+        _t4("body", [_t3("h2", "000"), _t4("div")])
+      ])
+    ]);
   }
+
   void test_parse_script() {
     ht.HtmlUnit htmlUnit =
         parse("<html><script >here is <p> some</script></html>");
-    _validate(htmlUnit, [_t4("html", [_t3("script", "here is <p> some")])]);
+    _validate(htmlUnit, [
+      _t4("html", [_t3("script", "here is <p> some")])
+    ]);
   }
+
   void test_parse_self_closing() {
     ht.HtmlUnit htmlUnit = parse("<html>foo<br>bar</html>");
-    _validate(htmlUnit, [_t3("html", "foo<br>bar", [_t3("br", "")])]);
+    _validate(htmlUnit, [
+      _t3("html", "foo<br>bar", [_t3("br", "")])
+    ]);
   }
+
   void test_parse_self_closing_declaration() {
     ht.HtmlUnit htmlUnit = parse("<!DOCTYPE html><html>foo</html>");
     _validate(htmlUnit, [_t3("html", "foo")]);
   }
+
   XmlValidator_Attributes _a(List<String> keyValuePairs) =>
       new XmlValidator_Attributes(keyValuePairs);
   XmlValidator_Tag _t(
@@ -7972,18 +8458,23 @@
   void setUp() {
     _context = AnalysisContextFactory.contextWithCore();
   }
+
   @override
   void tearDown() {
     _context = null;
     super.tearDown();
   }
+
   void test_embedded_script() {
     HtmlElementImpl element = _build(r'''
 <html>
 <script type="application/dart">foo=2;</script>
 </html>''');
-    _validate(element, [_s(_l([_v("foo")]))]);
+    _validate(element, [
+      _s(_l([_v("foo")]))
+    ]);
   }
+
   void test_embedded_script_no_content() {
     HtmlElementImpl element = _build(r'''
 <html>
@@ -7991,6 +8482,7 @@
 </html>''');
     _validate(element, [_s(_l())]);
   }
+
   void test_external_script() {
     HtmlElementImpl element = _build(r'''
 <html>
@@ -7998,6 +8490,7 @@
 </html>''');
     _validate(element, [_s2("other.dart")]);
   }
+
   void test_external_script_no_source() {
     HtmlElementImpl element = _build(r'''
 <html>
@@ -8005,6 +8498,7 @@
 </html>''');
     _validate(element, [_s2(null)]);
   }
+
   void test_external_script_with_content() {
     HtmlElementImpl element = _build(r'''
 <html>
@@ -8012,12 +8506,14 @@
 </html>''');
     _validate(element, [_s2("other.dart")]);
   }
+
   void test_no_scripts() {
     HtmlElementImpl element = _build(r'''
 <!DOCTYPE html>
 <html><p></p></html>''');
     _validate(element, []);
   }
+
   void test_two_dart_scripts() {
     HtmlElementImpl element = _build(r'''
 <html>
@@ -8025,8 +8521,12 @@
 <script type="application/dart" src="other.dart"/>
 <script src="dart.js"/>
 </html>''');
-    _validate(element, [_s(_l([_v("bar")])), _s2("other.dart")]);
+    _validate(element, [
+      _s(_l([_v("bar")])),
+      _s2("other.dart")
+    ]);
   }
+
   HtmlElementImpl _build(String contents) {
     TestSource source = new TestSource(
         FileUtilities2.createFile("/test.html").getAbsolutePath(), contents);
@@ -8036,8 +8536,10 @@
     HtmlUnitBuilder builder = new HtmlUnitBuilder(_context);
     return builder.buildHtmlElement(source, _context.parseHtmlUnit(source));
   }
+
   HtmlUnitBuilderTest_ExpectedLibrary _l(
-          [List<HtmlUnitBuilderTest_ExpectedVariable> expectedVariables = HtmlUnitBuilderTest_ExpectedVariable.EMPTY_LIST]) =>
+          [List<HtmlUnitBuilderTest_ExpectedVariable> expectedVariables =
+              HtmlUnitBuilderTest_ExpectedVariable.EMPTY_LIST]) =>
       new HtmlUnitBuilderTest_ExpectedLibrary(this, expectedVariables);
   _ExpectedScript _s(HtmlUnitBuilderTest_ExpectedLibrary expectedLibrary) =>
       new _ExpectedScript.con1(expectedLibrary);
@@ -8061,7 +8563,8 @@
   final HtmlUnitBuilderTest HtmlUnitBuilderTest_this;
   final List<HtmlUnitBuilderTest_ExpectedVariable> _expectedVariables;
   HtmlUnitBuilderTest_ExpectedLibrary(this.HtmlUnitBuilderTest_this,
-      [this._expectedVariables = HtmlUnitBuilderTest_ExpectedVariable.EMPTY_LIST]);
+      [this._expectedVariables =
+          HtmlUnitBuilderTest_ExpectedVariable.EMPTY_LIST]);
   void _validate(int scriptIndex, EmbeddedHtmlScriptElementImpl script) {
     LibraryElement library = script.scriptLibrary;
     expect(library, isNotNull, reason: "script $scriptIndex");
@@ -8123,18 +8626,22 @@
   }
 
   void test_invalidUri() {
-    _verify(r'''
+    _verify(
+        r'''
 <html>
 <script type='application/dart' src='ht:'/>
-</html>''', [HtmlWarningCode.INVALID_URI]);
+</html>''',
+        [HtmlWarningCode.INVALID_URI]);
     _assertErrorLocation2(_errors[0], "ht:");
   }
 
   void test_uriDoesNotExist() {
-    _verify(r'''
+    _verify(
+        r'''
 <html>
 <script type='application/dart' src='other.dart'/>
-</html>''', [HtmlWarningCode.URI_DOES_NOT_EXIST]);
+</html>''',
+        [HtmlWarningCode.URI_DOES_NOT_EXIST]);
     _assertErrorLocation2(_errors[0], "other.dart");
   }
 
@@ -8201,41 +8708,49 @@
     _referenceGraph = new DirectedGraph<ConstantEvaluationTarget>();
     _head = ElementFactory.topLevelVariableElement2("v1");
   }
+
   void test_visitSimpleIdentifier_const() {
     _visitNode(_makeTailVariable("v2", true));
     _assertOneArc(_tail);
   }
+
   void test_visitSimpleIdentifier_nonConst() {
     _visitNode(_makeTailVariable("v2", false));
     _assertOneArc(_tail);
   }
+
   void test_visitSuperConstructorInvocation_const() {
     _visitNode(_makeTailSuperConstructorInvocation("A", true));
     _assertOneArc(_tail);
   }
+
   void test_visitSuperConstructorInvocation_nonConst() {
     _visitNode(_makeTailSuperConstructorInvocation("A", false));
     _assertOneArc(_tail);
   }
+
   void test_visitSuperConstructorInvocation_unresolved() {
     SuperConstructorInvocation superConstructorInvocation =
         AstFactory.superConstructorInvocation();
     _visitNode(superConstructorInvocation);
     _assertNoArcs();
   }
+
   void _assertNoArcs() {
     Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
     expect(tails, hasLength(0));
   }
+
   void _assertOneArc(Element tail) {
     Set<ConstantEvaluationTarget> tails = _referenceGraph.getTails(_head);
     expect(tails, hasLength(1));
     expect(tails.first, same(tail));
   }
+
   ReferenceFinder _createReferenceFinder(ConstantEvaluationTarget source) =>
       new ReferenceFinder((ConstantEvaluationTarget dependency) {
-    _referenceGraph.addEdge(source, dependency);
-  });
+        _referenceGraph.addEdge(source, dependency);
+      });
   SuperConstructorInvocation _makeTailSuperConstructorInvocation(
       String name, bool isConst) {
     List<ConstructorInitializer> initializers =
@@ -8255,6 +8770,7 @@
     superConstructorInvocation.staticElement = constructorElement;
     return superConstructorInvocation;
   }
+
   SimpleIdentifier _makeTailVariable(String name, bool isConst) {
     VariableDeclaration variableDeclaration =
         AstFactory.variableDeclaration(name);
@@ -8268,6 +8784,7 @@
     identifier.staticElement = variableElement;
     return identifier;
   }
+
   void _visitNode(AstNode node) {
     node.accept(_createReferenceFinder(_head));
   }
@@ -8277,7 +8794,8 @@
 class SDKLibrariesReaderTest extends EngineTestCase {
   void test_readFrom_dart2js() {
     LibraryMap libraryMap = new SdkLibrariesReader(true).readFromFile(
-        FileUtilities2.createFile("/libs.dart"), r'''
+        FileUtilities2.createFile("/libs.dart"),
+        r'''
 final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {
   'first' : const LibraryInfo(
     'first/first.dart',
@@ -8298,15 +8816,18 @@
     expect(first.isImplementation, false);
     expect(first.isVmLibrary, true);
   }
+
   void test_readFrom_empty() {
-    LibraryMap libraryMap = new SdkLibrariesReader(false).readFromFile(
-        FileUtilities2.createFile("/libs.dart"), "");
+    LibraryMap libraryMap = new SdkLibrariesReader(false)
+        .readFromFile(FileUtilities2.createFile("/libs.dart"), "");
     expect(libraryMap, isNotNull);
     expect(libraryMap.size(), 0);
   }
+
   void test_readFrom_normal() {
     LibraryMap libraryMap = new SdkLibrariesReader(false).readFromFile(
-        FileUtilities2.createFile("/libs.dart"), r'''
+        FileUtilities2.createFile("/libs.dart"),
+        r'''
 final Map<String, LibraryInfo> LIBRARIES = const <String, LibraryInfo> {
   'first' : const LibraryInfo(
     'first/first.dart',
@@ -8358,8 +8879,9 @@
 @reflectiveTest
 class ToSourceVisitorTest extends EngineTestCase {
   void fail_visitHtmlScriptTagNode_attributes_content() {
-    _assertSource("<script type='application/dart'>f() {}</script>", HtmlFactory
-        .scriptTagWithContent(
+    _assertSource(
+        "<script type='application/dart'>f() {}</script>",
+        HtmlFactory.scriptTagWithContent(
             "f() {}", [HtmlFactory.attribute("type", "'application/dart'")]));
   }
 
@@ -8369,8 +8891,10 @@
   }
 
   void test_visitHtmlScriptTagNode_attributes_noContent() {
-    _assertSource("<script type='application/dart'/>", HtmlFactory
-        .scriptTag([HtmlFactory.attribute("type", "'application/dart'")]));
+    _assertSource(
+        "<script type='application/dart'/>",
+        HtmlFactory
+            .scriptTag([HtmlFactory.attribute("type", "'application/dart'")]));
   }
 
   void test_visitHtmlScriptTagNode_noAttributes_noContent() {
@@ -8467,6 +8991,7 @@
       fail(buffer.toString());
     }
   }
+
   /**
    * Set the tags to be expected when visiting
    *
@@ -8478,6 +9003,7 @@
     _expectTags(expected, expectedTags);
     this._expectedTagsInOrderVisited = expected;
   }
+
   @override
   Object visitHtmlUnit(ht.HtmlUnit node) {
     if (node.parent != null) {
@@ -8489,6 +9015,7 @@
     _validateNode(node);
     return super.visitHtmlUnit(node);
   }
+
   @override
   Object visitXmlAttributeNode(ht.XmlAttributeNode actual) {
     if (actual.parent is! ht.XmlTagNode) {
@@ -8518,6 +9045,7 @@
     _validateNode(actual);
     return super.visitXmlAttributeNode(actual);
   }
+
   @override
   Object visitXmlTagNode(ht.XmlTagNode actual) {
     if (!(actual.parent is ht.HtmlUnit || actual.parent is ht.XmlTagNode)) {
@@ -8591,6 +9119,7 @@
     _validateNode(actual);
     return super.visitXmlTagNode(actual);
   }
+
   /**
    * Append the specified tags to the array in depth first order
    *
@@ -8604,6 +9133,7 @@
       _expectTags(expected, tag._children);
     }
   }
+
   void _validateNode(ht.XmlNode node) {
     if (node.beginToken == null) {
       _errors.add("No begin token for ${node.runtimeType}");
@@ -8666,6 +9196,7 @@
       _validateExternal(scriptIndex, script);
     }
   }
+
   void _validateEmbedded(int scriptIndex, HtmlScriptElement script) {
     if (script is! EmbeddedHtmlScriptElementImpl) {
       fail(
@@ -8675,6 +9206,7 @@
         script as EmbeddedHtmlScriptElementImpl;
     _expectedLibrary._validate(scriptIndex, embeddedScript);
   }
+
   void _validateExternal(int scriptIndex, HtmlScriptElement script) {
     if (script is! ExternalHtmlScriptElementImpl) {
       fail(
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index 115a514..4f8142a 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.ast_test;
 
 import 'package:analyzer/src/generated/ast.dart';
@@ -17,11 +14,12 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'parser_test.dart' show ParserTestCase;
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(BreadthFirstVisitorTest);
   runReflectiveTests(ClassDeclarationTest);
   runReflectiveTests(ClassTypeAliasTest);
@@ -132,7 +130,8 @@
         (obj) => obj is FunctionDeclaration, FunctionDeclaration, nodes[3]);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is FunctionDeclarationStatement,
-        FunctionDeclarationStatement, nodes[27]);
+        FunctionDeclarationStatement,
+        nodes[27]);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is IntegerLiteral, IntegerLiteral, nodes[58]);
     //3
@@ -148,10 +147,14 @@
         .constructorDeclaration(AstFactory.identifier3("Test"), null,
             AstFactory.formalParameterList(), initializers);
     ConstructorDeclaration aConstructor = AstFactory.constructorDeclaration(
-        AstFactory.identifier3("Test"), "a", AstFactory.formalParameterList(),
+        AstFactory.identifier3("Test"),
+        "a",
+        AstFactory.formalParameterList(),
         initializers);
     ConstructorDeclaration bConstructor = AstFactory.constructorDeclaration(
-        AstFactory.identifier3("Test"), "b", AstFactory.formalParameterList(),
+        AstFactory.identifier3("Test"),
+        "b",
+        AstFactory.formalParameterList(),
         initializers);
     ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null,
         null, null, null, [defaultConstructor, aConstructor, bConstructor]);
@@ -165,8 +168,8 @@
     VariableDeclaration aVar = AstFactory.variableDeclaration("a");
     VariableDeclaration bVar = AstFactory.variableDeclaration("b");
     VariableDeclaration cVar = AstFactory.variableDeclaration("c");
-    ClassDeclaration clazz = AstFactory.classDeclaration(null, "Test", null,
-        null, null, null, [
+    ClassDeclaration clazz =
+        AstFactory.classDeclaration(null, "Test", null, null, null, null, [
       AstFactory.fieldDeclaration2(false, null, [aVar]),
       AstFactory.fieldDeclaration2(false, null, [bVar, cVar])
     ]);
@@ -189,10 +192,16 @@
   }
 
   void test_isAbstract() {
-    expect(AstFactory.classDeclaration(
-        null, "A", null, null, null, null).isAbstract, isFalse);
-    expect(AstFactory.classDeclaration(
-        Keyword.ABSTRACT, "B", null, null, null, null).isAbstract, isTrue);
+    expect(
+        AstFactory
+            .classDeclaration(null, "A", null, null, null, null)
+            .isAbstract,
+        isFalse);
+    expect(
+        AstFactory
+            .classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null)
+            .isAbstract,
+        isTrue);
   }
 }
 
@@ -202,8 +211,11 @@
     expect(
         AstFactory.classTypeAlias("A", null, null, null, null, null).isAbstract,
         isFalse);
-    expect(AstFactory.classTypeAlias(
-        "B", null, Keyword.ABSTRACT, null, null, null).isAbstract, isTrue);
+    expect(
+        AstFactory
+            .classTypeAlias("B", null, Keyword.ABSTRACT, null, null, null)
+            .isAbstract,
+        isTrue);
   }
 }
 
@@ -517,8 +529,13 @@
     Token externalKeyword = TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     externalKeyword.offset = 14;
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        Keyword.CONST, Keyword.FACTORY, AstFactory.identifier3('int'), null,
-        null, null, null);
+        Keyword.CONST,
+        Keyword.FACTORY,
+        AstFactory.identifier3('int'),
+        null,
+        null,
+        null,
+        null);
     declaration.externalKeyword = externalKeyword;
     declaration.constKeyword.offset = 8;
     Token factoryKeyword = declaration.factoryKeyword;
@@ -530,8 +547,13 @@
     Token token = TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
     token.offset = 0;
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        Keyword.CONST, Keyword.FACTORY, AstFactory.identifier3('int'), null,
-        null, null, null);
+        Keyword.CONST,
+        Keyword.FACTORY,
+        AstFactory.identifier3('int'),
+        null,
+        null,
+        null,
+        null);
     declaration.externalKeyword = token;
     declaration.constKeyword.offset = 9;
     declaration.factoryKeyword.offset = 15;
@@ -540,7 +562,12 @@
 
   void test_firstTokenAfterCommentAndMetadata_constOnly() {
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        Keyword.CONST, null, AstFactory.identifier3('int'), null, null, null,
+        Keyword.CONST,
+        null,
+        AstFactory.identifier3('int'),
+        null,
+        null,
+        null,
         null);
     expect(declaration.firstTokenAfterCommentAndMetadata,
         declaration.constKeyword);
@@ -556,7 +583,12 @@
 
   void test_firstTokenAfterCommentAndMetadata_factoryOnly() {
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        null, Keyword.FACTORY, AstFactory.identifier3('int'), null, null, null,
+        null,
+        Keyword.FACTORY,
+        AstFactory.identifier3('int'),
+        null,
+        null,
+        null,
         null);
     expect(declaration.firstTokenAfterCommentAndMetadata,
         declaration.factoryKeyword);
@@ -991,8 +1023,9 @@
   }
 
   void test_inDeclarationContext_constructorDeclaration() {
-    SimpleIdentifier identifier = AstFactory.constructorDeclaration(
-        AstFactory.identifier3("C"), "c", null, null).name;
+    SimpleIdentifier identifier = AstFactory
+        .constructorDeclaration(AstFactory.identifier3("C"), "c", null, null)
+        .name;
     expect(identifier.inDeclarationContext(), isTrue);
   }
 
@@ -1158,7 +1191,8 @@
 
   void test_isQualified_inMethodInvocation_withTarget() {
     MethodInvocation invocation = AstFactory.methodInvocation(
-        AstFactory.identifier3("target"), "test",
+        AstFactory.identifier3("target"),
+        "test",
         [AstFactory.identifier3("arg0")]);
     SimpleIdentifier identifier = invocation.methodName;
     expect(identifier.isQualified, isTrue);
@@ -1263,72 +1297,126 @@
 @reflectiveTest
 class SimpleStringLiteralTest extends ParserTestCase {
   void test_contentsEnd() {
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'X'"), "X").contentsEnd, 2);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString('"X"'), "X").contentsEnd, 2);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'X'"), "X")
+            .contentsEnd,
+        2);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString('"X"'), "X")
+            .contentsEnd,
+        2);
 
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString('"""X"""'), "X").contentsEnd, 4);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'''X'''"), "X").contentsEnd, 4);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'''  \nX'''"), "X").contentsEnd, 7);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString('"""X"""'), "X")
+            .contentsEnd,
+        4);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'''X'''"), "X")
+            .contentsEnd,
+        4);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("'''  \nX'''"), "X").contentsEnd,
+        7);
 
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'X'"), "X").contentsEnd, 3);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString('r"X"'), "X").contentsEnd, 3);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'X'"), "X")
+            .contentsEnd,
+        3);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString('r"X"'), "X")
+            .contentsEnd,
+        3);
 
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString('r"""X"""'), "X").contentsEnd, 5);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'''X'''"), "X").contentsEnd, 5);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'''  \nX'''"), "X").contentsEnd, 8);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString('r"""X"""'), "X")
+            .contentsEnd,
+        5);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'''X'''"), "X")
+            .contentsEnd,
+        5);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("r'''  \nX'''"), "X").contentsEnd,
+        8);
   }
 
   void test_contentsOffset() {
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'X'"), "X").contentsOffset, 1);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("\"X\""), "X").contentsOffset, 1);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsOffset, 3);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'''X'''"), "X").contentsOffset, 3);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'X'"), "X").contentsOffset, 2);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r\"X\""), "X").contentsOffset, 2);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").contentsOffset, 4);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'''X'''"), "X").contentsOffset, 4);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'X'"), "X")
+            .contentsOffset,
+        1);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("\"X\""), "X")
+            .contentsOffset,
+        1);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsOffset,
+        3);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'''X'''"), "X")
+            .contentsOffset,
+        3);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'X'"), "X")
+            .contentsOffset,
+        2);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r\"X\""), "X")
+            .contentsOffset,
+        2);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").contentsOffset,
+        4);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'''X'''"), "X")
+            .contentsOffset,
+        4);
     // leading whitespace
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("''' \ \nX''"), "X").contentsOffset, 6);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString('r""" \ \nX"""'), "X").contentsOffset, 7);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("''' \ \nX''"), "X").contentsOffset,
+        6);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString('r""" \ \nX"""'), "X").contentsOffset,
+        7);
   }
 
   void test_isMultiline() {
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'X'"), "X").isMultiline, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'X'"), "X").isMultiline, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("\"X\""), "X").isMultiline, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r\"X\""), "X").isMultiline, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'''X'''"), "X").isMultiline, isTrue);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'''X'''"), "X").isMultiline, isTrue);
-    expect(new SimpleStringLiteral(
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'X'"), "X")
+            .isMultiline,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'X'"), "X")
+            .isMultiline,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("\"X\""), "X")
+            .isMultiline,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r\"X\""), "X")
+            .isMultiline,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'''X'''"), "X")
+            .isMultiline,
+        isTrue);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'''X'''"), "X")
+            .isMultiline,
+        isTrue);
+    expect(
+        new SimpleStringLiteral(
             TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").isMultiline,
         isTrue);
-    expect(new SimpleStringLiteral(
+    expect(
+        new SimpleStringLiteral(
             TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").isMultiline,
         isTrue);
   }
@@ -1337,20 +1425,34 @@
     expect(
         new SimpleStringLiteral(TokenFactory.tokenFromString("'X'"), "X").isRaw,
         isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("\"X\""), "X").isRaw, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").isRaw, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("'''X'''"), "X").isRaw, isFalse);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'X'"), "X").isRaw, isTrue);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r\"X\""), "X").isRaw, isTrue);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").isRaw, isTrue);
-    expect(new SimpleStringLiteral(
-        TokenFactory.tokenFromString("r'''X'''"), "X").isRaw, isTrue);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("\"X\""), "X")
+            .isRaw,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").isRaw,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("'''X'''"), "X")
+            .isRaw,
+        isFalse);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'X'"), "X")
+            .isRaw,
+        isTrue);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r\"X\""), "X")
+            .isRaw,
+        isTrue);
+    expect(
+        new SimpleStringLiteral(
+            TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").isRaw,
+        isTrue);
+    expect(
+        new SimpleStringLiteral(TokenFactory.tokenFromString("r'''X'''"), "X")
+            .isRaw,
+        isTrue);
   }
 
   void test_isSingleQuoted() {
@@ -1550,8 +1652,10 @@
 @reflectiveTest
 class ToSourceVisitorTest extends EngineTestCase {
   void test_visitAdjacentStrings() {
-    _assertSource("'a' 'b'", AstFactory
-        .adjacentStrings([AstFactory.string2("a"), AstFactory.string2("b")]));
+    _assertSource(
+        "'a' 'b'",
+        AstFactory.adjacentStrings(
+            [AstFactory.string2("a"), AstFactory.string2("b")]));
   }
 
   void test_visitAnnotation_constant() {
@@ -1559,18 +1663,24 @@
   }
 
   void test_visitAnnotation_constructor() {
-    _assertSource("@A.c()", AstFactory.annotation2(AstFactory.identifier3("A"),
-        AstFactory.identifier3("c"), AstFactory.argumentList()));
+    _assertSource(
+        "@A.c()",
+        AstFactory.annotation2(AstFactory.identifier3("A"),
+            AstFactory.identifier3("c"), AstFactory.argumentList()));
   }
 
   void test_visitArgumentList() {
-    _assertSource("(a, b)", AstFactory.argumentList(
-        [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
+    _assertSource(
+        "(a, b)",
+        AstFactory.argumentList(
+            [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
   }
 
   void test_visitAsExpression() {
-    _assertSource("e as T", AstFactory.asExpression(
-        AstFactory.identifier3("e"), AstFactory.typeName4("T")));
+    _assertSource(
+        "e as T",
+        AstFactory.asExpression(
+            AstFactory.identifier3("e"), AstFactory.typeName4("T")));
   }
 
   void test_visitAssertStatement() {
@@ -1579,9 +1689,10 @@
   }
 
   void test_visitAssignmentExpression() {
-    _assertSource("a = b", AstFactory.assignmentExpression(
-        AstFactory.identifier3("a"), TokenType.EQ,
-        AstFactory.identifier3("b")));
+    _assertSource(
+        "a = b",
+        AstFactory.assignmentExpression(AstFactory.identifier3("a"),
+            TokenType.EQ, AstFactory.identifier3("b")));
   }
 
   void test_visitAwaitExpression() {
@@ -1590,9 +1701,10 @@
   }
 
   void test_visitBinaryExpression() {
-    _assertSource("a + b", AstFactory.binaryExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS,
-        AstFactory.identifier3("b")));
+    _assertSource(
+        "a + b",
+        AstFactory.binaryExpression(AstFactory.identifier3("a"), TokenType.PLUS,
+            AstFactory.identifier3("b")));
   }
 
   void test_visitBlock_empty() {
@@ -1600,8 +1712,10 @@
   }
 
   void test_visitBlock_nonEmpty() {
-    _assertSource("{break; break;}", AstFactory
-        .block([AstFactory.breakStatement(), AstFactory.breakStatement()]));
+    _assertSource(
+        "{break; break;}",
+        AstFactory
+            .block([AstFactory.breakStatement(), AstFactory.breakStatement()]));
   }
 
   void test_visitBlockFunctionBody_async() {
@@ -1641,27 +1755,30 @@
   }
 
   void test_visitCascadeExpression_field() {
-    _assertSource("a..b..c", AstFactory.cascadeExpression(
-        AstFactory.identifier3("a"), [
-      AstFactory.cascadedPropertyAccess("b"),
-      AstFactory.cascadedPropertyAccess("c")
-    ]));
+    _assertSource(
+        "a..b..c",
+        AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+          AstFactory.cascadedPropertyAccess("b"),
+          AstFactory.cascadedPropertyAccess("c")
+        ]));
   }
 
   void test_visitCascadeExpression_index() {
-    _assertSource("a..[0]..[1]", AstFactory.cascadeExpression(
-        AstFactory.identifier3("a"), [
-      AstFactory.cascadedIndexExpression(AstFactory.integer(0)),
-      AstFactory.cascadedIndexExpression(AstFactory.integer(1))
-    ]));
+    _assertSource(
+        "a..[0]..[1]",
+        AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+          AstFactory.cascadedIndexExpression(AstFactory.integer(0)),
+          AstFactory.cascadedIndexExpression(AstFactory.integer(1))
+        ]));
   }
 
   void test_visitCascadeExpression_method() {
-    _assertSource("a..b()..c()", AstFactory.cascadeExpression(
-        AstFactory.identifier3("a"), [
-      AstFactory.cascadedMethodInvocation("b"),
-      AstFactory.cascadedMethodInvocation("c")
-    ]));
+    _assertSource(
+        "a..b()..c()",
+        AstFactory.cascadeExpression(AstFactory.identifier3("a"), [
+          AstFactory.cascadedMethodInvocation("b"),
+          AstFactory.cascadedMethodInvocation("c")
+        ]));
   }
 
   void test_visitCatchClause_catch_noStack() {
@@ -1683,8 +1800,10 @@
   }
 
   void test_visitClassDeclaration_abstract() {
-    _assertSource("abstract class C {}", AstFactory.classDeclaration(
-        Keyword.ABSTRACT, "C", null, null, null, null));
+    _assertSource(
+        "abstract class C {}",
+        AstFactory.classDeclaration(
+            Keyword.ABSTRACT, "C", null, null, null, null));
   }
 
   void test_visitClassDeclaration_empty() {
@@ -1693,92 +1812,140 @@
   }
 
   void test_visitClassDeclaration_extends() {
-    _assertSource("class C extends A {}", AstFactory.classDeclaration(null, "C",
-        null, AstFactory.extendsClause(AstFactory.typeName4("A")), null, null));
+    _assertSource(
+        "class C extends A {}",
+        AstFactory.classDeclaration(null, "C", null,
+            AstFactory.extendsClause(AstFactory.typeName4("A")), null, null));
   }
 
   void test_visitClassDeclaration_extends_implements() {
-    _assertSource("class C extends A implements B {}", AstFactory
-        .classDeclaration(null, "C", null,
-            AstFactory.extendsClause(AstFactory.typeName4("A")), null,
+    _assertSource(
+        "class C extends A implements B {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            null,
+            AstFactory.extendsClause(AstFactory.typeName4("A")),
+            null,
             AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_extends_with() {
-    _assertSource("class C extends A with M {}", AstFactory.classDeclaration(
-        null, "C", null, AstFactory.extendsClause(AstFactory.typeName4("A")),
-        AstFactory.withClause([AstFactory.typeName4("M")]), null));
+    _assertSource(
+        "class C extends A with M {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            null,
+            AstFactory.extendsClause(AstFactory.typeName4("A")),
+            AstFactory.withClause([AstFactory.typeName4("M")]),
+            null));
   }
 
   void test_visitClassDeclaration_extends_with_implements() {
-    _assertSource("class C extends A with M implements B {}", AstFactory
-        .classDeclaration(null, "C", null,
+    _assertSource(
+        "class C extends A with M implements B {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            null,
             AstFactory.extendsClause(AstFactory.typeName4("A")),
             AstFactory.withClause([AstFactory.typeName4("M")]),
             AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_implements() {
-    _assertSource("class C implements B {}", AstFactory.classDeclaration(null,
-        "C", null, null, null,
-        AstFactory.implementsClause([AstFactory.typeName4("B")])));
+    _assertSource(
+        "class C implements B {}",
+        AstFactory.classDeclaration(null, "C", null, null, null,
+            AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_multipleMember() {
-    _assertSource("class C {var a; var b;}", AstFactory.classDeclaration(null,
-        "C", null, null, null, null, [
-      AstFactory.fieldDeclaration2(
-          false, Keyword.VAR, [AstFactory.variableDeclaration("a")]),
-      AstFactory.fieldDeclaration2(
-          false, Keyword.VAR, [AstFactory.variableDeclaration("b")])
-    ]));
+    _assertSource(
+        "class C {var a; var b;}",
+        AstFactory.classDeclaration(null, "C", null, null, null, null, [
+          AstFactory.fieldDeclaration2(
+              false, Keyword.VAR, [AstFactory.variableDeclaration("a")]),
+          AstFactory.fieldDeclaration2(
+              false, Keyword.VAR, [AstFactory.variableDeclaration("b")])
+        ]));
   }
 
   void test_visitClassDeclaration_parameters() {
-    _assertSource("class C<E> {}", AstFactory.classDeclaration(
-        null, "C", AstFactory.typeParameterList(["E"]), null, null, null));
+    _assertSource(
+        "class C<E> {}",
+        AstFactory.classDeclaration(
+            null, "C", AstFactory.typeParameterList(["E"]), null, null, null));
   }
 
   void test_visitClassDeclaration_parameters_extends() {
-    _assertSource("class C<E> extends A {}", AstFactory.classDeclaration(null,
-        "C", AstFactory.typeParameterList(["E"]),
-        AstFactory.extendsClause(AstFactory.typeName4("A")), null, null));
+    _assertSource(
+        "class C<E> extends A {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            AstFactory.extendsClause(AstFactory.typeName4("A")),
+            null,
+            null));
   }
 
   void test_visitClassDeclaration_parameters_extends_implements() {
-    _assertSource("class C<E> extends A implements B {}", AstFactory
-        .classDeclaration(null, "C", AstFactory.typeParameterList(["E"]),
-            AstFactory.extendsClause(AstFactory.typeName4("A")), null,
+    _assertSource(
+        "class C<E> extends A implements B {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            AstFactory.extendsClause(AstFactory.typeName4("A")),
+            null,
             AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_parameters_extends_with() {
-    _assertSource("class C<E> extends A with M {}", AstFactory.classDeclaration(
-        null, "C", AstFactory.typeParameterList(["E"]),
-        AstFactory.extendsClause(AstFactory.typeName4("A")),
-        AstFactory.withClause([AstFactory.typeName4("M")]), null));
+    _assertSource(
+        "class C<E> extends A with M {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            AstFactory.extendsClause(AstFactory.typeName4("A")),
+            AstFactory.withClause([AstFactory.typeName4("M")]),
+            null));
   }
 
   void test_visitClassDeclaration_parameters_extends_with_implements() {
-    _assertSource("class C<E> extends A with M implements B {}", AstFactory
-        .classDeclaration(null, "C", AstFactory.typeParameterList(["E"]),
+    _assertSource(
+        "class C<E> extends A with M implements B {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            AstFactory.typeParameterList(["E"]),
             AstFactory.extendsClause(AstFactory.typeName4("A")),
             AstFactory.withClause([AstFactory.typeName4("M")]),
             AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_parameters_implements() {
-    _assertSource("class C<E> implements B {}", AstFactory.classDeclaration(
-        null, "C", AstFactory.typeParameterList(["E"]), null, null,
-        AstFactory.implementsClause([AstFactory.typeName4("B")])));
+    _assertSource(
+        "class C<E> implements B {}",
+        AstFactory.classDeclaration(
+            null,
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            null,
+            null,
+            AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_singleMember() {
-    _assertSource("class C {var a;}", AstFactory.classDeclaration(null, "C",
-        null, null, null, null, [
-      AstFactory.fieldDeclaration2(
-          false, Keyword.VAR, [AstFactory.variableDeclaration("a")])
-    ]));
+    _assertSource(
+        "class C {var a;}",
+        AstFactory.classDeclaration(null, "C", null, null, null, null, [
+          AstFactory.fieldDeclaration2(
+              false, Keyword.VAR, [AstFactory.variableDeclaration("a")])
+        ]));
   }
 
   void test_visitClassDeclaration_withMetadata() {
@@ -1790,74 +1957,116 @@
   }
 
   void test_visitClassTypeAlias_abstract() {
-    _assertSource("abstract class C = S with M1;", AstFactory.classTypeAlias(
-        "C", null, Keyword.ABSTRACT, AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+    _assertSource(
+        "abstract class C = S with M1;",
+        AstFactory.classTypeAlias(
+            "C",
+            null,
+            Keyword.ABSTRACT,
+            AstFactory.typeName4("S"),
+            AstFactory.withClause([AstFactory.typeName4("M1")]),
+            null));
   }
 
   void test_visitClassTypeAlias_abstract_implements() {
-    _assertSource("abstract class C = S with M1 implements I;", AstFactory
-        .classTypeAlias("C", null, Keyword.ABSTRACT, AstFactory.typeName4("S"),
+    _assertSource(
+        "abstract class C = S with M1 implements I;",
+        AstFactory.classTypeAlias(
+            "C",
+            null,
+            Keyword.ABSTRACT,
+            AstFactory.typeName4("S"),
             AstFactory.withClause([AstFactory.typeName4("M1")]),
             AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_generic() {
-    _assertSource("class C<E> = S<E> with M1<E>;", AstFactory.classTypeAlias(
-        "C", AstFactory.typeParameterList(["E"]), null,
-        AstFactory.typeName4("S", [AstFactory.typeName4("E")]),
-        AstFactory.withClause(
-            [AstFactory.typeName4("M1", [AstFactory.typeName4("E")])]), null));
+    _assertSource(
+        "class C<E> = S<E> with M1<E>;",
+        AstFactory.classTypeAlias(
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            null,
+            AstFactory.typeName4("S", [AstFactory.typeName4("E")]),
+            AstFactory.withClause([
+              AstFactory.typeName4("M1", [AstFactory.typeName4("E")])
+            ]),
+            null));
   }
 
   void test_visitClassTypeAlias_implements() {
-    _assertSource("class C = S with M1 implements I;", AstFactory
-        .classTypeAlias("C", null, null, AstFactory.typeName4("S"),
+    _assertSource(
+        "class C = S with M1 implements I;",
+        AstFactory.classTypeAlias(
+            "C",
+            null,
+            null,
+            AstFactory.typeName4("S"),
             AstFactory.withClause([AstFactory.typeName4("M1")]),
             AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_minimal() {
-    _assertSource("class C = S with M1;", AstFactory.classTypeAlias("C", null,
-        null, AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+    _assertSource(
+        "class C = S with M1;",
+        AstFactory.classTypeAlias("C", null, null, AstFactory.typeName4("S"),
+            AstFactory.withClause([AstFactory.typeName4("M1")]), null));
   }
 
   void test_visitClassTypeAlias_parameters_abstract() {
-    _assertSource("abstract class C<E> = S with M1;", AstFactory.classTypeAlias(
-        "C", AstFactory.typeParameterList(["E"]), Keyword.ABSTRACT,
-        AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+    _assertSource(
+        "abstract class C<E> = S with M1;",
+        AstFactory.classTypeAlias(
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            Keyword.ABSTRACT,
+            AstFactory.typeName4("S"),
+            AstFactory.withClause([AstFactory.typeName4("M1")]),
+            null));
   }
 
   void test_visitClassTypeAlias_parameters_abstract_implements() {
-    _assertSource("abstract class C<E> = S with M1 implements I;", AstFactory
-        .classTypeAlias("C", AstFactory.typeParameterList(["E"]),
-            Keyword.ABSTRACT, AstFactory.typeName4("S"),
+    _assertSource(
+        "abstract class C<E> = S with M1 implements I;",
+        AstFactory.classTypeAlias(
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            Keyword.ABSTRACT,
+            AstFactory.typeName4("S"),
             AstFactory.withClause([AstFactory.typeName4("M1")]),
             AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_parameters_implements() {
-    _assertSource("class C<E> = S with M1 implements I;", AstFactory
-        .classTypeAlias("C", AstFactory.typeParameterList(["E"]), null,
+    _assertSource(
+        "class C<E> = S with M1 implements I;",
+        AstFactory.classTypeAlias(
+            "C",
+            AstFactory.typeParameterList(["E"]),
+            null,
             AstFactory.typeName4("S"),
             AstFactory.withClause([AstFactory.typeName4("M1")]),
             AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_withMetadata() {
-    ClassTypeAlias declaration = AstFactory.classTypeAlias("C", null, null,
+    ClassTypeAlias declaration = AstFactory.classTypeAlias(
+        "C",
+        null,
+        null,
         AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null);
+        AstFactory.withClause([AstFactory.typeName4("M1")]),
+        null);
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
     _assertSource("@deprecated class C = S with M1;", declaration);
   }
 
   void test_visitComment() {
-    _assertSource("", Comment.createBlockComment(
-        <Token>[TokenFactory.tokenFromString("/* comment */")]));
+    _assertSource(
+        "",
+        Comment.createBlockComment(
+            <Token>[TokenFactory.tokenFromString("/* comment */")]));
   }
 
   void test_visitCommentReference() {
@@ -1865,10 +2074,12 @@
   }
 
   void test_visitCompilationUnit_declaration() {
-    _assertSource("var a;", AstFactory.compilationUnit2([
-      AstFactory.topLevelVariableDeclaration2(
-          Keyword.VAR, [AstFactory.variableDeclaration("a")])
-    ]));
+    _assertSource(
+        "var a;",
+        AstFactory.compilationUnit2([
+          AstFactory.topLevelVariableDeclaration2(
+              Keyword.VAR, [AstFactory.variableDeclaration("a")])
+        ]));
   }
 
   void test_visitCompilationUnit_directive() {
@@ -1877,11 +2088,14 @@
   }
 
   void test_visitCompilationUnit_directive_declaration() {
-    _assertSource("library l; var a;", AstFactory.compilationUnit4(
-        [AstFactory.libraryDirective2("l")], [
-      AstFactory.topLevelVariableDeclaration2(
-          Keyword.VAR, [AstFactory.variableDeclaration("a")])
-    ]));
+    _assertSource(
+        "library l; var a;",
+        AstFactory.compilationUnit4([
+          AstFactory.libraryDirective2("l")
+        ], [
+          AstFactory.topLevelVariableDeclaration2(
+              Keyword.VAR, [AstFactory.variableDeclaration("a")])
+        ]));
   }
 
   void test_visitCompilationUnit_empty() {
@@ -1894,91 +2108,143 @@
   }
 
   void test_visitCompilationUnit_script_declaration() {
-    _assertSource("!#/bin/dartvm var a;", AstFactory.compilationUnit6(
-        "!#/bin/dartvm", [
-      AstFactory.topLevelVariableDeclaration2(
-          Keyword.VAR, [AstFactory.variableDeclaration("a")])
-    ]));
+    _assertSource(
+        "!#/bin/dartvm var a;",
+        AstFactory.compilationUnit6("!#/bin/dartvm", [
+          AstFactory.topLevelVariableDeclaration2(
+              Keyword.VAR, [AstFactory.variableDeclaration("a")])
+        ]));
   }
 
   void test_visitCompilationUnit_script_directive() {
-    _assertSource("!#/bin/dartvm library l;", AstFactory.compilationUnit7(
-        "!#/bin/dartvm", [AstFactory.libraryDirective2("l")]));
+    _assertSource(
+        "!#/bin/dartvm library l;",
+        AstFactory.compilationUnit7(
+            "!#/bin/dartvm", [AstFactory.libraryDirective2("l")]));
   }
 
   void test_visitCompilationUnit_script_directives_declarations() {
-    _assertSource("!#/bin/dartvm library l; var a;", AstFactory
-        .compilationUnit8("!#/bin/dartvm", [AstFactory.libraryDirective2("l")],
-            [
-      AstFactory.topLevelVariableDeclaration2(
-          Keyword.VAR, [AstFactory.variableDeclaration("a")])
-    ]));
+    _assertSource(
+        "!#/bin/dartvm library l; var a;",
+        AstFactory.compilationUnit8("!#/bin/dartvm", [
+          AstFactory.libraryDirective2("l")
+        ], [
+          AstFactory.topLevelVariableDeclaration2(
+              Keyword.VAR, [AstFactory.variableDeclaration("a")])
+        ]));
   }
 
   void test_visitConditionalExpression() {
-    _assertSource("a ? b : c", AstFactory.conditionalExpression(
-        AstFactory.identifier3("a"), AstFactory.identifier3("b"),
-        AstFactory.identifier3("c")));
+    _assertSource(
+        "a ? b : c",
+        AstFactory.conditionalExpression(AstFactory.identifier3("a"),
+            AstFactory.identifier3("b"), AstFactory.identifier3("c")));
   }
 
   void test_visitConstructorDeclaration_const() {
-    _assertSource("const C() {}", AstFactory.constructorDeclaration2(
-        Keyword.CONST, null, AstFactory.identifier3("C"), null,
-        AstFactory.formalParameterList(), null,
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "const C() {}",
+        AstFactory.constructorDeclaration2(
+            Keyword.CONST,
+            null,
+            AstFactory.identifier3("C"),
+            null,
+            AstFactory.formalParameterList(),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_external() {
-    _assertSource("external C();", AstFactory.constructorDeclaration(
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(),
-        null));
+    _assertSource(
+        "external C();",
+        AstFactory.constructorDeclaration(AstFactory.identifier3("C"), null,
+            AstFactory.formalParameterList(), null));
   }
 
   void test_visitConstructorDeclaration_minimal() {
-    _assertSource("C() {}", AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(),
-        null, AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "C() {}",
+        AstFactory.constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3("C"),
+            null,
+            AstFactory.formalParameterList(),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_multipleInitializers() {
-    _assertSource("C() : a = b, c = d {}", AstFactory.constructorDeclaration2(
-        null, null, AstFactory.identifier3("C"), null,
-        AstFactory.formalParameterList(), [
-      AstFactory.constructorFieldInitializer(
-          false, "a", AstFactory.identifier3("b")),
-      AstFactory.constructorFieldInitializer(
-          false, "c", AstFactory.identifier3("d"))
-    ], AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "C() : a = b, c = d {}",
+        AstFactory.constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3("C"),
+            null,
+            AstFactory.formalParameterList(),
+            [
+              AstFactory.constructorFieldInitializer(
+                  false, "a", AstFactory.identifier3("b")),
+              AstFactory.constructorFieldInitializer(
+                  false, "c", AstFactory.identifier3("d"))
+            ],
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_multipleParameters() {
-    _assertSource("C(var a, var b) {}", AstFactory.constructorDeclaration2(null,
-        null, AstFactory.identifier3("C"), null, AstFactory.formalParameterList(
-            [
-      AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-      AstFactory.simpleFormalParameter(Keyword.VAR, "b")
-    ]), null, AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "C(var a, var b) {}",
+        AstFactory.constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3("C"),
+            null,
+            AstFactory.formalParameterList([
+              AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+              AstFactory.simpleFormalParameter(Keyword.VAR, "b")
+            ]),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_named() {
-    _assertSource("C.m() {}", AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), "m", AstFactory.formalParameterList(),
-        null, AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "C.m() {}",
+        AstFactory.constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3("C"),
+            "m",
+            AstFactory.formalParameterList(),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_singleInitializer() {
-    _assertSource("C() : a = b {}", AstFactory.constructorDeclaration2(null,
-        null, AstFactory.identifier3("C"), null,
-        AstFactory.formalParameterList(), [
-      AstFactory.constructorFieldInitializer(
-          false, "a", AstFactory.identifier3("b"))
-    ], AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "C() : a = b {}",
+        AstFactory.constructorDeclaration2(
+            null,
+            null,
+            AstFactory.identifier3("C"),
+            null,
+            AstFactory.formalParameterList(),
+            [
+              AstFactory.constructorFieldInitializer(
+                  false, "a", AstFactory.identifier3("b"))
+            ],
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_withMetadata() {
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        null, null, AstFactory.identifier3("C"), null,
-        AstFactory.formalParameterList(), null,
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        null,
         AstFactory.blockFunctionBody2());
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
@@ -1986,13 +2252,17 @@
   }
 
   void test_visitConstructorFieldInitializer_withoutThis() {
-    _assertSource("a = b", AstFactory.constructorFieldInitializer(
-        false, "a", AstFactory.identifier3("b")));
+    _assertSource(
+        "a = b",
+        AstFactory.constructorFieldInitializer(
+            false, "a", AstFactory.identifier3("b")));
   }
 
   void test_visitConstructorFieldInitializer_withThis() {
-    _assertSource("this.a = b", AstFactory.constructorFieldInitializer(
-        true, "a", AstFactory.identifier3("b")));
+    _assertSource(
+        "this.a = b",
+        AstFactory.constructorFieldInitializer(
+            true, "a", AstFactory.identifier3("b")));
   }
 
   void test_visitConstructorName_named_prefix() {
@@ -2006,8 +2276,10 @@
   }
 
   void test_visitConstructorName_unnamed_prefix() {
-    _assertSource("p.C", AstFactory.constructorName(
-        AstFactory.typeName3(AstFactory.identifier5("p", "C")), null));
+    _assertSource(
+        "p.C",
+        AstFactory.constructorName(
+            AstFactory.typeName3(AstFactory.identifier5("p", "C")), null));
   }
 
   void test_visitContinueStatement_label() {
@@ -2019,28 +2291,38 @@
   }
 
   void test_visitDefaultFormalParameter_named_noValue() {
-    _assertSource("p", AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), null));
+    _assertSource(
+        "p",
+        AstFactory.namedFormalParameter(
+            AstFactory.simpleFormalParameter3("p"), null));
   }
 
   void test_visitDefaultFormalParameter_named_value() {
-    _assertSource("p : 0", AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
+    _assertSource(
+        "p : 0",
+        AstFactory.namedFormalParameter(
+            AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
   }
 
   void test_visitDefaultFormalParameter_positional_noValue() {
-    _assertSource("p", AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), null));
+    _assertSource(
+        "p",
+        AstFactory.positionalFormalParameter(
+            AstFactory.simpleFormalParameter3("p"), null));
   }
 
   void test_visitDefaultFormalParameter_positional_value() {
-    _assertSource("p = 0", AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
+    _assertSource(
+        "p = 0",
+        AstFactory.positionalFormalParameter(
+            AstFactory.simpleFormalParameter3("p"), AstFactory.integer(0)));
   }
 
   void test_visitDoStatement() {
-    _assertSource("do {} while (c);", AstFactory.doStatement(
-        AstFactory.block(), AstFactory.identifier3("c")));
+    _assertSource(
+        "do {} while (c);",
+        AstFactory.doStatement(
+            AstFactory.block(), AstFactory.identifier3("c")));
   }
 
   void test_visitDoubleLiteral() {
@@ -2065,16 +2347,20 @@
   }
 
   void test_visitExportDirective_combinator() {
-    _assertSource("export 'a.dart' show A;", AstFactory.exportDirective2(
-        "a.dart", [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertSource(
+        "export 'a.dart' show A;",
+        AstFactory.exportDirective2("a.dart", [
+          AstFactory.showCombinator([AstFactory.identifier3("A")])
+        ]));
   }
 
   void test_visitExportDirective_combinators() {
-    _assertSource("export 'a.dart' show A hide B;", AstFactory.exportDirective2(
-        "a.dart", [
-      AstFactory.showCombinator([AstFactory.identifier3("A")]),
-      AstFactory.hideCombinator([AstFactory.identifier3("B")])
-    ]));
+    _assertSource(
+        "export 'a.dart' show A hide B;",
+        AstFactory.exportDirective2("a.dart", [
+          AstFactory.showCombinator([AstFactory.identifier3("A")]),
+          AstFactory.hideCombinator([AstFactory.identifier3("B")])
+        ]));
   }
 
   void test_visitExportDirective_minimal() {
@@ -2109,13 +2395,17 @@
   }
 
   void test_visitFieldDeclaration_instance() {
-    _assertSource("var a;", AstFactory.fieldDeclaration2(
-        false, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
+    _assertSource(
+        "var a;",
+        AstFactory.fieldDeclaration2(
+            false, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
   }
 
   void test_visitFieldDeclaration_static() {
-    _assertSource("static var a;", AstFactory.fieldDeclaration2(
-        true, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
+    _assertSource(
+        "static var a;",
+        AstFactory.fieldDeclaration2(
+            true, Keyword.VAR, [AstFactory.variableDeclaration("a")]));
   }
 
   void test_visitFieldDeclaration_withMetadata() {
@@ -2127,19 +2417,30 @@
   }
 
   void test_visitFieldFormalParameter_functionTyped() {
-    _assertSource("A this.a(b)", AstFactory.fieldFormalParameter(null,
-        AstFactory.typeName4("A"), "a", AstFactory
-            .formalParameterList([AstFactory.simpleFormalParameter3("b")])));
+    _assertSource(
+        "A this.a(b)",
+        AstFactory.fieldFormalParameter(
+            null,
+            AstFactory.typeName4("A"),
+            "a",
+            AstFactory.formalParameterList(
+                [AstFactory.simpleFormalParameter3("b")])));
   }
 
   void test_visitFieldFormalParameter_functionTyped_typeParameters() {
-    _assertSource("A this.a<E, F>(b)", new FieldFormalParameter(null, null,
-        null, AstFactory.typeName4('A'),
-        TokenFactory.tokenFromKeyword(Keyword.THIS),
-        TokenFactory.tokenFromType(TokenType.PERIOD),
-        AstFactory.identifier3('a'), AstFactory.typeParameterList(['E', 'F']),
-        AstFactory
-            .formalParameterList([AstFactory.simpleFormalParameter3("b")])));
+    _assertSource(
+        "A this.a<E, F>(b)",
+        new FieldFormalParameter(
+            null,
+            null,
+            null,
+            AstFactory.typeName4('A'),
+            TokenFactory.tokenFromKeyword(Keyword.THIS),
+            TokenFactory.tokenFromType(TokenType.PERIOD),
+            AstFactory.identifier3('a'),
+            AstFactory.typeParameterList(['E', 'F']),
+            AstFactory.formalParameterList(
+                [AstFactory.simpleFormalParameter3("b")])));
   }
 
   void test_visitFieldFormalParameter_keyword() {
@@ -2148,8 +2449,10 @@
   }
 
   void test_visitFieldFormalParameter_keywordAndType() {
-    _assertSource("final A this.a", AstFactory.fieldFormalParameter(
-        Keyword.FINAL, AstFactory.typeName4("A"), "a"));
+    _assertSource(
+        "final A this.a",
+        AstFactory.fieldFormalParameter(
+            Keyword.FINAL, AstFactory.typeName4("A"), "a"));
   }
 
   void test_visitFieldFormalParameter_type() {
@@ -2158,28 +2461,38 @@
   }
 
   void test_visitForEachStatement_declared() {
-    _assertSource("for (a in b) {}", AstFactory.forEachStatement(
-        AstFactory.declaredIdentifier3("a"), AstFactory.identifier3("b"),
-        AstFactory.block()));
+    _assertSource(
+        "for (var a in b) {}",
+        AstFactory.forEachStatement(AstFactory.declaredIdentifier3("a"),
+            AstFactory.identifier3("b"), AstFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
-    _assertSource("for (a in b) {}", new ForEachStatement.withReference(null,
-        TokenFactory.tokenFromKeyword(Keyword.FOR),
-        TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-        AstFactory.identifier3("a"), TokenFactory.tokenFromKeyword(Keyword.IN),
-        AstFactory.identifier3("b"),
-        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), AstFactory.block()));
+    _assertSource(
+        "for (a in b) {}",
+        new ForEachStatement.withReference(
+            null,
+            TokenFactory.tokenFromKeyword(Keyword.FOR),
+            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            AstFactory.identifier3("a"),
+            TokenFactory.tokenFromKeyword(Keyword.IN),
+            AstFactory.identifier3("b"),
+            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            AstFactory.block()));
   }
 
   void test_visitForEachStatement_variable_await() {
-    _assertSource("await for (a in b) {}", new ForEachStatement.withReference(
-        TokenFactory.tokenFromString("await"),
-        TokenFactory.tokenFromKeyword(Keyword.FOR),
-        TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-        AstFactory.identifier3("a"), TokenFactory.tokenFromKeyword(Keyword.IN),
-        AstFactory.identifier3("b"),
-        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), AstFactory.block()));
+    _assertSource(
+        "await for (a in b) {}",
+        new ForEachStatement.withReference(
+            TokenFactory.tokenFromString("await"),
+            TokenFactory.tokenFromKeyword(Keyword.FOR),
+            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            AstFactory.identifier3("a"),
+            TokenFactory.tokenFromKeyword(Keyword.IN),
+            AstFactory.identifier3("b"),
+            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            AstFactory.block()));
   }
 
   void test_visitFormalParameterList_empty() {
@@ -2187,196 +2500,266 @@
   }
 
   void test_visitFormalParameterList_n() {
-    _assertSource("({a : 0})", AstFactory.formalParameterList([
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))
-    ]));
+    _assertSource(
+        "({a : 0})",
+        AstFactory.formalParameterList([
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))
+        ]));
   }
 
   void test_visitFormalParameterList_nn() {
-    _assertSource("({a : 0, b : 1})", AstFactory.formalParameterList([
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
-    ]));
+    _assertSource(
+        "({a : 0, b : 1})",
+        AstFactory.formalParameterList([
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
+        ]));
   }
 
   void test_visitFormalParameterList_p() {
-    _assertSource("([a = 0])", AstFactory.formalParameterList([
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))
-    ]));
+    _assertSource(
+        "([a = 0])",
+        AstFactory.formalParameterList([
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0))
+        ]));
   }
 
   void test_visitFormalParameterList_pp() {
-    _assertSource("([a = 0, b = 1])", AstFactory.formalParameterList([
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
-    ]));
+    _assertSource(
+        "([a = 0, b = 1])",
+        AstFactory.formalParameterList([
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("a"), AstFactory.integer(0)),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
+        ]));
   }
 
   void test_visitFormalParameterList_r() {
-    _assertSource("(a)", AstFactory
-        .formalParameterList([AstFactory.simpleFormalParameter3("a")]));
+    _assertSource(
+        "(a)",
+        AstFactory
+            .formalParameterList([AstFactory.simpleFormalParameter3("a")]));
   }
 
   void test_visitFormalParameterList_rn() {
-    _assertSource("(a, {b : 1})", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
-    ]));
+    _assertSource(
+        "(a, {b : 1})",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
+        ]));
   }
 
   void test_visitFormalParameterList_rnn() {
-    _assertSource("(a, {b : 1, c : 2})", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))
-    ]));
+    _assertSource(
+        "(a, {b : 1, c : 2})",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))
+        ]));
   }
 
   void test_visitFormalParameterList_rp() {
-    _assertSource("(a, [b = 1])", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
-    ]));
+    _assertSource(
+        "(a, [b = 1])",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1))
+        ]));
   }
 
   void test_visitFormalParameterList_rpp() {
-    _assertSource("(a, [b = 1, c = 2])", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))
-    ]));
+    _assertSource(
+        "(a, [b = 1, c = 2])",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("b"), AstFactory.integer(1)),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(2))
+        ]));
   }
 
   void test_visitFormalParameterList_rr() {
-    _assertSource("(a, b)", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.simpleFormalParameter3("b")
-    ]));
+    _assertSource(
+        "(a, b)",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.simpleFormalParameter3("b")
+        ]));
   }
 
   void test_visitFormalParameterList_rrn() {
-    _assertSource("(a, b, {c : 3})", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.simpleFormalParameter3("b"),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))
-    ]));
+    _assertSource(
+        "(a, b, {c : 3})",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.simpleFormalParameter3("b"),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))
+        ]));
   }
 
   void test_visitFormalParameterList_rrnn() {
-    _assertSource("(a, b, {c : 3, d : 4})", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.simpleFormalParameter3("b"),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
-      AstFactory.namedFormalParameter(
-          AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))
-    ]));
+    _assertSource(
+        "(a, b, {c : 3, d : 4})",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.simpleFormalParameter3("b"),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
+          AstFactory.namedFormalParameter(
+              AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))
+        ]));
   }
 
   void test_visitFormalParameterList_rrp() {
-    _assertSource("(a, b, [c = 3])", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.simpleFormalParameter3("b"),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))
-    ]));
+    _assertSource(
+        "(a, b, [c = 3])",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.simpleFormalParameter3("b"),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3))
+        ]));
   }
 
   void test_visitFormalParameterList_rrpp() {
-    _assertSource("(a, b, [c = 3, d = 4])", AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter3("a"),
-      AstFactory.simpleFormalParameter3("b"),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
-      AstFactory.positionalFormalParameter(
-          AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))
-    ]));
+    _assertSource(
+        "(a, b, [c = 3, d = 4])",
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter3("a"),
+          AstFactory.simpleFormalParameter3("b"),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("c"), AstFactory.integer(3)),
+          AstFactory.positionalFormalParameter(
+              AstFactory.simpleFormalParameter3("d"), AstFactory.integer(4))
+        ]));
   }
 
   void test_visitForStatement_c() {
-    _assertSource("for (; c;) {}", AstFactory.forStatement(
-        null, AstFactory.identifier3("c"), null, AstFactory.block()));
+    _assertSource(
+        "for (; c;) {}",
+        AstFactory.forStatement(
+            null, AstFactory.identifier3("c"), null, AstFactory.block()));
   }
 
   void test_visitForStatement_cu() {
-    _assertSource("for (; c; u) {}", AstFactory.forStatement(null,
-        AstFactory.identifier3("c"), [AstFactory.identifier3("u")],
-        AstFactory.block()));
+    _assertSource(
+        "for (; c; u) {}",
+        AstFactory.forStatement(null, AstFactory.identifier3("c"),
+            [AstFactory.identifier3("u")], AstFactory.block()));
   }
 
   void test_visitForStatement_e() {
-    _assertSource("for (e;;) {}", AstFactory.forStatement(
-        AstFactory.identifier3("e"), null, null, AstFactory.block()));
+    _assertSource(
+        "for (e;;) {}",
+        AstFactory.forStatement(
+            AstFactory.identifier3("e"), null, null, AstFactory.block()));
   }
 
   void test_visitForStatement_ec() {
-    _assertSource("for (e; c;) {}", AstFactory.forStatement(
-        AstFactory.identifier3("e"), AstFactory.identifier3("c"), null,
-        AstFactory.block()));
+    _assertSource(
+        "for (e; c;) {}",
+        AstFactory.forStatement(AstFactory.identifier3("e"),
+            AstFactory.identifier3("c"), null, AstFactory.block()));
   }
 
   void test_visitForStatement_ecu() {
-    _assertSource("for (e; c; u) {}", AstFactory.forStatement(
-        AstFactory.identifier3("e"), AstFactory.identifier3("c"),
-        [AstFactory.identifier3("u")], AstFactory.block()));
+    _assertSource(
+        "for (e; c; u) {}",
+        AstFactory.forStatement(
+            AstFactory.identifier3("e"),
+            AstFactory.identifier3("c"),
+            [AstFactory.identifier3("u")],
+            AstFactory.block()));
   }
 
   void test_visitForStatement_eu() {
-    _assertSource("for (e;; u) {}", AstFactory.forStatement(
-        AstFactory.identifier3("e"), null, [AstFactory.identifier3("u")],
-        AstFactory.block()));
+    _assertSource(
+        "for (e;; u) {}",
+        AstFactory.forStatement(AstFactory.identifier3("e"), null,
+            [AstFactory.identifier3("u")], AstFactory.block()));
   }
 
   void test_visitForStatement_i() {
-    _assertSource("for (var i;;) {}", AstFactory.forStatement2(AstFactory
-            .variableDeclarationList2(
-                Keyword.VAR, [AstFactory.variableDeclaration("i")]), null, null,
-        AstFactory.block()));
+    _assertSource(
+        "for (var i;;) {}",
+        AstFactory.forStatement2(
+            AstFactory.variableDeclarationList2(
+                Keyword.VAR, [AstFactory.variableDeclaration("i")]),
+            null,
+            null,
+            AstFactory.block()));
   }
 
   void test_visitForStatement_ic() {
-    _assertSource("for (var i; c;) {}", AstFactory.forStatement2(AstFactory
-            .variableDeclarationList2(
+    _assertSource(
+        "for (var i; c;) {}",
+        AstFactory.forStatement2(
+            AstFactory.variableDeclarationList2(
                 Keyword.VAR, [AstFactory.variableDeclaration("i")]),
-        AstFactory.identifier3("c"), null, AstFactory.block()));
+            AstFactory.identifier3("c"),
+            null,
+            AstFactory.block()));
   }
 
   void test_visitForStatement_icu() {
-    _assertSource("for (var i; c; u) {}", AstFactory.forStatement2(AstFactory
-            .variableDeclarationList2(
+    _assertSource(
+        "for (var i; c; u) {}",
+        AstFactory.forStatement2(
+            AstFactory.variableDeclarationList2(
                 Keyword.VAR, [AstFactory.variableDeclaration("i")]),
-        AstFactory.identifier3("c"), [AstFactory.identifier3("u")],
-        AstFactory.block()));
+            AstFactory.identifier3("c"),
+            [AstFactory.identifier3("u")],
+            AstFactory.block()));
   }
 
   void test_visitForStatement_iu() {
-    _assertSource("for (var i;; u) {}", AstFactory.forStatement2(AstFactory
-            .variableDeclarationList2(
-                Keyword.VAR, [AstFactory.variableDeclaration("i")]), null,
-        [AstFactory.identifier3("u")], AstFactory.block()));
+    _assertSource(
+        "for (var i;; u) {}",
+        AstFactory.forStatement2(
+            AstFactory.variableDeclarationList2(
+                Keyword.VAR, [AstFactory.variableDeclaration("i")]),
+            null,
+            [AstFactory.identifier3("u")],
+            AstFactory.block()));
   }
 
   void test_visitForStatement_u() {
-    _assertSource("for (;; u) {}", AstFactory.forStatement(
-        null, null, [AstFactory.identifier3("u")], AstFactory.block()));
+    _assertSource(
+        "for (;; u) {}",
+        AstFactory.forStatement(
+            null, null, [AstFactory.identifier3("u")], AstFactory.block()));
+  }
+
+  void test_visitFunctionDeclaration_external() {
+    FunctionDeclaration functionDeclaration = AstFactory.functionDeclaration(
+        null,
+        null,
+        "f",
+        AstFactory.functionExpression2(
+            AstFactory.formalParameterList(), AstFactory.emptyFunctionBody()));
+    functionDeclaration.externalKeyword =
+        TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
+    _assertSource("external f();", functionDeclaration);
   }
 
   void test_visitFunctionDeclaration_getter() {
-    _assertSource("get f() {}", AstFactory.functionDeclaration(
-        null, Keyword.GET, "f", AstFactory.functionExpression()));
+    _assertSource(
+        "get f() {}",
+        AstFactory.functionDeclaration(
+            null, Keyword.GET, "f", AstFactory.functionExpression()));
   }
 
   void test_visitFunctionDeclaration_local_blockBody() {
@@ -2384,43 +2767,68 @@
         null, null, "f", AstFactory.functionExpression());
     FunctionDeclarationStatement fStatement =
         new FunctionDeclarationStatement(f);
-    _assertSource("main() {f() {} 42;}", AstFactory.functionDeclaration(null,
-        null, "main", AstFactory.functionExpression2(
-            AstFactory.formalParameterList(), AstFactory.blockFunctionBody2([
-      fStatement,
-      AstFactory.expressionStatement(AstFactory.integer(42))
-    ]))));
+    _assertSource(
+        "main() {f() {} 42;}",
+        AstFactory.functionDeclaration(
+            null,
+            null,
+            "main",
+            AstFactory.functionExpression2(
+                AstFactory.formalParameterList(),
+                AstFactory.blockFunctionBody2([
+                  fStatement,
+                  AstFactory.expressionStatement(AstFactory.integer(42))
+                ]))));
   }
 
   void test_visitFunctionDeclaration_local_expressionBody() {
-    FunctionDeclaration f = AstFactory.functionDeclaration(null, null, "f",
+    FunctionDeclaration f = AstFactory.functionDeclaration(
+        null,
+        null,
+        "f",
         AstFactory.functionExpression2(AstFactory.formalParameterList(),
             AstFactory.expressionFunctionBody(AstFactory.integer(1))));
     FunctionDeclarationStatement fStatement =
         new FunctionDeclarationStatement(f);
-    _assertSource("main() {f() => 1; 2;}", AstFactory.functionDeclaration(null,
-        null, "main", AstFactory.functionExpression2(
-            AstFactory.formalParameterList(), AstFactory.blockFunctionBody2([
-      fStatement,
-      AstFactory.expressionStatement(AstFactory.integer(2))
-    ]))));
+    _assertSource(
+        "main() {f() => 1; 2;}",
+        AstFactory.functionDeclaration(
+            null,
+            null,
+            "main",
+            AstFactory.functionExpression2(
+                AstFactory.formalParameterList(),
+                AstFactory.blockFunctionBody2([
+                  fStatement,
+                  AstFactory.expressionStatement(AstFactory.integer(2))
+                ]))));
   }
 
   void test_visitFunctionDeclaration_normal() {
-    _assertSource("f() {}", AstFactory.functionDeclaration(
-        null, null, "f", AstFactory.functionExpression()));
+    _assertSource(
+        "f() {}",
+        AstFactory.functionDeclaration(
+            null, null, "f", AstFactory.functionExpression()));
   }
 
   void test_visitFunctionDeclaration_setter() {
-    _assertSource("set f() {}", AstFactory.functionDeclaration(
-        null, Keyword.SET, "f", AstFactory.functionExpression()));
+    _assertSource(
+        "set f() {}",
+        AstFactory.functionDeclaration(
+            null, Keyword.SET, "f", AstFactory.functionExpression()));
   }
 
   void test_visitFunctionDeclaration_typeParameters() {
-    _assertSource("f<E>() {}", AstFactory.functionDeclaration(null, null, "f",
-        AstFactory.functionExpression3(AstFactory.typeParameterList(['E']),
-            AstFactory.formalParameterList(),
-            AstFactory.blockFunctionBody2())));
+    _assertSource(
+        "f<E>() {}",
+        AstFactory.functionDeclaration(
+            null,
+            null,
+            "f",
+            AstFactory.functionExpression3(
+                AstFactory.typeParameterList(['E']),
+                AstFactory.formalParameterList(),
+                AstFactory.blockFunctionBody2())));
   }
 
   void test_visitFunctionDeclaration_withMetadata() {
@@ -2432,8 +2840,10 @@
   }
 
   void test_visitFunctionDeclarationStatement() {
-    _assertSource("f() {}", AstFactory.functionDeclarationStatement(
-        null, null, "f", AstFactory.functionExpression()));
+    _assertSource(
+        "f() {}",
+        AstFactory.functionDeclarationStatement(
+            null, null, "f", AstFactory.functionExpression()));
   }
 
   void test_visitFunctionExpression() {
@@ -2441,9 +2851,10 @@
   }
 
   void test_visitFunctionExpression_typeParameters() {
-    _assertSource("<E>() {}", AstFactory.functionExpression3(
-        AstFactory.typeParameterList(['E']), AstFactory.formalParameterList(),
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "<E>() {}",
+        AstFactory.functionExpression3(AstFactory.typeParameterList(['E']),
+            AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
   }
 
   void test_visitFunctionExpressionInvocation_minimal() {
@@ -2452,21 +2863,27 @@
   }
 
   void test_visitFunctionExpressionInvocation_typeArguments() {
-    _assertSource("f<A>()", AstFactory.functionExpressionInvocation2(
-        AstFactory.identifier3("f"),
-        AstFactory.typeArgumentList([AstFactory.typeName4('A')])));
+    _assertSource(
+        "f<A>()",
+        AstFactory.functionExpressionInvocation2(AstFactory.identifier3("f"),
+            AstFactory.typeArgumentList([AstFactory.typeName4('A')])));
   }
 
   void test_visitFunctionTypeAlias_generic() {
-    _assertSource("typedef A F<B>();", AstFactory.typeAlias(
-        AstFactory.typeName4("A"), "F", AstFactory.typeParameterList(["B"]),
-        AstFactory.formalParameterList()));
+    _assertSource(
+        "typedef A F<B>();",
+        AstFactory.typeAlias(
+            AstFactory.typeName4("A"),
+            "F",
+            AstFactory.typeParameterList(["B"]),
+            AstFactory.formalParameterList()));
   }
 
   void test_visitFunctionTypeAlias_nonGeneric() {
-    _assertSource("typedef A F();", AstFactory.typeAlias(
-        AstFactory.typeName4("A"), "F", null,
-        AstFactory.formalParameterList()));
+    _assertSource(
+        "typedef A F();",
+        AstFactory.typeAlias(AstFactory.typeName4("A"), "F", null,
+            AstFactory.formalParameterList()));
   }
 
   void test_visitFunctionTypeAlias_withMetadata() {
@@ -2482,30 +2899,43 @@
   }
 
   void test_visitFunctionTypedFormalParameter_type() {
-    _assertSource("T f()", AstFactory.functionTypedFormalParameter(
-        AstFactory.typeName4("T"), "f"));
+    _assertSource(
+        "T f()",
+        AstFactory.functionTypedFormalParameter(
+            AstFactory.typeName4("T"), "f"));
   }
 
   void test_visitFunctionTypedFormalParameter_typeParameters() {
-    _assertSource("T f<E>()", new FunctionTypedFormalParameter(null, null,
-        AstFactory.typeName4("T"), AstFactory.identifier3('f'),
-        AstFactory.typeParameterList(['E']),
-        AstFactory.formalParameterList([])));
+    _assertSource(
+        "T f<E>()",
+        new FunctionTypedFormalParameter(
+            null,
+            null,
+            AstFactory.typeName4("T"),
+            AstFactory.identifier3('f'),
+            AstFactory.typeParameterList(['E']),
+            AstFactory.formalParameterList([])));
   }
 
   void test_visitIfStatement_withElse() {
-    _assertSource("if (c) {} else {}", AstFactory.ifStatement2(
-        AstFactory.identifier3("c"), AstFactory.block(), AstFactory.block()));
+    _assertSource(
+        "if (c) {} else {}",
+        AstFactory.ifStatement2(AstFactory.identifier3("c"), AstFactory.block(),
+            AstFactory.block()));
   }
 
   void test_visitIfStatement_withoutElse() {
-    _assertSource("if (c) {}", AstFactory.ifStatement(
-        AstFactory.identifier3("c"), AstFactory.block()));
+    _assertSource(
+        "if (c) {}",
+        AstFactory.ifStatement(
+            AstFactory.identifier3("c"), AstFactory.block()));
   }
 
   void test_visitImplementsClause_multiple() {
-    _assertSource("implements A, B", AstFactory.implementsClause(
-        [AstFactory.typeName4("A"), AstFactory.typeName4("B")]));
+    _assertSource(
+        "implements A, B",
+        AstFactory.implementsClause(
+            [AstFactory.typeName4("A"), AstFactory.typeName4("B")]));
   }
 
   void test_visitImplementsClause_single() {
@@ -2514,17 +2944,20 @@
   }
 
   void test_visitImportDirective_combinator() {
-    _assertSource("import 'a.dart' show A;", AstFactory.importDirective3(
-        "a.dart", null,
-        [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertSource(
+        "import 'a.dart' show A;",
+        AstFactory.importDirective3("a.dart", null, [
+          AstFactory.showCombinator([AstFactory.identifier3("A")])
+        ]));
   }
 
   void test_visitImportDirective_combinators() {
-    _assertSource("import 'a.dart' show A hide B;", AstFactory.importDirective3(
-        "a.dart", null, [
-      AstFactory.showCombinator([AstFactory.identifier3("A")]),
-      AstFactory.hideCombinator([AstFactory.identifier3("B")])
-    ]));
+    _assertSource(
+        "import 'a.dart' show A hide B;",
+        AstFactory.importDirective3("a.dart", null, [
+          AstFactory.showCombinator([AstFactory.identifier3("A")]),
+          AstFactory.hideCombinator([AstFactory.identifier3("B")])
+        ]));
   }
 
   void test_visitImportDirective_deferred() {
@@ -2543,17 +2976,20 @@
   }
 
   void test_visitImportDirective_prefix_combinator() {
-    _assertSource("import 'a.dart' as p show A;", AstFactory.importDirective3(
-        "a.dart", "p",
-        [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertSource(
+        "import 'a.dart' as p show A;",
+        AstFactory.importDirective3("a.dart", "p", [
+          AstFactory.showCombinator([AstFactory.identifier3("A")])
+        ]));
   }
 
   void test_visitImportDirective_prefix_combinators() {
-    _assertSource("import 'a.dart' as p show A hide B;", AstFactory
-        .importDirective3("a.dart", "p", [
-      AstFactory.showCombinator([AstFactory.identifier3("A")]),
-      AstFactory.hideCombinator([AstFactory.identifier3("B")])
-    ]));
+    _assertSource(
+        "import 'a.dart' as p show A hide B;",
+        AstFactory.importDirective3("a.dart", "p", [
+          AstFactory.showCombinator([AstFactory.identifier3("A")]),
+          AstFactory.hideCombinator([AstFactory.identifier3("B")])
+        ]));
   }
 
   void test_visitImportDirective_withMetadata() {
@@ -2564,8 +3000,10 @@
   }
 
   void test_visitImportHideCombinator_multiple() {
-    _assertSource("hide a, b", AstFactory.hideCombinator(
-        [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
+    _assertSource(
+        "hide a, b",
+        AstFactory.hideCombinator(
+            [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
   }
 
   void test_visitImportHideCombinator_single() {
@@ -2574,8 +3012,10 @@
   }
 
   void test_visitImportShowCombinator_multiple() {
-    _assertSource("show a, b", AstFactory.showCombinator(
-        [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
+    _assertSource(
+        "show a, b",
+        AstFactory.showCombinator(
+            [AstFactory.identifier3("a"), AstFactory.identifier3("b")]));
   }
 
   void test_visitImportShowCombinator_single() {
@@ -2584,23 +3024,31 @@
   }
 
   void test_visitIndexExpression() {
-    _assertSource("a[i]", AstFactory.indexExpression(
-        AstFactory.identifier3("a"), AstFactory.identifier3("i")));
+    _assertSource(
+        "a[i]",
+        AstFactory.indexExpression(
+            AstFactory.identifier3("a"), AstFactory.identifier3("i")));
   }
 
   void test_visitInstanceCreationExpression_const() {
-    _assertSource("const C()", AstFactory.instanceCreationExpression2(
-        Keyword.CONST, AstFactory.typeName4("C")));
+    _assertSource(
+        "const C()",
+        AstFactory.instanceCreationExpression2(
+            Keyword.CONST, AstFactory.typeName4("C")));
   }
 
   void test_visitInstanceCreationExpression_named() {
-    _assertSource("new C.c()", AstFactory.instanceCreationExpression3(
-        Keyword.NEW, AstFactory.typeName4("C"), "c"));
+    _assertSource(
+        "new C.c()",
+        AstFactory.instanceCreationExpression3(
+            Keyword.NEW, AstFactory.typeName4("C"), "c"));
   }
 
   void test_visitInstanceCreationExpression_unnamed() {
-    _assertSource("new C()", AstFactory.instanceCreationExpression2(
-        Keyword.NEW, AstFactory.typeName4("C")));
+    _assertSource(
+        "new C()",
+        AstFactory.instanceCreationExpression2(
+            Keyword.NEW, AstFactory.typeName4("C")));
   }
 
   void test_visitIntegerLiteral() {
@@ -2621,13 +3069,17 @@
   }
 
   void test_visitIsExpression_negated() {
-    _assertSource("a is! C", AstFactory.isExpression(
-        AstFactory.identifier3("a"), true, AstFactory.typeName4("C")));
+    _assertSource(
+        "a is! C",
+        AstFactory.isExpression(
+            AstFactory.identifier3("a"), true, AstFactory.typeName4("C")));
   }
 
   void test_visitIsExpression_normal() {
-    _assertSource("a is C", AstFactory.isExpression(
-        AstFactory.identifier3("a"), false, AstFactory.typeName4("C")));
+    _assertSource(
+        "a is C",
+        AstFactory.isExpression(
+            AstFactory.identifier3("a"), false, AstFactory.typeName4("C")));
   }
 
   void test_visitLabel() {
@@ -2635,15 +3087,18 @@
   }
 
   void test_visitLabeledStatement_multiple() {
-    _assertSource("a: b: return;", AstFactory.labeledStatement([
-      AstFactory.label2("a"),
-      AstFactory.label2("b")
-    ], AstFactory.returnStatement()));
+    _assertSource(
+        "a: b: return;",
+        AstFactory.labeledStatement(
+            [AstFactory.label2("a"), AstFactory.label2("b")],
+            AstFactory.returnStatement()));
   }
 
   void test_visitLabeledStatement_single() {
-    _assertSource("a: return;", AstFactory.labeledStatement(
-        [AstFactory.label2("a")], AstFactory.returnStatement()));
+    _assertSource(
+        "a: return;",
+        AstFactory.labeledStatement(
+            [AstFactory.label2("a")], AstFactory.returnStatement()));
   }
 
   void test_visitLibraryDirective() {
@@ -2658,11 +3113,13 @@
   }
 
   void test_visitLibraryIdentifier_multiple() {
-    _assertSource("a.b.c", AstFactory.libraryIdentifier([
-      AstFactory.identifier3("a"),
-      AstFactory.identifier3("b"),
-      AstFactory.identifier3("c")
-    ]));
+    _assertSource(
+        "a.b.c",
+        AstFactory.libraryIdentifier([
+          AstFactory.identifier3("a"),
+          AstFactory.identifier3("b"),
+          AstFactory.identifier3("c")
+        ]));
   }
 
   void test_visitLibraryIdentifier_single() {
@@ -2679,11 +3136,13 @@
   }
 
   void test_visitListLiteral_nonEmpty() {
-    _assertSource("[a, b, c]", AstFactory.listLiteral([
-      AstFactory.identifier3("a"),
-      AstFactory.identifier3("b"),
-      AstFactory.identifier3("c")
-    ]));
+    _assertSource(
+        "[a, b, c]",
+        AstFactory.listLiteral([
+          AstFactory.identifier3("a"),
+          AstFactory.identifier3("b"),
+          AstFactory.identifier3("c")
+        ]));
   }
 
   void test_visitMapLiteral_const() {
@@ -2695,11 +3154,13 @@
   }
 
   void test_visitMapLiteral_nonEmpty() {
-    _assertSource("{'a' : a, 'b' : b, 'c' : c}", AstFactory.mapLiteral2([
-      AstFactory.mapLiteralEntry("a", AstFactory.identifier3("a")),
-      AstFactory.mapLiteralEntry("b", AstFactory.identifier3("b")),
-      AstFactory.mapLiteralEntry("c", AstFactory.identifier3("c"))
-    ]));
+    _assertSource(
+        "{'a' : a, 'b' : b, 'c' : c}",
+        AstFactory.mapLiteral2([
+          AstFactory.mapLiteralEntry("a", AstFactory.identifier3("a")),
+          AstFactory.mapLiteralEntry("b", AstFactory.identifier3("b")),
+          AstFactory.mapLiteralEntry("c", AstFactory.identifier3("c"))
+        ]));
   }
 
   void test_visitMapLiteralEntry() {
@@ -2708,110 +3169,205 @@
   }
 
   void test_visitMethodDeclaration_external() {
-    _assertSource("external m();", AstFactory.methodDeclaration(null, null,
-        null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList()));
+    _assertSource(
+        "external m();",
+        AstFactory.methodDeclaration(null, null, null, null,
+            AstFactory.identifier3("m"), AstFactory.formalParameterList()));
   }
 
   void test_visitMethodDeclaration_external_returnType() {
-    _assertSource("external T m();", AstFactory.methodDeclaration(null,
-        AstFactory.typeName4("T"), null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList()));
+    _assertSource(
+        "external T m();",
+        AstFactory.methodDeclaration(
+            null,
+            AstFactory.typeName4("T"),
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList()));
   }
 
   void test_visitMethodDeclaration_getter() {
-    _assertSource("get m {}", AstFactory.methodDeclaration2(null, null,
-        Keyword.GET, null, AstFactory.identifier3("m"), null,
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "get m {}",
+        AstFactory.methodDeclaration2(
+            null,
+            null,
+            Keyword.GET,
+            null,
+            AstFactory.identifier3("m"),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_getter_returnType() {
-    _assertSource("T get m {}", AstFactory.methodDeclaration2(null,
-        AstFactory.typeName4("T"), Keyword.GET, null,
-        AstFactory.identifier3("m"), null, AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "T get m {}",
+        AstFactory.methodDeclaration2(
+            null,
+            AstFactory.typeName4("T"),
+            Keyword.GET,
+            null,
+            AstFactory.identifier3("m"),
+            null,
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_getter_seturnType() {
-    _assertSource("T set m(var v) {}", AstFactory.methodDeclaration2(null,
-        AstFactory.typeName4("T"), Keyword.SET, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList(
-            [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "T set m(var v) {}",
+        AstFactory.methodDeclaration2(
+            null,
+            AstFactory.typeName4("T"),
+            Keyword.SET,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(
+                [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_minimal() {
-    _assertSource("m() {}", AstFactory.methodDeclaration2(null, null, null,
-        null, AstFactory.identifier3("m"), AstFactory.formalParameterList(),
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "m() {}",
+        AstFactory.methodDeclaration2(
+            null,
+            null,
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_multipleParameters() {
-    _assertSource("m(var a, var b) {}", AstFactory.methodDeclaration2(null,
-        null, null, null, AstFactory.identifier3("m"), AstFactory
-            .formalParameterList([
-      AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-      AstFactory.simpleFormalParameter(Keyword.VAR, "b")
-    ]), AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "m(var a, var b) {}",
+        AstFactory.methodDeclaration2(
+            null,
+            null,
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList([
+              AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+              AstFactory.simpleFormalParameter(Keyword.VAR, "b")
+            ]),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_operator() {
-    _assertSource("operator +() {}", AstFactory.methodDeclaration2(null, null,
-        null, Keyword.OPERATOR, AstFactory.identifier3("+"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "operator +() {}",
+        AstFactory.methodDeclaration2(
+            null,
+            null,
+            null,
+            Keyword.OPERATOR,
+            AstFactory.identifier3("+"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_operator_returnType() {
-    _assertSource("T operator +() {}", AstFactory.methodDeclaration2(null,
-        AstFactory.typeName4("T"), null, Keyword.OPERATOR,
-        AstFactory.identifier3("+"), AstFactory.formalParameterList(),
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "T operator +() {}",
+        AstFactory.methodDeclaration2(
+            null,
+            AstFactory.typeName4("T"),
+            null,
+            Keyword.OPERATOR,
+            AstFactory.identifier3("+"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_returnType() {
-    _assertSource("T m() {}", AstFactory.methodDeclaration2(null,
-        AstFactory.typeName4("T"), null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "T m() {}",
+        AstFactory.methodDeclaration2(
+            null,
+            AstFactory.typeName4("T"),
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_setter() {
-    _assertSource("set m(var v) {}", AstFactory.methodDeclaration2(null, null,
-        Keyword.SET, null, AstFactory.identifier3("m"), AstFactory
-            .formalParameterList(
+    _assertSource(
+        "set m(var v) {}",
+        AstFactory.methodDeclaration2(
+            null,
+            null,
+            Keyword.SET,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(
                 [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
-        AstFactory.blockFunctionBody2()));
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_static() {
-    _assertSource("static m() {}", AstFactory.methodDeclaration2(Keyword.STATIC,
-        null, null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "static m() {}",
+        AstFactory.methodDeclaration2(
+            Keyword.STATIC,
+            null,
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_static_returnType() {
-    _assertSource("static T m() {}", AstFactory.methodDeclaration2(
-        Keyword.STATIC, AstFactory.typeName4("T"), null, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList(),
-        AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "static T m() {}",
+        AstFactory.methodDeclaration2(
+            Keyword.STATIC,
+            AstFactory.typeName4("T"),
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_typeParameters() {
-    _assertSource("m<E>() {}", AstFactory.methodDeclaration3(null, null, null,
-        null, AstFactory.identifier3("m"), AstFactory.typeParameterList(['E']),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertSource(
+        "m<E>() {}",
+        AstFactory.methodDeclaration3(
+            null,
+            null,
+            null,
+            null,
+            AstFactory.identifier3("m"),
+            AstFactory.typeParameterList(['E']),
+            AstFactory.formalParameterList(),
+            AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_withMetadata() {
-    MethodDeclaration declaration = AstFactory.methodDeclaration2(null, null,
-        null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration declaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
     _assertSource("@deprecated m() {}", declaration);
   }
 
   void test_visitMethodInvocation_conditional() {
-    _assertSource("t?.m()", AstFactory.methodInvocation(
-        AstFactory.identifier3("t"), "m", null, TokenType.QUESTION_PERIOD));
+    _assertSource(
+        "t?.m()",
+        AstFactory.methodInvocation(
+            AstFactory.identifier3("t"), "m", null, TokenType.QUESTION_PERIOD));
   }
 
   void test_visitMethodInvocation_noTarget() {
@@ -2824,8 +3380,10 @@
   }
 
   void test_visitMethodInvocation_typeArguments() {
-    _assertSource("m<A>()", AstFactory.methodInvocation3(
-        null, "m", AstFactory.typeArgumentList([AstFactory.typeName4('A')])));
+    _assertSource(
+        "m<A>()",
+        AstFactory.methodInvocation3(null, "m",
+            AstFactory.typeArgumentList([AstFactory.typeName4('A')])));
   }
 
   void test_visitNamedExpression() {
@@ -2834,9 +3392,11 @@
   }
 
   void test_visitNamedFormalParameter() {
-    _assertSource("var a : 0", AstFactory.namedFormalParameter(
-        AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-        AstFactory.integer(0)));
+    _assertSource(
+        "var a : 0",
+        AstFactory.namedFormalParameter(
+            AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+            AstFactory.integer(0)));
   }
 
   void test_visitNativeClause() {
@@ -2881,14 +3441,18 @@
   }
 
   void test_visitPositionalFormalParameter() {
-    _assertSource("var a = 0", AstFactory.positionalFormalParameter(
-        AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-        AstFactory.integer(0)));
+    _assertSource(
+        "var a = 0",
+        AstFactory.positionalFormalParameter(
+            AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+            AstFactory.integer(0)));
   }
 
   void test_visitPostfixExpression() {
-    _assertSource("a++", AstFactory.postfixExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS_PLUS));
+    _assertSource(
+        "a++",
+        AstFactory.postfixExpression(
+            AstFactory.identifier3("a"), TokenType.PLUS_PLUS));
   }
 
   void test_visitPrefixedIdentifier() {
@@ -2896,8 +3460,10 @@
   }
 
   void test_visitPrefixExpression() {
-    _assertSource("-a", AstFactory.prefixExpression(
-        TokenType.MINUS, AstFactory.identifier3("a")));
+    _assertSource(
+        "-a",
+        AstFactory.prefixExpression(
+            TokenType.MINUS, AstFactory.identifier3("a")));
   }
 
   void test_visitPropertyAccess() {
@@ -2906,8 +3472,10 @@
   }
 
   void test_visitPropertyAccess_conditional() {
-    _assertSource("a?.b", AstFactory.propertyAccess2(
-        AstFactory.identifier3("a"), "b", TokenType.QUESTION_PERIOD));
+    _assertSource(
+        "a?.b",
+        AstFactory.propertyAccess2(
+            AstFactory.identifier3("a"), "b", TokenType.QUESTION_PERIOD));
   }
 
   void test_visitRedirectingConstructorInvocation_named() {
@@ -2942,8 +3510,10 @@
   }
 
   void test_visitSimpleFormalParameter_keyword_type() {
-    _assertSource("final A a", AstFactory.simpleFormalParameter2(
-        Keyword.FINAL, AstFactory.typeName4("A"), "a"));
+    _assertSource(
+        "final A a",
+        AstFactory.simpleFormalParameter2(
+            Keyword.FINAL, AstFactory.typeName4("A"), "a"));
   }
 
   void test_visitSimpleFormalParameter_type() {
@@ -2960,11 +3530,13 @@
   }
 
   void test_visitStringInterpolation() {
-    _assertSource("'a\${e}b'", AstFactory.string([
-      AstFactory.interpolationString("'a", "a"),
-      AstFactory.interpolationExpression(AstFactory.identifier3("e")),
-      AstFactory.interpolationString("b'", "b")
-    ]));
+    _assertSource(
+        "'a\${e}b'",
+        AstFactory.string([
+          AstFactory.interpolationString("'a", "a"),
+          AstFactory.interpolationExpression(AstFactory.identifier3("e")),
+          AstFactory.interpolationString("b'", "b")
+        ]));
   }
 
   void test_visitSuperConstructorInvocation() {
@@ -2980,33 +3552,41 @@
   }
 
   void test_visitSwitchCase_multipleLabels() {
-    _assertSource("l1: l2: case a: {}", AstFactory.switchCase2([
-      AstFactory.label2("l1"),
-      AstFactory.label2("l2")
-    ], AstFactory.identifier3("a"), [AstFactory.block()]));
+    _assertSource(
+        "l1: l2: case a: {}",
+        AstFactory.switchCase2(
+            [AstFactory.label2("l1"), AstFactory.label2("l2")],
+            AstFactory.identifier3("a"),
+            [AstFactory.block()]));
   }
 
   void test_visitSwitchCase_multipleStatements() {
-    _assertSource("case a: {} {}", AstFactory.switchCase(
-        AstFactory.identifier3("a"), [AstFactory.block(), AstFactory.block()]));
+    _assertSource(
+        "case a: {} {}",
+        AstFactory.switchCase(AstFactory.identifier3("a"),
+            [AstFactory.block(), AstFactory.block()]));
   }
 
   void test_visitSwitchCase_noLabels() {
-    _assertSource("case a: {}", AstFactory.switchCase(
-        AstFactory.identifier3("a"), [AstFactory.block()]));
+    _assertSource(
+        "case a: {}",
+        AstFactory.switchCase(
+            AstFactory.identifier3("a"), [AstFactory.block()]));
   }
 
   void test_visitSwitchCase_singleLabel() {
-    _assertSource("l1: case a: {}", AstFactory.switchCase2(
-        [AstFactory.label2("l1")], AstFactory.identifier3("a"),
-        [AstFactory.block()]));
+    _assertSource(
+        "l1: case a: {}",
+        AstFactory.switchCase2([AstFactory.label2("l1")],
+            AstFactory.identifier3("a"), [AstFactory.block()]));
   }
 
   void test_visitSwitchDefault_multipleLabels() {
-    _assertSource("l1: l2: default: {}", AstFactory.switchDefault([
-      AstFactory.label2("l1"),
-      AstFactory.label2("l2")
-    ], [AstFactory.block()]));
+    _assertSource(
+        "l1: l2: default: {}",
+        AstFactory.switchDefault(
+            [AstFactory.label2("l1"), AstFactory.label2("l2")],
+            [AstFactory.block()]));
   }
 
   void test_visitSwitchDefault_multipleStatements() {
@@ -3020,16 +3600,19 @@
   }
 
   void test_visitSwitchDefault_singleLabel() {
-    _assertSource("l1: default: {}", AstFactory.switchDefault(
-        [AstFactory.label2("l1")], [AstFactory.block()]));
+    _assertSource(
+        "l1: default: {}",
+        AstFactory.switchDefault(
+            [AstFactory.label2("l1")], [AstFactory.block()]));
   }
 
   void test_visitSwitchStatement() {
-    _assertSource("switch (a) {case 'b': {} default: {}}", AstFactory
-        .switchStatement(AstFactory.identifier3("a"), [
-      AstFactory.switchCase(AstFactory.string2("b"), [AstFactory.block()]),
-      AstFactory.switchDefault2([AstFactory.block()])
-    ]));
+    _assertSource(
+        "switch (a) {case 'b': {} default: {}}",
+        AstFactory.switchStatement(AstFactory.identifier3("a"), [
+          AstFactory.switchCase(AstFactory.string2("b"), [AstFactory.block()]),
+          AstFactory.switchDefault2([AstFactory.block()])
+        ]));
   }
 
   void test_visitSymbolLiteral_multiple() {
@@ -3050,36 +3633,44 @@
   }
 
   void test_visitTopLevelVariableDeclaration_multiple() {
-    _assertSource("var a;", AstFactory.topLevelVariableDeclaration2(
-        Keyword.VAR, [AstFactory.variableDeclaration("a")]));
+    _assertSource(
+        "var a;",
+        AstFactory.topLevelVariableDeclaration2(
+            Keyword.VAR, [AstFactory.variableDeclaration("a")]));
   }
 
   void test_visitTopLevelVariableDeclaration_single() {
-    _assertSource("var a, b;", AstFactory.topLevelVariableDeclaration2(
-        Keyword.VAR, [
-      AstFactory.variableDeclaration("a"),
-      AstFactory.variableDeclaration("b")
-    ]));
+    _assertSource(
+        "var a, b;",
+        AstFactory.topLevelVariableDeclaration2(Keyword.VAR, [
+          AstFactory.variableDeclaration("a"),
+          AstFactory.variableDeclaration("b")
+        ]));
   }
 
   void test_visitTryStatement_catch() {
-    _assertSource("try {} on E {}", AstFactory.tryStatement2(AstFactory.block(),
-        [AstFactory.catchClause3(AstFactory.typeName4("E"))]));
+    _assertSource(
+        "try {} on E {}",
+        AstFactory.tryStatement2(AstFactory.block(),
+            [AstFactory.catchClause3(AstFactory.typeName4("E"))]));
   }
 
   void test_visitTryStatement_catches() {
-    _assertSource("try {} on E {} on F {}", AstFactory.tryStatement2(
-        AstFactory.block(), [
-      AstFactory.catchClause3(AstFactory.typeName4("E")),
-      AstFactory.catchClause3(AstFactory.typeName4("F"))
-    ]));
+    _assertSource(
+        "try {} on E {} on F {}",
+        AstFactory.tryStatement2(AstFactory.block(), [
+          AstFactory.catchClause3(AstFactory.typeName4("E")),
+          AstFactory.catchClause3(AstFactory.typeName4("F"))
+        ]));
   }
 
   void test_visitTryStatement_catchFinally() {
-    _assertSource("try {} on E {} finally {}", AstFactory.tryStatement3(
-        AstFactory.block(),
-        [AstFactory.catchClause3(AstFactory.typeName4("E"))],
-        AstFactory.block()));
+    _assertSource(
+        "try {} on E {} finally {}",
+        AstFactory.tryStatement3(
+            AstFactory.block(),
+            [AstFactory.catchClause3(AstFactory.typeName4("E"))],
+            AstFactory.block()));
   }
 
   void test_visitTryStatement_finally() {
@@ -3088,8 +3679,10 @@
   }
 
   void test_visitTypeArgumentList_multiple() {
-    _assertSource("<E, F>", AstFactory.typeArgumentList(
-        [AstFactory.typeName4("E"), AstFactory.typeName4("F")]));
+    _assertSource(
+        "<E, F>",
+        AstFactory.typeArgumentList(
+            [AstFactory.typeName4("E"), AstFactory.typeName4("F")]));
   }
 
   void test_visitTypeArgumentList_single() {
@@ -3098,13 +3691,18 @@
   }
 
   void test_visitTypeName_multipleArgs() {
-    _assertSource("C<D, E>", AstFactory.typeName4(
-        "C", [AstFactory.typeName4("D"), AstFactory.typeName4("E")]));
+    _assertSource(
+        "C<D, E>",
+        AstFactory.typeName4(
+            "C", [AstFactory.typeName4("D"), AstFactory.typeName4("E")]));
   }
 
   void test_visitTypeName_nestedArg() {
-    _assertSource("C<D<E>>", AstFactory.typeName4(
-        "C", [AstFactory.typeName4("D", [AstFactory.typeName4("E")])]));
+    _assertSource(
+        "C<D<E>>",
+        AstFactory.typeName4("C", [
+          AstFactory.typeName4("D", [AstFactory.typeName4("E")])
+        ]));
   }
 
   void test_visitTypeName_noArgs() {
@@ -3157,19 +3755,22 @@
   }
 
   void test_visitVariableDeclarationList_const_type() {
-    _assertSource("const C a, b", AstFactory.variableDeclarationList(
-        Keyword.CONST, AstFactory.typeName4("C"), [
-      AstFactory.variableDeclaration("a"),
-      AstFactory.variableDeclaration("b")
-    ]));
+    _assertSource(
+        "const C a, b",
+        AstFactory.variableDeclarationList(
+            Keyword.CONST, AstFactory.typeName4("C"), [
+          AstFactory.variableDeclaration("a"),
+          AstFactory.variableDeclaration("b")
+        ]));
   }
 
   void test_visitVariableDeclarationList_final_noType() {
-    _assertSource("final a, b", AstFactory.variableDeclarationList2(
-        Keyword.FINAL, [
-      AstFactory.variableDeclaration("a"),
-      AstFactory.variableDeclaration("b")
-    ]));
+    _assertSource(
+        "final a, b",
+        AstFactory.variableDeclarationList2(Keyword.FINAL, [
+          AstFactory.variableDeclaration("a"),
+          AstFactory.variableDeclaration("b")
+        ]));
   }
 
   void test_visitVariableDeclarationList_final_withMetadata() {
@@ -3184,36 +3785,45 @@
   }
 
   void test_visitVariableDeclarationList_type() {
-    _assertSource("C a, b", AstFactory.variableDeclarationList(null,
-        AstFactory.typeName4("C"), [
-      AstFactory.variableDeclaration("a"),
-      AstFactory.variableDeclaration("b")
-    ]));
+    _assertSource(
+        "C a, b",
+        AstFactory.variableDeclarationList(null, AstFactory.typeName4("C"), [
+          AstFactory.variableDeclaration("a"),
+          AstFactory.variableDeclaration("b")
+        ]));
   }
 
   void test_visitVariableDeclarationList_var() {
-    _assertSource("var a, b", AstFactory.variableDeclarationList2(Keyword.VAR, [
-      AstFactory.variableDeclaration("a"),
-      AstFactory.variableDeclaration("b")
-    ]));
+    _assertSource(
+        "var a, b",
+        AstFactory.variableDeclarationList2(Keyword.VAR, [
+          AstFactory.variableDeclaration("a"),
+          AstFactory.variableDeclaration("b")
+        ]));
   }
 
   void test_visitVariableDeclarationStatement() {
-    _assertSource("C c;", AstFactory.variableDeclarationStatement(null,
-        AstFactory.typeName4("C"), [AstFactory.variableDeclaration("c")]));
+    _assertSource(
+        "C c;",
+        AstFactory.variableDeclarationStatement(null, AstFactory.typeName4("C"),
+            [AstFactory.variableDeclaration("c")]));
   }
 
   void test_visitWhileStatement() {
-    _assertSource("while (c) {}", AstFactory.whileStatement(
-        AstFactory.identifier3("c"), AstFactory.block()));
+    _assertSource(
+        "while (c) {}",
+        AstFactory.whileStatement(
+            AstFactory.identifier3("c"), AstFactory.block()));
   }
 
   void test_visitWithClause_multiple() {
-    _assertSource("with A, B, C", AstFactory.withClause([
-      AstFactory.typeName4("A"),
-      AstFactory.typeName4("B"),
-      AstFactory.typeName4("C")
-    ]));
+    _assertSource(
+        "with A, B, C",
+        AstFactory.withClause([
+          AstFactory.typeName4("A"),
+          AstFactory.typeName4("B"),
+          AstFactory.typeName4("C")
+        ]));
   }
 
   void test_visitWithClause_single() {
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index 29e0b67..2028e70 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -7,13 +7,13 @@
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:unittest/unittest.dart' as _ut;
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'resolver_test.dart';
 
 main() {
-  _ut.groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(CompileTimeErrorCodeTest);
 }
 
@@ -207,10 +207,14 @@
 library L;
 export 'lib1.dart';
 export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -471,7 +475,9 @@
   }
 
   void test_async_used_as_identifier_in_suffix() {
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 int async;
 ''');
@@ -955,7 +961,9 @@
 main() {
   const a.A();
 }'''
-    ], <ErrorCode>[CompileTimeErrorCode.CONST_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.CONST_DEFERRED_CLASS
+    ]);
   }
 
   void test_constDeferredClass_namedConstructor() {
@@ -971,7 +979,9 @@
 main() {
   const a.A.b();
 }'''
-    ], <ErrorCode>[CompileTimeErrorCode.CONST_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.CONST_DEFERRED_CLASS
+    ]);
   }
 
   void test_constEval_newInstance_constConstructor() {
@@ -1411,8 +1421,10 @@
   }
 
   void test_constWithNonType_fromLibrary() {
-    Source source1 = addNamedSource("lib.dart", "");
-    Source source2 = addNamedSource("lib2.dart", r'''
+    Source source1 = addNamedSource("/lib.dart", "");
+    Source source2 = addNamedSource(
+        "/lib2.dart",
+        r'''
 import 'lib.dart' as lib;
 void f() {
   const lib.A();
@@ -1548,16 +1560,22 @@
   }
 
   void test_duplicateDefinition_acrossLibraries() {
-    Source librarySource = addNamedSource("/lib.dart", r'''
+    Source librarySource = addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 
 part 'a.dart';
 part 'b.dart';''');
-    Source sourceA = addNamedSource("/a.dart", r'''
+    Source sourceA = addNamedSource(
+        "/a.dart",
+        r'''
 part of lib;
 
 class A {}''');
-    Source sourceB = addNamedSource("/b.dart", r'''
+    Source sourceB = addNamedSource(
+        "/b.dart",
+        r'''
 part of lib;
 
 class A {}''');
@@ -1830,7 +1848,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 class B extends a.A {}'''
-    ], <ErrorCode>[CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
+    ]);
   }
 
   void test_extendsDeferredClass_classTypeAlias() {
@@ -1843,7 +1863,9 @@
 import 'lib1.dart' deferred as a;
 class M {}
 class C = a.A with M;'''
-    ], <ErrorCode>[CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
+    ]);
   }
 
   void test_extendsDisallowedClass_class_bool() {
@@ -2262,7 +2284,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 class B implements a.A {}'''
-    ], <ErrorCode>[CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
+    ]);
   }
 
   void test_implementsDeferredClass_classTypeAlias() {
@@ -2276,7 +2300,9 @@
 class B {}
 class M {}
 class C = B with M implements a.A;'''
-    ], <ErrorCode>[CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
+    ]);
   }
 
   void test_implementsDisallowedClass_class_bool() {
@@ -2564,10 +2590,8 @@
     // directive for the error, this is such a minor corner case that we don't
     // think we should add the additional computation time to figure out such
     // cases.
-    assertErrors(source, [
-      CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
-      HintCode.UNUSED_IMPORT
-    ]);
+    assertErrors(source,
+        [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
     verify([source]);
   }
 
@@ -2579,10 +2603,8 @@
     // directive for the error, this is such a minor corner case that we don't
     // think we should add the additional computation time to figure out such
     // cases.
-    assertErrors(source, [
-      CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY,
-      HintCode.UNUSED_IMPORT
-    ]);
+    assertErrors(source,
+        [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
     verify([source]);
   }
 
@@ -2591,7 +2613,9 @@
 library lib;
 import 'part.dart';
 A a;''');
-    addNamedSource("/part.dart", r'''
+    addNamedSource(
+        "/part.dart",
+        r'''
 part of lib;
 class A{}''');
     computeLibrarySourceErrors(source);
@@ -2865,7 +2889,9 @@
   }
 
   void test_invalidAnnotation_importWithPrefix_getter() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 get V => 0;''');
     Source source = addSource(r'''
@@ -2879,7 +2905,9 @@
   }
 
   void test_invalidAnnotation_importWithPrefix_notConstantVariable() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 final V = 0;''');
     Source source = addSource(r'''
@@ -2893,7 +2921,9 @@
   }
 
   void test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 typedef V();''');
     Source source = addSource(r'''
@@ -3464,7 +3494,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 class B extends Object with a.A {}'''
-    ], <ErrorCode>[CompileTimeErrorCode.MIXIN_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
+    ]);
   }
 
   void test_mixinDeferredClass_classTypeAlias() {
@@ -3477,7 +3509,9 @@
 import 'lib1.dart' deferred as a;
 class B {}
 class C = B with a.A;'''
-    ], <ErrorCode>[CompileTimeErrorCode.MIXIN_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
+    ]);
   }
 
   void test_mixinHasNoConstructors_mixinApp() {
@@ -4756,7 +4790,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_call() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 g() {}
 ''');
@@ -4773,7 +4809,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_call_loadLibrary() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     Source source = addSource('''
@@ -4789,7 +4827,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_get() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 var x;
 ''');
@@ -4806,7 +4846,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_get_loadLibrary() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     Source source = addSource('''
@@ -4822,7 +4864,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_set() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 var x;
 ''');
@@ -4839,7 +4883,9 @@
   }
 
   void test_prefix_conditionalPropertyAccess_set_loadLibrary() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 ''');
     Source source = addSource('''
@@ -4885,7 +4931,9 @@
   }
 
   void test_prefixCollidesWithTopLevelMembers_functionTypeAlias() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A{}''');
     Source source = addSource(r'''
@@ -4899,7 +4947,9 @@
   }
 
   void test_prefixCollidesWithTopLevelMembers_topLevelFunction() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A{}''');
     Source source = addSource(r'''
@@ -4913,7 +4963,9 @@
   }
 
   void test_prefixCollidesWithTopLevelMembers_topLevelVariable() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A{}''');
     Source source = addSource(r'''
@@ -4927,7 +4979,9 @@
   }
 
   void test_prefixCollidesWithTopLevelMembers_type() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A{}''');
     Source source = addSource(r'''
@@ -4969,7 +5023,9 @@
   }
 
   void test_prefixNotFollowedByDot_conditionalMethodInvocation() {
-    addNamedSource('/lib.dart', '''
+    addNamedSource(
+        '/lib.dart',
+        '''
 library lib;
 g() {}
 ''');
@@ -5547,7 +5603,9 @@
 import 'lib1.dart' deferred as lib;
 import 'lib2.dart' as lib;
 main() { lib.f1(); lib.f2(); }'''
-    ], <ErrorCode>[CompileTimeErrorCode.SHARED_DEFERRED_PREFIX]);
+    ], <ErrorCode>[
+      CompileTimeErrorCode.SHARED_DEFERRED_PREFIX
+    ]);
   }
 
   void test_superInInvalidContext_binaryExpression() {
diff --git a/pkg/analyzer/test/generated/element_test.dart b/pkg/analyzer/test/generated/element_test.dart
index d5f9ffb..14485e2 100644
--- a/pkg/analyzer/test/generated/element_test.dart
+++ b/pkg/analyzer/test/generated/element_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.element_test;
 
 import 'package:analyzer/src/generated/ast.dart';
@@ -19,11 +16,12 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'resolver_test.dart' show TestTypeProvider, AnalysisContextHelper;
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(ElementKindTest);
   runReflectiveTests(FieldElementImplTest);
   runReflectiveTests(FunctionTypeImplTest);
@@ -46,7 +44,9 @@
   void test_computeNode_ClassDeclaration() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 class A {}
 @deprecated class B {}
 enum C {C1, C2, C3}
@@ -99,7 +99,9 @@
   void test_computeNode_ClassTypeAlias() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 abstract class A<K, V> = Object with MapMixin<K, V>;
 ''');
     // prepare CompilationUnitElement
@@ -990,7 +992,9 @@
   void test_getElementAt_multipleUnitsInLibrary() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source libSource = contextHelper.addSource("/my_lib.dart", r'''
+    Source libSource = contextHelper.addSource(
+        "/my_lib.dart",
+        r'''
 library my_lib;
 part 'unit_a.dart';
 part 'unit_b.dart';
@@ -1241,7 +1245,9 @@
   void test_computeNode() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 class A {
   int a;
 }
@@ -1271,7 +1277,8 @@
 @reflectiveTest
 class FunctionTypeImplTest extends EngineTestCase {
   void test_creation() {
-    expect(new FunctionTypeImpl(
+    expect(
+        new FunctionTypeImpl(
             new FunctionElementImpl.forNode(AstFactory.identifier3("f"))),
         isNotNull);
   }
@@ -1415,10 +1422,16 @@
 
   void test_isSubtypeOf_namedParameters_isNotAssignable() {
     // ! ({name: A}) -> void <: ({name: B}) -> void
-    FunctionType t = ElementFactory.functionElement4("t", null, null,
+    FunctionType t = ElementFactory.functionElement4(
+        "t",
+        null,
+        null,
         <String>["name"],
         <ClassElement>[ElementFactory.classElement2("A")]).type;
-    FunctionType s = ElementFactory.functionElement4("s", null, null,
+    FunctionType s = ElementFactory.functionElement4(
+        "s",
+        null,
+        null,
         <String>["name"],
         <ClassElement>[ElementFactory.classElement2("B")]).type;
     expect(t.isSubtypeOf(s), isFalse);
@@ -1514,8 +1527,8 @@
   void test_isSubtypeOf_normalAndPositionalArgs_2() {
     // (a, [a]) -> void <: (a) -> void
     ClassElement a = ElementFactory.classElement2("A");
-    FunctionType t = ElementFactory.functionElement6(
-        "t", <ClassElement>[a], <ClassElement>[a]).type;
+    FunctionType t = ElementFactory
+        .functionElement6("t", <ClassElement>[a], <ClassElement>[a]).type;
     FunctionType s =
         ElementFactory.functionElement5("s", <ClassElement>[a]).type;
     expect(t.isSubtypeOf(s), isTrue);
@@ -1541,8 +1554,8 @@
     ClassElement e = ElementFactory.classElement2("E");
     FunctionType t = ElementFactory.functionElement6(
         "t", <ClassElement>[a, b], <ClassElement>[c, d, e]).type;
-    FunctionType s = ElementFactory.functionElement6(
-        "s", <ClassElement>[a, b, c], <ClassElement>[d]).type;
+    FunctionType s = ElementFactory
+        .functionElement6("s", <ClassElement>[a, b, c], <ClassElement>[d]).type;
     expect(t.isSubtypeOf(s), isTrue);
     expect(s.isSubtypeOf(t), isFalse);
   }
@@ -1674,10 +1687,12 @@
 
   void test_isSubtypeOf_returnType_tNotAssignableToS() {
     // ! () -> A <: () -> B
-    FunctionType t = ElementFactory.functionElement2(
-        "t", ElementFactory.classElement2("A")).type;
-    FunctionType s = ElementFactory.functionElement2(
-        "s", ElementFactory.classElement2("B")).type;
+    FunctionType t = ElementFactory
+        .functionElement2("t", ElementFactory.classElement2("A"))
+        .type;
+    FunctionType s = ElementFactory
+        .functionElement2("s", ElementFactory.classElement2("B"))
+        .type;
     expect(t.isSubtypeOf(s), isFalse);
   }
 
@@ -1721,8 +1736,8 @@
     ClassElement a = ElementFactory.classElement2("A");
     FunctionType t =
         ElementFactory.functionElement5("t", <ClassElement>[a]).type;
-    FunctionType s = ElementFactory.functionElement7(
-        "s", null, <String>["name"], <ClassElement>[a]).type;
+    FunctionType s = ElementFactory
+        .functionElement7("s", null, <String>["name"], <ClassElement>[a]).type;
     expect(t.isSubtypeOf(s), isFalse);
     expect(s.isSubtypeOf(t), isFalse);
   }
@@ -1733,8 +1748,8 @@
     ClassElement a = ElementFactory.classElement2("A");
     FunctionType t =
         ElementFactory.functionElement6("t", null, <ClassElement>[a]).type;
-    FunctionType s = ElementFactory.functionElement7(
-        "s", null, <String>["name"], <ClassElement>[a]).type;
+    FunctionType s = ElementFactory
+        .functionElement7("s", null, <String>["name"], <ClassElement>[a]).type;
     expect(t.isSubtypeOf(s), isFalse);
     expect(s.isSubtypeOf(t), isFalse);
   }
@@ -3139,8 +3154,8 @@
     classA.methods = <MethodElement>[
       ElementFactory.methodElement("call", VoidTypeImpl.instance, [stringType])
     ];
-    FunctionType functionType = ElementFactory.functionElement5(
-        "f", <ClassElement>[stringType.element]).type;
+    FunctionType functionType = ElementFactory
+        .functionElement5("f", <ClassElement>[stringType.element]).type;
     expect(classA.type.isSubtypeOf(functionType), isTrue);
   }
 
@@ -3717,7 +3732,8 @@
 @reflectiveTest
 class LibraryElementImplTest extends EngineTestCase {
   void test_creation() {
-    expect(new LibraryElementImpl.forNode(
+    expect(
+        new LibraryElementImpl.forNode(
             createAnalysisContext(), AstFactory.libraryIdentifier2(["l"])),
         isNotNull);
   }
@@ -3788,10 +3804,12 @@
     AnalysisContext context = createAnalysisContext();
     LibraryElementImpl library = ElementFactory.library(context, "app");
     LibraryElementImpl libraryA = ElementFactory.library(context, "A");
-    libraryA.imports =
-        <ImportElementImpl>[ElementFactory.importFor(library, null)];
-    library.imports =
-        <ImportElementImpl>[ElementFactory.importFor(libraryA, null)];
+    libraryA.imports = <ImportElementImpl>[
+      ElementFactory.importFor(library, null)
+    ];
+    library.imports = <ImportElementImpl>[
+      ElementFactory.importFor(libraryA, null)
+    ];
     List<LibraryElement> libraries = library.visibleLibraries;
     expect(libraries, unorderedEquals(<LibraryElement>[library, libraryA]));
   }
@@ -3809,8 +3827,9 @@
     AnalysisContext context = createAnalysisContext();
     LibraryElementImpl library = ElementFactory.library(context, "app");
     LibraryElementImpl libraryA = ElementFactory.library(context, "A");
-    library.imports =
-        <ImportElementImpl>[ElementFactory.importFor(libraryA, null)];
+    library.imports = <ImportElementImpl>[
+      ElementFactory.importFor(libraryA, null)
+    ];
     List<LibraryElement> libraries = library.visibleLibraries;
     expect(libraries, unorderedEquals(<LibraryElement>[library, libraryA]));
   }
@@ -3821,8 +3840,9 @@
     LibraryElementImpl libraryA = ElementFactory.library(context, "A");
     LibraryElementImpl libraryAA = ElementFactory.library(context, "AA");
     libraryA.exports = <ExportElementImpl>[ElementFactory.exportFor(libraryAA)];
-    library.imports =
-        <ImportElementImpl>[ElementFactory.importFor(libraryA, null)];
+    library.imports = <ImportElementImpl>[
+      ElementFactory.importFor(libraryA, null)
+    ];
     List<LibraryElement> libraries = library.visibleLibraries;
     expect(libraries,
         unorderedEquals(<LibraryElement>[library, libraryA, libraryAA]));
@@ -3834,15 +3854,18 @@
     LibraryElementImpl libraryA = ElementFactory.library(context, "A");
     LibraryElementImpl libraryAA = ElementFactory.library(context, "AA");
     LibraryElementImpl libraryB = ElementFactory.library(context, "B");
-    libraryA.imports =
-        <ImportElementImpl>[ElementFactory.importFor(libraryAA, null)];
+    libraryA.imports = <ImportElementImpl>[
+      ElementFactory.importFor(libraryAA, null)
+    ];
     library.imports = <ImportElementImpl>[
       ElementFactory.importFor(libraryA, null),
       ElementFactory.importFor(libraryB, null)
     ];
     List<LibraryElement> libraries = library.visibleLibraries;
-    expect(libraries, unorderedEquals(
-        <LibraryElement>[library, libraryA, libraryAA, libraryB]));
+    expect(
+        libraries,
+        unorderedEquals(
+            <LibraryElement>[library, libraryA, libraryAA, libraryB]));
   }
 
   void test_getVisibleLibraries_noImports() {
@@ -3886,7 +3909,9 @@
   void test_computeNode() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 abstract class A {
   String m1() => null;
   m2();
@@ -3918,7 +3943,9 @@
     options.analyzeFunctionBodies = false;
     AnalysisContextHelper contextHelper = new AnalysisContextHelper(options);
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 abstract class A {
   String m1() => null;
   m2();
@@ -3968,9 +3995,11 @@
     Element firstElement = ElementFactory.localVariableElement2("xx");
     Element secondElement = ElementFactory.localVariableElement2("yy");
     Element thirdElement = ElementFactory.localVariableElement2("zz");
-    Element result = MultiplyDefinedElementImpl.fromElements(null,
+    Element result = MultiplyDefinedElementImpl.fromElements(
+        null,
         MultiplyDefinedElementImpl.fromElements(
-            null, firstElement, secondElement), thirdElement);
+            null, firstElement, secondElement),
+        thirdElement);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is MultiplyDefinedElement, MultiplyDefinedElement, result);
     List<Element> elements =
@@ -3994,7 +4023,9 @@
   void test_computeNode_DefaultFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 main([int p = 42]) {
 }''');
     // prepare CompilationUnitElement
@@ -4013,7 +4044,9 @@
   void test_computeNode_FieldFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 class A {
   int p;
   A(this.p) {
@@ -4037,7 +4070,9 @@
   void test_computeNode_FunctionTypedFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 main(p(int a, int b)) {
 }''');
     // prepare CompilationUnitElement
@@ -4056,7 +4091,9 @@
   void test_computeNode_SimpleFormalParameter() {
     AnalysisContextHelper contextHelper = new AnalysisContextHelper();
     AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+    Source source = contextHelper.addSource(
+        "/test.dart",
+        r'''
 main(int p) {
 }''');
     // prepare CompilationUnitElement
@@ -4076,7 +4113,8 @@
 @reflectiveTest
 class TypeParameterTypeImplTest extends EngineTestCase {
   void test_creation() {
-    expect(new TypeParameterTypeImpl(
+    expect(
+        new TypeParameterTypeImpl(
             new TypeParameterElementImpl.forNode(AstFactory.identifier3("E"))),
         isNotNull);
   }
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 13c0b66..e4746a4 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.engine_test;
 
 import 'dart:async';
@@ -34,7 +31,7 @@
 import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/string_source.dart';
-import 'package:analyzer/task/model.dart' hide AnalysisTask;
+import 'package:analyzer/task/model.dart' hide AnalysisTask, WorkManager;
 import 'package:html/dom.dart' show Document;
 import 'package:path/path.dart' as pathos;
 import 'package:typed_mock/typed_mock.dart';
@@ -42,12 +39,13 @@
 import 'package:watcher/src/utils.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'all_the_rest_test.dart';
 import 'resolver_test.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   // Tests for the classes used in both old and new analysis implementations.
   runReflectiveTests(SourcesChangedEventTest);
   // Tests for the classes used in the old analysis implementation.
@@ -196,7 +194,9 @@
   SourceFactory _sourceFactory;
 
   void fail_performAnalysisTask_importedLibraryDelete_html() {
-    Source htmlSource = _addSource("/page.html", r'''
+    Source htmlSource = _addSource(
+        "/page.html",
+        r'''
 <html><body><script type="application/dart">
   import 'libB.dart';
   main() {print('hello dart');}
@@ -209,7 +209,8 @@
         _context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 1");
     expect(!_hasAnalysisErrorWithErrorSeverity(_context.getErrors(htmlSource)),
-        isTrue, reason: "htmlSource doesn't have errors");
+        isTrue,
+        reason: "htmlSource doesn't have errors");
     // remove libB.dart content and analyze
     _context.setContents(libBSource, null);
     _analyzeAll_assertFinished();
@@ -310,11 +311,15 @@
   void test_applyChanges_change_flush_element() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source librarySource = _addSource("/lib.dart", r'''
+    Source librarySource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 int a = 0;''');
     expect(_context.computeLibraryElement(librarySource), isNotNull);
-    _context.setContents(librarySource, r'''
+    _context.setContents(
+        librarySource,
+        r'''
 library lib;
 int aa = 0;''');
     expect(_context.getLibraryElement(librarySource), isNull);
@@ -354,8 +359,8 @@
     Element declarationElement = declaration.variables.variables[0].element;
     TopLevelVariableDeclaration use =
         partUnit.declarations[0] as TopLevelVariableDeclaration;
-    Element useElement = (use.variables.variables[
-        0].initializer as SimpleIdentifier).staticElement;
+    Element useElement = (use.variables.variables[0].initializer
+        as SimpleIdentifier).staticElement;
     expect((useElement as PropertyAccessorElement).variable,
         same(declarationElement));
     return pumpEventQueue().then((_) {
@@ -458,11 +463,15 @@
    */
   void test_applyChanges_remove_incremental() {
     MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-    Source source = resourceProvider.newFile('/test.dart', r'''
+    Source source = resourceProvider
+        .newFile(
+            '/test.dart',
+            r'''
 main() {
   print(1);
 }
-''').createSource();
+''')
+        .createSource();
     _context = AnalysisContextFactory.oldContextWithCore();
     _context.analysisOptions = new AnalysisOptionsImpl()..incremental = true;
     _context.applyChanges(new ChangeSet()..addedSource(source));
@@ -470,7 +479,9 @@
     _analyzeAll_assertFinished();
     CompilationUnit unit = _context.getResolvedCompilationUnit2(source, source);
     // add overlay
-    _context.setContents(source, r'''
+    _context.setContents(
+        source,
+        r'''
 main() {
   print(12);
 }
@@ -521,7 +532,9 @@
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
     String comment = "/** Comment */";
-    Source source = _addSource("/test.dart", """
+    Source source = _addSource(
+        "/test.dart",
+        """
 $comment
 class A {}""");
     LibraryElement libraryElement = _context.computeLibraryElement(source);
@@ -668,7 +681,9 @@
   }
 
   void test_computeLineInfo_dart() {
-    Source source = _addSource("/test.dart", r'''
+    Source source = _addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -677,7 +692,9 @@
   }
 
   void test_computeLineInfo_html() {
-    Source source = _addSource("/test.html", r'''
+    Source source = _addSource(
+        "/test.html",
+        r'''
 <html>
   <body>
     <h1>A</h1>
@@ -923,7 +940,9 @@
   }
 
   void test_getElement_constructor_named() {
-    Source source = _addSource("/lib.dart", r'''
+    Source source = _addSource(
+        "/lib.dart",
+        r'''
 class A {
   A.named() {}
 }''');
@@ -937,7 +956,9 @@
   }
 
   void test_getElement_constructor_unnamed() {
-    Source source = _addSource("/lib.dart", r'''
+    Source source = _addSource(
+        "/lib.dart",
+        r'''
 class A {
   A() {}
 }''');
@@ -988,7 +1009,9 @@
   }
 
   void test_getErrors_html_some() {
-    Source source = _addSource("/test.html", r'''
+    Source source = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 </head></html>''');
@@ -1018,7 +1041,9 @@
   void test_getHtmlFilesReferencing_html() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source htmlSource = _addSource("/test.html", r'''
+    Source htmlSource = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 <script type='application/dart' src='test.js'/>
@@ -1034,7 +1059,9 @@
   }
 
   void test_getHtmlFilesReferencing_library() {
-    Source htmlSource = _addSource("/test.html", r'''
+    Source htmlSource = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 <script type='application/dart' src='test.js'/>
@@ -1051,7 +1078,9 @@
   void test_getHtmlFilesReferencing_part() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source htmlSource = _addSource("/test.html", r'''
+    Source htmlSource = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 <script type='application/dart' src='test.js'/>
@@ -1107,7 +1136,9 @@
     _sourceFactory = _context.sourceFactory;
     List<Source> sources = _context.launchableClientLibrarySources;
     expect(sources, hasLength(0));
-    Source source = _addSource("/test.dart", r'''
+    Source source = _addSource(
+        "/test.dart",
+        r'''
 import 'dart:html';
 main() {}''');
     _context.computeLibraryElement(source);
@@ -1129,7 +1160,9 @@
   void test_getLibrariesContaining() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source librarySource = _addSource("/lib.dart", r'''
+    Source librarySource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';''');
     Source partSource = _addSource("/part.dart", "part of lib;");
@@ -1147,11 +1180,15 @@
     _sourceFactory = _context.sourceFactory;
     Source libASource = _addSource("/libA.dart", "library libA;");
     _addSource("/libB.dart", "library libB;");
-    Source lib1Source = _addSource("/lib1.dart", r'''
+    Source lib1Source = _addSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 import 'libA.dart';
 export 'libB.dart';''');
-    Source lib2Source = _addSource("/lib2.dart", r'''
+    Source lib2Source = _addSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 import 'libB.dart';
 export 'libA.dart';''');
@@ -1164,7 +1201,9 @@
   void test_getLibrariesReferencedFromHtml() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source htmlSource = _addSource("/test.html", r'''
+    Source htmlSource = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 <script type='application/dart' src='test.js'/>
@@ -1180,7 +1219,9 @@
   void test_getLibrariesReferencedFromHtml_no() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source htmlSource = _addSource("/test.html", r'''
+    Source htmlSource = _addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.js'/>
 </head></html>''');
@@ -1217,7 +1258,9 @@
   }
 
   void test_getLineInfo() {
-    Source source = _addSource("/test.dart", r'''
+    Source source = _addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -1230,9 +1273,11 @@
 
   void test_getModificationStamp_fromSource() {
     int stamp = 42;
-    expect(_context.getModificationStamp(
-        new AnalysisContextImplTest_Source_getModificationStamp_fromSource(
-            stamp)), stamp);
+    expect(
+        _context.getModificationStamp(
+            new AnalysisContextImplTest_Source_getModificationStamp_fromSource(
+                stamp)),
+        stamp);
   }
 
   void test_getModificationStamp_overridden() {
@@ -1351,7 +1396,9 @@
   void test_isClientLibrary_dart() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source source = _addSource("/test.dart", r'''
+    Source source = _addSource(
+        "/test.dart",
+        r'''
 import 'dart:html';
 
 main() {}''');
@@ -1370,7 +1417,9 @@
   void test_isServerLibrary_dart() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source source = _addSource("/test.dart", r'''
+    Source source = _addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -1435,10 +1484,14 @@
   }
 
   void test_parseHtmlUnit_resolveDirectives() {
-    Source libSource = _addSource("/lib.dart", r'''
+    Source libSource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 class ClassA {}''');
-    Source source = _addSource("/lib.html", r'''
+    Source source = _addSource(
+        "/lib.html",
+        r'''
 <html>
 <head>
   <script type='application/dart'>
@@ -1461,13 +1514,17 @@
   }
 
   void test_performAnalysisTask_addPart() {
-    Source libSource = _addSource("/lib.dart", r'''
+    Source libSource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';''');
     // run all tasks without part
     _analyzeAll_assertFinished();
     // add part and run all tasks
-    Source partSource = _addSource("/part.dart", r'''
+    Source partSource = _addSource(
+        "/part.dart",
+        r'''
 part of lib;
 ''');
     _analyzeAll_assertFinished();
@@ -1556,7 +1613,9 @@
   }
 
   void test_performAnalysisTask_changePartContents_makeItAPart() {
-    Source libSource = _addSource("/lib.dart", r'''
+    Source libSource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';
 void f(x) {}''');
@@ -1569,7 +1628,9 @@
         _context.getResolvedCompilationUnit2(partSource, libSource), isNotNull,
         reason: "part resolved 1");
     // update and analyze
-    _context.setContents(partSource, r'''
+    _context.setContents(
+        partSource,
+        r'''
 part of lib;
 void g() { f(null); }''');
     expect(_context.getResolvedCompilationUnit2(libSource, libSource), isNull,
@@ -1591,18 +1652,24 @@
    * https://code.google.com/p/dart/issues/detail?id=12424
    */
   void test_performAnalysisTask_changePartContents_makeItNotPart() {
-    Source libSource = _addSource("/lib.dart", r'''
+    Source libSource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';
 void f(x) {}''');
-    Source partSource = _addSource("/part.dart", r'''
+    Source partSource = _addSource(
+        "/part.dart",
+        r'''
 part of lib;
 void g() { f(null); }''');
     _analyzeAll_assertFinished();
     expect(_context.getErrors(libSource).errors, hasLength(0));
     expect(_context.getErrors(partSource).errors, hasLength(0));
     // Remove 'part' directive, which should make "f(null)" an error.
-    _context.setContents(partSource, r'''
+    _context.setContents(
+        partSource,
+        r'''
 //part of lib;
 void g() { f(null); }''');
     _analyzeAll_assertFinished();
@@ -1692,7 +1759,8 @@
         _context.getResolvedCompilationUnit2(libASource, libASource), isNotNull,
         reason: "libA resolved 1");
     expect(_hasAnalysisErrorWithErrorSeverity(_context.getErrors(libASource)),
-        isTrue, reason: "libA has an error");
+        isTrue,
+        reason: "libA has an error");
     // add libB.dart and analyze
     Source libBSource = _addSource("/libB.dart", "library libB;");
     _analyzeAll_assertFinished();
@@ -1703,11 +1771,14 @@
         _context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 2");
     expect(!_hasAnalysisErrorWithErrorSeverity(_context.getErrors(libASource)),
-        isTrue, reason: "libA doesn't have errors");
+        isTrue,
+        reason: "libA doesn't have errors");
   }
 
   void test_performAnalysisTask_importedLibraryAdd_html() {
-    Source htmlSource = _addSource("/page.html", r'''
+    Source htmlSource = _addSource(
+        "/page.html",
+        r'''
 <html><body><script type="application/dart">
   import '/libB.dart';
   main() {print('hello dart');}
@@ -1716,7 +1787,8 @@
     expect(_context.getResolvedHtmlUnit(htmlSource), isNotNull,
         reason: "htmlUnit resolved 1");
     expect(_hasAnalysisErrorWithErrorSeverity(_context.getErrors(htmlSource)),
-        isTrue, reason: "htmlSource has an error");
+        isTrue,
+        reason: "htmlSource has an error");
     // add libB.dart and analyze
     Source libBSource = _addSource("/libB.dart", "library libB;");
     _analyzeAll_assertFinished();
@@ -1745,7 +1817,8 @@
         _context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 1");
     expect(!_hasAnalysisErrorWithErrorSeverity(_context.getErrors(libASource)),
-        isTrue, reason: "libA doesn't have errors");
+        isTrue,
+        reason: "libA doesn't have errors");
     // remove libB.dart content and analyze
     _context.setContents(libBSource, null);
     _analyzeAll_assertFinished();
@@ -1753,7 +1826,8 @@
         _context.getResolvedCompilationUnit2(libASource, libASource), isNotNull,
         reason: "libA resolved 2");
     expect(_hasAnalysisErrorWithErrorSeverity(_context.getErrors(libASource)),
-        isTrue, reason: "libA has an error");
+        isTrue,
+        reason: "libA has an error");
   }
 
   void test_performAnalysisTask_IOException() {
@@ -2014,7 +2088,9 @@
   void test_setContents_null() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source librarySource = _addSource("/lib.dart", r'''
+    Source librarySource = _addSource(
+        "/lib.dart",
+        r'''
 library lib;
 int a = 0;''');
     _context.computeLibraryElement(librarySource);
@@ -2055,10 +2131,14 @@
   void test_unreadableSource() {
     _context = AnalysisContextFactory.oldContextWithCore();
     _sourceFactory = _context.sourceFactory;
-    Source test1 = _addSource("/test1.dart", r'''
+    Source test1 = _addSource(
+        "/test1.dart",
+        r'''
 import 'test2.dart';
 library test1;''');
-    Source test2 = _addSource("/test2.dart", r'''
+    Source test2 = _addSource(
+        "/test2.dart",
+        r'''
 import 'test1.dart';
 import 'test3.dart';
 library test2;''');
@@ -2367,6 +2447,7 @@
     expect(exception, isNotNull);
     return null;
   }
+
   @override
   void internalPerform() {
     throw new AnalysisException("Forced exception");
@@ -2445,13 +2526,13 @@
     entry.setValue(DartEntry.PARSE_ERRORS, <AnalysisError>[
       new AnalysisError(source, 0, 0, ParserErrorCode.ABSTRACT_CLASS_MEMBER)
     ]);
-    entry.setValueInLibrary(DartEntry.RESOLUTION_ERRORS, source,
-        <AnalysisError>[
+    entry.setValueInLibrary(
+        DartEntry.RESOLUTION_ERRORS, source, <AnalysisError>[
       new AnalysisError(
           source, 0, 0, CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION)
     ]);
-    entry.setValueInLibrary(DartEntry.VERIFICATION_ERRORS, source,
-        <AnalysisError>[
+    entry.setValueInLibrary(
+        DartEntry.VERIFICATION_ERRORS, source, <AnalysisError>[
       new AnalysisError(
           source, 0, 0, StaticWarningCode.CASE_BLOCK_NOT_TERMINATED)
     ]);
@@ -3487,8 +3568,10 @@
   }
 
   void test_setValue_element() {
-    _setValue(DartEntry.ELEMENT, new LibraryElementImpl.forNode(
-        null, AstFactory.libraryIdentifier2(["lib"])));
+    _setValue(
+        DartEntry.ELEMENT,
+        new LibraryElementImpl.forNode(
+            null, AstFactory.libraryIdentifier2(["lib"])));
   }
 
   void test_setValue_exportedLibraries() {
@@ -3733,7 +3816,9 @@
     ChangeSet changeSet = new ChangeSet();
     changeSet.addedSource(source);
     context.applyChanges(changeSet);
-    context.setContents(source, r'''
+    context.setContents(
+        source,
+        r'''
 library lib;
 class A {
   int f = new A();
@@ -3761,7 +3846,9 @@
 //        "export '\${a}lib3.dart';",
 //        "part '/does/not/exist.dart';",
 //        "class A {}"]));
-    context.setContents(source, r'''
+    context.setContents(
+        source,
+        r'''
 library lib;
 part '/does/not/exist.dart';
 class A {}''');
@@ -3825,14 +3912,17 @@
     GenerateDartHintsTask task = new GenerateDartHintsTask(null, null, null);
     expect(task.accept(new GenerateDartHintsTaskTestTV_accept()), isTrue);
   }
+
   void test_getException() {
     GenerateDartHintsTask task = new GenerateDartHintsTask(null, null, null);
     expect(task.exception, isNull);
   }
+
   void test_getHintMap() {
     GenerateDartHintsTask task = new GenerateDartHintsTask(null, null, null);
     expect(task.hintMap, isNull);
   }
+
   void test_getLibraryElement() {
     InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
     LibraryElement element = ElementFactory.library(context, "lib");
@@ -3840,6 +3930,7 @@
         new GenerateDartHintsTask(context, null, element);
     expect(task.libraryElement, same(element));
   }
+
   void test_perform() {
     InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
     ChangeSet changeSet = new ChangeSet();
@@ -3853,7 +3944,9 @@
         new FileBasedSource(FileUtilities2.createFile("/part.dart"));
     changeSet.addedSource(partSource);
     context.applyChanges(changeSet);
-    context.setContents(librarySource, r'''
+    context.setContents(
+        librarySource,
+        r'''
 library lib;
 import 'unused.dart';
 part 'part.dart';''');
@@ -3903,10 +3996,12 @@
     GenerateDartLintsTask task = new GenerateDartLintsTask(null, null, null);
     expect(task.accept(new GenerateDartLintsTaskTestTV_accept()), isTrue);
   }
+
   void test_exception() {
     GenerateDartLintsTask task = new GenerateDartLintsTask(null, null, null);
     expect(task.exception, isNull);
   }
+
   void test_libraryElement() {
     InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
     LibraryElement element = ElementFactory.library(context, "lib");
@@ -3914,6 +4009,7 @@
         new GenerateDartLintsTask(context, null, element);
     expect(task.libraryElement, same(element));
   }
+
   void test_lintMap() {
     GenerateDartLintsTask task = new GenerateDartLintsTask(null, null, null);
     expect(task.lintMap, isNull);
@@ -3926,7 +4022,9 @@
         new FileBasedSource(FileUtilities2.createFile("/test.dart"));
     changeSet.addedSource(librarySource);
     context.applyChanges(changeSet);
-    context.setContents(librarySource, r'''
+    context.setContents(
+        librarySource,
+        r'''
 library lib;
 ''');
     List<TimestampedData<CompilationUnit>> units = new List<TimestampedData>(1);
@@ -4195,6 +4293,7 @@
   void setUp() {
     _entry.setValueInLibrary(DartEntry.RESOLVED_UNIT, _source, _unit);
   }
+
   void test_cacheResult() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4209,18 +4308,21 @@
     expect(_result.oldLength, 0);
     expect(_result.newLength, 0);
   }
+
   void test_cacheResult_noCache() {
     IncrementalAnalysisCache cache = null;
     CompilationUnit newUnit = new CompilationUnitMock();
     _result = IncrementalAnalysisCache.cacheResult(cache, newUnit);
     expect(_result, isNull);
   }
+
   void test_cacheResult_noCacheNoResult() {
     IncrementalAnalysisCache cache = null;
     CompilationUnit newUnit = null;
     _result = IncrementalAnalysisCache.cacheResult(cache, newUnit);
     expect(_result, isNull);
   }
+
   void test_cacheResult_noResult() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4228,6 +4330,7 @@
     _result = IncrementalAnalysisCache.cacheResult(cache, newUnit);
     expect(_result, isNull);
   }
+
   void test_clear_differentSource() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4235,17 +4338,20 @@
     _result = IncrementalAnalysisCache.clear(cache, otherSource);
     expect(_result, same(cache));
   }
+
   void test_clear_nullCache() {
     IncrementalAnalysisCache cache = null;
     _result = IncrementalAnalysisCache.clear(cache, _source);
     expect(_result, isNull);
   }
+
   void test_clear_sameSource() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
     _result = IncrementalAnalysisCache.clear(cache, _source);
     expect(_result, isNull);
   }
+
   void test_update_append() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4261,6 +4367,7 @@
     expect(_result.oldLength, 2);
     expect(_result.newLength, 4);
   }
+
   void test_update_appendToCachedResult() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4279,6 +4386,7 @@
     expect(_result.oldLength, 0);
     expect(_result.newLength, 1);
   }
+
   void test_update_appendWithNewResolvedUnit() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4296,6 +4404,7 @@
     expect(_result.oldLength, 0);
     expect(_result.newLength, 1);
   }
+
   void test_update_appendWithNoNewResolvedUnit() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4311,6 +4420,7 @@
     expect(_result.oldLength, 2);
     expect(_result.newLength, 4);
   }
+
   void test_update_delete() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4326,6 +4436,7 @@
     expect(_result.oldLength, 2);
     expect(_result.newLength, 1);
   }
+
   void test_update_insert_nonContiguous_after() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4334,6 +4445,7 @@
         cache, _source, "hbazlo", "hbazlox", 6, 0, 1, newEntry);
     expect(_result, isNull);
   }
+
   void test_update_insert_nonContiguous_before() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4342,6 +4454,7 @@
         cache, _source, "hbazlo", "xhbazlo", 0, 0, 1, newEntry);
     expect(_result, isNull);
   }
+
   void test_update_newSource_entry() {
     Source oldSource = new TestSource("blat.dart", "blat");
     DartEntry oldEntry = new DartEntry();
@@ -4362,6 +4475,7 @@
     expect(_result.oldLength, 0);
     expect(_result.newLength, 2);
   }
+
   void test_update_newSource_noEntry() {
     Source oldSource = new TestSource("blat.dart", "blat");
     DartEntry oldEntry = new DartEntry();
@@ -4375,6 +4489,7 @@
         cache, _source, "foo", "foobar", 3, 0, 3, null);
     expect(_result, isNull);
   }
+
   void test_update_noCache_entry() {
     _result = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4388,6 +4503,7 @@
     expect(_result.newLength, 3);
     expect(_result.hasWork, isTrue);
   }
+
   void test_update_noCache_entry_noOldSource_append() {
     _result = IncrementalAnalysisCache.update(
         null, _source, null, "hellxo", 4, 0, 1, _entry);
@@ -4401,21 +4517,25 @@
     expect(_result.newLength, 1);
     expect(_result.hasWork, isTrue);
   }
+
   void test_update_noCache_entry_noOldSource_delete() {
     _result = IncrementalAnalysisCache.update(
         null, _source, null, "helo", 4, 1, 0, _entry);
     expect(_result, isNull);
   }
+
   void test_update_noCache_entry_noOldSource_replace() {
     _result = IncrementalAnalysisCache.update(
         null, _source, null, "helxo", 4, 1, 1, _entry);
     expect(_result, isNull);
   }
+
   void test_update_noCache_noEntry() {
     _result = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, null);
     expect(_result, isNull);
   }
+
   void test_update_replace() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4430,6 +4550,7 @@
     expect(_result.oldLength, 2);
     expect(_result.newLength, 4);
   }
+
   void test_verifyStructure_invalidUnit() {
     String oldCode = "main() {foo;}";
     String newCode = "main() {boo;}";
@@ -4441,18 +4562,21 @@
     _result = IncrementalAnalysisCache.verifyStructure(cache, _source, newUnit);
     expect(_result, isNull);
   }
+
   void test_verifyStructure_noCache() {
     IncrementalAnalysisCache cache = null;
     CompilationUnit newUnit = new CompilationUnitMock();
     _result = IncrementalAnalysisCache.verifyStructure(cache, _source, newUnit);
     expect(_result, isNull);
   }
+
   void test_verifyStructure_noCacheNoUnit() {
     IncrementalAnalysisCache cache = null;
     CompilationUnit newUnit = null;
     _result = IncrementalAnalysisCache.verifyStructure(cache, _source, newUnit);
     expect(_result, isNull);
   }
+
   void test_verifyStructure_noUnit() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4461,6 +4585,7 @@
     expect(_result, same(cache));
     expect(_result.resolvedUnit, same(_unit));
   }
+
   void test_verifyStructure_otherSource() {
     IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
         null, _source, "hello", "hbazlo", 1, 2, 3, _entry);
@@ -4471,6 +4596,7 @@
     expect(_result, same(cache));
     expect(_result.resolvedUnit, same(_unit));
   }
+
   void test_verifyStructure_validUnit() {
     String oldCode = "main() {foo;}";
     String newCode = "main() {boo;}";
@@ -4483,6 +4609,7 @@
     expect(_result, same(cache));
     expect(_result.resolvedUnit, same(goodUnit));
   }
+
   CompilationUnit _parse(String code) {
     Scanner scanner = new Scanner(_source, new CharSequenceReader(code),
         AnalysisErrorListener.NULL_LISTENER);
@@ -4531,8 +4658,14 @@
     CompilationUnit oldUnit = context.resolveCompilationUnit2(source, source);
     expect(oldUnit, isNotNull);
     entry.setValueInLibrary(DartEntry.RESOLVED_UNIT, source, oldUnit);
-    IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(null,
-        source, oldCode, newCode, prefix.length, removed.length, added.length,
+    IncrementalAnalysisCache cache = IncrementalAnalysisCache.update(
+        null,
+        source,
+        oldCode,
+        newCode,
+        prefix.length,
+        removed.length,
+        added.length,
         entry);
     expect(cache, isNotNull);
     IncrementalAnalysisTask task = new IncrementalAnalysisTask(context, cache);
@@ -4554,7 +4687,8 @@
   IncrementalAnalysisTaskTestTV_assertTask(this.task);
   @override
   CompilationUnit visitIncrementalAnalysisTask(
-      IncrementalAnalysisTask incrementalAnalysisTask) => task.compilationUnit;
+          IncrementalAnalysisTask incrementalAnalysisTask) =>
+      task.compilationUnit;
 }
 
 @reflectiveTest
@@ -4566,7 +4700,9 @@
         new FileBasedSource(FileUtilities2.createFile("/test.dart"));
     changeSet.addedSource(librarySource);
     context.applyChanges(changeSet);
-    context.setContents(librarySource, r'''
+    context.setContents(
+        librarySource,
+        r'''
 library lib;
 ''');
 
@@ -4593,7 +4729,9 @@
         new FileBasedSource(FileUtilities2.createFile("/test.dart"));
     changeSet.addedSource(librarySource);
     context.applyChanges(changeSet);
-    context.setContents(librarySource, r'''
+    context.setContents(
+        librarySource,
+        r'''
 library lib;
 ''');
 
@@ -4964,7 +5102,8 @@
 </html>''';
     TestLogger testLogger = new TestLogger();
     ParseHtmlTask task = parseSource(
-        new ParseHtmlTaskTest_non_existing_source(contents), contents,
+        new ParseHtmlTaskTest_non_existing_source(contents),
+        contents,
         testLogger);
     expect(task.referencedLibraries, hasLength(0));
     expect(testLogger.errorCount, 0);
@@ -5061,26 +5200,31 @@
     ResolveDartLibraryTask task = new ResolveDartLibraryTask(null, null, null);
     expect(task.accept(new ResolveDartLibraryTaskTestTV_accept()), isTrue);
   }
+
   void test_getException() {
     ResolveDartLibraryTask task = new ResolveDartLibraryTask(null, null, null);
     expect(task.exception, isNull);
   }
+
   void test_getLibraryResolver() {
     ResolveDartLibraryTask task = new ResolveDartLibraryTask(null, null, null);
     expect(task.libraryResolver, isNull);
   }
+
   void test_getLibrarySource() {
     Source source = new TestSource('/test.dart');
     ResolveDartLibraryTask task =
         new ResolveDartLibraryTask(null, null, source);
     expect(task.librarySource, same(source));
   }
+
   void test_getUnitSource() {
     Source source = new TestSource('/test.dart');
     ResolveDartLibraryTask task =
         new ResolveDartLibraryTask(null, source, null);
     expect(task.unitSource, same(source));
   }
+
   void test_perform_exception() {
     TestSource source = new TestSource();
     source.generateExceptionOnRead = true;
@@ -5089,8 +5233,11 @@
         new ResolveDartLibraryTask(context, source, source);
     task.perform(new ResolveDartLibraryTaskTestTV_perform_exception());
   }
+
   void test_perform_library() {
-    Source source = new TestSource('/test.dart', r'''
+    Source source = new TestSource(
+        '/test.dart',
+        r'''
 library lib;
 class A {}''');
     InternalAnalysisContext context = AnalysisContextFactory.contextWithCore();
@@ -5187,7 +5334,9 @@
     classElement.constructors = <ConstructorElement>[constructorElement];
     unitElement.types = <ClassElement>[classElement];
     Source source = unitElement.source;
-    context.setContents(source, r'''
+    context.setContents(
+        source,
+        r'''
 library lib;
 class A {}''');
     ResolveDartUnitTask task =
@@ -5484,7 +5633,8 @@
 class SourcesChangedListener {
   List<SourcesChangedEvent> actualEvents = [];
 
-  void assertEvent({bool wereSourcesAdded: false,
+  void assertEvent(
+      {bool wereSourcesAdded: false,
       List<Source> changedSources: Source.EMPTY_LIST,
       bool wereSourcesRemovedOrDeleted: false}) {
     if (actualEvents.isEmpty) {
@@ -5516,82 +5666,99 @@
     fail("Unexpected invocation of analysisCache");
     return null;
   }
+
   @override
   AnalysisOptions get analysisOptions {
     fail("Unexpected invocation of getAnalysisOptions");
     return null;
   }
+
   @override
   void set analysisOptions(AnalysisOptions options) {
     fail("Unexpected invocation of setAnalysisOptions");
   }
+
   @override
   void set analysisPriorityOrder(List<Source> sources) {
     fail("Unexpected invocation of setAnalysisPriorityOrder");
   }
+
   @override
   set contentCache(ContentCache value) {
     fail("Unexpected invocation of setContentCache");
   }
+
   @override
   DeclaredVariables get declaredVariables {
     fail("Unexpected invocation of getDeclaredVariables");
     return null;
   }
+
   @override
   List<AnalysisTarget> get explicitTargets {
     fail("Unexpected invocation of visitCacheItems");
     return null;
   }
+
   @override
   List<Source> get htmlSources {
     fail("Unexpected invocation of getHtmlSources");
     return null;
   }
+
   @override
   Stream<ImplicitAnalysisEvent> get implicitAnalysisEvents {
     fail("Unexpected invocation of analyzedSources");
     return null;
   }
+
   @override
   bool get isDisposed {
     fail("Unexpected invocation of isDisposed");
     return false;
   }
+
   @override
   List<Source> get launchableClientLibrarySources {
     fail("Unexpected invocation of getLaunchableClientLibrarySources");
     return null;
   }
+
   @override
   List<Source> get launchableServerLibrarySources {
     fail("Unexpected invocation of getLaunchableServerLibrarySources");
     return null;
   }
+
   @override
   LibraryResolverFactory get libraryResolverFactory {
     fail("Unexpected invocation of getLibraryResolverFactory");
     return null;
   }
+
   @override
   List<Source> get librarySources {
     fail("Unexpected invocation of getLibrarySources");
     return null;
   }
+
   @override
   String get name {
     fail("Unexpected invocation of name");
     return null;
   }
+
   @override
   set name(String value) {
     fail("Unexpected invocation of name");
   }
+
   @override
   Stream<SourcesChangedEvent> get onSourcesChanged {
     fail("Unexpected invocation of onSourcesChanged");
     return null;
   }
+
   @override
   List<Source> get prioritySources {
     fail("Unexpected invocation of getPrioritySources");
@@ -5615,262 +5782,326 @@
     fail("Unexpected invocation of getResolverVisitorFactory");
     return null;
   }
+
   @override
   SourceFactory get sourceFactory {
     fail("Unexpected invocation of getSourceFactory");
     return null;
   }
+
   @override
   void set sourceFactory(SourceFactory factory) {
     fail("Unexpected invocation of setSourceFactory");
   }
+
   @override
   List<Source> get sources {
     fail("Unexpected invocation of sources");
     return null;
   }
+
   @override
   AnalysisContextStatistics get statistics {
     fail("Unexpected invocation of getStatistics");
     return null;
   }
+
   @override
   TypeProvider get typeProvider {
     fail("Unexpected invocation of getTypeProvider");
     return null;
   }
+
   @override
   void set typeProvider(TypeProvider typeProvider) {
     fail("Unexpected invocation of set typeProvider");
   }
+
   @override
   TypeResolverVisitorFactory get typeResolverVisitorFactory {
     fail("Unexpected invocation of getTypeResolverVisitorFactory");
     return null;
   }
+
   @override
   void addListener(AnalysisListener listener) {
     fail("Unexpected invocation of addListener");
   }
+
   @override
   void applyAnalysisDelta(AnalysisDelta delta) {
     fail("Unexpected invocation of applyAnalysisDelta");
   }
+
   @override
   void applyChanges(ChangeSet changeSet) {
     fail("Unexpected invocation of applyChanges");
   }
+
   @override
   String computeDocumentationComment(Element element) {
     fail("Unexpected invocation of computeDocumentationComment");
     return null;
   }
+
   @override
   List<AnalysisError> computeErrors(Source source) {
     fail("Unexpected invocation of computeErrors");
     return null;
   }
+
   @override
   List<Source> computeExportedLibraries(Source source) {
     fail("Unexpected invocation of computeExportedLibraries");
     return null;
   }
+
   @override
   @deprecated
   HtmlElement computeHtmlElement(Source source) {
     fail("Unexpected invocation of computeHtmlElement");
     return null;
   }
+
   @override
   List<Source> computeImportedLibraries(Source source) {
     fail("Unexpected invocation of computeImportedLibraries");
     return null;
   }
+
   @override
   SourceKind computeKindOf(Source source) {
     fail("Unexpected invocation of computeKindOf");
     return null;
   }
+
   @override
   LibraryElement computeLibraryElement(Source source) {
     fail("Unexpected invocation of computeLibraryElement");
     return null;
   }
+
   @override
   LineInfo computeLineInfo(Source source) {
     fail("Unexpected invocation of computeLineInfo");
     return null;
   }
+
   @override
   CompilationUnit computeResolvableCompilationUnit(Source source) {
     fail("Unexpected invocation of computeResolvableCompilationUnit");
     return null;
   }
+
   @override
   Future<CompilationUnit> computeResolvedCompilationUnitAsync(
       Source source, Source librarySource) {
     fail("Unexpected invocation of getResolvedCompilationUnitFuture");
     return null;
   }
+
+  @override
+  Object computeResult(AnalysisTarget target, ResultDescriptor result) {
+    fail("Unexpected invocation of computeResult");
+    return null;
+  }
+
   @override
   void dispose() {
     fail("Unexpected invocation of dispose");
   }
+
   @override
   List<CompilationUnit> ensureResolvedDartUnits(Source source) {
     fail("Unexpected invocation of ensureResolvedDartUnits");
     return null;
   }
+
   @override
   bool exists(Source source) {
     fail("Unexpected invocation of exists");
     return false;
   }
+
   @override
   CacheEntry getCacheEntry(AnalysisTarget target) {
     fail("Unexpected invocation of visitCacheItems");
     return null;
   }
+
   @override
   CompilationUnitElement getCompilationUnitElement(
       Source unitSource, Source librarySource) {
     fail("Unexpected invocation of getCompilationUnitElement");
     return null;
   }
+
   @override
   TimestampedData<String> getContents(Source source) {
     fail("Unexpected invocation of getContents");
     return null;
   }
+
   @override
   InternalAnalysisContext getContextFor(Source source) {
     fail("Unexpected invocation of getContextFor");
     return null;
   }
+
   @override
   Element getElement(ElementLocation location) {
     fail("Unexpected invocation of getElement");
     return null;
   }
+
   @override
   AnalysisErrorInfo getErrors(Source source) {
     fail("Unexpected invocation of getErrors");
     return null;
   }
+
   @override
   @deprecated
   HtmlElement getHtmlElement(Source source) {
     fail("Unexpected invocation of getHtmlElement");
     return null;
   }
+
   @override
   List<Source> getHtmlFilesReferencing(Source source) {
     fail("Unexpected invocation of getHtmlFilesReferencing");
     return null;
   }
+
   @override
   SourceKind getKindOf(Source source) {
     fail("Unexpected invocation of getKindOf");
     return null;
   }
+
   @override
   List<Source> getLibrariesContaining(Source source) {
     fail("Unexpected invocation of getLibrariesContaining");
     return null;
   }
+
   @override
   List<Source> getLibrariesDependingOn(Source librarySource) {
     fail("Unexpected invocation of getLibrariesDependingOn");
     return null;
   }
+
   @override
   List<Source> getLibrariesReferencedFromHtml(Source htmlSource) {
     fail("Unexpected invocation of getLibrariesReferencedFromHtml");
     return null;
   }
+
   @override
   LibraryElement getLibraryElement(Source source) {
     fail("Unexpected invocation of getLibraryElement");
     return null;
   }
+
   @override
   LineInfo getLineInfo(Source source) {
     fail("Unexpected invocation of getLineInfo");
     return null;
   }
+
   @override
   int getModificationStamp(Source source) {
     fail("Unexpected invocation of getModificationStamp");
     return 0;
   }
+
   @override
   ChangeNoticeImpl getNotice(Source source) {
     fail("Unexpected invocation of getNotice");
     return null;
   }
+
   @override
   Namespace getPublicNamespace(LibraryElement library) {
     fail("Unexpected invocation of getPublicNamespace");
     return null;
   }
+
   @override
   CompilationUnit getResolvedCompilationUnit(
       Source unitSource, LibraryElement library) {
     fail("Unexpected invocation of getResolvedCompilationUnit");
     return null;
   }
+
   @override
   CompilationUnit getResolvedCompilationUnit2(
       Source unitSource, Source librarySource) {
     fail("Unexpected invocation of getResolvedCompilationUnit");
     return null;
   }
+
   @override
   @deprecated
   ht.HtmlUnit getResolvedHtmlUnit(Source htmlSource) {
     fail("Unexpected invocation of getResolvedHtmlUnit");
     return null;
   }
+
+  @override
+  Object getResult(AnalysisTarget target, ResultDescriptor result) {
+    fail("Unexpected invocation of getResult");
+    return null;
+  }
+
   @override
   List<Source> getSourcesWithFullName(String path) {
     fail("Unexpected invocation of getSourcesWithFullName");
     return null;
   }
+
   @override
   bool handleContentsChanged(
       Source source, String originalContents, String newContents, bool notify) {
     fail("Unexpected invocation of handleContentsChanged");
     return false;
   }
+
   @override
   void invalidateLibraryHints(Source librarySource) {
     fail("Unexpected invocation of invalidateLibraryHints");
   }
+
   @override
   bool isClientLibrary(Source librarySource) {
     fail("Unexpected invocation of isClientLibrary");
     return false;
   }
+
   @override
   bool isServerLibrary(Source librarySource) {
     fail("Unexpected invocation of isServerLibrary");
     return false;
   }
+
   @override
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
     fail("Unexpected invocation of onResultComputed");
     return null;
   }
+
   @override
   CompilationUnit parseCompilationUnit(Source source) {
     fail("Unexpected invocation of parseCompilationUnit");
     return null;
   }
+
   @override
   Document parseHtmlDocument(Source source) {
     fail("Unexpected invocation of parseHtmlDocument");
     return null;
   }
+
   @override
   ht.HtmlUnit parseHtmlUnit(Source source) {
     fail("Unexpected invocation of parseHtmlUnit");
@@ -5919,6 +6150,7 @@
       int oldLength, int newLength) {
     fail("Unexpected invocation of setChangedContents");
   }
+
   @override
   void setContents(Source source, String contents) {
     fail("Unexpected invocation of setContents");
@@ -6507,52 +6739,62 @@
     fail("Unexpectedly invoked visitGenerateDartErrorsTask");
     return null;
   }
+
   @override
   E visitGenerateDartHintsTask(GenerateDartHintsTask task) {
     fail("Unexpectedly invoked visitGenerateDartHintsTask");
     return null;
   }
+
   @override
   E visitGenerateDartLintsTask(GenerateDartLintsTask task) {
     fail("Unexpectedly invoked visitGenerateDartLintsTask");
     return null;
   }
+
   @override
   E visitGetContentTask(GetContentTask task) {
     fail("Unexpectedly invoked visitGetContentsTask");
     return null;
   }
+
   @override
   E visitIncrementalAnalysisTask(
       IncrementalAnalysisTask incrementalAnalysisTask) {
     fail("Unexpectedly invoked visitIncrementalAnalysisTask");
     return null;
   }
+
   @override
   E visitParseDartTask(ParseDartTask task) {
     fail("Unexpectedly invoked visitParseDartTask");
     return null;
   }
+
   @override
   E visitParseHtmlTask(ParseHtmlTask task) {
     fail("Unexpectedly invoked visitParseHtmlTask");
     return null;
   }
+
   @override
   E visitResolveDartLibraryCycleTask(ResolveDartLibraryCycleTask task) {
     fail("Unexpectedly invoked visitResolveDartLibraryCycleTask");
     return null;
   }
+
   @override
   E visitResolveDartLibraryTask(ResolveDartLibraryTask task) {
     fail("Unexpectedly invoked visitResolveDartLibraryTask");
     return null;
   }
+
   @override
   E visitResolveDartUnitTask(ResolveDartUnitTask task) {
     fail("Unexpectedly invoked visitResolveDartUnitTask");
     return null;
   }
+
   @override
   E visitResolveHtmlTask(ResolveHtmlTask task) {
     fail("Unexpectedly invoked visitResolveHtmlTask");
@@ -6574,9 +6816,11 @@
     TestSource source = new TestSource();
     expect(partition.contains(source), isTrue);
   }
+
   void test_creation() {
     expect(new UniversalCachePartition(null, 8, null), isNotNull);
   }
+
   void test_entrySet() {
     UniversalCachePartition partition =
         new UniversalCachePartition(null, 8, null);
@@ -6589,12 +6833,14 @@
     expect(entryKey, same(source));
     expect(entryMap[entryKey], same(entry));
   }
+
   void test_get() {
     UniversalCachePartition partition =
         new UniversalCachePartition(null, 8, null);
     TestSource source = new TestSource();
     expect(partition.get(source), isNull);
   }
+
   void test_put_noFlush() {
     UniversalCachePartition partition =
         new UniversalCachePartition(null, 8, null);
@@ -6603,6 +6849,7 @@
     partition.put(source, entry);
     expect(partition.get(source), same(entry));
   }
+
   void test_remove() {
     UniversalCachePartition partition =
         new UniversalCachePartition(null, 8, null);
@@ -6613,6 +6860,7 @@
     partition.remove(source);
     expect(partition.get(source), isNull);
   }
+
   void test_setMaxCacheSize() {
     UniversalCachePartition partition = new UniversalCachePartition(
         null, 8, new _UniversalCachePartitionTest_test_setMaxCacheSize());
@@ -6629,6 +6877,7 @@
     partition.maxCacheSize = newSize;
     _assertNonFlushedCount(newSize, partition);
   }
+
   void test_size() {
     UniversalCachePartition partition =
         new UniversalCachePartition(null, 8, null);
@@ -6640,6 +6889,7 @@
     }
     expect(partition.size(), size);
   }
+
   void _assertNonFlushedCount(
       int expectedCount, UniversalCachePartition partition) {
     int nonFlushedCount = 0;
@@ -6665,9 +6915,11 @@
     expect(iterator.next(), same(source2));
     expect(iterator.next(), same(source1));
   }
+
   void test_creation() {
     expect(new WorkManager(), isNotNull);
   }
+
   void test_iterator_empty() {
     WorkManager manager = new WorkManager();
     WorkManager_WorkIterator iterator = manager.iterator();
@@ -6677,6 +6929,7 @@
       fail("Expected NoSuchElementException");
     } on NoSuchElementException {}
   }
+
   void test_iterator_nonEmpty() {
     TestSource source = new TestSource();
     WorkManager manager = new WorkManager();
@@ -6685,6 +6938,7 @@
     expect(iterator.hasNext, isTrue);
     expect(iterator.next(), same(source));
   }
+
   void test_remove() {
     TestSource source1 = new TestSource("/f1.dart");
     TestSource source2 = new TestSource("/f2.dart");
@@ -6698,10 +6952,12 @@
     expect(iterator.next(), same(source1));
     expect(iterator.next(), same(source3));
   }
+
   void test_toString_empty() {
     WorkManager manager = new WorkManager();
     expect(manager.toString(), isNotNull);
   }
+
   void test_toString_nonEmpty() {
     WorkManager manager = new WorkManager();
     manager.add(new TestSource(), SourcePriority.HTML);
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index 7af5e3ab..a08ede7 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -28,13 +28,15 @@
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(DeclarationMatcherTest);
   runReflectiveTests(IncrementalResolverTest);
   runReflectiveTests(PoorMansIncrementalResolutionTest);
   runReflectiveTests(ResolutionContextBuilderTest);
 }
 
+void initializeTestEnvironment() {}
+
 void _assertEqualError(AnalysisError incrError, AnalysisError fullError) {
   expect(incrError.errorCode, same(fullError.errorCode));
   expect(incrError.source, fullError.source);
@@ -68,13 +70,15 @@
   }
 
   void test_false_class_annotation_accessor_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const my_annotationA = const Object();
 const my_annotationB = const Object();
 @my_annotationA
 class A {
 }
-''', r'''
+''',
+        r'''
 const my_annotationA = const Object();
 const my_annotationB = const Object();
 @my_annotationB
@@ -84,7 +88,8 @@
   }
 
   void test_false_class_annotation_constructor_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class MyAnnotationA {
   const MyAnnotationA();
 }
@@ -94,7 +99,8 @@
 @MyAnnotationA()
 class A {
 }
-''', r'''
+''',
+        r'''
 class MyAnnotationA {
   const MyAnnotationA();
 }
@@ -108,11 +114,13 @@
   }
 
   void test_false_class_annotations_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const my_annotation = const Object();
 class A {
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 @my_annotation
 class A {
@@ -121,12 +129,14 @@
   }
 
   void test_false_class_annotations_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const my_annotation = const Object();
 @my_annotation
 class A {
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 class A {
 }
@@ -134,10 +144,12 @@
   }
 
   void test_false_class_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 class C {}
@@ -145,23 +157,27 @@
   }
 
   void test_false_class_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
 class C {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 ''');
   }
 
   void test_false_class_typeParameters_bounds_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B<T> {
   T f;
 }
-''', r'''
+''',
+        r'''
 class A {}
 class B<T extends A> {
   T f;
@@ -170,12 +186,14 @@
   }
 
   void test_false_class_typeParameters_bounds_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B<T extends A> {
   T f;
 }
-''', r'''
+''',
+        r'''
 class A {}
 class B<T> {
   T f;
@@ -184,12 +202,14 @@
   }
 
   void test_false_classMemberAccessor_list_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   get a => 1;
   get b => 2;
 }
-''', r'''
+''',
+        r'''
 class A {
   get a => 1;
   get b => 2;
@@ -199,13 +219,15 @@
   }
 
   void test_false_classMemberAccessor_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   get a => 1;
   get b => 2;
   get c => 3;
 }
-''', r'''
+''',
+        r'''
 class A {
   get a => 1;
   get b => 2;
@@ -214,11 +236,13 @@
   }
 
   void test_false_classMemberAccessor_wasGetter() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   get a => 1;
 }
-''', r'''
+''',
+        r'''
 class A {
   set a(x) {}
 }
@@ -226,11 +250,13 @@
   }
 
   void test_false_classMemberAccessor_wasInstance() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   get a => 1;
 }
-''', r'''
+''',
+        r'''
 class A {
   static get a => 1;
 }
@@ -238,11 +264,13 @@
   }
 
   void test_false_classMemberAccessor_wasSetter() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   set a(x) {}
 }
-''', r'''
+''',
+        r'''
 class A {
   get a => 1;
 }
@@ -250,11 +278,13 @@
   }
 
   void test_false_classMemberAccessor_wasStatic() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   static get a => 1;
 }
-''', r'''
+''',
+        r'''
 class A {
   get a => 1;
 }
@@ -262,10 +292,12 @@
   }
 
   void test_false_classTypeAlias_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class M {}
 class A = Object with M;
-''', r'''
+''',
+        r'''
 class M {}
 class A = Object with M;
 class B = Object with M;
@@ -273,22 +305,26 @@
   }
 
   void test_false_classTypeAlias_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class M {}
 class A = Object with M;
 class B = Object with M;
-''', r'''
+''',
+        r'''
 class M {}
 class A = Object with M;
 ''');
   }
 
   void test_false_classTypeAlias_typeParameters_bounds_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class M<T> {}
 class A {}
 class B<T> = Object with M<T>;
-''', r'''
+''',
+        r'''
 class M<T> {}
 class A {}
 class B<T extends A> = Object with M<T>;
@@ -296,11 +332,13 @@
   }
 
   void test_false_classTypeAlias_typeParameters_bounds_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class M<T> {}
 class A {}
 class B<T extends A> = Object with M<T>;
-''', r'''
+''',
+        r'''
 class M<T> {}
 class A {}
 class B<T> = Object with M<T>;
@@ -308,11 +346,13 @@
   }
 
   void test_false_constructor_keywordConst_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A();
 }
-''', r'''
+''',
+        r'''
 class A {
   const A();
 }
@@ -320,11 +360,13 @@
   }
 
   void test_false_constructor_keywordConst_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   const A();
 }
-''', r'''
+''',
+        r'''
 class A {
   A();
 }
@@ -332,14 +374,16 @@
   }
 
   void test_false_constructor_keywordFactory_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A();
   A.foo() {
     return new A();
   }
 }
-''', r'''
+''',
+        r'''
 class A {
   A();
   factory A.foo() {
@@ -350,14 +394,16 @@
   }
 
   void test_false_constructor_keywordFactory_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A();
   factory A.foo() {
     return new A();
   }
 }
-''', r'''
+''',
+        r'''
 class A {
   A();
   A.foo() {
@@ -368,11 +414,13 @@
   }
 
   void test_false_constructor_parameters_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A();
 }
-''', r'''
+''',
+        r'''
 class A {
   A(int p);
 }
@@ -380,11 +428,13 @@
   }
 
   void test_false_constructor_parameters_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A(int p);
 }
-''', r'''
+''',
+        r'''
 class A {
   A();
 }
@@ -392,11 +442,13 @@
   }
 
   void test_false_constructor_parameters_type_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A(int p);
 }
-''', r'''
+''',
+        r'''
 class A {
   A(String p);
 }
@@ -404,10 +456,12 @@
   }
 
   void test_false_constructor_unnamed_add_hadParameters() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
 }
-''', r'''
+''',
+        r'''
 class A {
   A(int p) {}
 }
@@ -415,23 +469,27 @@
   }
 
   void test_false_constructor_unnamed_remove_hadParameters() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   A(int p) {}
 }
-''', r'''
+''',
+        r'''
 class A {
 }
 ''');
   }
 
   void test_false_defaultFieldFormalParameterElement_wasSimple() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   int field;
   A(int field);
 }
-''', r'''
+''',
+        r'''
 class A {
   int field;
   A([this.field = 0]);
@@ -440,87 +498,107 @@
   }
 
   void test_false_enum_constants_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 enum E {A, B}
-''', r'''
+''',
+        r'''
 enum E {A, B, C}
 ''');
   }
 
   void test_false_enum_constants_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 enum E {A, B, C}
-''', r'''
+''',
+        r'''
 enum E {A, B}
 ''');
   }
 
   void test_false_export_hide_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async' hide Future;
-''', r'''
+''',
+        r'''
 export 'dart:async' hide Future, Stream;
 ''');
   }
 
   void test_false_export_hide_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async' hide Future, Stream;
-''', r'''
+''',
+        r'''
 export 'dart:async' hide Future;
 ''');
   }
 
   void test_false_export_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async';
-''', r'''
+''',
+        r'''
 export 'dart:async';
 export 'dart:math';
 ''');
   }
 
   void test_false_export_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async';
 export 'dart:math';
-''', r'''
+''',
+        r'''
 export 'dart:async';
 ''');
   }
 
   void test_false_export_show_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async' show Future;
-''', r'''
+''',
+        r'''
 export 'dart:async' show Future, Stream;
 ''');
   }
 
   void test_false_export_show_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 export 'dart:async' show Future, Stream;
-''', r'''
+''',
+        r'''
 export 'dart:async' show Future;
 ''');
   }
 
   void test_false_extendsClause_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B extends A {}
 ''');
   }
 
   void test_false_extendsClause_different() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
 class C extends A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 class C extends B {}
@@ -528,22 +606,26 @@
   }
 
   void test_false_extendsClause_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B extends A{}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 ''');
   }
 
   void test_false_field_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   int A = 1;
   int C = 3;
 }
-''', r'''
+''',
+        r'''
 class T {
   int A = 1;
   int B = 2;
@@ -553,13 +635,15 @@
   }
 
   void test_false_field_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   int A = 1;
   int B = 2;
   int C = 3;
 }
-''', r'''
+''',
+        r'''
 class T {
   int A = 1;
   int C = 3;
@@ -568,11 +652,13 @@
   }
 
   void test_false_field_modifier_isConst() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   static final A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   static const A = 1;
 }
@@ -580,11 +666,13 @@
   }
 
   void test_false_field_modifier_isFinal() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   int A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   final int A = 1;
 }
@@ -592,11 +680,13 @@
   }
 
   void test_false_field_modifier_isStatic() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   int A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   static int A = 1;
 }
@@ -604,11 +694,13 @@
   }
 
   void test_false_field_modifier_wasConst() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   static const A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   static final A = 1;
 }
@@ -616,11 +708,13 @@
   }
 
   void test_false_field_modifier_wasFinal() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   final int A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   int A = 1;
 }
@@ -628,11 +722,13 @@
   }
 
   void test_false_field_modifier_wasStatic() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   static int A = 1;
 }
-''', r'''
+''',
+        r'''
 class T {
   int A = 1;
 }
@@ -640,11 +736,13 @@
   }
 
   void test_false_field_type_differentArgs() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   List<int> A;
 }
-''', r'''
+''',
+        r'''
 class T {
   List<String> A;
 }
@@ -652,12 +750,14 @@
   }
 
   void test_false_fieldFormalParameter_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(field);
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field);
@@ -666,12 +766,14 @@
   }
 
   void test_false_fieldFormalParameter_add_function() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(field(a));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field(a));
@@ -680,12 +782,14 @@
   }
 
   void test_false_fieldFormalParameter_parameters_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(this.field(a));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field(a, b));
@@ -694,12 +798,14 @@
   }
 
   void test_false_fieldFormalParameter_parameters_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(this.field(a, b));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field(a));
@@ -708,12 +814,14 @@
   }
 
   void test_false_fieldFormalParameter_parameters_typeEdit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(this.field(int p));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field(String p));
@@ -722,12 +830,14 @@
   }
 
   void test_false_fieldFormalParameter_remove_default() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A([this.field = 0]);
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A([field = 0]);
@@ -736,12 +846,14 @@
   }
 
   void test_false_fieldFormalParameter_remove_function() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(this.field(a));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(field(a));
@@ -750,12 +862,14 @@
   }
 
   void test_false_fieldFormalParameter_remove_normal() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   final field;
   A(this.field);
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(field);
@@ -764,12 +878,14 @@
   }
 
   void test_false_fieldFormalParameterElement_wasSimple() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   int field;
   A(int field);
 }
-''', r'''
+''',
+        r'''
 class A {
   int field;
   A(this.field);
@@ -778,11 +894,13 @@
   }
 
   void test_false_final_type_different() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class T {
   int A;
 }
-''', r'''
+''',
+        r'''
 class T {
   String A;
 }
@@ -790,42 +908,52 @@
   }
 
   void test_false_function_async_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main() {}
-''', r'''
+''',
+        r'''
 main() async {}
 ''');
   }
 
   void test_false_function_async_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main() async {}
-''', r'''
+''',
+        r'''
 main() {}
 ''');
   }
 
   void test_false_function_generator_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main() async {}
-''', r'''
+''',
+        r'''
 main() async* {}
 ''');
   }
 
   void test_false_function_generator_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main() async* {}
-''', r'''
+''',
+        r'''
 main() async {}
 ''');
   }
 
   void test_false_functionTypeAlias_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef A(int pa);
 typedef B(String pb);
-''', r'''
+''',
+        r'''
 typedef A(int pa);
 typedef B(String pb);
 typedef C(pc);
@@ -833,151 +961,183 @@
   }
 
   void test_false_functionTypeAlias_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef A(int pa);
 typedef B(String pb);
 typedef C(pc);
-''', r'''
+''',
+        r'''
 typedef A(int pa);
 typedef B(String pb);
 ''');
   }
 
   void test_false_functionTypeAlias_parameters_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef A(a);
-''', r'''
+''',
+        r'''
 typedef A(a, b);
 ''');
   }
 
   void test_false_functionTypeAlias_parameters_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef A(a, b);
-''', r'''
+''',
+        r'''
 typedef A(a);
 ''');
   }
 
   void test_false_functionTypeAlias_parameters_type_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef A(int p);
-''', r'''
+''',
+        r'''
 typedef A(String p);
 ''');
   }
 
   void test_false_functionTypeAlias_returnType_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef int A();
-''', r'''
+''',
+        r'''
 typedef String A();
 ''');
   }
 
   void test_false_functionTypeAlias_typeParameters_bounds_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 typedef F<T>();
-''', r'''
+''',
+        r'''
 class A {}
 typedef F<T extends A>();
 ''');
   }
 
   void test_false_functionTypeAlias_typeParameters_bounds_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
 typedef F<T extends A>();
-''', r'''
+''',
+        r'''
 class A {}
 typedef F<T extends B>();
 ''');
   }
 
   void test_false_functionTypeAlias_typeParameters_bounds_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 typedef F<T extends A>();
-''', r'''
+''',
+        r'''
 class A {}
 typedef F<T>();
 ''');
   }
 
   void test_false_functionTypeAlias_typeParameters_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef F<A>();
-''', r'''
+''',
+        r'''
 typedef F<A, B>();
 ''');
   }
 
   void test_false_functionTypeAlias_typeParameters_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 typedef F<A, B>();
-''', r'''
+''',
+        r'''
 typedef F<A>();
 ''');
   }
 
   void test_false_FunctionTypedFormalParameter_parameters_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int callback(int a)) {
 }
-''', r'''
+''',
+        r'''
 main(int callback(int a, String b)) {
 }
 ''');
   }
 
   void test_false_FunctionTypedFormalParameter_parameters_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int callback(int a, String b)) {
 }
-''', r'''
+''',
+        r'''
 main(int callback(int a)) {
 }
 ''');
   }
 
   void test_false_FunctionTypedFormalParameter_parameterType() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int callback(int p)) {
 }
-''', r'''
+''',
+        r'''
 main(int callback(String p)) {
 }
 ''');
   }
 
   void test_false_FunctionTypedFormalParameter_returnType() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int callback()) {
 }
-''', r'''
+''',
+        r'''
 main(String callback()) {
 }
 ''');
   }
 
   void test_false_FunctionTypedFormalParameter_wasSimple() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int callback) {
 }
-''', r'''
+''',
+        r'''
 main(int callback(int a, String b)) {
 }
 ''');
   }
 
   void test_false_getter_body_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   int get foo;
 }
-''', r'''
+''',
+        r'''
 class A {
   int get foo => 0;
 }
@@ -985,11 +1145,13 @@
   }
 
   void test_false_getter_body_remove() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   int get foo => 0;
 }
-''', r'''
+''',
+        r'''
 class A {
   int get foo;
 }
@@ -997,31 +1159,37 @@
   }
 
   void test_false_implementsClause_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B implements A {}
 ''');
   }
 
   void test_false_implementsClause_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B implements A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 ''');
   }
 
   void test_false_implementsClause_reorder() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
 class C implements A, B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 class C implements B, A {}
@@ -1029,88 +1197,108 @@
   }
 
   void test_false_import_hide_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' hide Future;
-''', r'''
+''',
+        r'''
 import 'dart:async' hide Future, Stream;
 ''');
   }
 
   void test_false_import_hide_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' hide Future, Stream;
-''', r'''
+''',
+        r'''
 import 'dart:async' hide Future;
 ''');
   }
 
   void test_false_import_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async';
-''', r'''
+''',
+        r'''
 import 'dart:async';
 import 'dart:math';
 ''');
   }
 
   void test_false_import_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async';
 import 'dart:math';
-''', r'''
+''',
+        r'''
 import 'dart:async';
 ''');
   }
 
   void test_false_import_prefix_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async';
-''', r'''
+''',
+        r'''
 import 'dart:async' as async;
 ''');
   }
 
   void test_false_import_prefix_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' as oldPrefix;
-''', r'''
+''',
+        r'''
 import 'dart:async' as newPrefix;
 ''');
   }
 
   void test_false_import_prefix_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' as async;
-''', r'''
+''',
+        r'''
 import 'dart:async';
 ''');
   }
 
   void test_false_import_show_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' show Future;
-''', r'''
+''',
+        r'''
 import 'dart:async' show Future, Stream;
 ''');
   }
 
   void test_false_import_show_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 import 'dart:async' show Future, Stream;
-''', r'''
+''',
+        r'''
 import 'dart:async' show Future;
 ''');
   }
 
   void test_false_method_annotation_edit() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 const my_annotationA = const Object();
 const my_annotationB = const Object();
 class A {
   @my_annotationA
   void m() {}
 }
-''', r'''
+''',
+        r'''
 const my_annotationA = const Object();
 const my_annotationB = const Object();
 class A {
@@ -1121,12 +1309,14 @@
   }
 
   void test_false_method_annotations_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 const my_annotation = const Object();
 class A {
   void m() {}
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 class A {
   @my_annotation
@@ -1136,13 +1326,15 @@
   }
 
   void test_false_method_annotations_remove() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 const my_annotation = const Object();
 class A {
   @my_annotation
   void m() {}
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 class A {
   void m() {}
@@ -1151,11 +1343,13 @@
   }
 
   void test_false_method_async_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   m() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   m() async {}
 }
@@ -1163,11 +1357,13 @@
   }
 
   void test_false_method_async_remove() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   m() async {}
 }
-''', r'''
+''',
+        r'''
 class A {
   m() {}
 }
@@ -1175,11 +1371,13 @@
   }
 
   void test_false_method_body_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   void foo();
 }
-''', r'''
+''',
+        r'''
 class A {
   void foo() {}
 }
@@ -1187,11 +1385,13 @@
   }
 
   void test_false_method_body_remove() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   void foo() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   void foo();
 }
@@ -1199,11 +1399,13 @@
   }
 
   void test_false_method_generator_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   m() async {}
 }
-''', r'''
+''',
+        r'''
 class A {
   m() async* {}
 }
@@ -1211,11 +1413,13 @@
   }
 
   void test_false_method_generator_remove() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   m() async* {}
 }
-''', r'''
+''',
+        r'''
 class A {
   m() async {}
 }
@@ -1223,12 +1427,14 @@
   }
 
   void test_false_method_list_add() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   a() {}
   b() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   a() {}
   b() {}
@@ -1238,13 +1444,15 @@
   }
 
   void test_false_method_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {
   a() {}
   b() {}
   c() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   a() {}
   b() {}
@@ -1253,12 +1461,14 @@
   }
 
   void test_false_method_parameters_type_edit() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   m(int p) {
   }
 }
-''', r'''
+''',
+        r'''
 class A {
   m(String p) {
   }
@@ -1267,7 +1477,8 @@
   }
 
   void test_false_method_parameters_type_edit_insertImportPrefix() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 import 'dart:async' as a;
 
 class C {
@@ -1279,7 +1490,8 @@
 bar(C c, a.Future f) {
   c.foo(f);
 }
-''', r'''
+''',
+        r'''
 import 'dart:async' as a;
 
 class C {
@@ -1295,11 +1507,13 @@
   }
 
   void test_false_method_returnType_edit() {
-    _assertDoesNotMatchOK(r'''
+    _assertDoesNotMatchOK(
+        r'''
 class A {
   int m() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   String m() {}
 }
@@ -1309,10 +1523,12 @@
   void test_false_part_list_add() {
     addNamedSource('/unitA.dart', 'part of lib; class A {}');
     addNamedSource('/unitB.dart', 'part of lib; class B {}');
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 library lib;
 part 'unitA.dart';
-''', r'''
+''',
+        r'''
 library lib;
 part 'unitA.dart';
 part 'unitB.dart';
@@ -1322,91 +1538,109 @@
   void test_false_part_list_remove() {
     addNamedSource('/unitA.dart', 'part of lib; class A {}');
     addNamedSource('/unitB.dart', 'part of lib; class B {}');
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 library lib;
 part 'unitA.dart';
 part 'unitB.dart';
-''', r'''
+''',
+        r'''
 library lib;
 part 'unitA.dart';
 ''');
   }
 
   void test_false_SimpleFormalParameter_named_differentName() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main({int oldName}) {
 }
-''', r'''
+''',
+        r'''
 main({int newName}) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_namedDefault_addValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main({int p}) {
 }
-''', r'''
+''',
+        r'''
 main({int p: 2}) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_namedDefault_differentValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main({int p: 1}) {
 }
-''', r'''
+''',
+        r'''
 main({int p: 2}) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_namedDefault_removeValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main({int p: 1}) {
 }
-''', r'''
+''',
+        r'''
 main({int p}) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_optionalDefault_addValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main([int p]) {
 }
-''', r'''
+''',
+        r'''
 main([int p = 2]) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_optionalDefault_differentValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main([int p = 1]) {
 }
-''', r'''
+''',
+        r'''
 main([int p = 2]) {
 }
 ''');
   }
 
   void test_false_SimpleFormalParameter_optionalDefault_removeValue() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main([int p = 1]) {
 }
-''', r'''
+''',
+        r'''
 main([int p]) {
 }
 ''');
   }
 
   void test_false_topLevelAccessor_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 get a => 1;
 get b => 2;
-''', r'''
+''',
+        r'''
 get a => 1;
 get b => 2;
 get c => 3;
@@ -1414,37 +1648,45 @@
   }
 
   void test_false_topLevelAccessor_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 get a => 1;
 get b => 2;
 get c => 3;
-''', r'''
+''',
+        r'''
 get a => 1;
 get b => 2;
 ''');
   }
 
   void test_false_topLevelAccessor_wasGetter() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 get a => 1;
-''', r'''
+''',
+        r'''
 set a(x) {}
 ''');
   }
 
   void test_false_topLevelAccessor_wasSetter() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 set a(x) {}
-''', r'''
+''',
+        r'''
 get a => 1;
 ''');
   }
 
   void test_false_topLevelFunction_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 a() {}
 b() {}
-''', r'''
+''',
+        r'''
 a() {}
 b() {}
 c() {}
@@ -1452,59 +1694,71 @@
   }
 
   void test_false_topLevelFunction_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 a() {}
 b() {}
 c() {}
-''', r'''
+''',
+        r'''
 a() {}
 b() {}
 ''');
   }
 
   void test_false_topLevelFunction_parameters_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int a, int b) {
 }
-''', r'''
+''',
+        r'''
 main(int a, int b, int c) {
 }
 ''');
   }
 
   void test_false_topLevelFunction_parameters_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int a, int b, int c) {
 }
-''', r'''
+''',
+        r'''
 main(int a, int b) {
 }
 ''');
   }
 
   void test_false_topLevelFunction_parameters_type_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 main(int a, int b, int c) {
 }
-''', r'''
+''',
+        r'''
 main(int a, String b, int c) {
 }
 ''');
   }
 
   void test_false_topLevelFunction_returnType_edit() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 int a() {}
-''', r'''
+''',
+        r'''
 String a() {}
 ''');
   }
 
   void test_false_topLevelVariable_list_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const int A = 1;
 const int C = 3;
-''', r'''
+''',
+        r'''
 const int A = 1;
 const int B = 2;
 const int C = 3;
@@ -1512,78 +1766,96 @@
   }
 
   void test_false_topLevelVariable_list_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const int A = 1;
 const int B = 2;
 const int C = 3;
-''', r'''
+''',
+        r'''
 const int A = 1;
 const int C = 3;
 ''');
   }
 
   void test_false_topLevelVariable_modifier_isConst() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 final int A = 1;
-''', r'''
+''',
+        r'''
 const int A = 1;
 ''');
   }
 
   void test_false_topLevelVariable_modifier_isFinal() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 int A = 1;
-''', r'''
+''',
+        r'''
 final int A = 1;
 ''');
   }
 
   void test_false_topLevelVariable_modifier_wasConst() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 const int A = 1;
-''', r'''
+''',
+        r'''
 final int A = 1;
 ''');
   }
 
   void test_false_topLevelVariable_modifier_wasFinal() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 final int A = 1;
-''', r'''
+''',
+        r'''
 int A = 1;
 ''');
   }
 
   void test_false_topLevelVariable_synthetic_wasGetter() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 int get A => 1;
-''', r'''
+''',
+        r'''
 final int A = 1;
 ''');
   }
 
   void test_false_topLevelVariable_type_different() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 int A;
-''', r'''
+''',
+        r'''
 String A;
 ''');
   }
 
   void test_false_topLevelVariable_type_differentArgs() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 List<int> A;
-''', r'''
+''',
+        r'''
 List<String> A;
 ''');
   }
 
   void test_false_type_noTypeArguments_hadTypeArguments() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A<T> {}
 A<int> main() {
 }
-''', r'''
+''',
+        r'''
 class A<T> {}
 A main() {
 }
@@ -1591,31 +1863,37 @@
   }
 
   void test_false_withClause_add() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B extends Object with A {}
 ''');
   }
 
   void test_false_withClause_remove() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B extends Object with A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 ''');
   }
 
   void test_false_withClause_reorder() {
-    _assertDoesNotMatch(r'''
+    _assertDoesNotMatch(
+        r'''
 class A {}
 class B {}
 class C extends Object with A, B {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 class C extends Object with B, A {}
@@ -1623,12 +1901,14 @@
   }
 
   void test_true_class_annotations_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 const my_annotation = const Object();
 @my_annotation
 class A {
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 @my_annotation
 class A {
@@ -1637,11 +1917,13 @@
   }
 
   void test_true_class_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {}
 class B {}
 class C {}
-''', r'''
+''',
+        r'''
 class C {}
 class A {}
 class B {}
@@ -1649,11 +1931,13 @@
   }
 
   void test_true_class_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {}
 class B {}
 class C {}
-''', r'''
+''',
+        r'''
 class A {}
 class B {}
 class C {}
@@ -1661,15 +1945,18 @@
   }
 
   void test_true_class_typeParameters_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A<T> {}
-''', r'''
+''',
+        r'''
 class A<T> {}
 ''');
   }
 
   void test_true_classMemberAccessor_getterSetter() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   int _test;
   get test => _test;
@@ -1677,7 +1964,8 @@
     _test = v;
   }
 }
-''', r'''
+''',
+        r'''
 class A {
   int _test;
   get test => _test;
@@ -1689,13 +1977,15 @@
   }
 
   void test_true_classMemberAccessor_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   get a => 1;
   get b => 2;
   get c => 3;
 }
-''', r'''
+''',
+        r'''
 class A {
   get c => 3;
   get a => 1;
@@ -1705,13 +1995,15 @@
   }
 
   void test_true_classMemberAccessor_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   get a => 1;
   get b => 2;
   get c => 3;
 }
-''', r'''
+''',
+        r'''
 class A {
   get a => 1;
   get b => 2;
@@ -1721,12 +2013,14 @@
   }
 
   void test_true_classTypeAlias_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class M {}
 class A = Object with M;
 class B = Object with M;
 class C = Object with M;
-''', r'''
+''',
+        r'''
 class M {}
 class C = Object with M;
 class A = Object with M;
@@ -1735,12 +2029,14 @@
   }
 
   void test_true_classTypeAlias_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class M {}
 class A = Object with M;
 class B = Object with M;
 class C = Object with M;
-''', r'''
+''',
+        r'''
 class M {}
 class A = Object with M;
 class B = Object with M;
@@ -1749,11 +2045,13 @@
   }
 
   void test_true_classTypeAlias_typeParameters_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class M<T> {}
 class A<T> {}
 class B<T> = A<T> with M<T>;
-''', r'''
+''',
+        r'''
 class M<T> {}
 class A<T> {}
 class B<T> = A<T> with M<T>;
@@ -1761,11 +2059,13 @@
   }
 
   void test_true_constructor_body_add() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   A(int p);
 }
-''', r'''
+''',
+        r'''
 class A {
   A(int p) {}
 }
@@ -1773,11 +2073,13 @@
   }
 
   void test_true_constructor_body_remove() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   A(int p) {}
 }
-''', r'''
+''',
+        r'''
 class A {
   A(int p);
 }
@@ -1785,11 +2087,13 @@
   }
 
   void test_true_constructor_named_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   A.name(int p);
 }
-''', r'''
+''',
+        r'''
 class A {
   A.name(int p);
 }
@@ -1797,10 +2101,12 @@
   }
 
   void test_true_constructor_unnamed_add_noParameters() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
 }
-''', r'''
+''',
+        r'''
 class A {
   A() {}
 }
@@ -1808,22 +2114,26 @@
   }
 
   void test_true_constructor_unnamed_remove_noParameters() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   A() {}
 }
-''', r'''
+''',
+        r'''
 class A {
 }
 ''');
   }
 
   void test_true_constructor_unnamed_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   A(int p);
 }
-''', r'''
+''',
+        r'''
 class A {
   A(int p);
 }
@@ -1831,12 +2141,14 @@
   }
 
   void test_true_defaultFieldFormalParameterElement() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   int field;
   A([this.field = 0]);
 }
-''', r'''
+''',
+        r'''
 class A {
   int field;
   A([this.field = 0]);
@@ -1845,19 +2157,23 @@
   }
 
   void test_true_enum_constants_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 enum E {A, B, C}
-''', r'''
+''',
+        r'''
 enum E {C, A, B}
 ''');
   }
 
   void test_true_enum_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 enum A {A1, A2, A3}
 enum B {B1, B2, B3}
 enum C {C1, C2, C3}
-''', r'''
+''',
+        r'''
 enum C {C1, C2, C3}
 enum A {A1, A2, A3}
 enum B {B1, B2, B3}
@@ -1865,11 +2181,13 @@
   }
 
   void test_true_enum_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 enum A {A1, A2, A3}
 enum B {B1, B2, B3}
 enum C {C1, C2, C3}
-''', r'''
+''',
+        r'''
 enum A {A1, A2, A3}
 enum B {B1, B2, B3}
 enum C {C1, C2, C3}
@@ -1877,11 +2195,13 @@
   }
 
   void test_true_executable_same_hasLabel() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main() {
   label: return 42;
 }
-''', r'''
+''',
+        r'''
 main() {
   label: return 42;
 }
@@ -1889,11 +2209,13 @@
   }
 
   void test_true_executable_same_hasLocalVariable() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main() {
   int a = 42;
 }
-''', r'''
+''',
+        r'''
 main() {
   int a = 42;
 }
@@ -1901,59 +2223,71 @@
   }
 
   void test_true_export_hide_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 export 'dart:async' hide Future, Stream;
-''', r'''
+''',
+        r'''
 export 'dart:async' hide Stream, Future;
 ''');
   }
 
   void test_true_export_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 export 'dart:async';
 export 'dart:math';
-''', r'''
+''',
+        r'''
 export 'dart:math';
 export 'dart:async';
 ''');
   }
 
   void test_true_export_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 export 'dart:async';
 export 'dart:math';
-''', r'''
+''',
+        r'''
 export 'dart:async';
 export 'dart:math';
 ''');
   }
 
   void test_true_export_show_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 export 'dart:async' show Future, Stream;
-''', r'''
+''',
+        r'''
 export 'dart:async' show Stream, Future;
 ''');
   }
 
   void test_true_extendsClause_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {}
 class B extends A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B extends A {}
 ''');
   }
 
   void test_true_field_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class T {
   int A = 1;
   int B = 2;
   int C = 3;
 }
-''', r'''
+''',
+        r'''
 class T {
   int C = 3;
   int A = 1;
@@ -1963,13 +2297,15 @@
   }
 
   void test_true_field_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class T {
   int A = 1;
   int B = 2;
   int C = 3;
 }
-''', r'''
+''',
+        r'''
 class T {
   int A = 1;
   int B = 2;
@@ -1979,12 +2315,14 @@
   }
 
   void test_true_fieldFormalParameter() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   int field;
   A(this.field);
 }
-''', r'''
+''',
+        r'''
 class A {
   int field;
   A(this.field);
@@ -1993,12 +2331,14 @@
   }
 
   void test_true_fieldFormalParameter_function() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   final field;
   A(this.field(int a, String b));
 }
-''', r'''
+''',
+        r'''
 class A {
   final field;
   A(this.field(int a, String b));
@@ -2007,11 +2347,13 @@
   }
 
   void test_true_functionTypeAlias_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 typedef A(int pa);
 typedef B(String pb);
 typedef C(pc);
-''', r'''
+''',
+        r'''
 typedef C(pc);
 typedef A(int pa);
 typedef B(String pb);
@@ -2019,11 +2361,13 @@
   }
 
   void test_true_functionTypeAlias_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 typedef String A(int pa);
 typedef int B(String pb);
 typedef C(pc);
-''', r'''
+''',
+        r'''
 typedef String A(int pa);
 typedef int B(String pb);
 typedef C(pc);
@@ -2031,85 +2375,103 @@
   }
 
   void test_true_functionTypeAlias_typeParameters_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 typedef F<A, B, C>();
-''', r'''
+''',
+        r'''
 typedef F<A, B, C>();
 ''');
   }
 
   void test_true_FunctionTypedFormalParameter() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main(int callback(int a, String b)) {
 }
-''', r'''
+''',
+        r'''
 main(int callback(int a, String b)) {
 }
 ''');
   }
 
   void test_true_implementsClause_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {}
 class B implements A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B implements A {}
 ''');
   }
 
   void test_true_import_hide_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async' hide Future, Stream;
-''', r'''
+''',
+        r'''
 import 'dart:async' hide Stream, Future;
 ''');
   }
 
   void test_true_import_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async';
 import 'dart:math';
-''', r'''
+''',
+        r'''
 import 'dart:math';
 import 'dart:async';
 ''');
   }
 
   void test_true_import_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async';
 import 'dart:math';
-''', r'''
+''',
+        r'''
 import 'dart:async';
 import 'dart:math';
 ''');
   }
 
   void test_true_import_prefix() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async' as async;
-''', r'''
+''',
+        r'''
 import 'dart:async' as async;
 ''');
   }
 
   void test_true_import_show_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async' show Future, Stream;
-''', r'''
+''',
+        r'''
 import 'dart:async' show Stream, Future;
 ''');
   }
 
   void test_true_method_annotation_accessor_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 const my_annotation = const Object();
 class A {
   @my_annotation
   void m() {}
 }
-''', r'''
+''',
+        r'''
 const my_annotation = const Object();
 class A {
   @my_annotation
@@ -2119,7 +2481,8 @@
   }
 
   void test_true_method_annotation_constructor_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class MyAnnotation {
   const MyAnnotation();
 }
@@ -2127,7 +2490,8 @@
   @MyAnnotation()
   void m() {}
 }
-''', r'''
+''',
+        r'''
 class MyAnnotation {
   const MyAnnotation();
 }
@@ -2139,11 +2503,13 @@
   }
 
   void test_true_method_async() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   m() async {}
 }
-''', r'''
+''',
+        r'''
 class A {
   m() async {}
 }
@@ -2151,13 +2517,15 @@
   }
 
   void test_true_method_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   a() {}
   b() {}
   c() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   c() {}
   a() {}
@@ -2167,13 +2535,15 @@
   }
 
   void test_true_method_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   a() {}
   b() {}
   c() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   a() {}
   b() {}
@@ -2183,11 +2553,13 @@
   }
 
   void test_true_method_operator_minus() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   operator -(other) {}
 }
-''', r'''
+''',
+        r'''
 class A {
   operator -(other) {}
 }
@@ -2195,11 +2567,13 @@
   }
 
   void test_true_method_operator_minusUnary() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   operator -() {}
 }
-''', r'''
+''',
+        r'''
 class A {
   operator -() {}
 }
@@ -2207,11 +2581,13 @@
   }
 
   void test_true_method_operator_plus() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {
   operator +(other) {}
 }
-''', r'''
+''',
+        r'''
 class A {
   operator +(other) {}
 }
@@ -2219,12 +2595,14 @@
   }
 
   void test_true_method_parameters_type_functionType() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 typedef F();
 class A {
   m(F p) {}
 }
-''', r'''
+''',
+        r'''
 typedef F();
 class A {
   m(F p) {}
@@ -2233,13 +2611,15 @@
   }
 
   void test_true_method_parameters_type_sameImportPrefix() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async' as a;
 
 bar(a.Future f) {
   print(f);
 }
-''', r'''
+''',
+        r'''
 import 'dart:async' as a;
 
 bar(a.Future ff) {
@@ -2251,11 +2631,13 @@
   void test_true_part_list_reorder() {
     addNamedSource('/unitA.dart', 'part of lib; class A {}');
     addNamedSource('/unitB.dart', 'part of lib; class B {}');
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 library lib;
 part 'unitA.dart';
 part 'unitB.dart';
-''', r'''
+''',
+        r'''
 library lib;
 part 'unitB.dart';
 part 'unitA.dart';
@@ -2265,11 +2647,13 @@
   void test_true_part_list_same() {
     addNamedSource('/unitA.dart', 'part of lib; class A {}');
     addNamedSource('/unitB.dart', 'part of lib; class B {}');
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 library lib;
 part 'unitA.dart';
 part 'unitB.dart';
-''', r'''
+''',
+        r'''
 library lib;
 part 'unitA.dart';
 part 'unitB.dart';
@@ -2277,41 +2661,49 @@
   }
 
   void test_true_SimpleFormalParameter_optional_differentName() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main([int oldName]) {
 }
-''', r'''
+''',
+        r'''
 main([int newName]) {
 }
 ''');
   }
 
   void test_true_SimpleFormalParameter_optionalDefault_differentName() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main([int oldName = 1]) {
 }
-''', r'''
+''',
+        r'''
 main([int newName = 1]) {
 }
 ''');
   }
 
   void test_true_SimpleFormalParameter_required_differentName() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 main(int oldName) {
 }
-''', r'''
+''',
+        r'''
 main(int newName) {
 }
 ''');
   }
 
   void test_true_topLevelAccessor_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 set a(x) {}
 set b(x) {}
 set c(x) {}
-''', r'''
+''',
+        r'''
 set c(x) {}
 set a(x) {}
 set b(x) {}
@@ -2319,11 +2711,13 @@
   }
 
   void test_true_topLevelAccessor_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 get a => 1;
 get b => 2;
 get c => 3;
-''', r'''
+''',
+        r'''
 get a => 1;
 get b => 2;
 get c => 3;
@@ -2331,11 +2725,13 @@
   }
 
   void test_true_topLevelFunction_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 a() {}
 b() {}
 c() {}
-''', r'''
+''',
+        r'''
 c() {}
 a() {}
 b() {}
@@ -2343,11 +2739,13 @@
   }
 
   void test_true_topLevelFunction_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 a() {}
 b() {}
 c() {}
-''', r'''
+''',
+        r'''
 a() {}
 b() {}
 c() {}
@@ -2355,11 +2753,13 @@
   }
 
   void test_true_topLevelVariable_list_reorder() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 const int A = 1;
 const int B = 2;
 const int C = 3;
-''', r'''
+''',
+        r'''
 const int C = 3;
 const int A = 1;
 const int B = 2;
@@ -2367,11 +2767,13 @@
   }
 
   void test_true_topLevelVariable_list_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 const int A = 1;
 const int B = 2;
 const int C = 3;
-''', r'''
+''',
+        r'''
 const int A = 1;
 const int B = 2;
 const int C = 3;
@@ -2379,37 +2781,45 @@
   }
 
   void test_true_topLevelVariable_type_sameArgs() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 Map<int, String> A;
-''', r'''
+''',
+        r'''
 Map<int, String> A;
 ''');
   }
 
   void test_true_type_dynamic() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 dynamic a() {}
-''', r'''
+''',
+        r'''
 dynamic a() {}
 ''');
   }
 
   void test_true_type_hasImportPrefix() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 import 'dart:async' as async;
 async.Future F;
-''', r'''
+''',
+        r'''
 import 'dart:async' as async;
 async.Future F;
 ''');
   }
 
   void test_true_type_noTypeArguments_implyAllDynamic() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A<T> {}
 A main() {
 }
-''', r'''
+''',
+        r'''
 class A<T> {}
 A main() {
 }
@@ -2417,18 +2827,22 @@
   }
 
   void test_true_type_void() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 void a() {}
-''', r'''
+''',
+        r'''
 void a() {}
 ''');
   }
 
   void test_true_withClause_same() {
-    _assertMatches(r'''
+    _assertMatches(
+        r'''
 class A {}
 class B extends Object with A {}
-''', r'''
+''',
+        r'''
 class A {}
 class B extends Object with A {}
 ''');
@@ -2657,10 +3071,14 @@
   }
 }
 ''');
-    _resolve(_editString('    return a + b;', r'''
+    _resolve(
+        _editString(
+            '    return a + b;',
+            r'''
     int res = a + b;
     return res;
-'''), _isBlock);
+'''),
+        _isBlock);
   }
 
   void test_method_parameter_rename() {
@@ -2671,9 +3089,13 @@
   }
 }
 ''');
-    _resolve(_editString(r'''(int a, int b, int c) {
-    return a + b + c;''', r'''(int a, int second, int c) {
-    return a + second + c;'''), _isDeclaration);
+    _resolve(
+        _editString(
+            r'''(int a, int b, int c) {
+    return a + b + c;''',
+            r'''(int a, int second, int c) {
+    return a + second + c;'''),
+        _isDeclaration);
   }
 
   void test_superInvocation() {
@@ -2721,10 +3143,14 @@
   return a + b;
 }
 ''');
-    _resolve(_editString('  return a + b;', r'''
+    _resolve(
+        _editString(
+            '  return a + b;',
+            r'''
   int res = a + b;
   return res;
-'''), _isBlock);
+'''),
+        _isBlock);
   }
 
   void test_topLevelFunction_localVariable_remove() {
@@ -2751,9 +3177,13 @@
   return a + b;
 }
 ''');
-    _resolve(_editString(r'''(int a, int b) {
-  return a + b;''', r'''(int first, int b) {
-  return first + b;'''), _isDeclaration);
+    _resolve(
+        _editString(
+            r'''(int a, int b) {
+  return a + b;''',
+            r'''(int first, int b) {
+  return first + b;'''),
+        _isDeclaration);
   }
 
   void test_topLevelVariable_initializer() {
@@ -2827,14 +3257,24 @@
     if (AnalysisEngine.instance.useTaskModel) {
       LibrarySpecificUnit lsu = new LibrarySpecificUnit(source, source);
       task.AnalysisCache cache = analysisContext2.analysisCache;
-      resolver = new IncrementalResolver(null, cache.get(source),
-          cache.get(lsu), unit.element, updateOffset, updateEndOld,
+      resolver = new IncrementalResolver(
+          null,
+          cache.get(source),
+          cache.get(lsu),
+          unit.element,
+          updateOffset,
+          updateEndOld,
           updateOldNew);
     } else {
       resolver = new IncrementalResolver(
           (analysisContext2 as AnalysisContextImpl)
-              .getReadableSourceEntryOrNull(source), null, null, unit.element,
-          updateOffset, updateEndOld, updateOldNew);
+              .getReadableSourceEntryOrNull(source),
+          null,
+          null,
+          unit.element,
+          updateOffset,
+          updateEndOld,
+          updateOldNew);
     }
     bool success = resolver.resolve(newNode);
     expect(success, isTrue);
@@ -3219,13 +3659,15 @@
   x.foo();
 }
 ''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 // 000
 main() {
   Object x;
   x.foo();
 }
-''', expectedSuccess: false);
+''',
+        expectedSuccess: false);
   }
 
   void test_endOfLineComment_outBody_remove() {
@@ -3236,12 +3678,14 @@
   x.foo();
 }
 ''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 main() {
   Object x;
   x.foo();
 }
-''', expectedSuccess: false);
+''',
+        expectedSuccess: false);
   }
 
   void test_endOfLineComment_outBody_update() {
@@ -3252,13 +3696,15 @@
   x.foo();
 }
 ''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 // 10
 main() {
   Object x;
   x.foo();
 }
-''', expectedSuccess: false);
+''',
+        expectedSuccess: false);
   }
 
   void test_endOfLineComment_remove() {
@@ -3286,7 +3732,8 @@
   const {const C(0): 0, const C.foo(): 1};
 }
 ''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 class C {
   final int x;
   const C(this.x);
@@ -3295,7 +3742,23 @@
 main() {
   const {const C(0): 0, const C.foo(): 1};
 }
-''', expectedSuccess: false);
+''',
+        expectedSuccess: false);
+  }
+
+  void test_false_expressionBody() {
+    _resolveUnit(r'''
+class A {
+  final f = (() => 1)();
+}
+''');
+    _updateAndValidate(
+        r'''
+class A {
+  final f = (() => 2)();
+}
+''',
+        expectedSuccess: false);
   }
 
   void test_false_topLevelFunction_name() {
@@ -3303,10 +3766,12 @@
 a() {}
 b() {}
 ''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 a() {}
 bb() {}
-''', expectedSuccess: false);
+''',
+        expectedSuccess: false);
   }
 
   void test_false_unbalancedCurlyBrackets_inNew() {
@@ -3322,7 +3787,8 @@
     print(0123456789);
   }
 }''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 class A {
   aaa() {
       1;
@@ -3332,7 +3798,8 @@
   bbb() {
     print(0123456789);
   }
-}''', expectedSuccess: false);
+}''',
+        expectedSuccess: false);
   }
 
   void test_false_unbalancedCurlyBrackets_inOld() {
@@ -3347,7 +3814,8 @@
     print(0123456789);
   }
 }''');
-    _updateAndValidate(r'''
+    _updateAndValidate(
+        r'''
 class A {
   aaa() {
     if (true) {
@@ -3358,7 +3826,8 @@
   bbb() {
     print(0123456789);
   }
-}''', expectedSuccess: false);
+}''',
+        expectedSuccess: false);
   }
 
   void test_fieldClassField_propagatedType() {
@@ -3449,20 +3918,24 @@
 }''');
     for (int i = 0; i < 6; i++) {
       if (i.isEven) {
-        _updateAndValidate(r'''
+        _updateAndValidate(
+            r'''
 class A {
   m() {
     return true;
 
   }
-}''', compareWithFull: false);
+}''',
+            compareWithFull: false);
       } else {
-        _updateAndValidate(r'''
+        _updateAndValidate(
+            r'''
 class A {
   m() {
     return true;
   }
-}''', compareWithFull: false);
+}''',
+            compareWithFull: false);
       }
     }
   }
@@ -3474,15 +3947,19 @@
 }''');
     for (int i = 0; i < 6; i++) {
       if (i.isEven) {
-        _updateAndValidate(r'''
+        _updateAndValidate(
+            r'''
 main() {
   print(12);
-}''', compareWithFull: false);
+}''',
+            compareWithFull: false);
       } else {
-        _updateAndValidate(r'''
+        _updateAndValidate(
+            r'''
 main() {
   print(1);
-}''', compareWithFull: false);
+}''',
+            compareWithFull: false);
       }
     }
   }
@@ -3631,7 +4108,9 @@
   }
 
   void test_unusedHint_add_wasUsedOnlyInPart() {
-    Source partSource = addNamedSource('/my_unit.dart', r'''
+    Source partSource = addNamedSource(
+        '/my_unit.dart',
+        r'''
 part of lib;
 
 f(A a) {
@@ -3650,7 +4129,9 @@
     _runTasks();
     // perform incremental resolution
     _resetWithIncremental(true);
-    analysisContext2.setContents(partSource, r'''
+    analysisContext2.setContents(
+        partSource,
+        r'''
 part of lib;
 
 f(A a) {
@@ -3679,7 +4160,9 @@
   }
 
   void test_unusedHint_false_stillUsedInPart() {
-    addNamedSource('/my_unit.dart', r'''
+    addNamedSource(
+        '/my_unit.dart',
+        r'''
 part of lib;
 
 f(A a) {
@@ -3697,7 +4180,9 @@
 ''');
     // perform incremental resolution
     _resetWithIncremental(true);
-    analysisContext2.setContents(source, r'''
+    analysisContext2.setContents(
+        source,
+        r'''
 library lib;
 part 'my_unit.dart';
 class A {
@@ -4103,8 +4588,9 @@
     unit.declarations.add(classNode);
     ClassElement classElement = ElementFactory.classElement2(className);
     classNode.name.staticElement = classElement;
-    (unit.element as CompilationUnitElementImpl).types =
-        <ClassElement>[classElement];
+    (unit.element as CompilationUnitElementImpl).types = <ClassElement>[
+      classElement
+    ];
     return classNode;
   }
 
@@ -4116,8 +4602,9 @@
     unit.declarations.add(classNode);
     ClassElement classElement = ElementFactory.classElement2(className);
     classNode.name.staticElement = classElement;
-    (unit.element as CompilationUnitElementImpl).types =
-        <ClassElement>[classElement];
+    (unit.element as CompilationUnitElementImpl).types = <ClassElement>[
+      classElement
+    ];
     return classNode;
   }
 
@@ -4133,14 +4620,17 @@
     ClassDeclaration classNode = _createResolvedClassDeclaration();
     String constructorName = "f";
     ConstructorDeclaration constructorNode = AstFactory.constructorDeclaration(
-        AstFactory.identifier3(constructorName), null,
-        AstFactory.formalParameterList(), null);
+        AstFactory.identifier3(constructorName),
+        null,
+        AstFactory.formalParameterList(),
+        null);
     classNode.members.add(constructorNode);
     ConstructorElement constructorElement =
         ElementFactory.constructorElement2(classNode.element, null);
     constructorNode.element = constructorElement;
-    (classNode.element as ClassElementImpl).constructors =
-        <ConstructorElement>[constructorElement];
+    (classNode.element as ClassElementImpl).constructors = <ConstructorElement>[
+      constructorElement
+    ];
     return constructorNode;
   }
 
@@ -4153,15 +4643,18 @@
     FunctionElement functionElement =
         ElementFactory.functionElement(functionName);
     functionNode.name.staticElement = functionElement;
-    (unit.element as CompilationUnitElementImpl).functions =
-        <FunctionElement>[functionElement];
+    (unit.element as CompilationUnitElementImpl).functions = <FunctionElement>[
+      functionElement
+    ];
     return functionNode;
   }
 
   FunctionTypeAlias _createResolvedFunctionTypeAlias() {
     CompilationUnit unit = _createResolvedCompilationUnit();
     FunctionTypeAlias aliasNode = AstFactory.typeAlias(
-        AstFactory.typeName4("A"), "F", AstFactory.typeParameterList(),
+        AstFactory.typeName4("A"),
+        "F",
+        AstFactory.typeParameterList(),
         AstFactory.formalParameterList());
     unit.declarations.add(aliasNode);
     SimpleIdentifier aliasName = aliasNode.name;
@@ -4176,15 +4669,20 @@
   MethodDeclaration _createResolvedMethodDeclaration() {
     ClassDeclaration classNode = _createResolvedClassDeclaration();
     String methodName = "f";
-    MethodDeclaration methodNode = AstFactory.methodDeclaration(null, null,
-        null, null, AstFactory.identifier3(methodName),
+    MethodDeclaration methodNode = AstFactory.methodDeclaration(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3(methodName),
         AstFactory.formalParameterList());
     classNode.members.add(methodNode);
     MethodElement methodElement =
         ElementFactory.methodElement(methodName, null);
     methodNode.name.staticElement = methodElement;
-    (classNode.element as ClassElementImpl).methods =
-        <MethodElement>[methodElement];
+    (classNode.element as ClassElementImpl).methods = <MethodElement>[
+      methodElement
+    ];
     return methodNode;
   }
 
diff --git a/pkg/analyzer/test/generated/incremental_scanner_test.dart b/pkg/analyzer/test/generated/incremental_scanner_test.dart
index 7307dfb..6b72aa6 100644
--- a/pkg/analyzer/test/generated/incremental_scanner_test.dart
+++ b/pkg/analyzer/test/generated/incremental_scanner_test.dart
@@ -11,10 +11,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(IncrementalScannerTest);
 }
 
@@ -317,10 +318,14 @@
   void test_insert_whitespace_withMultipleComments() {
     // "//comment1", "//comment2", "a + b;"
     // "//comment1", "//comment2", "a  + b;"
-    _scan(r'''
+    _scan(
+        r'''
 //comment1
 //comment2
-a''', "", " ", " + b;");
+a''',
+        "",
+        " ",
+        " + b;");
     _assertTokens(1, 2, ["a", "+", "b", ";"]);
     expect(_incrementalScanner.hasNonWhitespaceChange, isFalse);
   }
@@ -413,9 +418,11 @@
     expect(actual.type, same(expected.type), reason: "Wrong type for token");
     expect(actual.lexeme, expected.lexeme, reason: "Wrong lexeme for token");
     expect(actual.offset, expected.offset,
-        reason: "Wrong offset for token ('${actual.lexeme}' != '${expected.lexeme}')");
+        reason:
+            "Wrong offset for token ('${actual.lexeme}' != '${expected.lexeme}')");
     expect(actual.length, expected.length,
-        reason: "Wrong length for token ('${actual.lexeme}' != '${expected.lexeme}')");
+        reason:
+            "Wrong length for token ('${actual.lexeme}' != '${expected.lexeme}')");
   }
 
   /**
@@ -521,9 +528,11 @@
         modifiedComment = modifiedComment.next;
       }
       expect(incrementalComment, isNull,
-          reason: "Too many comment tokens preceeding '${incrementalToken.lexeme}'");
+          reason:
+              "Too many comment tokens preceeding '${incrementalToken.lexeme}'");
       expect(modifiedComment, isNull,
-          reason: "Not enough comment tokens preceeding '${incrementalToken.lexeme}'");
+          reason:
+              "Not enough comment tokens preceeding '${incrementalToken.lexeme}'");
       incrementalToken = incrementalToken.next;
       modifiedTokens = modifiedTokens.next;
     }
diff --git a/pkg/analyzer/test/generated/java_core_test.dart b/pkg/analyzer/test/generated/java_core_test.dart
index 7efb77d..e60e9c1 100644
--- a/pkg/analyzer/test/generated/java_core_test.dart
+++ b/pkg/analyzer/test/generated/java_core_test.dart
@@ -2,15 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.java_core_test;
 
 import 'package:analyzer/src/generated/java_core.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
+  initializeTestEnvironment();
   group('Character', () {
     group('isDigit', () {
       test('digits', () {
diff --git a/pkg/analyzer/test/generated/java_io_test.dart b/pkg/analyzer/test/generated/java_io_test.dart
index fcce915..0a46feb 100644
--- a/pkg/analyzer/test/generated/java_io_test.dart
+++ b/pkg/analyzer/test/generated/java_io_test.dart
@@ -2,52 +2,43 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.java_io_test;
 
 import 'dart:io';
 
 import 'package:analyzer/src/generated/java_io.dart';
-import 'package:path/path.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
+  initializeTestEnvironment();
   group('JavaFile', () {
     group('toURI', () {
       test('forAbsolute', () {
-        var tempDir = Directory.systemTemp.createTempSync('java_io_test');
-        try {
-          String tempPath = normalize(absolute(tempDir.path));
-          String path = join(tempPath, 'foo.dart');
-          // we use an absolute path
-          expect(isAbsolute(path), isTrue);
-          // test that toURI() returns an absolute URI
-          Uri uri = new JavaFile(path).toURI();
-          expect(uri.isAbsolute, isTrue);
-          expect(uri.scheme, 'file');
-        } finally {
-          tempDir.deleteSync(recursive: true);
-        }
+        String tempPath = '/temp';
+        String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+        // we use an absolute path
+        expect(JavaFile.pathContext.isAbsolute(path), isTrue,
+            reason: '"$path" is not absolute');
+        // test that toURI() returns an absolute URI
+        Uri uri = new JavaFile(path).toURI();
+        expect(uri.isAbsolute, isTrue);
+        expect(uri.scheme, 'file');
       });
       test('forRelative', () {
-        var tempDir = Directory.systemTemp.createTempSync('java_io_test');
-        try {
-          String tempPath = normalize(absolute(tempDir.path));
-          String path = join(tempPath, 'foo.dart');
-          expect(isAbsolute(path), isTrue);
-          // prepare a relative path
-          // We should not check that "relPath" is actually relative -
-          // it may be not on Windows, if "temp" is on other disk.
-          String relPath = relative(path);
-          // test that toURI() returns an absolute URI
-          Uri uri = new JavaFile(relPath).toURI();
-          expect(uri.isAbsolute, isTrue);
-          expect(uri.scheme, 'file');
-        } finally {
-          tempDir.deleteSync(recursive: true);
-        }
+        String tempPath = '/temp';
+        String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+        expect(JavaFile.pathContext.isAbsolute(path), isTrue,
+            reason: '"$path" is not absolute');
+        // prepare a relative path
+        // We should not check that "relPath" is actually relative -
+        // it may be not on Windows, if "temp" is on other disk.
+        String relPath = JavaFile.pathContext.relative(path);
+        // test that toURI() returns an absolute URI
+        Uri uri = new JavaFile(relPath).toURI();
+        expect(uri.isAbsolute, isTrue);
+        expect(uri.scheme, 'file');
       });
     });
   });
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 9b057a7..dedbb2a 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -10,14 +10,15 @@
 import 'package:analyzer/src/generated/error.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:unittest/unittest.dart' as _ut;
+import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'resolver_test.dart';
 import 'test_support.dart';
 
 main() {
-  _ut.groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(NonErrorResolverTest);
 }
 
@@ -39,10 +40,14 @@
 library L;
 export 'lib1.dart';
 export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class M {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -55,11 +60,15 @@
 library L;
 export 'lib1.dart';
 export 'lib2.dart' hide B;''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library L1;
 class A {}
 class B {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library L2;
 class B {}
 class C {}''');
@@ -73,11 +82,15 @@
 library L;
 export 'lib1.dart';
 export 'lib2.dart' show C;''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library L1;
 class A {}
 class B {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library L2;
 class B {}
 class C {}''');
@@ -91,7 +104,9 @@
 library L;
 export 'lib.dart';
 export 'lib.dart';''');
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -109,15 +124,21 @@
   new N2();
   new N3();
 }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}
 class N1 {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}
 class N2 {}''');
-    addNamedSource("/lib3.dart", r'''
+    addNamedSource(
+        "/lib3.dart",
+        r'''
 library lib3;
 class N {}
 class N3 {}''');
@@ -133,11 +154,15 @@
   new N1();
   new N2();
 }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}
 class N1 {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}
 class N2 {}''');
@@ -321,7 +346,9 @@
 main() {
   foo.x = true;
 }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 bool x = false;''');
     computeLibrarySourceErrors(source);
@@ -804,6 +831,43 @@
     }
   }
 
+  void test_commentReference_beforeEnum() {
+    String code = r'''
+/// This is the [Samurai] kind.
+enum Samurai {
+  /// Use [int].
+  WITH_SWORD,
+  /// Like [WITH_SWORD], but only without one.
+  WITHOUT_SWORD
+}''';
+    Source source = addSource(code);
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = _getResolvedLibraryUnit(source);
+    {
+      SimpleIdentifier ref = EngineTestCase.findNode(
+          unit, code, "Samurai]", (node) => node is SimpleIdentifier);
+      ClassElement refElement = ref.staticElement;
+      expect(refElement, isNotNull);
+      expect(refElement.name, 'Samurai');
+    }
+    {
+      SimpleIdentifier ref = EngineTestCase.findNode(
+          unit, code, "int]", (node) => node is SimpleIdentifier);
+      ClassElement refElement = ref.staticElement;
+      expect(refElement, isNotNull);
+      expect(refElement.name, 'int');
+    }
+    {
+      SimpleIdentifier ref = EngineTestCase.findNode(
+          unit, code, "WITH_SWORD]", (node) => node is SimpleIdentifier);
+      PropertyAccessorElement refElement = ref.staticElement;
+      expect(refElement, isNotNull);
+      expect(refElement.name, 'WITH_SWORD');
+    }
+  }
+
   void test_commentReference_beforeFunction_blockBody() {
     String code = r'''
 /// [p]
@@ -1105,7 +1169,9 @@
   }
 
   void test_constEval_propertyExtraction_fieldStatic_targetType() {
-    addNamedSource("/math.dart", r'''
+    addNamedSource(
+        "/math.dart",
+        r'''
 library math;
 const PI = 3.14;''');
     Source source = addSource(r'''
@@ -1129,7 +1195,9 @@
   }
 
   void test_constEval_symbol() {
-    addNamedSource("/math.dart", r'''
+    addNamedSource(
+        "/math.dart",
+        r'''
 library math;
 const PI = 3.14;''');
     Source source = addSource(r'''
@@ -1336,7 +1404,9 @@
 library lib;
 import 'lib1.dart' hide B;
 A a = new A();''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class A {}
 @deprecated
@@ -1418,6 +1488,18 @@
     verify([source]);
   }
 
+  void test_exportDuplicatedLibraryUnnamed() {
+    Source source = addSource(r'''
+library test;
+export 'lib1.dart';
+export 'lib2.dart';''');
+    addNamedSource("/lib1.dart", "");
+    addNamedSource("/lib2.dart", "");
+    computeLibrarySourceErrors(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
   void test_exportOfNonLibrary_libraryDeclared() {
     Source source = addSource(r'''
 library L;
@@ -1936,12 +2018,30 @@
     verify([source]);
   }
 
+  void test_importDuplicatedLibraryUnnamed() {
+    Source source = addSource(r'''
+library test;
+import 'lib1.dart';
+import 'lib2.dart';''');
+    addNamedSource("/lib1.dart", "");
+    addNamedSource("/lib2.dart", "");
+    computeLibrarySourceErrors(source);
+    assertErrors(source, [
+      // No warning on duplicate import (https://github.com/dart-lang/sdk/issues/24156)
+      HintCode.UNUSED_IMPORT,
+      HintCode.UNUSED_IMPORT
+    ]);
+    verify([source]);
+  }
+
   void test_importOfNonLibrary_libraryDeclared() {
     Source source = addSource(r'''
 library lib;
 import 'part.dart';
 A a;''');
-    addNamedSource("/part.dart", r'''
+    addNamedSource(
+        "/part.dart",
+        r'''
 library lib1;
 class A {}''');
     computeLibrarySourceErrors(source);
@@ -1969,10 +2069,14 @@
   math.test1();
   path.test2();
 }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 test1() {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 test2() {}''');
     computeLibrarySourceErrors(source);
@@ -2214,7 +2318,9 @@
 class B extends A {
   _m() {}
 }''');
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library L;
 class A {
   static var _m;
@@ -2230,7 +2336,9 @@
 class B extends A {
   _m() {}
 }''');
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library L;
 class A {
   static _m() {}
@@ -2252,7 +2360,9 @@
   }
 
   void test_invalidAnnotation_constantVariable_field_importWithPrefix() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   static const C = 0;
@@ -2279,7 +2389,9 @@
   }
 
   void test_invalidAnnotation_constantVariable_topLevel_importWithPrefix() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 const C = 0;''');
     Source source = addSource(r'''
@@ -2293,7 +2405,9 @@
   }
 
   void test_invalidAnnotation_constConstructor_importWithPrefix() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   const A(int p);
@@ -2309,7 +2423,9 @@
   }
 
   void test_invalidAnnotation_constConstructor_named_importWithPrefix() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   const A.named(int p);
@@ -2637,7 +2753,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_interface() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 abstract class A {
   num m();
 }
@@ -2650,7 +2768,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_interface2() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 abstract class A {
   num m();
 }
@@ -2665,7 +2785,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_mixin() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 class A {
   num m() { return 0; }
 }
@@ -2691,7 +2813,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_sameType() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 class A {
   int m() { return 0; }
 }
@@ -2704,7 +2828,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_superclass() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 class A {
   num m() { return 0; }
 }
@@ -2717,7 +2843,9 @@
   }
 
   void test_invalidOverrideReturnType_returnType_superclass2() {
-    Source source = addNamedSource("/test.dart", r'''
+    Source source = addNamedSource(
+        "/test.dart",
+        r'''
 class A {
   num m() { return 0; }
 }
@@ -4016,7 +4144,9 @@
   }
 
   void test_prefixCollidesWithTopLevelMembers() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {}''');
     Source source = addSource(r'''
@@ -4965,7 +5095,9 @@
   }
 
   void test_typeType_class_prefixed() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class C {}''');
     Source source = addSource(r'''
@@ -4992,7 +5124,9 @@
   }
 
   void test_typeType_functionTypeAlias_prefixed() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 typedef F();''');
     Source source = addSource(r'''
@@ -5212,7 +5346,9 @@
   }
 
   void test_undefinedSetter_importWithPrefix() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 set y(int value) {}''');
     Source source = addSource(r'''
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index b85a20e..98e80de 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -19,10 +19,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(ComplexParserTest);
   runReflectiveTests(ErrorParserTest);
   runReflectiveTests(IncrementalParserTest);
@@ -170,7 +171,8 @@
     // a(b)(c).d(e)
     //
     MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation, MethodInvocation,
+        (obj) => obj is MethodInvocation,
+        MethodInvocation,
         propertyAccess1.target);
     expect(invocation2.methodName.name, "d");
     expect(invocation2.typeArguments, isNull);
@@ -182,7 +184,8 @@
     //
     FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(
         (obj) => obj is FunctionExpressionInvocation,
-        FunctionExpressionInvocation, invocation2.target);
+        FunctionExpressionInvocation,
+        invocation2.target);
     expect(invocation3.typeArguments, isNull);
     ArgumentList argumentList3 = invocation3.argumentList;
     expect(argumentList3, isNotNull);
@@ -191,7 +194,8 @@
     // a(b)
     //
     MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation, MethodInvocation,
+        (obj) => obj is MethodInvocation,
+        MethodInvocation,
         invocation3.function);
     expect(invocation4.methodName.name, "a");
     expect(invocation4.typeArguments, isNull);
@@ -208,7 +212,8 @@
     // a<E>(b)<F>(c).d>G?(e)
     //
     MethodInvocation invocation2 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation, MethodInvocation,
+        (obj) => obj is MethodInvocation,
+        MethodInvocation,
         propertyAccess1.target);
     expect(invocation2.methodName.name, "d");
     expect(invocation2.typeArguments, isNotNull);
@@ -220,7 +225,8 @@
     //
     FunctionExpressionInvocation invocation3 = EngineTestCase.assertInstanceOf(
         (obj) => obj is FunctionExpressionInvocation,
-        FunctionExpressionInvocation, invocation2.target);
+        FunctionExpressionInvocation,
+        invocation2.target);
     expect(invocation3.typeArguments, isNotNull);
     ArgumentList argumentList3 = invocation3.argumentList;
     expect(argumentList3, isNotNull);
@@ -229,7 +235,8 @@
     // a(b)
     //
     MethodInvocation invocation4 = EngineTestCase.assertInstanceOf(
-        (obj) => obj is MethodInvocation, MethodInvocation,
+        (obj) => obj is MethodInvocation,
+        MethodInvocation,
         invocation3.function);
     expect(invocation4.methodName.name, "a");
     expect(invocation4.typeArguments, isNotNull);
@@ -551,32 +558,24 @@
 
   void fail_invalidCommentReference__new_nonIdentifier() {
     // This test fails because the method parseCommentReference returns null.
-    parse3("parseCommentReference", <Object>[
-      "new 42",
-      0
-    ], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+    parse3("parseCommentReference", <Object>["new 42", 0], "",
+        [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
   }
 
   void fail_invalidCommentReference__new_tooMuch() {
-    parse3("parseCommentReference", <Object>[
-      "new a.b.c.d",
-      0
-    ], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+    parse3("parseCommentReference", <Object>["new a.b.c.d", 0], "",
+        [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
   }
 
   void fail_invalidCommentReference__nonNew_nonIdentifier() {
     // This test fails because the method parseCommentReference returns null.
-    parse3("parseCommentReference", <Object>[
-      "42",
-      0
-    ], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+    parse3("parseCommentReference", <Object>["42", 0], "",
+        [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
   }
 
   void fail_invalidCommentReference__nonNew_tooMuch() {
-    parse3("parseCommentReference", <Object>[
-      "a.b.c.d",
-      0
-    ], "", [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
+    parse3("parseCommentReference", <Object>["a.b.c.d", 0], "",
+        [ParserErrorCode.INVALID_COMMENT_REFERENCE]);
   }
 
   void fail_missingClosingParenthesis() {
@@ -757,11 +756,11 @@
   void test_classTypeAlias_abstractAfterEq() {
     // This syntax has been removed from the language in favor of
     // "abstract class A = B with C;" (issue 18098).
-    parse3("parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
-        "class A = abstract B with C;", [
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN
-    ]);
+    parse3(
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
+        "class A = abstract B with C;",
+        [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.EXPECTED_TOKEN]);
   }
 
   void test_colonInPlaceOfIn() {
@@ -918,7 +917,8 @@
   }
 
   void test_duplicateLabelInSwitchStatement() {
-    parse4("parseSwitchStatement",
+    parse4(
+        "parseSwitchStatement",
         "switch (e) {l1: case 0: break; l1: case 1: break;}",
         [ParserErrorCode.DUPLICATE_LABEL_IN_SWITCH_STATEMENT]);
   }
@@ -929,13 +929,15 @@
   }
 
   void test_enumInClass() {
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 class Foo {
   enum Bar {
     Bar1, Bar2, Bar3
   }
 }
-''', [ParserErrorCode.ENUM_IN_CLASS]);
+''',
+        [ParserErrorCode.ENUM_IN_CLASS]);
   }
 
   void test_equalityCannotBeEqualityOperand_eq_eq() {
@@ -989,7 +991,9 @@
   }
 
   void test_expectedExecutable_topLevel_eof() {
-    parse2("parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+    parse2(
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "x",
         [new AnalysisError(null, 0, 1, ParserErrorCode.EXPECTED_EXECUTABLE)]);
   }
@@ -1018,19 +1022,17 @@
   }
 
   void test_expectedToken_parseStatement_afterVoid() {
-    ParserTestCase.parseStatement("void}", [
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.MISSING_IDENTIFIER
-    ]);
+    ParserTestCase.parseStatement("void}",
+        [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_IDENTIFIER]);
   }
 
   void test_expectedToken_semicolonAfterClass() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.CLASS);
-    parse3("parseClassTypeAlias", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      token
-    ], "A = B with C", [ParserErrorCode.EXPECTED_TOKEN]);
+    parse3(
+        "parseClassTypeAlias",
+        <Object>[emptyCommentAndMetadata(), null, token],
+        "A = B with C",
+        [ParserErrorCode.EXPECTED_TOKEN]);
   }
 
   void test_expectedToken_semicolonMissingAfterExport() {
@@ -1140,7 +1142,9 @@
   }
 
   void test_externalOperatorWithBody() {
-    parse3("parseClassMember", <Object>["C"],
+    parse3(
+        "parseClassMember",
+        <Object>["C"],
         "external operator +(int value) {}",
         [ParserErrorCode.EXTERNAL_OPERATOR_WITH_BODY]);
   }
@@ -1349,19 +1353,13 @@
   }
 
   void test_invalidStarAfterAsync() {
-    parse3("parseFunctionBody", <Object>[
-      false,
-      null,
-      false
-    ], "async* => 0;", [ParserErrorCode.INVALID_STAR_AFTER_ASYNC]);
+    parse3("parseFunctionBody", <Object>[false, null, false], "async* => 0;",
+        [ParserErrorCode.INVALID_STAR_AFTER_ASYNC]);
   }
 
   void test_invalidSync() {
-    parse3("parseFunctionBody", <Object>[
-      false,
-      null,
-      false
-    ], "sync* => 0;", [ParserErrorCode.INVALID_SYNC]);
+    parse3("parseFunctionBody", <Object>[false, null, false], "sync* => 0;",
+        [ParserErrorCode.INVALID_SYNC]);
   }
 
   void test_invalidUnicodeEscape_incomplete_noDigits() {
@@ -1491,19 +1489,19 @@
   }
 
   void test_missingFunctionBody_emptyNotAllowed() {
-    parse3("parseFunctionBody", <Object>[
-      false,
-      ParserErrorCode.MISSING_FUNCTION_BODY,
-      false
-    ], ";", [ParserErrorCode.MISSING_FUNCTION_BODY]);
+    parse3(
+        "parseFunctionBody",
+        <Object>[false, ParserErrorCode.MISSING_FUNCTION_BODY, false],
+        ";",
+        [ParserErrorCode.MISSING_FUNCTION_BODY]);
   }
 
   void test_missingFunctionBody_invalid() {
-    parse3("parseFunctionBody", <Object>[
-      false,
-      ParserErrorCode.MISSING_FUNCTION_BODY,
-      false
-    ], "return 0;", [ParserErrorCode.MISSING_FUNCTION_BODY]);
+    parse3(
+        "parseFunctionBody",
+        <Object>[false, ParserErrorCode.MISSING_FUNCTION_BODY, false],
+        "return 0;",
+        [ParserErrorCode.MISSING_FUNCTION_BODY]);
   }
 
   void test_missingFunctionParameters_local_void_block() {
@@ -1546,10 +1544,8 @@
   }
 
   void test_missingIdentifier_beforeClosingCurly() {
-    parse3("parseClassMember", <Object>["C"], "int}", [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.EXPECTED_TOKEN
-    ]);
+    parse3("parseClassMember", <Object>["C"], "int}",
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
   }
 
   void test_missingIdentifier_functionDeclaration_returnTypeWithoutName() {
@@ -1577,11 +1573,8 @@
   }
 
   void test_missingKeywordOperator() {
-    parse3("parseOperator", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      null
-    ], "+(x) {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
+    parse3("parseOperator", <Object>[emptyCommentAndMetadata(), null, null],
+        "+(x) {}", [ParserErrorCode.MISSING_KEYWORD_OPERATOR]);
   }
 
   void test_missingKeywordOperator_parseClassMember() {
@@ -1628,11 +1621,8 @@
   }
 
   void test_missingStartAfterSync() {
-    parse3("parseFunctionBody", <Object>[
-      false,
-      null,
-      false
-    ], "sync {}", [ParserErrorCode.MISSING_STAR_AFTER_SYNC]);
+    parse3("parseFunctionBody", <Object>[false, null, false], "sync {}",
+        [ParserErrorCode.MISSING_STAR_AFTER_SYNC]);
   }
 
   void test_missingStatement() {
@@ -1850,13 +1840,17 @@
   }
 
   void test_staticOperator_noReturnType() {
-    parse3("parseClassMember", <Object>["C"],
+    parse3(
+        "parseClassMember",
+        <Object>["C"],
         "static operator +(int x) => x + 1;",
         [ParserErrorCode.STATIC_OPERATOR]);
   }
 
   void test_staticOperator_returnType() {
-    parse3("parseClassMember", <Object>["C"],
+    parse3(
+        "parseClassMember",
+        <Object>["C"],
         "static int operator +(int x) => x + 1;",
         [ParserErrorCode.STATIC_OPERATOR]);
   }
@@ -1887,7 +1881,8 @@
   }
 
   void test_switchHasCaseAfterDefaultCase() {
-    parse4("parseSwitchStatement",
+    parse4(
+        "parseSwitchStatement",
         "switch (a) {default: return 0; case 1: return 1;}",
         [ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE]);
   }
@@ -1901,13 +1896,15 @@
   }
 
   void test_switchHasMultipleDefaultCases() {
-    parse4("parseSwitchStatement",
+    parse4(
+        "parseSwitchStatement",
         "switch (a) {default: return 0; default: return 1;}",
         [ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES]);
   }
 
   void test_switchHasMultipleDefaultCases_repeated() {
-    parse4("parseSwitchStatement",
+    parse4(
+        "parseSwitchStatement",
         "switch (a) {default: return 0; default: return 1; default: return 2;}",
         [
       ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
@@ -1922,19 +1919,25 @@
   }
 
   void test_topLevelOperator_withoutType() {
-    parse3("parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+    parse3(
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "operator +(bool x, bool y) => x | y;",
         [ParserErrorCode.TOP_LEVEL_OPERATOR]);
   }
 
   void test_topLevelOperator_withType() {
-    parse3("parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+    parse3(
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "bool operator +(bool x, bool y) => x | y;",
         [ParserErrorCode.TOP_LEVEL_OPERATOR]);
   }
 
   void test_topLevelOperator_withVoid() {
-    parse3("parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+    parse3(
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "void operator +(bool x, bool y) => x | y;",
         [ParserErrorCode.TOP_LEVEL_OPERATOR]);
   }
@@ -1978,10 +1981,8 @@
   }
 
   void test_unexpectedToken_semicolonBetweenClassMembers() {
-    parse3("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN]);
+    parse3("parseClassDeclaration", <Object>[emptyCommentAndMetadata(), null],
+        "class C { int x; ; int y;}", [ParserErrorCode.UNEXPECTED_TOKEN]);
   }
 
   void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() {
@@ -1993,9 +1994,11 @@
     // Although the "unterminated string" error message is produced by the
     // scanner, we need to verify that the parser can handle the tokens
     // produced by the scanner when an unterminated string is encountered.
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 void main() {
-  var x = "''', [
+  var x = "''',
+        [
       ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
       ParserErrorCode.EXPECTED_TOKEN,
       ParserErrorCode.EXPECTED_TOKEN
@@ -2006,21 +2009,25 @@
     // Although the "unterminated string" error message is produced by the
     // scanner, we need to verify that the parser can handle the tokens
     // produced by the scanner when an unterminated string is encountered.
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 void main() {
   var x = "
 ;
 }
-''', [ScannerErrorCode.UNTERMINATED_STRING_LITERAL]);
+''',
+        [ScannerErrorCode.UNTERMINATED_STRING_LITERAL]);
   }
 
   void test_unterminatedString_multiline_at_eof_3_quotes() {
     // Although the "unterminated string" error message is produced by the
     // scanner, we need to verify that the parser can handle the tokens
     // produced by the scanner when an unterminated string is encountered.
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 void main() {
-  var x = """''', [
+  var x = """''',
+        [
       ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
       ParserErrorCode.EXPECTED_TOKEN,
       ParserErrorCode.EXPECTED_TOKEN
@@ -2031,9 +2038,11 @@
     // Although the "unterminated string" error message is produced by the
     // scanner, we need to verify that the parser can handle the tokens
     // produced by the scanner when an unterminated string is encountered.
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 void main() {
-  var x = """"''', [
+  var x = """"''',
+        [
       ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
       ParserErrorCode.EXPECTED_TOKEN,
       ParserErrorCode.EXPECTED_TOKEN
@@ -2044,9 +2053,11 @@
     // Although the "unterminated string" error message is produced by the
     // scanner, we need to verify that the parser can handle the tokens
     // produced by the scanner when an unterminated string is encountered.
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 void main() {
-  var x = """""''', [
+  var x = """""''',
+        [
       ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
       ParserErrorCode.EXPECTED_TOKEN,
       ParserErrorCode.EXPECTED_TOKEN
@@ -2150,10 +2161,8 @@
   }
 
   void test_withWithoutExtends() {
-    parse3("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A with B, C {}", [ParserErrorCode.WITH_WITHOUT_EXTENDS]);
+    parse3("parseClassDeclaration", <Object>[emptyCommentAndMetadata(), null],
+        "class A with B, C {}", [ParserErrorCode.WITH_WITHOUT_EXTENDS]);
   }
 
   void test_wrongSeparatorForNamedParameter() {
@@ -2349,10 +2358,14 @@
   }
 
   void test_insert_statement_in_method_with_mismatched_braces() {
-    _assertParse('''
+    _assertParse(
+        '''
 class C {
   void f() {
-''', '', 'g();', '''
+''',
+        '',
+        'g();',
+        '''
     if (b) {
 
 
@@ -2533,9 +2546,12 @@
     expect(incrementalTokens, isNotNull);
     IncrementalParser incrementalParser = new IncrementalParser(
         source, incrementalScanner.tokenMap, incrementalListener);
-    CompilationUnit incrementalUnit = incrementalParser.reparse(originalUnit,
-        incrementalScanner.leftToken, incrementalScanner.rightToken,
-        replaceStart, prefix.length + removed.length);
+    CompilationUnit incrementalUnit = incrementalParser.reparse(
+        originalUnit,
+        incrementalScanner.leftToken,
+        incrementalScanner.rightToken,
+        replaceStart,
+        prefix.length + removed.length);
     expect(incrementalUnit, isNotNull);
     //
     // Validate that the results of the incremental parse are the same as the
@@ -3182,9 +3198,11 @@
   }
 
   void test_classTypeAlias_withBody() {
-    ParserTestCase.parseCompilationUnit(r'''
+    ParserTestCase.parseCompilationUnit(
+        r'''
 class A {}
-class B = Object with A {}''', [ParserErrorCode.EXPECTED_TOKEN]);
+class B = Object with A {}''',
+        [ParserErrorCode.EXPECTED_TOKEN]);
   }
 
   void test_conditionalExpression_missingElse() {
@@ -3302,10 +3320,8 @@
 
   void test_functionExpression_in_ConstructorFieldInitializer() {
     CompilationUnit unit = ParserTestCase.parseCompilationUnit(
-        "class A { A() : a = (){}; var v; }", [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.UNEXPECTED_TOKEN
-    ]);
+        "class A { A() : a = (){}; var v; }",
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.UNEXPECTED_TOKEN]);
     // Make sure we recovered and parsed "var v" correctly
     ClassDeclaration declaration = unit.declarations[0] as ClassDeclaration;
     NodeList<ClassMember> members = declaration.members;
@@ -3322,6 +3338,17 @@
     parseExpression("m(f() => 0);", [ParserErrorCode.EXPECTED_TOKEN]);
   }
 
+  void test_declarationBeforeDirective() {
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(
+        "class foo { } import 'bar.dart';",
+        [ParserErrorCode.DIRECTIVE_AFTER_DECLARATION]);
+    expect(unit.directives, hasLength(1));
+    expect(unit.declarations, hasLength(1));
+    ClassDeclaration classDecl = unit.childEntities.first;
+    expect(classDecl, isNotNull);
+    expect(classDecl.name.name, 'foo');
+  }
+
   void test_importDirectivePartial_as() {
     CompilationUnit unit = ParserTestCase.parseCompilationUnit(
         "import 'b.dart' d as b;", [ParserErrorCode.UNEXPECTED_TOKEN]);
@@ -3350,10 +3377,8 @@
   }
 
   void test_incomplete_conditionalExpression() {
-    parseExpression("x ? 0", [
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.MISSING_IDENTIFIER
-    ]);
+    parseExpression("x ? 0",
+        [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.MISSING_IDENTIFIER]);
   }
 
   void test_incomplete_constructorInitializers_empty() {
@@ -3402,10 +3427,8 @@
   }
 
   void test_incomplete_topLevelVariable_const() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit("const ", [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.EXPECTED_TOKEN
-    ]);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit("const ",
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
@@ -3419,10 +3442,8 @@
   }
 
   void test_incomplete_topLevelVariable_final() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit("final ", [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.EXPECTED_TOKEN
-    ]);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit("final ",
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
@@ -3436,10 +3457,8 @@
   }
 
   void test_incomplete_topLevelVariable_var() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit("var ", [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.EXPECTED_TOKEN
-    ]);
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit("var ",
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember member = declarations[0];
@@ -3453,10 +3472,12 @@
   }
 
   void test_incompleteField_const() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(
+        r'''
 class C {
   const
-}''', [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
+}''',
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
@@ -3477,10 +3498,12 @@
   }
 
   void test_incompleteField_final() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(
+        r'''
 class C {
   final
-}''', [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
+}''',
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
@@ -3501,10 +3524,12 @@
   }
 
   void test_incompleteField_var() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(
+        r'''
 class C {
   var
-}''', [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
+}''',
+        [ParserErrorCode.MISSING_IDENTIFIER, ParserErrorCode.EXPECTED_TOKEN]);
     NodeList<CompilationUnitMember> declarations = unit.declarations;
     expect(declarations, hasLength(1));
     CompilationUnitMember unitMember = declarations[0];
@@ -3662,11 +3687,13 @@
   }
 
   void test_missingGet() {
-    CompilationUnit unit = ParserTestCase.parseCompilationUnit(r'''
+    CompilationUnit unit = ParserTestCase.parseCompilationUnit(
+        r'''
 class C {
   int length {}
   void foo() {}
-}''', [ParserErrorCode.MISSING_GET]);
+}''',
+        [ParserErrorCode.MISSING_GET]);
     expect(unit, isNotNull);
     ClassDeclaration classDeclaration =
         unit.declarations[0] as ClassDeclaration;
@@ -3923,7 +3950,8 @@
 
   void test_visitAssignmentExpression() {
     AssignmentExpression fromNode = AstFactory.assignmentExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS_EQ,
+        AstFactory.identifier3("a"),
+        TokenType.PLUS_EQ,
         AstFactory.identifier3("b"));
     DartType propagatedType = ElementFactory.classElement2("C").type;
     MethodElement propagatedElement =
@@ -3935,7 +3963,8 @@
     fromNode.staticElement = staticElement;
     fromNode.staticType = staticType;
     AssignmentExpression toNode = AstFactory.assignmentExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS_EQ,
+        AstFactory.identifier3("a"),
+        TokenType.PLUS_EQ,
         AstFactory.identifier3("b"));
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.propagatedElement, same(propagatedElement));
@@ -3946,7 +3975,8 @@
 
   void test_visitBinaryExpression() {
     BinaryExpression fromNode = AstFactory.binaryExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS,
+        AstFactory.identifier3("a"),
+        TokenType.PLUS,
         AstFactory.identifier3("b"));
     DartType propagatedType = ElementFactory.classElement2("C").type;
     MethodElement propagatedElement =
@@ -3958,7 +3988,8 @@
     fromNode.staticElement = staticElement;
     fromNode.staticType = staticType;
     BinaryExpression toNode = AstFactory.binaryExpression(
-        AstFactory.identifier3("a"), TokenType.PLUS,
+        AstFactory.identifier3("a"),
+        TokenType.PLUS,
         AstFactory.identifier3("b"));
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.propagatedElement, same(propagatedElement));
@@ -4005,14 +4036,16 @@
 
   void test_visitConditionalExpression() {
     ConditionalExpression fromNode = AstFactory.conditionalExpression(
-        AstFactory.identifier3("c"), AstFactory.identifier3("a"),
+        AstFactory.identifier3("c"),
+        AstFactory.identifier3("a"),
         AstFactory.identifier3("b"));
     DartType propagatedType = ElementFactory.classElement2("C").type;
     fromNode.propagatedType = propagatedType;
     DartType staticType = ElementFactory.classElement2("C").type;
     fromNode.staticType = staticType;
     ConditionalExpression toNode = AstFactory.conditionalExpression(
-        AstFactory.identifier3("c"), AstFactory.identifier3("a"),
+        AstFactory.identifier3("c"),
+        AstFactory.identifier3("a"),
         AstFactory.identifier3("b"));
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.propagatedType, same(propagatedType));
@@ -4023,14 +4056,18 @@
     String className = "A";
     String constructorName = "c";
     ConstructorDeclaration fromNode = AstFactory.constructorDeclaration(
-        AstFactory.identifier3(className), constructorName,
-        AstFactory.formalParameterList(), null);
+        AstFactory.identifier3(className),
+        constructorName,
+        AstFactory.formalParameterList(),
+        null);
     ConstructorElement element = ElementFactory.constructorElement2(
         ElementFactory.classElement2(className), constructorName);
     fromNode.element = element;
     ConstructorDeclaration toNode = AstFactory.constructorDeclaration(
-        AstFactory.identifier3(className), constructorName,
-        AstFactory.formalParameterList(), null);
+        AstFactory.identifier3(className),
+        constructorName,
+        AstFactory.formalParameterList(),
+        null);
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(toNode.element, same(element));
   }
@@ -4549,7 +4586,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["this", 5], "");
     SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier, SimpleIdentifier,
+        (obj) => obj is SimpleIdentifier,
+        SimpleIdentifier,
         reference.identifier);
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
@@ -5159,10 +5197,8 @@
   }
 
   void test_parseAssignableSelector_none() {
-    SimpleIdentifier selector = parse("parseAssignableSelector", <Object>[
-      new SimpleIdentifier(null),
-      true
-    ], ";");
+    SimpleIdentifier selector = parse("parseAssignableSelector",
+        <Object>[new SimpleIdentifier(null), true], ";");
     expect(selector, isNotNull);
   }
 
@@ -5204,7 +5240,8 @@
     Statement statement = (body as BlockFunctionBody).block.statements[0];
     EngineTestCase.assertInstanceOf(
         (obj) => obj is VariableDeclarationStatement,
-        VariableDeclarationStatement, statement);
+        VariableDeclarationStatement,
+        statement);
   }
 
   void test_parseBitwiseAndExpression_normal() {
@@ -5463,10 +5500,13 @@
   }
 
   void test_parseClassDeclaration_abstract() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      TokenFactory.tokenFromKeyword(Keyword.ABSTRACT)
-    ], "class A {}");
+    ClassDeclaration declaration = parse(
+        "parseClassDeclaration",
+        <Object>[
+          emptyCommentAndMetadata(),
+          TokenFactory.tokenFromKeyword(Keyword.ABSTRACT)
+        ],
+        "class A {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNotNull);
     expect(declaration.extendsClause, isNull);
@@ -5480,10 +5520,8 @@
   }
 
   void test_parseClassDeclaration_empty() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A {}");
+    ClassDeclaration declaration = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNull);
@@ -5497,10 +5535,8 @@
   }
 
   void test_parseClassDeclaration_extends() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A extends B {}");
+    ClassDeclaration declaration = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A extends B {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNotNull);
@@ -5514,10 +5550,10 @@
   }
 
   void test_parseClassDeclaration_extendsAndImplements() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A extends B implements C {}");
+    ClassDeclaration declaration = parse(
+        "parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null],
+        "class A extends B implements C {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNotNull);
@@ -5531,10 +5567,10 @@
   }
 
   void test_parseClassDeclaration_extendsAndWith() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A extends B with C {}");
+    ClassDeclaration declaration = parse(
+        "parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null],
+        "class A extends B with C {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.classKeyword, isNotNull);
@@ -5549,10 +5585,10 @@
   }
 
   void test_parseClassDeclaration_extendsAndWithAndImplements() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A extends B with C implements D {}");
+    ClassDeclaration declaration = parse(
+        "parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null],
+        "class A extends B with C implements D {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.classKeyword, isNotNull);
@@ -5567,10 +5603,8 @@
   }
 
   void test_parseClassDeclaration_implements() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A implements C {}");
+    ClassDeclaration declaration = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A implements C {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNull);
@@ -5584,10 +5618,10 @@
   }
 
   void test_parseClassDeclaration_native() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A native 'nativeValue' {}");
+    ClassDeclaration declaration = parse(
+        "parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null],
+        "class A native 'nativeValue' {}");
     NativeClause nativeClause = declaration.nativeClause;
     expect(nativeClause, isNotNull);
     expect(nativeClause.nativeKeyword, isNotNull);
@@ -5597,10 +5631,8 @@
   }
 
   void test_parseClassDeclaration_nonEmpty() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A {var f;}");
+    ClassDeclaration declaration = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A {var f;}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNull);
@@ -5614,10 +5646,10 @@
   }
 
   void test_parseClassDeclaration_typeAlias_implementsC() {
-    ClassTypeAlias typeAlias = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A = Object with B implements C;");
+    ClassTypeAlias typeAlias = parse(
+        "parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null],
+        "class A = Object with B implements C;");
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name, isNotNull);
     expect(typeAlias.typeParameters, isNull);
@@ -5629,10 +5661,8 @@
   }
 
   void test_parseClassDeclaration_typeAlias_withB() {
-    ClassTypeAlias typeAlias = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A = Object with B;");
+    ClassTypeAlias typeAlias = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A = Object with B;");
     expect(typeAlias.typedefKeyword, isNotNull);
     expect(typeAlias.name, isNotNull);
     expect(typeAlias.typeParameters, isNull);
@@ -5644,10 +5674,8 @@
   }
 
   void test_parseClassDeclaration_typeParameters() {
-    ClassDeclaration declaration = parse("parseClassDeclaration", <Object>[
-      emptyCommentAndMetadata(),
-      null
-    ], "class A<B> {}");
+    ClassDeclaration declaration = parse("parseClassDeclaration",
+        <Object>[emptyCommentAndMetadata(), null], "class A<B> {}");
     expect(declaration.documentationComment, isNull);
     expect(declaration.abstractKeyword, isNull);
     expect(declaration.extendsClause, isNull);
@@ -6055,11 +6083,10 @@
   void test_parseClassTypeAlias_abstract() {
     Token classToken = TokenFactory.tokenFromKeyword(Keyword.CLASS);
     Token abstractToken = TokenFactory.tokenFromKeyword(Keyword.ABSTRACT);
-    ClassTypeAlias classTypeAlias = parse("parseClassTypeAlias", <Object>[
-      emptyCommentAndMetadata(),
-      abstractToken,
-      classToken
-    ], "A = B with C;");
+    ClassTypeAlias classTypeAlias = parse(
+        "parseClassTypeAlias",
+        <Object>[emptyCommentAndMetadata(), abstractToken, classToken],
+        "A = B with C;");
     expect(classTypeAlias.typedefKeyword, isNotNull);
     expect(classTypeAlias.name.name, "A");
     expect(classTypeAlias.equals, isNotNull);
@@ -6072,11 +6099,10 @@
 
   void test_parseClassTypeAlias_implements() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.CLASS);
-    ClassTypeAlias classTypeAlias = parse("parseClassTypeAlias", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      token
-    ], "A = B with C implements D;");
+    ClassTypeAlias classTypeAlias = parse(
+        "parseClassTypeAlias",
+        <Object>[emptyCommentAndMetadata(), null, token],
+        "A = B with C implements D;");
     expect(classTypeAlias.typedefKeyword, isNotNull);
     expect(classTypeAlias.name.name, "A");
     expect(classTypeAlias.equals, isNotNull);
@@ -6089,11 +6115,8 @@
 
   void test_parseClassTypeAlias_with() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.CLASS);
-    ClassTypeAlias classTypeAlias = parse("parseClassTypeAlias", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      token
-    ], "A = B with C;");
+    ClassTypeAlias classTypeAlias = parse("parseClassTypeAlias",
+        <Object>[emptyCommentAndMetadata(), null, token], "A = B with C;");
     expect(classTypeAlias.typedefKeyword, isNotNull);
     expect(classTypeAlias.name.name, "A");
     expect(classTypeAlias.equals, isNotNull);
@@ -6106,11 +6129,10 @@
 
   void test_parseClassTypeAlias_with_implements() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.CLASS);
-    ClassTypeAlias classTypeAlias = parse("parseClassTypeAlias", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      token
-    ], "A = B with C implements D;");
+    ClassTypeAlias classTypeAlias = parse(
+        "parseClassTypeAlias",
+        <Object>[emptyCommentAndMetadata(), null, token],
+        "A = B with C implements D;");
     expect(classTypeAlias.typedefKeyword, isNotNull);
     expect(classTypeAlias.name.name, "A");
     expect(classTypeAlias.equals, isNotNull);
@@ -6236,7 +6258,8 @@
   }
 
   void test_parseCommentAndMetadata_singleLine() {
-    CommentAndMetadata commentAndMetadata = parse4("parseCommentAndMetadata",
+    CommentAndMetadata commentAndMetadata = parse4(
+        "parseCommentAndMetadata",
         r'''
 /// 1
 /// 2
@@ -6249,7 +6272,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["new a.b", 7], "");
     PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is PrefixedIdentifier, PrefixedIdentifier,
+        (obj) => obj is PrefixedIdentifier,
+        PrefixedIdentifier,
         reference.identifier);
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -6266,7 +6290,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["new a", 5], "");
     SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier, SimpleIdentifier,
+        (obj) => obj is SimpleIdentifier,
+        SimpleIdentifier,
         reference.identifier);
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
@@ -6277,7 +6302,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["a.b", 7], "");
     PrefixedIdentifier prefixedIdentifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is PrefixedIdentifier, PrefixedIdentifier,
+        (obj) => obj is PrefixedIdentifier,
+        PrefixedIdentifier,
         reference.identifier);
     SimpleIdentifier prefix = prefixedIdentifier.prefix;
     expect(prefix.token, isNotNull);
@@ -6294,7 +6320,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["a", 5], "");
     SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier, SimpleIdentifier,
+        (obj) => obj is SimpleIdentifier,
+        SimpleIdentifier,
         reference.identifier);
     expect(identifier.token, isNotNull);
     expect(identifier.name, "a");
@@ -6305,7 +6332,8 @@
     CommentReference reference =
         parse("parseCommentReference", <Object>["", 5], "");
     SimpleIdentifier identifier = EngineTestCase.assertInstanceOf(
-        (obj) => obj is SimpleIdentifier, SimpleIdentifier,
+        (obj) => obj is SimpleIdentifier,
+        SimpleIdentifier,
         reference.identifier);
     expect(identifier, isNotNull);
     expect(identifier.isSynthetic, isTrue);
@@ -6572,7 +6600,8 @@
 
   void test_parseCompilationUnitMember_abstractAsPrefix() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "abstract.A _abstract = new abstract.A();");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6594,7 +6623,8 @@
 
   void test_parseCompilationUnitMember_constVariable() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "const int x = 0;");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6602,7 +6632,8 @@
 
   void test_parseCompilationUnitMember_finalVariable() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "final x = 0;");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6720,7 +6751,8 @@
   }
 
   void test_parseCompilationUnitMember_typeAlias_generic() {
-    ClassTypeAlias typeAlias = parse("parseCompilationUnitMember",
+    ClassTypeAlias typeAlias = parse(
+        "parseCompilationUnitMember",
         <Object>[emptyCommentAndMetadata()],
         "class C<E> = S<E> with M<E> implements I<E>;");
     expect(typeAlias.typedefKeyword, isNotNull);
@@ -6735,7 +6767,8 @@
   }
 
   void test_parseCompilationUnitMember_typeAlias_implements() {
-    ClassTypeAlias typeAlias = parse("parseCompilationUnitMember",
+    ClassTypeAlias typeAlias = parse(
+        "parseCompilationUnitMember",
         <Object>[emptyCommentAndMetadata()],
         "class C = S with M implements I;");
     expect(typeAlias.typedefKeyword, isNotNull);
@@ -6772,7 +6805,8 @@
 
   void test_parseCompilationUnitMember_variable() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "var x = 0;");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6780,7 +6814,8 @@
 
   void test_parseCompilationUnitMember_variableGet() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "String get = null;");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6788,7 +6823,8 @@
 
   void test_parseCompilationUnitMember_variableSet() {
     TopLevelVariableDeclaration declaration = parse(
-        "parseCompilationUnitMember", <Object>[emptyCommentAndMetadata()],
+        "parseCompilationUnitMember",
+        <Object>[emptyCommentAndMetadata()],
         "String set = null;");
     expect(declaration.semicolon, isNotNull);
     expect(declaration.variables, isNotNull);
@@ -6871,7 +6907,8 @@
     ConstructorInitializer initializer = initializers[0];
     EngineTestCase.assertInstanceOf((obj) => obj is ConstructorFieldInitializer,
         ConstructorFieldInitializer, initializer);
-    EngineTestCase.assertInstanceOf((obj) => obj is ParenthesizedExpression,
+    EngineTestCase.assertInstanceOf(
+        (obj) => obj is ParenthesizedExpression,
         ParenthesizedExpression,
         (initializer as ConstructorFieldInitializer).expression);
     EngineTestCase.assertInstanceOf(
@@ -7125,7 +7162,8 @@
   }
 
   void test_parseExportDirective_hide() {
-    ExportDirective directive = parse("parseExportDirective",
+    ExportDirective directive = parse(
+        "parseExportDirective",
         <Object>[emptyCommentAndMetadata()],
         "export 'lib/lib.dart' hide A, B;");
     expect(directive.keyword, isNotNull);
@@ -7135,7 +7173,8 @@
   }
 
   void test_parseExportDirective_hide_show() {
-    ExportDirective directive = parse("parseExportDirective",
+    ExportDirective directive = parse(
+        "parseExportDirective",
         <Object>[emptyCommentAndMetadata()],
         "export 'lib/lib.dart' hide A show B;");
     expect(directive.keyword, isNotNull);
@@ -7154,7 +7193,8 @@
   }
 
   void test_parseExportDirective_show() {
-    ExportDirective directive = parse("parseExportDirective",
+    ExportDirective directive = parse(
+        "parseExportDirective",
         <Object>[emptyCommentAndMetadata()],
         "export 'lib/lib.dart' show A, B;");
     expect(directive.keyword, isNotNull);
@@ -7164,7 +7204,8 @@
   }
 
   void test_parseExportDirective_show_hide() {
-    ExportDirective directive = parse("parseExportDirective",
+    ExportDirective directive = parse(
+        "parseExportDirective",
         <Object>[emptyCommentAndMetadata()],
         "export 'lib/lib.dart' show B hide A;");
     expect(directive.keyword, isNotNull);
@@ -7647,8 +7688,8 @@
   }
 
   void test_parseFormalParameterList_prefixedType_partial() {
-    FormalParameterList parameterList = parse4("parseFormalParameterList",
-        "(io.)", [
+    FormalParameterList parameterList = parse4(
+        "parseFormalParameterList", "(io.)", [
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
@@ -7661,8 +7702,8 @@
   }
 
   void test_parseFormalParameterList_prefixedType_partial2() {
-    FormalParameterList parameterList = parse4("parseFormalParameterList",
-        "(io.,a)", [
+    FormalParameterList parameterList = parse4(
+        "parseFormalParameterList", "(io.,a)", [
       ParserErrorCode.MISSING_IDENTIFIER,
       ParserErrorCode.MISSING_IDENTIFIER
     ]);
@@ -8005,11 +8046,8 @@
 
   void test_parseFunctionBody_skip_block_invalid() {
     ParserTestCase.parseFunctionBodies = false;
-    FunctionBody functionBody = parse3("parseFunctionBody", <Object>[
-      false,
-      null,
-      false
-    ], "{", [ParserErrorCode.EXPECTED_TOKEN]);
+    FunctionBody functionBody = parse3("parseFunctionBody",
+        <Object>[false, null, false], "{", [ParserErrorCode.EXPECTED_TOKEN]);
     EngineTestCase.assertInstanceOf(
         (obj) => obj is EmptyFunctionBody, EmptyFunctionBody, functionBody);
   }
@@ -8130,12 +8168,10 @@
   void test_parseGetter_nonStatic() {
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
-    MethodDeclaration method = parse("parseGetter", <Object>[
-      commentAndMetadata(comment),
-      null,
-      null,
-      returnType
-    ], "get a;");
+    MethodDeclaration method = parse(
+        "parseGetter",
+        <Object>[commentAndMetadata(comment), null, null, returnType],
+        "get a;");
     expect(method.body, isNotNull);
     expect(method.documentationComment, comment);
     expect(method.externalKeyword, isNull);
@@ -8151,12 +8187,10 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
     TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
-    MethodDeclaration method = parse("parseGetter", <Object>[
-      commentAndMetadata(comment),
-      null,
-      staticKeyword,
-      returnType
-    ], "get a => 42;");
+    MethodDeclaration method = parse(
+        "parseGetter",
+        <Object>[commentAndMetadata(comment), null, staticKeyword, returnType],
+        "get a => 42;");
     expect(method.body, isNotNull);
     expect(method.documentationComment, comment);
     expect(method.externalKeyword, isNull);
@@ -8238,7 +8272,8 @@
   }
 
   void test_parseImportDirective_deferred() {
-    ImportDirective directive = parse("parseImportDirective",
+    ImportDirective directive = parse(
+        "parseImportDirective",
         <Object>[emptyCommentAndMetadata()],
         "import 'lib/lib.dart' deferred as a;");
     expect(directive.keyword, isNotNull);
@@ -8251,7 +8286,8 @@
   }
 
   void test_parseImportDirective_hide() {
-    ImportDirective directive = parse("parseImportDirective",
+    ImportDirective directive = parse(
+        "parseImportDirective",
         <Object>[emptyCommentAndMetadata()],
         "import 'lib/lib.dart' hide A, B;");
     expect(directive.keyword, isNotNull);
@@ -8288,7 +8324,8 @@
   }
 
   void test_parseImportDirective_prefix_hide_show() {
-    ImportDirective directive = parse("parseImportDirective",
+    ImportDirective directive = parse(
+        "parseImportDirective",
         <Object>[emptyCommentAndMetadata()],
         "import 'lib/lib.dart' as a hide A show B;");
     expect(directive.keyword, isNotNull);
@@ -8301,7 +8338,8 @@
   }
 
   void test_parseImportDirective_prefix_show_hide() {
-    ImportDirective directive = parse("parseImportDirective",
+    ImportDirective directive = parse(
+        "parseImportDirective",
         <Object>[emptyCommentAndMetadata()],
         "import 'lib/lib.dart' as a show B hide A;");
     expect(directive.keyword, isNotNull);
@@ -8314,7 +8352,8 @@
   }
 
   void test_parseImportDirective_show() {
-    ImportDirective directive = parse("parseImportDirective",
+    ImportDirective directive = parse(
+        "parseImportDirective",
         <Object>[emptyCommentAndMetadata()],
         "import 'lib/lib.dart' show A, B;");
     expect(directive.keyword, isNotNull);
@@ -8330,13 +8369,10 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
     TypeName type = new TypeName(new SimpleIdentifier(null), null);
-    FieldDeclaration declaration = parse("parseInitializedIdentifierList",
-        <Object>[
-      commentAndMetadata(comment),
-      staticKeyword,
-      null,
-      type
-    ], "a = 1, b, c = 3;");
+    FieldDeclaration declaration = parse(
+        "parseInitializedIdentifierList",
+        <Object>[commentAndMetadata(comment), staticKeyword, null, type],
+        "a = 1, b, c = 3;");
     expect(declaration.documentationComment, comment);
     VariableDeclarationList fields = declaration.fields;
     expect(fields, isNotNull);
@@ -8351,13 +8387,10 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
     Token varKeyword = TokenFactory.tokenFromKeyword(Keyword.VAR);
-    FieldDeclaration declaration = parse("parseInitializedIdentifierList",
-        <Object>[
-      commentAndMetadata(comment),
-      staticKeyword,
-      varKeyword,
-      null
-    ], "a = 1, b, c = 3;");
+    FieldDeclaration declaration = parse(
+        "parseInitializedIdentifierList",
+        <Object>[commentAndMetadata(comment), staticKeyword, varKeyword, null],
+        "a = 1, b, c = 3;");
     expect(declaration.documentationComment, comment);
     VariableDeclarationList fields = declaration.fields;
     expect(fields, isNotNull);
@@ -8740,7 +8773,8 @@
         parse4("parseNonLabeledStatement", "(a) {return a + a;} (3);");
     EngineTestCase.assertInstanceOf(
         (obj) => obj is FunctionExpressionInvocation,
-        FunctionExpressionInvocation, statement.expression);
+        FunctionExpressionInvocation,
+        statement.expression);
     FunctionExpressionInvocation invocation =
         statement.expression as FunctionExpressionInvocation;
     EngineTestCase.assertInstanceOf((obj) => obj is FunctionExpression,
@@ -8969,11 +9003,10 @@
   void test_parseOperator() {
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
-    MethodDeclaration method = parse("parseOperator", <Object>[
-      commentAndMetadata(comment),
-      null,
-      returnType
-    ], "operator +(A a);");
+    MethodDeclaration method = parse(
+        "parseOperator",
+        <Object>[commentAndMetadata(comment), null, returnType],
+        "operator +(A a);");
     expect(method.body, isNotNull);
     expect(method.documentationComment, comment);
     expect(method.externalKeyword, isNull);
@@ -9320,12 +9353,10 @@
   void test_parseSetter_nonStatic() {
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
-    MethodDeclaration method = parse("parseSetter", <Object>[
-      commentAndMetadata(comment),
-      null,
-      null,
-      returnType
-    ], "set a(var x);");
+    MethodDeclaration method = parse(
+        "parseSetter",
+        <Object>[commentAndMetadata(comment), null, null, returnType],
+        "set a(var x);");
     expect(method.body, isNotNull);
     expect(method.documentationComment, comment);
     expect(method.externalKeyword, isNull);
@@ -9342,12 +9373,10 @@
     Comment comment = Comment.createDocumentationComment(new List<Token>(0));
     Token staticKeyword = TokenFactory.tokenFromKeyword(Keyword.STATIC);
     TypeName returnType = new TypeName(new SimpleIdentifier(null), null);
-    MethodDeclaration method = parse("parseSetter", <Object>[
-      commentAndMetadata(comment),
-      null,
-      staticKeyword,
-      returnType
-    ], "set a(var x) {}");
+    MethodDeclaration method = parse(
+        "parseSetter",
+        <Object>[commentAndMetadata(comment), null, staticKeyword, returnType],
+        "set a(var x) {}");
     expect(method.body, isNotNull);
     expect(method.documentationComment, comment);
     expect(method.externalKeyword, isNull);
@@ -10237,7 +10266,8 @@
   void test_parseVariableDeclarationListAfterMetadata_const_noType() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "const a");
+        <Object>[emptyCommentAndMetadata()],
+        "const a");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNull);
     expect(declarationList.variables, hasLength(1));
@@ -10246,7 +10276,8 @@
   void test_parseVariableDeclarationListAfterMetadata_const_type() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "const A a");
+        <Object>[emptyCommentAndMetadata()],
+        "const A a");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNotNull);
     expect(declarationList.variables, hasLength(1));
@@ -10255,7 +10286,8 @@
   void test_parseVariableDeclarationListAfterMetadata_final_noType() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "final a");
+        <Object>[emptyCommentAndMetadata()],
+        "final a");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNull);
     expect(declarationList.variables, hasLength(1));
@@ -10264,7 +10296,8 @@
   void test_parseVariableDeclarationListAfterMetadata_final_type() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "final A a");
+        <Object>[emptyCommentAndMetadata()],
+        "final A a");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNotNull);
     expect(declarationList.variables, hasLength(1));
@@ -10273,7 +10306,8 @@
   void test_parseVariableDeclarationListAfterMetadata_type_multiple() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "A a, b, c");
+        <Object>[emptyCommentAndMetadata()],
+        "A a, b, c");
     expect(declarationList.keyword, isNull);
     expect(declarationList.type, isNotNull);
     expect(declarationList.variables, hasLength(3));
@@ -10282,7 +10316,8 @@
   void test_parseVariableDeclarationListAfterMetadata_type_single() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "A a");
+        <Object>[emptyCommentAndMetadata()],
+        "A a");
     expect(declarationList.keyword, isNull);
     expect(declarationList.type, isNotNull);
     expect(declarationList.variables, hasLength(1));
@@ -10291,7 +10326,8 @@
   void test_parseVariableDeclarationListAfterMetadata_var_multiple() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "var a, b, c");
+        <Object>[emptyCommentAndMetadata()],
+        "var a, b, c");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNull);
     expect(declarationList.variables, hasLength(3));
@@ -10300,7 +10336,8 @@
   void test_parseVariableDeclarationListAfterMetadata_var_single() {
     VariableDeclarationList declarationList = parse(
         "parseVariableDeclarationListAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "var a");
+        <Object>[emptyCommentAndMetadata()],
+        "var a");
     expect(declarationList.keyword, isNotNull);
     expect(declarationList.type, isNull);
     expect(declarationList.variables, hasLength(1));
@@ -10309,11 +10346,9 @@
   void test_parseVariableDeclarationListAfterType_type() {
     TypeName type = new TypeName(new SimpleIdentifier(null), null);
     VariableDeclarationList declarationList = parse(
-        "parseVariableDeclarationListAfterType", <Object>[
-      emptyCommentAndMetadata(),
-      null,
-      type
-    ], "a");
+        "parseVariableDeclarationListAfterType",
+        <Object>[emptyCommentAndMetadata(), null, type],
+        "a");
     expect(declarationList.keyword, isNull);
     expect(declarationList.type, type);
     expect(declarationList.variables, hasLength(1));
@@ -10322,11 +10357,9 @@
   void test_parseVariableDeclarationListAfterType_var() {
     Token keyword = TokenFactory.tokenFromKeyword(Keyword.VAR);
     VariableDeclarationList declarationList = parse(
-        "parseVariableDeclarationListAfterType", <Object>[
-      emptyCommentAndMetadata(),
-      keyword,
-      null
-    ], "a, b, c");
+        "parseVariableDeclarationListAfterType",
+        <Object>[emptyCommentAndMetadata(), keyword, null],
+        "a, b, c");
     expect(declarationList.keyword, keyword);
     expect(declarationList.type, isNull);
     expect(declarationList.variables, hasLength(3));
@@ -10335,7 +10368,8 @@
   void test_parseVariableDeclarationStatementAfterMetadata_multiple() {
     VariableDeclarationStatement statement = parse(
         "parseVariableDeclarationStatementAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "var x, y, z;");
+        <Object>[emptyCommentAndMetadata()],
+        "var x, y, z;");
     expect(statement.semicolon, isNotNull);
     VariableDeclarationList variableList = statement.variables;
     expect(variableList, isNotNull);
@@ -10345,7 +10379,8 @@
   void test_parseVariableDeclarationStatementAfterMetadata_single() {
     VariableDeclarationStatement statement = parse(
         "parseVariableDeclarationStatementAfterMetadata",
-        <Object>[emptyCommentAndMetadata()], "var x;");
+        <Object>[emptyCommentAndMetadata()],
+        "var x;");
     expect(statement.semicolon, isNotNull);
     VariableDeclarationList variableList = statement.variables;
     expect(variableList, isNotNull);
@@ -10510,11 +10545,9 @@
     AnalysisErrorListener listener =
         new AnalysisErrorListener_SimpleParserTest_computeStringValue();
     Parser parser = new Parser(null, listener);
-    return invokeParserMethodImpl(parser, "computeStringValue", <Object>[
-      lexeme,
-      first,
-      last
-    ], null) as String;
+    return invokeParserMethodImpl(
+            parser, "computeStringValue", <Object>[lexeme, first, last], null)
+        as String;
   }
 
   /**
@@ -10553,8 +10586,8 @@
    */
   bool _isFunctionDeclaration(String source) {
     GatheringErrorListener listener = new GatheringErrorListener();
-    return invokeParserMethod2(
-        "isFunctionDeclaration", source, listener) as bool;
+    return invokeParserMethod2("isFunctionDeclaration", source, listener)
+        as bool;
   }
 
   /**
@@ -10577,8 +10610,9 @@
     // Parse the source.
     //
     Parser parser = new Parser(null, listener);
-    return invokeParserMethodImpl(parser, "isFunctionExpression",
-        <Object>[tokenStream], tokenStream) as bool;
+    return invokeParserMethodImpl(
+            parser, "isFunctionExpression", <Object>[tokenStream], tokenStream)
+        as bool;
   }
 
   /**
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 5963b56..9c30594 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -31,10 +31,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisDeltaTest);
   runReflectiveTests(ChangeSetTest);
   runReflectiveTests(EnclosedScopeTest);
@@ -67,6 +68,7 @@
   runReflectiveTests(SimpleResolverTest);
   runReflectiveTests(StrictModeTest);
   runReflectiveTests(TypePropagationTest);
+  runReflectiveTests(StrongModeTypePropagationTest);
 }
 
 /**
@@ -3093,6 +3095,9 @@
   }
 
   void test_isDouble() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.dart2jsHint = true;
+    resetWithOptions(options);
     Source source = addSource("var v = 1 is double;");
     computeLibrarySourceErrors(source);
     assertErrors(source, [HintCode.IS_DOUBLE]);
@@ -3100,6 +3105,9 @@
   }
 
   void test_isNotDouble() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.dart2jsHint = true;
+    resetWithOptions(options);
     Source source = addSource("var v = 1 is! double;");
     computeLibrarySourceErrors(source);
     assertErrors(source, [HintCode.IS_NOT_DOUBLE]);
@@ -8046,6 +8054,64 @@
   }
 
   /**
+   * @param code the code that assigns the value to the variable "v", no matter how. We check that
+   *          "v" has expected static and propagated type.
+   */
+  void _assertPropagatedAssignedType(String code, DartType expectedStaticType,
+      DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = _findMarkedIdentifier(code, "v = ");
+    expect(identifier.staticType, same(expectedStaticType));
+    expect(identifier.propagatedType, same(expectedPropagatedType));
+  }
+
+  /**
+   * Check the static and propagated types of the expression marked with "; // marker" comment.
+   *
+   * @param code source code to analyze, with the expression to check marked with "// marker".
+   * @param expectedStaticType if non-null, check actual static type is equal to this.
+   * @param expectedPropagatedType if non-null, check actual static type is equal to this.
+   * @throws Exception
+   */
+  void _assertTypeOfMarkedExpression(String code, DartType expectedStaticType,
+      DartType expectedPropagatedType) {
+    SimpleIdentifier identifier = _findMarkedIdentifier(code, "; // marker");
+    if (expectedStaticType != null) {
+      expect(identifier.staticType, expectedStaticType);
+    }
+    expect(identifier.propagatedType, expectedPropagatedType);
+  }
+
+  /**
+   * Return the `SimpleIdentifier` marked by `marker`. The source code must have no
+   * errors and be verifiable.
+   *
+   * @param code source code to analyze.
+   * @param marker marker identifying sought after expression in source code.
+   * @return expression marked by the marker.
+   * @throws Exception
+   */
+  SimpleIdentifier _findMarkedIdentifier(String code, String marker) {
+    try {
+      Source source = addSource(code);
+      LibraryElement library = resolve2(source);
+      assertNoErrors(source);
+      verify([source]);
+      CompilationUnit unit = resolveCompilationUnit(source, library);
+      // Could generalize this further by making [SimpleIdentifier.class] a
+      // parameter.
+      return EngineTestCase.findNode(
+          unit, code, marker, (node) => node is SimpleIdentifier);
+    } catch (exception) {
+      // Is there a better exception to throw here? The point is that an
+      // assertion failure here should be a failure, in both "test_*" and
+      // "fail_*" tests. However, an assertion failure is success for the
+      // purpose of "fail_*" tests, so without catching them here "fail_*" tests
+      // can succeed by failing for the wrong reason.
+      throw new JavaException("Unexexpected assertion failure: $exception");
+    }
+  }
+
+  /**
    * In the rare cases we want to group several tests into single "test_" method, so need a way to
    * reset test instance to reuse it.
    */
@@ -9117,18 +9183,18 @@
 
   void test_import_hide() {
     addNamedSource(
-        "lib1.dart",
+        "/lib1.dart",
         r'''
 library lib1;
 set foo(value) {}
 class A {}''');
     addNamedSource(
-        "lib2.dart",
+        "/lib2.dart",
         r'''
 library lib2;
 set foo(value) {}''');
     Source source = addNamedSource(
-        "lib3.dart",
+        "/lib3.dart",
         r'''
 import 'lib1.dart' hide foo;
 import 'lib2.dart';
@@ -9165,12 +9231,12 @@
 
   void test_import_spaceInUri() {
     addNamedSource(
-        "sub folder/lib.dart",
+        "/sub folder/lib.dart",
         r'''
 library lib;
 foo() {}''');
     Source source = addNamedSource(
-        "app.dart",
+        "/app.dart",
         r'''
 import 'sub folder/lib.dart';
 
@@ -12199,7 +12265,7 @@
 main() {
   var v = (() {return 42;})();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13372,7 +13438,7 @@
 main() {
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.stringType);
   }
 
@@ -13382,7 +13448,7 @@
 main() {
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13392,7 +13458,7 @@
 main() {
   var v = f(3);
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13405,7 +13471,7 @@
 main() {
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.numType);
   }
 
@@ -13418,7 +13484,7 @@
 main() {
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13428,7 +13494,7 @@
 main() {
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13438,7 +13504,7 @@
   f() => 42;
   var v = f();
 }''';
-    _assertPropagatedReturnType(
+    _assertPropagatedAssignedType(
         code, typeProvider.dynamicType, typeProvider.intType);
   }
 
@@ -13483,63 +13549,194 @@
     expect(elements[9].propagatedType.name, "Element");
     expect(elements[10].propagatedType.name, "Element");
   }
+}
 
-  /**
-   * @param code the code that assigns the value to the variable "v", no matter how. We check that
-   *          "v" has expected static and propagated type.
-   */
-  void _assertPropagatedReturnType(String code, DartType expectedStaticType,
-      DartType expectedPropagatedType) {
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "v = ");
-    expect(identifier.staticType, same(expectedStaticType));
-    expect(identifier.propagatedType, same(expectedPropagatedType));
+@reflectiveTest
+class StrongModeTypePropagationTest extends ResolverTestCase {
+  @override
+  void setUp() {
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.strongMode = true;
+    resetWithOptions(options);
   }
 
-  /**
-   * Check the static and propagated types of the expression marked with "; // marker" comment.
-   *
-   * @param code source code to analyze, with the expression to check marked with "// marker".
-   * @param expectedStaticType if non-null, check actual static type is equal to this.
-   * @param expectedPropagatedType if non-null, check actual static type is equal to this.
-   * @throws Exception
-   */
-  void _assertTypeOfMarkedExpression(String code, DartType expectedStaticType,
-      DartType expectedPropagatedType) {
-    SimpleIdentifier identifier = _findMarkedIdentifier(code, "; // marker");
-    if (expectedStaticType != null) {
-      expect(identifier.staticType, expectedStaticType);
-    }
-    expect(identifier.propagatedType, expectedPropagatedType);
+  void test_localVariableInference_constant() {
+    String code = r'''
+main() {
+  var v = 3;
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
   }
 
-  /**
-   * Return the `SimpleIdentifier` marked by `marker`. The source code must have no
-   * errors and be verifiable.
-   *
-   * @param code source code to analyze.
-   * @param marker marker identifying sought after expression in source code.
-   * @return expression marked by the marker.
-   * @throws Exception
-   */
-  SimpleIdentifier _findMarkedIdentifier(String code, String marker) {
-    try {
-      Source source = addSource(code);
-      LibraryElement library = resolve2(source);
-      assertNoErrors(source);
-      verify([source]);
-      CompilationUnit unit = resolveCompilationUnit(source, library);
-      // Could generalize this further by making [SimpleIdentifier.class] a
-      // parameter.
-      return EngineTestCase.findNode(
-          unit, code, marker, (node) => node is SimpleIdentifier);
-    } catch (exception) {
-      // Is there a better exception to throw here? The point is that an
-      // assertion failure here should be a failure, in both "test_*" and
-      // "fail_*" tests. However, an assertion failure is success for the
-      // purpose of "fail_*" tests, so without catching them here "fail_*" tests
-      // can succeed by failing for the wrong reason.
-      throw new JavaException("Unexexpected assertion failure: $exception");
-    }
+  void test_localVariableInference_transitive_local() {
+    String code = r'''
+main() {
+  var x = 3;
+  var v = x;
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_list_local() {
+    String code = r'''
+main() {
+  var x = <int>[3];
+  var v = x[0];
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_lexical() {
+    String code = r'''
+int x = 3;
+main() {
+  var v = x;
+  return v; // marker
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_toplevel_reversed() {
+    String code = r'''
+main() {
+  var v = x;
+  return v; // marker
+}
+int x = 3;
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void fail_localVariableInference_transitive_toplevel_inferred_lexical() {
+    String code = r'''
+final x = 3;
+main() {
+  var v = x;
+  return v; // marker
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void fail_localVariableInference_transitive_toplevel_inferred_reversed() {
+    String code = r'''
+main() {
+  var v = x;
+  return v; // marker
+}
+final x = 3;
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_field_lexical() {
+    String code = r'''
+class A {
+  int x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_transitive_field_reversed() {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  int x = 3;
+}
+main() {
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void fail_localVariableInference_transitive_field_inferred_lexical() {
+    String code = r'''
+class A {
+  final x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void fail_localVariableInference_transitive_field_inferred_reversed() {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  final x = 3;
+}
+main() {
+}
+''';
+    _assertPropagatedAssignedType(code, typeProvider.intType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.intType, null);
+  }
+
+  void test_localVariableInference_declaredType_disabled() {
+    String code = r'''
+main() {
+  dynamic v = 3;
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    _assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
+  }
+
+  void test_localVariableInference_bottom_disabled() {
+    String code = r'''
+main() {
+  var v = null;
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(code, typeProvider.dynamicType, null);
+    _assertTypeOfMarkedExpression(code, typeProvider.dynamicType, null);
+  }
+
+  void test_localVariableInference_noInitializer_disabled() {
+    String code = r'''
+main() {
+  var v;
+  v = 3;
+  return v; // marker
+}''';
+    _assertPropagatedAssignedType(
+        code, typeProvider.dynamicType, typeProvider.intType);
+    _assertTypeOfMarkedExpression(
+        code, typeProvider.dynamicType, typeProvider.intType);
   }
 }
 
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 296be46..119d4aa 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -10,10 +10,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(CharSequenceReaderTest);
   runReflectiveTests(KeywordStateTest);
   runReflectiveTests(ScannerTest);
@@ -172,8 +173,8 @@
 class ScannerTest {
   void fail_incomplete_string_interpolation() {
     // https://code.google.com/p/dart/issues/detail?id=18073
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 9,
-        "\"foo \${bar", [
+    _assertErrorAndTokens(
+        ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 9, "\"foo \${bar", [
       new StringToken(TokenType.STRING, "\"foo ", 0),
       new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 5),
       new StringToken(TokenType.IDENTIFIER, "bar", 7)
@@ -253,7 +254,8 @@
   }
 
   void test_comment_disabled_multi() {
-    Scanner scanner = new Scanner(null,
+    Scanner scanner = new Scanner(
+        null,
         new CharSequenceReader("/* comment */ "),
         AnalysisErrorListener.NULL_LISTENER);
     scanner.preserveComments = false;
@@ -276,13 +278,15 @@
     GatheringErrorListener listener = new GatheringErrorListener();
     Scanner scanner = new Scanner(null, new CharSequenceReader(code), listener);
     scanner.tokenize();
-    expect(scanner.lineStarts, equals(<int>[
-      code.indexOf('/**'),
-      code.indexOf(' * aa'),
-      code.indexOf(' * bbb'),
-      code.indexOf(' * c'),
-      code.indexOf(' */')
-    ]));
+    expect(
+        scanner.lineStarts,
+        equals(<int>[
+          code.indexOf('/**'),
+          code.indexOf(' * aa'),
+          code.indexOf(' * bbb'),
+          code.indexOf(' * c'),
+          code.indexOf(' */')
+        ]));
   }
 
   void test_comment_multi_unterminated() {
@@ -851,8 +855,8 @@
   }
 
   void test_string_multi_unterminated_interpolation_block() {
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 8,
-        "'''\${name", [
+    _assertErrorAndTokens(
+        ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 8, "'''\${name", [
       new StringToken(TokenType.STRING, "'''", 0),
       new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 3),
       new StringToken(TokenType.IDENTIFIER, "name", 5),
@@ -861,8 +865,8 @@
   }
 
   void test_string_multi_unterminated_interpolation_identifier() {
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
-        "'''\$name", [
+    _assertErrorAndTokens(
+        ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7, "'''\$name", [
       new StringToken(TokenType.STRING, "'''", 0),
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
       new StringToken(TokenType.IDENTIFIER, "name", 4),
@@ -1008,8 +1012,8 @@
   }
 
   void test_string_simple_unterminated_interpolation_block() {
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6,
-        "'\${name", [
+    _assertErrorAndTokens(
+        ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6, "'\${name", [
       new StringToken(TokenType.STRING, "'", 0),
       new StringToken(TokenType.STRING_INTERPOLATION_EXPRESSION, "\${", 1),
       new StringToken(TokenType.IDENTIFIER, "name", 3),
@@ -1018,8 +1022,8 @@
   }
 
   void test_string_simple_unterminated_interpolation_identifier() {
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 5,
-        "'\$name", [
+    _assertErrorAndTokens(
+        ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 5, "'\$name", [
       new StringToken(TokenType.STRING, "'", 0),
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
       new StringToken(TokenType.IDENTIFIER, "name", 2),
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index b3788b4..c16f1f8 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library analyzer.test.generated.source_factory;
 
 import 'dart:convert';
@@ -25,10 +22,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(SourceFactoryTest);
   runPackageMapTests();
 }
@@ -55,7 +53,10 @@
     return factory.packageMap;
   }
 
-  String resolvePackageUri({String uri, String config, Source containingSource,
+  String resolvePackageUri(
+      {String uri,
+      String config,
+      Source containingSource,
       UriResolver customResolver}) {
     Packages packages = createPackageMap(baseUri, config);
     List<UriResolver> resolvers = testResolvers.toList();
@@ -82,22 +83,30 @@
     group('package mapping', () {
       group('resolveUri', () {
         test('URI in mapping', () {
-          String uri = resolvePackageUri(config: '''
+          String uri = resolvePackageUri(
+              config: '''
 unittest:file:///home/somebody/.pub/cache/unittest-0.9.9/lib/
 async:file:///home/somebody/.pub/cache/async-1.1.0/lib/
 quiver:file:///home/somebody/.pub/cache/quiver-1.2.1/lib
-''', uri: 'package:unittest/unittest.dart');
-          expect(uri, equals(
-              '/home/somebody/.pub/cache/unittest-0.9.9/lib/unittest.dart'));
+''',
+              uri: 'package:unittest/unittest.dart');
+          expect(
+              uri,
+              equals(
+                  '/home/somebody/.pub/cache/unittest-0.9.9/lib/unittest.dart'));
         });
         test('URI in mapping (no scheme)', () {
-          String uri = resolvePackageUri(config: '''
+          String uri = resolvePackageUri(
+              config: '''
 unittest:/home/somebody/.pub/cache/unittest-0.9.9/lib/
 async:/home/somebody/.pub/cache/async-1.1.0/lib/
 quiver:/home/somebody/.pub/cache/quiver-1.2.1/lib
-''', uri: 'package:unittest/unittest.dart');
-          expect(uri, equals(
-              '/home/somebody/.pub/cache/unittest-0.9.9/lib/unittest.dart'));
+''',
+              uri: 'package:unittest/unittest.dart');
+          expect(
+              uri,
+              equals(
+                  '/home/somebody/.pub/cache/unittest-0.9.9/lib/unittest.dart'));
         });
         test('URI not in mapping', () {
           String uri = resolvePackageUri(
@@ -117,7 +126,8 @@
           // TODO(pquitslund): fix clients to handle errors appropriately
           //   CLI: print message 'invalid package file format'
           //   SERVER: best case tell user somehow and recover...
-          expect(() => resolvePackageUri(
+          expect(
+              () => resolvePackageUri(
                   config: 'foo:<:&%>', uri: 'package:foo/bar.dart'),
               throwsA(new isInstanceOf('FormatException')));
         });
@@ -139,7 +149,8 @@
       });
       group('restoreUri', () {
         test('URI in mapping', () {
-          Uri uri = restorePackageUri(config: '''
+          Uri uri = restorePackageUri(
+              config: '''
 unittest:/home/somebody/.pub/cache/unittest-0.9.9/lib/
 async:/home/somebody/.pub/cache/async-1.1.0/lib/
 quiver:/home/somebody/.pub/cache/quiver-1.2.1/lib
@@ -257,8 +268,9 @@
     File firstFile = provider.newFile(firstPath, '');
     provider.newFile(secondPath, '');
 
-    PackageMapUriResolver resolver =
-        new PackageMapUriResolver(provider, {'package': [libFolder]});
+    PackageMapUriResolver resolver = new PackageMapUriResolver(provider, {
+      'package': [libFolder]
+    });
     SourceFactory factory = new SourceFactory([resolver]);
     Source librarySource =
         firstFile.createSource(Uri.parse('package:package/dir/first.dart'));
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index b49a115..a14e8c8 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -10,10 +10,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'resolver_test.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(StaticTypeWarningCodeTest);
 }
 
@@ -44,10 +45,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 g() { return f(); }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 f() {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 f() {}''');
     computeLibrarySourceErrors(source);
@@ -1324,7 +1329,9 @@
     Source source = addSource(r'''
 import 'lib.dart' as f;
 main() { return f.g(); }''');
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 h() {}''');
     computeLibrarySourceErrors(source);
@@ -1529,7 +1536,9 @@
   }
 
   void test_undefinedMethod_private() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   _foo() {}
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index c5bede5..3d63d3c 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -9,10 +9,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'resolver_test.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(StaticWarningCodeTest);
 }
 
@@ -54,10 +55,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 f(p) {p as N;}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -69,10 +74,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 class A extends N {}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -87,10 +96,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 class A implements N {}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -106,13 +119,19 @@
 import 'lib1.dart';
 import 'lib2.dart';
 part 'part.dart';''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
-    Source partSource = addNamedSource("/part.dart", r'''
+    Source partSource = addNamedSource(
+        "/part.dart",
+        r'''
 part of lib;
 class A extends N {}''');
     computeLibrarySourceErrors(source);
@@ -128,10 +147,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 f() {new N();}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -143,10 +166,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 f(p) {p is N;}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -158,10 +185,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 g() { N.FOO; }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -181,10 +212,14 @@
   N m() { return null; }
 }
 class B<T extends N> {}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -205,10 +240,14 @@
 import 'lib2.dart';
 class A<T> {}
 A<N> f() { return null; }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -221,10 +260,14 @@
 import 'lib2.dart';
 class A<T> {}
 f() {new A<N>();}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 class N {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class N {}''');
     computeLibrarySourceErrors(source);
@@ -237,10 +280,14 @@
 import 'lib2.dart';
 f() { g(v); }
 g(p) {}''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 var v;''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 var v;''');
     computeLibrarySourceErrors(source);
@@ -252,10 +299,14 @@
 import 'lib1.dart';
 import 'lib2.dart';
 f() { v = 0; }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 var v;''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 var v;''');
     computeLibrarySourceErrors(source);
@@ -270,10 +321,14 @@
 main() {
   p.f();
 }''');
-    addNamedSource("/lib1.dart", r'''
+    addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 f() {}''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 f() {}''');
     computeLibrarySourceErrors(source);
@@ -282,14 +337,18 @@
 
   void test_argumentTypeNotAssignable_ambiguousClassName() {
     // See dartbug.com/19624
-    Source source = addNamedSource("/lib1.dart", r'''
+    Source source = addNamedSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 import 'lib2.dart';
 class _A {}
 f() {
   g((_A a) {});
 }''');
-    addNamedSource("/lib2.dart", r'''
+    addNamedSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 class _A {}
 g(h(_A a)) {}''');
@@ -911,7 +970,9 @@
 import 'dart:async';
 Future f = null;
 Stream s;''');
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class Future {}''');
     computeLibrarySourceErrors(source);
@@ -1203,18 +1264,6 @@
     verify([source]);
   }
 
-  void test_exportDuplicatedLibraryUnnamed() {
-    Source source = addSource(r'''
-library test;
-export 'lib1.dart';
-export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", "");
-    addNamedSource("/lib2.dart", "");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_UNNAMED]);
-    verify([source]);
-  }
-
   void test_extraPositionalArguments() {
     Source source = addSource(r'''
 f() {}
@@ -1427,22 +1476,6 @@
     verify([source]);
   }
 
-  void test_importDuplicatedLibraryUnnamed() {
-    Source source = addSource(r'''
-library test;
-import 'lib1.dart';
-import 'lib2.dart';''');
-    addNamedSource("/lib1.dart", "");
-    addNamedSource("/lib2.dart", "");
-    computeLibrarySourceErrors(source);
-    assertErrors(source, [
-      StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_UNNAMED,
-      HintCode.UNUSED_IMPORT,
-      HintCode.UNUSED_IMPORT
-    ]);
-    verify([source]);
-  }
-
   void test_importOfNonLibrary() {
     resolveWithErrors(<String>[
       r'''
@@ -1452,7 +1485,9 @@
 library lib;
 import 'lib1.dart' deferred as p;
 var a = new p.A();'''
-    ], <ErrorCode>[StaticWarningCode.IMPORT_OF_NON_LIBRARY]);
+    ], <ErrorCode>[
+      StaticWarningCode.IMPORT_OF_NON_LIBRARY
+    ]);
   }
 
   void test_inconsistentMethodInheritanceGetterAndMethod() {
@@ -2380,8 +2415,10 @@
   }
 
   void test_newWithNonType_fromLibrary() {
-    Source source1 = addNamedSource("lib.dart", "class B {}");
-    Source source2 = addNamedSource("lib2.dart", r'''
+    Source source1 = addNamedSource("/lib.dart", "class B {}");
+    Source source2 = addNamedSource(
+        "/lib2.dart",
+        r'''
 import 'lib.dart' as lib;
 void f() {
   var a = new lib.A();
@@ -3067,7 +3104,9 @@
 f(var v) {
   v as a.A;
 }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_catchClause() {
@@ -3083,7 +3122,9 @@
   } on a.A {
   }
 }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_fieldFormalParameter() {
@@ -3098,7 +3139,9 @@
   var v;
   C(a.A this.v);
 }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_functionDeclaration_returnType() {
@@ -3110,7 +3153,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 a.A f() { return null; }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_functionTypedFormalParameter_returnType() {
@@ -3122,7 +3167,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 f(a.A g()) {}'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_isExpression() {
@@ -3136,7 +3183,9 @@
 f(var v) {
   bool b = v is a.A;
 }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_methodDeclaration_returnType() {
@@ -3150,7 +3199,9 @@
 class C {
   a.A m() { return null; }
 }'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_simpleFormalParameter() {
@@ -3162,7 +3213,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 f(a.A v) {}'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_typeArgumentList() {
@@ -3175,7 +3228,9 @@
 import 'lib1.dart' deferred as a;
 class C<E> {}
 C<a.A> c;'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_typeArgumentList2() {
@@ -3203,7 +3258,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 class C<E extends a.A> {}'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeAnnotationDeferredClass_variableDeclarationList() {
@@ -3215,7 +3272,9 @@
 library root;
 import 'lib1.dart' deferred as a;
 a.A v;'''
-    ], <ErrorCode>[StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS]);
+    ], <ErrorCode>[
+      StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS
+    ]);
   }
 
   void test_typeParameterReferencedByStatic_field() {
@@ -3343,8 +3402,10 @@
   }
 
   void test_undefinedGetter_fromLibrary() {
-    Source source1 = addNamedSource("lib.dart", "");
-    Source source2 = addNamedSource("lib2.dart", r'''
+    Source source1 = addNamedSource("/lib.dart", "");
+    Source source2 = addNamedSource(
+        "/lib2.dart",
+        r'''
 import 'lib.dart' as lib;
 void f() {
   var g = lib.gg;
@@ -3395,7 +3456,9 @@
   }
 
   void test_undefinedIdentifier_private_getter() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   var _foo;
@@ -3412,7 +3475,9 @@
   }
 
   void test_undefinedIdentifier_private_setter() {
-    addNamedSource("/lib.dart", r'''
+    addNamedSource(
+        "/lib.dart",
+        r'''
 library lib;
 class A {
   var _foo;
@@ -3440,8 +3505,10 @@
   }
 
   void test_undefinedSetter() {
-    Source source1 = addNamedSource("lib.dart", "");
-    Source source2 = addNamedSource("lib2.dart", r'''
+    Source source1 = addNamedSource("/lib.dart", "");
+    Source source2 = addNamedSource(
+        "/lib2.dart",
+        r'''
 import 'lib.dart' as lib;
 void f() {
   lib.gg = null;
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 33435d4..fb84d46 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'all_the_rest_test.dart' as all_the_rest;
 import 'ast_test.dart' as ast_test;
 import 'compile_time_error_code_test.dart' as compile_time_error_code_test;
@@ -27,7 +28,7 @@
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('generated tests', () {
     all_the_rest.main();
     ast_test.main();
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 666b233..6c1b066 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.test_support;
 
 import 'dart:collection';
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 5077871..c24297f 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -13,9 +13,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(TypeSystemTest);
 }
 
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 3219e90..24263e7 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// This code was auto-generated, is not intended to be edited, and is subject to
-// significant change. Please see the README file for more information.
-
 library engine.utilities_test;
 
 import 'dart:collection';
@@ -20,10 +17,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AstClonerTest);
   runReflectiveTests(NodeReplacerTest);
   runReflectiveTests(LineInfoTest);
@@ -187,19 +185,30 @@
   }
 
   void test_visitClassDeclaration_extends_implements() {
-    _assertClone(AstFactory.classDeclaration(null, "C", null,
-        AstFactory.extendsClause(AstFactory.typeName4("A")), null,
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
+        null,
+        AstFactory.extendsClause(AstFactory.typeName4("A")),
+        null,
         AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_extends_with() {
-    _assertClone(AstFactory.classDeclaration(null, "C", null,
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
+        null,
         AstFactory.extendsClause(AstFactory.typeName4("A")),
-        AstFactory.withClause([AstFactory.typeName4("M")]), null));
+        AstFactory.withClause([AstFactory.typeName4("M")]),
+        null));
   }
 
   void test_visitClassDeclaration_extends_with_implements() {
-    _assertClone(AstFactory.classDeclaration(null, "C", null,
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
+        null,
         AstFactory.extendsClause(AstFactory.typeName4("A")),
         AstFactory.withClause([AstFactory.typeName4("M")]),
         AstFactory.implementsClause([AstFactory.typeName4("B")])));
@@ -211,8 +220,8 @@
   }
 
   void test_visitClassDeclaration_multipleMember() {
-    _assertClone(AstFactory.classDeclaration(null, "C", null, null, null, null,
-        [
+    _assertClone(
+        AstFactory.classDeclaration(null, "C", null, null, null, null, [
       AstFactory.fieldDeclaration2(
           false, Keyword.VAR, [AstFactory.variableDeclaration("a")]),
       AstFactory.fieldDeclaration2(
@@ -226,27 +235,39 @@
   }
 
   void test_visitClassDeclaration_parameters_extends() {
-    _assertClone(AstFactory.classDeclaration(null, "C",
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
         AstFactory.typeParameterList(["E"]),
-        AstFactory.extendsClause(AstFactory.typeName4("A")), null, null));
+        AstFactory.extendsClause(AstFactory.typeName4("A")),
+        null,
+        null));
   }
 
   void test_visitClassDeclaration_parameters_extends_implements() {
-    _assertClone(AstFactory.classDeclaration(null, "C",
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
         AstFactory.typeParameterList(["E"]),
-        AstFactory.extendsClause(AstFactory.typeName4("A")), null,
+        AstFactory.extendsClause(AstFactory.typeName4("A")),
+        null,
         AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_parameters_extends_with() {
-    _assertClone(AstFactory.classDeclaration(null, "C",
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
         AstFactory.typeParameterList(["E"]),
         AstFactory.extendsClause(AstFactory.typeName4("A")),
-        AstFactory.withClause([AstFactory.typeName4("M")]), null));
+        AstFactory.withClause([AstFactory.typeName4("M")]),
+        null));
   }
 
   void test_visitClassDeclaration_parameters_extends_with_implements() {
-    _assertClone(AstFactory.classDeclaration(null, "C",
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
         AstFactory.typeParameterList(["E"]),
         AstFactory.extendsClause(AstFactory.typeName4("A")),
         AstFactory.withClause([AstFactory.typeName4("M")]),
@@ -254,14 +275,18 @@
   }
 
   void test_visitClassDeclaration_parameters_implements() {
-    _assertClone(AstFactory.classDeclaration(null, "C",
-        AstFactory.typeParameterList(["E"]), null, null,
+    _assertClone(AstFactory.classDeclaration(
+        null,
+        "C",
+        AstFactory.typeParameterList(["E"]),
+        null,
+        null,
         AstFactory.implementsClause([AstFactory.typeName4("B")])));
   }
 
   void test_visitClassDeclaration_singleMember() {
-    _assertClone(AstFactory.classDeclaration(null, "C", null, null, null, null,
-        [
+    _assertClone(
+        AstFactory.classDeclaration(null, "C", null, null, null, null, [
       AstFactory.fieldDeclaration2(
           false, Keyword.VAR, [AstFactory.variableDeclaration("a")])
     ]));
@@ -276,65 +301,95 @@
   }
 
   void test_visitClassTypeAlias_abstract() {
-    _assertClone(AstFactory.classTypeAlias("C", null, Keyword.ABSTRACT,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        null,
+        Keyword.ABSTRACT,
         AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+        AstFactory.withClause([AstFactory.typeName4("M1")]),
+        null));
   }
 
   void test_visitClassTypeAlias_abstract_implements() {
-    _assertClone(AstFactory.classTypeAlias("C", null, Keyword.ABSTRACT,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        null,
+        Keyword.ABSTRACT,
         AstFactory.typeName4("S"),
         AstFactory.withClause([AstFactory.typeName4("M1")]),
         AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_generic() {
-    _assertClone(AstFactory.classTypeAlias("C",
-        AstFactory.typeParameterList(["E"]), null,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        AstFactory.typeParameterList(["E"]),
+        null,
         AstFactory.typeName4("S", [AstFactory.typeName4("E")]),
-        AstFactory.withClause(
-            [AstFactory.typeName4("M1", [AstFactory.typeName4("E")])]), null));
+        AstFactory.withClause([
+          AstFactory.typeName4("M1", [AstFactory.typeName4("E")])
+        ]),
+        null));
   }
 
   void test_visitClassTypeAlias_implements() {
-    _assertClone(AstFactory.classTypeAlias("C", null, null,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        null,
+        null,
         AstFactory.typeName4("S"),
         AstFactory.withClause([AstFactory.typeName4("M1")]),
         AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_minimal() {
-    _assertClone(AstFactory.classTypeAlias("C", null, null,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        null,
+        null,
         AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+        AstFactory.withClause([AstFactory.typeName4("M1")]),
+        null));
   }
 
   void test_visitClassTypeAlias_parameters_abstract() {
-    _assertClone(AstFactory.classTypeAlias("C",
-        AstFactory.typeParameterList(["E"]), Keyword.ABSTRACT,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        AstFactory.typeParameterList(["E"]),
+        Keyword.ABSTRACT,
         AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null));
+        AstFactory.withClause([AstFactory.typeName4("M1")]),
+        null));
   }
 
   void test_visitClassTypeAlias_parameters_abstract_implements() {
-    _assertClone(AstFactory.classTypeAlias("C",
-        AstFactory.typeParameterList(["E"]), Keyword.ABSTRACT,
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        AstFactory.typeParameterList(["E"]),
+        Keyword.ABSTRACT,
         AstFactory.typeName4("S"),
         AstFactory.withClause([AstFactory.typeName4("M1")]),
         AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_parameters_implements() {
-    _assertClone(AstFactory.classTypeAlias("C",
-        AstFactory.typeParameterList(["E"]), null, AstFactory.typeName4("S"),
+    _assertClone(AstFactory.classTypeAlias(
+        "C",
+        AstFactory.typeParameterList(["E"]),
+        null,
+        AstFactory.typeName4("S"),
         AstFactory.withClause([AstFactory.typeName4("M1")]),
         AstFactory.implementsClause([AstFactory.typeName4("I")])));
   }
 
   void test_visitClassTypeAlias_withMetadata() {
-    ClassTypeAlias declaration = AstFactory.classTypeAlias("C", null, null,
+    ClassTypeAlias declaration = AstFactory.classTypeAlias(
+        "C",
+        null,
+        null,
         AstFactory.typeName4("S"),
-        AstFactory.withClause([AstFactory.typeName4("M1")]), null);
+        AstFactory.withClause([AstFactory.typeName4("M1")]),
+        null);
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
     _assertClone(declaration);
@@ -362,8 +417,9 @@
   }
 
   void test_visitCompilationUnit_directive_declaration() {
-    _assertClone(AstFactory.compilationUnit4(
-        [AstFactory.libraryDirective2("l")], [
+    _assertClone(AstFactory.compilationUnit4([
+      AstFactory.libraryDirective2("l")
+    ], [
       AstFactory.topLevelVariableDeclaration2(
           Keyword.VAR, [AstFactory.variableDeclaration("a")])
     ]));
@@ -390,8 +446,9 @@
   }
 
   void test_visitCompilationUnit_script_directives_declarations() {
-    _assertClone(AstFactory.compilationUnit8("!#/bin/dartvm",
-        [AstFactory.libraryDirective2("l")], [
+    _assertClone(AstFactory.compilationUnit8("!#/bin/dartvm", [
+      AstFactory.libraryDirective2("l")
+    ], [
       AstFactory.topLevelVariableDeclaration2(
           Keyword.VAR, [AstFactory.variableDeclaration("a")])
     ]));
@@ -403,9 +460,14 @@
   }
 
   void test_visitConstructorDeclaration_const() {
-    _assertClone(AstFactory.constructorDeclaration2(Keyword.CONST, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(),
-        null, AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        Keyword.CONST,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        null,
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_external() {
@@ -414,47 +476,79 @@
   }
 
   void test_visitConstructorDeclaration_minimal() {
-    _assertClone(AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(),
-        null, AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        null,
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_multipleInitializers() {
-    _assertClone(AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(), [
-      AstFactory.constructorFieldInitializer(
-          false, "a", AstFactory.identifier3("b")),
-      AstFactory.constructorFieldInitializer(
-          false, "c", AstFactory.identifier3("d"))
-    ], AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        [
+          AstFactory.constructorFieldInitializer(
+              false, "a", AstFactory.identifier3("b")),
+          AstFactory.constructorFieldInitializer(
+              false, "c", AstFactory.identifier3("d"))
+        ],
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_multipleParameters() {
-    _assertClone(AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-      AstFactory.simpleFormalParameter(Keyword.VAR, "b")
-    ]), null, AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+          AstFactory.simpleFormalParameter(Keyword.VAR, "b")
+        ]),
+        null,
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_named() {
-    _assertClone(AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), "m", AstFactory.formalParameterList(),
-        null, AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        "m",
+        AstFactory.formalParameterList(),
+        null,
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_singleInitializer() {
-    _assertClone(AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), null, AstFactory.formalParameterList(), [
-      AstFactory.constructorFieldInitializer(
-          false, "a", AstFactory.identifier3("b"))
-    ], AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        [
+          AstFactory.constructorFieldInitializer(
+              false, "a", AstFactory.identifier3("b"))
+        ],
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitConstructorDeclaration_withMetadata() {
     ConstructorDeclaration declaration = AstFactory.constructorDeclaration2(
-        null, null, AstFactory.identifier3("C"), null,
-        AstFactory.formalParameterList(), null,
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        null,
+        AstFactory.formalParameterList(),
+        null,
         AstFactory.blockFunctionBody2());
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
@@ -531,8 +625,9 @@
   }
 
   void test_visitExportDirective_combinator() {
-    _assertClone(AstFactory.exportDirective2(
-        "a.dart", [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertClone(AstFactory.exportDirective2("a.dart", [
+      AstFactory.showCombinator([AstFactory.identifier3("A")])
+    ]));
   }
 
   void test_visitExportDirective_combinators() {
@@ -585,8 +680,11 @@
   }
 
   void test_visitFieldFormalParameter_functionTyped() {
-    _assertClone(AstFactory.fieldFormalParameter(null,
-        AstFactory.typeName4("A"), "a", AstFactory
+    _assertClone(AstFactory.fieldFormalParameter(
+        null,
+        AstFactory.typeName4("A"),
+        "a",
+        AstFactory
             .formalParameterList([AstFactory.simpleFormalParameter3("b")])));
   }
 
@@ -606,17 +704,21 @@
 
   void test_visitForEachStatement_declared() {
     _assertClone(AstFactory.forEachStatement(
-        AstFactory.declaredIdentifier3("a"), AstFactory.identifier3("b"),
+        AstFactory.declaredIdentifier3("a"),
+        AstFactory.identifier3("b"),
         AstFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
-    _assertClone(new ForEachStatement.withReference(null,
+    _assertClone(new ForEachStatement.withReference(
+        null,
         TokenFactory.tokenFromKeyword(Keyword.FOR),
         TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-        AstFactory.identifier3("a"), TokenFactory.tokenFromKeyword(Keyword.IN),
+        AstFactory.identifier3("a"),
+        TokenFactory.tokenFromKeyword(Keyword.IN),
         AstFactory.identifier3("b"),
-        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), AstFactory.block()));
+        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+        AstFactory.block()));
   }
 
   void test_visitForEachStatement_variable_await() {
@@ -624,9 +726,11 @@
         TokenFactory.tokenFromString("await"),
         TokenFactory.tokenFromKeyword(Keyword.FOR),
         TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-        AstFactory.identifier3("a"), TokenFactory.tokenFromKeyword(Keyword.IN),
+        AstFactory.identifier3("a"),
+        TokenFactory.tokenFromKeyword(Keyword.IN),
         AstFactory.identifier3("b"),
-        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN), AstFactory.block()));
+        TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+        AstFactory.block()));
   }
 
   void test_visitFormalParameterList_empty() {
@@ -774,8 +878,10 @@
   }
 
   void test_visitForStatement_ecu() {
-    _assertClone(AstFactory.forStatement(AstFactory.identifier3("e"),
-        AstFactory.identifier3("c"), [AstFactory.identifier3("u")],
+    _assertClone(AstFactory.forStatement(
+        AstFactory.identifier3("e"),
+        AstFactory.identifier3("c"),
+        [AstFactory.identifier3("u")],
         AstFactory.block()));
   }
 
@@ -785,28 +891,39 @@
   }
 
   void test_visitForStatement_i() {
-    _assertClone(AstFactory.forStatement2(AstFactory.variableDeclarationList2(
-            Keyword.VAR, [AstFactory.variableDeclaration("i")]), null, null,
+    _assertClone(AstFactory.forStatement2(
+        AstFactory.variableDeclarationList2(
+            Keyword.VAR, [AstFactory.variableDeclaration("i")]),
+        null,
+        null,
         AstFactory.block()));
   }
 
   void test_visitForStatement_ic() {
-    _assertClone(AstFactory.forStatement2(AstFactory.variableDeclarationList2(
+    _assertClone(AstFactory.forStatement2(
+        AstFactory.variableDeclarationList2(
             Keyword.VAR, [AstFactory.variableDeclaration("i")]),
-        AstFactory.identifier3("c"), null, AstFactory.block()));
+        AstFactory.identifier3("c"),
+        null,
+        AstFactory.block()));
   }
 
   void test_visitForStatement_icu() {
-    _assertClone(AstFactory.forStatement2(AstFactory.variableDeclarationList2(
+    _assertClone(AstFactory.forStatement2(
+        AstFactory.variableDeclarationList2(
             Keyword.VAR, [AstFactory.variableDeclaration("i")]),
-        AstFactory.identifier3("c"), [AstFactory.identifier3("u")],
+        AstFactory.identifier3("c"),
+        [AstFactory.identifier3("u")],
         AstFactory.block()));
   }
 
   void test_visitForStatement_iu() {
-    _assertClone(AstFactory.forStatement2(AstFactory.variableDeclarationList2(
-            Keyword.VAR, [AstFactory.variableDeclaration("i")]), null,
-        [AstFactory.identifier3("u")], AstFactory.block()));
+    _assertClone(AstFactory.forStatement2(
+        AstFactory.variableDeclarationList2(
+            Keyword.VAR, [AstFactory.variableDeclaration("i")]),
+        null,
+        [AstFactory.identifier3("u")],
+        AstFactory.block()));
   }
 
   void test_visitForStatement_u() {
@@ -898,8 +1015,9 @@
   }
 
   void test_visitImportDirective_combinator() {
-    _assertClone(AstFactory.importDirective3("a.dart", null,
-        [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertClone(AstFactory.importDirective3("a.dart", null, [
+      AstFactory.showCombinator([AstFactory.identifier3("A")])
+    ]));
   }
 
   void test_visitImportDirective_combinators() {
@@ -918,8 +1036,9 @@
   }
 
   void test_visitImportDirective_prefix_combinator() {
-    _assertClone(AstFactory.importDirective3("a.dart", "p",
-        [AstFactory.showCombinator([AstFactory.identifier3("A")])]));
+    _assertClone(AstFactory.importDirective3("a.dart", "p", [
+      AstFactory.showCombinator([AstFactory.identifier3("A")])
+    ]));
   }
 
   void test_visitImportDirective_prefix_combinators() {
@@ -1006,10 +1125,9 @@
   }
 
   void test_visitLabeledStatement_multiple() {
-    _assertClone(AstFactory.labeledStatement([
-      AstFactory.label2("a"),
-      AstFactory.label2("b")
-    ], AstFactory.returnStatement()));
+    _assertClone(AstFactory.labeledStatement(
+        [AstFactory.label2("a"), AstFactory.label2("b")],
+        AstFactory.returnStatement()));
   }
 
   void test_visitLabeledStatement_single() {
@@ -1082,8 +1200,12 @@
   }
 
   void test_visitMethodDeclaration_external_returnType() {
-    _assertClone(AstFactory.methodDeclaration(null, AstFactory.typeName4("T"),
-        null, null, AstFactory.identifier3("m"),
+    _assertClone(AstFactory.methodDeclaration(
+        null,
+        AstFactory.typeName4("T"),
+        null,
+        null,
+        AstFactory.identifier3("m"),
         AstFactory.formalParameterList()));
   }
 
@@ -1093,74 +1215,129 @@
   }
 
   void test_visitMethodDeclaration_getter_returnType() {
-    _assertClone(AstFactory.methodDeclaration2(null, AstFactory.typeName4("T"),
-        Keyword.GET, null, AstFactory.identifier3("m"), null,
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4("T"),
+        Keyword.GET,
+        null,
+        AstFactory.identifier3("m"),
+        null,
         AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_getter_seturnType() {
-    _assertClone(AstFactory.methodDeclaration2(null, AstFactory.typeName4("T"),
-        Keyword.SET, null, AstFactory.identifier3("m"), AstFactory
-            .formalParameterList(
-                [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4("T"),
+        Keyword.SET,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(
+            [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
         AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_minimal() {
-    _assertClone(AstFactory.methodDeclaration2(null, null, null, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList(),
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
         AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_multipleParameters() {
-    _assertClone(AstFactory.methodDeclaration2(null, null, null, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList([
-      AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
-      AstFactory.simpleFormalParameter(Keyword.VAR, "b")
-    ]), AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList([
+          AstFactory.simpleFormalParameter(Keyword.VAR, "a"),
+          AstFactory.simpleFormalParameter(Keyword.VAR, "b")
+        ]),
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_operator() {
-    _assertClone(AstFactory.methodDeclaration2(null, null, null,
-        Keyword.OPERATOR, AstFactory.identifier3("+"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        Keyword.OPERATOR,
+        AstFactory.identifier3("+"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_operator_returnType() {
-    _assertClone(AstFactory.methodDeclaration2(null, AstFactory.typeName4("T"),
-        null, Keyword.OPERATOR, AstFactory.identifier3("+"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4("T"),
+        null,
+        Keyword.OPERATOR,
+        AstFactory.identifier3("+"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_returnType() {
-    _assertClone(AstFactory.methodDeclaration2(null, AstFactory.typeName4("T"),
-        null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4("T"),
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_setter() {
-    _assertClone(AstFactory.methodDeclaration2(null, null, Keyword.SET, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList(
+    _assertClone(AstFactory.methodDeclaration2(
+        null,
+        null,
+        Keyword.SET,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(
             [AstFactory.simpleFormalParameter(Keyword.VAR, "v")]),
         AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_static() {
-    _assertClone(AstFactory.methodDeclaration2(Keyword.STATIC, null, null, null,
-        AstFactory.identifier3("m"), AstFactory.formalParameterList(),
+    _assertClone(AstFactory.methodDeclaration2(
+        Keyword.STATIC,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
         AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_static_returnType() {
-    _assertClone(AstFactory.methodDeclaration2(Keyword.STATIC,
-        AstFactory.typeName4("T"), null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2()));
+    _assertClone(AstFactory.methodDeclaration2(
+        Keyword.STATIC,
+        AstFactory.typeName4("T"),
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2()));
   }
 
   void test_visitMethodDeclaration_withMetadata() {
-    MethodDeclaration declaration = AstFactory.methodDeclaration2(null, null,
-        null, null, AstFactory.identifier3("m"),
-        AstFactory.formalParameterList(), AstFactory.blockFunctionBody2());
+    MethodDeclaration declaration = AstFactory.methodDeclaration2(
+        null,
+        null,
+        null,
+        null,
+        AstFactory.identifier3("m"),
+        AstFactory.formalParameterList(),
+        AstFactory.blockFunctionBody2());
     declaration.metadata
         .add(AstFactory.annotation(AstFactory.identifier3("deprecated")));
     _assertClone(declaration);
@@ -1317,10 +1494,10 @@
   }
 
   void test_visitSwitchCase_multipleLabels() {
-    _assertClone(AstFactory.switchCase2([
-      AstFactory.label2("l1"),
-      AstFactory.label2("l2")
-    ], AstFactory.identifier3("a"), [AstFactory.block()]));
+    _assertClone(AstFactory.switchCase2(
+        [AstFactory.label2("l1"), AstFactory.label2("l2")],
+        AstFactory.identifier3("a"),
+        [AstFactory.block()]));
   }
 
   void test_visitSwitchCase_multipleStatements() {
@@ -1339,10 +1516,9 @@
   }
 
   void test_visitSwitchDefault_multipleLabels() {
-    _assertClone(AstFactory.switchDefault([
-      AstFactory.label2("l1"),
-      AstFactory.label2("l2")
-    ], [AstFactory.block()]));
+    _assertClone(AstFactory.switchDefault(
+        [AstFactory.label2("l1"), AstFactory.label2("l2")],
+        [AstFactory.block()]));
   }
 
   void test_visitSwitchDefault_multipleStatements() {
@@ -1407,7 +1583,8 @@
   }
 
   void test_visitTryStatement_catchFinally() {
-    _assertClone(AstFactory.tryStatement3(AstFactory.block(),
+    _assertClone(AstFactory.tryStatement3(
+        AstFactory.block(),
         [AstFactory.catchClause3(AstFactory.typeName4("E"))],
         AstFactory.block()));
   }
@@ -1432,8 +1609,9 @@
   }
 
   void test_visitTypeName_nestedArg() {
-    _assertClone(AstFactory.typeName4(
-        "C", [AstFactory.typeName4("D", [AstFactory.typeName4("E")])]));
+    _assertClone(AstFactory.typeName4("C", [
+      AstFactory.typeName4("D", [AstFactory.typeName4("E")])
+    ]));
   }
 
   void test_visitTypeName_noArgs() {
@@ -1477,8 +1655,8 @@
   }
 
   void test_visitVariableDeclarationList_const_type() {
-    _assertClone(AstFactory.variableDeclarationList(Keyword.CONST,
-        AstFactory.typeName4("C"), [
+    _assertClone(AstFactory.variableDeclarationList(
+        Keyword.CONST, AstFactory.typeName4("C"), [
       AstFactory.variableDeclaration("a"),
       AstFactory.variableDeclaration("b")
     ]));
@@ -1503,8 +1681,8 @@
   }
 
   void test_visitVariableDeclarationList_type() {
-    _assertClone(AstFactory.variableDeclarationList(null,
-        AstFactory.typeName4("C"), [
+    _assertClone(AstFactory.variableDeclarationList(
+        null, AstFactory.typeName4("C"), [
       AstFactory.variableDeclaration("a"),
       AstFactory.variableDeclaration("b")
     ]));
@@ -2738,6 +2916,12 @@
   Statement get(WhileStatement node) => node.body;
 }
 
+class Getter_NodeReplacerTest_test_yieldStatement
+    implements NodeReplacerTest_Getter {
+  @override
+  Expression get(YieldStatement node) => node.expression;
+}
+
 class Getter_NodeReplacerTest_testAnnotatedNode
     implements NodeReplacerTest_Getter {
   @override
@@ -2768,12 +2952,6 @@
   StringLiteral get(UriBasedDirective node) => node.uri;
 }
 
-class Getter_NodeReplacerTest_test_yieldStatement
-    implements NodeReplacerTest_Getter {
-  @override
-  Expression get(YieldStatement node) => node.expression;
-}
-
 @reflectiveTest
 class LineInfoTest {
   void test_creation() {
@@ -2885,7 +3063,8 @@
 }
 
 class ListGetter_NodeReplacerTest_test_compilationUnit_2
-    extends NodeReplacerTest_ListGetter<CompilationUnit, CompilationUnitMember> {
+    extends NodeReplacerTest_ListGetter<CompilationUnit,
+        CompilationUnitMember> {
   ListGetter_NodeReplacerTest_test_compilationUnit_2(int arg0) : super(arg0);
 
   @override
@@ -2894,7 +3073,8 @@
 }
 
 class ListGetter_NodeReplacerTest_test_constructorDeclaration
-    extends NodeReplacerTest_ListGetter<ConstructorDeclaration, ConstructorInitializer> {
+    extends NodeReplacerTest_ListGetter<ConstructorDeclaration,
+        ConstructorInitializer> {
   ListGetter_NodeReplacerTest_test_constructorDeclaration(int arg0)
       : super(arg0);
 
@@ -2987,7 +3167,8 @@
 }
 
 class ListGetter_NodeReplacerTest_test_stringInterpolation
-    extends NodeReplacerTest_ListGetter<StringInterpolation, InterpolationElement> {
+    extends NodeReplacerTest_ListGetter<StringInterpolation,
+        InterpolationElement> {
   ListGetter_NodeReplacerTest_test_stringInterpolation(int arg0) : super(arg0);
 
   @override
@@ -3029,7 +3210,8 @@
 }
 
 class ListGetter_NodeReplacerTest_test_variableDeclarationList
-    extends NodeReplacerTest_ListGetter<VariableDeclarationList, VariableDeclaration> {
+    extends NodeReplacerTest_ListGetter<VariableDeclarationList,
+        VariableDeclaration> {
   ListGetter_NodeReplacerTest_test_variableDeclarationList(int arg0)
       : super(arg0);
 
@@ -3254,7 +3436,8 @@
   }
 
   void test_annotation() {
-    Annotation node = AstFactory.annotation2(AstFactory.identifier3("C"),
+    Annotation node = AstFactory.annotation2(
+        AstFactory.identifier3("C"),
         AstFactory.identifier3("c"),
         AstFactory.argumentList([AstFactory.integer(0)]));
     _assertReplace(node, new Getter_NodeReplacerTest_test_annotation());
@@ -3268,7 +3451,8 @@
   }
 
   void test_asExpression() {
-    AsExpression node = AstFactory.asExpression(AstFactory.integer(0),
+    AsExpression node = AstFactory.asExpression(
+        AstFactory.integer(0),
         AstFactory.typeName3(
             AstFactory.identifier3("a"), [AstFactory.typeName4("C")]));
     _assertReplace(node, new Getter_NodeReplacerTest_test_asExpression_2());
@@ -3297,7 +3481,8 @@
 
   void test_binaryExpression() {
     BinaryExpression node = AstFactory.binaryExpression(
-        AstFactory.identifier3("l"), TokenType.PLUS,
+        AstFactory.identifier3("l"),
+        TokenType.PLUS,
         AstFactory.identifier3("r"));
     _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression());
     _assertReplace(node, new Getter_NodeReplacerTest_test_binaryExpression_2());
@@ -3335,7 +3520,9 @@
   }
 
   void test_classDeclaration() {
-    ClassDeclaration node = AstFactory.classDeclaration(null, "A",
+    ClassDeclaration node = AstFactory.classDeclaration(
+        null,
+        "A",
         AstFactory.typeParameterList(["E"]),
         AstFactory.extendsClause(AstFactory.typeName4("B")),
         AstFactory.withClause([AstFactory.typeName4("C")]),
@@ -3359,8 +3546,11 @@
   }
 
   void test_classTypeAlias() {
-    ClassTypeAlias node = AstFactory.classTypeAlias("A",
-        AstFactory.typeParameterList(["E"]), null, AstFactory.typeName4("B"),
+    ClassTypeAlias node = AstFactory.classTypeAlias(
+        "A",
+        AstFactory.typeParameterList(["E"]),
+        null,
+        AstFactory.typeName4("B"),
         AstFactory.withClause([AstFactory.typeName4("C")]),
         AstFactory.implementsClause([AstFactory.typeName4("D")]));
     node.documentationComment =
@@ -3388,8 +3578,9 @@
   }
 
   void test_compilationUnit() {
-    CompilationUnit node = AstFactory.compilationUnit8("",
-        [AstFactory.libraryDirective2("lib")], [
+    CompilationUnit node = AstFactory.compilationUnit8("", [
+      AstFactory.libraryDirective2("lib")
+    ], [
       AstFactory.topLevelVariableDeclaration2(
           null, [AstFactory.variableDeclaration("X")])
     ]);
@@ -3402,7 +3593,8 @@
 
   void test_conditionalExpression() {
     ConditionalExpression node = AstFactory.conditionalExpression(
-        AstFactory.booleanLiteral(true), AstFactory.integer(0),
+        AstFactory.booleanLiteral(true),
+        AstFactory.integer(0),
         AstFactory.integer(1));
     _assertReplace(
         node, new Getter_NodeReplacerTest_test_conditionalExpression_3());
@@ -3413,10 +3605,17 @@
   }
 
   void test_constructorDeclaration() {
-    ConstructorDeclaration node = AstFactory.constructorDeclaration2(null, null,
-        AstFactory.identifier3("C"), "d", AstFactory.formalParameterList(), [
-      AstFactory.constructorFieldInitializer(false, "x", AstFactory.integer(0))
-    ], AstFactory.emptyFunctionBody());
+    ConstructorDeclaration node = AstFactory.constructorDeclaration2(
+        null,
+        null,
+        AstFactory.identifier3("C"),
+        "d",
+        AstFactory.formalParameterList(),
+        [
+          AstFactory.constructorFieldInitializer(
+              false, "x", AstFactory.integer(0))
+        ],
+        AstFactory.emptyFunctionBody());
     node.documentationComment =
         Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
     node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
@@ -3506,8 +3705,9 @@
   }
 
   void test_exportDirective() {
-    ExportDirective node =
-        AstFactory.exportDirective2("", [AstFactory.hideCombinator2(["C"])]);
+    ExportDirective node = AstFactory.exportDirective2("", [
+      AstFactory.hideCombinator2(["C"])
+    ]);
     node.documentationComment =
         Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
     node.metadata.add(AstFactory.annotation(AstFactory.identifier3("a")));
@@ -3558,7 +3758,8 @@
 
   void test_forEachStatement_withIdentifier() {
     ForEachStatement node = AstFactory.forEachStatement2(
-        AstFactory.identifier3("i"), AstFactory.identifier3("l"),
+        AstFactory.identifier3("i"),
+        AstFactory.identifier3("l"),
         AstFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_2());
@@ -3570,7 +3771,8 @@
 
   void test_forEachStatement_withLoopVariable() {
     ForEachStatement node = AstFactory.forEachStatement(
-        AstFactory.declaredIdentifier3("e"), AstFactory.identifier3("l"),
+        AstFactory.declaredIdentifier3("e"),
+        AstFactory.identifier3("l"),
         AstFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_2());
@@ -3588,8 +3790,10 @@
   }
 
   void test_forStatement_withInitialization() {
-    ForStatement node = AstFactory.forStatement(AstFactory.identifier3("a"),
-        AstFactory.booleanLiteral(true), [AstFactory.integer(0)],
+    ForStatement node = AstFactory.forStatement(
+        AstFactory.identifier3("a"),
+        AstFactory.booleanLiteral(true),
+        [AstFactory.integer(0)],
         AstFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forStatement_withInitialization_3());
@@ -3597,16 +3801,18 @@
         new Getter_NodeReplacerTest_test_forStatement_withInitialization_2());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forStatement_withInitialization());
-    _assertReplace(node,
+    _assertReplace(
+        node,
         new ListGetter_NodeReplacerTest_test_forStatement_withInitialization(
             0));
   }
 
   void test_forStatement_withVariables() {
-    ForStatement node = AstFactory.forStatement2(AstFactory
-            .variableDeclarationList2(
-                null, [AstFactory.variableDeclaration("i")]),
-        AstFactory.booleanLiteral(true), [AstFactory.integer(0)],
+    ForStatement node = AstFactory.forStatement2(
+        AstFactory.variableDeclarationList2(
+            null, [AstFactory.variableDeclaration("i")]),
+        AstFactory.booleanLiteral(true),
+        [AstFactory.integer(0)],
         AstFactory.block());
     _assertReplace(
         node, new Getter_NodeReplacerTest_test_forStatement_withVariables_2());
@@ -3620,8 +3826,10 @@
 
   void test_functionDeclaration() {
     FunctionDeclaration node = AstFactory.functionDeclaration(
-        AstFactory.typeName4("R"), null, "f", AstFactory.functionExpression2(
-            AstFactory.formalParameterList(),
+        AstFactory.typeName4("R"),
+        null,
+        "f",
+        AstFactory.functionExpression2(AstFactory.formalParameterList(),
             AstFactory.blockFunctionBody(AstFactory.block())));
     node.documentationComment =
         Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
@@ -3637,8 +3845,10 @@
 
   void test_functionDeclarationStatement() {
     FunctionDeclarationStatement node = AstFactory.functionDeclarationStatement(
-        AstFactory.typeName4("R"), null, "f", AstFactory.functionExpression2(
-            AstFactory.formalParameterList(),
+        AstFactory.typeName4("R"),
+        null,
+        "f",
+        AstFactory.functionExpression2(AstFactory.formalParameterList(),
             AstFactory.blockFunctionBody(AstFactory.block())));
     _assertReplace(
         node, new Getter_NodeReplacerTest_test_functionDeclarationStatement());
@@ -3663,8 +3873,10 @@
   }
 
   void test_functionTypeAlias() {
-    FunctionTypeAlias node = AstFactory.typeAlias(AstFactory.typeName4("R"),
-        "F", AstFactory.typeParameterList(["E"]),
+    FunctionTypeAlias node = AstFactory.typeAlias(
+        AstFactory.typeName4("R"),
+        "F",
+        AstFactory.typeParameterList(["E"]),
         AstFactory.formalParameterList());
     node.documentationComment =
         Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
@@ -3681,7 +3893,8 @@
 
   void test_functionTypedFormalParameter() {
     FunctionTypedFormalParameter node = AstFactory.functionTypedFormalParameter(
-        AstFactory.typeName4("R"), "f",
+        AstFactory.typeName4("R"),
+        "f",
         [AstFactory.simpleFormalParameter3("p")]);
     node.documentationComment =
         Comment.createEndOfLineComment(EMPTY_TOKEN_LIST);
@@ -3784,7 +3997,8 @@
   }
 
   void test_listLiteral() {
-    ListLiteral node = AstFactory.listLiteral2(null,
+    ListLiteral node = AstFactory.listLiteral2(
+        null,
         AstFactory.typeArgumentList([AstFactory.typeName4("E")]),
         [AstFactory.identifier3("e")]);
     _assertReplace(node, new ListGetter_NodeReplacerTest_test_listLiteral(0));
@@ -3792,7 +4006,8 @@
   }
 
   void test_mapLiteral() {
-    MapLiteral node = AstFactory.mapLiteral(null,
+    MapLiteral node = AstFactory.mapLiteral(
+        null,
         AstFactory.typeArgumentList([AstFactory.typeName4("E")]),
         [AstFactory.mapLiteralEntry("k", AstFactory.identifier3("v"))]);
     _assertReplace(node, new ListGetter_NodeReplacerTest_test_mapLiteral(0));
@@ -3807,8 +4022,12 @@
   }
 
   void test_methodDeclaration() {
-    MethodDeclaration node = AstFactory.methodDeclaration2(null,
-        AstFactory.typeName4("A"), null, null, AstFactory.identifier3("m"),
+    MethodDeclaration node = AstFactory.methodDeclaration2(
+        null,
+        AstFactory.typeName4("A"),
+        null,
+        null,
+        AstFactory.identifier3("m"),
         AstFactory.formalParameterList(),
         AstFactory.blockFunctionBody(AstFactory.block()));
     node.documentationComment =
@@ -3961,8 +4180,8 @@
   }
 
   void test_switchStatement() {
-    SwitchStatement node = AstFactory.switchStatement(
-        AstFactory.identifier3("x"), [
+    SwitchStatement node =
+        AstFactory.switchStatement(AstFactory.identifier3("x"), [
       AstFactory.switchCase2([AstFactory.label2("l")], AstFactory.integer(0),
           [AstFactory.block()]),
       AstFactory.switchDefault([AstFactory.label2("l")], [AstFactory.block()])
@@ -3990,8 +4209,11 @@
   }
 
   void test_tryStatement() {
-    TryStatement node = AstFactory.tryStatement3(AstFactory.block(),
-        [AstFactory.catchClause("e", [AstFactory.block()])],
+    TryStatement node = AstFactory.tryStatement3(
+        AstFactory.block(),
+        [
+          AstFactory.catchClause("e", [AstFactory.block()])
+        ],
         AstFactory.block());
     _assertReplace(node, new Getter_NodeReplacerTest_test_tryStatement_2());
     _assertReplace(node, new Getter_NodeReplacerTest_test_tryStatement());
@@ -4066,6 +4288,11 @@
     _assertReplace(node, new ListGetter_NodeReplacerTest_test_withClause(0));
   }
 
+  void test_yieldStatement() {
+    var node = AstFactory.yieldStatement(AstFactory.identifier3("A"));
+    _assertReplace(node, new Getter_NodeReplacerTest_test_yieldStatement());
+  }
+
   void _assertReplace(AstNode parent, NodeReplacerTest_Getter getter) {
     AstNode child = getter.get(parent);
     if (child != null) {
@@ -4109,11 +4336,6 @@
     _assertReplace(node, new Getter_NodeReplacerTest_testUriBasedDirective());
     _testAnnotatedNode(node);
   }
-
-  void test_yieldStatement() {
-    var node = AstFactory.yieldStatement(AstFactory.identifier3("A"));
-    _assertReplace(node, new Getter_NodeReplacerTest_test_yieldStatement());
-  }
 }
 
 abstract class NodeReplacerTest_Getter<P, C> {
@@ -4449,7 +4671,8 @@
   }
 
   void test_printListOfQuotedNames_five() {
-    expect(StringUtilities
+    expect(
+        StringUtilities
             .printListOfQuotedNames(<String>["a", "b", "c", "d", "e"]),
         "'a', 'b', 'c', 'd' and 'e'");
   }
@@ -4522,28 +4745,46 @@
     expect(
         StringUtilities.startsWith5("abcde", 0, 0x61, 0x62, 0x63, 0x64, 0x65),
         isTrue);
-    expect(StringUtilities.startsWith5(
-        "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65), isTrue);
-    expect(StringUtilities.startsWith5(
-        "abcdefghi", 2, 0x63, 0x64, 0x65, 0x66, 0x67), isTrue);
-    expect(StringUtilities.startsWith5(
-        "abcdefghi", 4, 0x65, 0x66, 0x67, 0x68, 0x69), isTrue);
-    expect(StringUtilities.startsWith5(
-        "abcdefghi", 0, 0x61, 0x62, 0x63, 0x62, 0x61), isFalse);
+    expect(
+        StringUtilities.startsWith5(
+            "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65),
+        isTrue);
+    expect(
+        StringUtilities.startsWith5(
+            "abcdefghi", 2, 0x63, 0x64, 0x65, 0x66, 0x67),
+        isTrue);
+    expect(
+        StringUtilities.startsWith5(
+            "abcdefghi", 4, 0x65, 0x66, 0x67, 0x68, 0x69),
+        isTrue);
+    expect(
+        StringUtilities.startsWith5(
+            "abcdefghi", 0, 0x61, 0x62, 0x63, 0x62, 0x61),
+        isFalse);
     // missing
   }
 
   void test_startsWith6() {
-    expect(StringUtilities.startsWith6(
-        "abcdef", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66), isTrue);
-    expect(StringUtilities.startsWith6(
-        "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66), isTrue);
-    expect(StringUtilities.startsWith6(
-        "abcdefghi", 2, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68), isTrue);
-    expect(StringUtilities.startsWith6(
-        "abcdefghi", 3, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69), isTrue);
-    expect(StringUtilities.startsWith6(
-        "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x67), isFalse);
+    expect(
+        StringUtilities.startsWith6(
+            "abcdef", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66),
+        isTrue);
+    expect(
+        StringUtilities.startsWith6(
+            "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66),
+        isTrue);
+    expect(
+        StringUtilities.startsWith6(
+            "abcdefghi", 2, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68),
+        isTrue);
+    expect(
+        StringUtilities.startsWith6(
+            "abcdefghi", 3, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69),
+        isTrue);
+    expect(
+        StringUtilities.startsWith6(
+            "abcdefghi", 0, 0x61, 0x62, 0x63, 0x64, 0x65, 0x67),
+        isFalse);
     // missing
   }
 
diff --git a/pkg/analyzer/test/instrumentation/instrumentation_test.dart b/pkg/analyzer/test/instrumentation/instrumentation_test.dart
index b1c263d..e23fd9a 100644
--- a/pkg/analyzer/test/instrumentation/instrumentation_test.dart
+++ b/pkg/analyzer/test/instrumentation/instrumentation_test.dart
@@ -73,9 +73,12 @@
     String level = 'level';
     DateTime time = new DateTime(2001);
     String message = 'message';
-    service.logLogEntry(level, time, message);
+    String exception = 'exception';
+    String stackTraceText = 'stackTrace';
+    StackTrace stackTrace = new StackTrace.fromString(stackTraceText);
+    service.logLogEntry(level, time, message, exception, stackTrace);
     assertNormal(server, InstrumentationService.TAG_LOG_ENTRY,
-        '$level:${time.millisecondsSinceEpoch}:$message');
+        '$level:${time.millisecondsSinceEpoch}:$message:$exception:$stackTraceText');
   }
 
   void test_logNotification() {
diff --git a/pkg/analyzer/test/parse_compilation_unit_test.dart b/pkg/analyzer/test/parse_compilation_unit_test.dart
index 0e2d3de..71e4838 100644
--- a/pkg/analyzer/test/parse_compilation_unit_test.dart
+++ b/pkg/analyzer/test/parse_compilation_unit_test.dart
@@ -7,7 +7,10 @@
 import 'package:analyzer/analyzer.dart';
 import 'package:unittest/unittest.dart';
 
+import 'utils.dart';
+
 void main() {
+  initializeTestEnvironment();
   test("parses a valid compilation unit successfully", () {
     var unit = parseCompilationUnit("void main() => print('Hello, world!');");
     expect(unit.toString(), equals("void main() => print('Hello, world!');"));
@@ -37,6 +40,6 @@
   test("allows you to specify whether or not to parse function bodies", () {
     var unit = parseCompilationUnit("void main() => print('Hello, world!');",
         parseFunctionBodies: false);
-    expect(unit.toString(), equals("void main() ;"));
+    expect(unit.toString(), equals("void main();"));
   });
 }
diff --git a/pkg/analyzer/test/source/analysis_options_provider_test.dart b/pkg/analyzer/test/source/analysis_options_provider_test.dart
index 9033c8c..b200278 100644
--- a/pkg/analyzer/test/source/analysis_options_provider_test.dart
+++ b/pkg/analyzer/test/source/analysis_options_provider_test.dart
@@ -9,8 +9,10 @@
 import 'package:unittest/unittest.dart';
 import 'package:yaml/yaml.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('AnalysisOptionsProvider', () {
     setUp(() {
       buildResourceProvider();
@@ -47,7 +49,9 @@
   resourceProvider = new MemoryResourceProvider();
   resourceProvider.newFolder('/empty');
   resourceProvider.newFolder('/tmp');
-  resourceProvider.newFile('/.analysis_options', r'''
+  resourceProvider.newFile(
+      '/.analysis_options',
+      r'''
 analyzer:
   ignore:
     - ignoreme.dart
diff --git a/pkg/analyzer/test/source/package_map_provider_test.dart b/pkg/analyzer/test/source/package_map_provider_test.dart
index ea7987b..af5bedf 100644
--- a/pkg/analyzer/test/source/package_map_provider_test.dart
+++ b/pkg/analyzer/test/source/package_map_provider_test.dart
@@ -11,8 +11,10 @@
 import 'package:analyzer/src/generated/sdk_io.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
 
   group('PubPackageMapProvider', () {
     group('parsePackageMap', () {
@@ -36,8 +38,9 @@
         String packageName = 'foo';
         String folderPath = '/path/to/folder';
         resourceProvider.newFolder(folderPath);
-        Map<String, List<Folder>> result =
-            parsePackageMap({'packages': {packageName: folderPath}}).packageMap;
+        Map<String, List<Folder>> result = parsePackageMap({
+          'packages': {packageName: folderPath}
+        }).packageMap;
         expect(result, hasLength(1));
         expect(result.keys, contains(packageName));
         expect(result[packageName], hasLength(1));
@@ -48,8 +51,9 @@
       test("don't ignore nonexistent folder", () {
         String packageName = 'foo';
         String folderPath = '/path/to/folder';
-        Map<String, List<Folder>> result =
-            parsePackageMap({'packages': {packageName: folderPath}}).packageMap;
+        Map<String, List<Folder>> result = parsePackageMap({
+          'packages': {packageName: folderPath}
+        }).packageMap;
         expect(result, hasLength(1));
         expect(result.keys, contains(packageName));
         expect(result[packageName], hasLength(1));
@@ -63,8 +67,11 @@
         String folderPath2 = '/path/to/folder2';
         resourceProvider.newFolder(folderPath1);
         resourceProvider.newFolder(folderPath2);
-        Map<String, List<Folder>> result = parsePackageMap(
-            {'packages': {packageName: [folderPath1, folderPath2]}}).packageMap;
+        Map<String, List<Folder>> result = parsePackageMap({
+          'packages': {
+            packageName: [folderPath1, folderPath2]
+          }
+        }).packageMap;
         expect(result, hasLength(1));
         expect(result.keys, contains(packageName));
         expect(result[packageName], hasLength(2));
@@ -79,8 +86,10 @@
         String path2 = '/path/to/folder2/pubspec.lock';
         resourceProvider.newFile(path1, '...');
         resourceProvider.newFile(path2, '...');
-        Set<String> dependencies = parsePackageMap(
-            {'packages': {}, 'input_files': [path1, path2]}).dependencies;
+        Set<String> dependencies = parsePackageMap({
+          'packages': {},
+          'input_files': [path1, path2]
+        }).dependencies;
         expect(dependencies, hasLength(2));
         expect(dependencies, contains(path1));
         expect(dependencies, contains(path2));
@@ -92,8 +101,11 @@
         String packageName = 'foo';
         resourceProvider.newFolder(projectPath);
         resourceProvider.newFolder(packagePath);
-        Map<String, List<Folder>> result = parsePackageMap(
-            {'packages': {packageName: [relativePackagePath]}}).packageMap;
+        Map<String, List<Folder>> result = parsePackageMap({
+          'packages': {
+            packageName: [relativePackagePath]
+          }
+        }).packageMap;
         expect(result[packageName][0].path, equals(packagePath));
       });
 
diff --git a/pkg/analyzer/test/source/package_map_resolver_test.dart b/pkg/analyzer/test/source/package_map_resolver_test.dart
index c892947..caf88da 100644
--- a/pkg/analyzer/test/source/package_map_resolver_test.dart
+++ b/pkg/analyzer/test/source/package_map_resolver_test.dart
@@ -12,9 +12,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../reflective_tests.dart';
+import '../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(_PackageMapUriResolverTest);
 }
 
@@ -58,8 +59,8 @@
     const pkgFileB = '/part2/lib/libB.dart';
     provider.newFile(pkgFileA, 'library lib_a');
     provider.newFile(pkgFileB, 'library lib_b');
-    PackageMapUriResolver resolver = new PackageMapUriResolver(provider,
-        <String, List<Folder>>{
+    PackageMapUriResolver resolver =
+        new PackageMapUriResolver(provider, <String, List<Folder>>{
       'pkg': [
         provider.getResource('/part1/lib/'),
         provider.getResource('/part2/lib/')
@@ -95,8 +96,8 @@
     const pkgFileB = '/pkgB/lib/libB.dart';
     provider.newFile(pkgFileA, 'library lib_a;');
     provider.newFile(pkgFileB, 'library lib_b;');
-    PackageMapUriResolver resolver = new PackageMapUriResolver(provider,
-        <String, List<Folder>>{
+    PackageMapUriResolver resolver =
+        new PackageMapUriResolver(provider, <String, List<Folder>>{
       'pkgA': [provider.getResource('/pkgA/lib/')],
       'pkgB': [provider.getResource('/pkgB/lib/')]
     });
@@ -154,8 +155,8 @@
     const pkgFileB = '/pkgB/lib/src/libB.dart';
     provider.newFile(pkgFileA, 'library lib_a;');
     provider.newFile(pkgFileB, 'library lib_b;');
-    PackageMapUriResolver resolver = new PackageMapUriResolver(provider,
-        <String, List<Folder>>{
+    PackageMapUriResolver resolver =
+        new PackageMapUriResolver(provider, <String, List<Folder>>{
       'pkgA': [provider.getResource('/pkgA/lib/')],
       'pkgB': [provider.getResource('/pkgB/lib/')]
     });
@@ -183,8 +184,8 @@
     const file2 = '/foo2/lib/bar.dart';
     provider.newFile(file1, 'library bar');
     provider.newFile(file2, 'library bar');
-    PackageMapUriResolver resolver = new PackageMapUriResolver(provider,
-        <String, List<Folder>>{
+    PackageMapUriResolver resolver =
+        new PackageMapUriResolver(provider, <String, List<Folder>>{
       'foo': [
         provider.getResource('/foo1/lib'),
         provider.getResource('/foo2/lib')
@@ -207,8 +208,8 @@
     const file2 = '/foo2/bar2/lib.dart';
     provider.newFile(file1, 'library lib');
     provider.newFile(file2, 'library lib');
-    PackageMapUriResolver resolver = new PackageMapUriResolver(provider,
-        <String, List<Folder>>{
+    PackageMapUriResolver resolver =
+        new PackageMapUriResolver(provider, <String, List<Folder>>{
       'pkg1': [
         provider.getResource('/foo1'),
         provider.getResource('/foo2/bar2')
diff --git a/pkg/analyzer/test/source/path_filter_test.dart b/pkg/analyzer/test/source/path_filter_test.dart
index 4542e99..a7e58fb 100644
--- a/pkg/analyzer/test/source/path_filter_test.dart
+++ b/pkg/analyzer/test/source/path_filter_test.dart
@@ -8,43 +8,46 @@
 import 'package:path/path.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
+  String root(String path) => context.absolute(context.normalize(path));
   group('PathFilterTest', () {
     setUp(() {});
     tearDown(() {});
     test('test_ignoreEverything', () {
-      var filter = new PathFilter(context, '/', ['*']);
+      var filter = new PathFilter(root('/'), ['*'], context);
       expect(filter.ignored('a'), isTrue);
     });
     test('test_ignoreFile', () {
-      var filter = new PathFilter(context, '/', ['apple']);
+      var filter = new PathFilter(root('/'), ['apple'], context);
       expect(filter.ignored('apple'), isTrue);
       expect(filter.ignored('banana'), isFalse);
     });
     test('test_ignoreMultipleFiles', () {
-      var filter = new PathFilter(context, '/', ['apple', 'banana']);
+      var filter = new PathFilter(root('/'), ['apple', 'banana'], context);
       expect(filter.ignored('apple'), isTrue);
       expect(filter.ignored('banana'), isTrue);
     });
     test('test_ignoreSubDir', () {
-      var filter = new PathFilter(context, '/', ['apple/*']);
+      var filter = new PathFilter(root('/'), ['apple/*'], context);
       expect(filter.ignored('apple/banana'), isTrue);
       expect(filter.ignored('apple/banana/cantaloupe'), isFalse);
     });
     test('test_ignoreTree', () {
-      var filter = new PathFilter(context, '/', ['apple/**']);
+      var filter = new PathFilter(root('/'), ['apple/**'], context);
       expect(filter.ignored('apple/banana'), isTrue);
       expect(filter.ignored('apple/banana/cantaloupe'), isTrue);
     });
     test('test_ignoreSdkExt', () {
-      var filter = new PathFilter(context, '/', ['sdk_ext/**']);
+      var filter = new PathFilter(root('/'), ['sdk_ext/**'], context);
       expect(filter.ignored('sdk_ext/entry.dart'), isTrue);
       expect(filter.ignored('sdk_ext/lib/src/part.dart'), isTrue);
     });
     test('test_outsideRoot', () {
       var filter =
-          new PathFilter(context, '/workspace/dart/sdk', ['sdk_ext/**']);
+          new PathFilter(root('/workspace/dart/sdk'), ['sdk_ext/**'], context);
       expect(filter.ignored('/'), isTrue);
       expect(filter.ignored('/workspace'), isTrue);
       expect(filter.ignored('/workspace/dart'), isTrue);
@@ -53,7 +56,7 @@
     });
     test('test_relativePaths', () {
       var filter =
-          new PathFilter(context, '/workspace/dart/sdk', ['sdk_ext/**']);
+          new PathFilter(root('/workspace/dart/sdk'), ['sdk_ext/**'], context);
       expect(filter.ignored('../apple'), isTrue);
       expect(filter.ignored('../sdk/main.dart'), isFalse);
       expect(filter.ignored('../sdk/sdk_ext/entry.dart'), isTrue);
diff --git a/pkg/analyzer/test/source/sdk_ext_test.dart b/pkg/analyzer/test/source/sdk_ext_test.dart
index 288fe37..01416af 100644
--- a/pkg/analyzer/test/source/sdk_ext_test.dart
+++ b/pkg/analyzer/test/source/sdk_ext_test.dart
@@ -8,8 +8,10 @@
 import 'package:analyzer/source/sdk_ext.dart';
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
+
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('SdkExtUriResolverTest', () {
     setUp(() {
       buildResourceProvider();
@@ -58,20 +60,6 @@
       expect(restoreUri.scheme, equals('dart'));
       expect(restoreUri.path, equals('fox'));
     });
-    test('test_resolvePart', () {
-      var resolver = new SdkExtUriResolver({
-        'fox': [resourceProvider.getResource('/tmp')]
-      });
-      var source = resolver.resolveAbsolute(Uri.parse('dart:fox/foo.dart'));
-      expect(source, isNotNull);
-      // Restore source's uri.
-      var restoreUri = resolver.restoreAbsolute(source);
-      expect(restoreUri, isNotNull);
-      // Verify that it is 'dart:fox/foo.dart'.
-      expect(restoreUri.toString(), equals('dart:fox/foo.dart'));
-      expect(restoreUri.scheme, equals('dart'));
-      expect(restoreUri.path, equals('fox/foo.dart'));
-    });
   });
 }
 
@@ -81,7 +69,9 @@
   resourceProvider = new MemoryResourceProvider();
   resourceProvider.newFolder('/empty');
   resourceProvider.newFolder('/tmp');
-  resourceProvider.newFile('/tmp/_sdkext', r'''
+  resourceProvider.newFile(
+      '/tmp/_sdkext',
+      r'''
   {
     "dart:fox": "slippy.dart",
     "dart:bear": "grizzly.dart",
diff --git a/pkg/analyzer/test/source/test_all.dart b/pkg/analyzer/test/source/test_all.dart
index 8530b7b4..6930bce 100644
--- a/pkg/analyzer/test/source/test_all.dart
+++ b/pkg/analyzer/test/source/test_all.dart
@@ -6,16 +6,16 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'analysis_options_provider_test.dart' as analysis_options_provider_test;
 import 'package_map_provider_test.dart' as package_map_provider_test;
 import 'package_map_resolver_test.dart' as package_map_resolver_test;
 import 'path_filter_test.dart' as path_filter_test;
 import 'sdk_ext_test.dart' as sdk_ext_test;
 
-
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('source', () {
     analysis_options_provider_test.main();
     package_map_provider_test.main();
diff --git a/pkg/analyzer/test/src/context/abstract_context.dart b/pkg/analyzer/test/src/context/abstract_context.dart
index 4c8f4a2..09c30b2 100644
--- a/pkg/analyzer/test/src/context/abstract_context.dart
+++ b/pkg/analyzer/test/src/context/abstract_context.dart
@@ -72,12 +72,20 @@
   /**
    * Compute the given [result] for the given [target].
    */
-  void computeResult(AnalysisTarget target, ResultDescriptor result) {
+  void computeResult(AnalysisTarget target, ResultDescriptor result,
+      {isInstanceOf matcher: null}) {
     oldOutputs = outputs;
     task = analysisDriver.computeResult(target, result);
-    expect(task, isNotNull);
+    if (matcher == null) {
+      expect(task, isNotNull);
+    } else {
+      expect(task, matcher);
+    }
     expect(task.caughtException, isNull);
     outputs = task.outputs;
+    for (ResultDescriptor descriptor in task.descriptor.results) {
+      expect(outputs, contains(descriptor));
+    }
   }
 
   AnalysisContextImpl createAnalysisContext() {
@@ -98,17 +106,23 @@
     return sources;
   }
 
-  void setUp() {
-    // prepare AnalysisContext
+  void prepareAnalysisContext([AnalysisOptions options]) {
     sourceFactory = new SourceFactory(<UriResolver>[
       new DartUriResolver(sdk),
       new ResourceUriResolver(resourceProvider)
     ]);
     context = createAnalysisContext();
+    if (options != null) {
+      context.analysisOptions = options;
+    }
     context.sourceFactory = sourceFactory;
     analysisCache = context.analysisCache;
     analysisDriver = context.driver;
   }
 
+  void setUp() {
+    prepareAnalysisContext();
+  }
+
   void tearDown() {}
 }
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index d5a31c4..b9f3608 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -22,9 +22,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisCacheTest);
   runReflectiveTests(CacheEntryTest);
   runReflectiveTests(CacheFlushManagerTest);
@@ -33,7 +34,8 @@
   runReflectiveTests(ResultDataTest);
 }
 
-AnalysisCache createCache({AnalysisContext context,
+AnalysisCache createCache(
+    {AnalysisContext context,
     RetentionPriority policy: RetentionPriority.LOW}) {
   CachePartition partition = new UniversalCachePartition(context);
   return new AnalysisCache(<CachePartition>[partition]);
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 908f08e..bad2cc6 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -45,10 +45,11 @@
 import '../../generated/engine_test.dart';
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import 'abstract_context.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisContextImplTest);
   runReflectiveTests(LimitedInvalidateTest);
 }
@@ -83,7 +84,9 @@
 
   void fail_performAnalysisTask_importedLibraryDelete_html() {
     // NOTE: This was failing before converting to the new task model.
-    Source htmlSource = addSource("/page.html", r'''
+    Source htmlSource = addSource(
+        "/page.html",
+        r'''
 <html><body><script type="application/dart">
   import 'libB.dart';
   main() {print('hello dart');}
@@ -95,7 +98,8 @@
         context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 1");
     expect(!_hasAnalysisErrorWithErrorSeverity(context.getErrors(htmlSource)),
-        isTrue, reason: "htmlSource doesn't have errors");
+        isTrue,
+        reason: "htmlSource doesn't have errors");
     // remove libB.dart content and analyze
     context.setContents(libBSource, null);
     _analyzeAll_assertFinished();
@@ -174,11 +178,15 @@
   }
 
   void test_applyChanges_change_flush_element() {
-    Source librarySource = addSource("/lib.dart", r'''
+    Source librarySource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 int a = 0;''');
     expect(context.computeLibraryElement(librarySource), isNotNull);
-    context.setContents(librarySource, r'''
+    context.setContents(
+        librarySource,
+        r'''
 library lib;
 int aa = 0;''');
     expect(context.getLibraryElement(librarySource), isNull);
@@ -218,8 +226,8 @@
     Element declarationElement = declaration.variables.variables[0].element;
     TopLevelVariableDeclaration use =
         partUnit.declarations[0] as TopLevelVariableDeclaration;
-    Element useElement = (use.variables.variables[
-        0].initializer as SimpleIdentifier).staticElement;
+    Element useElement = (use.variables.variables[0].initializer
+        as SimpleIdentifier).staticElement;
     expect((useElement as PropertyAccessorElement).variable,
         same(declarationElement));
     return pumpEventQueue().then((_) {
@@ -314,18 +322,24 @@
    */
   void test_applyChanges_remove_incremental() {
     MemoryResourceProvider resourceProvider = new MemoryResourceProvider();
-    Source source = resourceProvider.newFile('/test.dart', r'''
+    Source source = resourceProvider
+        .newFile(
+            '/test.dart',
+            r'''
 main() {
   print(1);
 }
-''').createSource();
+''')
+        .createSource();
     context.analysisOptions = new AnalysisOptionsImpl()..incremental = true;
     context.applyChanges(new ChangeSet()..addedSource(source));
     // remember compilation unit
     _analyzeAll_assertFinished();
     CompilationUnit unit = context.getResolvedCompilationUnit2(source, source);
     // add overlay
-    context.setContents(source, r'''
+    context.setContents(
+        source,
+        r'''
 main() {
   print(12);
 }
@@ -370,7 +384,9 @@
 
   void test_computeDocumentationComment_block() {
     String comment = "/** Comment */";
-    Source source = addSource("/test.dart", """
+    Source source = addSource(
+        "/test.dart",
+        """
 $comment
 class A {}""");
     LibraryElement libraryElement = context.computeLibraryElement(source);
@@ -495,7 +511,9 @@
   }
 
   void test_computeLineInfo_dart() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -504,7 +522,9 @@
   }
 
   void test_computeLineInfo_html() {
-    Source source = addSource("/test.html", r'''
+    Source source = addSource(
+        "/test.html",
+        r'''
 <html>
   <body>
     <h1>A</h1>
@@ -650,8 +670,9 @@
     LibrarySpecificUnit libTarget = new LibrarySpecificUnit(source, source);
     analysisDriver.computeResult(libTarget, RESOLVED_UNIT);
     // flush
-    context.getCacheEntry(libTarget).setState(
-        RESOLVED_UNIT, CacheState.FLUSHED);
+    context
+        .getCacheEntry(libTarget)
+        .setState(RESOLVED_UNIT, CacheState.FLUSHED);
     // schedule recomputing
     List<CompilationUnit> units = context.ensureResolvedDartUnits(source);
     expect(units, isNull);
@@ -662,15 +683,21 @@
   }
 
   void test_ensureResolvedDartUnits_partUnit_hasResolved() {
-    Source libSource1 = addSource('/lib1.dart', r'''
+    Source libSource1 = addSource(
+        '/lib1.dart',
+        r'''
 library lib;
 part 'part.dart';
 ''');
-    Source libSource2 = addSource('/lib2.dart', r'''
+    Source libSource2 = addSource(
+        '/lib2.dart',
+        r'''
 library lib;
 part 'part.dart';
 ''');
-    Source partSource = addSource('/part.dart', r'''
+    Source partSource = addSource(
+        '/part.dart',
+        r'''
 part of lib;
 ''');
     LibrarySpecificUnit partTarget1 =
@@ -688,15 +715,21 @@
   }
 
   void test_ensureResolvedDartUnits_partUnit_notResolved() {
-    Source libSource1 = addSource('/lib1.dart', r'''
+    Source libSource1 = addSource(
+        '/lib1.dart',
+        r'''
 library lib;
 part 'part.dart';
 ''');
-    Source libSource2 = addSource('/lib2.dart', r'''
+    Source libSource2 = addSource(
+        '/lib2.dart',
+        r'''
 library lib;
 part 'part.dart';
 ''');
-    Source partSource = addSource('/part.dart', r'''
+    Source partSource = addSource(
+        '/part.dart',
+        r'''
 part of lib;
 ''');
     LibrarySpecificUnit partTarget1 =
@@ -706,10 +739,12 @@
     analysisDriver.computeResult(partTarget1, RESOLVED_UNIT);
     analysisDriver.computeResult(partTarget2, RESOLVED_UNIT);
     // flush
-    context.getCacheEntry(partTarget1).setState(
-        RESOLVED_UNIT, CacheState.FLUSHED);
-    context.getCacheEntry(partTarget2).setState(
-        RESOLVED_UNIT, CacheState.FLUSHED);
+    context
+        .getCacheEntry(partTarget1)
+        .setState(RESOLVED_UNIT, CacheState.FLUSHED);
+    context
+        .getCacheEntry(partTarget2)
+        .setState(RESOLVED_UNIT, CacheState.FLUSHED);
     // schedule recomputing
     List<CompilationUnit> units = context.ensureResolvedDartUnits(partSource);
     expect(units, isNull);
@@ -785,7 +820,9 @@
   }
 
   void test_getElement_constructor_named() {
-    Source source = addSource("/lib.dart", r'''
+    Source source = addSource(
+        "/lib.dart",
+        r'''
 class A {
   A.named() {}
 }''');
@@ -799,7 +836,9 @@
   }
 
   void test_getElement_constructor_unnamed() {
-    Source source = addSource("/lib.dart", r'''
+    Source source = addSource(
+        "/lib.dart",
+        r'''
 class A {
   A() {}
 }''');
@@ -855,7 +894,9 @@
   }
 
   void test_getErrors_html_some() {
-    Source source = addSource("/test.html", r'''
+    Source source = addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 </head></html>''');
@@ -868,7 +909,9 @@
   }
 
   void test_getHtmlFilesReferencing_html() {
-    Source htmlSource = addSource("/test.html", r'''
+    Source htmlSource = addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.dart'/>
 <script type='application/dart' src='test.js'/>
@@ -884,7 +927,9 @@
   }
 
   void test_getHtmlFilesReferencing_library() {
-    Source htmlSource = addSource("/test.html", r'''
+    Source htmlSource = addSource(
+        "/test.html",
+        r'''
 <!DOCTYPE html>
 <html><head>
 <script type='application/dart' src='test.dart'/>
@@ -902,7 +947,9 @@
   }
 
   void test_getHtmlFilesReferencing_part() {
-    Source htmlSource = addSource("/test.html", r'''
+    Source htmlSource = addSource(
+        "/test.html",
+        r'''
 <!DOCTYPE html>
 <html><head>
 <script type='application/dart' src='test.dart'/>
@@ -955,7 +1002,9 @@
   }
 
   void test_getLaunchableClientLibrarySources_doesNotImportHtml() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 main() {}''');
     context.computeLibraryElement(source);
     List<Source> sources = context.launchableClientLibrarySources;
@@ -965,7 +1014,9 @@
   void test_getLaunchableClientLibrarySources_importsHtml_explicitly() {
     List<Source> sources = context.launchableClientLibrarySources;
     expect(sources, isEmpty);
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'dart:html';
 main() {}''');
     context.computeLibraryElement(source);
@@ -976,10 +1027,14 @@
   void test_getLaunchableClientLibrarySources_importsHtml_implicitly() {
     List<Source> sources = context.launchableClientLibrarySources;
     expect(sources, isEmpty);
-    addSource("/a.dart", r'''
+    addSource(
+        "/a.dart",
+        r'''
 import 'dart:html';
 ''');
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'a.dart';
 main() {}''');
     context.computeLibraryElement(source);
@@ -990,10 +1045,14 @@
   void test_getLaunchableClientLibrarySources_importsHtml_implicitly2() {
     List<Source> sources = context.launchableClientLibrarySources;
     expect(sources, isEmpty);
-    addSource("/a.dart", r'''
+    addSource(
+        "/a.dart",
+        r'''
 export 'dart:html';
 ''');
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'a.dart';
 main() {}''');
     context.computeLibraryElement(source);
@@ -1009,7 +1068,9 @@
   }
 
   void test_getLaunchableServerLibrarySources_importsHtml_explicitly() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'dart:html';
 main() {}
 ''');
@@ -1018,10 +1079,14 @@
   }
 
   void test_getLaunchableServerLibrarySources_importsHtml_implicitly() {
-    addSource("/imports_html.dart", r'''
+    addSource(
+        "/imports_html.dart",
+        r'''
 import 'dart:html';
 ''');
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'imports_html.dart';
 main() {}''');
     context.computeLibraryElement(source);
@@ -1035,7 +1100,9 @@
   }
 
   void test_getLibrariesContaining() {
-    Source librarySource = addSource("/lib.dart", r'''
+    Source librarySource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';''');
     Source partSource = addSource("/part.dart", "part of lib;");
@@ -1051,11 +1118,15 @@
   void test_getLibrariesDependingOn() {
     Source libASource = addSource("/libA.dart", "library libA;");
     addSource("/libB.dart", "library libB;");
-    Source lib1Source = addSource("/lib1.dart", r'''
+    Source lib1Source = addSource(
+        "/lib1.dart",
+        r'''
 library lib1;
 import 'libA.dart';
 export 'libB.dart';''');
-    Source lib2Source = addSource("/lib2.dart", r'''
+    Source lib2Source = addSource(
+        "/lib2.dart",
+        r'''
 library lib2;
 import 'libB.dart';
 export 'libA.dart';''');
@@ -1066,7 +1137,9 @@
   }
 
   void test_getLibrariesReferencedFromHtml() {
-    Source htmlSource = addSource("/test.html", r'''
+    Source htmlSource = addSource(
+        "/test.html",
+        r'''
 <!DOCTYPE html>
 <html><head>
 <script type='application/dart' src='test.dart'/>
@@ -1082,7 +1155,9 @@
   }
 
   void test_getLibrariesReferencedFromHtml_none() {
-    Source htmlSource = addSource("/test.html", r'''
+    Source htmlSource = addSource(
+        "/test.html",
+        r'''
 <html><head>
 <script type='application/dart' src='test.js'/>
 </head></html>''');
@@ -1117,7 +1192,9 @@
   }
 
   void test_getLineInfo() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -1130,9 +1207,11 @@
 
   void test_getModificationStamp_fromSource() {
     int stamp = 42;
-    expect(context.getModificationStamp(
-        new AnalysisContextImplTest_Source_getModificationStamp_fromSource(
-            stamp)), stamp);
+    expect(
+        context.getModificationStamp(
+            new AnalysisContextImplTest_Source_getModificationStamp_fromSource(
+                stamp)),
+        stamp);
   }
 
   void test_getModificationStamp_overridden() {
@@ -1251,7 +1330,9 @@
   }
 
   void test_isClientLibrary_dart() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 import 'dart:html';
 
 main() {}''');
@@ -1268,7 +1349,9 @@
   }
 
   void test_isServerLibrary_dart() {
-    Source source = addSource("/test.dart", r'''
+    Source source = addSource(
+        "/test.dart",
+        r'''
 library lib;
 
 main() {}''');
@@ -1337,10 +1420,14 @@
   }
 
   void test_parseHtmlUnit_resolveDirectives() {
-    Source libSource = addSource("/lib.dart", r'''
+    Source libSource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 class ClassA {}''');
-    Source source = addSource("/lib.html", r'''
+    Source source = addSource(
+        "/lib.html",
+        r'''
 <!DOCTYPE html>
 <html>
 <head>
@@ -1363,15 +1450,20 @@
   }
 
   void test_performAnalysisTask_addPart() {
-    Source libSource = addSource("/lib.dart", r'''
+    Source libSource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';''');
     // run all tasks without part
     _analyzeAll_assertFinished();
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libSource)),
-        isTrue, reason: "lib has errors");
+        isTrue,
+        reason: "lib has errors");
     // add part and run all tasks
-    Source partSource = addSource("/part.dart", r'''
+    Source partSource = addSource(
+        "/part.dart",
+        r'''
 part of lib;
 ''');
     _analyzeAll_assertFinished();
@@ -1379,7 +1471,8 @@
     List<Source> librariesWithPart = context.getLibrariesContaining(partSource);
     expect(librariesWithPart, unorderedEquals([libSource]));
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libSource)),
-        isFalse, reason: "lib doesn't have errors");
+        isFalse,
+        reason: "lib doesn't have errors");
     expect(
         context.getResolvedCompilationUnit2(partSource, libSource), isNotNull,
         reason: "part resolved");
@@ -1457,7 +1550,9 @@
   }
 
   void test_performAnalysisTask_changePartContents_makeItAPart() {
-    Source libSource = addSource("/lib.dart", r'''
+    Source libSource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';
 void f(x) {}''');
@@ -1469,7 +1564,9 @@
         context.getResolvedCompilationUnit2(partSource, partSource), isNotNull,
         reason: "part resolved 1");
     // update and analyze
-    context.setContents(partSource, r'''
+    context.setContents(
+        partSource,
+        r'''
 part of lib;
 void g() { f(null); }''');
     expect(context.getResolvedCompilationUnit2(libSource, libSource), isNull,
@@ -1490,18 +1587,24 @@
    * https://code.google.com/p/dart/issues/detail?id=12424
    */
   void test_performAnalysisTask_changePartContents_makeItNotPart() {
-    Source libSource = addSource("/lib.dart", r'''
+    Source libSource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 part 'part.dart';
 void f(x) {}''');
-    Source partSource = addSource("/part.dart", r'''
+    Source partSource = addSource(
+        "/part.dart",
+        r'''
 part of lib;
 void g() { f(null); }''');
     _analyzeAll_assertFinished();
     expect(context.getErrors(libSource).errors, hasLength(0));
     expect(context.getErrors(partSource).errors, hasLength(0));
     // Remove 'part' directive, which should make "f(null)" an error.
-    context.setContents(partSource, r'''
+    context.setContents(
+        partSource,
+        r'''
 //part of lib;
 void g() { f(null); }''');
     _analyzeAll_assertFinished();
@@ -1596,7 +1699,8 @@
         context.getResolvedCompilationUnit2(libASource, libASource), isNotNull,
         reason: "libA resolved 1");
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libASource)),
-        isTrue, reason: "libA has an error");
+        isTrue,
+        reason: "libA has an error");
     // add libB.dart and analyze
     Source libBSource = addSource("/libB.dart", "library libB;");
     _analyzeAll_assertFinished();
@@ -1607,11 +1711,14 @@
         context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 2");
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libASource)),
-        isFalse, reason: "libA doesn't have errors");
+        isFalse,
+        reason: "libA doesn't have errors");
   }
 
   void test_performAnalysisTask_importedLibraryAdd_html() {
-    Source htmlSource = addSource("/page.html", r'''
+    Source htmlSource = addSource(
+        "/page.html",
+        r'''
 <html><body><script type="application/dart">
   import '/libB.dart';
   main() {print('hello dart');}
@@ -1619,7 +1726,8 @@
     _analyzeAll_assertFinished();
     context.computeErrors(htmlSource);
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(htmlSource)),
-        isTrue, reason: "htmlSource has an error");
+        isTrue,
+        reason: "htmlSource has an error");
     // add libB.dart and analyze
     Source libBSource = addSource("/libB.dart", "library libB;");
     _analyzeAll_assertFinished();
@@ -1647,7 +1755,8 @@
         context.getResolvedCompilationUnit2(libBSource, libBSource), isNotNull,
         reason: "libB resolved 1");
     expect(!_hasAnalysisErrorWithErrorSeverity(context.getErrors(libASource)),
-        isTrue, reason: "libA doesn't have errors");
+        isTrue,
+        reason: "libA doesn't have errors");
     // remove libB.dart and analyze
     _removeSource(libBSource);
     _analyzeAll_assertFinished();
@@ -1655,7 +1764,8 @@
         context.getResolvedCompilationUnit2(libASource, libASource), isNotNull,
         reason: "libA resolved 2");
     expect(_hasAnalysisErrorWithErrorSeverity(context.getErrors(libASource)),
-        isTrue, reason: "libA has an error");
+        isTrue,
+        reason: "libA has an error");
   }
 
   void test_performAnalysisTask_IOException() {
@@ -1740,13 +1850,8 @@
     List<LibraryElement> importedLibraries = library.importedLibraries;
     assertNamedElements(importedLibraries, ["dart.core", "libB"]);
     List<LibraryElement> visibleLibraries = library.visibleLibraries;
-    assertNamedElements(visibleLibraries, [
-      "dart.core",
-      "dart.async",
-      "dart.math",
-      "libA",
-      "libB"
-    ]);
+    assertNamedElements(visibleLibraries,
+        ["dart.core", "dart.async", "dart.math", "libA", "libB"]);
   }
 
   void test_resolveCompilationUnit_import_relative_cyclic() {
@@ -1760,13 +1865,8 @@
     List<LibraryElement> importedLibraries = library.importedLibraries;
     assertNamedElements(importedLibraries, ["dart.core", "libB"]);
     List<LibraryElement> visibleLibraries = library.visibleLibraries;
-    assertNamedElements(visibleLibraries, [
-      "dart.core",
-      "dart.async",
-      "dart.math",
-      "libA",
-      "libB"
-    ]);
+    assertNamedElements(visibleLibraries,
+        ["dart.core", "dart.async", "dart.math", "libA", "libB"]);
   }
 
 //  void test_resolveCompilationUnit_sourceChangeDuringResolution() {
@@ -1910,7 +2010,9 @@
   }
 
   void test_setContents_null() {
-    Source librarySource = addSource("/lib.dart", r'''
+    Source librarySource = addSource(
+        "/lib.dart",
+        r'''
 library lib;
 int a = 0;''');
     context.setContents(librarySource, '// different');
@@ -2097,7 +2199,9 @@
   }
 
   void test_noChange_thenChange() {
-    Source sourceA = addSource("/a.dart", r'''
+    Source sourceA = addSource(
+        "/a.dart",
+        r'''
 library lib_a;
 
 class A {
@@ -2107,7 +2211,9 @@
   B();
 }
 ''');
-    Source sourceB = addSource("/b.dart", r'''
+    Source sourceB = addSource(
+        "/b.dart",
+        r'''
 library lib_b;
 import 'a.dart';
 main() {
@@ -2121,7 +2227,9 @@
     var unitElementA = unitA.element;
     var libraryElementA = unitElementA.library;
     // Update a.dart, no declaration changes.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {
   A();
@@ -2154,7 +2262,9 @@
     }
     // Update a.dart, rename A to A2, invalidates b.dart, so
     // we know that the previous update did not damage dependencies.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {
   A();
@@ -2180,13 +2290,17 @@
   }
 
   void test_unusedName() {
-    Source sourceA = addSource("/a.dart", r'''
+    Source sourceA = addSource(
+        "/a.dart",
+        r'''
 library lib_a;
 class A {}
 class B {}
 class C {}
 ''');
-    Source sourceB = addSource("/b.dart", r'''
+    Source sourceB = addSource(
+        "/b.dart",
+        r'''
 library lib_b;
 import 'a.dart';
 main() {
@@ -2196,7 +2310,9 @@
 ''');
     _performPendingAnalysisTasks();
     // Update A.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {}
 class B2 {}
@@ -2209,13 +2325,17 @@
   }
 
   void test_usedName_directUser() {
-    Source sourceA = addSource("/a.dart", r'''
+    Source sourceA = addSource(
+        "/a.dart",
+        r'''
 library lib_a;
 class A {}
 class B {}
 class C {}
 ''');
-    Source sourceB = addSource("/b.dart", r'''
+    Source sourceB = addSource(
+        "/b.dart",
+        r'''
 library lib_b;
 import 'a.dart';
 main() {
@@ -2226,7 +2346,9 @@
     _performPendingAnalysisTasks();
     expect(context.getErrors(sourceB).errors, hasLength(1));
     // Update a.dart, invalidates b.dart because it references "C2".
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {}
 class B {}
@@ -2238,7 +2360,9 @@
     _performPendingAnalysisTasks();
     expect(context.getErrors(sourceB).errors, hasLength(0));
     // Update a.dart, invalidates b.dart because it references "C".
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {}
 class B {}
@@ -2252,13 +2376,17 @@
   }
 
   void test_usedName_directUser_withIncremental() {
-    Source sourceA = addSource("/a.dart", r'''
+    Source sourceA = addSource(
+        "/a.dart",
+        r'''
 library lib_a;
 class A {
   m() {}
 }
 ''');
-    Source sourceB = addSource("/b.dart", r'''
+    Source sourceB = addSource(
+        "/b.dart",
+        r'''
 library lib_b;
 import 'a.dart';
 main() {
@@ -2268,7 +2396,9 @@
 ''');
     _performPendingAnalysisTasks();
     // Update A.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {
   m2() {}
@@ -2279,18 +2409,24 @@
   }
 
   void test_usedName_indirectUser() {
-    Source sourceA = addSource("/a.dart", r'''
+    Source sourceA = addSource(
+        "/a.dart",
+        r'''
 library lib_a;
 class A {
   m() {}
 }
 ''');
-    Source sourceB = addSource("/b.dart", r'''
+    Source sourceB = addSource(
+        "/b.dart",
+        r'''
 library lib_b;
 import 'a.dart';
 class B extends A {}
 ''');
-    Source sourceC = addSource("/c.dart", r'''
+    Source sourceC = addSource(
+        "/c.dart",
+        r'''
 library lib_c;
 import 'b.dart';
 class C extends B {
@@ -2303,7 +2439,9 @@
     _performPendingAnalysisTasks();
     expect(context.getErrors(sourceC).errors, hasLength(0));
     // Replace "A.m" with "A.m2", invalidate both b.dart and c.dart files.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {
   m2() {}
@@ -2317,7 +2455,9 @@
     expect(context.getErrors(sourceB).errors, hasLength(0));
     expect(context.getErrors(sourceC).errors, hasLength(1));
     // Restore "A.m", invalidate both b.dart and c.dart files.
-    context.setContents(sourceA, r'''
+    context.setContents(
+        sourceA,
+        r'''
 library lib_a;
 class A {
   m() {}
diff --git a/pkg/analyzer/test/src/context/test_all.dart b/pkg/analyzer/test/src/context/test_all.dart
index d3e5f76..bbd021d 100644
--- a/pkg/analyzer/test/src/context/test_all.dart
+++ b/pkg/analyzer/test/src/context/test_all.dart
@@ -6,12 +6,13 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'cache_test.dart' as cache_test;
 import 'context_test.dart' as context_test;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('context tests', () {
     cache_test.main();
     context_test.main();
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 77db010..b3c6036 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -24,38 +24,102 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import '../context/abstract_context.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(BuildCompilationUnitElementTaskTest);
   runReflectiveTests(BuildDirectiveElementsTaskTest);
   runReflectiveTests(BuildEnumMemberElementsTaskTest);
-  runReflectiveTests(BuildSourceExportClosureTaskTest);
-  runReflectiveTests(BuildSourceImportExportClosureTaskTest);
   runReflectiveTests(BuildExportNamespaceTaskTest);
   runReflectiveTests(BuildLibraryElementTaskTest);
   runReflectiveTests(BuildPublicNamespaceTaskTest);
+  runReflectiveTests(BuildSourceExportClosureTaskTest);
+  runReflectiveTests(BuildSourceImportExportClosureTaskTest);
   runReflectiveTests(BuildTypeProviderTaskTest);
   runReflectiveTests(ComputeConstantDependenciesTaskTest);
   runReflectiveTests(ComputeConstantValueTaskTest);
+  runReflectiveTests(ComputeInferableStaticVariableDependenciesTaskTest);
   runReflectiveTests(ContainingLibrariesTaskTest);
   runReflectiveTests(DartErrorsTaskTest);
   runReflectiveTests(EvaluateUnitConstantsTaskTest);
   runReflectiveTests(GatherUsedImportedElementsTaskTest);
   runReflectiveTests(GatherUsedLocalElementsTaskTest);
   runReflectiveTests(GenerateHintsTaskTest);
+  runReflectiveTests(InferInstanceMembersInUnitTaskTest);
+  runReflectiveTests(InferStaticVariableTypesInUnitTaskTest);
+  runReflectiveTests(InferStaticVariableTypeTaskTest);
   runReflectiveTests(LibraryErrorsReadyTaskTest);
   runReflectiveTests(LibraryUnitErrorsTaskTest);
   runReflectiveTests(ParseDartTaskTest);
-  runReflectiveTests(ResolveUnitTypeNamesTaskTest);
+  runReflectiveTests(PartiallyResolveUnitReferencesTaskTest);
   runReflectiveTests(ResolveLibraryTypeNamesTaskTest);
-  runReflectiveTests(ResolveReferencesTaskTest);
+  runReflectiveTests(ResolveUnitReferencesTaskTest);
+  runReflectiveTests(ResolveUnitTypeNamesTaskTest);
   runReflectiveTests(ResolveVariableReferencesTaskTest);
   runReflectiveTests(ScanDartTaskTest);
   runReflectiveTests(VerifyUnitTaskTest);
 }
 
+isInstanceOf isBuildCompilationUnitElementTask =
+    new isInstanceOf<BuildCompilationUnitElementTask>();
+isInstanceOf isBuildDirectiveElementsTask =
+    new isInstanceOf<BuildDirectiveElementsTask>();
+isInstanceOf isBuildEnumMemberElementsTask =
+    new isInstanceOf<BuildEnumMemberElementsTask>();
+isInstanceOf isBuildExportNamespaceTask =
+    new isInstanceOf<BuildExportNamespaceTask>();
+isInstanceOf isBuildLibraryElementTask =
+    new isInstanceOf<BuildLibraryElementTask>();
+isInstanceOf isBuildPublicNamespaceTask =
+    new isInstanceOf<BuildPublicNamespaceTask>();
+isInstanceOf isBuildSourceExportClosureTask =
+    new isInstanceOf<BuildSourceExportClosureTask>();
+isInstanceOf isBuildSourceImportExportClosureTask =
+    new isInstanceOf<BuildSourceImportExportClosureTask>();
+isInstanceOf isBuildTypeProviderTask =
+    new isInstanceOf<BuildTypeProviderTask>();
+isInstanceOf isComputeConstantDependenciesTask =
+    new isInstanceOf<ComputeConstantDependenciesTask>();
+isInstanceOf isComputeConstantValueTask =
+    new isInstanceOf<ComputeConstantValueTask>();
+isInstanceOf isComputeInferableStaticVariableDependenciesTask =
+    new isInstanceOf<ComputeInferableStaticVariableDependenciesTask>();
+isInstanceOf isContainingLibrariesTask =
+    new isInstanceOf<ContainingLibrariesTask>();
+isInstanceOf isDartErrorsTask = new isInstanceOf<DartErrorsTask>();
+isInstanceOf isEvaluateUnitConstantsTask =
+    new isInstanceOf<EvaluateUnitConstantsTask>();
+isInstanceOf isGatherUsedImportedElementsTask =
+    new isInstanceOf<GatherUsedImportedElementsTask>();
+isInstanceOf isGatherUsedLocalElementsTask =
+    new isInstanceOf<GatherUsedLocalElementsTask>();
+isInstanceOf isGenerateHintsTask = new isInstanceOf<GenerateHintsTask>();
+isInstanceOf isInferInstanceMembersInUnitTask =
+    new isInstanceOf<InferInstanceMembersInUnitTask>();
+isInstanceOf isInferStaticVariableTypesInUnitTask =
+    new isInstanceOf<InferStaticVariableTypesInUnitTask>();
+isInstanceOf isInferStaticVariableTypeTask =
+    new isInstanceOf<InferStaticVariableTypeTask>();
+isInstanceOf isLibraryErrorsReadyTask =
+    new isInstanceOf<LibraryErrorsReadyTask>();
+isInstanceOf isLibraryUnitErrorsTask =
+    new isInstanceOf<LibraryUnitErrorsTask>();
+isInstanceOf isParseDartTask = new isInstanceOf<ParseDartTask>();
+isInstanceOf isPartiallyResolveUnitReferencesTask =
+    new isInstanceOf<PartiallyResolveUnitReferencesTask>();
+isInstanceOf isResolveLibraryTypeNamesTask =
+    new isInstanceOf<ResolveLibraryTypeNamesTask>();
+isInstanceOf isResolveUnitReferencesTask =
+    new isInstanceOf<ResolveUnitReferencesTask>();
+isInstanceOf isResolveUnitTypeNamesTask =
+    new isInstanceOf<ResolveUnitTypeNamesTask>();
+isInstanceOf isResolveVariableReferencesTask =
+    new isInstanceOf<ResolveVariableReferencesTask>();
+isInstanceOf isScanDartTask = new isInstanceOf<ScanDartTask>();
+isInstanceOf isVerifyUnitTask = new isInstanceOf<VerifyUnitTask>();
+
 @reflectiveTest
 class BuildCompilationUnitElementTaskTest extends _AbstractDartTaskTest {
   Source source;
@@ -67,8 +131,10 @@
     Map<String, TaskInput> inputs =
         BuildCompilationUnitElementTask.buildInputs(target);
     expect(inputs, isNotNull);
-    expect(inputs.keys, unorderedEquals(
-        [BuildCompilationUnitElementTask.PARSED_UNIT_INPUT_NAME]));
+    expect(
+        inputs.keys,
+        unorderedEquals(
+            [BuildCompilationUnitElementTask.PARSED_UNIT_INPUT_NAME]));
   }
 
   test_constructor() {
@@ -113,7 +179,8 @@
     CompilationUnit unit = outputs[RESOLVED_UNIT1];
     CompilationUnitElement unitElement = outputs[COMPILATION_UNIT_ELEMENT];
     Annotation annotation = unit.declarations
-        .firstWhere((m) => m is FunctionDeclaration).metadata[0];
+        .firstWhere((m) => m is FunctionDeclaration)
+        .metadata[0];
     List<ConstantEvaluationTarget> expectedConstants = [
       unitElement.accessors.firstWhere((e) => e.isGetter).variable,
       unitElement.types[0].fields[0],
@@ -133,13 +200,16 @@
 import 'lib2.dart';
 export 'lib3.dart';
 part 'part.dart';
-class A {}
+final x = '';
+class A {
+  static final y = 0;
+}
 class B = Object with A;
 ''');
     expect(outputs, hasLength(3));
+    expect(outputs[COMPILATION_UNIT_CONSTANTS], isNotNull);
     expect(outputs[COMPILATION_UNIT_ELEMENT], isNotNull);
     expect(outputs[RESOLVED_UNIT1], isNotNull);
-    expect(outputs[COMPILATION_UNIT_CONSTANTS], isNotNull);
   }
 
   test_perform_reuseElement() {
@@ -156,7 +226,8 @@
     CacheEntry cacheEntry = analysisCache.get(target);
     cacheEntry.setState(RESOLVED_UNIT1, CacheState.INVALID);
     // compute again
-    computeResult(target, RESOLVED_UNIT1);
+    computeResult(target, RESOLVED_UNIT1,
+        matcher: isBuildCompilationUnitElementTask);
     expect(outputs[COMPILATION_UNIT_ELEMENT], same(unitElement));
     expect(outputs[RESOLVED_UNIT1], isNot(same(unit)));
   }
@@ -164,8 +235,8 @@
   void _performBuildTask(String content) {
     source = newSource('/test.dart', content);
     target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT1);
-    expect(task, new isInstanceOf<BuildCompilationUnitElementTask>());
+    computeResult(target, RESOLVED_UNIT1,
+        matcher: isBuildCompilationUnitElementTask);
   }
 }
 
@@ -216,8 +287,8 @@
     Source sourceB = sources[1];
     Source sourceC = sources[2];
     // perform task
-    computeResult(sourceA, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     LibraryElement libraryElementA = outputs[LIBRARY_ELEMENT2];
     LibraryElement libraryElementB = _getImportLibraryInput(sourceB);
@@ -270,8 +341,8 @@
     });
     Source sourceA = sources[0];
     // perform task
-    computeResult(sourceA, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     CompilationUnit libraryUnitA = context
         .getCacheEntry(new LibrarySpecificUnit(sourceA, sourceA))
@@ -299,8 +370,8 @@
     List<Source> sources = newSources({'/libA.dart': ''});
     Source source = sources[0];
     // perform task
-    computeResult(source, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(source, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     LibraryElement libraryElement = outputs[LIBRARY_ELEMENT2];
     // verify that dart:core has SDK context
@@ -323,8 +394,8 @@
     });
     Source sourceA = sources[0];
     // perform task
-    computeResult(sourceA, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // validate errors
     _assertErrorsWithCodes([CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
   }
@@ -341,8 +412,8 @@
     });
     Source sourceA = sources[0];
     // perform task
-    computeResult(sourceA, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // validate errors
     _assertErrorsWithCodes([CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
   }
@@ -356,8 +427,8 @@
     });
     Source source = sources[0];
     // perform task
-    computeResult(source, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(source, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     LibraryElement libraryElement = outputs[LIBRARY_ELEMENT2];
     // has an explicit "dart:core" import
@@ -377,8 +448,8 @@
     });
     Source source = sources[0];
     // perform task
-    computeResult(source, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(source, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     LibraryElement libraryElement = outputs[LIBRARY_ELEMENT2];
     expect(libraryElement.hasExtUri, isTrue);
@@ -401,30 +472,28 @@
     Source sourceA = sources[0];
     Source sourceB = sources[1];
     // perform task
-    computeResult(sourceA, LIBRARY_ELEMENT2);
-    expect(task, new isInstanceOf<BuildDirectiveElementsTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT2,
+        matcher: isBuildDirectiveElementsTask);
     // prepare outputs
     CompilationUnit libraryUnitA = context
         .getCacheEntry(new LibrarySpecificUnit(sourceA, sourceA))
         .getValue(RESOLVED_UNIT1);
     // validate directives
-    {
-      ImportDirective importNodeB = libraryUnitA.directives[1];
-      SimpleIdentifier prefixNodeB = importNodeB.prefix;
-      ImportElement importElementB = importNodeB.element;
-      PrefixElement prefixElement = importElementB.prefix;
-      expect(importElementB, isNotNull);
-      expect(importElementB.importedLibrary, _getImportLibraryInput(sourceB));
-      expect(prefixElement, isNotNull);
-      expect(importElementB.prefixOffset, prefixElement.nameOffset);
-      expect(prefixNodeB.staticElement, prefixElement);
-      // PrefixElement "pref" is shared
-      ImportDirective importNodeC = libraryUnitA.directives[2];
-      SimpleIdentifier prefixNodeC = importNodeC.prefix;
-      ImportElement importElementC = importNodeC.element;
-      expect(prefixNodeC.staticElement, prefixElement);
-      expect(importElementC.prefix, prefixElement);
-    }
+    ImportDirective importNodeB = libraryUnitA.directives[1];
+    SimpleIdentifier prefixNodeB = importNodeB.prefix;
+    ImportElement importElementB = importNodeB.element;
+    PrefixElement prefixElement = importElementB.prefix;
+    expect(importElementB, isNotNull);
+    expect(importElementB.importedLibrary, _getImportLibraryInput(sourceB));
+    expect(prefixElement, isNotNull);
+    expect(importElementB.prefixOffset, prefixElement.nameOffset);
+    expect(prefixNodeB.staticElement, prefixElement);
+    // PrefixElement "pref" is shared
+    ImportDirective importNodeC = libraryUnitA.directives[2];
+    SimpleIdentifier prefixNodeC = importNodeC.prefix;
+    ImportElement importElementC = importNodeC.element;
+    expect(prefixNodeC.staticElement, prefixElement);
+    expect(importElementC.prefix, prefixElement);
   }
 
   void _assertErrorsWithCodes(List<ErrorCode> expectedErrorCodes) {
@@ -446,13 +515,15 @@
 @reflectiveTest
 class BuildEnumMemberElementsTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 enum MyEnum {
   A, B
 }
 ''');
-    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT2);
-    expect(task, new isInstanceOf<BuildEnumMemberElementsTask>());
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT2,
+        matcher: isBuildEnumMemberElementsTask);
     CompilationUnit unit = outputs[RESOLVED_UNIT2];
     // validate Element
     ClassElement enumElement = unit.element.getEnum('MyEnum');
@@ -508,101 +579,111 @@
 @reflectiveTest
 class BuildExportNamespaceTaskTest extends _AbstractDartTaskTest {
   test_perform_entryPoint() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 export 'b.dart';
 ''');
-    Source sourceB = newSource('/b.dart', '''
+    Source sourceB = newSource(
+        '/b.dart',
+        '''
 library lib_b;
 main() {}
 ''');
-    computeResult(sourceA, LIBRARY_ELEMENT4);
-    expect(task, new isInstanceOf<BuildExportNamespaceTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT4,
+        matcher: isBuildExportNamespaceTask);
     // validate
-    {
-      LibraryElement library = outputs[LIBRARY_ELEMENT4];
-      FunctionElement entryPoint = library.entryPoint;
-      expect(entryPoint, isNotNull);
-      expect(entryPoint.source, sourceB);
-    }
+    LibraryElement library = outputs[LIBRARY_ELEMENT4];
+    FunctionElement entryPoint = library.entryPoint;
+    expect(entryPoint, isNotNull);
+    expect(entryPoint.source, sourceB);
   }
 
   test_perform_hideCombinator() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 export 'b.dart' hide B1;
 class A1 {}
 class A2 {}
 class _A3 {}
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library lib_b;
 class B1 {}
 class B2 {}
 class B3 {}
 class _B4 {}
 ''');
-    newSource('/c.dart', '''
+    newSource(
+        '/c.dart',
+        '''
 library lib_c;
 class C1 {}
 class C2 {}
 class C3 {}
 ''');
-    computeResult(sourceA, LIBRARY_ELEMENT4);
-    expect(task, new isInstanceOf<BuildExportNamespaceTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT4,
+        matcher: isBuildExportNamespaceTask);
     // validate
-    {
-      LibraryElement library = outputs[LIBRARY_ELEMENT4];
-      Namespace namespace = library.exportNamespace;
-      Iterable<String> definedKeys = namespace.definedNames.keys;
-      expect(definedKeys, unorderedEquals(['A1', 'A2', 'B2', 'B3']));
-    }
+    LibraryElement library = outputs[LIBRARY_ELEMENT4];
+    Namespace namespace = library.exportNamespace;
+    Iterable<String> definedKeys = namespace.definedNames.keys;
+    expect(definedKeys, unorderedEquals(['A1', 'A2', 'B2', 'B3']));
   }
 
   test_perform_showCombinator() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 export 'b.dart' show B1;
 class A1 {}
 class A2 {}
 class _A3 {}
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library lib_b;
 class B1 {}
 class B2 {}
 class _B3 {}
 ''');
-    computeResult(sourceA, LIBRARY_ELEMENT4);
-    expect(task, new isInstanceOf<BuildExportNamespaceTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT4,
+        matcher: isBuildExportNamespaceTask);
     // validate
-    {
-      LibraryElement library = outputs[LIBRARY_ELEMENT4];
-      Namespace namespace = library.exportNamespace;
-      Iterable<String> definedKeys = namespace.definedNames.keys;
-      expect(definedKeys, unorderedEquals(['A1', 'A2', 'B1']));
-    }
+    LibraryElement library = outputs[LIBRARY_ELEMENT4];
+    Namespace namespace = library.exportNamespace;
+    Iterable<String> definedKeys = namespace.definedNames.keys;
+    expect(definedKeys, unorderedEquals(['A1', 'A2', 'B1']));
   }
 
   test_perform_showCombinator_setter() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 export 'b.dart' show topLevelB;
 class A {}
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library lib_b;
 int topLevelB;
 ''');
-    computeResult(sourceA, LIBRARY_ELEMENT4);
-    expect(task, new isInstanceOf<BuildExportNamespaceTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT4,
+        matcher: isBuildExportNamespaceTask);
     // validate
-    {
-      LibraryElement library = outputs[LIBRARY_ELEMENT4];
-      Namespace namespace = library.exportNamespace;
-      Iterable<String> definedKeys = namespace.definedNames.keys;
-      expect(definedKeys, unorderedEquals(['A', 'topLevelB', 'topLevelB=']));
-    }
+    LibraryElement library = outputs[LIBRARY_ELEMENT4];
+    Namespace namespace = library.exportNamespace;
+    Iterable<String> definedKeys = namespace.definedNames.keys;
+    expect(definedKeys, unorderedEquals(['A', 'topLevelB', 'topLevelB=']));
   }
 }
 
@@ -862,8 +943,8 @@
   void _performBuildTask(Map<String, String> sourceMap) {
     List<Source> sources = newSources(sourceMap);
     Source libSource = sources.first;
-    computeResult(libSource, LIBRARY_ELEMENT1);
-    expect(task, new isInstanceOf<BuildLibraryElementTask>());
+    computeResult(libSource, LIBRARY_ELEMENT1,
+        matcher: isBuildLibraryElementTask);
     libraryUnit = context
         .getCacheEntry(new LibrarySpecificUnit(libSource, libSource))
         .getValue(RESOLVED_UNIT1);
@@ -925,8 +1006,8 @@
 d() {}
 '''
     });
-    computeResult(sources.first, LIBRARY_ELEMENT3);
-    expect(task, new isInstanceOf<BuildPublicNamespaceTask>());
+    computeResult(sources.first, LIBRARY_ELEMENT3,
+        matcher: isBuildPublicNamespaceTask);
     // validate
     LibraryElement library = outputs[LIBRARY_ELEMENT3];
     Namespace namespace = library.publicNamespace;
@@ -937,39 +1018,47 @@
 @reflectiveTest
 class BuildSourceExportClosureTaskTest extends _AbstractDartTaskTest {
   test_perform_exportClosure() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 export 'b.dart';
 ''');
-    Source sourceB = newSource('/b.dart', '''
+    Source sourceB = newSource(
+        '/b.dart',
+        '''
 library lib_b;
 export 'c.dart';
 ''');
-    Source sourceC = newSource('/c.dart', '''
+    Source sourceC = newSource(
+        '/c.dart',
+        '''
 library lib_c;
 export 'a.dart';
 ''');
-    Source sourceD = newSource('/d.dart', '''
+    Source sourceD = newSource(
+        '/d.dart',
+        '''
 library lib_d;
 ''');
     // a.dart
     {
-      computeResult(sourceA, EXPORT_SOURCE_CLOSURE);
-      expect(task, new isInstanceOf<BuildSourceExportClosureTask>());
+      computeResult(sourceA, EXPORT_SOURCE_CLOSURE,
+          matcher: isBuildSourceExportClosureTask);
       List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
       expect(closure, unorderedEquals([sourceA, sourceB, sourceC]));
     }
     // c.dart
     {
-      computeResult(sourceC, EXPORT_SOURCE_CLOSURE);
-      expect(task, new isInstanceOf<BuildSourceExportClosureTask>());
+      computeResult(sourceC, EXPORT_SOURCE_CLOSURE,
+          matcher: isBuildSourceExportClosureTask);
       List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
       expect(closure, unorderedEquals([sourceA, sourceB, sourceC]));
     }
     // d.dart
     {
-      computeResult(sourceD, EXPORT_SOURCE_CLOSURE);
-      expect(task, new isInstanceOf<BuildSourceExportClosureTask>());
+      computeResult(sourceD, EXPORT_SOURCE_CLOSURE,
+          matcher: isBuildSourceExportClosureTask);
       List<Source> closure = outputs[EXPORT_SOURCE_CLOSURE];
       expect(closure, unorderedEquals([sourceD]));
     }
@@ -979,22 +1068,28 @@
 @reflectiveTest
 class BuildSourceImportExportClosureTaskTest extends _AbstractDartTaskTest {
   test_perform_importExportClosure() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 ''');
-    Source sourceB = newSource('/b.dart', '''
+    Source sourceB = newSource(
+        '/b.dart',
+        '''
 library lib_b;
 export 'a.dart';
 ''');
-    Source sourceC = newSource('/c.dart', '''
+    Source sourceC = newSource(
+        '/c.dart',
+        '''
 library lib_c;
 import 'b.dart';
 ''');
     Source coreSource = context.sourceFactory.resolveUri(null, 'dart:core');
     // c.dart
     {
-      computeResult(sourceC, IMPORT_EXPORT_SOURCE_CLOSURE);
-      expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+      computeResult(sourceC, IMPORT_EXPORT_SOURCE_CLOSURE,
+          matcher: isBuildSourceImportExportClosureTask);
       List<Source> closure = outputs[IMPORT_EXPORT_SOURCE_CLOSURE];
       expect(closure, contains(sourceA));
       expect(closure, contains(sourceB));
@@ -1003,8 +1098,8 @@
     }
     // b.dart
     {
-      computeResult(sourceB, IMPORT_EXPORT_SOURCE_CLOSURE);
-      expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+      computeResult(sourceB, IMPORT_EXPORT_SOURCE_CLOSURE,
+          matcher: isBuildSourceImportExportClosureTask);
       List<Source> closure = outputs[IMPORT_EXPORT_SOURCE_CLOSURE];
       expect(closure, contains(sourceA));
       expect(closure, contains(sourceB));
@@ -1013,52 +1108,66 @@
   }
 
   test_perform_isClient_false() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 import 'b.dart';
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library lib_b;
 ''');
-    computeResult(sourceA, IS_CLIENT);
-    expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+    computeResult(sourceA, IS_CLIENT,
+        matcher: isBuildSourceImportExportClosureTask);
     expect(outputs[IS_CLIENT], isFalse);
   }
 
   test_perform_isClient_true_export_indirect() {
-    newSource('/exports_html.dart', '''
+    newSource(
+        '/exports_html.dart',
+        '''
 library lib_exports_html;
 export 'dart:html';
 ''');
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 import 'exports_html.dart';
 ''');
-    computeResult(source, IS_CLIENT);
-    expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+    computeResult(source, IS_CLIENT,
+        matcher: isBuildSourceImportExportClosureTask);
     expect(outputs[IS_CLIENT], isTrue);
   }
 
   test_perform_isClient_true_import_direct() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 import 'dart:html';
 ''');
-    computeResult(sourceA, IS_CLIENT);
-    expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+    computeResult(sourceA, IS_CLIENT,
+        matcher: isBuildSourceImportExportClosureTask);
     expect(outputs[IS_CLIENT], isTrue);
   }
 
   test_perform_isClient_true_import_indirect() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library lib_a;
 import 'b.dart';
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library lib_b;
 import 'dart:html';
 ''');
-    computeResult(sourceA, IS_CLIENT);
-    expect(task, new isInstanceOf<BuildSourceImportExportClosureTask>());
+    computeResult(sourceA, IS_CLIENT,
+        matcher: isBuildSourceImportExportClosureTask);
     expect(outputs[IS_CLIENT], isTrue);
   }
 }
@@ -1066,8 +1175,8 @@
 @reflectiveTest
 class BuildTypeProviderTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    computeResult(AnalysisContextTarget.request, TYPE_PROVIDER);
-    expect(task, new isInstanceOf<BuildTypeProviderTask>());
+    computeResult(AnalysisContextTarget.request, TYPE_PROVIDER,
+        matcher: isBuildTypeProviderTask);
     // validate
     TypeProvider typeProvider = outputs[TYPE_PROVIDER];
     expect(typeProvider, isNotNull);
@@ -1091,7 +1200,9 @@
   }
 
   test_annotation_with_args() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 const x = 1;
 @D(x) class C {}
 class D { const D(value); }
@@ -1103,8 +1214,10 @@
     CompilationUnit unit = outputs[RESOLVED_UNIT1];
     // Find the elements for x and D's constructor, and the annotation on C.
     List<PropertyAccessorElement> accessors = unit.element.accessors;
-    Element x = accessors.firstWhere((PropertyAccessorElement accessor) =>
-        accessor.isGetter && accessor.name == 'x').variable;
+    Element x = accessors
+        .firstWhere((PropertyAccessorElement accessor) =>
+            accessor.isGetter && accessor.name == 'x')
+        .variable;
     List<ClassElement> types = unit.element.types;
     Element constructorForD =
         types.firstWhere((ClassElement cls) => cls.name == 'D').constructors[0];
@@ -1112,14 +1225,19 @@
     // Now compute the dependencies for the annotation, and check that it is
     // the set [x, constructorForD].
     // TODO(paulberry): test librarySource != source
-    computeResult(new ConstantEvaluationTarget_Annotation(
-        context, source, source, annotation), CONSTANT_DEPENDENCIES);
+    computeResult(
+        new ConstantEvaluationTarget_Annotation(
+            context, source, source, annotation),
+        CONSTANT_DEPENDENCIES,
+        matcher: isComputeConstantDependenciesTask);
     expect(
         outputs[CONSTANT_DEPENDENCIES].toSet(), [x, constructorForD].toSet());
   }
 
   test_annotation_without_args() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 const x = 1;
 @x class C {}
 ''');
@@ -1130,18 +1248,25 @@
     CompilationUnit unit = outputs[RESOLVED_UNIT1];
     // Find the element for x and the annotation on C.
     List<PropertyAccessorElement> accessors = unit.element.accessors;
-    Element x = accessors.firstWhere((PropertyAccessorElement accessor) =>
-        accessor.isGetter && accessor.name == 'x').variable;
+    Element x = accessors
+        .firstWhere((PropertyAccessorElement accessor) =>
+            accessor.isGetter && accessor.name == 'x')
+        .variable;
     Annotation annotation = findClassAnnotation(unit, 'C');
     // Now compute the dependencies for the annotation, and check that it is
     // the list [x].
-    computeResult(new ConstantEvaluationTarget_Annotation(
-        context, source, source, annotation), CONSTANT_DEPENDENCIES);
+    computeResult(
+        new ConstantEvaluationTarget_Annotation(
+            context, source, source, annotation),
+        CONSTANT_DEPENDENCIES,
+        matcher: isComputeConstantDependenciesTask);
     expect(outputs[CONSTANT_DEPENDENCIES], [x]);
   }
 
   test_enumConstant() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 enum E {A, B, C}
 ''');
     // First compute the resolved unit for the source.
@@ -1155,12 +1280,15 @@
     FieldElement constantElement = constantDeclaration.element;
     // Now compute the dependencies for the constant and check that there are
     // none.
-    computeResult(constantElement, CONSTANT_DEPENDENCIES);
+    computeResult(constantElement, CONSTANT_DEPENDENCIES,
+        matcher: isComputeConstantDependenciesTask);
     expect(outputs[CONSTANT_DEPENDENCIES], isEmpty);
   }
 
   test_perform() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 const x = y;
 const y = 1;
 ''');
@@ -1171,12 +1299,17 @@
     CompilationUnit unit = outputs[RESOLVED_UNIT1];
     // Find the elements for the constants x and y.
     List<PropertyAccessorElement> accessors = unit.element.accessors;
-    Element x = accessors.firstWhere((PropertyAccessorElement accessor) =>
-        accessor.isGetter && accessor.name == 'x').variable;
-    Element y = accessors.firstWhere((PropertyAccessorElement accessor) =>
-        accessor.isGetter && accessor.name == 'y').variable;
+    Element x = accessors
+        .firstWhere((PropertyAccessorElement accessor) =>
+            accessor.isGetter && accessor.name == 'x')
+        .variable;
+    Element y = accessors
+        .firstWhere((PropertyAccessorElement accessor) =>
+            accessor.isGetter && accessor.name == 'y')
+        .variable;
     // Now compute the dependencies for x, and check that it is the list [y].
-    computeResult(x, CONSTANT_DEPENDENCIES);
+    computeResult(x, CONSTANT_DEPENDENCIES,
+        matcher: isComputeConstantDependenciesTask);
     expect(outputs[CONSTANT_DEPENDENCIES], [y]);
   }
 }
@@ -1192,10 +1325,11 @@
         ConstantEvaluationTarget_Annotation target =
             new ConstantEvaluationTarget_Annotation(
                 context, source, source, annotation);
-        computeResult(target, CONSTANT_VALUE);
+        computeResult(target, CONSTANT_VALUE,
+            matcher: isComputeConstantValueTask);
         expect(outputs[CONSTANT_VALUE], same(target));
-        EvaluationResultImpl evaluationResult =
-            (annotation.elementAnnotation as ElementAnnotationImpl).evaluationResult;
+        EvaluationResultImpl evaluationResult = (annotation.elementAnnotation
+            as ElementAnnotationImpl).evaluationResult;
         return evaluationResult;
       }
     }
@@ -1206,7 +1340,9 @@
   test_annotation_non_const_constructor() {
     // Calling a non-const constructor from an annotation that is illegal, but
     // shouldn't crash analysis.
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class A {
   final int i;
   A(this.i);
@@ -1226,7 +1362,9 @@
   }
 
   test_annotation_with_args() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 const x = 1;
 @D(x) class C {}
 class D {
@@ -1249,7 +1387,9 @@
   }
 
   test_annotation_without_args() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 const x = 1;
 @x class C {}
 ''');
@@ -1265,7 +1405,10 @@
   }
 
   test_circular_reference() {
-    _checkCircularities('x', ['y'], '''
+    _checkCircularities(
+        'x',
+        ['y'],
+        '''
 const x = y + 1;
 const y = x + 1;
 ''');
@@ -1279,7 +1422,10 @@
   test_circular_reference_strongly_connected_component() {
     // When there is a circularity, all elements in the strongly connected
     // component should be marked as having an error.
-    _checkCircularities('a', ['b', 'c', 'd'], '''
+    _checkCircularities(
+        'a',
+        ['b', 'c', 'd'],
+        '''
 const a = b;
 const b = c + d;
 const c = a;
@@ -1292,7 +1438,8 @@
     // constructor for Base is non-const), but we need to handle it without
     // throwing an exception.
     EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
-        'x', '''
+        'x',
+        '''
 class Base {}
 class Derived extends Base {
   const Derived();
@@ -1304,7 +1451,8 @@
 
   test_dependency() {
     EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
-        'x', '''
+        'x',
+        '''
 const x = y + 1;
 const y = 1;
 ''');
@@ -1315,7 +1463,8 @@
 
   test_external_const_factory() {
     EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
-        'x', '''
+        'x',
+        '''
 const x = const C.foo();
 
 class C extends B {
@@ -1329,7 +1478,8 @@
 
   test_simple_constant() {
     EvaluationResultImpl evaluationResult = _computeTopLevelVariableConstValue(
-        'x', '''
+        'x',
+        '''
 const x = 1;
 ''');
     expect(evaluationResult, isNotNull);
@@ -1347,8 +1497,8 @@
     for (String otherVariableName in otherVariables) {
       PropertyInducingElement otherVariableElement =
           _findVariable(unit, otherVariableName);
-      _expectCircularityError(
-          (otherVariableElement as TopLevelVariableElementImpl).evaluationResult);
+      _expectCircularityError((otherVariableElement
+          as TopLevelVariableElementImpl).evaluationResult);
     }
   }
 
@@ -1362,7 +1512,8 @@
     // Find the element for the given constant.
     PropertyInducingElement variableElement = _findVariable(unit, variableName);
     // Now compute the value of the constant.
-    computeResult(variableElement, CONSTANT_VALUE);
+    computeResult(variableElement, CONSTANT_VALUE,
+        matcher: isComputeConstantValueTask);
     expect(outputs[CONSTANT_VALUE], same(variableElement));
     EvaluationResultImpl evaluationResult =
         (variableElement as TopLevelVariableElementImpl).evaluationResult;
@@ -1397,6 +1548,31 @@
 }
 
 @reflectiveTest
+class ComputeInferableStaticVariableDependenciesTaskTest
+    extends _AbstractDartTaskTest {
+  test_perform() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+const a = b;
+const b = 0;
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    TopLevelVariableElement elementA = unit.element.topLevelVariables[0];
+    TopLevelVariableElement elementB = unit.element.topLevelVariables[1];
+
+    computeResult(elementA, INFERABLE_STATIC_VARIABLE_DEPENDENCIES,
+        matcher: isComputeInferableStaticVariableDependenciesTask);
+    expect(outputs, hasLength(1));
+    List<VariableElement> dependencies =
+        outputs[INFERABLE_STATIC_VARIABLE_DEPENDENCIES];
+    expect(dependencies, unorderedEquals([elementB]));
+  }
+}
+
+@reflectiveTest
 class ContainingLibrariesTaskTest extends _AbstractDartTaskTest {
   test_buildInputs() {
     Map<String, TaskInput> inputs =
@@ -1435,8 +1611,8 @@
   test_perform_definingCompilationUnit() {
     AnalysisTarget library = newSource('/test.dart', 'library test;');
     computeResult(library, INCLUDED_PARTS);
-    computeResult(library, CONTAINING_LIBRARIES);
-    expect(task, new isInstanceOf<ContainingLibrariesTask>());
+    computeResult(library, CONTAINING_LIBRARIES,
+        matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
     List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
     expect(containingLibraries, unorderedEquals([library]));
@@ -1451,8 +1627,8 @@
     computeResult(library1, INCLUDED_PARTS);
     computeResult(library2, INCLUDED_PARTS);
     computeResult(part, SOURCE_KIND);
-    computeResult(part, CONTAINING_LIBRARIES);
-    expect(task, new isInstanceOf<ContainingLibrariesTask>());
+    computeResult(part, CONTAINING_LIBRARIES,
+        matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
     List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
     expect(containingLibraries, unorderedEquals([library1, library2]));
@@ -1464,8 +1640,8 @@
     AnalysisTarget part = newSource('/part.dart', 'part of test;');
     computeResult(library, INCLUDED_PARTS);
     computeResult(part, SOURCE_KIND);
-    computeResult(part, CONTAINING_LIBRARIES);
-    expect(task, new isInstanceOf<ContainingLibrariesTask>());
+    computeResult(part, CONTAINING_LIBRARIES,
+        matcher: isContainingLibrariesTask);
     expect(outputs, hasLength(1));
     List<Source> containingLibraries = outputs[CONTAINING_LIBRARIES];
     expect(containingLibraries, unorderedEquals([library]));
@@ -1477,13 +1653,15 @@
   test_buildInputs() {
     Map<String, TaskInput> inputs = DartErrorsTask.buildInputs(emptySource);
     expect(inputs, isNotNull);
-    expect(inputs.keys, unorderedEquals([
-      DartErrorsTask.BUILD_DIRECTIVES_ERRORS_INPUT,
-      DartErrorsTask.BUILD_LIBRARY_ERRORS_INPUT,
-      DartErrorsTask.PARSE_ERRORS_INPUT,
-      DartErrorsTask.SCAN_ERRORS_INPUT,
-      DartErrorsTask.LIBRARY_UNIT_ERRORS_INPUT
-    ]));
+    expect(
+        inputs.keys,
+        unorderedEquals([
+          DartErrorsTask.BUILD_DIRECTIVES_ERRORS_INPUT,
+          DartErrorsTask.BUILD_LIBRARY_ERRORS_INPUT,
+          DartErrorsTask.PARSE_ERRORS_INPUT,
+          DartErrorsTask.SCAN_ERRORS_INPUT,
+          DartErrorsTask.LIBRARY_UNIT_ERRORS_INPUT
+        ]));
   }
 
   test_constructor() {
@@ -1514,8 +1692,7 @@
     AnalysisTarget library =
         newSource('/test.dart', 'library test; import "dart:math";');
     computeResult(library, INCLUDED_PARTS);
-    computeResult(library, DART_ERRORS);
-    expect(task, new isInstanceOf<DartErrorsTask>());
+    computeResult(library, DART_ERRORS, matcher: isDartErrorsTask);
     expect(outputs, hasLength(1));
     List<AnalysisError> errors = outputs[DART_ERRORS];
     expect(errors, hasLength(1));
@@ -1528,8 +1705,7 @@
         newSource('/part.dart', 'part of test; class A extends A {}');
     computeResult(library, INCLUDED_PARTS);
     computeResult(library, DART_ERRORS);
-    computeResult(part, DART_ERRORS);
-    expect(task, new isInstanceOf<DartErrorsTask>());
+    computeResult(part, DART_ERRORS, matcher: isDartErrorsTask);
     expect(outputs, hasLength(1));
     List<AnalysisError> errors = outputs[DART_ERRORS];
     // This should contain only the errors in the part file, not the ones in the
@@ -1541,7 +1717,9 @@
 @reflectiveTest
 class EvaluateUnitConstantsTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class C {
   const C();
 }
@@ -1552,16 +1730,21 @@
 const x = const C();
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT);
-    expect(task, new isInstanceOf<EvaluateUnitConstantsTask>());
+    computeResult(target, RESOLVED_UNIT, matcher: isEvaluateUnitConstantsTask);
     CompilationUnit unit = outputs[RESOLVED_UNIT];
     CompilationUnitElement unitElement = unit.element;
-    expect((unitElement.types[0].constructors[
-        0] as ConstructorElementImpl).isCycleFree, isTrue);
-    expect((unitElement.functions[0].metadata[
-        0] as ElementAnnotationImpl).evaluationResult, isNotNull);
-    expect((unitElement.topLevelVariables[
-        0] as TopLevelVariableElementImpl).evaluationResult, isNotNull);
+    expect(
+        (unitElement.types[0].constructors[0] as ConstructorElementImpl)
+            .isCycleFree,
+        isTrue);
+    expect(
+        (unitElement.functions[0].metadata[0] as ElementAnnotationImpl)
+            .evaluationResult,
+        isNotNull);
+    expect(
+        (unitElement.topLevelVariables[0] as TopLevelVariableElementImpl)
+            .evaluationResult,
+        isNotNull);
   }
 }
 
@@ -1571,15 +1754,21 @@
   Set<String> usedElementNames;
 
   test_perform() {
-    newSource('/a.dart', r'''
+    newSource(
+        '/a.dart',
+        r'''
 library lib_a;
 class A {}
 ''');
-    newSource('/b.dart', r'''
+    newSource(
+        '/b.dart',
+        r'''
 library lib_b;
 class B {}
 ''');
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 import 'a.dart';
 import 'b.dart';
 main() {
@@ -1592,8 +1781,8 @@
 
   void _computeUsedElements(Source source) {
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, USED_IMPORTED_ELEMENTS);
-    expect(task, new isInstanceOf<GatherUsedImportedElementsTask>());
+    computeResult(target, USED_IMPORTED_ELEMENTS,
+        matcher: isGatherUsedImportedElementsTask);
     usedElements = outputs[USED_IMPORTED_ELEMENTS];
     usedElementNames = usedElements.elements.map((e) => e.name).toSet();
   }
@@ -1605,7 +1794,9 @@
   Set<String> usedElementNames;
 
   test_perform_localVariable() {
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 main() {
   var v1 = 1;
   var v2 = 2;
@@ -1617,7 +1808,9 @@
   }
 
   test_perform_method() {
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 class A {
   _m1() {}
   _m2() {}
@@ -1636,8 +1829,8 @@
 
   void _computeUsedElements(Source source) {
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, USED_LOCAL_ELEMENTS);
-    expect(task, new isInstanceOf<GatherUsedLocalElementsTask>());
+    computeResult(target, USED_LOCAL_ELEMENTS,
+        matcher: isGatherUsedLocalElementsTask);
     usedElements = outputs[USED_LOCAL_ELEMENTS];
     usedElementNames = usedElements.elements.map((e) => e.name).toSet();
   }
@@ -1646,20 +1839,26 @@
 @reflectiveTest
 class GenerateHintsTaskTest extends _AbstractDartTaskTest {
   test_perform_bestPractices_missingReturn() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 int main() {
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.MISSING_RETURN]);
   }
 
   test_perform_dart2js() {
-    Source source = newSource('/test.dart', '''
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.dart2jsHint = true;
+    prepareAnalysisContext(options);
+    Source source = newSource(
+        '/test.dart',
+        '''
 main(p) {
   if (p is double) {
     print('double');
@@ -1667,15 +1866,16 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.IS_DOUBLE]);
   }
 
   test_perform_deadCode() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
   if (false) {
     print('how?');
@@ -1683,8 +1883,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.DEAD_CODE]);
@@ -1693,24 +1892,29 @@
   test_perform_disabled() {
     context.analysisOptions =
         new AnalysisOptionsImpl.from(context.analysisOptions)..hint = false;
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 int main() {
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertNoErrors();
   }
 
   test_perform_imports_duplicateImport() {
-    newSource('/a.dart', r'''
+    newSource(
+        '/a.dart',
+        r'''
 library lib_a;
 class A {}
 ''');
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 import 'a.dart';
 import 'a.dart';
 main() {
@@ -1718,56 +1922,65 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.DUPLICATE_IMPORT]);
   }
 
   test_perform_imports_unusedImport_one() {
-    newSource('/a.dart', r'''
+    newSource(
+        '/a.dart',
+        r'''
 library lib_a;
 class A {}
 ''');
-    newSource('/b.dart', r'''
+    newSource(
+        '/b.dart',
+        r'''
 library lib_b;
 class B {}
 ''');
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 import 'a.dart';
 import 'b.dart';
 main() {
   new A();
 }''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.UNUSED_IMPORT]);
   }
 
   test_perform_imports_unusedImport_zero() {
-    newSource('/a.dart', r'''
+    newSource(
+        '/a.dart',
+        r'''
 library lib_a;
 class A {}
 ''');
-    Source source = newSource('/test.dart', r'''
+    Source source = newSource(
+        '/test.dart',
+        r'''
 import 'a.dart';
 main() {
   new A();
 }''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertNoErrors();
   }
 
   test_perform_overrideVerifier() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class A {}
 class B {
   @override
@@ -1775,8 +1988,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(
@@ -1784,21 +1996,24 @@
   }
 
   test_perform_todo() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
   // TODO(developer) foo bar
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[TodoCode.TODO]);
   }
 
   test_perform_unusedLocalElements_class() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class _A {}
 class _B {}
 main() {
@@ -1806,22 +2021,22 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[HintCode.UNUSED_ELEMENT]);
   }
 
   test_perform_unusedLocalElements_localVariable() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
   var v = 42;
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener
@@ -1829,7 +2044,9 @@
   }
 
   test_perform_unusedLocalElements_method() {
-    Source source = newSource('/my_lib.dart', '''
+    Source source = newSource(
+        '/my_lib.dart',
+        '''
 library my_lib;
 part 'my_part.dart';
 class A {
@@ -1838,7 +2055,9 @@
   _mc() {}
 }
 ''');
-    newSource('/my_part.dart', '''
+    newSource(
+        '/my_part.dart',
+        '''
 part of my_lib;
 
 f(A a) {
@@ -1846,8 +2065,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, HINTS);
-    expect(task, new isInstanceOf<GenerateHintsTask>());
+    computeResult(target, HINTS, matcher: isGenerateHintsTask);
     // validate
     _fillErrorListener(HINTS);
     errorListener.assertErrorsWithCodes(
@@ -1856,24 +2074,201 @@
 }
 
 @reflectiveTest
+class InferInstanceMembersInUnitTaskTest extends _AbstractDartTaskTest {
+  void test_perform() {
+    enableStrongMode();
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+class A {
+  X f;
+  Y m(Z x) {}
+}
+class B extends A {
+  var f;
+  m(x) {}
+}
+class X {}
+class Y {}
+class Z {}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT7,
+        matcher: isInferInstanceMembersInUnitTask);
+    CompilationUnit unit = outputs[RESOLVED_UNIT7];
+    VariableDeclaration field = getFieldInClass(unit, 'B', 'f');
+    MethodDeclaration method = getMethodInClass(unit, 'B', 'm');
+    DartType typeX = getClass(unit, 'X').element.type;
+    DartType typeY = getClass(unit, 'Y').element.type;
+    DartType typeZ = getClass(unit, 'Z').element.type;
+
+    expect(field.element.type, typeX);
+    expect(method.element.returnType, typeY);
+    expect(method.element.parameters[0].type, typeZ);
+  }
+}
+
+@reflectiveTest
+class InferStaticVariableTypesInUnitTaskTest extends _AbstractDartTaskTest {
+  void test_perform() {
+    enableStrongMode();
+    AnalysisTarget firstSource = newSource(
+        '/first.dart',
+        '''
+import 'second.dart';
+
+var a = new M();
+var c = b;
+''');
+    AnalysisTarget secondSource = newSource(
+        '/second.dart',
+        '''
+import 'first.dart';
+
+var b = a;
+class M {}
+''');
+    computeResult(
+        new LibrarySpecificUnit(firstSource, firstSource), RESOLVED_UNIT6,
+        matcher: isInferStaticVariableTypesInUnitTask);
+    CompilationUnit firstUnit = outputs[RESOLVED_UNIT6];
+    computeResult(
+        new LibrarySpecificUnit(secondSource, secondSource), RESOLVED_UNIT6);
+    CompilationUnit secondUnit = outputs[RESOLVED_UNIT6];
+
+    VariableDeclaration variableA = getTopLevelVariable(firstUnit, 'a');
+    VariableDeclaration variableB = getTopLevelVariable(secondUnit, 'b');
+    VariableDeclaration variableC = getTopLevelVariable(firstUnit, 'c');
+    ClassDeclaration classM = getClass(secondUnit, 'M');
+    DartType typeM = classM.element.type;
+
+    expect(variableA.element.type, typeM);
+    expect(variableB.element.type, typeM);
+    expect(variableB.initializer.staticType, typeM);
+    expect(variableC.element.type, typeM);
+    expect(variableC.initializer.staticType, typeM);
+  }
+}
+
+@reflectiveTest
+class InferStaticVariableTypeTaskTest extends _AbstractDartTaskTest {
+  void test_getDeclaration_staticField() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+class C {
+  var field = '';
+}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    VariableDeclaration declaration = getFieldInClass(unit, 'C', 'field');
+    VariableElement variable = declaration.name.staticElement;
+    InferStaticVariableTypeTask inferTask =
+        new InferStaticVariableTypeTask(task.context, variable);
+    expect(inferTask.getDeclaration(unit), declaration);
+  }
+
+  void test_getDeclaration_topLevel() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+var topLevel = '';
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    VariableDeclaration declaration = getTopLevelVariable(unit, 'topLevel');
+    VariableElement variable = declaration.name.staticElement;
+    InferStaticVariableTypeTask inferTask =
+        new InferStaticVariableTypeTask(task.context, variable);
+    expect(inferTask.getDeclaration(unit), declaration);
+  }
+
+  void test_perform() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+var topLevel = '';
+class C {
+  var field = topLevel;
+}
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    VariableElement topLevel =
+        getTopLevelVariable(unit, 'topLevel').name.staticElement;
+    VariableElement field =
+        getFieldInClass(unit, 'C', 'field').name.staticElement;
+
+    computeResult(field, INFERRED_STATIC_VARIABLE,
+        matcher: isInferStaticVariableTypeTask);
+    InterfaceType stringType = context.typeProvider.stringType;
+    expect(topLevel.type, stringType);
+    expect(field.type, stringType);
+  }
+
+  void test_perform_cycle() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+var piFirst = true;
+var pi = piFirst ? 3.14 : tau / 2;
+var tau = piFirst ? pi * 2 : 6.28;
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    VariableElement piFirst =
+        getTopLevelVariable(unit, 'piFirst').name.staticElement;
+    VariableElement pi = getTopLevelVariable(unit, 'pi').name.staticElement;
+    VariableElement tau = getTopLevelVariable(unit, 'tau').name.staticElement;
+
+    computeResult(piFirst, INFERRED_STATIC_VARIABLE,
+        matcher: isInferStaticVariableTypeTask);
+    expect(piFirst.type, context.typeProvider.boolType);
+    expect(pi.type.isDynamic, isTrue);
+    expect(tau.type.isDynamic, isTrue);
+  }
+
+  void test_perform_null() {
+    AnalysisTarget source = newSource(
+        '/test.dart',
+        '''
+var a = null;
+''');
+    computeResult(new LibrarySpecificUnit(source, source), RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    VariableElement a = getTopLevelVariable(unit, 'a').name.staticElement;
+
+    computeResult(a, INFERRED_STATIC_VARIABLE,
+        matcher: isInferStaticVariableTypeTask);
+    expect(a.type.isDynamic, isTrue);
+  }
+}
+
+@reflectiveTest
 class LibraryErrorsReadyTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source library = newSource('/lib.dart', r'''
+    Source library = newSource(
+        '/lib.dart',
+        r'''
 library lib;
 part 'part1.dart';
 part 'part2.dart';
 X v1;
 ''');
-    Source part1 = newSource('/part1.dart', r'''
+    Source part1 = newSource(
+        '/part1.dart',
+        r'''
 part of lib;
 X v2;
 ''');
-    Source part2 = newSource('/part2.dart', r'''
+    Source part2 = newSource(
+        '/part2.dart',
+        r'''
 part of lib;
 X v3;
 ''');
-    computeResult(library, LIBRARY_ERRORS_READY);
-    expect(task, new isInstanceOf<LibraryErrorsReadyTask>());
+    computeResult(library, LIBRARY_ERRORS_READY,
+        matcher: isLibraryErrorsReadyTask);
     expect(outputs, hasLength(1));
     bool ready = outputs[LIBRARY_ERRORS_READY];
     expect(ready, isTrue);
@@ -1889,13 +2284,15 @@
     Map<String, TaskInput> inputs = LibraryUnitErrorsTask
         .buildInputs(new LibrarySpecificUnit(emptySource, emptySource));
     expect(inputs, isNotNull);
-    expect(inputs.keys, unorderedEquals([
-      LibraryUnitErrorsTask.HINTS_INPUT,
-      LibraryUnitErrorsTask.RESOLVE_REFERENCES_ERRORS_INPUT,
-      LibraryUnitErrorsTask.RESOLVE_TYPE_NAMES_ERRORS_INPUT,
-      LibraryUnitErrorsTask.VARIABLE_REFERENCE_ERRORS_INPUT,
-      LibraryUnitErrorsTask.VERIFY_ERRORS_INPUT
-    ]));
+    expect(
+        inputs.keys,
+        unorderedEquals([
+          LibraryUnitErrorsTask.HINTS_INPUT,
+          LibraryUnitErrorsTask.RESOLVE_REFERENCES_ERRORS_INPUT,
+          LibraryUnitErrorsTask.RESOLVE_TYPE_NAMES_ERRORS_INPUT,
+          LibraryUnitErrorsTask.VARIABLE_REFERENCE_ERRORS_INPUT,
+          LibraryUnitErrorsTask.VERIFY_ERRORS_INPUT
+        ]));
   }
 
   test_constructor() {
@@ -1928,8 +2325,8 @@
     AnalysisTarget library =
         newSource('/test.dart', 'library test; import "dart:math";');
     computeResult(
-        new LibrarySpecificUnit(library, library), LIBRARY_UNIT_ERRORS);
-    expect(task, new isInstanceOf<LibraryUnitErrorsTask>());
+        new LibrarySpecificUnit(library, library), LIBRARY_UNIT_ERRORS,
+        matcher: isLibraryUnitErrorsTask);
     expect(outputs, hasLength(1));
     List<AnalysisError> errors = outputs[LIBRARY_UNIT_ERRORS];
     expect(errors, hasLength(1));
@@ -1939,8 +2336,8 @@
     AnalysisTarget library =
         newSource('/lib.dart', 'library test; part "part.dart";');
     AnalysisTarget part = newSource('/part.dart', 'part of test;');
-    computeResult(new LibrarySpecificUnit(library, part), LIBRARY_UNIT_ERRORS);
-    expect(task, new isInstanceOf<LibraryUnitErrorsTask>());
+    computeResult(new LibrarySpecificUnit(library, part), LIBRARY_UNIT_ERRORS,
+        matcher: isLibraryUnitErrorsTask);
     expect(outputs, hasLength(1));
     List<AnalysisError> errors = outputs[LIBRARY_UNIT_ERRORS];
     expect(errors, hasLength(0));
@@ -1954,11 +2351,13 @@
   test_buildInputs() {
     Map<String, TaskInput> inputs = ParseDartTask.buildInputs(emptySource);
     expect(inputs, isNotNull);
-    expect(inputs.keys, unorderedEquals([
-      ParseDartTask.LINE_INFO_INPUT_NAME,
-      ParseDartTask.MODIFICATION_TIME_INPUT_NAME,
-      ParseDartTask.TOKEN_STREAM_INPUT_NAME
-    ]));
+    expect(
+        inputs.keys,
+        unorderedEquals([
+          ParseDartTask.LINE_INFO_INPUT_NAME,
+          ParseDartTask.MODIFICATION_TIME_INPUT_NAME,
+          ParseDartTask.TOKEN_STREAM_INPUT_NAME
+        ]));
   }
 
   test_constructor() {
@@ -2002,10 +2401,14 @@
 
   test_perform_computeSourceKind_noDirectives_hasContainingLibrary() {
     // Parse "lib.dart" to let the context know that "test.dart" is included.
-    computeResult(newSource('/lib.dart', r'''
+    computeResult(
+        newSource(
+            '/lib.dart',
+            r'''
 library lib;
 part 'test.dart';
-'''), PARSED_UNIT);
+'''),
+        PARSED_UNIT);
     // If there are no the "part of" directive, then it is not a part.
     _performParseTask('');
     expect(outputs[SOURCE_KIND], SourceKind.LIBRARY);
@@ -2091,8 +2494,7 @@
 
   void _performParseTask(String content) {
     source = newSource('/test.dart', content);
-    computeResult(source, PARSED_UNIT);
-    expect(task, new isInstanceOf<ParseDartTask>());
+    computeResult(source, PARSED_UNIT, matcher: isParseDartTask);
   }
 
   static void _assertHasCore(List<Source> sources, int lenght) {
@@ -2104,20 +2506,103 @@
 }
 
 @reflectiveTest
+class PartiallyResolveUnitReferencesTaskTest extends _AbstractDartTaskTest {
+  test_perform() {
+    enableStrongMode();
+    Source source = newSource(
+        '/test.dart',
+        '''
+int a = b;
+int b = c;
+var d = 0;
+class A {}
+class C {
+  static final f = '';
+  var g = 0;
+}
+''');
+    LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
+    computeResult(target, RESOLVED_UNIT5,
+        matcher: isPartiallyResolveUnitReferencesTask);
+    // Test the outputs
+    expect(outputs[CLASSES_IN_UNIT], hasLength(2));
+    expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(2));
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    expect(unit, same(outputs[RESOLVED_UNIT5]));
+    // Test the state of the AST
+    TopLevelVariableDeclaration a = unit.declarations[0];
+    VariableDeclaration variableA = a.variables.variables[0];
+    SimpleIdentifier initializer = variableA.initializer;
+    expect(initializer.staticElement, isNotNull);
+    // Test the error generation
+    _fillErrorListener(PARTIALLY_RESOLVE_REFERENCES_ERRORS);
+    errorListener.assertErrorsWithCodes(
+        <ErrorCode>[StaticWarningCode.UNDEFINED_IDENTIFIER]);
+  }
+
+  test_perform_importExport() {
+    newSource(
+        '/a.dart',
+        '''
+library a;
+class A<T> {
+  T m() {}
+}
+''');
+    newSource(
+        '/b.dart',
+        '''
+library b;
+export 'a.dart';
+''');
+    Source sourceC = newSource(
+        '/c.dart',
+        '''
+library c;
+import 'b.dart';
+main() {
+  new A<int>().m();
+}
+''');
+    computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT5,
+        matcher: isPartiallyResolveUnitReferencesTask);
+    // validate
+    expect(outputs[CLASSES_IN_UNIT], hasLength(0));
+    expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(0));
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    expect(unit, isNotNull);
+
+    FunctionDeclaration functionDeclaration = unit.declarations[0];
+    BlockFunctionBody body = functionDeclaration.functionExpression.body;
+    List<Statement> statements = body.block.statements;
+    ExpressionStatement statement = statements[0];
+    MethodInvocation invocation = statement.expression;
+    MethodElement methodElement = invocation.methodName.staticElement;
+    expect(methodElement, isNotNull);
+    expect(methodElement.type, isNotNull);
+    expect(methodElement.returnType.toString(), 'int');
+  }
+}
+
+@reflectiveTest
 class ResolveLibraryTypeNamesTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source sourceLib = newSource('/my_lib.dart', '''
+    Source sourceLib = newSource(
+        '/my_lib.dart',
+        '''
 library my_lib;
 part 'my_part.dart';
 class A {}
 class B extends A {}
 ''');
-    newSource('/my_part.dart', '''
+    newSource(
+        '/my_part.dart',
+        '''
 part of my_lib;
 class C extends A {}
 ''');
-    computeResult(sourceLib, LIBRARY_ELEMENT5);
-    expect(task, new isInstanceOf<ResolveLibraryTypeNamesTask>());
+    computeResult(sourceLib, LIBRARY_ELEMENT5,
+        matcher: isResolveLibraryTypeNamesTask);
     // validate
     LibraryElement library = outputs[LIBRARY_ELEMENT5];
     {
@@ -2131,19 +2616,23 @@
   }
 
   test_perform_external() {
-    Source sourceA = newSource('/a.dart', '''
+    Source sourceA = newSource(
+        '/a.dart',
+        '''
 library a;
 import 'b.dart';
 class A extends B {}
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library b;
 class B {}
 ''');
     // The reference A to B should be resolved, but there's no requirement that
     // the full class hierarchy be resolved.
-    computeResult(sourceA, LIBRARY_ELEMENT5);
-    expect(task, new isInstanceOf<ResolveLibraryTypeNamesTask>());
+    computeResult(sourceA, LIBRARY_ELEMENT5,
+        matcher: isResolveLibraryTypeNamesTask);
     // validate
     LibraryElement library = outputs[LIBRARY_ELEMENT5];
     {
@@ -2156,9 +2645,11 @@
 }
 
 @reflectiveTest
-class ResolveReferencesTaskTest extends _AbstractDartTaskTest {
+class ResolveUnitReferencesTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class A {
   m() {}
 }
@@ -2168,21 +2659,22 @@
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
     // prepare unit and "a.m()" invocation
-    computeResult(target, RESOLVED_UNIT5);
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    computeResult(target, RESOLVED_UNIT8, matcher: isResolveUnitReferencesTask);
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     // walk the AST
     FunctionDeclaration function = unit.declarations[1];
     BlockFunctionBody body = function.functionExpression.body;
     ExpressionStatement statement = body.block.statements[0];
     MethodInvocation invocation = statement.expression;
-    expect(task, new isInstanceOf<ResolveUnitReferencesTask>());
-    expect(unit, same(outputs[RESOLVED_UNIT5]));
+    expect(unit, same(outputs[RESOLVED_UNIT8]));
     // a.m() is resolved now
     expect(invocation.methodName.staticElement, isNotNull);
   }
 
   test_perform_errors() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class A {
 }
 main(A a) {
@@ -2190,8 +2682,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT5);
-    expect(task, new isInstanceOf<ResolveUnitReferencesTask>());
+    computeResult(target, RESOLVED_UNIT8, matcher: isResolveUnitReferencesTask);
     // validate
     _fillErrorListener(RESOLVE_REFERENCES_ERRORS);
     errorListener.assertErrorsWithCodes(
@@ -2199,53 +2690,58 @@
   }
 
   test_perform_importExport() {
-    newSource('/a.dart', '''
+    newSource(
+        '/a.dart',
+        '''
 library a;
 class A<T> {
   T m() {}
 }
 ''');
-    newSource('/b.dart', '''
+    newSource(
+        '/b.dart',
+        '''
 library b;
 export 'a.dart';
 ''');
-    Source sourceC = newSource('/c.dart', '''
+    Source sourceC = newSource(
+        '/c.dart',
+        '''
 library c;
 import 'b.dart';
 main() {
   new A<int>().m();
 }
 ''');
-    computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT5);
-    expect(task, new isInstanceOf<ResolveUnitReferencesTask>());
+    computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT8,
+        matcher: isResolveUnitReferencesTask);
     // validate
-    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    CompilationUnit unit = outputs[RESOLVED_UNIT8];
     expect(unit, isNotNull);
-    {
-      FunctionDeclaration functionDeclaration = unit.declarations[0];
-      BlockFunctionBody body = functionDeclaration.functionExpression.body;
-      List<Statement> statements = body.block.statements;
-      ExpressionStatement statement = statements[0];
-      MethodInvocation invocation = statement.expression;
-      MethodElement methodElement = invocation.methodName.staticElement;
-      expect(methodElement, isNotNull);
-      expect(methodElement.type, isNotNull);
-      expect(methodElement.returnType.toString(), 'int');
-    }
+    FunctionDeclaration functionDeclaration = unit.declarations[0];
+    BlockFunctionBody body = functionDeclaration.functionExpression.body;
+    List<Statement> statements = body.block.statements;
+    ExpressionStatement statement = statements[0];
+    MethodInvocation invocation = statement.expression;
+    MethodElement methodElement = invocation.methodName.staticElement;
+    expect(methodElement, isNotNull);
+    expect(methodElement.type, isNotNull);
+    expect(methodElement.returnType.toString(), 'int');
   }
 }
 
 @reflectiveTest
 class ResolveUnitTypeNamesTaskTest extends _AbstractDartTaskTest {
   test_perform() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 class A {}
 class B extends A {}
 int f(String p) => p.length;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT3);
-    expect(task, new isInstanceOf<ResolveUnitTypeNamesTask>());
+    computeResult(target, RESOLVED_UNIT3, matcher: isResolveUnitTypeNamesTask);
     // validate
     CompilationUnit unit = outputs[RESOLVED_UNIT3];
     {
@@ -2265,12 +2761,14 @@
   }
 
   test_perform_errors() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 NoSuchClass f() => null;
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVE_TYPE_NAMES_ERRORS);
-    expect(task, new isInstanceOf<ResolveUnitTypeNamesTask>());
+    computeResult(target, RESOLVE_TYPE_NAMES_ERRORS,
+        matcher: isResolveUnitTypeNamesTask);
     // validate
     _fillErrorListener(RESOLVE_TYPE_NAMES_ERRORS);
     errorListener
@@ -2278,13 +2776,14 @@
   }
 
   test_perform_typedef() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 typedef int F(G g);
 typedef String G(int p);
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT3);
-    expect(task, new isInstanceOf<ResolveUnitTypeNamesTask>());
+    computeResult(target, RESOLVED_UNIT3, matcher: isResolveUnitTypeNamesTask);
     // validate
     CompilationUnit unit = outputs[RESOLVED_UNIT3];
     FunctionTypeAlias nodeF = unit.declarations[0];
@@ -2305,12 +2804,14 @@
   }
 
   test_perform_typedef_errors() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 typedef int F(NoSuchType p);
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVE_TYPE_NAMES_ERRORS);
-    expect(task, new isInstanceOf<ResolveUnitTypeNamesTask>());
+    computeResult(target, RESOLVE_TYPE_NAMES_ERRORS,
+        matcher: isResolveUnitTypeNamesTask);
     // validate
     _fillErrorListener(RESOLVE_TYPE_NAMES_ERRORS);
     errorListener
@@ -2331,17 +2832,21 @@
   }
 
   test_perform_buildClosureLibraryElements() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4);
-    expect(task, new isInstanceOf<ResolveVariableReferencesTask>());
+    computeResult(target, RESOLVED_UNIT4,
+        matcher: isResolveVariableReferencesTask);
   }
 
   test_perform_local() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
   var v1 = 1;
   var v2 = 1;
@@ -2356,8 +2861,8 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4);
-    expect(task, new isInstanceOf<ResolveVariableReferencesTask>());
+    computeResult(target, RESOLVED_UNIT4,
+        matcher: isResolveVariableReferencesTask);
     // validate
     CompilationUnit unit = outputs[RESOLVED_UNIT4];
     FunctionElement main = unit.element.functions[0];
@@ -2368,7 +2873,9 @@
   }
 
   test_perform_parameter() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main(p1, p2, p3, p4) {
   p2 = 2;
   p4 = 2;
@@ -2379,8 +2886,8 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, RESOLVED_UNIT4);
-    expect(task, new isInstanceOf<ResolveVariableReferencesTask>());
+    computeResult(target, RESOLVED_UNIT4,
+        matcher: isResolveVariableReferencesTask);
     // validate
     CompilationUnit unit = outputs[RESOLVED_UNIT4];
     FunctionElement main = unit.element.functions[0];
@@ -2457,8 +2964,7 @@
     DartScript script =
         new DartScript(source, [new ScriptFragment(97, 5, 36, scriptContent)]);
 
-    computeResult(script, TOKEN_STREAM);
-    expect(task, new isInstanceOf<ScanDartTask>());
+    computeResult(script, TOKEN_STREAM, matcher: isScanDartTask);
     expect(outputs[LINE_INFO], isNotNull);
     expect(outputs[SCAN_ERRORS], isEmpty);
     Token tokenStream = outputs[TOKEN_STREAM];
@@ -2468,22 +2974,22 @@
 
   void _performScanTask(String content) {
     AnalysisTarget target = newSource('/test.dart', content);
-    computeResult(target, TOKEN_STREAM);
-    expect(task, new isInstanceOf<ScanDartTask>());
+    computeResult(target, TOKEN_STREAM, matcher: isScanDartTask);
   }
 }
 
 @reflectiveTest
 class VerifyUnitTaskTest extends _AbstractDartTaskTest {
   test_perform_constantError() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main(int p) {
   const v = p;
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, VERIFY_ERRORS);
-    expect(task, new isInstanceOf<VerifyUnitTask>());
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
     // validate
     _fillErrorListener(VERIFY_ERRORS);
     errorListener.assertErrorsWithCodes(<ErrorCode>[
@@ -2492,12 +2998,13 @@
   }
 
   test_perform_directiveError() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 import 'no-such-file.dart';
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, VERIFY_ERRORS);
-    expect(task, new isInstanceOf<VerifyUnitTask>());
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
     // validate
     _fillErrorListener(VERIFY_ERRORS);
     errorListener.assertErrorsWithCodes(
@@ -2505,7 +3012,9 @@
   }
 
   test_perform_verifyError() {
-    Source source = newSource('/test.dart', '''
+    Source source = newSource(
+        '/test.dart',
+        '''
 main() {
   if (42) {
     print('Not bool!');
@@ -2513,8 +3022,7 @@
 }
 ''');
     LibrarySpecificUnit target = new LibrarySpecificUnit(source, source);
-    computeResult(target, VERIFY_ERRORS);
-    expect(task, new isInstanceOf<VerifyUnitTask>());
+    computeResult(target, VERIFY_ERRORS, matcher: isVerifyUnitTask);
     // validate
     _fillErrorListener(VERIFY_ERRORS);
     errorListener.assertErrorsWithCodes(
@@ -2565,6 +3073,92 @@
         source, [new ScriptFragment(97, 5, 36, scriptContent)]);
   }
 
+  /**
+   * Enable strong mode in the current analysis context.
+   */
+  void enableStrongMode() {
+    AnalysisOptionsImpl options = context.analysisOptions;
+    options.strongMode = true;
+    context.analysisOptions = options;
+  }
+
+  /**
+   * Return the declaration of the class with the given [className] in the given
+   * compilation [unit].
+   */
+  ClassDeclaration getClass(CompilationUnit unit, String className) {
+    NodeList<CompilationUnitMember> unitMembers = unit.declarations;
+    for (CompilationUnitMember unitMember in unitMembers) {
+      if (unitMember is ClassDeclaration && unitMember.name.name == className) {
+        return unitMember;
+      }
+    }
+    fail('No class named $className in ${unit.element.source}');
+    return null;
+  }
+
+  /**
+   * Return the declaration of the field with the given [fieldName] in the class
+   * with the given [className] in the given compilation [unit].
+   */
+  VariableDeclaration getFieldInClass(
+      CompilationUnit unit, String className, String fieldName) {
+    ClassDeclaration unitMember = getClass(unit, className);
+    NodeList<ClassMember> classMembers = unitMember.members;
+    for (ClassMember classMember in classMembers) {
+      if (classMember is FieldDeclaration) {
+        NodeList<VariableDeclaration> fields = classMember.fields.variables;
+        for (VariableDeclaration field in fields) {
+          if (field.name.name == fieldName) {
+            return field;
+          }
+        }
+      }
+    }
+    fail('No field named $fieldName in $className');
+    return null;
+  }
+
+  /**
+   * Return the declaration of the method with the given [methodName] in the
+   * class with the given [className] in the given compilation [unit].
+   */
+  MethodDeclaration getMethodInClass(
+      CompilationUnit unit, String className, String methodName) {
+    ClassDeclaration unitMember = getClass(unit, className);
+    NodeList<ClassMember> classMembers = unitMember.members;
+    for (ClassMember classMember in classMembers) {
+      if (classMember is MethodDeclaration) {
+        if (classMember.name.name == methodName) {
+          return classMember;
+        }
+      }
+    }
+    fail('No method named $methodName in $className');
+    return null;
+  }
+
+  /**
+   * Return the declaration of the top-level variable with the given
+   * [variableName] in the given compilation [unit].
+   */
+  VariableDeclaration getTopLevelVariable(
+      CompilationUnit unit, String variableName) {
+    NodeList<CompilationUnitMember> unitMembers = unit.declarations;
+    for (CompilationUnitMember unitMember in unitMembers) {
+      if (unitMember is TopLevelVariableDeclaration) {
+        NodeList<VariableDeclaration> variables =
+            unitMember.variables.variables;
+        for (VariableDeclaration variable in variables) {
+          if (variable.name.name == variableName) {
+            return variable;
+          }
+        }
+      }
+    }
+    return null;
+  }
+
   void setUp() {
     super.setUp();
     emptySource = newSource('/test.dart');
diff --git a/pkg/analyzer/test/src/task/dart_work_manager_test.dart b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
index 9119cee..a5b6b26 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/src/generated/engine.dart'
     show
         AnalysisErrorInfo,
+        AnalysisErrorInfoImpl,
         CacheState,
         ChangeNoticeImpl,
         InternalAnalysisContext;
@@ -28,9 +29,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(DartWorkManagerTest);
 }
 
@@ -219,10 +221,12 @@
         .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
     // -source1 +source3
     manager.applyPriorityTargets([source2, source3]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source2, LIBRARY_ERRORS_READY),
-      new TargetedResult(source3, LIBRARY_ERRORS_READY)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source2, LIBRARY_ERRORS_READY),
+          new TargetedResult(source3, LIBRARY_ERRORS_READY)
+        ]));
     // get next request
     TargetedResult request = manager.getNextResult();
     expect(request.target, source2);
@@ -241,12 +245,14 @@
         .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
     // -source1 +source3
     manager.applyPriorityTargets([source2, source3]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(
-          new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT),
-      new TargetedResult(
-          new LibrarySpecificUnit(source3, source3), RESOLVED_UNIT),
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(
+              new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT),
+          new TargetedResult(
+              new LibrarySpecificUnit(source3, source3), RESOLVED_UNIT),
+        ]));
   }
 
   void test_applyPriorityTargets_isPart() {
@@ -257,10 +263,12 @@
     when(context.getLibrariesContaining(source1))
         .thenReturn([source2, source3]);
     manager.applyPriorityTargets([source1]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source2, LIBRARY_ERRORS_READY),
-      new TargetedResult(source3, LIBRARY_ERRORS_READY)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source2, LIBRARY_ERRORS_READY),
+          new TargetedResult(source3, LIBRARY_ERRORS_READY)
+        ]));
     // get next request
     TargetedResult request = manager.getNextResult();
     expect(request.target, source2);
@@ -269,10 +277,12 @@
 
   void test_applyPriorityTargets_isUnknown() {
     manager.applyPriorityTargets([source2, source3]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source2, SOURCE_KIND),
-      new TargetedResult(source3, SOURCE_KIND)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source2, SOURCE_KIND),
+          new TargetedResult(source3, SOURCE_KIND)
+        ]));
     // get next request
     TargetedResult request = manager.getNextResult();
     expect(request.target, source2);
@@ -285,14 +295,12 @@
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
     when(context.getLibrariesContaining(source1)).thenReturn([source2]);
-    LineInfo lineInfo = new LineInfo([0]);
-    entry1.setValue(LINE_INFO, lineInfo, []);
     entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
-    context.getCacheEntry(new LibrarySpecificUnit(source2, source1)).setValue(
-        VERIFY_ERRORS, <AnalysisError>[error2], []);
-    AnalysisErrorInfo errorInfo = manager.getErrors(source1);
-    expect(errorInfo.errors, unorderedEquals([error1, error2]));
-    expect(errorInfo.lineInfo, lineInfo);
+    context
+        .getCacheEntry(new LibrarySpecificUnit(source2, source1))
+        .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
+    List<AnalysisError> errors = manager.getErrors(source1);
+    expect(errors, unorderedEquals([error1, error2]));
   }
 
   void test_getErrors_hasFullList() {
@@ -301,12 +309,9 @@
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
     when(context.getLibrariesContaining(source1)).thenReturn([source2]);
-    LineInfo lineInfo = new LineInfo([0]);
-    entry1.setValue(LINE_INFO, lineInfo, []);
     entry1.setValue(DART_ERRORS, <AnalysisError>[error1, error2], []);
-    AnalysisErrorInfo errorInfo = manager.getErrors(source1);
-    expect(errorInfo.errors, unorderedEquals([error1, error2]));
-    expect(errorInfo.lineInfo, lineInfo);
+    List<AnalysisError> errors = manager.getErrors(source1);
+    expect(errors, unorderedEquals([error1, error2]));
   }
 
   void test_getLibrariesContainingPart() {
@@ -360,10 +365,12 @@
   void test_getNextResult_hasPriority_firstIsError() {
     manager.addPriorityResult(source1, SOURCE_KIND);
     manager.addPriorityResult(source2, SOURCE_KIND);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source1, SOURCE_KIND),
-      new TargetedResult(source2, SOURCE_KIND)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source1, SOURCE_KIND),
+          new TargetedResult(source2, SOURCE_KIND)
+        ]));
     // configure state and get next result
     entry1.setErrorState(caughtException, [SOURCE_KIND]);
     TargetedResult request = manager.getNextResult();
@@ -377,10 +384,12 @@
   void test_getNextResult_hasPriority_firstIsValid() {
     manager.addPriorityResult(source1, SOURCE_KIND);
     manager.addPriorityResult(source2, SOURCE_KIND);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source1, SOURCE_KIND),
-      new TargetedResult(source2, SOURCE_KIND)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source1, SOURCE_KIND),
+          new TargetedResult(source2, SOURCE_KIND)
+        ]));
     // configure state and get next result
     entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
     TargetedResult request = manager.getNextResult();
@@ -516,17 +525,20 @@
   }
 
   void test_resultsComputed_errors_forLibrarySpecificUnit() {
+    LineInfo lineInfo = new LineInfo([0]);
     AnalysisError error1 =
         new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
     when(context.getLibrariesContaining(source1)).thenReturn([source2]);
-    LineInfo lineInfo = new LineInfo([0]);
+    when(context.getErrors(source1))
+        .thenReturn(new AnalysisErrorInfoImpl([error1, error2], lineInfo));
     entry1.setValue(LINE_INFO, lineInfo, []);
     entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
     AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1);
-    context.getCacheEntry(unitTarget).setValue(
-        VERIFY_ERRORS, <AnalysisError>[error2], []);
+    context
+        .getCacheEntry(unitTarget)
+        .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
     // RESOLVED_UNIT is ready, set errors
     manager.resultsComputed(
         unitTarget, {RESOLVED_UNIT: AstFactory.compilationUnit()});
@@ -537,12 +549,14 @@
   }
 
   void test_resultsComputed_errors_forSource() {
+    LineInfo lineInfo = new LineInfo([0]);
     AnalysisError error1 =
         new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
     when(context.getLibrariesContaining(source1)).thenReturn([source2]);
-    LineInfo lineInfo = new LineInfo([0]);
+    when(context.getErrors(source1))
+        .thenReturn(new AnalysisErrorInfoImpl([error1, error2], lineInfo));
     entry1.setValue(LINE_INFO, lineInfo, []);
     entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
     entry1.setValue(PARSE_ERRORS, <AnalysisError>[error2], []);
@@ -564,14 +578,18 @@
     _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []);
     expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID);
     // library1 parts
-    manager.resultsComputed(library1, {INCLUDED_PARTS: [part1, part2]});
+    manager.resultsComputed(library1, {
+      INCLUDED_PARTS: [part1, part2]
+    });
     expect(manager.partLibrariesMap[part1], [library1]);
     expect(manager.partLibrariesMap[part2], [library1]);
     expect(manager.partLibrariesMap[part3], isNull);
     expect(manager.libraryPartsMap[library1], [part1, part2]);
     expect(manager.libraryPartsMap[library2], isNull);
     // library2 parts
-    manager.resultsComputed(library2, {INCLUDED_PARTS: [part2, part3]});
+    manager.resultsComputed(library2, {
+      INCLUDED_PARTS: [part2, part3]
+    });
     expect(manager.partLibrariesMap[part1], [library1]);
     expect(manager.partLibrariesMap[part2], [library1, library2]);
     expect(manager.partLibrariesMap[part3], [library2]);
@@ -596,8 +614,10 @@
   }
 
   void test_resultsComputed_parsedUnit() {
-    when(context.getLibrariesContaining(source1)).thenReturn([]);
     LineInfo lineInfo = new LineInfo([0]);
+    when(context.getLibrariesContaining(source1)).thenReturn([]);
+    when(context.getErrors(source1))
+        .thenReturn(new AnalysisErrorInfoImpl([], lineInfo));
     entry1.setValue(LINE_INFO, lineInfo, []);
     CompilationUnit unit = AstFactory.compilationUnit();
     manager.resultsComputed(source1, {PARSED_UNIT: unit});
@@ -608,8 +628,10 @@
   }
 
   void test_resultsComputed_resolvedUnit() {
-    when(context.getLibrariesContaining(source2)).thenReturn([]);
     LineInfo lineInfo = new LineInfo([0]);
+    when(context.getLibrariesContaining(source2)).thenReturn([]);
+    when(context.getErrors(source2))
+        .thenReturn(new AnalysisErrorInfoImpl([], lineInfo));
     entry2.setValue(LINE_INFO, lineInfo, []);
     CompilationUnit unit = AstFactory.compilationUnit();
     manager.resultsComputed(
@@ -645,10 +667,12 @@
     when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(false);
     manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
     expect_unknownSourceQueue([source1, source3]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(
-          new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(
+              new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT)
+        ]));
   }
 
   void test_resultsComputed_sourceKind_isPart() {
diff --git a/pkg/analyzer/test/src/task/driver_test.dart b/pkg/analyzer/test/src/task/driver_test.dart
index 1053691..aed091c 100644
--- a/pkg/analyzer/test/src/task/driver_test.dart
+++ b/pkg/analyzer/test/src/task/driver_test.dart
@@ -22,10 +22,11 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisDriverTest);
   runReflectiveTests(CycleAwareDependencyWalkerTest);
   runReflectiveTests(WorkItemTest);
@@ -132,8 +133,9 @@
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
     CaughtException exception = new CaughtException(null, null);
-    context.getCacheEntry(target).setErrorState(
-        exception, <ResultDescriptor>[result]);
+    context
+        .getCacheEntry(target)
+        .setErrorState(exception, <ResultDescriptor>[result]);
 
     expect(analysisDriver.createWorkOrderForResult(target, result), isNull);
   }
@@ -149,9 +151,11 @@
   test_createWorkOrderForResult_invalid() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {}, [result]);
+        (target) => {},
+        [result]);
     taskManager.addTaskDescriptor(descriptor);
     context.getCacheEntry(target).setState(result, CacheState.INVALID);
 
@@ -163,8 +167,9 @@
   test_createWorkOrderForResult_valid() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
-    context.getCacheEntry(target).setValue(
-        result, '', TargetedResult.EMPTY_LIST);
+    context
+        .getCacheEntry(target)
+        .setValue(result, '', TargetedResult.EMPTY_LIST);
 
     expect(analysisDriver.createWorkOrderForResult(target, result), isNull);
   }
@@ -220,14 +225,16 @@
     // configure tasks
     TestAnalysisTask task1;
     TestAnalysisTask task2;
-    TaskDescriptor descriptor1 = new TaskDescriptor('task1',
-        (context, target) => task1, (target) => {
-      'inputB': new SimpleTaskInput<int>(target, resultB)
-    }, [resultA]);
-    TaskDescriptor descriptor2 = new TaskDescriptor('task2',
-        (context, target) => task2, (target) => {
-      'inputA': new SimpleTaskInput<int>(target, resultA)
-    }, [resultB]);
+    TaskDescriptor descriptor1 = new TaskDescriptor(
+        'task1',
+        (context, target) => task1,
+        (target) => {'inputB': new SimpleTaskInput<int>(target, resultB)},
+        [resultA]);
+    TaskDescriptor descriptor2 = new TaskDescriptor(
+        'task2',
+        (context, target) => task2,
+        (target) => {'inputA': new SimpleTaskInput<int>(target, resultA)},
+        [resultB]);
     task1 = new TestAnalysisTask(context, target,
         descriptor: descriptor1,
         results: [resultA],
@@ -267,14 +274,16 @@
     // configure tasks
     TestAnalysisTask task1;
     TestAnalysisTask task2;
-    TaskDescriptor descriptor1 = new TaskDescriptor('task1',
-        (context, target) => task1, (target) => {
-      'inputB': new SimpleTaskInput<int>(target, resultB)
-    }, [resultA]);
-    TaskDescriptor descriptor2 = new TaskDescriptor('task2',
-        (context, target) => task2, (target) => {
-      'inputA': new SimpleTaskInput<int>(target, resultA)
-    }, [resultB]);
+    TaskDescriptor descriptor1 = new TaskDescriptor(
+        'task1',
+        (context, target) => task1,
+        (target) => {'inputB': new SimpleTaskInput<int>(target, resultB)},
+        [resultA]);
+    TaskDescriptor descriptor2 = new TaskDescriptor(
+        'task2',
+        (context, target) => task2,
+        (target) => {'inputA': new SimpleTaskInput<int>(target, resultA)},
+        [resultB]);
     task1 = new TestAnalysisTask(context, target, descriptor: descriptor1);
     task2 = new TestAnalysisTask(context, target, descriptor: descriptor2);
     taskManager.addTaskDescriptor(descriptor1);
@@ -301,10 +310,11 @@
     TestAnalysisTask task2;
     TaskDescriptor descriptor1 = new TaskDescriptor(
         'task1', (context, target) => task1, (target) => {}, [resultA]);
-    TaskDescriptor descriptor2 = new TaskDescriptor('task2',
-        (context, target) => task2, (target) => {
-      'inputA': new SimpleTaskInput<int>(target, resultA)
-    }, [resultB]);
+    TaskDescriptor descriptor2 = new TaskDescriptor(
+        'task2',
+        (context, target) => task2,
+        (target) => {'inputA': new SimpleTaskInput<int>(target, resultA)},
+        [resultB]);
     task1 = new TestAnalysisTask(context, target,
         descriptor: descriptor1, results: [resultA], value: 10);
     task2 = new TestAnalysisTask(context, target,
@@ -390,9 +400,11 @@
   test_performWorkItem_preExistingException() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {}, [result]);
+        (target) => {},
+        [result]);
     CaughtException exception =
         new CaughtException(new AnalysisException(), null);
     WorkItem item = new WorkItem(context, target, descriptor, null);
@@ -406,7 +418,8 @@
 
   test_reset() {
     ResultDescriptor inputResult = new ResultDescriptor('input', null);
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
         (target) => {'one': inputResult.of(target)},
         [new ResultDescriptor('output', null)]);
@@ -418,14 +431,20 @@
   }
 
   void _configureDescriptors12() {
-    descriptor1 = new TaskDescriptor('task1', (context, target) =>
+    descriptor1 = new TaskDescriptor(
+        'task1',
+        (context, target) =>
             new TestAnalysisTask(context, target, descriptor: descriptor1),
-        (target) => {}, [result1]);
+        (target) => {},
+        [result1]);
     taskManager.addTaskDescriptor(descriptor1);
 
-    descriptor2 = new TaskDescriptor('task2', (context, target) =>
+    descriptor2 = new TaskDescriptor(
+        'task2',
+        (context, target) =>
             new TestAnalysisTask(context, target, descriptor: descriptor1),
-        (target) => {}, [result2]);
+        (target) => {},
+        [result2]);
     taskManager.addTaskDescriptor(descriptor2);
   }
 
@@ -440,9 +459,11 @@
       bool complete, bool priorityTarget, bool priorityResult) {
     AnalysisTarget target = new TestSource();
     ResultDescriptor result = new ResultDescriptor('result', null);
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {}, [result]);
+        (target) => {},
+        [result]);
     if (priorityResult) {
       taskManager.addPriorityResult(result);
     } else {
@@ -455,8 +476,9 @@
       context.explicitTargets.add(target);
     }
     if (complete) {
-      context.getCacheEntry(target).setValue(
-          result, '', TargetedResult.EMPTY_LIST);
+      context
+          .getCacheEntry(target)
+          .setValue(result, '', TargetedResult.EMPTY_LIST);
     } else {
       context.getCacheEntry(target).setState(result, CacheState.INVALID);
     }
@@ -506,34 +528,73 @@
       new StronglyConnectedComponent(<int>[node], false);
 
   void test_complex_graph() {
-    checkGraph({
-      1: [2, 3],
-      2: [3, 4],
-      3: [],
-      4: [3, 5],
-      5: [2, 6],
-      6: [3, 4]
-    }, 1, [singleton(3), cycle([2, 4, 5, 6]), singleton(1)]);
+    checkGraph(
+        {
+          1: [2, 3],
+          2: [3, 4],
+          3: [],
+          4: [3, 5],
+          5: [2, 6],
+          6: [3, 4]
+        },
+        1,
+        [
+          singleton(3),
+          cycle([2, 4, 5, 6]),
+          singleton(1)
+        ]);
   }
 
   void test_cycle_depends_on_other_nodes() {
-    checkGraph({1: [2, 3], 2: [4, 1], 3: [], 4: []}, 1, [
-      singleton(4),
-      singleton(3),
-      cycle([1, 2])
-    ]);
+    checkGraph(
+        {
+          1: [2, 3],
+          2: [4, 1],
+          3: [],
+          4: []
+        },
+        1,
+        [
+          singleton(4),
+          singleton(3),
+          cycle([1, 2])
+        ]);
   }
 
   void test_initial_node_depends_on_cycle() {
-    checkGraph({1: [2], 2: [3], 3: [2]}, 1, [cycle([2, 3]), singleton(1)]);
+    checkGraph(
+        {
+          1: [2],
+          2: [3],
+          3: [2]
+        },
+        1,
+        [
+          cycle([2, 3]),
+          singleton(1)
+        ]);
   }
 
   void test_simple_cycle() {
-    checkGraph({1: [2], 2: [1]}, 1, [cycle([1, 2])]);
+    checkGraph(
+        {
+          1: [2],
+          2: [1]
+        },
+        1,
+        [
+          cycle([1, 2])
+        ]);
   }
 
   void test_simple_dependency_chain() {
-    checkGraph({1: [2], 2: []}, 1, [singleton(2), singleton(1)]);
+    checkGraph(
+        {
+          1: [2],
+          2: []
+        },
+        1,
+        [singleton(2), singleton(1)]);
   }
 
   void test_single_node() {
@@ -541,7 +602,14 @@
   }
 
   void test_single_node_cycle() {
-    checkGraph({1: [1]}, 1, [cycle([1])]);
+    checkGraph(
+        {
+          1: [1]
+        },
+        1,
+        [
+          cycle([1])
+        ]);
   }
 }
 
@@ -549,9 +617,11 @@
 class WorkItemTest extends AbstractDriverTest {
   test_buildTask_complete() {
     AnalysisTarget target = new TestSource();
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {}, [new ResultDescriptor('output', null)]);
+        (target) => {},
+        [new ResultDescriptor('output', null)]);
     WorkItem item = new WorkItem(context, target, descriptor, null);
     AnalysisTask task = item.buildTask();
     expect(task, isNotNull);
@@ -560,11 +630,15 @@
   test_buildTask_incomplete() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor inputResult = new ResultDescriptor('input', null);
-    List<ResultDescriptor> outputResults =
-        <ResultDescriptor>[new ResultDescriptor('output', null)];
-    TaskDescriptor descriptor = new TaskDescriptor('task', (context, target) =>
+    List<ResultDescriptor> outputResults = <ResultDescriptor>[
+      new ResultDescriptor('output', null)
+    ];
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
+        (context, target) =>
             new TestAnalysisTask(context, target, results: outputResults),
-        (target) => {'one': inputResult.of(target)}, outputResults);
+        (target) => {'one': inputResult.of(target)},
+        outputResults);
     WorkItem item = new WorkItem(context, target, descriptor, null);
     expect(() => item.buildTask(), throwsStateError);
   }
@@ -582,9 +656,11 @@
 
   test_gatherInputs_complete() {
     AnalysisTarget target = new TestSource();
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {}, [new ResultDescriptor('output', null)]);
+        (target) => {},
+        [new ResultDescriptor('output', null)]);
     WorkItem item = new WorkItem(context, target, descriptor, null);
     WorkItem result = item.gatherInputs(taskManager, []);
     expect(result, isNull);
@@ -596,12 +672,17 @@
     ResultDescriptor resultA = new ResultDescriptor('resultA', null);
     ResultDescriptor resultB = new ResultDescriptor('resultB', null);
     // prepare tasks
-    TaskDescriptor task1 = new TaskDescriptor('task', (context, target) =>
+    TaskDescriptor task1 = new TaskDescriptor(
+        'task',
+        (context, target) =>
             new TestAnalysisTask(context, target, results: [resultA]),
-        (target) => {}, [resultA]);
-    TaskDescriptor task2 = new TaskDescriptor('task',
+        (target) => {},
+        [resultA]);
+    TaskDescriptor task2 = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
-        (target) => {'one': resultA.of(target)}, [resultB]);
+        (target) => {'one': resultA.of(target)},
+        [resultB]);
     taskManager.addTaskDescriptor(task1);
     taskManager.addTaskDescriptor(task2);
     // gather inputs
@@ -613,7 +694,8 @@
   test_gatherInputs_invalid() {
     AnalysisTarget target = new TestSource();
     ResultDescriptor inputResult = new ResultDescriptor('input', null);
-    TaskDescriptor descriptor = new TaskDescriptor('task',
+    TaskDescriptor descriptor = new TaskDescriptor(
+        'task',
         (context, target) => new TestAnalysisTask(context, target),
         (target) => {'one': inputResult.of(target)},
         [new ResultDescriptor('output', null)]);
diff --git a/pkg/analyzer/test/src/task/general_test.dart b/pkg/analyzer/test/src/task/general_test.dart
index e7b6e92..b335664 100644
--- a/pkg/analyzer/test/src/task/general_test.dart
+++ b/pkg/analyzer/test/src/task/general_test.dart
@@ -15,9 +15,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(GetContentTaskTest);
 }
 
diff --git a/pkg/analyzer/test/src/task/html_test.dart b/pkg/analyzer/test/src/task/html_test.dart
index e3413b7..ec78be1 100644
--- a/pkg/analyzer/test/src/task/html_test.dart
+++ b/pkg/analyzer/test/src/task/html_test.dart
@@ -11,15 +11,20 @@
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import '../context/abstract_context.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(DartScriptsTaskTest);
   runReflectiveTests(HtmlErrorsTaskTest);
   runReflectiveTests(ParseHtmlTaskTest);
 }
 
+isInstanceOf isDartScriptsTask = new isInstanceOf<DartScriptsTask>();
+isInstanceOf isHtmlErrorsTask = new isInstanceOf<HtmlErrorsTask>();
+isInstanceOf isParseHtmlTask = new isInstanceOf<ParseHtmlTask>();
+
 @reflectiveTest
 class DartScriptsTaskTest extends AbstractContextTest {
   test_buildInputs() {
@@ -60,7 +65,9 @@
     String content = r'''
     void buttonPressed() {}
   ''';
-    AnalysisTarget target = newSource('/test.html', '''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        '''
 <!DOCTYPE html>
 <html>
 <head>
@@ -69,8 +76,7 @@
 <body>
 </body>
 </html>''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(0));
     expect(outputs[DART_SCRIPTS], hasLength(1));
     DartScript script = outputs[DART_SCRIPTS][0];
@@ -80,7 +86,9 @@
   }
 
   void test_perform_empty_source_reference() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
 <head>
@@ -89,14 +97,15 @@
 <body>
 </body>
 </html>''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(0));
     expect(outputs[DART_SCRIPTS], hasLength(0));
   }
 
   void test_perform_invalid_source_reference() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
 <head>
@@ -105,14 +114,15 @@
 <body>
 </body>
 </html>''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(0));
     expect(outputs[DART_SCRIPTS], hasLength(0));
   }
 
   void test_perform_non_existing_source_reference() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
 <head>
@@ -121,14 +131,15 @@
 <body>
 </body>
 </html>''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(1));
     expect(outputs[DART_SCRIPTS], hasLength(0));
   }
 
   test_perform_none() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
   <head>
@@ -139,14 +150,15 @@
   </body>
 </html>
 ''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(0));
     expect(outputs[DART_SCRIPTS], hasLength(0));
   }
 
   void test_perform_referenced_source() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
 <head>
@@ -155,8 +167,7 @@
 <body>
 </body>
 </html>''');
-    computeResult(target, REFERENCED_LIBRARIES);
-    expect(task, new isInstanceOf<DartScriptsTask>());
+    computeResult(target, REFERENCED_LIBRARIES, matcher: isDartScriptsTask);
     expect(outputs[REFERENCED_LIBRARIES], hasLength(1));
     expect(outputs[DART_SCRIPTS], hasLength(0));
   }
@@ -168,10 +179,12 @@
     Source source = newSource('/test.html');
     Map<String, TaskInput> inputs = HtmlErrorsTask.buildInputs(source);
     expect(inputs, isNotNull);
-    expect(inputs.keys, unorderedEquals([
-      HtmlErrorsTask.DART_ERRORS_INPUT,
-      HtmlErrorsTask.DOCUMENT_ERRORS_INPUT
-    ]));
+    expect(
+        inputs.keys,
+        unorderedEquals([
+          HtmlErrorsTask.DART_ERRORS_INPUT,
+          HtmlErrorsTask.DOCUMENT_ERRORS_INPUT
+        ]));
   }
 
   test_constructor() {
@@ -202,7 +215,9 @@
   }
 
   test_perform_dartErrors() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
   <head>
@@ -214,13 +229,14 @@
   <body>Test</body>
 </html>
 ''');
-    computeResult(target, HTML_ERRORS);
-    expect(task, new isInstanceOf<HtmlErrorsTask>());
+    computeResult(target, HTML_ERRORS, matcher: isHtmlErrorsTask);
     expect(outputs[HTML_ERRORS], hasLength(1));
   }
 
   test_perform_htmlErrors() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <html>
   <head>
     <title>test page</title>
@@ -230,13 +246,14 @@
   </body>
 </html>
 ''');
-    computeResult(target, HTML_ERRORS);
-    expect(task, new isInstanceOf<HtmlErrorsTask>());
+    computeResult(target, HTML_ERRORS, matcher: isHtmlErrorsTask);
     expect(outputs[HTML_ERRORS], hasLength(1));
   }
 
   test_perform_noErrors() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
   <head>
@@ -247,8 +264,7 @@
   </body>
 </html>
 ''');
-    computeResult(target, HTML_ERRORS);
-    expect(task, new isInstanceOf<HtmlErrorsTask>());
+    computeResult(target, HTML_ERRORS, matcher: isHtmlErrorsTask);
     expect(outputs[HTML_ERRORS], isEmpty);
   }
 }
@@ -290,7 +306,9 @@
   }
 
   test_perform() {
-    AnalysisTarget target = newSource('/test.html', r'''
+    AnalysisTarget target = newSource(
+        '/test.html',
+        r'''
 <!DOCTYPE html>
 <html>
   <head>
@@ -302,7 +320,7 @@
 </html>
 ''');
     computeResult(target, HTML_DOCUMENT);
-    expect(task, new isInstanceOf<ParseHtmlTask>());
+    expect(task, isParseHtmlTask);
     expect(outputs[HTML_DOCUMENT], isNotNull);
     expect(outputs[HTML_DOCUMENT_ERRORS], isNotEmpty);
   }
diff --git a/pkg/analyzer/test/src/task/html_work_manager_test.dart b/pkg/analyzer/test/src/task/html_work_manager_test.dart
index ad1027c..35bc13d 100644
--- a/pkg/analyzer/test/src/task/html_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/html_work_manager_test.dart
@@ -29,9 +29,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(HtmlWorkManagerTest);
 }
 
@@ -116,10 +117,12 @@
     manager.priorityResultQueue.add(new TargetedResult(source2, HTML_ERRORS));
     // -source1 +source3
     manager.applyPriorityTargets([source2, source3]);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source2, HTML_ERRORS),
-      new TargetedResult(source3, HTML_ERRORS)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source2, HTML_ERRORS),
+          new TargetedResult(source3, HTML_ERRORS)
+        ]));
     // get next request
     TargetedResult request = manager.getNextResult();
     expect(request.target, source2);
@@ -131,18 +134,15 @@
         new AnalysisError(source1, 1, 0, HtmlErrorCode.PARSE_ERROR, ['']);
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    LineInfo lineInfo = new LineInfo([0]);
     entry1.setValue(HTML_DOCUMENT_ERRORS, <AnalysisError>[error1], []);
-    entry1.setValue(LINE_INFO, lineInfo, []);
 
     DartScript script = new DartScript(source1, []);
     entry1.setValue(DART_SCRIPTS, [script], []);
     CacheEntry scriptEntry = context.getCacheEntry(script);
     scriptEntry.setValue(DART_ERRORS, [error2], []);
 
-    AnalysisErrorInfo errorInfo = manager.getErrors(source1);
-    expect(errorInfo.errors, unorderedEquals([error1, error2]));
-    expect(errorInfo.lineInfo, lineInfo);
+    List<AnalysisError> errors = manager.getErrors(source1);
+    expect(errors, unorderedEquals([error1, error2]));
   }
 
   void test_getErrors_partialList() {
@@ -150,13 +150,10 @@
         new AnalysisError(source1, 1, 0, HtmlErrorCode.PARSE_ERROR, ['']);
     AnalysisError error2 =
         new AnalysisError(source1, 2, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    LineInfo lineInfo = new LineInfo([0]);
     entry1.setValue(HTML_DOCUMENT_ERRORS, <AnalysisError>[error1, error2], []);
-    entry1.setValue(LINE_INFO, lineInfo, []);
 
-    AnalysisErrorInfo errorInfo = manager.getErrors(source1);
-    expect(errorInfo.errors, unorderedEquals([error1, error2]));
-    expect(errorInfo.lineInfo, lineInfo);
+    List<AnalysisError> errors = manager.getErrors(source1);
+    expect(errors, unorderedEquals([error1, error2]));
   }
 
   void test_getNextResult_hasNormal_firstIsError() {
@@ -204,19 +201,23 @@
   void test_getNextResult_hasPriority() {
     manager.addPriorityResult(source1, HTML_ERRORS);
     manager.addPriorityResult(source2, HTML_ERRORS);
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source1, HTML_ERRORS),
-      new TargetedResult(source2, HTML_ERRORS)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source1, HTML_ERRORS),
+          new TargetedResult(source2, HTML_ERRORS)
+        ]));
 
     TargetedResult request = manager.getNextResult();
     expect(request.target, source1);
     expect(request.result, HTML_ERRORS);
     // no changes until computed
-    expect(manager.priorityResultQueue, unorderedEquals([
-      new TargetedResult(source1, HTML_ERRORS),
-      new TargetedResult(source2, HTML_ERRORS)
-    ]));
+    expect(
+        manager.priorityResultQueue,
+        unorderedEquals([
+          new TargetedResult(source1, HTML_ERRORS),
+          new TargetedResult(source2, HTML_ERRORS)
+        ]));
   }
 
   void test_getNextResult_nothingToDo() {
diff --git a/pkg/analyzer/test/src/task/incremental_element_builder_test.dart b/pkg/analyzer/test/src/task/incremental_element_builder_test.dart
index cc6e95b..b495be7 100644
--- a/pkg/analyzer/test/src/task/incremental_element_builder_test.dart
+++ b/pkg/analyzer/test/src/task/incremental_element_builder_test.dart
@@ -11,10 +11,11 @@
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import '../context/abstract_context.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(IncrementalCompilationUnitElementBuilderTest);
 }
 
@@ -79,10 +80,12 @@
 part 'test.dart';
 ''';
     Source libSource = newSource('/lib.dart', libCode);
-    _buildOldUnit(r'''
+    _buildOldUnit(
+        r'''
 part of my_lib;
 class A {}
-''', libSource);
+''',
+        libSource);
     List<Directive> oldDirectives = oldUnit.directives.toList();
     _buildNewUnit(r'''
 part of my_lib;
@@ -330,7 +333,9 @@
     {
       CompilationUnitMember newNode = newNodes[0];
       expect(newNode, same(oldNodes[2]));
-      expect(getNodeText(newNode), r'''
+      expect(
+          getNodeText(newNode),
+          r'''
 /// reference [double] and [B] types.
 class C {}''');
       ClassElement element = newNode.element;
@@ -349,7 +354,9 @@
     {
       CompilationUnitMember newNode = newNodes[1];
       expect(newNode, same(oldNodes[0]));
-      expect(getNodeText(newNode), r'''
+      expect(
+          getNodeText(newNode),
+          r'''
 /// reference [bool] type.
 class A {}''');
       ClassElement element = newNode.element;
@@ -366,7 +373,9 @@
     {
       CompilationUnitMember newNode = newNodes[2];
       expect(newNode, same(oldNodes[1]));
-      expect(getNodeText(newNode), r'''
+      expect(
+          getNodeText(newNode),
+          r'''
 /// reference [int] type.
 class B {}''');
       ClassElement element = newNode.element;
@@ -621,16 +630,18 @@
     // unit.types
     expect(unitElement.topLevelVariables,
         unorderedEquals([elementA, elementB, elementC, elementD]));
-    expect(unitElement.accessors, unorderedEquals([
-      elementA.getter,
-      elementA.setter,
-      elementB.getter,
-      elementB.setter,
-      elementC.getter,
-      elementC.setter,
-      elementD.getter,
-      elementD.setter
-    ]));
+    expect(
+        unitElement.accessors,
+        unorderedEquals([
+          elementA.getter,
+          elementA.setter,
+          elementB.getter,
+          elementB.setter,
+          elementC.getter,
+          elementC.setter,
+          elementD.getter,
+          elementD.setter
+        ]));
   }
 
   test_unitMembers_topLevelVariable_final() {
diff --git a/pkg/analyzer/test/src/task/inputs_test.dart b/pkg/analyzer/test/src/task/inputs_test.dart
index 625f916..35e4660 100644
--- a/pkg/analyzer/test/src/task/inputs_test.dart
+++ b/pkg/analyzer/test/src/task/inputs_test.dart
@@ -11,9 +11,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(ListTaskInputImplTest);
   runReflectiveTests(ListToListTaskInputTest);
   runReflectiveTests(ListToListTaskInputBuilderTest);
diff --git a/pkg/analyzer/test/src/task/manager_test.dart b/pkg/analyzer/test/src/task/manager_test.dart
index e4aa6de..783c015 100644
--- a/pkg/analyzer/test/src/task/manager_test.dart
+++ b/pkg/analyzer/test/src/task/manager_test.dart
@@ -11,9 +11,10 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(TaskManagerTest);
 }
 
diff --git a/pkg/analyzer/test/src/task/model_test.dart b/pkg/analyzer/test/src/task/model_test.dart
index b75afd6..00cdcfa 100644
--- a/pkg/analyzer/test/src/task/model_test.dart
+++ b/pkg/analyzer/test/src/task/model_test.dart
@@ -12,10 +12,11 @@
 
 import '../../generated/test_support.dart';
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 import 'test_support.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisTaskTest);
   runReflectiveTests(ResultDescriptorImplTest);
   runReflectiveTests(SimpleResultCachingPolicyTest);
@@ -117,8 +118,8 @@
   }
 
   test_createTask() {
-    BuildTask buildTask =
-        (context, target) => new TestAnalysisTask(context, target);
+    BuildTask buildTask = (context, target) =>
+        new TestAnalysisTask(context, target);
     CreateTaskInputs createTaskInputs = (target) {};
     List<ResultDescriptor> results = <ResultDescriptor>[];
     TaskDescriptorImpl descriptor =
diff --git a/pkg/analyzer/test/src/task/strong_mode_test.dart b/pkg/analyzer/test/src/task/strong_mode_test.dart
new file mode 100644
index 0000000..6d9b3f9
--- /dev/null
+++ b/pkg/analyzer/test/src/task/strong_mode_test.dart
@@ -0,0 +1,954 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library test.src.task.strong_mode_test;
+
+import 'package:analyzer/src/generated/ast.dart';
+import 'package:analyzer/src/generated/element.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/task/dart.dart';
+import 'package:analyzer/src/task/strong_mode.dart';
+import 'package:analyzer/task/dart.dart';
+import 'package:unittest/unittest.dart';
+
+import '../../reflective_tests.dart';
+import '../../utils.dart';
+import '../context/abstract_context.dart';
+
+main() {
+  initializeTestEnvironment();
+  runReflectiveTests(InferrenceFinderTest);
+  runReflectiveTests(InstanceMemberInferrerTest);
+  runReflectiveTests(VariableGathererTest);
+}
+
+@reflectiveTest
+class InferrenceFinderTest extends AbstractContextTest {
+  void test_creation() {
+    InferrenceFinder finder = new InferrenceFinder();
+    expect(finder, isNotNull);
+    expect(finder.classes, isEmpty);
+    expect(finder.staticVariables, isEmpty);
+  }
+
+  void test_visit() {
+    Source source = addSource(
+        '/test.dart',
+        r'''
+const c = 1;
+final f = '';
+var v = const A();
+int i;
+class A {
+  static final fa = 0;
+  static int fi;
+  const A();
+}
+class B extends A {
+  static const cb = 1;
+  static vb = 0;
+  const ci = 2;
+  final fi = '';
+  var vi;
+}
+class C = Object with A;
+typedef int F(int x);
+''');
+    LibrarySpecificUnit librarySpecificUnit =
+        new LibrarySpecificUnit(source, source);
+    computeResult(librarySpecificUnit, RESOLVED_UNIT5);
+    CompilationUnit unit = outputs[RESOLVED_UNIT5];
+    InferrenceFinder finder = new InferrenceFinder();
+    unit.accept(finder);
+    expect(finder.classes, hasLength(3));
+    expect(finder.staticVariables, hasLength(6));
+  }
+}
+
+@reflectiveTest
+class InstanceMemberInferrerTest extends AbstractContextTest {
+  InstanceMemberInferrer get createInferrer =>
+      new InstanceMemberInferrer(context.typeProvider);
+
+  /**
+   * Add a source with the given [content] and return the result of resolving
+   * the source.
+   */
+  CompilationUnitElement resolve(String content) {
+    Source source = addSource('/test.dart', content);
+    return context.resolveCompilationUnit2(source, source).element;
+  }
+
+  void test_creation() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    expect(inferrer, isNotNull);
+    expect(inferrer.typeSystem, isNotNull);
+  }
+
+  void test_inferCompilationUnit_field_multiple_different() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $fieldName;
+}
+class B {
+  double $fieldName;
+}
+class C implements A, B {
+  var $fieldName;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(fieldName);
+    PropertyAccessorElement getterC = classC.getGetter(fieldName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_field_multiple_different_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E $fieldName;
+}
+class B<E> {
+  E $fieldName;
+}
+class C implements A<int>, B<double> {
+  var $fieldName;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(fieldName);
+    PropertyAccessorElement getterC = classC.getGetter(fieldName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_field_multiple_dynamic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $fieldName;
+}
+class B {
+  var $fieldName;
+}
+class C implements A, B {
+  var $fieldName;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(fieldName);
+    PropertyAccessorElement getterC = classC.getGetter(fieldName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_field_multiple_same() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $fieldName;
+}
+class B {
+  int $fieldName;
+}
+class C implements A, B {
+  var $fieldName;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    DartType expectedType = fieldA.type;
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(fieldName);
+    PropertyAccessorElement getterC = classC.getGetter(fieldName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type, expectedType);
+    expect(getterC.returnType, expectedType);
+  }
+
+  void test_inferCompilationUnit_field_noOverride() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  final $fieldName = 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    PropertyAccessorElement getterA = classA.getGetter(fieldName);
+    expect(fieldA.type.isDynamic, isTrue);
+    expect(getterA.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    DartType intType = inferrer.typeProvider.intType;
+    expect(fieldA.type, intType);
+    expect(getterA.returnType, intType);
+  }
+
+  void test_inferCompilationUnit_field_noOverride_bottom() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  var $fieldName = null;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    PropertyAccessorElement getterA = classA.getGetter(fieldName);
+    expect(fieldA.type.isDynamic, isTrue);
+    expect(getterA.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldA.type.isDynamic, isTrue);
+    expect(getterA.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_field_single_explicitlyDynamic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  dynamic $fieldName;
+}
+class B extends A {
+  var $fieldName = 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    PropertyAccessorElement getterA = classA.getGetter(fieldName);
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(fieldName);
+    PropertyAccessorElement getterB = classB.getGetter(fieldName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, fieldA.type);
+    expect(getterB.returnType, getterA.returnType);
+  }
+
+  void test_inferCompilationUnit_field_single_final() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  final int $fieldName;
+}
+class B extends A {
+  final $fieldName;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    PropertyAccessorElement getterA = classA.getGetter(fieldName);
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(fieldName);
+    PropertyAccessorElement getterB = classB.getGetter(fieldName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, fieldA.type);
+    expect(getterB.returnType, getterA.returnType);
+  }
+
+  void test_inferCompilationUnit_field_single_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E $fieldName;
+}
+class B<E> extends A<E> {
+  var $fieldName;
+}
+''');
+    ClassElement classB = unit.getType('B');
+    DartType typeBE = classB.typeParameters[0].type;
+    FieldElement fieldB = classB.getField(fieldName);
+    PropertyAccessorElement getterB = classB.getGetter(fieldName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, typeBE);
+    expect(getterB.returnType, typeBE);
+  }
+
+  void test_inferCompilationUnit_field_single_inconsistentAccessors() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int get $fieldName => 0;
+  set $fieldName(String value) {}
+}
+class B extends A {
+  var $fieldName;
+}
+''');
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(fieldName);
+    PropertyAccessorElement getterB = classB.getGetter(fieldName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_field_single_noModifiers() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String fieldName = 'f';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $fieldName;
+}
+class B extends A {
+  var $fieldName;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(fieldName);
+    PropertyAccessorElement getterA = classA.getGetter(fieldName);
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(fieldName);
+    PropertyAccessorElement getterB = classB.getGetter(fieldName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, fieldA.type);
+    expect(getterB.returnType, getterA.returnType);
+  }
+
+  void test_inferCompilationUnit_getter_multiple_different() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int get $getterName => 0;
+}
+class B {
+  double get $getterName => 0.0;
+}
+class C implements A, B {
+  get $getterName => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(getterName);
+    PropertyAccessorElement getterC = classC.getGetter(getterName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_getter_multiple_dynamic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int get $getterName => 0;
+}
+class B {
+  get $getterName => 0;
+}
+class C implements A, B {
+  get $getterName => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(getterName);
+    PropertyAccessorElement getterC = classC.getGetter(getterName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_getter_multiple_same() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A {
+  String get $getterName => '';
+}
+class B {
+  String get $getterName => '';
+}
+class C implements A, B {
+  get $getterName => '';
+}
+''');
+    ClassElement classA = unit.getType('A');
+    PropertyAccessorElement getterA = classA.getGetter(getterName);
+    DartType expectedType = getterA.returnType;
+    ClassElement classC = unit.getType('C');
+    FieldElement fieldC = classC.getField(getterName);
+    PropertyAccessorElement getterC = classC.getGetter(getterName);
+    expect(fieldC.type.isDynamic, isTrue);
+    expect(getterC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldC.type, expectedType);
+    expect(getterC.returnType, expectedType);
+  }
+
+  void test_inferCompilationUnit_getter_single() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int get $getterName => 0;
+}
+class B extends A {
+  get $getterName => 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    FieldElement fieldA = classA.getField(getterName);
+    PropertyAccessorElement getterA = classA.getGetter(getterName);
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(getterName);
+    PropertyAccessorElement getterB = classB.getGetter(getterName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, fieldA.type);
+    expect(getterB.returnType, getterA.returnType);
+  }
+
+  void test_inferCompilationUnit_getter_single_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E get $getterName => 0;
+}
+class B<E> extends A<E> {
+  get $getterName => 0;
+}
+''');
+    ClassElement classB = unit.getType('B');
+    DartType typeBE = classB.typeParameters[0].type;
+    FieldElement fieldB = classB.getField(getterName);
+    PropertyAccessorElement getterB = classB.getGetter(getterName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type, typeBE);
+    expect(getterB.returnType, typeBE);
+  }
+
+  void test_inferCompilationUnit_getter_single_inconsistentAccessors() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String getterName = 'g';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int get $getterName => 0;
+  set $getterName(String value) {}
+}
+class B extends A {
+  var get $getterName => 1;
+}
+''');
+    ClassElement classB = unit.getType('B');
+    FieldElement fieldB = classB.getField(getterName);
+    PropertyAccessorElement getterB = classB.getGetter(getterName);
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(fieldB.type.isDynamic, isTrue);
+    expect(getterB.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_invalid_inheritanceCycle() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    CompilationUnitElement unit = resolve('''
+class A extends C {}
+class B extends A {}
+class C extends B {}
+''');
+    inferrer.inferCompilationUnit(unit);
+  }
+
+  void test_inferCompilationUnit_method_parameter_multiple_different() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  $methodName(int p) => 0;
+}
+class B {
+  $methodName(double p) => 0;
+}
+class C implements A, B {
+  $methodName(p) => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_parameter_multiple_named_different() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  $methodName({int p}) => 0;
+}
+class B {
+  $methodName({int q}) => 0;
+}
+class C implements A, B {
+  $methodName({p}) => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_parameter_multiple_named_same() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  $methodName({int p}) => 0;
+}
+class B {
+  $methodName({int p}) => 0;
+}
+class C implements A, B {
+  $methodName({p}) => 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    MethodElement methodA = classA.getMethod(methodName);
+    ParameterElement parameterA = methodA.parameters[0];
+    DartType expectedType = parameterA.type;
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type, expectedType);
+  }
+
+  void test_inferCompilationUnit_method_parameter_multiple_namedAndRequired() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  $methodName({int p}) => 0;
+}
+class B {
+  $methodName(int p) => 0;
+}
+class C implements A, B {
+  $methodName(p) => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_parameter_multiple_optionalAndRequired() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  $methodName(int p) => 0;
+}
+class B {
+  $methodName([int p]) => 0;
+}
+class C implements A, B {
+  $methodName(p) => 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    MethodElement methodA = classA.getMethod(methodName);
+    ParameterElement parameterA = methodA.parameters[0];
+    DartType expectedType = parameterA.type;
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type, expectedType);
+  }
+
+  void test_inferCompilationUnit_method_parameter_single_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  $methodName(E p) => 0;
+}
+class C<E> implements A<E> {
+  $methodName(p) => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    ParameterElement parameterC = methodC.parameters[0];
+    expect(parameterC.type.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(parameterC.type, classC.typeParameters[0].type);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_different() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $methodName() => 0;
+}
+class B {
+  double $methodName() => 0.0;
+}
+class C implements A, B {
+  $methodName() => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_different_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E $methodName() => null;
+}
+class B<E> {
+  E $methodName() => null;
+}
+class C implements A<int>, B<double> {
+  $methodName() => null;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_dynamic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $methodName() => 0;
+}
+class B {
+  $methodName() => 0;
+}
+class C implements A, B {
+  $methodName() => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_same_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E $methodName() => 0;
+}
+class B<E> {
+  E $methodName() => 0;
+}
+class C<E> implements A<E>, B<E> {
+  $methodName() => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType, classC.typeParameters[0].type);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_same_nonVoid() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $methodName() => 0;
+}
+class B {
+  int $methodName() => 0;
+}
+class C implements A, B {
+  $methodName() => 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    MethodElement methodA = classA.getMethod(methodName);
+    DartType expectedType = methodA.returnType;
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType, expectedType);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_same_void() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  void $methodName() {};
+}
+class B {
+  void $methodName() {};
+}
+class C implements A, B {
+  $methodName() {};
+}
+''');
+    ClassElement classA = unit.getType('A');
+    MethodElement methodA = classA.getMethod(methodName);
+    DartType expectedType = methodA.returnType;
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType, expectedType);
+  }
+
+  void test_inferCompilationUnit_method_return_multiple_void() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $methodName() => 0;
+}
+class B {
+  void $methodName() => 0;
+}
+class C implements A, B {
+  $methodName() => 0;
+}
+''');
+    ClassElement classC = unit.getType('C');
+    MethodElement methodC = classC.getMethod(methodName);
+    expect(methodC.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodC.returnType.isDynamic, isTrue);
+  }
+
+  void test_inferCompilationUnit_method_return_single() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A {
+  int $methodName() => 0;
+}
+class B extends A {
+  $methodName() => 0;
+}
+''');
+    ClassElement classA = unit.getType('A');
+    MethodElement methodA = classA.getMethod(methodName);
+    ClassElement classB = unit.getType('B');
+    MethodElement methodB = classB.getMethod(methodName);
+    expect(methodB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodB.returnType, methodA.returnType);
+  }
+
+  void test_inferCompilationUnit_method_return_single_generic() {
+    InstanceMemberInferrer inferrer = createInferrer;
+    String methodName = 'm';
+    CompilationUnitElement unit = resolve('''
+class A<E> {
+  E $methodName() => 0;
+}
+class B<E> extends A<E> {
+  $methodName() => 0;
+}
+''');
+    ClassElement classB = unit.getType('B');
+    MethodElement methodB = classB.getMethod(methodName);
+    expect(methodB.returnType.isDynamic, isTrue);
+
+    inferrer.inferCompilationUnit(unit);
+
+    expect(methodB.returnType, classB.typeParameters[0].type);
+  }
+}
+
+@reflectiveTest
+class VariableGathererTest extends AbstractContextTest {
+  void test_creation_withFilter() {
+    VariableFilter filter = (variable) => true;
+    VariableGatherer gatherer = new VariableGatherer(filter);
+    expect(gatherer, isNotNull);
+    expect(gatherer.filter, filter);
+  }
+
+  void test_creation_withoutFilter() {
+    VariableGatherer gatherer = new VariableGatherer();
+    expect(gatherer, isNotNull);
+    expect(gatherer.filter, isNull);
+  }
+
+  void test_visit_noReferences() {
+    Source source = addSource(
+        '/test.dart',
+        '''
+library lib;
+import 'dart:math';
+int zero = 0;
+class C {
+  void m() => null;
+}
+typedef void F();
+''');
+    CompilationUnit unit = context.resolveCompilationUnit2(source, source);
+    VariableGatherer gatherer = new VariableGatherer();
+    unit.accept(gatherer);
+    expect(gatherer.results, hasLength(0));
+  }
+
+  void test_visit_withFilter() {
+    VariableFilter filter = (VariableElement variable) => variable.isStatic;
+    expect(_gather(filter), hasLength(1));
+  }
+
+  void test_visit_withoutFilter() {
+    expect(_gather(), hasLength(4));
+  }
+
+  Set<VariableElement> _gather([VariableFilter filter = null]) {
+    Source source = addSource(
+        '/test.dart',
+        '''
+const int zero = 0;
+class Counter {
+  int value = zero;
+  void inc() {
+    value++;
+  }
+  void dec() {
+    value = value - 1;
+  }
+  void fromZero(f(int index)) {
+    for (int i = zero; i < value; i++) {
+      f(i);
+    }
+  }
+}
+''');
+    CompilationUnit unit = context.resolveCompilationUnit2(source, source);
+    VariableGatherer gatherer = new VariableGatherer(filter);
+    unit.accept(gatherer);
+    return gatherer.results;
+  }
+}
diff --git a/pkg/analyzer/test/src/task/test_all.dart b/pkg/analyzer/test/src/task/test_all.dart
index 44d4eef..62fe20f 100644
--- a/pkg/analyzer/test/src/task/test_all.dart
+++ b/pkg/analyzer/test/src/task/test_all.dart
@@ -6,6 +6,7 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'dart_test.dart' as dart_test;
 import 'dart_work_manager_test.dart' as dart_work_manager_test;
 import 'driver_test.dart' as driver_test;
@@ -17,10 +18,11 @@
 import 'inputs_test.dart' as inputs_test;
 import 'manager_test.dart' as manager_test;
 import 'model_test.dart' as model_test;
+import 'strong_mode_test.dart' as strong_mode_test;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('task tests', () {
     dart_test.main();
     dart_work_manager_test.main();
@@ -32,5 +34,6 @@
     inputs_test.main();
     manager_test.main();
     model_test.main();
+    strong_mode_test.main();
   });
 }
diff --git a/pkg/analyzer/test/src/test_all.dart b/pkg/analyzer/test/src/test_all.dart
index 0608083..5aefb66 100644
--- a/pkg/analyzer/test/src/test_all.dart
+++ b/pkg/analyzer/test/src/test_all.dart
@@ -6,13 +6,14 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../utils.dart';
 import 'context/test_all.dart' as context;
 import 'task/test_all.dart' as task;
 import 'util/test_all.dart' as util;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('src tests', () {
     context.main();
     task.main();
diff --git a/pkg/analyzer/test/src/util/asserts_test.dart b/pkg/analyzer/test/src/util/asserts_test.dart
index bb4c032..a504e43 100644
--- a/pkg/analyzer/test/src/util/asserts_test.dart
+++ b/pkg/analyzer/test/src/util/asserts_test.dart
@@ -8,9 +8,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(AnalysisTaskTest);
 }
 
diff --git a/pkg/analyzer/test/src/util/lru_map_test.dart b/pkg/analyzer/test/src/util/lru_map_test.dart
index da82568..ef580a0 100644
--- a/pkg/analyzer/test/src/util/lru_map_test.dart
+++ b/pkg/analyzer/test/src/util/lru_map_test.dart
@@ -8,9 +8,10 @@
 import 'package:unittest/unittest.dart';
 
 import '../../reflective_tests.dart';
+import '../../utils.dart';
 
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   runReflectiveTests(_LRUCacheTest);
 }
 
diff --git a/pkg/analyzer/test/src/util/test_all.dart b/pkg/analyzer/test/src/util/test_all.dart
index 4b60777..f611c58 100644
--- a/pkg/analyzer/test/src/util/test_all.dart
+++ b/pkg/analyzer/test/src/util/test_all.dart
@@ -6,12 +6,13 @@
 
 import 'package:unittest/unittest.dart';
 
+import '../../utils.dart';
 import 'asserts_test.dart' as asserts_test;
 import 'lru_map_test.dart' as lru_map_test;
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('task tests', () {
     asserts_test.main();
     lru_map_test.main();
diff --git a/pkg/analyzer/test/test_all.dart b/pkg/analyzer/test/test_all.dart
index cde1f38..c21cc3f 100644
--- a/pkg/analyzer/test/test_all.dart
+++ b/pkg/analyzer/test/test_all.dart
@@ -14,10 +14,11 @@
 import 'parse_compilation_unit_test.dart' as parse_compilation_unit;
 import 'source/test_all.dart' as source;
 import 'src/test_all.dart' as src;
+import 'utils.dart';
 
 /// Utility for manually running all tests.
 main() {
-  groupSep = ' | ';
+  initializeTestEnvironment();
   group('analysis engine', () {
     cancelable_future_test.main();
     enum_test.main();
diff --git a/pkg/analyzer/test/utils.dart b/pkg/analyzer/test/utils.dart
index 2a9ba81..7c9fbe0 100644
--- a/pkg/analyzer/test/utils.dart
+++ b/pkg/analyzer/test/utils.dart
@@ -2,46 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library utils;
+library analyzer.test.utils;
 
-import 'dart:io';
+import 'package:analyzer/src/generated/java_io.dart';
+import 'package:path/path.dart' as path;
+import 'package:unittest/unittest.dart';
 
-import 'package:analyzer/analyzer.dart';
-import 'package:path/path.dart' as pathos;
-
-/// Returns the string representation of the [AnalyzerErrorGroup] thrown when
-/// parsing [contents] as a Dart file. If [contents] doesn't throw any errors,
-/// this will return null.
-///
-/// This replaces the filename in the error string with its basename, since the
-/// full path will vary from machine to machine. It also replaces the exception
-/// message with "..." to decouple these tests from the specific exception
-/// messages.
-String errorsForFile(String contents) {
-  return withTempDir((temp) {
-    var path = pathos.join(temp, 'test.dart');
-    new File(path).writeAsStringSync(contents);
-    try {
-      parseDartFile(path);
-    } on AnalyzerErrorGroup catch (e) {
-      return e.toString().replaceAllMapped(new RegExp(
-              r"^(Error on line \d+ of )((?:[A-Z]+:)?[^:]+): .*$",
-              multiLine: true),
-          (match) => match[1] + pathos.basename(match[2]) + ': ...');
-    }
-    return null;
-  });
-}
-
-/// Creates a temporary directory and passes its path to [fn]. Once [fn]
-/// completes, the temporary directory and all its contents will be deleted.
-///
-/// Returns the return value of [fn].
-dynamic withTempDir(fn(String path)) {
-  var tempDir = Directory.systemTemp.createTempSync('analyzer_').path;
-  try {
-    return fn(tempDir);
-  } finally {
-    new Directory(tempDir).deleteSync(recursive: true);
-  }
+void initializeTestEnvironment() {
+  groupSep = ' | ';
+  JavaFile.pathContext = path.posix;
 }
diff --git a/pkg/analyzer/tool/task_dependency_graph.dart b/pkg/analyzer/tool/task_dependency_graph.dart
index 79e6d50..4625b42 100644
--- a/pkg/analyzer/tool/task_dependency_graph.dart
+++ b/pkg/analyzer/tool/task_dependency_graph.dart
@@ -83,9 +83,9 @@
     context = AnalysisEngine.instance.createAnalysisContext();
     JavaFile packagesDir = new JavaFile(path.join(rootDir, 'packages'));
     List<UriResolver> uriResolvers = [
-      new FileUriResolver(),
       new DartUriResolver(sdk),
-      new PackageUriResolver(<JavaFile>[packagesDir])
+      new PackageUriResolver(<JavaFile>[packagesDir]),
+      new FileUriResolver()
     ];
     context.sourceFactory = new SourceFactory(uriResolvers);
     Source taskSource =
@@ -126,6 +126,10 @@
     String filePath = path.join(rootDir, filename);
     File file = resourceProvider.getResource(filePath);
     Source source = file.createSource();
+    Uri restoredUri = context.sourceFactory.restoreUri(source);
+    if (restoredUri != null) {
+      source = file.createSource(restoredUri);
+    }
     ChangeSet changeSet = new ChangeSet();
     changeSet.addedSource(source);
     context.applyChanges(changeSet);
diff --git a/pkg/compiler/bin/dart2js.dart b/pkg/compiler/bin/dart2js.dart
new file mode 100644
index 0000000..8f26efa
--- /dev/null
+++ b/pkg/compiler/bin/dart2js.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Entrypoint to run the compiler. This entrypoint is currently only used by
+/// dart2js developers. To run the compiler you now can:
+///   * call `pub get` in the pkg/compiler folder.
+///   * simply call `dart path-to-pkg/compiler/bin/dart2js.dart foo.dart`
+// TODO(sigmund): move `main` here, and change our sdk build tools to just use
+// this entrypoint instead.
+library compiler.bin.dart2js;
+
+export 'package:compiler/src/dart2js.dart';
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 18b3ec3..d2849d2 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -7,18 +7,31 @@
 import 'dart:async';
 import 'dart:convert';
 
-import '../compiler_new.dart' as api;
-import 'dart2jslib.dart' as leg;
-import 'tree/tree.dart' as tree;
-import 'elements/elements.dart' as elements;
-import 'package:sdk_library_metadata/libraries.dart' hide LIBRARIES;
-import 'package:sdk_library_metadata/libraries.dart' as library_info show LIBRARIES;
-import 'io/source_file.dart';
 import 'package:package_config/packages.dart';
 import 'package:package_config/packages_file.dart' as pkgs;
-import 'package:package_config/src/packages_impl.dart'
-    show NonFilePackagesDirectoryPackages, MapPackages;
-import 'package:package_config/src/util.dart' show checkValidPackageUri;
+import 'package:package_config/src/packages_impl.dart' show
+    MapPackages,
+    NonFilePackagesDirectoryPackages;
+import 'package:package_config/src/util.dart' show
+    checkValidPackageUri;
+import 'package:sdk_library_metadata/libraries.dart' hide LIBRARIES;
+import 'package:sdk_library_metadata/libraries.dart' as library_info show
+    LIBRARIES;
+
+import '../compiler_new.dart' as api;
+import 'common/tasks.dart' show
+    GenericTask;
+import 'compiler.dart' as leg;
+import 'diagnostics/messages.dart';
+import 'diagnostics/source_span.dart' show
+    SourceSpan;
+import 'diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE,
+    Spannable;
+import 'elements/elements.dart' as elements;
+import 'io/source_file.dart';
+import 'script.dart';
+import 'tree/tree.dart' as tree;
 
 const bool forceIncrementalSupport =
     const bool.fromEnvironment('DART2JS_EXPERIMENTAL_INCREMENTAL_SUPPORT');
@@ -36,9 +49,9 @@
   bool mockableLibraryUsed = false;
   final Set<String> allowedLibraryCategories;
 
-  leg.GenericTask userHandlerTask;
-  leg.GenericTask userProviderTask;
-  leg.GenericTask userPackagesDiscoveryTask;
+  GenericTask userHandlerTask;
+  GenericTask userProviderTask;
+  GenericTask userPackagesDiscoveryTask;
 
   Compiler(this.provider,
            api.CompilerOutput outputProvider,
@@ -107,10 +120,10 @@
             allowNativeExtensions:
                 hasOption(options, '--allow-native-extensions')) {
     tasks.addAll([
-        userHandlerTask = new leg.GenericTask('Diagnostic handler', this),
-        userProviderTask = new leg.GenericTask('Input provider', this),
+        userHandlerTask = new GenericTask('Diagnostic handler', this),
+        userProviderTask = new GenericTask('Input provider', this),
         userPackagesDiscoveryTask =
-            new leg.GenericTask('Package discovery', this),
+            new GenericTask('Package discovery', this),
     ]);
     if (libraryRoot == null) {
       throw new ArgumentError("[libraryRoot] is null.");
@@ -213,9 +226,9 @@
   /**
    * Reads the script designated by [readableUri].
    */
-  Future<leg.Script> readScript(leg.Spannable node, Uri readableUri) {
+  Future<Script> readScript(Spannable node, Uri readableUri) {
     if (!readableUri.isAbsolute) {
-      if (node == null) node = leg.NO_LOCATION_SPANNABLE;
+      if (node == null) node = NO_LOCATION_SPANNABLE;
       internalError(node,
           'Relative uri $readableUri provided to readScript(Uri).');
     }
@@ -227,14 +240,14 @@
     void reportReadError(exception) {
       if (element == null || node == null) {
         reportError(
-            new leg.SourceSpan(readableUri, 0, 0),
-            leg.MessageKind.READ_SELF_ERROR,
+            new SourceSpan(readableUri, 0, 0),
+            MessageKind.READ_SELF_ERROR,
             {'uri': readableUri, 'exception': exception});
       } else {
         withCurrentElement(element, () {
           reportError(
               node,
-              leg.MessageKind.READ_SCRIPT_ERROR,
+              MessageKind.READ_SCRIPT_ERROR,
               {'uri': readableUri, 'exception': exception});
         });
       }
@@ -245,7 +258,7 @@
     if (resourceUri.scheme == 'dart-ext') {
       if (!allowNativeExtensions) {
         withCurrentElement(element, () {
-          reportError(node, leg.MessageKind.DART_EXT_NOT_SUPPORTED);
+          reportError(node, MessageKind.DART_EXT_NOT_SUPPORTED);
         });
       }
       return synthesizeScript(node, readableUri);
@@ -269,16 +282,16 @@
       // the scheme in the script because [Script.uri] is used for resolving
       // relative URIs mentioned in the script. See the comment on
       // [LibraryLoader] for more details.
-      return new leg.Script(readableUri, resourceUri, sourceFile);
+      return new Script(readableUri, resourceUri, sourceFile);
     }).catchError((error) {
       reportReadError(error);
       return synthesizeScript(node, readableUri);
     });
   }
 
-  Future<leg.Script> synthesizeScript(leg.Spannable node, Uri readableUri) {
+  Future<Script> synthesizeScript(Spannable node, Uri readableUri) {
     return new Future.value(
-        new leg.Script(
+        new Script(
             readableUri, readableUri,
             new StringSourceFile.fromUri(
                 readableUri,
@@ -291,7 +304,7 @@
    *
    * See [LibraryLoader] for terminology on URIs.
    */
-  Uri translateUri(leg.Spannable node, Uri readableUri) {
+  Uri translateUri(Spannable node, Uri readableUri) {
     switch (readableUri.scheme) {
       case 'package': return translatePackageUri(node, readableUri);
       default: return readableUri;
@@ -317,19 +330,19 @@
         if (importingLibrary != null) {
           reportError(
               node,
-              leg.MessageKind.INTERNAL_LIBRARY_FROM,
+              MessageKind.INTERNAL_LIBRARY_FROM,
               {'resolvedUri': resolvedUri,
                'importingUri': importingLibrary.canonicalUri});
         } else {
           reportError(
               node,
-              leg.MessageKind.INTERNAL_LIBRARY,
+              MessageKind.INTERNAL_LIBRARY,
               {'resolvedUri': resolvedUri});
         }
       }
     }
     if (path == null) {
-      reportError(node, leg.MessageKind.LIBRARY_NOT_FOUND,
+      reportError(node, MessageKind.LIBRARY_NOT_FOUND,
                   {'resolvedUri': resolvedUri});
       return null;
     }
@@ -348,13 +361,13 @@
     return libraryRoot.resolve(patchPath);
   }
 
-  Uri translatePackageUri(leg.Spannable node, Uri uri) {
+  Uri translatePackageUri(Spannable node, Uri uri) {
     try {
       checkValidPackageUri(uri);
     } on ArgumentError catch (e) {
       reportError(
           node,
-          leg.MessageKind.INVALID_PACKAGE_URI,
+          MessageKind.INVALID_PACKAGE_URI,
           {'uri': uri, 'exception': e.message});
       return null;
     }
@@ -362,13 +375,23 @@
         notFound: (Uri notFound) {
           reportError(
               node,
-              leg.MessageKind.LIBRARY_NOT_FOUND,
+              MessageKind.LIBRARY_NOT_FOUND,
               {'resolvedUri': uri}
           );
           return null;
         });
   }
 
+  Future<elements.LibraryElement> analyzeUri(
+      Uri uri,
+      {bool skipLibraryWithPartOfTag: true}) {
+    if (packages == null) {
+      return setupPackages(uri).then((_) => super.analyzeUri(uri));
+    }
+    return super.analyzeUri(
+        uri, skipLibraryWithPartOfTag: skipLibraryWithPartOfTag);
+  }
+
   Future setupPackages(Uri uri) {
     if (packageRoot != null) {
       // Use "non-file" packages because the file version requires a [Directory]
@@ -389,8 +412,7 @@
         packages =
             new MapPackages(pkgs.parse(packageConfigContents, packageConfig));
       }).catchError((error) {
-        reportError(leg.NO_LOCATION_SPANNABLE,
-            leg.MessageKind.INVALID_PACKAGE_CONFIG,
+        reportError(NO_LOCATION_SPANNABLE, MessageKind.INVALID_PACKAGE_CONFIG,
             {'uri': packageConfig, 'exception': error});
         packages = Packages.noPackages;
       });
@@ -429,10 +451,10 @@
     });
   }
 
-  void reportDiagnostic(leg.Spannable node,
-                        leg.Message message,
+  void reportDiagnostic(Spannable node,
+                        Message message,
                         api.Diagnostic kind) {
-    leg.SourceSpan span = spanFromSpannable(node);
+    SourceSpan span = spanFromSpannable(node);
     if (identical(kind, api.Diagnostic.ERROR)
         || identical(kind, api.Diagnostic.CRASH)
         || (fatalWarnings && identical(kind, api.Diagnostic.WARNING))) {
@@ -453,7 +475,7 @@
       && (options.indexOf('--allow-mock-compilation') != -1);
   }
 
-  void callUserHandler(leg.Message message, Uri uri, int begin, int end,
+  void callUserHandler(Message message, Uri uri, int begin, int end,
                        String text, api.Diagnostic kind) {
     try {
       userHandlerTask.measure(() {
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 3beedab..d95c3f7 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -4,17 +4,26 @@
 
 library closureToClassMapper;
 
+import 'common/names.dart' show
+    Identifiers;
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'compiler.dart' show
+    Compiler;
 import 'constants/expressions.dart';
-import 'dart2jslib.dart';
 import 'dart_types.dart';
+import 'diagnostics/diagnostic_listener.dart';
+import 'diagnostics/spannable.dart' show
+    SpannableAssertionFailure;
 import 'elements/elements.dart';
-import 'elements/modelx.dart'
-    show BaseFunctionElementX,
-         ClassElementX,
-         ElementX,
-         LocalFunctionElementX;
+import 'elements/modelx.dart' show
+    BaseFunctionElementX,
+    ClassElementX,
+    ElementX,
+    LocalFunctionElementX;
 import 'elements/visitor.dart' show ElementVisitor;
 import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'resolution/tree_elements.dart' show TreeElements;
 import 'scanner/scannerlib.dart' show Token;
 import 'tree/tree.dart';
 import 'util/util.dart';
@@ -985,10 +994,11 @@
     ClosureClassElement globalizedElement = new ClosureClassElement(
         node, closureName, compiler, element);
     FunctionElement callElement =
-        new SynthesizedCallMethodElementX(Compiler.CALL_OPERATOR_NAME,
+        new SynthesizedCallMethodElementX(Identifiers.call,
                                           element,
                                           globalizedElement);
-    backend.maybeMarkClosureAsNeededForReflection(globalizedElement, callElement, element);
+    backend.maybeMarkClosureAsNeededForReflection(
+        globalizedElement, callElement, element);
     MemberElement enclosing = element.memberContext;
     enclosing.nestedClosures.add(callElement);
     globalizedElement.addMember(callElement, compiler);
diff --git a/pkg/compiler/lib/src/common.dart b/pkg/compiler/lib/src/common.dart
index 65debcd..b997eda 100644
--- a/pkg/compiler/lib/src/common.dart
+++ b/pkg/compiler/lib/src/common.dart
@@ -4,22 +4,19 @@
 
 library dart2js.common;
 
+
+export 'common/tasks.dart' show
+    CompilerTask;
+
+export 'compiler.dart' show
+    Compiler;
+
 export 'constants/values.dart' show
     ConstantValue,
     InterceptorConstantValue,
     NullConstantValue,
     TypeConstantValue;
 
-export 'dart2jslib.dart' show
-    CallStructure,
-    CompilerTask,
-    Compiler,
-    ConstantEnvironment,
-    MessageKind,
-    Selector,
-    TreeElements,
-    invariant;
-
 export 'dart_types.dart' show
     DartType,
     FunctionType,
@@ -27,6 +24,12 @@
     TypeVariableType,
     Types;
 
+export 'diagnostics/invariant.dart' show
+    invariant;
+
+export 'diagnostics/spannable.dart' show
+    SpannableAssertionFailure;
+
 export 'elements/elements.dart' show
     ClassElement,
     ClosureFieldElement,
@@ -41,6 +44,9 @@
     TypedefElement,
     VariableElement;
 
+export 'resolution/resolution.dart' show
+    TreeElements;
+
 export 'tree/tree.dart' show
     Node;
 
@@ -48,8 +54,9 @@
     TypeMask;
 
 export 'universe/universe.dart' show
+    CallStructure,
+    Selector,
     SelectorKind;
 
 export 'util/util.dart' show
-    Link,
-    SpannableAssertionFailure;
+    Link;
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
new file mode 100644
index 0000000..63b112e
--- /dev/null
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -0,0 +1,364 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.backend_api;
+
+import 'dart:async' show Future;
+
+import '../compiler.dart' show
+    Compiler;
+import '../compile_time_constants.dart' show
+    BackendConstantEnvironment,
+    ConstantCompilerTask;
+import '../constants/constant_system.dart' show
+    ConstantSystem;
+import '../constants/values.dart' show
+    ConstantValue;
+import '../dart_types.dart' show
+    DartType,
+    InterfaceType;
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
+import '../elements/elements.dart' show
+    ClassElement,
+    ConstructorElement,
+    Element,
+    FunctionElement,
+    LibraryElement,
+    MetadataAnnotation;
+import '../enqueue.dart' show
+    Enqueuer,
+    CodegenEnqueuer,
+    ResolutionEnqueuer,
+    WorldImpact;
+import '../io/code_output.dart' show
+    CodeBuffer;
+import '../io/source_information.dart' show
+    SourceInformationStrategy;
+import '../js_backend/js_backend.dart' as js_backend show
+    JavaScriptBackend;
+import '../library_loader.dart' show
+    LibraryLoader,
+    LoadedLibraries;
+import '../native/native.dart' as native show
+    NativeEnqueuer;
+import '../patch_parser.dart' show
+    checkNativeAnnotation;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
+
+import 'codegen.dart' show
+    CodegenWorkItem;
+import 'registry.dart' show
+    Registry;
+import 'resolution.dart' show
+    ResolutionCallbacks;
+import 'tasks.dart' show
+    CompilerTask;
+import 'work.dart' show
+    ItemCompilationContext;
+
+
+abstract class Backend {
+  final Compiler compiler;
+
+  Backend(this.compiler);
+
+  /// Returns true if the backend supports reflection.
+  bool get supportsReflection;
+
+  /// The [ConstantSystem] used to interpret compile-time constants for this
+  /// backend.
+  ConstantSystem get constantSystem;
+
+  /// The constant environment for the backend interpretation of compile-time
+  /// constants.
+  BackendConstantEnvironment get constants;
+
+  /// The compiler task responsible for the compilation of constants for both
+  /// the frontend and the backend.
+  ConstantCompilerTask get constantCompilerTask;
+
+  /// Backend callback methods for the resolution phase.
+  ResolutionCallbacks get resolutionCallbacks;
+
+  /// The strategy used for collecting and emitting source information.
+  SourceInformationStrategy get sourceInformationStrategy {
+    return const SourceInformationStrategy();
+  }
+
+  // TODO(johnniwinther): Move this to the JavaScriptBackend.
+  String get patchVersion => null;
+
+  /// Set of classes that need to be considered for reflection although not
+  /// otherwise visible during resolution.
+  Iterable<ClassElement> classesRequiredForReflection = const [];
+
+  // Given a [FunctionElement], return a buffer with the code generated for it
+  // or null if no code was generated.
+  CodeBuffer codeOf(Element element) => null;
+
+  void initializeHelperClasses() {}
+
+  void enqueueHelpers(ResolutionEnqueuer world, Registry registry);
+  WorldImpact codegen(CodegenWorkItem work);
+
+  // The backend determines the native resolution enqueuer, with a no-op
+  // default, so tools like dart2dart can ignore the native classes.
+  native.NativeEnqueuer nativeResolutionEnqueuer(world) {
+    return new native.NativeEnqueuer();
+  }
+  native.NativeEnqueuer nativeCodegenEnqueuer(world) {
+    return new native.NativeEnqueuer();
+  }
+
+  /// Generates the output and returns the total size of the generated code.
+  int assembleProgram();
+
+  List<CompilerTask> get tasks;
+
+  void onResolutionComplete() {}
+  void onTypeInferenceComplete() {}
+
+  ItemCompilationContext createItemCompilationContext() {
+    return new ItemCompilationContext();
+  }
+
+  bool classNeedsRti(ClassElement cls);
+  bool methodNeedsRti(FunctionElement function);
+
+  /// Enable compilation of code with compile time errors. Returns `true` if
+  /// supported by the backend.
+  bool enableCodegenWithErrorsIfSupported(Spannable node);
+
+  /// Enable deferred loading. Returns `true` if the backend supports deferred
+  /// loading.
+  bool enableDeferredLoadingIfSupported(Spannable node, Registry registry);
+
+  /// Called during codegen when [constant] has been used.
+  void registerCompileTimeConstant(ConstantValue constant, Registry registry) {}
+
+  /// Called during resolution when a constant value for [metadata] on
+  /// [annotatedElement] has been evaluated.
+  void registerMetadataConstant(MetadataAnnotation metadata,
+                                Element annotatedElement,
+                                Registry registry) {}
+
+  /// Called to notify to the backend that a class is being instantiated.
+  // TODO(johnniwinther): Remove this. It's only called once for each [cls] and
+  // only with [Compiler.globalDependencies] as [registry].
+  void registerInstantiatedClass(ClassElement cls,
+                                 Enqueuer enqueuer,
+                                 Registry registry) {}
+
+  /// Called to notify to the backend that an interface type has been
+  /// instantiated.
+  void registerInstantiatedType(InterfaceType type, Registry registry) {}
+
+  /// Register an is check to the backend.
+  void registerIsCheckForCodegen(DartType type,
+                                 Enqueuer enqueuer,
+                                 Registry registry) {}
+
+  /// Register a runtime type variable bound tests between [typeArgument] and
+  /// [bound].
+  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
+                                              DartType bound) {}
+
+  /// Returns `true` if [element] represent the assert function.
+  bool isAssertMethod(Element element) => false;
+
+  /**
+   * Call this to register that an instantiated generic class has a call
+   * method.
+   */
+  void registerCallMethodWithFreeTypeVariables(
+      Element callMethod,
+      Enqueuer enqueuer,
+      Registry registry) {}
+
+  /**
+   * Call this to register that a getter exists for a function on an
+   * instantiated generic class.
+   */
+  void registerClosureWithFreeTypeVariables(
+      Element closure,
+      Enqueuer enqueuer,
+      Registry registry) {}
+
+  /// Call this to register that a member has been closurized.
+  void registerBoundClosure(Enqueuer enqueuer) {}
+
+  /// Call this to register that a static function has been closurized.
+  void registerGetOfStaticFunction(Enqueuer enqueuer) {}
+
+  /**
+   * Call this to register that the [:runtimeType:] property has been accessed.
+   */
+  void registerRuntimeType(Enqueuer enqueuer, Registry registry) {}
+
+  /// Call this to register a `noSuchMethod` implementation.
+  void registerNoSuchMethod(FunctionElement noSuchMethodElement) {}
+
+  /// Call this method to enable support for `noSuchMethod`.
+  void enableNoSuchMethod(Enqueuer enqueuer) {}
+
+  /// Returns whether or not `noSuchMethod` support has been enabled.
+  bool get enabledNoSuchMethod => false;
+
+  /// Call this method to enable support for isolates.
+  void enableIsolateSupport(Enqueuer enqueuer) {}
+
+  void registerRequiredType(DartType type, Element enclosingElement) {}
+  void registerClassUsingVariableExpression(ClassElement cls) {}
+
+  void registerConstSymbol(String name, Registry registry) {}
+  void registerNewSymbol(Registry registry) {}
+
+  bool isNullImplementation(ClassElement cls) {
+    return cls == compiler.nullClass;
+  }
+
+  ClassElement get intImplementation => compiler.intClass;
+  ClassElement get doubleImplementation => compiler.doubleClass;
+  ClassElement get numImplementation => compiler.numClass;
+  ClassElement get stringImplementation => compiler.stringClass;
+  ClassElement get listImplementation => compiler.listClass;
+  ClassElement get growableListImplementation => compiler.listClass;
+  ClassElement get fixedListImplementation => compiler.listClass;
+  ClassElement get constListImplementation => compiler.listClass;
+  ClassElement get mapImplementation => compiler.mapClass;
+  ClassElement get constMapImplementation => compiler.mapClass;
+  ClassElement get functionImplementation => compiler.functionClass;
+  ClassElement get typeImplementation => compiler.typeClass;
+  ClassElement get boolImplementation => compiler.boolClass;
+  ClassElement get nullImplementation => compiler.nullClass;
+  ClassElement get uint32Implementation => compiler.intClass;
+  ClassElement get uint31Implementation => compiler.intClass;
+  ClassElement get positiveIntImplementation => compiler.intClass;
+
+  ClassElement defaultSuperclass(ClassElement element) => compiler.objectClass;
+
+  bool isInterceptorClass(ClassElement element) => false;
+
+  /// Returns `true` if [element] is a foreign element, that is, that the
+  /// backend has specialized handling for the element.
+  bool isForeign(Element element) => false;
+
+  /// Processes [element] for resolution and returns the [FunctionElement] that
+  /// defines the implementation of [element].
+  FunctionElement resolveExternalFunction(FunctionElement element) => element;
+
+  /// Returns `true` if [library] is a backend specific library whose members
+  /// have special treatment, such as being allowed to extends blacklisted
+  /// classes or member being eagerly resolved.
+  bool isBackendLibrary(LibraryElement library) {
+    // TODO(johnniwinther): Remove this when patching is only done by the
+    // JavaScript backend.
+    Uri canonicalUri = library.canonicalUri;
+    if (canonicalUri == js_backend.JavaScriptBackend.DART_JS_HELPER ||
+        canonicalUri == js_backend.JavaScriptBackend.DART_INTERCEPTORS) {
+      return true;
+    }
+    return false;
+  }
+
+  void registerStaticUse(Element element, Enqueuer enqueuer) {}
+
+  /// This method is called immediately after the [LibraryElement] [library] has
+  /// been created.
+  void onLibraryCreated(LibraryElement library) {}
+
+  /// This method is called immediately after the [library] and its parts have
+  /// been scanned.
+  Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
+    if (library.canUseNative) {
+      library.forEachLocalMember((Element element) {
+        if (element.isClass) {
+          checkNativeAnnotation(compiler, element);
+        }
+      });
+    }
+    return new Future.value();
+  }
+
+  /// This method is called when all new libraries loaded through
+  /// [LibraryLoader.loadLibrary] has been loaded and their imports/exports
+  /// have been computed.
+  Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
+    return new Future.value();
+  }
+
+  /// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed
+  /// annotations. The arguments corresponds to the unions of the corresponding
+  /// fields of the annotations.
+  void registerMirrorUsage(Set<String> symbols,
+                           Set<Element> targets,
+                           Set<Element> metaTargets) {}
+
+  /// Returns true if this element needs reflection information at runtime.
+  bool isAccessibleByReflection(Element element) => true;
+
+  /// Returns true if this element is covered by a mirrorsUsed annotation.
+  ///
+  /// Note that it might still be ok to tree shake the element away if no
+  /// reflection is used in the program (and thus [isTreeShakingDisabled] is
+  /// still false). Therefore _do not_ use this predicate to decide inclusion
+  /// in the tree, use [requiredByMirrorSystem] instead.
+  bool referencedFromMirrorSystem(Element element, [recursive]) => false;
+
+  /// Returns true if this element has to be enqueued due to
+  /// mirror usage. Might be a subset of [referencedFromMirrorSystem] if
+  /// normal tree shaking is still active ([isTreeShakingDisabled] is false).
+  bool requiredByMirrorSystem(Element element) => false;
+
+  /// Returns true if global optimizations such as type inferencing
+  /// can apply to this element. One category of elements that do not
+  /// apply is runtime helpers that the backend calls, but the
+  /// optimizations don't see those calls.
+  bool canBeUsedForGlobalOptimizations(Element element) => true;
+
+  /// Called when [enqueuer]'s queue is empty, but before it is closed.
+  /// This is used, for example, by the JS backend to enqueue additional
+  /// elements needed for reflection. [recentClasses] is a collection of
+  /// all classes seen for the first time by the [enqueuer] since the last call
+  /// to [onQueueEmpty].
+  ///
+  /// A return value of [:true:] indicates that [recentClasses] has been
+  /// processed and its elements do not need to be seen in the next round. When
+  /// [:false:] is returned, [onQueueEmpty] will be called again once the
+  /// resolution queue has drained and [recentClasses] will be a superset of the
+  /// current value.
+  ///
+  /// There is no guarantee that a class is only present once in
+  /// [recentClasses], but every class seen by the [enqueuer] will be present in
+  /// [recentClasses] at least once.
+  bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) {
+    return true;
+  }
+
+  /// Called after [element] has been resolved.
+  // TODO(johnniwinther): Change [TreeElements] to [Registry] or a dependency
+  // node. [elements] is currently unused by the implementation.
+  void onElementResolved(Element element, TreeElements elements) {}
+
+  // Does this element belong in the output
+  bool shouldOutput(Element element) => true;
+
+  FunctionElement helperForBadMain() => null;
+
+  FunctionElement helperForMissingMain() => null;
+
+  FunctionElement helperForMainArity() => null;
+
+  void forgetElement(Element element) {}
+
+  void registerMainHasArguments(Enqueuer enqueuer) {}
+
+  void registerAsyncMarker(FunctionElement element,
+                           Enqueuer enqueuer,
+                           Registry registry) {}
+}
+
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
new file mode 100644
index 0000000..538b06d
--- /dev/null
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -0,0 +1,206 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.common.codegen;
+
+import '../compiler.dart' show
+    Compiler;
+import '../constants/values.dart' show
+    ConstantValue;
+import '../dart_types.dart' show
+    DartType,
+    InterfaceType;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../elements/elements.dart' show
+    AstElement,
+    ClassElement,
+    Element,
+    FunctionElement,
+    LocalFunctionElement;
+import '../enqueue.dart' show
+    CodegenEnqueuer,
+    WorldImpact;
+import '../js_backend/js_backend.dart' show
+    JavaScriptBackend;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
+import '../universe/universe.dart' show
+    Selector,
+    UniverseSelector;
+import '../util/util.dart' show
+    Setlet;
+import 'registry.dart' show
+    Registry;
+import 'work.dart' show
+    ItemCompilationContext,
+    WorkItem;
+
+// TODO(johnniwinther): Split this class into interface and implementation.
+// TODO(johnniwinther): Move this implementation to the JS backend.
+class CodegenRegistry extends Registry {
+  final Compiler compiler;
+  final TreeElements treeElements;
+
+  CodegenRegistry(this.compiler, this.treeElements);
+
+  bool get isForResolution => false;
+
+  Element get currentElement => treeElements.analyzedElement;
+
+  // TODO(johnniwinther): Remove this getter when [Registry] creates a
+  // dependency node.
+  Setlet<Element> get otherDependencies => treeElements.otherDependencies;
+
+  CodegenEnqueuer get world => compiler.enqueuer.codegen;
+  JavaScriptBackend get backend => compiler.backend;
+
+  void registerDependency(Element element) {
+    treeElements.registerDependency(element);
+  }
+
+  void registerInlining(Element inlinedElement, Element context) {
+    if (compiler.dumpInfo) {
+      compiler.dumpInfoTask.registerInlined(inlinedElement, context);
+    }
+  }
+
+  void registerInstantiatedClass(ClassElement element) {
+    world.registerInstantiatedType(element.rawType, this);
+  }
+
+  void registerInstantiatedType(InterfaceType type) {
+    world.registerInstantiatedType(type, this);
+  }
+
+  void registerStaticUse(Element element) {
+    world.registerStaticUse(element);
+  }
+
+  void registerDynamicInvocation(UniverseSelector selector) {
+    world.registerDynamicInvocation(selector);
+    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
+  }
+
+  void registerDynamicSetter(UniverseSelector selector) {
+    world.registerDynamicSetter(selector);
+    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
+  }
+
+  void registerDynamicGetter(UniverseSelector selector) {
+    world.registerDynamicGetter(selector);
+    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
+  }
+
+  void registerGetterForSuperMethod(Element element) {
+    world.registerGetterForSuperMethod(element);
+  }
+
+  void registerFieldGetter(Element element) {
+    world.registerFieldGetter(element);
+  }
+
+  void registerFieldSetter(Element element) {
+    world.registerFieldSetter(element);
+  }
+
+  void registerIsCheck(DartType type) {
+    world.registerIsCheck(type);
+    backend.registerIsCheckForCodegen(type, world, this);
+  }
+
+  void registerCompileTimeConstant(ConstantValue constant) {
+    backend.registerCompileTimeConstant(constant, this);
+    backend.constants.addCompileTimeConstantForEmission(constant);
+  }
+
+  void registerTypeVariableBoundsSubtypeCheck(DartType subtype,
+                                              DartType supertype) {
+    backend.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
+  }
+
+  void registerInstantiatedClosure(LocalFunctionElement element) {
+    backend.registerInstantiatedClosure(element, this);
+  }
+
+  void registerGetOfStaticFunction(FunctionElement element) {
+    world.registerGetOfStaticFunction(element);
+  }
+
+  void registerSelectorUse(Selector selector) {
+    world.registerSelectorUse(new UniverseSelector(selector, null));
+  }
+
+  void registerConstSymbol(String name) {
+    backend.registerConstSymbol(name, this);
+  }
+
+  void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
+    backend.registerSpecializedGetInterceptor(classes);
+  }
+
+  void registerUseInterceptor() {
+    backend.registerUseInterceptor(world);
+  }
+
+  void registerTypeConstant(ClassElement element) {
+    backend.customElementsAnalysis.registerTypeConstant(element, world);
+  }
+
+  void registerStaticInvocation(Element element) {
+    world.registerStaticUse(element);
+  }
+
+  void registerSuperInvocation(Element element) {
+    world.registerStaticUse(element);
+  }
+
+  void registerDirectInvocation(Element element) {
+    world.registerStaticUse(element);
+  }
+
+  void registerInstantiation(InterfaceType type) {
+    world.registerInstantiatedType(type, this);
+  }
+
+  void registerAsyncMarker(FunctionElement element) {
+    backend.registerAsyncMarker(element, world, this);
+  }
+
+}
+
+/// [WorkItem] used exclusively by the [CodegenEnqueuer].
+class CodegenWorkItem extends WorkItem {
+  CodegenRegistry registry;
+
+  factory CodegenWorkItem(
+      Compiler compiler,
+      AstElement element,
+      ItemCompilationContext compilationContext) {
+    // If this assertion fails, the resolution callbacks of the backend may be
+    // missing call of form registry.registerXXX. Alternatively, the code
+    // generation could spuriously be adding dependencies on things we know we
+    // don't need.
+    assert(invariant(element,
+        compiler.enqueuer.resolution.hasBeenResolved(element),
+        message: "$element has not been resolved."));
+    assert(invariant(element, element.resolvedAst.elements != null,
+        message: 'Resolution tree is null for $element in codegen work item'));
+    return new CodegenWorkItem.internal(element, compilationContext);
+  }
+
+  CodegenWorkItem.internal(
+      AstElement element,
+      ItemCompilationContext compilationContext)
+      : super(element, compilationContext);
+
+  TreeElements get resolutionTree => element.resolvedAst.elements;
+
+  WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
+    if (world.isProcessed(element)) return const WorldImpact();
+
+    registry = new CodegenRegistry(compiler, resolutionTree);
+    return compiler.codegen(this, world);
+  }
+}
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
new file mode 100644
index 0000000..967e873
--- /dev/null
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Library containing identifier, names, and selectors commonly used through
+/// the compiler.
+library dart2js.common.names;
+
+import '../elements/elements.dart' show
+    Name,
+    PublicName;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector;
+
+/// [String]s commonly used.
+class Identifiers {
+  /// The name of the call operator.
+  static const String call = 'call';
+
+  /// The name of the from environment constructors on 'int', 'bool' and
+  /// 'String'.
+  static const String fromEnvironment = 'fromEnvironment';
+
+  /// The name of the main method.
+  static const String main = 'main';
+
+  /// The name of the no such method handler on 'Object'.
+  static const String noSuchMethod_ = 'noSuchMethod';
+
+  /// The name of the runtime type property on 'Object'.
+  static const String runtimeType_ = 'runtimeType';
+}
+
+/// [Name]s commonly used.
+class Names {
+  /// The name of the call operator.
+  static const Name call = const PublicName(Identifiers.call);
+
+  /// The name of the current element property used on iterators in for-each
+  /// loops.
+  static const Name current = const PublicName('current');
+
+  /// The name of the dynamic type.
+  static const Name dynamic_ = const PublicName('dynamic');
+
+  /// The name of the iterator property used in for-each loops.
+  static const Name iterator = const PublicName('iterator');
+
+  /// The name of the move next method used on iterators in for-each loops.
+  static const Name moveNext = const PublicName('moveNext');
+
+  /// The name of the no such method handler on 'Object'.
+  static const Name noSuchMethod_ = const PublicName(Identifiers.noSuchMethod_);
+
+  /// The name of the to-string method on 'Object'.
+  static const Name toString_ = const PublicName('toString');
+}
+
+/// [Selector]s commonly used.
+class Selectors {
+  /// The selector for calling the cancel method on 'StreamIterator'.
+  static final Selector cancel =
+      new Selector.call(const PublicName('cancel'), CallStructure.NO_ARGS);
+
+  /// The selector for getting the current element property used in for-each
+  /// loops.
+  static final Selector current = new Selector.getter(Names.current);
+
+  /// The selector for getting the iterator property used in for-each loops.
+  static final Selector iterator = new Selector.getter(Names.iterator);
+
+  /// The selector for calling the move next method used in for-each loops.
+  static final Selector moveNext =
+      new Selector.call(Names.moveNext, CallStructure.NO_ARGS);
+
+  /// The selector for calling the no such method handler on 'Object'.
+  static final Selector noSuchMethod_ =
+      new Selector.call(Names.noSuchMethod_, CallStructure.ONE_ARG);
+
+  /// The selector for calling the to-string method on 'Object'.
+  static final Selector toString_ =
+      new Selector.call(Names.toString_, CallStructure.NO_ARGS);
+
+  static final Selector hashCode_ =
+      new Selector.getter(const PublicName('hashCode'));
+
+  static final Selector compareTo =
+      new Selector.call(const PublicName("compareTo"), CallStructure.ONE_ARG);
+}
+
+/// [Uri]s commonly used.
+class Uris {
+  /// The URI for 'dart:async'.
+  static final Uri dart_async = new Uri(scheme: 'dart', path: 'async');
+
+  /// The URI for 'dart:core'.
+  static final Uri dart_core = new Uri(scheme: 'dart', path: 'core');
+
+  /// The URI for 'dart:html'.
+  static final Uri dart_html = new Uri(scheme: 'dart', path: 'html');
+
+  /// The URI for 'dart:mirrors'.
+  static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors');
+
+  /// The URI for 'dart:_internal'.
+  static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal');
+
+  /// The URI for 'dart:_native_typed_data'.
+  static final Uri dart__native_typed_data =
+      new Uri(scheme: 'dart', path: '_native_typed_data');
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/common/registry.dart b/pkg/compiler/lib/src/common/registry.dart
new file mode 100644
index 0000000..1530bfe
--- /dev/null
+++ b/pkg/compiler/lib/src/common/registry.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.common.registry;
+
+import '../dart_types.dart' show
+  InterfaceType;
+import '../elements/elements.dart' show
+  Element,
+  FunctionElement;
+import '../universe/universe.dart' show
+  UniverseSelector;
+
+/// Interface for registration of element dependencies.
+abstract class Registry {
+  // TODO(johnniwinther): Remove this getter when [Registry] creates a
+  // dependency node.
+  Iterable<Element> get otherDependencies;
+
+  void registerDependency(Element element);
+
+  bool get isForResolution;
+
+  void registerDynamicInvocation(UniverseSelector selector);
+
+  void registerDynamicGetter(UniverseSelector selector);
+
+  void registerDynamicSetter(UniverseSelector selector);
+
+  void registerStaticInvocation(Element element);
+
+  void registerInstantiation(InterfaceType type);
+
+  void registerGetOfStaticFunction(FunctionElement element);
+}
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
new file mode 100644
index 0000000..2f9b828
--- /dev/null
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.common.resolution;
+
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart' show
+    DartType;
+import '../elements/elements.dart' show
+    AstElement,
+    ErroneousElement;
+import '../enqueue.dart' show
+    ResolutionEnqueuer,
+    WorldImpact;
+import '../tree/tree.dart' show
+    AsyncForIn,
+    Send;
+import 'registry.dart' show
+    Registry;
+import 'work.dart' show
+    ItemCompilationContext,
+    WorkItem;
+
+/// [WorkItem] used exclusively by the [ResolutionEnqueuer].
+class ResolutionWorkItem extends WorkItem {
+  bool _isAnalyzed = false;
+
+  ResolutionWorkItem(AstElement element,
+                     ItemCompilationContext compilationContext)
+      : super(element, compilationContext);
+
+  WorldImpact run(Compiler compiler, ResolutionEnqueuer world) {
+    WorldImpact impact = compiler.analyze(this, world);
+    _isAnalyzed = true;
+    return impact;
+  }
+
+  bool get isAnalyzed => _isAnalyzed;
+}
+
+/// Backend callbacks function specific to the resolution phase.
+class ResolutionCallbacks {
+  /// Register that [node] is a call to `assert`.
+  void onAssert(Send node, Registry registry) {}
+
+  /// Register that an 'await for' has been seen.
+  void onAsyncForIn(AsyncForIn node, Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program uses string interpolation.
+  void onStringInterpolation(Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program has a catch statement.
+  void onCatchStatement(Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program explicitly throws an exception.
+  void onThrowExpression(Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program has a global variable with a lazy initializer.
+  void onLazyField(Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program uses a type variable as an expression.
+  void onTypeVariableExpression(Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program uses a type literal.
+  void onTypeLiteral(DartType type, Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program has a catch statement with a stack trace.
+  void onStackTraceInCatch(Registry registry) {}
+
+  /// Register an is check to the backend.
+  void onIsCheck(DartType type, Registry registry) {}
+
+  /// Called during resolution to notify to the backend that the
+  /// program has a for-in loop.
+  void onSyncForIn(Registry registry) {}
+
+  /// Register an as check to the backend.
+  void onAsCheck(DartType type, Registry registry) {}
+
+  /// Registers that a type variable bounds check might occur at runtime.
+  void onTypeVariableBoundCheck(Registry registry) {}
+
+  /// Register that the application may throw a [NoSuchMethodError].
+  void onThrowNoSuchMethod(Registry registry) {}
+
+  /// Register that the application may throw a [RuntimeError].
+  void onThrowRuntimeError(Registry registry) {}
+
+  /// Register that the application has a compile time error.
+  void onCompileTimeError(Registry registry, ErroneousElement error) {}
+
+  /// Register that the application may throw an
+  /// [AbstractClassInstantiationError].
+  void onAbstractClassInstantiation(Registry registry) {}
+
+  /// Register that the application may throw a [FallThroughError].
+  void onFallThroughError(Registry registry) {}
+
+  /// Register that a super call will end up calling
+  /// [: super.noSuchMethod :].
+  void onSuperNoSuchMethod(Registry registry) {}
+
+  /// Register that the application creates a constant map.
+  void onMapLiteral(Registry registry, DartType type, bool isConstant) {}
+
+  /// Called when resolving the `Symbol` constructor.
+  void onSymbolConstructor(Registry registry) {}
+}
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
new file mode 100644
index 0000000..1cc3902
--- /dev/null
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -0,0 +1,71 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.common.tasks;
+
+import 'dart:profiler' show
+    UserTag;
+import '../compiler.dart' show
+    Compiler;
+import '../elements/elements.dart' show
+    Element;
+
+typedef void DeferredAction();
+
+class DeferredTask {
+  final Element element;
+  final DeferredAction action;
+
+  DeferredTask(this.element, this.action);
+}
+
+class CompilerTask {
+  final Compiler compiler;
+  final Stopwatch watch;
+  UserTag profilerTag;
+
+  CompilerTask(Compiler compiler)
+      : this.compiler = compiler,
+        watch = (compiler.verbose) ? new Stopwatch() : null;
+
+  String get name => "Unknown task '${this.runtimeType}'";
+  int get timing => (watch != null) ? watch.elapsedMilliseconds : 0;
+
+  int get timingMicroseconds => (watch != null) ? watch.elapsedMicroseconds : 0;
+
+  UserTag getProfilerTag() {
+    if (profilerTag == null) profilerTag = new UserTag(name);
+    return profilerTag;
+  }
+
+  measure(action()) {
+    // In verbose mode when watch != null.
+    if (watch == null) return action();
+    CompilerTask previous = compiler.measuredTask;
+    if (identical(this, previous)) return action();
+    compiler.measuredTask = this;
+    if (previous != null) previous.watch.stop();
+    watch.start();
+    UserTag oldTag = getProfilerTag().makeCurrent();
+    try {
+      return action();
+    } finally {
+      watch.stop();
+      oldTag.makeCurrent();
+      if (previous != null) previous.watch.start();
+      compiler.measuredTask = previous;
+    }
+  }
+
+  measureElement(Element element, action()) {
+    compiler.withCurrentElement(element, () => measure(action));
+  }
+}
+
+class GenericTask extends CompilerTask {
+  final String name;
+
+  GenericTask(this.name, Compiler compiler)
+      : super(compiler);
+}
diff --git a/pkg/compiler/lib/src/common/work.dart b/pkg/compiler/lib/src/common/work.dart
new file mode 100644
index 0000000..2efcf81
--- /dev/null
+++ b/pkg/compiler/lib/src/common/work.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.common.work;
+
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../elements/elements.dart' show
+    AstElement;
+import '../enqueue.dart' show
+    Enqueuer,
+    WorldImpact;
+
+
+/**
+ * Contains backend-specific data that is used throughout the compilation of
+ * one work item.
+ */
+class ItemCompilationContext {
+}
+
+abstract class WorkItem {
+  final ItemCompilationContext compilationContext;
+  /**
+   * Documentation wanted -- johnniwinther
+   *
+   * Invariant: [element] must be a declaration element.
+   */
+  final AstElement element;
+
+  WorkItem(this.element, this.compilationContext) {
+    assert(invariant(element, element.isDeclaration));
+  }
+
+  WorldImpact run(Compiler compiler, Enqueuer world);
+}
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index b203ec1..53d037a 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -4,19 +4,33 @@
 
 library dart2js.compile_time_constant_evaluator;
 
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'compiler.dart' show
+    Compiler;
 import 'constant_system_dart.dart';
 import 'constants/constant_system.dart';
+import 'constants/evaluation.dart';
 import 'constants/expressions.dart';
 import 'constants/values.dart';
 import 'dart_types.dart';
-import 'dart2jslib.dart' show Compiler, CompilerTask, MessageKind, WorldImpact, invariant;
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'diagnostics/messages.dart' show
+    MessageKind;
+import 'enqueue.dart' show
+    WorldImpact;
 import 'elements/elements.dart';
-import 'elements/modelx.dart' show FunctionElementX;
-import 'resolution/resolution.dart';
+import 'elements/modelx.dart' show
+    FunctionElementX;
+import 'resolution/tree_elements.dart' show
+    TreeElements;
 import 'resolution/operators.dart';
 import 'tree/tree.dart';
-import 'util/util.dart' show Link;
-import 'universe/universe.dart' show CallStructure;
+import 'util/util.dart' show
+    Link;
+import 'universe/universe.dart' show
+    CallStructure;
 
 /// A [ConstantEnvironment] provides access for constants compiled for variable
 /// initializers.
@@ -65,7 +79,7 @@
   ///
   /// The returned constant is always of the frontend interpretation.
   ConstantExpression compileNode(Node node, TreeElements elements,
-                                 {bool enforceConst: true});
+      {bool enforceConst: true});
 
   /// Compiles the compile-time constant for the value [metadata], or reports an
   /// error if the value is not a compile-time constant.
@@ -77,6 +91,10 @@
   ConstantExpression compileMetadata(MetadataAnnotation metadata,
                                      Node node,
                                      TreeElements elements);
+
+  /// Evaluates [constant] and caches the result.
+  // TODO(johnniwinther): Remove when all constants are evaluated.
+  void evaluate(ConstantExpression constant);
 }
 
 /// A [BackendConstantEnvironment] provides access to constants needed for
@@ -154,12 +172,27 @@
   }
 
   ConstantExpression compileConstant(VariableElement element) {
-    return compileVariable(element, isConst: true);
+    return internalCompileVariable(element, true, true);
   }
 
-  ConstantExpression compileVariable(VariableElement element,
-                                     {bool isConst: false}) {
+  @override
+  void evaluate(ConstantExpression constant) {
+    constantValueMap.putIfAbsent(constant, () {
+      return constant.evaluate(
+          new _CompilerEnvironment(compiler),
+          constantSystem);
+    });
+  }
 
+  ConstantExpression compileVariable(VariableElement element) {
+    return internalCompileVariable(element, false, true);
+  }
+
+  /// Compile [element] into a constant expression. If [isConst] is true,
+  /// then [element] is a constant variable. If [checkType] is true, then
+  /// report an error if [element] does not typecheck.
+  ConstantExpression internalCompileVariable(
+      VariableElement element, bool isConst, bool checkType) {
     if (initialVariableValues.containsKey(element.declaration)) {
       ConstantExpression result = initialVariableValues[element.declaration];
       return result;
@@ -170,7 +203,8 @@
       _analyzeElementEagerly(compiler, currentElement);
 
       ConstantExpression constant = compileVariableWithDefinitions(
-          element, currentElement.resolvedAst.elements, isConst: isConst);
+          element, currentElement.resolvedAst.elements,
+          isConst: isConst, checkType: checkType);
       return constant;
     });
   }
@@ -181,14 +215,13 @@
    * If the variable is `const` but cannot be compiled eagerly reports an
    * error.
    */
-  ConstantExpression compileVariableWithDefinitions(VariableElement element,
-                                                    TreeElements definitions,
-                                                    {bool isConst: false}) {
+  ConstantExpression compileVariableWithDefinitions(
+      VariableElement element, TreeElements definitions,
+      {bool isConst: false, bool checkType: true}) {
     Node node = element.node;
     if (pendingVariables.contains(element)) {
       if (isConst) {
-        compiler.reportError(
-            node, MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS);
+        compiler.reportError(node, MessageKind.CYCLIC_COMPILE_TIME_CONSTANTS);
         ConstantExpression expression = new ErroneousConstantExpression();
         constantValueMap[expression] = constantSystem.createNull();
         return expression;
@@ -204,9 +237,10 @@
       expression = new NullConstantExpression();
       constantValueMap[expression] = constantSystem.createNull();
     } else {
-      expression = compileNodeWithDefinitions(
-          initializer, definitions, isConst: isConst);
+      expression = compileNodeWithDefinitions(initializer, definitions,
+          isConst: isConst);
       if (compiler.enableTypeAssertions &&
+          checkType &&
           expression != null &&
           element.isField) {
         DartType elementType = element.type;
@@ -222,12 +256,13 @@
           }
         } else {
           DartType constantType = value.getType(compiler.coreTypes);
-          if (!constantSystem.isSubtype(compiler.types,
-                                        constantType, elementType)) {
+          if (!constantSystem.isSubtype(
+              compiler.types, constantType, elementType)) {
             if (isConst) {
-              compiler.reportError(
-                  node, MessageKind.NOT_ASSIGNABLE,
-                  {'fromType': constantType, 'toType': elementType});
+              compiler.reportError(node, MessageKind.NOT_ASSIGNABLE, {
+                'fromType': constantType,
+                'toType': elementType
+              });
             } else {
               // If the field cannot be lazily initialized, we will throw
               // the exception at runtime.
@@ -241,7 +276,7 @@
       initialVariableValues[element.declaration] = expression;
     } else {
       assert(invariant(element, !isConst,
-             message: "Variable $element does not compile to a constant."));
+          message: "Variable $element does not compile to a constant."));
     }
     pendingVariables.remove(element);
     return expression;
@@ -251,9 +286,8 @@
     constantValueMap[expression] = value;
   }
 
-  ConstantExpression compileNodeWithDefinitions(Node node,
-                                                TreeElements definitions,
-                                                {bool isConst: true}) {
+  ConstantExpression compileNodeWithDefinitions(
+      Node node, TreeElements definitions, {bool isConst: true}) {
     assert(node != null);
     CompileTimeConstantEvaluator evaluator = new CompileTimeConstantEvaluator(
         this, definitions, compiler, isConst: isConst);
@@ -270,13 +304,12 @@
   }
 
   ConstantExpression compileNode(Node node, TreeElements elements,
-                                 {bool enforceConst: true}) {
+      {bool enforceConst: true}) {
     return compileNodeWithDefinitions(node, elements, isConst: enforceConst);
   }
 
-  ConstantExpression compileMetadata(MetadataAnnotation metadata,
-                                     Node node,
-                                     TreeElements elements) {
+  ConstantExpression compileMetadata(
+      MetadataAnnotation metadata, Node node, TreeElements elements) {
     return compileNodeWithDefinitions(node, elements);
   }
 
@@ -301,9 +334,8 @@
     return definitions.getConstant(node);
   }
 
-  ConstantExpression compileNodeWithDefinitions(Node node,
-                                                TreeElements definitions,
-                                                {bool isConst: true}) {
+  ConstantExpression compileNodeWithDefinitions(
+      Node node, TreeElements definitions, {bool isConst: true}) {
     ConstantExpression constant = definitions.getConstant(node);
     if (constant != null && getConstantValue(constant) != null) {
       return constant;
@@ -327,10 +359,8 @@
 
   Element get context => elements.analyzedElement;
 
-  CompileTimeConstantEvaluator(this.handler,
-                               this.elements,
-                               this.compiler,
-                               {bool isConst: false})
+  CompileTimeConstantEvaluator(this.handler, this.elements, this.compiler,
+      {bool isConst: false})
       : this.isEvaluatingConstant = isConst;
 
   ConstantSystem get constantSystem => handler.constantSystem;
@@ -355,38 +385,31 @@
   }
 
   AstConstant visitLiteralBool(LiteralBool node) {
-    return new AstConstant(
-        context,
-        node,
+    return new AstConstant(context, node,
         new BoolConstantExpression(node.value),
         constantSystem.createBool(node.value));
   }
 
   AstConstant visitLiteralDouble(LiteralDouble node) {
-    return new AstConstant(
-        context,
-        node,
+    return new AstConstant(context, node,
         new DoubleConstantExpression(node.value),
         constantSystem.createDouble(node.value));
   }
 
   AstConstant visitLiteralInt(LiteralInt node) {
-    return new AstConstant(
-        context,
-        node,
-        new IntConstantExpression(node.value),
+    return new AstConstant(context, node, new IntConstantExpression(node.value),
         constantSystem.createInt(node.value));
   }
 
   AstConstant visitLiteralList(LiteralList node) {
-    if (!node.isConst)  {
+    if (!node.isConst) {
       return signalNotCompileTimeConstant(node);
     }
     List<ConstantExpression> argumentExpressions = <ConstantExpression>[];
     List<ConstantValue> argumentValues = <ConstantValue>[];
     for (Link<Node> link = node.elements.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       AstConstant argument = evaluateConstant(link.head);
       if (argument == null) {
         return null;
@@ -395,9 +418,7 @@
       argumentValues.add(argument.value);
     }
     DartType type = elements.getType(node);
-    return new AstConstant(
-        context,
-        node,
+    return new AstConstant(context, node,
         new ListConstantExpression(type, argumentExpressions),
         constantSystem.createList(type, argumentValues));
   }
@@ -411,8 +432,8 @@
     List<ConstantValue> keyValues = <ConstantValue>[];
     Map<ConstantValue, ConstantValue> map = <ConstantValue, ConstantValue>{};
     for (Link<Node> link = node.entries.nodes;
-         !link.isEmpty;
-         link = link.tail) {
+        !link.isEmpty;
+        link = link.tail) {
       LiteralMapEntry entry = link.head;
       AstConstant key = evaluateConstant(entry.key);
       if (key == null) {
@@ -432,29 +453,19 @@
       map[key.value] = value.value;
     }
     InterfaceType type = elements.getType(node);
-    return new AstConstant(
-        context,
-        node,
-        new MapConstantExpression(
-            type,
-            keyExpressions,
-            valueExpressions),
+    return new AstConstant(context, node,
+        new MapConstantExpression(type, keyExpressions, valueExpressions),
         constantSystem.createMap(
             compiler, type, keyValues, map.values.toList()));
   }
 
   AstConstant visitLiteralNull(LiteralNull node) {
-    return new AstConstant(
-        context,
-        node,
-        new NullConstantExpression(),
+    return new AstConstant(context, node, new NullConstantExpression(),
         constantSystem.createNull());
   }
 
   AstConstant visitLiteralString(LiteralString node) {
-    return new AstConstant(
-        context,
-        node,
+    return new AstConstant(context, node,
         new StringConstantExpression(node.dartString.slowToString()),
         constantSystem.createString(node.dartString));
   }
@@ -465,13 +476,10 @@
     if (left == null || right == null) return null;
     StringConstantValue leftValue = left.value;
     StringConstantValue rightValue = right.value;
-    return new AstConstant(
-        context,
-        node,
+    return new AstConstant(context, node,
         new ConcatenateConstantExpression([left.expression, right.expression]),
-        constantSystem.createString(
-            new DartString.concat(
-                leftValue.primitiveValue, rightValue.primitiveValue)));
+        constantSystem.createString(new DartString.concat(
+            leftValue.primitiveValue, rightValue.primitiveValue)));
   }
 
   AstConstant visitStringInterpolation(StringInterpolation node) {
@@ -510,10 +518,9 @@
       StringConstantValue partStringValue = partString.value;
       accumulator =
           new DartString.concat(accumulator, partStringValue.primitiveValue);
-    };
-    return new AstConstant(
-        context,
-        node,
+    }
+    ;
+    return new AstConstant(context, node,
         new ConcatenateConstantExpression(subexpressions),
         constantSystem.createString(accumulator));
   }
@@ -521,12 +528,10 @@
   AstConstant visitLiteralSymbol(LiteralSymbol node) {
     InterfaceType type = compiler.symbolClass.rawType;
     String text = node.slowNameString;
-    List<AstConstant> arguments =
-        <AstConstant>[new AstConstant(
-            context,
-            node,
-            new StringConstantExpression(text),
-            constantSystem.createString(new LiteralDartString(text)))];
+    List<AstConstant> arguments = <AstConstant>[
+      new AstConstant(context, node, new StringConstantExpression(text),
+          constantSystem.createString(new LiteralDartString(text)))
+    ];
     ConstructorElement constructor = compiler.symbolConstructor;
     AstConstant constant = createConstructorInvocation(
         node, type, constructor, CallStructure.ONE_ARG,
@@ -543,8 +548,8 @@
   /// prefix.
   bool isDeferredUse(Send send) {
     if (send == null) return false;
-    return compiler.deferredLoadTask
-        .deferredPrefixElement(send, elements) != null;
+    return compiler.deferredLoadTask.deferredPrefixElement(send, elements) !=
+        null;
   }
 
   AstConstant visitIdentifier(Identifier node) {
@@ -552,8 +557,8 @@
     if (Elements.isClass(element) || Elements.isTypedef(element)) {
       TypeDeclarationElement typeDeclarationElement = element;
       DartType type = typeDeclarationElement.rawType;
-      return new AstConstant(element, node,
-          new TypeConstantExpression(type), makeTypeConstant(type));
+      return new AstConstant(element, node, new TypeConstantExpression(type),
+          makeTypeConstant(type));
     }
     return signalNotCompileTimeConstant(node);
   }
@@ -566,9 +571,7 @@
       if (Elements.isStaticOrTopLevelFunction(element)) {
         FunctionElementX function = element;
         function.computeType(compiler);
-        result = new AstConstant(
-            context,
-            send,
+        result = new AstConstant(context, send,
             new FunctionConstantExpression(function),
             new FunctionConstantValue(function));
       } else if (Elements.isStaticOrTopLevelField(element)) {
@@ -579,18 +582,14 @@
           elementExpression = handler.compileVariable(element);
         }
         if (elementExpression != null) {
-          result = new AstConstant(
-              context,
-              send,
+          result = new AstConstant(context, send,
               new VariableConstantExpression(element),
               handler.getConstantValue(elementExpression));
         }
       } else if (Elements.isClass(element) || Elements.isTypedef(element)) {
         assert(elements.isTypeLiteral(send));
         DartType elementType = elements.getTypeLiteralType(send);
-        result = new AstConstant(
-            context,
-            send,
+        result = new AstConstant(context, send,
             new TypeConstantExpression(elementType),
             makeTypeConstant(elementType));
       } else if (send.receiver != null) {
@@ -600,23 +599,18 @@
             StringConstantValue stringConstantValue = left.value;
             DartString string = stringConstantValue.primitiveValue;
             IntConstantValue length = constantSystem.createInt(string.length);
-            result = new AstConstant(
-                context,
-                send,
-                new StringLengthConstantExpression(left.expression),
-                length);
+            result = new AstConstant(context, send,
+                new StringLengthConstantExpression(left.expression), length);
           }
         }
         // Fall through to error handling.
-      } else if (!Elements.isUnresolved(element)
-                 && element.isVariable
-                 && element.isConst) {
+      } else if (!Elements.isUnresolved(element) &&
+          element.isVariable &&
+          element.isConst) {
         ConstantExpression variableExpression =
             handler.compileConstant(element);
         if (variableExpression != null) {
-          result = new AstConstant(
-              context,
-              send,
+          result = new AstConstant(context, send,
               new VariableConstantExpression(element),
               handler.getConstantValue(variableExpression));
         }
@@ -628,22 +622,17 @@
         if (isEvaluatingConstant) {
           error(send, MessageKind.DEFERRED_COMPILE_TIME_CONSTANT);
         }
-        PrefixElement prefix = compiler.deferredLoadTask
-            .deferredPrefixElement(send, elements);
-        result = new AstConstant(
-            context,
-            send,
-            new DeferredConstantExpression(
-                result.expression,
-                prefix),
+        PrefixElement prefix =
+            compiler.deferredLoadTask.deferredPrefixElement(send, elements);
+        result = new AstConstant(context, send,
+            new DeferredConstantExpression(result.expression, prefix),
             new DeferredConstantValue(result.value, prefix));
-        compiler.deferredLoadTask
-            .registerConstantDeferredUse(result.value, prefix);
+        compiler.deferredLoadTask.registerConstantDeferredUse(
+            result.value, prefix);
       }
       return result;
     } else if (send.isCall) {
-      if (element == compiler.identicalFunction
-          && send.argumentCount() == 2) {
+      if (element == compiler.identicalFunction && send.argumentCount() == 2) {
         AstConstant left = evaluate(send.argumentsNode.nodes.head);
         AstConstant right = evaluate(send.argumentsNode.nodes.tail.head);
         if (left == null || right == null) {
@@ -652,12 +641,8 @@
         ConstantValue result =
             constantSystem.identity.fold(left.value, right.value);
         if (result != null) {
-          return new AstConstant(
-              context,
-              send,
-              new IdenticalConstantExpression(
-                  left.expression, right.expression),
-              result);
+          return new AstConstant(context, send, new IdenticalConstantExpression(
+              left.expression, right.expression), result);
         }
       }
       return signalNotCompileTimeConstant(send);
@@ -677,11 +662,8 @@
       if (folded == null) {
         return signalNotCompileTimeConstant(send);
       }
-      return new AstConstant(
-          context,
-          send,
-          new UnaryConstantExpression(
-              operator, receiverConstant.expression),
+      return new AstConstant(context, send,
+          new UnaryConstantExpression(operator, receiverConstant.expression),
           folded);
     } else if (send.isOperator && !send.isPostfix) {
       assert(send.argumentCount() == 1);
@@ -724,12 +706,8 @@
       if (folded == null) {
         return signalNotCompileTimeConstant(send);
       }
-      return new AstConstant(
-          context,
-          send,
-          new BinaryConstantExpression(
-              left.expression, operator, right.expression),
-          folded);
+      return new AstConstant(context, send, new BinaryConstantExpression(
+          left.expression, operator, right.expression), folded);
     }
     return signalNotCompileTimeConstant(send);
   }
@@ -741,9 +719,10 @@
     } else if (!condition.value.isBool) {
       DartType conditionType = condition.value.getType(compiler.coreTypes);
       if (isEvaluatingConstant) {
-        compiler.reportError(
-            node.condition, MessageKind.NOT_ASSIGNABLE,
-            {'fromType': conditionType, 'toType': compiler.boolClass.rawType});
+        compiler.reportError(node.condition, MessageKind.NOT_ASSIGNABLE, {
+          'fromType': conditionType,
+          'toType': compiler.boolClass.rawType
+        });
         return new ErroneousAstConstant(context, node);
       }
       return null;
@@ -754,16 +733,11 @@
       return null;
     }
     BoolConstantValue boolCondition = condition.value;
-    return new AstConstant(
-        context,
-        node,
-        new ConditionalConstantExpression(
-            condition.expression,
-            thenExpression.expression,
-            elseExpression.expression),
-        boolCondition.primitiveValue
-            ? thenExpression.value
-            : elseExpression.value);
+    return new AstConstant(context, node, new ConditionalConstantExpression(
+        condition.expression, thenExpression.expression,
+        elseExpression.expression), boolCondition.primitiveValue
+        ? thenExpression.value
+        : elseExpression.value);
   }
 
   AstConstant visitSendSet(SendSet node) {
@@ -777,12 +751,9 @@
    *
    * Invariant: [target] must be an implementation element.
    */
-  List<AstConstant> evaluateArgumentsToConstructor(
-      Node node,
-      CallStructure callStructure,
-      Link<Node> arguments,
-      ConstructorElement target,
-      {AstConstant compileArgument(Node node)}) {
+  List<AstConstant> evaluateArgumentsToConstructor(Node node,
+      CallStructure callStructure, Link<Node> arguments,
+      ConstructorElement target, {AstConstant compileArgument(Node node)}) {
     assert(invariant(node, target.isImplementation));
 
     AstConstant compileDefaultValue(VariableElement element) {
@@ -796,20 +767,16 @@
     if (!callStructure.signatureApplies(signature)) {
       String name = Elements.constructorNameForDiagnostics(
           target.enclosingClass.name, target.name);
-      compiler.reportError(
-          node,
-          MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS,
-          {'constructorName': name});
+      compiler.reportError(node, MessageKind.INVALID_CONSTRUCTOR_ARGUMENTS, {
+        'constructorName': name
+      });
 
       return new List<AstConstant>.filled(
           target.functionSignature.parameterCount,
           new ErroneousAstConstant(context, node));
     }
     return callStructure.makeArgumentsList(
-        arguments,
-        target,
-        compileArgument,
-        compileDefaultValue);
+        arguments, target, compileArgument, compileDefaultValue);
   }
 
   AstConstant visitNewExpression(NewExpression node) {
@@ -833,18 +800,13 @@
     InterfaceType type = elements.getType(node);
     CallStructure callStructure = elements.getSelector(send).callStructure;
 
-    return createConstructorInvocation(
-        node, type, constructor, callStructure,
+    return createConstructorInvocation(node, type, constructor, callStructure,
         arguments: node.send.arguments);
   }
 
-  AstConstant createConstructorInvocation(
-      Node node,
-      InterfaceType type,
-      ConstructorElement constructor,
-      CallStructure callStructure,
-      {Link<Node> arguments,
-       List<AstConstant> normalizedArguments}) {
+  AstConstant createConstructorInvocation(Node node, InterfaceType type,
+      ConstructorElement constructor, CallStructure callStructure,
+      {Link<Node> arguments, List<AstConstant> normalizedArguments}) {
     // TODO(ahe): This is nasty: we must eagerly analyze the
     // constructor to ensure the redirectionTarget has been computed
     // correctly.  Find a way to avoid this.
@@ -862,22 +824,15 @@
 
     if (implementation.isErroneous) {
       // TODO(johnniwinther): This should probably be an [ErroneousAstConstant].
-      return new AstConstant(
-          context,
-          node,
-          new ConstructedConstantExpression(
-              type,
-              constructor,
-              callStructure,
-              const <ConstantExpression>[]),
+      return new AstConstant(context, node, new ConstructedConstantExpression(
+              type, constructor, callStructure, const <ConstantExpression>[]),
           new ConstructedConstantValue(
               constructedType, const <FieldElement, ConstantValue>{}));
     }
 
     List<AstConstant> concreteArguments;
     if (arguments != null) {
-      Map<Node, AstConstant> concreteArgumentMap =
-          <Node, AstConstant>{};
+      Map<Node, AstConstant> concreteArgumentMap = <Node, AstConstant>{};
       for (Link<Node> link = arguments; !link.isEmpty; link = link.tail) {
         Node argument = link.head;
         NamedArgument namedArgument = argument.asNamedArgument();
@@ -899,26 +854,19 @@
     if (target == compiler.intEnvironment ||
         target == compiler.boolEnvironment ||
         target == compiler.stringEnvironment) {
-      return createFromEnvironmentConstant(
-          node, constructedType, target,
+      return createFromEnvironmentConstant(node, constructedType, target,
           callStructure, normalizedArguments, concreteArguments);
     } else {
-      return makeConstructedConstant(
-          compiler, handler, context, node,
-          type, constructor,
-          constructedType, implementation,
-          callStructure, concreteArguments, normalizedArguments);
+      return makeConstructedConstant(compiler, handler, context, node, type,
+          constructor, constructedType, implementation, callStructure,
+          concreteArguments, normalizedArguments);
     }
   }
 
-  AstConstant createFromEnvironmentConstant(
-      Node node,
-      InterfaceType type,
-      ConstructorElement constructor,
-      CallStructure callStructure,
+  AstConstant createFromEnvironmentConstant(Node node, InterfaceType type,
+      ConstructorElement constructor, CallStructure callStructure,
       List<AstConstant> normalizedArguments,
       List<AstConstant> concreteArguments) {
-
     var firstArgument = normalizedArguments[0].value;
     ConstantValue defaultValue = normalizedArguments[1].value;
 
@@ -930,46 +878,51 @@
 
     if (!firstArgument.isString) {
       DartType type = defaultValue.getType(compiler.coreTypes);
-      compiler.reportError(
-          normalizedArguments[0].node, MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type, 'toType': compiler.stringClass.rawType});
+      compiler.reportError(normalizedArguments[0].node,
+          MessageKind.NOT_ASSIGNABLE, {
+        'fromType': type,
+        'toType': compiler.stringClass.rawType
+      });
       return null;
     }
 
     if (constructor == compiler.intEnvironment &&
         !(defaultValue.isNull || defaultValue.isInt)) {
       DartType type = defaultValue.getType(compiler.coreTypes);
-      compiler.reportError(
-          normalizedArguments[1].node, MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type, 'toType': compiler.intClass.rawType});
+      compiler.reportError(normalizedArguments[1].node,
+          MessageKind.NOT_ASSIGNABLE, {
+        'fromType': type,
+        'toType': compiler.intClass.rawType
+      });
       return null;
     }
 
     if (constructor == compiler.boolEnvironment &&
         !(defaultValue.isNull || defaultValue.isBool)) {
       DartType type = defaultValue.getType(compiler.coreTypes);
-      compiler.reportError(
-          normalizedArguments[1].node, MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type, 'toType': compiler.boolClass.rawType});
+      compiler.reportError(normalizedArguments[1].node,
+          MessageKind.NOT_ASSIGNABLE, {
+        'fromType': type,
+        'toType': compiler.boolClass.rawType
+      });
       return null;
     }
 
     if (constructor == compiler.stringEnvironment &&
         !(defaultValue.isNull || defaultValue.isString)) {
       DartType type = defaultValue.getType(compiler.coreTypes);
-      compiler.reportError(
-          normalizedArguments[1].node, MessageKind.NOT_ASSIGNABLE,
-          {'fromType': type, 'toType': compiler.stringClass.rawType});
+      compiler.reportError(normalizedArguments[1].node,
+          MessageKind.NOT_ASSIGNABLE, {
+        'fromType': type,
+        'toType': compiler.stringClass.rawType
+      });
       return null;
     }
 
-    String name =
-        firstArgument.primitiveValue.slowToString();
-    String value =
-        compiler.fromEnvironment(name);
+    String name = firstArgument.primitiveValue.slowToString();
+    String value = compiler.fromEnvironment(name);
 
     AstConstant createEvaluatedConstant(ConstantValue value) {
-
       ConstantExpression expression;
       ConstantExpression name = concreteArguments[0].expression;
       ConstantExpression defaultValue;
@@ -977,14 +930,14 @@
         defaultValue = concreteArguments[1].expression;
       }
       if (constructor == compiler.intEnvironment) {
-        expression = new IntFromEnvironmentConstantExpression(
-            name, defaultValue);
+        expression =
+            new IntFromEnvironmentConstantExpression(name, defaultValue);
       } else if (constructor == compiler.boolEnvironment) {
-        expression = new BoolFromEnvironmentConstantExpression(
-            name, defaultValue);
+        expression =
+            new BoolFromEnvironmentConstantExpression(name, defaultValue);
       } else if (constructor == compiler.stringEnvironment) {
-        expression = new StringFromEnvironmentConstantExpression(
-            name, defaultValue);
+        expression =
+            new StringFromEnvironmentConstantExpression(name, defaultValue);
       }
       return new AstConstant(context, node, expression, value);
     }
@@ -994,9 +947,7 @@
     } else if (constructor == compiler.intEnvironment) {
       int number = int.parse(value, onError: (_) => null);
       return createEvaluatedConstant(
-          (number == null)
-              ? defaultValue
-              : constantSystem.createInt(number));
+          (number == null) ? defaultValue : constantSystem.createInt(number));
     } else if (constructor == compiler.boolEnvironment) {
       if (value == 'true') {
         return createEvaluatedConstant(constantSystem.createBool(true));
@@ -1012,34 +963,27 @@
     }
   }
 
-  static AstConstant makeConstructedConstant(
-      Compiler compiler,
-      ConstantCompilerBase handler,
-      Element context,
-      Node node,
-      InterfaceType type,
-      ConstructorElement constructor,
-      InterfaceType constructedType,
-      ConstructorElement target,
-      CallStructure callStructure,
-      List<AstConstant> concreteArguments,
+  static AstConstant makeConstructedConstant(Compiler compiler,
+      ConstantCompilerBase handler, Element context, Node node,
+      InterfaceType type, ConstructorElement constructor,
+      InterfaceType constructedType, ConstructorElement target,
+      CallStructure callStructure, List<AstConstant> concreteArguments,
       List<AstConstant> normalizedArguments) {
     if (target.isRedirectingFactory) {
       // This happens is case of cyclic redirection.
       assert(invariant(node, compiler.compilationFailed,
           message: "makeConstructedConstant can only be called with the "
-                   "effective target: $constructor"));
+          "effective target: $constructor"));
       return new ErroneousAstConstant(context, node);
     }
-    assert(invariant(
-        node,
+    assert(invariant(node,
         callStructure.signatureApplies(constructor.functionSignature) ||
             compiler.compilationFailed,
         message: "Call structure $callStructure does not apply to constructor "
-                 "$constructor."));
+        "$constructor."));
 
-    ConstructorEvaluator evaluator = new ConstructorEvaluator(
-        constructedType, target, handler, compiler);
+    ConstructorEvaluator evaluator =
+        new ConstructorEvaluator(constructedType, target, handler, compiler);
     evaluator.evaluateConstructorFieldValues(normalizedArguments);
     Map<FieldElement, AstConstant> fieldConstants =
         evaluator.buildFieldConstants(target.enclosingClass);
@@ -1048,13 +992,8 @@
     fieldConstants.forEach((FieldElement field, AstConstant astConstant) {
       fieldValues[field] = astConstant.value;
     });
-    return new AstConstant(
-        context,
-        node,
-        new ConstructedConstantExpression(
-            type,
-            constructor,
-            callStructure,
+    return new AstConstant(context, node, new ConstructedConstantExpression(
+            type, constructor, callStructure,
             concreteArguments.map((e) => e.expression).toList()),
         new ConstructedConstantValue(constructedType, fieldValues));
   }
@@ -1074,10 +1013,7 @@
     if (isEvaluatingConstant) {
       error(node, message);
 
-      return new AstConstant(
-          context,
-          node,
-          new ErroneousConstantExpression(),
+      return new AstConstant(context, node, new ErroneousConstantExpression(),
           new NullConstantValue());
     }
     // Else we don't need to do anything. The final handler is only
@@ -1101,16 +1037,12 @@
    * Invariant: [constructor] must be an implementation element.
    */
   ConstructorEvaluator(InterfaceType this.constructedType,
-                       FunctionElement constructor,
-                       ConstantCompiler handler,
-                       Compiler compiler)
+      FunctionElement constructor, ConstantCompiler handler, Compiler compiler)
       : this.constructor = constructor,
         this.definitions = new Map<Element, AstConstant>(),
         this.fieldValues = new Map<Element, AstConstant>(),
-        super(handler,
-              _analyzeElementEagerly(compiler, constructor),
-              compiler,
-              isConst: true) {
+        super(handler, _analyzeElementEagerly(compiler, constructor), compiler,
+            isConst: true) {
     assert(invariant(constructor, constructor.isImplementation));
   }
 
@@ -1126,27 +1058,24 @@
     return super.visitSend(send);
   }
 
-  void potentiallyCheckType(Node node,
-                            TypedElement element,
-                            AstConstant constant) {
+  void potentiallyCheckType(TypedElement element, AstConstant constant) {
     if (compiler.enableTypeAssertions) {
       DartType elementType = element.type.substByContext(constructedType);
       DartType constantType = constant.value.getType(compiler.coreTypes);
-      if (!constantSystem.isSubtype(compiler.types,
-                                    constantType, elementType)) {
+      if (!constantSystem.isSubtype(
+          compiler.types, constantType, elementType)) {
         compiler.withCurrentElement(constant.element, () {
-          compiler.reportError(
-              constant.node, MessageKind.NOT_ASSIGNABLE,
-              {'fromType': constantType, 'toType': elementType});
+          compiler.reportError(constant.node, MessageKind.NOT_ASSIGNABLE, {
+            'fromType': constantType,
+            'toType': elementType
+          });
         });
       }
     }
   }
 
-  void updateFieldValue(Node node,
-                        TypedElement element,
-                        AstConstant constant) {
-    potentiallyCheckType(node, element, constant);
+  void updateFieldValue(Node node, TypedElement element, AstConstant constant) {
+    potentiallyCheckType(element, constant);
     fieldValues[element] = constant;
   }
 
@@ -1167,14 +1096,14 @@
         InitializingFormalElement initializingFormal = parameter;
         updateFieldValue(node, initializingFormal.fieldElement, argument);
       } else {
-        potentiallyCheckType(node, parameter, argument);
+        potentiallyCheckType(parameter, argument);
         definitions[parameter] = argument;
       }
     });
   }
 
-  void evaluateSuperOrRedirectSend(List<AstConstant> compiledArguments,
-                                   FunctionElement targetConstructor) {
+  void evaluateSuperOrRedirectSend(
+      List<AstConstant> compiledArguments, FunctionElement targetConstructor) {
     ConstructorEvaluator evaluator = new ConstructorEvaluator(
         constructedType.asInstanceOf(targetConstructor.enclosingClass),
         targetConstructor, handler, compiler);
@@ -1196,12 +1125,8 @@
       Function compileArgument = (element) => definitions[element];
       Function compileConstant = handler.compileConstant;
       FunctionElement target = constructor.definingConstructor.implementation;
-      CallStructure.addForwardingElementArgumentsToList(
-          constructor,
-          compiledArguments,
-          target,
-          compileArgument,
-          compileConstant);
+      CallStructure.addForwardingElementArgumentsToList(constructor,
+          compiledArguments, target, compileArgument, compileConstant);
       evaluateSuperOrRedirectSend(compiledArguments, target);
       return;
     }
@@ -1212,18 +1137,16 @@
 
     if (initializerList != null) {
       for (Link<Node> link = initializerList.nodes;
-           !link.isEmpty;
-           link = link.tail) {
+          !link.isEmpty;
+          link = link.tail) {
         assert(link.head is Send);
-        if (link.head is !SendSet) {
+        if (link.head is! SendSet) {
           // A super initializer or constructor redirection.
           Send call = link.head;
           FunctionElement target = elements[call];
-          List<AstConstant> compiledArguments =
-              evaluateArgumentsToConstructor(
-                  call, elements.getSelector(call).callStructure,
-                  call.arguments, target,
-                  compileArgument: evaluateConstant);
+          List<AstConstant> compiledArguments = evaluateArgumentsToConstructor(
+              call, elements.getSelector(call).callStructure, call.arguments,
+              target, compileArgument: evaluateConstant);
           evaluateSuperOrRedirectSend(compiledArguments, target);
           foundSuperOrRedirect = true;
         } else {
@@ -1252,8 +1175,8 @@
         // already and compilation will fail anyway. So just ignore that case.
         if (targetConstructor != null) {
           List<AstConstant> compiledArguments = evaluateArgumentsToConstructor(
-              functionNode, CallStructure.NO_ARGS,
-              const Link<Node>(), targetConstructor);
+              functionNode, CallStructure.NO_ARGS, const Link<Node>(),
+              targetConstructor);
           evaluateSuperOrRedirectSend(compiledArguments, targetConstructor);
         }
       }
@@ -1277,22 +1200,24 @@
   /// inheritance chain of [classElement].
   Map<FieldElement, AstConstant> buildFieldConstants(
       ClassElement classElement) {
-    Map<FieldElement, AstConstant> fieldConstants =
-        <FieldElement, AstConstant>{};
-    classElement.implementation.forEachInstanceField(
-        (ClassElement enclosing, FieldElement field) {
-          AstConstant fieldValue = fieldValues[field];
-          if (fieldValue == null) {
-            // Use the default value.
-            ConstantExpression fieldExpression = handler.compileConstant(field);
-            fieldValue = new AstConstant.fromDefaultValue(
-                field,
-                fieldExpression,
-                handler.getConstantValue(fieldExpression));
-          }
-          fieldConstants[field] = fieldValue;
-        },
-        includeSuperAndInjectedMembers: true);
+    Map<FieldElement, AstConstant> fieldConstants = <FieldElement, AstConstant>{
+    };
+    classElement.implementation
+        .forEachInstanceField((ClassElement enclosing, FieldElement field) {
+      AstConstant fieldValue = fieldValues[field];
+      if (fieldValue == null) {
+        // Use the default value.
+        ConstantExpression fieldExpression =
+            handler.internalCompileVariable(field, true, false);
+        fieldValue = new AstConstant.fromDefaultValue(
+            field, fieldExpression, handler.getConstantValue(fieldExpression));
+        // TODO(het): If the field value doesn't typecheck due to the type
+        // variable in the constructor invocation, then report the error on the
+        // invocation rather than the field.
+        potentiallyCheckType(field, fieldValue);
+      }
+      fieldConstants[field] = fieldValue;
+    }, includeSuperAndInjectedMembers: true);
     return fieldConstants;
   }
 }
@@ -1314,15 +1239,11 @@
 
   AstConstant(this.element, this.node, this.expression, this.value);
 
-  factory AstConstant.fromDefaultValue(
-      VariableElement element,
-      ConstantExpression constant,
-      ConstantValue value) {
-    return new AstConstant(
-        element,
-        element.initializer != null ? element.initializer : element.node,
-        constant,
-        value);
+  factory AstConstant.fromDefaultValue(VariableElement element,
+      ConstantExpression constant, ConstantValue value) {
+    return new AstConstant(element, element.initializer != null
+        ? element.initializer
+        : element.node, constant, value);
   }
 
   String toString() => expression.toString();
@@ -1330,8 +1251,7 @@
 
 /// A synthetic constant used to recover from errors.
 class ErroneousAstConstant extends AstConstant {
-  ErroneousAstConstant(Element element, Node node)
-      : super(element, node,
+  ErroneousAstConstant(Element element, Node node) : super(element, node,
           // TODO(johnniwinther): Return a [NonConstantValue] instead.
           new ErroneousConstantExpression(), new NullConstantValue());
 }
@@ -1342,3 +1262,14 @@
   compiler.enqueuer.resolution.applyImpact(element.declaration, worldImpact);
   return element.resolvedAst.elements;
 }
+
+class _CompilerEnvironment implements Environment {
+  final Compiler compiler;
+
+  _CompilerEnvironment(this.compiler);
+
+  @override
+  String readFromEnvironment(String name) {
+    return compiler.fromEnvironment(name);
+  }
+}
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index f635379..fad09bc 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -2,674 +2,137 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.compiler_base;
 
-/**
- * If true, print a warning for each method that was resolved, but not
- * compiled.
- */
-const bool REPORT_EXCESS_RESOLUTION = false;
+import 'dart:async' show
+    EventSink,
+    Future;
 
-/**
- * Contains backend-specific data that is used throughout the compilation of
- * one work item.
- */
-class ItemCompilationContext {
-}
-
-abstract class WorkItem {
-  final ItemCompilationContext compilationContext;
-  /**
-   * Documentation wanted -- johnniwinther
-   *
-   * Invariant: [element] must be a declaration element.
-   */
-  final AstElement element;
-
-  WorkItem(this.element, this.compilationContext) {
-    assert(invariant(element, element.isDeclaration));
-  }
-
-  WorldImpact run(Compiler compiler, Enqueuer world);
-}
-
-/// [WorkItem] used exclusively by the [ResolutionEnqueuer].
-class ResolutionWorkItem extends WorkItem {
-  bool _isAnalyzed = false;
-
-  ResolutionWorkItem(AstElement element,
-                     ItemCompilationContext compilationContext)
-      : super(element, compilationContext);
-
-  WorldImpact run(Compiler compiler, ResolutionEnqueuer world) {
-    WorldImpact impact = compiler.analyze(this, world);
-    _isAnalyzed = true;
-    return impact;
-  }
-
-  bool get isAnalyzed => _isAnalyzed;
-}
-
-// TODO(johnniwinther): Split this class into interface and implementation.
-// TODO(johnniwinther): Move this implementation to the JS backend.
-class CodegenRegistry extends Registry {
-  final Compiler compiler;
-  final TreeElements treeElements;
-
-  CodegenRegistry(this.compiler, this.treeElements);
-
-  bool get isForResolution => false;
-
-  Element get currentElement => treeElements.analyzedElement;
-
-  // TODO(johnniwinther): Remove this getter when [Registry] creates a
-  // dependency node.
-  Setlet<Element> get otherDependencies => treeElements.otherDependencies;
-
-  CodegenEnqueuer get world => compiler.enqueuer.codegen;
-  js_backend.JavaScriptBackend get backend => compiler.backend;
-
-  void registerDependency(Element element) {
-    treeElements.registerDependency(element);
-  }
-
-  void registerInlining(Element inlinedElement, Element context) {
-    if (compiler.dumpInfo) {
-      compiler.dumpInfoTask.registerInlined(inlinedElement, context);
-    }
-  }
-
-  void registerInstantiatedClass(ClassElement element) {
-    world.registerInstantiatedType(element.rawType, this);
-  }
-
-  void registerInstantiatedType(InterfaceType type) {
-    world.registerInstantiatedType(type, this);
-  }
-
-  void registerStaticUse(Element element) {
-    world.registerStaticUse(element);
-  }
-
-  void registerDynamicInvocation(UniverseSelector selector) {
-    world.registerDynamicInvocation(selector);
-    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
-  }
-
-  void registerDynamicSetter(UniverseSelector selector) {
-    world.registerDynamicSetter(selector);
-    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
-  }
-
-  void registerDynamicGetter(UniverseSelector selector) {
-    world.registerDynamicGetter(selector);
-    compiler.dumpInfoTask.elementUsesSelector(currentElement, selector);
-  }
-
-  void registerGetterForSuperMethod(Element element) {
-    world.registerGetterForSuperMethod(element);
-  }
-
-  void registerFieldGetter(Element element) {
-    world.registerFieldGetter(element);
-  }
-
-  void registerFieldSetter(Element element) {
-    world.registerFieldSetter(element);
-  }
-
-  void registerIsCheck(DartType type) {
-    world.registerIsCheck(type);
-    backend.registerIsCheckForCodegen(type, world, this);
-  }
-
-  void registerCompileTimeConstant(ConstantValue constant) {
-    backend.registerCompileTimeConstant(constant, this);
-    backend.constants.addCompileTimeConstantForEmission(constant);
-  }
-
-  void registerTypeVariableBoundsSubtypeCheck(DartType subtype,
-                                              DartType supertype) {
-    backend.registerTypeVariableBoundsSubtypeCheck(subtype, supertype);
-  }
-
-  void registerInstantiatedClosure(LocalFunctionElement element) {
-    backend.registerInstantiatedClosure(element, this);
-  }
-
-  void registerGetOfStaticFunction(FunctionElement element) {
-    world.registerGetOfStaticFunction(element);
-  }
-
-  void registerSelectorUse(Selector selector) {
-    world.registerSelectorUse(new UniverseSelector(selector, null));
-  }
-
-  void registerConstSymbol(String name) {
-    backend.registerConstSymbol(name, this);
-  }
-
-  void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
-    backend.registerSpecializedGetInterceptor(classes);
-  }
-
-  void registerUseInterceptor() {
-    backend.registerUseInterceptor(world);
-  }
-
-  void registerTypeConstant(ClassElement element) {
-    backend.customElementsAnalysis.registerTypeConstant(element, world);
-  }
-
-  void registerStaticInvocation(Element element) {
-    world.registerStaticUse(element);
-  }
-
-  void registerSuperInvocation(Element element) {
-    world.registerStaticUse(element);
-  }
-
-  void registerDirectInvocation(Element element) {
-    world.registerStaticUse(element);
-  }
-
-  void registerInstantiation(InterfaceType type) {
-    world.registerInstantiatedType(type, this);
-  }
-
-  void registerAsyncMarker(FunctionElement element) {
-    backend.registerAsyncMarker(element, world, this);
-  }
-
-}
-
-/// [WorkItem] used exclusively by the [CodegenEnqueuer].
-class CodegenWorkItem extends WorkItem {
-  CodegenRegistry registry;
-
-  factory CodegenWorkItem(
-      Compiler compiler,
-      AstElement element,
-      ItemCompilationContext compilationContext) {
-    // If this assertion fails, the resolution callbacks of the backend may be
-    // missing call of form registry.registerXXX. Alternatively, the code
-    // generation could spuriously be adding dependencies on things we know we
-    // don't need.
-    assert(invariant(element,
-        compiler.enqueuer.resolution.hasBeenResolved(element),
-        message: "$element has not been resolved."));
-    assert(invariant(element, element.resolvedAst.elements != null,
-        message: 'Resolution tree is null for $element in codegen work item'));
-    return new CodegenWorkItem.internal(element, compilationContext);
-  }
-
-  CodegenWorkItem.internal(
-      AstElement element,
-      ItemCompilationContext compilationContext)
-      : super(element, compilationContext);
-
-  TreeElements get resolutionTree => element.resolvedAst.elements;
-
-  WorldImpact run(Compiler compiler, CodegenEnqueuer world) {
-    if (world.isProcessed(element)) return const WorldImpact();
-
-    registry = new CodegenRegistry(compiler, resolutionTree);
-    return compiler.codegen(this, world);
-  }
-}
-
-typedef void DeferredAction();
-
-class DeferredTask {
-  final Element element;
-  final DeferredAction action;
-
-  DeferredTask(this.element, this.action);
-}
-
-/// Interface for registration of element dependencies.
-abstract class Registry {
-  // TODO(johnniwinther): Remove this getter when [Registry] creates a
-  // dependency node.
-  Iterable<Element> get otherDependencies;
-
-  void registerDependency(Element element);
-
-  bool get isForResolution;
-
-  void registerDynamicInvocation(UniverseSelector selector);
-
-  void registerDynamicGetter(UniverseSelector selector);
-
-  void registerDynamicSetter(UniverseSelector selector);
-
-  void registerStaticInvocation(Element element);
-
-  void registerInstantiation(InterfaceType type);
-
-  void registerGetOfStaticFunction(FunctionElement element);
-}
-
-abstract class Backend {
-  final Compiler compiler;
-
-  Backend(this.compiler);
-
-  /// Returns true if the backend supports reflection.
-  bool get supportsReflection;
-
-  /// The [ConstantSystem] used to interpret compile-time constants for this
-  /// backend.
-  ConstantSystem get constantSystem;
-
-  /// The constant environment for the backend interpretation of compile-time
-  /// constants.
-  BackendConstantEnvironment get constants;
-
-  /// The compiler task responsible for the compilation of constants for both
-  /// the frontend and the backend.
-  ConstantCompilerTask get constantCompilerTask;
-
-  /// Backend callback methods for the resolution phase.
-  ResolutionCallbacks get resolutionCallbacks;
-
-  /// The strategy used for collecting and emitting source information.
-  SourceInformationStrategy get sourceInformationStrategy {
-    return const SourceInformationStrategy();
-  }
-
-  // TODO(johnniwinther): Move this to the JavaScriptBackend.
-  String get patchVersion => null;
-
-  /// Set of classes that need to be considered for reflection although not
-  /// otherwise visible during resolution.
-  Iterable<ClassElement> classesRequiredForReflection = const [];
-
-  // Given a [FunctionElement], return a buffer with the code generated for it
-  // or null if no code was generated.
-  CodeBuffer codeOf(Element element) => null;
-
-  void initializeHelperClasses() {}
-
-  void enqueueHelpers(ResolutionEnqueuer world, Registry registry);
-  WorldImpact codegen(CodegenWorkItem work);
-
-  // The backend determines the native resolution enqueuer, with a no-op
-  // default, so tools like dart2dart can ignore the native classes.
-  native.NativeEnqueuer nativeResolutionEnqueuer(world) {
-    return new native.NativeEnqueuer();
-  }
-  native.NativeEnqueuer nativeCodegenEnqueuer(world) {
-    return new native.NativeEnqueuer();
-  }
-
-  /// Generates the output and returns the total size of the generated code.
-  int assembleProgram();
-
-  List<CompilerTask> get tasks;
-
-  void onResolutionComplete() {}
-  void onTypeInferenceComplete() {}
-
-  ItemCompilationContext createItemCompilationContext() {
-    return new ItemCompilationContext();
-  }
-
-  bool classNeedsRti(ClassElement cls);
-  bool methodNeedsRti(FunctionElement function);
-
-  /// Enable compilation of code with compile time errors. Returns `true` if
-  /// supported by the backend.
-  bool enableCodegenWithErrorsIfSupported(Spannable node);
-
-  /// Enable deferred loading. Returns `true` if the backend supports deferred
-  /// loading.
-  bool enableDeferredLoadingIfSupported(Spannable node, Registry registry);
-
-  /// Called during codegen when [constant] has been used.
-  void registerCompileTimeConstant(ConstantValue constant, Registry registry) {}
-
-  /// Called during resolution when a constant value for [metadata] on
-  /// [annotatedElement] has been evaluated.
-  void registerMetadataConstant(MetadataAnnotation metadata,
-                                Element annotatedElement,
-                                Registry registry) {}
-
-  /// Called to notify to the backend that a class is being instantiated.
-  // TODO(johnniwinther): Remove this. It's only called once for each [cls] and
-  // only with [Compiler.globalDependencies] as [registry].
-  void registerInstantiatedClass(ClassElement cls,
-                                 Enqueuer enqueuer,
-                                 Registry registry) {}
-
-  /// Called to notify to the backend that an interface type has been
-  /// instantiated.
-  void registerInstantiatedType(InterfaceType type, Registry registry) {}
-
-  /// Register an is check to the backend.
-  void registerIsCheckForCodegen(DartType type,
-                                 Enqueuer enqueuer,
-                                 Registry registry) {}
-
-  /// Register a runtime type variable bound tests between [typeArgument] and
-  /// [bound].
-  void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
-                                              DartType bound) {}
-
-  /// Returns `true` if [element] represent the assert function.
-  bool isAssertMethod(Element element) => false;
-
-  /**
-   * Call this to register that an instantiated generic class has a call
-   * method.
-   */
-  void registerCallMethodWithFreeTypeVariables(
-      Element callMethod,
-      Enqueuer enqueuer,
-      Registry registry) {}
-
-  /**
-   * Call this to register that a getter exists for a function on an
-   * instantiated generic class.
-   */
-  void registerClosureWithFreeTypeVariables(
-      Element closure,
-      Enqueuer enqueuer,
-      Registry registry) {}
-
-  /// Call this to register that a member has been closurized.
-  void registerBoundClosure(Enqueuer enqueuer) {}
-
-  /// Call this to register that a static function has been closurized.
-  void registerGetOfStaticFunction(Enqueuer enqueuer) {}
-
-  /**
-   * Call this to register that the [:runtimeType:] property has been accessed.
-   */
-  void registerRuntimeType(Enqueuer enqueuer, Registry registry) {}
-
-  /// Call this to register a `noSuchMethod` implementation.
-  void registerNoSuchMethod(FunctionElement noSuchMethodElement) {}
-
-  /// Call this method to enable support for `noSuchMethod`.
-  void enableNoSuchMethod(Enqueuer enqueuer) {}
-
-  /// Returns whether or not `noSuchMethod` support has been enabled.
-  bool get enabledNoSuchMethod => false;
-
-  /// Call this method to enable support for isolates.
-  void enableIsolateSupport(Enqueuer enqueuer) {}
-
-  void registerRequiredType(DartType type, Element enclosingElement) {}
-  void registerClassUsingVariableExpression(ClassElement cls) {}
-
-  void registerConstSymbol(String name, Registry registry) {}
-  void registerNewSymbol(Registry registry) {}
-
-  bool isNullImplementation(ClassElement cls) {
-    return cls == compiler.nullClass;
-  }
-
-  ClassElement get intImplementation => compiler.intClass;
-  ClassElement get doubleImplementation => compiler.doubleClass;
-  ClassElement get numImplementation => compiler.numClass;
-  ClassElement get stringImplementation => compiler.stringClass;
-  ClassElement get listImplementation => compiler.listClass;
-  ClassElement get growableListImplementation => compiler.listClass;
-  ClassElement get fixedListImplementation => compiler.listClass;
-  ClassElement get constListImplementation => compiler.listClass;
-  ClassElement get mapImplementation => compiler.mapClass;
-  ClassElement get constMapImplementation => compiler.mapClass;
-  ClassElement get functionImplementation => compiler.functionClass;
-  ClassElement get typeImplementation => compiler.typeClass;
-  ClassElement get boolImplementation => compiler.boolClass;
-  ClassElement get nullImplementation => compiler.nullClass;
-  ClassElement get uint32Implementation => compiler.intClass;
-  ClassElement get uint31Implementation => compiler.intClass;
-  ClassElement get positiveIntImplementation => compiler.intClass;
-
-  ClassElement defaultSuperclass(ClassElement element) => compiler.objectClass;
-
-  bool isInterceptorClass(ClassElement element) => false;
-
-  /// Returns `true` if [element] is a foreign element, that is, that the
-  /// backend has specialized handling for the element.
-  bool isForeign(Element element) => false;
-
-  /// Processes [element] for resolution and returns the [FunctionElement] that
-  /// defines the implementation of [element].
-  FunctionElement resolveExternalFunction(FunctionElement element) => element;
-
-  /// Returns `true` if [library] is a backend specific library whose members
-  /// have special treatment, such as being allowed to extends blacklisted
-  /// classes or member being eagerly resolved.
-  bool isBackendLibrary(LibraryElement library) {
-    // TODO(johnniwinther): Remove this when patching is only done by the
-    // JavaScript backend.
-    Uri canonicalUri = library.canonicalUri;
-    if (canonicalUri == js_backend.JavaScriptBackend.DART_JS_HELPER ||
-        canonicalUri == js_backend.JavaScriptBackend.DART_INTERCEPTORS) {
-      return true;
-    }
-    return false;
-  }
-
-  void registerStaticUse(Element element, Enqueuer enqueuer) {}
-
-  /// This method is called immediately after the [LibraryElement] [library] has
-  /// been created.
-  void onLibraryCreated(LibraryElement library) {}
-
-  /// This method is called immediately after the [library] and its parts have
-  /// been scanned.
-  Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
-    if (library.canUseNative) {
-      library.forEachLocalMember((Element element) {
-        if (element.isClass) {
-          checkNativeAnnotation(compiler, element);
-        }
-      });
-    }
-    return new Future.value();
-  }
-
-  /// This method is called when all new libraries loaded through
-  /// [LibraryLoader.loadLibrary] has been loaded and their imports/exports
-  /// have been computed.
-  Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
-    return new Future.value();
-  }
-
-  /// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed
-  /// annotations. The arguments corresponds to the unions of the corresponding
-  /// fields of the annotations.
-  void registerMirrorUsage(Set<String> symbols,
-                           Set<Element> targets,
-                           Set<Element> metaTargets) {}
-
-  /// Returns true if this element needs reflection information at runtime.
-  bool isAccessibleByReflection(Element element) => true;
-
-  /// Returns true if this element is covered by a mirrorsUsed annotation.
-  ///
-  /// Note that it might still be ok to tree shake the element away if no
-  /// reflection is used in the program (and thus [isTreeShakingDisabled] is
-  /// still false). Therefore _do not_ use this predicate to decide inclusion
-  /// in the tree, use [requiredByMirrorSystem] instead.
-  bool referencedFromMirrorSystem(Element element, [recursive]) => false;
-
-  /// Returns true if this element has to be enqueued due to
-  /// mirror usage. Might be a subset of [referencedFromMirrorSystem] if
-  /// normal tree shaking is still active ([isTreeShakingDisabled] is false).
-  bool requiredByMirrorSystem(Element element) => false;
-
-  /// Returns true if global optimizations such as type inferencing
-  /// can apply to this element. One category of elements that do not
-  /// apply is runtime helpers that the backend calls, but the
-  /// optimizations don't see those calls.
-  bool canBeUsedForGlobalOptimizations(Element element) => true;
-
-  /// Called when [enqueuer]'s queue is empty, but before it is closed.
-  /// This is used, for example, by the JS backend to enqueue additional
-  /// elements needed for reflection. [recentClasses] is a collection of
-  /// all classes seen for the first time by the [enqueuer] since the last call
-  /// to [onQueueEmpty].
-  ///
-  /// A return value of [:true:] indicates that [recentClasses] has been
-  /// processed and its elements do not need to be seen in the next round. When
-  /// [:false:] is returned, [onQueueEmpty] will be called again once the
-  /// resolution queue has drained and [recentClasses] will be a superset of the
-  /// current value.
-  ///
-  /// There is no guarantee that a class is only present once in
-  /// [recentClasses], but every class seen by the [enqueuer] will be present in
-  /// [recentClasses] at least once.
-  bool onQueueEmpty(Enqueuer enqueuer, Iterable<ClassElement> recentClasses) {
-    return true;
-  }
-
-  /// Called after [element] has been resolved.
-  // TODO(johnniwinther): Change [TreeElements] to [Registry] or a dependency
-  // node. [elements] is currently unused by the implementation.
-  void onElementResolved(Element element, TreeElements elements) {}
-
-  // Does this element belong in the output
-  bool shouldOutput(Element element) => true;
-
-  FunctionElement helperForBadMain() => null;
-
-  FunctionElement helperForMissingMain() => null;
-
-  FunctionElement helperForMainArity() => null;
-
-  void forgetElement(Element element) {}
-
-  void registerMainHasArguments(Enqueuer enqueuer) {}
-
-  void registerAsyncMarker(FunctionElement element,
-                             Enqueuer enqueuer,
-                             Registry registry) {}
-}
-
-/// Backend callbacks function specific to the resolution phase.
-class ResolutionCallbacks {
-  /// Register that [node] is a call to `assert`.
-  void onAssert(Send node, Registry registry) {}
-
-  /// Register that an 'await for' has been seen.
-  void onAsyncForIn(AsyncForIn node, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses string interpolation.
-  void onStringInterpolation(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a catch statement.
-  void onCatchStatement(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program explicitly throws an exception.
-  void onThrowExpression(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a global variable with a lazy initializer.
-  void onLazyField(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses a type variable as an expression.
-  void onTypeVariableExpression(Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program uses a type literal.
-  void onTypeLiteral(DartType type, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a catch statement with a stack trace.
-  void onStackTraceInCatch(Registry registry) {}
-
-  /// Register an is check to the backend.
-  void onIsCheck(DartType type, Registry registry) {}
-
-  /// Called during resolution to notify to the backend that the
-  /// program has a for-in loop.
-  void onSyncForIn(Registry registry) {}
-
-  /// Register an as check to the backend.
-  void onAsCheck(DartType type, Registry registry) {}
-
-  /// Registers that a type variable bounds check might occur at runtime.
-  void onTypeVariableBoundCheck(Registry registry) {}
-
-  /// Register that the application may throw a [NoSuchMethodError].
-  void onThrowNoSuchMethod(Registry registry) {}
-
-  /// Register that the application may throw a [RuntimeError].
-  void onThrowRuntimeError(Registry registry) {}
-
-  /// Register that the application may throw an
-  /// [AbstractClassInstantiationError].
-  void onAbstractClassInstantiation(Registry registry) {}
-
-  /// Register that the application may throw a [FallThroughError].
-  void onFallThroughError(Registry registry) {}
-
-  /// Register that a super call will end up calling
-  /// [: super.noSuchMethod :].
-  void onSuperNoSuchMethod(Registry registry) {}
-
-  /// Register that the application creates a constant map.
-  void onMapLiteral(Registry registry, DartType type, bool isConstant) {}
-
-  /// Called when resolving the `Symbol` constructor.
-  void onSymbolConstructor(Registry registry) {}
-}
-
-/**
- * Key class used in [TokenMap] in which the hash code for a token is based
- * on the [charOffset].
- */
-class TokenKey {
-  final Token token;
-  TokenKey(this.token);
-  int get hashCode => token.charOffset;
-  operator==(other) => other is TokenKey && token == other.token;
-}
-
-/// Map of tokens and the first associated comment.
-/*
- * This implementation was chosen among several candidates for its space/time
- * efficiency by empirical tests of running dartdoc on dartdoc itself. Time
- * measurements for the use of [Compiler.commentMap]:
- *
- * 1) Using [TokenKey] as key (this class): ~80 msec
- * 2) Using [TokenKey] as key + storing a separate map in each script: ~120 msec
- * 3) Using [Token] as key in a [Map]: ~38000 msec
- * 4) Storing comments is new field in [Token]: ~20 msec
- *    (Abandoned due to the increased memory usage)
- * 5) Storing comments in an [Expando]: ~14000 msec
- * 6) Storing token/comments pairs in a linked list: ~5400 msec
- */
-class TokenMap {
-  Map<TokenKey,Token> comments = new Map<TokenKey,Token>();
-
-  Token operator[] (Token key) {
-    if (key == null) return null;
-    return comments[new TokenKey(key)];
-  }
-
-  void operator[]= (Token key, Token value) {
-    if (key == null) return;
-    comments[new TokenKey(key)] = value;
-  }
-}
+import '../compiler_new.dart' as api;
+import 'cache_strategy.dart' show
+    CacheStrategy;
+import 'closure.dart' as closureMapping show
+    ClosureTask;
+import 'common/backend_api.dart' show
+    Backend;
+import 'common/codegen.dart' show
+    CodegenRegistry,
+    CodegenWorkItem;
+import 'common/names.dart' show
+    Identifiers,
+    Uris;
+import 'common/registry.dart' show
+    Registry;
+import 'common/resolution.dart' show
+    ResolutionWorkItem;
+import 'common/tasks.dart' show
+    CompilerTask,
+    GenericTask;
+import 'common/work.dart' show
+    WorkItem;
+import 'compile_time_constants.dart';
+import 'constants/values.dart';
+import 'core_types.dart' show
+    CoreTypes;
+import 'cps_ir/cps_ir_builder_task.dart' show
+    IrBuilderTask;
+import 'dart_backend/dart_backend.dart' as dart_backend;
+import 'dart_types.dart' show
+    DartType,
+    DynamicType,
+    InterfaceType,
+    Types;
+import 'deferred_load.dart' show DeferredLoadTask, OutputUnit;
+import 'diagnostics/code_location.dart';
+import 'diagnostics/diagnostic_listener.dart';
+import 'diagnostics/invariant.dart' show
+    invariant,
+    REPORT_EXCESS_RESOLUTION;
+import 'diagnostics/messages.dart' show
+    Message,
+    MessageKind,
+    MessageTemplate;
+import 'diagnostics/source_span.dart' show
+    SourceSpan;
+import 'diagnostics/spannable.dart' show
+    CURRENT_ELEMENT_SPANNABLE,
+    NO_LOCATION_SPANNABLE,
+    Spannable,
+    SpannableAssertionFailure;
+import 'dump_info.dart' show
+    DumpInfoTask;
+import 'elements/elements.dart';
+import 'elements/modelx.dart' show
+    ErroneousElementX,
+    ClassElementX,
+    CompilationUnitElementX,
+    DeferredLoaderGetterElementX,
+    MethodElementX,
+    LibraryElementX,
+    PrefixElementX,
+    VoidElementX;
+import 'enqueue.dart' show
+    CodegenEnqueuer,
+    Enqueuer,
+    EnqueueTask,
+    ResolutionEnqueuer,
+    QueueFilter,
+    WorldImpact;
+import 'io/source_information.dart' show
+    SourceInformation;
+import 'js_backend/js_backend.dart' as js_backend show
+    JavaScriptBackend;
+import 'library_loader.dart' show
+    LibraryLoader,
+    LibraryLoaderTask,
+    LoadedLibraries;
+import 'mirrors_used.dart' show
+    MirrorUsageAnalyzerTask;
+import 'null_compiler_output.dart' show
+    NullCompilerOutput,
+    NullSink;
+import 'patch_parser.dart' show
+    PatchParserTask;
+import 'resolution/registry.dart' show
+    ResolutionRegistry;
+import 'resolution/resolution.dart' show
+    ResolverTask;
+import 'resolution/tree_elements.dart' show
+    TreeElementMapping;
+import 'scanner/token_map.dart' show
+    TokenMap;
+import 'scanner/scannerlib.dart' show
+    COMMENT_TOKEN,
+    DietParserTask,
+    EOF_TOKEN,
+    ParserTask,
+    ScannerTask,
+    StringToken,
+    Token,
+    TokenPair;
+import 'serialization/task.dart' show
+    SerializationTask;
+import 'script.dart' show
+    Script;
+import 'ssa/ssa.dart' show
+    HInstruction;
+import 'tracer.dart' show
+    Tracer;
+import 'tree/tree.dart' show
+    Node;
+import 'typechecker.dart' show
+    TypeCheckerTask;
+import 'types/types.dart' as ti;
+import 'universe/universe.dart' show
+    CallStructure,
+    Selector,
+    Universe;
+import 'util/util.dart' show
+    Link;
+import 'world.dart' show
+    World;
 
 abstract class Compiler implements DiagnosticListener {
-  static final Uri DART_CORE = new Uri(scheme: 'dart', path: 'core');
-  static final Uri DART_MIRRORS = new Uri(scheme: 'dart', path: 'mirrors');
-  static final Uri DART_NATIVE_TYPED_DATA =
-      new Uri(scheme: 'dart', path: '_native_typed_data');
-  static final Uri DART_INTERNAL = new Uri(scheme: 'dart', path: '_internal');
-  static final Uri DART_ASYNC = new Uri(scheme: 'dart', path: 'async');
 
   final Stopwatch totalCompileTime = new Stopwatch();
   int nextFreeClassId = 0;
@@ -701,7 +164,7 @@
    */
   // TODO(johnniwinther): This should not be a [ResolutionRegistry].
   final Registry mirrorDependencies =
-      new ResolutionRegistry.internal(null, new TreeElementMapping(null));
+      new ResolutionRegistry(null, new TreeElementMapping(null));
 
   final bool enableMinification;
 
@@ -828,6 +291,7 @@
   ClassElement get numClass => _coreTypes.numClass;
   ClassElement get intClass => _coreTypes.intClass;
   ClassElement get doubleClass => _coreTypes.doubleClass;
+  ClassElement get resourceClass => _coreTypes.resourceClass;
   ClassElement get stringClass => _coreTypes.stringClass;
   ClassElement get functionClass => _coreTypes.functionClass;
   ClassElement get nullClass => _coreTypes.nullClass;
@@ -971,30 +435,15 @@
   /// A customizable filter that is applied to enqueued work items.
   QueueFilter enqueuerFilter = new QueueFilter();
 
-  static const String MAIN = 'main';
-  static const String CALL_OPERATOR_NAME = 'call';
-  static const String NO_SUCH_METHOD = 'noSuchMethod';
-  static const int NO_SUCH_METHOD_ARG_COUNT = 1;
+  final Selector symbolValidatedConstructorSelector = new Selector.call(
+      const PublicName('validated'), CallStructure.ONE_ARG);
+
   static const String CREATE_INVOCATION_MIRROR =
       'createInvocationMirror';
-  static const String FROM_ENVIRONMENT = 'fromEnvironment';
-
-  static const String RUNTIME_TYPE = 'runtimeType';
 
   static const String UNDETERMINED_BUILD_ID =
       "build number could not be determined";
 
-  final Selector iteratorSelector =
-      new Selector.getter('iterator', null);
-  final Selector currentSelector =
-      new Selector.getter('current', null);
-  final Selector moveNextSelector =
-      new Selector.call('moveNext', null, 0);
-  final Selector noSuchMethodSelector = new Selector.call(
-      Compiler.NO_SUCH_METHOD, null, Compiler.NO_SUCH_METHOD_ARG_COUNT);
-  final Selector symbolValidatedConstructorSelector = new Selector.call(
-      'validated', null, 1);
-
   bool enabledRuntimeType = false;
   bool enabledFunctionApply = false;
   bool enabledInvokeOn = false;
@@ -1273,11 +722,11 @@
   /// been resolved.
   void onLibraryCreated(LibraryElement library) {
     Uri uri = library.canonicalUri;
-    if (uri == DART_CORE) {
+    if (uri == Uris.dart_core) {
       coreLibrary = library;
-    } else if (uri == DART_NATIVE_TYPED_DATA) {
+    } else if (uri == Uris.dart__native_typed_data) {
       typedDataLibrary = library;
-    } else if (uri == DART_MIRRORS) {
+    } else if (uri == Uris.dart_mirrors) {
       mirrorsLibrary = library;
     }
     backend.onLibraryCreated(library);
@@ -1294,20 +743,20 @@
   /// for [library].
   Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
     Uri uri = library.canonicalUri;
-    if (uri == DART_CORE) {
+    if (uri == Uris.dart_core) {
       initializeCoreClasses();
       identicalFunction = coreLibrary.find('identical');
-    } else if (uri == DART_INTERNAL) {
+    } else if (uri == Uris.dart__internal) {
       symbolImplementationClass = findRequiredElement(library, 'Symbol');
-    } else if (uri == DART_MIRRORS) {
+    } else if (uri == Uris.dart_mirrors) {
       mirrorSystemClass = findRequiredElement(library, 'MirrorSystem');
       mirrorsUsedClass = findRequiredElement(library, 'MirrorsUsed');
-    } else if (uri == DART_ASYNC) {
+    } else if (uri == Uris.dart_async) {
       asyncLibrary = library;
       deferredLibraryClass = findRequiredElement(library, 'DeferredLibrary');
       _coreTypes.futureClass = findRequiredElement(library, 'Future');
       _coreTypes.streamClass = findRequiredElement(library, 'Stream');
-    } else if (uri == DART_NATIVE_TYPED_DATA) {
+    } else if (uri == Uris.dart__native_typed_data) {
       typedDataClass = findRequiredElement(library, 'NativeTypedData');
     } else if (uri == js_backend.JavaScriptBackend.DART_JS_HELPER) {
       patchAnnotationClass = findRequiredElement(library, '_Patch');
@@ -1326,11 +775,11 @@
   /// libraries.
   Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
     return new Future.sync(() {
-      if (!loadedLibraries.containsLibrary(DART_CORE)) {
+      if (!loadedLibraries.containsLibrary(Uris.dart_core)) {
         return null;
       }
       if (!enableExperimentalMirrors &&
-          loadedLibraries.containsLibrary(DART_MIRRORS)) {
+          loadedLibraries.containsLibrary(Uris.dart_mirrors)) {
         // TODO(johnniwinther): Move computation of dependencies to the library
         // loader.
         Uri rootUri = loadedLibraries.rootUri;
@@ -1340,7 +789,7 @@
         // The maximum number of imports chains to show.
         final int compactChainLimit = verbose ? 20 : 10;
         int chainCount = 0;
-        loadedLibraries.forEachImportChain(DART_MIRRORS,
+        loadedLibraries.forEachImportChain(Uris.dart_mirrors,
             callback: (Link<Uri> importChainReversed) {
           Link<CodeLocation> compactImportChain = const Link<CodeLocation>();
           CodeLocation currentCodeLocation =
@@ -1400,7 +849,7 @@
                   coreLibrary.find('proxy')));
 
       if (preserveComments) {
-        return libraryLoader.loadLibrary(DART_MIRRORS)
+        return libraryLoader.loadLibrary(Uris.dart_mirrors)
             .then((LibraryElement libraryElement) {
           documentClass = libraryElement.find('Comment');
         });
@@ -1434,13 +883,13 @@
     } else if (mirrorsUsedClass == cls) {
       mirrorsUsedConstructor = cls.constructors.head;
     } else if (intClass == cls) {
-      intEnvironment = intClass.lookupConstructor(FROM_ENVIRONMENT);
+      intEnvironment = intClass.lookupConstructor(Identifiers.fromEnvironment);
     } else if (stringClass == cls) {
       stringEnvironment =
-          stringClass.lookupConstructor(FROM_ENVIRONMENT);
+          stringClass.lookupConstructor(Identifiers.fromEnvironment);
     } else if (boolClass == cls) {
       boolEnvironment =
-          boolClass.lookupConstructor(FROM_ENVIRONMENT);
+          boolClass.lookupConstructor(Identifiers.fromEnvironment);
     }
   }
 
@@ -1458,6 +907,7 @@
     _coreTypes.numClass = lookupCoreClass('num');
     _coreTypes.intClass = lookupCoreClass('int');
     _coreTypes.doubleClass = lookupCoreClass('double');
+    _coreTypes.resourceClass = lookupCoreClass('Resource');
     _coreTypes.stringClass = lookupCoreClass('String');
     _coreTypes.functionClass = lookupCoreClass('Function');
     _coreTypes.listClass = lookupCoreClass('List');
@@ -1528,30 +978,33 @@
   void computeMain() {
     if (mainApp == null) return;
 
-    Element main = mainApp.findExported(MAIN);
+    Element main = mainApp.findExported(Identifiers.main);
     ErroneousElement errorElement = null;
     if (main == null) {
       if (analyzeOnly) {
         if (!analyzeAll) {
           errorElement = new ErroneousElementX(
-              MessageKind.CONSIDER_ANALYZE_ALL, {'main': MAIN}, MAIN, mainApp);
+              MessageKind.CONSIDER_ANALYZE_ALL, {'main': Identifiers.main},
+              Identifiers.main, mainApp);
         }
       } else {
         // Compilation requires a main method.
         errorElement = new ErroneousElementX(
-            MessageKind.MISSING_MAIN, {'main': MAIN}, MAIN, mainApp);
+            MessageKind.MISSING_MAIN, {'main': Identifiers.main},
+            Identifiers.main, mainApp);
       }
       mainFunction = backend.helperForMissingMain();
     } else if (main.isErroneous && main.isSynthesized) {
       if (main is ErroneousElement) {
         errorElement = main;
       } else {
-        internalError(main, 'Problem with $MAIN.');
+        internalError(main, 'Problem with ${Identifiers.main}.');
       }
       mainFunction = backend.helperForBadMain();
     } else if (!main.isFunction) {
       errorElement = new ErroneousElementX(
-          MessageKind.MAIN_NOT_A_FUNCTION, {'main': MAIN}, MAIN, main);
+          MessageKind.MAIN_NOT_A_FUNCTION, {'main': Identifiers.main},
+          Identifiers.main, main);
       mainFunction = backend.helperForBadMain();
     } else {
       mainFunction = main;
@@ -1562,7 +1015,8 @@
         parameters.orderedForEachParameter((Element parameter) {
           if (index++ < 2) return;
           errorElement = new ErroneousElementX(
-              MessageKind.MAIN_WITH_EXTRA_PARAMETER, {'main': MAIN}, MAIN,
+              MessageKind.MAIN_WITH_EXTRA_PARAMETER, {'main': Identifiers.main},
+              Identifiers.main,
               parameter);
           mainFunction = backend.helperForMainArity();
           // Don't warn about main not being used:
@@ -1572,7 +1026,7 @@
     }
     if (mainFunction == null) {
       if (errorElement == null && !analyzeOnly && !analyzeAll) {
-        internalError(mainApp, "Problem with '$MAIN'.");
+        internalError(mainApp, "Problem with '${Identifiers.main}'.");
       } else {
         mainFunction = errorElement;
       }
@@ -1586,6 +1040,30 @@
     }
   }
 
+  /// Analyze all member of the library in [libraryUri].
+  ///
+  /// If [skipLibraryWithPartOfTag] is `true`, member analysis is skipped if the
+  /// library has a `part of` tag, assuming it is a part and not a library.
+  ///
+  /// This operation assumes an unclosed resolution queue and is only supported
+  /// when the '--analyze-main' option is used.
+  Future<LibraryElement> analyzeUri(
+      Uri libraryUri,
+      {bool skipLibraryWithPartOfTag: true}) {
+    assert(analyzeMain);
+    log('Analyzing $libraryUri ($buildId)');
+    return libraryLoader.loadLibrary(libraryUri).then((LibraryElement library) {
+      var compilationUnit = library.compilationUnit;
+      if (skipLibraryWithPartOfTag && compilationUnit.partTag != null) {
+        return null;
+      }
+      fullyEnqueueLibrary(library, enqueuer.resolution);
+      emptyQueue(enqueuer.resolution);
+      enqueuer.resolution.logSummary(log);
+      return library;
+    });
+  }
+
   /// Performs the compilation when all libraries have been loaded.
   void compileLoadedLibraries() {
     computeMain();
@@ -1723,6 +1201,17 @@
     }
   }
 
+  /**
+   * Empty the [world] queue.
+   */
+  void emptyQueue(Enqueuer world) {
+    world.forEach((WorkItem work) {
+      withCurrentElement(work.element, () {
+        world.applyImpact(work.element, work.run(this, world));
+      });
+    });
+  }
+
   void processQueue(Enqueuer world, Element main) {
     world.nativeEnqueuer.processNativeClasses(libraryLoader.libraries);
     if (main != null && !main.isErroneous) {
@@ -1744,11 +1233,7 @@
     if (verbose) {
       progress.reset();
     }
-    world.forEach((WorkItem work) {
-      withCurrentElement(work.element, () {
-        world.applyImpact(work.element, work.run(this, world));
-      });
-    });
+    emptyQueue(world);
     world.queueIsClosed = true;
     assert(compilationFailed || world.checkNoEnqueuedInvokedInstanceMethods());
   }
@@ -1935,8 +1420,7 @@
     if (uri == null && currentElement != null) {
       uri = currentElement.compilationUnit.script.resourceUri;
     }
-    return SourceSpan.withCharacterOffsets(begin, end,
-      (beginOffset, endOffset) => new SourceSpan(uri, beginOffset, endOffset));
+    return new SourceSpan.fromTokens(uri, begin, end);
   }
 
   SourceSpan spanFromNode(Node node) {
@@ -2189,232 +1673,12 @@
   }
 }
 
-class CompilerTask {
-  final Compiler compiler;
-  final Stopwatch watch;
-  UserTag profilerTag;
-
-  CompilerTask(Compiler compiler)
-      : this.compiler = compiler,
-        watch = (compiler.verbose) ? new Stopwatch() : null;
-
-  String get name => "Unknown task '${this.runtimeType}'";
-  int get timing => (watch != null) ? watch.elapsedMilliseconds : 0;
-
-  int get timingMicroseconds => (watch != null) ? watch.elapsedMicroseconds : 0;
-
-  UserTag getProfilerTag() {
-    if (profilerTag == null) profilerTag = new UserTag(name);
-    return profilerTag;
-  }
-
-  measure(action()) {
-    // In verbose mode when watch != null.
-    if (watch == null) return action();
-    CompilerTask previous = compiler.measuredTask;
-    if (identical(this, previous)) return action();
-    compiler.measuredTask = this;
-    if (previous != null) previous.watch.stop();
-    watch.start();
-    UserTag oldTag = getProfilerTag().makeCurrent();
-    try {
-      return action();
-    } finally {
-      watch.stop();
-      oldTag.makeCurrent();
-      if (previous != null) previous.watch.start();
-      compiler.measuredTask = previous;
-    }
-  }
-
-  measureElement(Element element, action()) {
-    compiler.withCurrentElement(element, () => measure(action));
-  }
-}
-
-class SourceSpan implements Spannable {
-  final Uri uri;
-  final int begin;
-  final int end;
-
-  const SourceSpan(this.uri, this.begin, this.end);
-
-  static withCharacterOffsets(Token begin, Token end,
-                     f(int beginOffset, int endOffset)) {
-    final beginOffset = begin.charOffset;
-    final endOffset = end.charOffset + end.charCount;
-
-    // [begin] and [end] might be the same for the same empty token. This
-    // happens for instance when scanning '$$'.
-    assert(endOffset >= beginOffset);
-    return f(beginOffset, endOffset);
-  }
-
-  int get hashCode {
-    return 13 * uri.hashCode +
-           17 * begin.hashCode +
-           19 * end.hashCode;
-  }
-
-  bool operator ==(other) {
-    if (identical(this, other)) return true;
-    if (other is! SourceSpan) return false;
-    return uri == other.uri &&
-           begin == other.begin &&
-           end == other.end;
-  }
-
-  String toString() => 'SourceSpan($uri, $begin, $end)';
-}
-
-/// Flag that can be used in assertions to assert that a code path is only
-/// executed as part of development.
-///
-/// This flag is automatically set to true if helper methods like, [debugPrint],
-/// [debugWrapPrint], [trace], and [reportHere] are called.
-bool DEBUG_MODE = false;
-
-/// Assert that [DEBUG_MODE] is `true` and provide [message] as part of the
-/// error message.
-assertDebugMode(String message) {
-  assert(invariant(NO_LOCATION_SPANNABLE, DEBUG_MODE,
-      message: 'Debug mode is not enabled: $message'));
-}
-
-/**
- * Throws a [SpannableAssertionFailure] if [condition] is
- * [:false:]. [condition] must be either a [:bool:] or a no-arg
- * function returning a [:bool:].
- *
- * Use this method to provide better information for assertion by calling
- * [invariant] as the argument to an [:assert:] statement:
- *
- *     assert(invariant(position, isValid));
- *
- * [spannable] must be non-null and will be used to provide positional
- * information in the generated error message.
- */
-bool invariant(Spannable spannable, var condition, {var message: null}) {
-  // TODO(johnniwinther): Use [spannable] and [message] to provide better
-  // information on assertion errors.
-  if (spannable == null) {
-    throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE,
-        "Spannable was null for invariant. Use CURRENT_ELEMENT_SPANNABLE.");
-  }
-  if (condition is Function){
-    condition = condition();
-  }
-  if (!condition) {
-    if (message is Function) {
-      message = message();
-    }
-    throw new SpannableAssertionFailure(spannable, message);
-  }
-  return true;
-}
-
-/// Returns `true` when [s] is private if used as an identifier.
-bool isPrivateName(String s) => !s.isEmpty && s.codeUnitAt(0) == $_;
-
-/// Returns `true` when [s] is public if used as an identifier.
-bool isPublicName(String s) => !isPrivateName(s);
-
 /// Information about suppressed warnings and hints for a given library.
 class SuppressionInfo {
   int warnings = 0;
   int hints = 0;
 }
 
-class GenericTask extends CompilerTask {
-  final String name;
-
-  GenericTask(this.name, Compiler compiler)
-      : super(compiler);
-}
-
-/// [CodeLocation] divides uris into different classes.
-///
-/// These are used to group uris from user code, platform libraries and
-/// packages.
-abstract class CodeLocation {
-  /// Returns `true` if [uri] is in this code location.
-  bool inSameLocation(Uri uri);
-
-  /// Returns the uri of this location relative to [baseUri].
-  String relativize(Uri baseUri);
-
-  factory CodeLocation(Uri uri) {
-    if (uri.scheme == 'package') {
-      int slashPos = uri.path.indexOf('/');
-      if (slashPos != -1) {
-        String packageName = uri.path.substring(0, slashPos);
-        return new PackageLocation(packageName);
-      } else {
-        return new UriLocation(uri);
-      }
-    } else {
-      return new SchemeLocation(uri);
-    }
-  }
-}
-
-/// A code location defined by the scheme of the uri.
-///
-/// Used for non-package uris, such as 'dart', 'file', and 'http'.
-class SchemeLocation implements CodeLocation {
-  final Uri uri;
-
-  SchemeLocation(this.uri);
-
-  bool inSameLocation(Uri uri) {
-    return this.uri.scheme == uri.scheme;
-  }
-
-  String relativize(Uri baseUri) {
-    return uri_extras.relativize(baseUri, uri, false);
-  }
-}
-
-/// A code location defined by the package name.
-///
-/// Used for package uris, separated by their `package names`, that is, the
-/// 'foo' of 'package:foo/bar.dart'.
-class PackageLocation implements CodeLocation {
-  final String packageName;
-
-  PackageLocation(this.packageName);
-
-  bool inSameLocation(Uri uri) {
-    return uri.scheme == 'package' && uri.path.startsWith('$packageName/');
-  }
-
-  String relativize(Uri baseUri) => 'package:$packageName';
-}
-
-/// A code location defined by the whole uri.
-///
-/// Used for package uris with no package name. For instance 'package:foo.dart'.
-class UriLocation implements CodeLocation {
-  final Uri uri;
-
-  UriLocation(this.uri);
-
-  bool inSameLocation(Uri uri) => this.uri == uri;
-
-  String relativize(Uri baseUri) {
-    return uri_extras.relativize(baseUri, uri, false);
-  }
-}
-
-/// A code location that contains any uri.
-class AnyLocation implements CodeLocation {
-  const AnyLocation();
-
-  bool inSameLocation(Uri uri) => true;
-
-  String relativize(Uri baseUri) => '$baseUri';
-}
-
 class _CompilerCoreTypes implements CoreTypes {
   final Compiler compiler;
 
@@ -2434,6 +1698,7 @@
   ClassElement futureClass;
   ClassElement iterableClass;
   ClassElement streamClass;
+  ClassElement resourceClass;
 
   _CompilerCoreTypes(this.compiler);
 
@@ -2453,6 +1718,9 @@
   InterfaceType get intType => intClass.computeType(compiler);
 
   @override
+  InterfaceType get resourceType => resourceClass.computeType(compiler);
+
+  @override
   InterfaceType listType([DartType elementType]) {
     InterfaceType type = listClass.computeType(compiler);
     if (elementType == null) {
@@ -2517,5 +1785,3 @@
     return type.createInstantiation([elementType]);
   }
 }
-
-typedef void InternalErrorFunction(Spannable location, String message);
diff --git a/pkg/compiler/lib/src/constant_system_dart.dart b/pkg/compiler/lib/src/constant_system_dart.dart
index f140cf5..940e764 100644
--- a/pkg/compiler/lib/src/constant_system_dart.dart
+++ b/pkg/compiler/lib/src/constant_system_dart.dart
@@ -4,11 +4,13 @@
 
 library dart2js.constant_system.dart;
 
+import 'compiler.dart' show
+    Compiler;
 import 'constants/constant_system.dart';
 import 'constants/values.dart';
-import 'dart2jslib.dart' show Compiler;
 import 'dart_types.dart';
-import 'tree/tree.dart' show DartString;
+import 'tree/tree.dart' show
+    DartString;
 
 const DART_CONSTANT_SYSTEM = const DartConstantSystem();
 
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart
new file mode 100644
index 0000000..e3773cf
--- /dev/null
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart
@@ -0,0 +1,385 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// TODO(johnniwinther): Remove this library when all constant constructors are
+// computed during resolution.
+library dart2js.constants.constant_constructors;
+
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../elements/elements.dart';
+import '../resolution/operators.dart';
+import '../resolution/semantic_visitor.dart';
+import '../resolution/send_resolver.dart' show
+    DeclarationResolverMixin;
+import '../resolution/send_structure.dart';
+import '../resolution/tree_elements.dart' show
+    TreeElements;
+import '../tree/tree.dart';
+import '../universe/universe.dart' show CallStructure;
+import 'constructors.dart';
+import 'expressions.dart';
+
+ConstantConstructor computeConstantConstructor(ResolvedAst resolvedAst) {
+  ConstantConstructorComputer visitor =
+      new ConstantConstructorComputer(resolvedAst.elements);
+  return resolvedAst.node.accept(visitor);
+}
+
+class ConstantConstructorComputer extends SemanticVisitor
+    with SemanticDeclarationResolvedMixin,
+         DeclarationResolverMixin,
+         GetBulkMixin,
+         SetBulkMixin,
+         ErrorBulkMixin,
+         InvokeBulkMixin,
+         IndexSetBulkMixin,
+         CompoundBulkMixin,
+         SetIfNullBulkMixin,
+         UnaryBulkMixin,
+         BaseBulkMixin,
+         BinaryBulkMixin,
+         PrefixBulkMixin,
+         PostfixBulkMixin,
+         NewBulkMixin,
+         InitializerBulkMixin,
+         FunctionBulkMixin,
+         VariableBulkMixin
+    implements SemanticDeclarationVisitor, SemanticSendVisitor {
+  final Map<FieldElement, ConstantExpression> fieldMap =
+      <FieldElement, ConstantExpression>{};
+  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues =
+      <dynamic/*int|String*/, ConstantExpression>{};
+
+  ConstantConstructorComputer(TreeElements elements)
+      : super(elements);
+
+  SemanticDeclarationVisitor get declVisitor => this;
+
+  SemanticSendVisitor get sendVisitor => this;
+
+  ClassElement get currentClass => currentConstructor.enclosingClass;
+
+  ConstructorElement get currentConstructor => elements.analyzedElement;
+
+  apply(Node node, [_]) => node.accept(this);
+
+  visitNode(Node node) {
+    internalError(node, 'Unhandled node $node: ${node.toDebugString()}');
+  }
+
+  @override
+  bulkHandleNode(Node node, String template, _) {
+    internalError(node, template.replaceFirst('#' , '$node'));
+  }
+
+  internalError(Node node, String message) {
+    throw new UnsupportedError(message);
+  }
+
+  ConstantConstructor visitGenerativeConstructorDeclaration(
+        FunctionExpression node,
+        ConstructorElement constructor,
+        NodeList parameters,
+        NodeList initializers,
+        Node body,
+        _) {
+    applyParameters(parameters, _);
+    ConstructedConstantExpression constructorInvocation =
+        applyInitializers(node, _);
+    return new GenerativeConstantConstructor(
+        currentClass.thisType, defaultValues, fieldMap, constructorInvocation);
+  }
+
+  ConstantConstructor visitRedirectingGenerativeConstructorDeclaration(
+      FunctionExpression node,
+      ConstructorElement constructor,
+      NodeList parameters,
+      NodeList initializers,
+      _) {
+    applyParameters(parameters, _);
+    ConstructedConstantExpression constructorInvocation =
+        applyInitializers(node, _);
+    return new RedirectingGenerativeConstantConstructor(
+        defaultValues, constructorInvocation);
+  }
+
+  ConstantConstructor visitRedirectingFactoryConstructorDeclaration(
+      FunctionExpression node,
+      ConstructorElement constructor,
+      NodeList parameters,
+      InterfaceType redirectionType,
+      ConstructorElement redirectionTarget,
+      _) {
+    List<String> argumentNames = [];
+    List<ConstantExpression> arguments = [];
+    int index = 0;
+    for (ParameterElement parameter in constructor.parameters) {
+      if (parameter.isNamed) {
+        String name = parameter.name;
+        argumentNames.add(name);
+        arguments.add(new NamedArgumentReference(name));
+      } else {
+        arguments.add(new PositionalArgumentReference(index));
+      }
+      index++;
+    }
+    CallStructure callStructure = new CallStructure(index, argumentNames);
+
+    return new RedirectingFactoryConstantConstructor(
+        new ConstructedConstantExpression(
+            redirectionType,
+            redirectionTarget,
+            callStructure,
+            arguments));
+  }
+
+  @override
+  visitFactoryConstructorDeclaration(
+      FunctionExpression node,
+      ConstructorElement constructor,
+      NodeList parameters,
+      Node body, _) {
+    // TODO(johnniwinther): Handle constant constructors with errors.
+    internalError(node, "Factory constructor cannot be constant: $node.");
+  }
+
+  applyParameters(NodeList parameters, _) {
+    computeParameterStructures(parameters).forEach((s) => s.dispatch(this, _));
+  }
+
+  visitParameterDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      ParameterElement parameter,
+      int index,
+      _) {
+    // Do nothing.
+  }
+
+  visitOptionalParameterDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      ParameterElement parameter,
+      ConstantExpression defaultValue,
+      int index,
+      _) {
+    assert(invariant(node, defaultValue != null));
+    defaultValues[index] = defaultValue;
+  }
+
+  visitNamedParameterDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      ParameterElement parameter,
+      ConstantExpression defaultValue,
+      _) {
+    assert(invariant(node, defaultValue != null));
+    String name = parameter.name;
+    defaultValues[name] = defaultValue;
+  }
+
+  visitInitializingFormalDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      InitializingFormalElement parameter,
+      int index,
+      _) {
+    fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index);
+  }
+
+  visitOptionalInitializingFormalDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      InitializingFormalElement parameter,
+      ConstantExpression defaultValue,
+      int index,
+      _) {
+    assert(invariant(node, defaultValue != null));
+    defaultValues[index] = defaultValue;
+    fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index);
+  }
+
+  visitNamedInitializingFormalDeclaration(
+      VariableDefinitions node,
+      Node definition,
+      InitializingFormalElement parameter,
+      ConstantExpression defaultValue,
+      _) {
+    assert(invariant(node, defaultValue != null));
+    String name = parameter.name;
+    defaultValues[name] = defaultValue;
+    fieldMap[parameter.fieldElement] = new NamedArgumentReference(name);
+  }
+
+  /// Apply this visitor to the constructor [initializers].
+  ConstructedConstantExpression applyInitializers(
+      FunctionExpression constructor, _) {
+    ConstructedConstantExpression constructorInvocation;
+    InitializersStructure initializers =
+        computeInitializersStructure(constructor);
+    for (InitializerStructure structure in initializers.initializers) {
+      if (structure.isConstructorInvoke) {
+        constructorInvocation = structure.dispatch(this, _);
+      } else {
+        structure.dispatch(this, _);
+      }
+    }
+    return constructorInvocation;
+  }
+
+  visitFieldInitializer(
+      SendSet node,
+      FieldElement field,
+      Node initializer,
+      _) {
+    fieldMap[field] = apply(initializer);
+  }
+
+  visitParameterGet(
+      Send node,
+      ParameterElement parameter,
+      _) {
+    if (parameter.isNamed) {
+      return new NamedArgumentReference(parameter.name);
+    } else {
+      return new PositionalArgumentReference(
+          parameter.functionDeclaration.parameters.indexOf(parameter));
+    }
+  }
+
+  ConstructedConstantExpression visitSuperConstructorInvoke(
+      Send node,
+      ConstructorElement superConstructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    List<ConstantExpression> argumentExpression =
+        arguments.nodes.map((a) => apply(a)).toList();
+    return new ConstructedConstantExpression(
+        type,
+        superConstructor,
+        callStructure,
+        argumentExpression);
+  }
+
+  ConstructedConstantExpression visitImplicitSuperConstructorInvoke(
+      FunctionExpression node,
+      ConstructorElement superConstructor,
+      InterfaceType type,
+      _) {
+     return new ConstructedConstantExpression(
+         type,
+         superConstructor,
+         CallStructure.NO_ARGS,
+         const <ConstantExpression>[]);
+  }
+
+  ConstructedConstantExpression visitThisConstructorInvoke(
+      Send node,
+      ConstructorElement thisConstructor,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    List<ConstantExpression> argumentExpression =
+        arguments.nodes.map((a) => apply(a)).toList();
+    return new ConstructedConstantExpression(
+        currentClass.thisType,
+        thisConstructor,
+        callStructure,
+        argumentExpression);
+  }
+
+  @override
+  ConstantExpression visitBinary(
+      Send node,
+      Node left,
+      BinaryOperator operator,
+      Node right,
+      _) {
+    return new BinaryConstantExpression(
+        apply(left), operator, apply(right));
+  }
+
+
+  @override
+  ConstantExpression visitUnary(
+      Send node,
+      UnaryOperator operator,
+      Node expression,
+      _) {
+    return new UnaryConstantExpression(
+        operator, apply(expression));
+  }
+
+  @override
+  ConstantExpression visitStaticFieldGet(
+      Send node,
+      FieldElement field,
+      _) {
+    return new VariableConstantExpression(field);
+  }
+
+  @override
+  ConstantExpression visitTopLevelFieldGet(
+      Send node,
+      FieldElement field,
+      _) {
+    return new VariableConstantExpression(field);
+  }
+
+  @override
+  ConstantExpression visitLiteralInt(LiteralInt node) {
+    return new IntConstantExpression(node.value);
+  }
+
+  @override
+  ConstantExpression visitLiteralBool(LiteralBool node) {
+    return new BoolConstantExpression(node.value);
+  }
+
+  @override
+  ConstantExpression visitLiteralNull(LiteralNull node) {
+    return new NullConstantExpression();
+  }
+
+  @override
+  ConstantExpression visitLiteralString(LiteralString node) {
+    return new StringConstantExpression(node.dartString.slowToString());
+  }
+
+  @override
+  ConstantExpression visitConditional(Conditional node) {
+    return new ConditionalConstantExpression(
+        apply(node.condition),
+        apply(node.thenExpression),
+        apply(node.elseExpression));
+  }
+
+  @override
+  ConstantExpression visitParenthesizedExpression(ParenthesizedExpression node) {
+    return apply(node.expression);
+  }
+
+  @override
+  ConstantExpression visitTopLevelFunctionInvoke(
+      Send node,
+      MethodElement function,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    if (function.name != 'identical' || !function.library.isDartCore) {
+      throw new UnsupportedError("Unexpected function call: $function");
+    }
+    return new IdenticalConstantExpression(
+        apply(arguments.nodes.head), apply(arguments.nodes.tail.head));
+  }
+
+  @override
+  ConstantExpression visitNamedArgument(NamedArgument node) {
+    return apply(node.expression);
+  }
+}
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/constants/constant_system.dart b/pkg/compiler/lib/src/constants/constant_system.dart
index 085fe29..d99d795 100644
--- a/pkg/compiler/lib/src/constants/constant_system.dart
+++ b/pkg/compiler/lib/src/constants/constant_system.dart
@@ -5,9 +5,11 @@
 library dart2js.constant_system;
 
 import '../dart_types.dart';
-import '../dart2jslib.dart' show Compiler;
+import '../compiler.dart' show
+    Compiler;
 import '../resolution/operators.dart';
-import '../tree/tree.dart' show DartString;
+import '../tree/tree.dart' show
+    DartString;
 import 'values.dart';
 
 abstract class Operation {
diff --git a/pkg/compiler/lib/src/constants/constructors.dart b/pkg/compiler/lib/src/constants/constructors.dart
index 1e588a8..a13149a 100644
--- a/pkg/compiler/lib/src/constants/constructors.dart
+++ b/pkg/compiler/lib/src/constants/constructors.dart
@@ -4,374 +4,251 @@
 
 library dart2js.constants.constructors;
 
-import '../dart2jslib.dart';
 import '../dart_types.dart';
-import '../elements/elements.dart';
-import '../resolution/resolution.dart';
-import '../resolution/operators.dart';
-import '../resolution/semantic_visitor.dart';
-import '../resolution/send_structure.dart';
-import '../tree/tree.dart';
+import '../elements/elements.dart' show
+    ConstructorElement,
+    FieldElement;
 import '../universe/universe.dart' show CallStructure;
+import '../util/util.dart';
+import 'evaluation.dart';
 import 'expressions.dart';
 
-ConstantConstructor computeConstantConstructor(ResolvedAst resolvedAst) {
-  ConstantConstructorComputer visitor =
-      new ConstantConstructorComputer(resolvedAst.elements);
-  return resolvedAst.node.accept(visitor);
+enum ConstantConstructorKind {
+  GENERATIVE,
+  REDIRECTING_GENERATIVE,
+  REDIRECTING_FACTORY,
 }
 
-class ConstantConstructorComputer extends SemanticVisitor
-    with SemanticDeclarationResolvedMixin,
-         DeclarationResolverMixin,
-         GetBulkMixin,
-         SetBulkMixin,
-         ErrorBulkMixin,
-         InvokeBulkMixin,
-         IndexSetBulkMixin,
-         CompoundBulkMixin,
-         UnaryBulkMixin,
-         BaseBulkMixin,
-         BinaryBulkMixin,
-         PrefixBulkMixin,
-         PostfixBulkMixin,
-         NewBulkMixin,
-         InitializerBulkMixin,
-         FunctionBulkMixin,
-         VariableBulkMixin
-    implements SemanticDeclarationVisitor, SemanticSendVisitor {
-  final Map<FieldElement, ConstantExpression> fieldMap =
-      <FieldElement, ConstantExpression>{};
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues =
-      <dynamic/*int|String*/, ConstantExpression>{};
+/// Definition of a constant constructor.
+abstract class ConstantConstructor {
+  ConstantConstructorKind get kind;
 
-  ConstantConstructorComputer(TreeElements elements)
-      : super(elements);
+  /// Computes the type of the instance created in a const constructor
+  /// invocation with type [newType].
+  InterfaceType computeInstanceType(InterfaceType newType);
 
-  SemanticDeclarationVisitor get declVisitor => this;
+  /// Computes the constant expressions of the fields of the created instance
+  /// in a const constructor invocation with [arguments].
+  Map<FieldElement, ConstantExpression> computeInstanceFields(
+      List<ConstantExpression> arguments,
+      CallStructure callStructure);
 
-  SemanticSendVisitor get sendVisitor => this;
+  accept(ConstantConstructorVisitor visitor, arg);
+}
 
-  ClassElement get currentClass => currentConstructor.enclosingClass;
+abstract class ConstantConstructorVisitor<R, A> {
+  const ConstantConstructorVisitor();
 
-  ConstructorElement get currentConstructor => elements.analyzedElement;
-
-  apply(Node node, [_]) => node.accept(this);
-
-  visitNode(Node node) {
-    internalError(node, 'Unhandled node $node: ${node.toDebugString()}');
+  R visit(ConstantConstructor constantConstructor, A context) {
+    return constantConstructor.accept(this, context);
   }
 
-  @override
-  bulkHandleNode(Node node, String template, _) {
-    internalError(node, template.replaceFirst('#' , '$node'));
+  R visitGenerative(GenerativeConstantConstructor constructor, A arg);
+  R visitRedirectingGenerative(
+      RedirectingGenerativeConstantConstructor constructor, A arg);
+  R visitRedirectingFactory(
+      RedirectingFactoryConstantConstructor constructor, A arg);
+}
+
+/// A generative constant constructor.
+class GenerativeConstantConstructor implements ConstantConstructor{
+  final InterfaceType type;
+  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final Map<FieldElement, ConstantExpression> fieldMap;
+  final ConstructedConstantExpression superConstructorInvocation;
+
+  GenerativeConstantConstructor(
+      this.type,
+      this.defaultValues,
+      this.fieldMap,
+      this.superConstructorInvocation);
+
+  ConstantConstructorKind get kind => ConstantConstructorKind.GENERATIVE;
+
+  InterfaceType computeInstanceType(InterfaceType newType) {
+    return type.substByContext(newType);
   }
 
-  internalError(Node node, String message) {
-    throw new UnsupportedError(message);
+  Map<FieldElement, ConstantExpression> computeInstanceFields(
+      List<ConstantExpression> arguments,
+      CallStructure callStructure) {
+    NormalizedArguments args = new NormalizedArguments(
+        defaultValues, callStructure, arguments);
+    Map<FieldElement, ConstantExpression> appliedFieldMap =
+        applyFields(args, superConstructorInvocation);
+    fieldMap.forEach((FieldElement field, ConstantExpression constant) {
+     appliedFieldMap[field] = constant.apply(args);
+    });
+    return appliedFieldMap;
   }
 
-  ConstantConstructor visitGenerativeConstructorDeclaration(
-        FunctionExpression node,
-        ConstructorElement constructor,
-        NodeList parameters,
-        NodeList initializers,
-        Node body,
-        _) {
-    applyParameters(parameters, _);
-    ConstructedConstantExpression constructorInvocation =
-        applyInitializers(node, _);
-    return new GenerativeConstantConstructor(
-        currentClass.thisType, defaultValues, fieldMap, constructorInvocation);
+  accept(ConstantConstructorVisitor visitor, arg) {
+    return visitor.visitGenerative(this, arg);
   }
 
-  ConstantConstructor visitRedirectingGenerativeConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      NodeList initializers,
-      _) {
-    applyParameters(parameters, _);
-    ConstructedConstantExpression constructorInvocation =
-        applyInitializers(node, _);
-    return new RedirectingGenerativeConstantConstructor(
-        defaultValues, constructorInvocation);
+  int get hashCode {
+    int hash = Hashing.objectHash(type);
+    hash = Hashing.mapHash(defaultValues, hash);
+    hash = Hashing.mapHash(fieldMap, hash);
+    return Hashing.objectHash(superConstructorInvocation, hash);
   }
 
-  ConstantConstructor visitRedirectingFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      InterfaceType redirectionType,
-      ConstructorElement redirectionTarget,
-      _) {
-    List<String> argumentNames = [];
-    List<ConstantExpression> arguments = [];
-    int index = 0;
-    for (ParameterElement parameter in constructor.parameters) {
-      if (parameter.isNamed) {
-        String name = parameter.name;
-        argumentNames.add(name);
-        arguments.add(new NamedArgumentReference(name));
-      } else {
-        arguments.add(new PositionalArgumentReference(index));
-      }
-      index++;
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! GenerativeConstantConstructor) return false;
+    return
+        type == other.type &&
+        superConstructorInvocation == other.superConstructorInvocation &&
+        mapEquals(defaultValues, other.defaultValues) &&
+        mapEquals(fieldMap, other.fieldMap);
+  }
+
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write("{'type': $type");
+    defaultValues.forEach((key, ConstantExpression expression) {
+      sb.write(",\n 'default:${key}': ${expression.getText()}");
+    });
+    fieldMap.forEach((FieldElement field, ConstantExpression expression) {
+      sb.write(",\n 'field:${field}': ${expression.getText()}");
+    });
+    if (superConstructorInvocation != null) {
+      sb.write(",\n 'constructor: ${superConstructorInvocation.getText()}");
     }
-    CallStructure callStructure = new CallStructure(index, argumentNames);
-
-    return new RedirectingFactoryConstantConstructor(
-        new ConstructedConstantExpression(
-            redirectionType,
-            redirectionTarget,
-            callStructure,
-            arguments));
+    sb.write("}");
+    return sb.toString();
   }
 
-  @override
-  visitFactoryConstructorDeclaration(
-      FunctionExpression node,
-      ConstructorElement constructor,
-      NodeList parameters,
-      Node body, _) {
-    // TODO(johnniwinther): Handle constant constructors with errors.
-    internalError(node, "Factory constructor cannot be constant: $node.");
-  }
-
-  applyParameters(NodeList parameters, _) {
-    computeParameterStructures(parameters).forEach((s) => s.dispatch(this, _));
-  }
-
-  visitParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      int index,
-      _) {
-    // Do nothing.
-  }
-
-  visitOptionalParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      int index,
-      _) {
-    assert(invariant(node, defaultValue != null));
-    defaultValues[index] = defaultValue;
-  }
-
-  visitNamedParameterDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      ParameterElement parameter,
-      ConstantExpression defaultValue,
-      _) {
-    assert(invariant(node, defaultValue != null));
-    String name = parameter.name;
-    defaultValues[name] = defaultValue;
-  }
-
-  visitInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      int index,
-      _) {
-    fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index);
-  }
-
-  visitOptionalInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      ConstantExpression defaultValue,
-      int index,
-      _) {
-    assert(invariant(node, defaultValue != null));
-    defaultValues[index] = defaultValue;
-    fieldMap[parameter.fieldElement] = new PositionalArgumentReference(index);
-  }
-
-  visitNamedInitializingFormalDeclaration(
-      VariableDefinitions node,
-      Node definition,
-      InitializingFormalElement parameter,
-      ConstantExpression defaultValue,
-      _) {
-    assert(invariant(node, defaultValue != null));
-    String name = parameter.name;
-    defaultValues[name] = defaultValue;
-    fieldMap[parameter.fieldElement] = new NamedArgumentReference(name);
-  }
-
-  /// Apply this visitor to the constructor [initializers].
-  ConstructedConstantExpression applyInitializers(
-      FunctionExpression constructor, _) {
-    ConstructedConstantExpression constructorInvocation;
-    InitializersStructure initializers =
-        computeInitializersStructure(constructor);
-    for (InitializerStructure structure in initializers.initializers) {
-      if (structure.isConstructorInvoke) {
-        constructorInvocation = structure.dispatch(this, _);
-      } else {
-        structure.dispatch(this, _);
+  static bool mapEquals(Map map1, Map map2) {
+    if (map1.length != map1.length) return false;
+    for (var key in map1.keys) {
+      if (map1[key] != map2[key]) {
+        return false;
       }
     }
-    return constructorInvocation;
+    return true;
   }
 
-  visitFieldInitializer(
-      SendSet node,
-      FieldElement field,
-      Node initializer,
-      _) {
-    fieldMap[field] = apply(initializer);
-  }
-
-  visitParameterGet(
-      Send node,
-      ParameterElement parameter,
-      _) {
-    if (parameter.isNamed) {
-      return new NamedArgumentReference(parameter.name);
-    } else {
-      return new PositionalArgumentReference(
-          parameter.functionDeclaration.parameters.indexOf(parameter));
+  /// Creates the field-to-constant map from applying [args] to
+  /// [constructorInvocation]. If [constructorInvocation] is `null`, an empty
+  /// map is created.
+  static Map<FieldElement, ConstantExpression> applyFields(
+      NormalizedArguments args,
+      ConstructedConstantExpression constructorInvocation) {
+    Map<FieldElement, ConstantExpression> appliedFieldMap =
+        <FieldElement, ConstantExpression>{};
+    if (constructorInvocation != null) {
+      Map<FieldElement, ConstantExpression> fieldMap =
+          constructorInvocation.computeInstanceFields();
+      fieldMap.forEach((FieldElement field, ConstantExpression constant) {
+        appliedFieldMap[field] = constant.apply(args);
+      });
     }
+    return appliedFieldMap;
+  }
+}
+
+/// A redirecting generative constant constructor.
+class RedirectingGenerativeConstantConstructor implements ConstantConstructor {
+  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final ConstructedConstantExpression thisConstructorInvocation;
+
+  RedirectingGenerativeConstantConstructor(
+      this.defaultValues,
+      this.thisConstructorInvocation);
+
+  ConstantConstructorKind get kind {
+    return ConstantConstructorKind.REDIRECTING_GENERATIVE;
   }
 
-  ConstructedConstantExpression visitSuperConstructorInvoke(
-      Send node,
-      ConstructorElement superConstructor,
-      InterfaceType type,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    List<ConstantExpression> argumentExpression =
-        arguments.nodes.map((a) => apply(a)).toList();
-    return new ConstructedConstantExpression(
-        type,
-        superConstructor,
-        callStructure,
-        argumentExpression);
+  InterfaceType computeInstanceType(InterfaceType newType) {
+    return thisConstructorInvocation.computeInstanceType()
+        .substByContext(newType);
   }
 
-  ConstructedConstantExpression visitImplicitSuperConstructorInvoke(
-      FunctionExpression node,
-      ConstructorElement superConstructor,
-      InterfaceType type,
-      _) {
-     return new ConstructedConstantExpression(
-         type,
-         superConstructor,
-         CallStructure.NO_ARGS,
-         const <ConstantExpression>[]);
+  Map<FieldElement, ConstantExpression> computeInstanceFields(
+      List<ConstantExpression> arguments,
+      CallStructure callStructure) {
+    NormalizedArguments args =
+        new NormalizedArguments(defaultValues, callStructure, arguments);
+    Map<FieldElement, ConstantExpression> appliedFieldMap =
+        GenerativeConstantConstructor.applyFields(
+            args, thisConstructorInvocation);
+    return appliedFieldMap;
   }
 
-  ConstructedConstantExpression visitThisConstructorInvoke(
-      Send node,
-      ConstructorElement thisConstructor,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    List<ConstantExpression> argumentExpression =
-        arguments.nodes.map((a) => apply(a)).toList();
-    return new ConstructedConstantExpression(
-        currentClass.thisType,
-        thisConstructor,
-        callStructure,
-        argumentExpression);
+  accept(ConstantConstructorVisitor visitor, arg) {
+    return visitor.visitRedirectingGenerative(this, arg);
   }
 
-  @override
-  ConstantExpression visitBinary(
-      Send node,
-      Node left,
-      BinaryOperator operator,
-      Node right,
-      _) {
-    return new BinaryConstantExpression(
-        apply(left), operator, apply(right));
+  int get hashCode {
+    int hash = Hashing.objectHash(thisConstructorInvocation);
+    return Hashing.mapHash(defaultValues, hash);
   }
 
-
-  @override
-  ConstantExpression visitUnary(
-      Send node,
-      UnaryOperator operator,
-      Node expression,
-      _) {
-    return new UnaryConstantExpression(
-        operator, apply(expression));
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! RedirectingGenerativeConstantConstructor) return false;
+    return
+        thisConstructorInvocation == other.thisConstructorInvocation &&
+        GenerativeConstantConstructor.mapEquals(
+            defaultValues, other.defaultValues);
   }
 
-  @override
-  ConstantExpression visitStaticFieldGet(
-      Send node,
-      FieldElement field,
-      _) {
-    return new VariableConstantExpression(field);
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write("{'type': ${thisConstructorInvocation.type}");
+    defaultValues.forEach((key, ConstantExpression expression) {
+      sb.write(",\n 'default:${key}': ${expression.getText()}");
+    });
+    sb.write(",\n 'constructor': ${thisConstructorInvocation.getText()}");
+    sb.write("}");
+    return sb.toString();
+  }
+}
+
+/// A redirecting factory constant constructor.
+class RedirectingFactoryConstantConstructor implements ConstantConstructor {
+  final ConstructedConstantExpression targetConstructorInvocation;
+
+  RedirectingFactoryConstantConstructor(this.targetConstructorInvocation);
+
+  ConstantConstructorKind get kind {
+    return ConstantConstructorKind.REDIRECTING_FACTORY;
   }
 
-  @override
-  ConstantExpression visitTopLevelFieldGet(
-      Send node,
-      FieldElement field,
-      _) {
-    return new VariableConstantExpression(field);
+  InterfaceType computeInstanceType(InterfaceType newType) {
+    return targetConstructorInvocation.computeInstanceType()
+        .substByContext(newType);
   }
 
-  @override
-  ConstantExpression visitLiteralInt(LiteralInt node) {
-    return new IntConstantExpression(node.value);
+  Map<FieldElement, ConstantExpression> computeInstanceFields(
+      List<ConstantExpression> arguments,
+      CallStructure callStructure) {
+    ConstantConstructor constantConstructor =
+        targetConstructorInvocation.target.constantConstructor;
+    return constantConstructor.computeInstanceFields(arguments, callStructure);
   }
 
-  @override
-  ConstantExpression visitLiteralBool(LiteralBool node) {
-    return new BoolConstantExpression(node.value);
+  accept(ConstantConstructorVisitor visitor, arg) {
+    return visitor.visitRedirectingFactory(this, arg);
   }
 
-  @override
-  ConstantExpression visitLiteralNull(LiteralNull node) {
-    return new NullConstantExpression();
+  int get hashCode {
+    return Hashing.objectHash(targetConstructorInvocation);
   }
 
-  @override
-  ConstantExpression visitLiteralString(LiteralString node) {
-    return new StringConstantExpression(node.dartString.slowToString());
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! RedirectingFactoryConstantConstructor) return false;
+    return targetConstructorInvocation == other.targetConstructorInvocation;
   }
 
-  @override
-  ConstantExpression visitConditional(Conditional node) {
-    return new ConditionalConstantExpression(
-        apply(node.condition),
-        apply(node.thenExpression),
-        apply(node.elseExpression));
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write("{");
+    sb.write("'constructor': ${targetConstructorInvocation.getText()}");
+    sb.write("}");
+    return sb.toString();
   }
-
-  @override
-  ConstantExpression visitParenthesizedExpression(ParenthesizedExpression node) {
-    return apply(node.expression);
-  }
-
-  @override
-  ConstantExpression visitTopLevelFunctionInvoke(
-      Send node,
-      MethodElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      _) {
-    if (function.name != 'identical' || !function.library.isDartCore) {
-      throw new UnsupportedError("Unexpected function call: $function");
-    }
-    return new IdenticalConstantExpression(
-        apply(arguments.nodes.head), apply(arguments.nodes.tail.head));
-  }
-
-  @override
-  ConstantExpression visitNamedArgument(NamedArgument node) {
-    return apply(node.expression);
-  }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/lib/src/constants/evaluation.dart b/pkg/compiler/lib/src/constants/evaluation.dart
new file mode 100644
index 0000000..5b7c85d
--- /dev/null
+++ b/pkg/compiler/lib/src/constants/evaluation.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.constants.evaluation;
+
+import '../compiler.dart' show
+    Compiler;
+import '../universe/universe.dart' show
+    CallStructure;
+import 'expressions.dart';
+
+/// Environment used for evaluating constant expressions.
+abstract class Environment {
+  // TODO(johnniwinther): Replace this with [CoreTypes] and maybe [Backend].
+  Compiler get compiler;
+
+  /// Read environments string passed in using the '-Dname=value' option.
+  String readFromEnvironment(String name);
+}
+
+/// The normalized arguments passed to a const constructor computed from the
+/// actual [arguments] and the [defaultValues] of the called construrctor.
+class NormalizedArguments {
+  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
+  final CallStructure callStructure;
+  final List<ConstantExpression> arguments;
+
+  NormalizedArguments(this.defaultValues, this.callStructure, this.arguments);
+
+  /// Returns the normalized named argument [name].
+  ConstantExpression getNamedArgument(String name) {
+    int index = callStructure.namedArguments.indexOf(name);
+    if (index == -1) {
+      // The named argument is not provided.
+      return defaultValues[name];
+    }
+    return arguments[index + callStructure.positionalArgumentCount];
+  }
+
+  /// Returns the normalized [index]th positional argument.
+  ConstantExpression getPositionalArgument(int index) {
+    if (index >= callStructure.positionalArgumentCount) {
+      // The positional argument is not provided.
+      return defaultValues[index];
+    }
+    return arguments[index];
+  }
+}
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 4b1060c..7311912 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -6,8 +6,9 @@
 
 import '../constants/constant_system.dart';
 import '../core_types.dart';
-import '../dart2jslib.dart' show assertDebugMode, Compiler;
 import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    assertDebugMode;
 import '../elements/elements.dart' show
     ConstructorElement,
     Element,
@@ -18,7 +19,7 @@
 import '../resolution/operators.dart';
 import '../tree/tree.dart' show DartString;
 import '../universe/universe.dart' show CallStructure;
-import '../util/util.dart';
+import 'evaluation.dart';
 import 'values.dart';
 
 enum ConstantExpressionKind {
@@ -51,284 +52,6 @@
   NAMED_REFERENCE,
 }
 
-/// Environment used for evaluating constant expressions.
-abstract class Environment {
-  // TODO(johnniwinther): Replace this with [CoreTypes] and maybe [Backend].
-  Compiler get compiler;
-
-  /// Read environments string passed in using the '-Dname=value' option.
-  String readFromEnvironment(String name);
-}
-
-/// The normalized arguments passed to a const constructor computed from the
-/// actual [arguments] and the [defaultValues] of the called construrctor.
-class NormalizedArguments {
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
-  final CallStructure callStructure;
-  final List<ConstantExpression> arguments;
-
-  NormalizedArguments(this.defaultValues, this.callStructure, this.arguments);
-
-  /// Returns the normalized named argument [name].
-  ConstantExpression getNamedArgument(String name) {
-    int index = callStructure.namedArguments.indexOf(name);
-    if (index == -1) {
-      // The named argument is not provided.
-      return defaultValues[name];
-    }
-    return arguments[index + callStructure.positionalArgumentCount];
-  }
-
-  /// Returns the normalized [index]th positional argument.
-  ConstantExpression getPositionalArgument(int index) {
-    if (index >= callStructure.positionalArgumentCount) {
-      // The positional argument is not provided.
-      return defaultValues[index];
-    }
-    return arguments[index];
-  }
-}
-
-enum ConstantConstructorKind {
-  GENERATIVE,
-  REDIRECTING_GENERATIVE,
-  REDIRECTING_FACTORY,
-}
-
-/// Definition of a constant constructor.
-abstract class ConstantConstructor {
-  ConstantConstructorKind get kind;
-
-  /// Computes the type of the instance created in a const constructor
-  /// invocation with type [newType].
-  InterfaceType computeInstanceType(InterfaceType newType);
-
-  /// Computes the constant expressions of the fields of the created instance
-  /// in a const constructor invocation with [arguments].
-  Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure);
-
-  accept(ConstantConstructorVisitor visitor, arg);
-}
-
-abstract class ConstantConstructorVisitor<R, A> {
-  const ConstantConstructorVisitor();
-
-  R visit(ConstantConstructor constantConstructor, A context) {
-    return constantConstructor.accept(this, context);
-  }
-
-  R visitGenerative(GenerativeConstantConstructor constructor, A arg);
-  R visitRedirectingGenerative(
-      RedirectingGenerativeConstantConstructor constructor, A arg);
-  R visitRedirectingFactory(
-      RedirectingFactoryConstantConstructor constructor, A arg);
-}
-
-/// A generative constant constructor.
-class GenerativeConstantConstructor implements ConstantConstructor{
-  final InterfaceType type;
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
-  final Map<FieldElement, ConstantExpression> fieldMap;
-  final ConstructedConstantExpression superConstructorInvocation;
-
-  GenerativeConstantConstructor(
-      this.type,
-      this.defaultValues,
-      this.fieldMap,
-      this.superConstructorInvocation);
-
-  ConstantConstructorKind get kind => ConstantConstructorKind.GENERATIVE;
-
-  InterfaceType computeInstanceType(InterfaceType newType) {
-    return type.substByContext(newType);
-  }
-
-  Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
-    NormalizedArguments args = new NormalizedArguments(
-        defaultValues, callStructure, arguments);
-    Map<FieldElement, ConstantExpression> appliedFieldMap =
-        applyFields(args, superConstructorInvocation);
-    fieldMap.forEach((FieldElement field, ConstantExpression constant) {
-     appliedFieldMap[field] = constant.apply(args);
-    });
-    return appliedFieldMap;
-  }
-
-  accept(ConstantConstructorVisitor visitor, arg) {
-    return visitor.visitGenerative(this, arg);
-  }
-
-  int get hashCode {
-    int hash = Hashing.objectHash(type);
-    hash = Hashing.mapHash(defaultValues, hash);
-    hash = Hashing.mapHash(fieldMap, hash);
-    return Hashing.objectHash(superConstructorInvocation, hash);
-  }
-
-  bool operator ==(other) {
-    if (identical(this, other)) return true;
-    if (other is! GenerativeConstantConstructor) return false;
-    return
-        type == other.type &&
-        superConstructorInvocation == other.superConstructorInvocation &&
-        mapEquals(defaultValues, other.defaultValues) &&
-        mapEquals(fieldMap, other.fieldMap);
-  }
-
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.write("{'type': $type");
-    defaultValues.forEach((key, ConstantExpression expression) {
-      sb.write(",\n 'default:${key}': ${expression.getText()}");
-    });
-    fieldMap.forEach((FieldElement field, ConstantExpression expression) {
-      sb.write(",\n 'field:${field}': ${expression.getText()}");
-    });
-    if (superConstructorInvocation != null) {
-      sb.write(",\n 'constructor: ${superConstructorInvocation.getText()}");
-    }
-    sb.write("}");
-    return sb.toString();
-  }
-
-  static bool mapEquals(Map map1, Map map2) {
-    if (map1.length != map1.length) return false;
-    for (var key in map1.keys) {
-      if (map1[key] != map2[key]) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  /// Creates the field-to-constant map from applying [args] to
-  /// [constructorInvocation]. If [constructorInvocation] is `null`, an empty
-  /// map is created.
-  static Map<FieldElement, ConstantExpression> applyFields(
-      NormalizedArguments args,
-      ConstructedConstantExpression constructorInvocation) {
-    Map<FieldElement, ConstantExpression> appliedFieldMap =
-        <FieldElement, ConstantExpression>{};
-    if (constructorInvocation != null) {
-      Map<FieldElement, ConstantExpression> fieldMap =
-          constructorInvocation.computeInstanceFields();
-      fieldMap.forEach((FieldElement field, ConstantExpression constant) {
-        appliedFieldMap[field] = constant.apply(args);
-      });
-    }
-    return appliedFieldMap;
-  }
-}
-
-/// A redirecting generative constant constructor.
-class RedirectingGenerativeConstantConstructor implements ConstantConstructor {
-  final Map<dynamic/*int|String*/, ConstantExpression> defaultValues;
-  final ConstructedConstantExpression thisConstructorInvocation;
-
-  RedirectingGenerativeConstantConstructor(
-      this.defaultValues,
-      this.thisConstructorInvocation);
-
-  ConstantConstructorKind get kind {
-    return ConstantConstructorKind.REDIRECTING_GENERATIVE;
-  }
-
-  InterfaceType computeInstanceType(InterfaceType newType) {
-    return thisConstructorInvocation.computeInstanceType()
-        .substByContext(newType);
-  }
-
-  Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
-    NormalizedArguments args =
-        new NormalizedArguments(defaultValues, callStructure, arguments);
-    Map<FieldElement, ConstantExpression> appliedFieldMap =
-        GenerativeConstantConstructor.applyFields(
-            args, thisConstructorInvocation);
-    return appliedFieldMap;
-  }
-
-  accept(ConstantConstructorVisitor visitor, arg) {
-    return visitor.visitRedirectingGenerative(this, arg);
-  }
-
-  int get hashCode {
-    int hash = Hashing.objectHash(thisConstructorInvocation);
-    return Hashing.mapHash(defaultValues, hash);
-  }
-
-  bool operator ==(other) {
-    if (identical(this, other)) return true;
-    if (other is! RedirectingGenerativeConstantConstructor) return false;
-    return
-        thisConstructorInvocation == other.thisConstructorInvocation &&
-        GenerativeConstantConstructor.mapEquals(
-            defaultValues, other.defaultValues);
-  }
-
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.write("{'type': ${thisConstructorInvocation.type}");
-    defaultValues.forEach((key, ConstantExpression expression) {
-      sb.write(",\n 'default:${key}': ${expression.getText()}");
-    });
-    sb.write(",\n 'constructor': ${thisConstructorInvocation.getText()}");
-    sb.write("}");
-    return sb.toString();
-  }
-}
-
-/// A redirecting factory constant constructor.
-class RedirectingFactoryConstantConstructor implements ConstantConstructor {
-  final ConstructedConstantExpression targetConstructorInvocation;
-
-  RedirectingFactoryConstantConstructor(this.targetConstructorInvocation);
-
-  ConstantConstructorKind get kind {
-    return ConstantConstructorKind.REDIRECTING_FACTORY;
-  }
-
-  InterfaceType computeInstanceType(InterfaceType newType) {
-    return targetConstructorInvocation.computeInstanceType()
-        .substByContext(newType);
-  }
-
-  Map<FieldElement, ConstantExpression> computeInstanceFields(
-      List<ConstantExpression> arguments,
-      CallStructure callStructure) {
-    ConstantConstructor constantConstructor =
-        targetConstructorInvocation.target.constantConstructor;
-    return constantConstructor.computeInstanceFields(arguments, callStructure);
-  }
-
-  accept(ConstantConstructorVisitor visitor, arg) {
-    return visitor.visitRedirectingFactory(this, arg);
-  }
-
-  int get hashCode {
-    return Hashing.objectHash(targetConstructorInvocation);
-  }
-
-  bool operator ==(other) {
-    if (identical(this, other)) return true;
-    if (other is! RedirectingFactoryConstantConstructor) return false;
-    return targetConstructorInvocation == other.targetConstructorInvocation;
-  }
-
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.write("{");
-    sb.write("'constructor': ${targetConstructorInvocation.getText()}");
-    sb.write("}");
-    return sb.toString();
-  }
-}
-
 /// An expression that is a compile-time constant.
 ///
 /// Whereas [ConstantValue] represent a compile-time value, a
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 068a096..19a89b1 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -6,7 +6,7 @@
 
 import '../core_types.dart';
 import '../dart_types.dart';
-import '../dart2jslib.dart'
+import '../diagnostics/invariant.dart'
     show assertDebugMode;
 import '../elements/elements.dart'
     show ClassElement,
diff --git a/pkg/compiler/lib/src/core_types.dart b/pkg/compiler/lib/src/core_types.dart
index d8302be..1b71c2e 100644
--- a/pkg/compiler/lib/src/core_types.dart
+++ b/pkg/compiler/lib/src/core_types.dart
@@ -15,7 +15,7 @@
   /// The `bool` type defined in 'dart:core'.
   InterfaceType get boolType;
 
-  /// The `bool` type defined in 'dart:core'.
+  /// The `num` type defined in 'dart:core'.
   InterfaceType get numType;
 
   /// The `int` type defined in 'dart:core'.
@@ -24,6 +24,9 @@
   /// The `double` type defined in 'dart:core'.
   InterfaceType get doubleType;
 
+  /// The `Resource` type defined in 'dart:core'.
+  InterfaceType get resourceType;
+
   /// The `String` type defined in 'dart:core'.
   InterfaceType get stringType;
 
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 9010bc2..28397eb 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -32,6 +32,7 @@
   NumAnd,
   NumOr,
   NumXor,
+  NumShl,
   NumLt,
   NumLe,
   NumGt,
@@ -103,3 +104,29 @@
   /// Compiles to `typeof x === 'number' && Math.floor(x) === x`
   IsNumberAndFloor,
 }
+
+/// A method supported natively in the CPS and Tree IRs using the
+/// `ApplyBuiltinMethod` instructions.
+/// 
+/// These methods all operate on a distinguished 'object' argument, and
+/// take zero or more additional arguments.
+/// 
+/// These methods may mutate and depend on the state of the object argument,
+/// but may not depend on or mutate any other state. An exception is thrown
+/// if the object is null, but otherwise they cannot throw or diverge.
+enum BuiltinMethod {
+  /// Add an item to a native list.
+  /// 
+  /// Takes any number of arguments, each argument will be added to the
+  /// list on the order given (as per the JS `push` method).
+  /// 
+  /// Compiles to `object.push(x1, ..., xN)`.
+  Push,
+
+  /// Remove and return the last item from a native list.
+  /// 
+  /// Takes no arguments.
+  /// 
+  /// Compiles to `object.pop()`.
+  Pop,
+}
diff --git a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
index 0c8e027..9bdb9ea 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
@@ -112,6 +112,16 @@
     return letPrim(new ApplyBuiltinOperator(op, args, sourceInformation));
   }
 
+  Primitive invokeBuiltin(BuiltinMethod method, 
+                          Primitive receiver, 
+                          List<Primitive> arguments,
+                          {bool receiverIsNotNull: false}) {
+    ApplyBuiltinMethod apply = 
+        new ApplyBuiltinMethod(method, receiver, arguments, sourceInformation);
+    apply.receiverIsNotNull = receiverIsNotNull;
+    return letPrim(apply);
+  }
+
   /// Inserts an invocation. binds its continuation, and returns the
   /// continuation parameter (i.e. the return value of the invocation).
   ///
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index 4ec13ad..f97d15e 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -4,24 +4,38 @@
 
 library dart2js.ir_builder;
 
-import '../compile_time_constants.dart' show BackendConstantEnvironment;
+import '../common/names.dart' show
+    Names,
+    Selectors;
+import '../compile_time_constants.dart' show
+    BackendConstantEnvironment;
 import '../constants/constant_system.dart';
-import '../constants/values.dart' show ConstantValue, PrimitiveConstantValue;
+import '../constants/values.dart' show
+    ConstantValue,
+    PrimitiveConstantValue;
 import '../dart_types.dart';
-import '../dart2jslib.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
 import '../elements/elements.dart';
 import '../io/source_information.dart';
 import '../tree/tree.dart' as ast;
-import '../types/types.dart' show TypeMask;
+import '../types/types.dart' show
+    TypeMask;
 import '../closure.dart' hide ClosureScope;
-import '../universe/universe.dart' show SelectorKind;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SelectorKind;
 import 'cps_ir_nodes.dart' as ir;
-import 'cps_ir_builder_task.dart' show DartCapturedVariables,
+import 'cps_ir_builder_task.dart' show
+    DartCapturedVariables,
     GlobalProgramInformation;
 
-import '../common.dart' as types show TypeMask;
-import '../js/js.dart' as js show Template;
-import '../native/native.dart' show NativeBehavior;
+import '../common.dart' as types show
+    TypeMask;
+import '../js/js.dart' as js show Template, js, LiteralStatement;
+import '../native/native.dart' show
+    NativeBehavior;
 
 /// A mapping from variable elements to their compile-time values.
 ///
@@ -817,7 +831,7 @@
     // TODO(johnniwinther): This should have its own ir node.
     return _buildInvokeSuper(
         method,
-        new Selector.getter(method.name, method.library),
+        new Selector.getter(method.memberName),
         const <ir.Primitive>[],
         sourceInformation);
   }
@@ -828,7 +842,7 @@
     // TODO(johnniwinther): This should have its own ir node.
     return _buildInvokeSuper(
         getter,
-        new Selector.getter(getter.name, getter.library),
+        new Selector.getter(getter.memberName),
         const <ir.Primitive>[],
         sourceInformation);
   }
@@ -841,7 +855,7 @@
     // TODO(johnniwinther): This should have its own ir node.
     _buildInvokeSuper(
         setter,
-        new Selector.setter(setter.name, setter.library),
+        new Selector.setter(setter.memberName),
         <ir.Primitive>[value],
         sourceInformation);
     return value;
@@ -1002,7 +1016,7 @@
   /// Create a getter invocation of the static [getter].
   ir.Primitive buildStaticGetterGet(MethodElement getter,
                                     SourceInformation sourceInformation) {
-    Selector selector = new Selector.getter(getter.name, getter.library);
+    Selector selector = new Selector.getter(getter.memberName);
     return _buildInvokeStatic(
         getter, selector, const <ir.Primitive>[], sourceInformation);
   }
@@ -1026,7 +1040,7 @@
   ir.Primitive buildStaticSetterSet(MethodElement setter,
                                     ir.Primitive value,
                                     {SourceInformation sourceInformation}) {
-    Selector selector = new Selector.setter(setter.name, setter.library);
+    Selector selector = new Selector.setter(setter.memberName);
     _buildInvokeStatic(
         setter, selector, <ir.Primitive>[value], sourceInformation);
     return value;
@@ -1344,7 +1358,7 @@
     ir.Continuation iteratorInvoked = new ir.Continuation([iterator]);
     add(new ir.LetCont(iteratorInvoked,
         new ir.InvokeMethod(expressionReceiver,
-            new Selector.getter("iterator", null),
+            Selectors.iterator,
             iteratorMask,
             emptyArguments,
             iteratorInvoked)));
@@ -1361,7 +1375,7 @@
     ir.Continuation moveNextInvoked = new ir.Continuation([condition]);
     add(new ir.LetCont(moveNextInvoked,
         new ir.InvokeMethod(iterator,
-            new Selector.call("moveNext", null, 0),
+            Selectors.moveNext,
             moveNextMask,
             emptyArguments,
             moveNextInvoked)));
@@ -1384,7 +1398,7 @@
     bodyBuilder.add(new ir.LetCont(currentInvoked,
         new ir.InvokeMethod(
             iterator,
-            new Selector.getter("current", null),
+            Selectors.current,
             currentMask,
             emptyArguments, currentInvoked)));
     // TODO(sra): Does this cover all cases? The general setter case include
@@ -1394,7 +1408,8 @@
       bodyBuilder.buildLocalVariableSet(variableElement, currentValue);
     } else if (Elements.isErroneous(variableElement)) {
       bodyBuilder.buildErroneousInvocation(variableElement,
-          new Selector.setter(variableElement.name, variableElement.library),
+          new Selector.setter(
+              new Name(variableElement.name, variableElement.library)),
           <ir.Primitive>[currentValue]);
     } else if (Elements.isStaticOrTopLevel(variableElement)) {
       if (variableElement.isField) {
@@ -2025,6 +2040,80 @@
     }
   }
 
+  /// Build a call to the closure conversion helper for the [Function] typed
+  /// value in [value].
+  ir.Primitive _convertDartClosure(ir.Primitive value, FunctionType type) {
+    ir.Constant arity = buildIntegerConstant(type.computeArity());
+    return buildStaticFunctionInvocation(
+        program.closureConverter,
+        CallStructure.TWO_ARGS,
+        <ir.Primitive>[value, arity]);
+  }
+
+  /// Generate the body for a native function [function] that is annotated with
+  /// an implementation in JavaScript (provided as string in [javaScriptCode]).
+  void buildNativeFunctionBody(FunctionElement function,
+                               String javaScriptCode) {
+    NativeBehavior behavior = new NativeBehavior();
+    behavior.sideEffects.setAllSideEffects();
+    // Generate a [ForeignCode] statement from the given native code.
+    buildForeignCode(
+        js.js.statementTemplateYielding(
+            new js.LiteralStatement(javaScriptCode)),
+        <ir.Primitive>[],
+        behavior);
+  }
+
+  /// Generate the body for a native function that redirects to a native
+  /// JavaScript function, getter, or setter.
+  ///
+  /// Generates a call to the real target, which is given by [functions]'s
+  /// `fixedBackendName`, passing all parameters as arguments.  The target can
+  /// be the JavaScript implementation of a function, getter, or setter.
+  void buildRedirectingNativeFunctionBody(FunctionElement function,
+                                          SourceInformation source) {
+    String name = function.fixedBackendName;
+    List<ir.Primitive> arguments = <ir.Primitive>[];
+    NativeBehavior behavior = new NativeBehavior();
+    behavior.sideEffects.setAllSideEffects();
+    program.addNativeMethod(function);
+    // Construct the access of the target element.
+    String code = function.isInstanceMember ? '#.$name' : name;
+    if (function.isInstanceMember) {
+      arguments.add(state.thisParameter);
+    }
+    // Collect all parameters of the function and templates for them to be
+    // inserted into the JavaScript code.
+    List<String> argumentTemplates = <String>[];
+    function.functionSignature.forEachParameter((ParameterElement parameter) {
+      ir.Primitive input = environment.lookup(parameter);
+      DartType type = program.unaliasType(parameter.type);
+      if (type is FunctionType) {
+        // The parameter type is a function type either directly or through
+        // typedef(s).
+        input = _convertDartClosure(input, type);
+      }
+      arguments.add(input);
+      argumentTemplates.add('#');
+    });
+    // Construct the application of parameters for functions and setters.
+    if (function.kind == ElementKind.FUNCTION) {
+      code = "$code(${argumentTemplates.join(', ')})";
+    } else if (function.kind == ElementKind.SETTER) {
+      code = "$code = ${argumentTemplates.single}";
+    } else {
+      assert(argumentTemplates.isEmpty);
+      assert(function.kind == ElementKind.GETTER);
+    }
+    // Generate the [ForeignCode] expression and a return statement to return
+    // its value.
+    ir.Primitive value = buildForeignCode(
+        js.js.uncachedExpressionTemplate(code),
+        arguments,
+        behavior);
+    buildReturn(value: value, sourceInformation: source);
+  }
+
   /// Create a blocks of [statements] by applying [build] to all reachable
   /// statements. The first statement is assumed to be reachable.
   // TODO(johnniwinther): Type [statements] as `Iterable` when `NodeList` uses
@@ -2356,11 +2445,17 @@
                                        SourceInformation sourceInformation) {
     List<ir.Primitive> arguments = <ir.Primitive>[];
     for (ClosureFieldElement field in classElement.closureFields) {
-      // Captured 'this' is not available as a local in the current environment,
-      // so treat that specially.
-      ir.Primitive value = field.local is ThisLocal
-          ? buildThis()
-          : environment.lookup(field.local);
+      // Captured 'this' and type variables are not always available as locals
+      // in the environment, so treat those specially.
+      ir.Primitive value;
+      if (field.local is ThisLocal) {
+        value = buildThis();
+      } else if (field.local is TypeVariableLocal) {
+        TypeVariableLocal variable = field.local;
+        value = buildTypeVariableAccess(variable.typeVariable);
+      } else {
+        value = environment.lookup(field.local);
+      }
       arguments.add(value);
     }
     return addPrimitive(new ir.CreateInstance(
@@ -2473,13 +2568,13 @@
     return value;
   }
 
-  ir.Primitive buildInvokeDirectly(FunctionElement target,
+  ir.Primitive buildInvokeDirectly(MethodElement target,
                                    ir.Primitive receiver,
                                    List<ir.Primitive> arguments,
                                    {SourceInformation sourceInformation}) {
     assert(isOpen);
     Selector selector =
-        new Selector.call(target.name, target.library, arguments.length);
+        new Selector.call(target.memberName, new CallStructure(arguments.length));
     return _continueWithExpression(
         (k) => new ir.InvokeMethodDirectly(
             receiver, target, selector, arguments, k, sourceInformation));
@@ -2599,6 +2694,7 @@
                                 List<ir.Primitive> arguments,
                                 NativeBehavior behavior,
                                 {Element dependency}) {
+    assert(behavior != null);
     types.TypeMask type = program.getTypeMaskForForeign(behavior);
     ir.Primitive result = _continueWithExpression((k) => new ir.ForeignCode(
         codeTemplate,
@@ -2608,7 +2704,7 @@
         k,
         dependency: dependency));
     if (!codeTemplate.isExpression) {
-      // Close the term if this is a "throw" expression.
+      // Close the term if this is a "throw" expression or native body.
       add(new ir.Unreachable());
       _current = null;
     }
@@ -2705,6 +2801,10 @@
         new CallStructure.unnamed(1),
         <ir.Primitive>[value]);
   }
+
+  ir.Node buildAwait(ir.Primitive value) {
+    return _continueWithExpression((k) => new ir.Await(value, k));
+  }
 }
 
 
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
index 238a3fc..712e5cd 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
@@ -6,29 +6,49 @@
 
 import '../closure.dart' as closurelib;
 import '../closure.dart' hide ClosureScope;
+import '../common/names.dart' show
+    Names,
+    Selectors;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../dart2jslib.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show SynthesizedConstructorElementX,
-    ConstructorBodyElementX, FunctionSignatureX;
+import '../elements/modelx.dart' show
+    SynthesizedConstructorElementX,
+    ConstructorBodyElementX,
+    FunctionSignatureX;
 import '../io/source_information.dart';
-import '../js_backend/js_backend.dart' show JavaScriptBackend,
+import '../js_backend/js_backend.dart' show
+    JavaScriptBackend,
     SyntheticConstantKind;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../resolution/semantic_visitor.dart';
+import '../resolution/send_resolver.dart' show
+    SendResolverMixin;
 import '../resolution/operators.dart' as op;
 import '../tree/tree.dart' as ast;
-import '../types/types.dart' show TypeMask;
-import '../universe/universe.dart' show SelectorKind, CallStructure;
-import '../constants/values.dart' show ConstantValue;
+import '../types/types.dart' show
+    TypeMask;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SelectorKind;
+import '../constants/values.dart' show
+    ConstantValue;
 import 'cps_ir_nodes.dart' as ir;
 import 'cps_ir_builder.dart';
-import '../native/native.dart' show NativeBehavior;
+import '../native/native.dart' show
+    NativeBehavior;
 
 // TODO(karlklose): remove.
 import '../js/js.dart' as js show js, Template, Expression, Name;
 import '../ssa/ssa.dart' show TypeMaskFactory;
-import '../types/types.dart' show TypeMask;
 import '../util/util.dart';
 
 import 'package:js_runtime/shared/embedded_names.dart'
@@ -102,6 +122,7 @@
          BaseImplementationOfConstantsMixin<ir.Primitive, dynamic>,
          BaseImplementationOfNewMixin<ir.Primitive, dynamic>,
          BaseImplementationOfCompoundsMixin<ir.Primitive, dynamic>,
+         BaseImplementationOfSetIfNullsMixin<ir.Primitive, dynamic>,
          BaseImplementationOfIndexCompoundsMixin<ir.Primitive, dynamic>
     implements SemanticSendVisitor<ir.Primitive, dynamic> {
   final TreeElements elements;
@@ -353,6 +374,11 @@
     return giveup(node, 'await for');
   }
 
+  visitAwait(ast.Await node) {
+    ir.Primitive value = visit(node.expression);
+    return irBuilder.buildAwait(value);
+  }
+
   visitSyncForIn(ast.SyncForIn node) {
     // [node.declaredIdentifier] can be either an [ast.VariableDefinitions]
     // (defining a new local variable) or a send designating some existing
@@ -396,17 +422,39 @@
     return null;
   }
 
+  static final RegExp nativeRedirectionRegExp =
+      new RegExp(r'^[a-zA-Z][a-zA-Z_$0-9]*$');
+
   // Build(Return(e), C) = C'[InvokeContinuation(return, x)]
   //   where (C', x) = Build(e, C)
   //
   // Return without a subexpression is translated as if it were return null.
-  ir.Primitive visitReturn(ast.Return node) {
+  visitReturn(ast.Return node) {
     assert(irBuilder.isOpen);
-    assert(invariant(node, node.beginToken.value != 'native'));
-    irBuilder.buildReturn(
-        value: build(node.expression),
-        sourceInformation: sourceInformationBuilder.buildReturn(node));
-    return null;
+    SourceInformation source = sourceInformationBuilder.buildReturn(node);
+    if (node.beginToken.value == 'native') {
+      FunctionElement function = irBuilder.state.currentElement;
+      assert(function.isNative);
+      ast.Node nativeBody = node.expression;
+      if (nativeBody != null) {
+        ast.LiteralString jsCode = nativeBody.asLiteralString();
+        String javaScriptCode = jsCode.dartString.slowToString();
+        assert(invariant(nativeBody,
+            !nativeRedirectionRegExp.hasMatch(javaScriptCode),
+          message: "Deprecated syntax, use @JSName('name') instead."));
+        assert(invariant(nativeBody,
+            function.functionSignature.parameterCount == 0,
+            message: 'native "..." syntax is restricted to '
+              'functions with zero parameters.'));
+        irBuilder.buildNativeFunctionBody(function, javaScriptCode);
+      } else {
+        irBuilder.buildRedirectingNativeFunctionBody(function, source);
+      }
+    } else {
+      irBuilder.buildReturn(
+          value: build(node.expression),
+          sourceInformation: source);
+    }
   }
 
   visitSwitchStatement(ast.SwitchStatement node) {
@@ -629,12 +677,12 @@
   ir.Primitive visitExpressionInvoke(ast.Send node,
                                      ast.Node expression,
                                      ast.NodeList argumentsNode,
-                                     Selector selector, _) {
+                                     CallStructure callStructure, _) {
     ir.Primitive receiver = visit(expression);
     List<ir.Primitive> arguments = node.arguments.mapToList(visit);
-    arguments = normalizeDynamicArguments(selector.callStructure, arguments);
+    arguments = normalizeDynamicArguments(callStructure, arguments);
     return irBuilder.buildCallInvocation(
-        receiver, selector.callStructure, arguments,
+        receiver, callStructure, arguments,
         sourceInformation:
             sourceInformationBuilder.buildCall(node, argumentsNode));
   }
@@ -663,11 +711,11 @@
   ir.Primitive handleDynamicGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     return irBuilder.buildDynamicGet(
         translateReceiver(receiver),
-        selector,
+        new Selector.getter(name),
         elements.getTypeMask(node),
         sourceInformationBuilder.buildGet(node));
   }
@@ -676,13 +724,15 @@
   ir.Primitive visitIfNotNullDynamicPropertyGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     ir.Primitive target = visit(receiver);
     return irBuilder.buildIfNotNullSend(
         target,
         nested(() => irBuilder.buildDynamicGet(
-            target, selector, elements.getTypeMask(node),
+            target,
+            new Selector.getter(name),
+            elements.getTypeMask(node),
             sourceInformationBuilder.buildGet(node))));
   }
 
@@ -1301,16 +1351,31 @@
     return rhs.kind == CompoundKind.POSTFIX ? value : result;
   }
 
+  ir.Primitive translateSetIfNull(
+      ast.SendSet node,
+      {ir.Primitive getValue(),
+       ast.Node rhs,
+       void setValue(ir.Primitive value)}) {
+    ir.Primitive value = getValue();
+    // Unlike other compound operators if-null conditionally will not do the
+    // assignment operation.
+    return irBuilder.buildIfNull(value, nested(() {
+      ir.Primitive newValue = build(rhs);
+      setValue(newValue);
+      return newValue;
+    }));
+  }
+
   @override
   ir.Primitive handleDynamicSet(
       ast.SendSet node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       ast.Node rhs,
       _) {
     return irBuilder.buildDynamicSet(
         translateReceiver(receiver),
-        selector,
+        new Selector.setter(name),
         elements.getTypeMask(node),
         visit(rhs));
   }
@@ -1319,14 +1384,17 @@
   ir.Primitive visitIfNotNullDynamicPropertySet(
       ast.SendSet node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       ast.Node rhs,
       _) {
     ir.Primitive target = visit(receiver);
     return irBuilder.buildIfNotNullSend(
         target,
         nested(() => irBuilder.buildDynamicSet(
-            target, selector, elements.getTypeMask(node), visit(rhs))));
+            target,
+            new Selector.setter(name),
+            elements.getTypeMask(node),
+            visit(rhs))));
   }
 
   @override
@@ -1401,12 +1469,22 @@
   }
 
   @override
+  ir.Primitive handleTypeLiteralConstantSetIfNulls(
+      ast.SendSet node,
+      ConstantExpression constant,
+      ast.Node rhs,
+      _) {
+    // The type literal is never `null`.
+    return buildConstantExpression(constant,
+        sourceInformationBuilder.buildGet(node));
+  }
+
+  @override
   ir.Primitive handleDynamicCompounds(
       ast.SendSet node,
       ast.Node receiver,
+      Name name,
       CompoundRhs rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     ir.Primitive target = translateReceiver(receiver);
     ir.Primitive helper() {
@@ -1414,13 +1492,16 @@
           node,
           getValue: () => irBuilder.buildDynamicGet(
               target,
-              getterSelector,
+              new Selector.getter(name),
               elements.getGetterTypeMaskInComplexSendSet(node),
               sourceInformationBuilder.buildGet(node)),
           rhs: rhs,
           setValue: (ir.Primitive result) {
             irBuilder.buildDynamicSet(
-                target, setterSelector, elements.getTypeMask(node), result);
+                target,
+                new Selector.setter(name),
+                elements.getTypeMask(node),
+                result);
           });
     }
     return node.isConditional
@@ -1428,8 +1509,39 @@
         : helper();
   }
 
-  ir.Primitive buildLocalNoSuchSetter(Local local, ir.Primitive value) {
-    Selector selector = new Selector.setter(local.name, null);
+  @override
+  ir.Primitive handleDynamicSetIfNulls(
+      ast.Send node,
+      ast.Node receiver,
+      Name name,
+      ast.Node rhs,
+      _) {
+    ir.Primitive target = translateReceiver(receiver);
+    ir.Primitive helper() {
+      return translateSetIfNull(
+          node,
+          getValue: () => irBuilder.buildDynamicGet(
+              target,
+              new Selector.getter(name),
+              elements.getGetterTypeMaskInComplexSendSet(node),
+              sourceInformationBuilder.buildGet(node)),
+          rhs: rhs,
+          setValue: (ir.Primitive result) {
+            irBuilder.buildDynamicSet(
+                target,
+                new Selector.setter(name),
+                elements.getTypeMask(node),
+                result);
+          });
+    }
+    return node.isConditional
+        ? irBuilder.buildIfNotNullSend(target, nested(helper))
+        : helper();
+  }
+
+  ir.Primitive buildLocalNoSuchSetter(LocalElement local, ir.Primitive value) {
+    Selector selector = new Selector.setter(
+        new Name(local.name, local.library, isSetter: true));
     return buildStaticNoSuchMethod(selector, [value]);
   }
 
@@ -1459,15 +1571,41 @@
         });
   }
 
+  @override
+  ir.Primitive handleLocalSetIfNulls(
+      ast.SendSet node,
+      LocalElement local,
+      ast.Node rhs,
+      _,
+      {bool isSetterValid}) {
+    return translateSetIfNull(
+        node,
+        getValue: () {
+          if (local.isFunction) {
+            return irBuilder.buildLocalFunctionGet(local);
+          } else {
+            return irBuilder.buildLocalVariableGet(local);
+          }
+        },
+        rhs: rhs,
+        setValue: (ir.Primitive result) {
+          if (isSetterValid) {
+            irBuilder.buildLocalVariableSet(local, result);
+          } else {
+            return buildLocalNoSuchSetter(local, result);
+          }
+        });
+  }
+
   ir.Primitive buildStaticNoSuchGetter(Element element) {
     return buildStaticNoSuchMethod(
-        new Selector.getter(element.name, element.library),
+        new Selector.getter(new Name(element.name, element.library)),
         const <ir.Primitive>[]);
   }
 
   ir.Primitive buildStaticNoSuchSetter(Element element, ir.Primitive value) {
     return buildStaticNoSuchMethod(
-        new Selector.setter(element.name, element.library),
+        new Selector.setter(new Name(element.name, element.library)),
         <ir.Primitive>[value]);
   }
 
@@ -1504,16 +1642,52 @@
             case CompoundSetter.SETTER:
               return irBuilder.buildStaticSetterSet(setter, result);
             case CompoundSetter.INVALID:
-              // TODO(johnniwinther): Ensure [setter] is non null.
-              return buildStaticNoSuchSetter(
-                  setter != null ? setter : getter, result);
+              return buildStaticNoSuchSetter(setter, result);
+          }
+        });
+  }
+
+  @override
+  ir.Primitive handleStaticSetIfNulls(
+      ast.SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      ast.Node rhs,
+      _) {
+    return translateSetIfNull(
+        node,
+        getValue: () {
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              SourceInformation src = sourceInformationBuilder.buildGet(node);
+              return irBuilder.buildStaticFieldGet(getter, src);
+            case CompoundGetter.GETTER:
+              return irBuilder.buildStaticGetterGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.METHOD:
+              return irBuilder.buildStaticFunctionGet(getter);
+            case CompoundGetter.UNRESOLVED:
+              return buildStaticNoSuchGetter(getter);
+          }
+        },
+        rhs: rhs,
+        setValue: (ir.Primitive result) {
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              return irBuilder.buildStaticFieldSet(setter, result);
+            case CompoundSetter.SETTER:
+              return irBuilder.buildStaticSetterSet(setter, result);
+            case CompoundSetter.INVALID:
+              return buildStaticNoSuchSetter(setter, result);
           }
         });
   }
 
   ir.Primitive buildSuperNoSuchGetter(Element element, TypeMask mask) {
     return buildInstanceNoSuchMethod(
-        new Selector.getter(element.name, element.library),
+        new Selector.getter(new Name(element.name, element.library)),
         mask,
         const <ir.Primitive>[]);
   }
@@ -1522,7 +1696,7 @@
                                       TypeMask mask,
                                       ir.Primitive value) {
     return buildInstanceNoSuchMethod(
-        new Selector.setter(element.name, element.library),
+        new Selector.setter(new Name(element.name, element.library)),
         mask,
         <ir.Primitive>[value]);
   }
@@ -1548,9 +1722,48 @@
             case CompoundGetter.METHOD:
               return irBuilder.buildSuperMethodGet(getter);
             case CompoundGetter.UNRESOLVED:
-              // TODO(johnniwinther): Ensure [getter] is not null.
               return buildSuperNoSuchGetter(
-                  getter != null ? getter : setter,
+                  getter,
+                  elements.getGetterTypeMaskInComplexSendSet(node));
+          }
+        },
+        rhs: rhs,
+        setValue: (ir.Primitive result) {
+          switch (setterKind) {
+            case CompoundSetter.FIELD:
+              return irBuilder.buildSuperFieldSet(setter, result);
+            case CompoundSetter.SETTER:
+              return irBuilder.buildSuperSetterSet(setter, result);
+            case CompoundSetter.INVALID:
+              return buildSuperNoSuchSetter(
+                  setter, elements.getTypeMask(node), result);
+          }
+        });
+  }
+
+  @override
+  ir.Primitive handleSuperSetIfNulls(
+      ast.SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      ast.Node rhs,
+      _) {
+    return translateSetIfNull(
+        node,
+        getValue: () {
+          switch (getterKind) {
+            case CompoundGetter.FIELD:
+              return irBuilder.buildSuperFieldGet(getter);
+            case CompoundGetter.GETTER:
+              return irBuilder.buildSuperGetterGet(
+                  getter, sourceInformationBuilder.buildGet(node));
+            case CompoundGetter.METHOD:
+              return irBuilder.buildSuperMethodGet(getter);
+            case CompoundGetter.UNRESOLVED:
+              return buildSuperNoSuchGetter(
+                  getter,
                   elements.getGetterTypeMaskInComplexSendSet(node));
           }
         },
@@ -1586,6 +1799,17 @@
   }
 
   @override
+  ir.Primitive visitTypeVariableTypeLiteralSetIfNull(
+      ast.Send node,
+      TypeVariableElement element,
+      ast.Node rhs,
+      _) {
+    // The type variable is never `null`.
+    return translateTypeVariableTypeLiteral(element,
+        sourceInformationBuilder.buildGet(node));
+  }
+
+  @override
   ir.Primitive handleIndexCompounds(
       ast.SendSet node,
       ast.Node receiver,
@@ -1856,7 +2080,8 @@
     InterfaceType type = constant.type;
     ClassElement element = type.element;
     return buildStaticNoSuchMethod(
-        new Selector.setter(element.name, element.library), [visit(rhs)]);
+        new Selector.setter(element.memberName),
+        [visit(rhs)]);
   }
 
   @override
@@ -1867,7 +2092,8 @@
     TypedefType type = constant.type;
     TypedefElement element = type.element;
     return buildStaticNoSuchMethod(
-        new Selector.setter(element.name, element.library), [visit(rhs)]);
+        new Selector.setter(element.memberName),
+        [visit(rhs)]);
   }
 
   @override
@@ -1876,7 +2102,7 @@
       TypeVariableElement element,
       ast.Node rhs, _) {
     return buildStaticNoSuchMethod(
-        new Selector.setter(element.name, element.library), [visit(rhs)]);
+        new Selector.setter(element.memberName), [visit(rhs)]);
   }
 
   @override
@@ -1885,7 +2111,7 @@
       ConstantExpression constant,
       ast.Node rhs, _) {
     return buildStaticNoSuchMethod(
-        new Selector.setter('dynamic', null), [visit(rhs)]);
+        new Selector.setter(Names.dynamic_), [visit(rhs)]);
   }
 
   @override
@@ -1905,7 +2131,7 @@
       ast.Node rhs, _) {
     // TODO(asgerf): Include class name somehow for static class members?
     return buildStaticNoSuchMethod(
-        new Selector.setter(field.name, field.library),
+        new Selector.setter(field.memberName),
         [visit(rhs)]);
   }
 
@@ -1915,7 +2141,7 @@
       FieldElement field,
       ast.Node rhs, _) {
     return buildInstanceNoSuchMethod(
-        new Selector.setter(field.name, field.library),
+        new Selector.setter(field.memberName),
         elements.getTypeMask(node),
         [visit(rhs)]);
   }
@@ -1926,7 +2152,7 @@
       LocalElement local,
       ast.Node rhs, _) {
     return buildStaticNoSuchMethod(
-        new Selector.setter(local.name, null),
+        new Selector.setter(new Name(local.name, local.library)),
         [visit(rhs)]);
   }
 
@@ -1937,53 +2163,52 @@
       ast.Node rhs,
       _) {
     return buildStaticNoSuchMethod(
-        new Selector.setter(function.name, function.library),
+        new Selector.setter(function.memberName),
         [visit(rhs)]);
   }
 
   @override
   ir.Primitive handleStaticGetterSet(
       ast.SendSet node,
-      FunctionElement getter,
+      GetterElement getter,
       ast.Node rhs,
       _) {
     return buildStaticNoSuchMethod(
-        new Selector.setter(getter.name, getter.library),
+        new Selector.setter(getter.memberName),
         [visit(rhs)]);
   }
 
   @override
   ir.Primitive handleStaticSetterGet(
       ast.Send node,
-      FunctionElement setter,
+      SetterElement setter,
       _) {
     return buildStaticNoSuchMethod(
-        new Selector.getter(setter.name, setter.library),
+        new Selector.getter(setter.memberName),
         []);
   }
 
   @override
   ir.Primitive handleStaticSetterInvoke(
       ast.Send node,
-      FunctionElement setter,
+      SetterElement setter,
       ast.NodeList arguments,
       CallStructure callStructure, _) {
     // Translate as a method call.
     List<ir.Primitive> args = arguments.nodes.mapToList(visit);
-    Name name = new Name(setter.name, setter.library);
     return buildStaticNoSuchMethod(
-        new Selector(SelectorKind.CALL, name, callStructure),
+        new Selector(SelectorKind.CALL, setter.memberName, callStructure),
         args);
   }
 
   @override
   ir.Primitive visitSuperGetterSet(
       ast.SendSet node,
-      FunctionElement getter,
+      GetterElement getter,
       ast.Node rhs,
       _) {
     return buildInstanceNoSuchMethod(
-        new Selector.setter(getter.name, getter.library),
+        new Selector.setter(getter.memberName),
         elements.getTypeMask(node),
         [visit(rhs)]);
   }
@@ -1995,7 +2220,7 @@
       ast.Node rhs,
       _) {
     return buildInstanceNoSuchMethod(
-        new Selector.setter(method.name, method.library),
+        new Selector.setter(method.memberName),
         elements.getTypeMask(node),
         [visit(rhs)]);
   }
@@ -2003,9 +2228,9 @@
   @override
   ir.Primitive visitSuperSetterGet(
       ast.Send node,
-      FunctionElement setter, _) {
+      SetterElement setter, _) {
     return buildInstanceNoSuchMethod(
-        new Selector.setter(setter.name, setter.library),
+        new Selector.setter(setter.memberName),
         elements.getTypeMask(node),
         []);
   }
@@ -2013,14 +2238,13 @@
   @override
   ir.Primitive visitSuperSetterInvoke(
       ast.Send node,
-      FunctionElement setter,
+      SetterElement setter,
       ast.NodeList arguments,
       CallStructure callStructure, _) {
     List<ir.Primitive> args =
         translateDynamicArguments(arguments, callStructure);
-    Name name = new Name(setter.name, setter.library);
     return buildInstanceNoSuchMethod(
-        new Selector(SelectorKind.CALL, name, callStructure),
+        new Selector(SelectorKind.CALL, setter.memberName, callStructure),
         elements.getTypeMask(node),
         args);
   }
@@ -2147,8 +2371,10 @@
     Element element = elements[node];
     if (Elements.isLocal(element)) {
       LocalElement local = element;
-      if (insideInitializer) {
-        assert(local.isParameter);
+      if (insideInitializer &&
+          local.isParameter &&
+          local.enclosingElement == currentFunction) {
+        assert(local.enclosingElement.isConstructor);
         // Initializers in an initializer-list can communicate via parameters.
         // If a parameter is stored in an initializer list we box it.
         // TODO(sigurdm): Fix this.
@@ -2176,18 +2402,23 @@
   }
 
   visitFunctionExpression(ast.FunctionExpression node) {
-    FunctionElement oldFunction = currentFunction;
+    FunctionElement savedFunction = currentFunction;
     currentFunction = elements[node];
-    if (currentFunction.asyncMarker != AsyncMarker.SYNC) {
-      giveup(node, "cannot handle async/sync*/async* functions");
+
+    if (currentFunction.asyncMarker != AsyncMarker.SYNC &&
+        currentFunction.asyncMarker != AsyncMarker.ASYNC) {
+      giveup(node, "cannot handle sync*/async* functions");
     }
+
+    bool savedInsideInitializer = insideInitializer;
     if (node.initializers != null) {
       insideInitializer = true;
       visit(node.initializers);
-      insideInitializer = false;
     }
+    insideInitializer = false;
     visit(node.body);
-    currentFunction = oldFunction;
+    currentFunction = savedFunction;
+    insideInitializer = savedInsideInitializer;
   }
 
   visitTryStatement(ast.TryStatement node) {
@@ -2269,12 +2500,23 @@
   DartType unaliasType(DartType type) => type.unalias(_compiler);
 
   TypeMask getTypeMaskForForeign(NativeBehavior behavior) {
+    if (behavior == null) {
+      return _backend.dynamicType;
+    }
     return TypeMaskFactory.fromNativeBehavior(behavior, _compiler);
   }
 
   FieldElement locateSingleField(Selector selector, TypeMask type) {
     return _compiler.world.locateSingleField(selector, type);
   }
+
+  Element get closureConverter {
+    return _backend.getClosureConverter();
+  }
+
+  void addNativeMethod(FunctionElement function) {
+    _backend.emitter.nativeEmitter.nativeMethods.add(function);
+  }
 }
 
 /// IR builder specific to the JavaScript backend, coupled to the [JsIrBuilder].
@@ -3061,7 +3303,7 @@
                                          List<ir.Primitive> arguments) {
     return irBuilder.buildDynamicInvocation(
         irBuilder.buildThis(),
-        compiler.noSuchMethodSelector,
+        Selectors.noSuchMethod_,
         mask,
         [irBuilder.buildInvocationMirror(selector, arguments)]);
   }
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index 53960b5..24938d4 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -23,6 +23,10 @@
   /// A pointer to the parent node. Is null until set by optimization passes.
   Node parent;
 
+  /// Workaround for a slow Object.hashCode in the VM.
+  static int _usedHashCodes = 0;
+  final int hashCode = ++_usedHashCodes;
+
   accept(Visitor visitor);
 }
 
@@ -519,6 +523,31 @@
   bool get isSafeForReordering => true;
 }
 
+/// Apply a built-in method.
+///
+/// It must be known that the arguments have the proper types.
+class ApplyBuiltinMethod extends Primitive {
+  BuiltinMethod method;
+  Reference<Primitive> receiver;
+  List<Reference<Primitive>> arguments;
+  final SourceInformation sourceInformation;
+
+  bool receiverIsNotNull;
+
+  ApplyBuiltinMethod(this.method,
+                     Primitive receiver,
+                     List<Primitive> arguments,
+                     this.sourceInformation,
+                     {this.receiverIsNotNull: false})
+      : this.receiver = new Reference<Primitive>(receiver),
+        this.arguments = _referenceList(arguments);
+
+  accept(Visitor visitor) => visitor.visitApplyBuiltinMethod(this);
+
+  bool get isSafeForElimination => false;
+  bool get isSafeForReordering => false;
+}
+
 /// Throw a value.
 ///
 /// Throw is an expression, i.e., it always occurs in tail position with
@@ -686,10 +715,10 @@
   accept(Visitor visitor) => visitor.visitGetField(this);
 
   bool get isSafeForElimination => objectIsNotNull;
-  bool get isSafeForReordering => objectIsNotNull && field.isFinal;
+  bool get isSafeForReordering => false;
 }
 
-/// Get the length of a native list.
+/// Get the length of a string or native list.
 class GetLength extends Primitive {
   final Reference<Primitive> object;
 
@@ -704,9 +733,10 @@
   accept(Visitor v) => v.visitGetLength(this);
 }
 
-/// Read an entry from a native list.
+/// Read an entry from a string or native list.
 ///
-/// [object] must be null or a native list, and [index] must be an integer.
+/// [object] must be null or a native list or a string, and [index] must be
+/// an integer.
 class GetIndex extends Primitive {
   final Reference<Primitive> object;
   final Reference<Primitive> index;
@@ -885,7 +915,9 @@
   final values.ConstantValue value;
   final SourceInformation sourceInformation;
 
-  Constant(this.value, {this.sourceInformation});
+  Constant(this.value, {this.sourceInformation}) {
+    assert(value != null);
+  }
 
   accept(Visitor visitor) => visitor.visitConstant(this);
 
@@ -1087,6 +1119,20 @@
   bool get isSafeForReordering => true;
 }
 
+class Await extends CallExpression {
+  final Reference<Primitive> input;
+  final Reference<Continuation> continuation;
+
+  Await(Primitive input, Continuation continuation)
+    : this.input = new Reference<Primitive>(input),
+      this.continuation = new Reference<Continuation>(continuation);
+
+  @override
+  accept(Visitor visitor) {
+    return visitor.visitAwait(this);
+  }
+}
+
 List<Reference<Primitive>> _referenceList(Iterable<Primitive> definitions) {
   return definitions.map((e) => new Reference<Primitive>(e)).toList();
 }
@@ -1118,6 +1164,7 @@
   T visitGetLazyStatic(GetLazyStatic node);
   T visitSetField(SetField node);
   T visitUnreachable(Unreachable node);
+  T visitAwait(Await node);
 
   // Definitions.
   T visitLiteralList(LiteralList node);
@@ -1139,6 +1186,7 @@
   T visitCreateInvocationMirror(CreateInvocationMirror node);
   T visitTypeTest(TypeTest node);
   T visitApplyBuiltinOperator(ApplyBuiltinOperator node);
+  T visitApplyBuiltinMethod(ApplyBuiltinMethod node);
   T visitGetLength(GetLength node);
   T visitGetIndex(GetIndex node);
   T visitSetIndex(SetIndex node);
@@ -1152,10 +1200,10 @@
 
 /// Visits all non-recursive children of a CPS term, i.e. anything
 /// not of type [Expression] or [Continuation].
-/// 
+///
 /// Note that the non-recursive nodes can contain other nodes inside of them,
 /// e.g. [Branch] contains an [IsTrue] which contains a [Reference].
-/// 
+///
 /// The `process*` methods are called in pre-order for every node visited.
 /// These can be overridden without disrupting the visitor traversal.
 class LeafVisitor implements Visitor {
@@ -1409,6 +1457,13 @@
     node.arguments.forEach(processReference);
   }
 
+  processApplyBuiltinMethod(ApplyBuiltinMethod node) {}
+  visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    processApplyBuiltinMethod(node);
+    processReference(node.receiver);
+    node.arguments.forEach(processReference);
+  }
+
   processForeignCode(ForeignCode node) {}
   visitForeignCode(ForeignCode node) {
     processForeignCode(node);
@@ -1423,6 +1478,13 @@
     processUnreachable(node);
   }
 
+  processAwait(Await node) {}
+  visitAwait(Await node) {
+    processAwait(node);
+    processReference(node.input);
+    processReference(node.continuation);
+  }
+
   processGetLength(GetLength node) {}
   visitGetLength(GetLength node) {
     processGetLength(node);
@@ -1449,25 +1511,25 @@
 
 /// Calls `process*` for all nodes in a tree.
 /// For simple usage, only override the `process*` methods.
-/// 
+///
 /// To avoid deep recursion, this class uses an "action stack" containing
 /// callbacks to be invoked after the processing of some term has finished.
-/// 
+///
 /// To avoid excessive overhead from the action stack, basic blocks of
 /// interior nodes are iterated in a loop without using the action stack.
-/// 
+///
 /// The iteration order can be controlled by overriding the `traverse*`
 /// methods for [LetCont], [LetPrim], [LetMutable], [LetHandler] and
 /// [Continuation].
-/// 
+///
 /// The `traverse*` methods return the expression to visit next, and may
 /// push other subterms onto the stack using [push] or [pushAction] to visit
 /// them later. Actions pushed onto the stack will be executed after the body
 /// has been processed (and the stack actions it pushed have been executed).
-/// 
-/// By default, the `traverse` methods visit all non-recursive subterms, 
+///
+/// By default, the `traverse` methods visit all non-recursive subterms,
 /// push all bound continuations on the stack, and return the body of the term.
-/// 
+///
 /// Subclasses should not override the `visit` methods for the nodes that have
 /// a `traverse` method.
 class RecursiveVisitor extends LeafVisitor {
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
index 1a317c4..a04fb4e 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart
@@ -326,11 +326,19 @@
     return '(ApplyBuiltinOperator $operator ($args))';
   }
 
+  String visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    String method = node.method.toString();
+    String receiver = access(node.receiver);
+    String args = node.arguments.map(access).join(' ');
+    return '(ApplyBuiltinMethod $method $receiver ($args))';
+  }
+
   String visitForeignCode(ForeignCode node) {
     String arguments = node.arguments.map(access).join(' ');
     String continuation = node.continuation == null ? ''
         : ' ${access(node.continuation)}';
-    return '(JS ${node.type} ${node.codeTemplate} ($arguments)$continuation)';
+    return '$indentation(JS "${node.codeTemplate.source}"'
+        ' ($arguments)$continuation)';
   }
 
   String visitGetLength(GetLength node) {
@@ -350,6 +358,13 @@
     String value = access(node.value);
     return '(SetIndex $object $index $value)';
   }
+
+  @override
+  String visitAwait(Await node) {
+    String value = access(node.input);
+    String continuation = access(node.continuation);
+    return '(Await $value $continuation)';
+  }
 }
 
 class ConstantStringifier extends ConstantValueVisitor<String, Null> {
@@ -412,11 +427,11 @@
   }
 
   String visitInterceptor(InterceptorConstantValue constant, _) {
-    return _failWith(constant);
+    return '(Interceptor "${constant.unparse()}")';
   }
 
   String visitSynthetic(SyntheticConstantValue constant, _) {
-    return _failWith(constant);
+    return '(Synthetic "${constant.unparse()}")';
   }
 
   String visitDeferred(DeferredConstantValue constant, _) {
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
index ba67e95..c802aa6 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -356,6 +356,13 @@
     return 'ApplyBuiltinOperator $operator ($args)';
   }
 
+  visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
+    String method = node.method.toString();
+    String receiver = formatReference(node.receiver);
+    String args = node.arguments.map(formatReference).join(', ');
+    return 'ApplyBuiltinMethod $method $receiver ($args)';
+  }
+
   @override
   visitForeignCode(cps_ir.ForeignCode node) {
     String id = names.name(node);
@@ -382,6 +389,13 @@
     String value = formatReference(node.value);
     return 'SetIndex $object $index $value';
   }
+
+  @override
+  visitAwait(cps_ir.Await node) {
+    String value = formatReference(node.input);
+    String continuation = formatReference(node.continuation);
+    return 'Await $value $continuation';
+  }
 }
 
 /**
@@ -625,6 +639,10 @@
     unexpectedNode(node);
   }
 
+  visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
+    unexpectedNode(node);
+  }
+
   visitGetLength(cps_ir.GetLength node) {
     unexpectedNode(node);
   }
@@ -653,4 +671,9 @@
   visitForeignCode(cps_ir.ForeignCode node) {
     addEdgeToContinuation(node.continuation);
   }
+
+  @override
+  visitAwait(cps_ir.Await node) {
+    unexpectedNode(node);
+  }
 }
diff --git a/pkg/compiler/lib/src/cps_ir/let_sinking.dart b/pkg/compiler/lib/src/cps_ir/let_sinking.dart
index 4c4736a..3b46d9a 100644
--- a/pkg/compiler/lib/src/cps_ir/let_sinking.dart
+++ b/pkg/compiler/lib/src/cps_ir/let_sinking.dart
@@ -6,6 +6,7 @@
 
 import 'cps_ir_nodes.dart';
 import 'optimizers.dart';
+import 'loop_hierarchy.dart';
 
 /// Sinks single-use primitives to the use when this is safe and profitable.
 ///
@@ -116,142 +117,3 @@
   }
 }
 
-/// Determines the effective nesting of loops.
-/// 
-/// The effective nesting of loops is different from the lexical nesting, since
-/// recursive continuations can generally contain all the code following 
-/// after the loop in addition to the looping code itself.
-/// 
-/// For example, the 'else' branch below is not effectively part of the loop:
-/// 
-///   let rec kont x = 
-///     if (<loop condition>) 
-///       <loop body>
-///       InvokeContinuation kont x'
-///     else 
-///       <after loop>
-///       return p.foo()
-/// 
-/// We use the term "loop" to mean recursive continuation.
-/// The `null` value is used to represent a context not part of any loop.
-class LoopHierarchy {
-  /// Nesting depth of the given loop.
-  Map<Continuation, int> loopDepth = <Continuation, int>{};
-
-  /// The innermost loop (other than itself) that may be invoked recursively
-  /// as a result of invoking the given continuation.
-  Map<Continuation, Continuation> loopTarget = <Continuation, Continuation>{};
-
-  /// Current nesting depth.
-  int currentDepth = 0;
-
-  /// Computes the loop hierarchy for the given function.
-  /// 
-  /// Parent pointers must be computed for [node].
-  LoopHierarchy(FunctionDefinition node) {
-    _processBlock(node.body, null);
-  }
-
-  /// Returns the innermost loop which [cont] is effectively part of.
-  Continuation getLoopHeader(Continuation cont) {
-    return cont.isRecursive ? cont : loopTarget[cont];
-  }
-
-  /// Marks the innermost loop as a subloop of the other loop.
-  /// 
-  /// Returns the innermost loop.
-  /// 
-  /// Both continuations, [c1] and [c2] may be null (i.e. no loop).
-  /// 
-  /// A loop is said to be a subloop of an enclosing loop if it can invoke
-  /// that loop recursively. This information is stored in [loopTarget].
-  /// 
-  /// This method is only invoked with two distinct loops if there is a
-  /// point that can reach a recursive invocation of both loops.
-  /// This implies that one loop is nested in the other, because they must
-  /// both be in scope at that point.
-  Continuation _markInnerLoop(Continuation c1, Continuation c2) {
-    assert(c1 == null || c1.isRecursive);
-    assert(c2 == null || c2.isRecursive);
-    if (c1 == null) return c2;
-    if (c2 == null) return c1;
-    if (c1 == c2) return c1;
-    if (loopDepth[c1] > loopDepth[c2]) {
-      loopTarget[c1] = _markInnerLoop(loopTarget[c1], c2);
-      return c1;
-    } else {
-      loopTarget[c2] = _markInnerLoop(loopTarget[c2], c1);
-      return c2;
-    }
-  }
-
-  /// Analyzes the body of [cont] and returns the innermost loop
-  /// that can be invoked recursively from [cont] (other than [cont] itself).
-  /// 
-  /// [catchLoop] is the innermost loop that can be invoked recursively
-  /// from the current exception handler.
-  Continuation _processContinuation(Continuation cont, Continuation catchLoop) {
-    if (cont.isRecursive) {
-      ++currentDepth;
-      loopDepth[cont] = currentDepth;
-      Continuation target = _processBlock(cont.body, catchLoop);
-      _markInnerLoop(loopTarget[cont], target);
-      --currentDepth;
-    } else {
-      loopTarget[cont] = _processBlock(cont.body, catchLoop);
-    }
-    return loopTarget[cont];
-  }
-
-  bool _isCallContinuation(Continuation cont) {
-    return cont.hasExactlyOneUse && cont.firstRef.parent is CallExpression;
-  }
-
-  /// Analyzes a basic block and returns the innermost loop that
-  /// can be invoked recursively from that block.
-  Continuation _processBlock(Expression node, Continuation catchLoop) {
-    List<Continuation> callContinuations = <Continuation>[];
-    for (; node is! TailExpression; node = node.next) {
-      if (node is LetCont) {
-        for (Continuation cont in node.continuations) {
-          if (!_isCallContinuation(cont)) {
-            // Process non-call continuations at the binding site, so they
-            // their loop target is known at all use sites.
-            _processContinuation(cont, catchLoop);
-          } else {
-            // To avoid deep recursion, do not analyze call continuations
-            // recursively. This basic block traversal steps into the
-            // call contiunation after visiting its use site. We store the
-            // continuations in a list so we can set the loop target once
-            // it is known.
-            callContinuations.add(cont);
-          }
-        }
-      } else if (node is LetHandler) {
-        catchLoop = _processContinuation(node.handler, catchLoop);
-      }
-    }
-    Continuation target;
-    if (node is InvokeContinuation) {
-      if (node.isRecursive) {
-        target = node.continuation.definition;
-      } else {
-        target = loopTarget[node.continuation.definition];
-      }
-    } else if (node is Branch) {
-      target = _markInnerLoop(
-          loopTarget[node.trueContinuation.definition],
-          loopTarget[node.falseContinuation.definition]);
-    } else {
-      assert(node is Unreachable || node is Throw);
-    }
-    target = _markInnerLoop(target, catchLoop);
-    for (Continuation cont in callContinuations) {
-      // Store the loop target on each call continuation in the basic block.
-      // Because we walk over call continuations as part of the basic block
-      // traversal, these do not get their loop target set otherwise.
-      loopTarget[cont] = target;
-    }
-    return target;
-  }
-}
diff --git a/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart b/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart
new file mode 100644
index 0000000..fc63944
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart
@@ -0,0 +1,153 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.cps_ir.loop_hierarchy;
+
+import 'cps_ir_nodes.dart';
+
+/// Determines the effective nesting of loops.
+/// 
+/// The effective nesting of loops is different from the lexical nesting, since
+/// recursive continuations can generally contain all the code following 
+/// after the loop in addition to the looping code itself.
+/// 
+/// For example, the 'else' branch below is not effectively part of the loop:
+/// 
+///   let rec kont x = 
+///     if (<loop condition>) 
+///       <loop body>
+///       InvokeContinuation kont x'
+///     else 
+///       <after loop>
+///       return p.foo()
+/// 
+/// We use the term "loop" to mean recursive continuation.
+/// The `null` value is used to represent a context not part of any loop.
+class LoopHierarchy {
+  /// Nesting depth of the given loop.
+  Map<Continuation, int> loopDepth = <Continuation, int>{};
+
+  /// The innermost loop (other than itself) that may be invoked recursively
+  /// as a result of invoking the given continuation.
+  Map<Continuation, Continuation> loopTarget = <Continuation, Continuation>{};
+
+  /// Current nesting depth.
+  int currentDepth = 0;
+
+  /// Computes the loop hierarchy for the given function.
+  /// 
+  /// Parent pointers must be computed for [node].
+  LoopHierarchy(FunctionDefinition node) {
+    _processBlock(node.body, null);
+  }
+
+  /// Returns the innermost loop which [cont] is effectively part of.
+  Continuation getLoopHeader(Continuation cont) {
+    return cont.isRecursive ? cont : loopTarget[cont];
+  }
+
+  /// Returns the innermost loop which the given loop is part of, other
+  /// than itself.
+  Continuation getEnclosingLoop(Continuation loop) {
+    return loopTarget[loop];
+  }
+
+  /// Marks the innermost loop as a subloop of the other loop.
+  /// 
+  /// Returns the innermost loop.
+  /// 
+  /// Both continuations, [c1] and [c2] may be null (i.e. no loop).
+  /// 
+  /// A loop is said to be a subloop of an enclosing loop if it can invoke
+  /// that loop recursively. This information is stored in [loopTarget].
+  /// 
+  /// This method is only invoked with two distinct loops if there is a
+  /// point that can reach a recursive invocation of both loops.
+  /// This implies that one loop is nested in the other, because they must
+  /// both be in scope at that point.
+  Continuation _markInnerLoop(Continuation c1, Continuation c2) {
+    assert(c1 == null || c1.isRecursive);
+    assert(c2 == null || c2.isRecursive);
+    if (c1 == null) return c2;
+    if (c2 == null) return c1;
+    if (c1 == c2) return c1;
+    if (loopDepth[c1] > loopDepth[c2]) {
+      loopTarget[c1] = _markInnerLoop(loopTarget[c1], c2);
+      return c1;
+    } else {
+      loopTarget[c2] = _markInnerLoop(loopTarget[c2], c1);
+      return c2;
+    }
+  }
+
+  /// Analyzes the body of [cont] and returns the innermost loop
+  /// that can be invoked recursively from [cont] (other than [cont] itself).
+  /// 
+  /// [catchLoop] is the innermost loop that can be invoked recursively
+  /// from the current exception handler.
+  Continuation _processContinuation(Continuation cont, Continuation catchLoop) {
+    if (cont.isRecursive) {
+      ++currentDepth;
+      loopDepth[cont] = currentDepth;
+      Continuation target = _processBlock(cont.body, catchLoop);
+      _markInnerLoop(loopTarget[cont], target);
+      --currentDepth;
+    } else {
+      loopTarget[cont] = _processBlock(cont.body, catchLoop);
+    }
+    return loopTarget[cont];
+  }
+
+  bool _isCallContinuation(Continuation cont) {
+    return cont.hasExactlyOneUse && cont.firstRef.parent is CallExpression;
+  }
+
+  /// Analyzes a basic block and returns the innermost loop that
+  /// can be invoked recursively from that block.
+  Continuation _processBlock(Expression node, Continuation catchLoop) {
+    List<Continuation> callContinuations = <Continuation>[];
+    for (; node is! TailExpression; node = node.next) {
+      if (node is LetCont) {
+        for (Continuation cont in node.continuations) {
+          if (!_isCallContinuation(cont)) {
+            // Process non-call continuations at the binding site, so they
+            // their loop target is known at all use sites.
+            _processContinuation(cont, catchLoop);
+          } else {
+            // To avoid deep recursion, do not analyze call continuations
+            // recursively. This basic block traversal steps into the
+            // call contiunation after visiting its use site. We store the
+            // continuations in a list so we can set the loop target once
+            // it is known.
+            callContinuations.add(cont);
+          }
+        }
+      } else if (node is LetHandler) {
+        catchLoop = _processContinuation(node.handler, catchLoop);
+      }
+    }
+    Continuation target;
+    if (node is InvokeContinuation) {
+      if (node.isRecursive) {
+        target = node.continuation.definition;
+      } else {
+        target = loopTarget[node.continuation.definition];
+      }
+    } else if (node is Branch) {
+      target = _markInnerLoop(
+          loopTarget[node.trueContinuation.definition],
+          loopTarget[node.falseContinuation.definition]);
+    } else {
+      assert(node is Unreachable || node is Throw);
+    }
+    target = _markInnerLoop(target, catchLoop);
+    for (Continuation cont in callContinuations) {
+      // Store the loop target on each call continuation in the basic block.
+      // Because we walk over call continuations as part of the basic block
+      // traversal, these do not get their loop target set otherwise.
+      loopTarget[cont] = target;
+    }
+    return target;
+  }
+}
diff --git a/pkg/compiler/lib/src/cps_ir/loop_invariant_code_motion.dart b/pkg/compiler/lib/src/cps_ir/loop_invariant_code_motion.dart
new file mode 100644
index 0000000..4471019
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/loop_invariant_code_motion.dart
@@ -0,0 +1,134 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.cps_ir.loop_invariant_code_motion;
+
+import 'optimizers.dart';
+import 'cps_ir_nodes.dart';
+import 'loop_hierarchy.dart';
+
+/// Lifts primitives out of loops when it is safe and profitable.
+/// 
+/// Currently we only do this for interceptors.
+class LoopInvariantCodeMotion extends RecursiveVisitor implements Pass {
+  String get passName => 'Loop-invariant code motion';
+
+  final Map<Primitive, Continuation> primitiveLoop = 
+      <Primitive, Continuation>{};
+
+  LoopHierarchy loopHierarchy;
+  Continuation currentLoopHeader;
+
+  /// When processing the dependencies of a primitive, [referencedLoop]
+  /// refers to the innermost loop that contains one of the dependencies
+  /// seen so far (or `null` if none of the dependencies are bound in a loop).
+  ///
+  /// This is used to determine how far the primitive can be lifted without
+  /// falling out of scope of its dependencies.
+  Continuation referencedLoop;
+
+  void rewrite(FunctionDefinition node) {
+    loopHierarchy = new LoopHierarchy(node);
+    visit(node.body);
+  }
+
+  @override
+  Expression traverseContinuation(Continuation cont) {
+    Continuation oldLoopHeader = currentLoopHeader;
+    pushAction(() {
+      currentLoopHeader = oldLoopHeader;
+    });
+    currentLoopHeader = loopHierarchy.getLoopHeader(cont);
+    for (Parameter param in cont.parameters) {
+      primitiveLoop[param] = currentLoopHeader;
+    }
+    return cont.body;
+  }
+
+  @override
+  Expression traverseLetPrim(LetPrim node) {
+    primitiveLoop[node.primitive] = currentLoopHeader;
+    if (!shouldLift(node.primitive)) {
+      return node.body;
+    }
+    referencedLoop = null;
+    visit(node.primitive); // Sets referencedLoop.
+    Expression next = node.body;
+    if (referencedLoop != currentLoopHeader) {
+      // Bind the primitive inside [referencedLoop] (possibly null),
+      // immediately before the binding of the inner loop.
+
+      // Find the inner loop.
+      Continuation loop = currentLoopHeader;
+      Continuation enclosing = loopHierarchy.getEnclosingLoop(loop);
+      while (enclosing != referencedLoop) {
+        assert(loop != null);
+        loop = enclosing;
+        enclosing = loopHierarchy.getEnclosingLoop(loop);
+      }
+      assert(loop != null);
+
+      // Remove LetPrim from its current position.
+      node.parent.body = node.body;
+      node.body.parent = node.parent;
+
+      // Insert the LetPrim immediately before the loop.
+      LetCont loopBinding = loop.parent;
+      InteriorNode newParent = loopBinding.parent;
+      newParent.body = node;
+      node.body = loopBinding;
+      loopBinding.parent = node;
+      node.parent = newParent;
+
+      // A different loop now contains the primitive.
+      primitiveLoop[node.primitive] = enclosing;
+    }
+    return next;
+  }
+
+  /// Returns the the innermost loop that effectively encloses both
+  /// c1 and c2 (or `null` if there is no such loop).
+  Continuation leastCommonAncestor(Continuation c1, Continuation c2) {
+    int d1 = getDepth(c1), d2 = getDepth(c2);
+    while (c1 != c2) {
+      if (d1 <= d2) {
+        c2 = loopHierarchy.getEnclosingLoop(c2);
+        d2 = getDepth(c2);
+      } else {
+        c1 = loopHierarchy.getEnclosingLoop(c1);
+        d1 = getDepth(c1);
+      }
+    }
+    return c1;
+  }
+
+  @override
+  void processReference(Reference ref) {
+    Continuation loop = 
+        leastCommonAncestor(currentLoopHeader, primitiveLoop[ref.definition]);
+    referencedLoop = getInnerLoop(loop, referencedLoop);
+  }
+
+  int getDepth(Continuation loop) {
+    if (loop == null) return -1;
+    return loopHierarchy.loopDepth[loop];
+  }
+
+  Continuation getInnerLoop(Continuation loop1, Continuation loop2) {
+    if (loop1 == null) return loop2;
+    if (loop2 == null) return loop1;
+    if (loopHierarchy.loopDepth[loop1] > loopHierarchy.loopDepth[loop2]) {
+      return loop1;
+    } else {
+      return loop2;
+    }
+  }
+
+  bool shouldLift(Primitive prim) {
+    // Interceptors are safe and almost always profitable for lifting
+    // out of loops. Several other primitive could be lifted too, but it's not
+    // always profitable to do so.
+    return prim is Interceptor;
+  }
+}
diff --git a/pkg/compiler/lib/src/cps_ir/optimizers.dart b/pkg/compiler/lib/src/cps_ir/optimizers.dart
index 4371086..9a6d2a7 100644
--- a/pkg/compiler/lib/src/cps_ir/optimizers.dart
+++ b/pkg/compiler/lib/src/cps_ir/optimizers.dart
@@ -13,6 +13,8 @@
 export 'shrinking_reductions.dart' show ShrinkingReducer, ParentVisitor;
 export 'mutable_ssa.dart' show MutableVariableEliminator;
 export 'let_sinking.dart' show LetSinker;
+export 'loop_invariant_code_motion.dart' show LoopInvariantCodeMotion;
+export 'share_interceptors.dart' show ShareInterceptors;
 
 /// An optimization pass over the CPS IR.
 abstract class Pass {
diff --git a/pkg/compiler/lib/src/cps_ir/share_interceptors.dart b/pkg/compiler/lib/src/cps_ir/share_interceptors.dart
new file mode 100644
index 0000000..7b360d4
--- /dev/null
+++ b/pkg/compiler/lib/src/cps_ir/share_interceptors.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.cps_ir.share_interceptors;
+
+import 'cps_ir_nodes.dart';
+import 'optimizers.dart';
+
+/// Merges calls to `getInterceptor` when one call dominates the other.
+/// 
+/// Should run after [LoopInvariantCodeMotion] so interceptors lifted out from
+/// loops can be merged.
+class ShareInterceptors extends RecursiveVisitor implements Pass {
+  String get passName => 'Share interceptors';
+
+  final Map<Primitive, Interceptor> interceptorFor = 
+      <Primitive, Interceptor>{};
+
+  void rewrite(FunctionDefinition node) {
+    visit(node.body);
+  }
+
+  @override
+  Expression traverseLetPrim(LetPrim node) {
+    if (node.primitive is Interceptor) {
+      Interceptor interceptor = node.primitive;
+      Primitive input = interceptor.input.definition;
+      Interceptor existing = interceptorFor[input];
+      if (existing != null) {
+        existing.interceptedClasses.addAll(interceptor.interceptedClasses);
+        existing.substituteFor(interceptor);
+      } else {
+        interceptorFor[input] = interceptor;
+        pushAction(() {
+          interceptorFor.remove(input);
+        });
+      }
+    }
+    return node.body;
+  }
+}
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index ac1d143..1c85d15 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -666,6 +666,11 @@
     node.arguments.forEach((Reference ref) => ref.parent = node);
   }
 
+  processApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    node.receiver.parent = node;
+    node.arguments.forEach((Reference ref) => ref.parent = node);
+  }
+
   processForeignCode(ForeignCode node) {
     if (node.continuation != null) {
       node.continuation.parent = node;
@@ -687,6 +692,11 @@
     node.index.parent = node;
     node.value.parent = node;
   }
+
+  processAwait(Await node) {
+    node.continuation.parent = node;
+    node.input.parent = node;
+  }
 }
 
 class _ReductionKind {
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 5784bba..1cc1b97 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -4,21 +4,29 @@
 
 import 'optimizers.dart';
 
+import '../common/names.dart' show
+    Selectors;
+import '../compiler.dart' as dart2js show
+    Compiler;
 import '../constants/constant_system.dart';
-import '../resolution/operators.dart';
 import '../constants/values.dart';
 import '../dart_types.dart' as types;
-import '../dart2jslib.dart' as dart2js;
-import '../tree/tree.dart' show DartString, ConsDartString, LiteralDartString;
-import 'cps_ir_nodes.dart';
+import '../diagnostics/invariant.dart' as dart2js show
+    InternalErrorFunction;
+import '../elements/elements.dart';
+import '../io/source_information.dart' show SourceInformation;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
+import '../js_backend/codegen/task.dart' show CpsFunctionCompiler;
+import '../resolution/access_semantics.dart';
+import '../resolution/operators.dart';
+import '../resolution/send_structure.dart';
+import '../tree/tree.dart' as ast;
 import '../types/types.dart';
 import '../types/constants.dart' show computeTypeMask;
-import '../elements/elements.dart';
-import '../dart2jslib.dart' show ClassWorld, World;
 import '../universe/universe.dart';
-import '../js_backend/js_backend.dart' show JavaScriptBackend;
-import '../io/source_information.dart' show SourceInformation;
+import '../world.dart' show World;
 import 'cps_fragment.dart';
+import 'cps_ir_nodes.dart';
 
 enum AbstractBool {
   True, False, Maybe, Nothing
@@ -40,7 +48,7 @@
   TypeMask get listType => inferrer.listType;
   TypeMask get mapType => inferrer.mapType;
   TypeMask get nonNullType => inferrer.nonNullType;
-  TypeMask get mutableNativeListType => backend.mutableArrayType;
+  TypeMask get extendableNativeListType => backend.extendableArrayType;
 
   TypeMask numStringBoolType;
 
@@ -51,22 +59,50 @@
     : inferrer = compiler.typesTask,
       classWorld = compiler.world,
       backend = compiler.backend {
+
+    // Build the number+string+bool type. To make containment tests more
+    // inclusive, we use the num, String, bool types for this, not
+    // the JSNumber, JSString, JSBool subclasses.
+    TypeMask anyNum =
+        new TypeMask.nonNullSubtype(classWorld.numClass, classWorld);
+    TypeMask anyString =
+        new TypeMask.nonNullSubtype(classWorld.stringClass, classWorld);
+    TypeMask anyBool =
+        new TypeMask.nonNullSubtype(classWorld.boolClass, classWorld);
     numStringBoolType =
-      new TypeMask.unionOf(<TypeMask>[numType, stringType, boolType],
+      new TypeMask.unionOf(<TypeMask>[anyNum, anyString, anyBool],
                            classWorld);
   }
 
+  bool methodUsesReceiverArgument(FunctionElement function) {
+    assert(backend.isInterceptedMethod(function));
+    ClassElement clazz = function.enclosingClass.declaration;
+    return clazz.isSubclassOf(backend.jsInterceptorClass) ||
+           classWorld.isUsedAsMixin(clazz);
+  }
+
   Element locateSingleElement(TypeMask mask, Selector selector) {
     return mask.locateSingleElement(selector, mask, classWorld.compiler);
   }
 
+  ClassElement singleClass(TypeMask mask) {
+    return mask.singleClass(classWorld);
+  }
+
   bool needsNoSuchMethodHandling(TypeMask mask, Selector selector) {
     return mask.needsNoSuchMethodHandling(selector, classWorld);
   }
 
   TypeMask getReceiverType(MethodElement method) {
     assert(method.isInstanceMember);
-    return nonNullSubclass(method.enclosingClass);
+    if (classWorld.isUsedAsMixin(method.enclosingClass.declaration)) {
+      // If used as a mixin, the receiver could be any of the classes that mix
+      // in the class, and these are not considered subclasses.
+      // TODO(asgerf): Exclude the subtypes that only `implement` the class.
+      return nonNullSubtype(method.enclosingClass);
+    } else {
+      return nonNullSubclass(method.enclosingClass);
+    }
   }
 
   TypeMask getParameterType(ParameterElement parameter) {
@@ -106,24 +142,29 @@
     return new TypeMask.nonNullSubclass(element.declaration, classWorld);
   }
 
+  TypeMask nonNullSubtype(ClassElement element) {
+    if (element.isClosure) return functionType;
+    return new TypeMask.nonNullSubtype(element.declaration, classWorld);
+  }
+
   bool isDefinitelyBool(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.containsOnlyBool(classWorld);
+    return t.nonNullable().containsOnlyBool(classWorld);
   }
 
   bool isDefinitelyNum(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.containsOnlyNum(classWorld);
+    return t.nonNullable().containsOnlyNum(classWorld);
   }
 
   bool isDefinitelyString(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.containsOnlyString(classWorld);
+    return t.nonNullable().containsOnlyString(classWorld);
   }
 
   bool isDefinitelyNumStringBool(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return numStringBoolType.containsMask(t, classWorld);
+    return numStringBoolType.containsMask(t.nonNullable(), classWorld);
   }
 
   bool isDefinitelyNotNumStringBool(TypeMask t) {
@@ -151,17 +192,28 @@
 
   bool isDefinitelyNativeList(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.satisfies(backend.jsArrayClass, classWorld);
+    return t.nonNullable().satisfies(backend.jsArrayClass, classWorld);
   }
 
   bool isDefinitelyMutableNativeList(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.satisfies(backend.jsMutableArrayClass, classWorld);
+    return t.nonNullable().satisfies(backend.jsMutableArrayClass, classWorld);
   }
 
   bool isDefinitelyFixedNativeList(TypeMask t, {bool allowNull: false}) {
     if (!allowNull && t.isNullable) return false;
-    return t.satisfies(backend.jsFixedArrayClass, classWorld);
+    return t.nonNullable().satisfies(backend.jsFixedArrayClass, classWorld);
+  }
+
+  bool isDefinitelyExtendableNativeList(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.nonNullable().satisfies(backend.jsExtendableArrayClass,
+        classWorld);
+  }
+
+  bool isDefinitelyIndexable(TypeMask t, {bool allowNull: false}) {
+    if (!allowNull && t.isNullable) return false;
+    return t.nonNullable().satisfies(backend.jsIndexableClass, classWorld);
   }
 
   bool areDisjoint(TypeMask leftType, TypeMask rightType) {
@@ -318,6 +370,18 @@
                                                allowNull: allowNull);
   }
 
+  bool isDefinitelyExtendableNativeList(AbstractValue value,
+                                        {bool allowNull: false}) {
+    return value.isNothing ||
+        typeSystem.isDefinitelyExtendableNativeList(value.type,
+                                                    allowNull: allowNull);
+  }
+
+  bool isDefinitelyIndexable(AbstractValue value, {bool allowNull: false}) {
+    return value.isNothing ||
+        typeSystem.isDefinitelyIndexable(value.type, allowNull: allowNull);
+  }
+
   /// Returns whether the given [value] is an instance of [type].
   ///
   /// Since [value] and [type] are not always known, [AbstractBool.Maybe] is
@@ -420,13 +484,23 @@
         }
         return null;
 
+      case BinaryOperatorKind.EQ:
+        bool behavesLikeIdentity =
+          isDefinitelyNumStringBool(left, allowNull: true) ||
+          right.isNullConstant;
+        if (behavesLikeIdentity &&
+            typeSystem.areDisjoint(left.type, right.type)) {
+          return constant(new FalseConstantValue());
+        }
+        return null;
+
       default:
         return null; // The caller will use return type from type inference.
     }
   }
 
   AbstractValue stringConstant(String value) {
-    return constant(new StringConstantValue(new DartString.literal(value)));
+    return constant(new StringConstantValue(new ast.DartString.literal(value)));
   }
 
   AbstractValue stringify(AbstractValue value) {
@@ -482,13 +556,14 @@
   String get passName => 'Sparse constant propagation';
 
   final dart2js.Compiler _compiler;
+  final CpsFunctionCompiler _functionCompiler;
   // The constant system is used for evaluation of expressions with constant
   // arguments.
   final ConstantPropagationLattice _lattice;
   final dart2js.InternalErrorFunction _internalError;
   final Map<Definition, AbstractValue> _values = <Definition, AbstractValue>{};
 
-  TypePropagator(dart2js.Compiler compiler)
+  TypePropagator(dart2js.Compiler compiler, this._functionCompiler)
       : _compiler = compiler,
         _internalError = compiler.internalError,
         _lattice = new ConstantPropagationLattice(
@@ -518,6 +593,7 @@
     // with constant results or existing values that are in scope.
     TransformingVisitor transformer = new TransformingVisitor(
         _compiler,
+        _functionCompiler,
         _lattice,
         analyzer,
         replacements,
@@ -551,6 +627,7 @@
   final Map<Expression, ConstantValue> replacements;
   final ConstantPropagationLattice lattice;
   final dart2js.Compiler compiler;
+  final CpsFunctionCompiler functionCompiler;
 
   JavaScriptBackend get backend => compiler.backend;
   TypeMaskSystem get typeSystem => lattice.typeSystem;
@@ -562,6 +639,7 @@
   final List<Node> stack = <Node>[];
 
   TransformingVisitor(this.compiler,
+                      this.functionCompiler,
                       this.lattice,
                       this.analyzer,
                       this.replacements,
@@ -604,7 +682,9 @@
 
   void visitLetPrim(LetPrim node) {
     AbstractValue value = getValue(node.primitive);
-    if (node.primitive is! Constant && value.isConstant) {
+    if (node.primitive is! Constant &&
+        node.primitive.isSafeForElimination &&
+        value.isConstant) {
       // If the value is a known constant, compile it as a constant.
       Constant newPrim = makeConstantPrimitive(value.constant);
       newPrim.substituteFor(node.primitive);
@@ -696,7 +776,7 @@
     context.body = node;
     node.parent = context;
   }
-  
+
   /// Binds [prim] before [node].
   void insertLetPrim(Expression node, Primitive prim) {
     InteriorNode parent = node.parent;
@@ -749,12 +829,14 @@
     AbstractBool boolifiedValue = lattice.boolify(conditionValue);
 
     if (boolifiedValue == AbstractBool.True) {
+      replaceSubtree(falseCont.body, new Unreachable());
       InvokeContinuation invoke = new InvokeContinuation(trueCont, []);
       replaceSubtree(node, invoke);
       push(invoke);
       return;
     }
     if (boolifiedValue == AbstractBool.False) {
+      replaceSubtree(trueCont.body, new Unreachable());
       InvokeContinuation invoke = new InvokeContinuation(falseCont, []);
       replaceSubtree(node, invoke);
       push(invoke);
@@ -762,7 +844,8 @@
     }
 
     if (condition is ApplyBuiltinOperator &&
-        condition.operator == BuiltinOperator.LooseEq) {
+        (condition.operator == BuiltinOperator.LooseEq ||
+         condition.operator == BuiltinOperator.StrictEq)) {
       Primitive leftArg = condition.arguments[0].definition;
       Primitive rightArg = condition.arguments[1].definition;
       AbstractValue left = getValue(leftArg);
@@ -781,6 +864,20 @@
         Branch branch = new Branch(new IsTrue(rightArg), falseCont, trueCont);
         replaceSubtree(node, branch);
         return;
+      } else if (right.isTrueConstant &&
+                 lattice.isDefinitelyBool(left, allowNull: true)) {
+        // Rewrite:
+        //   if (x == true) S1 else S2
+        //     =>
+        //   if (x) S1 else S2
+        Branch branch = new Branch(new IsTrue(leftArg), trueCont, falseCont);
+        replaceSubtree(node, branch);
+        return;
+      } else if (left.isTrueConstant &&
+                 lattice.isDefinitelyBool(right, allowNull: true)) {
+        Branch branch = new Branch(new IsTrue(rightArg), trueCont, falseCont);
+        replaceSubtree(node, branch);
+        return;
       }
     }
   }
@@ -812,6 +909,11 @@
     }
   }
 
+  /// Returns the possible targets of [selector] when invoked on a receiver
+  /// of type [receiverType].
+  Iterable<Element> getAllTargets(TypeMask receiverType, Selector selector) {
+    return compiler.world.allFunctions.filter(selector, receiverType);
+  }
 
   /************************* CALL EXPRESSIONS *************************/
 
@@ -840,47 +942,62 @@
       AbstractValue left = getValue(leftArg);
       AbstractValue right = getValue(rightArg);
 
-      if (node.selector.name == '==') {
+      String opname = node.selector.name;
+      if (opname == '==') {
         // Equality is special due to its treatment of null values and the
         // fact that Dart-null corresponds to both JS-null and JS-undefined.
         // Please see documentation for IsFalsy, StrictEq, and LooseEq.
         if (left.isNullConstant || right.isNullConstant) {
-          return replaceWithBinary(BuiltinOperator.LooseEq, leftArg, rightArg);
+          return replaceWithBinary(BuiltinOperator.Identical,
+                                   leftArg, rightArg);
         }
-        // Comparison of numbers, strings, and booleans.
-        if (lattice.isDefinitelyNumStringBool(left, allowNull: true) &&
-            lattice.isDefinitelyNumStringBool(right, allowNull: true) &&
-            !(left.isNullable && right.isNullable)) {
-          return replaceWithBinary(BuiltinOperator.StrictEq, leftArg, rightArg);
+        // There are several implementations of == that behave like identical.
+        // Specialize it if we definitely call one of those.
+        bool behavesLikeIdentical = true;
+        for (Element target in getAllTargets(left.type, node.selector)) {
+          ClassElement clazz = target.enclosingClass.declaration;
+          if (clazz != compiler.world.objectClass &&
+              clazz != backend.jsInterceptorClass &&
+              clazz != backend.jsNullClass) {
+            behavesLikeIdentical = false;
+            break;
+          }
         }
-        if (lattice.isDefinitelyNum(left, allowNull: true) &&
-            lattice.isDefinitelyNum(right, allowNull: true)) {
-          return replaceWithBinary(BuiltinOperator.LooseEq, leftArg, rightArg);
-        }
-        if (lattice.isDefinitelyString(left, allowNull: true) &&
-            lattice.isDefinitelyString(right, allowNull: true)) {
-          return replaceWithBinary(BuiltinOperator.LooseEq, leftArg, rightArg);
-        }
-        if (lattice.isDefinitelyBool(left, allowNull: true) &&
-            lattice.isDefinitelyBool(right, allowNull: true)) {
-          return replaceWithBinary(BuiltinOperator.LooseEq, leftArg, rightArg);
+        if (behavesLikeIdentical) {
+          return replaceWithBinary(BuiltinOperator.Identical,
+                                   leftArg, rightArg);
         }
       } else {
-        // Try to insert a numeric operator.
         if (lattice.isDefinitelyNum(left, allowNull: false) &&
             lattice.isDefinitelyNum(right, allowNull: false)) {
-          BuiltinOperator operator = NumBinaryBuiltins[node.selector.name];
+          // Try to insert a numeric operator.
+          BuiltinOperator operator = NumBinaryBuiltins[opname];
           if (operator != null) {
             return replaceWithBinary(operator, leftArg, rightArg);
           }
-        }
-        else if (lattice.isDefinitelyString(left, allowNull: false) &&
-                 lattice.isDefinitelyString(right, allowNull: false)) {
-          if (node.selector.name == '+') {
-            return replaceWithBinary(BuiltinOperator.StringConcatenate,
+          // Try to insert a shift-left operator.
+          // Shift operators are not in [NumBinaryBuiltins] because Dart shifts
+          // behave different than JS shifts.
+          // We do not introduce shift-right operators yet because the operator
+          // to use depends on whether the left-hand operand is negative.
+          // See js_number.dart in js_runtime for details.
+          PrimitiveConstantValue rightConstant = right.constant;
+          if (opname == '<<' &&
+              lattice.isDefinitelyInt(left) &&
+              rightConstant != null &&
+              rightConstant.isInt &&
+              rightConstant.primitiveValue >= 0 &&
+              rightConstant.primitiveValue <= 31) {
+            return replaceWithBinary(BuiltinOperator.NumShl,
                                      leftArg, rightArg);
           }
         }
+        if (lattice.isDefinitelyString(left, allowNull: false) &&
+            lattice.isDefinitelyString(right, allowNull: false) &&
+            opname == '+') {
+          return replaceWithBinary(BuiltinOperator.StringConcatenate,
+                                   leftArg, rightArg);
+        }
       }
     }
     // We should only get here if the node was not specialized.
@@ -986,22 +1103,22 @@
     return cps;
   }
 
-  /// Counts number of index accesses on [list] and determines based on
+  /// Counts number of index accesses on [receiver] and determines based on
   /// that number if we should try to inline them.
   ///
   /// This is a short-term solution to avoid inserting a lot of bounds checks,
   /// since there is currently no optimization for eliminating them.
-  bool hasTooManyIndexAccesses(Primitive list) {
+  bool hasTooManyIndexAccesses(Primitive receiver) {
     int count = 0;
-    for (Reference ref = list.firstRef; ref != null; ref = ref.next) {
+    for (Reference ref = receiver.firstRef; ref != null; ref = ref.next) {
       Node use = ref.parent;
       if (use is InvokeMethod &&
           (use.selector.isIndex || use.selector.isIndexSet) &&
-          getDartReceiver(use) == list) {
+          getDartReceiver(use) == receiver) {
         ++count;
-      } else if (use is GetIndex && use.object.definition == list) {
+      } else if (use is GetIndex && use.object.definition == receiver) {
         ++count;
-      } else if (use is SetIndex && use.object.definition == list) {
+      } else if (use is SetIndex && use.object.definition == receiver) {
         ++count;
       }
       if (count > 2) return true;
@@ -1009,6 +1126,40 @@
     return false;
   }
 
+  /// Tries to replace [node] with a direct `length` or index access.
+  ///
+  /// Returns `true` if the node was replaced.
+  bool specializeIndexableAccess(InvokeMethod node) {
+    Primitive receiver = getDartReceiver(node);
+    AbstractValue receiverValue = getValue(receiver);
+    if (!lattice.isDefinitelyIndexable(receiverValue)) return false;
+    SourceInformation sourceInfo = node.sourceInformation;
+    Continuation cont = node.continuation.definition;
+    switch (node.selector.name) {
+      case 'length':
+        if (!node.selector.isGetter) return false;
+        CpsFragment cps = new CpsFragment(sourceInfo);
+        cps.invokeContinuation(cont, [cps.letPrim(new GetLength(receiver))]);
+        replaceSubtree(node, cps.result);
+        push(cps.result);
+        return true;
+
+      case '[]':
+        if (hasTooManyIndexAccesses(receiver)) return false;
+        Primitive index = getDartArgument(node, 0);
+        if (!lattice.isDefinitelyInt(getValue(index))) return false;
+        CpsFragment cps = makeBoundsCheck(receiver, index, sourceInfo);
+        GetIndex get = cps.letPrim(new GetIndex(receiver, index));
+        cps.invokeContinuation(cont, [get]);
+        replaceSubtree(node, cps.result);
+        push(cps.result);
+        return true;
+
+      default:
+        return false;
+    }
+  }
+
   /// Tries to replace [node] with one or more direct array access operations.
   ///
   /// Returns `true` if the node was replaced.
@@ -1023,18 +1174,76 @@
         lattice.isDefinitelyFixedNativeList(listValue, allowNull: true);
     bool isMutable =
         lattice.isDefinitelyMutableNativeList(listValue, allowNull: true);
+    bool isExtendable =
+        lattice.isDefinitelyExtendableNativeList(listValue, allowNull: true);
     SourceInformation sourceInfo = node.sourceInformation;
     Continuation cont = node.continuation.definition;
     switch (node.selector.name) {
-      case 'length':
-        if (!node.selector.isGetter) return false;
+      case 'add':
+        if (!node.selector.isCall ||
+            node.selector.positionalArgumentCount != 1 ||
+            node.selector.namedArgumentCount != 0) {
+          return false;
+        }
+        if (!isExtendable) return false;
+        Primitive addedItem = getDartArgument(node, 0);
         CpsFragment cps = new CpsFragment(sourceInfo);
-        cps.invokeContinuation(cont, [cps.letPrim(new GetLength(list))]);
+        cps.invokeBuiltin(BuiltinMethod.Push,
+            list,
+            <Primitive>[addedItem],
+            receiverIsNotNull: listValue.isDefinitelyNotNull);
+        cps.invokeContinuation(cont, [cps.makeNull()]);
         replaceSubtree(node, cps.result);
         push(cps.result);
         return true;
 
-      case '[]':
+      case 'removeLast':
+        if (!node.selector.isCall ||
+            node.selector.argumentCount != 0) {
+          return false;
+        }
+        if (!isExtendable) return false;
+        CpsFragment cps = new CpsFragment(sourceInfo);
+        Primitive removedItem = cps.invokeBuiltin(BuiltinMethod.Pop,
+            list,
+            <Primitive>[],
+            receiverIsNotNull: listValue.isDefinitelyNotNull);
+        cps.invokeContinuation(cont, [removedItem]);
+        replaceSubtree(node, cps.result);
+        push(cps.result);
+        return true;
+
+      case 'addAll':
+        if (!node.selector.isCall ||
+            node.selector.argumentCount != 1) {
+          return false;
+        }
+        if (!isExtendable) return false;
+        Primitive addedList = getDartArgument(node, 0);
+        // Rewrite addAll([x1, ..., xN]) to push(x1, ..., xN).
+        // Ensure that the list is not mutated between creation and use.
+        // We aim for the common case where this is the only use of the list,
+        // which also guarantees that this list is not mutated before use.
+        if (addedList is! LiteralList || !addedList.hasExactlyOneUse) {
+          return false;
+        }
+        LiteralList addedLiteral = addedList;
+        CpsFragment cps = new CpsFragment(sourceInfo);
+        cps.invokeBuiltin(BuiltinMethod.Push,
+            list,
+            addedLiteral.values.map((ref) => ref.definition).toList(),
+            receiverIsNotNull: listValue.isDefinitelyNotNull);
+        cps.invokeContinuation(cont, [cps.makeNull()]);
+        replaceSubtree(node, cps.result);
+        push(cps.result);
+        return true;
+
+      case 'elementAt':
+        if (!node.selector.isCall ||
+            node.selector.positionalArgumentCount != 1 ||
+            node.selector.namedArgumentCount != 0) {
+          return false;
+        }
         if (listValue.isNullable) return false;
         if (hasTooManyIndexAccesses(list)) return false;
         Primitive index = getDartArgument(node, 0);
@@ -1063,56 +1272,23 @@
         return true;
 
       case 'forEach':
-        if (!node.selector.isCall ||
-            node.selector.positionalArgumentCount != 1 ||
-            node.selector.namedArgumentCount != 0) {
-          return false;
+        Element element =
+            compiler.world.locateSingleElement(node.selector, listValue.type);
+        if (element == null ||
+            !element.isFunction ||
+            !node.selector.isCall) return false;
+        assert(node.selector.positionalArgumentCount == 1);
+        assert(node.selector.namedArgumentCount == 0);
+        FunctionDefinition target = functionCompiler.compileToCpsIR(element);
+
+        node.receiver.definition.substituteFor(target.thisParameter);
+        for (int i = 0; i < node.arguments.length; ++i) {
+          node.arguments[i].definition.substituteFor(target.parameters[i]);
         }
-        Primitive callback = getDartArgument(node, 0);
-        // Rewrite to:
-        //   var originalLength = array.length, i = 0;
-        //   while (i < array.length) {
-        //     callback(array[i]);
-        //     if (array.length !== originalLength) throw;
-        //     i = i + 1;
-        //   }
-        CpsFragment cps = new CpsFragment(sourceInfo);
-        Primitive originalLength = cps.letPrim(new GetLength(list));
-        originalLength.hint = new OriginalLengthEntity();
+        node.continuation.definition.substituteFor(target.returnContinuation);
 
-        // Build a loop.
-        Parameter loopIndex = new Parameter(new LoopIndexEntity());
-        Continuation loop = cps.beginLoop(
-            <Parameter>[loopIndex], [cps.makeZero()]);
-
-        // Check for loop exit.
-        Primitive loopCondition = cps.applyBuiltin(
-            BuiltinOperator.NumLt,
-            [loopIndex, cps.letPrim(new GetLength(list))]);
-        CpsFragment exitBranch = cps.ifFalse(loopCondition);
-        exitBranch.invokeContinuation(cont, [exitBranch.makeNull()]);
-
-        // Invoke the callback.
-        Primitive arrayItem = cps.letPrim(new GetIndex(list, loopIndex));
-        cps.invokeMethod(callback,
-                         new Selector.callClosure(1),
-                         getValue(callback).type,
-                         [arrayItem]);
-
-        // Check for concurrent modification, unless the list is fixed-length.
-        if (!isFixedLength) {
-          cps.append(
-            makeConcurrentModificationCheck(list, originalLength, sourceInfo));
-        }
-
-        // Increment i and continue the loop.
-        Primitive addOne = cps.applyBuiltin(
-            BuiltinOperator.NumAdd,
-            [loopIndex, cps.makeOne()]);
-        cps.continueLoop(loop, [addOne]);
-
-        replaceSubtree(node, cps.result);
-        push(cps.result);
+        replaceSubtree(node, target.body);
+        push(target.body);
         return true;
 
       case 'iterator':
@@ -1121,16 +1297,14 @@
         Continuation iteratorCont = cont;
 
         // Check that all uses of the iterator are 'moveNext' and 'current'.
-        Selector moveNextSelector = new Selector.call('moveNext', null, 0);
-        Selector currentSelector = new Selector.getter('current', null);
-        assert(!isInterceptedSelector(moveNextSelector));
-        assert(!isInterceptedSelector(currentSelector));
+        assert(!isInterceptedSelector(Selectors.moveNext));
+        assert(!isInterceptedSelector(Selectors.current));
         for (Reference ref = iterator.firstRef; ref != null; ref = ref.next) {
           if (ref.parent is! InvokeMethod) return false;
           InvokeMethod use = ref.parent;
           if (ref != use.receiver) return false;
-          if (use.selector != moveNextSelector &&
-              use.selector != currentSelector) {
+          if (use.selector != Selectors.moveNext &&
+              use.selector != Selectors.current) {
             return false;
           }
         }
@@ -1145,7 +1319,7 @@
         while (iterator.firstRef != null) {
           InvokeMethod use = iterator.firstRef.parent;
           Continuation useCont = use.continuation.definition;
-          if (use.selector == currentSelector) {
+          if (use.selector == Selectors.current) {
             // Rewrite iterator.current to a use of the 'current' variable.
             Parameter result = useCont.parameters.single;
             if (result.hint != null) {
@@ -1156,7 +1330,7 @@
             LetPrim let = makeLetPrimInvoke(new GetMutable(current), useCont);
             replaceSubtree(use, let);
           } else {
-            assert (use.selector == moveNextSelector);
+            assert (use.selector == Selectors.moveNext);
             // Rewrite iterator.moveNext() to:
             //
             //   if (index < list.length) {
@@ -1266,8 +1440,6 @@
         push(invoke);
         return true;
 
-      // TODO(asgerf): Rewrite 'add', 'removeLast', ...
-
       default:
         return false;
     }
@@ -1424,11 +1596,38 @@
     if (constifyExpression(node)) return;
     if (specializeOperatorCall(node)) return;
     if (specializeFieldAccess(node)) return;
+    if (specializeIndexableAccess(node)) return;
     if (specializeArrayAccess(node)) return;
     if (specializeClosureCall(node)) return;
 
     AbstractValue receiver = getValue(node.receiver.definition);
     node.receiverIsNotNull = receiver.isDefinitelyNotNull;
+
+    if (isInterceptedSelector(node.selector) &&
+        node.receiver.definition == node.arguments[0].definition) {
+      // The receiver and first argument are the same; that means we already
+      // determined in visitInterceptor that we are targeting a non-interceptor.
+
+      // Check if any of the possible targets depend on the extra receiver
+      // argument. Mixins do this, and tear-offs always needs the extra receiver
+      // argument because BoundClosure uses it for equality and hash code.
+      // TODO(15933): Make automatically generated property extraction
+      // closures work with the dummy receiver optimization.
+      bool needsReceiver(Element target) {
+        if (target is! FunctionElement) return false;
+        FunctionElement function = target;
+        return typeSystem.methodUsesReceiverArgument(function) ||
+               node.selector.isGetter && !function.isGetter;
+      }
+      if (!getAllTargets(receiver.type, node.selector).any(needsReceiver)) {
+        // Replace the extra receiver argument with a dummy value if the
+        // target definitely does not use it.
+        Constant dummy = makeConstantPrimitive(new IntConstantValue(0));
+        insertLetPrim(node, dummy);
+        node.arguments[0].unlink();
+        node.arguments[0] = new Reference<Primitive>(dummy);
+      }
+    }
   }
 
   void visitTypeCast(TypeCast node) {
@@ -1464,6 +1663,19 @@
     Continuation cont = node.continuation.definition;
     Primitive arg(int n) => node.arguments[n].definition;
     AbstractValue argType(int n) => getValue(arg(n));
+
+    bool replaceWithBinary(BuiltinOperator operator,
+                           Primitive left,
+                           Primitive right) {
+      Primitive prim =
+          new ApplyBuiltinOperator(operator, <Primitive>[left, right],
+                                   node.sourceInformation);
+      LetPrim let = makeLetPrimInvoke(prim, cont);
+      replaceSubtree(node, let);
+      push(let);
+      return true; // So returning early is more convenient.
+    }
+
     if (node.target.library.isInternalLibrary) {
       switch(node.target.name) {
         case InternalMethod.Stringify:
@@ -1476,13 +1688,104 @@
           }
           break;
       }
+    } else if (node.target.library.isDartCore) {
+      switch(node.target.name) {
+        case CorelibMethod.Identical:
+          if (node.arguments.length == 2) {
+            return replaceWithBinary(BuiltinOperator.Identical, arg(0), arg(1));
+          }
+          break;
+      }
     }
     return false;
   }
 
+  /// Try to inline static invocations.
+  ///
+  /// Performs the inlining and returns true if the call was inlined.  Inlining
+  /// uses a fixed heuristic:
+  ///
+  /// * Inline functions with a single expression statement or return statement
+  /// provided that the subexpression is an invocation of foreign code.
+  bool inlineInvokeStatic(InvokeStatic node) {
+    // The target might not have an AST, for example if it deferred.
+    if (!node.target.hasNode) return false;
+
+    // True if an expression is non-expansive, in the sense defined by this
+    // predicate.
+    bool isNonExpansive(ast.Expression expr) {
+      if (expr is ast.LiteralNull ||
+          expr is ast.LiteralBool ||
+          expr is ast.LiteralInt ||
+          expr is ast.LiteralDouble) {
+        return true;
+      }
+      if (expr is ast.Send) {
+        SendStructure structure =
+            node.target.treeElements.getSendStructure(expr);
+        if (structure is InvokeStructure) {
+          // Calls to foreign functions.
+          return structure.semantics.kind == AccessKind.TOPLEVEL_METHOD &&
+              backend.isForeign(structure.semantics.element);
+        } else if (structure is IsStructure || structure is IsNotStructure) {
+          // is and is! checks on nonexpansive expressions.
+          return isNonExpansive(expr.receiver);
+        } else if (structure is EqualsStructure ||
+            structure is NotEqualsStructure) {
+          // == and != on nonexpansive expressions.
+          return isNonExpansive(expr.receiver) &&
+              isNonExpansive(expr.argumentsNode.nodes.head);
+        } else if (structure is GetStructure) {
+          // Parameters.
+          return structure.semantics.kind == AccessKind.PARAMETER;
+        }
+      }
+      return false;
+    }
+
+    ast.Statement body = node.target.node.body;
+    bool shouldInline() {
+      if (backend.annotations.noInline(node.target)) {
+        return false;
+      }
+
+      // Inline functions that are a single return statement, expression
+      // statement, or block containing a return statement or expression
+      // statement.
+      if (body is ast.Return) {
+        return isNonExpansive(body.expression);
+      } else if (body is ast.ExpressionStatement) {
+        return isNonExpansive(body.expression);
+      } else if (body is ast.Block) {
+        var link = body.statements.nodes;
+        if (link.isNotEmpty && link.tail.isEmpty) {
+          if (link.head is ast.Return) {
+            return isNonExpansive(link.head.expression);
+          } else if (link.head is ast.ExpressionStatement) {
+            return isNonExpansive(link.head.expression);
+          }
+        }
+      }
+      return false;
+    }
+
+    if (!shouldInline()) return false;
+
+    FunctionDefinition target = functionCompiler.compileToCpsIR(node.target);
+    for (int i = 0; i < node.arguments.length; ++i) {
+      node.arguments[i].definition.substituteFor(target.parameters[i]);
+    }
+    node.continuation.definition.substituteFor(target.returnContinuation);
+
+    replaceSubtree(node, target.body);
+    push(target.body);
+    return true;
+  }
+
   void visitInvokeStatic(InvokeStatic node) {
     if (constifyExpression(node)) return;
     if (specializeInternalMethodCall(node)) return;
+    if (inlineInvokeStatic(node)) return;
   }
 
   AbstractValue getValue(Primitive primitive) {
@@ -1499,7 +1802,7 @@
   //
 
   void visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
-    DartString getString(AbstractValue value) {
+    ast.DartString getString(AbstractValue value) {
       StringConstantValue constant = value.constant;
       return constant.primitiveValue;
     }
@@ -1515,15 +1818,16 @@
           AbstractValue secondValue = getValue(node.arguments[i++].definition);
           if (!secondValue.isConstant) continue;
 
-          DartString string =
-              new ConsDartString(getString(firstValue), getString(secondValue));
+          ast.DartString string =
+              new ast.ConsDartString(getString(firstValue),
+                                     getString(secondValue));
 
           // We found a sequence of at least two constants.
           // Look for the end of the sequence.
           while (i < node.arguments.length) {
             AbstractValue value = getValue(node.arguments[i].definition);
             if (!value.isConstant) break;
-            string = new ConsDartString(string, getString(value));
+            string = new ast.ConsDartString(string, getString(value));
             ++i;
           }
           Constant prim =
@@ -1545,15 +1849,41 @@
         break;
 
       case BuiltinOperator.Identical:
-        Primitive left = node.arguments[0].definition;
-        Primitive right = node.arguments[1].definition;
-        AbstractValue leftValue = getValue(left);
-        AbstractValue rightValue = getValue(right);
-        // Replace identical(x, true) by x when x is known to be a boolean.
-        if (lattice.isDefinitelyBool(leftValue) &&
-            rightValue.isConstant &&
-            rightValue.constant.isTrue) {
-          left.substituteFor(node);
+        Primitive leftArg = node.arguments[0].definition;
+        Primitive rightArg = node.arguments[1].definition;
+        AbstractValue left = getValue(leftArg);
+        AbstractValue right = getValue(rightArg);
+        if (lattice.isDefinitelyBool(left) &&
+            right.isConstant &&
+            right.constant.isTrue) {
+          // Replace identical(x, true) by x when x is known to be a boolean.
+          // Note that this is not safe if x is null, because the value might
+          // not be used as a condition. A rule for [IsTrue] handles that case.
+          leftArg.substituteFor(node);
+        } else if (lattice.isDefinitelyBool(right) &&
+            left.isConstant &&
+            left.constant.isTrue) {
+          rightArg.substituteFor(node);
+        } else if (left.isNullConstant || right.isNullConstant) {
+          // Use `==` for comparing against null, so JS undefined and JS null
+          // are considered equal.
+          node.operator = BuiltinOperator.LooseEq;
+        } else if (!left.isNullable || !right.isNullable) {
+          // If at most one operand can be Dart null, we can use `===`.
+          // This is not safe when we might compare JS null and JS undefined.
+          node.operator = BuiltinOperator.StrictEq;
+        } else if (lattice.isDefinitelyNum(left, allowNull: true) &&
+                   lattice.isDefinitelyNum(right, allowNull: true)) {
+          // If both operands can be null, but otherwise are of the same type,
+          // we can use `==` for comparison.
+          // This is not safe e.g. for comparing strings against numbers.
+          node.operator = BuiltinOperator.LooseEq;
+        } else if (lattice.isDefinitelyString(left, allowNull: true) &&
+                   lattice.isDefinitelyString(right, allowNull: true)) {
+          node.operator = BuiltinOperator.LooseEq;
+        } else if (lattice.isDefinitelyBool(left, allowNull: true) &&
+                   lattice.isDefinitelyBool(right, allowNull: true)) {
+          node.operator = BuiltinOperator.LooseEq;
         }
         break;
 
@@ -1561,6 +1891,32 @@
     }
   }
 
+  void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    if (node.method == BuiltinMethod.Push) {
+      // Convert consecutive pushes into a single push.
+      InteriorNode parent = getEffectiveParent(node.parent);
+      if (parent is LetPrim && parent.primitive is ApplyBuiltinMethod) {
+        ApplyBuiltinMethod previous = parent.primitive;
+        if (previous.method == BuiltinMethod.Push &&
+            previous.receiver.definition == node.receiver.definition) {
+          // We found two consecutive pushes.
+          // Move all arguments from the first push onto the second one.
+          List<Reference<Primitive>> arguments = previous.arguments;
+          for (Reference ref in arguments) {
+            ref.parent = node;
+          }
+          arguments.addAll(node.arguments);
+          node.arguments = arguments;
+          // Elimnate the old push.
+          previous.receiver.unlink();
+          assert(previous.hasNoUses);
+          parent.parent.body = parent.body;
+          parent.body.parent = parent.parent;
+        }
+      }
+    }
+  }
+
   Primitive visitTypeTest(TypeTest node) {
     Primitive prim = node.value.definition;
     AbstractValue value = getValue(prim);
@@ -1586,6 +1942,13 @@
           <Primitive>[prim, prim, prim],
           node.sourceInformation);
     }
+    if (node.type == dartTypes.coreTypes.numType ||
+        node.type == dartTypes.coreTypes.doubleType) {
+      return new ApplyBuiltinOperator(
+          BuiltinOperator.IsNumber,
+          <Primitive>[prim],
+          node.sourceInformation);
+    }
     return null;
   }
 
@@ -1597,9 +1960,33 @@
     node.objectIsNotNull = getValue(node.object.definition).isDefinitelyNotNull;
   }
 
-  void visitInterceptor(Interceptor node) {
-    // Filter out intercepted classes that do not match the input type.
+  Primitive visitInterceptor(Interceptor node) {
     AbstractValue value = getValue(node.input.definition);
+    // If the exact class of the input is known, replace with a constant
+    // or the input itself.
+    ClassElement singleClass;
+    if (lattice.isDefinitelyInt(value)) {
+      // Classes like JSUInt31 and JSUInt32 do not exist at runtime, so ensure
+      // all the int classes get mapped tor their runtime class.
+      singleClass = backend.jsIntClass;
+    } else if (lattice.isDefinitelyNativeList(value)) {
+      // Ensure all the array subclasses get mapped to the array class.
+      singleClass = backend.jsArrayClass;
+    } else {
+      singleClass = typeSystem.singleClass(value.type);
+    }
+    if (singleClass != null) {
+      if (singleClass.isSubclassOf(backend.jsInterceptorClass)) {
+        Primitive constant = makeConstantPrimitive(
+            new InterceptorConstantValue(singleClass.rawType));
+        constant.hint = node.hint;
+        return constant;
+      } else {
+        node.input.definition.substituteFor(node);
+        return null;
+      }
+    }
+    // Filter out intercepted classes that do not match the input type.
     node.interceptedClasses.retainWhere((ClassElement clazz) {
       if (clazz == typeSystem.jsNullClass) {
         return value.isNullable;
@@ -1612,6 +1999,7 @@
     if (node.interceptedClasses.isEmpty) {
       node.input.definition.substituteFor(node);
     }
+    return null;
   }
 }
 
@@ -1642,6 +2030,8 @@
 
   TypeMaskSystem get typeSystem => lattice.typeSystem;
 
+  JavaScriptBackend get backend => typeSystem.backend;
+
   AbstractValue get nothing => lattice.nothing;
 
   AbstractValue nonConstant([TypeMask type]) => lattice.nonConstant(type);
@@ -1742,11 +2132,29 @@
   void visit(Node node) { node.accept(this); }
 
   void visitFunctionDefinition(FunctionDefinition node) {
-    if (node.thisParameter != null) {
+    int firstActualParameter = 0;
+    if (backend.isInterceptedMethod(node.element)) {
+      if (typeSystem.methodUsesReceiverArgument(node.element)) {
+        setValue(node.thisParameter, nonConstant(typeSystem.nonNullType));
+        setValue(node.parameters[0],
+                 nonConstant(typeSystem.getReceiverType(node.element)));
+      } else {
+        setValue(node.thisParameter,
+              nonConstant(typeSystem.getReceiverType(node.element)));
+        setValue(node.parameters[0], nonConstant());
+      }
+      firstActualParameter = 1;
+    } else if (node.thisParameter != null) {
       setValue(node.thisParameter,
                nonConstant(typeSystem.getReceiverType(node.element)));
     }
-    node.parameters.forEach(visit);
+    for (Parameter param in node.parameters.skip(firstActualParameter)) {
+      // TODO(karlklose): remove reference to the element model.
+      TypeMask type = param.hint is ParameterElement
+          ? typeSystem.getParameterType(param.hint)
+          : typeSystem.dynamicType;
+      setValue(param, nonConstant(type));
+    }
     push(node.body);
   }
 
@@ -1885,7 +2293,7 @@
   void visitApplyBuiltinOperator(ApplyBuiltinOperator node) {
     switch (node.operator) {
       case BuiltinOperator.StringConcatenate:
-        DartString stringValue = const LiteralDartString('');
+        ast.DartString stringValue = const ast.LiteralDartString('');
         for (Reference<Primitive> arg in node.arguments) {
           AbstractValue value = getValue(arg.definition);
           if (value.isNothing) {
@@ -1895,7 +2303,7 @@
                      stringValue != null) {
             StringConstantValue constant = value.constant;
             stringValue =
-                new ConsDartString(stringValue, constant.primitiveValue);
+                new ast.ConsDartString(stringValue, constant.primitiveValue);
           } else {
             stringValue = null;
             break;
@@ -1909,6 +2317,8 @@
         break;
 
       case BuiltinOperator.Identical:
+      case BuiltinOperator.StrictEq:
+      case BuiltinOperator.LooseEq:
         AbstractValue leftConst = getValue(node.arguments[0].definition);
         AbstractValue rightConst = getValue(node.arguments[1].definition);
         ConstantValue leftValue = leftConst.constant;
@@ -1945,6 +2355,7 @@
       case BuiltinOperator.NumAnd:
       case BuiltinOperator.NumOr:
       case BuiltinOperator.NumXor:
+      case BuiltinOperator.NumShl:
         AbstractValue left = getValue(node.arguments[0].definition);
         AbstractValue right = getValue(node.arguments[1].definition);
         if (lattice.isDefinitelyInt(left) && lattice.isDefinitelyInt(right)) {
@@ -1958,9 +2369,7 @@
       case BuiltinOperator.NumLe:
       case BuiltinOperator.NumGt:
       case BuiltinOperator.NumGe:
-      case BuiltinOperator.StrictEq:
       case BuiltinOperator.StrictNeq:
-      case BuiltinOperator.LooseEq:
       case BuiltinOperator.LooseNeq:
       case BuiltinOperator.IsFalsy:
       case BuiltinOperator.IsNumber:
@@ -1972,6 +2381,11 @@
     }
   }
 
+  void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    // TODO(asgerf): For pop(), use the container type from the TypeMask.
+    setValue(node, nonConstant());
+  }
+
   void visitInvokeMethodDirectly(InvokeMethodDirectly node) {
     Continuation cont = node.continuation.definition;
     setReachable(cont);
@@ -2003,23 +2417,20 @@
   void visitBranch(Branch node) {
     IsTrue isTrue = node.condition;
     AbstractValue conditionCell = getValue(isTrue.value.definition);
-
-    if (conditionCell.isNothing) {
-      return;  // And come back later.
-    } else if (conditionCell.isNonConst) {
-      setReachable(node.trueContinuation.definition);
-      setReachable(node.falseContinuation.definition);
-    } else if (conditionCell.isConstant && !conditionCell.constant.isBool) {
-      // Treat non-bool constants in condition as non-const since they result
-      // in type errors in checked mode.
-      // TODO(jgruber): Default to false in unchecked mode.
-      setReachable(node.trueContinuation.definition);
-      setReachable(node.falseContinuation.definition);
-      setValue(isTrue.value.definition, nonConstant(typeSystem.boolType));
-    } else if (conditionCell.isConstant && conditionCell.constant.isBool) {
-      BoolConstantValue boolConstant = conditionCell.constant;
-      setReachable((boolConstant.isTrue) ?
-          node.trueContinuation.definition : node.falseContinuation.definition);
+    AbstractBool boolifiedValue = lattice.boolify(conditionCell);
+    switch (boolifiedValue) {
+      case AbstractBool.Nothing:
+        break;
+      case AbstractBool.True:
+        setReachable(node.trueContinuation.definition);
+        break;
+      case AbstractBool.False:
+        setReachable(node.falseContinuation.definition);
+        break;
+      case AbstractBool.Maybe:
+        setReachable(node.trueContinuation.definition);
+        setReachable(node.falseContinuation.definition);
+        break;
     }
   }
 
@@ -2074,7 +2485,7 @@
   void visitLiteralList(LiteralList node) {
     // Constant lists are translated into (Constant ListConstant(...)) IR nodes,
     // and thus LiteralList nodes are NonConst.
-    setValue(node, nonConstant(typeSystem.mutableNativeListType));
+    setValue(node, nonConstant(typeSystem.extendableNativeListType));
   }
 
   void visitLiteralMap(LiteralMap node) {
@@ -2102,39 +2513,9 @@
   }
 
   void visitMutableVariable(MutableVariable node) {
-    // [MutableVariable]s are bound either as parameters to
-    // [FunctionDefinition]s, by [LetMutable].
-    if (node.parent is FunctionDefinition) {
-      // Just like immutable parameters, the values of mutable parameters are
-      // never constant.
-      // TODO(karlklose): remove reference to the element model.
-      Entity source = node.hint;
-      TypeMask type = (source is ParameterElement)
-          ? typeSystem.getParameterType(source)
-          : typeSystem.dynamicType;
-      setValue(node, nonConstant(type));
-    } else if (node.parent is LetMutable) {
-      // Mutable values bound by LetMutable could have known values.
-    } else {
-      internalError(node.hint, "Unexpected parent of MutableVariable");
-    }
   }
 
   void visitParameter(Parameter node) {
-    Entity source = node.hint;
-    // TODO(karlklose): remove reference to the element model.
-    TypeMask type = (source is ParameterElement)
-        ? typeSystem.getParameterType(source)
-        : typeSystem.dynamicType;
-    if (node.parent is FunctionDefinition) {
-      // Functions may escape and thus their parameters must be non-constant.
-      setValue(node, nonConstant(type));
-    } else if (node.parent is Continuation) {
-      // Continuations on the other hand are local, and parameters can have
-      // some other abstract value than non-constant.
-    } else {
-      internalError(node.hint, "Unexpected parent of Parameter: ${node.parent}");
-    }
   }
 
   void visitContinuation(Continuation node) {
@@ -2172,7 +2553,16 @@
   void visitInterceptor(Interceptor node) {
     push(node.input.definition);
     AbstractValue value = getValue(node.input.definition);
-    if (!value.isNothing) {
+    if (value.isNothing) {
+      setValue(node, nothing);
+    } else if (value.isNullable &&
+        !node.interceptedClasses.contains(backend.jsNullClass)) {
+      // If the input is null and null is not mapped to an interceptor then
+      // null gets returned.
+      // TODO(asgerf): Add the NullInterceptor when it enables us to
+      //               propagate an assignment.
+      setValue(node, nonConstant());
+    } else {
       setValue(node, nonConstant(typeSystem.nonNullType));
     }
   }
@@ -2239,6 +2629,12 @@
   void visitSetIndex(SetIndex node) {
     setValue(node, nonConstant());
   }
+
+  @override
+  visitAwait(Await node) {
+    Continuation continuation = node.continuation.definition;
+    setReachable(continuation);
+  }
 }
 
 /// Represents the abstract value of a primitive value at some point in the
@@ -2285,6 +2681,7 @@
   bool get isConstant => (kind == CONSTANT);
   bool get isNonConst => (kind == NONCONST);
   bool get isNullConstant => kind == CONSTANT && constant.isNull;
+  bool get isTrueConstant => kind == CONSTANT && constant.isTrue;
 
   bool get isNullable => kind != NOTHING && type.isNullable;
   bool get isDefinitelyNotNull => kind == NOTHING || !type.isNullable;
@@ -2316,6 +2713,11 @@
   static const String Stringify = 'S';
 }
 
+/// Enum-like class with the names of dart:core methods we care about.
+abstract class CorelibMethod {
+  static const String Identical = 'identical';
+}
+
 /// Suggested name for a synthesized loop index.
 class LoopIndexEntity extends Entity {
   String get name => 'i';
diff --git a/pkg/compiler/lib/src/dart2jslib.dart b/pkg/compiler/lib/src/dart2jslib.dart
deleted file mode 100644
index e5c924d..0000000
--- a/pkg/compiler/lib/src/dart2jslib.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js;
-
-import 'dart:async';
-import 'dart:collection' show Queue;
-import 'dart:profiler' show
-    UserTag;
-
-import '../compiler_new.dart' as api;
-import 'cache_strategy.dart';
-import 'closure.dart' as closureMapping;
-import 'compile_time_constants.dart';
-import 'constants/constant_system.dart';
-import 'constants/expressions.dart';
-import 'constants/values.dart';
-import 'core_types.dart';
-import 'cps_ir/cps_ir_builder_task.dart' show IrBuilderTask;
-import 'dart_backend/dart_backend.dart' as dart_backend;
-import 'dart_types.dart';
-import 'deferred_load.dart' show DeferredLoadTask, OutputUnit;
-import 'dump_info.dart';
-import 'elements/elements.dart';
-import 'elements/modelx.dart'
-    show ErroneousElementX,
-         ClassElementX,
-         CompilationUnitElementX,
-         MethodElementX,
-         LibraryElementX,
-         PrefixElementX,
-         VoidElementX,
-         AnalyzableElement,
-         DeferredLoaderGetterElementX;
-import 'helpers/helpers.dart';  // Included for debug helpers.
-import 'io/code_output.dart' show CodeBuffer;
-import 'io/source_information.dart';
-import 'js/js.dart' as js;
-import 'js_backend/js_backend.dart' as js_backend;
-import 'library_loader.dart'
-    show LibraryLoader,
-         LibraryLoaderTask,
-         LoadedLibraries;
-import 'mirrors_used.dart' show MirrorUsageAnalyzerTask;
-import 'null_compiler_output.dart';
-import 'native/native.dart' as native;
-import 'ordered_typeset.dart';
-import 'patch_parser.dart';
-import 'resolution/class_members.dart' show MembersCreator;
-import 'resolution/resolution.dart';
-import 'resolution/semantic_visitor.dart';
-import 'resolution/send_structure.dart';
-import 'resolution/operators.dart' as op;
-import 'scanner/scannerlib.dart';
-import 'serialization/task.dart';
-import 'ssa/ssa.dart';
-import 'io/source_file.dart' show SourceFile;
-import 'tracer.dart' show Tracer;
-import 'tree/tree.dart';
-import 'types/types.dart' as ti;
-import 'universe/universe.dart';
-import 'universe/class_set.dart';
-import 'util/characters.dart' show $_;
-import 'util/uri_extras.dart' as uri_extras show relativize;
-import 'util/util.dart';
-import 'warnings.dart';
-
-export 'helpers/helpers.dart';
-export 'resolution/resolution.dart' show TreeElements, TreeElementMapping;
-export 'scanner/scannerlib.dart' show isUserDefinableOperator,
-                                      isUnaryOperator,
-                                      isBinaryOperator,
-                                      isTernaryOperator,
-                                      isMinusOperator;
-export 'universe/universe.dart' show CallStructure, Selector, TypedSelector;
-export 'util/util.dart'
-    show Spannable,
-         CURRENT_ELEMENT_SPANNABLE,
-         NO_LOCATION_SPANNABLE;
-export 'warnings.dart';
-
-part 'compiler.dart';
-part 'diagnostic_listener.dart';
-part 'enqueue.dart';
-part 'resolved_visitor.dart';
-part 'script.dart';
-part 'typechecker.dart';
-part 'world.dart';
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index 22b7e1e..20695ce 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -131,14 +131,13 @@
     }
     // Enqueue the methods that the VM might invoke on user objects because
     // we don't trust the resolution to always get these included.
-    world.registerInvocation(
-        new UniverseSelector(new Selector.call("toString", null, 0), null));
+    world.registerInvocation(new UniverseSelector(Selectors.toString_, null));
     world.registerInvokedGetter(
-        new UniverseSelector(new Selector.getter("hashCode", null), null));
+        new UniverseSelector(Selectors.hashCode_, null));
     world.registerInvocation(
-        new UniverseSelector(new Selector.binaryOperator("=="), null));
+        new UniverseSelector(new Selector.binaryOperator('=='), null));
     world.registerInvocation(
-        new UniverseSelector(new Selector.call("compareTo", null, 1), null));
+        new UniverseSelector(Selectors.compareTo, null));
   }
 
   WorldImpact codegen(CodegenWorkItem work) => const WorldImpact();
@@ -231,10 +230,10 @@
       }
     });
     if (useMirrorHelperLibrary &&
-        loadedLibraries.containsLibrary(Compiler.DART_MIRRORS)) {
+        loadedLibraries.containsLibrary(Uris.dart_mirrors)) {
       return compiler.libraryLoader.loadLibrary(
           compiler.translateResolvedUri(
-              loadedLibraries.getLibrary(Compiler.DART_MIRRORS),
+              loadedLibraries.getLibrary(Uris.dart_mirrors),
               MirrorRenamerImpl.DART_MIRROR_HELPER, null)).
           then((LibraryElement library) {
         mirrorRenamer = new MirrorRenamerImpl(compiler, this, library);
@@ -482,6 +481,13 @@
     });
   }
 
+  @override
+  void evaluate(ConstantExpression constant) {
+    return measure(() {
+      return constantCompiler.evaluate(constant);
+    });
+  }
+
   void compileVariable(VariableElement element) {
     measure(() {
       constantCompiler.compileVariable(element);
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
index 0375bc3..a004418 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart
@@ -6,8 +6,11 @@
 
 import '../constants/values.dart' as values;
 import '../dart_types.dart' as types;
-import '../dart2jslib.dart' as dart2js;
+import '../diagnostics/invariant.dart' show
+    invariant;
 import '../elements/elements.dart' as elements;
+import '../resolution/tree_elements.dart' show
+    TreeElementMapping;
 import '../tree/tree.dart' as tree;
 import '../scanner/scannerlib.dart';
 import '../util/util.dart';
@@ -15,7 +18,7 @@
 import 'backend_ast_emitter.dart' show TypeGenerator;
 
 /// Translates the backend AST to Dart frontend AST.
-tree.Node emit(dart2js.TreeElementMapping treeElements,
+tree.Node emit(TreeElementMapping treeElements,
                RootNode root) {
   return new TreePrinter(treeElements).makeDefinition(root);
 }
@@ -28,7 +31,7 @@
 
 /// Converts backend ASTs to frontend ASTs.
 class TreePrinter {
-  dart2js.TreeElementMapping treeElements;
+  TreeElementMapping treeElements;
 
   TreePrinter([this.treeElements]);
 
@@ -1149,7 +1152,7 @@
   tree.NamedMixinApplication makeNamedMixinApplication(
        elements.MixinApplicationElement cls) {
 
-    assert(dart2js.invariant(cls, !cls.isUnnamedMixinApplication,
+    assert(invariant(cls, !cls.isUnnamedMixinApplication,
         message: "Cannot create ClassNode for unnamed mixin application "
                  "$cls."));
     tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
@@ -1196,7 +1199,7 @@
 
   /// Creates a [tree.ClassNode] node for [cls].
   tree.ClassNode makeClassNode(elements.ClassElement cls) {
-    assert(dart2js.invariant(cls, !cls.isUnnamedMixinApplication,
+    assert(invariant(cls, !cls.isUnnamedMixinApplication,
         message: "Cannot create ClassNode for unnamed mixin application "
                  "$cls."));
     tree.Modifiers modifiers = makeModifiers(isAbstract: cls.isAbstract);
diff --git a/pkg/compiler/lib/src/dart_backend/dart_backend.dart b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
index ab6f388..6757353 100644
--- a/pkg/compiler/lib/src/dart_backend/dart_backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/dart_backend.dart
@@ -6,27 +6,62 @@
 
 import 'dart:async' show Future;
 import 'dart:math' show max;
-import '../elements/elements.dart';
-import '../dart2jslib.dart';
-import '../library_loader.dart' show LoadedLibraries;
-import '../dart_types.dart';
-import '../tree/tree.dart';
+
+import '../../compiler.dart' show
+    CompilerOutputProvider;
+import '../common/backend_api.dart' show
+    Backend;
+import '../common/codegen.dart' show
+    CodegenWorkItem;
+import '../common/names.dart' show
+    Selectors,
+    Uris;
+import '../common/registry.dart' show
+    Registry;
+import '../common/resolution.dart' show
+    ResolutionCallbacks;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
 import '../compile_time_constants.dart';
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart';
-import '../universe/universe.dart' show UniverseSelector;
-import '../util/util.dart';
+import '../dart_types.dart';
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE,
+    Spannable,
+    SpannableAssertionFailure;
+import '../elements/elements.dart';
+import '../enqueue.dart' show
+    Enqueuer,
+    ResolutionEnqueuer,
+    WorldImpact;
+import '../library_loader.dart' show
+    LoadedLibraries;
 import '../mirror_renamer/mirror_renamer.dart';
+import '../resolution/tree_elements.dart' show
+    TreeElements,
+    TreeElementMapping;
+import '../scanner/scannerlib.dart' show
+    StringToken,
+    Keyword,
+    OPEN_PAREN_INFO,
+    CLOSE_PAREN_INFO,
+    SEMICOLON_INFO,
+    IDENTIFIER_INFO;
+import '../tree/tree.dart';
+import '../universe/universe.dart' show
+    Selector,
+    UniverseSelector;
+import '../util/util.dart';
 import 'backend_ast_to_frontend_ast.dart' as backend2frontend;
-import '../../compiler.dart' show CompilerOutputProvider;
-
-import '../scanner/scannerlib.dart' show StringToken,
-                                         Keyword,
-                                         OPEN_PAREN_INFO,
-                                         CLOSE_PAREN_INFO,
-                                         SEMICOLON_INFO,
-                                         IDENTIFIER_INFO;
 
 part 'backend.dart';
 part 'renamer.dart';
diff --git a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
index 12c70b3..ed0c6bc 100644
--- a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
+++ b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
@@ -380,7 +380,7 @@
     if (node is Identifier &&
         !Elements.isStaticOrTopLevel(element) &&
         !Elements.isLocal(element) &&
-        isPrivateName(node.source)) {
+        Name.isPrivateName(node.source)) {
       privateNodes.putIfAbsent(
           currentElement.library, () => new Set<Identifier>()).add(node);
     }
diff --git a/pkg/compiler/lib/src/dart_backend/renamer.dart b/pkg/compiler/lib/src/dart_backend/renamer.dart
index f13af6f..02f9365 100644
--- a/pkg/compiler/lib/src/dart_backend/renamer.dart
+++ b/pkg/compiler/lib/src/dart_backend/renamer.dart
@@ -146,7 +146,7 @@
       }
       if (library.isPlatformLibrary) {
         // TODO(johnniwinther): Handle prefixes for dart:core.
-        if (library.canonicalUri == Compiler.DART_CORE) return entity.name;
+        if (library.canonicalUri == Uris.dart_core) return entity.name;
         if (library.isInternalLibrary) {
           throw new SpannableAssertionFailure(entity,
               "Internal library $library should never have been imported from "
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index 17e6472..23e87a8 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -7,14 +7,21 @@
 import 'dart:math' show min;
 
 import 'core_types.dart';
-import 'dart2jslib.dart' show Compiler, invariant, Script, Message;
-import 'elements/modelx.dart'
-    show LibraryElementX,
-         TypeDeclarationElementX,
-         TypedefElementX;
+import 'compiler.dart' show
+    Compiler;
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'diagnostics/spannable.dart' show
+    CURRENT_ELEMENT_SPANNABLE;
+import 'elements/modelx.dart' show
+    LibraryElementX,
+    TypeDeclarationElementX,
+    TypedefElementX;
 import 'elements/elements.dart';
-import 'ordered_typeset.dart' show OrderedTypeSet;
-import 'util/util.dart' show CURRENT_ELEMENT_SPANNABLE, equalElements;
+import 'ordered_typeset.dart' show
+    OrderedTypeSet;
+import 'util/util.dart' show
+    equalElements;
 
 enum TypeKind {
   FUNCTION,
@@ -726,11 +733,7 @@
 
   String get name => 'Function';
 
-  int computeArity() {
-    int arity = 0;
-    parameterTypes.forEach((_) { arity++; });
-    return arity;
-  }
+  int computeArity() => parameterTypes.length;
 
   int get hashCode {
     int hash = 3 * returnType.hashCode;
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 3ae1bae..378710d8 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -4,22 +4,20 @@
 
 library deferred_load;
 
+import 'common/backend_api.dart' show
+    Backend;
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'compiler.dart' show
+    Compiler;
 import 'constants/values.dart' show
     ConstantValue,
     ConstructedConstantValue,
     DeferredConstantValue,
     StringConstantValue;
-
-import 'dart2jslib.dart' show
-    Backend,
-    Compiler,
-    CompilerTask,
-    invariant,
+import 'dart_types.dart';
+import 'diagnostics/messages.dart' show
     MessageKind;
-
-import 'js_backend/js_backend.dart' show
-    JavaScriptBackend;
-
 import 'elements/elements.dart' show
     AccessorElement,
     AstElement,
@@ -34,16 +32,13 @@
     ScopeContainerElement,
     TypedefElement,
     VoidElement;
-
-import 'dart_types.dart';
-
-import 'util/util.dart' show
-    Link, makeUnique;
-import 'util/uri_extras.dart' as uri_extras;
-
-import 'util/setlet.dart' show
-    Setlet;
-
+import 'js_backend/js_backend.dart' show
+    JavaScriptBackend;
+import 'resolution/resolution.dart' show
+    AnalyzableElementX;
+import 'resolution/tree_elements.dart' show
+    TreeElements;
+import 'tree/tree.dart' as ast;
 import 'tree/tree.dart' show
     Import,
     LibraryTag,
@@ -52,12 +47,11 @@
     LiteralString,
     NewExpression,
     Node;
-
-import 'tree/tree.dart' as ast;
-
-import 'resolution/resolution.dart' show
-    AnalyzableElementX,
-    TreeElements;
+import 'util/setlet.dart' show
+    Setlet;
+import 'util/uri_extras.dart' as uri_extras;
+import 'util/util.dart' show
+    Link, makeUnique;
 
 /// A "hunk" of the program that will be loaded whenever one of its [imports]
 /// are loaded.
diff --git a/pkg/compiler/lib/src/diagnostics/code_location.dart b/pkg/compiler/lib/src/diagnostics/code_location.dart
new file mode 100644
index 0000000..63fee22
--- /dev/null
+++ b/pkg/compiler/lib/src/diagnostics/code_location.dart
@@ -0,0 +1,90 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.diagnostics.code_location;
+
+import '../util/uri_extras.dart' as uri_extras show relativize;
+
+/// [CodeLocation] divides uris into different classes.
+///
+/// These are used to group uris from user code, platform libraries and
+/// packages.
+abstract class CodeLocation {
+  /// Returns `true` if [uri] is in this code location.
+  bool inSameLocation(Uri uri);
+
+  /// Returns the uri of this location relative to [baseUri].
+  String relativize(Uri baseUri);
+
+  factory CodeLocation(Uri uri) {
+    if (uri.scheme == 'package') {
+      int slashPos = uri.path.indexOf('/');
+      if (slashPos != -1) {
+        String packageName = uri.path.substring(0, slashPos);
+        return new PackageLocation(packageName);
+      } else {
+        return new UriLocation(uri);
+      }
+    } else {
+      return new SchemeLocation(uri);
+    }
+  }
+}
+
+/// A code location defined by the scheme of the uri.
+///
+/// Used for non-package uris, such as 'dart', 'file', and 'http'.
+class SchemeLocation implements CodeLocation {
+  final Uri uri;
+
+  SchemeLocation(this.uri);
+
+  bool inSameLocation(Uri uri) {
+    return this.uri.scheme == uri.scheme;
+  }
+
+  String relativize(Uri baseUri) {
+    return uri_extras.relativize(baseUri, uri, false);
+  }
+}
+
+/// A code location defined by the package name.
+///
+/// Used for package uris, separated by their `package names`, that is, the
+/// 'foo' of 'package:foo/bar.dart'.
+class PackageLocation implements CodeLocation {
+  final String packageName;
+
+  PackageLocation(this.packageName);
+
+  bool inSameLocation(Uri uri) {
+    return uri.scheme == 'package' && uri.path.startsWith('$packageName/');
+  }
+
+  String relativize(Uri baseUri) => 'package:$packageName';
+}
+
+/// A code location defined by the whole uri.
+///
+/// Used for package uris with no package name. For instance 'package:foo.dart'.
+class UriLocation implements CodeLocation {
+  final Uri uri;
+
+  UriLocation(this.uri);
+
+  bool inSameLocation(Uri uri) => this.uri == uri;
+
+  String relativize(Uri baseUri) {
+    return uri_extras.relativize(baseUri, uri, false);
+  }
+}
+
+/// A code location that contains any uri.
+class AnyLocation implements CodeLocation {
+  const AnyLocation();
+
+  bool inSameLocation(Uri uri) => true;
+
+  String relativize(Uri baseUri) => '$baseUri';
+}
diff --git a/pkg/compiler/lib/src/diagnostic_listener.dart b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
similarity index 84%
rename from pkg/compiler/lib/src/diagnostic_listener.dart
rename to pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
index d57b11d..c6bb9f5 100644
--- a/pkg/compiler/lib/src/diagnostic_listener.dart
+++ b/pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart
@@ -2,7 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.diagnostic_listener;
+
+import 'source_span.dart' show
+    SourceSpan;
+import 'spannable.dart' show
+    Spannable;
+import '../elements/elements.dart' show
+    Element;
+import 'messages.dart';
 
 abstract class DiagnosticListener {
   // TODO(karlklose): rename log to something like reportInfo.
diff --git a/pkg/compiler/lib/src/diagnostics/invariant.dart b/pkg/compiler/lib/src/diagnostics/invariant.dart
new file mode 100644
index 0000000..b6d4d0f
--- /dev/null
+++ b/pkg/compiler/lib/src/diagnostics/invariant.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.diagnostics.invariant;
+
+import 'spannable.dart';
+
+/**
+ * If true, print a warning for each method that was resolved, but not
+ * compiled.
+ */
+const bool REPORT_EXCESS_RESOLUTION = false;
+
+/// Flag that can be used in assertions to assert that a code path is only
+/// executed as part of development.
+///
+/// This flag is automatically set to true if helper methods like, [debugPrint],
+/// [debugWrapPrint], [trace], and [reportHere] are called.
+bool DEBUG_MODE = false;
+
+/// Assert that [DEBUG_MODE] is `true` and provide [message] as part of the
+/// error message.
+assertDebugMode(String message) {
+  assert(invariant(NO_LOCATION_SPANNABLE, DEBUG_MODE,
+      message: 'Debug mode is not enabled: $message'));
+}
+
+/**
+ * Throws a [SpannableAssertionFailure] if [condition] is
+ * [:false:]. [condition] must be either a [:bool:] or a no-arg
+ * function returning a [:bool:].
+ *
+ * Use this method to provide better information for assertion by calling
+ * [invariant] as the argument to an [:assert:] statement:
+ *
+ *     assert(invariant(position, isValid));
+ *
+ * [spannable] must be non-null and will be used to provide positional
+ * information in the generated error message.
+ */
+bool invariant(Spannable spannable, var condition, {var message: null}) {
+  // TODO(johnniwinther): Use [spannable] and [message] to provide better
+  // information on assertion errors.
+  if (spannable == null) {
+    throw new SpannableAssertionFailure(CURRENT_ELEMENT_SPANNABLE,
+        "Spannable was null for invariant. Use CURRENT_ELEMENT_SPANNABLE.");
+  }
+  if (condition is Function){
+    condition = condition();
+  }
+  if (!condition) {
+    if (message is Function) {
+      message = message();
+    }
+    throw new SpannableAssertionFailure(spannable, message);
+  }
+  return true;
+}
+
+typedef void InternalErrorFunction(Spannable location, String message);
diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
similarity index 99%
rename from pkg/compiler/lib/src/warnings.dart
rename to pkg/compiler/lib/src/diagnostics/messages.dart
index 6108da1..b8f6d3c 100644
--- a/pkg/compiler/lib/src/warnings.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -63,8 +63,11 @@
 
 library dart2js.messages;
 
-import 'dart2jslib.dart';
-import 'scanner/scannerlib.dart';
+import 'invariant.dart' show
+    invariant;
+import 'spannable.dart' show
+    CURRENT_ELEMENT_SPANNABLE;
+import '../scanner/scannerlib.dart';
 
 const DONT_KNOW_HOW_TO_FIX = "Computer says no!";
 
@@ -82,6 +85,7 @@
   AMBIGUOUS_LOCATION,
   AMBIGUOUS_REEXPORT,
   ASSERT_IS_GIVEN_NAMED_ARGUMENTS,
+  ASSIGNING_FINAL_FIELD_IN_SUPER,
   ASSIGNING_METHOD,
   ASSIGNING_METHOD_IN_SUPER,
   ASSIGNING_TYPE,
@@ -1764,6 +1768,11 @@
         const MessageTemplate(MessageKind.CANNOT_RESOLVE_SETTER,
           "Cannot resolve setter."),
 
+      MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER:
+        const MessageTemplate(MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
+          "Cannot assign a value to final field '#{name}' "
+          "in superclass '#{superclassName}'."),
+
       MessageKind.ASSIGNING_METHOD:
         const MessageTemplate(MessageKind.ASSIGNING_METHOD,
           "Cannot assign a value to a method."),
diff --git a/pkg/compiler/lib/src/diagnostics/source_span.dart b/pkg/compiler/lib/src/diagnostics/source_span.dart
new file mode 100644
index 0000000..9fe080c
--- /dev/null
+++ b/pkg/compiler/lib/src/diagnostics/source_span.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.diagnostics.source_span;
+
+import '../scanner/scannerlib.dart' show
+    Token;
+import '../tree/tree.dart' show
+    Node;
+import 'spannable.dart' show
+    Spannable;
+
+class SourceSpan implements Spannable {
+  final Uri uri;
+  final int begin;
+  final int end;
+
+  const SourceSpan(this.uri, this.begin, this.end);
+
+  factory SourceSpan.fromNode(Uri uri, Node node) {
+    return new SourceSpan.fromTokens(
+        uri, node.getBeginToken(), node.getEndToken());
+  }
+
+  factory SourceSpan.fromTokens(Uri uri, Token begin, Token end) {
+    final beginOffset = begin.charOffset;
+    final endOffset = end.charOffset + end.charCount;
+
+    // [begin] and [end] might be the same for the same empty token. This
+    // happens for instance when scanning '$$'.
+    assert(endOffset >= beginOffset);
+    return new SourceSpan(uri, beginOffset, endOffset);
+  }
+
+  int get hashCode {
+    return 13 * uri.hashCode +
+           17 * begin.hashCode +
+           19 * end.hashCode;
+  }
+
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! SourceSpan) return false;
+    return uri == other.uri &&
+           begin == other.begin &&
+           end == other.end;
+  }
+
+  String toString() => 'SourceSpan($uri, $begin, $end)';
+}
diff --git a/pkg/compiler/lib/src/diagnostics/spannable.dart b/pkg/compiler/lib/src/diagnostics/spannable.dart
new file mode 100644
index 0000000..ea9ae1f
--- /dev/null
+++ b/pkg/compiler/lib/src/diagnostics/spannable.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.diagnostics.spannable;
+
+/**
+ * Tagging interface for classes from which source spans can be generated.
+ */
+// TODO(johnniwinther): Find a better name.
+// TODO(ahe): How about "Bolt"?
+abstract class Spannable {}
+
+class _SpannableSentinel implements Spannable {
+  final String name;
+
+  const _SpannableSentinel(this.name);
+
+  String toString() => name;
+}
+
+/// Sentinel spannable used to mark that diagnostics should point to the
+/// current element. Note that the diagnostic reporting will fail if the current
+/// element is `null`.
+const Spannable CURRENT_ELEMENT_SPANNABLE =
+    const _SpannableSentinel("Current element");
+
+/// Sentinel spannable used to mark that there might be no location for the
+/// diagnostic. Use this only when it is not an error not to have a current
+/// element.
+const Spannable NO_LOCATION_SPANNABLE =
+    const _SpannableSentinel("No location");
+
+class SpannableAssertionFailure {
+  final Spannable node;
+  final String message;
+  SpannableAssertionFailure(this.node, this.message);
+
+  String toString() => 'Assertion failure'
+                       '${message != null ? ': $message' : ''}';
+}
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index 3b8f8bc..4ba2073 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -4,387 +4,337 @@
 
 library dump_info;
 
-import 'dart:convert' show
-    HtmlEscape,
-    JsonEncoder,
-    StringConversionSink,
-    ChunkedConversionSink;
+import 'dart:convert'
+    show HtmlEscape, JsonEncoder, StringConversionSink, ChunkedConversionSink;
 
+import 'package:dart2js_info/info.dart';
+
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'constants/values.dart' show ConstantValue;
+import 'compiler.dart' show
+    Compiler;
+import 'diagnostics/messages.dart' show
+    MessageKind;
+import 'diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
 import 'elements/elements.dart';
 import 'elements/visitor.dart';
-import 'dart2jslib.dart' show
-    Backend,
-    CodeBuffer,
-    Compiler,
-    CompilerTask,
-    MessageKind;
-import 'types/types.dart' show TypeMask;
-import 'deferred_load.dart' show OutputUnit;
-import 'js_backend/js_backend.dart' show JavaScriptBackend;
-import 'js_emitter/full_emitter/emitter.dart' as full show Emitter;
+import 'types/types.dart' show
+    TypeMask;
+import 'deferred_load.dart' show
+    OutputUnit;
+import 'js_backend/js_backend.dart' show
+    JavaScriptBackend;
+import 'js_emitter/full_emitter/emitter.dart' as full show
+    Emitter;
 import 'js/js.dart' as jsAst;
-import 'universe/universe.dart' show Selector, UniverseSelector;
-import 'util/util.dart' show NO_LOCATION_SPANNABLE;
+import 'universe/universe.dart' show
+    Selector,
+    UniverseSelector;
 
-/// Maps objects to an id.  Supports lookups in
-/// both directions.
-class IdMapper<T>{
-  Map<int, T> _idToElement = {};
-  Map<T, int> _elementToId = {};
-  int _idCounter = 0;
-  final String name;
-
-  IdMapper(this.name);
-
-  Iterable<T> get elements => _elementToId.keys;
-
-  String add(T e) {
-    if (_elementToId.containsKey(e)) {
-      return name + "/${_elementToId[e]}";
-    }
-
-    _idToElement[_idCounter] = e;
-    _elementToId[e] = _idCounter;
-    _idCounter += 1;
-    return name + "/${_idCounter - 1}";
-  }
-}
-
-class GroupedIdMapper {
-  // Mappers for specific kinds of elements.
-  IdMapper<LibraryElement> _library = new IdMapper('library');
-  IdMapper<TypedefElement> _typedef = new IdMapper('typedef');
-  IdMapper<FieldElement> _field = new IdMapper('field');
-  IdMapper<ClassElement> _class = new IdMapper('class');
-  IdMapper<FunctionElement> _function = new IdMapper('function');
-  IdMapper<OutputUnit> _outputUnit = new IdMapper('outputUnit');
-
-  Iterable<Element> get functions => _function.elements;
-
-  // Convert this database of elements into JSON for rendering
-  Map<String, dynamic> _toJson(ElementToJsonVisitor elementToJson) {
-    Map<String, dynamic> json = {};
-    var m = [_library, _typedef, _field, _class, _function];
-    for (IdMapper mapper in m) {
-      Map<String, dynamic> innerMapper = {};
-      mapper._idToElement.forEach((k, v) {
-        // All these elements are already cached in the
-        // jsonCache, so this is just an access.
-        var elementJson = elementToJson.process(v);
-        if (elementJson != null) {
-          innerMapper["$k"] = elementJson;
-        }
-      });
-      json[mapper.name] = innerMapper;
-    }
-    return json;
-  }
-}
-
-class ElementToJsonVisitor
-    extends BaseElementVisitor<Map<String, dynamic>, dynamic> {
-  final GroupedIdMapper mapper = new GroupedIdMapper();
+class ElementInfoCollector extends BaseElementVisitor<Info, dynamic> {
   final Compiler compiler;
 
-  final Map<Element, Map<String, dynamic>> jsonCache = {};
+  final AllInfo result = new AllInfo();
+  final Map<Element, Info> _elementToInfo = <Element, Info>{};
+  final Map<ConstantValue, Info> _constantToInfo = <ConstantValue, Info>{};
+  final Map<OutputUnit, OutputUnitInfo> _outputToInfo = {};
 
-  String dart2jsVersion;
-
-  ElementToJsonVisitor(this.compiler);
+  ElementInfoCollector(this.compiler);
 
   void run() {
-    dart2jsVersion = compiler.hasBuildId ? compiler.buildId : null;
+    compiler.dumpInfoTask._constantToNode.forEach((constant, node) {
+      // TODO(sigmund): add dependencies on other constants
+      var size = compiler.dumpInfoTask._nodeToSize[node];
+      var code = jsAst.prettyPrint(node, compiler).getText();
+      var info = new ConstantInfo(size: size, code: code);
+      _constantToInfo[constant] = info;
+      result.constants.add(info);
 
-    for (LibraryElement library in compiler.libraryLoader.libraries.toList()) {
-      visit(library);
-    }
+    });
+    compiler.libraryLoader.libraries.forEach(visit);
   }
 
-  Map<String, dynamic> visit(Element e, [_]) => e.accept(this, null);
+  Info visit(Element e, [_]) => e.accept(this, null);
 
-  // If keeping the element is in question (like if a function has a size
-  // of zero), only keep it if it holds dependencies to elsewhere.
+  /// Whether to emit information about [element].
+  ///
+  /// By default we emit information for any element that contributes to the
+  /// output size. Either becuase the it is a function being emitted or inlined,
+  /// or because it is an element that holds dependencies to other elements.
   bool shouldKeep(Element element) {
-    return compiler.dumpInfoTask.selectorsFromElement.containsKey(element)
-        || compiler.dumpInfoTask.inlineCount.containsKey(element);
+    return compiler.dumpInfoTask.selectorsFromElement.containsKey(element) ||
+        compiler.dumpInfoTask.inlineCount.containsKey(element);
   }
 
-  Map<String, dynamic> toJson() {
-    return mapper._toJson(this);
+  /// Visits [element] and produces it's corresponding info.
+  Info process(Element element) {
+    // TODO(sigmund): change the visit order to eliminate the need to check
+    // whether or not an element has been processed.
+    return _elementToInfo.putIfAbsent(element, () => visit(element));
   }
 
-  // Memoization of the JSON creating process.
-  Map<String, dynamic> process(Element element) {
-    return jsonCache.putIfAbsent(element, () => visit(element));
-  }
+  Info visitElement(Element element, _) => null;
 
-  // Returns the id of an [element] if it has already been processed.
-  // If the element has not been processed, this function does not
-  // process it, and simply returns null instead.
-  String idOf(Element element) {
-    if (jsonCache.containsKey(element) && jsonCache[element] != null) {
-      return jsonCache[element]['id'];
-    } else {
-      return null;
-    }
-  }
-
-  Map<String, dynamic> visitElement(Element element, _) {
-    return null;
-  }
-
-  Map<String, dynamic> visitConstructorBodyElement(
-      ConstructorBodyElement e, _) {
+  FunctionInfo visitConstructorBodyElement(ConstructorBodyElement e, _) {
     return visitFunctionElement(e.constructor, _);
   }
 
-  Map<String, dynamic> visitLibraryElement(LibraryElement element, _) {
-    var id = mapper._library.add(element);
-    List<String> children = <String>[];
-
+  LibraryInfo visitLibraryElement(LibraryElement element, _) {
     String libname = element.getLibraryName();
     libname = libname == "" ? "<unnamed>" : libname;
-
     int size = compiler.dumpInfoTask.sizeOf(element);
+    LibraryInfo info =
+      new LibraryInfo(libname, element.canonicalUri, null, size);
+    _elementToInfo[element] = info;
 
-    LibraryElement contentsOfLibrary = element.isPatched
-      ? element.patch : element;
-    contentsOfLibrary.forEachLocalMember((Element member) {
-      Map<String, dynamic> childJson = this.process(member);
-      if (childJson == null) return;
-      children.add(childJson['id']);
+    LibraryElement realElement = element.isPatched ? element.patch : element;
+    realElement.forEachLocalMember((Element member) {
+      Info child = this.process(member);
+      if (child is ClassInfo) {
+        info.classes.add(child);
+        child.parent = info;
+      } else if (child is FunctionInfo) {
+        info.topLevelFunctions.add(child);
+        child.parent = info;
+      } else if (child is FieldInfo) {
+        info.topLevelVariables.add(child);
+        child.parent = info;
+      } else if (child is TypedefInfo) {
+        info.typedefs.add(child);
+        child.parent = info;
+      } else if (child != null) {
+        print('unexpected child of $info: $child ==> ${child.runtimeType}');
+        assert(false);
+      }
     });
 
-    if (children.length == 0 && !shouldKeep(element)) {
-      return null;
-    }
-
-    return {
-      'kind': 'library',
-      'name': libname,
-      'size': size,
-      'id': id,
-      'children': children,
-      'canonicalUri': element.canonicalUri.toString()
-    };
+    if (info.isEmpty && !shouldKeep(element)) return null;
+    result.libraries.add(info);
+    return info;
   }
 
-  Map<String, dynamic> visitTypedefElement(TypedefElement element, _) {
-    String id = mapper._typedef.add(element);
-    return element.alias == null
-      ? null
-      : {
-        'id': id,
-        'type': element.alias.toString(),
-        'kind': 'typedef',
-        'name': element.name
-      };
+  TypedefInfo visitTypedefElement(TypedefElement element, _) {
+    if (element.alias == null) return null;
+    TypedefInfo info = new TypedefInfo(element.name, '${element.alias}',
+        _unitInfoForElement(element));
+    _elementToInfo[element] = info;
+    result.typedefs.add(info);
+    return info;
   }
 
-  Map<String, dynamic> visitFieldElement(FieldElement element, _) {
-    String id = mapper._field.add(element);
-    List<String> children = [];
-    StringBuffer emittedCode = compiler.dumpInfoTask.codeOf(element);
-
+  FieldInfo visitFieldElement(FieldElement element, _) {
     TypeMask inferredType =
         compiler.typesTask.getGuaranteedTypeOfElement(element);
     // If a field has an empty inferred type it is never used.
-    if (inferredType == null || inferredType.isEmpty || element.isConst) {
-      return null;
-    }
+    if (inferredType == null || inferredType.isEmpty) return null;
 
     int size = compiler.dumpInfoTask.sizeOf(element);
-    String code;
+    String code = compiler.dumpInfoTask.codeOf(element);
+    if (code != null) size += code.length;
 
-    if (emittedCode != null) {
-      size += emittedCode.length;
-      code = emittedCode.toString();
-    }
-
-    for (Element closure in element.nestedClosures) {
-      var childJson = this.process(closure);
-      if (childJson != null) {
-        children.add(childJson['id']);
-        if (childJson.containsKey('size')) {
-          size += childJson['size'];
-        }
+    FieldInfo info = new FieldInfo(
+        name: element.name,
+        // We use element.hashCode because it is globally unique and it is
+        // available while we are doing codegen.
+        coverageId: '${element.hashCode}',
+        type: '${element.type}',
+        inferredType: '$inferredType',
+        size: size,
+        code: code,
+        outputUnit: _unitInfoForElement(element),
+        isConst: element.isConst);
+    _elementToInfo[element] = info;
+    if (element.isConst) {
+      var value = compiler.backend.constantCompilerTask
+          .getConstantValueForVariable(element);
+      if (value != null) {
+        info.initializer = _constantToInfo[value];
       }
     }
 
-    OutputUnit outputUnit =
-        compiler.deferredLoadTask.outputUnitForElement(element);
-
-    return {
-      'id': id,
-      'kind': 'field',
-      'type': element.type.toString(),
-      'inferredType': inferredType.toString(),
-      'name': element.name,
-      'children': children,
-      'size': size,
-      'code': code,
-      'outputUnit': mapper._outputUnit.add(outputUnit)
-    };
+    List<FunctionInfo> nestedClosures = <FunctionInfo>[];
+    for (Element closure in element.nestedClosures) {
+      Info child = this.process(closure);
+      if (child != null) {
+        ClassInfo parent = this.process(closure.enclosingElement);
+        if (parent != null) {
+          child.name = "${parent.name}.${child.name}";
+        }
+        nestedClosures.add(child);
+        size += child.size;
+      }
+    }
+    info.closures = nestedClosures;
+    result.fields.add(info);
+    return info;
   }
 
-  Map<String, dynamic> visitClassElement(ClassElement element, _) {
-    String id = mapper._class.add(element);
-    List<String> children = [];
+  ClassInfo visitClassElement(ClassElement element, _) {
+    ClassInfo classInfo = new ClassInfo(
+        name: element.name,
+        isAbstract: element.isAbstract,
+        outputUnit: _unitInfoForElement(element));
+    _elementToInfo[element] = classInfo;
 
     int size = compiler.dumpInfoTask.sizeOf(element);
-    JavaScriptBackend backend = compiler.backend;
-
-    Map<String, dynamic> modifiers = { 'abstract': element.isAbstract };
-
     element.forEachLocalMember((Element member) {
-      Map<String, dynamic> childJson = this.process(member);
-      if (childJson != null) {
-        children.add(childJson['id']);
+      Info info = this.process(member);
+      if (info == null) return;
+      if (info is FieldInfo) {
+        classInfo.fields.add(info);
+        info.parent = classInfo;
+      } else {
+        assert(info is FunctionInfo);
+        classInfo.functions.add(info);
+        info.parent = classInfo;
+      }
 
-        // Closures are placed in the library namespace, but
-        // we want to attribute them to a function, and by
-        // extension, this class.  Process and add the sizes
-        // here.
-        if (member is MemberElement) {
-          for (Element closure in member.nestedClosures) {
-            Map<String, dynamic> child = this.process(closure);
+      // Closures are placed in the library namespace, but we want to attribute
+      // them to a function, and by extension, this class.  Process and add the
+      // sizes here.
+      if (member is MemberElement) {
+        for (Element closure in member.nestedClosures) {
+          FunctionInfo closureInfo = this.process(closure);
+          if (closureInfo == null) continue;
 
-            // Look for the parent element of this closure which should
-            // be a class.  If it exists, set the display name to
-            // the name of the class + the name of the closure function.
-            Element parent = closure.enclosingElement;
-            Map<String, dynamic> processedParent = this.process(parent);
-            if (processedParent != null) {
-              child['name'] = "${processedParent['name']}.${child['name']}";
-            }
-
-            if (child != null) {
-              size += child['size'];
-            }
+          // TODO(sigmund): remove this legacy update on the name, represent the
+          // information explicitly in the info format.
+          // Look for the parent element of this closure might be the enclosing
+          // class or an enclosing function.
+          Element parent = closure.enclosingElement;
+          ClassInfo parentInfo = this.process(parent);
+          if (parentInfo != null) {
+            closureInfo.name = "${parentInfo.name}.${closureInfo.name}";
           }
+          size += closureInfo.size;
         }
       }
     });
 
+    classInfo.size = size;
+
     // Omit element if it is not needed.
+    JavaScriptBackend backend = compiler.backend;
     if (!backend.emitter.neededClasses.contains(element) &&
-        children.length == 0) {
+        classInfo.fields.isEmpty &&
+        classInfo.functions.isEmpty) {
       return null;
     }
-
-    OutputUnit outputUnit =
-        compiler.deferredLoadTask.outputUnitForElement(element);
-
-    return {
-      'name': element.name,
-      'size': size,
-      'kind': 'class',
-      'modifiers': modifiers,
-      'children': children,
-      'id': id,
-      'outputUnit': mapper._outputUnit.add(outputUnit)
-    };
+    result.classes.add(classInfo);
+    return classInfo;
   }
 
-  Map<String, dynamic> visitFunctionElement(FunctionElement element, _) {
-    String id = mapper._function.add(element);
-    String name = element.name;
-    String kind = "function";
-    List<String> children = [];
-    List<Map<String, dynamic>> parameters = [];
-    String inferredReturnType = null;
-    String returnType = null;
-    String sideEffects = null;
-
-    StringBuffer emittedCode = compiler.dumpInfoTask.codeOf(element);
+  FunctionInfo visitFunctionElement(FunctionElement element, _) {
     int size = compiler.dumpInfoTask.sizeOf(element);
+    if (size == 0 && !shouldKeep(element)) return null;
 
-    Map<String, dynamic> modifiers = {
-      'static': element.isStatic,
-      'const': element.isConst,
-      'factory': element.isFactoryConstructor,
-      'external': element.isPatched
-    };
-
+    String name = element.name;
+    int kind = FunctionInfo.TOP_LEVEL_FUNCTION_KIND;
     var enclosingElement = element.enclosingElement;
     if (enclosingElement.isField ||
         enclosingElement.isFunction ||
         element.isClosure ||
         enclosingElement.isConstructor) {
-      kind = "closure";
+      kind = FunctionInfo.CLOSURE_FUNCTION_KIND;
       name = "<unnamed>";
-    } else if (modifiers['static']) {
-      kind = 'function';
+    } else if (element.isStatic) {
+      kind = FunctionInfo.TOP_LEVEL_FUNCTION_KIND;
     } else if (enclosingElement.isClass) {
-      kind = 'method';
+      kind = FunctionInfo.METHOD_FUNCTION_KIND;
     }
 
     if (element.isConstructor) {
-      name == ""
-        ? "${element.enclosingElement.name}"
-        : "${element.enclosingElement.name}.${element.name}";
-      kind = "constructor";
+      name = name == ""
+          ? "${element.enclosingElement.name}"
+          : "${element.enclosingElement.name}.${element.name}";
+      kind = FunctionInfo.CONSTRUCTOR_FUNCTION_KIND;
     }
 
+    FunctionModifiers modifiers = new FunctionModifiers(
+        isStatic: element.isStatic,
+        isConst: element.isConst,
+        isFactory: element.isFactoryConstructor,
+        isExternal: element.isPatched);
+    String code = compiler.dumpInfoTask.codeOf(element);
+
+    List<ParameterInfo> parameters = <ParameterInfo>[];
     if (element.hasFunctionSignature) {
       FunctionSignature signature = element.functionSignature;
       signature.forEachParameter((parameter) {
-        parameters.add({
-          'name': parameter.name,
-          'type': '${compiler.typesTask.getGuaranteedTypeOfElement(parameter)}',
-          'declaredType': '${parameter.node.type}'
-        });
+        parameters.add(new ParameterInfo(
+            parameter.name,
+            '${compiler.typesTask.getGuaranteedTypeOfElement(parameter)}',
+            '${parameter.node.type}'));
       });
     }
 
-    if (element.isInstanceMember && !element.isAbstract &&
+    String returnType = null;
+    // TODO(sigmund): why all these checks?
+    if (element.isInstanceMember &&
+        !element.isAbstract &&
         compiler.world.allFunctions.contains(element)) {
       returnType = '${element.type.returnType}';
     }
-    inferredReturnType =
+    String inferredReturnType =
         '${compiler.typesTask.getGuaranteedReturnTypeOfElement(element)}';
-    sideEffects = compiler.world.getSideEffectsOfElement(element).toString();
+    String sideEffects = '${compiler.world.getSideEffectsOfElement(element)}';
 
+    int inlinedCount = compiler.dumpInfoTask.inlineCount[element];
+    if (inlinedCount == null) inlinedCount = 0;
+
+    FunctionInfo info = new FunctionInfo(
+        name: name,
+        // We use element.hashCode because it is globally unique and it is
+        // available while we are doing codegen.
+        coverageId: '${element.hashCode}',
+        modifiers: modifiers,
+        size: size,
+        returnType: returnType,
+        inferredReturnType: inferredReturnType,
+        parameters: parameters,
+        sideEffects: sideEffects,
+        inlinedCount: inlinedCount,
+        code: code,
+        type: element.type.toString(),
+        outputUnit: _unitInfoForElement(element));
+    _elementToInfo[element] = info;
+
+    List<FunctionInfo> nestedClosures = <FunctionInfo>[];
     if (element is MemberElement) {
       MemberElement member = element as MemberElement;
       for (Element closure in member.nestedClosures) {
-        Map<String, dynamic> child = this.process(closure);
+        Info child = this.process(closure);
         if (child != null) {
-          child['kind'] = 'closure';
-          children.add(child['id']);
-          size += child['size'];
+          BasicInfo parent = this.process(closure.enclosingElement);
+          if (parent != null) {
+            child.name = "${parent.name}.${child.name}";
+          }
+          nestedClosures.add(child);
+          child.parent = parent;
+          size += child.size;
         }
       }
     }
+    info.closures = nestedClosures;
+    result.functions.add(info);
+    return info;
+  }
 
-    if (size == 0 && !shouldKeep(element)) {
-      return null;
-    }
-
-    int inlinedCount = compiler.dumpInfoTask.inlineCount[element];
-    if (inlinedCount == null) {
-      inlinedCount = 0;
-    }
-
+  OutputUnitInfo _unitInfoForElement(Element element) {
     OutputUnit outputUnit =
-        compiler.deferredLoadTask.outputUnitForElement(element);
-
-    return {
-      'kind': kind,
-      'name': name,
-      'id': id,
-      'modifiers': modifiers,
-      'children': children,
-      'size': size,
-      'returnType': returnType,
-      'inferredReturnType': inferredReturnType,
-      'parameters': parameters,
-      'sideEffects': sideEffects,
-      'inlinedCount': inlinedCount,
-      'code': emittedCode == null ? null : '$emittedCode',
-      'type': element.type.toString(),
-      'outputUnit': mapper._outputUnit.add(outputUnit)
-    };
+      compiler.deferredLoadTask.outputUnitForElement(element);
+    return _outputToInfo.putIfAbsent(outputUnit, () {
+      // Dump-info currently only works with the full emitter. If another
+      // emitter is used it will fail here.
+      JavaScriptBackend backend = compiler.backend;
+      full.Emitter emitter = backend.emitter.emitter;
+      OutputUnitInfo info = new OutputUnitInfo(
+          outputUnit.name, emitter.outputBuffers[outputUnit].length);
+      result.outputUnits.add(info);
+      return info;
+    });
   }
 }
 
@@ -395,12 +345,11 @@
 }
 
 class DumpInfoTask extends CompilerTask {
-  DumpInfoTask(Compiler compiler)
-      : super(compiler);
+  DumpInfoTask(Compiler compiler) : super(compiler);
 
   String get name => "Dump Info";
 
-  ElementToJsonVisitor infoCollector;
+  ElementInfoCollector infoCollector;
 
   /// The size of the generated output.
   int _programSize;
@@ -411,7 +360,9 @@
   final Set<jsAst.Node> _tracking = new Set<jsAst.Node>();
   // A mapping from Dart Elements to Javascript AST Nodes.
   final Map<Element, List<jsAst.Node>> _elementToNodes =
-    <Element, List<jsAst.Node>>{};
+      <Element, List<jsAst.Node>>{};
+  final Map<ConstantValue, jsAst.Node> _constantToNode =
+      <ConstantValue, jsAst.Node>{};
   // A mapping from Javascript AST Nodes to the size of their
   // pretty-printed contents.
   final Map<jsAst.Node, int> _nodeToSize = <jsAst.Node, int>{};
@@ -446,6 +397,11 @@
     }
   }
 
+  final Map<Element, Set<Element>> _dependencies = {};
+  void registerDependency(Element source, Element target) {
+    _dependencies.putIfAbsent(source, () => new Set()).add(target);
+  }
+
   /**
    * Returns an iterable of [Selection]s that are used by
    * [element].  Each [Selection] contains an element that is
@@ -455,14 +411,13 @@
     if (!selectorsFromElement.containsKey(element)) {
       return const <Selection>[];
     } else {
-      return selectorsFromElement[element].expand(
-        (UniverseSelector selector) {
-          return compiler.world.allFunctions.filter(
-              selector.selector, selector.mask)
-              .map((element) {
-            return new Selection(element, selector.mask);
-          });
+      return selectorsFromElement[element].expand((UniverseSelector selector) {
+        return compiler.world.allFunctions
+            .filter(selector.selector, selector.mask)
+            .map((element) {
+          return new Selection(element, selector.mask);
         });
+      });
     }
   }
 
@@ -481,8 +436,17 @@
   void registerElementAst(Element element, jsAst.Node code) {
     if (compiler.dumpInfo) {
       _elementToNodes
-        .putIfAbsent(element, () => new List<jsAst.Node>())
-        .add(code);
+          .putIfAbsent(element, () => new List<jsAst.Node>())
+          .add(code);
+      _tracking.add(code);
+    }
+  }
+
+  void registerConstantAst(ConstantValue constant, jsAst.Node code) {
+    if (compiler.dumpInfo) {
+      assert(_constantToNode[constant] == null ||
+          _constantToNode[constant] == code);
+      _constantToNode[constant] = code;
       _tracking.add(code);
     }
   }
@@ -501,23 +465,19 @@
   // code was produced, return 0.
   int sizeOf(Element element) {
     if (_elementToNodes.containsKey(element)) {
-      return _elementToNodes[element]
-        .map(sizeOfNode)
-        .fold(0, (a, b) => a + b);
+      return _elementToNodes[element].map(sizeOfNode).fold(0, (a, b) => a + b);
     } else {
       return 0;
     }
   }
 
   int sizeOfNode(jsAst.Node node) {
-    if (_nodeToSize.containsKey(node)) {
-      return _nodeToSize[node];
-    } else {
-      return 0;
-    }
+    // TODO(sigmund): switch back to null aware operators (issue #24136)
+    var size = _nodeToSize[node];
+    return size == null ? 0 : size;
   }
 
-  StringBuffer codeOf(Element element) {
+  String codeOf(Element element) {
     List<jsAst.Node> code = _elementToNodes[element];
     if (code == null) return null;
     // Concatenate rendered ASTs.
@@ -525,11 +485,11 @@
     for (jsAst.Node ast in code) {
       sb.writeln(jsAst.prettyPrint(ast, compiler).getText());
     }
-    return sb;
+    return sb.toString();
   }
 
   void collectInfo() {
-    infoCollector = new ElementToJsonVisitor(compiler)..run();
+    infoCollector = new ElementInfoCollector(compiler)..run();
   }
 
   void dumpInfo() {
@@ -546,103 +506,66 @@
     });
   }
 
-
   void dumpInfoJson(StringSink buffer) {
     JsonEncoder encoder = const JsonEncoder.withIndent('  ');
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.start();
 
-    Map<String, List<Map<String, String>>> holding =
-        <String, List<Map<String, String>>>{};
-    for (Element fn in infoCollector.mapper.functions) {
-      Iterable<Selection> pulling = getRetaining(fn);
+    // Recursively build links to function uses
+    Iterable<Element> functionElements =
+        infoCollector._elementToInfo.keys.where((k) => k is FunctionElement);
+    for (FunctionElement element in functionElements) {
+      FunctionInfo info = infoCollector._elementToInfo[element];
+      Iterable<Selection> uses = getRetaining(element);
       // Don't bother recording an empty list of dependencies.
-      if (pulling.length > 0) {
-        String fnId = infoCollector.idOf(fn);
-        // Some dart2js builtin functions are not
-        // recorded.  Don't register these.
-        if (fnId != null) {
-          holding[fnId] = pulling
-            .map((selection) {
-              return <String, String>{
-                "id": infoCollector.idOf(selection.selectedElement),
-                "mask": selection.mask.toString()
-              };
-            })
-            // Filter non-null ids for the same reason as above.
-            .where((a) => a['id'] != null)
-            .toList();
-        }
+      for (Selection selection in uses) {
+        // Don't register dart2js builtin functions that are not recorded.
+        Info useInfo = infoCollector._elementToInfo[selection.selectedElement];
+        if (useInfo == null) continue;
+        info.uses.add(new DependencyInfo(useInfo, '${selection.mask}'));
       }
     }
 
     // Track dependencies that come from inlining.
     for (Element element in inlineMap.keys) {
-      String keyId = infoCollector.idOf(element);
-      if (keyId != null) {
-        for (Element held in inlineMap[element]) {
-          String valueId = infoCollector.idOf(held);
-          if (valueId != null) {
-            holding.putIfAbsent(keyId, () => new List<Map<String, String>>())
-              .add(<String, String>{
-                "id": valueId,
-                "mask": "inlined"
-              });
-          }
-        }
+      CodeInfo outerInfo = infoCollector._elementToInfo[element];
+      if (outerInfo == null) continue;
+      for (Element inlined in inlineMap[element]) {
+        Info inlinedInfo = infoCollector._elementToInfo[inlined];
+        if (inlinedInfo == null) continue;
+        outerInfo.uses.add(new DependencyInfo(inlinedInfo, 'inlined'));
       }
     }
 
-    List<Map<String, dynamic>> outputUnits =
-        new List<Map<String, dynamic>>();
+    AllInfo result = infoCollector.result;
 
-    JavaScriptBackend backend = compiler.backend;
-    // Dump-info currently only works with the full emitter. If another
-    // emitter is used it will fail here.
-    full.Emitter fullEmitter = backend.emitter.emitter;
-
-    for (OutputUnit outputUnit in
-        infoCollector.mapper._outputUnit._elementToId.keys) {
-      String id = infoCollector.mapper._outputUnit.add(outputUnit);
-      outputUnits.add(<String, dynamic> {
-        'id': id,
-        'name': outputUnit.name,
-        'size': fullEmitter.outputBuffers[outputUnit].length,
-      });
+    for (Element element in _dependencies.keys) {
+      var a = infoCollector._elementToInfo[element];
+      if (a == null) continue;
+      result.dependencies[a] = _dependencies[element]
+        .map((o) => infoCollector._elementToInfo[o])
+        .where((o) => o != null)
+        .toList();
     }
 
-    Map<String, dynamic> outJson = {
-      'elements': infoCollector.toJson(),
-      'holding': holding,
-      'outputUnits': outputUnits,
-      'dump_version': 3,
-      'deferredFiles': compiler.deferredLoadTask.computeDeferredMap(),
-      // This increases when new information is added to the map, but the viewer
-      // still is compatible.
-      'dump_minor_version': '2'
-    };
+    result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap();
+    stopwatch.stop();
+    result.program = new ProgramInfo(
+        size: _programSize,
+        dart2jsVersion: compiler.hasBuildId ? compiler.buildId : null,
+        compilationMoment: new DateTime.now(),
+        compilationDuration: compiler.totalCompileTime.elapsed,
+        toJsonDuration: stopwatch.elapsedMilliseconds,
+        dumpInfoDuration: this.timing,
+        noSuchMethodEnabled: compiler.backend.enabledNoSuchMethod,
+        minified: compiler.enableMinification);
 
-    Map<String, dynamic> generalProgramInfo = <String, dynamic> {
-      'size': _programSize,
-      'dart2jsVersion': infoCollector.dart2jsVersion,
-      'compilationMoment': new DateTime.now().toString(),
-      'compilationDuration': compiler.totalCompileTime.elapsed.toString(),
-      'toJsonDuration': stopwatch.elapsedMilliseconds,
-      'dumpInfoDuration': this.timing.toString(),
-      'noSuchMethodEnabled': backend.enabledNoSuchMethod,
-      'minified': compiler.enableMinification
-    };
-
-    outJson['program'] = generalProgramInfo;
-
-    ChunkedConversionSink<Object> sink =
-      encoder.startChunkedConversion(
-          new StringConversionSink.fromStringSink(buffer));
-    sink.add(outJson);
-    compiler.reportInfo(
-        NO_LOCATION_SPANNABLE,
-        MessageKind.GENERIC,
-        {'text': "View the dumped .info.json file at "
-                 "https://dart-lang.github.io/dump-info-visualizer"});
+    ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
+        new StringConversionSink.fromStringSink(buffer));
+    sink.add(result.toJson());
+    compiler.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
+      'text': "View the dumped .info.json file at "
+          "https://dart-lang.github.io/dump-info-visualizer"
+    });
   }
 }
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index f9013c6..5320fcb 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -6,9 +6,15 @@
 
 library elements.common;
 
-import '../dart2jslib.dart' show Compiler, isPrivateName;
-import '../dart_types.dart' show DartType, InterfaceType, FunctionType;
-import '../util/util.dart' show Link;
+import '../common/names.dart' show
+    Names,
+    Uris;
+import '../dart_types.dart' show
+    DartType,
+    InterfaceType,
+    FunctionType;
+import '../util/util.dart' show
+    Link;
 
 import 'elements.dart';
 
@@ -115,7 +121,7 @@
 
 abstract class LibraryElementCommon implements LibraryElement {
   @override
-  bool get isDartCore => canonicalUri == Compiler.DART_CORE;
+  bool get isDartCore => canonicalUri == Uris.dart_core;
 
   @override
   bool get isPlatformLibrary => canonicalUri.scheme == 'dart';
@@ -270,7 +276,7 @@
   @override
   Element lookupSuperMemberInLibrary(String memberName,
                                      LibraryElement library) {
-    bool isPrivate = isPrivateName(memberName);
+    bool isPrivate = Name.isPrivateName(memberName);
     for (ClassElement s = superclass; s != null; s = s.superclass) {
       // Private members from a different library are not visible.
       if (isPrivate && !identical(library, s.library)) continue;
@@ -379,7 +385,7 @@
   bool hasFieldShadowedBy(Element fieldMember) {
     assert(fieldMember.isField);
     String fieldName = fieldMember.name;
-    bool isPrivate = isPrivateName(fieldName);
+    bool isPrivate = Name.isPrivateName(fieldName);
     LibraryElement memberLibrary = fieldMember.library;
     ClassElement lookupClass = this.superclass;
     while (lookupClass != null) {
@@ -427,8 +433,7 @@
   }
 
   FunctionType get callType {
-    MemberSignature member =
-        lookupInterfaceMember(const PublicName(Compiler.CALL_OPERATOR_NAME));
+    MemberSignature member = lookupInterfaceMember(Names.call);
     return member != null && member.isMethod ? member.type : null;
   }
 }
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index 2f302b2..78c8b45 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -4,35 +4,31 @@
 
 library elements;
 
-
+import '../compiler.dart' show
+    Compiler;
+import '../constants/constructors.dart';
 import '../constants/expressions.dart';
-import '../tree/tree.dart';
-import '../util/util.dart';
-import '../resolution/resolution.dart';
-
-import '../dart2jslib.dart' show InterfaceType,
-                                 DartType,
-                                 TypeVariableType,
-                                 TypedefType,
-                                 DualKind,
-                                 MessageKind,
-                                 DiagnosticListener,
-                                 Script,
-                                 FunctionType,
-                                 Selector,
-                                 SourceSpan,
-                                 Constant,
-                                 Compiler,
-                                 Backend,
-                                 isPrivateName;
-
 import '../dart_types.dart';
-
-import '../scanner/scannerlib.dart' show Token,
-                                         isUserDefinableOperator,
-                                         isMinusOperator;
-
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/messages.dart' show
+MessageKind;
+import '../diagnostics/source_span.dart' show
+    SourceSpan;
+import '../diagnostics/spannable.dart' show
+    Spannable;
+import '../resolution/scope.dart' show
+    Scope;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../ordered_typeset.dart' show OrderedTypeSet;
+import '../scanner/scannerlib.dart' show
+    Token,
+    isUserDefinableOperator,
+    isMinusOperator;
+import '../script.dart';
+import '../tree/tree.dart';
+import '../util/characters.dart' show $_;
+import '../util/util.dart';
 
 import 'visitor.dart' show ElementVisitor;
 
@@ -525,7 +521,7 @@
     if (element == null) return !isClosureSend(send, element);
     return isInstanceMethod(element) ||
            isInstanceField(element) ||
-           send.isConditional;
+           (send.isConditional && !element.isStatic);
   }
 
   static bool isClosureSend(Send send, Element element) {
@@ -664,12 +660,6 @@
     return null;
   }
 
-  static String mapToUserOperator(String op) {
-    String userOperator = mapToUserOperatorOrNull(op);
-    if (userOperator == null) throw 'Unhandled operator: $op';
-    else return userOperator;
-  }
-
   static bool isNumberOrStringSupertype(Element element, Compiler compiler) {
     LibraryElement coreLibrary = compiler.coreLibrary;
     return (element == coreLibrary.find('Comparable'));
@@ -972,7 +962,7 @@
   /// The local functions defined within this member.
   List<FunctionElement> get nestedClosures;
 
-  /// The name of this member taking privacy into account.
+  /// The name of this member, taking privacy into account.
   Name get memberName;
 }
 
@@ -1283,6 +1273,9 @@
 /// [TypeDeclarationElement] defines the common interface for class/interface
 /// declarations and typedefs.
 abstract class TypeDeclarationElement extends Element implements AstElement {
+  /// The name of this type declaration, taking privacy into account.
+  Name get memberName;
+
   /// Do not use [computeType] outside of the resolver; instead retrieve the
   /// type from the [thisType] or [rawType], depending on the use case.
   ///
@@ -1492,6 +1485,8 @@
 /// The [Element] for a type variable declaration on a generic class or typedef.
 abstract class TypeVariableElement extends Element
     implements AstElement, TypedElement {
+  /// The name of this type variable, taking privacy into account.
+  Name get memberName;
 
   /// Use [typeDeclaration] instead.
   @deprecated
@@ -1581,6 +1576,8 @@
   final TreeElements elements;
 
   ResolvedAst(this.element, this.node, this.elements);
+
+  String toString() => '$element:$node';
 }
 
 /// A [MemberSignature] is a member of an interface.
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 0f96bdb..33410f7 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -4,45 +4,49 @@
 
 library elements.modelx;
 
-import 'common.dart';
-import 'elements.dart';
-import '../constants/expressions.dart';
+import '../compiler.dart' show
+    Compiler;
+import '../constants/constant_constructors.dart';
 import '../constants/constructors.dart';
-import '../helpers/helpers.dart';
-import '../tree/tree.dart';
-import '../util/util.dart';
-import '../resolution/resolution.dart';
-import '../resolution/class_members.dart' show ClassMemberMixin;
-
-import '../dart2jslib.dart' show
-    Backend,
-    Compiler,
-    Constant,
-    DartType,
-    DiagnosticListener,
-    DualKind,
-    FunctionType,
-    InterfaceType,
-    MessageKind,
-    MessageTemplate,
-    Script,
-    Selector,
-    SourceSpan,
-    TypeVariableType,
-    TypedefType,
-    invariant,
-    isPrivateName;
-
+import '../constants/expressions.dart';
 import '../dart_types.dart';
-
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart';
+import '../diagnostics/source_span.dart' show
+    SourceSpan;
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
+import '../helpers/helpers.dart';
+import '../ordered_typeset.dart' show
+    OrderedTypeSet;
+import '../resolution/class_members.dart' show
+    ClassMemberMixin;
+import '../resolution/scope.dart' show
+    ClassScope,
+    LibraryScope,
+    Scope,
+    TypeDeclarationScope;
+import '../resolution/resolution.dart' show
+    AnalyzableElementX;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
+import '../resolution/typedefs.dart' show
+    TypedefCyclicVisitor;
 import '../scanner/scannerlib.dart' show
     EOF_TOKEN,
     ErrorToken,
     Token;
+import '../script.dart';
+import '../tree/tree.dart';
+import '../util/util.dart';
 
-import '../ordered_typeset.dart' show OrderedTypeSet;
-
-import 'visitor.dart' show ElementVisitor;
+import 'common.dart';
+import 'elements.dart';
+import 'visitor.dart' show
+    ElementVisitor;
 
 abstract class DeclarationSite {
 }
@@ -691,6 +695,7 @@
   void setPartOf(PartOf tag, DiagnosticListener listener) {
     LibraryElementX library = enclosingElement;
     if (library.entryCompilationUnit == this) {
+      partTag = tag;
       listener.reportError(tag, MessageKind.IMPORT_PART_OF);
       return;
     }
@@ -1008,10 +1013,12 @@
   /** Look up a top-level element in this library, but only look for
     * non-imported elements. Returns null if no such element exist. */
   Element findLocal(String elementName) {
-    // TODO(johnniwinther): How to handle injected elements in the patch
+    // TODO((johnniwinther): How to handle injected elements in the patch
     // library?
     Element result = localScope.lookup(elementName);
-    if (result == null || result.library != this) return null;
+    if (result == null && isPatch) {
+      return origin.findLocal(elementName);
+    }
     return result;
   }
 
@@ -1055,7 +1062,7 @@
     return localScope.values.where((Element element) {
       // At this point [localScope] only contains members so we don't need
       // to check for foreign or prefix elements.
-      return !isPrivateName(element.name);
+      return !Name.isPrivateName(element.name);
     });
   }
 
diff --git a/pkg/compiler/lib/src/elements/names.dart b/pkg/compiler/lib/src/elements/names.dart
index 38e0945..514729c 100644
--- a/pkg/compiler/lib/src/elements/names.dart
+++ b/pkg/compiler/lib/src/elements/names.dart
@@ -46,8 +46,15 @@
   /// privacy into account.
   bool isSimilarTo(Name other);
   int get similarHashCode;
-  
+
   LibraryElement get library;
+
+
+  /// Returns `true` when [s] is private if used as an identifier.
+  static bool isPrivateName(String s) => !s.isEmpty && s.codeUnitAt(0) == $_;
+
+  /// Returns `true` when [s] is public if used as an identifier.
+  static bool isPublicName(String s) => !isPrivateName(s);
 }
 
 class PublicName implements Name {
@@ -74,7 +81,7 @@
   bool isSimilarTo(Name other) =>
       text == other.text && isSetter == other.isSetter;
   int get similarHashCode => text.hashCode + 11 * isSetter.hashCode;
-  
+
   LibraryElement get library => null;
 
   String toString() => isSetter ? '$text=' : text;
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 9325653..2656ee9 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -2,7 +2,61 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.enqueue;
+
+import 'dart:collection' show
+    Queue;
+
+import 'common/names.dart' show
+    Identifiers;
+import 'common/work.dart' show
+    ItemCompilationContext,
+    WorkItem;
+import 'common/tasks.dart' show
+    CompilerTask,
+    DeferredAction,
+    DeferredTask;
+import 'common/registry.dart' show
+    Registry;
+import 'common/codegen.dart' show
+    CodegenWorkItem;
+import 'common/resolution.dart' show
+    ResolutionWorkItem;
+import 'compiler.dart' show
+    Compiler;
+import 'dart_types.dart' show
+    DartType,
+    InterfaceType;
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'diagnostics/spannable.dart' show
+    SpannableAssertionFailure;
+import 'elements/elements.dart' show
+    AnalyzableElement,
+    AstElement,
+    ClassElement,
+    ConstructorElement,
+    Element,
+    Elements,
+    FunctionElement,
+    LibraryElement,
+    LocalFunctionElement,
+    Member,
+    MemberElement,
+    MethodElement,
+    Name,
+    TypedElement,
+    TypedefElement;
+import 'js/js.dart' as js;
+import 'native/native.dart' as native;
+import 'resolution/members.dart' show
+    ResolverVisitor;
+import 'tree/tree.dart' show
+    Send;
+import 'universe/universe.dart';
+import 'util/util.dart' show
+    Link,
+    Setlet;
 
 typedef ItemCompilationContext ItemCompilationContextCreator();
 
@@ -14,9 +68,12 @@
 
   EnqueueTask(Compiler compiler)
     : resolution = new ResolutionEnqueuer(
-          compiler, compiler.backend.createItemCompilationContext),
+          compiler, compiler.backend.createItemCompilationContext,
+          compiler.analyzeOnly && compiler.analyzeMain
+              ? const EnqueuerStrategy() : const TreeShakingEnqueuerStrategy()),
       codegen = new CodegenEnqueuer(
-          compiler, compiler.backend.createItemCompilationContext),
+          compiler, compiler.backend.createItemCompilationContext,
+          const TreeShakingEnqueuerStrategy()),
       super(compiler) {
     codegen.task = this;
     resolution.task = this;
@@ -57,6 +114,7 @@
 abstract class Enqueuer {
   final String name;
   final Compiler compiler; // TODO(ahe): Remove this dependency.
+  final EnqueuerStrategy strategy;
   final ItemCompilationContextCreator itemCompilationContextCreator;
   final Map<String, Set<Element>> instanceMembersByName
       = new Map<String, Set<Element>>();
@@ -76,7 +134,10 @@
   bool hasEnqueuedReflectiveElements = false;
   bool hasEnqueuedReflectiveStaticFields = false;
 
-  Enqueuer(this.name, this.compiler, this.itemCompilationContextCreator);
+  Enqueuer(this.name,
+           this.compiler,
+           this.itemCompilationContextCreator,
+           this.strategy);
 
   Queue<WorkItem> get queue;
   bool get queueIsEmpty => queue.isEmpty;
@@ -96,7 +157,12 @@
    */
   void addToWorkList(Element element) {
     assert(invariant(element, element.isDeclaration));
-    internalAddToWorkList(element);
+    if (internalAddToWorkList(element) && compiler.dumpInfo) {
+      // TODO(sigmund): add other missing dependencies (internals, selectors
+      // enqueued after allocations), also enable only for the codegen enqueuer.
+      compiler.dumpInfoTask.registerDependency(
+          compiler.currentElement, element);
+    }
   }
 
   /**
@@ -137,7 +203,7 @@
   }
 
   void processInstantiatedClassMembers(ClassElement cls) {
-    cls.implementation.forEachMember(processInstantiatedClassMember);
+    strategy.processInstantiatedClass(this, cls);
   }
 
   void processInstantiatedClassMember(ClassElement cls, Element member) {
@@ -146,7 +212,7 @@
     if (!member.isInstanceMember) return;
     String memberName = member.name;
 
-    if (member.kind == ElementKind.FIELD) {
+    if (member.isField) {
       // The obvious thing to test here would be "member.isNative",
       // however, that only works after metadata has been parsed/analyzed,
       // and that may not have happened yet.
@@ -187,13 +253,13 @@
         addToWorkList(member);
         return;
       }
-    } else if (member.kind == ElementKind.FUNCTION) {
+    } else if (member.isFunction) {
       FunctionElement function = member;
       function.computeType(compiler);
-      if (function.name == Compiler.NO_SUCH_METHOD) {
+      if (function.name == Identifiers.noSuchMethod_) {
         registerNoSuchMethod(function);
       }
-      if (function.name == Compiler.CALL_OPERATOR_NAME &&
+      if (function.name == Identifiers.call &&
           !cls.typeVariables.isEmpty) {
         registerCallMethodWithFreeTypeVariables(
             function, compiler.globalDependencies);
@@ -213,7 +279,7 @@
         addToWorkList(function);
         return;
       }
-    } else if (member.kind == ElementKind.GETTER) {
+    } else if (member.isGetter) {
       FunctionElement getter = member;
       getter.computeType(compiler);
       if (universe.hasInvokedGetter(getter, compiler.world)) {
@@ -226,7 +292,7 @@
         addToWorkList(getter);
         return;
       }
-    } else if (member.kind == ElementKind.SETTER) {
+    } else if (member.isSetter) {
       FunctionElement setter = member;
       setter.computeType(compiler);
       if (universe.hasInvokedSetter(setter, compiler.world)) {
@@ -355,7 +421,8 @@
         registerSelectorUse(selector);
         if (element.isField) {
           UniverseSelector selector = new UniverseSelector(
-              new Selector.setter(element.name, element.library), null);
+              new Selector.setter(new Name(
+                  element.name, element.library, isSetter: true)), null);
           registerInvokedSetter(selector);
         }
       }
@@ -496,6 +563,10 @@
   }
 
   void handleUnseenSelector(UniverseSelector universeSelector) {
+    strategy.processSelector(this, universeSelector);
+  }
+
+  void handleUnseenSelectorInternal(UniverseSelector universeSelector) {
     Selector selector = universeSelector.selector;
     String methodName = selector.name;
     processInstanceMembers(methodName, (Element member) {
@@ -544,6 +615,10 @@
    */
   void registerStaticUse(Element element) {
     if (element == null) return;
+    strategy.processStaticUse(this, element);
+  }
+
+  void registerStaticUseInternal(Element element) {
     assert(invariant(element, element.isDeclaration,
         message: "Element ${element} is not the declaration."));
     if (Elements.isStaticOrTopLevel(element) && element.isField) {
@@ -599,7 +674,7 @@
     // Even in checked mode, type annotations for return type and argument
     // types do not imply type checks, so there should never be a check
     // against the type variable of a typedef.
-    assert(type.kind != TypeKind.TYPE_VARIABLE ||
+    assert(!type.isTypeVariable ||
            !type.element.enclosingElement.isTypedef);
   }
 
@@ -689,8 +764,12 @@
   final Queue<DeferredTask> deferredTaskQueue;
 
   ResolutionEnqueuer(Compiler compiler,
-                     ItemCompilationContext itemCompilationContextCreator())
-      : super('resolution enqueuer', compiler, itemCompilationContextCreator),
+                     ItemCompilationContext itemCompilationContextCreator(),
+                     EnqueuerStrategy strategy)
+      : super('resolution enqueuer',
+              compiler,
+              itemCompilationContextCreator,
+              strategy),
         resolvedElements = new Set<AstElement>(),
         queue = new Queue<ResolutionWorkItem>(),
         deferredTaskQueue = new Queue<DeferredTask>();
@@ -764,7 +843,7 @@
       }
     }
 
-    if (element.isGetter && element.name == Compiler.RUNTIME_TYPE) {
+    if (element.isGetter && element.name == Identifiers.runtimeType_) {
       // Enable runtime type support if we discover a getter called runtimeType.
       // We have to enable runtime type before hitting the codegen, so
       // that constructors know whether they need to generate code for
@@ -853,11 +932,13 @@
   bool enabledNoSuchMethod = false;
 
   CodegenEnqueuer(Compiler compiler,
-                  ItemCompilationContext itemCompilationContextCreator())
+                  ItemCompilationContext itemCompilationContextCreator(),
+                  EnqueuerStrategy strategy)
       : queue = new Queue<CodegenWorkItem>(),
         newlyEnqueuedElements = compiler.cacheStrategy.newSet(),
         newlySeenSelectors = compiler.cacheStrategy.newSet(),
-        super('codegen enqueuer', compiler, itemCompilationContextCreator);
+        super('codegen enqueuer', compiler, itemCompilationContextCreator,
+              strategy);
 
   bool isProcessed(Element member) =>
       member.isAbstract || generatedCode.containsKey(member);
@@ -959,3 +1040,37 @@
   if (set == null) return;
   set.remove(element);
 }
+
+/// Strategy used by the enqueuer to populate the world.
+// TODO(johnniwinther): Merge this interface with [QueueFilter].
+class EnqueuerStrategy {
+  const EnqueuerStrategy();
+
+  /// Process a class instantiated in live code.
+  void processInstantiatedClass(Enqueuer enqueuer, ClassElement cls) {}
+
+  /// Process an element statically accessed in live code.
+  void processStaticUse(Enqueuer enqueuer, Element element) {}
+
+  /// Process a selector for a call site in live code.
+  void processSelector(Enqueuer enqueuer, UniverseSelector selector) {}
+}
+
+class TreeShakingEnqueuerStrategy implements EnqueuerStrategy {
+  const TreeShakingEnqueuerStrategy();
+
+  @override
+  void processInstantiatedClass(Enqueuer enqueuer, ClassElement cls) {
+    cls.implementation.forEachMember(enqueuer.processInstantiatedClassMember);
+  }
+
+  @override
+  void processStaticUse(Enqueuer enqueuer, Element element) {
+    enqueuer.registerStaticUseInternal(element);
+  }
+
+  @override
+  void processSelector(Enqueuer enqueuer, UniverseSelector selector) {
+    enqueuer.handleUnseenSelectorInternal(selector);
+  }
+}
diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart
index 9f7e284..3a67978 100644
--- a/pkg/compiler/lib/src/helpers/helpers.dart
+++ b/pkg/compiler/lib/src/helpers/helpers.dart
@@ -7,12 +7,20 @@
 
 library dart2js.helpers;
 
-import 'dart:async' show EventSink;
+import 'dart:async' show
+    EventSink;
 import 'dart:collection';
 import 'dart:convert';
 
 import '../../compiler.dart';
-import '../dart2jslib.dart';
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/invariant.dart' show
+    DEBUG_MODE;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../util/util.dart';
 
 part 'debug_collection.dart';
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index 262f652..aa78001 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -101,7 +101,7 @@
         registerCallForLaterAnalysis(info);
       }
     } else if (info.selector.isGetter &&
-        info.selector.name == Compiler.CALL_OPERATOR_NAME) {
+        info.selector.memberName == Names.call) {
       // We are potentially tearing off ourself here
       addNewEscapeInformation(info);
     }
diff --git a/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
index 19bcab4..474f71f 100644
--- a/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
@@ -4,19 +4,32 @@
 
 library concrete_types_inferrer;
 
-import 'dart:collection' show Queue, IterableBase;
+import 'dart:collection' show
+    Queue,
+    IterableBase;
+
 import '../native/native.dart' as native;
-import '../closure.dart' show BoxFieldElement;
-import '../dart2jslib.dart' hide Selector, TypedSelector;
-import '../dart_types.dart' show DartType, TypeKind;
+import '../closure.dart' show
+    BoxFieldElement;
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart' show
+    DartType,
+    TypeKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
+import '../types/types.dart' show
+    FlatTypeMask,
+    TypeMask,
+    TypesInferrer,
+    UnionTypeMask;
 import '../universe/universe.dart';
-import '../util/util.dart';
+import '../world.dart' show
+    ClassWorld;
 
 import 'inferrer_visitor.dart';
-import '../types/types.dart' show TypeMask, FlatTypeMask, UnionTypeMask,
-                                  TypesInferrer;
 import 'simple_types_inferrer.dart';
 
 /**
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index e4725b2..e542d49 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -4,18 +4,32 @@
 
 library inferrer_visitor;
 
+import 'dart:collection' show
+    IterableMixin;
+
+import '../compiler.dart' show
+    Compiler;
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
-import '../dart2jslib.dart' hide Selector, TypedSelector;
 import '../dart_types.dart';
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../elements/elements.dart';
 import '../resolution/operators.dart';
+import '../resolution/semantic_visitor.dart';
+import '../resolution/send_resolver.dart' show
+    SendResolverMixin;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../tree/tree.dart';
+import '../types/types.dart' show
+    TypeMask;
+import '../types/constants.dart' show
+    computeTypeMask;
 import '../universe/universe.dart';
 import '../util/util.dart';
-import '../types/types.dart' show TypeMask;
-import '../types/constants.dart' show computeTypeMask;
-import 'dart:collection' show IterableMixin;
+import '../world.dart' show
+    ClassWorld;
 
 /**
  * The interface [InferrerVisitor] will use when working on types.
@@ -673,8 +687,18 @@
   }
 }
 
-abstract class InferrerVisitor
-    <T, E extends MinimalInferrerEngine<T>> extends NewResolvedVisitor<T> {
+abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
+    extends Visitor<T>
+    with SendResolverMixin,
+         SemanticSendResolvedMixin<T, dynamic>,
+         CompoundBulkMixin<T, dynamic>,
+         SetIfNullBulkMixin<T, dynamic>,
+         PrefixBulkMixin<T, dynamic>,
+         PostfixBulkMixin<T, dynamic>,
+         ErrorBulkMixin<T, dynamic>,
+         NewBulkMixin<T, dynamic>,
+         SetBulkMixin<T, dynamic>
+    implements SemanticSendVisitor<T, dynamic> {
   final Compiler compiler;
   final AstElement analyzedElement;
   final TypeSystem<T> types;
@@ -685,6 +709,7 @@
       new Map<JumpTarget, List<LocalsHandler<T>>>();
   LocalsHandler<T> locals;
   final List<T> cascadeReceiverStack = new List<T>();
+  final TreeElements elements;
 
   bool accumulateIsChecks = false;
   bool conditionIsSimple = false;
@@ -710,7 +735,7 @@
                   [LocalsHandler<T> handler])
     : this.analyzedElement = analyzedElement,
       this.locals = handler,
-      super(analyzedElement.resolvedAst.elements) {
+      this.elements = analyzedElement.resolvedAst.elements {
     if (handler != null) return;
     Node node = analyzedElement.node;
     FieldInitializationScope<T> fieldScope =
@@ -720,6 +745,12 @@
     locals = new LocalsHandler<T>(inferrer, types, compiler, node, fieldScope);
   }
 
+  @override
+  SemanticSendVisitor get sendVisitor => this;
+
+  @override
+  T apply(Node node, _) => visit(node);
+
   T handleSendSet(SendSet node);
 
   T handleDynamicInvoke(Send node);
@@ -733,6 +764,36 @@
   T visitFunctionExpression(FunctionExpression node);
 
   @override
+  T bulkHandleSet(SendSet node, _) {
+    return handleSendSet(node);
+  }
+
+  @override
+  T bulkHandleCompound(SendSet node, _) {
+    return handleSendSet(node);
+  }
+
+  @override
+  T bulkHandleSetIfNull(SendSet node, _) {
+    return handleSendSet(node);
+  }
+
+  @override
+  T bulkHandlePrefix(SendSet node, _) {
+    return handleSendSet(node);
+  }
+
+  @override
+  T bulkHandlePostfix(SendSet node, _) {
+    return handleSendSet(node);
+  }
+
+  @override
+  T bulkHandleError(Node node, ErroneousElement error, _) {
+    return types.dynamicType;
+  }
+
+  @override
   T visitAssert(Send node, Node expression, _) {
     if (!compiler.enableUserAssertions) {
       return types.nullType;
@@ -811,11 +872,6 @@
     return types.nonNullSubtype(compiler.symbolClass);
   }
 
-  T visitTypePrefixSend(Send node) {
-    // TODO(johnniwinther): Remove the need for handling this node.
-    return types.dynamicType;
-  }
-
   @override
   void previsitDeferredAccess(Send node, PrefixElement prefix, _) {
     // Deferred access does not affect inference.
@@ -829,6 +885,30 @@
     return types.dynamicType;
   }
 
+
+  @override
+  T bulkHandleNode(Node node, String message, _) {
+    return internalError(node, message.replaceAll('#', '$node'));
+  }
+
+  @override
+  T visitConstantGet(
+      Send node,
+      ConstantExpression constant,
+      _) {
+    return bulkHandleNode(node, "Constant read `#` unhandled.", _);
+  }
+
+  @override
+  T visitConstantInvoke(
+      Send node,
+      ConstantExpression constant,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    return bulkHandleNode(node, "Constant invoke `#` unhandled.", _);
+  }
+
   T visitClassTypeLiteralGet(
       Send node,
       ConstantExpression constant,
@@ -918,6 +998,11 @@
         outermostElement.enclosingClass.superclass);
   }
 
+  @override
+  T visitThisGet(Identifier node, _) {
+    return thisType;
+  }
+
   T visitIdentifier(Identifier node) {
     if (node.isThis()) {
       return thisType;
@@ -1169,7 +1254,7 @@
         locals.update(elements[definition], types.nullType, node);
       } else {
         assert(definition.asSendSet() != null);
-        visit(definition);
+        handleSendSet(definition);
       }
     }
     return null;
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index 4bd3b4c..1dda7d4 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -355,7 +355,7 @@
     /// return false. Instead we catch that case here for now.
     // TODO(herhut): Handle creation of closures from instances of Function.
     if (element.isInstanceMember &&
-        element.name == Compiler.CALL_OPERATOR_NAME) {
+        element.name == Identifiers.call) {
       return true;
     }
     Element outermost = element.outermostEnclosingMemberOrTopLevel;
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index c54bebd..fccfb80 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -4,28 +4,51 @@
 
 library simple_types_inferrer;
 
-import '../closure.dart' show ClosureClassMap, ClosureScope;
-import '../constants/values.dart' show ConstantValue, IntConstantValue;
-import '../cps_ir/cps_ir_nodes.dart' as cps_ir show Node;
-import '../dart_types.dart'
-    show DartType, InterfaceType, FunctionType, TypeKind;
+import '../closure.dart' show
+    ClosureClassMap,
+    ClosureScope;
+import '../common/names.dart' show
+    Selectors;
+import '../compiler.dart' show
+    Compiler;
+import '../constants/values.dart' show
+    ConstantValue,
+    IntConstantValue;
+import '../cps_ir/cps_ir_nodes.dart' as cps_ir show
+    Node;
+import '../dart_types.dart' show
+    DartType,
+    FunctionType,
+    InterfaceType,
+    TypeKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../elements/elements.dart';
 import '../js_backend/js_backend.dart' as js;
 import '../native/native.dart' as native;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../resolution/operators.dart' as op;
 import '../tree/tree.dart' as ast;
-import '../types/types.dart'
-    show TypesInferrer, FlatTypeMask, TypeMask, ContainerTypeMask,
-         ElementTypeMask, ValueTypeMask, TypeSystem, MinimalInferrerEngine;
-import '../util/util.dart' show Link, Spannable, Setlet;
-import 'inferrer_visitor.dart';
+import '../types/types.dart' show
+    TypesInferrer,
+    FlatTypeMask,
+    TypeMask,
+    ContainerTypeMask,
+    ElementTypeMask,
+    ValueTypeMask,
+    TypeSystem,
+    MinimalInferrerEngine;
+import '../util/util.dart' show
+    Link,
+    Setlet;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SideEffects;
+import '../world.dart' show ClassWorld;
 
-// BUG(8802): There's a bug in the analyzer that makes the re-export
-// of Selector from dart2jslib.dart fail. For now, we work around that
-// by importing universe.dart explicitly and disabling the re-export.
-import '../dart2jslib.dart' hide Selector, TypedSelector;
-import '../universe/universe.dart'
-    show Selector, SideEffects, TypedSelector, CallStructure;
+import 'inferrer_visitor.dart';
 
 /**
  * An implementation of [TypeSystem] for [TypeMask].
@@ -371,9 +394,11 @@
         mappedType = types.stringType;
       } else if (type.element == compiler.intClass) {
         mappedType = types.intType;
-      } else if (type.element == compiler.doubleClass) {
-        mappedType = types.doubleType;
-      } else if (type.element == compiler.numClass) {
+      } else if (type.element == compiler.numClass ||
+                 type.element == compiler.doubleClass) {
+        // Note: the backend double class is specifically for non-integer
+        // doubles, and a native behavior returning 'double' does not guarantee
+        // a non-integer return type, so we return the number type for those.
         mappedType = types.numType;
       } else if (type.element == compiler.boolClass) {
         mappedType = types.boolType;
@@ -415,12 +440,12 @@
       elements.setTypeMask(node, mask);
     } else {
       assert(astNode.asForIn() != null);
-      if (selector == compiler.iteratorSelector) {
+      if (selector == Selectors.iterator) {
         elements.setIteratorTypeMask(node, mask);
-      } else if (selector == compiler.currentSelector) {
+      } else if (selector == Selectors.current) {
         elements.setCurrentTypeMask(node, mask);
       } else {
-        assert(selector == compiler.moveNextSelector);
+        assert(selector == Selectors.moveNext);
         elements.setMoveNextTypeMask(node, mask);
       }
     }
@@ -567,7 +592,17 @@
         synthesizeForwardingCall(spannable, constructor.definingConstructor);
       } else {
         visitingInitializers = true;
-        visit(node.initializers);
+        if (node.initializers != null) {
+          for (ast.Node initializer in node.initializers) {
+            ast.SendSet fieldInitializer = initializer.asSendSet();
+            if (fieldInitializer != null) {
+              handleSendSet(fieldInitializer);
+            } else {
+              Element element = elements[initializer];
+              handleConstructorSend(initializer, element);
+            }
+          }
+        }
         visitingInitializers = false;
         // For a generative constructor like: `Foo();`, we synthesize
         // a call to the default super constructor (the one that takes
@@ -815,7 +850,13 @@
         isCallOnThis = true;
       }
     } else {
-      receiverType = visit(node.receiver);
+      if (node.receiver != null) {
+        Element receiver = elements[node.receiver];
+        if (receiver is! PrefixElement && receiver is! ClassElement) {
+          // TODO(johnniwinther): Avoid blindly recursing on the receiver.
+          receiverType = visit(node.receiver);
+        }
+      }
       isCallOnThis = isThisOrSuper(node.receiver);
     }
 
@@ -1322,20 +1363,6 @@
         node, selector, mask, element, null);
   }
 
-  /// Handle super constructor invocation.
-  @override
-  T handleSuperConstructorInvoke(ast.Send node) {
-    Element element = elements[node];
-    ArgumentsTypes arguments = analyzeArguments(node.arguments);
-    assert(visitingInitializers);
-    seenSuperConstructorCall = true;
-    analyzeSuperConstructorCall(element, arguments);
-    Selector selector = elements.getSelector(node);
-    TypeMask mask = elements.getTypeMask(node);
-    return handleStaticSend(
-        node, selector, mask, element, arguments);
-  }
-
   @override
   T visitUnresolvedSuperIndex(
       ast.Send node,
@@ -1446,6 +1473,16 @@
   }
 
   @override
+  T visitSuperSetterInvoke(
+      ast.Send node,
+      FunctionElement setter,
+      ast.NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    return handleErroneousSuperSend(node);
+  }
+
+  @override
   T visitSuperIndex(
       ast.Send node,
       MethodElement method,
@@ -1558,12 +1595,6 @@
     return super.handleTypeLiteralInvoke(arguments);
   }
 
-  T visitStaticSend(ast.Send node) {
-    assert(!elements.isAssert(node));
-    Element element = elements[node];
-    return handleConstructorSend(node, element);
-  }
-
   /// Handle constructor invocation of [element].
   T handleConstructorSend(ast.Send node, ConstructorElement element) {
     ArgumentsTypes arguments = analyzeArguments(node.arguments);
@@ -1634,8 +1665,21 @@
     }
   }
 
-  T handleNewExpression(ast.NewExpression node) {
-    return visitStaticSend(node.send);
+  @override
+  T bulkHandleNew(ast.NewExpression node, _) {
+    Element element = elements[node.send];
+    return handleConstructorSend(node.send, element);
+  }
+
+  @override
+  T errorNonConstantConstructorInvoke(
+      ast.NewExpression node,
+      Element element,
+      DartType type,
+      ast.NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    return bulkHandleNew(node, _);
   }
 
   /// Handle invocation of a top level or static field or getter [element].
@@ -1815,15 +1859,6 @@
     return new ArgumentsTypes<T>(positional, named);
   }
 
-  T visitGetterSend(ast.Send node) {
-    if (elements[node] is! PrefixElement) {
-      // TODO(johnniwinther): Remove this when no longer called from
-      // [handleSendSet].
-      internalError(node, "Unexpected visitGetterSend");
-    }
-    return null;
-  }
-
   /// Read a local variable, function or parameter.
   T handleLocalGet(ast.Send node, LocalElement local) {
     assert(locals.use(local) != null);
@@ -1855,7 +1890,7 @@
   T visitDynamicPropertyGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     return handleDynamicGet(node);
   }
@@ -1864,7 +1899,7 @@
   T visitIfNotNullDynamicPropertyGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     return handleDynamicGet(node);
   }
@@ -1920,7 +1955,7 @@
   @override
   T visitThisPropertyGet(
       ast.Send node,
-      Selector selector,
+      Name name,
       _) {
     return handleDynamicGet(node);
   }
@@ -1988,7 +2023,7 @@
       ast.Send node,
       ast.Node expression,
       ast.NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       _) {
     return handleCallInvoke(node, expression.accept(this));
    }
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 506985e..cf7e1cc 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -4,53 +4,63 @@
 
 library type_graph_inferrer;
 
-import 'dart:collection' show Queue, IterableBase;
+import 'dart:collection' show
+    IterableBase,
+    Queue;
 
+import '../common/names.dart' show
+    Identifiers,
+    Names;
+import '../compiler.dart' show
+    Compiler;
 import '../constants/values.dart';
-import '../cps_ir/cps_ir_nodes.dart' as cps_ir
-    show Node;
-import '../dart_types.dart'
-    show DartType,
-         FunctionType,
-         InterfaceType,
-         TypeKind;
-import '../dart2jslib.dart'
-    show ClassWorld,
-         Compiler,
-         Constant,
-         FunctionConstant,
-         invariant,
-         TreeElementMapping;
+import '../cps_ir/cps_ir_nodes.dart' as cps_ir show
+    Node;
+import '../dart_types.dart' show
+    DartType,
+    FunctionType,
+    InterfaceType,
+    TypeKind;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../elements/elements.dart';
+import '../js_backend/js_backend.dart' show
+    Annotations,
+    JavaScriptBackend;
 import '../native/native.dart' as native;
-import '../tree/tree.dart' as ast
-    show DartString,
-         Node,
-         Send,
-         SendSet,
-         TryStatement;
-import '../types/types.dart'
-    show ContainerTypeMask,
-         DictionaryTypeMask,
-         MapTypeMask,
-         TypeMask,
-         TypesInferrer,
-         ValueTypeMask;
-import '../types/constants.dart'
-    show computeTypeMask;
-import '../universe/universe.dart'
-    show Selector,
-         SideEffects,
-         TypedSelector;
-import '../util/util.dart'
-    show ImmutableEmptySet,
-         Setlet,
-         Spannable;
-import '../js_backend/js_backend.dart' show Annotations, JavaScriptBackend;
+import '../resolution/tree_elements.dart' show
+    TreeElementMapping;
+import '../tree/tree.dart' as ast show
+    DartString,
+    Node,
+    Send,
+    SendSet,
+    TryStatement;
+import '../types/types.dart' show
+    ContainerTypeMask,
+    DictionaryTypeMask,
+    MapTypeMask,
+    TypeMask,
+    TypesInferrer,
+    ValueTypeMask;
+import '../types/constants.dart' show
+    computeTypeMask;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SideEffects,
+    TypedSelector;
+import '../util/util.dart' show
+    ImmutableEmptySet,
+    Setlet;
+import '../world.dart' show
+    ClassWorld;
 
-import 'inferrer_visitor.dart'
-    show ArgumentsTypes,
-         TypeSystem;
+import 'inferrer_visitor.dart' show
+    ArgumentsTypes,
+    TypeSystem;
 import 'simple_types_inferrer.dart';
 
 part 'closure_tracer.dart';
@@ -579,14 +589,14 @@
    */
   final Set<Selector> _returnsListElementTypeSet = new Set<Selector>.from(
     <Selector>[
-      new Selector.getter('first', null),
-      new Selector.getter('last', null),
-      new Selector.getter('single', null),
-      new Selector.call('singleWhere', null, 1),
-      new Selector.call('elementAt', null, 1),
+      new Selector.getter(const PublicName('first')),
+      new Selector.getter(const PublicName('last')),
+      new Selector.getter(const PublicName('single')),
+      new Selector.call(const PublicName('singleWhere'), CallStructure.ONE_ARG),
+      new Selector.call(const PublicName('elementAt'), CallStructure.ONE_ARG),
       new Selector.index(),
-      new Selector.call('removeAt', null, 1),
-      new Selector.call('removeLast', null, 0)
+      new Selector.call(const PublicName('removeAt'), CallStructure.ONE_ARG),
+      new Selector.call(const PublicName('removeLast'), CallStructure.NO_ARGS)
     ]);
 
   bool returnsListElementType(Selector selector, TypeMask mask) {
@@ -680,6 +690,7 @@
 
     // Trace closures to potentially infer argument types.
     types.allocatedClosures.forEach((info) {
+
       void trace(Iterable<FunctionElement> elements,
                  ClosureTracerVisitor tracer) {
         tracer.run();
@@ -713,16 +724,31 @@
           }
         });
       }
+
       if (info is ClosureTypeInformation) {
         Iterable<FunctionElement> elements = [info.element];
         trace(elements, new ClosureTracerVisitor(elements, info, this));
       } else if (info is CallSiteTypeInformation) {
-        // We only are interested in functions here, as other targets
-        // of this closure call are not a root to trace but an intermediate
-        // for some other function.
-        Iterable<FunctionElement> elements = info.callees
-            .where((e) => e.isFunction);
-        trace(elements, new ClosureTracerVisitor(elements, info, this));
+        if (info is StaticCallSiteTypeInformation &&
+            info.selector != null &&
+            info.selector.isCall) {
+          // This is a constructor call to a class with a call method. So we
+          // need to trace the call method here.
+          assert(info.calledElement.isConstructor);
+          ClassElement cls = info.calledElement.enclosingClass;
+          FunctionElement callMethod = cls.lookupMember(Identifiers.call);
+          assert(invariant(cls, callMethod != null));
+          Iterable<FunctionElement> elements = [callMethod];
+          trace(elements, new ClosureTracerVisitor(elements, info, this));
+        } else {
+          // We only are interested in functions here, as other targets
+          // of this closure call are not a root to trace but an intermediate
+          // for some other function.
+          Iterable<FunctionElement> elements =
+              new List<FunctionElement>.from(
+                  info.callees.where((e) => e.isFunction));
+          trace(elements, new ClosureTracerVisitor(elements, info, this));
+        }
       } else {
         assert(info is ElementTypeInformation);
         trace([info.element],
@@ -774,6 +800,10 @@
               print('${types.getInferredTypeOf(target).type} for ${target}');
             }
           }
+        } else if (info is StaticCallSiteTypeInformation) {
+          ClassElement cls = info.calledElement.enclosingClass;
+          FunctionElement callMethod = cls.lookupMember(Identifiers.call);
+          print('${types.getInferredSignatureOf(callMethod)} for ${cls}');
         } else {
           print('${info.type} for some unknown kind of closure');
         }
@@ -923,7 +953,7 @@
                                   Selector selector,
                                   TypeMask mask,
                                   {bool remove, bool addToQueue: true}) {
-    if (callee.name == Compiler.NO_SUCH_METHOD) return;
+    if (callee.name == Identifiers.noSuchMethod_) return;
     if (callee.isField) {
       if (selector.isSetter) {
         ElementTypeInformation info = types.getInferredTypeOf(callee);
@@ -1108,6 +1138,14 @@
     CallSiteTypeInformation info = new StaticCallSiteTypeInformation(
           types.currentMember, node, caller, callee, selector, mask, arguments,
           inLoop);
+    // If this class has a 'call' method then we have essentially created a
+    // closure here. Register it as such so that it is traced.
+    if (selector != null && selector.isCall && callee.isConstructor) {
+      ClassElement cls = callee.enclosingClass.declaration;
+      if (cls.callType != null) {
+        types.allocatedClosures.add(info);
+      }
+    }
     info.addToGraph(this);
     allocatedCalls.add(info);
     updateSideEffects(sideEffects, selector, callee);
@@ -1230,7 +1268,7 @@
    */
   TypeInformation typeOfElementWithSelector(Element element,
                                             Selector selector) {
-    if (element.name == Compiler.NO_SUCH_METHOD &&
+    if (element.name == Identifiers.noSuchMethod_ &&
         selector.name != element.name) {
       // An invocation can resolve to a [noSuchMethod], in which case
       // we get the return type of [noSuchMethod].
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 51c39f5..900bd47 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -550,8 +550,8 @@
       return safeType(inferrer);
     }
     if (function.isInstanceMember &&
-        (function.name == Compiler.NO_SUCH_METHOD ||
-        (function.name == Compiler.CALL_OPERATOR_NAME &&
+        (function.name == Identifiers.noSuchMethod_ ||
+        (function.name == Identifiers.call &&
          disableInferenceForClosures))) {
       // Do not infer types for parameters of [noSuchMethod] and
       // [call] instance methods.
@@ -767,7 +767,7 @@
     return targets.any((Element e) {
       return e is FunctionElement &&
              e.isInstanceMember &&
-             e.name == Compiler.NO_SUCH_METHOD &&
+             e.name == Identifiers.noSuchMethod_ &&
              inferrer.backend.isComplexNoSuchMethod(e);
     });
   }
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 56b88d1..31c545c 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -7,18 +7,21 @@
 
 library dart2js.source_information.position;
 
-import '../dart2jslib.dart' show
-    invariant,
-    MessageKind,
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/source_span.dart' show
     SourceSpan;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
 import '../elements/elements.dart' show
     AstElement,
     LocalElement;
 import '../js/js.dart' as js;
 import '../js/js_source_mapping.dart';
 import '../js/js_debug.dart';
-import '../tree/tree.dart' show Node, Send;
-import '../util/util.dart' show NO_LOCATION_SPANNABLE;
+import '../tree/tree.dart' show
+    Node,
+    Send;
 
 import 'source_file.dart';
 import 'source_information.dart';
@@ -231,7 +234,8 @@
 
 /// Registry for mapping [js.Node]s to their [CodePosition].
 class CodePositionRecorder {
-  Map<js.Node, CodePosition> _codePositionMap = <js.Node, CodePosition>{};
+  Map<js.Node, CodePosition> _codePositionMap =
+      new Map<js.Node, CodePosition>.identity();
 
   void registerPositions(js.Node node,
                          int startPosition,
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index 7acf719..8f83f9b 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -4,11 +4,14 @@
 
 library dart2js.source_information;
 
-import '../dart2jslib.dart' show SourceSpan, MessageKind;
+import '../diagnostics/source_span.dart' show
+    SourceSpan;
 import '../elements/elements.dart' show
     AstElement,
     LocalElement;
-import '../tree/tree.dart' show Node, Send;
+import '../tree/tree.dart' show
+    Node,
+    Send;
 import '../js/js.dart' show
     JavaScriptNodeSourceInformation;
 import 'source_file.dart';
diff --git a/pkg/compiler/lib/src/io/start_end_information.dart b/pkg/compiler/lib/src/io/start_end_information.dart
index 68469eb..6e0d558 100644
--- a/pkg/compiler/lib/src/io/start_end_information.dart
+++ b/pkg/compiler/lib/src/io/start_end_information.dart
@@ -7,9 +7,10 @@
 
 library dart2js.source_information.start_end;
 
-import '../dart2jslib.dart' show
+import '../diagnostics/messages.dart' show
     MessageKind,
-    MessageTemplate,
+    MessageTemplate;
+import '../diagnostics/source_span.dart' show
     SourceSpan;
 import '../elements/elements.dart' show
     AstElement,
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index f609781..7618b96 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -7,15 +7,22 @@
 import 'package:js_ast/js_ast.dart';
 export 'package:js_ast/js_ast.dart';
 
-import '../io/code_output.dart' show CodeOutput, CodeBuffer;
-import '../js_emitter/js_emitter.dart' show USE_LAZY_EMITTER;
-import '../dart2jslib.dart' as leg;
-import '../util/util.dart' show NO_LOCATION_SPANNABLE, Indentation, Tagging;
-import '../dump_info.dart' show DumpInfoTask;
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
+import '../dump_info.dart' show
+    DumpInfoTask;
+import '../io/code_output.dart' show
+    CodeBuffer,
+    CodeOutput;
+import '../js_emitter/js_emitter.dart' show
+    USE_LAZY_EMITTER;
+
 import 'js_source_mapping.dart';
 
 CodeBuffer prettyPrint(Node node,
-                       leg.Compiler compiler,
+                       Compiler compiler,
                        {DumpInfoTask monitor,
                         bool allowVariableMinification: true,
                         Renamer renamerForNames:
@@ -41,7 +48,7 @@
 }
 
 class Dart2JSJavaScriptPrintingContext implements JavaScriptPrintingContext {
-  final leg.Compiler compiler;
+  final Compiler compiler;
   final DumpInfoTask monitor;
   final CodeBuffer outBuffer;
   final CodePositionListener codePositionListener;
@@ -122,7 +129,7 @@
                    implements AstContainer {
   @override
   final Node tree;
-  final leg.Compiler _compiler;
+  final Compiler _compiler;
   final bool _protectForEval;
   LiteralString _cachedLiteral;
 
diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
index 1282401..e1e90c3 100644
--- a/pkg/compiler/lib/src/js/rewrite_async.dart
+++ b/pkg/compiler/lib/src/js/rewrite_async.dart
@@ -12,8 +12,12 @@
 
 import "js.dart" as js;
 
-import '../util/util.dart';
-import '../dart2jslib.dart' show DiagnosticListener;
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE,
+    Spannable;
+import '../util/util.dart' show
+    Pair;
 
 /// Rewrites a [js.Fun] with async/sync*/async* functions and await and yield
 /// (with dart-like semantics) to an equivalent function without these.
@@ -1689,11 +1693,13 @@
   /// Specific to async methods.
   final js.Expression newCompleter;
 
+  final js.Expression wrapBody;
 
   AsyncRewriter(DiagnosticListener diagnosticListener,
                 spannable,
                 {this.asyncHelper,
                  this.newCompleter,
+                 this.wrapBody,
                  String safeVariableName(String proposedName),
                  js.Name bodyName})
         : super(diagnosticListener,
@@ -1774,13 +1780,13 @@
     return js.js("""
         function (#parameters) {
           #variableDeclarations;
-          function #bodyName(#errorCode, #result) {
+          var #bodyName = #wrapBody(function (#errorCode, #result) {
             if (#errorCode === #ERROR) {
                 #currentError = #result;
                 #goto = #handler;
             }
             #rewrittenBody;
-          }
+          });
           return #asyncHelper(null, #bodyName, #completer, null);
         }""", {
           "parameters": parameters,
@@ -1795,6 +1801,7 @@
           "result": resultName,
           "asyncHelper": asyncHelper,
           "completer": completer,
+          "wrapBody": wrapBody,
         });
   }
 }
@@ -1989,6 +1996,8 @@
   /// Called with the stream to yield from.
   final js.Expression yieldStarExpression;
 
+  final js.Expression wrapBody;
+
   AsyncStarRewriter(DiagnosticListener diagnosticListener,
                 spannable,
                 {this.asyncStarHelper,
@@ -1996,6 +2005,7 @@
                  this.newController,
                  this.yieldExpression,
                  this.yieldStarExpression,
+                 this.wrapBody,
                  String safeVariableName(String proposedName),
                  js.Name bodyName})
         : super(diagnosticListener,
@@ -2041,8 +2051,7 @@
                         js.VariableDeclarationList variableDeclarations) {
     return js.js("""
         function (#parameters) {
-          #variableDeclarations;
-          function #bodyName(#errorCode, #result) {
+          var #bodyName = #wrapBody(function (#errorCode, #result) {
             if (#hasYield) {
               switch (#errorCode) {
                 case #STREAM_WAS_CANCELED:
@@ -2060,7 +2069,8 @@
               }
             }
             #rewrittenBody;
-          }
+          });
+          #variableDeclarations;
           return #streamOfController(#controller);
         }""", {
           "parameters": parameters,
@@ -2079,6 +2089,7 @@
           "result": resultName,
           "streamOfController": streamOfController,
           "controller": controllerName,
+          "wrapBody": wrapBody,
         });
   }
 
@@ -2111,7 +2122,8 @@
     List<js.VariableInitialization> variables =
         new List<js.VariableInitialization>();
     variables.add(_makeVariableInitializer(controller,
-                         js.js('#(#)', [newController, bodyName])));
+                         js.js('#(#)',
+                               [newController, bodyName])));
     if (analysis.hasYield) {
       variables.add(_makeVariableInitializer(nextWhenCanceled, null));
     }
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index d17fffd..ce801a9 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -223,8 +223,6 @@
   static final Uri DART_JS_HELPER = new Uri(scheme: 'dart', path: '_js_helper');
   static final Uri DART_INTERCEPTORS =
       new Uri(scheme: 'dart', path: '_interceptors');
-  static final Uri DART_INTERNAL =
-      new Uri(scheme: 'dart', path: '_internal');
   static final Uri DART_FOREIGN_HELPER =
       new Uri(scheme: 'dart', path: '_foreign_helper');
   static final Uri DART_JS_MIRRORS =
@@ -235,15 +233,13 @@
       new Uri(scheme: 'dart', path: '_js_embedded_names');
   static final Uri DART_ISOLATE_HELPER =
       new Uri(scheme: 'dart', path: '_isolate_helper');
-  static final Uri DART_HTML =
-      new Uri(scheme: 'dart', path: 'html');
 
   static const String INVOKE_ON = '_getCachedInvocation';
   static const String START_ROOT_ISOLATE = 'startRootIsolate';
 
 
   String get patchVersion => emitter.patchVersion;
-  
+
   bool get supportsReflection => emitter.emitter.supportsReflection;
 
   final Annotations annotations;
@@ -273,6 +269,7 @@
   FunctionInlineCache inlineCache = new FunctionInlineCache();
 
   LibraryElement jsHelperLibrary;
+  LibraryElement asyncLibrary;
   LibraryElement interceptorsLibrary;
   LibraryElement foreignLibrary;
   LibraryElement isolateHelperLibrary;
@@ -333,10 +330,13 @@
 
   ClassElement jsInvocationMirrorClass;
 
-  /// If [true], the compiler will emit code that writes the name of the current
-  /// method together with its class and library to the console the first time
-  /// the method is called.
-  static const bool TRACE_CALLS = false;
+  /// If [true], the compiler will emit code that logs whenever a method is
+  /// called. When TRACE_METHOD is 'console' this will be logged
+  /// directly in the JavaScript console. When TRACE_METHOD is 'post' the
+  /// information will be sent to a server via a POST request.
+  static const String TRACE_METHOD = const String.fromEnvironment('traceCalls');
+  static const bool TRACE_CALLS =
+    TRACE_METHOD == 'post' || TRACE_METHOD == 'console';
   Element traceHelper;
 
   TypeMask get stringType => compiler.typesTask.stringType;
@@ -669,10 +669,11 @@
   // TODO(karlklose): Split into findHelperFunction and findHelperClass and
   // add a check that the element has the expected kind.
   Element findHelper(String name) => find(jsHelperLibrary, name);
+  Element findAsyncHelper(String name) => find(asyncLibrary, name);
   Element findInterceptor(String name) => find(interceptorsLibrary, name);
 
   Element find(LibraryElement library, String name) {
-    Element element = library.findLocal(name);
+    Element element = library.implementation.findLocal(name);
     assert(invariant(library, element != null,
         message: "Element '$name' not found in '${library.canonicalUri}'."));
     return element;
@@ -888,7 +889,7 @@
     if (enqueuer.isResolutionQueue) {
       cls.ensureResolved(compiler);
       cls.forEachMember((ClassElement classElement, Element member) {
-        if (member.name == Compiler.CALL_OPERATOR_NAME) {
+        if (member.name == Identifiers.call) {
           compiler.reportError(
               member,
               MessageKind.CALL_NOT_SUPPORTED_ON_NATIVE_CLASS);
@@ -1047,7 +1048,7 @@
           ClassElement implementation = cls.patch != null ? cls.patch : cls;
           ConstructorElement ctor = implementation.lookupConstructor(name);
           if (ctor == null
-              || (isPrivateName(name)
+              || (Name.isPrivateName(name)
                   && ctor.library != mapLiteralClass.library)) {
             compiler.internalError(mapLiteralClass,
                                    "Map literal class $mapLiteralClass missing "
@@ -1160,7 +1161,8 @@
     }
 
     if (TRACE_CALLS) {
-      traceHelper = findHelper('traceHelper');
+      traceHelper = findHelper(
+          TRACE_METHOD == 'console' ? 'consoleTraceHelper' : 'postTraceHelper');
       assert(traceHelper != null);
       enqueueInResolution(traceHelper, registry);
     }
@@ -1296,7 +1298,7 @@
   void enableNoSuchMethod(Enqueuer world) {
     enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
     world.registerInvocation(
-        new UniverseSelector(compiler.noSuchMethodSelector, null));
+        new UniverseSelector(Selectors.noSuchMethod_, null));
   }
 
   void enableIsolateSupport(Enqueuer enqueuer) {
@@ -1319,6 +1321,7 @@
         Element element = find(isolateHelperLibrary, name);
         enqueuer.addToWorkList(element);
         compiler.globalDependencies.registerDependency(element);
+        helpersUsed.add(element.declaration);
       }
     } else {
       enqueuer.addToWorkList(find(isolateHelperLibrary, START_ROOT_ISOLATE));
@@ -1850,43 +1853,47 @@
   }
 
   Element getAsyncHelper() {
-    return findHelper("asyncHelper");
+    return findAsyncHelper("_asyncHelper");
+  }
+
+  Element getWrapBody() {
+    return findAsyncHelper("_wrapJsFunctionForAsync");
   }
 
   Element getYieldStar() {
-    ClassElement classElement = findHelper("IterationMarker");
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(compiler);
     return classElement.lookupLocalMember("yieldStar");
   }
 
   Element getYieldSingle() {
-    ClassElement classElement = findHelper("IterationMarker");
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(compiler);
     return classElement.lookupLocalMember("yieldSingle");
   }
 
   Element getSyncStarUncaughtError() {
-    ClassElement classElement = findHelper("IterationMarker");
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(compiler);
     return classElement.lookupLocalMember("uncaughtError");
   }
 
   Element getAsyncStarHelper() {
-    return findHelper("asyncStarHelper");
+    return findAsyncHelper("_asyncStarHelper");
   }
 
   Element getStreamOfController() {
-    return findHelper("streamOfController");
+    return findAsyncHelper("_streamOfController");
   }
 
   Element getEndOfIteration() {
-    ClassElement classElement = findHelper("IterationMarker");
+    ClassElement classElement = findAsyncHelper("_IterationMarker");
     classElement.ensureResolved(compiler);
     return classElement.lookupLocalMember("endOfIteration");
   }
 
   Element getSyncStarIterable() {
-    ClassElement classElement = findHelper("SyncStarIterable");
+    ClassElement classElement = findAsyncHelper("_SyncStarIterable");
     classElement.ensureResolved(compiler);
     return classElement;
   }
@@ -1897,14 +1904,15 @@
     return classElement.lookupConstructor("");
   }
 
-  Element getCompleterConstructor() {
+  Element getSyncCompleterConstructor() {
     ClassElement classElement = find(compiler.asyncLibrary, "Completer");
     classElement.ensureResolved(compiler);
-    return classElement.lookupConstructor("");
+    return classElement.lookupConstructor("sync");
   }
 
   Element getASyncStarController() {
-    ClassElement classElement = findHelper("AsyncStarStreamController");
+    ClassElement classElement =
+        findAsyncHelper("_AsyncStarStreamController");
     classElement.ensureResolved(compiler);
     return classElement;
   }
@@ -2018,7 +2026,9 @@
     Uri uri = library.canonicalUri;
     if (uri == DART_JS_HELPER) {
       jsHelperLibrary = library;
-    } else if (uri == DART_INTERNAL) {
+    } else if (uri == Uris.dart_async) {
+      asyncLibrary = library;
+    } else if (uri == Uris.dart__internal) {
       internalLibrary = library;
     } else if (uri ==  DART_INTERCEPTORS) {
       interceptorsLibrary = library;
@@ -2121,7 +2131,7 @@
       } else if (uri == DART_EMBEDDED_NAMES) {
         jsGetNameEnum = find(library, 'JsGetName');
         jsBuiltinEnum = find(library, 'JsBuiltin');
-      } else if (uri == DART_HTML) {
+      } else if (uri == Uris.dart_html) {
         htmlLibraryIsLoaded = true;
       }
       annotations.onLibraryScanned(library);
@@ -2129,11 +2139,11 @@
   }
 
   Future onLibrariesLoaded(LoadedLibraries loadedLibraries) {
-    if (!loadedLibraries.containsLibrary(Compiler.DART_CORE)) {
+    if (!loadedLibraries.containsLibrary(Uris.dart_core)) {
       return new Future.value();
     }
 
-    assert(loadedLibraries.containsLibrary(Compiler.DART_CORE));
+    assert(loadedLibraries.containsLibrary(Uris.dart_core));
     assert(loadedLibraries.containsLibrary(DART_INTERCEPTORS));
     assert(loadedLibraries.containsLibrary(DART_JS_HELPER));
 
@@ -2689,8 +2699,9 @@
                            Registry registry) {
     if (element.asyncMarker == AsyncMarker.ASYNC) {
       enqueue(enqueuer, getAsyncHelper(), registry);
-      enqueue(enqueuer, getCompleterConstructor(), registry);
+      enqueue(enqueuer, getSyncCompleterConstructor(), registry);
       enqueue(enqueuer, getStreamIteratorConstructor(), registry);
+      enqueue(enqueuer, getWrapBody(), registry);
     } else if (element.asyncMarker == AsyncMarker.SYNC_STAR) {
       ClassElement clsSyncStarIterable = getSyncStarIterable();
       clsSyncStarIterable.ensureResolved(compiler);
@@ -2710,6 +2721,7 @@
       enqueue(enqueuer, getYieldStar(), registry);
       enqueue(enqueuer, getASyncStarControllerConstructor(), registry);
       enqueue(enqueuer, getStreamIteratorConstructor(), registry);
+      enqueue(enqueuer, getWrapBody(), registry);
     }
   }
 
@@ -2731,6 +2743,65 @@
     }
     return true;
   }
+
+  jsAst.Expression rewriteAsync(FunctionElement element,
+                                jsAst.Expression code) {
+    AsyncRewriterBase rewriter = null;
+    jsAst.Name name = namer.methodPropertyName(element);
+    switch (element.asyncMarker) {
+      case AsyncMarker.ASYNC:
+        rewriter = new AsyncRewriter(
+            compiler,
+            compiler.currentElement,
+            asyncHelper:
+                emitter.staticFunctionAccess(getAsyncHelper()),
+            wrapBody:
+                emitter.staticFunctionAccess(getWrapBody()),
+            newCompleter: emitter.staticFunctionAccess(
+                getSyncCompleterConstructor()),
+            safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
+            bodyName: namer.deriveAsyncBodyName(name));
+        break;
+      case AsyncMarker.SYNC_STAR:
+        rewriter = new SyncStarRewriter(
+            compiler,
+            compiler.currentElement,
+            endOfIteration: emitter.staticFunctionAccess(
+                getEndOfIteration()),
+            newIterable: emitter.staticFunctionAccess(
+                getSyncStarIterableConstructor()),
+            yieldStarExpression: emitter.staticFunctionAccess(
+                getYieldStar()),
+            uncaughtErrorExpression: emitter.staticFunctionAccess(
+                getSyncStarUncaughtError()),
+            safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
+            bodyName: namer.deriveAsyncBodyName(name));
+         break;
+      case AsyncMarker.ASYNC_STAR:
+        rewriter = new AsyncStarRewriter(
+            compiler,
+            compiler.currentElement,
+            asyncStarHelper: emitter.staticFunctionAccess(
+                getAsyncStarHelper()),
+            streamOfController: emitter.staticFunctionAccess(
+                getStreamOfController()),
+            wrapBody:
+                emitter.staticFunctionAccess(getWrapBody()),
+            newController: emitter.staticFunctionAccess(
+                getASyncStarControllerConstructor()),
+            safeVariableName: namer.safeVariablePrefixForAsyncRewrite,
+            yieldExpression: emitter.staticFunctionAccess(
+                getYieldSingle()),
+            yieldStarExpression: emitter.staticFunctionAccess(
+                getYieldStar()),
+            bodyName: namer.deriveAsyncBodyName(name));
+        break;
+      default:
+        assert(element.asyncMarker == AsyncMarker.SYNC);
+        return code;
+    }
+    return rewriter.rewrite(code);
+  }
 }
 
 /// Handling of special annotations for tests.
@@ -2744,6 +2815,8 @@
   ClassElement expectTrustTypeAnnotationsClass;
   ClassElement expectAssumeDynamicClass;
 
+  JavaScriptBackend get backend => compiler.backend;
+
   Annotations(this.compiler);
 
   void onLibraryScanned(LibraryElement library) {
@@ -2764,8 +2837,11 @@
 
   /// Returns `true` if inlining is disabled for [element].
   bool noInline(Element element) {
-    // TODO(floitsch): restrict to test directory.
-    return _hasAnnotation(element, expectNoInlineClass);
+    if (_hasAnnotation(element, expectNoInlineClass)) {
+      // TODO(floitsch): restrict to elements from the test directory.
+      return true;
+    }
+    return _hasAnnotation(element, backend.noInlineClass);
   }
 
   /// Returns `true` if parameter and returns types should be trusted for
@@ -2974,14 +3050,23 @@
     registerBackendInstantiation(backend.compiler.stringClass, registry);
   }
 
+  void onCompileTimeError(Registry registry, ErroneousElement error) {
+    if (backend.compiler.generateCodeWithCompileTimeErrors) {
+      // TODO(johnniwinther): This should have its own uncatchable error.
+      onThrowRuntimeError(registry);
+    }
+  }
+
   void onSuperNoSuchMethod(Registry registry) {
     assert(registry.isForResolution);
     registerBackendStaticInvocation(
         backend.getCreateInvocationMirror(), registry);
     registerBackendStaticInvocation(
-        backend.compiler.objectClass.lookupLocalMember(Compiler.NO_SUCH_METHOD),
+        backend.compiler.objectClass.lookupLocalMember(
+            Identifiers.noSuchMethod_),
         registry);
     registerBackendInstantiation(backend.compiler.listClass, registry);
+    registerBackendInstantiation(backend.compiler.stringClass, registry);
   }
 
   void onMapLiteral(ResolutionRegistry registry,
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index f305c76..878145d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -6,18 +6,22 @@
 
 import 'glue.dart';
 
-import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
-import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator;
-import '../../js/js.dart' as js;
+import '../../closure.dart' show ClosureClassElement;
+import '../../common/codegen.dart' show CodegenRegistry;
+import '../../constants/values.dart';
+import '../../dart_types.dart';
+import '../../diagnostics/invariant.dart' show invariant;
+import '../../diagnostics/spannable.dart' show CURRENT_ELEMENT_SPANNABLE;
 import '../../elements/elements.dart';
 import '../../io/source_information.dart' show SourceInformation;
-import '../../util/maplet.dart';
-import '../../constants/values.dart';
-import '../../dart2jslib.dart';
-import '../../dart_types.dart';
+import '../../js/js.dart' as js;
+import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
+import '../../tree_ir/tree_ir_nodes.dart' show BuiltinOperator, BuiltinMethod;
 import '../../types/types.dart' show TypeMask;
-import '../../universe/universe.dart' show UniverseSelector;
-import '../../closure.dart' show ClosureClassElement;
+import '../../universe/universe.dart' show
+    Selector,
+    UniverseSelector;
+import '../../util/maplet.dart';
 
 class CodegenBailout {
   final tree_ir.Node node;
@@ -104,6 +108,31 @@
       ++accumulatorIndex;
     }
 
+    // If the last statement is a for loop with an initializer expression, try
+    // to pull that expression into an initializer as well.
+    pullFromForLoop:
+    if (accumulatorIndex < accumulator.length &&
+        accumulator[accumulatorIndex] is js.For) {
+      js.For forLoop = accumulator[accumulatorIndex];
+      if (forLoop.init is! js.Assignment) break pullFromForLoop;
+      js.Assignment assign = forLoop.init;
+      if (assign.leftHandSide is! js.VariableUse) break pullFromForLoop;
+      if (assign.op != null) break pullFromForLoop; // Compound assignment.
+      js.VariableUse use = assign.leftHandSide;
+
+      // We cannot declare a variable more than once.
+      if (!declaredVariables.add(use.name)) break pullFromForLoop;
+
+      js.VariableInitialization jsVariable = new js.VariableInitialization(
+        new js.VariableDeclaration(use.name),
+        assign.value);
+      jsVariables.add(jsVariable);
+
+      // Remove the initializer from the for loop.
+      accumulator[accumulatorIndex] = 
+          new js.For(null, forLoop.condition, forLoop.update, forLoop.body);
+    }
+
     // Discard the statements that were pulled in the initializer.
     if (accumulatorIndex > 0) {
       accumulator = accumulator.sublist(accumulatorIndex);
@@ -197,10 +226,6 @@
         sourceInformation: node.sourceInformation);
   }
 
-  js.Expression compileConstant(ParameterElement parameter) {
-    return buildConstant(glue.getConstantValueForVariable(parameter));
-  }
-
   js.Expression buildStaticInvoke(Element target,
                                   List<js.Expression> arguments,
                                   {SourceInformation sourceInformation}) {
@@ -333,12 +358,28 @@
 
       // Handle some special checks against classes that exist only in
       // the compile-time class hierarchy, not at runtime.
+      // TODO(sra): Is this correct? The field tests are only valid with the
+      // precondition that [value] is an Array. They will crash on `null`.
       if (clazz == glue.jsExtendableArrayClass) {
+        assert(node.isTypeTest);
         return js.js(r'!#.fixed$length', <js.Expression>[value]);
       } else if (clazz == glue.jsMutableArrayClass) {
+        assert(node.isTypeTest);
         return js.js(r'!#.immutable$list', <js.Expression>[value]);
       }
 
+      if (glue.isStringClass(clazz)) {
+        if (node.isTypeTest) {
+          return js.js(r'typeof # === "string"', <js.Expression>[value]);
+        }
+        // TODO(sra): Implement fast cast via calling 'stringTypeCast'.
+      } else if (glue.isBoolClass(clazz)) {
+        if (node.isTypeTest) {
+          return js.js(r'typeof # === "boolean"', <js.Expression>[value]);
+        }
+        // TODO(sra): Implement fast cast via calling 'boolTypeCast'.
+      }
+
       // The helper we use needs the JSArray class to exist, but for some
       // reason the helper does not cause this dependency to be registered.
       // TODO(asgerf): Most programs need List anyway, but we should fix this.
@@ -512,17 +553,36 @@
     return result;
   }
 
+  js.Expression makeSequence(List<tree_ir.Expression> list) {
+    return list.map(visitExpression).reduce((x,y) => new js.Binary(',', x, y));
+  }
+
   @override
-  void visitWhileCondition(tree_ir.WhileCondition node) {
+  void visitFor(tree_ir.For node) {
     js.Expression condition = visitExpression(node.condition);
     shortBreak.push(node.next);
     shortContinue.push(node);
     fallthrough.push(node);
-    js.Statement jsBody = buildBodyStatement(node.body);
+    js.Statement body = buildBodyStatement(node.body);
     fallthrough.pop();
     shortContinue.pop();
     shortBreak.pop();
-    accumulator.add(insertLabel(node.label, new js.While(condition, jsBody)));
+    js.Statement loopNode;
+    if (node.updates.isEmpty) {
+      loopNode = new js.While(condition, body);
+    } else { // Compile as a for loop.
+      js.Expression init;
+      if (accumulator.isNotEmpty && 
+          accumulator.last is js.ExpressionStatement) {
+        // Take the preceding expression from the accumulator and use
+        // it as the initializer expression.
+        js.ExpressionStatement initStmt = accumulator.removeLast();
+        init = initStmt.expression;
+      }
+      js.Expression update = makeSequence(node.updates);
+      loopNode = new js.For(init, condition, update, body);
+    }
+    accumulator.add(insertLabel(node.label, loopNode));
     visitStatement(node.next);
   }
 
@@ -800,6 +860,8 @@
         return new js.Binary('>', args[0], args[1]);
       case BuiltinOperator.NumGe:
         return new js.Binary('>=', args[0], args[1]);
+      case BuiltinOperator.NumShl:
+        return js.js('(# << #) >>> 0', args);
       case BuiltinOperator.StringConcatenate:
         if (args.isEmpty) return js.string('');
         return args.reduce((e1,e2) => new js.Binary('+', e1, e2));
@@ -817,16 +879,36 @@
       case BuiltinOperator.IsFalsy:
         return new js.Prefix('!', args[0]);
       case BuiltinOperator.IsNumber:
-        return js.js("typeof # === 'number'", args);
+        return js.js('typeof # === "number"', args);
       case BuiltinOperator.IsNotNumber:
-        return js.js("typeof # !== 'number'", args);
+        return js.js('typeof # !== "number"', args);
       case BuiltinOperator.IsFloor:
-        return js.js("Math.floor(#) === #", args);
+        return js.js('Math.floor(#) === #', args);
       case BuiltinOperator.IsNumberAndFloor:
-        return js.js("typeof # === 'number' && Math.floor(#) === #", args);
+        return js.js('typeof # === "number" && Math.floor(#) === #', args);
     }
   }
 
+  /// The JS name of a built-in method.
+  static final Map<BuiltinMethod, String> builtinMethodName = 
+    const <BuiltinMethod, String>{
+      BuiltinMethod.Push: 'push',
+      BuiltinMethod.Pop: 'pop',
+  };
+
+  @override
+  js.Expression visitApplyBuiltinMethod(tree_ir.ApplyBuiltinMethod node) {
+    String name = builtinMethodName[node.method];
+    js.Expression receiver = visitExpression(node.receiver);
+    List<js.Expression> args = visitExpressionList(node.arguments);
+    return js.js('#.#(#)', [receiver, name, args]);
+  }
+
+  @override
+  js.Expression visitAwait(tree_ir.Await node) {
+    return new js.Await(visitExpression(node.input));
+  }
+
   visitFunctionExpression(tree_ir.FunctionExpression node) {
     // FunctionExpressions are currently unused.
     // We might need them if we want to emit raw JS nested functions.
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index 641660b..8472318 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -5,12 +5,25 @@
 library code_generator_dependencies;
 
 import '../js_backend.dart';
-import '../../dart2jslib.dart';
+import '../../common/registry.dart' show
+    Registry;
+import '../../compiler.dart' show
+    Compiler;
+import '../../constants/values.dart';
+import '../../dart_types.dart' show
+    DartType,
+    TypeVariableType,
+    InterfaceType;
+import '../../enqueue.dart' show
+    CodegenEnqueuer;
+import '../../elements/elements.dart';
 import '../../js_emitter/js_emitter.dart';
 import '../../js/js.dart' as js;
-import '../../constants/values.dart';
-import '../../elements/elements.dart';
-import '../../dart_types.dart' show DartType, TypeVariableType, InterfaceType;
+import '../../universe/universe.dart' show
+    Selector;
+import '../../world.dart' show
+    ClassWorld;
+
 
 /// Encapsulates the dependencies of the function-compiler to the compiler,
 /// backend and emitter.
@@ -31,6 +44,8 @@
 
   Glue(this._compiler);
 
+  ClassWorld get classWorld => _compiler.world;
+
   js.Expression constantReference(ConstantValue value) {
     return _emitter.constantReference(value);
   }
@@ -39,6 +54,10 @@
     _compiler.internalError(_compiler.currentElement, message);
   }
 
+  bool isUsedAsMixin(ClassElement classElement) {
+    return classWorld.isUsedAsMixin(classElement);
+  }
+
   ConstantValue getConstantValueForVariable(VariableElement variable) {
     return _backend.constants.getConstantValueForVariable(variable);
   }
@@ -99,6 +118,10 @@
     return _backend.isInterceptedMethod(element);
   }
 
+  bool isInterceptorClass(ClassElement element) {
+    return element.isSubclassOf(_backend.jsInterceptorClass);
+  }
+
   Set<ClassElement> getInterceptedClassesOn(Selector selector) {
     return _backend.getInterceptedClassesOn(selector.name);
   }
@@ -237,4 +260,12 @@
 
   ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass;
   ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
+
+  bool isStringClass(ClassElement classElement) =>
+      classElement == _backend.jsStringClass ||
+      classElement == _compiler.stringClass;
+
+  bool isBoolClass(ClassElement classElement) =>
+      classElement == _backend.jsBoolClass ||
+      classElement == _compiler.boolClass;
 }
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index 14cc633..00cd5b9 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -10,11 +10,18 @@
 import 'unsugar.dart';
 
 import '../js_backend.dart';
+import '../../common/codegen.dart' show
+    CodegenWorkItem;
+import '../../common/tasks.dart' show
+    CompilerTask;
+import '../../compiler.dart' show
+    Compiler;
 import '../../constants/constant_system.dart';
-import '../../dart2jslib.dart';
 import '../../cps_ir/cps_ir_nodes.dart' as cps;
 import '../../cps_ir/cps_ir_integrity.dart';
 import '../../cps_ir/cps_ir_builder_task.dart';
+import '../../diagnostics/invariant.dart' show
+    DEBUG_MODE;
 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir;
 import '../../types/types.dart' show TypeMask, UnionTypeMask, FlatTypeMask,
     ForwardingTypeMask;
@@ -34,11 +41,12 @@
 
 class CpsFunctionCompiler implements FunctionCompiler {
   final ConstantSystem constantSystem;
+  // TODO(karlklose): remove the compiler.
   final Compiler compiler;
   final Glue glue;
   final SourceInformationStrategy sourceInformationFactory;
 
-  // TODO(karlklose,sigurm): remove and update dart-doc of [compile].
+  // TODO(karlklose,sigurdm): remove and update dart-doc of [compile].
   final FunctionCompiler fallbackCompiler;
 
   Tracer get tracer => compiler.tracer;
@@ -56,16 +64,17 @@
 
   String get name => 'CPS Ir pipeline';
 
+  JavaScriptBackend get backend => compiler.backend;
+
   /// Generates JavaScript code for `work.element`.
   js.Fun compile(CodegenWorkItem work) {
     AstElement element = work.element;
     JavaScriptBackend backend = compiler.backend;
     return compiler.withCurrentElement(element, () {
       try {
-        // TODO(karlklose): remove this fallback.
-        // Fallback for a few functions that we know require try-finally and
-        // switch.
-        if (element.isNative) {
+        // TODO(karlklose): remove this fallback when we do not need it for
+        // testing anymore.
+        if (false) {
           compiler.log('Using SSA compiler for platform element $element');
           return fallbackCompiler.compile(work);
         }
@@ -97,11 +106,6 @@
   }
 
   cps.FunctionDefinition compileToCpsIR(AstElement element) {
-    // TODO(sigurdm): Support these constructs.
-    if (element.isNative) {
-      giveUp('unsupported element kind: ${element.name}:${element.kind}');
-    }
-
     cps.FunctionDefinition cpsNode = irBuilderTask.buildNode(element);
     if (cpsNode == null) {
       if (irBuilderTask.bailoutMessage == null) {
@@ -166,9 +170,11 @@
       assert(checkCpsIntegrity(cpsNode));
     }
 
-    TypePropagator typePropagator = new TypePropagator(compiler);
+    TypePropagator typePropagator = new TypePropagator(compiler, this);
     applyCpsPass(typePropagator);
     dumpTypedIR(cpsNode, typePropagator);
+    applyCpsPass(new LoopInvariantCodeMotion());
+    applyCpsPass(new ShareInterceptors());
     applyCpsPass(new ShrinkingReducer());
     applyCpsPass(new MutableVariableEliminator());
     applyCpsPass(new RedundantJoinEliminator());
@@ -213,7 +219,13 @@
   js.Fun compileToJavaScript(CodegenWorkItem work,
                              tree_ir.FunctionDefinition definition) {
     CodeGenerator codeGen = new CodeGenerator(glue, work.registry);
-    return attachPosition(codeGen.buildFunction(definition), work.element);
+    Element element = work.element;
+    js.Fun code = codeGen.buildFunction(definition);
+    if (element is FunctionElement && element.asyncMarker != AsyncMarker.SYNC) {
+      code = backend.rewriteAsync(element, code);
+      work.registry.registerAsyncMarker(element);
+    }
+    return attachPosition(code, element);
   }
 
   Iterable<CompilerTask> get tasks {
diff --git a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
index 01ebde7..9913065 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
@@ -7,7 +7,7 @@
 import '../../elements/elements.dart';
 import '../../io/source_information.dart';
 import '../../js_backend/codegen/glue.dart';
-import '../../dart2jslib.dart' show Selector, World;
+import '../../universe/universe.dart' show Selector;
 import '../../cps_ir/cps_ir_builder.dart' show ThisParameterLocal;
 
 class ExplicitReceiverParameterEntity implements Local {
@@ -43,8 +43,6 @@
   Parameter thisParameter;
   Parameter explicitReceiverParameter;
 
-  Map<Primitive, Interceptor> interceptors = <Primitive, Interceptor>{};
-
   // In a catch block, rethrow implicitly throws the block's exception
   // parameter.  This is the exception parameter when nested in a catch
   // block and null otherwise.
@@ -52,7 +50,15 @@
 
   UnsugarVisitor(this._glue);
 
+  bool methodUsesReceiverArgument(FunctionElement function) {
+    assert(_glue.isInterceptedMethod(function));
+    ClassElement clazz = function.enclosingClass.declaration;
+    return _glue.isInterceptorClass(clazz) || 
+           _glue.isUsedAsMixin(clazz);
+  }
+
   void rewrite(FunctionDefinition function) {
+    thisParameter = function.thisParameter;
     bool inInterceptedMethod = _glue.isInterceptedMethod(function.element);
 
     if (function.element.name == '==' &&
@@ -64,7 +70,6 @@
     }
 
     if (inInterceptedMethod) {
-      thisParameter = function.thisParameter;
       ThisParameterLocal holder = thisParameter.hint;
       explicitReceiverParameter = new Parameter(
           new ExplicitReceiverParameterEntity(
@@ -75,7 +80,7 @@
     // Set all parent pointers.
     _parentVisitor.visit(function);
 
-    if (inInterceptedMethod) {
+    if (inInterceptedMethod && methodUsesReceiverArgument(function.element)) {
       explicitReceiverParameter.substituteFor(thisParameter);
     }
 
@@ -226,34 +231,6 @@
     // worry about unlinking.
   }
 
-  /// Returns an interceptor for the given value, capable of responding to
-  /// [selector].
-  ///
-  /// A single getInterceptor call will be created per primitive, bound
-  /// immediately after the primitive is bound.
-  ///
-  /// The type propagation pass will later narrow the set of interceptors
-  /// based on the input type, and the let sinking pass will propagate the
-  /// getInterceptor call closer to its use when this is profitable.
-  Interceptor getInterceptorFor(Primitive prim, Selector selector,
-                                SourceInformation sourceInformation) {
-    assert(prim is! Interceptor);
-    Interceptor interceptor = interceptors[prim];
-    if (interceptor == null) {
-      interceptor = new Interceptor(prim, sourceInformation);
-      interceptors[prim] = interceptor;
-      InteriorNode parent = prim.parent;
-      insertLetPrim(interceptor, parent.body);
-      if (prim.hint != null) {
-        interceptor.hint = new InterceptorEntity(prim.hint);
-      }
-    }
-    // Add the interceptor classes that can respond to the given selector.
-    interceptor.interceptedClasses.addAll(
-        _glue.getInterceptedClassesOn(selector));
-    return interceptor;
-  }
-
   processInvokeMethod(InvokeMethod node) {
     Selector selector = node.selector;
     if (!_glue.isInterceptedSelector(selector)) return;
@@ -267,32 +244,62 @@
       //  Change 'receiver.foo()'  to  'this.foo(receiver)'.
       newReceiver = thisParameter;
     } else {
-      newReceiver = getInterceptorFor(
-          receiver, node.selector, node.sourceInformation);
+      LetCont contBinding = node.parent;
+      newReceiver = new Interceptor(receiver, node.sourceInformation)
+          ..interceptedClasses.addAll(_glue.getInterceptedClassesOn(selector));
+      if (receiver.hint != null) {
+        newReceiver.hint = new InterceptorEntity(receiver.hint);
+      }
+      insertLetPrim(newReceiver, contBinding);
     }
-
     node.arguments.insert(0, node.receiver);
     node.receiver = new Reference<Primitive>(newReceiver);
   }
 
   processInvokeMethodDirectly(InvokeMethodDirectly node) {
-    if (_glue.isInterceptedMethod(node.target)) {
-      Primitive nullPrim = nullConstant;
-      insertLetPrim(nullPrim, node);
-      node.arguments.insert(0, node.receiver);
-      // TODO(sra): `null` is not adequate.  Interceptors project the class
-      // hierarchy onto an interceptor hierarchy.  A super call that does a
-      // method call will use the javascript 'this' parameter to avoid calling
-      // getInterceptor again, so the receiver must be the interceptor (likely
-      // `this`), not `null`.
-      node.receiver = new Reference<Primitive>(nullPrim);
+    if (!_glue.isInterceptedMethod(node.target)) return;
+
+    Selector selector = node.selector;
+    Primitive receiver = node.receiver.definition;
+    Primitive newReceiver;
+
+    if (receiver == explicitReceiverParameter) {
+      // If the receiver is the explicit receiver, we are calling a method in
+      // the same interceptor:
+      //  Change 'receiver.foo()'  to  'this.foo(receiver)'.
+      newReceiver = thisParameter;
+    } else {
+      LetCont contBinding = node.parent;
+      newReceiver = new Interceptor(receiver, node.sourceInformation)
+        ..interceptedClasses.addAll(_glue.getInterceptedClassesOn(selector));
+      if (receiver.hint != null) {
+        newReceiver.hint = new InterceptorEntity(receiver.hint);
+      }
+      insertLetPrim(newReceiver, contBinding);
     }
+    node.arguments.insert(0, node.receiver);
+    node.receiver = new Reference<Primitive>(newReceiver);
   }
 
   processBranch(Branch node) {
     // TODO(karlklose): implement the checked mode part of boolean conversion.
     InteriorNode parent = node.parent;
     IsTrue condition = node.condition;
+
+    // Do not rewrite conditions that are foreign code.
+    // It is redundant, and causes infinite recursion (if not optimized)
+    // in the implementation of identical, which itself contains a condition.
+    Primitive value = condition.value.definition;
+    if (value is Parameter && value.parent is Continuation) {
+      Continuation cont = value.parent;
+      if (cont.hasExactlyOneUse && cont.firstRef.parent is ForeignCode) {
+        ForeignCode foreign = cont.firstRef.parent;
+        if (foreign.type.containsOnlyBool(_glue.classWorld)) {
+          return;
+        }
+      }
+    }
+
     Primitive t = trueConstant;
     Primitive i = new ApplyBuiltinOperator(
         BuiltinOperator.Identical,
diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
index 57ae567..9bc3a86 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -44,12 +44,21 @@
   @override
   ConstantExpression compileConstant(VariableElement element) {
     return measure(() {
+      // TODO(het): Only report errors from one of the constant compilers
       ConstantExpression result = dartConstantCompiler.compileConstant(element);
       jsConstantCompiler.compileConstant(element);
       return result;
     });
   }
 
+  @override
+  void evaluate(ConstantExpression constant) {
+    return measure(() {
+      dartConstantCompiler.evaluate(constant);
+      jsConstantCompiler.evaluate(constant);
+    });
+  }
+
   void compileVariable(VariableElement element) {
     measure(() {
       jsConstantCompiler.compileVariable(element);
@@ -118,12 +127,13 @@
 
   ConstantExpression compileVariableWithDefinitions(VariableElement element,
                                           TreeElements definitions,
-                                          {bool isConst: false}) {
+                                          {bool isConst: false,
+                                           bool checkType: true}) {
     if (!isConst && lazyStatics.contains(element)) {
       return null;
     }
     ConstantExpression value = super.compileVariableWithDefinitions(
-        element, definitions, isConst: isConst);
+        element, definitions, isConst: isConst, checkType: checkType);
     if (!isConst && value == null) {
       lazyStatics.add(element);
     }
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
index c79c5b6..3ebe90f6 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -4,11 +4,11 @@
 
 library dart2js.constant_system.js;
 
+import '../compiler.dart' show Compiler;
 import '../constants/constant_system.dart';
 import '../constants/values.dart';
 import '../constant_system_dart.dart';
 import '../dart_types.dart';
-import '../dart2jslib.dart' show Compiler;
 import '../elements/elements.dart' show ClassElement;
 import '../tree/tree.dart' show DartString, LiteralDartString;
 import 'js_backend.dart';
diff --git a/pkg/compiler/lib/src/js_backend/js_backend.dart b/pkg/compiler/lib/src/js_backend/js_backend.dart
index 8608f00..9f2e82e 100644
--- a/pkg/compiler/lib/src/js_backend/js_backend.dart
+++ b/pkg/compiler/lib/src/js_backend/js_backend.dart
@@ -11,13 +11,44 @@
 import 'package:js_runtime/shared/embedded_names.dart' show JsGetName;
 
 import '../closure.dart';
+import '../common/backend_api.dart' show
+    Backend;
+import '../common/codegen.dart' show
+    CodegenRegistry,
+    CodegenWorkItem;
+import '../common/names.dart' show
+    Identifiers,
+    Selectors,
+    Uris;
+import '../common/registry.dart' show
+    Registry;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../common/resolution.dart' show
+    ResolutionCallbacks;
+import '../common/work.dart' show
+    ItemCompilationContext;
+import '../compiler.dart' show
+    Compiler;
 import '../compile_time_constants.dart';
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart';
-import '../dart2jslib.dart';
 import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show MessageKind;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE,
+    Spannable,
+    SpannableAssertionFailure;
 import '../elements/elements.dart';
+import '../elements/visitor.dart' show
+    BaseElementVisitor;
+import '../enqueue.dart' show
+    Enqueuer,
+    ResolutionEnqueuer,
+    WorldImpact;
 import '../io/code_output.dart';
 import '../io/source_information.dart' show
     SourceInformationStrategy,
@@ -30,25 +61,31 @@
 import '../js/js.dart' show js;
 import '../js/js_source_mapping.dart' show
     JavaScriptSourceInformationStrategy;
-import '../js_emitter/js_emitter.dart'
-    show ClassBuilder, CodeEmitterTask, Emitter, MetadataCollector, Placeholder,
-        TokenFinalizer, USE_LAZY_EMITTER;
-
+import '../js/rewrite_async.dart';
+import '../js_emitter/js_emitter.dart' show
+    ClassBuilder,
+    CodeEmitterTask,
+    Emitter,
+    MetadataCollector,
+    Placeholder,
+    TokenFinalizer,
+    USE_LAZY_EMITTER;
 import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
 import '../native/native.dart' as native;
+import '../resolution/registry.dart' show
+    ResolutionRegistry;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../ssa/ssa.dart';
 import '../tree/tree.dart';
 import '../types/types.dart';
 import '../universe/universe.dart';
 import '../util/characters.dart';
 import '../util/util.dart';
+import '../world.dart' show
+    ClassWorld;
 
-import '../elements/visitor.dart' show
-    BaseElementVisitor;
-
-import '../js_backend/codegen/task.dart';
-import '../resolution/resolution.dart' show ResolutionRegistry;
-
+import 'codegen/task.dart';
 import 'constant_system_javascript.dart';
 import 'patch_resolver.dart';
 
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index ad7f725..6156b27 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -460,14 +460,14 @@
   String get deferredTypesName => 'deferredTypes';
   String get isolateName => 'Isolate';
   String get isolatePropertiesName => r'$isolateProperties';
-  jsAst.Name get noSuchMethodName => publicInstanceMethodNameByArity(
-      Compiler.NO_SUCH_METHOD, Compiler.NO_SUCH_METHOD_ARG_COUNT);
+  jsAst.Name get noSuchMethodName => invocationName(Selectors.noSuchMethod_);
+
   /**
    * Some closures must contain their name. The name is stored in
    * [STATIC_CLOSURE_NAME_NAME].
    */
   String get STATIC_CLOSURE_NAME_NAME => r'$name';
-  String get closureInvocationSelectorName => Compiler.CALL_OPERATOR_NAME;
+  String get closureInvocationSelectorName => Identifiers.call;
   bool get shouldMinify => false;
 
   /// Returns the string that is to be used as the result of a call to
@@ -520,6 +520,14 @@
     }
   }
 
+  /// Return a reference to the given [name].
+  ///
+  /// This is used to ensure that every use site of a name has a unique node so
+  /// that we can properly attribute source information.
+  jsAst.Name _newReference(jsAst.Name name) {
+    return new _NameReference(name);
+  }
+
   /// Disambiguated name for [constant].
   ///
   /// Unique within the global-member namespace.
@@ -534,7 +542,7 @@
       result = getFreshName(NamingScope.constant, longName);
       constantNames[constant] = result;
     }
-    return result;
+    return _newReference(result);
   }
 
   /// Proposed name for [constant].
@@ -625,13 +633,6 @@
     return invocationName(new Selector.fromElement(method));
   }
 
-  /// Annotated name for a public method with the given [originalName]
-  /// and [arity] and no named parameters.
-  jsAst.Name publicInstanceMethodNameByArity(String originalName,
-                                             int arity) {
-    return invocationName(new Selector.call(originalName, null, arity));
-  }
-
   /// Returns the annotated name for a variant of `call`.
   /// The result has the form:
   ///
@@ -694,7 +695,7 @@
 
       case SelectorKind.CALL:
         List<String> suffix = callSuffixForStructure(selector.callStructure);
-        if (selector.name == Compiler.CALL_OPERATOR_NAME) {
+        if (selector.name == Identifiers.call) {
           // Derive the annotated name for this variant of 'call'.
           return deriveCallMethodName(suffix);
         }
@@ -855,7 +856,7 @@
       newName = getFreshName(NamingScope.global, name);
       internalGlobals[name] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   /// Returns the property name to use for a compiler-owner global variable,
@@ -902,7 +903,7 @@
       newName = getFreshName(NamingScope.global, proposedName);
       userGlobals[element] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   /// Returns the disambiguated name for an instance method or field
@@ -943,7 +944,7 @@
                              sanitizeForAnnotations: true);
       userInstanceMembers[key] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   /// Returns the disambiguated name for the instance member identified by
@@ -966,7 +967,7 @@
                              sanitizeForAnnotations: true);
       userInstanceMembers[key] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   /// Forces the public instance member with [originalName] to have the given
@@ -1006,7 +1007,7 @@
                              sanitizeForNatives: mayClashNative);
       internalInstanceMembers[element] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   /// Disambiguated name for the given operator.
@@ -1021,7 +1022,7 @@
       newName = getFreshName(NamingScope.instance, operatorIdentifier);
       userInstanceOperators[operatorIdentifier] = newName;
     }
-    return newName;
+    return _newReference(newName);
   }
 
   String _generateFreshStringForName(String proposedName,
diff --git a/pkg/compiler/lib/src/js_backend/namer_names.dart b/pkg/compiler/lib/src/js_backend/namer_names.dart
index 3d0e1f3..5d6eae3 100644
--- a/pkg/compiler/lib/src/js_backend/namer_names.dart
+++ b/pkg/compiler/lib/src/js_backend/namer_names.dart
@@ -6,6 +6,7 @@
 
 abstract class _NamerName extends jsAst.Name {
   int get _kind;
+  _NamerName get _target => this;
 
   toString() => throw new UnsupportedError("Cannot convert a name to a string");
 }
@@ -28,6 +29,7 @@
   String get key => name;
 
   operator==(other) {
+    if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     return (other is StringBackedName) && other.name == name;
   }
@@ -35,6 +37,7 @@
   int get hashCode => name.hashCode;
 
   int compareTo(_NamerName other) {
+    other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
     return name.compareTo(other.name);
   }
@@ -54,6 +57,7 @@
   String get key => prefix.key + base.key;
 
   bool operator==(other) {
+    if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     if (other is! _PrefixedName) return false;
     return other.base == base && other.prefix == prefix;
@@ -62,6 +66,7 @@
   int get hashCode => base.hashCode * 13 + prefix.hashCode;
 
   int compareTo(_NamerName other) {
+    other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
     _PrefixedName otherSameKind = other;
     int result = prefix.compareTo(otherSameKind.prefix);
@@ -116,6 +121,7 @@
   String get key => _parts.map((_NamerName name) => name.key).join();
 
   bool operator==(other) {
+    if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     if (other is! CompoundName) return false;
     if (other._parts.length != _parts.length) return false;
@@ -136,6 +142,7 @@
   }
 
   int compareTo(_NamerName other) {
+    other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
     CompoundName otherSameKind = other;
     if (otherSameKind._parts.length != _parts.length) {
@@ -167,6 +174,7 @@
 
   @override
   int compareTo(_NamerName other) {
+    other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
     TokenName otherToken = other;
     return key.compareTo(otherToken.key);
@@ -174,8 +182,40 @@
 
   markSeen(jsAst.TokenCounter counter) => _rc++;
 
+  @override
+  bool operator==(other) {
+    if (other is _NameReference) other = other._target;
+    if (identical(this, other)) return true;
+    return false;
+  }
+
+  @override
+  int get hashCode => super.hashCode;
+
   finalize() {
     assert(!isFinalized);
     _name = _scope.getNextName();
   }
+}
+
+class _NameReference extends _NamerName implements jsAst.AstContainer {
+  _NamerName _target;
+
+  int get _kind => _target._kind;
+  String get key => _target.key;
+
+  Iterable<jsAst.Node> get containedNodes => [_target];
+
+  _NameReference(this._target);
+
+  String get name => _target.name;
+
+  @override
+  int compareTo(_NamerName other) => _target.compareTo(other);
+
+  @override
+  bool operator==(other) => _target == other;
+
+  @override
+  int get hashCode => _target.hashCode;
 }
\ No newline at end of file
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 38d4704..eb4f42c5 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -104,7 +104,7 @@
   /// implementation. An implementation is complex if it falls into
   /// category C, as described above.
   bool isComplex(FunctionElement element) {
-    assert(element.name == Compiler.NO_SUCH_METHOD);
+    assert(element.name == Identifiers.noSuchMethod_);
     return otherImpls.contains(element);
   }
 
@@ -119,7 +119,7 @@
   }
 
   NsmCategory _categorizeImpl(FunctionElement element) {
-    assert(element.name == Compiler.NO_SUCH_METHOD);
+    assert(element.name == Identifiers.noSuchMethod_);
     if (defaultImpls.contains(element)) {
       return NsmCategory.DEFAULT;
     }
@@ -129,7 +129,7 @@
     if (otherImpls.contains(element)) {
       return NsmCategory.OTHER;
     }
-    if (!_compiler.noSuchMethodSelector.signatureApplies(element)) {
+    if (!Selectors.noSuchMethod_.signatureApplies(element)) {
       otherImpls.add(element);
       return NsmCategory.OTHER;
     }
@@ -140,7 +140,7 @@
       // If the implementation is 'noSuchMethod(x) => super.noSuchMethod(x);'
       // then it is in the same category as the super call.
       Element superCall = element.enclosingClass
-          .lookupSuperByName(_compiler.noSuchMethodSelector.memberName);
+          .lookupSuperByName(Selectors.noSuchMethod_.memberName);
       NsmCategory category = _categorizeImpl(superCall);
       switch(category) {
         case NsmCategory.DEFAULT:
@@ -190,7 +190,7 @@
     if (expr is Send &&
         expr.isSuperCall &&
         expr.selector is Identifier &&
-        (expr.selector as Identifier).source == Compiler.NO_SUCH_METHOD) {
+        (expr.selector as Identifier).source == Identifiers.noSuchMethod_) {
       var arg = expr.arguments.head;
       if (expr.arguments.tail.isEmpty &&
           arg is Send &&
diff --git a/pkg/compiler/lib/src/js_backend/patch_resolver.dart b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
index 166490f..aea3cbf 100644
--- a/pkg/compiler/lib/src/js_backend/patch_resolver.dart
+++ b/pkg/compiler/lib/src/js_backend/patch_resolver.dart
@@ -4,8 +4,14 @@
 
 library dart2js.js_backend.patch_resolver;
 
-import '../dart2jslib.dart';
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
 import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show MessageKind;
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
 import '../tree/tree.dart';
diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
index 53e1130..f293870 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -167,7 +167,7 @@
     jsAst.Name methodName = namer.asName(selector.invocationMirrorMemberName);
     jsAst.Name internalName = namer.invocationMirrorInternalName(selector);
 
-    assert(backend.isInterceptedName(Compiler.NO_SUCH_METHOD));
+    assert(backend.isInterceptedName(Identifiers.noSuchMethod_));
     bool isIntercepted = backend.isInterceptedName(selector.name);
     jsAst.Expression expression =
         js('''this.#noSuchMethodName(#receiver,
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
index 10e27921..b6b04b8 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
@@ -422,8 +422,10 @@
                                                     ClassBuilder builder,
                                                     {bool isGetter}) {
     Selector selector = isGetter
-        ? new Selector.getter(member.name, member.library)
-        : new Selector.setter(member.name, member.library);
+        ? new Selector.getter(
+            new Name(member.name, member.library))
+        : new Selector.setter(
+            new Name(member.name, member.library, isSetter: true));
     String reflectionName = emitter.getReflectionName(selector, name);
     if (reflectionName != null) {
       var reflectable =
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 319bc72..6a5716b 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -26,10 +26,16 @@
 
 import '../../deferred_load.dart' show OutputUnit;
 
+import '../../diagnostics/messages.dart' show MessageKind;
+
+import '../../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
+
 import '../../elements/elements.dart' show
     ConstructorBodyElement,
     ElementKind,
     FieldElement,
+    Name,
     ParameterElement,
     TypeVariableElement,
     MethodElement,
@@ -78,7 +84,6 @@
     relativize;
 
 import '../../util/util.dart' show
-    NO_LOCATION_SPANNABLE,
     equalElements;
 
 part 'class_builder.dart';
@@ -802,9 +807,11 @@
 
   jsAst.Statement buildConstantInitializer(ConstantValue constant) {
     jsAst.Name name = namer.constantName(constant);
-    return js.statement('#.# = #',
+    jsAst.Statement initializer = js.statement('#.# = #',
                         [namer.globalObjectForConstant(constant), name,
                          constantInitializerExpression(constant)]);
+    compiler.dumpInfoTask.registerConstantAst(constant, initializer);
+    return initializer;
   }
 
   jsAst.Expression constantListGenerator(jsAst.Expression array) {
diff --git a/pkg/compiler/lib/src/js_emitter/headers.dart b/pkg/compiler/lib/src/js_emitter/headers.dart
index 7906dd9..67fd4a2 100644
--- a/pkg/compiler/lib/src/js_emitter/headers.dart
+++ b/pkg/compiler/lib/src/js_emitter/headers.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 library dart2js.js_emitter.headers;
-import '../dart2jslib.dart' show Compiler;
+import '../compiler.dart' show Compiler;
 
 String generatedBy(Compiler compiler, {String flavor: ""}) {
   String suffix = '';
diff --git a/pkg/compiler/lib/src/js_emitter/js_emitter.dart b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
index fff722e..b46e60d 100644
--- a/pkg/compiler/lib/src/js_emitter/js_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/js_emitter.dart
@@ -6,6 +6,9 @@
 
 import '../common.dart';
 
+import '../common/names.dart' show
+    Identifiers;
+
 import '../constants/values.dart';
 
 import '../closure.dart' show
@@ -17,6 +20,9 @@
 import '../dart_types.dart' show
     TypedefType;
 
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
+
 import '../elements/elements.dart' show
     ConstructorBodyElement,
     ElementKind,
@@ -59,7 +65,6 @@
     TypedSelector;
 
 import '../util/util.dart' show
-    NO_LOCATION_SPANNABLE,
     Setlet;
 
 import '../deferred_load.dart' show
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
index 810b678..d68c38b 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
@@ -26,7 +26,7 @@
 import '../js_emitter.dart' as emitterTask show
     Emitter;
 
-import '../../util/util.dart' show
+import '../../diagnostics/spannable.dart' show
     NO_LOCATION_SPANNABLE;
 
 class Emitter implements emitterTask.Emitter {
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
index b97a47e..ad3b1cb 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart
@@ -4,9 +4,14 @@
 
 library dart2js.js_emitter.lazy_emitter.model_emitter;
 
-import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
-import '../../dart2jslib.dart' show Compiler;
-import '../../elements/elements.dart' show ClassElement, FunctionElement;
+import '../../compiler.dart' show
+    Compiler;
+import '../../constants/values.dart' show
+    ConstantValue,
+    FunctionConstantValue;
+import '../../elements/elements.dart' show
+    ClassElement,
+    FunctionElement;
 import '../../js/js.dart' as js;
 import '../../js_backend/js_backend.dart' show
     JavaScriptBackend,
@@ -129,13 +134,14 @@
   int emitProgram(Program program) {
     List<Fragment> fragments = program.fragments;
     MainFragment mainFragment = fragments.first;
+    Iterable<Fragment> deferredFragments = program.deferredFragments;
 
     int totalSize = 0;
 
     // We have to emit the deferred fragments first, since we need their
     // deferred hash (which depends on the output) when emitting the main
     // fragment.
-    List<js.Expression> fragmentsCode = fragments.skip(1).map(
+    List<js.Expression> fragmentsCode = deferredFragments.map(
             (DeferredFragment deferredUnit) {
       js.Expression types =
           program.metadataTypesForOutputUnit(deferredUnit.outputUnit);
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index b5e1a57..80ad3f1 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -213,10 +213,10 @@
     // [Function] and needs checks for all typedefs that are used in is-checks.
     if (checkedClasses.contains(compiler.functionClass) ||
         checkedFunctionTypes.isNotEmpty) {
-      Element call = cls.lookupLocalMember(Compiler.CALL_OPERATOR_NAME);
+      Element call = cls.lookupLocalMember(Identifiers.call);
       if (call == null) {
         // If [cls] is a closure, it has a synthetic call operator method.
-        call = cls.lookupBackendMember(Compiler.CALL_OPERATOR_NAME);
+        call = cls.lookupBackendMember(Identifiers.call);
       }
       if (call != null && call.isFunction) {
         FunctionElement callFunction = call;
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index a3f2a13..45ccabe 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -18,8 +18,8 @@
 import '../../js/js.dart' as js;
 
 import '../../js_backend/js_backend.dart' show
-JavaScriptBackend,
-Namer;
+    JavaScriptBackend,
+    Namer;
 
 import '../js_emitter.dart' show
     NativeEmitter;
@@ -27,7 +27,7 @@
 import '../js_emitter.dart' as emitterTask show
     Emitter;
 
-import '../../util/util.dart' show
+import '../../diagnostics/spannable.dart' show
     NO_LOCATION_SPANNABLE;
 
 class Emitter implements emitterTask.Emitter {
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
index c4e0012..aa2de77 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart
@@ -52,7 +52,8 @@
 // The code relies on the fact that all Dart code is inside holders. As such
 // we can use "global" names however we want. As long as we don't shadow
 // JavaScript variables (like `Array`) we are free to chose whatever variable
-// names we want. Furthermore, the minifier reduces the names of the variables.
+// names we want. Furthermore, the pretty-printer minifies local variables, thus
+// reducing their size.
 const String mainBoilerplate = '''
 {
 // Declare deferred-initializer global, which is used to keep track of the
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index da22c61..8ce9e34 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -9,7 +9,10 @@
 import '../../common.dart';
 
 import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
-import '../../dart2jslib.dart' show Compiler;
+import '../../compiler.dart' show Compiler;
+import '../../diagnostics/messages.dart' show
+    MessageKind;
+
 import '../../elements/elements.dart' show ClassElement, FunctionElement;
 import '../../hash/sha1.dart' show Hasher;
 
@@ -28,7 +31,7 @@
     Namer,
     ConstantEmitter;
 
-import '../../util/util.dart' show
+import '../../diagnostics/spannable.dart' show
     NO_LOCATION_SPANNABLE;
 
 import '../../util/uri_extras.dart' show
@@ -164,7 +167,7 @@
   int emitProgram(Program program) {
     MainFragment mainFragment = program.fragments.first;
     List<DeferredFragment> deferredFragments =
-        new List<DeferredFragment>.from(program.fragments.skip(1));
+        new List<DeferredFragment>.from(program.deferredFragments);
 
     FragmentEmitter fragmentEmitter =
         new FragmentEmitter(compiler, namer, backend, constantEmitter, this);
@@ -214,7 +217,7 @@
     if (compiler.deferredMapUri != null) {
       writeDeferredMap();
     }
-    
+
     // Return the total program size.
     return outputBuffers.values.fold(0, (a, b) => a + b.length);
   }
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 9919cee..62ad6c6 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -6,31 +6,31 @@
 
 import 'dart:async';
 
-import 'dart2jslib.dart' show
-    Compiler,
-    CompilerTask,
-    DiagnosticListener,
-    MessageKind,
-    Script,
+import 'common/names.dart' show
+    Uris;
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'compiler.dart' show
+    Compiler;
+import 'diagnostics/diagnostic_listener.dart';
+import 'diagnostics/invariant.dart' show
     invariant;
-
+import 'diagnostics/messages.dart' show
+    MessageKind;
 import 'elements/elements.dart' show
     CompilationUnitElement,
     Element,
     LibraryElement,
     PrefixElement;
-
 import 'elements/modelx.dart' show
     CompilationUnitElementX,
     DeferredLoaderGetterElementX,
     ErroneousElementX,
     LibraryElementX,
     PrefixElementX;
-
 import 'native/native.dart' as native;
-
+import 'script.dart';
 import 'tree/tree.dart';
-
 import 'util/util.dart' show
     Link,
     LinkBuilder;
@@ -413,8 +413,8 @@
         checkDuplicatedLibraryName(library);
 
         // Import dart:core if not already imported.
-        if (!importsDartCore && library.canonicalUri != Compiler.DART_CORE) {
-          return createLibrary(handler, null, Compiler.DART_CORE)
+        if (!importsDartCore && library.canonicalUri != Uris.dart_core) {
+          return createLibrary(handler, null, Uris.dart_core)
               .then((LibraryElement coreLibrary) {
             handler.registerDependency(library, null, coreLibrary);
           });
diff --git a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart b/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
index 7f89b3c..9be4b75 100644
--- a/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
+++ b/pkg/compiler/lib/src/mirror_renamer/mirror_renamer.dart
@@ -4,7 +4,7 @@
 
 library mirror_renamer;
 
-import '../dart2jslib.dart' show Script, Compiler;
+import '../compiler.dart' show Compiler;
 import '../tree/tree.dart';
 import '../scanner/scannerlib.dart' show Token;
 import '../elements/elements.dart';
diff --git a/pkg/compiler/lib/src/mirrors/analyze.dart b/pkg/compiler/lib/src/mirrors/analyze.dart
index 96dc594..733cbae 100644
--- a/pkg/compiler/lib/src/mirrors/analyze.dart
+++ b/pkg/compiler/lib/src/mirrors/analyze.dart
@@ -10,7 +10,7 @@
 import 'dart2js_mirrors.dart' show Dart2JsMirrorSystem;
 import '../../compiler.dart' as api;
 import '../apiimpl.dart' as apiimpl;
-import '../dart2jslib.dart' show Compiler;
+import '../compiler.dart' show Compiler;
 import '../old_to_new_api.dart';
 
 //------------------------------------------------------------------------------
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
index 5bf4b1e..df44e28 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_mirrors.dart
@@ -6,13 +6,22 @@
 
 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView;
 
+import '../compiler.dart' show
+    Compiler;
 import '../constants/expressions.dart';
 import '../constants/values.dart';
-import '../elements/elements.dart';
-import '../scanner/scannerlib.dart';
-import '../resolution/resolution.dart' show Scope;
-import '../dart2jslib.dart';
 import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/source_span.dart' show
+    SourceSpan;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
+import '../elements/elements.dart';
+import '../resolution/scope.dart' show
+    Scope;
+import '../scanner/scannerlib.dart';
+import '../script.dart';
 import '../tree/tree.dart';
 import '../util/util.dart'
     show Link,
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index ec535c7..fac0234 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -4,8 +4,12 @@
 
 library dart2js.mirrors_used;
 
+import 'common/tasks.dart' show
+    CompilerTask;
 import 'compile_time_constants.dart' show
     ConstantCompiler;
+import 'compiler.dart' show
+    Compiler;
 import 'constants/expressions.dart';
 import 'constants/values.dart' show
     ConstantValue,
@@ -13,19 +17,14 @@
     ListConstantValue,
     StringConstantValue,
     TypeConstantValue;
-
 import 'dart_types.dart' show
     DartType,
     InterfaceType,
     TypeKind;
-
-import 'dart2jslib.dart' show
-    Compiler,
-    CompilerTask,
-    MessageKind,
-    TreeElements,
-    invariant;
-
+import 'diagnostics/messages.dart' show
+    MessageKind;
+import 'diagnostics/spannable.dart' show
+    Spannable;
 import 'elements/elements.dart' show
     ClassElement,
     Element,
@@ -33,7 +32,8 @@
     MetadataAnnotation,
     ScopeContainerElement,
     VariableElement;
-
+import 'resolution/tree_elements.dart' show
+    TreeElements;
 import 'tree/tree.dart' show
     Import,
     LibraryTag,
@@ -41,10 +41,6 @@
     NewExpression,
     Node;
 
-import 'util/util.dart' show
-    Link,
-    Spannable;
-
 /**
  * Compiler task that analyzes MirrorsUsed annotations.
  *
diff --git a/pkg/compiler/lib/src/native/native.dart b/pkg/compiler/lib/src/native/native.dart
index 4a32a52..281009d 100644
--- a/pkg/compiler/lib/src/native/native.dart
+++ b/pkg/compiler/lib/src/native/native.dart
@@ -6,16 +6,30 @@
 
 import 'dart:collection' show Queue;
 
+import '../common/registry.dart' show
+    Registry;
+import '../compiler.dart' show
+    Compiler;
 import '../constants/values.dart';
-import '../dart2jslib.dart';
 import '../dart_types.dart';
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/messages.dart' show MessageKind;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE,
+    Spannable;
+import '../enqueue.dart' show
+    Enqueuer,
+    ResolutionEnqueuer;
 import '../elements/elements.dart';
-import '../elements/modelx.dart'
-    show ElementX, BaseClassElementX, FunctionElementX, LibraryElementX;
+import '../elements/modelx.dart' show
+    BaseClassElementX,
+    ElementX,
+    FunctionElementX,
+    LibraryElementX;
 import '../js/js.dart' as js;
 import '../js_backend/js_backend.dart';
 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
-import '../resolution/resolution.dart' show ResolverVisitor;
+import '../resolution/members.dart' show ResolverVisitor;
 import '../scanner/scannerlib.dart';
 import '../ssa/ssa.dart';
 import '../tree/tree.dart';
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index c3bb16d7..52d0c62 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -4,11 +4,20 @@
 
 library ordered_typeset;
 
-import 'dart2jslib.dart' show Compiler, MessageKind, invariant;
+import 'compiler.dart' show
+    Compiler;
 import 'dart_types.dart';
-import 'elements/elements.dart' show ClassElement;
-import 'util/util.dart' show Link, LinkBuilder;
-import 'util/util_implementation.dart' show LinkEntry;
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'diagnostics/messages.dart' show
+    MessageKind;
+import 'elements/elements.dart' show
+    ClassElement;
+import 'util/util.dart' show
+    Link,
+    LinkBuilder;
+import 'util/util_implementation.dart' show
+    LinkEntry;
 
 /**
  * An ordered set of the supertypes of a class. The supertypes of a class are
diff --git a/pkg/compiler/lib/src/patch_parser.dart b/pkg/compiler/lib/src/patch_parser.dart
index a639a58..0631b16 100644
--- a/pkg/compiler/lib/src/patch_parser.dart
+++ b/pkg/compiler/lib/src/patch_parser.dart
@@ -116,23 +116,27 @@
 
 import 'dart:async';
 
-import 'constants/values.dart' show ConstantValue;
-import 'dart2jslib.dart'
-    show Compiler,
-         CompilerTask,
-         DiagnosticListener,
-         MessageKind,
-         Script;
+import 'constants/values.dart' show
+    ConstantValue;
+import 'compiler.dart' show
+    Compiler;
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'diagnostics/diagnostic_listener.dart';
+import 'diagnostics/messages.dart' show
+    MessageKind;
 import 'elements/elements.dart';
-import 'elements/modelx.dart'
-    show BaseFunctionElementX,
-         ClassElementX,
-         GetterElementX,
-         LibraryElementX,
-         MetadataAnnotationX,
-         SetterElementX;
-import 'library_loader.dart' show LibraryLoader;
+import 'elements/modelx.dart' show
+    BaseFunctionElementX,
+    ClassElementX,
+    GetterElementX,
+    LibraryElementX,
+    MetadataAnnotationX,
+    SetterElementX;
+import 'library_loader.dart' show
+    LibraryLoader;
 import 'scanner/scannerlib.dart';  // Scanner, Parsers, Listeners
+import 'script.dart';
 import 'util/util.dart';
 
 class PatchParserTask extends CompilerTask {
diff --git a/pkg/compiler/lib/src/resolution/access_semantics.dart b/pkg/compiler/lib/src/resolution/access_semantics.dart
index 834a043..a41b867 100644
--- a/pkg/compiler/lib/src/resolution/access_semantics.dart
+++ b/pkg/compiler/lib/src/resolution/access_semantics.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// TODO(johnniwinther): Temporarily copied from analyzer2dart. Merge when
-// we shared code with the analyzer and this semantic visitor is complete.
-
 /**
  * Code for classifying the semantics of identifiers appearing in a Dart file.
  */
@@ -192,7 +189,7 @@
  * Data structure used to classify the semantics of a property access or method
  * or function invocation.
  */
-class AccessSemantics {
+abstract class AccessSemantics {
   /**
    * The kind of access.
    */
@@ -205,30 +202,6 @@
    */
   Element get element => null;
 
-  /**
-   * The class containing the element being accessed, if this is a static
-   * reference to an element in a class.  This will be null if [kind] is
-   * DYNAMIC, LOCAL_FUNCTION, LOCAL_VARIABLE, PARAMETER, TOPLEVEL_CLASS, or
-   * TYPE_PARAMETER, or if the element being accessed is defined at toplevel
-   * within a library.
-   *
-   * Note: it is possible for [classElement] to be non-null and for [element]
-   * to be null; for example this occurs if the element being accessed is a
-   * non-existent static method or field inside an existing class.
-   */
-  ClassElement get classElement => null;
-
-  // TODO(paulberry): would it also be useful to store the libraryElement?
-
-  // TODO(johnniwinther): Do we need this?
-  /**
-   * When [kind] is DYNAMIC_PROPERTY, the expression whose runtime type
-   * determines the class in which [identifier] should be looked up.
-   *
-   * When [kind] is not DYNAMIC_PROPERTY, this field is always null.
-   */
-  /*Expression*/ get target => null;
-
   ConstantExpression get constant => null;
 
   /// The element for the getter in case of a compound access,
@@ -239,27 +212,27 @@
   /// [element] otherwise.
   Element get setter => element;
 
-  AccessSemantics.expression()
-      : kind = AccessKind.EXPRESSION;
+  Name get name => null;
 
-  AccessSemantics.thisAccess()
-      : kind = AccessKind.THIS;
-
-  AccessSemantics.thisProperty()
-      : kind = AccessKind.THIS_PROPERTY;
-
-  AccessSemantics._(this.kind);
+  const AccessSemantics._(this.kind);
 
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('AccessSemantics[');
     sb.write('kind=$kind,');
     if (element != null) {
-      sb.write('element=');
-      if (classElement != null) {
-        sb.write('${classElement.name}.');
+      if (getter != setter) {
+        sb.write('getter=');
+        sb.write('${getter}');
+        sb.write(',setter=');
+        sb.write('${setter}');
+      } else {
+        sb.write('element=');
+        sb.write('${element}');
       }
-      sb.write('${element}');
+    } else if (name != null) {
+      sb.write('name=');
+      sb.write(name);
     }
     sb.write(']');
     return sb.toString();
@@ -268,12 +241,23 @@
 
 
 class DynamicAccess extends AccessSemantics {
-  final target;
+  final Name name;
 
-  DynamicAccess.dynamicProperty(this.target)
+  const DynamicAccess.expression()
+      : name = null,
+        super._(AccessKind.EXPRESSION);
+
+  const DynamicAccess.thisAccess()
+      : name = null,
+        super._(AccessKind.THIS);
+
+  const DynamicAccess.thisProperty(this.name)
+      : super._(AccessKind.THIS_PROPERTY);
+
+  const DynamicAccess.dynamicProperty(this.name)
       : super._(AccessKind.DYNAMIC_PROPERTY);
 
-  DynamicAccess.ifNotNullProperty(this.target)
+  const DynamicAccess.ifNotNullProperty(this.name)
       : super._(AccessKind.CONDITIONAL_DYNAMIC_PROPERTY);
 }
 
@@ -296,8 +280,6 @@
 class StaticAccess extends AccessSemantics {
   final Element element;
 
-  ClassElement get classElement => element.enclosingClass;
-
   StaticAccess._(AccessKind kind, this.element)
       : super._(kind);
 
diff --git a/pkg/compiler/lib/src/resolution/class_hierarchy.dart b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
index 712e78e..5b26ba0 100644
--- a/pkg/compiler/lib/src/resolution/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/resolution/class_hierarchy.dart
@@ -2,7 +2,44 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.class_hierarchy;
+
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/elements.dart';
+import '../elements/modelx.dart' show
+    BaseClassElementX,
+    ErroneousElementX,
+    MixinApplicationElementX,
+    SynthesizedConstructorElementX,
+    TypeVariableElementX;
+import '../ordered_typeset.dart' show
+    OrderedTypeSet,
+    OrderedTypeSetBuilder;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link,
+    Setlet;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector;
+
+import 'enum_creator.dart';
+import 'members.dart' show
+    lookupInScope;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution_common.dart' show
+    CommonResolverVisitor,
+    MappingVisitor;
+import 'scope.dart' show
+    Scope,
+    TypeDeclarationScope;
 
 class TypeDefinitionVisitor extends MappingVisitor<DartType> {
   Scope scope;
@@ -164,9 +201,9 @@
         registry.registerThrowNoSuchMethod();
       } else {
         ConstructorElement superConstructor = superMember;
-        Selector callToMatch = new Selector.call("", element.library, 0);
         superConstructor.computeType(compiler);
-        if (!callToMatch.applies(superConstructor, compiler.world)) {
+        if (!CallStructure.NO_ARGS.signatureApplies(
+                superConstructor.functionSignature)) {
           MessageKind kind = MessageKind.NO_MATCHING_CONSTRUCTOR_FOR_IMPLICIT;
           compiler.reportError(node, kind);
           superMember = new ErroneousElementX(kind, {}, '', element);
@@ -369,7 +406,7 @@
       if (!member.isGenerativeConstructor) return;
       FunctionElement forwarder =
           createForwardingConstructor(member, mixinApplication);
-      if (isPrivateName(member.name) &&
+      if (Name.isPrivateName(member.name) &&
           mixinApplication.library != superclass.library) {
         // Do not create a forwarder to the super constructor, because the mixin
         // application is in a different library than the constructor in the
diff --git a/pkg/compiler/lib/src/resolution/class_members.dart b/pkg/compiler/lib/src/resolution/class_members.dart
index 8b624ba..b09c4d9 100644
--- a/pkg/compiler/lib/src/resolution/class_members.dart
+++ b/pkg/compiler/lib/src/resolution/class_members.dart
@@ -2,24 +2,27 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library resolution.compute_members;
+library dart2js.resolution.compute_members;
 
-import '../elements/elements.dart'
-    show Element,
-         Name,
-         PublicName,
-         Member,
-         MemberElement,
-         MemberSignature,
-         LibraryElement,
-         ClassElement,
-         MixinApplicationElement;
+import '../common/names.dart' show
+    Identifiers;
+import '../compiler.dart' show
+    Compiler;
 import '../dart_types.dart';
-import '../dart2jslib.dart'
-    show Compiler,
-         MessageKind,
-         invariant,
-         isPrivateName;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/elements.dart' show
+    ClassElement,
+    Element,
+    LibraryElement,
+    Member,
+    MemberElement,
+    MemberSignature,
+    MixinApplicationElement,
+    Name,
+    PublicName;
 import '../util/util.dart';
 
 part 'member_impl.dart';
@@ -58,7 +61,8 @@
 
   bool shouldSkipName(String name) {
     return computedMemberNames != null &&
-           computedMemberNames.contains(name);
+           // 'call' is implicitly contained in [computedMemberNames].
+           (name == Identifiers.call || computedMemberNames.contains(name));
   }
 
   /// Compute all members of [cls] with the given names.
@@ -304,7 +308,7 @@
     assert(!cls.isAbstract);
 
     if (cls.asInstanceOf(compiler.functionClass) == null) return;
-    if (cls.lookupMember(Compiler.CALL_OPERATOR_NAME) != null) return;
+    if (cls.lookupMember(Identifiers.call) != null) return;
     // TODO(johnniwinther): Make separate methods for backend exceptions.
     // Avoid warnings on backend implementation classes for closures.
     if (compiler.backend.isBackendLibrary(cls.library)) return;
@@ -312,8 +316,8 @@
     reportMessage(compiler.functionClass, MessageKind.UNIMPLEMENTED_METHOD, () {
       compiler.reportWarning(cls, MessageKind.UNIMPLEMENTED_METHOD_ONE,
           {'class': cls.name,
-           'name': Compiler.CALL_OPERATOR_NAME,
-           'method': Compiler.CALL_OPERATOR_NAME,
+           'name': Identifiers.call,
+           'method': Identifiers.call,
            'declarer': compiler.functionClass.name});
     });
   }
@@ -834,7 +838,7 @@
   /// and private names.
   void computeClassMember(Compiler compiler, String name, Setlet<Name> names) {
     if (isMemberComputed(name)) return;
-    if (isPrivateName(name)) {
+    if (Name.isPrivateName(name)) {
       names..add(new Name(name, library))
            ..add(new Name(name, library, isSetter: true));
     }
@@ -843,7 +847,7 @@
     if (computedMemberNames == null) {
       computedMemberNames = _EMPTY_MEMBERS_NAMES;
     }
-    if (name != Compiler.CALL_OPERATOR_NAME) {
+    if (name != Identifiers.call) {
       Setlet<String> set;
       if (identical(computedMemberNames, _EMPTY_MEMBERS_NAMES)) {
         computedMemberNames = set = new Setlet<String>();
@@ -870,7 +874,7 @@
     if (computedMemberNames == null) {
       return classMembers != null;
     } else {
-      return name == Compiler.CALL_OPERATOR_NAME ||
+      return name == Identifiers.call ||
              computedMemberNames.contains(name);
     }
   }
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index f3f6be9..cff366c 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -2,7 +2,44 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.constructors;
+import '../compiler.dart' show
+    Compiler;
+import '../constants/constructors.dart' show
+    GenerativeConstantConstructor,
+    RedirectingGenerativeConstantConstructor;
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
+import '../elements/elements.dart';
+import '../elements/modelx.dart' show
+    ConstructorElementX,
+    ErroneousConstructorElementX,
+    ErroneousElementX,
+    ErroneousFieldElementX,
+    FieldElementX,
+    InitializingFormalElementX,
+    ParameterElementX;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector;
+
+import 'members.dart' show
+    lookupInScope,
+    ResolverVisitor;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution_common.dart' show
+    CommonResolverVisitor;
+import 'resolution_result.dart';
 
 class InitializerResolver {
   final ResolverVisitor visitor;
@@ -421,7 +458,7 @@
     cls.ensureResolved(compiler);
     Element result = cls.lookupConstructor(constructorName);
     // TODO(johnniwinther): Use [Name] for lookup.
-    if (isPrivateName(constructorName) &&
+    if (Name.isPrivateName(constructorName) &&
         resolver.enclosingElement.library != cls.library) {
       result = null;
     }
diff --git a/pkg/compiler/lib/src/resolution/enum_creator.dart b/pkg/compiler/lib/src/resolution/enum_creator.dart
index 7a25972..16882dc 100644
--- a/pkg/compiler/lib/src/resolution/enum_creator.dart
+++ b/pkg/compiler/lib/src/resolution/enum_creator.dart
@@ -4,8 +4,8 @@
 
 library dart2js.resolution.enum_creator;
 
+import '../compiler.dart';
 import '../dart_types.dart';
-import '../dart2jslib.dart';
 import '../elements/elements.dart';
 import '../elements/modelx.dart';
 import '../scanner/scannerlib.dart';
diff --git a/pkg/compiler/lib/src/resolution/label_scope.dart b/pkg/compiler/lib/src/resolution/label_scope.dart
index c02c07e..21aed76 100644
--- a/pkg/compiler/lib/src/resolution/label_scope.dart
+++ b/pkg/compiler/lib/src/resolution/label_scope.dart
@@ -2,7 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.label_scope;
+
+import '../elements/elements.dart' show
+    JumpTarget,
+    LabelDefinition;
+import '../util/util.dart' show
+    Link;
 
 abstract class LabelScope {
   LabelScope get outer;
diff --git a/pkg/compiler/lib/src/resolution/member_impl.dart b/pkg/compiler/lib/src/resolution/member_impl.dart
index 6c0bb21..072ddd1 100644
--- a/pkg/compiler/lib/src/resolution/member_impl.dart
+++ b/pkg/compiler/lib/src/resolution/member_impl.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution.compute_members;
+part of dart2js.resolution.compute_members;
 
 class DeclaredMember implements Member {
   final Name name;
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index a67de98..16aa1a2 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -2,7 +2,71 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.members;
+
+import '../common/names.dart' show
+    Selectors;
+import '../compiler.dart' show
+    Compiler;
+import '../constants/constructors.dart' show
+    RedirectingFactoryConstantConstructor;
+import '../constants/expressions.dart';
+import '../constants/values.dart';
+import '../core_types.dart';
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
+import '../elements/elements.dart';
+import '../elements/modelx.dart' show
+    ConstructorElementX,
+    ErroneousElementX,
+    FunctionElementX,
+    JumpTargetX,
+    LocalFunctionElementX,
+    LocalParameterElementX,
+    LocalVariableElementX,
+    MethodElementX,
+    ParameterElementX,
+    VariableElementX,
+    VariableList;
+import '../scanner/scannerlib.dart' show
+    isUserDefinableOperator;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    UniverseSelector;
+
+import 'access_semantics.dart';
+import 'class_members.dart' show MembersCreator;
+import 'operators.dart';
+import 'send_structure.dart';
+
+import 'constructors.dart' show
+    ConstructorResolver;
+import 'label_scope.dart' show
+    StatementScope;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution.dart' show
+    ResolverTask;
+import 'resolution_common.dart' show
+    MappingVisitor;
+import 'resolution_result.dart';
+import 'scope.dart' show
+    BlockScope,
+    MethodScope,
+    Scope;
+import 'signatures.dart' show
+    SignatureResolver;
+import 'variables.dart' show
+    VariableDefinitionsVisitor;
 
 /// The state of constants in resolutions.
 enum ConstantState {
@@ -354,8 +418,7 @@
     if (isNamedConstructor(node)) {
       String constructorName = node.selector.asIdentifier().source;
       return new Selector.callConstructor(
-          constructorName,
-          enclosingElement.library);
+          new Name(constructorName, enclosingElement.library));
     } else {
       return new Selector.callDefaultConstructor();
     }
@@ -574,148 +637,6 @@
     return const NoneResult();
   }
 
-  ResolutionResult resolveSend(Send node) {
-    Selector selector = resolveSelector(node, null);
-    if (node.isSuperCall) registry.registerSuperUse(node);
-
-    if (node.receiver == null) {
-      // If this send is of the form "assert(expr);", then
-      // this is an assertion.
-      if (selector.isAssert) {
-        internalError(node, "Unexpected assert: $node");
-      }
-
-      return node.selector.accept(this);
-    }
-
-    var oldCategory = allowedCategory;
-    allowedCategory |= ElementCategory.PREFIX | ElementCategory.SUPER;
-
-    bool oldSendIsMemberAccess = sendIsMemberAccess;
-    int oldAllowedCategory = allowedCategory;
-
-    // Conditional sends like `e?.foo` treat the receiver as an expression.  So
-    // `C?.foo` needs to be treated like `(C).foo`, not like C.foo. Prefixes and
-    // super are not allowed on their own in that context.
-    if (node.isConditional) {
-      sendIsMemberAccess = false;
-      allowedCategory =
-          ElementCategory.VARIABLE |
-          ElementCategory.FUNCTION |
-          ElementCategory.IMPLIES_TYPE;
-    }
-    ResolutionResult resolvedReceiver = visit(node.receiver);
-    if (node.isConditional) {
-      sendIsMemberAccess = oldSendIsMemberAccess;
-      allowedCategory = oldAllowedCategory;
-    }
-
-    allowedCategory = oldCategory;
-
-    Element target;
-    String name = node.selector.asIdentifier().source;
-    if (identical(name, 'this')) {
-      error(node.selector, MessageKind.THIS_PROPERTY);
-      return const NoneResult();
-    } else if (node.isSuperCall) {
-      if (node.isOperator) {
-        if (isUserDefinableOperator(name)) {
-          name = selector.name;
-        } else {
-          error(node.selector, MessageKind.ILLEGAL_SUPER_SEND, {'name': name});
-          return const NoneResult();
-        }
-      }
-      if (!inInstanceContext) {
-        error(node.receiver, MessageKind.NO_INSTANCE_AVAILABLE, {'name': name});
-        return const NoneResult();
-      }
-      if (currentClass.supertype == null) {
-        // This is just to guard against internal errors, so no need
-        // for a real error message.
-        error(node.receiver, MessageKind.GENERIC,
-              {'text': "Object has no superclass"});
-        return const NoneResult();
-      }
-      // TODO(johnniwinther): Ensure correct behavior if currentClass is a
-      // patch.
-      target = currentClass.lookupSuperByName(selector.memberName);
-      // [target] may be null which means invoking noSuchMethod on
-      // super.
-      if (target == null) {
-        target = reportAndCreateErroneousElement(
-            node, name, MessageKind.NO_SUCH_SUPER_MEMBER,
-            {'className': currentClass.name, 'memberName': name});
-        // We still need to register the invocation, because we might
-        // call [:super.noSuchMethod:] which calls
-        // [JSInvocationMirror._invokeOn].
-        registry.registerDynamicInvocation(
-            new UniverseSelector(selector, null));
-        registry.registerSuperNoSuchMethod();
-      }
-    } else if (Elements.isUnresolved(resolvedReceiver.element)) {
-      return const NoneResult();
-    } else if (resolvedReceiver.element.isClass) {
-      ClassElement receiverClass = resolvedReceiver.element;
-      receiverClass.ensureResolved(compiler);
-      if (node.isOperator) {
-        // When the resolved receiver is a class, we can have two cases:
-        //  1) a static send: C.foo, or
-        //  2) an operator send, where the receiver is a class literal: 'C + 1'.
-        // The following code that looks up the selector on the resolved
-        // receiver will treat the second as the invocation of a static operator
-        // if the resolved receiver is not null.
-        return const NoneResult();
-      }
-      MembersCreator.computeClassMembersByName(
-          compiler, receiverClass.declaration, name);
-      target = receiverClass.lookupLocalMember(name);
-      if (target == null || target.isInstanceMember) {
-        registry.registerThrowNoSuchMethod();
-        // TODO(johnniwinther): With the simplified [TreeElements] invariant,
-        // try to resolve injected elements if [currentClass] is in the patch
-        // library of [receiverClass].
-
-        // TODO(karlklose): this should be reported by the caller of
-        // [resolveSend] to select better warning messages for getters and
-        // setters.
-        MessageKind kind = (target == null)
-            ? MessageKind.MEMBER_NOT_FOUND
-            : MessageKind.MEMBER_NOT_STATIC;
-        return new ElementResult(reportAndCreateErroneousElement(
-            node, name, kind,
-            {'className': receiverClass.name, 'memberName': name}));
-      } else if (isPrivateName(name) &&
-                 target.library != enclosingElement.library) {
-        registry.registerThrowNoSuchMethod();
-        return new ElementResult(reportAndCreateErroneousElement(
-            node, name, MessageKind.PRIVATE_ACCESS,
-            {'libraryName': target.library.getLibraryOrScriptName(),
-             'name': name}));
-      }
-    } else if (resolvedReceiver.element.isPrefix) {
-      PrefixElement prefix = resolvedReceiver.element;
-      target = prefix.lookupLocalMember(name);
-      if (Elements.isUnresolved(target)) {
-        registry.registerThrowNoSuchMethod();
-        return new ElementResult(reportAndCreateErroneousElement(
-            node, name, MessageKind.NO_SUCH_LIBRARY_MEMBER,
-            {'libraryName': prefix.name, 'memberName': name}));
-      } else if (target.isAmbiguous) {
-        registry.registerThrowNoSuchMethod();
-        AmbiguousElement ambiguous = target;
-        target = reportAndCreateErroneousElement(
-            node, name, ambiguous.messageKind, ambiguous.messageArguments);
-        ambiguous.diagnose(enclosingElement, compiler);
-        return new ElementResult(target);
-      } else if (target.kind == ElementKind.CLASS) {
-        ClassElement classElement = target;
-        classElement.ensureResolved(compiler);
-      }
-    }
-    return new ResolutionResult.forElement(target);
-  }
-
   static Selector computeSendSelector(Send node,
                                       LibraryElement library,
                                       Element element) {
@@ -743,7 +664,8 @@
       if (op == null) {
         // Unsupported operator. An error has been reported during parsing.
         return new Selector.call(
-            source, library, node.argumentsNode.slowLength(), []);
+            new Name(source, library),
+            new CallStructure.unnamed(node.argumentsNode.slowLength()));
       }
       return node.arguments.isEmpty
           ? new Selector.unaryOperator(op)
@@ -753,9 +675,11 @@
     Identifier identifier = node.selector.asIdentifier();
     if (node.isPropertyAccess) {
       assert(!isSet);
-      return new Selector.getter(identifier.source, library);
+      return new Selector.getter(
+          new Name(identifier.source, library));
     } else if (isSet) {
-      return new Selector.setter(identifier.source, library);
+      return new Selector.setter(
+          new Name(identifier.source, library, isSetter: true));
     }
 
     // Compute the arity and the list of named arguments.
@@ -774,13 +698,14 @@
 
     if (element != null && element.isConstructor) {
       return new Selector.callConstructor(
-          element.name, library, arity, named);
+          new Name(element.name, library), arity, named);
     }
 
     // If we're invoking a closure, we do not have an identifier.
     return (identifier == null)
         ? new Selector.callClosure(arity, named)
-        : new Selector.call(identifier.source, library, arity, named);
+        : new Selector.call(new Name(identifier.source, library),
+                            new CallStructure(arity, named));
   }
 
   Selector resolveSelector(Send node, Element element) {
@@ -833,86 +758,53 @@
         isValidAsConstant: isValidAsConstant);
   }
 
-  void registerTypeLiteralAccess(Send node, Element target) {
-    // Set the type of the node to [Type] to mark this send as a
-    // type literal.
-    DartType type;
-
-    // TODO(johnniwinther): Remove this hack when we can pass more complex
-    // information between methods than resolved elements.
-    if (target == compiler.typeClass && node.receiver == null) {
-      // Potentially a 'dynamic' type literal.
-      type = registry.getType(node.selector);
-    }
-    if (type == null) {
-      if (target.isTypedef || target.isClass) {
-        TypeDeclarationElement typeDeclaration = target;
-        typeDeclaration.computeType(compiler);
-        type = typeDeclaration.rawType;
-      } else {
-        TypeVariableElement typeVariable = target;
-        type = typeVariable.type;
-      }
-    }
-    registry.registerTypeLiteral(node, type);
-
-    if (!target.isTypeVariable) {
-      // Don't try to make constants of calls and assignments to type literals.
-      if (!node.isCall && node.asSendSet() == null) {
-        analyzeConstantDeferred(node, enforceConst: false);
-      } else {
-        // The node itself is not a constant but we register the selector (the
-        // identifier that refers to the class/typedef) as a constant.
-        if (node.receiver != null) {
-          // This is a hack for the case of prefix.Type, we need to store
-          // the element on the selector, so [analyzeConstant] can build
-          // the type literal from the selector.
-          registry.useElement(node.selector, target);
-        }
-        analyzeConstantDeferred(node.selector, enforceConst: false);
-      }
-    }
-  }
-
   /// Check that access to `super` is currently allowed. Returns an
   /// [AccessSemantics] in case of an error, `null` otherwise.
   AccessSemantics checkSuperAccess(Send node) {
     if (!inInstanceContext) {
-      return new StaticAccess.invalid(
-          reportAndCreateErroneousElement(
-              node, 'super',
-              MessageKind.NO_SUPER_IN_STATIC, {},
-              isError: true));
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, 'super',
+          MessageKind.NO_SUPER_IN_STATIC, {},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      return new StaticAccess.invalid(error);
     }
     if (node.isConditional) {
       // `super?.foo` is not allowed.
-      return new StaticAccess.invalid(
-          reportAndCreateErroneousElement(
-              node, 'super',
-              MessageKind.INVALID_USE_OF_SUPER, {},
-              isError: true));
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, 'super',
+          MessageKind.INVALID_USE_OF_SUPER, {},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      return new StaticAccess.invalid(error);
     }
     if (currentClass.supertype == null) {
       // This is just to guard against internal errors, so no need
       // for a real error message.
-      return new StaticAccess.invalid(
-          reportAndCreateErroneousElement(
-              node, 'super',
-              MessageKind.GENERIC,
-              {'text': "Object has no superclass"},
-              isError: true));
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, 'super',
+          MessageKind.GENERIC,
+          {'text': "Object has no superclass"},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      return new StaticAccess.invalid(error);
     }
     registry.registerSuperUse(node);
     return null;
   }
 
-  /// Check that access to `this` is currently allowed.
-  bool checkThisAccess(Send node) {
+  /// Check that access to `this` is currently allowed. Returns an
+  /// [AccessSemantics] in case of an error, `null` otherwise.
+  AccessSemantics checkThisAccess(Send node) {
     if (!inInstanceContext) {
-      compiler.reportError(node, MessageKind.NO_THIS_AVAILABLE);
-      return false;
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, 'this',
+          MessageKind.NO_THIS_AVAILABLE, const {},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      return new StaticAccess.invalid(error);
     }
-    return true;
+    return null;
   }
 
   /// Compute the [AccessSemantics] corresponding to a super access of [target].
@@ -941,7 +833,8 @@
   AccessSemantics computeCompoundSuperAccessSemantics(
       Spannable node,
       Element getter,
-      Element setter) {
+      Element setter,
+      {bool isIndex: false}) {
     if (getter.isErroneous) {
       if (setter.isErroneous) {
         return new StaticAccess.unresolvedSuper(getter);
@@ -957,7 +850,11 @@
             CompoundAccessKind.UNRESOLVED_SUPER_GETTER, getter, setter);
       }
     } else if (getter.isField) {
-      if (setter.isField) {
+      if (setter.isErroneous) {
+        assert(invariant(node, getter.isFinal,
+            message: "Unexpected super setter '$setter' for getter '$getter."));
+        return new StaticAccess.superFinalField(getter);
+      } else if (setter.isField) {
         if (getter == setter) {
           return new StaticAccess.superField(getter);
         } else {
@@ -990,13 +887,17 @@
       assert(invariant(node, getter.isFunction,
           message: "Unexpected super getter '$getter'."));
       if (setter.isErroneous) {
-        return new CompoundAccessSemantics(
-            CompoundAccessKind.UNRESOLVED_SUPER_SETTER, getter, setter);
+        if (isIndex) {
+          return new CompoundAccessSemantics(
+              CompoundAccessKind.UNRESOLVED_SUPER_SETTER, getter, setter);
+        } else {
+          return new StaticAccess.superMethod(getter);
+        }
       } else if (setter.isFunction) {
-        assert(invariant(node, getter.name == '[]',
-            message: "Unexpected super getter '$getter'."));
         assert(invariant(node, setter.name == '[]=',
             message: "Unexpected super setter '$setter'."));
+        assert(invariant(node, getter.name == '[]',
+            message: "Unexpected super getter '$getter'."));
         return new CompoundAccessSemantics(
                     CompoundAccessKind.SUPER_GETTER_SETTER, getter, setter);
       } else {
@@ -1107,12 +1008,19 @@
     Element target = currentClass.lookupSuperByName(name);
     // [target] may be null which means invoking noSuchMethod on super.
     if (target == null) {
-      Element error = reportAndCreateErroneousElement(
-          node, name.text, MessageKind.NO_SUCH_SUPER_MEMBER,
-          {'className': currentClass.name, 'memberName': name});
       if (alternateName != null) {
         target = currentClass.lookupSuperByName(alternateName);
       }
+      Element error;
+      if (selector.isSetter) {
+        error = reportAndCreateErroneousElement(
+          node, name.text, MessageKind.SETTER_NOT_FOUND_IN_SUPER,
+          {'className': currentClass.name, 'name': name});
+      } else {
+        error = reportAndCreateErroneousElement(
+          node, name.text, MessageKind.NO_SUCH_SUPER_MEMBER,
+          {'className': currentClass.name, 'memberName': name});
+      }
       if (target == null) {
         // If a setter wasn't resolved, use the [ErroneousElement].
         target = error;
@@ -1143,7 +1051,11 @@
   ///
   AccessSemantics computeSuperAccessSemanticsForSelectors(
       Spannable node,
-      Selector getterSelector, Selector setterSelector) {
+      Selector getterSelector,
+      Selector setterSelector,
+      {bool isIndex: false}) {
+    bool getterError = false;
+    bool setterError = false;
 
     // TODO(johnniwinther): Ensure correct behavior if currentClass is a
     // patch.
@@ -1153,11 +1065,7 @@
       getter = reportAndCreateErroneousElement(
           node, getterSelector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
           {'className': currentClass.name, 'memberName': getterSelector.name});
-      // We still need to register the invocation, because we might
-      // call `super.noSuchMethod` which calls [JSInvocationMirror._invokeOn].
-      registry.registerDynamicInvocation(
-          new UniverseSelector(getterSelector, null));
-      registry.registerSuperNoSuchMethod();
+      getterError = true;
     }
     Element setter = currentClass.lookupSuperByName(setterSelector.memberName);
     // [target] may be null which means invoking noSuchMethod on super.
@@ -1165,13 +1073,41 @@
       setter = reportAndCreateErroneousElement(
           node, setterSelector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
           {'className': currentClass.name, 'memberName': setterSelector.name});
+      setterError = true;
+    } else if (getter == setter) {
+      if (setter.isFunction) {
+        setter = reportAndCreateErroneousElement(
+            node, setterSelector.name,
+            MessageKind.ASSIGNING_METHOD_IN_SUPER,
+            {'superclassName': setter.enclosingClass.name,
+             'name': setterSelector.name});
+        setterError = true;
+      } else if (setter.isField && setter.isFinal) {
+        setter = reportAndCreateErroneousElement(
+            node, setterSelector.name,
+            MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
+            {'superclassName': setter.enclosingClass.name,
+             'name': setterSelector.name});
+        setterError = true;
+      }
+    }
+    if (getterError) {
       // We still need to register the invocation, because we might
-      // call `super.noSuchMethod` which calls [JSInvocationMirror._invokeOn].
+      // call [:super.noSuchMethod:] which calls [JSInvocationMirror._invokeOn].
+      registry.registerDynamicInvocation(
+          new UniverseSelector(getterSelector, null));
+    }
+    if (setterError) {
+      // We still need to register the invocation, because we might
+      // call [:super.noSuchMethod:] which calls [JSInvocationMirror._invokeOn].
       registry.registerDynamicInvocation(
           new UniverseSelector(setterSelector, null));
+    }
+    if (getterError || setterError) {
       registry.registerSuperNoSuchMethod();
     }
-    return computeCompoundSuperAccessSemantics(node, getter, setter);
+    return computeCompoundSuperAccessSemantics(
+        node, getter, setter, isIndex: isIndex);
   }
 
   /// Resolve [node] as a subexpression that is _not_ the prefix of a member
@@ -1197,26 +1133,6 @@
     return result;
   }
 
-  /// Resolved [node] as a subexpression that is the prefix of a conditional
-  /// access. For instance `a` in `a?.b`.
-  // TODO(johnniwinther): Is this equivalent to [visitExpression]?
-  ResolutionResult visitConditionalPrefix(Node node) {
-    // Conditional sends like `e?.foo` treat the receiver as an expression.  So
-    // `C?.foo` needs to be treated like `(C).foo`, not like C.foo. Prefixes and
-    // super are not allowed on their own in that context.
-    int oldAllowedCategory = allowedCategory;
-    bool oldSendIsMemberAccess = sendIsMemberAccess;
-    sendIsMemberAccess = false;
-    allowedCategory =
-        ElementCategory.VARIABLE |
-        ElementCategory.FUNCTION |
-        ElementCategory.IMPLIES_TYPE;
-    ResolutionResult result = visit(node);
-    sendIsMemberAccess = oldSendIsMemberAccess;
-    allowedCategory = oldAllowedCategory;
-    return result;
-  }
-
   /// Handle a type test expression, like `a is T` and `a is! T`.
   ResolutionResult handleIs(Send node) {
     Node expression = node.receiver;
@@ -1276,7 +1192,7 @@
     ResolutionResult result = const NoneResult();
     Node expression = node.receiver;
     Selector selector = operator.selector;
-    // TODO(johnniwinther): Remove this when all information goes through the
+    // TODO(23998): Remove this when all information goes through the
     // [SendStructure].
     registry.setSelector(node, selector);
 
@@ -1290,13 +1206,13 @@
         if (semantics.kind == AccessKind.SUPER_METHOD) {
           registry.registerStaticUse(semantics.element.declaration);
         }
-        // TODO(johnniwinther): Remove this when all information goes through
+        // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
         registry.useElement(node, semantics.element);
       }
     } else {
       ResolutionResult expressionResult = visitExpression(expression);
-      semantics = new DynamicAccess.dynamicProperty(expression);
+      semantics = const DynamicAccess.expression();
       registry.registerDynamicInvocation(new UniverseSelector(selector, null));
 
       if (expressionResult.isConstant) {
@@ -1341,8 +1257,7 @@
 
     Node expression = node.receiver;
     ResolutionResult result = visitExpression(expression);
-    registry.registerSendStructure(node,
-        new NotStructure(new DynamicAccess.dynamicProperty(expression)));
+    registry.registerSendStructure(node, const NotStructure());
 
     if (result.isConstant) {
       ConstantExpression expressionConstant = result.constant;
@@ -1450,7 +1365,7 @@
     } else {
       selector = new Selector.binaryOperator(operator.selectorName);
     }
-    // TODO(johnniwinther): Remove this when all information goes through the
+    // TODO(23998): Remove this when all information goes through the
     // [SendStructure].
     registry.setSelector(node, selector);
 
@@ -1463,7 +1378,7 @@
         if (semantics.kind == AccessKind.SUPER_METHOD) {
           registry.registerStaticUse(semantics.element.declaration);
         }
-        // TODO(johnniwinther): Remove this when all information goes through
+        // TODO(23998): Remove this when all information goes through
         // the [SendStructure].
         registry.useElement(node, semantics.element);
       }
@@ -1472,7 +1387,7 @@
       ResolutionResult leftResult = visitExpression(left);
       ResolutionResult rightResult = visitExpression(right);
       registry.registerDynamicInvocation(new UniverseSelector(selector, null));
-      semantics = new DynamicAccess.dynamicProperty(left);
+      semantics = const DynamicAccess.expression();
 
       if (leftResult.isConstant && rightResult.isConstant) {
         bool isValidConstant;
@@ -1601,12 +1516,12 @@
     CallStructure callStructure =
         resolveArguments(node.argumentsNode).callStructure;
     Selector selector = callStructure.callSelector;
-    // TODO(johnniwinther): Remove this when all information goes through the
+    // TODO(23998): Remove this when all information goes through the
     // [SendStructure].
     registry.setSelector(node, selector);
     registry.registerDynamicInvocation(new UniverseSelector(selector, null));
     registry.registerSendStructure(node,
-        new InvokeStructure(new AccessSemantics.expression(), selector));
+        new InvokeStructure(const DynamicAccess.expression(), selector));
     return const NoneResult();
   }
 
@@ -1641,29 +1556,39 @@
   /// Handle access of a property of [name] on `this`, like `this.name` and
   /// `this.name()`, or `name` and `name()` in instance context.
   ResolutionResult handleThisPropertyAccess(Send node, Name name) {
-    AccessSemantics semantics = new AccessSemantics.thisProperty();
+    AccessSemantics semantics = new DynamicAccess.thisProperty(name);
     return handleDynamicAccessSemantics(node, name, semantics);
   }
 
+  /// Handle update of a property of [name] on `this`, like `this.name = b` and
+  /// `this.name++`, or `name = b` and `name++` in instance context.
+  ResolutionResult handleThisPropertyUpdate(
+      SendSet node, Name name, Element element) {
+    AccessSemantics semantics = new DynamicAccess.thisProperty(name);
+    return handleDynamicUpdateSemantics(node, name, element, semantics);
+  }
+
   /// Handle access on `this`, like `this()` and `this` when it is parsed as a
   /// [Send] node.
   ResolutionResult handleThisAccess(Send node) {
-    AccessSemantics accessSemantics = new AccessSemantics.thisAccess();
     if (node.isCall) {
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
       Selector selector = callStructure.callSelector;
       // TODO(johnniwinther): Handle invalid this access as an
       // [AccessSemantics].
-      if (checkThisAccess(node)) {
+      AccessSemantics accessSemantics = checkThisAccess(node);
+      if (accessSemantics == null) {
+        accessSemantics = const DynamicAccess.thisAccess();
         registry.registerDynamicInvocation(
             new UniverseSelector(selector, null));
-        registry.registerSendStructure(node,
-            new InvokeStructure(accessSemantics, selector));
       }
-      // TODO(johnniwinther): Remove this when all information goes through
+      registry.registerSendStructure(node,
+          new InvokeStructure(accessSemantics, selector));
+      // TODO(23998): Remove this when all information goes through
       // the [SendStructure].
       registry.setSelector(node, selector);
+      return const NoneResult();
     } else {
       // TODO(johnniwinther): Handle get of `this` when it is a [Send] node.
       internalError(node, "Unexpected node '$node'.");
@@ -1675,13 +1600,12 @@
   ResolutionResult handleSuperPropertyAccess(Send node, Name name) {
     Element target;
     Selector selector;
-    CallStructure callStructure = CallStructure.NO_ARGS;
+    CallStructure callStructure;
     if (node.isCall) {
-      callStructure =
-          resolveArguments(node.argumentsNode).callStructure;
-      selector = new Selector(SelectorKind.CALL, name, callStructure);
+      callStructure = resolveArguments(node.argumentsNode).callStructure;
+      selector = new Selector.call(name, callStructure);
     } else {
-      selector = new Selector(SelectorKind.GETTER, name, callStructure);
+      selector = new Selector.getter(name);
     }
     AccessSemantics semantics = checkSuperAccess(node);
     if (semantics == null) {
@@ -1751,12 +1675,11 @@
           internalError(node, "Unexpected super property access $semantics.");
           break;
       }
-      registry.registerSendStructure(node,
-          new GetStructure(semantics, selector));
+      registry.registerSendStructure(node, new GetStructure(semantics));
     }
     target = semantics.element;
 
-    // TODO(johnniwinther): Remove these when all information goes through
+    // TODO(23998): Remove these when all information goes through
     // the [SendStructure].
     registry.useElement(node, target);
     registry.setSelector(node, selector);
@@ -1845,7 +1768,30 @@
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
     return handleErroneousAccess(
-        node, name, error, new StaticAccess.unresolved(error));
+        node, name, new StaticAccess.unresolved(error));
+  }
+
+  /// Handle qualified update to an unresolved static class member, like
+  /// `a.b = c` or `a.b++` where `a` is a class and `b` is unresolved.
+  ResolutionResult handleUnresolvedStaticMemberUpdate(
+      SendSet node, Name name, ClassElement receiverClass) {
+    // TODO(johnniwinther): Share code with [handleStaticInstanceMemberUpdate]
+    // and [handlePrivateStaticMemberUpdate].
+    registry.registerThrowNoSuchMethod();
+    // TODO(johnniwinther): Produce a different error if [name] is resolves to
+    // a constructor.
+
+    // TODO(johnniwinther): With the simplified [TreeElements] invariant,
+    // try to resolve injected elements if [currentClass] is in the patch
+    // library of [receiverClass].
+
+    // TODO(johnniwinther): Produce a different error for complex update.
+    ErroneousElement error = reportAndCreateErroneousElement(
+        node, name.text, MessageKind.MEMBER_NOT_FOUND,
+        {'className': receiverClass.name, 'memberName': name.text});
+    // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
+    // member access.
+    return handleUpdate(node, name, new StaticAccess.unresolved(error));
   }
 
   /// Handle qualified access of an instance member, like `a.b` or `a.b()` where
@@ -1868,11 +1814,31 @@
     // TODO(johnniwinther): Add an [AccessSemantics] for statically accessed
     // instance members.
     return handleErroneousAccess(
-        node, name, error, new StaticAccess.unresolved(error));
+        node, name, new StaticAccess.unresolved(error));
+  }
+
+  /// Handle qualified update of an instance member, like `a.b = c` or `a.b++`
+  /// where `a` is a class and `b` is a non-static member.
+  ResolutionResult handleStaticInstanceMemberUpdate(
+      SendSet node, Name name, ClassElement receiverClass, Element member) {
+
+    registry.registerThrowNoSuchMethod();
+    // TODO(johnniwinther): With the simplified [TreeElements] invariant,
+    // try to resolve injected elements if [currentClass] is in the patch
+    // library of [receiverClass].
+
+    // TODO(johnniwinther): Produce a different error for complex update.
+    ErroneousElement error = reportAndCreateErroneousElement(
+        node, name.text, MessageKind.MEMBER_NOT_STATIC,
+        {'className': receiverClass.name, 'memberName': name});
+
+    // TODO(johnniwinther): Add an [AccessSemantics] for statically accessed
+    // instance members.
+    return handleUpdate(node, name, new StaticAccess.unresolved(error));
   }
 
   /// Handle qualified access of an inaccessible private static class member,
-  /// like `a._b` or `a.b()` where `a` is class, `_b` is static member of `a`
+  /// like `a._b` or `a._b()` where `a` is class, `_b` is static member of `a`
   /// but `a` is not defined in the current library.
   ResolutionResult handlePrivateStaticMemberAccess(
       Send node, Name name, ClassElement receiverClass, Element member) {
@@ -1884,7 +1850,22 @@
     // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
     // member access.
     return handleErroneousAccess(
-        node, name, error, new StaticAccess.unresolved(error));
+        node, name, new StaticAccess.unresolved(error));
+  }
+
+  /// Handle qualified update of an inaccessible private static class member,
+  /// like `a._b = c` or `a._b++` where `a` is class, `_b` is static member of
+  /// `a` but `a` is not defined in the current library.
+  ResolutionResult handlePrivateStaticMemberUpdate(
+      SendSet node, Name name, ClassElement receiverClass, Element member) {
+    registry.registerThrowNoSuchMethod();
+    ErroneousElement error = reportAndCreateErroneousElement(
+        node, name.text, MessageKind.PRIVATE_ACCESS,
+        {'libraryName': member.library.getLibraryOrScriptName(),
+         'name': name});
+    // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
+    // member access.
+    return handleUpdate(node, name, new StaticAccess.unresolved(error));
   }
 
   /// Handle qualified access to a static member, like `a.b` or `a.b()` where
@@ -1921,6 +1902,31 @@
     }
   }
 
+  /// Handle qualified update to a static member, like `a.b = c` or `a.b++`
+  /// where `a` is a class and `b` is a static member of `a`.
+  ResolutionResult handleStaticMemberUpdate(
+      Send node, Name memberName, ClassElement receiverClass) {
+    String name = memberName.text;
+    receiverClass.ensureResolved(compiler);
+    MembersCreator.computeClassMembersByName(
+        compiler, receiverClass.declaration, name);
+    Element member = receiverClass.lookupLocalMember(name);
+    if (member == null) {
+      return handleUnresolvedStaticMemberUpdate(
+          node, memberName, receiverClass);
+    } else if (member.isAmbiguous) {
+      return handleAmbiguousUpdate(node, memberName, member);
+    } else if (member.isInstanceMember) {
+      return handleStaticInstanceMemberUpdate(
+          node, memberName, receiverClass, member);
+    } else if (memberName.isPrivate && memberName.library != member.library) {
+      return handlePrivateStaticMemberUpdate(
+          node, memberName, receiverClass, member);
+    } else {
+      return handleStaticOrTopLevelUpdate(node, memberName, member);
+    }
+  }
+
   /// Handle access to a type literal of type variable [element]. Like `T` or
   /// `T()` where 'T' is type variable.
   // TODO(johnniwinther): Remove [name] when [Selector] is not required for the
@@ -1931,17 +1937,24 @@
       Send node,
       Name name,
       TypeVariableElement element) {
+    AccessSemantics semantics;
     if (!Elements.hasAccessToTypeVariables(enclosingElement)) {
-      compiler.reportError(node,
-          MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
-          {'typeVariableName': node.selector});
       // TODO(johnniwinther): Add another access semantics for this.
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, name.text,
+          MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+          {'typeVariableName': name},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      semantics = new StaticAccess.invalid(error);
+      // TODO(johnniwinther): Clean up registration of elements and selectors
+      // for this case.
+    } else {
+      semantics = new StaticAccess.typeParameterTypeLiteral(element);
     }
     registry.registerClassUsingVariableExpression(element.enclosingClass);
     registry.registerTypeVariableExpression();
 
-    AccessSemantics semantics =
-        new StaticAccess.typeParameterTypeLiteral(element);
     registry.useElement(node, element);
     registry.registerTypeLiteral(node, element.type);
 
@@ -1949,7 +1962,7 @@
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
       Selector selector = callStructure.callSelector;
-      // TODO(johnniwinther): Remove this when all information goes through
+      // TODO(23998): Remove this when all information goes through
       // the [SendStructure].
       registry.setSelector(node, selector);
 
@@ -1957,13 +1970,52 @@
           new InvokeStructure(semantics, selector));
     } else {
       // TODO(johnniwinther): Avoid the need for a [Selector] here.
-      registry.registerSendStructure(node,
-          new GetStructure(semantics,
-              new Selector(SelectorKind.GETTER, name, CallStructure.NO_ARGS)));
+      registry.registerSendStructure(node, new GetStructure(semantics));
     }
     return const NoneResult();
   }
 
+  /// Handle access to a type literal of type variable [element]. Like `T = b`,
+  /// `T++` or `T += b` where 'T' is type variable.
+  ResolutionResult handleTypeVariableTypeLiteralUpdate(
+      SendSet node,
+      Name name,
+      TypeVariableElement element) {
+    AccessSemantics semantics;
+    if (!Elements.hasAccessToTypeVariables(enclosingElement)) {
+      // TODO(johnniwinther): Add another access semantics for this.
+      ErroneousElement error = reportAndCreateErroneousElement(
+          node, name.text,
+          MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+          {'typeVariableName': name},
+          isError: true);
+      registry.registerCompileTimeError(error);
+      semantics = new StaticAccess.invalid(error);
+    } else {
+      ErroneousElement error;
+      if (node.isIfNullAssignment) {
+        error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.IF_NULL_ASSIGNING_TYPE, const {});
+        // TODO(23998): Remove these when all information goes through
+        // the [SendStructure].
+        registry.useElement(node.selector, element);
+      } else {
+        error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.ASSIGNING_TYPE, const {});
+      }
+
+      // TODO(23998): Remove this when all information goes through
+      // the [SendStructure].
+      registry.useElement(node, error);
+      registry.registerTypeLiteral(node, element.type);
+      registry.registerThrowNoSuchMethod();
+      semantics = new StaticAccess.typeParameterTypeLiteral(element);
+    }
+    return handleUpdate(node, name, semantics);
+  }
+
   /// Handle access to a constant type literal of [type].
   // TODO(johnniwinther): Remove [name] when [Selector] is not required for the
   // the [GetStructure].
@@ -1982,7 +2034,7 @@
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
       Selector selector = callStructure.callSelector;
-      // TODO(johnniwinther): Remove this when all information goes through
+      // TODO(23998): Remove this when all information goes through
       // the [SendStructure].
       registry.setSelector(node, selector);
 
@@ -1998,13 +2050,50 @@
       analyzeConstantDeferred(node, enforceConst: false);
 
       // TODO(johnniwinther): Avoid the need for a [Selector] here.
-      registry.registerSendStructure(node,
-          new GetStructure(semantics,
-              new Selector(SelectorKind.GETTER, name, CallStructure.NO_ARGS)));
+      registry.registerSendStructure(node, new GetStructure(semantics));
       return new ConstantResult(node, semantics.constant);
     }
   }
 
+  /// Handle access to a constant type literal of [type].
+  // TODO(johnniwinther): Remove [name] when [Selector] is not required for the
+  // the [GetStructure].
+  // TODO(johnniwinther): Remove [element] when it is no longer needed for
+  // evaluating constants.
+  ResolutionResult handleConstantTypeLiteralUpdate(
+      SendSet node,
+      Name name,
+      TypeDeclarationElement element,
+      DartType type,
+      ConstantAccess semantics) {
+
+    // TODO(johnniwinther): Remove this when all constants are evaluated.
+    compiler.resolver.constantCompiler.evaluate(semantics.constant);
+
+    ErroneousElement error;
+    if (node.isIfNullAssignment) {
+      error = reportAndCreateErroneousElement(
+          node.selector, name.text,
+          MessageKind.IF_NULL_ASSIGNING_TYPE, const {});
+      // TODO(23998): Remove these when all information goes through
+      // the [SendStructure].
+      registry.setConstant(node.selector, semantics.constant);
+      registry.useElement(node.selector, element);
+    } else {
+      error = reportAndCreateErroneousElement(
+          node.selector, name.text,
+          MessageKind.ASSIGNING_TYPE, const {});
+    }
+
+    // TODO(23998): Remove this when all information goes through
+    // the [SendStructure].
+    registry.useElement(node, error);
+    registry.registerTypeLiteral(node, type);
+    registry.registerThrowNoSuchMethod();
+
+    return handleUpdate(node, name, semantics);
+  }
+
   /// Handle access to a type literal of a typedef. Like `F` or
   /// `F()` where 'F' is typedef.
   ResolutionResult handleTypedefTypeLiteralAccess(
@@ -2018,6 +2107,19 @@
     return handleConstantTypeLiteralAccess(node, name, typdef, type, semantics);
   }
 
+  /// Handle access to a type literal of a typedef. Like `F = b`, `F++` or
+  /// `F += b` where 'F' is typedef.
+  ResolutionResult handleTypedefTypeLiteralUpdate(
+      SendSet node,
+      Name name,
+      TypedefElement typdef) {
+    typdef.ensureResolved(compiler);
+    DartType type = typdef.rawType;
+    ConstantExpression constant = new TypeConstantExpression(type);
+    AccessSemantics semantics = new ConstantAccess.typedefTypeLiteral(constant);
+    return handleConstantTypeLiteralUpdate(node, name, typdef, type, semantics);
+  }
+
   /// Handle access to a type literal of the type 'dynamic'. Like `dynamic` or
   /// `dynamic()`.
   ResolutionResult handleDynamicTypeLiteralAccess(Send node) {
@@ -2031,18 +2133,43 @@
         node, const PublicName('dynamic'), compiler.typeClass, type, semantics);
   }
 
+  /// Handle update to a type literal of the type 'dynamic'. Like `dynamic++` or
+  /// `dynamic = 0`.
+  ResolutionResult handleDynamicTypeLiteralUpdate(SendSet node) {
+    DartType type = const DynamicType();
+    ConstantExpression constant =
+        new TypeConstantExpression(const DynamicType());
+    AccessSemantics semantics = new ConstantAccess.dynamicTypeLiteral(constant);
+    return handleConstantTypeLiteralUpdate(
+        node, const PublicName('dynamic'), compiler.typeClass, type, semantics);
+  }
+
   /// Handle access to a type literal of a class. Like `C` or
   /// `C()` where 'C' is class.
   ResolutionResult handleClassTypeLiteralAccess(
       Send node,
       Name name,
       ClassElement cls) {
+    cls.ensureResolved(compiler);
     DartType type = cls.rawType;
     ConstantExpression constant = new TypeConstantExpression(type);
     AccessSemantics semantics = new ConstantAccess.classTypeLiteral(constant);
     return handleConstantTypeLiteralAccess(node, name, cls, type, semantics);
   }
 
+  /// Handle access to a type literal of a class. Like `C = b`, `C++` or
+  /// `C += b` where 'C' is class.
+  ResolutionResult handleClassTypeLiteralUpdate(
+      SendSet node,
+      Name name,
+      ClassElement cls) {
+    cls.ensureResolved(compiler);
+    DartType type = cls.rawType;
+    ConstantExpression constant = new TypeConstantExpression(type);
+    AccessSemantics semantics = new ConstantAccess.classTypeLiteral(constant);
+    return handleConstantTypeLiteralUpdate(node, name, cls, type, semantics);
+  }
+
   /// Handle a [Send] that resolves to a [prefix]. Like `prefix` in
   /// `prefix.Class` or `prefix` in `prefix()`, the latter being a compile time
   /// error.
@@ -2085,7 +2212,7 @@
   /// like `prefix.toplevelFunction()` or `prefix.Class.staticField` where
   /// `prefix` is a library prefix.
   ResolutionResult handleLibraryPrefixSend(
-      Send node, PrefixElement prefix, Name name) {
+      Send node, Name name, PrefixElement prefix) {
     ResolutionResult result;
     Element member = prefix.lookupLocalMember(name.text);
     if (member == null) {
@@ -2109,6 +2236,34 @@
     return result;
   }
 
+  /// Handle qualified [SendSet] where the receiver resolves to a [prefix],
+  /// like `prefix.toplevelField = b` or `prefix.Class.staticField++` where
+  /// `prefix` is a library prefix.
+  ResolutionResult handleLibraryPrefixSendSet(
+      SendSet node, Name name, PrefixElement prefix) {
+    ResolutionResult result;
+    Element member = prefix.lookupLocalMember(name.text);
+    if (member == null) {
+      registry.registerThrowNoSuchMethod();
+      Element error = reportAndCreateErroneousElement(
+          node, name.text, MessageKind.NO_SUCH_LIBRARY_MEMBER,
+          {'libraryName': prefix.name, 'memberName': name});
+      return handleUpdate(node, name, new StaticAccess.unresolved(error));
+    } else {
+      result = handleResolvedSendSet(node, name, member);
+    }
+    if (result.kind == ResultKind.PREFIX) {
+      // [member] is a class prefix of a static access like `prefix.Class` of
+      // `prefix.Class.foo`. No need to call [handleDeferredAccess]; it will
+      // called on the parent `prefix.Class.foo` node.
+      result = new PrefixResult(prefix, result.element);
+    } else if (prefix.isDeferred &&
+               (member == null || !member.isDeferredLoaderGetter)) {
+      result = handleDeferredAccess(node, prefix, result);
+    }
+    return result;
+  }
+
   /// Handle a [Send] that resolves to a [prefix]. Like `prefix` in
   /// `prefix.Class` or `prefix` in `prefix()`, the latter being a compile time
   /// error.
@@ -2123,11 +2278,12 @@
           MessageKind.PREFIX_AS_EXPRESSION,
           {'prefix': name},
           isError: true);
+      registry.registerCompileTimeError(error);
       return handleErroneousAccess(
-          node, name, error, new StaticAccess.invalid(error));
+          node, name, new StaticAccess.invalid(error));
     }
     if (prefix.isDeferred) {
-      // TODO(johnniwinther): Remove this when deferred access is detected
+      // TODO(23998): Remove this when deferred access is detected
       // through a [SendStructure].
       registry.useElement(node.selector, prefix);
     }
@@ -2141,7 +2297,11 @@
       Send node, Name name, PrefixResult prefixResult) {
     Element element = prefixResult.element;
     if (element.isPrefix) {
-      return handleLibraryPrefixSend(node, element, name);
+      if (node.isConditional) {
+        return handleLibraryPrefix(node, name, element);
+      } else {
+        return handleLibraryPrefixSend(node, name, element);
+      }
     } else {
       assert(element.isClass);
       ResolutionResult result = handleStaticMemberAccess(node, name, element);
@@ -2152,6 +2312,27 @@
     }
   }
 
+  /// Handle qualified [SendSet] where the receiver resolves to an [Element],
+  /// like `a.b = c` where `a` is a prefix or a class.
+  ResolutionResult handlePrefixSendSet(
+      SendSet node, Name name, PrefixResult prefixResult) {
+    Element element = prefixResult.element;
+    if (element.isPrefix) {
+      if (node.isConditional) {
+        return handleLibraryPrefix(node, name, element);
+      } else {
+        return handleLibraryPrefixSendSet(node, name, element);
+      }
+    } else {
+      assert(element.isClass);
+      ResolutionResult result = handleStaticMemberUpdate(node, name, element);
+      if (prefixResult.isDeferred) {
+        result = handleDeferredAccess(node, prefixResult.prefix, result);
+      }
+      return result;
+    }
+  }
+
   /// Handle dynamic access of [semantics].
   ResolutionResult handleDynamicAccessSemantics(
       Send node, Name name, AccessSemantics semantics) {
@@ -2160,40 +2341,53 @@
     if (node.isCall) {
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
-      selector = new Selector(SelectorKind.CALL, name, callStructure);
+      selector = new Selector.call(name, callStructure);
       registry.registerDynamicInvocation(
           new UniverseSelector(selector, null));
       sendStructure = new InvokeStructure(semantics, selector);
     } else {
       assert(invariant(node, node.isPropertyAccess));
-      selector = new Selector(
-          SelectorKind.GETTER, name, CallStructure.NO_ARGS);
+      selector = new Selector.getter(name);
       registry.registerDynamicGetter(
           new UniverseSelector(selector, null));
-      sendStructure = new GetStructure(semantics, selector);
+      sendStructure = new GetStructure(semantics);
     }
     registry.registerSendStructure(node, sendStructure);
-    // TODO(johnniwinther): Remove this when all information goes through
+    // TODO(23998): Remove this when all information goes through
     // the [SendStructure].
     registry.setSelector(node, selector);
     return const NoneResult();
   }
 
-  /// Handle dynamic property access, like `a.b` or `a.b()` where `a` is not a
-  /// prefix or class.
-  ResolutionResult handleDynamicPropertyAccess(Send node, Name name) {
-    AccessSemantics semantics =
-        new DynamicAccess.dynamicProperty(node.receiver);
-    return handleDynamicAccessSemantics(node, name, semantics);
-  }
+  /// Handle dynamic update of [semantics].
+  ResolutionResult handleDynamicUpdateSemantics(
+      SendSet node, Name name, Element element, AccessSemantics semantics) {
+    Selector getterSelector = new Selector.getter(name);
+    Selector setterSelector = new Selector.setter(name.setter);
+    registry.registerDynamicSetter(
+        new UniverseSelector(setterSelector, null));
+    if (node.isComplex) {
+      registry.registerDynamicGetter(
+          new UniverseSelector(getterSelector, null));
+    }
 
-  /// Handle conditional access, like `a?.b` or `a?.b()`.
-  ResolutionResult handleConditionalAccess(Send node, Name name) {
-    Node receiver = node.receiver;
-    visitConditionalPrefix(receiver);
-    AccessSemantics semantics =
-        new DynamicAccess.ifNotNullProperty(receiver);
-    return handleDynamicAccessSemantics(node, name, semantics);
+    // TODO(23998): Remove these when elements are only accessed through the
+    // send structure.
+    Element getter = element;
+    Element setter = element;
+    if (element != null && element.isAbstractField) {
+      AbstractFieldElement abstractField = element;
+      getter = abstractField.getter;
+      setter = abstractField.setter;
+    }
+    if (setter != null) {
+      registry.useElement(node, setter);
+      if (getter != null && node.isComplex) {
+        registry.useElement(node.selector, getter);
+      }
+    }
+
+    return handleUpdate(node, name, semantics);
   }
 
   /// Handle `this` as a qualified property, like `a.this`.
@@ -2203,8 +2397,9 @@
         name.text,
         MessageKind.THIS_PROPERTY, {},
         isError: true);
+    registry.registerCompileTimeError(error);
     AccessSemantics accessSemantics = new StaticAccess.invalid(error);
-    return handleErroneousAccess(node, name, error, accessSemantics);
+    return handleErroneousAccess(node, name, accessSemantics);
   }
 
   /// Handle a qualified [Send], that is where the receiver is non-null, like
@@ -2218,21 +2413,60 @@
     } else if (node.isSuperCall) {
       return handleSuperPropertyAccess(node, name);
     } else if (node.receiver.isThis()) {
-      if (checkThisAccess(node)) {
+      AccessSemantics semantics = checkThisAccess(node);
+      if (semantics == null) {
         return handleThisPropertyAccess(node, name);
+      } else {
+        // TODO(johnniwinther): Handle invalid this access as an
+        // [AccessSemantics].
+        return handleErroneousAccess(node, name, semantics);
       }
-      // TODO(johnniwinther): Handle invalid this access as an
-      // [AccessSemantics].
-      return const NoneResult();
-    } else if (node.isConditional) {
-      return handleConditionalAccess(node, name);
     }
     ResolutionResult result = visitExpressionPrefix(node.receiver);
     if (result.kind == ResultKind.PREFIX) {
       return handlePrefixSend(node, name, result);
+    } else if (node.isConditional) {
+      return handleDynamicAccessSemantics(
+          node, name, new DynamicAccess.ifNotNullProperty(name));
     } else {
+      // Handle dynamic property access, like `a.b` or `a.b()` where `a` is not
+      // a prefix or class.
       // TODO(johnniwinther): Use the `element` of [result].
-      return handleDynamicPropertyAccess(node, name);
+      return handleDynamicAccessSemantics(
+          node, name, new DynamicAccess.dynamicProperty(name));
+    }
+  }
+
+  /// Handle a qualified [SendSet], that is where the receiver is non-null, like
+  /// `a.b = c`, `a.b++`, and `a.b += c`.
+  ResolutionResult handleQualifiedSendSet(SendSet node) {
+    Identifier selector = node.selector.asIdentifier();
+    String text = selector.source;
+    Name name = new Name(text, enclosingElement.library);
+    if (text == 'this') {
+      return handleQualifiedThisAccess(node, name);
+    } else if (node.receiver.isThis()) {
+      AccessSemantics semantics = checkThisAccess(node);
+      if (semantics == null) {
+        return handleThisPropertyUpdate(node, name, null);
+      } else {
+        // TODO(johnniwinther): Handle invalid this access as an
+        // [AccessSemantics].
+        return handleUpdate(node, name, semantics);
+      }
+    }
+    ResolutionResult result = visitExpressionPrefix(node.receiver);
+    if (result.kind == ResultKind.PREFIX) {
+      return handlePrefixSendSet(node, name, result);
+    } else if (node.isConditional) {
+      return handleDynamicUpdateSemantics(
+          node, name, null, new DynamicAccess.ifNotNullProperty(name));
+    } else {
+      // Handle dynamic property access, like `a.b = c`, `a.b++` or `a.b += c`
+      // where `a` is not a prefix or class.
+      // TODO(johnniwinther): Use the `element` of [result].
+      return handleDynamicUpdateSemantics(
+          node, name, null, new DynamicAccess.dynamicProperty(name));
     }
   }
 
@@ -2241,34 +2475,31 @@
         Send node, Name name, Element element) {
     // TODO(johnniwinther): Support unresolved top level access as an
     // [AccessSemantics].
-    AccessSemantics accessSemantics = new StaticAccess.unresolved(element);
-    return handleErroneousAccess(node, name, element, accessSemantics);
+    AccessSemantics semantics = new StaticAccess.unresolved(element);
+    return handleErroneousAccess(node, name, semantics);
   }
 
-  /// Handle erroneous access of [element] of the given [accessSemantics].
+  /// Handle erroneous access of [element] of the given [semantics].
   ResolutionResult handleErroneousAccess(
-      Send node, Name name, Element element, AccessSemantics accessSemantics) {
+      Send node, Name name, AccessSemantics semantics) {
     SendStructure sendStructure;
     Selector selector;
     if (node.isCall) {
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
-      selector = new Selector(SelectorKind.CALL, name, callStructure);
-      registry.registerDynamicInvocation(
-          new UniverseSelector(selector, null));
-      sendStructure = new InvokeStructure(accessSemantics, selector);
+      selector = new Selector.call(name, callStructure);
+      registry.registerDynamicInvocation(new UniverseSelector(selector, null));
+      sendStructure = new InvokeStructure(semantics, selector);
     } else {
       assert(invariant(node, node.isPropertyAccess));
-      selector = new Selector(
-          SelectorKind.GETTER, name, CallStructure.NO_ARGS);
-      registry.registerDynamicGetter(
-          new UniverseSelector(selector, null));
-      sendStructure = new GetStructure(accessSemantics, selector);
+      selector = new Selector.getter(name);
+      registry.registerDynamicGetter(new UniverseSelector(selector, null));
+      sendStructure = new GetStructure(semantics);
     }
-    // TODO(johnniwinther): Remove this when all information goes through
+    // TODO(23998): Remove this when all information goes through
     // the [SendStructure].
     registry.setSelector(node, selector);
-    registry.useElement(node, element);
+    registry.useElement(node, semantics.element);
     registry.registerSendStructure(node, sendStructure);
     return const NoneResult();
   }
@@ -2288,25 +2519,39 @@
     registry.registerThrowNoSuchMethod();
 
     // TODO(johnniwinther): Support ambiguous access as an [AccessSemantics].
-    AccessSemantics accessSemantics = new StaticAccess.unresolved(error);
-    return handleErroneousAccess(node, name, error, accessSemantics);
+    AccessSemantics semantics = new StaticAccess.unresolved(error);
+    return handleErroneousAccess(node, name, semantics);
   }
 
-  /// Handle access of an instance [member] from a non-instance context.
-  ResolutionResult handleStaticInstanceSend(
-      Send node, Name name, MemberElement member) {
-    compiler.reportError(
-        node, MessageKind.NO_INSTANCE_AVAILABLE, {'name': member.name});
-    ErroneousElement error = new ErroneousElementX(
-        MessageKind.NO_INSTANCE_AVAILABLE,
-        {'name': name},
-        name.text,
-        enclosingElement);
+  /// Handle update to an ambiguous element, that is, a name imported twice.
+  ResolutionResult handleAmbiguousUpdate(
+      SendSet node,
+      Name name,
+      AmbiguousElement element) {
 
+    ErroneousElement error = reportAndCreateErroneousElement(
+        node,
+        name.text,
+        element.messageKind,
+        element.messageArguments);
+    element.diagnose(enclosingElement, compiler);
+    registry.registerThrowNoSuchMethod();
+
+    // TODO(johnniwinther): Support ambiguous access as an [AccessSemantics].
+    AccessSemantics accessSemantics = new StaticAccess.unresolved(error);
+    return handleUpdate(node, name, accessSemantics);
+  }
+
+  /// Report access of an instance [member] from a non-instance context.
+  AccessSemantics reportStaticInstanceAccess(Send node, Name name) {
+    ErroneousElement error = reportAndCreateErroneousElement(
+        node, name.text,
+        MessageKind.NO_INSTANCE_AVAILABLE, {'name': name},
+        isError: true);
     // TODO(johnniwinther): Support static instance access as an
     // [AccessSemantics].
-    AccessSemantics accessSemantics = new StaticAccess.unresolved(error);
-    return handleErroneousAccess(node, name, error, accessSemantics);
+    registry.registerCompileTimeError(error);
+    return new StaticAccess.invalid(error);
   }
 
   /// Handle access of a parameter, local variable or local function.
@@ -2317,7 +2562,7 @@
     if (node.isCall) {
       CallStructure callStructure =
           resolveArguments(node.argumentsNode).callStructure;
-      selector = new Selector(SelectorKind.CALL, name, callStructure);
+      selector = new Selector.call(name, callStructure);
       bool isIncompatibleInvoke = false;
       switch (semantics.kind) {
         case AccessKind.LOCAL_FUNCTION:
@@ -2389,12 +2634,11 @@
               "Unexpected local access $semantics.");
           break;
       }
-      selector = new Selector(SelectorKind.GETTER, name, CallStructure.NO_ARGS);
-      registry.registerSendStructure(node,
-          new GetStructure(semantics, selector));
+      selector = new Selector.getter(name);
+      registry.registerSendStructure(node, new GetStructure(semantics));
     }
 
-    // TODO(johnniwinther): Remove these when all information goes through
+    // TODO(23998): Remove these when all information goes through
     // the [SendStructure].
     registry.useElement(node, element);
     registry.setSelector(node, selector);
@@ -2404,6 +2648,56 @@
     return result;
   }
 
+  /// Handle update of a parameter, local variable or local function.
+  ResolutionResult handleLocalUpdate(Send node, Name name, Element element) {
+    AccessSemantics semantics;
+    ErroneousElement error;
+    if (element.isParameter) {
+      if (element.isFinal) {
+        error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+        semantics = new StaticAccess.finalParameter(element);
+      } else {
+        semantics = new StaticAccess.parameter(element);
+      }
+    } else if (element.isVariable) {
+      if (element.isFinal || element.isConst) {
+        error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+        semantics = new StaticAccess.finalLocalVariable(element);
+      } else {
+        semantics = new StaticAccess.localVariable(element);
+      }
+    } else {
+      assert(invariant(node, element.isFunction,
+          message: "Unexpected local $element."));
+      error = reportAndCreateErroneousElement(
+          node.selector, name.text,
+          MessageKind.ASSIGNING_METHOD, const {});
+      semantics = new StaticAccess.localFunction(element);
+    }
+    if (isPotentiallyMutableTarget(element)) {
+      registry.registerPotentialMutation(element, node);
+      if (enclosingElement != element.enclosingElement) {
+        registry.registerPotentialMutationInClosure(element, node);
+      }
+      for (Node scope in promotionScope) {
+        registry.registerPotentialMutationIn(scope, element, node);
+      }
+    }
+
+    ResolutionResult result = handleUpdate(node, name, semantics);
+    if (error != null) {
+      registry.registerThrowNoSuchMethod();
+      // TODO(23998): Remove this when all information goes through
+      // the [SendStructure].
+      registry.useElement(node, error);
+    }
+    return result;
+  }
+
   /// Handle access of a static or top level [element].
   ResolutionResult handleStaticOrTopLevelAccess(
         Send node, Name name, Element element) {
@@ -2439,7 +2733,7 @@
       ArgumentsResult argumentsResult =
           resolveArguments(node.argumentsNode);
       CallStructure callStructure = argumentsResult.callStructure;
-      selector = new Selector(SelectorKind.CALL, name, callStructure);
+      selector = new Selector.call(name, callStructure);
 
       bool isIncompatibleInvoke = false;
       switch (semantics.kind) {
@@ -2493,7 +2787,7 @@
               ? new IncompatibleInvokeStructure(semantics, selector)
               : new InvokeStructure(semantics, selector));
     } else {
-      selector = new Selector(SelectorKind.GETTER, name, CallStructure.NO_ARGS);
+      selector = new Selector.getter(name);
       switch (semantics.kind) {
         case AccessKind.STATIC_METHOD:
         case AccessKind.TOPLEVEL_METHOD:
@@ -2523,8 +2817,7 @@
               "Unexpected statically resolved access $semantics.");
           break;
       }
-      registry.registerSendStructure(node,
-          new GetStructure(semantics, selector));
+      registry.registerSendStructure(node, new GetStructure(semantics));
       if (member.isConst) {
         FieldElement field = member;
         result = new ConstantResult(
@@ -2534,7 +2827,7 @@
       }
     }
 
-    // TODO(johnniwinther): Remove these when all information goes through
+    // TODO(23998): Remove these when all information goes through
     // the [SendStructure].
     registry.useElement(node, member);
     registry.setSelector(node, selector);
@@ -2542,6 +2835,109 @@
     return result;
   }
 
+  /// Handle update of a static or top level [element].
+  ResolutionResult handleStaticOrTopLevelUpdate(
+        SendSet node, Name name, Element element) {
+    AccessSemantics semantics;
+    if (element.isAbstractField) {
+      AbstractFieldElement abstractField = element;
+      if (abstractField.setter == null) {
+        ErroneousElement error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.CANNOT_RESOLVE_SETTER, const {});
+        registry.registerThrowNoSuchMethod();
+
+        if (node.isComplex) {
+          // `a++` or `a += b` where `a` has no setter.
+          semantics = new CompoundAccessSemantics(
+              element.isTopLevel
+                  ? CompoundAccessKind.UNRESOLVED_TOPLEVEL_SETTER
+                  : CompoundAccessKind.UNRESOLVED_STATIC_SETTER,
+              abstractField.getter,
+              error);
+        } else {
+          // `a = b` where `a` has no setter.
+          semantics = element.isTopLevel
+              ? new StaticAccess.topLevelGetter(abstractField.getter)
+              : new StaticAccess.staticGetter(abstractField.getter);
+        }
+        registry.registerStaticUse(abstractField.getter);
+      } else if (node.isComplex) {
+        if (abstractField.getter == null) {
+          ErroneousElement error = reportAndCreateErroneousElement(
+              node.selector, name.text,
+              MessageKind.CANNOT_RESOLVE_GETTER, const {});
+          registry.registerThrowNoSuchMethod();
+          // `a++` or `a += b` where `a` has no getter.
+          semantics = new CompoundAccessSemantics(
+              element.isTopLevel
+                  ? CompoundAccessKind.UNRESOLVED_TOPLEVEL_GETTER
+                  : CompoundAccessKind.UNRESOLVED_STATIC_GETTER,
+              error,
+              abstractField.setter);
+          registry.registerStaticUse(abstractField.setter);
+        } else {
+          // `a++` or `a += b` where `a` has both a getter and a setter.
+          semantics = new CompoundAccessSemantics(
+              element.isTopLevel
+                  ? CompoundAccessKind.TOPLEVEL_GETTER_SETTER
+                  : CompoundAccessKind.STATIC_GETTER_SETTER,
+              abstractField.getter,
+              abstractField.setter);
+          registry.registerStaticUse(abstractField.getter);
+          registry.registerStaticUse(abstractField.setter);
+        }
+      } else {
+        // `a = b` where `a` has a setter.
+        semantics = element.isTopLevel
+            ? new StaticAccess.topLevelSetter(abstractField.setter)
+            : new StaticAccess.staticSetter(abstractField.setter);
+        registry.registerStaticUse(abstractField.setter);
+      }
+    } else {
+      MemberElement member = element;
+      // TODO(johnniwinther): Needed to provoke a parsing and with it discovery
+      // of parse errors to make [element] erroneous. Fix this!
+      member.computeType(compiler);
+      registry.registerStaticUse(member);
+      if (member.isErroneous) {
+        // [member] has parse errors.
+        semantics = new StaticAccess.unresolved(member);
+      } else if (member.isFunction) {
+        // `a = b`, `a++` or `a += b` where `a` is a function.
+        ErroneousElement error = reportAndCreateErroneousElement(
+            node.selector, name.text,
+            MessageKind.ASSIGNING_METHOD, const {});
+        registry.registerThrowNoSuchMethod();
+        if (node.isComplex) {
+          // `a++` or `a += b` where `a` is a function.
+          registry.registerGetOfStaticFunction(element);
+        }
+        semantics = member.isTopLevel
+            ? new StaticAccess.topLevelMethod(member)
+            : new StaticAccess.staticMethod(member);
+      } else {
+        // `a = b`, `a++` or `a += b` where `a` is a field.
+        assert(invariant(node, member.isField,
+            message: "Unexpected element: $member."));
+        if (member.isFinal || member.isConst) {
+          ErroneousElement error = reportAndCreateErroneousElement(
+               node.selector, name.text,
+               MessageKind.CANNOT_RESOLVE_SETTER, const {});
+          registry.registerThrowNoSuchMethod();
+          semantics = member.isTopLevel
+              ? new StaticAccess.finalTopLevelField(member)
+              : new StaticAccess.finalStaticField(member);
+        } else {
+          semantics = member.isTopLevel
+              ? new StaticAccess.topLevelField(member)
+              : new StaticAccess.staticField(member);
+        }
+      }
+    }
+    return handleUpdate(node, name, semantics);
+  }
+
   /// Handle access to resolved [element].
   ResolutionResult handleResolvedSend(Send node, Name name, Element element) {
     if (element.isAmbiguous) {
@@ -2553,7 +2949,7 @@
       // [isErroneous] to `true`.
       assert(invariant(node, element is! ErroneousElement,
           message: "Unexpected erroneous element $element."));
-      return handleErroneousAccess(node, name, element,
+      return handleErroneousAccess(node, name,
           new StaticAccess.unresolved(element));
     }
     if (element.isInstanceMember) {
@@ -2561,7 +2957,8 @@
         // TODO(johnniwinther): Maybe use the found [element].
         return handleThisPropertyAccess(node, name);
       } else {
-        return handleStaticInstanceSend(node, name, element);
+        return handleErroneousAccess(
+            node, name, reportStaticInstanceAccess(node, name));
       }
     }
     if (element.isClass) {
@@ -2582,6 +2979,44 @@
     return internalError(node, "Unexpected resolved send: $element");
   }
 
+  /// Handle update to resolved [element].
+  ResolutionResult handleResolvedSendSet(
+      SendSet node, Name name, Element element) {
+    if (element.isAmbiguous) {
+      return handleAmbiguousUpdate(node, name, element);
+    }
+    if (element.isErroneous) {
+      // This handles elements with parser errors.
+      // TODO(johnniwinther): Elements with parse error should not set
+      // [isErroneous] to `true`.
+      assert(invariant(node, element is! ErroneousElement,
+          message: "Unexpected erroneous element $element."));
+      return handleUpdate(node, name,new StaticAccess.unresolved(element));
+    }
+    if (element.isInstanceMember) {
+      if (inInstanceContext) {
+        return handleThisPropertyUpdate(node, name, element);
+      } else {
+        return handleUpdate(node, name, reportStaticInstanceAccess(node, name));
+      }
+    }
+    if (element.isClass) {
+      // `C = b`, `C++`, or 'C += b` where 'C' is a class.
+      return handleClassTypeLiteralUpdate(node, name, element);
+    } else if (element.isTypedef) {
+      // `C = b`, `C++`, or 'C += b` where 'F' is a typedef.
+      return handleTypedefTypeLiteralUpdate(node, name, element);
+    } else if (element.isTypeVariable) {
+      // `T = b`, `T++`, or 'T += b` where 'T' is a type variable.
+      return handleTypeVariableTypeLiteralUpdate(node, name, element);
+    } else if (element.isLocal) {
+      return handleLocalUpdate(node, name, element);
+    } else if (element.isStatic || element.isTopLevel) {
+      return handleStaticOrTopLevelUpdate(node, name, element);
+    }
+    return internalError(node, "Unexpected resolved send: $element");
+  }
+
   /// Handle an unqualified [Send], that is where the `node.receiver` is null,
   /// like `a`, `a()`, `this()`, `assert()`, and `(){}()`.
   ResolutionResult handleUnqualifiedSend(Send node) {
@@ -2619,6 +3054,31 @@
     }
   }
 
+  /// Handle an unqualified [SendSet], that is where the `node.receiver` is
+  /// null, like `a = b`, `a++`, and `a += b`.
+  ResolutionResult handleUnqualifiedSendSet(SendSet node) {
+    Identifier selector = node.selector.asIdentifier();
+    String text = selector.source;
+    Name name = new Name(text, enclosingElement.library);
+    Element element = lookupInScope(compiler, node, scope, text);
+    if (element == null) {
+      if (text == 'dynamic') {
+        // `dynamic = b`, `dynamic++`, or `dynamic += b` where 'dynamic' is not
+        // declared in the current scope.
+        return handleDynamicTypeLiteralUpdate(node);
+      } else if (inInstanceContext) {
+        // Left-hand side is implicitly `this.name`.
+        return handleThisPropertyUpdate(node, name, null);
+      } else {
+        // Create [ErroneousElement] for unresolved access.
+        ErroneousElement error = reportCannotResolve(node, text);
+        return handleUpdate(node, name, new StaticAccess.unresolved(error));
+      }
+    } else {
+      return handleResolvedSendSet(node, name, element);
+    }
+  }
+
   ResolutionResult visitSend(Send node) {
     if (node.isOperator) {
       // `a && b`, `a + b`, `-a`, or `a is T`.
@@ -2681,16 +3141,16 @@
     Node index = node.arguments.head;
     visitExpression(receiver);
     visitExpression(index);
+    AccessSemantics semantics = const DynamicAccess.expression();
     if (node.isPrefix || node.isPostfix) {
       // `a[b]++` or `++a[b]`.
       IncDecOperator operator = IncDecOperator.parse(operatorText);
-      AccessSemantics semantics = new DynamicAccess.dynamicProperty(receiver);
       Selector getterSelector = new Selector.index();
       Selector setterSelector = new Selector.indexSet();
       Selector operatorSelector =
           new Selector.binaryOperator(operator.selectorName);
 
-      // TODO(johnniwinther): Remove these when selectors are only accessed
+      // TODO(23998): Remove these when selectors are only accessed
       // through the send structure.
       registry.setGetterSelectorInComplexSendSet(node, getterSelector);
       registry.setSelector(node, setterSelector);
@@ -2704,10 +3164,8 @@
           new UniverseSelector(operatorSelector, null));
 
       SendStructure sendStructure = node.isPrefix
-          ? new IndexPrefixStructure(
-              semantics, operator, getterSelector, setterSelector)
-          : new IndexPostfixStructure(
-              semantics, operator, getterSelector, setterSelector);
+          ? new IndexPrefixStructure(semantics, operator)
+          : new IndexPostfixStructure(semantics, operator);
       registry.registerSendStructure(node, sendStructure);
       return const NoneResult();
     } else {
@@ -2717,28 +3175,25 @@
       AssignmentOperator operator = AssignmentOperator.parse(operatorText);
       if (operator.kind == AssignmentOperatorKind.ASSIGN) {
         // `a[b] = c`.
-        AccessSemantics semantics = new DynamicAccess.dynamicProperty(receiver);
         Selector setterSelector = new Selector.indexSet();
 
-        // TODO(johnniwinther): Remove this when selectors are only accessed
+        // TODO(23998): Remove this when selectors are only accessed
         // through the send structure.
         registry.setSelector(node, setterSelector);
         registry.registerDynamicInvocation(
             new UniverseSelector(setterSelector, null));
 
-        SendStructure sendStructure =
-            new IndexSetStructure(semantics, setterSelector);
+        SendStructure sendStructure = new IndexSetStructure(semantics);
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       } else {
         // `a[b] += c`.
-        AccessSemantics semantics = new DynamicAccess.dynamicProperty(receiver);
         Selector getterSelector = new Selector.index();
         Selector setterSelector = new Selector.indexSet();
         Selector operatorSelector =
             new Selector.binaryOperator(operator.selectorName);
 
-        // TODO(johnniwinther): Remove these when selectors are only accessed
+        // TODO(23998): Remove these when selectors are only accessed
         // through the send structure.
         registry.setGetterSelectorInComplexSendSet(node, getterSelector);
         registry.setSelector(node, setterSelector);
@@ -2751,8 +3206,8 @@
         registry.registerDynamicInvocation(
             new UniverseSelector(operatorSelector, null));
 
-        SendStructure sendStructure = new CompoundIndexSetStructure(
-                semantics, operator, getterSelector, setterSelector);
+        SendStructure sendStructure =
+            new CompoundIndexSetStructure(semantics, operator);
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       }
@@ -2775,7 +3230,7 @@
       Selector operatorSelector =
           new Selector.binaryOperator(operator.selectorName);
 
-      // TODO(johnniwinther): Remove these when selectors are only accessed
+      // TODO(23998): Remove these when selectors are only accessed
       // through the send structure.
       registry.setGetterSelectorInComplexSendSet(node, getterSelector);
       registry.setSelector(node, setterSelector);
@@ -2783,12 +3238,12 @@
 
       if (semantics == null) {
         semantics = computeSuperAccessSemanticsForSelectors(
-            node, getterSelector, setterSelector);
+            node, getterSelector, setterSelector, isIndex: true);
 
         registry.registerStaticInvocation(semantics.getter);
         registry.registerStaticInvocation(semantics.setter);
 
-        // TODO(johnniwinther): Remove these when elements are only accessed
+        // TODO(23998): Remove these when elements are only accessed
         // through the send structure.
         registry.useElement(node, semantics.setter);
         registry.useElement(node.selector, semantics.getter);
@@ -2797,10 +3252,8 @@
           new UniverseSelector(operatorSelector, null));
 
       SendStructure sendStructure = node.isPrefix
-          ? new IndexPrefixStructure(
-              semantics, operator, getterSelector, setterSelector)
-          : new IndexPostfixStructure(
-              semantics, operator, getterSelector, setterSelector);
+          ? new IndexPrefixStructure(semantics, operator)
+          : new IndexPostfixStructure(semantics, operator);
       registry.registerSendStructure(node, sendStructure);
       return const NoneResult();
     } else {
@@ -2815,18 +3268,17 @@
           semantics =
               computeSuperAccessSemanticsForSelector(node, setterSelector);
 
-          // TODO(johnniwinther): Remove these when elements are only accessed
+          // TODO(23998): Remove these when elements are only accessed
           // through the send structure.
           registry.useElement(node, semantics.setter);
         }
 
-        // TODO(johnniwinther): Remove this when selectors are only accessed
+        // TODO(23998): Remove this when selectors are only accessed
         // through the send structure.
         registry.setSelector(node, setterSelector);
         registry.registerStaticInvocation(semantics.setter);
 
-        SendStructure sendStructure =
-            new IndexSetStructure(semantics, setterSelector);
+        SendStructure sendStructure = new IndexSetStructure(semantics);
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       } else {
@@ -2837,18 +3289,18 @@
             new Selector.binaryOperator(operator.selectorName);
         if (semantics == null) {
           semantics = computeSuperAccessSemanticsForSelectors(
-              node, getterSelector, setterSelector);
+              node, getterSelector, setterSelector, isIndex: true);
 
           registry.registerStaticInvocation(semantics.getter);
           registry.registerStaticInvocation(semantics.setter);
 
-          // TODO(johnniwinther): Remove these when elements are only accessed
+          // TODO(23998): Remove these when elements are only accessed
           // through the send structure.
           registry.useElement(node, semantics.setter);
           registry.useElement(node.selector, semantics.getter);
         }
 
-        // TODO(johnniwinther): Remove these when selectors are only accessed
+        // TODO(23998): Remove these when selectors are only accessed
         // through the send structure.
         registry.setGetterSelectorInComplexSendSet(node, getterSelector);
         registry.setSelector(node, setterSelector);
@@ -2857,156 +3309,186 @@
         registry.registerDynamicInvocation(
             new UniverseSelector(operatorSelector, null));
 
-        SendStructure sendStructure = new CompoundIndexSetStructure(
-                semantics, operator, getterSelector, setterSelector);
+        SendStructure sendStructure =
+            new CompoundIndexSetStructure(semantics, operator);
         registry.registerSendStructure(node, sendStructure);
         return const NoneResult();
       }
     }
   }
 
+  /// Handle super index operations like `super.a = b`, `super.a += b`, and
+  /// `super.a++`.
+  // TODO(johnniwinther): Share code with [handleSuperIndexSendSet].
+  ResolutionResult handleSuperSendSet(SendSet node) {
+    Identifier selector = node.selector.asIdentifier();
+    String text = selector.source;
+    Name name = new Name(text, enclosingElement.library);
+    String operatorText = node.assignmentOperator.source;
+    Selector getterSelector = new Selector.getter(name);
+    Selector setterSelector = new Selector.setter(name);
+    AccessSemantics semantics = checkSuperAccess(node);
+    if (node.isPrefix || node.isPostfix) {
+      // `super.a++` or `++super.a`.
+      if (semantics == null) {
+        semantics = computeSuperAccessSemanticsForSelectors(
+            node, getterSelector, setterSelector);
+        registry.registerStaticInvocation(semantics.getter);
+        registry.registerStaticInvocation(semantics.setter);
+      }
+      return handleUpdate(node, name, semantics);
+    } else {
+      AssignmentOperator operator = AssignmentOperator.parse(operatorText);
+      if (operator.kind == AssignmentOperatorKind.ASSIGN) {
+        // `super.a = b`.
+        if (semantics == null) {
+          semantics =
+              computeSuperAccessSemanticsForSelector(
+                  node, setterSelector, alternateName: name);
+          registry.registerStaticInvocation(semantics.setter);
+          switch (semantics.kind) {
+            case AccessKind.SUPER_FINAL_FIELD:
+              compiler.reportWarning(
+                  node,
+                  MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
+                  {'name': name,
+                   'superclassName': semantics.setter.enclosingClass.name});
+              // TODO(johnniwinther): This shouldn't be needed.
+              registry.registerDynamicInvocation(
+                  new UniverseSelector(setterSelector, null));
+              registry.registerSuperNoSuchMethod();
+              break;
+            case AccessKind.SUPER_METHOD:
+              compiler.reportWarning(
+                  node, MessageKind.ASSIGNING_METHOD_IN_SUPER,
+                  {'name': name,
+                   'superclassName': semantics.setter.enclosingClass.name});
+              // TODO(johnniwinther): This shouldn't be needed.
+              registry.registerDynamicInvocation(
+                  new UniverseSelector(setterSelector, null));
+              registry.registerSuperNoSuchMethod();
+              break;
+            default:
+              registry.registerStaticInvocation(semantics.setter);
+              break;
+          }
+        }
+        return handleUpdate(node, name, semantics);
+      } else {
+        // `super.a += b`.
+        if (semantics == null) {
+          semantics = computeSuperAccessSemanticsForSelectors(
+              node, getterSelector, setterSelector);
+          registry.registerStaticInvocation(semantics.getter);
+          registry.registerStaticInvocation(semantics.setter);
+        }
+        return handleUpdate(node, name, semantics);
+      }
+    }
+  }
+
+  /// Handle update of an entity defined by [semantics]. For instance `a = b`,
+  /// `a++` or `a += b` where [semantics] describe `a`.
+  ResolutionResult handleUpdate(
+      SendSet node,
+      Name name,
+      AccessSemantics semantics) {
+    SendStructure sendStructure;
+    String operatorText = node.assignmentOperator.source;
+    Selector getterSelector = new Selector.getter(name);
+    Selector setterSelector = new Selector.setter(name);
+    if (node.isPrefix || node.isPostfix) {
+      // `e++` or `++e`.
+      IncDecOperator operator = IncDecOperator.parse(operatorText);
+      Selector operatorSelector =
+          new Selector.binaryOperator(operator.selectorName);
+
+      // TODO(23998): Remove these when selectors are only accessed
+      // through the send structure.
+      registry.setGetterSelectorInComplexSendSet(node, getterSelector);
+      registry.setSelector(node, setterSelector);
+      registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
+
+      // TODO(23998): Remove these when elements are only accessed
+      // through the send structure.
+      registry.useElement(node, semantics.setter);
+      registry.useElement(node.selector, semantics.getter);
+
+      registry.registerDynamicInvocation(
+          new UniverseSelector(operatorSelector, null));
+
+      SendStructure sendStructure = node.isPrefix
+          ? new PrefixStructure(semantics, operator)
+          : new PostfixStructure(semantics, operator);
+      registry.registerSendStructure(node, sendStructure);
+    } else {
+      Node rhs = node.arguments.head;
+      visitExpression(rhs);
+
+      AssignmentOperator operator = AssignmentOperator.parse(operatorText);
+      if (operator.kind == AssignmentOperatorKind.ASSIGN) {
+        // `e1 = e2`.
+
+        // TODO(23998): Remove these when elements are only accessed
+        // through the send structure.
+        registry.useElement(node, semantics.setter);
+
+        // TODO(23998): Remove this when selectors are only accessed
+        // through the send structure.
+        registry.setSelector(node, setterSelector);
+
+        SendStructure sendStructure = new SetStructure(semantics);
+        registry.registerSendStructure(node, sendStructure);
+      } else {
+        // `e1 += e2`.
+        Selector operatorSelector =
+            new Selector.binaryOperator(operator.selectorName);
+
+        // TODO(23998): Remove these when elements are only accessed
+        // through the send structure.
+        registry.useElement(node, semantics.setter);
+        registry.useElement(node.selector, semantics.getter);
+
+        // TODO(23998): Remove these when selectors are only accessed
+        // through the send structure.
+        registry.setGetterSelectorInComplexSendSet(node, getterSelector);
+        registry.setSelector(node, setterSelector);
+        registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
+
+        registry.registerDynamicInvocation(
+            new UniverseSelector(operatorSelector, null));
+
+        SendStructure sendStructure;
+        if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+          sendStructure = new SetIfNullStructure(semantics);
+        } else {
+          sendStructure = new CompoundStructure(semantics, operator);
+        }
+        registry.registerSendStructure(node, sendStructure);
+      }
+    }
+    return new ResolutionResult.forElement(semantics.setter);
+  }
+
   ResolutionResult visitSendSet(SendSet node) {
     if (node.isIndex) {
+      // `a[b] = c`
       if (node.isSuperCall) {
+        // `super[b] = c`
         return handleSuperIndexSendSet(node);
       } else {
         return handleIndexSendSet(node);
       }
+    } else if (node.isSuperCall) {
+      // `super.a = c`
+      return handleSuperSendSet(node);
+    } else if (node.receiver == null) {
+      // `a = c`
+      return handleUnqualifiedSendSet(node);
+    } else {
+      // `a.b = c`
+      return handleQualifiedSendSet(node);
     }
-    return oldVisitSendSet(node);
-  }
-
-  ResolutionResult oldVisitSendSet(SendSet node) {
-    bool oldSendIsMemberAccess = sendIsMemberAccess;
-    sendIsMemberAccess = node.isPropertyAccess || node.isCall;
-    ResolutionResult result = resolveSend(node);
-    sendIsMemberAccess = oldSendIsMemberAccess;
-    Element target = result.element;
-    Element setter = target;
-    Element getter = target;
-    String operatorName = node.assignmentOperator.source;
-    String source = operatorName;
-    bool isComplex = !identical(source, '=');
-    if (!(result is AssertResult || Elements.isUnresolved(target))) {
-      if (target.isAbstractField) {
-        AbstractFieldElement field = target;
-        setter = field.setter;
-        getter = field.getter;
-        if (setter == null) {
-          if (!inInstanceContext || getter.isTopLevel || getter.isStatic) {
-            setter = reportAndCreateErroneousElement(node.selector, field.name,
-                MessageKind.CANNOT_RESOLVE_SETTER, const {});
-            registry.registerThrowNoSuchMethod();
-          }
-        }
-        if (isComplex && getter == null && !inInstanceContext) {
-          getter = reportAndCreateErroneousElement(node.selector, field.name,
-              MessageKind.CANNOT_RESOLVE_GETTER, const {});
-          registry.registerThrowNoSuchMethod();
-        }
-      } else if (target.impliesType) {
-        if (node.isIfNullAssignment) {
-          setter = reportAndCreateErroneousElement(node.selector, target.name,
-              MessageKind.IF_NULL_ASSIGNING_TYPE, const {});
-          // In this case, no assignment happens, the rest of the compiler can
-          // treat the expression `C ??= e` as if it's just reading `C`.
-        } else {
-          setter = reportAndCreateErroneousElement(node.selector, target.name,
-              MessageKind.ASSIGNING_TYPE, const {});
-          registry.registerThrowNoSuchMethod();
-        }
-        registerTypeLiteralAccess(node, target);
-      } else if (target.isFinal || target.isConst) {
-        if (Elements.isStaticOrTopLevelField(target) || target.isLocal) {
-          setter = reportAndCreateErroneousElement(
-              node.selector, target.name, MessageKind.CANNOT_RESOLVE_SETTER,
-              const {});
-        } else if (node.isSuperCall) {
-          setter = reportAndCreateErroneousElement(
-              node.selector, target.name, MessageKind.SETTER_NOT_FOUND_IN_SUPER,
-              {'name': target.name, 'className': currentClass.name});
-          registry.registerSuperNoSuchMethod();
-        } else {
-          // For instance fields we don't report a warning here because the type
-          // checker will detect this as well and report a better error message
-          // with the context of the containing class.
-        }
-        registry.registerThrowNoSuchMethod();
-      } else if (target.isFunction && target.name != '[]=') {
-        assert(!target.isSetter);
-        if (Elements.isStaticOrTopLevelFunction(target) || target.isLocal) {
-          setter = reportAndCreateErroneousElement(
-              node.selector, target.name, MessageKind.ASSIGNING_METHOD,
-              const {});
-        } else if (node.isSuperCall) {
-          setter = reportAndCreateErroneousElement(
-              node.selector, target.name, MessageKind.ASSIGNING_METHOD_IN_SUPER,
-              {'name': target.name,
-               'superclassName': target.enclosingElement.name});
-          registry.registerSuperNoSuchMethod();
-        } else {
-          // For instance methods we don't report a warning here because the
-          // type checker will detect this as well and report a better error
-          // message with the context of the containing class.
-        }
-        registry.registerThrowNoSuchMethod();
-      }
-      if (isPotentiallyMutableTarget(target)) {
-        registry.registerPotentialMutation(target, node);
-        if (enclosingElement != target.enclosingElement) {
-          registry.registerPotentialMutationInClosure(target, node);
-        }
-        for (Node scope in promotionScope) {
-          registry.registerPotentialMutationIn(scope, target, node);
-        }
-      }
-    }
-
-    resolveArguments(node.argumentsNode);
-
-    Selector selector = registry.getSelector(node);
-    if (isComplex) {
-      Selector getterSelector;
-      if (selector.isSetter) {
-        getterSelector = new Selector.getterFrom(selector);
-      } else {
-        assert(selector.isIndexSet);
-        getterSelector = new Selector.index();
-      }
-      registerSend(getterSelector, getter);
-      registry.setGetterSelectorInComplexSendSet(node, getterSelector);
-      if (node.isSuperCall) {
-        getter = currentClass.lookupSuperByName(getterSelector.memberName);
-        if (getter == null) {
-          target = reportAndCreateErroneousElement(
-              node, selector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
-              {'className': currentClass.name, 'memberName': selector.name});
-          registry.registerSuperNoSuchMethod();
-        }
-      }
-      registry.useElement(node.selector, getter);
-
-      // Make sure we include the + and - operators if we are using
-      // the ++ and -- ones.  Also, if op= form is used, include op itself.
-      void registerBinaryOperator(String name) {
-        Selector binop = new Selector.binaryOperator(name);
-        registry.registerDynamicInvocation(
-            new UniverseSelector(binop, null));
-        registry.setOperatorSelectorInComplexSendSet(node, binop);
-      }
-      if (identical(source, '++')) {
-        registerBinaryOperator('+');
-        registry.registerInstantiatedClass(compiler.intClass);
-      } else if (identical(source, '--')) {
-        registerBinaryOperator('-');
-        registry.registerInstantiatedClass(compiler.intClass);
-      } else if (source.endsWith('=')) {
-        registerBinaryOperator(Elements.mapToUserOperator(operatorName));
-      }
-    }
-
-    registerSend(selector, setter);
-    return new ResolutionResult.forElement(registry.useElement(node, setter));
   }
 
   void registerSend(Selector selector, Element target) {
@@ -3618,7 +4100,7 @@
   ResolutionResult visitStringInterpolation(StringInterpolation node) {
     registry.registerInstantiatedType(coreTypes.stringType);
     registry.registerStringInterpolation();
-    registerImplicitInvocation('toString', 0);
+    registerImplicitInvocation(Selectors.toString_);
 
     bool isValidAsConstant = true;
     List<ConstantExpression> parts = <ConstantExpression>[];
@@ -3701,19 +4183,18 @@
     return const NoneResult();
   }
 
-  registerImplicitInvocation(String name, int arity) {
-    Selector selector = new Selector.call(name, null, arity);
+  registerImplicitInvocation(Selector selector) {
     registry.registerDynamicInvocation(new UniverseSelector(selector, null));
   }
 
   ResolutionResult visitAsyncForIn(AsyncForIn node) {
     registry.registerAsyncForIn(node);
-    registry.setCurrentSelector(node, compiler.currentSelector);
+    registry.setCurrentSelector(node, Selectors.current);
     registry.registerDynamicGetter(
-        new UniverseSelector(compiler.currentSelector, null));
-    registry.setMoveNextSelector(node, compiler.moveNextSelector);
+        new UniverseSelector(Selectors.current, null));
+    registry.setMoveNextSelector(node, Selectors.moveNext);
     registry.registerDynamicInvocation(
-        new UniverseSelector(compiler.moveNextSelector, null));
+        new UniverseSelector(Selectors.moveNext, null));
 
     visit(node.expression);
 
@@ -3725,15 +4206,15 @@
 
   ResolutionResult visitSyncForIn(SyncForIn node) {
     registry.registerSyncForIn(node);
-    registry.setIteratorSelector(node, compiler.iteratorSelector);
+    registry.setIteratorSelector(node, Selectors.iterator);
     registry.registerDynamicGetter(
-        new UniverseSelector(compiler.iteratorSelector, null));
-    registry.setCurrentSelector(node, compiler.currentSelector);
+        new UniverseSelector(Selectors.iterator, null));
+    registry.setCurrentSelector(node, Selectors.current);
     registry.registerDynamicGetter(
-        new UniverseSelector(compiler.currentSelector, null));
-    registry.setMoveNextSelector(node, compiler.moveNextSelector);
+        new UniverseSelector(Selectors.current, null));
+    registry.setMoveNextSelector(node, Selectors.moveNext);
     registry.registerDynamicInvocation(
-        new UniverseSelector(compiler.moveNextSelector, null));
+        new UniverseSelector(Selectors.moveNext, null));
 
     visit(node.expression);
 
@@ -3765,7 +4246,8 @@
       if (identifier == null) {
         compiler.reportError(send.selector, MessageKind.INVALID_FOR_IN);
       } else {
-        loopVariableSelector = new Selector.setter(identifier.source, library);
+        loopVariableSelector = new Selector.setter(
+            new Name(identifier.source, library));
       }
       if (send.receiver != null) {
         compiler.reportError(send.receiver, MessageKind.INVALID_FOR_IN);
@@ -3780,7 +4262,8 @@
       if (identifier == null) {
         compiler.reportError(first, MessageKind.INVALID_FOR_IN);
       } else {
-        loopVariableSelector = new Selector.setter(identifier.source, library);
+        loopVariableSelector = new Selector.setter(
+            new Name(identifier.source, library));
         loopVariable = registry.getDefinition(identifier);
       }
     } else {
diff --git a/pkg/compiler/lib/src/resolution/operators.dart b/pkg/compiler/lib/src/resolution/operators.dart
index ac202aa..b25f898 100644
--- a/pkg/compiler/lib/src/resolution/operators.dart
+++ b/pkg/compiler/lib/src/resolution/operators.dart
@@ -5,7 +5,10 @@
 library dart2js.operators;
 
 import '../elements/elements.dart';
-import '../universe/universe.dart';
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SelectorKind;
 
 enum UnaryOperatorKind {
   NOT,
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 36c4618..1c294aa 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -2,7 +2,38 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.registry;
+
+import '../common/backend_api.dart' show
+    Backend;
+import '../common/registry.dart' show
+    Registry;
+import '../compiler.dart' show
+    Compiler;
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../enqueue.dart' show
+    ResolutionEnqueuer,
+    WorldImpact;
+import '../elements/elements.dart';
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Setlet;
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SelectorKind,
+    UniverseSelector;
+import '../world.dart' show World;
+
+import 'send_structure.dart';
+
+import 'members.dart' show
+    ResolverVisitor;
+import 'tree_elements.dart' show
+    TreeElementMapping;
 
 /// [ResolutionRegistry] collects all resolution information. It stores node
 /// related information in a [TreeElements] mapping and registers calls with
@@ -174,10 +205,7 @@
   final TreeElementMapping mapping;
   final ResolutionWorldImpact worldImpact;
 
-  ResolutionRegistry(Compiler compiler, Element element)
-      : this.internal(compiler, _ensureTreeElements(element));
-
-  ResolutionRegistry.internal(Compiler compiler, TreeElementMapping mapping)
+  ResolutionRegistry(Compiler compiler, TreeElementMapping mapping)
       : this.compiler = compiler,
         this.mapping = mapping,
         this.worldImpact = new ResolutionWorldImpact(compiler, mapping);
@@ -387,6 +415,10 @@
     backend.resolutionCallbacks.onThrowRuntimeError(this);
   }
 
+  void registerCompileTimeError(ErroneousElement error) {
+    backend.resolutionCallbacks.onCompileTimeError(this, error);
+  }
+
   void registerTypeVariableBoundCheck() {
     backend.resolutionCallbacks.onTypeVariableBoundCheck(this);
   }
@@ -465,10 +497,12 @@
   }
 
   void registerDynamicGetter(UniverseSelector selector) {
+    assert(selector.selector.isGetter);
     worldImpact.registerDynamicGetter(selector);
   }
 
   void registerDynamicSetter(UniverseSelector selector) {
+    assert(selector.selector.isSetter);
     worldImpact.registerDynamicSetter(selector);
   }
 
@@ -538,6 +572,8 @@
   Setlet<Element> get otherDependencies => mapping.otherDependencies;
 
   void registerStaticInvocation(Element element) {
+    // TODO(johnniwinther): Increase precision of [registerStaticUse] and
+    // [registerDependency].
     if (element == null) return;
     registerStaticUse(element);
     registerDependency(element);
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index ee292e4..d10e886 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -2,77 +2,1046 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library resolution;
+library dart2js.resolution;
 
 import 'dart:collection' show Queue;
 
-import '../compile_time_constants.dart';
-import '../constants/expressions.dart';
-import '../constants/values.dart';
-import '../core_types.dart';
-import '../dart_backend/dart_backend.dart' show DartBackend;
+import '../common/names.dart' show
+    Identifiers;
+import '../common/tasks.dart' show
+    CompilerTask,
+    DeferredAction;
+import '../compiler.dart' show
+    Compiler;
+import '../compile_time_constants.dart' show
+    ConstantCompiler;
+import '../constants/values.dart' show
+    ConstantValue;
 import '../dart_types.dart';
-import '../dart2jslib.dart' hide DynamicAccess;
-import '../tree/tree.dart';
-import '../scanner/scannerlib.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
 import '../elements/elements.dart';
-
 import '../elements/modelx.dart' show
     BaseClassElementX,
     BaseFunctionElementX,
     ConstructorElementX,
-    ErroneousConstructorElementX,
-    ErroneousElementX,
-    ErroneousFieldElementX,
-    ErroneousInitializingFormalElementX,
     FieldElementX,
-    FormalElementX,
     FunctionElementX,
-    FunctionSignatureX,
     GetterElementX,
-    InitializingFormalElementX,
-    JumpTargetX,
-    LabelDefinitionX,
-    LocalFunctionElementX,
-    LocalParameterElementX,
-    LocalVariableElementX,
     MetadataAnnotationX,
-    MethodElementX,
     MixinApplicationElementX,
-    ParameterElementX,
     ParameterMetadataAnnotation,
     SetterElementX,
-    SynthesizedConstructorElementX,
-    TypeVariableElementX,
-    TypedefElementX,
-    VariableElementX,
-    VariableList;
+    TypedefElementX;
+import '../enqueue.dart' show
+    WorldImpact;
+import '../scanner/scannerlib.dart' show
+    isBinaryOperator,
+    isMinusOperator,
+    isTernaryOperator,
+    isUnaryOperator,
+    isUserDefinableOperator;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link,
+    LinkBuilder,
+    Setlet;
 
-import '../ordered_typeset.dart' show OrderedTypeSet, OrderedTypeSetBuilder;
-import '../types/types.dart' show TypeMask;
-import '../util/util.dart';
-import '../universe/universe.dart' show
-    CallStructure,
-    SelectorKind,
-    UniverseSelector;
-
-import 'access_semantics.dart';
+import 'class_hierarchy.dart';
 import 'class_members.dart' show MembersCreator;
-import 'enum_creator.dart';
-import 'operators.dart';
-import 'secret_tree_element.dart' show getTreeElement, setTreeElement;
-import 'send_structure.dart';
+import 'constructors.dart';
+import 'members.dart';
+import 'registry.dart';
+import 'signatures.dart';
+import 'tree_elements.dart';
+import 'typedefs.dart';
 
-part 'class_hierarchy.dart';
-part 'constructors.dart';
-part 'label_scope.dart';
-part 'members.dart';
-part 'registry.dart';
-part 'resolution_common.dart';
-part 'resolution_result.dart';
-part 'scope.dart';
-part 'signatures.dart';
-part 'tree_elements.dart';
-part 'typedefs.dart';
-part 'type_resolver.dart';
-part 'variables.dart';
+class ResolverTask extends CompilerTask {
+  final ConstantCompiler constantCompiler;
+
+  ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler);
+
+  String get name => 'Resolver';
+
+  WorldImpact resolve(Element element) {
+    return measure(() {
+      if (Elements.isErroneous(element)) {
+        // TODO(johnniwinther): Add a predicate for this.
+        assert(invariant(element, element is! ErroneousElement,
+            message: "Element $element expected to have parse errors."));
+        _ensureTreeElements(element);
+        return const WorldImpact();
+      }
+
+      WorldImpact processMetadata([WorldImpact result]) {
+        for (MetadataAnnotation metadata in element.metadata) {
+          metadata.ensureResolved(compiler);
+        }
+        return result;
+      }
+
+      ElementKind kind = element.kind;
+      if (identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR) ||
+          identical(kind, ElementKind.FUNCTION) ||
+          identical(kind, ElementKind.GETTER) ||
+          identical(kind, ElementKind.SETTER)) {
+        return processMetadata(resolveMethodElement(element));
+      }
+
+      if (identical(kind, ElementKind.FIELD)) {
+        return processMetadata(resolveField(element));
+      }
+      if (element.isClass) {
+        ClassElement cls = element;
+        cls.ensureResolved(compiler);
+        return processMetadata(const WorldImpact());
+      } else if (element.isTypedef) {
+        TypedefElement typdef = element;
+        return processMetadata(resolveTypedef(typdef));
+      }
+
+      compiler.unimplemented(element, "resolve($element)");
+    });
+  }
+
+  void resolveRedirectingConstructor(InitializerResolver resolver,
+                                     Node node,
+                                     FunctionElement constructor,
+                                     FunctionElement redirection) {
+    assert(invariant(node, constructor.isImplementation,
+        message: 'Redirecting constructors must be resolved on implementation '
+                 'elements.'));
+    Setlet<FunctionElement> seen = new Setlet<FunctionElement>();
+    seen.add(constructor);
+    while (redirection != null) {
+      // Ensure that we follow redirections through implementation elements.
+      redirection = redirection.implementation;
+      if (seen.contains(redirection)) {
+        resolver.visitor.error(node, MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE);
+        return;
+      }
+      seen.add(redirection);
+      redirection = resolver.visitor.resolveConstructorRedirection(redirection);
+    }
+  }
+
+  static void processAsyncMarker(Compiler compiler,
+                                 BaseFunctionElementX element,
+                                 ResolutionRegistry registry) {
+    FunctionExpression functionExpression = element.node;
+    AsyncModifier asyncModifier = functionExpression.asyncModifier;
+    if (asyncModifier != null) {
+
+      if (asyncModifier.isAsynchronous) {
+        element.asyncMarker = asyncModifier.isYielding
+            ? AsyncMarker.ASYNC_STAR : AsyncMarker.ASYNC;
+      } else {
+        element.asyncMarker = AsyncMarker.SYNC_STAR;
+      }
+      if (element.isAbstract) {
+        compiler.reportError(asyncModifier,
+            MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
+            {'modifier': element.asyncMarker});
+      } else if (element.isConstructor) {
+        compiler.reportError(asyncModifier,
+            MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR,
+            {'modifier': element.asyncMarker});
+      } else {
+        if (element.isSetter) {
+          compiler.reportError(asyncModifier,
+              MessageKind.ASYNC_MODIFIER_ON_SETTER,
+              {'modifier': element.asyncMarker});
+
+        }
+        if (functionExpression.body.asReturn() != null &&
+            element.asyncMarker.isYielding) {
+          compiler.reportError(asyncModifier,
+              MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY,
+              {'modifier': element.asyncMarker});
+        }
+      }
+      registry.registerAsyncMarker(element);
+      switch (element.asyncMarker) {
+      case AsyncMarker.ASYNC:
+        compiler.futureClass.ensureResolved(compiler);
+        break;
+      case AsyncMarker.ASYNC_STAR:
+        compiler.streamClass.ensureResolved(compiler);
+        break;
+      case AsyncMarker.SYNC_STAR:
+        compiler.iterableClass.ensureResolved(compiler);
+        break;
+      }
+    }
+  }
+
+  bool _isNativeClassOrExtendsNativeClass(ClassElement classElement) {
+    assert(classElement != null);
+    while (classElement != null) {
+      if (classElement.isNative) return true;
+      classElement = classElement.superclass;
+    }
+    return false;
+  }
+
+  WorldImpact resolveMethodElementImplementation(
+      FunctionElement element, FunctionExpression tree) {
+    return compiler.withCurrentElement(element, () {
+      if (element.isExternal && tree.hasBody()) {
+        error(element,
+            MessageKind.EXTERNAL_WITH_BODY,
+            {'functionName': element.name});
+      }
+      if (element.isConstructor) {
+        if (tree.returnType != null) {
+          error(tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE);
+        }
+        if (element.isConst &&
+            tree.hasBody() &&
+            !tree.isRedirectingFactory) {
+          error(tree, MessageKind.CONST_CONSTRUCTOR_HAS_BODY);
+        }
+      }
+
+      ResolverVisitor visitor = visitorFor(element);
+      ResolutionRegistry registry = visitor.registry;
+      registry.defineFunction(tree, element);
+      visitor.setupFunction(tree, element);
+      processAsyncMarker(compiler, element, registry);
+
+      if (element.isGenerativeConstructor) {
+        // Even if there is no initializer list we still have to do the
+        // resolution in case there is an implicit super constructor call.
+        InitializerResolver resolver =
+            new InitializerResolver(visitor, element, tree);
+        FunctionElement redirection = resolver.resolveInitializers();
+        if (redirection != null) {
+          resolveRedirectingConstructor(resolver, tree, element, redirection);
+        }
+      } else if (tree.initializers != null) {
+        error(tree, MessageKind.FUNCTION_WITH_INITIALIZER);
+      }
+
+      if (!compiler.analyzeSignaturesOnly || tree.isRedirectingFactory) {
+        // We need to analyze the redirecting factory bodies to ensure that
+        // we can analyze compile-time constants.
+        visitor.visit(tree.body);
+      }
+
+      // Get the resolution tree and check that the resolved
+      // function doesn't use 'super' if it is mixed into another
+      // class. This is the part of the 'super' mixin check that
+      // happens when a function is resolved after the mixin
+      // application has been performed.
+      TreeElements resolutionTree = registry.mapping;
+      ClassElement enclosingClass = element.enclosingClass;
+      if (enclosingClass != null) {
+        // TODO(johnniwinther): Find another way to obtain mixin uses.
+        Iterable<MixinApplicationElement> mixinUses =
+            compiler.world.allMixinUsesOf(enclosingClass);
+        ClassElement mixin = enclosingClass;
+        for (MixinApplicationElement mixinApplication in mixinUses) {
+          checkMixinSuperUses(resolutionTree, mixinApplication, mixin);
+        }
+      }
+
+      // TODO(9631): support noSuchMethod on native classes.
+      if (Elements.isInstanceMethod(element) &&
+          element.name == Identifiers.noSuchMethod_ &&
+          _isNativeClassOrExtendsNativeClass(enclosingClass)) {
+        error(tree, MessageKind.NO_SUCH_METHOD_IN_NATIVE);
+      }
+
+      return registry.worldImpact;
+    });
+
+  }
+
+  WorldImpact resolveMethodElement(FunctionElementX element) {
+    assert(invariant(element, element.isDeclaration));
+    return compiler.withCurrentElement(element, () {
+      if (compiler.enqueuer.resolution.hasBeenResolved(element)) {
+        // TODO(karlklose): Remove the check for [isConstructor]. [elememts]
+        // should never be non-null, not even for constructors.
+        assert(invariant(element, element.isConstructor,
+            message: 'Non-constructor element $element '
+                     'has already been analyzed.'));
+        return const WorldImpact();
+      }
+      if (element.isSynthesized) {
+        if (element.isGenerativeConstructor) {
+          ResolutionRegistry registry =
+              new ResolutionRegistry(compiler, _ensureTreeElements(element));
+          ConstructorElement constructor = element.asFunctionElement();
+          ConstructorElement target = constructor.definingConstructor;
+          // Ensure the signature of the synthesized element is
+          // resolved. This is the only place where the resolver is
+          // seeing this element.
+          element.computeSignature(compiler);
+          if (!target.isErroneous) {
+            registry.registerStaticUse(target);
+            registry.registerImplicitSuperCall(target);
+          }
+          return registry.worldImpact;
+        } else {
+          assert(element.isDeferredLoaderGetter || element.isErroneous);
+          _ensureTreeElements(element);
+          return const WorldImpact();
+        }
+      } else {
+        element.parseNode(compiler);
+        element.computeType(compiler);
+        FunctionElementX implementation = element;
+        if (element.isExternal) {
+          implementation = compiler.backend.resolveExternalFunction(element);
+        }
+        return resolveMethodElementImplementation(
+            implementation, implementation.node);
+      }
+    });
+  }
+
+  /// Creates a [ResolverVisitor] for resolving an AST in context of [element].
+  /// If [useEnclosingScope] is `true` then the initial scope of the visitor
+  /// does not include inner scope of [element].
+  ///
+  /// This method should only be used by this library (or tests of
+  /// this library).
+  ResolverVisitor visitorFor(Element element, {bool useEnclosingScope: false}) {
+    return new ResolverVisitor(compiler, element,
+        new ResolutionRegistry(compiler, _ensureTreeElements(element)),
+        useEnclosingScope: useEnclosingScope);
+  }
+
+  WorldImpact resolveField(FieldElementX element) {
+    VariableDefinitions tree = element.parseNode(compiler);
+    if(element.modifiers.isStatic && element.isTopLevel) {
+      error(element.modifiers.getStatic(),
+            MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
+    }
+    ResolverVisitor visitor = visitorFor(element);
+    ResolutionRegistry registry = visitor.registry;
+    // TODO(johnniwinther): Maybe remove this when placeholderCollector migrates
+    // to the backend ast.
+    registry.defineElement(tree.definitions.nodes.head, element);
+    // TODO(johnniwinther): Share the resolved type between all variables
+    // declared in the same declaration.
+    if (tree.type != null) {
+      element.variables.type = visitor.resolveTypeAnnotation(tree.type);
+    } else {
+      element.variables.type = const DynamicType();
+    }
+
+    Expression initializer = element.initializer;
+    Modifiers modifiers = element.modifiers;
+    if (initializer != null) {
+      // TODO(johnniwinther): Avoid analyzing initializers if
+      // [Compiler.analyzeSignaturesOnly] is set.
+      visitor.visit(initializer);
+    } else if (modifiers.isConst) {
+      compiler.reportError(element, MessageKind.CONST_WITHOUT_INITIALIZER);
+    } else if (modifiers.isFinal && !element.isInstanceMember) {
+      compiler.reportError(element, MessageKind.FINAL_WITHOUT_INITIALIZER);
+    } else {
+      registry.registerInstantiatedClass(compiler.nullClass);
+    }
+
+    if (Elements.isStaticOrTopLevelField(element)) {
+      visitor.addDeferredAction(element, () {
+        if (element.modifiers.isConst) {
+          element.constant = constantCompiler.compileConstant(element);
+        } else {
+          constantCompiler.compileVariable(element);
+        }
+      });
+      if (initializer != null) {
+        if (!element.modifiers.isConst) {
+          // TODO(johnniwinther): Determine the const-ness eagerly to avoid
+          // unnecessary registrations.
+          registry.registerLazyField();
+        }
+      }
+    }
+
+    // Perform various checks as side effect of "computing" the type.
+    element.computeType(compiler);
+
+    return registry.worldImpact;
+  }
+
+  DartType resolveTypeAnnotation(Element element, TypeAnnotation annotation) {
+    DartType type = resolveReturnType(element, annotation);
+    if (type.isVoid) {
+      error(annotation, MessageKind.VOID_NOT_ALLOWED);
+    }
+    return type;
+  }
+
+  DartType resolveReturnType(Element element, TypeAnnotation annotation) {
+    if (annotation == null) return const DynamicType();
+    DartType result = visitorFor(element).resolveTypeAnnotation(annotation);
+    if (result == null) {
+      // TODO(karklose): warning.
+      return const DynamicType();
+    }
+    return result;
+  }
+
+  void resolveRedirectionChain(ConstructorElementX constructor,
+                               Spannable node) {
+    ConstructorElementX target = constructor;
+    InterfaceType targetType;
+    List<Element> seen = new List<Element>();
+    // Follow the chain of redirections and check for cycles.
+    while (target.isRedirectingFactory) {
+      if (target.internalEffectiveTarget != null) {
+        // We found a constructor that already has been processed.
+        targetType = target.effectiveTargetType;
+        assert(invariant(target, targetType != null,
+            message: 'Redirection target type has not been computed for '
+                     '$target'));
+        target = target.internalEffectiveTarget;
+        break;
+      }
+
+      Element nextTarget = target.immediateRedirectionTarget;
+      if (seen.contains(nextTarget)) {
+        error(node, MessageKind.CYCLIC_REDIRECTING_FACTORY);
+        targetType = target.enclosingClass.thisType;
+        break;
+      }
+      seen.add(target);
+      target = nextTarget;
+    }
+
+    if (targetType == null) {
+      assert(!target.isRedirectingFactory);
+      targetType = target.enclosingClass.thisType;
+    }
+
+    // [target] is now the actual target of the redirections.  Run through
+    // the constructors again and set their [redirectionTarget], so that we
+    // do not have to run the loop for these constructors again. Furthermore,
+    // compute [redirectionTargetType] for each factory by computing the
+    // substitution of the target type with respect to the factory type.
+    while (!seen.isEmpty) {
+      ConstructorElementX factory = seen.removeLast();
+
+      // [factory] must already be analyzed but the [TreeElements] might not
+      // have been stored in the enqueuer cache yet.
+      // TODO(johnniwinther): Store [TreeElements] in the cache before
+      // resolution of the element.
+      TreeElements treeElements = factory.treeElements;
+      assert(invariant(node, treeElements != null,
+          message: 'No TreeElements cached for $factory.'));
+      FunctionExpression functionNode = factory.parseNode(compiler);
+      RedirectingFactoryBody redirectionNode = functionNode.body;
+      DartType factoryType = treeElements.getType(redirectionNode);
+      if (!factoryType.isDynamic) {
+        targetType = targetType.substByContext(factoryType);
+      }
+      factory.effectiveTarget = target;
+      factory.effectiveTargetType = targetType;
+    }
+  }
+
+  /**
+   * Load and resolve the supertypes of [cls].
+   *
+   * Warning: do not call this method directly. It should only be
+   * called by [resolveClass] and [ClassSupertypeResolver].
+   */
+  void loadSupertypes(BaseClassElementX cls, Spannable from) {
+    compiler.withCurrentElement(cls, () => measure(() {
+      if (cls.supertypeLoadState == STATE_DONE) return;
+      if (cls.supertypeLoadState == STATE_STARTED) {
+        compiler.reportError(from, MessageKind.CYCLIC_CLASS_HIERARCHY,
+                                 {'className': cls.name});
+        cls.supertypeLoadState = STATE_DONE;
+        cls.hasIncompleteHierarchy = true;
+        cls.allSupertypesAndSelf =
+            compiler.objectClass.allSupertypesAndSelf.extendClass(
+                cls.computeType(compiler));
+        cls.supertype = cls.allSupertypes.head;
+        assert(invariant(from, cls.supertype != null,
+            message: 'Missing supertype on cyclic class $cls.'));
+        cls.interfaces = const Link<DartType>();
+        return;
+      }
+      cls.supertypeLoadState = STATE_STARTED;
+      compiler.withCurrentElement(cls, () {
+        // TODO(ahe): Cache the node in cls.
+        cls.parseNode(compiler).accept(
+            new ClassSupertypeResolver(compiler, cls));
+        if (cls.supertypeLoadState != STATE_DONE) {
+          cls.supertypeLoadState = STATE_DONE;
+        }
+      });
+    }));
+  }
+
+  // TODO(johnniwinther): Remove this queue when resolution has been split into
+  // syntax and semantic resolution.
+  TypeDeclarationElement currentlyResolvedTypeDeclaration;
+  Queue<ClassElement> pendingClassesToBeResolved = new Queue<ClassElement>();
+  Queue<ClassElement> pendingClassesToBePostProcessed =
+      new Queue<ClassElement>();
+
+  /// Resolve [element] using [resolveTypeDeclaration].
+  ///
+  /// This methods ensure that class declarations encountered through type
+  /// annotations during the resolution of [element] are resolved after
+  /// [element] has been resolved.
+  // TODO(johnniwinther): Encapsulate this functionality in a
+  // 'TypeDeclarationResolver'.
+  _resolveTypeDeclaration(TypeDeclarationElement element,
+                          resolveTypeDeclaration()) {
+    return compiler.withCurrentElement(element, () {
+      return measure(() {
+        TypeDeclarationElement previousResolvedTypeDeclaration =
+            currentlyResolvedTypeDeclaration;
+        currentlyResolvedTypeDeclaration = element;
+        var result = resolveTypeDeclaration();
+        if (previousResolvedTypeDeclaration == null) {
+          do {
+            while (!pendingClassesToBeResolved.isEmpty) {
+              pendingClassesToBeResolved.removeFirst().ensureResolved(compiler);
+            }
+            while (!pendingClassesToBePostProcessed.isEmpty) {
+              _postProcessClassElement(
+                  pendingClassesToBePostProcessed.removeFirst());
+            }
+          } while (!pendingClassesToBeResolved.isEmpty);
+          assert(pendingClassesToBeResolved.isEmpty);
+          assert(pendingClassesToBePostProcessed.isEmpty);
+        }
+        currentlyResolvedTypeDeclaration = previousResolvedTypeDeclaration;
+        return result;
+      });
+    });
+  }
+
+  /**
+   * Resolve the class [element].
+   *
+   * Before calling this method, [element] was constructed by the
+   * scanner and most fields are null or empty. This method fills in
+   * these fields and also ensure that the supertypes of [element] are
+   * resolved.
+   *
+   * Warning: Do not call this method directly. Instead use
+   * [:element.ensureResolved(compiler):].
+   */
+  TreeElements resolveClass(BaseClassElementX element) {
+    return _resolveTypeDeclaration(element, () {
+      // TODO(johnniwinther): Store the mapping in the resolution enqueuer.
+      ResolutionRegistry registry =
+          new ResolutionRegistry(compiler, _ensureTreeElements(element));
+      resolveClassInternal(element, registry);
+      return element.treeElements;
+    });
+  }
+
+  void ensureClassWillBeResolvedInternal(ClassElement element) {
+    if (currentlyResolvedTypeDeclaration == null) {
+      element.ensureResolved(compiler);
+    } else {
+      pendingClassesToBeResolved.add(element);
+    }
+  }
+
+  void resolveClassInternal(BaseClassElementX element,
+                            ResolutionRegistry registry) {
+    if (!element.isPatch) {
+      compiler.withCurrentElement(element, () => measure(() {
+        assert(element.resolutionState == STATE_NOT_STARTED);
+        element.resolutionState = STATE_STARTED;
+        Node tree = element.parseNode(compiler);
+        loadSupertypes(element, tree);
+
+        ClassResolverVisitor visitor =
+            new ClassResolverVisitor(compiler, element, registry);
+        visitor.visit(tree);
+        element.resolutionState = STATE_DONE;
+        compiler.onClassResolved(element);
+        pendingClassesToBePostProcessed.add(element);
+      }));
+      if (element.isPatched) {
+        // Ensure handling patch after origin.
+        element.patch.ensureResolved(compiler);
+      }
+    } else { // Handle patch classes:
+      element.resolutionState = STATE_STARTED;
+      // Ensure handling origin before patch.
+      element.origin.ensureResolved(compiler);
+      // Ensure that the type is computed.
+      element.computeType(compiler);
+      // Copy class hierarchy from origin.
+      element.supertype = element.origin.supertype;
+      element.interfaces = element.origin.interfaces;
+      element.allSupertypesAndSelf = element.origin.allSupertypesAndSelf;
+      // Stepwise assignment to ensure invariant.
+      element.supertypeLoadState = STATE_STARTED;
+      element.supertypeLoadState = STATE_DONE;
+      element.resolutionState = STATE_DONE;
+      // TODO(johnniwinther): Check matching type variables and
+      // empty extends/implements clauses.
+    }
+  }
+
+  void _postProcessClassElement(BaseClassElementX element) {
+    for (MetadataAnnotation metadata in element.metadata) {
+      metadata.ensureResolved(compiler);
+      ConstantValue value =
+          compiler.constants.getConstantValue(metadata.constant);
+      if (!element.isProxy && value == compiler.proxyConstant) {
+        element.isProxy = true;
+      }
+    }
+
+    // Force resolution of metadata on non-instance members since they may be
+    // inspected by the backend while emitting. Metadata on instance members is
+    // handled as a result of processing instantiated class members in the
+    // enqueuer.
+    // TODO(ahe): Avoid this eager resolution.
+    element.forEachMember((_, Element member) {
+      if (!member.isInstanceMember) {
+        compiler.withCurrentElement(member, () {
+          for (MetadataAnnotation metadata in member.metadata) {
+            metadata.ensureResolved(compiler);
+          }
+        });
+      }
+    });
+
+    computeClassMember(element, Identifiers.call);
+  }
+
+  void computeClassMembers(ClassElement element) {
+    MembersCreator.computeAllClassMembers(compiler, element);
+  }
+
+  void computeClassMember(ClassElement element, String name) {
+    MembersCreator.computeClassMembersByName(compiler, element, name);
+  }
+
+  void checkClass(ClassElement element) {
+    computeClassMembers(element);
+    if (element.isMixinApplication) {
+      checkMixinApplication(element);
+    } else {
+      checkClassMembers(element);
+    }
+  }
+
+  void checkMixinApplication(MixinApplicationElementX mixinApplication) {
+    Modifiers modifiers = mixinApplication.modifiers;
+    int illegalFlags = modifiers.flags & ~Modifiers.FLAG_ABSTRACT;
+    if (illegalFlags != 0) {
+      Modifiers illegalModifiers = new Modifiers.withFlags(null, illegalFlags);
+      compiler.reportError(
+          modifiers,
+          MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS,
+          {'modifiers': illegalModifiers});
+    }
+
+    // In case of cyclic mixin applications, the mixin chain will have
+    // been cut. If so, we have already reported the error to the
+    // user so we just return from here.
+    ClassElement mixin = mixinApplication.mixin;
+    if (mixin == null) return;
+
+    // Check that we're not trying to use Object as a mixin.
+    if (mixin.superclass == null) {
+      compiler.reportError(mixinApplication,
+                               MessageKind.ILLEGAL_MIXIN_OBJECT);
+      // Avoid reporting additional errors for the Object class.
+      return;
+    }
+
+    if (mixin.isEnumClass) {
+      // Mixing in an enum has already caused a compile-time error.
+      return;
+    }
+
+    // Check that the mixed in class has Object as its superclass.
+    if (!mixin.superclass.isObject) {
+      compiler.reportError(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS);
+    }
+
+    // Check that the mixed in class doesn't have any constructors and
+    // make sure we aren't mixing in methods that use 'super'.
+    mixin.forEachLocalMember((AstElement member) {
+      if (member.isGenerativeConstructor && !member.isSynthesized) {
+        compiler.reportError(member, MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR);
+      } else {
+        // Get the resolution tree and check that the resolved member
+        // doesn't use 'super'. This is the part of the 'super' mixin
+        // check that happens when a function is resolved before the
+        // mixin application has been performed.
+        // TODO(johnniwinther): Obtain the [TreeElements] for [member]
+        // differently.
+        if (compiler.enqueuer.resolution.hasBeenResolved(member)) {
+          checkMixinSuperUses(
+              member.resolvedAst.elements,
+              mixinApplication,
+              mixin);
+        }
+      }
+    });
+  }
+
+  void checkMixinSuperUses(TreeElements resolutionTree,
+                           MixinApplicationElement mixinApplication,
+                           ClassElement mixin) {
+    // TODO(johnniwinther): Avoid the use of [TreeElements] here.
+    if (resolutionTree == null) return;
+    Iterable<Node> superUses = resolutionTree.superUses;
+    if (superUses.isEmpty) return;
+    compiler.reportError(mixinApplication,
+                         MessageKind.ILLEGAL_MIXIN_WITH_SUPER,
+                         {'className': mixin.name});
+    // Show the user the problematic uses of 'super' in the mixin.
+    for (Node use in superUses) {
+      compiler.reportInfo(
+          use,
+          MessageKind.ILLEGAL_MIXIN_SUPER_USE);
+    }
+  }
+
+  void checkClassMembers(ClassElement cls) {
+    assert(invariant(cls, cls.isDeclaration));
+    if (cls.isObject) return;
+    // TODO(johnniwinther): Should this be done on the implementation element as
+    // well?
+    List<Element> constConstructors = <Element>[];
+    List<Element> nonFinalInstanceFields = <Element>[];
+    cls.forEachMember((holder, member) {
+      compiler.withCurrentElement(member, () {
+        // Perform various checks as side effect of "computing" the type.
+        member.computeType(compiler);
+
+        // Check modifiers.
+        if (member.isFunction && member.modifiers.isFinal) {
+          compiler.reportError(
+              member, MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER);
+        }
+        if (member.isConstructor) {
+          final mismatchedFlagsBits =
+              member.modifiers.flags &
+              (Modifiers.FLAG_STATIC | Modifiers.FLAG_ABSTRACT);
+          if (mismatchedFlagsBits != 0) {
+            final mismatchedFlags =
+                new Modifiers.withFlags(null, mismatchedFlagsBits);
+            compiler.reportError(
+                member,
+                MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS,
+                {'modifiers': mismatchedFlags});
+          }
+          if (member.modifiers.isConst) {
+            constConstructors.add(member);
+          }
+        }
+        if (member.isField) {
+          if (member.modifiers.isConst && !member.modifiers.isStatic) {
+            compiler.reportError(
+                member, MessageKind.ILLEGAL_CONST_FIELD_MODIFIER);
+          }
+          if (!member.modifiers.isStatic && !member.modifiers.isFinal) {
+            nonFinalInstanceFields.add(member);
+          }
+        }
+        checkAbstractField(member);
+        checkUserDefinableOperator(member);
+      });
+    });
+    if (!constConstructors.isEmpty && !nonFinalInstanceFields.isEmpty) {
+      Spannable span = constConstructors.length > 1
+          ? cls : constConstructors[0];
+      compiler.reportError(span,
+          MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS,
+          {'className': cls.name});
+      if (constConstructors.length > 1) {
+        for (Element constructor in constConstructors) {
+          compiler.reportInfo(constructor,
+              MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR);
+        }
+      }
+      for (Element field in nonFinalInstanceFields) {
+        compiler.reportInfo(field,
+            MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD);
+      }
+    }
+  }
+
+  void checkAbstractField(Element member) {
+    // Only check for getters. The test can only fail if there is both a setter
+    // and a getter with the same name, and we only need to check each abstract
+    // field once, so we just ignore setters.
+    if (!member.isGetter) return;
+
+    // Find the associated abstract field.
+    ClassElement classElement = member.enclosingClass;
+    Element lookupElement = classElement.lookupLocalMember(member.name);
+    if (lookupElement == null) {
+      compiler.internalError(member,
+          "No abstract field for accessor");
+    } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) {
+      if (lookupElement.isErroneous || lookupElement.isAmbiguous) return;
+      compiler.internalError(member,
+          "Inaccessible abstract field for accessor");
+    }
+    AbstractFieldElement field = lookupElement;
+
+    GetterElementX getter = field.getter;
+    if (getter == null) return;
+    SetterElementX setter = field.setter;
+    if (setter == null) return;
+    int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
+    int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
+    if (!identical(getterFlags, setterFlags)) {
+      final mismatchedFlags =
+        new Modifiers.withFlags(null, getterFlags ^ setterFlags);
+      compiler.reportError(
+          field.getter,
+          MessageKind.GETTER_MISMATCH,
+          {'modifiers': mismatchedFlags});
+      compiler.reportError(
+          field.setter,
+          MessageKind.SETTER_MISMATCH,
+          {'modifiers': mismatchedFlags});
+    }
+  }
+
+  void checkUserDefinableOperator(Element member) {
+    FunctionElement function = member.asFunctionElement();
+    if (function == null) return;
+    String value = member.name;
+    if (value == null) return;
+    if (!(isUserDefinableOperator(value) || identical(value, 'unary-'))) return;
+
+    bool isMinus = false;
+    int requiredParameterCount;
+    MessageKind messageKind;
+    if (identical(value, 'unary-')) {
+      isMinus = true;
+      messageKind = MessageKind.MINUS_OPERATOR_BAD_ARITY;
+      requiredParameterCount = 0;
+    } else if (isMinusOperator(value)) {
+      isMinus = true;
+      messageKind = MessageKind.MINUS_OPERATOR_BAD_ARITY;
+      requiredParameterCount = 1;
+    } else if (isUnaryOperator(value)) {
+      messageKind = MessageKind.UNARY_OPERATOR_BAD_ARITY;
+      requiredParameterCount = 0;
+    } else if (isBinaryOperator(value)) {
+      messageKind = MessageKind.BINARY_OPERATOR_BAD_ARITY;
+      requiredParameterCount = 1;
+      if (identical(value, '==')) checkOverrideHashCode(member);
+    } else if (isTernaryOperator(value)) {
+      messageKind = MessageKind.TERNARY_OPERATOR_BAD_ARITY;
+      requiredParameterCount = 2;
+    } else {
+      compiler.internalError(function,
+          'Unexpected user defined operator $value');
+    }
+    checkArity(function, requiredParameterCount, messageKind, isMinus);
+  }
+
+  void checkOverrideHashCode(FunctionElement operatorEquals) {
+    if (operatorEquals.isAbstract) return;
+    ClassElement cls = operatorEquals.enclosingClass;
+    Element hashCodeImplementation =
+        cls.lookupLocalMember('hashCode');
+    if (hashCodeImplementation != null) return;
+    compiler.reportHint(
+        operatorEquals, MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE,
+        {'class': cls.name});
+  }
+
+  void checkArity(FunctionElement function,
+                  int requiredParameterCount, MessageKind messageKind,
+                  bool isMinus) {
+    FunctionExpression node = function.node;
+    FunctionSignature signature = function.functionSignature;
+    if (signature.requiredParameterCount != requiredParameterCount) {
+      Node errorNode = node;
+      if (node.parameters != null) {
+        if (isMinus ||
+            signature.requiredParameterCount < requiredParameterCount) {
+          // If there are too few parameters, point to the whole parameter list.
+          // For instance
+          //
+          //     int operator +() {}
+          //                   ^^
+          //
+          //     int operator []=(value) {}
+          //                     ^^^^^^^
+          //
+          // For operator -, always point the whole parameter list, like
+          //
+          //     int operator -(a, b) {}
+          //                   ^^^^^^
+          //
+          // instead of
+          //
+          //     int operator -(a, b) {}
+          //                       ^
+          //
+          // since the correction might not be to remove 'b' but instead to
+          // remove 'a, b'.
+          errorNode = node.parameters;
+        } else {
+          errorNode = node.parameters.nodes.skip(requiredParameterCount).head;
+        }
+      }
+      compiler.reportError(
+          errorNode, messageKind, {'operatorName': function.name});
+    }
+    if (signature.optionalParameterCount != 0) {
+      Node errorNode =
+          node.parameters.nodes.skip(signature.requiredParameterCount).head;
+      if (signature.optionalParametersAreNamed) {
+        compiler.reportError(
+            errorNode,
+            MessageKind.OPERATOR_NAMED_PARAMETERS,
+            {'operatorName': function.name});
+      } else {
+        compiler.reportError(
+            errorNode,
+            MessageKind.OPERATOR_OPTIONAL_PARAMETERS,
+            {'operatorName': function.name});
+      }
+    }
+  }
+
+  reportErrorWithContext(Element errorneousElement,
+                         MessageKind errorMessage,
+                         Element contextElement,
+                         MessageKind contextMessage) {
+    compiler.reportError(
+        errorneousElement,
+        errorMessage,
+        {'memberName': contextElement.name,
+         'className': contextElement.enclosingClass.name});
+    compiler.reportInfo(contextElement, contextMessage);
+  }
+
+
+  FunctionSignature resolveSignature(FunctionElementX element) {
+    MessageKind defaultValuesError = null;
+    if (element.isFactoryConstructor) {
+      FunctionExpression body = element.parseNode(compiler);
+      if (body.isRedirectingFactory) {
+        defaultValuesError = MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT;
+      }
+    }
+    return compiler.withCurrentElement(element, () {
+      FunctionExpression node =
+          compiler.parser.measure(() => element.parseNode(compiler));
+      return measure(() => SignatureResolver.analyze(
+          compiler, node.parameters, node.returnType, element,
+          new ResolutionRegistry(compiler, _ensureTreeElements(element)),
+          defaultValuesError: defaultValuesError,
+          createRealParameters: true));
+    });
+  }
+
+  WorldImpact resolveTypedef(TypedefElementX element) {
+    if (element.isResolved) return const WorldImpact();
+    compiler.world.allTypedefs.add(element);
+    return _resolveTypeDeclaration(element, () {
+      ResolutionRegistry registry = new ResolutionRegistry(
+          compiler, _ensureTreeElements(element));
+      return compiler.withCurrentElement(element, () {
+        return measure(() {
+          assert(element.resolutionState == STATE_NOT_STARTED);
+          element.resolutionState = STATE_STARTED;
+          Typedef node =
+            compiler.parser.measure(() => element.parseNode(compiler));
+          TypedefResolverVisitor visitor =
+            new TypedefResolverVisitor(compiler, element, registry);
+          visitor.visit(node);
+          element.resolutionState = STATE_DONE;
+          return registry.worldImpact;
+        });
+      });
+    });
+  }
+
+  void resolveMetadataAnnotation(MetadataAnnotationX annotation) {
+    compiler.withCurrentElement(annotation.annotatedElement, () => measure(() {
+      assert(annotation.resolutionState == STATE_NOT_STARTED);
+      annotation.resolutionState = STATE_STARTED;
+
+      Node node = annotation.parseNode(compiler);
+      Element annotatedElement = annotation.annotatedElement;
+      AnalyzableElement context = annotatedElement.analyzableElement;
+      ClassElement classElement = annotatedElement.enclosingClass;
+      if (classElement != null) {
+        // The annotation is resolved in the scope of [classElement].
+        classElement.ensureResolved(compiler);
+      }
+      assert(invariant(node, context != null,
+          message: "No context found for metadata annotation "
+                   "on $annotatedElement."));
+      ResolverVisitor visitor = visitorFor(context, useEnclosingScope: true);
+      ResolutionRegistry registry = visitor.registry;
+      node.accept(visitor);
+      // TODO(johnniwinther): Avoid passing the [TreeElements] to
+      // [compileMetadata].
+      annotation.constant =
+          constantCompiler.compileMetadata(annotation, node, registry.mapping);
+      // TODO(johnniwinther): Register the relation between the annotation
+      // and the annotated element instead. This will allow the backend to
+      // retrieve the backend constant and only register metadata on the
+      // elements for which it is needed. (Issue 17732).
+      registry.registerMetadataConstant(annotation, annotatedElement);
+      annotation.resolutionState = STATE_DONE;
+    }));
+  }
+
+  error(Spannable node, MessageKind kind, [arguments = const {}]) {
+    compiler.reportError(node, kind, arguments);
+  }
+
+  Link<MetadataAnnotation> resolveMetadata(Element element,
+                                           VariableDefinitions node) {
+    LinkBuilder<MetadataAnnotation> metadata =
+        new LinkBuilder<MetadataAnnotation>();
+    for (Metadata annotation in node.metadata.nodes) {
+      ParameterMetadataAnnotation metadataAnnotation =
+          new ParameterMetadataAnnotation(annotation);
+      metadataAnnotation.annotatedElement = element;
+      metadata.addLast(metadataAnnotation.ensureResolved(compiler));
+    }
+    return metadata.toLink();
+  }
+}
+
+TreeElements _ensureTreeElements(AnalyzableElementX element) {
+  if (element._treeElements == null) {
+    element._treeElements = new TreeElementMapping(element);
+  }
+  return element._treeElements;
+}
+
+abstract class AnalyzableElementX implements AnalyzableElement {
+  TreeElements _treeElements;
+
+  bool get hasTreeElements => _treeElements != null;
+
+  TreeElements get treeElements {
+    assert(invariant(this, _treeElements !=null,
+        message: "TreeElements have not been computed for $this."));
+    return _treeElements;
+  }
+
+  void reuseElement() {
+    _treeElements = null;
+  }
+}
diff --git a/pkg/compiler/lib/src/resolution/resolution_common.dart b/pkg/compiler/lib/src/resolution/resolution_common.dart
index 0f1a778..6797433 100644
--- a/pkg/compiler/lib/src/resolution/resolution_common.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_common.dart
@@ -2,968 +2,25 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.common;
 
-class ResolverTask extends CompilerTask {
-  final ConstantCompiler constantCompiler;
+import '../common/tasks.dart' show
+    DeferredAction;
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable;
+import '../elements/elements.dart';
+import '../tree/tree.dart';
 
-  ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler);
-
-  String get name => 'Resolver';
-
-  WorldImpact resolve(Element element) {
-    return measure(() {
-      if (Elements.isErroneous(element)) {
-        // TODO(johnniwinther): Add a predicate for this.
-        assert(invariant(element, element is! ErroneousElement,
-            message: "Element $element expected to have parse errors."));
-        _ensureTreeElements(element);
-        return const WorldImpact();
-      }
-
-      WorldImpact processMetadata([WorldImpact result]) {
-        for (MetadataAnnotation metadata in element.metadata) {
-          metadata.ensureResolved(compiler);
-        }
-        return result;
-      }
-
-      ElementKind kind = element.kind;
-      if (identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR) ||
-          identical(kind, ElementKind.FUNCTION) ||
-          identical(kind, ElementKind.GETTER) ||
-          identical(kind, ElementKind.SETTER)) {
-        return processMetadata(resolveMethodElement(element));
-      }
-
-      if (identical(kind, ElementKind.FIELD)) {
-        return processMetadata(resolveField(element));
-      }
-      if (element.isClass) {
-        ClassElement cls = element;
-        cls.ensureResolved(compiler);
-        return processMetadata(const WorldImpact());
-      } else if (element.isTypedef) {
-        TypedefElement typdef = element;
-        return processMetadata(resolveTypedef(typdef));
-      }
-
-      compiler.unimplemented(element, "resolve($element)");
-    });
-  }
-
-  void resolveRedirectingConstructor(InitializerResolver resolver,
-                                     Node node,
-                                     FunctionElement constructor,
-                                     FunctionElement redirection) {
-    assert(invariant(node, constructor.isImplementation,
-        message: 'Redirecting constructors must be resolved on implementation '
-                 'elements.'));
-    Setlet<FunctionElement> seen = new Setlet<FunctionElement>();
-    seen.add(constructor);
-    while (redirection != null) {
-      // Ensure that we follow redirections through implementation elements.
-      redirection = redirection.implementation;
-      if (seen.contains(redirection)) {
-        resolver.visitor.error(node, MessageKind.REDIRECTING_CONSTRUCTOR_CYCLE);
-        return;
-      }
-      seen.add(redirection);
-      redirection = resolver.visitor.resolveConstructorRedirection(redirection);
-    }
-  }
-
-  static void processAsyncMarker(Compiler compiler,
-                                 BaseFunctionElementX element,
-                                 ResolutionRegistry registry) {
-    FunctionExpression functionExpression = element.node;
-    AsyncModifier asyncModifier = functionExpression.asyncModifier;
-    if (asyncModifier != null) {
-
-      if (asyncModifier.isAsynchronous) {
-        element.asyncMarker = asyncModifier.isYielding
-            ? AsyncMarker.ASYNC_STAR : AsyncMarker.ASYNC;
-      } else {
-        element.asyncMarker = AsyncMarker.SYNC_STAR;
-      }
-      if (element.isAbstract) {
-        compiler.reportError(asyncModifier,
-            MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD,
-            {'modifier': element.asyncMarker});
-      } else if (element.isConstructor) {
-        compiler.reportError(asyncModifier,
-            MessageKind.ASYNC_MODIFIER_ON_CONSTRUCTOR,
-            {'modifier': element.asyncMarker});
-      } else {
-        if (element.isSetter) {
-          compiler.reportError(asyncModifier,
-              MessageKind.ASYNC_MODIFIER_ON_SETTER,
-              {'modifier': element.asyncMarker});
-
-        }
-        if (functionExpression.body.asReturn() != null &&
-            element.asyncMarker.isYielding) {
-          compiler.reportError(asyncModifier,
-              MessageKind.YIELDING_MODIFIER_ON_ARROW_BODY,
-              {'modifier': element.asyncMarker});
-        }
-      }
-      registry.registerAsyncMarker(element);
-      switch (element.asyncMarker) {
-      case AsyncMarker.ASYNC:
-        compiler.futureClass.ensureResolved(compiler);
-        break;
-      case AsyncMarker.ASYNC_STAR:
-        compiler.streamClass.ensureResolved(compiler);
-        break;
-      case AsyncMarker.SYNC_STAR:
-        compiler.iterableClass.ensureResolved(compiler);
-        break;
-      }
-    }
-  }
-
-  bool _isNativeClassOrExtendsNativeClass(ClassElement classElement) {
-    assert(classElement != null);
-    while (classElement != null) {
-      if (classElement.isNative) return true;
-      classElement = classElement.superclass;
-    }
-    return false;
-  }
-
-  WorldImpact resolveMethodElementImplementation(
-      FunctionElement element, FunctionExpression tree) {
-    return compiler.withCurrentElement(element, () {
-      if (element.isExternal && tree.hasBody()) {
-        error(element,
-            MessageKind.EXTERNAL_WITH_BODY,
-            {'functionName': element.name});
-      }
-      if (element.isConstructor) {
-        if (tree.returnType != null) {
-          error(tree, MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE);
-        }
-        if (element.isConst &&
-            tree.hasBody() &&
-            !tree.isRedirectingFactory) {
-          error(tree, MessageKind.CONST_CONSTRUCTOR_HAS_BODY);
-        }
-      }
-
-      ResolverVisitor visitor = visitorFor(element);
-      ResolutionRegistry registry = visitor.registry;
-      registry.defineFunction(tree, element);
-      visitor.setupFunction(tree, element);
-      processAsyncMarker(compiler, element, registry);
-
-      if (element.isGenerativeConstructor) {
-        // Even if there is no initializer list we still have to do the
-        // resolution in case there is an implicit super constructor call.
-        InitializerResolver resolver =
-            new InitializerResolver(visitor, element, tree);
-        FunctionElement redirection = resolver.resolveInitializers();
-        if (redirection != null) {
-          resolveRedirectingConstructor(resolver, tree, element, redirection);
-        }
-      } else if (tree.initializers != null) {
-        error(tree, MessageKind.FUNCTION_WITH_INITIALIZER);
-      }
-
-      if (!compiler.analyzeSignaturesOnly || tree.isRedirectingFactory) {
-        // We need to analyze the redirecting factory bodies to ensure that
-        // we can analyze compile-time constants.
-        visitor.visit(tree.body);
-      }
-
-      // Get the resolution tree and check that the resolved
-      // function doesn't use 'super' if it is mixed into another
-      // class. This is the part of the 'super' mixin check that
-      // happens when a function is resolved after the mixin
-      // application has been performed.
-      TreeElements resolutionTree = registry.mapping;
-      ClassElement enclosingClass = element.enclosingClass;
-      if (enclosingClass != null) {
-        // TODO(johnniwinther): Find another way to obtain mixin uses.
-        Iterable<MixinApplicationElement> mixinUses =
-            compiler.world.allMixinUsesOf(enclosingClass);
-        ClassElement mixin = enclosingClass;
-        for (MixinApplicationElement mixinApplication in mixinUses) {
-          checkMixinSuperUses(resolutionTree, mixinApplication, mixin);
-        }
-      }
-
-      // TODO(9631): support noSuchMethod on native classes.
-      if (Elements.isInstanceMethod(element) &&
-          element.name == Compiler.NO_SUCH_METHOD &&
-          _isNativeClassOrExtendsNativeClass(enclosingClass)) {
-        error(tree, MessageKind.NO_SUCH_METHOD_IN_NATIVE);
-      }
-
-      return registry.worldImpact;
-    });
-
-  }
-
-  WorldImpact resolveMethodElement(FunctionElementX element) {
-    assert(invariant(element, element.isDeclaration));
-    return compiler.withCurrentElement(element, () {
-      if (compiler.enqueuer.resolution.hasBeenResolved(element)) {
-        // TODO(karlklose): Remove the check for [isConstructor]. [elememts]
-        // should never be non-null, not even for constructors.
-        assert(invariant(element, element.isConstructor,
-            message: 'Non-constructor element $element '
-                     'has already been analyzed.'));
-        return const WorldImpact();
-      }
-      if (element.isSynthesized) {
-        if (element.isGenerativeConstructor) {
-          ResolutionRegistry registry =
-              new ResolutionRegistry(compiler, element);
-          ConstructorElement constructor = element.asFunctionElement();
-          ConstructorElement target = constructor.definingConstructor;
-          // Ensure the signature of the synthesized element is
-          // resolved. This is the only place where the resolver is
-          // seeing this element.
-          element.computeSignature(compiler);
-          if (!target.isErroneous) {
-            registry.registerStaticUse(target);
-            registry.registerImplicitSuperCall(target);
-          }
-          return registry.worldImpact;
-        } else {
-          assert(element.isDeferredLoaderGetter || element.isErroneous);
-          _ensureTreeElements(element);
-          return const WorldImpact();
-        }
-      } else {
-        element.parseNode(compiler);
-        element.computeType(compiler);
-        FunctionElementX implementation = element;
-        if (element.isExternal) {
-          implementation = compiler.backend.resolveExternalFunction(element);
-        }
-        return resolveMethodElementImplementation(
-            implementation, implementation.node);
-      }
-    });
-  }
-
-  /// Creates a [ResolverVisitor] for resolving an AST in context of [element].
-  /// If [useEnclosingScope] is `true` then the initial scope of the visitor
-  /// does not include inner scope of [element].
-  ///
-  /// This method should only be used by this library (or tests of
-  /// this library).
-  ResolverVisitor visitorFor(Element element, {bool useEnclosingScope: false}) {
-    return new ResolverVisitor(compiler, element,
-        new ResolutionRegistry(compiler, element),
-        useEnclosingScope: useEnclosingScope);
-  }
-
-  WorldImpact resolveField(FieldElementX element) {
-    VariableDefinitions tree = element.parseNode(compiler);
-    if(element.modifiers.isStatic && element.isTopLevel) {
-      error(element.modifiers.getStatic(),
-            MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
-    }
-    ResolverVisitor visitor = visitorFor(element);
-    ResolutionRegistry registry = visitor.registry;
-    // TODO(johnniwinther): Maybe remove this when placeholderCollector migrates
-    // to the backend ast.
-    registry.defineElement(tree.definitions.nodes.head, element);
-    // TODO(johnniwinther): Share the resolved type between all variables
-    // declared in the same declaration.
-    if (tree.type != null) {
-      element.variables.type = visitor.resolveTypeAnnotation(tree.type);
-    } else {
-      element.variables.type = const DynamicType();
-    }
-
-    Expression initializer = element.initializer;
-    Modifiers modifiers = element.modifiers;
-    if (initializer != null) {
-      // TODO(johnniwinther): Avoid analyzing initializers if
-      // [Compiler.analyzeSignaturesOnly] is set.
-      visitor.visit(initializer);
-    } else if (modifiers.isConst) {
-      compiler.reportError(element, MessageKind.CONST_WITHOUT_INITIALIZER);
-    } else if (modifiers.isFinal && !element.isInstanceMember) {
-      compiler.reportError(element, MessageKind.FINAL_WITHOUT_INITIALIZER);
-    } else {
-      registry.registerInstantiatedClass(compiler.nullClass);
-    }
-
-    if (Elements.isStaticOrTopLevelField(element)) {
-      visitor.addDeferredAction(element, () {
-        if (element.modifiers.isConst) {
-          element.constant = constantCompiler.compileConstant(element);
-        } else {
-          constantCompiler.compileVariable(element);
-        }
-      });
-      if (initializer != null) {
-        if (!element.modifiers.isConst) {
-          // TODO(johnniwinther): Determine the const-ness eagerly to avoid
-          // unnecessary registrations.
-          registry.registerLazyField();
-        }
-      }
-    }
-
-    // Perform various checks as side effect of "computing" the type.
-    element.computeType(compiler);
-
-    return registry.worldImpact;
-  }
-
-  DartType resolveTypeAnnotation(Element element, TypeAnnotation annotation) {
-    DartType type = resolveReturnType(element, annotation);
-    if (type.isVoid) {
-      error(annotation, MessageKind.VOID_NOT_ALLOWED);
-    }
-    return type;
-  }
-
-  DartType resolveReturnType(Element element, TypeAnnotation annotation) {
-    if (annotation == null) return const DynamicType();
-    DartType result = visitorFor(element).resolveTypeAnnotation(annotation);
-    if (result == null) {
-      // TODO(karklose): warning.
-      return const DynamicType();
-    }
-    return result;
-  }
-
-  void resolveRedirectionChain(ConstructorElementX constructor,
-                               Spannable node) {
-    ConstructorElementX target = constructor;
-    InterfaceType targetType;
-    List<Element> seen = new List<Element>();
-    // Follow the chain of redirections and check for cycles.
-    while (target.isRedirectingFactory) {
-      if (target.internalEffectiveTarget != null) {
-        // We found a constructor that already has been processed.
-        targetType = target.effectiveTargetType;
-        assert(invariant(target, targetType != null,
-            message: 'Redirection target type has not been computed for '
-                     '$target'));
-        target = target.internalEffectiveTarget;
-        break;
-      }
-
-      Element nextTarget = target.immediateRedirectionTarget;
-      if (seen.contains(nextTarget)) {
-        error(node, MessageKind.CYCLIC_REDIRECTING_FACTORY);
-        targetType = target.enclosingClass.thisType;
-        break;
-      }
-      seen.add(target);
-      target = nextTarget;
-    }
-
-    if (targetType == null) {
-      assert(!target.isRedirectingFactory);
-      targetType = target.enclosingClass.thisType;
-    }
-
-    // [target] is now the actual target of the redirections.  Run through
-    // the constructors again and set their [redirectionTarget], so that we
-    // do not have to run the loop for these constructors again. Furthermore,
-    // compute [redirectionTargetType] for each factory by computing the
-    // substitution of the target type with respect to the factory type.
-    while (!seen.isEmpty) {
-      ConstructorElementX factory = seen.removeLast();
-
-      // [factory] must already be analyzed but the [TreeElements] might not
-      // have been stored in the enqueuer cache yet.
-      // TODO(johnniwinther): Store [TreeElements] in the cache before
-      // resolution of the element.
-      TreeElements treeElements = factory.treeElements;
-      assert(invariant(node, treeElements != null,
-          message: 'No TreeElements cached for $factory.'));
-      FunctionExpression functionNode = factory.parseNode(compiler);
-      RedirectingFactoryBody redirectionNode = functionNode.body;
-      DartType factoryType = treeElements.getType(redirectionNode);
-      if (!factoryType.isDynamic) {
-        targetType = targetType.substByContext(factoryType);
-      }
-      factory.effectiveTarget = target;
-      factory.effectiveTargetType = targetType;
-    }
-  }
-
-  /**
-   * Load and resolve the supertypes of [cls].
-   *
-   * Warning: do not call this method directly. It should only be
-   * called by [resolveClass] and [ClassSupertypeResolver].
-   */
-  void loadSupertypes(BaseClassElementX cls, Spannable from) {
-    compiler.withCurrentElement(cls, () => measure(() {
-      if (cls.supertypeLoadState == STATE_DONE) return;
-      if (cls.supertypeLoadState == STATE_STARTED) {
-        compiler.reportError(from, MessageKind.CYCLIC_CLASS_HIERARCHY,
-                                 {'className': cls.name});
-        cls.supertypeLoadState = STATE_DONE;
-        cls.hasIncompleteHierarchy = true;
-        cls.allSupertypesAndSelf =
-            compiler.objectClass.allSupertypesAndSelf.extendClass(
-                cls.computeType(compiler));
-        cls.supertype = cls.allSupertypes.head;
-        assert(invariant(from, cls.supertype != null,
-            message: 'Missing supertype on cyclic class $cls.'));
-        cls.interfaces = const Link<DartType>();
-        return;
-      }
-      cls.supertypeLoadState = STATE_STARTED;
-      compiler.withCurrentElement(cls, () {
-        // TODO(ahe): Cache the node in cls.
-        cls.parseNode(compiler).accept(
-            new ClassSupertypeResolver(compiler, cls));
-        if (cls.supertypeLoadState != STATE_DONE) {
-          cls.supertypeLoadState = STATE_DONE;
-        }
-      });
-    }));
-  }
-
-  // TODO(johnniwinther): Remove this queue when resolution has been split into
-  // syntax and semantic resolution.
-  TypeDeclarationElement currentlyResolvedTypeDeclaration;
-  Queue<ClassElement> pendingClassesToBeResolved = new Queue<ClassElement>();
-  Queue<ClassElement> pendingClassesToBePostProcessed =
-      new Queue<ClassElement>();
-
-  /// Resolve [element] using [resolveTypeDeclaration].
-  ///
-  /// This methods ensure that class declarations encountered through type
-  /// annotations during the resolution of [element] are resolved after
-  /// [element] has been resolved.
-  // TODO(johnniwinther): Encapsulate this functionality in a
-  // 'TypeDeclarationResolver'.
-  _resolveTypeDeclaration(TypeDeclarationElement element,
-                          resolveTypeDeclaration()) {
-    return compiler.withCurrentElement(element, () {
-      return measure(() {
-        TypeDeclarationElement previousResolvedTypeDeclaration =
-            currentlyResolvedTypeDeclaration;
-        currentlyResolvedTypeDeclaration = element;
-        var result = resolveTypeDeclaration();
-        if (previousResolvedTypeDeclaration == null) {
-          do {
-            while (!pendingClassesToBeResolved.isEmpty) {
-              pendingClassesToBeResolved.removeFirst().ensureResolved(compiler);
-            }
-            while (!pendingClassesToBePostProcessed.isEmpty) {
-              _postProcessClassElement(
-                  pendingClassesToBePostProcessed.removeFirst());
-            }
-          } while (!pendingClassesToBeResolved.isEmpty);
-          assert(pendingClassesToBeResolved.isEmpty);
-          assert(pendingClassesToBePostProcessed.isEmpty);
-        }
-        currentlyResolvedTypeDeclaration = previousResolvedTypeDeclaration;
-        return result;
-      });
-    });
-  }
-
-  /**
-   * Resolve the class [element].
-   *
-   * Before calling this method, [element] was constructed by the
-   * scanner and most fields are null or empty. This method fills in
-   * these fields and also ensure that the supertypes of [element] are
-   * resolved.
-   *
-   * Warning: Do not call this method directly. Instead use
-   * [:element.ensureResolved(compiler):].
-   */
-  TreeElements resolveClass(BaseClassElementX element) {
-    return _resolveTypeDeclaration(element, () {
-      // TODO(johnniwinther): Store the mapping in the resolution enqueuer.
-      ResolutionRegistry registry = new ResolutionRegistry(compiler, element);
-      resolveClassInternal(element, registry);
-      return element.treeElements;
-    });
-  }
-
-  void _ensureClassWillBeResolved(ClassElement element) {
-    if (currentlyResolvedTypeDeclaration == null) {
-      element.ensureResolved(compiler);
-    } else {
-      pendingClassesToBeResolved.add(element);
-    }
-  }
-
-  void resolveClassInternal(BaseClassElementX element,
-                            ResolutionRegistry registry) {
-    if (!element.isPatch) {
-      compiler.withCurrentElement(element, () => measure(() {
-        assert(element.resolutionState == STATE_NOT_STARTED);
-        element.resolutionState = STATE_STARTED;
-        Node tree = element.parseNode(compiler);
-        loadSupertypes(element, tree);
-
-        ClassResolverVisitor visitor =
-            new ClassResolverVisitor(compiler, element, registry);
-        visitor.visit(tree);
-        element.resolutionState = STATE_DONE;
-        compiler.onClassResolved(element);
-        pendingClassesToBePostProcessed.add(element);
-      }));
-      if (element.isPatched) {
-        // Ensure handling patch after origin.
-        element.patch.ensureResolved(compiler);
-      }
-    } else { // Handle patch classes:
-      element.resolutionState = STATE_STARTED;
-      // Ensure handling origin before patch.
-      element.origin.ensureResolved(compiler);
-      // Ensure that the type is computed.
-      element.computeType(compiler);
-      // Copy class hierarchy from origin.
-      element.supertype = element.origin.supertype;
-      element.interfaces = element.origin.interfaces;
-      element.allSupertypesAndSelf = element.origin.allSupertypesAndSelf;
-      // Stepwise assignment to ensure invariant.
-      element.supertypeLoadState = STATE_STARTED;
-      element.supertypeLoadState = STATE_DONE;
-      element.resolutionState = STATE_DONE;
-      // TODO(johnniwinther): Check matching type variables and
-      // empty extends/implements clauses.
-    }
-  }
-
-  void _postProcessClassElement(BaseClassElementX element) {
-    for (MetadataAnnotation metadata in element.metadata) {
-      metadata.ensureResolved(compiler);
-      ConstantValue value =
-          compiler.constants.getConstantValue(metadata.constant);
-      if (!element.isProxy && value == compiler.proxyConstant) {
-        element.isProxy = true;
-      }
-    }
-
-    // Force resolution of metadata on non-instance members since they may be
-    // inspected by the backend while emitting. Metadata on instance members is
-    // handled as a result of processing instantiated class members in the
-    // enqueuer.
-    // TODO(ahe): Avoid this eager resolution.
-    element.forEachMember((_, Element member) {
-      if (!member.isInstanceMember) {
-        compiler.withCurrentElement(member, () {
-          for (MetadataAnnotation metadata in member.metadata) {
-            metadata.ensureResolved(compiler);
-          }
-        });
-      }
-    });
-
-    computeClassMember(element, Compiler.CALL_OPERATOR_NAME);
-  }
-
-  void computeClassMembers(ClassElement element) {
-    MembersCreator.computeAllClassMembers(compiler, element);
-  }
-
-  void computeClassMember(ClassElement element, String name) {
-    MembersCreator.computeClassMembersByName(compiler, element, name);
-  }
-
-  void checkClass(ClassElement element) {
-    computeClassMembers(element);
-    if (element.isMixinApplication) {
-      checkMixinApplication(element);
-    } else {
-      checkClassMembers(element);
-    }
-  }
-
-  void checkMixinApplication(MixinApplicationElementX mixinApplication) {
-    Modifiers modifiers = mixinApplication.modifiers;
-    int illegalFlags = modifiers.flags & ~Modifiers.FLAG_ABSTRACT;
-    if (illegalFlags != 0) {
-      Modifiers illegalModifiers = new Modifiers.withFlags(null, illegalFlags);
-      compiler.reportError(
-          modifiers,
-          MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS,
-          {'modifiers': illegalModifiers});
-    }
-
-    // In case of cyclic mixin applications, the mixin chain will have
-    // been cut. If so, we have already reported the error to the
-    // user so we just return from here.
-    ClassElement mixin = mixinApplication.mixin;
-    if (mixin == null) return;
-
-    // Check that we're not trying to use Object as a mixin.
-    if (mixin.superclass == null) {
-      compiler.reportError(mixinApplication,
-                               MessageKind.ILLEGAL_MIXIN_OBJECT);
-      // Avoid reporting additional errors for the Object class.
-      return;
-    }
-
-    if (mixin.isEnumClass) {
-      // Mixing in an enum has already caused a compile-time error.
-      return;
-    }
-
-    // Check that the mixed in class has Object as its superclass.
-    if (!mixin.superclass.isObject) {
-      compiler.reportError(mixin, MessageKind.ILLEGAL_MIXIN_SUPERCLASS);
-    }
-
-    // Check that the mixed in class doesn't have any constructors and
-    // make sure we aren't mixing in methods that use 'super'.
-    mixin.forEachLocalMember((AstElement member) {
-      if (member.isGenerativeConstructor && !member.isSynthesized) {
-        compiler.reportError(member, MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR);
-      } else {
-        // Get the resolution tree and check that the resolved member
-        // doesn't use 'super'. This is the part of the 'super' mixin
-        // check that happens when a function is resolved before the
-        // mixin application has been performed.
-        // TODO(johnniwinther): Obtain the [TreeElements] for [member]
-        // differently.
-        if (compiler.enqueuer.resolution.hasBeenResolved(member)) {
-          checkMixinSuperUses(
-              member.resolvedAst.elements,
-              mixinApplication,
-              mixin);
-        }
-      }
-    });
-  }
-
-  void checkMixinSuperUses(TreeElements resolutionTree,
-                           MixinApplicationElement mixinApplication,
-                           ClassElement mixin) {
-    // TODO(johnniwinther): Avoid the use of [TreeElements] here.
-    if (resolutionTree == null) return;
-    Iterable<Node> superUses = resolutionTree.superUses;
-    if (superUses.isEmpty) return;
-    compiler.reportError(mixinApplication,
-                         MessageKind.ILLEGAL_MIXIN_WITH_SUPER,
-                         {'className': mixin.name});
-    // Show the user the problematic uses of 'super' in the mixin.
-    for (Node use in superUses) {
-      compiler.reportInfo(
-          use,
-          MessageKind.ILLEGAL_MIXIN_SUPER_USE);
-    }
-  }
-
-  void checkClassMembers(ClassElement cls) {
-    assert(invariant(cls, cls.isDeclaration));
-    if (cls.isObject) return;
-    // TODO(johnniwinther): Should this be done on the implementation element as
-    // well?
-    List<Element> constConstructors = <Element>[];
-    List<Element> nonFinalInstanceFields = <Element>[];
-    cls.forEachMember((holder, member) {
-      compiler.withCurrentElement(member, () {
-        // Perform various checks as side effect of "computing" the type.
-        member.computeType(compiler);
-
-        // Check modifiers.
-        if (member.isFunction && member.modifiers.isFinal) {
-          compiler.reportError(
-              member, MessageKind.ILLEGAL_FINAL_METHOD_MODIFIER);
-        }
-        if (member.isConstructor) {
-          final mismatchedFlagsBits =
-              member.modifiers.flags &
-              (Modifiers.FLAG_STATIC | Modifiers.FLAG_ABSTRACT);
-          if (mismatchedFlagsBits != 0) {
-            final mismatchedFlags =
-                new Modifiers.withFlags(null, mismatchedFlagsBits);
-            compiler.reportError(
-                member,
-                MessageKind.ILLEGAL_CONSTRUCTOR_MODIFIERS,
-                {'modifiers': mismatchedFlags});
-          }
-          if (member.modifiers.isConst) {
-            constConstructors.add(member);
-          }
-        }
-        if (member.isField) {
-          if (member.modifiers.isConst && !member.modifiers.isStatic) {
-            compiler.reportError(
-                member, MessageKind.ILLEGAL_CONST_FIELD_MODIFIER);
-          }
-          if (!member.modifiers.isStatic && !member.modifiers.isFinal) {
-            nonFinalInstanceFields.add(member);
-          }
-        }
-        checkAbstractField(member);
-        checkUserDefinableOperator(member);
-      });
-    });
-    if (!constConstructors.isEmpty && !nonFinalInstanceFields.isEmpty) {
-      Spannable span = constConstructors.length > 1
-          ? cls : constConstructors[0];
-      compiler.reportError(span,
-          MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS,
-          {'className': cls.name});
-      if (constConstructors.length > 1) {
-        for (Element constructor in constConstructors) {
-          compiler.reportInfo(constructor,
-              MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_CONSTRUCTOR);
-        }
-      }
-      for (Element field in nonFinalInstanceFields) {
-        compiler.reportInfo(field,
-            MessageKind.CONST_CONSTRUCTOR_WITH_NONFINAL_FIELDS_FIELD);
-      }
-    }
-  }
-
-  void checkAbstractField(Element member) {
-    // Only check for getters. The test can only fail if there is both a setter
-    // and a getter with the same name, and we only need to check each abstract
-    // field once, so we just ignore setters.
-    if (!member.isGetter) return;
-
-    // Find the associated abstract field.
-    ClassElement classElement = member.enclosingClass;
-    Element lookupElement = classElement.lookupLocalMember(member.name);
-    if (lookupElement == null) {
-      compiler.internalError(member,
-          "No abstract field for accessor");
-    } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) {
-      if (lookupElement.isErroneous || lookupElement.isAmbiguous) return;
-      compiler.internalError(member,
-          "Inaccessible abstract field for accessor");
-    }
-    AbstractFieldElement field = lookupElement;
-
-    GetterElementX getter = field.getter;
-    if (getter == null) return;
-    SetterElementX setter = field.setter;
-    if (setter == null) return;
-    int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
-    int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
-    if (!identical(getterFlags, setterFlags)) {
-      final mismatchedFlags =
-        new Modifiers.withFlags(null, getterFlags ^ setterFlags);
-      compiler.reportError(
-          field.getter,
-          MessageKind.GETTER_MISMATCH,
-          {'modifiers': mismatchedFlags});
-      compiler.reportError(
-          field.setter,
-          MessageKind.SETTER_MISMATCH,
-          {'modifiers': mismatchedFlags});
-    }
-  }
-
-  void checkUserDefinableOperator(Element member) {
-    FunctionElement function = member.asFunctionElement();
-    if (function == null) return;
-    String value = member.name;
-    if (value == null) return;
-    if (!(isUserDefinableOperator(value) || identical(value, 'unary-'))) return;
-
-    bool isMinus = false;
-    int requiredParameterCount;
-    MessageKind messageKind;
-    if (identical(value, 'unary-')) {
-      isMinus = true;
-      messageKind = MessageKind.MINUS_OPERATOR_BAD_ARITY;
-      requiredParameterCount = 0;
-    } else if (isMinusOperator(value)) {
-      isMinus = true;
-      messageKind = MessageKind.MINUS_OPERATOR_BAD_ARITY;
-      requiredParameterCount = 1;
-    } else if (isUnaryOperator(value)) {
-      messageKind = MessageKind.UNARY_OPERATOR_BAD_ARITY;
-      requiredParameterCount = 0;
-    } else if (isBinaryOperator(value)) {
-      messageKind = MessageKind.BINARY_OPERATOR_BAD_ARITY;
-      requiredParameterCount = 1;
-      if (identical(value, '==')) checkOverrideHashCode(member);
-    } else if (isTernaryOperator(value)) {
-      messageKind = MessageKind.TERNARY_OPERATOR_BAD_ARITY;
-      requiredParameterCount = 2;
-    } else {
-      compiler.internalError(function,
-          'Unexpected user defined operator $value');
-    }
-    checkArity(function, requiredParameterCount, messageKind, isMinus);
-  }
-
-  void checkOverrideHashCode(FunctionElement operatorEquals) {
-    if (operatorEquals.isAbstract) return;
-    ClassElement cls = operatorEquals.enclosingClass;
-    Element hashCodeImplementation =
-        cls.lookupLocalMember('hashCode');
-    if (hashCodeImplementation != null) return;
-    compiler.reportHint(
-        operatorEquals, MessageKind.OVERRIDE_EQUALS_NOT_HASH_CODE,
-        {'class': cls.name});
-  }
-
-  void checkArity(FunctionElement function,
-                  int requiredParameterCount, MessageKind messageKind,
-                  bool isMinus) {
-    FunctionExpression node = function.node;
-    FunctionSignature signature = function.functionSignature;
-    if (signature.requiredParameterCount != requiredParameterCount) {
-      Node errorNode = node;
-      if (node.parameters != null) {
-        if (isMinus ||
-            signature.requiredParameterCount < requiredParameterCount) {
-          // If there are too few parameters, point to the whole parameter list.
-          // For instance
-          //
-          //     int operator +() {}
-          //                   ^^
-          //
-          //     int operator []=(value) {}
-          //                     ^^^^^^^
-          //
-          // For operator -, always point the whole parameter list, like
-          //
-          //     int operator -(a, b) {}
-          //                   ^^^^^^
-          //
-          // instead of
-          //
-          //     int operator -(a, b) {}
-          //                       ^
-          //
-          // since the correction might not be to remove 'b' but instead to
-          // remove 'a, b'.
-          errorNode = node.parameters;
-        } else {
-          errorNode = node.parameters.nodes.skip(requiredParameterCount).head;
-        }
-      }
-      compiler.reportError(
-          errorNode, messageKind, {'operatorName': function.name});
-    }
-    if (signature.optionalParameterCount != 0) {
-      Node errorNode =
-          node.parameters.nodes.skip(signature.requiredParameterCount).head;
-      if (signature.optionalParametersAreNamed) {
-        compiler.reportError(
-            errorNode,
-            MessageKind.OPERATOR_NAMED_PARAMETERS,
-            {'operatorName': function.name});
-      } else {
-        compiler.reportError(
-            errorNode,
-            MessageKind.OPERATOR_OPTIONAL_PARAMETERS,
-            {'operatorName': function.name});
-      }
-    }
-  }
-
-  reportErrorWithContext(Element errorneousElement,
-                         MessageKind errorMessage,
-                         Element contextElement,
-                         MessageKind contextMessage) {
-    compiler.reportError(
-        errorneousElement,
-        errorMessage,
-        {'memberName': contextElement.name,
-         'className': contextElement.enclosingClass.name});
-    compiler.reportInfo(contextElement, contextMessage);
-  }
-
-
-  FunctionSignature resolveSignature(FunctionElementX element) {
-    MessageKind defaultValuesError = null;
-    if (element.isFactoryConstructor) {
-      FunctionExpression body = element.parseNode(compiler);
-      if (body.isRedirectingFactory) {
-        defaultValuesError = MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT;
-      }
-    }
-    return compiler.withCurrentElement(element, () {
-      FunctionExpression node =
-          compiler.parser.measure(() => element.parseNode(compiler));
-      return measure(() => SignatureResolver.analyze(
-          compiler, node.parameters, node.returnType, element,
-          new ResolutionRegistry(compiler, element),
-          defaultValuesError: defaultValuesError,
-          createRealParameters: true));
-    });
-  }
-
-  WorldImpact resolveTypedef(TypedefElementX element) {
-    if (element.isResolved) return const WorldImpact();
-    compiler.world.allTypedefs.add(element);
-    return _resolveTypeDeclaration(element, () {
-      ResolutionRegistry registry = new ResolutionRegistry(compiler, element);
-      return compiler.withCurrentElement(element, () {
-        return measure(() {
-          assert(element.resolutionState == STATE_NOT_STARTED);
-          element.resolutionState = STATE_STARTED;
-          Typedef node =
-            compiler.parser.measure(() => element.parseNode(compiler));
-          TypedefResolverVisitor visitor =
-            new TypedefResolverVisitor(compiler, element, registry);
-          visitor.visit(node);
-          element.resolutionState = STATE_DONE;
-          return registry.worldImpact;
-        });
-      });
-    });
-  }
-
-  void resolveMetadataAnnotation(MetadataAnnotationX annotation) {
-    compiler.withCurrentElement(annotation.annotatedElement, () => measure(() {
-      assert(annotation.resolutionState == STATE_NOT_STARTED);
-      annotation.resolutionState = STATE_STARTED;
-
-      Node node = annotation.parseNode(compiler);
-      Element annotatedElement = annotation.annotatedElement;
-      AnalyzableElement context = annotatedElement.analyzableElement;
-      ClassElement classElement = annotatedElement.enclosingClass;
-      if (classElement != null) {
-        // The annotation is resolved in the scope of [classElement].
-        classElement.ensureResolved(compiler);
-      }
-      assert(invariant(node, context != null,
-          message: "No context found for metadata annotation "
-                   "on $annotatedElement."));
-      ResolverVisitor visitor = visitorFor(context, useEnclosingScope: true);
-      ResolutionRegistry registry = visitor.registry;
-      node.accept(visitor);
-      // TODO(johnniwinther): Avoid passing the [TreeElements] to
-      // [compileMetadata].
-      annotation.constant =
-          constantCompiler.compileMetadata(annotation, node, registry.mapping);
-      // TODO(johnniwinther): Register the relation between the annotation
-      // and the annotated element instead. This will allow the backend to
-      // retrieve the backend constant and only register metadata on the
-      // elements for which it is needed. (Issue 17732).
-      registry.registerMetadataConstant(annotation, annotatedElement);
-      annotation.resolutionState = STATE_DONE;
-    }));
-  }
-
-  error(Spannable node, MessageKind kind, [arguments = const {}]) {
-    compiler.reportError(node, kind, arguments);
-  }
-
-  Link<MetadataAnnotation> resolveMetadata(Element element,
-                                           VariableDefinitions node) {
-    LinkBuilder<MetadataAnnotation> metadata =
-        new LinkBuilder<MetadataAnnotation>();
-    for (Metadata annotation in node.metadata.nodes) {
-      ParameterMetadataAnnotation metadataAnnotation =
-          new ParameterMetadataAnnotation(annotation);
-      metadataAnnotation.annotatedElement = element;
-      metadata.addLast(metadataAnnotation.ensureResolved(compiler));
-    }
-    return metadata.toLink();
-  }
-}
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'scope.dart' show
+    Scope;
+import 'type_resolver.dart' show
+    TypeResolver;
 
 class CommonResolverVisitor<R> extends Visitor<R> {
   final Compiler compiler;
diff --git a/pkg/compiler/lib/src/resolution/resolution_result.dart b/pkg/compiler/lib/src/resolution/resolution_result.dart
index 4b12234..f4192e9 100644
--- a/pkg/compiler/lib/src/resolution/resolution_result.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_result.dart
@@ -2,7 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.result;
+
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../elements/elements.dart';
+import '../tree/tree.dart';
+import '../universe/universe.dart' show
+    CallStructure;
 
 enum ResultKind {
   NONE,
diff --git a/pkg/compiler/lib/src/resolution/scope.dart b/pkg/compiler/lib/src/resolution/scope.dart
index 79fdacf..c3785f9 100644
--- a/pkg/compiler/lib/src/resolution/scope.dart
+++ b/pkg/compiler/lib/src/resolution/scope.dart
@@ -2,7 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.scope;
+
+import '../dart_types.dart';
+import '../elements/elements.dart';
 
 abstract class Scope {
   /**
diff --git a/pkg/compiler/lib/src/resolution/secret_tree_element.dart b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
index 16216df..644f845 100644
--- a/pkg/compiler/lib/src/resolution/secret_tree_element.dart
+++ b/pkg/compiler/lib/src/resolution/secret_tree_element.dart
@@ -16,9 +16,10 @@
  * So please, do not add additional elements to this library, and do
  * not import it.
  */
-library secret_tree_element;
+library dart2js.resolution.secret_tree_element;
 
-import '../dart2jslib.dart' show invariant, Spannable;
+import '../diagnostics/invariant.dart' show invariant;
+import '../diagnostics/spannable.dart' show Spannable;
 
 /// Interface for associating
 abstract class TreeElementMixin {
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor.dart b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
index d54b68a..6ef3a4b 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor.dart
@@ -5,19 +5,20 @@
 library dart2js.semantics_visitor;
 
 import '../constants/expressions.dart';
-import '../dart2jslib.dart' show invariant, MessageKind;
 import '../dart_types.dart';
-import '../elements/elements.dart';
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
 import '../tree/tree.dart';
+import '../elements/elements.dart';
 import '../universe/universe.dart';
-import '../util/util.dart' show Spannable, SpannableAssertionFailure;
-import 'access_semantics.dart';
+
 import 'operators.dart';
-import 'resolution.dart';
+import 'send_resolver.dart';
 import 'send_structure.dart';
+import 'tree_elements.dart';
 
 part 'semantic_visitor_mixins.dart';
-part 'send_resolver.dart';
 
 /// Mixin that couples a [SendResolverMixin] to a [SemanticSendVisitor] in a
 /// [Visitor].
@@ -43,7 +44,7 @@
     // TODO(johnniwinther): Support argument.
     A arg = null;
 
-    SendStructure structure = computeSendStructure(node);
+    SendStructure structure = elements.getSendStructure(node);
     if (structure == null) {
       return internalError(node, 'No structure for $node');
     } else {
@@ -322,7 +323,7 @@
   R visitDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg);
 
   /// Conditional (if not null) getter call on [receiver] of the property
@@ -335,7 +336,7 @@
   R visitIfNotNullDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg);
 
   /// Setter call on [receiver] with argument [rhs] of the property defined by
@@ -350,7 +351,7 @@
   R visitDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg);
 
@@ -366,7 +367,7 @@
   R visitIfNotNullDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg);
 
@@ -418,7 +419,7 @@
   ///
   R visitThisPropertyGet(
       Send node,
-      Selector selector,
+      Name name,
       A arg);
 
   /// Setter call on `this` with argument [rhs] of the property defined by
@@ -438,7 +439,7 @@
   ///
   R visitThisPropertySet(
       SendSet node,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg);
 
@@ -740,7 +741,7 @@
       Send node,
       Node expression,
       NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       A arg);
 
   /// Read of the static [field].
@@ -1874,10 +1875,9 @@
   R visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Compound assignment expression of [rhs] with [operator] of the property on
@@ -1891,10 +1891,9 @@
   R visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Compound assignment expression of [rhs] with [operator] of the property on
@@ -1915,10 +1914,9 @@
   ///
   R visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Compound assignment expression of [rhs] with [operator] on a [parameter].
@@ -2191,6 +2189,705 @@
       Node rhs,
       A arg);
 
+  /// If-null assignment expression of [rhs] to the [name] property on
+  /// [receiver]. That is, [rhs] is only evaluated and assigned, if the value
+  /// of [name] on [receiver] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(receiver, rhs) => receiver.foo ??= rhs;
+  ///
+  R visitDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the [name] property on
+  /// [receiver] if not null. That is, [rhs] is only evaluated and assigned,
+  /// if the value of [receiver] is _not_ `null` and the value of [name] on
+  /// [receiver] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(receiver, rhs) => receiver?.foo ??= rhs;
+  ///
+  R visitIfNotNullDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the [name] property on `this`.
+  /// That is, [rhs] is only evaluated and assigned, if the value of [name] on
+  /// `this` is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       m(rhs) => this.foo ??= rhs;
+  ///     }
+  ///
+  /// or
+  ///
+  ///     class C {
+  ///       m(rhs) => foo ??= rhs;
+  ///     }
+  ///
+  R visitThisPropertySetIfNull(
+      Send node,
+      Name name,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to [parameter]. That is, [rhs] is
+  /// only evaluated and assigned, if the value of the [parameter] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(parameter, rhs) => parameter ??= rhs;
+  ///
+  R visitParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the final [parameter]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [parameter] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(final parameter, rhs) => parameter ??= rhs;
+  ///
+  R visitFinalParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the local [variable]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [variable] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(rhs) {
+  ///       var variable;
+  ///       variable ??= rhs;
+  ///     }
+  ///
+  R visitLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the final local [variable]. That
+  /// is, [rhs] is only evaluated and assigned, if the value of the [variable]
+  /// is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     m(rhs) {
+  ///       final variable = 0;
+  ///       variable ??= rhs;
+  ///     }
+  ///
+  R visitFinalLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the local [function]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [function] is
+  /// `null`. The behavior is thus equivalent to a closurization of [function].
+  ///
+  /// For instance:
+  ///
+  ///     m(rhs) {
+  ///       function() {}
+  ///       function ??= rhs;
+  ///     }
+  ///
+  R visitLocalFunctionSetIfNull(
+      Send node,
+      LocalFunctionElement function,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static [field]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [field] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       static var field;
+  ///       m(rhs) => field ??= rhs;
+  ///     }
+  ///
+  R visitStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the final static [field]. That
+  /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       static final field = 0;
+  ///       m(rhs) => field ??= rhs;
+  ///     }
+  ///
+  R visitFinalStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static property defined by
+  /// [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [getter] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       static get o => 0;
+  ///       static set o(_) {}
+  ///       m(rhs) => o ??= rhs;
+  ///     }
+  ///
+  R visitStaticGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static property defined by
+  /// [method] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [method] is `null`. The behavior is thus
+  /// equivalent to a closurization of [method].
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       static o() {}
+  ///       static set o(_) {}
+  ///       m(rhs) => o ??= rhs;
+  ///     }
+  ///
+  R visitStaticMethodSetterSetIfNull(
+      Send node,
+      MethodElement method,
+      MethodElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static [method]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [method] is
+  /// `null`. The behavior is thus equivalent to a closurization of [method].
+  ///
+  /// For instance:
+  ///
+  ///     o() {}
+  ///     m(rhs) => o ??= rhs;
+  ///
+  R visitStaticMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level [field]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [field] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     var field;
+  ///     m(rhs) => field ??= rhs;
+  ///
+  R visitTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the final top level [field].
+  /// That is, [rhs] is only evaluated and assigned, if the value of the [field]
+  /// is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     final field = 0;
+  ///     m(rhs) => field ??= rhs;
+  ///
+  R visitFinalTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [getter] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     get o => 0;
+  ///     set o(_) {}
+  ///     m(rhs) => o ??= rhs;
+  ///
+  R visitTopLevelGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [method] is `null`. The behavior is thus
+  /// equivalent to a closurization of [method].
+  ///
+  /// For instance:
+  ///
+  ///     o() {}
+  ///     set o(_) {}
+  ///     m(rhs) => o ??= rhs;
+  ///
+  R visitTopLevelMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level [method]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [method] is
+  /// `null`. The behavior is thus equivalent to a closurization of [method].
+  ///
+  /// For instance:
+  ///
+  ///     o() {}
+  ///     m(rhs) => o ??= rhs;
+  ///
+  R visitTopLevelMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super [field]. That is,
+  /// [rhs] is only evaluated and assigned, if the value of the [field] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       var field;
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.field ??= rhs;
+  ///     }
+  ///
+  R visitSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the final super [field]. That
+  /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       final field = 42;
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.field ??= rhs;
+  ///     }
+  ///
+  R visitFinalSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super property defined
+  /// by [readField] and [writtenField]. That is, [rhs] is only evaluated and
+  /// assigned to the [writtenField], if the value of the [readField] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class A {
+  ///       var field;
+  ///     }
+  ///     class B extends A {
+  ///       final field;
+  ///     }
+  ///     class C extends B {
+  ///       m() => super.field ??= rhs;
+  ///     }
+  ///
+  R visitSuperFieldFieldSetIfNull(
+      Send node,
+      FieldElement readField,
+      FieldElement writtenField,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super property defined
+  /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [getter] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       get o => 0;
+  ///       set o(_) {}
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitSuperGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super property defined
+  /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [method] is `null`. The behavior is thus
+  /// equivalent to a closurization of [method].
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       o() {}
+  ///       set o(_) {}
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitSuperMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super [method].
+  /// That is, [rhs] is only evaluated and assigned, if the value of
+  /// the [method] is `null`. The behavior is thus equivalent to a closurization
+  /// of [method].
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       o() {}
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitSuperMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super property defined
+  /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
+  /// and assigned to the [setter], if the value of the unresolved getter is
+  /// `null`. The behavior is thus equivalent to a no such method error.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       set o(_) {}
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitUnresolvedSuperGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the super property defined
+  /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
+  /// and assigned to the unresolved setter, if the value of the [getter] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///       get o => 42;
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitUnresolvedSuperSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [field] and [setter]. That is, [rhs] is only evaluated and assigned to
+  /// the [setter], if the value of the [field] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class A {
+  ///       var o;
+  ///     }
+  ///     class B extends A {
+  ///       set o(_) {}
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitSuperFieldSetterSetIfNull(
+      Send node,
+      FieldElement field,
+      FunctionElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [getter] and [field]. That is, [rhs] is only evaluated and assigned to
+  /// the [field], if the value of the [getter] is `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class A {
+  ///       var o;
+  ///     }
+  ///     class B extends A {
+  ///       get o => 0;
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.o ??= rhs;
+  ///     }
+  ///
+  R visitSuperGetterFieldSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FieldElement field,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to an unresolved super property.
+  /// That is, [rhs] is only evaluated and assigned, if the value of the
+  /// unresolved property is `null`. The behavior is thus equivalent to a no
+  /// such method error.
+  ///
+  /// For instance:
+  ///
+  ///     class B {
+  ///     }
+  ///     class C extends B {
+  ///       m(rhs) => super.unresolved ??= rhs;
+  ///     }
+  ///
+  R visitUnresolvedSuperSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static property defined
+  /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
+  /// and assigned to the [setter], if the value of the unresolved
+  /// getter is `null`. The behavior is thus equivalent to a no such method
+  /// error.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       set foo(_) {}
+  ///     }
+  ///     m1() => C.foo ??= 42;
+  ///
+  R visitUnresolvedStaticGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
+  /// and assigned to the [setter], if the value of the unresolved getter is
+  /// `null`. The behavior is thus equivalent to a no such method error.
+  ///
+  /// For instance:
+  ///
+  ///     set foo(_) {}
+  ///     m1() => foo ??= 42;
+  ///
+  R visitUnresolvedTopLevelGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the static property defined
+  /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
+  /// and assigned to the unresolved setter, if the value of the [getter] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     class C {
+  ///       get foo => 42;
+  ///     }
+  ///     m1() => C.foo ??= 42;
+  ///
+  R visitUnresolvedStaticSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the top level property defined
+  /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
+  /// and assigned to the unresolved setter, if the value of the [getter] is
+  /// `null`.
+  ///
+  /// For instance:
+  ///
+  ///     get foo => 42;
+  ///     m1() => foo ??= 42;
+  ///
+  R visitUnresolvedTopLevelSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to an unresolved property.
+  /// That is, [rhs] is only evaluated and assigned, if the value of the
+  /// unresolved property is `null`. The behavior is thus equivalent to a no
+  /// such method error.
+  ///
+  /// For instance:
+  ///
+  ///     class C {}
+  ///     m1() => unresolved ??= 42;
+  ///     m2() => C.unresolved ??= 42;
+  ///
+  // TODO(johnniwinther): Split the cases in which a prefix is resolved.
+  R visitUnresolvedSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to an invalid expression.
+  ///
+  /// For instance:
+  ///
+  ///     import 'foo.dart' as p;
+  ///
+  ///     m() => p ??= 42;
+  ///
+  R errorInvalidSetIfNull(
+      Send node,
+      ErroneousElement error,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the class type literal
+  /// [contant]. That is, [rhs] is only evaluated and assigned, if the value
+  /// is of the [constant] is `null`. The behavior is thus equivalent to a type
+  /// literal access.
+  ///
+  /// For instance:
+  ///
+  ///     class C {}
+  ///     m(rhs) => C ??= rhs;
+  ///
+  R visitClassTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the typedef type literal
+  /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
+  /// is of the [constant] is `null`. The behavior is thus equivalent to a type
+  /// literal access.
+  ///
+  /// For instance:
+  ///
+  ///     typedef F();
+  ///     m(rhs) => F ??= rhs;
+  ///
+  R visitTypedefTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the type literal for the type
+  /// variable [element]. That is, [rhs] is only evaluated and assigned, if
+  /// the value is of the [element] is `null`. The behavior is thus equivalent to
+  /// a type literal access.
+  ///
+  /// For instance:
+  ///
+  ///     class C<T> {
+  ///       m(rhs) => T ??= rhs;
+  ///     }
+  ///
+  R visitTypeVariableTypeLiteralSetIfNull(
+      Send node,
+      TypeVariableElement element,
+      Node rhs,
+      A arg);
+
+  /// If-null assignment expression of [rhs] to the dynamic type literal
+  /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
+  /// is of the [constant] is `null`. The behavior is thus equivalent to a type
+  /// literal access.
+  ///
+  /// For instance:
+  ///
+  ///     m(rhs) => dynamic ??= rhs;
+  ///
+  R visitDynamicTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg);
+
   /// Prefix expression with [operator] on a final super [field].
   ///
   /// For instance:
@@ -2618,9 +3315,8 @@
   R visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Prefix expression with [operator] of the property on a possibly null
@@ -2634,9 +3330,8 @@
   R visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Prefix expression with [operator] on a [parameter].
@@ -2727,9 +3422,8 @@
   ///
   R visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Prefix expression with [operator] on a static [field].
@@ -3105,9 +3799,8 @@
   R visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Postfix expression with [operator] of the property on a possibly null
@@ -3121,9 +3814,8 @@
   R visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Postfix expression with [operator] on a [parameter].
@@ -3214,9 +3906,8 @@
   ///
   R visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   /// Postfix expression with [operator] on a static [field].
@@ -3605,7 +4296,7 @@
       Send node,
       ConstantExpression constant,
       NodeList arguments,
-      CallStructure callStreucture,
+      CallStructure callStructure,
       A arg);
 
   /// Read of the unresolved [element].
diff --git a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
index ec45561..fce1179 100644
--- a/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
+++ b/pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart
@@ -205,6 +205,15 @@
       A arg) {
     return bulkHandleError(node, error, arg);
   }
+
+  @override
+  R errorInvalidSetIfNull(
+      Send node,
+      ErroneousElement error,
+      Node rhs,
+      A arg) {
+    return bulkHandleError(node, error, arg);
+  }
 }
 
 /// Mixin that implements all `visitXPrefix` methods of [SemanticSendVisitor] by
@@ -223,9 +232,8 @@
   R visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePrefix(node, arg);
   }
@@ -233,9 +241,8 @@
   R visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePrefix(node, arg);
   }
@@ -402,9 +409,8 @@
   @override
   R visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePrefix(node, arg);
   }
@@ -650,9 +656,8 @@
   R visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePostfix(node, arg);
   }
@@ -661,9 +666,8 @@
   R visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePostfix(node, arg);
   }
@@ -829,9 +833,8 @@
   @override
   R visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandlePostfix(node, arg);
   }
@@ -1085,10 +1088,9 @@
   R visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandleCompound(node, arg);
   }
@@ -1097,10 +1099,9 @@
   R visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandleCompound(node, arg);
   }
@@ -1214,10 +1215,9 @@
   @override
   R visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return bulkHandleCompound(node, arg);
   }
@@ -1480,6 +1480,378 @@
   }
 }
 
+/// Mixin that implements all `visitXSetIfNull` methods of [SemanticSendVisitor]
+/// by delegating to a bulk handler.
+///
+/// Use this mixin to provide a trivial implementation for all `xSetIfNull`
+/// methods.
+abstract class SetIfNullBulkMixin<R, A>
+    implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
+
+  R bulkHandleSetIfNull(Send node, A arg) {
+    return bulkHandleNode(node, "If null assignment `#` unhandled.", arg);
+  }
+
+  @override
+  R visitClassTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitDynamicTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitFinalLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitFinalParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitFinalStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitFinalSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitFinalTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitIfNotNullDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitLocalFunctionSetIfNull(
+      Send node,
+      LocalFunctionElement function,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitStaticGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitStaticMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitStaticMethodSetterSetIfNull(
+      Send node,
+      MethodElement method,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperFieldFieldSetIfNull(
+      Send node,
+      FieldElement readField,
+      FieldElement writtenField,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperFieldSetterSetIfNull(
+      Send node,
+      FieldElement field,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperGetterFieldSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitSuperMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitThisPropertySetIfNull(
+      Send node,
+      Name name,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTopLevelGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTopLevelMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTopLevelMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTypeVariableTypeLiteralSetIfNull(
+      Send node,
+      TypeVariableElement element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitTypedefTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedStaticGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedStaticSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedSuperSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedTopLevelGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+
+  @override
+  R visitUnresolvedTopLevelSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return bulkHandleSetIfNull(node, arg);
+  }
+}
+
 /// Mixin that implements all `visitXInvoke` methods of [SemanticSendVisitor] by
 /// delegating to a bulk handler.
 ///
@@ -1537,7 +1909,7 @@
       Send node,
       Node expression,
       NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       A arg) {
     return bulkHandleInvoke(node, arg);
   }
@@ -1825,7 +2197,7 @@
   R visitDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
     return bulkHandleGet(node, arg);
   }
@@ -1834,7 +2206,7 @@
   R visitIfNotNullDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
     return bulkHandleGet(node, arg);
   }
@@ -1927,7 +2299,7 @@
   @override
   R visitThisPropertyGet(
       Send node,
-      Selector selector,
+      Name name,
       A arg) {
     return bulkHandleGet(node, arg);
   }
@@ -2037,7 +2409,7 @@
   R visitDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     return bulkHandleSet(node, arg);
@@ -2047,7 +2419,7 @@
   R visitIfNotNullDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     return bulkHandleSet(node, arg);
@@ -2110,7 +2482,7 @@
   @override
   R visitThisPropertySet(
       SendSet node,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     return bulkHandleSet(node, arg);
@@ -3158,6 +3530,7 @@
          InvokeBulkMixin<R, A>,
          IndexSetBulkMixin<R, A>,
          CompoundBulkMixin<R, A>,
+         SetIfNullBulkMixin<R, A>,
          UnaryBulkMixin<R, A>,
          BaseBulkMixin<R, A>,
          BinaryBulkMixin<R, A>,
@@ -4267,10 +4640,9 @@
   R visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
@@ -4281,10 +4653,9 @@
   R visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     apply(rhs, arg);
@@ -4295,7 +4666,7 @@
   R visitDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4305,7 +4676,7 @@
   R visitIfNotNullDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4339,9 +4710,8 @@
   R visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4351,9 +4721,8 @@
   R visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4363,9 +4732,8 @@
   R visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4375,9 +4743,8 @@
   R visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(receiver, arg);
     return null;
@@ -4387,7 +4754,7 @@
   R visitDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     apply(receiver, arg);
@@ -4399,7 +4766,7 @@
   R visitIfNotNullDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     apply(receiver, arg);
@@ -4471,7 +4838,7 @@
       Send node,
       Node expression,
       NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       A arg) {
     apply(expression, arg);
     apply(arguments, arg);
@@ -5260,10 +5627,9 @@
   @override
   R visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     apply(rhs, arg);
     return null;
@@ -5272,7 +5638,7 @@
   @override
   R visitThisPropertyGet(
       Send node,
-      Selector selector,
+      Name name,
       A arg) {
     return null;
   }
@@ -5290,9 +5656,8 @@
   @override
   R visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return null;
   }
@@ -5300,9 +5665,8 @@
   @override
   R visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return null;
   }
@@ -5310,7 +5674,7 @@
   @override
   R visitThisPropertySet(
       SendSet node,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
     apply(rhs, arg);
@@ -5876,6 +6240,415 @@
   }
 
   @override
+  R errorInvalidSetIfNull(
+      Send node,
+      ErroneousElement error,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitClassTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    apply(receiver, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitDynamicTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitFinalLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitFinalParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitFinalStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitFinalSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitFinalTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitIfNotNullDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    apply(receiver, arg);
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitLocalFunctionSetIfNull(
+      Send node,
+      LocalFunctionElement function,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitStaticGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitStaticMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitStaticMethodSetterSetIfNull(
+      Send node,
+      MethodElement method,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperFieldFieldSetIfNull(
+      Send node,
+      FieldElement readField,
+      FieldElement writtenField,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperFieldSetterSetIfNull(
+      Send node,
+      FieldElement field,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperGetterFieldSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitSuperMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitThisPropertySetIfNull(
+      Send node,
+      Name name,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTopLevelGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTopLevelMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTopLevelMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTypeVariableTypeLiteralSetIfNull(
+      Send node,
+      TypeVariableElement element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitTypedefTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedStaticGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedStaticSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedSuperSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedTopLevelGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
+  R visitUnresolvedTopLevelSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    apply(rhs, arg);
+    return null;
+  }
+
+  @override
   R visitConstConstructorInvoke(
       NewExpression node,
       ConstructedConstantExpression constant,
@@ -6927,6 +7700,12 @@
     node.visitChildren(this);
     return null;
   }
+
+  @override
+  R visitTypeAnnotation(TypeAnnotation node) {
+    // Skip [Send] contained in type annotations, like `prefix.Type`.
+    return null;
+  }
 }
 
 /// Mixin that groups all non-compound `visitStaticX` and `visitTopLevelX`
@@ -8082,7 +8861,7 @@
   R handleDynamicGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg);
 
   R handleDynamicInvoke(
@@ -8095,7 +8874,7 @@
   R handleDynamicSet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg);
 
@@ -8103,19 +8882,19 @@
   R visitDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
-    return handleDynamicGet(node, receiver, selector, arg);
+    return handleDynamicGet(node, receiver, name, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       A arg) {
     // TODO(johnniwinther): should these redirect to handleDynamicX?
-    return handleDynamicGet(node, receiver, selector, arg);
+    return handleDynamicGet(node, receiver, name, arg);
   }
 
   @override
@@ -8142,28 +8921,28 @@
   R visitDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
-    return handleDynamicSet(node, receiver, selector, rhs, arg);
+    return handleDynamicSet(node, receiver, name, rhs, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
-    return handleDynamicSet(node, receiver, selector, rhs, arg);
+    return handleDynamicSet(node, receiver, name, rhs, arg);
   }
 
   @override
   R visitThisPropertyGet(
       Send node,
-      Selector selector,
+      Name name,
       A arg) {
-    return handleDynamicGet(node, null, selector, arg);
+    return handleDynamicGet(node, null, name, arg);
   }
 
   @override
@@ -8178,10 +8957,10 @@
   @override
   R visitThisPropertySet(
       SendSet node,
-      Selector selector,
+      Name name,
       Node rhs,
       A arg) {
-    return handleDynamicSet(node, null, selector, rhs, arg);
+    return handleDynamicSet(node, null, name, rhs, arg);
   }
 }
 
@@ -8196,18 +8975,16 @@
   R handleDynamicCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   R handleDynamicPostfixPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg,
       {bool isPrefix});
 
@@ -8223,114 +9000,98 @@
   R visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompound(
-        node, receiver, operator, rhs, getterSelector, setterSelector, arg);
+        node, receiver, name, operator, rhs, arg);
   }
 
   @override
   R visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompound(
-        node, receiver, operator, rhs, getterSelector, setterSelector, arg);
+        node, receiver, name, operator, rhs, arg);
   }
 
   @override
   R visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, receiver, operator,
-        getterSelector, setterSelector, arg, isPrefix: false);
+        node, receiver, name, operator, arg, isPrefix: false);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, receiver, operator,
-        getterSelector, setterSelector, arg, isPrefix: false);
+        node, receiver, name, operator, arg, isPrefix: false);
   }
 
   @override
   R visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, receiver, operator,
-        getterSelector, setterSelector, arg, isPrefix: true);
+        node, receiver, name, operator, arg, isPrefix: true);
   }
 
   @override
   R visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, receiver, operator,
-        getterSelector, setterSelector, arg, isPrefix: true);
+        node, receiver, name, operator, arg, isPrefix: true);
   }
 
   @override
   R visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
-    return handleDynamicCompound(
-        node, null, operator, rhs, getterSelector, setterSelector, arg);
+    return handleDynamicCompound(node, null, name, operator, rhs, arg);
   }
 
   @override
   R visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, null, operator,
-        getterSelector, setterSelector, arg, isPrefix: false);
+        node, null, name, operator, arg, isPrefix: false);
   }
 
   @override
   R visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicPostfixPrefix(
-        node, null, operator,
-        getterSelector, setterSelector, arg, isPrefix: true);
+        node, null, name, operator, arg, isPrefix: true);
   }
 
   @override
@@ -8487,59 +9248,52 @@
   R handleDynamicCompounds(
       Send node,
       Node receiver,
+      Name name,
       CompoundRhs rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg);
 
   R visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new AssignmentCompound(operator, rhs),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
   R visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new AssignmentCompound(operator, rhs),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
   @override
   R visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         null,
+        name,
         new AssignmentCompound(operator, rhs),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -8896,32 +9650,28 @@
   R visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new IncDecCompound(CompoundKind.PREFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
   R visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new IncDecCompound(CompoundKind.PREFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -8970,16 +9720,14 @@
 
   R visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         null,
+        name,
         new IncDecCompound(CompoundKind.PREFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -9216,16 +9964,14 @@
   R visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -9233,16 +9979,14 @@
   R visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         receiver,
+        name,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -9291,16 +10035,14 @@
 
   R visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       A arg) {
     return handleDynamicCompounds(
         node,
         null,
+        name,
         new IncDecCompound(CompoundKind.POSTFIX, operator),
-        getterSelector,
-        setterSelector,
         arg);
   }
 
@@ -10260,6 +11002,594 @@
   }
 }
 
+/// Simplified handling of if-null assignments.
+abstract class BaseImplementationOfSetIfNullsMixin<R, A>
+    implements SemanticSendVisitor<R, A> {
+
+  /// Handle a super if-null assignments, like `super.foo ??= 42`.
+  R handleSuperSetIfNulls(
+      SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      Node rhs,
+      A arg);
+
+  /// Handle a static or top level if-null assignments, like `foo ??= 42`.
+  R handleStaticSetIfNulls(
+      SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      Node rhs,
+      A arg);
+
+  /// Handle a local if-null assignments, like `foo ??= 42`. If [isSetterValid]
+  /// is false [local] is unassignable.
+  R handleLocalSetIfNulls(
+      SendSet node,
+      LocalElement local,
+      Node rhs,
+      A arg,
+      {bool isSetterValid});
+
+  /// Handle a if-null assignments on a type literal constant, like
+  /// `Object ??= 42`.
+  R handleTypeLiteralConstantSetIfNulls(
+      SendSet node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg);
+
+  /// Handle a dynamic if-null assignments, like `o.foo ??= 42`. [receiver] is
+  /// `null` for properties on `this`, like `this.foo ??= 42` or `foo ??= 42`.
+  R handleDynamicSetIfNulls(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg);
+
+  @override
+  R visitClassTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
+  }
+
+  @override
+  R visitDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    return handleDynamicSetIfNulls(node, receiver, name, rhs, arg);
+  }
+
+  @override
+  R visitDynamicTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
+  }
+
+  @override
+  R visitFinalLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    return handleLocalSetIfNulls(
+        node, variable, rhs, arg, isSetterValid: false);
+  }
+
+  @override
+  R visitFinalParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    return handleLocalSetIfNulls(
+        node, parameter, rhs, arg, isSetterValid: false);
+  }
+
+  @override
+  R visitFinalStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitFinalSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitFinalTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitIfNotNullDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      A arg) {
+    return handleDynamicSetIfNulls(node, receiver, name, rhs, arg);
+  }
+
+  @override
+  R visitLocalFunctionSetIfNull(
+      Send node,
+      LocalFunctionElement function,
+      Node rhs,
+      A arg) {
+    return handleLocalSetIfNulls(
+        node, function, rhs, arg, isSetterValid: false);
+  }
+
+  @override
+  R visitLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      A arg) {
+    return handleLocalSetIfNulls(
+        node, variable, rhs, arg, isSetterValid: true);
+  }
+
+  @override
+  R visitParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      A arg) {
+    return handleLocalSetIfNulls(
+        node, parameter, rhs, arg, isSetterValid: true);
+  }
+
+  @override
+  R visitStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitStaticGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitStaticMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        method,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitStaticMethodSetterSetIfNull(
+      Send node,
+      MethodElement method,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperFieldFieldSetIfNull(
+      Send node,
+      FieldElement readField,
+      FieldElement writtenField,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        readField,
+        CompoundGetter.FIELD,
+        writtenField,
+        CompoundSetter.FIELD,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperFieldSetterSetIfNull(
+      Send node,
+      FieldElement field,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperGetterFieldSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        field,
+        CompoundSetter.FIELD,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        method,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitSuperMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitThisPropertySetIfNull(
+      Send node,
+      Name name,
+      Node rhs,
+      A arg) {
+    return handleDynamicSetIfNulls(node, null, name, rhs, arg);
+  }
+
+  @override
+  R visitTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        field,
+        CompoundGetter.FIELD,
+        field,
+        CompoundSetter.FIELD,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitTopLevelGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitTopLevelMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        method,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitTopLevelMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        method,
+        CompoundGetter.METHOD,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitTypedefTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      A arg) {
+    return handleTypeLiteralConstantSetIfNulls(node, constant, rhs, arg);
+  }
+
+  @override
+  R visitUnresolvedSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        element,
+        CompoundGetter.UNRESOLVED,
+        element,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedStaticGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        element,
+        CompoundGetter.UNRESOLVED,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedStaticSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        element,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedSuperGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        element,
+        CompoundGetter.UNRESOLVED,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedSuperSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        element,
+        CompoundGetter.UNRESOLVED,
+        element,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedSuperSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return handleSuperSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        element,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedTopLevelGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        element,
+        CompoundGetter.UNRESOLVED,
+        setter,
+        CompoundSetter.SETTER,
+        rhs,
+        arg);
+  }
+
+  @override
+  R visitUnresolvedTopLevelSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      A arg) {
+    return handleStaticSetIfNulls(
+        node,
+        getter,
+        CompoundGetter.GETTER,
+        element,
+        CompoundSetter.INVALID,
+        rhs,
+        arg);
+  }
+}
+
 /// Simplified handling of indexed compound assignments and prefix/postfix
 /// expressions.
 abstract class BaseImplementationOfIndexCompoundsMixin<R, A>
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index d3f4e61..49369cc 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -2,545 +2,29 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js.semantics_visitor;
+library dart2js.semantics_visitor.resolver;
 
-enum SendStructureKind {
-  GET,
-  SET,
-  INVOKE,
-  UNARY,
-  NOT,
-  BINARY,
-  EQ,
-  NOT_EQ,
-  COMPOUND,
-  INDEX,
-  INDEX_SET,
-  COMPOUND_INDEX_SET,
-  PREFIX,
-  POSTFIX,
-  INDEX_PREFIX,
-  INDEX_POSTFIX,
-}
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
+import '../elements/elements.dart';
+import '../tree/tree.dart';
+import '../universe/universe.dart';
+
+import 'access_semantics.dart';
+import 'semantic_visitor.dart';
+import 'send_structure.dart';
+import 'tree_elements.dart';
 
 abstract class SendResolverMixin {
   TreeElements get elements;
 
   internalError(Spannable spannable, String message);
 
-  AccessSemantics handleCompoundErroneousSetterAccess(
-      Send node,
-      Element setter,
-      Element getter) {
-    assert(invariant(node, Elements.isUnresolved(setter),
-        message: "Unexpected erreneous compound setter: $setter."));
-    if (getter.isStatic) {
-      if (getter.isGetter) {
-        return new CompoundAccessSemantics(
-            CompoundAccessKind.UNRESOLVED_STATIC_SETTER, getter, setter);
-      } else if (getter.isField) {
-        // TODO(johnniwinther): Handle const field separately.
-        assert(invariant(node, getter.isFinal || getter.isConst,
-            message: "Field expected to be final or const."));
-        return new StaticAccess.finalStaticField(getter);
-      } else if (getter.isFunction) {
-        return new StaticAccess.staticMethod(getter);
-      } else {
-        return internalError(node,
-            "Unexpected erroneous static compound: getter=$getter");
-      }
-    } else if (getter.isTopLevel) {
-      if (getter.isGetter) {
-        return new CompoundAccessSemantics(
-            CompoundAccessKind.UNRESOLVED_TOPLEVEL_SETTER, getter, setter);
-      } else if (getter.isField) {
-        // TODO(johnniwinther): Handle const field separately.
-        assert(invariant(node, getter.isFinal || getter.isConst,
-            message: "Field expected to be final or const."));
-        return new StaticAccess.finalTopLevelField(getter);
-      } else if (getter.isFunction) {
-        return new StaticAccess.topLevelMethod(getter);
-      } else {
-        return internalError(node,
-            "Unexpected erroneous top level compound: getter=$getter");
-      }
-    } else if (getter.isParameter) {
-      assert(invariant(node, getter.isFinal,
-          message: "Parameter expected to be final."));
-      return new StaticAccess.finalParameter(getter);
-    } else if (getter.isLocal) {
-      if (getter.isVariable) {
-        // TODO(johnniwinther): Handle const variable separately.
-        assert(invariant(node, getter.isFinal || getter.isConst,
-            message: "Variable expected to be final or const."));
-        return new StaticAccess.finalLocalVariable(getter);
-      } else if (getter.isFunction) {
-        return new StaticAccess.localFunction(getter);
-      } else {
-        return internalError(node,
-            "Unexpected erroneous local compound: getter=$getter");
-      }
-    } else if (getter.isErroneous) {
-      return new StaticAccess.unresolved(getter);
-    } else {
-      return internalError(node,
-          "Unexpected erroneous compound: getter=$getter");
-    }
-  }
-
-  AccessSemantics handleStaticallyResolvedAccess(
-      Send node,
-      Element element,
-      Element getter,
-      {bool isCompound}) {
-    if (element == null) {
-      assert(invariant(node, isCompound, message:
-        "Non-compound static access without element."));
-      assert(invariant(node, getter != null, message:
-        "Compound static access without element."));
-      return handleCompoundErroneousSetterAccess(node, element, getter);
-    }
-    if (element.isErroneous) {
-      if (isCompound) {
-        return handleCompoundErroneousSetterAccess(node, element, getter);
-      }
-      return new StaticAccess.unresolved(element);
-    } else if (element.isParameter) {
-      if (element.isFinal) {
-        return new StaticAccess.finalParameter(element);
-      } else {
-        return new StaticAccess.parameter(element);
-      }
-    } else if (element.isLocal) {
-      if (element.isFunction) {
-        return new StaticAccess.localFunction(element);
-      } else if (element.isFinal || element.isConst) {
-        return new StaticAccess.finalLocalVariable(element);
-      } else {
-        return new StaticAccess.localVariable(element);
-      }
-    } else if (element.isStatic) {
-      if (element.isField) {
-        if (element.isFinal || element.isConst) {
-          // TODO(johnniwinther): Handle const field separately.
-          return new StaticAccess.finalStaticField(element);
-        }
-        return new StaticAccess.staticField(element);
-      } else if (element.isGetter) {
-        if (isCompound) {
-          return new CompoundAccessSemantics(
-              CompoundAccessKind.UNRESOLVED_STATIC_SETTER, element, null);
-        }
-        return new StaticAccess.staticGetter(element);
-      } else if (element.isSetter) {
-        if (getter != null) {
-          CompoundAccessKind accessKind;
-          if (getter.isErroneous) {
-            accessKind = CompoundAccessKind.UNRESOLVED_STATIC_GETTER;
-          } else if (getter.isAbstractField) {
-            AbstractFieldElement abstractField = getter;
-            if (abstractField.getter == null) {
-              accessKind = CompoundAccessKind.UNRESOLVED_STATIC_GETTER;
-            } else {
-              // TODO(johnniwinther): This might be dead code.
-              getter = abstractField.getter;
-              accessKind = CompoundAccessKind.STATIC_GETTER_SETTER;
-            }
-          } else if (getter.isGetter) {
-            accessKind = CompoundAccessKind.STATIC_GETTER_SETTER;
-          } else {
-            accessKind = CompoundAccessKind.STATIC_METHOD_SETTER;
-          }
-          return new CompoundAccessSemantics(
-              accessKind, getter, element);
-        } else {
-          return new StaticAccess.staticSetter(element);
-        }
-      } else {
-        return new StaticAccess.staticMethod(element);
-      }
-    } else if (element.isTopLevel) {
-      if (element.isField) {
-        if (element.isFinal || element.isConst) {
-          // TODO(johnniwinther): Handle const field separately.
-          return new StaticAccess.finalTopLevelField(element);
-        }
-        return new StaticAccess.topLevelField(element);
-      } else if (element.isGetter) {
-        return new StaticAccess.topLevelGetter(element);
-      } else if (element.isSetter) {
-        if (getter != null) {
-          CompoundAccessKind accessKind;
-          if (getter.isErroneous) {
-            accessKind = CompoundAccessKind.UNRESOLVED_TOPLEVEL_GETTER;
-          } else if (getter.isAbstractField) {
-            AbstractFieldElement abstractField = getter;
-            if (abstractField.getter == null) {
-              accessKind = CompoundAccessKind.UNRESOLVED_TOPLEVEL_GETTER;
-            } else {
-              // TODO(johnniwinther): This might be dead code.
-              getter = abstractField.getter;
-              accessKind = CompoundAccessKind.TOPLEVEL_GETTER_SETTER;
-            }
-          } else if (getter.isGetter) {
-            accessKind = CompoundAccessKind.TOPLEVEL_GETTER_SETTER;
-          } else {
-            accessKind = CompoundAccessKind.TOPLEVEL_METHOD_SETTER;
-          }
-          return new CompoundAccessSemantics(
-              accessKind, getter, element);
-        } else {
-          return new StaticAccess.topLevelSetter(element);
-        }
-      } else {
-        return new StaticAccess.topLevelMethod(element);
-      }
-    } else {
-      return internalError(
-          node, "Unhandled resolved property access: $element");
-    }
-  }
-
-  SendStructure computeSendStructure(Send node) {
-    SendStructure sendStructure = elements.getSendStructure(node);
-    if (sendStructure != null) {
-      return sendStructure;
-    }
-
-    if (elements.isAssert(node)) {
-      return internalError(node, "Unexpected assert.");
-    }
-
-    AssignmentOperator assignmentOperator;
-    BinaryOperator binaryOperator;
-    IncDecOperator incDecOperator;
-
-    if (node.isOperator) {
-      String operatorText = node.selector.asOperator().source;
-      if (operatorText == 'is') {
-        return internalError(node, "Unexpected is test.");
-      } else if (operatorText == 'as') {
-        return internalError(node, "Unexpected as cast.");
-      } else if (operatorText == '&&') {
-        return internalError(node, "Unexpected logical and.");
-      } else if (operatorText == '||') {
-        return internalError(node, "Unexpected logical or.");
-      } else if (operatorText == '??') {
-        return internalError(node, "Unexpected if-null.");
-      }
-    }
-
-    SendStructureKind kind;
-
-    if (node.asSendSet() != null) {
-      SendSet sendSet = node.asSendSet();
-      String operatorText = sendSet.assignmentOperator.source;
-      if (sendSet.isPrefix || sendSet.isPostfix) {
-        kind = sendSet.isPrefix
-            ? SendStructureKind.PREFIX
-            : SendStructureKind.POSTFIX;
-        incDecOperator = IncDecOperator.parse(operatorText);
-        if (incDecOperator == null) {
-          return internalError(
-              node, "No inc/dec operator for '$operatorText'.");
-        }
-      } else {
-        assignmentOperator = AssignmentOperator.parse(operatorText);
-        if (assignmentOperator != null) {
-          switch (assignmentOperator.kind) {
-            case AssignmentOperatorKind.ASSIGN:
-              kind = SendStructureKind.SET;
-              break;
-            default:
-              kind = SendStructureKind.COMPOUND;
-          }
-        } else {
-          return internalError(
-              node, "No assignment operator for '$operatorText'.");
-        }
-      }
-    } else if (!node.isPropertyAccess) {
-      kind = SendStructureKind.INVOKE;
-    } else {
-      kind = SendStructureKind.GET;
-    }
-
-    if (node.isOperator) {
-      String operatorText = node.selector.asOperator().source;
-      if (node.arguments.isEmpty) {
-        return internalError(node, "Unexpected unary $operatorText.");
-      } else {
-        binaryOperator = BinaryOperator.parse(operatorText);
-        if (binaryOperator != null) {
-          switch (binaryOperator.kind) {
-            case BinaryOperatorKind.EQ:
-              kind = SendStructureKind.EQ;
-              return internalError(node, "Unexpected binary $kind.");
-            case BinaryOperatorKind.NOT_EQ:
-              kind = SendStructureKind.NOT_EQ;
-              return internalError(node, "Unexpected binary $kind.");
-            case BinaryOperatorKind.INDEX:
-              if (node.isPrefix) {
-                kind = SendStructureKind.INDEX_PREFIX;
-              } else if (node.isPostfix) {
-                kind = SendStructureKind.INDEX_POSTFIX;
-              } else if (node.arguments.tail.isEmpty) {
-                // a[b]
-                kind = SendStructureKind.INDEX;
-                return internalError(node, "Unexpected binary $kind.");
-              } else {
-                if (kind == SendStructureKind.COMPOUND) {
-                  // a[b] += c
-                  kind = SendStructureKind.COMPOUND_INDEX_SET;
-                } else {
-                  // a[b] = c
-                  kind = SendStructureKind.INDEX_SET;
-                }
-              }
-              break;
-            default:
-              kind = SendStructureKind.BINARY;
-              return internalError(node, "Unexpected binary $kind.");
-          }
-        } else {
-          return internalError(
-              node, "Unexpected invalid binary $operatorText.");
-        }
-      }
-    }
-    AccessSemantics semantics = computeAccessSemantics(
-        node,
-        isSet: kind == SendStructureKind.SET,
-        isInvoke: kind == SendStructureKind.INVOKE,
-        isCompound: kind == SendStructureKind.COMPOUND ||
-                    kind == SendStructureKind.COMPOUND_INDEX_SET ||
-                    kind == SendStructureKind.PREFIX ||
-                    kind == SendStructureKind.POSTFIX ||
-                    kind == SendStructureKind.INDEX_PREFIX ||
-                    kind == SendStructureKind.INDEX_POSTFIX);
-    if (semantics == null) {
-      return internalError(node, 'No semantics for $node');
-    }
-    Selector selector = elements.getSelector(node);
-    switch (kind) {
-      case SendStructureKind.GET:
-        return new GetStructure(semantics, selector);
-      case SendStructureKind.SET:
-        return new SetStructure(semantics, selector);
-      case SendStructureKind.INVOKE:
-        switch (semantics.kind) {
-          case AccessKind.STATIC_METHOD:
-          case AccessKind.SUPER_METHOD:
-          case AccessKind.TOPLEVEL_METHOD:
-            // TODO(johnniwinther): Should local function also be handled here?
-            FunctionElement function = semantics.element;
-            FunctionSignature signature = function.functionSignature;
-            if (!selector.callStructure.signatureApplies(signature)) {
-              return new IncompatibleInvokeStructure(semantics, selector);
-            }
-            break;
-          default:
-            break;
-        }
-        return new InvokeStructure(semantics, selector);
-      case SendStructureKind.UNARY:
-        return internalError(node, "Unexpected unary.");
-      case SendStructureKind.NOT:
-        return internalError(node, "Unexpected not.");
-      case SendStructureKind.BINARY:
-        return internalError(node, "Unexpected binary.");
-      case SendStructureKind.INDEX:
-        return internalError(node, "Unexpected index.");
-      case SendStructureKind.EQ:
-        return internalError(node, "Unexpected equals.");
-      case SendStructureKind.NOT_EQ:
-        return internalError(node, "Unexpected not equals.");
-      case SendStructureKind.COMPOUND:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new CompoundStructure(
-            semantics,
-            assignmentOperator,
-            getterSelector,
-            selector);
-      case SendStructureKind.INDEX_SET:
-        return new IndexSetStructure(semantics, selector);
-      case SendStructureKind.COMPOUND_INDEX_SET:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new CompoundIndexSetStructure(
-            semantics,
-            assignmentOperator,
-            getterSelector,
-            selector);
-      case SendStructureKind.INDEX_PREFIX:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new IndexPrefixStructure(
-            semantics,
-            incDecOperator,
-            getterSelector,
-            selector);
-      case SendStructureKind.INDEX_POSTFIX:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new IndexPostfixStructure(
-            semantics,
-            incDecOperator,
-            getterSelector,
-            selector);
-      case SendStructureKind.PREFIX:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new PrefixStructure(
-            semantics,
-            incDecOperator,
-            getterSelector,
-            selector);
-      case SendStructureKind.POSTFIX:
-        Selector getterSelector =
-            elements.getGetterSelectorInComplexSendSet(node);
-        return new PostfixStructure(
-            semantics,
-            incDecOperator,
-            getterSelector,
-            selector);
-    }
-  }
-
-  AccessSemantics computeAccessSemantics(Send node,
-                                         {bool isSet: false,
-                                          bool isInvoke: false,
-                                          bool isCompound: false}) {
-    Element element = elements[node];
-    Element getter = isCompound ? elements[node.selector] : null;
-    if (elements.isTypeLiteral(node)) {
-      DartType dartType = elements.getTypeLiteralType(node);
-      // TODO(johnniwinther): Handle deferred constants. There are runtime
-      // but not compile-time constants and should have their own
-      // [DeferredConstantExpression] class.
-      ConstantExpression constant = elements.getConstant(
-          isInvoke || isSet || isCompound ? node.selector : node);
-      switch (dartType.kind) {
-        case TypeKind.INTERFACE:
-          return new ConstantAccess.classTypeLiteral(constant);
-        case TypeKind.TYPEDEF:
-          return new ConstantAccess.typedefTypeLiteral(constant);
-        case TypeKind.TYPE_VARIABLE:
-          return new StaticAccess.typeParameterTypeLiteral(dartType.element);
-        case TypeKind.DYNAMIC:
-          return new ConstantAccess.dynamicTypeLiteral(constant);
-        default:
-          return internalError(node, "Unexpected type literal type: $dartType");
-      }
-    } else if (node.isSuperCall) {
-      if (Elements.isUnresolved(element)) {
-        if (isCompound) {
-          if (Elements.isUnresolved(getter)) {
-            // TODO(johnniwinther): Ensure that [getter] is not null. This
-            // happens in the case of missing super getter.
-            return new StaticAccess.unresolvedSuper(element);
-          } else if (getter.isField) {
-            assert(invariant(node, getter.isFinal,
-                message: "Super field expected to be final."));
-            return new StaticAccess.superFinalField(getter);
-          } else if (getter.isFunction) {
-            if (node.isIndex) {
-              return new CompoundAccessSemantics(
-                  CompoundAccessKind.UNRESOLVED_SUPER_SETTER, getter, element);
-            } else {
-              return new StaticAccess.superMethod(getter);
-            }
-          } else {
-            return new CompoundAccessSemantics(
-                CompoundAccessKind.UNRESOLVED_SUPER_SETTER, getter, element);
-          }
-        } else {
-          return new StaticAccess.unresolvedSuper(element);
-        }
-      } else if (isCompound && Elements.isUnresolved(getter)) {
-        // TODO(johnniwinther): Ensure that [getter] is not null. This happens
-        // in the case of missing super getter.
-        return new CompoundAccessSemantics(
-            CompoundAccessKind.UNRESOLVED_SUPER_GETTER, getter, element);
-      } else if (element.isField) {
-        if (getter != null && getter != element) {
-          CompoundAccessKind accessKind;
-          if (getter.isField) {
-            accessKind = CompoundAccessKind.SUPER_FIELD_FIELD;
-          } else if (getter.isGetter) {
-            accessKind = CompoundAccessKind.SUPER_GETTER_FIELD;
-          } else {
-            return internalError(node,
-               "Unsupported super call: $node : $element/$getter.");
-          }
-          return new CompoundAccessSemantics(accessKind, getter, element);
-        } else if (element.isFinal) {
-          return new StaticAccess.superFinalField(element);
-        }
-        return new StaticAccess.superField(element);
-      } else if (element.isGetter) {
-        return new StaticAccess.superGetter(element);
-      } else if (element.isSetter) {
-        if (getter != null) {
-          CompoundAccessKind accessKind;
-          if (getter.isField) {
-            accessKind = CompoundAccessKind.SUPER_FIELD_SETTER;
-          } else if (getter.isGetter) {
-            accessKind = CompoundAccessKind.SUPER_GETTER_SETTER;
-          } else {
-            accessKind = CompoundAccessKind.SUPER_METHOD_SETTER;
-          }
-          return new CompoundAccessSemantics(accessKind, getter, element);
-        }
-        return new StaticAccess.superSetter(element);
-      } else if (isCompound) {
-        return new CompoundAccessSemantics(
-            CompoundAccessKind.SUPER_GETTER_SETTER, getter, element);
-      } else {
-        return new StaticAccess.superMethod(element);
-      }
-    } else if (node.isConditional) {
-      // Conditional sends (e?.x) are treated as dynamic property reads because
-      // they are equivalent to do ((a) => a == null ? null : a.x)(e). If `e` is
-      // a type `A`, this is equivalent to write `(A).x`.
-      return new DynamicAccess.ifNotNullProperty(node.receiver);
-    } else if (node.isOperator) {
-      return new DynamicAccess.dynamicProperty(node.receiver);
-    } else if (Elements.isClosureSend(node, element)) {
-      if (element == null) {
-        if (node.selector.isThis()) {
-          return new AccessSemantics.thisAccess();
-        } else {
-          return new AccessSemantics.expression();
-        }
-      } else if (Elements.isErroneous(element)) {
-        return new StaticAccess.unresolved(element);
-      } else {
-        return handleStaticallyResolvedAccess(
-            node, element, getter, isCompound: isCompound);
-      }
-    } else {
-      bool isDynamicAccess(Element e) => e == null || e.isInstanceMember;
-
-      if (isDynamicAccess(element) &&
-           (!isCompound || isDynamicAccess(getter))) {
-        if (node.receiver == null || node.receiver.isThis()) {
-          return new AccessSemantics.thisProperty();
-        } else {
-          return new DynamicAccess.dynamicProperty(node.receiver);
-        }
-      } else if (element != null && element.impliesType) {
-        // TODO(johnniwinther): Provide an [ErroneousElement].
-        // This happens for code like `C.this`.
-        return new StaticAccess.unresolved(null);
-      } else {
-        return handleStaticallyResolvedAccess(
-            node, element, getter, isCompound: isCompound);
-      }
-    }
-  }
-
   ConstructorAccessSemantics computeConstructorAccessSemantics(
         ConstructorElement constructor,
         CallStructure callStructure,
diff --git a/pkg/compiler/lib/src/resolution/send_structure.dart b/pkg/compiler/lib/src/resolution/send_structure.dart
index b5134a2..f2850ce 100644
--- a/pkg/compiler/lib/src/resolution/send_structure.dart
+++ b/pkg/compiler/lib/src/resolution/send_structure.dart
@@ -2,17 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-library dart2js.send_structure;
+library dart2js.resolution.send_structure;
 
-import 'access_semantics.dart';
-import 'operators.dart';
-import 'semantic_visitor.dart';
 import '../dart_types.dart';
+import '../diagnostics/spannable.dart' show
+    SpannableAssertionFailure;
 import '../constants/expressions.dart';
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 import '../universe/universe.dart';
-import '../util/util.dart';
+
+import 'access_semantics.dart';
+import 'operators.dart';
+import 'semantic_visitor.dart';
 
 /// Interface for the structure of the semantics of a [Send] or [NewExpression]
 /// node.
@@ -309,7 +311,7 @@
             node,
             node.selector,
             node.argumentsNode,
-            selector,
+            callStructure,
             arg);
       case AccessKind.THIS:
         return visitor.visitThisInvoke(
@@ -452,10 +454,7 @@
   /// The target of the read access.
   final AccessSemantics semantics;
 
-  /// The [Selector] for the getter invocation.
-  final Selector selector;
-
-  GetStructure(this.semantics, this.selector);
+  GetStructure(this.semantics);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -463,13 +462,13 @@
         return visitor.visitIfNotNullDynamicPropertyGet(
             node,
             node.receiver,
-            selector,
+            semantics.name,
             arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyGet(
             node,
             node.receiver,
-            selector,
+            semantics.name,
             arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionGet(
@@ -559,7 +558,7 @@
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyGet(
             node,
-            selector,
+            semantics.name,
             arg);
       case AccessKind.SUPER_FIELD:
       case AccessKind.SUPER_FINAL_FIELD:
@@ -609,7 +608,7 @@
     throw new SpannableAssertionFailure(node, "Invalid getter: ${semantics}");
   }
 
-  String toString() => 'get($selector, $semantics)';
+  String toString() => 'get($semantics)';
 }
 
 /// The structure for a [Send] that is an assignment.
@@ -617,10 +616,7 @@
   /// The target of the assignment.
   final AccessSemantics semantics;
 
-  /// The [Selector] for the setter invocation.
-  final Selector selector;
-
-  SetStructure(this.semantics, this.selector);
+  SetStructure(this.semantics);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -628,14 +624,14 @@
         return visitor.visitIfNotNullDynamicPropertySet(
           node,
           node.receiver,
-          selector,
+          semantics.name,
           node.arguments.single,
           arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertySet(
           node,
           node.receiver,
-          selector,
+          semantics.name,
           node.arguments.single,
           arg);
       case AccessKind.LOCAL_FUNCTION:
@@ -761,7 +757,7 @@
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertySet(
             node,
-            selector,
+            semantics.name,
             node.arguments.single,
             arg);
       case AccessKind.SUPER_FIELD:
@@ -818,31 +814,21 @@
     throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}");
   }
 
-  String toString() => 'set($selector,$semantics)';
+  String toString() => 'set($semantics)';
 }
 
 /// The structure for a [Send] that is a negation, i.e. of the form `!e`.
 class NotStructure<R, A> implements SendStructure<R, A> {
-  /// The target of the negation.
-  final AccessSemantics semantics;
-
-  NotStructure(this.semantics);
+  const NotStructure();
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
-    switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
-        return visitor.visitNot(
-            node,
-            node.receiver,
-            arg);
-     default:
-        // This is not a valid case.
-        break;
-    }
-    throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}");
+    return visitor.visitNot(
+        node,
+        node.receiver,
+        arg);
   }
 
-  String toString() => 'not($semantics)';
+  String toString() => 'not()';
 }
 
 /// The structure for a [Send] that is an invocation of a user definable unary
@@ -858,7 +844,7 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitUnary(
             node,
             operator,
@@ -919,7 +905,7 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitIndex(
             node,
             node.receiver,
@@ -961,7 +947,7 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitEquals(
             node,
             node.receiver,
@@ -999,7 +985,7 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitNotEquals(
             node,
             node.receiver,
@@ -1041,7 +1027,7 @@
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitBinary(
             node,
             node.receiver,
@@ -1103,15 +1089,11 @@
   /// The target of the index set operation.
   final AccessSemantics semantics;
 
-  // TODO(johnniwinther): Should we store this?
-  /// The [Selector] for the `[]=` operator invocation.
-  final Selector selector;
-
-  IndexSetStructure(this.semantics, this.selector);
+  IndexSetStructure(this.semantics);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitIndexSet(
             node,
             node.receiver,
@@ -1160,22 +1142,11 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  // TODO(johnniwinther): Should we store this?
-  /// The [Selector] for the `[]` invocation.
-  final Selector getterSelector;
-
-  // TODO(johnniwinther): Should we store this?
-  /// The [Selector] for the `[]=` invocation.
-  final Selector setterSelector;
-
-  IndexPrefixStructure(this.semantics,
-                       this.operator,
-                       this.getterSelector,
-                       this.setterSelector);
+  IndexPrefixStructure(this.semantics, this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitIndexPrefix(
             node,
             node.receiver,
@@ -1246,22 +1217,11 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  // TODO(johnniwinther): Should we store this?
-  /// The [Selector] for the `[]` invocation.
-  final Selector getterSelector;
-
-  // TODO(johnniwinther): Should we store this?
-  /// The [Selector] for the `[]=` invocation.
-  final Selector setterSelector;
-
-  IndexPostfixStructure(this.semantics,
-                        this.operator,
-                        this.getterSelector,
-                        this.setterSelector);
+  IndexPostfixStructure(this.semantics, this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitIndexPostfix(
             node,
             node.receiver,
@@ -1332,16 +1292,8 @@
   /// The assignment operator used in the compound assignment.
   final AssignmentOperator operator;
 
-  /// The [Selector] for the getter invocation.
-  final Selector getterSelector;
-
-  /// The [Selector] for the setter invocation.
-  final Selector setterSelector;
-
   CompoundStructure(this.semantics,
-                    this.operator,
-                    this.getterSelector,
-                    this.setterSelector);
+                    this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -1349,19 +1301,17 @@
         return visitor.visitIfNotNullDynamicPropertyCompound(
             node,
             node.receiver,
+            semantics.name,
             operator,
             node.arguments.single,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyCompound(
             node,
             node.receiver,
+            semantics.name,
             operator,
             node.arguments.single,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionCompound(
@@ -1489,10 +1439,9 @@
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyCompound(
             node,
+            semantics.name,
             operator,
             node.arguments.single,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldCompound(
@@ -1613,8 +1562,13 @@
                 node.arguments.single,
                 arg);
           case CompoundAccessKind.SUPER_FIELD_FIELD:
-            // TODO(johnniwinther): Handle this.
-            break;
+            return visitor.visitSuperFieldFieldCompound(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                operator,
+                node.arguments.single,
+                arg);
           case CompoundAccessKind.SUPER_GETTER_SETTER:
             return visitor.visitSuperGetterSetterCompound(
                 node,
@@ -1673,6 +1627,307 @@
   String toString() => 'compound($operator,$semantics)';
 }
 
+/// The structure for a [Send] that is an if-null assignment. For instance
+/// `a ??= b`.
+class SetIfNullStructure<R, A> implements SendStructure<R, A> {
+  /// The target of the if-null assignment, i.e. the left-hand side.
+  final AccessSemantics semantics;
+
+  SetIfNullStructure(this.semantics);
+
+  R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
+    switch (semantics.kind) {
+      case AccessKind.CONDITIONAL_DYNAMIC_PROPERTY:
+        return visitor.visitIfNotNullDynamicPropertySetIfNull(
+            node,
+            node.receiver,
+            semantics.name,
+            node.arguments.single,
+            arg);
+      case AccessKind.DYNAMIC_PROPERTY:
+        return visitor.visitDynamicPropertySetIfNull(
+            node,
+            node.receiver,
+            semantics.name,
+            node.arguments.single,
+            arg);
+      case AccessKind.LOCAL_FUNCTION:
+        return visitor.visitLocalFunctionSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.LOCAL_VARIABLE:
+        return visitor.visitLocalVariableSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.FINAL_LOCAL_VARIABLE:
+        return visitor.visitFinalLocalVariableSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.PARAMETER:
+        return visitor.visitParameterSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.FINAL_PARAMETER:
+        return visitor.visitFinalParameterSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.STATIC_FIELD:
+        return visitor.visitStaticFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.FINAL_STATIC_FIELD:
+        return visitor.visitFinalStaticFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.STATIC_METHOD:
+        return visitor.visitStaticMethodSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.STATIC_GETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.STATIC_SETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.TOPLEVEL_FIELD:
+        return visitor.visitTopLevelFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.FINAL_TOPLEVEL_FIELD:
+        return visitor.visitFinalTopLevelFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.TOPLEVEL_METHOD:
+        return visitor.visitTopLevelMethodSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.TOPLEVEL_GETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.TOPLEVEL_SETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.CLASS_TYPE_LITERAL:
+        return visitor.visitClassTypeLiteralSetIfNull(
+            node,
+            semantics.constant,
+            node.arguments.single,
+            arg);
+      case AccessKind.TYPEDEF_TYPE_LITERAL:
+        return visitor.visitTypedefTypeLiteralSetIfNull(
+            node,
+            semantics.constant,
+            node.arguments.single,
+            arg);
+      case AccessKind.DYNAMIC_TYPE_LITERAL:
+        return visitor.visitDynamicTypeLiteralSetIfNull(
+            node,
+            semantics.constant,
+            node.arguments.single,
+            arg);
+      case AccessKind.TYPE_PARAMETER_TYPE_LITERAL:
+        return visitor.visitTypeVariableTypeLiteralSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.EXPRESSION:
+        // This is not a valid case.
+        break;
+      case AccessKind.THIS:
+        // This is not a valid case.
+        break;
+      case AccessKind.THIS_PROPERTY:
+        return visitor.visitThisPropertySetIfNull(
+            node,
+            semantics.name,
+            node.arguments.single,
+            arg);
+      case AccessKind.SUPER_FIELD:
+        return visitor.visitSuperFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.SUPER_FINAL_FIELD:
+        return visitor.visitFinalSuperFieldSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.SUPER_METHOD:
+        return visitor.visitSuperMethodSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.SUPER_GETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.SUPER_SETTER:
+        // This is not a valid case.
+        break;
+      case AccessKind.CONSTANT:
+        // TODO(johnniwinther): Should this be a valid case?
+        break;
+      case AccessKind.UNRESOLVED_SUPER:
+        return visitor.visitUnresolvedSuperSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.UNRESOLVED:
+        return visitor.visitUnresolvedSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.INVALID:
+        return visitor.errorInvalidSetIfNull(
+            node,
+            semantics.element,
+            node.arguments.single,
+            arg);
+      case AccessKind.COMPOUND:
+        CompoundAccessSemantics compoundSemantics = semantics;
+        switch (compoundSemantics.compoundAccessKind) {
+          case CompoundAccessKind.STATIC_GETTER_SETTER:
+            return visitor.visitStaticGetterSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.STATIC_METHOD_SETTER:
+            return visitor.visitStaticMethodSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_STATIC_GETTER:
+            return visitor.visitUnresolvedStaticGetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_STATIC_SETTER:
+            return visitor.visitUnresolvedStaticSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.TOPLEVEL_GETTER_SETTER:
+            return visitor.visitTopLevelGetterSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.TOPLEVEL_METHOD_SETTER:
+            return visitor.visitTopLevelMethodSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_TOPLEVEL_GETTER:
+            return visitor.visitUnresolvedTopLevelGetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_TOPLEVEL_SETTER:
+            return visitor.visitUnresolvedTopLevelSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.SUPER_FIELD_FIELD:
+            return visitor.visitSuperFieldFieldSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.SUPER_GETTER_SETTER:
+            return visitor.visitSuperGetterSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.SUPER_GETTER_FIELD:
+            return visitor.visitSuperGetterFieldSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.SUPER_METHOD_SETTER:
+            return visitor.visitSuperMethodSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.SUPER_FIELD_SETTER:
+            return visitor.visitSuperFieldSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
+            return visitor.visitUnresolvedSuperGetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+          case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
+            return visitor.visitUnresolvedSuperSetterSetIfNull(
+                node,
+                compoundSemantics.getter,
+                compoundSemantics.setter,
+                node.arguments.single,
+                arg);
+        }
+        break;
+    }
+    throw new SpannableAssertionFailure(node,
+        "Invalid if-null assigment: ${semantics}");
+  }
+
+  String toString() => 'ifNull($semantics)';
+}
+
 /// The structure for a [Send] that is a compound assignment on the index
 /// operator. For instance `a[b] += c`.
 class CompoundIndexSetStructure<R, A> implements SendStructure<R, A> {
@@ -1682,19 +1937,11 @@
   /// The assignment operator used in the compound assignment.
   final AssignmentOperator operator;
 
-  /// The [Selector] for the `[]` operator invocation.
-  final Selector getterSelector;
-
-  /// The [Selector] for the `[]=` operator invocation.
-  final Selector setterSelector;
-
-  CompoundIndexSetStructure(this.semantics, this.operator,
-                            this.getterSelector,
-                            this.setterSelector);
+  CompoundIndexSetStructure(this.semantics, this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
-      case AccessKind.DYNAMIC_PROPERTY:
+      case AccessKind.EXPRESSION:
         return visitor.visitCompoundIndexSet(
             node,
             node.receiver,
@@ -1773,16 +2020,8 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  /// The [Selector] for the getter invocation.
-  final Selector getterSelector;
-
-  /// The [Selector] for the setter invocation.
-  final Selector setterSelector;
-
   PrefixStructure(this.semantics,
-                  this.operator,
-                  this.getterSelector,
-                  this.setterSelector);
+                  this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -1790,17 +2029,15 @@
         return visitor.visitIfNotNullDynamicPropertyPrefix(
             node,
             node.receiver,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyPrefix(
             node,
             node.receiver,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionPrefix(
@@ -1913,9 +2150,8 @@
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyPrefix(
             node,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldPrefix(
@@ -2095,16 +2331,8 @@
   /// The `++` or `--` operator used in the operation.
   final IncDecOperator operator;
 
-  /// The [Selector] for the getter invocation.
-  final Selector getterSelector;
-
-  /// The [Selector] for the setter invocation.
-  final Selector setterSelector;
-
   PostfixStructure(this.semantics,
-                   this.operator,
-                   this.getterSelector,
-                   this.setterSelector);
+                   this.operator);
 
   R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) {
     switch (semantics.kind) {
@@ -2112,17 +2340,15 @@
         return visitor.visitIfNotNullDynamicPropertyPostfix(
             node,
             node.receiver,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.DYNAMIC_PROPERTY:
         return visitor.visitDynamicPropertyPostfix(
             node,
             node.receiver,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.LOCAL_FUNCTION:
         return visitor.visitLocalFunctionPostfix(
@@ -2235,9 +2461,8 @@
       case AccessKind.THIS_PROPERTY:
         return visitor.visitThisPropertyPostfix(
             node,
+            semantics.name,
             operator,
-            getterSelector,
-            setterSelector,
             arg);
       case AccessKind.SUPER_FIELD:
         return visitor.visitSuperFieldPostfix(
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart
index 93ae3db..4dfd954 100644
--- a/pkg/compiler/lib/src/resolution/signatures.dart
+++ b/pkg/compiler/lib/src/resolution/signatures.dart
@@ -2,7 +2,37 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.signatures;
+
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/elements.dart';
+import '../elements/modelx.dart' show
+    ErroneousFieldElementX,
+    ErroneousInitializingFormalElementX,
+    FormalElementX,
+    FunctionElementX,
+    FunctionSignatureX,
+    InitializingFormalElementX,
+    LocalParameterElementX;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link,
+    LinkBuilder;
+
+import 'members.dart' show
+    ResolverVisitor;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution_common.dart' show
+    MappingVisitor;
+import 'scope.dart' show
+    Scope;
 
 /**
  * [SignatureResolver] resolves function signatures.
@@ -81,7 +111,7 @@
   void validateName(Identifier node) {
     if (isOptionalParameter &&
         optionalParametersAreNamed &&
-        isPrivateName(node.source)) {
+        Name.isPrivateName(node.source)) {
       compiler.reportError(node, MessageKind.PRIVATE_NAMED_PARAMETER);
     }
   }
diff --git a/pkg/compiler/lib/src/resolution/tree_elements.dart b/pkg/compiler/lib/src/resolution/tree_elements.dart
index e4dfb1e..f69e8c2 100644
--- a/pkg/compiler/lib/src/resolution/tree_elements.dart
+++ b/pkg/compiler/lib/src/resolution/tree_elements.dart
@@ -2,7 +2,27 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.tree_elements;
+
+import '../constants/expressions.dart';
+import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/spannable.dart' show
+    Spannable;
+import '../elements/elements.dart';
+import '../types/types.dart' show
+    TypeMask;
+import '../tree/tree.dart';
+import '../util/util.dart';
+import '../universe/universe.dart' show
+    CallStructure,
+    Selector,
+    SelectorKind,
+    UniverseSelector;
+
+import 'secret_tree_element.dart' show getTreeElement, setTreeElement;
+import 'send_structure.dart';
 
 abstract class TreeElements {
   AnalyzableElement get analyzedElement;
@@ -533,26 +553,3 @@
     return _getTypeMask(node.inToken);
   }
 }
-
-TreeElements _ensureTreeElements(AnalyzableElementX element) {
-  if (element._treeElements == null) {
-    element._treeElements = new TreeElementMapping(element);
-  }
-  return element._treeElements;
-}
-
-abstract class AnalyzableElementX implements AnalyzableElement {
-  TreeElements _treeElements;
-
-  bool get hasTreeElements => _treeElements != null;
-
-  TreeElements get treeElements {
-    assert(invariant(this, _treeElements !=null,
-        message: "TreeElements have not been computed for $this."));
-    return _treeElements;
-  }
-
-  void reuseElement() {
-    _treeElements = null;
-  }
-}
diff --git a/pkg/compiler/lib/src/resolution/type_resolver.dart b/pkg/compiler/lib/src/resolution/type_resolver.dart
index 2bc9bbd..4e9fa48 100644
--- a/pkg/compiler/lib/src/resolution/type_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/type_resolver.dart
@@ -2,7 +2,37 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.types;
+import '../compiler.dart' show
+    Compiler;
+import '../dart_backend/dart_backend.dart' show
+    DartBackend;
+import '../dart_types.dart';
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/elements.dart' show
+    AmbiguousElement,
+    ClassElement,
+    Element,
+    Elements,
+    ErroneousElement,
+    PrefixElement,
+    TypedefElement,
+    TypeVariableElement;
+import '../elements/modelx.dart' show
+    ErroneousElementX;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link;
+
+import 'members.dart' show
+    lookupInScope;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution_common.dart' show
+    MappingVisitor;
+import 'scope.dart' show
+    Scope;
 
 class TypeResolver {
   final Compiler compiler;
@@ -135,9 +165,9 @@
       bool addTypeVariableBoundsCheck = false;
       if (element.isClass) {
         ClassElement cls = element;
-        // TODO(johnniwinther): [_ensureClassWillBeResolved] should imply
+        // TODO(johnniwinther): [ensureClassWillBeResolvedInternal] should imply
         // [computeType].
-        compiler.resolver._ensureClassWillBeResolved(cls);
+        compiler.resolver.ensureClassWillBeResolvedInternal(cls);
         cls.computeType(compiler);
         List<DartType> arguments = <DartType>[];
         bool hasTypeArgumentMismatch = resolveTypeArguments(
@@ -150,7 +180,8 @@
           if (arguments.isEmpty) {
             type = cls.rawType;
           } else {
-            type = new InterfaceType(cls.declaration, arguments.toList(growable: false));
+            type = new InterfaceType(
+                cls.declaration, arguments.toList(growable: false));
             addTypeVariableBoundsCheck = true;
           }
         }
diff --git a/pkg/compiler/lib/src/resolution/typedefs.dart b/pkg/compiler/lib/src/resolution/typedefs.dart
index 7f5e820..f0939cb 100644
--- a/pkg/compiler/lib/src/resolution/typedefs.dart
+++ b/pkg/compiler/lib/src/resolution/typedefs.dart
@@ -2,7 +2,33 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.typedefs;
+
+import '../compiler.dart' show
+    Compiler;
+import '../dart_types.dart';
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/elements.dart' show
+    FunctionSignature,
+    TypedefElement,
+    TypeVariableElement;
+import '../elements/modelx.dart' show
+    ErroneousElementX,
+    TypedefElementX;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link;
+
+import 'class_hierarchy.dart' show
+    TypeDefinitionVisitor;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'scope.dart' show
+    MethodScope,
+    TypeDeclarationScope;
+import 'signatures.dart' show
+    SignatureResolver;
 
 class TypedefResolverVisitor extends TypeDefinitionVisitor {
   TypedefElementX get element => enclosingElement;
diff --git a/pkg/compiler/lib/src/resolution/variables.dart b/pkg/compiler/lib/src/resolution/variables.dart
index a738b4f..04bb178 100644
--- a/pkg/compiler/lib/src/resolution/variables.dart
+++ b/pkg/compiler/lib/src/resolution/variables.dart
@@ -2,7 +2,27 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of resolution;
+library dart2js.resolution.variables;
+
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/messages.dart' show
+    MessageKind;
+import '../elements/modelx.dart' show
+    LocalVariableElementX,
+    VariableList;
+import '../tree/tree.dart';
+import '../util/util.dart' show
+    Link;
+
+import 'members.dart' show
+    ResolverVisitor;
+import 'registry.dart' show
+    ResolutionRegistry;
+import 'resolution_common.dart' show
+    CommonResolverVisitor;
+import 'scope.dart' show
+    VariableDefinitionScope;
 
 class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
   VariableDefinitions definitions;
diff --git a/pkg/compiler/lib/src/resolved_visitor.dart b/pkg/compiler/lib/src/resolved_visitor.dart
deleted file mode 100644
index 5eb6a13..0000000
--- a/pkg/compiler/lib/src/resolved_visitor.dart
+++ /dev/null
@@ -1,828 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart2js;
-
-/// Enum for the visit methods added in [ResolvedVisitor].
-// TODO(johnniwinther): Remove this.
-enum ResolvedKind {
-  ASSERT,
-  TYPE_LITERAL,
-  SUPER,
-  OPERATOR,
-  TYPE_PREFIX,
-  GETTER,
-  STATIC,
-  CLOSURE,
-  DYNAMIC,
-  ERROR,
-  SEND_SET,
-  NEW,
-  SUPER_CONSTRUCTOR,
-}
-
-/// Abstract interface for a [ResolvedVisitor].
-// TODO(johnniwinther): Remove this.
-abstract class ResolvedKindVisitor<R> {
-  @deprecated
-  R visitSuperSend(Send node);
-
-  @deprecated
-  R visitOperatorSend(Send node);
-  R visitGetterSend(Send node);
-
-  @deprecated
-  R visitClosureSend(Send node);
-  @deprecated
-  R visitDynamicSend(Send node);
-  R visitStaticSend(Send node);
-
-  R handleSuperConstructorInvoke(Send node);
-  R handleSendSet(SendSet node);
-  R handleNewExpression(NewExpression node);
-
-  /// Visitor callback for a type literal.
-  @deprecated
-  R visitTypeLiteralSend(Send node);
-
-  /// Visitor callback for the class prefix of a static access, like `Foo` in
-  /// `Foo.staticField`.
-  // TODO(johnniwinther): Remove this when not needed by the inferrer.
-  @deprecated
-  R visitTypePrefixSend(Send node);
-
-  @deprecated
-  R visitAssertSend(Send node);
-
-  internalError(Spannable node, String reason);
-}
-
-/// Visitor that returns the [ResolvedKind] corresponding to the called visitor
-/// method.
-class ResolvedKindComputer implements ResolvedKindVisitor {
-  const ResolvedKindComputer();
-
-  ResolvedKind visitSuperSend(Send node) => ResolvedKind.SUPER;
-  ResolvedKind visitOperatorSend(Send node) => ResolvedKind.OPERATOR;
-  ResolvedKind visitGetterSend(Send node) => ResolvedKind.GETTER;
-  ResolvedKind visitClosureSend(Send node) => ResolvedKind.CLOSURE;
-  ResolvedKind visitDynamicSend(Send node) => ResolvedKind.DYNAMIC;
-  ResolvedKind visitStaticSend(Send node) => ResolvedKind.STATIC;
-  ResolvedKind visitTypeLiteralSend(Send node) => ResolvedKind.TYPE_LITERAL;
-  ResolvedKind visitTypePrefixSend(Send node) => ResolvedKind.TYPE_PREFIX;
-  ResolvedKind visitAssertSend(Send node) => ResolvedKind.ASSERT;
-  ResolvedKind handleSuperConstructorInvoke(Send node) {
-    return ResolvedKind.SUPER_CONSTRUCTOR;
-  }
-  ResolvedKind handleSendSet(SendSet node) => ResolvedKind.SEND_SET;
-  ResolvedKind handleNewExpression(NewExpression node) => ResolvedKind.NEW;
-  internalError(Spannable node, String reason) => ResolvedKind.ERROR;
-}
-
-abstract class ResolvedVisitor<R>
-    implements Visitor<R>, ResolvedKindVisitor<R> {}
-
-abstract class BaseResolvedVisitor<R> extends Visitor<R>
-    implements ResolvedVisitor<R> {
-
-  TreeElements elements;
-
-  BaseResolvedVisitor(this.elements);
-
-  /// Dispatch using the old [ResolvedVisitor] logic.
-  // TODO(johnniwinther): Remove this.
-  _oldDispatch(Send node, ResolvedKindVisitor visitor) {
-    Element element = elements[node];
-    if (elements.isAssert(node)) {
-      return visitor.visitAssertSend(node);
-    } else if (elements.isTypeLiteral(node)) {
-      return visitor.visitTypeLiteralSend(node);
-    } else if (node.isSuperCall) {
-      if (element != null && element.isConstructor) {
-        return visitor.handleSuperConstructorInvoke(node);
-      }
-      return visitor.visitSuperSend(node);
-    } else if (node.isOperator) {
-      return visitor.visitOperatorSend(node);
-    } else if (node.isPropertyAccess) {
-      if (!Elements.isUnresolved(element) && element.impliesType) {
-        return visitor.visitTypePrefixSend(node);
-      } else {
-        return visitor.visitGetterSend(node);
-      }
-    } else if (element != null && Initializers.isConstructorRedirect(node)) {
-      return visitor.visitStaticSend(node);
-    } else if (Elements.isClosureSend(node, element)) {
-      return visitor.visitClosureSend(node);
-    } else {
-      if (node.isConditional) {
-        return visitor.visitDynamicSend(node);
-      } else if (Elements.isUnresolved(element)) {
-        if (element == null) {
-          // Example: f() with 'f' unbound.
-          // This can only happen inside an instance method.
-          return visitor.visitDynamicSend(node);
-        } else {
-          return visitor.visitStaticSend(node);
-        }
-      } else if (element.isInstanceMember) {
-        // Example: f() with 'f' bound to instance method.
-        return visitor.visitDynamicSend(node);
-      } else if (!element.isInstanceMember) {
-        // Example: A.f() or f() with 'f' bound to a static function.
-        // Also includes new A() or new A.named() which is treated like a
-        // static call to a factory.
-        return visitor.visitStaticSend(node);
-      } else {
-        return visitor.internalError(node, "Cannot generate code for send");
-      }
-    }
-  }
-
-  internalError(Spannable node, String reason);
-
-  R visitNode(Node node) {
-    internalError(node, "Unhandled node");
-    return null;
-  }
-}
-
-abstract class NewResolvedVisitor<R> extends BaseResolvedVisitor<R>
-    with SendResolverMixin,
-         GetBulkMixin<R, dynamic>,
-         SetBulkMixin<R, dynamic>,
-         ErrorBulkMixin<R, dynamic>,
-         InvokeBulkMixin<R, dynamic>,
-         IndexSetBulkMixin<R, dynamic>,
-         CompoundBulkMixin<R, dynamic>,
-         UnaryBulkMixin<R, dynamic>,
-         BaseBulkMixin<R, dynamic>,
-         BinaryBulkMixin<R, dynamic>,
-         PrefixBulkMixin<R, dynamic>,
-         PostfixBulkMixin<R, dynamic>,
-         NewBulkMixin<R, dynamic> {
-
-  final ResolvedSemanticDispatcher<R> _semanticDispatcher =
-      new ResolvedSemanticDispatcher<R>();
-
-  final ResolvedSemanticDispatcher<ResolvedKind> _resolvedKindDispatcher =
-      new ResolvedSemanticDispatcher<ResolvedKind>();
-
-  NewResolvedVisitor(TreeElements elements) : super(elements);
-
-  /// Dispatch using the new [SemanticSendVisitor] logic.
-  _newDispatch(Send node,
-               ResolvedKindVisitor kindVisitor,
-               SemanticSendVisitor sendVisitor) {
-    Element element = elements[node];
-    if (element != null && element.isConstructor) {
-      if (node.isSuperCall) {
-        return kindVisitor.handleSuperConstructorInvoke(node);
-      } else {
-        return kindVisitor.visitStaticSend(node);
-      }
-    } else if (element != null && element.isPrefix) {
-      return kindVisitor.visitGetterSend(node);
-    } else if (!elements.isTypeLiteral(node) &&
-               node.isPropertyAccess &&
-               !Elements.isUnresolved(element) &&
-               element.impliesType) {
-      return kindVisitor.visitTypePrefixSend(node);
-    } else {
-      SendStructure sendStructure = computeSendStructure(node);
-      if (sendStructure != null) {
-        var arg = sendVisitor == _resolvedKindDispatcher
-            ? kindVisitor : sendStructure;
-        return sendStructure.dispatch(sendVisitor, node, arg);
-      } else {
-        return kindVisitor.visitStaticSend(node);
-      }
-    }
-  }
-
-  @override
-  R visitDynamicSend(Send node) {
-    return internalError(node, "visitDynamicSend is deprecated");
-  }
-
-  @override
-  R visitSuperSend(Send node) {
-    return internalError(node, "visitSuperSend is deprecated");
-  }
-
-  @override
-  R visitOperatorSend(Send node) {
-    return internalError(node, "visitOperaterSend is deprecated");
-  }
-
-  @override
-  R visitClosureSend(Send node) {
-    return internalError(node, "visitClosureSend is deprecated");
-  }
-
-  @override
-  R visitTypeLiteralSend(Send node) {
-    return internalError(node, "visitTypeLiteralSend is deprecated");
-  }
-
-  @override
-  R visitTypePrefixSend(Send node) {
-    return internalError(node, "visitTypePrefixSend is deprecated");
-  }
-
-  @override
-  R visitAssertSend(Send node) {
-    return internalError(node, "visitAssertSend is deprecated");
-  }
-
-  bool checkResolvedKind(Node node,
-                         ResolvedKind oldKind,
-                         ResolvedKind newKind) {
-    return invariant(node, oldKind == newKind,
-        message: 'old=$oldKind != new=$newKind');
-  }
-
-  ResolvedKind computeResolvedKindFromStructure(
-      Node node, SemanticSendStructure structure) {
-    return structure.dispatch(
-        _resolvedKindDispatcher, node, const ResolvedKindComputer());
-  }
-
-  @override
-  R visitSend(Send node) {
-    assert(checkResolvedKind(
-        node,
-        _oldDispatch(node, const ResolvedKindComputer()),
-        _newDispatch(node, const ResolvedKindComputer(),
-            _resolvedKindDispatcher)));
-    return _newDispatch(node, this, this);
-  }
-
-  @override
-  R visitSendSet(Send node) {
-    SendStructure structure = computeSendStructure(node);
-    if (structure == null) {
-      return internalError(node, 'No structure for $node');
-    } else {
-      assert(checkResolvedKind(node,
-          ResolvedKind.SEND_SET,
-          computeResolvedKindFromStructure(node, structure)));
-      return structure.dispatch(this, node, structure);
-    }
-  }
-
-  @override
-  R visitNewExpression(NewExpression node) {
-    NewStructure structure = computeNewStructure(node);
-    if (structure == null) {
-      return internalError(node, 'No structure for $node');
-    } else {
-      assert(checkResolvedKind(node,
-          ResolvedKind.NEW,
-          computeResolvedKindFromStructure(node, structure)));
-      return structure.dispatch(this, node, structure);
-    }
-  }
-
-  @override
-  R apply(Node node, arg) {
-    return visitNode(node);
-  }
-
-  @override
-  R bulkHandleNode(
-      Node node,
-      String message,
-      SemanticSendStructure structure) {
-    return structure.dispatch(_semanticDispatcher, node, this);
-  }
-}
-
-/// Visitor that dispatches [SemanticSendVisitor] calls to the corresponding
-/// visit methods in [ResolvedVisitor].
-class ResolvedSemanticDispatcher<R> extends Object
-    with GetBulkMixin<R, ResolvedKindVisitor<R>>,
-         SetBulkMixin<R, ResolvedKindVisitor<R>>,
-         InvokeBulkMixin<R, ResolvedKindVisitor<R>>,
-         PrefixBulkMixin<R, ResolvedKindVisitor<R>>,
-         PostfixBulkMixin<R, ResolvedKindVisitor<R>>,
-         SuperBulkMixin<R, ResolvedKindVisitor<R>>,
-         CompoundBulkMixin<R, ResolvedKindVisitor<R>>,
-         IndexSetBulkMixin<R, ResolvedKindVisitor<R>>,
-         NewBulkMixin<R, ResolvedKindVisitor<R>>,
-         ErrorBulkMixin<R, ResolvedKindVisitor<R>>
-    implements SemanticSendVisitor<R, ResolvedKindVisitor<R>> {
-
-  ResolvedSemanticDispatcher();
-
-  @override
-  R apply(Node node, ResolvedKindVisitor<R> visitor) {
-    return visitor.internalError(
-        node, "ResolvedSemanticDispatcher.apply unsupported.");
-  }
-
-  @override
-  R bulkHandleNode(
-      Node node,
-      String message,
-      ResolvedKindVisitor<R> visitor) {
-    return bulkHandleError(node, null, visitor);
-  }
-
-  R bulkHandleError(
-      Node node,
-      ErroneousElement error,
-      ResolvedKindVisitor<R> visitor) {
-    if (node.asSendSet() != null) {
-      return visitor.handleSendSet(node);
-    } else if (node.asNewExpression() != null) {
-      return visitor.handleNewExpression(node);
-    }
-    return visitor.internalError(node, "No resolved kind for $node.");
-  }
-
-  @override
-  R bulkHandleGet(Node node, ResolvedKindVisitor<R> visitor) {
-    return visitor.visitGetterSend(node);
-  }
-
-  @override
-  R bulkHandleInvoke(Node node, ResolvedKindVisitor<R> visitor) {
-    // Most invokes are static.
-    return visitor.visitStaticSend(node);
-  }
-
-  @override
-  R bulkHandlePrefix(Node node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R bulkHandlePostfix(Node node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R bulkHandleSuper(Node node, ResolvedKindVisitor<R> visitor) {
-    if (node.asSendSet() != null) {
-      return visitor.handleSendSet(node);
-    }
-    return visitor.visitSuperSend(node);
-  }
-
-  @override
-  R bulkHandleSet(SendSet node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R bulkHandleCompound(SendSet node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R bulkHandleIndexSet(SendSet node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R bulkHandleNew(NewExpression node, ResolvedKindVisitor<R> visitor) {
-    return visitor.handleNewExpression(node);
-  }
-
-  @override
-  void previsitDeferredAccess(
-      Send node,
-      PrefixElement prefix,
-      ResolvedKindVisitor<R> visitor) {
-  }
-
-  @override
-  R errorInvalidAssert(
-      Send node,
-      NodeList arguments,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitAssertSend(node);
-  }
-
-  @override
-  R visitLocalFunctionPostfix(
-      Send node,
-      LocalFunctionElement function,
-      op.IncDecOperator operator,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R visitLocalFunctionPrefix(
-      Send node,
-      LocalFunctionElement function,
-      op.IncDecOperator operator,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R visitStaticSetterGet(
-      Send node,
-      FunctionElement setter,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitGetterSend(node);
-  }
-
-  @override
-  R visitStaticSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitStaticSend(node);
-  }
-
-  @override
-  R visitSuperSetterGet(
-      Send node,
-      FunctionElement setter,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitSuperSend(node);
-  }
-
-  @override
-  R visitSuperSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitSuperSend(node);
-  }
-
-  @override
-  R visitTopLevelSetterGet(
-      Send node,
-      FunctionElement setter,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitGetterSend(node);
-  }
-
-  @override
-  R visitTopLevelSetterInvoke(
-      Send node,
-      FunctionElement setter,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitStaticSend(node);
-  }
-
-  @override
-  R errorUndefinedBinaryExpression(
-      Send node,
-      Node left,
-      Operator operator,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R errorUndefinedUnaryExpression(
-      Send node,
-      Operator operator,
-      Node expression,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitUnresolvedGet(
-      Send node,
-      Element element,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitGetterSend(node);
-  }
-
-  @override
-  R visitUnresolvedSuperGet(
-      Send node,
-      Element element,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitSuperSend(node);
-  }
-
-  @override
-  R visitUnresolvedInvoke(
-      Send node,
-      Element element,
-      NodeList arguments,
-      Selector selector,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitStaticSend(node);
-  }
-
-  @override
-  R visitUnresolvedPostfix(
-      Send node,
-      Element element,
-      op.IncDecOperator operator,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R visitUnresolvedPrefix(
-      Send node,
-      Element element,
-      op.IncDecOperator operator,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.handleSendSet(node);
-  }
-
-  @override
-  R visitAs(
-      Send node,
-      Node expression,
-      DartType type,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitAssert(
-      Send node,
-      Node expression,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitAssertSend(node);
-  }
-
-  @override
-  R visitBinary(
-      Send node,
-      Node left,
-      op.BinaryOperator operator,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitEquals(
-      Send node,
-      Node left,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitIs(
-      Send node,
-      Node expression,
-      DartType type,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitIsNot(
-      Send node,
-      Node expression,
-      DartType type,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitIfNull(
-      Send node,
-      Node left,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitLogicalAnd(
-      Send node,
-      Node left,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitLogicalOr(
-      Send node,
-      Node left,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitNot(
-      Send node,
-      Node expression,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitNotEquals(
-      Send node,
-      Node left,
-      Node right,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitUnary(
-      Send node,
-      op.UnaryOperator operator,
-      Node expression,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitDynamicSend(node);
-  }
-
-  @override
-  R visitIfNotNullDynamicPropertyInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitDynamicSend(node);
-  }
-
-  @override
-  R visitThisPropertyInvoke(
-      Send node,
-      NodeList arguments,
-      Selector selector,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitDynamicSend(node);
-  }
-
-  @override
-  R visitExpressionInvoke(
-      Send node,
-      Node receiver,
-      NodeList arguments,
-      Selector selector,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-
-  @override
-  R visitParameterInvoke(
-      Send node,
-      ParameterElement parameter,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-
-  @override
-  R visitLocalVariableInvoke(
-      Send node,
-      LocalVariableElement variable,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-
-  @override
-  R visitLocalFunctionInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-
-  @override
-  R visitThisInvoke(
-      Send node,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-
-  @override
-  R visitClassTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitTypedefTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitDynamicTypeLiteralGet(
-      Send node,
-      ConstantExpression constant,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitTypeVariableTypeLiteralGet(
-      Send node,
-      TypeVariableElement element,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitClassTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitTypedefTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitDynamicTypeLiteralInvoke(
-      Send node,
-      ConstantExpression constant,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitTypeVariableTypeLiteralInvoke(
-      Send node,
-      TypeVariableElement element,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitTypeLiteralSend(node);
-  }
-
-  @override
-  R visitIndex(
-      Send node,
-      Node receiver,
-      Node index,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitOperatorSend(node);
-  }
-
-  @override
-  R visitSuperIndex(
-      Send node,
-      FunctionElement function,
-      Node index,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitSuperSend(node);
-  }
-
-  @override
-  R visitLocalFunctionIncompatibleInvoke(
-      Send node,
-      LocalFunctionElement function,
-      NodeList arguments,
-      CallStructure callStructure,
-      ResolvedKindVisitor<R> visitor) {
-    return visitor.visitClosureSend(node);
-  }
-}
diff --git a/pkg/compiler/lib/src/scanner/scannerlib.dart b/pkg/compiler/lib/src/scanner/scannerlib.dart
index d0c3a2e..e4058c8 100644
--- a/pkg/compiler/lib/src/scanner/scannerlib.dart
+++ b/pkg/compiler/lib/src/scanner/scannerlib.dart
@@ -6,7 +6,18 @@
 
 import 'dart:collection' show IterableBase, HashSet;
 
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
 import '../dart_types.dart' show DynamicType;
+import '../diagnostics/diagnostic_listener.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart';
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
 import '../elements/elements.dart';
 
 import '../elements/modelx.dart' show
@@ -30,9 +41,9 @@
 
 import '../elements/visitor.dart'
     show ElementVisitor;
-import '../dart2jslib.dart';
 import '../native/native.dart' as native;
 import '../string_validator.dart';
+import '../script.dart';
 import '../tree/tree.dart';
 import '../util/characters.dart';
 import '../util/util.dart';
diff --git a/pkg/compiler/lib/src/scanner/token.dart b/pkg/compiler/lib/src/scanner/token.dart
index c7c74d1..2dff11e 100644
--- a/pkg/compiler/lib/src/scanner/token.dart
+++ b/pkg/compiler/lib/src/scanner/token.dart
@@ -125,7 +125,7 @@
    * produces ..., SymbolToken($), StringToken(a), StringToken((), ...
    *
    * After parsing the identifier 'a', the parser tests for a function
-   * declaration using [:identical(next.stringValue, '('):], which (rihgtfully)
+   * declaration using [:identical(next.stringValue, '('):], which (rightfully)
    * returns false because stringValue returns [:null:].
    */
   String get stringValue;
@@ -368,6 +368,7 @@
     }
   }
 
+  /// See [Token.stringValue] for an explanation.
   String get stringValue => null;
 
   bool isIdentifier() => identical(kind, IDENTIFIER_TOKEN);
diff --git a/pkg/compiler/lib/src/scanner/token_map.dart b/pkg/compiler/lib/src/scanner/token_map.dart
new file mode 100644
index 0000000..8e4c53e
--- /dev/null
+++ b/pkg/compiler/lib/src/scanner/token_map.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.tokens.token_map;
+
+import 'scannerlib.dart' show
+    Token;
+
+/**
+ * Key class used in [TokenMap] in which the hash code for a token is based
+ * on the [charOffset].
+ */
+class TokenKey {
+  final Token token;
+  TokenKey(this.token);
+  int get hashCode => token.charOffset;
+  operator==(other) => other is TokenKey && token == other.token;
+}
+
+/// Map of tokens and the first associated comment.
+/*
+ * This implementation was chosen among several candidates for its space/time
+ * efficiency by empirical tests of running dartdoc on dartdoc itself. Time
+ * measurements for the use of [Compiler.commentMap]:
+ *
+ * 1) Using [TokenKey] as key (this class): ~80 msec
+ * 2) Using [TokenKey] as key + storing a separate map in each script: ~120 msec
+ * 3) Using [Token] as key in a [Map]: ~38000 msec
+ * 4) Storing comments is new field in [Token]: ~20 msec
+ *    (Abandoned due to the increased memory usage)
+ * 5) Storing comments in an [Expando]: ~14000 msec
+ * 6) Storing token/comments pairs in a linked list: ~5400 msec
+ */
+class TokenMap {
+  Map<TokenKey,Token> comments = new Map<TokenKey,Token>();
+
+  Token operator[] (Token key) {
+    if (key == null) return null;
+    return comments[new TokenKey(key)];
+  }
+
+  void operator[]= (Token key, Token value) {
+    if (key == null) return;
+    comments[new TokenKey(key)] = value;
+  }
+}
diff --git a/pkg/compiler/lib/src/script.dart b/pkg/compiler/lib/src/script.dart
index fcdf890..3dce8e1 100644
--- a/pkg/compiler/lib/src/script.dart
+++ b/pkg/compiler/lib/src/script.dart
@@ -2,7 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.script;
+
+import 'io/source_file.dart';
 
 class Script {
   final SourceFile file;
diff --git a/pkg/compiler/lib/src/serialization/constant_serialization.dart b/pkg/compiler/lib/src/serialization/constant_serialization.dart
index 94dc24f..d2d2dd4 100644
--- a/pkg/compiler/lib/src/serialization/constant_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/constant_serialization.dart
@@ -4,6 +4,7 @@
 
 library dart2js.serialization.constants;
 
+import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
 import '../elements/elements.dart' show FieldElement;
diff --git a/pkg/compiler/lib/src/serialization/element_serialization.dart b/pkg/compiler/lib/src/serialization/element_serialization.dart
index 9ba4db8..c72f916 100644
--- a/pkg/compiler/lib/src/serialization/element_serialization.dart
+++ b/pkg/compiler/lib/src/serialization/element_serialization.dart
@@ -4,9 +4,11 @@
 
 library dart2js.serialization.elements;
 
+import '../constants/constructors.dart';
 import '../constants/expressions.dart';
 import '../dart_types.dart';
-import '../dart2jslib.dart' show SourceSpan;
+import '../diagnostics/source_span.dart' show
+    SourceSpan;
 import '../elements/elements.dart';
 import '../tree/tree.dart';
 import 'constant_serialization.dart';
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index 15bfc1e..bd28c0e 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -11,27 +11,37 @@
 
 import 'serialization.dart';
 import 'keys.dart';
+import '../compiler.dart'
+    show Compiler;
+import '../constants/constructors.dart';
 import '../constants/expressions.dart';
-import '../dart2jslib.dart'
-    show Backend,
-         Compiler,
-         DiagnosticListener,
-         Script,
-         SourceSpan;
+import '../diagnostics/source_span.dart'
+    show SourceSpan;
 import '../dart_types.dart';
+import '../diagnostics/diagnostic_listener.dart';
 import '../elements/elements.dart';
-import '../elements/modelx.dart' show FunctionSignatureX;
+import '../elements/modelx.dart' show
+    FunctionSignatureX;
 import '../elements/common.dart';
 import '../elements/visitor.dart';
-import '../ordered_typeset.dart';
-import '../resolution/resolution.dart';
-import '../resolution/class_members.dart' as class_members;
-import '../resolution/enum_creator.dart' show AstBuilder;
-import '../scanner/scannerlib.dart' show Token, SEMICOLON_INFO;
-import '../serialization/constant_serialization.dart';
 import '../io/source_file.dart';
+import '../ordered_typeset.dart';
+import '../resolution/class_members.dart' as class_members;
+import '../resolution/enum_creator.dart' show
+    AstBuilder;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
+import '../resolution/scope.dart' show
+    Scope;
+import '../scanner/scannerlib.dart' show
+    Token,
+    SEMICOLON_INFO;
+import '../script.dart';
+import '../serialization/constant_serialization.dart';
 import '../tree/tree.dart';
-import '../util/util.dart' show Link, LinkBuilder;
+import '../util/util.dart' show
+    Link,
+    LinkBuilder;
 
 /// Compute a [Link] from an [Iterable].
 Link toLink(Iterable iterable) {
@@ -1223,6 +1233,14 @@
   List<DartType> _typeVariables;
   T _rawType;
   T _thisType;
+  Name _memberName;
+
+  Name get memberName {
+    if (_memberName == null) {
+      _memberName = new Name(name, library);
+    }
+    return _memberName;
+  }
 
   void _ensureTypes() {
     if (_typeVariables == null) {
@@ -1308,10 +1326,18 @@
   TypeDeclarationElement _typeDeclaration;
   TypeVariableType _type;
   DartType _bound;
+  Name _memberName;
 
   TypeVariableElementZ(ObjectDecoder decoder)
       : super(decoder);
 
+  Name get memberName {
+    if (_memberName == null) {
+      _memberName = new Name(name, library);
+    }
+    return _memberName;
+  }
+
   @override
   ElementKind get kind => ElementKind.TYPE_VARIABLE;
 
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index d82bb7e..3573b35 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -4,8 +4,18 @@
 
 library dart2js.serialization.task;
 
-import '../dart2jslib.dart';
+import '../common/resolution.dart' show
+    ResolutionWorkItem;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../common/work.dart' show
+    ItemCompilationContext;
+import '../compiler.dart' show
+    Compiler;
 import '../elements/elements.dart';
+import '../enqueue.dart' show
+    ResolutionEnqueuer,
+    WorldImpact;
 
 /// Task that supports deserialization of elements.
 class SerializationTask extends CompilerTask {
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 435b4bb..f9d87f9 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -5,15 +5,17 @@
 part of ssa;
 
 class SsaFunctionCompiler implements FunctionCompiler {
-  SsaCodeGeneratorTask generator;
-  SsaBuilderTask builder;
-  SsaOptimizerTask optimizer;
+  final SsaCodeGeneratorTask generator;
+  final SsaBuilderTask builder;
+  final SsaOptimizerTask optimizer;
+  final JavaScriptBackend backend;
 
   SsaFunctionCompiler(JavaScriptBackend backend,
                       SourceInformationStrategy sourceInformationFactory)
       : generator = new SsaCodeGeneratorTask(backend, sourceInformationFactory),
         builder = new SsaBuilderTask(backend, sourceInformationFactory),
-        optimizer = new SsaOptimizerTask(backend);
+        optimizer = new SsaOptimizerTask(backend),
+        backend = backend;
 
   /// Generates JavaScript code for `work.element`.
   /// Using the ssa builder, optimizer and codegenerator.
@@ -23,55 +25,7 @@
     Element element = work.element;
     js.Expression result = generator.generateCode(work, graph);
     if (element is FunctionElement) {
-      JavaScriptBackend backend = builder.backend;
-
-      AsyncRewriterBase rewriter = null;
-      js.Name name = backend.namer.methodPropertyName(element);
-      if (element.asyncMarker == AsyncMarker.ASYNC) {
-        rewriter = new AsyncRewriter(
-            backend.compiler,
-            backend.compiler.currentElement,
-            asyncHelper:
-                backend.emitter.staticFunctionAccess(backend.getAsyncHelper()),
-            newCompleter: backend.emitter.staticFunctionAccess(
-                backend.getCompleterConstructor()),
-            safeVariableName: backend.namer.safeVariablePrefixForAsyncRewrite,
-            bodyName: backend.namer.deriveAsyncBodyName(name));
-      } else if (element.asyncMarker == AsyncMarker.SYNC_STAR) {
-        rewriter = new SyncStarRewriter(
-            backend.compiler,
-            backend.compiler.currentElement,
-            endOfIteration: backend.emitter.staticFunctionAccess(
-                backend.getEndOfIteration()),
-            newIterable: backend.emitter.staticFunctionAccess(
-                backend.getSyncStarIterableConstructor()),
-            yieldStarExpression: backend.emitter.staticFunctionAccess(
-                backend.getYieldStar()),
-            uncaughtErrorExpression: backend.emitter.staticFunctionAccess(
-                backend.getSyncStarUncaughtError()),
-            safeVariableName: backend.namer.safeVariablePrefixForAsyncRewrite,
-            bodyName: backend.namer.deriveAsyncBodyName(name));
-      }
-      else if (element.asyncMarker == AsyncMarker.ASYNC_STAR) {
-        rewriter = new AsyncStarRewriter(
-            backend.compiler,
-            backend.compiler.currentElement,
-            asyncStarHelper: backend.emitter.staticFunctionAccess(
-                backend.getAsyncStarHelper()),
-            streamOfController: backend.emitter.staticFunctionAccess(
-                backend.getStreamOfController()),
-            newController: backend.emitter.staticFunctionAccess(
-                backend.getASyncStarControllerConstructor()),
-            safeVariableName: backend.namer.safeVariablePrefixForAsyncRewrite,
-            yieldExpression: backend.emitter.staticFunctionAccess(
-                backend.getYieldSingle()),
-            yieldStarExpression: backend.emitter.staticFunctionAccess(
-                backend.getYieldStar()),
-            bodyName: backend.namer.deriveAsyncBodyName(name));
-      }
-      if (rewriter != null) {
-        result = rewriter.rewrite(result);
-      }
+      result = backend.rewriteAsync(element, result);
     }
     return result;
   }
@@ -1036,6 +990,7 @@
  */
 class SsaBuilder extends ast.Visitor
     with BaseImplementationOfCompoundsMixin,
+         BaseImplementationOfSetIfNullsMixin,
          SendResolverMixin,
          SemanticSendResolvedMixin,
          NewBulkMixin,
@@ -1808,6 +1763,7 @@
     stack = <HInstruction>[];
 
     insertTraceCall(function);
+    insertCoverageCall(function);
   }
 
   void restoreState(AstInliningState state) {
@@ -2446,10 +2402,11 @@
     }
 
     insertTraceCall(element);
+    insertCoverageCall(element);
   }
 
   insertTraceCall(Element element) {
-    if (JavaScriptBackend.TRACE_CALLS) {
+    if (JavaScriptBackend.TRACE_METHOD == 'console') {
       if (element == backend.traceHelper) return;
       n(e) => e == null ? '' : e.name;
       String name = "${n(element.library)}:${n(element.enclosingClass)}."
@@ -2461,6 +2418,18 @@
     }
   }
 
+  insertCoverageCall(Element element) {
+    if (JavaScriptBackend.TRACE_METHOD == 'post') {
+      if (element == backend.traceHelper) return;
+      // TODO(sigmund): create a better uuid for elements.
+      HConstant idConstant = graph.addConstantInt(element.hashCode, compiler);
+      HConstant nameConstant = addConstantString(element.name);
+      add(new HInvokeStatic(backend.traceHelper,
+                            <HInstruction>[idConstant, nameConstant],
+                            backend.dynamicType));
+    }
+  }
+
   /// Check that [type] is valid in the context of `localsHandler.contextClass`.
   /// This should only be called in assertions.
   bool assertTypeInContext(DartType type, [Spannable spannable]) {
@@ -2503,7 +2472,8 @@
           <HInstruction>[buildFunctionType(type), original];
       pushInvokeDynamic(
           null,
-          new Selector.call(name, backend.jsHelperLibrary, 1),
+          new Selector.call(
+              new Name(name, backend.jsHelperLibrary), CallStructure.ONE_ARG),
           null,
           arguments);
 
@@ -3505,7 +3475,7 @@
   void visitDynamicPropertyGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     generateDynamicGet(node);
   }
@@ -3514,7 +3484,7 @@
   void visitIfNotNullDynamicPropertyGet(
       ast.Send node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       _) {
     // exp?.x compiled as:
     //   t1 = exp;
@@ -3587,7 +3557,7 @@
   @override
   void visitThisPropertyGet(
       ast.Send node,
-      Selector selector,
+      Name name,
       _) {
     generateDynamicGet(node);
   }
@@ -3622,7 +3592,11 @@
                                                   {Selector selector,
                                                    TypeMask mask,
                                                    ast.Node location}) {
-    assert(send == null || Elements.isInstanceSend(send, elements));
+    assert(invariant(
+        send == null ? location : send,
+        send == null || Elements.isInstanceSend(send, elements),
+        message: "Unexpected instance setter"
+                 "${send != null ? " element: ${elements[send]}" : ""}"));
     if (selector == null) {
       assert(send != null);
       selector = elements.getSelector(send);
@@ -3641,15 +3615,28 @@
     stack.add(value);
   }
 
+  void generateNoSuchSetter(ast.Node location,
+                            Element element,
+                            HInstruction value) {
+    List<HInstruction> arguments =
+        value == null ? const <HInstruction>[] : <HInstruction>[value];
+    // An erroneous element indicates an unresolved static setter.
+    generateThrowNoSuchMethod(
+        location, noSuchMethodTargetSymbolString(element, 'set'),
+        argumentValues: arguments);
+  }
+
   void generateNonInstanceSetter(ast.SendSet send,
                                  Element element,
                                  HInstruction value,
                                  {ast.Node location}) {
-    assert(send == null || !Elements.isInstanceSend(send, elements));
     if (location == null) {
       assert(send != null);
       location = send;
     }
+    assert(invariant(location,
+        send == null || !Elements.isInstanceSend(send, elements),
+        message: "Unexpected non instance setter: $element."));
     if (Elements.isStaticOrTopLevelField(element)) {
       if (element.isSetter) {
         pushInvokeStatic(location, element, <HInstruction>[value]);
@@ -3662,12 +3649,7 @@
       stack.add(value);
     } else if (Elements.isErroneous(element)) {
       if (element is ErroneousElement) {
-        List<HInstruction> arguments =
-            send == null ? const <HInstruction>[] : <HInstruction>[value];
-        // An erroneous element indicates an unresolved static setter.
-        generateThrowNoSuchMethod(
-            location, noSuchMethodTargetSymbolString(element, 'set'),
-            argumentValues: arguments);
+        generateNoSuchSetter(location, element,  send == null ? null : value);
       } else {
         // TODO(ahe): Do something like [generateWrongArgumentCountError].
         stack.add(graph.addConstantNull(compiler));
@@ -3774,7 +3756,9 @@
       List arguments = [buildFunctionType(type), expression];
       pushInvokeDynamic(
           node,
-          new Selector.call('_isTest', backend.jsHelperLibrary, 1),
+          new Selector.call(
+              new PrivateName('_isTest', backend.jsHelperLibrary),
+              CallStructure.ONE_ARG),
           null,
           arguments);
       return new HIs.compound(type, expression, pop(), backend.boolType);
@@ -3956,7 +3940,7 @@
       ast.Send node,
       ast.Node expression,
       ast.NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       _) {
     generateCallInvoke(
         node,
@@ -4428,7 +4412,7 @@
     String name = selector.name;
 
     ClassElement cls = currentNonClosureClass;
-    Element element = cls.lookupSuperMember(Compiler.NO_SUCH_METHOD);
+    Element element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
     if (compiler.enabledInvokeOn
         && element.enclosingElement.declaration != compiler.objectClass) {
       // Register the call as dynamic if [noSuchMethod] on the super
@@ -4471,7 +4455,7 @@
                      typeMask: backend.dynamicType);
 
     var inputs = <HInstruction>[pop()];
-    push(buildInvokeSuper(compiler.noSuchMethodSelector, element, inputs));
+    push(buildInvokeSuper(Selectors.noSuchMethod_, element, inputs));
   }
 
   /// Generate a call to a super method or constructor.
@@ -5040,7 +5024,7 @@
         add(conversion);
         inputs[0] = conversion;
       }
-      js.Template code = js.js.parseForeignJS('Array(#)');
+      js.Template code = js.js.parseForeignJS('new Array(#)');
       var behavior = new native.NativeBehavior();
       behavior.typesReturned.add(expectedType);
       // The allocation can throw only if the given length is a double
@@ -6366,7 +6350,7 @@
   @override
   void visitThisPropertySet(
       ast.SendSet node,
-      Selector selector,
+      Name name,
       ast.Node rhs,
       _) {
     generateInstanceSetterWithCompiledReceiver(
@@ -6379,7 +6363,7 @@
   void visitDynamicPropertySet(
       ast.SendSet node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       ast.Node rhs,
       _) {
     generateInstanceSetterWithCompiledReceiver(
@@ -6392,7 +6376,7 @@
   void visitIfNotNullDynamicPropertySet(
       ast.SendSet node,
       ast.Node receiver,
-      Selector selector,
+      Name name,
       ast.Node rhs,
       _) {
     // compile e?.x = e2 to:
@@ -6433,7 +6417,7 @@
       ParameterElement parameter,
       ast.Node rhs,
       _) {
-    generateNonInstanceSetter(node, parameter, visitAndPop(rhs));
+    generateNoSuchSetter(node, parameter, visitAndPop(rhs));
   }
 
   @override
@@ -6451,7 +6435,7 @@
       LocalVariableElement variable,
       ast.Node rhs,
       _) {
-    generateNonInstanceSetter(node, variable, visitAndPop(rhs));
+    generateNoSuchSetter(node, variable, visitAndPop(rhs));
   }
 
   @override
@@ -6460,7 +6444,7 @@
       LocalFunctionElement function,
       ast.Node rhs,
       _) {
-    generateNonInstanceSetter(node, function, visitAndPop(rhs));
+    generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
@@ -6480,7 +6464,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, field, visitAndPop(rhs));
+    generateNoSuchSetter(node, field, visitAndPop(rhs));
   }
 
   @override
@@ -6490,7 +6474,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, getter, visitAndPop(rhs));
+    generateNoSuchSetter(node, getter, visitAndPop(rhs));
   }
 
   @override
@@ -6510,7 +6494,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, function, visitAndPop(rhs));
+    generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
@@ -6530,7 +6514,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, field, visitAndPop(rhs));
+    generateNoSuchSetter(node, field, visitAndPop(rhs));
   }
 
   @override
@@ -6540,7 +6524,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, getter, visitAndPop(rhs));
+    generateNoSuchSetter(node, getter, visitAndPop(rhs));
   }
 
   @override
@@ -6560,7 +6544,7 @@
       ast.Node rhs,
       _) {
     generateIsDeferredLoadedCheckOfSend(node);
-    generateNonInstanceSetter(node, function, visitAndPop(rhs));
+    generateNoSuchSetter(node, function, visitAndPop(rhs));
   }
 
   @override
@@ -6717,9 +6701,8 @@
   void handleDynamicCompounds(
       ast.Send node,
       ast.Node receiver,
+      Name name,
       CompoundRhs rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       _) {
     handleCompoundSendSet(node);
   }
@@ -6746,6 +6729,70 @@
     handleCompoundSendSet(node);
   }
 
+  @override
+  handleDynamicSetIfNulls(
+      ast.Send node,
+      ast.Node receiver,
+      Name name,
+      ast.Node rhs,
+      arg) {
+    handleCompoundSendSet(node);
+  }
+
+  @override
+  handleLocalSetIfNulls(
+      ast.SendSet node,
+      LocalElement local,
+      ast.Node rhs,
+      arg,
+      {bool isSetterValid}) {
+    handleCompoundSendSet(node);
+  }
+
+  @override
+  handleStaticSetIfNulls(
+      ast.SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      ast.Node rhs,
+      arg) {
+    handleCompoundSendSet(node);
+  }
+
+  @override
+  handleSuperSetIfNulls(
+      ast.SendSet node,
+      Element getter,
+      CompoundGetter getterKind,
+      Element setter,
+      CompoundSetter setterKind,
+      ast.Node rhs,
+      arg) {
+    handleSuperSendSet(node);
+  }
+
+  @override
+  handleTypeLiteralConstantSetIfNulls(
+      ast.SendSet node,
+      ConstantExpression constant,
+      ast.Node rhs,
+      arg) {
+    // The type variable is never `null`.
+    generateConstantTypeLiteral(node);
+  }
+
+  @override
+  visitTypeVariableTypeLiteralSetIfNull(
+      ast.Send node,
+      TypeVariableElement element,
+      ast.Node rhs,
+      arg) {
+    // The type variable is never `null`.
+    generateTypeVariableLiteral(node, element.type);
+  }
+
   void visitLiteralInt(ast.LiteralInt node) {
     stack.add(graph.addConstantInt(node.value, compiler));
   }
@@ -6961,13 +7008,14 @@
          !link.isEmpty;
          link = link.tail) {
       ast.Node definition = link.head;
+      LocalElement local = elements[definition];
       if (definition is ast.Identifier) {
         HInstruction initialValue = graph.addConstantNull(compiler);
-        LocalElement local = elements[definition];
         localsHandler.updateLocal(local, initialValue);
       } else {
-        assert(definition is ast.SendSet);
-        visitSendSet(definition);
+        ast.SendSet node = definition;
+        generateNonInstanceSetter(
+            node, local, visitAndPop(node.arguments.first));
         pop();  // Discard value.
       }
     }
@@ -7154,7 +7202,7 @@
                  buildBody);
     }, () {
       pushInvokeDynamic(node,
-          new Selector.call("cancel", null, 0),
+          Selectors.cancel,
           null,
           [streamIterator]);
       push(new HAwait(pop(), new TypeMask.subclass(compiler.objectClass,
@@ -8208,11 +8256,7 @@
       ConstantExpression constant,
       CompoundRhs rhs,
       _) {
-    if (rhs.operator.kind == BinaryOperatorKind.IF_NULL) {
-      handleCompoundSendSet(node);
-    } else {
-      handleTypeLiteralCompound(node);
-    }
+    handleTypeLiteralCompound(node);
   }
 
   @override
@@ -8326,12 +8370,13 @@
 
     // If the `toString` method is guaranteed to return a string we can call it
     // directly.
-    Selector selector = new Selector.call('toString', null, 0);
+    Selector selector = Selectors.toString_;
     TypeMask type = TypeMaskFactory.inferredTypeForSelector(
         selector, expression.instructionType, compiler);
     if (type.containsOnlyString(compiler.world)) {
       builder.pushInvokeDynamic(
-          node, selector, expression.instructionType, <HInstruction>[expression]);
+          node, selector,
+          expression.instructionType, <HInstruction>[expression]);
       append(builder.pop());
       return;
     }
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index c1d4dac..2318c31 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -6,33 +6,57 @@
 
 import 'dart:collection';
 
+import 'package:js_runtime/shared/embedded_names.dart';
+
 import '../closure.dart';
+import '../common/codegen.dart' show
+    CodegenRegistry,
+    CodegenWorkItem;
+import '../common/names.dart' show
+    Identifiers,
+    Selectors;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
 import '../constant_system_dart.dart';
 import '../constants/constant_system.dart';
 import '../constants/expressions.dart';
 import '../constants/values.dart';
-import '../dart2jslib.dart' hide Selector, TypedSelector;
 import '../dart_types.dart';
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/messages.dart';
+import '../diagnostics/spannable.dart' show
+    CURRENT_ELEMENT_SPANNABLE,
+    Spannable;
 import '../elements/elements.dart';
-import '../elements/modelx.dart'
-    show ElementX,
-         VariableElementX,
-         ConstructorBodyElementX;
-
+import '../elements/modelx.dart' show
+    ConstructorBodyElementX,
+    ElementX,
+    VariableElementX;
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
 import '../js_backend/js_backend.dart';
-import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
+import '../js_emitter/js_emitter.dart' show
+    CodeEmitterTask,
+    NativeEmitter;
 import '../native/native.dart' as native;
 import '../resolution/operators.dart';
 import '../resolution/semantic_visitor.dart';
+import '../resolution/send_resolver.dart' show
+    SendResolverMixin;
+import '../resolution/tree_elements.dart' show
+    TreeElements;
 import '../tree/tree.dart' as ast;
 import '../types/types.dart';
-import '../types/constants.dart' show computeTypeMask;
+import '../types/constants.dart' show
+    computeTypeMask;
 import '../universe/universe.dart';
 import '../util/util.dart';
-import '../js/rewrite_async.dart';
-import 'package:js_runtime/shared/embedded_names.dart';
+import '../world.dart' show
+    ClassWorld,
+    World;
 
 part 'builder.dart';
 part 'codegen.dart';
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index 830c6c7..a1e5e4d 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -7,8 +7,9 @@
 import 'dart:async' show EventSink;
 
 import 'ssa.dart';
+import '../compiler.dart' show Compiler;
+import '../diagnostics/invariant.dart' show DEBUG_MODE;
 import '../js_backend/js_backend.dart';
-import '../dart2jslib.dart';
 import '../tracer.dart';
 
 /**
diff --git a/pkg/compiler/lib/src/string_validator.dart b/pkg/compiler/lib/src/string_validator.dart
index 6b519f3..2968528 100644
--- a/pkg/compiler/lib/src/string_validator.dart
+++ b/pkg/compiler/lib/src/string_validator.dart
@@ -6,12 +6,13 @@
 
 library stringvalidator;
 
-import "dart:collection";
+import 'dart:collection';
 
-import "dart2jslib.dart";
-import "tree/tree.dart";
-import "util/characters.dart";
-import "scanner/scannerlib.dart" show Token;
+import 'diagnostics/diagnostic_listener.dart';
+import 'diagnostics/messages.dart' show MessageKind;
+import 'scanner/scannerlib.dart' show Token;
+import 'tree/tree.dart';
+import 'util/characters.dart';
 
 class StringValidator {
   final DiagnosticListener listener;
diff --git a/pkg/compiler/lib/src/tracer.dart b/pkg/compiler/lib/src/tracer.dart
index 32327c3..bc50222 100644
--- a/pkg/compiler/lib/src/tracer.dart
+++ b/pkg/compiler/lib/src/tracer.dart
@@ -4,16 +4,23 @@
 
 library tracer;
 
-import '../compiler.dart' as api;
 import 'dart:async' show EventSink;
+import '../compiler.dart' as api;
+import 'common/work.dart' show
+    ItemCompilationContext;
+import 'compiler.dart' show
+    Compiler;
 import 'ssa/ssa.dart' as ssa;
-import 'ssa/ssa_tracer.dart' show HTracer;
+import 'ssa/ssa_tracer.dart' show
+    HTracer;
 import 'cps_ir/cps_ir_nodes.dart' as cps_ir;
-import 'cps_ir/cps_ir_tracer.dart' show IRTracer;
+import 'cps_ir/cps_ir_tracer.dart' show
+    IRTracer;
 import 'tree_ir/tree_ir_nodes.dart' as tree_ir;
-import 'tree_ir/tree_ir_tracer.dart' show TreeTracer;
-import 'util/util.dart' show Indentation;
-import 'dart2jslib.dart';
+import 'tree_ir/tree_ir_tracer.dart' show
+    TreeTracer;
+import 'util/util.dart' show
+    Indentation;
 
 /**
  * If non-null, we only trace methods whose name match the regexp defined by the
diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart
index 6461256..e239366 100644
--- a/pkg/compiler/lib/src/tree/nodes.dart
+++ b/pkg/compiler/lib/src/tree/nodes.dart
@@ -486,6 +486,9 @@
 
   accept(Visitor visitor) => visitor.visitSendSet(this);
 
+  /// `true` if this send is not a simple assignment.
+  bool get isComplex => !identical(assignmentOperator.source, '=');
+
   /// Whether this is an if-null assignment of the form `a ??= b`.
   bool get isIfNullAssignment =>
       identical(assignmentOperator.source, '??=');
diff --git a/pkg/compiler/lib/src/tree/tree.dart b/pkg/compiler/lib/src/tree/tree.dart
index f69c3a4..67993f2 100644
--- a/pkg/compiler/lib/src/tree/tree.dart
+++ b/pkg/compiler/lib/src/tree/tree.dart
@@ -6,6 +6,9 @@
 
 import 'dart:collection';
 
+import '../diagnostics/spannable.dart' show
+    Spannable,
+    SpannableAssertionFailure;
 import '../scanner/scannerlib.dart';
 import '../util/util.dart';
 import '../util/characters.dart';
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
index 2b614ae..e4483f2 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart
@@ -190,7 +190,7 @@
     return node;
   }
 
-  Statement visitWhileCondition(WhileCondition node) {
+  Statement visitFor(For node) {
     fallthrough.push(node);
     node.condition = makeCondition(node.condition, true, liftNots: false);
     node.body = visitStatement(node.body);
@@ -306,6 +306,17 @@
       node.elseExpression = tmp;
     }
 
+    // x ? y : x ==> x && y
+    if (isSameVariable(node.condition, node.elseExpression)) {
+      destroyVariableUse(node.elseExpression);
+      return new LogicalOperator.and(node.condition, node.thenExpression);
+    }
+    // x ? x : y ==> x || y
+    if (isSameVariable(node.condition, node.thenExpression)) {
+      destroyVariableUse(node.thenExpression);
+      return new LogicalOperator.or(node.condition, node.elseExpression);
+    }
+
     return node;
   }
 
@@ -342,6 +353,7 @@
       case BuiltinOperator.IsNotNumber:
       case BuiltinOperator.IsFloor:
       case BuiltinOperator.IsNumberAndFloor:
+      case BuiltinOperator.Identical:
         return true;
       default:
         return false;
@@ -467,6 +479,18 @@
         e.elseExpression = (e.elseExpression as Not).operand;
         return new Not(e);
       }
+
+      // x ? y : x ==> x && y
+      if (isSameVariable(e.condition, e.elseExpression)) {
+        destroyVariableUse(e.elseExpression);
+        return new LogicalOperator.and(e.condition, e.thenExpression);
+      }
+      // x ? x : y ==> x || y
+      if (isSameVariable(e.condition, e.thenExpression)) {
+        destroyVariableUse(e.thenExpression);
+        return new LogicalOperator.or(e.condition, e.elseExpression);
+      }
+
       return e;
     }
     if (e is Constant && e.value.isBool) {
@@ -508,5 +532,23 @@
       return new LogicalOperator.or(e1, e2);
     }
   }
+
+  /// True if [e2] is known to return the same value as [e1] 
+  /// (with no additional side effects) if evaluated immediately after [e1].
+  /// 
+  /// Concretely, this is true if [e1] and [e2] are uses of the same variable,
+  /// or if [e2] is a use of a variable assigned by [e1].
+  bool isSameVariable(Expression e1, Expression e2) {
+    if (e1 is VariableUse) {
+      return e2 is VariableUse && e1.variable == e2.variable;
+    } else if (e1 is Assign) {
+      return e2 is VariableUse && e1.variable == e2.variable;
+    }
+    return false;
+  }
+
+  void destroyVariableUse(VariableUse node) {
+    --node.variable.readCount;
+  }
 }
 
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
index 8287bac..14069e8 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart
@@ -7,7 +7,7 @@
 import 'optimization.dart' show Pass;
 import '../tree_ir_nodes.dart';
 
-/// Rewrites [WhileTrue] statements.
+/// Rewrites [WhileTrue] statements into [For] statements.
 ///
 /// Before this phase, loops usually contain a lot of "exit code", that is,
 /// code that happens at a point where a [Continue] can no longer be reached,
@@ -50,16 +50,40 @@
 ///
 /// A similar transformation is used when S2 occurs in the 'then' position.
 ///
-/// Note that the last pattern above needs no iteration since nested ifs
-/// have been collapsed previously in the [StatementRewriter] phase.
+/// Note that the pattern above needs no iteration since nested ifs have been
+/// collapsed previously in the [StatementRewriter] phase.
+/// 
 ///
-/// [WhileCondition] statements exist only after this phase.
+/// PULL INTO UPDATE EXPRESSION:
+/// 
+/// Assignment expressions before the unique continue to a [whileCondition] are
+/// pulled into the updates for the loop.
+/// 
+///   L:
+///   for (; condition; updates) {
+///     S [ x = E; continue L ]
+///   }
+///     ==>
+///   L:
+///   for (; condition; updates, x = E) {
+///     S [ continue L ]
+///   }
+///
+/// The decision to only pull in assignments is a heuristic to balance 
+/// readability and stack trace usability versus the modest code size
+/// reduction one might get by aggressively moving expressions into the
+/// updates.
 class LoopRewriter extends RecursiveTransformer
                    implements Pass {
   String get passName => 'Loop rewriter';
 
   Set<Label> usedContinueLabels = new Set<Label>();
 
+  /// Maps loop labels to a list, if that loop can accept update expressions.
+  /// The list will then be populated while traversing the body of that loop.
+  /// If a loop is not in the map, update expressions cannot be hoisted there.
+  Map<Label, List<Expression>> updateExpressions = <Label, List<Expression>>{};
+
   void rewrite(FunctionDefinition root) {
     root.body = visitStatement(root.body);
   }
@@ -96,26 +120,29 @@
       }
     }
 
-    // Rewrite while(true) to while(condition).
+    // Rewrite while(true) to for(; condition; updates).
     Statement loop = node;
     if (node.body is If) {
       If body = node.body;
+      updateExpressions[node.label] = <Expression>[];
       body.thenStatement = visitStatement(body.thenStatement);
       bool thenHasContinue = usedContinueLabels.remove(node.label);
       body.elseStatement = visitStatement(body.elseStatement);
       bool elseHasContinue = usedContinueLabels.remove(node.label);
       if (thenHasContinue && !elseHasContinue) {
         node.label.binding = null; // Prepare to rebind the label.
-        loop = new WhileCondition(
+        loop = new For(
             node.label,
             body.condition,
+            updateExpressions[node.label],
             body.thenStatement,
             body.elseStatement);
       } else if (!thenHasContinue && elseHasContinue) {
         node.label.binding = null;
-        loop = new WhileCondition(
+        loop = new For(
             node.label,
             new Not(body.condition),
+            updateExpressions[node.label],
             body.elseStatement,
             body.thenStatement);
       }
@@ -133,4 +160,42 @@
     tail.body = loop;
     return head;
   }
+
+  Statement visitExpressionStatement(ExpressionStatement node) {
+    if (updateExpressions.isEmpty) {
+      // Avoid allocating a list if there is no loop.
+      return super.visitExpressionStatement(node);
+    }
+    List<ExpressionStatement> statements = <ExpressionStatement>[];
+    while (node.next is ExpressionStatement) {
+      statements.add(node);
+      node = node.next;
+    }
+    statements.add(node);
+    Statement next = visitStatement(node.next);
+    if (next is Continue && next.target.useCount == 1) {
+      List<Expression> updates = updateExpressions[next.target];
+      if (updates != null) {
+        // Pull expressions before the continue into the for loop update.
+        // As a heuristic, we only pull in assignment expressions.
+        // Determine the index of the first assignment to pull in.
+        int index = statements.length;
+        while (index > 0 && statements[index - 1].expression is Assign) {
+          --index;
+        }
+        for (ExpressionStatement stmt in statements.skip(index)) {
+          updates.add(stmt.expression);
+        }
+        if (index > 0) {
+          statements[index - 1].next = next;
+          return statements.first;
+        } else {
+          return next;
+        }
+      }
+    }
+    // The expression statements could not be pulled into a loop update.
+    node.next = next;
+    return statements.first;
+  }
 }
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
index 1820f1d..994f142 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart
@@ -160,7 +160,7 @@
     return node;
   }
 
-  Statement visitWhileCondition(WhileCondition node) {
+  Statement visitFor(For node) {
     return node;
   }
 
@@ -347,6 +347,17 @@
     return node;
   }
 
+  Expression visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    node.receiver = visitExpression(node.receiver);
+    if (!node.receiverIsNotNull) {
+      // If the receiver is null, the method lookup throws.
+      ++impureCounter;
+    }
+    rewriteList(node.arguments);
+    ++impureCounter;
+    return node;
+  }
+
   @override
   Expression visitForeignExpression(ForeignExpression node) {
     rewriteList(node.arguments);
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
index 6c864be..4949bc9 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart
@@ -207,15 +207,19 @@
     return newJump != null ? newJump : jump;
   }
 
-  void inEmptyEnvironment(void action()) {
+  void inEmptyEnvironment(void action(), {bool keepConstants: true}) {
     List oldEnvironment = environment;
     Map oldConstantEnvironment = constantEnvironment;
     environment = <Expression>[];
-    constantEnvironment = <Variable, Expression>{};
+    if (!keepConstants) {
+      constantEnvironment = <Variable, Expression>{};
+    }
     action();
     assert(environment.isEmpty);
     environment = oldEnvironment;
-    constantEnvironment = oldConstantEnvironment;
+    if (!keepConstants) {
+      constantEnvironment = oldConstantEnvironment;
+    }
   }
 
   /// Left-hand side of the given assignment, or `null` if not an assignment.
@@ -355,7 +359,6 @@
            exp is This ||
            exp is CreateInvocationMirror ||
            exp is GetStatic && exp.element.isFunction ||
-           exp is GetField && exp.objectIsNotNull && exp.field.isFinal ||
            exp is Interceptor ||
            exp is ApplyBuiltinOperator ||
            exp is VariableUse && constantEnvironment.containsKey(exp.variable);
@@ -387,7 +390,7 @@
   }
 
   /// Attempts to propagate an assignment in an expression statement.
-  /// 
+  ///
   /// Returns a callback to be invoked after the sucessor statement has
   /// been processed.
   Function processExpressionStatement(ExpressionStatement stmt) {
@@ -405,7 +408,7 @@
         return (Statement next) {
           popDominatingAssignment(leftHand);
           if (assign.variable.readCount > 0) {
-            // The assignment could not be propagated into the successor, 
+            // The assignment could not be propagated into the successor,
             // either because it [hasUnsafeVariableUse] or because the
             // use is outside the current try block, and we do not currently
             // support constant propagation out of a try block.
@@ -491,6 +494,21 @@
     return node;
   }
 
+  Expression visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    if (node.receiverIsNotNull) {
+      _rewriteList(node.arguments);
+      node.receiver = visitExpression(node.receiver);
+    } else {
+      // Impure expressions cannot be propagated across the method lookup,
+      // because it throws when the receiver is null.
+      inEmptyEnvironment(() {
+        _rewriteList(node.arguments);
+      });
+      node.receiver = visitExpression(node.receiver);
+    }
+    return node;
+  }
+
   Expression visitInvokeMethodDirectly(InvokeMethodDirectly node) {
     _rewriteList(node.arguments);
     node.receiver = visitExpression(node.receiver);
@@ -643,15 +661,17 @@
   Statement visitWhileTrue(WhileTrue node) {
     // Do not propagate assignments into loops.  Doing so is not safe for
     // variables modified in the loop (the initial value will be propagated).
+    // Do not propagate effective constant expressions into loops, since
+    // computing them is not free (e.g. interceptors are expensive).
     inEmptyEnvironment(() {
       node.body = visitStatement(node.body);
-    });
+    }, keepConstants: false);
     return node;
   }
 
-  Statement visitWhileCondition(WhileCondition node) {
+  Statement visitFor(For node) {
     // Not introduced yet
-    throw "Unexpected WhileCondition in StatementRewriter";
+    throw "Unexpected For in StatementRewriter";
   }
 
   Statement visitTry(Try node) {
@@ -826,15 +846,18 @@
     BuiltinOperator commuted = commuteBinaryOperator(node.operator);
     if (commuted != null) {
       assert(node.arguments.length == 2); // Only binary operators can commute.
-      VariableUse arg1 = node.arguments[0];
-      VariableUse arg2 = node.arguments[1];
-      if (propagatableVariable == arg1.variable &&
-          propagatableVariable != arg2.variable &&
-          !constantEnvironment.containsKey(arg2.variable)) {
-        // An assignment can be propagated if we commute the operator.
-        node.operator = commuted;
-        node.arguments[0] = arg2;
-        node.arguments[1] = arg1;
+      Expression left = node.arguments[0];
+      if (left is VariableUse && propagatableVariable == left.variable) {
+        Expression right = node.arguments[1];
+        if (right is This ||
+            (right is VariableUse &&
+             propagatableVariable != right.variable &&
+             !constantEnvironment.containsKey(right.variable))) {
+          // An assignment can be propagated if we commute the operator.
+          node.operator = commuted;
+          node.arguments[0] = right;
+          node.arguments[1] = left;
+        }
       }
     }
     _rewriteList(node.arguments);
@@ -1107,6 +1130,11 @@
     _rewriteList(node.arguments);
     return node;
   }
+
+  @override
+  Expression visitAwait(Await node) {
+    return node;
+  }
 }
 
 /// Result of combining two expressions, with the potential for reverting the
diff --git a/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart b/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
index 79f018b..91a5aac 100644
--- a/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
+++ b/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart
@@ -208,10 +208,11 @@
     visitStatement(node.body); // visitContinue will add predecessors to join.
   }
 
-  visitWhileCondition(WhileCondition node) {
-    Block join = _jumpTarget[node.label] = newBlock();
-    join.predecessors.add(_currentBlock);
-    _currentBlock = join;
+  visitFor(For node) {
+    Block entry = _currentBlock;
+    _currentBlock = _jumpTarget[node.label] = newBlock();
+    node.updates.forEach(visitExpression);
+    joinFrom(entry, _currentBlock);
     visitExpression(node.condition);
     Block afterCondition = _currentBlock;
     branchFrom(afterCondition);
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 921e830..5e19e04 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -4,10 +4,12 @@
 
 library tree_ir_builder;
 
-import '../dart2jslib.dart' as dart2js;
+import '../diagnostics/invariant.dart' show
+    InternalErrorFunction;
+import '../diagnostics/spannable.dart' show
+    CURRENT_ELEMENT_SPANNABLE;
 import '../elements/elements.dart';
 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
-import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE;
 import 'tree_ir_nodes.dart';
 
 typedef Statement NodeCallback(Statement next);
@@ -45,7 +47,7 @@
  * still all named.
  */
 class Builder implements cps_ir.Visitor/*<NodeCallback|Node>*/ {
-  final dart2js.InternalErrorFunction internalError;
+  final InternalErrorFunction internalError;
 
   final Map<cps_ir.Primitive, Variable> primitive2variable =
       <cps_ir.Primitive, Variable>{};
@@ -248,10 +250,10 @@
   visit(cps_ir.Node node) => throw 'Use translateXXX instead of visit';
 
   /// Translates a CPS expression into a tree statement.
-  /// 
+  ///
   /// To avoid deep recursion, we traverse each basic blocks without
   /// recursion.
-  /// 
+  ///
   /// Non-tail expressions evaluate to a callback to be invoked once the
   /// successor statement has been constructed. These callbacks are stored
   /// in a stack until the block's tail expression has been translated.
@@ -269,7 +271,7 @@
   }
 
   /// Translates a CPS primitive to a tree expression.
-  /// 
+  ///
   /// This simply calls the visit method for the primitive.
   Expression translatePrimitive(cps_ir.Primitive prim) {
     return prim.accept(this);
@@ -321,8 +323,8 @@
         // Recursively build the body. We only do this for join continuations,
         // so we should not risk overly deep recursion.
         next = new LabeledStatement(
-            label, 
-            next, 
+            label,
+            next,
             translateExpression(continuation.body));
       }
     }
@@ -487,7 +489,7 @@
             if (cont.isRecursive) {
               return node.isRecursive
                   ? new Continue(getLabel(cont))
-                  : new WhileTrue(getLabel(cont), 
+                  : new WhileTrue(getLabel(cont),
                                   translateExpression(cont.body));
             } else {
               return cont.hasExactlyOneUse && !node.isEscapingTry
@@ -503,20 +505,20 @@
     Statement thenStatement, elseStatement;
     cps_ir.Continuation cont = node.trueContinuation.definition;
     assert(cont.parameters.isEmpty);
-    thenStatement = cont.hasExactlyOneUse 
-        ? translateExpression(cont.body) 
+    thenStatement = cont.hasExactlyOneUse
+        ? translateExpression(cont.body)
         : new Break(labels[cont]);
     cont = node.falseContinuation.definition;
     assert(cont.parameters.isEmpty);
-    elseStatement = cont.hasExactlyOneUse 
-        ? translateExpression(cont.body) 
+    elseStatement = cont.hasExactlyOneUse
+        ? translateExpression(cont.body)
         : new Break(labels[cont]);
     return new If(condition, thenStatement, elseStatement);
   }
 
 
   /************************** PRIMITIVES  **************************/
-  // 
+  //
   // Visit methods for primitives must return an expression.
   //
 
@@ -525,9 +527,9 @@
                         node.field,
                         getVariableUse(node.value));
   }
-  
+
   Expression visitInterceptor(cps_ir.Interceptor node) {
-    return new Interceptor(getVariableUse(node.input), 
+    return new Interceptor(getVariableUse(node.input),
                            node.interceptedClasses,
                            node.sourceInformation);
   }
@@ -638,6 +640,13 @@
                                     translateArguments(node.arguments));
   }
 
+  Expression visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
+    return new ApplyBuiltinMethod(node.method,
+        getVariableUse(node.receiver),
+        translateArguments(node.arguments),
+        receiverIsNotNull: node.receiverIsNotNull);
+  }
+
   Expression visitGetLength(cps_ir.GetLength node) {
     return new GetLength(getVariableUse(node.object));
   }
@@ -653,6 +662,12 @@
                         getVariableUse(node.value));
   }
 
+  @override
+  NodeCallback visitAwait(cps_ir.Await node) {
+    Expression value = new Await(getVariableUse(node.input));
+    return makeCallExpression(node, value);
+  }
+
   /********** UNUSED VISIT METHODS *************/
 
   unexpectedNode(cps_ir.Node node) {
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
index 5afd2da..fa33492 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_integrity.dart
@@ -102,9 +102,10 @@
     visitJumpTargetBody(node);
   }
 
-  visitWhileCondition(WhileCondition node) {
+  visitFor(For node) {
     visitExpression(node.condition);
     visitJumpTargetBody(node);
+    node.updates.forEach(visitExpression);
     visitStatement(node.next);
   }
 
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
index c23efd5..7c41a53 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
@@ -43,6 +43,9 @@
  * The base class of all Tree nodes.
  */
 abstract class Node {
+  /// Workaround for a slow Object.hashCode in the VM.
+  static int _usedHashCodes = 0;
+  final int hashCode = ++_usedHashCodes;
 }
 
 /**
@@ -362,6 +365,26 @@
   }
 }
 
+class ApplyBuiltinMethod extends Expression {
+  BuiltinMethod method;
+  Expression receiver;
+  List<Expression> arguments;
+
+  bool receiverIsNotNull;
+
+  ApplyBuiltinMethod(this.method, 
+                     this.receiver,
+                     this.arguments,
+                     {this.receiverIsNotNull: false});
+
+  accept(ExpressionVisitor visitor) {
+    return visitor.visitApplyBuiltinMethod(this);
+  }
+  accept1(ExpressionVisitor1 visitor, arg) {
+    return visitor.visitApplyBuiltinMethod(this, arg);
+  }
+}
+
 /// A conditional expression.
 class Conditional extends Expression {
   Expression condition;
@@ -426,7 +449,7 @@
   }
 }
 
-/// A [LabeledStatement] or [WhileTrue] or [WhileCondition].
+/// A [LabeledStatement] or [WhileTrue] or [For].
 abstract class JumpTarget extends Statement {
   Label get label;
   Statement get body;
@@ -452,7 +475,7 @@
   }
 }
 
-/// A [WhileTrue] or [WhileCondition] loop.
+/// A [WhileTrue] or [For] loop.
 abstract class Loop extends JumpTarget {
 }
 
@@ -476,30 +499,36 @@
 }
 
 /**
- * A while loop with a condition. If the condition is false, control resumes
- * at the [next] statement.
+ * A loop with a condition and update expressions. If there are any update
+ * expressions, this generates a for loop, otherwise a while loop.
+ * 
+ * When the condition is false, control resumes at the [next] statement.
  *
  * It is NOT valid to target this statement with a [Break].
  * The only way to reach [next] is for the condition to evaluate to false.
  *
- * [WhileCondition] statements are introduced in the [LoopRewriter] and is
+ * [For] statements are introduced in the [LoopRewriter] and are
  * assumed not to occur before then.
  */
-class WhileCondition extends Loop {
+class For extends Loop {
   final Label label;
   Expression condition;
+  List<Expression> updates;
   Statement body;
   Statement next;
 
-  WhileCondition(this.label, this.condition, this.body,
-                 this.next) {
+  For(this.label,
+      this.condition,
+      this.updates,
+      this.body,
+      this.next) {
     assert(label.binding == null);
     label.binding = this;
   }
 
-  accept(StatementVisitor visitor) => visitor.visitWhileCondition(this);
+  accept(StatementVisitor visitor) => visitor.visitFor(this);
   accept1(StatementVisitor1 visitor, arg) {
-    return visitor.visitWhileCondition(this, arg);
+    return visitor.visitFor(this, arg);
   }
 }
 
@@ -527,7 +556,7 @@
 }
 
 /**
- * A continue to an enclosing [WhileTrue] or [WhileCondition] loop.
+ * A continue to an enclosing [WhileTrue] or [For] loop.
  * The continue targets the loop's body.
  */
 class Continue extends Jump {
@@ -895,6 +924,20 @@
   }
 }
 
+class Await extends Expression {
+  Expression input;
+
+  Await(this.input);
+
+  accept(ExpressionVisitor visitor) {
+    return visitor.visitAwait(this);
+  }
+
+  accept1(ExpressionVisitor1 visitor, arg) {
+    return visitor.visitAwait(this, arg);
+  }
+}
+
 abstract class ExpressionVisitor<E> {
   E visitExpression(Expression node) => node.accept(this);
   E visitVariableUse(VariableUse node);
@@ -924,10 +967,12 @@
   E visitCreateInvocationMirror(CreateInvocationMirror node);
   E visitInterceptor(Interceptor node);
   E visitApplyBuiltinOperator(ApplyBuiltinOperator node);
+  E visitApplyBuiltinMethod(ApplyBuiltinMethod node);
   E visitForeignExpression(ForeignExpression node);
   E visitGetLength(GetLength node);
   E visitGetIndex(GetIndex node);
   E visitSetIndex(SetIndex node);
+  E visitAwait(Await node);
 }
 
 abstract class ExpressionVisitor1<E, A> {
@@ -959,10 +1004,12 @@
   E visitCreateInvocationMirror(CreateInvocationMirror node, A arg);
   E visitInterceptor(Interceptor node, A arg);
   E visitApplyBuiltinOperator(ApplyBuiltinOperator node, A arg);
+  E visitApplyBuiltinMethod(ApplyBuiltinMethod node, A arg);
   E visitForeignExpression(ForeignExpression node, A arg);
   E visitGetLength(GetLength node, A arg);
   E visitGetIndex(GetIndex node, A arg);
   E visitSetIndex(SetIndex node, A arg);
+  E visitAwait(Await node, A arg);
 }
 
 abstract class StatementVisitor<S> {
@@ -975,7 +1022,7 @@
   S visitContinue(Continue node);
   S visitIf(If node);
   S visitWhileTrue(WhileTrue node);
-  S visitWhileCondition(WhileCondition node);
+  S visitFor(For node);
   S visitExpressionStatement(ExpressionStatement node);
   S visitTry(Try node);
   S visitUnreachable(Unreachable node);
@@ -992,7 +1039,7 @@
   S visitContinue(Continue node, A arg);
   S visitIf(If node, A arg);
   S visitWhileTrue(WhileTrue node, A arg);
-  S visitWhileCondition(WhileCondition node, A arg);
+  S visitFor(For node, A arg);
   S visitExpressionStatement(ExpressionStatement node, A arg);
   S visitTry(Try node, A arg);
   S visitUnreachable(Unreachable node, A arg);
@@ -1102,8 +1149,9 @@
     visitStatement(node.body);
   }
 
-  visitWhileCondition(WhileCondition node) {
+  visitFor(For node) {
     visitExpression(node.condition);
+    node.updates.forEach(visitExpression);
     visitStatement(node.body);
     visitStatement(node.next);
   }
@@ -1171,6 +1219,11 @@
     node.arguments.forEach(visitExpression);
   }
 
+  visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    visitExpression(node.receiver);
+    node.arguments.forEach(visitExpression);
+  }
+
   visitInterceptor(Interceptor node) {
     visitExpression(node.input);
   }
@@ -1196,6 +1249,10 @@
     visitExpression(node.index);
     visitExpression(node.value);
   }
+
+  visitAwait(Await node) {
+    visitExpression(node.input);
+  }
 }
 
 abstract class Transformer implements ExpressionVisitor<Expression>,
@@ -1324,8 +1381,9 @@
     return node;
   }
 
-  visitWhileCondition(WhileCondition node) {
+  visitFor(For node) {
     node.condition = visitExpression(node.condition);
+    _replaceExpressions(node.updates);
     node.body = visitStatement(node.body);
     node.next = visitStatement(node.next);
     return node;
@@ -1416,6 +1474,12 @@
     return node;
   }
 
+  visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    node.receiver = visitExpression(node.receiver);
+    _replaceExpressions(node.arguments);
+    return node;
+  }
+
   visitInterceptor(Interceptor node) {
     node.input = visitExpression(node.input);
     return node;
@@ -1438,6 +1502,11 @@
     node.value = visitExpression(node.value);
     return node;
   }
+
+  visitAwait(Await node) {
+    node.input = visitExpression(node.input);
+    return node;
+  }
 }
 
 class FallthroughTarget {
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
index f07a030..86a24b6 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart
@@ -127,7 +127,7 @@
     visitStatement(node.body);
   }
 
-  visitWhileCondition(WhileCondition node) {
+  visitFor(For node) {
     Block whileBlock = new Block();
     _addGotoStatement(whileBlock);
 
@@ -297,11 +297,13 @@
     printStatement(null, "while true do");
   }
 
-  visitWhileCondition(WhileCondition node) {
+  visitFor(For node) {
     String bodyTarget = collector.substatements[node.body].name;
     String nextTarget = collector.substatements[node.next].name;
+    String updates = node.updates.map(expr).join(', ');
     printStatement(null, "while ${expr(node.condition)}");
     printStatement(null, "do $bodyTarget");
+    printStatement(null, "updates ($updates)");
     printStatement(null, "then $nextTarget" );
   }
 
@@ -496,7 +498,6 @@
     return 'CreateInstance $className($arguments)';
   }
 
-
   @override
   String visitReadTypeVariable(ReadTypeVariable node) {
     return 'Read ${node.variable.element} ${visitExpression(node.target)}';
@@ -536,6 +537,13 @@
   }
 
   @override
+  String visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
+    String receiver = visitExpression(node.receiver);
+    String args = node.arguments.map(visitExpression).join(', ');
+    return 'ApplyBuiltinMethod ${node.method} $receiver ($args)';
+  }
+
+  @override
   String visitGetLength(GetLength node) {
     String object = visitExpression(node.object);
     return 'GetLength($object)';
@@ -555,6 +563,12 @@
     String value = visitExpression(node.value);
     return 'SetIndex($object, $index, $value)';
   }
+
+  @override
+  String visitAwait(Await node) {
+    String value = visitExpression(node.input);
+    return 'Await($value)';
+  }
 }
 
 /**
diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
index 2d854a2..74b9659 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -2,7 +2,57 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.typechecker;
+
+import 'common/tasks.dart' show
+    CompilerTask;
+import 'compiler.dart' show
+    Compiler;
+import 'constants/expressions.dart';
+import 'constants/values.dart';
+import 'core_types.dart';
+import 'dart_types.dart';
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'diagnostics/messages.dart';
+import 'diagnostics/spannable.dart' show
+    Spannable;
+import 'elements/elements.dart' show
+    AbstractFieldElement,
+    AstElement,
+    AsyncMarker,
+    ClassElement,
+    ConstructorElement,
+    Element,
+    Elements,
+    EnumClassElement,
+    ExecutableElement,
+    FieldElement,
+    FunctionElement,
+    GetterElement,
+    InitializingFormalElement,
+    LibraryElement,
+    Member,
+    MemberSignature,
+    Name,
+    ParameterElement,
+    PrivateName,
+    PublicName,
+    ResolvedAst,
+    SetterElement,
+    TypeDeclarationElement,
+    TypedElement,
+    TypedefElement,
+    VariableElement;
+import 'resolution/tree_elements.dart' show
+    TreeElements;
+import 'resolution/class_members.dart' show
+    MembersCreator;
+import 'tree/tree.dart';
+import 'util/util.dart' show
+    Link,
+    LinkBuilder;
+import '../compiler_new.dart' as api;
 
 class TypeCheckerTask extends CompilerTask {
   TypeCheckerTask(Compiler compiler) : super(compiler);
@@ -670,7 +720,7 @@
 
   void checkPrivateAccess(Node node, Element element, String name) {
     if (name != null &&
-        isPrivateName(name) &&
+        Name.isPrivateName(name) &&
         element.library != currentLibrary) {
       reportTypeWarning(
           node,
@@ -990,6 +1040,10 @@
       Element receiverElement = elements[node.receiver];
       if (receiverElement != null) {
         if (receiverElement.isPrefix) {
+          if (node.isConditional) {
+            // Skip cases like `prefix?.topLevel`.
+            return const DynamicAccess();
+          }
           assert(invariant(node, element != null,
               message: 'Prefixed node has no element.'));
           return computeResolvedAccess(node, name, element, memberKind);
diff --git a/pkg/compiler/lib/src/types/constants.dart b/pkg/compiler/lib/src/types/constants.dart
index 27b21c8..e036901 100644
--- a/pkg/compiler/lib/src/types/constants.dart
+++ b/pkg/compiler/lib/src/types/constants.dart
@@ -4,8 +4,9 @@
 
 library types.constants;
 
+import '../compiler.dart' show
+    Compiler;
 import '../constants/values.dart';
-import '../dart2jslib.dart';
 import 'types.dart';
 import '../js_backend/js_backend.dart' show SyntheticConstantKind;
 
diff --git a/pkg/compiler/lib/src/types/type_mask.dart b/pkg/compiler/lib/src/types/type_mask.dart
index bf095b8..9ea82ab 100644
--- a/pkg/compiler/lib/src/types/type_mask.dart
+++ b/pkg/compiler/lib/src/types/type_mask.dart
@@ -22,7 +22,7 @@
 
   factory TypeMask.exact(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
-        message: "Cannot create extact type mask for uninstantiated class "
+        message: "Cannot create exact type mask for uninstantiated class "
           "${base.name}"));
     return new FlatTypeMask.exact(base);
   }
@@ -55,7 +55,7 @@
 
   factory TypeMask.nonNullExact(ClassElement base, ClassWorld classWorld) {
     assert(invariant(base, classWorld.isInstantiated(base),
-        message: "Cannot create extact type mask for "
+        message: "Cannot create exact type mask for "
                  "uninstantiated class $base."));
     return new FlatTypeMask.nonNullExact(base);
   }
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 9db71f1..a06404b 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -4,13 +4,25 @@
 
 library types;
 
-import '../dart2jslib.dart' hide Selector, TypedSelector;
+import '../common/backend_api.dart' show
+    Backend;
+import '../common/tasks.dart' show
+    CompilerTask;
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/spannable.dart' show
+    NO_LOCATION_SPANNABLE;
 import '../elements/elements.dart';
+import '../inferrer/concrete_types_inferrer.dart' show ConcreteTypesInferrer;
 import '../inferrer/type_graph_inferrer.dart' show TypeGraphInferrer;
 import '../tree/tree.dart';
 import '../util/util.dart';
 import '../universe/universe.dart';
-import '../inferrer/concrete_types_inferrer.dart' show ConcreteTypesInferrer;
+import '../world.dart' show
+    ClassWorld,
+    World;
 
 part 'container_type_mask.dart';
 part 'dictionary_type_mask.dart';
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index 7260c6d..0b4b0bc 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -59,7 +59,7 @@
   FunctionSetQuery query(Selector selector, TypeMask mask) {
     String name = selector.name;
     FunctionSetNode node = nodes[name];
-    FunctionSetNode noSuchMethods = nodes[Compiler.NO_SUCH_METHOD];
+    FunctionSetNode noSuchMethods = nodes[Identifiers.noSuchMethod_];
     if (node != null) {
       return node.query(selector, mask, compiler, noSuchMethods);
     }
@@ -67,7 +67,7 @@
     // only hit [:noSuchMethod:].
     if (noSuchMethods == null) return const FunctionSetQuery(const <Element>[]);
     return noSuchMethods.query(
-        compiler.noSuchMethodSelector, mask, compiler, null);
+        Selectors.noSuchMethod_, mask, compiler, null);
   }
 
   void forEach(Function action) {
@@ -204,7 +204,7 @@
     if (noSuchMethods != null
         && mask.needsNoSuchMethodHandling(selector, classWorld)) {
       FunctionSetQuery noSuchMethodQuery = noSuchMethods.query(
-          compiler.noSuchMethodSelector,
+          Selectors.noSuchMethod_,
           mask,
           compiler,
           null);
diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart
index aa90f73..c5da864 100644
--- a/pkg/compiler/lib/src/universe/universe.dart
+++ b/pkg/compiler/lib/src/universe/universe.dart
@@ -6,12 +6,24 @@
 
 import 'dart:collection';
 
+import '../common/names.dart' show
+    Identifiers,
+    Names,
+    Selectors;
+import '../compiler.dart' show
+    Compiler;
+import '../diagnostics/invariant.dart' show
+    invariant;
+import '../diagnostics/spannable.dart' show
+    SpannableAssertionFailure;
 import '../elements/elements.dart';
-import '../dart2jslib.dart';
 import '../dart_types.dart';
 import '../types/types.dart';
 import '../tree/tree.dart';
 import '../util/util.dart';
+import '../world.dart' show
+    ClassWorld,
+    World;
 
 part 'function_set.dart';
 part 'side_effects.dart';
@@ -665,7 +677,7 @@
 
   static const Name INDEX_NAME = const PublicName("[]");
   static const Name INDEX_SET_NAME = const PublicName("[]=");
-  static const Name CALL_NAME = const PublicName(Compiler.CALL_OPERATOR_NAME);
+  static const Name CALL_NAME = Names.call;
 
   Selector.internal(this.kind,
                     this.memberName,
@@ -709,11 +721,11 @@
   }
 
   factory Selector.fromElement(Element element) {
-    String name = element.name;
+    Name name = new Name(element.name, element.library);
     if (element.isFunction) {
-      if (name == '[]') {
+      if (name == INDEX_NAME) {
         return new Selector.index();
-      } else if (name == '[]=') {
+      } else if (name == INDEX_SET_NAME) {
         return new Selector.indexSet();
       }
       FunctionSignature signature =
@@ -729,39 +741,34 @@
         // a user from declaring such an operator.
         return new Selector(
             SelectorKind.OPERATOR,
-            new PublicName(name),
+            name,
             new CallStructure(arity, namedArguments));
       } else {
         return new Selector.call(
-            name, element.library, arity, namedArguments);
+            name, new CallStructure(arity, namedArguments));
       }
     } else if (element.isSetter) {
-      return new Selector.setter(name, element.library);
+      return new Selector.setter(name);
     } else if (element.isGetter) {
-      return new Selector.getter(name, element.library);
+      return new Selector.getter(name);
     } else if (element.isField) {
-      return new Selector.getter(name, element.library);
+      return new Selector.getter(name);
     } else if (element.isConstructor) {
-      return new Selector.callConstructor(name, element.library);
+      return new Selector.callConstructor(name);
     } else {
       throw new SpannableAssertionFailure(
           element, "Can't get selector from $element");
     }
   }
 
-  factory Selector.getter(String name, LibraryElement library)
+  factory Selector.getter(Name name)
       => new Selector(SelectorKind.GETTER,
-                      new Name(name, library),
+                      name.getter,
                       CallStructure.NO_ARGS);
 
-  factory Selector.getterFrom(Selector selector)
-      => new Selector(SelectorKind.GETTER,
-                      selector.memberName.getter,
-                      CallStructure.NO_ARGS);
-
-  factory Selector.setter(String name, LibraryElement library)
+  factory Selector.setter(Name name)
       => new Selector(SelectorKind.SETTER,
-                      new Name(name, library, isSetter: true),
+                      name.setter,
                       CallStructure.ONE_ARG);
 
   factory Selector.unaryOperator(String name) => new Selector(
@@ -782,13 +789,8 @@
       => new Selector(SelectorKind.INDEX, INDEX_SET_NAME,
                       CallStructure.TWO_ARGS);
 
-  factory Selector.call(String name,
-                        LibraryElement library,
-                        int arity,
-                        [List<String> namedArguments])
-      => new Selector(SelectorKind.CALL,
-          new Name(name, library),
-          new CallStructure(arity, namedArguments));
+  factory Selector.call(Name name, CallStructure callStructure)
+      => new Selector(SelectorKind.CALL, name, callStructure);
 
   factory Selector.callClosure(int arity, [List<String> namedArguments])
       => new Selector(SelectorKind.CALL, CALL_NAME,
@@ -797,10 +799,10 @@
   factory Selector.callClosureFrom(Selector selector)
       => new Selector(SelectorKind.CALL, CALL_NAME, selector.callStructure);
 
-  factory Selector.callConstructor(String name, LibraryElement library,
+  factory Selector.callConstructor(Name name,
                                    [int arity = 0,
                                     List<String> namedArguments])
-      => new Selector(SelectorKind.CALL, new Name(name, library),
+      => new Selector(SelectorKind.CALL, name,
                       new CallStructure(arity, namedArguments));
 
   factory Selector.callDefaultConstructor()
diff --git a/pkg/compiler/lib/src/use_unused_api.dart b/pkg/compiler/lib/src/use_unused_api.dart
index 570ccf4..3fbf537 100644
--- a/pkg/compiler/lib/src/use_unused_api.dart
+++ b/pkg/compiler/lib/src/use_unused_api.dart
@@ -11,7 +11,10 @@
 import '../compiler.dart' as api;
 
 import 'colors.dart' as colors;
+import 'compiler.dart' as compiler;
 import 'constants/constant_system.dart' as constants;
+import 'constants/constructors.dart' as constants;
+import 'constants/evaluation.dart' as constants;
 import 'constants/expressions.dart' as constants;
 import 'constants/values.dart' as constants;
 import 'cps_ir/cps_ir_builder.dart' as ir_builder;
@@ -19,7 +22,8 @@
 import 'tree_ir/tree_ir_nodes.dart' as tree_ir;
 import 'dart_types.dart' as dart_types;
 import 'dart2js.dart' as dart2js;
-import 'dart2jslib.dart' as dart2jslib;
+import 'compiler.dart' as dart2jslib;
+import 'diagnostics/source_span.dart' as diagnostics;
 import 'elements/elements.dart' as elements;
 import 'elements/modelx.dart' as modelx;
 import 'elements/visitor.dart' as elements_visitor;
@@ -35,10 +39,12 @@
 import 'js_emitter/program_builder/program_builder.dart' as program_builder;
 import 'resolution/semantic_visitor.dart' as semantic_visitor;
 import 'resolution/operators.dart' as operators;
+import 'script.dart';
 import 'source_file_provider.dart' as source_file_provider;
 import 'ssa/ssa.dart' as ssa;
 import 'tree/tree.dart' as tree;
 import 'util/util.dart' as util;
+import 'world.dart';
 
 import 'scanner/scannerlib.dart' show
     PartialClassElement,
@@ -51,7 +57,7 @@
 void main(List<String> arguments) {
   useApi(null);
   dart2js.main(arguments);
-  dart2jslib.isPublicName(null);
+  elements.Name.isPublicName(null);
   useConstant();
   useNode(null);
   useUtil(null);
@@ -80,10 +86,13 @@
   useTreeVisitors();
 }
 
-useApi(api.ReadStringFromUri uri) {
+useApi([api.ReadStringFromUri uri, compiler.Compiler compiler]) {
+  compiler.analyzeUri(null);
+  new diagnostics.SourceSpan.fromNode(null, null);
 }
 
-class NullConstantConstructorVisitor extends constants.ConstantConstructorVisitor {
+class NullConstantConstructorVisitor
+    extends constants.ConstantConstructorVisitor {
   @override
   visitGenerative(constants.GenerativeConstantConstructor constructor, arg) {
   }
@@ -253,7 +262,7 @@
 usedByTests() {
   // TODO(ahe): We should try to avoid including API used only for tests. In
   // most cases, such API can be moved to a test library.
-  dart2jslib.World world = null;
+  World world = null;
   dart2jslib.Compiler compiler = null;
   compiler.currentlyInUserCode();
   type_graph_inferrer.TypeGraphInferrer typeGraphInferrer = null;
@@ -308,7 +317,7 @@
   fullEmitter.buildLazilyInitializedStaticField(null, isolateProperties: null);
 }
 
-useScript(dart2jslib.Script script) {
+useScript(Script script) {
   script.copyWithFile(null);
 }
 
@@ -320,9 +329,7 @@
 useSemanticVisitor() {
   operators.UnaryOperator.fromKind(null);
   operators.BinaryOperator.fromKind(null);
-  new semantic_visitor.BulkSendVisitor()
-      ..apply(null, null)
-      ..visitSuperFieldFieldCompound(null, null, null, null, null, null);
+  new semantic_visitor.BulkSendVisitor()..apply(null, null);
   new semantic_visitor.TraversalVisitor(null).apply(null, null);
   new semantic_visitor.BulkDeclarationVisitor().apply(null, null);
 }
diff --git a/pkg/compiler/lib/src/util/link.dart b/pkg/compiler/lib/src/util/link.dart
index 31316e9..d09639c 100644
--- a/pkg/compiler/lib/src/util/link.dart
+++ b/pkg/compiler/lib/src/util/link.dart
@@ -57,6 +57,7 @@
   }
 
   bool get isEmpty => true;
+  bool get isNotEmpty => false;
 
   Link<T> reverse() => this;
 
diff --git a/pkg/compiler/lib/src/util/link_implementation.dart b/pkg/compiler/lib/src/util/link_implementation.dart
index 7cea7d9..74d9f23 100644
--- a/pkg/compiler/lib/src/util/link_implementation.dart
+++ b/pkg/compiler/lib/src/util/link_implementation.dart
@@ -71,7 +71,7 @@
   void printOn(StringBuffer buffer, [separatedBy]) {
     buffer.write(head);
     if (separatedBy == null) separatedBy = '';
-    for (Link link = tail; !link.isEmpty; link = link.tail) {
+    for (Link link = tail; link.isNotEmpty; link = link.tail) {
       buffer.write(separatedBy);
       buffer.write(link.head);
     }
@@ -87,7 +87,7 @@
 
   Link<T> reverse() {
     Link<T> result = const Link();
-    for (Link<T> link = this; !link.isEmpty; link = link.tail) {
+    for (Link<T> link = this; link.isNotEmpty; link = link.tail) {
       result = result.prepend(link.head);
     }
     return result;
@@ -95,7 +95,7 @@
 
   Link<T> reversePrependAll(Link<T> from) {
     Link<T> result;
-    for (result = this; !from.isEmpty; from = from.tail) {
+    for (result = this; from.isNotEmpty; from = from.tail) {
       result = result.prepend(from.head);
     }
     return result;
@@ -113,9 +113,10 @@
   }
 
   bool get isEmpty => false;
+  bool get isNotEmpty => true;
 
   void forEach(void f(T element)) {
-    for (Link<T> link = this; !link.isEmpty; link = link.tail) {
+    for (Link<T> link = this; link.isNotEmpty; link = link.tail) {
       f(link.head);
     }
   }
@@ -123,7 +124,7 @@
   bool operator ==(other) {
     if (other is !Link<T>) return false;
     Link<T> myElements = this;
-    while (!myElements.isEmpty && !other.isEmpty) {
+    while (myElements.isNotEmpty && other.isNotEmpty) {
       if (myElements.head != other.head) {
         return false;
       }
@@ -135,12 +136,18 @@
 
   int get hashCode => throw new UnsupportedError('LinkEntry.hashCode');
 
-  int slowLength() => 1 + tail.slowLength();
+  int slowLength() {
+    int length = 0;
+    for (Link current = this; current.isNotEmpty; current = current.tail) {
+      ++length;
+    }
+    return length;
+  }
 
   Link copyWithout(e) {
     LinkBuilder copy = new LinkBuilder();
     Link link = this;
-    for (; !link.isEmpty; link = link.tail) {
+    for (; link.isNotEmpty; link = link.tail) {
       if (link.head != e) {
         copy.addLast(link.head);
       }
@@ -170,7 +177,7 @@
     List<T> list = new List<T>(length);
     int index = 0;
     Link<T> link = head;
-    while (!link.isEmpty) {
+    while (link.isNotEmpty) {
       list[index] = link.head;
       link = link.tail;
       index++;
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index d26a5c3..a91f6cd 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -63,42 +63,6 @@
   }
 }
 
-/**
- * Tagging interface for classes from which source spans can be generated.
- */
-// TODO(johnniwinther): Find a better name.
-// TODO(ahe): How about "Bolt"?
-abstract class Spannable {}
-
-class _SpannableSentinel implements Spannable {
-  final String name;
-
-  const _SpannableSentinel(this.name);
-
-  String toString() => name;
-}
-
-/// Sentinel spannable used to mark that diagnostics should point to the
-/// current element. Note that the diagnostic reporting will fail if the current
-/// element is `null`.
-const Spannable CURRENT_ELEMENT_SPANNABLE =
-    const _SpannableSentinel("Current element");
-
-/// Sentinel spannable used to mark that there might be no location for the
-/// diagnostic. Use this only when it is not an error not to have a current
-/// element.
-const Spannable NO_LOCATION_SPANNABLE =
-    const _SpannableSentinel("No location");
-
-class SpannableAssertionFailure {
-  final Spannable node;
-  final String message;
-  SpannableAssertionFailure(this.node, this.message);
-
-  String toString() => 'Assertion failure'
-                       '${message != null ? ': $message' : ''}';
-}
-
 bool equalElements(List a, List b) {
   if (a.length != b.length) return false;
   for (int index = 0; index < a.length; index++) {
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 68d0f4d..e8c9b13 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -2,7 +2,38 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-part of dart2js;
+library dart2js.world;
+
+import 'closure.dart' show
+    SynthesizedCallMethodElementX;
+import 'common/backend_api.dart' show
+    Backend;
+import 'common/registry.dart' show
+    Registry;
+import 'compiler.dart' show
+    invariant,
+    Backend,
+    Compiler,
+    Registry;
+import 'dart_types.dart';
+import 'diagnostics/invariant.dart' show
+    invariant;
+import 'elements/elements.dart' show
+    ClassElement,
+    Element,
+    FunctionElement,
+    MixinApplicationElement,
+    TypedefElement,
+    VariableElement;
+import 'ordered_typeset.dart';
+import 'types/types.dart' as ti;
+import 'universe/universe.dart' show
+    FunctionSet,
+    Selector,
+    SideEffects;
+import 'universe/class_set.dart';
+import 'util/util.dart' show
+    Link;
 
 abstract class ClassWorld {
   // TODO(johnniwinther): Refine this into a `BackendClasses` interface.
@@ -551,7 +582,7 @@
     // expressions. In such a case, we have to look at the original
     // function expressions's element.
     // TODO(herhut): Generate classes for function expressions earlier.
-    if (element is closureMapping.SynthesizedCallMethodElementX) {
+    if (element is SynthesizedCallMethodElementX) {
       return getMightBePassedToApply(element.expression);
     }
     return functionsThatMightBePassedToApply.contains(element);
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index d1f45c5..ad922d2 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -10,14 +10,28 @@
     path: ../../sdk/lib/_internal/js_runtime
   sdk_library_metadata:
     path: ../../sdk/lib/_internal/sdk_library_metadata
+  dart2js_info: ^0.0.2
+
 
 # Uncomment if running gclient, so you can depend directly on the downloaded
 # versions of dart2js's transitive dependencies:
 #
 # dependency_overrides:
 #   package_config:
-#     path: ../../third_party/pkg/package_config
+#     path: ../../third_party/pkg_tested/package_config
 #   path:
 #     path: ../../third_party/pkg/path
 #   charcode:
 #     path: ../../third_party/pkg/charcode
+#   collection:
+#     path: ../../third_party/pkg/collection
+#   crypto:
+#     path: ../../third_party/pkg/crypto
+#   http_parser:
+#     path: ../../third_party/pkg/http_parser
+#   args:
+#     path: ../../third_party/pkg/args
+#   shelf:
+#     path: ../../third_party/pkg/shelf
+#   yaml:
+#     path: ../../third_party/pkg/yaml
diff --git a/pkg/dart2js_incremental/lib/library_updater.dart b/pkg/dart2js_incremental/lib/library_updater.dart
index bd2188b..6120e379 100644
--- a/pkg/dart2js_incremental/lib/library_updater.dart
+++ b/pkg/dart2js_incremental/lib/library_updater.dart
@@ -7,16 +7,13 @@
 import 'dart:async' show
     Future;
 
-import 'dart:convert' show
-    UTF8;
-
 import 'package:compiler/compiler.dart' as api;
 
-import 'package:compiler/src/dart2jslib.dart' show
-    Compiler,
-    EnqueueTask,
-    MessageKind,
-    Script;
+import 'package:compiler/src/compiler.dart' show
+    Compiler;
+
+import 'package:compiler/src/diagnostics/messages.dart' show
+    MessageKind;
 
 import 'package:compiler/src/elements/elements.dart' show
     ClassElement,
@@ -27,6 +24,9 @@
     STATE_NOT_STARTED,
     ScopeContainerElement;
 
+import 'package:compiler/src/enqueue.dart' show
+    EnqueueTask;
+
 import 'package:compiler/src/scanner/scannerlib.dart' show
     EOF_TOKEN,
     Listener,
@@ -39,6 +39,9 @@
     Scanner,
     Token;
 
+import 'package:compiler/src/script.dart' show
+    Script;
+
 import 'package:compiler/src/io/source_file.dart' show
     CachingUtf8BytesSourceFile,
     SourceFile,
diff --git a/pkg/docgen/README.md b/pkg/docgen/README.md
index 95ee68a..de80e8c 100644
--- a/pkg/docgen/README.md
+++ b/pkg/docgen/README.md
@@ -1,7 +1,10 @@
 docgen
 ======
 
+**Deprecated** please use https://pub.dartlang.org/packages/dartdoc instead.
+
 A documentation generator for Dart.
+
 - - -
 The docgen tool takes in a file or directory as input and produces documentation
 for all `.dart` file it finds as YAML or JSON files. This outputs information 
diff --git a/pkg/docgen/bin/docgen.dart b/pkg/docgen/bin/docgen.dart
index 5bb7e20..6ed8392 100644
--- a/pkg/docgen/bin/docgen.dart
+++ b/pkg/docgen/bin/docgen.dart
@@ -22,6 +22,7 @@
   var startPage = options['start-page'];
   if (_singlePackage(files) && startPage == null) {
     startPage = _defaultStartPageFor(files);
+    _printDeprecatedMessage();
     print("Using default options for documenting a single package: "
         "--start-page=$startPage");
   }
@@ -29,11 +30,12 @@
   var scriptDir = path.dirname(Platform.script.toFilePath());
   var introduction = includeSdk ? '' : options['introduction'];
 
-  var pubScript = options['sdk'] != null ?
-      path.join(options['sdk'], 'bin', 'pub') : 'pub';
+  var pubScript =
+      options['sdk'] != null ? path.join(options['sdk'], 'bin', 'pub') : 'pub';
 
-  var dartBinary = options['sdk'] != null ?
-      path.join(options['sdk'], 'bin', 'dart') : 'dart';
+  var dartBinary = options['sdk'] != null
+      ? path.join(options['sdk'], 'bin', 'dart')
+      : 'dart';
 
   var excludedLibraries = options['exclude-lib'];
   if (excludedLibraries == null) excludedLibraries = [];
@@ -63,11 +65,18 @@
  * Print help if we are passed the help option or invalid arguments.
  */
 void _printHelpAndExit() {
+  _printDeprecatedMessage();
   print(_initArgParser().usage);
   print('Usage: dartdocgen [OPTIONS] fooDir/barFile');
   exit(0);
 }
 
+void _printDeprecatedMessage() {
+  print(
+      '\nDeprecated: please use https://pub.dartlang.org/packages/dartdoc instead.');
+  print('Dart SDK 1.12 will be the last release to ship with docgen.\n');
+}
+
 /**
  * If the user seems to have given us a single package to document, use some
  * reasonable arguments for what they probably meant.
@@ -94,17 +103,18 @@
  */
 ArgParser _initArgParser() {
   var parser = new ArgParser();
-  parser.addFlag('help', abbr: 'h',
+  parser.addFlag('help',
+      abbr: 'h',
       help: 'Prints help and usage information.',
-      negatable: false,
-      callback: (help) {
-        if (help) _printHelpAndExit();
-      });
-  parser.addFlag('verbose', abbr: 'v',
-      help: 'Output more logging information.', negatable: false,
-      callback: (verbose) {
-        if (verbose) Logger.root.level = Level.FINEST;
-      });
+      negatable: false, callback: (help) {
+    if (help) _printHelpAndExit();
+  });
+  parser.addFlag('verbose',
+      abbr: 'v',
+      help: 'Output more logging information.',
+      negatable: false, callback: (verbose) {
+    if (verbose) Logger.root.level = Level.FINEST;
+  });
   parser.addFlag('include-private',
       help: 'Flag to include private declarations.', negatable: false);
   parser.addFlag('include-sdk',
@@ -113,44 +123,51 @@
       negatable: true);
   parser.addFlag('parse-sdk',
       help: 'Parses the SDK libraries only.',
-      defaultsTo: false, negatable: false);
+      defaultsTo: false,
+      negatable: false);
   parser.addOption('package-root',
       help: 'Sets the package root of the library being analyzed.');
-  parser.addFlag('compile', help: 'Clone the documentation viewer repo locally '
-      '(if not already present) and compile with dart2js', defaultsTo: false,
+  parser.addFlag('compile',
+      help: 'Clone the documentation viewer repo locally '
+          '(if not already present) and compile with dart2js',
+      defaultsTo: false,
       negatable: false);
-  parser.addFlag('serve', help: 'Clone the documentation viewer repo locally '
-      '(if not already present), compile with dart2js, '
-      'and start a simple server',
-      defaultsTo: false, negatable: false);
-  parser.addFlag('no-docs', help: 'Do not generate any new documentation',
-      defaultsTo: false, negatable: false);
+  parser.addFlag('serve',
+      help: 'Clone the documentation viewer repo locally '
+          '(if not already present), compile with dart2js, '
+          'and start a simple server',
+      defaultsTo: false,
+      negatable: false);
+  parser.addFlag('no-docs',
+      help: 'Do not generate any new documentation',
+      defaultsTo: false,
+      negatable: false);
   parser.addOption('introduction',
       help: 'Adds the provided markdown text file as the introduction'
-        ' for the generated documentation.', defaultsTo: '');
+          ' for the generated documentation.',
+      defaultsTo: '');
   parser.addOption('out',
-      help: 'The name of the output directory.',
-      defaultsTo: 'docs');
+      help: 'The name of the output directory.', defaultsTo: 'docs');
   parser.addOption('exclude-lib',
       help: 'Exclude the library by this name from the documentation',
       allowMultiple: true);
   parser.addFlag('include-dependent-packages',
       help: 'Assumes we are documenting a single package and are running '
-        'in the directory with its pubspec. Includes documentation for all '
-        'of its dependent packages.',
-      defaultsTo: true, negatable: true);
-  parser.addOption('sdk',
-      help: 'SDK directory',
-      defaultsTo: null);
+          'in the directory with its pubspec. Includes documentation for all '
+          'of its dependent packages.',
+      defaultsTo: true,
+      negatable: true);
+  parser.addOption('sdk', help: 'SDK directory', defaultsTo: null);
   parser.addOption('start-page',
       help: 'By default the viewer will start at the SDK introduction page. '
-        'To start at some other page, e.g. for a package, provide the name '
-        'of the package in this argument, e.g. --start-page=intl will make '
-        'the start page of the viewer be the intl package.',
-        defaultsTo: null);
+          'To start at some other page, e.g. for a package, provide the name '
+          'of the package in this argument, e.g. --start-page=intl will make '
+          'the start page of the viewer be the intl package.',
+      defaultsTo: null);
   parser.addFlag('indent-json',
       help: 'Indents each level of JSON output by two spaces',
-      defaultsTo: false, negatable: true);
+      defaultsTo: false,
+      negatable: true);
 
   return parser;
 }
diff --git a/pkg/js_ast/test/printer_callback_test.dart b/pkg/js_ast/test/printer_callback_test.dart
index dbd248b..7e14110 100644
--- a/pkg/js_ast/test/printer_callback_test.dart
+++ b/pkg/js_ast/test/printer_callback_test.dart
@@ -161,11 +161,11 @@
   }),
 
   const TestCase(const {
-    TestMode.INPUT: "a.#nameTemplate",
-    TestMode.NONE: "a.nameValue",
-    TestMode.ENTER: "@0@1a.@2nameValue",
-    TestMode.DELIMITER: "a.nameValue",
-    TestMode.EXIT: "a@1.nameValue@2@0",
+    TestMode.INPUT: "a.#nameTemplate = #nameTemplate",
+    TestMode.NONE: "a.nameValue = nameValue",
+    TestMode.ENTER: "@0@1@2a.@3nameValue = @3nameValue",
+    TestMode.DELIMITER: "a.nameValue = nameValue",
+    TestMode.EXIT: "a@2.nameValue@3@1 = nameValue@3@0",
   }, const {'nameTemplate': 'nameValue'}),
 ];
 
diff --git a/pkg/package_test_data/lib/resources/sample.txt b/pkg/package_test_data/lib/resources/sample.txt
new file mode 100644
index 0000000..94ad275
--- /dev/null
+++ b/pkg/package_test_data/lib/resources/sample.txt
@@ -0,0 +1 @@
+Sample text file.
diff --git a/pkg/package_test_data/pubspec.yaml b/pkg/package_test_data/pubspec.yaml
new file mode 100644
index 0000000..8585f51
--- /dev/null
+++ b/pkg/package_test_data/pubspec.yaml
@@ -0,0 +1,7 @@
+name: package_test_data
+version: 0.0.1
+author: "Dart Team <misc@dartlang.org>"
+publish_to: "none"
+description: >
+ Contains data used by platform tests using package: URIs.
+ Should *not* be published.
diff --git a/pkg/pkg.status b/pkg/pkg.status
index e98d307..5877a42 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -75,23 +75,38 @@
 analysis_server/index/store/codec_test: Pass, Slow # Issue 19756
 
 [ $compiler == dart2js ]
-analysis_server/test/edit/refactoring_test: Pass, Slow # Issue 19756, 21628
+analysis_server/test/analysis_notification_highlights_test: Pass, Slow # 19756, 21628
+analysis_server/test/analysis_notification_navigation_test: Pass, Slow # Issue 19756, 21628
 analysis_server/test/analysis_notification_occurrences_test: Pass, Slow # Issue 19756, 21628
 analysis_server/test/analysis_notification_outline_test: Pass, Slow # Issue 19756, 21628
-analysis_server/test/analysis_notification_navigation_test: Pass, Slow # Issue 19756, 21628
 analysis_server/test/domain_analysis_test: Pass, Slow # Issue 19756, 21628
-analysis_server/test/analysis_notification_highlights_test: Pass, Slow # 19756, 21628
+analysis_server/test/edit/refactoring_test: Pass, Slow # Issue 19756, 21628
 analysis_server/test/search/top_level_declarations_test: Pass, Slow # 19756, 21628
 analysis_server/test/socket_server_test: Pass, Slow # Issue 19756, 21628
 analyzer/test/generated/all_the_rest_test: Pass, Slow # Issue 21628
+analyzer/test/generated/ast_test: Pass, Slow # Issue 21628
+analyzer/test/generated/compile_time_error_code_test: Pass, Slow # Issue 21628
 analyzer/test/generated/element_test: Pass, Slow # Issue 21628
 analyzer/test/generated/incremental_resolver_test: Pass, Slow # Issue 21628
-analyzer/test/generated/utilities_test: Pass, Slow # Issue 21628
+analyzer/test/generated/incremental_scanner_test: Pass, Slow # Issue 21628
+analyzer/test/generated/non_error_resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/parser_test: Pass, Slow # Issue 21628
+analyzer/test/generated/resolver_test: Pass, Slow # Issue 21628
 analyzer/test/generated/scanner_test: Pass, Slow # Issue 21628
-analyzer/test/src/task/dart_test: Pass, Slow # Issue 21628
-analyzer/test/src/task/driver_test: Pass, Slow # Issue 21628
+analyzer/test/generated/source_factory_test: Pass, Slow # Issue 21628
+analyzer/test/generated/static_type_warning_code_test: Pass, Slow # Issue 21628
+analyzer/test/generated/static_warning_code_test: Pass, Slow # Issue 21628
+analyzer/test/generated/utilities_test: Pass, Slow # Issue 21628
 analyzer/test/src/context/cache_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/dart_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/dart_work_manager_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/driver_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/general_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/html_work_manager_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/incremental_element_builder_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/inputs_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/manager_test: Pass, Slow # Issue 21628
+analyzer/test/src/task/model_test: Pass, Slow # Issue 21628
 
 [ $runtime == jsshell ]
 async/test/stream_zip_test: RuntimeError, OK # Timers are not supported.
@@ -153,9 +168,29 @@
 analyzer/test/*: PubGetError
 
 [ $compiler == dart2js && $cps_ir ]
-analyzer/test/cancelable_future_test: Crash # Invalid argument(s)
-analyzer/test/enum_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-analyzer/test/file_system/physical_resource_provider_test: Crash # (Future _poll()async...  cannot handle async/sync*/async* functions
-analyzer/test/generated/all_the_rest_test: Crash # (Future test_implici...  cannot handle async/sync*/async* functions
-analyzer/test/src/context/context_test: Crash # Invalid argument(s)
-typed_data/test/typed_buffers_test/none: RuntimeError # Please triage this failure.
+analyzer/test/enum_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/all_the_rest_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/ast_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/compile_time_error_code_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/element_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/incremental_resolver_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/incremental_scanner_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/non_error_resolver_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/parser_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/resolver_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/scanner_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/source_factory_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/static_type_warning_code_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/static_warning_code_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/generated/utilities_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/source/package_map_provider_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/context/cache_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/context/context_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/dart_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/dart_work_manager_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/driver_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/general_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/html_work_manager_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/inputs_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/manager_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
+analyzer/test/src/task/model_test: Crash # (Iterable<JavaFile> ...  cannot handle sync*/async* functions
diff --git a/pkg/pkgbuild.status b/pkg/pkgbuild.status
index 3cf95f1..aa7e83e 100644
--- a/pkg/pkgbuild.status
+++ b/pkg/pkgbuild.status
@@ -8,6 +8,7 @@
 
 [ $use_repository_packages ]
 pkg/analyzer: PubGetError
+third_party/pkg/shelf: PubGetError # either shelf needs to be updated, or dart2js_info needs to be downgraded.
 samples/third_party/angular_todo: Fail # angular needs to be updated
 samples/third_party/todomvc_performance: Skip # dependencies are not in the repo
 
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index 00c9f69..dfe9a74 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -13,6 +13,7 @@
     'snapshot_in_cc_file': 'snapshot_in.cc',
     'vm_isolate_snapshot_bin_file': '<(gen_source_dir)/vm_isolate_snapshot_gen.bin',
     'isolate_snapshot_bin_file': '<(gen_source_dir)/isolate_snapshot_gen.bin',
+    'gen_snapshot_stamp_file': '<(gen_source_dir)/gen_snapshot.stamp',
     'resources_cc_file': '<(gen_source_dir)/resources_gen.cc',
     'bootstrap_resources_cc_file':
         '<(gen_source_dir)/bootstrap_resources_gen.cc',
@@ -224,7 +225,7 @@
       'conditions': [
         ['dart_io_support==1 and dart_io_secure_socket==1', {
           'dependencies': [
-            'bin/net/ssl.gyp:libssl_dart',
+          '../third_party/boringssl/boringssl_dart.gyp:boringssl',
           ],
         }],
         ['dart_io_secure_socket==0', {
@@ -292,16 +293,16 @@
         'io_natives.cc',
       ],
       'conditions': [
-        ['dart_io_support==1 and dart_io_secure_socket==1', {
-          'dependencies': [
-            'bin/net/ssl.gyp:libssl_dart',
-          ],
-        }],
-        ['dart_io_support==1 and dart_io_secure_socket==0', {
+        ['dart_io_support==1', {
           'dependencies': [
             'bin/net/zlib.gyp:zlib_dart',
           ],
         }],
+        ['dart_io_support==1 and dart_io_secure_socket==1', {
+          'dependencies': [
+            '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+          ],
+        }],
         ['dart_io_secure_socket==0', {
           'defines': [
             'DART_IO_SECURE_SOCKET_DISABLED'
@@ -333,19 +334,6 @@
           },
         }],
       ],
-      'configurations': {
-        'Dart_Android_Base': {
-          'target_conditions': [
-            ['_toolset=="target"', {
-              'defines': [
-                # Needed for sources outside of nss that include pr and ssl
-                # header files.
-                'MDCPUCFG="md/_linux.cfg"',
-              ],
-            }],
-          ],
-        },
-      },
     },
     {
       'target_name': 'libdart_nosnapshot',
@@ -433,8 +421,7 @@
             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)',
           ],
           'outputs': [
-            '<(vm_isolate_snapshot_bin_file)',
-            '<(isolate_snapshot_bin_file)',
+            '<(gen_snapshot_stamp_file)',
           ],
           'action': [
             'python',
@@ -443,7 +430,8 @@
             '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)',
             '--vm_output_bin', '<(vm_isolate_snapshot_bin_file)',
             '--output_bin', '<(isolate_snapshot_bin_file)',
-            '--target_os', '<(OS)'
+            '--target_os', '<(OS)',
+            '--timestamp_file', '<(gen_snapshot_stamp_file)',
           ],
           'message': 'Generating ''<(vm_isolate_snapshot_bin_file)'' ''<(isolate_snapshot_bin_file)'' files.'
         },
@@ -462,9 +450,8 @@
           'action_name': 'generate_snapshot_file',
           'inputs': [
             '../tools/create_snapshot_file.py',
+            '<(gen_snapshot_stamp_file)',
             '<(snapshot_in_cc_file)',
-            '<(vm_isolate_snapshot_bin_file)',
-            '<(isolate_snapshot_bin_file)',
           ],
           'outputs': [
             '<(snapshot_cc_file)',
@@ -768,6 +755,15 @@
           },
         }],
       ],
+      'configurations': {
+        'Dart_Linux_Base': {
+          # Have the linker add all symbols to the dynamic symbol table
+          # so that extensions can look them up dynamically in the binary.
+          'ldflags': [
+            '-rdynamic',
+          ],
+        },
+      },
     },
     {
       'target_name': 'test_extension',
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index dd63bec..1c77820 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -589,11 +589,6 @@
 // no more outstanding load requests.
 void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) {
   Dart_Handle res = Dart_FinalizeLoading(true);
-  IsolateData* isolate_data =
-      reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
-  if (isolate_data->load_async_id >= 0) {
-    Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
-  }
   if (Dart_IsError(res)) {
     // TODO(hausner): If compilation/loading errors are supposed to
     // be observable by the program, we need to mark the bad library
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 2f19fb2..4c18137 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -544,7 +544,7 @@
   // Initialize the Dart VM.
   // Note: We don't expect isolates to be created from dart code during
   // snapshot generation.
-  if (!Dart_Initialize(NULL,
+  if (!Dart_Initialize(NULL, NULL,
                        NULL, NULL, NULL, NULL,
                        DartUtils::OpenFile,
                        DartUtils::ReadFile,
diff --git a/runtime/bin/io_impl_sources.gypi b/runtime/bin/io_impl_sources.gypi
index 9236ec7..611b458 100644
--- a/runtime/bin/io_impl_sources.gypi
+++ b/runtime/bin/io_impl_sources.gypi
@@ -26,9 +26,9 @@
     'filter_unsupported.cc',
     'io_service.cc',
     'io_service.h',
+    'io_service_no_ssl.cc',
+    'io_service_no_ssl.h',
     'io_service_unsupported.cc',
-    'net/nss_memio.cc',
-    'net/nss_memio.h',
     'platform.cc',
     'platform.h',
     'platform_android.cc',
@@ -41,6 +41,7 @@
     'process_linux.cc',
     'process_macos.cc',
     'process_win.cc',
+    '../../third_party/root_certificates/root_certificates.cc',
     'secure_socket.cc',
     'secure_socket.h',
     'secure_socket_unsupported.cc',
@@ -62,12 +63,15 @@
       'conditions': [
         ['dart_io_secure_socket==1', {
           'sources!' : [
+            'io_service_no_ssl.cc',
+            'io_service_no_ssl.h',
             'secure_socket_unsupported.cc',
           ],
         }, {  # else dart_io_secure_socket == 0
           'sources!' : [
-            'net/nss_memio.cc',
-            'net/nss_memio.h',
+            '../../third_party/root_certificates/root_certificates.cc',
+            'io_service.cc',
+            'io_service.h',
             'secure_socket.cc',
             'secure_socket.h',
           ],
@@ -83,8 +87,9 @@
         'filter.h',
         'io_service.cc',
         'io_service.h',
-        'net/nss_memio.cc',
-        'net/nss_memio.h',
+        'io_service_no_ssl.cc',
+        'io_service_no_ssl.h',
+        '../../third_party/root_certificates/root_certificates.cc',
         'secure_socket.cc',
         'secure_socket.h',
       ],
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 2be3f34..9c28ac1 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -96,17 +96,23 @@
   V(Process_Pid, 1)                                                            \
   V(Process_SetSignalHandler, 1)                                               \
   V(Process_ClearSignalHandler, 1)                                             \
-  V(SecureSocket_Connect, 10)                                                  \
+  V(SecureSocket_Connect, 8)                                                   \
   V(SecureSocket_Destroy, 1)                                                   \
   V(SecureSocket_FilterPointer, 1)                                             \
   V(SecureSocket_GetSelectedProtocol, 1)                                       \
   V(SecureSocket_Handshake, 1)                                                 \
   V(SecureSocket_Init, 1)                                                      \
-  V(SecureSocket_InitializeLibrary, 3)                                         \
   V(SecureSocket_PeerCertificate, 1)                                           \
   V(SecureSocket_RegisterBadCertificateCallback, 2)                            \
   V(SecureSocket_RegisterHandshakeCompleteCallback, 2)                         \
   V(SecureSocket_Renegotiate, 4)                                               \
+  V(SecurityContext_Allocate, 1)                                               \
+  V(SecurityContext_UsePrivateKey, 3)                                          \
+  V(SecurityContext_SetAlpnProtocols, 3)                                       \
+  V(SecurityContext_SetClientAuthorities, 2)                                   \
+  V(SecurityContext_SetTrustedCertificates, 3)                                 \
+  V(SecurityContext_TrustBuiltinRoots, 1)                                      \
+  V(SecurityContext_UseCertificateChain, 2)                                    \
   V(ServerSocket_Accept, 2)                                                    \
   V(ServerSocket_CreateBindListen, 6)                                          \
   V(Socket_CreateConnect, 3)                                                   \
@@ -136,8 +142,11 @@
   V(Stdin_SetLineMode, 1)                                                      \
   V(Stdout_GetTerminalSize, 1)                                                 \
   V(StringToSystemEncoding, 1)                                                 \
-  V(SystemEncodingToString, 1)
-
+  V(SystemEncodingToString, 1)                                                 \
+  V(X509_Subject, 1)                                                           \
+  V(X509_Issuer, 1)                                                            \
+  V(X509_StartValidity, 1)                                                     \
+  V(X509_EndValidity, 1)
 
 IO_NATIVE_LIST(DECLARE_FUNCTION);
 
diff --git a/runtime/bin/io_service_no_ssl.cc b/runtime/bin/io_service_no_ssl.cc
new file mode 100644
index 0000000..b63f8c8
--- /dev/null
+++ b/runtime/bin/io_service_no_ssl.cc
@@ -0,0 +1,78 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "bin/dartutils.h"
+#include "bin/directory.h"
+#include "bin/file.h"
+#include "bin/io_buffer.h"
+#include "bin/io_service_no_ssl.h"
+#include "bin/socket.h"
+#include "bin/utils.h"
+
+#include "platform/globals.h"
+#include "platform/utils.h"
+
+#include "include/dart_api.h"
+
+
+namespace dart {
+namespace bin {
+
+#define CASE_REQUEST(type, method, id)                                         \
+  case IOService::k##type##method##Request:                                    \
+    response = type::method##Request(data);                                    \
+    break;
+
+void IOServiceCallback(Dart_Port dest_port_id,
+                       Dart_CObject* message) {
+  Dart_Port reply_port_id = ILLEGAL_PORT;
+  CObject* response = CObject::IllegalArgumentError();
+  CObjectArray request(message);
+  if (message->type == Dart_CObject_kArray &&
+      request.Length() == 4 &&
+      request[0]->IsInt32() &&
+      request[1]->IsSendPort() &&
+      request[2]->IsInt32() &&
+      request[3]->IsArray()) {
+    CObjectInt32 message_id(request[0]);
+    CObjectSendPort reply_port(request[1]);
+    CObjectInt32 request_id(request[2]);
+    CObjectArray data(request[3]);
+    reply_port_id = reply_port.Value();
+    switch (request_id.Value()) {
+  IO_SERVICE_REQUEST_LIST(CASE_REQUEST);
+      default:
+        UNREACHABLE();
+    }
+  }
+
+  CObjectArray result(CObject::NewArray(2));
+  result.SetAt(0, request[0]);
+  result.SetAt(1, response);
+  ASSERT(reply_port_id != ILLEGAL_PORT);
+  Dart_PostCObject(reply_port_id, result.AsApiCObject());
+}
+
+
+Dart_Port IOService::GetServicePort() {
+  Dart_Port result = Dart_NewNativePort("IOService",
+                                        IOServiceCallback,
+                                        true);
+  return result;
+}
+
+
+void FUNCTION_NAME(IOService_NewServicePort)(Dart_NativeArguments args) {
+  Dart_SetReturnValue(args, Dart_Null());
+  Dart_Port service_port = IOService::GetServicePort();
+  if (service_port != ILLEGAL_PORT) {
+    // Return a send port for the service port.
+    Dart_Handle send_port = Dart_NewSendPort(service_port);
+    Dart_SetReturnValue(args, send_port);
+  }
+}
+
+
+}  // namespace bin
+}  // namespace dart
diff --git a/runtime/bin/io_service_no_ssl.h b/runtime/bin/io_service_no_ssl.h
new file mode 100644
index 0000000..9cc7fc1
--- /dev/null
+++ b/runtime/bin/io_service_no_ssl.h
@@ -0,0 +1,74 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef BIN_IO_SERVICE_NO_SSL_H_
+#define BIN_IO_SERVICE_NO_SSL_H_
+
+#include "bin/builtin.h"
+#include "bin/utils.h"
+
+
+namespace dart {
+namespace bin {
+
+// This list must be kept in sync with the list in sdk/lib/io/io_service.dart
+// In this modified version, though, the request 39 for SSLFilter::ProcessFilter
+// is removed, for use in contexts in which secure sockets are not enabled.
+#define IO_SERVICE_REQUEST_LIST(V)                                             \
+  V(File, Exists, 0)                                                           \
+  V(File, Create, 1)                                                           \
+  V(File, Delete, 2)                                                           \
+  V(File, Rename, 3)                                                           \
+  V(File, Copy, 4)                                                             \
+  V(File, Open, 5)                                                             \
+  V(File, ResolveSymbolicLinks, 6)                                             \
+  V(File, Close, 7)                                                            \
+  V(File, Position, 8)                                                         \
+  V(File, SetPosition, 9)                                                      \
+  V(File, Truncate, 10)                                                        \
+  V(File, Length, 11)                                                          \
+  V(File, LengthFromPath, 12)                                                  \
+  V(File, LastModified, 13)                                                    \
+  V(File, Flush, 14)                                                           \
+  V(File, ReadByte, 15)                                                        \
+  V(File, WriteByte, 16)                                                       \
+  V(File, Read, 17)                                                            \
+  V(File, ReadInto, 18)                                                        \
+  V(File, WriteFrom, 19)                                                       \
+  V(File, CreateLink, 20)                                                      \
+  V(File, DeleteLink, 21)                                                      \
+  V(File, RenameLink, 22)                                                      \
+  V(File, LinkTarget, 23)                                                      \
+  V(File, Type, 24)                                                            \
+  V(File, Identical, 25)                                                       \
+  V(File, Stat, 26)                                                            \
+  V(File, Lock, 27)                                                            \
+  V(Socket, Lookup, 28)                                                        \
+  V(Socket, ListInterfaces, 29)                                                \
+  V(Socket, ReverseLookup, 30)                                                 \
+  V(Directory, Create, 31)                                                     \
+  V(Directory, Delete, 32)                                                     \
+  V(Directory, Exists, 33)                                                     \
+  V(Directory, CreateTemp, 34)                                                 \
+  V(Directory, ListStart, 35)                                                  \
+  V(Directory, ListNext, 36)                                                   \
+  V(Directory, ListStop, 37)                                                   \
+  V(Directory, Rename, 38)
+
+#define DECLARE_REQUEST(type, method, id)                                      \
+  k##type##method##Request = id,
+
+class IOService {
+ public:
+  enum {
+IO_SERVICE_REQUEST_LIST(DECLARE_REQUEST)
+  };
+
+  static Dart_Port GetServicePort();
+};
+
+}  // namespace bin
+}  // namespace dart
+
+#endif  // BIN_IO_SERVICE_NO_SSL_H_
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 5c36f41..4e2b24a 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -686,6 +686,10 @@
   result = Dart_RunLoop();
   CHECK_RESULT(result);
 
+  if (isolate_data->load_async_id >= 0) {
+    Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
+  }
+
   Platform::SetPackageRoot(package_root);
 
   DartUtils::SetupIOLibrary(script_uri);
@@ -1029,7 +1033,7 @@
   }
 
   // Initialize the Dart VM.
-  if (!Dart_Initialize(vm_isolate_snapshot_buffer,
+  if (!Dart_Initialize(vm_isolate_snapshot_buffer, NULL,
                        CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate,
                        DartUtils::OpenFile,
                        DartUtils::ReadFile,
diff --git a/runtime/bin/net/README-updating b/runtime/bin/net/README-updating
deleted file mode 100644
index 9b0375e..0000000
--- a/runtime/bin/net/README-updating
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-The standalone Dart executable uses the NSS library from Mozilla to
-support secure networking connections (SSL and TLS).  It uses a copy
-of the library from the Chromium repository, that includes patches
-added by Chromium.  We pin this to a fixed revision, using the
-nss_revision variable in all the DEPS files in the deps directory of
-the Dart repository.
-
-This revision should be updated when new security fixes are added to
-NSS, or every few months.  The .gyp files in this directory are copies
-of the .gyp files in the Chromium copy of NSS, with changes made to
-account for the configurations and directory structure of the Dart
-repository.  Differences between the Chromium versions and the Dart
-versions should be annotated with "# Added by Dart'.
-
-All the files should have a comment saying where the original file is
-in the Chromium repository. To update these files, look at the diff
-between the two revisions in Chromium, and apply the changes manually,
-with any needed modifications, to the Dart copies.  Our aim is to keep
-the difference between the Chromium and Dart copies as small as
-possible.
-
-The nss_memio.cc and nss_memio.h files are also taken from Chromium,
-and should be updated at the same time.  The os_Linux.s file is new,
-and should not need changing.
-
-The file nss.gyp includes support for disabling compilation of NSS
-using the variable dart_io_support, when building configurations that
-don't use it.  NSS compilation is disabled when building Dartium,
-because Chromium includes its own copy, and the build process would
-get confused.
diff --git a/runtime/bin/net/nss.gyp b/runtime/bin/net/nss.gyp
deleted file mode 100644
index eb1c726..0000000
--- a/runtime/bin/net/nss.gyp
+++ /dev/null
@@ -1,1400 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file is a modified copy of Chromium's deps/third_party/nss/nss.gyp.
-# Revision 291806 (this should agree with "nss_rev" in DEPS).
-{
-  # Added by Dart. All Dart comments refer to the following block or line.
-  'includes': [
-    '../../tools/gyp/runtime-configurations.gypi',
-    '../../tools/gyp/nss_configurations.gypi',
-  ],
-  'variables': {
-    # Added by Dart.
-    'nss_directory': '../../../third_party/nss',
-    'conditions': [
-      ['OS=="ios"', {
-        'exclude_nss_root_certs%': 0,
-        'exclude_nss_libpkix%': 0,
-      }, {
-        'exclude_nss_root_certs%': 1,
-        'exclude_nss_libpkix%': 1,
-      }],
-    ],
-  },
-  'target_defaults': {
-    'configurations': {
-      'Debug': {
-        'defines': [
-          'DEBUG',
-          '_DEBUG',
-        ],
-      },
-      'Release': {
-        'defines': [
-          'NDEBUG',
-        ],
-      },
-      # Added by Dart.
-      'Dart_ia32_Base': {
-        'defines': [
-          'NSS_X86_OR_X64',
-          'NSS_X86',
-          '_X86_',
-        ],
-      },
-      # Added by Dart.
-      'Dart_x64_Base': {
-        'defines': [
-          'NSS_X86_OR_X64',
-          'NSS_X64',
-          'NSS_USE_64',
-        ],
-      },
-      # Added by Dart.
-      'Dart_simarm64_Base': {
-        'defines': [
-          'NSS_X86_OR_X64',
-          'NSS_X64',
-          'NSS_USE_64',
-        ],
-      },
-      'Dart_arm64_Base': {
-        'defines': [
-          'NSS_USE_64',
-        ],
-      },
-    },
-    'conditions': [
-      ['OS=="win"', {
-        'configurations': {
-          'Common_Base': {
-            'msvs_configuration_attributes': {
-              # Do not compile NSPR and NSS with /D _UNICODE /D UNICODE.
-              'CharacterSet': '0'
-            }
-          },
-          # Added by Dart. All target_arch specific defines are taken
-          # from below.
-          'Dart_ia32_Base': {
-            'defines': [
-              'NSS_X86_OR_X64',
-              'NSS_X86',
-              '_X86_',
-              'MP_ASSEMBLY_MULTIPLY',
-              'MP_ASSEMBLY_SQUARE',
-              'MP_ASSEMBLY_DIV_2DX1D',
-              'MP_USE_UINT_DIGIT',
-              'MP_NO_MP_WORD',
-            ],
-          },
-          'Dart_x64_Base': {
-            'defines': [
-              'NSS_USE_64',
-              'NSS_X86_OR_X64',
-              'NSS_X64',
-              '_AMD64_',
-              'MP_CHAR_STORE_SLOW',
-              'MP_IS_LITTLE_ENDIAN',
-              'WIN64',
-            ],
-          },
-        },
-        'defines!': [
-          'WIN32_LEAN_AND_MEAN',
-        ],
-      }],
-    ],
-  },
-  # Added by Dart.  We do not indent, so diffs with the original are clearer.
-  'conditions': [[ 'dart_io_support==1', {
-  'targets': [
-    {
-      'target_name': 'nspr_dart',  # Added by Dart (the _dart postfix)
-      'product_name': 'crnspr',
-      'type': '<(component)',
-      'toolsets':['host','target'],
-      # Changed by Dart: '<(nss_directory)/' added to all paths.
-      'sources': [
-        # Added by Dart.
-        'os_linux.S',
-        '<(nss_directory)/nspr/lib/ds/plarena.c',
-        '<(nss_directory)/nspr/lib/ds/plarena.h',
-        '<(nss_directory)/nspr/lib/ds/plarenas.h',
-        '<(nss_directory)/nspr/lib/ds/plhash.c',
-        '<(nss_directory)/nspr/lib/ds/plhash.h',
-        '<(nss_directory)/nspr/lib/libc/include/plbase64.h',
-        '<(nss_directory)/nspr/lib/libc/include/plerror.h',
-        '<(nss_directory)/nspr/lib/libc/include/plgetopt.h',
-        '<(nss_directory)/nspr/lib/libc/include/plstr.h',
-        '<(nss_directory)/nspr/lib/libc/src/base64.c',
-        '<(nss_directory)/nspr/lib/libc/src/plerror.c',
-        '<(nss_directory)/nspr/lib/libc/src/plgetopt.c',
-        '<(nss_directory)/nspr/lib/libc/src/strcase.c',
-        '<(nss_directory)/nspr/lib/libc/src/strcat.c',
-        '<(nss_directory)/nspr/lib/libc/src/strchr.c',
-        '<(nss_directory)/nspr/lib/libc/src/strcmp.c',
-        '<(nss_directory)/nspr/lib/libc/src/strcpy.c',
-        '<(nss_directory)/nspr/lib/libc/src/strdup.c',
-        '<(nss_directory)/nspr/lib/libc/src/strlen.c',
-        '<(nss_directory)/nspr/lib/libc/src/strpbrk.c',
-        '<(nss_directory)/nspr/lib/libc/src/strstr.c',
-        '<(nss_directory)/nspr/lib/libc/src/strtok.c',
-        '<(nss_directory)/nspr/pr/include/md/prosdep.h',
-        '<(nss_directory)/nspr/pr/include/md/_darwin.cfg',
-        '<(nss_directory)/nspr/pr/include/md/_darwin.h',
-        # Added by Dart.
-        '<(nss_directory)/nspr/pr/include/md/_linux.cfg',
-        # Added by Dart.
-        '<(nss_directory)/nspr/pr/include/md/_linux.h',
-        '<(nss_directory)/nspr/pr/include/md/_pcos.h',
-        '<(nss_directory)/nspr/pr/include/md/_pth.h',
-        '<(nss_directory)/nspr/pr/include/md/_unixos.h',
-        '<(nss_directory)/nspr/pr/include/md/_unix_errors.h',
-        '<(nss_directory)/nspr/pr/include/md/_win32_errors.h',
-        '<(nss_directory)/nspr/pr/include/md/_win95.cfg',
-        '<(nss_directory)/nspr/pr/include/md/_win95.h',
-        '<(nss_directory)/nspr/pr/include/nspr.h',
-        '<(nss_directory)/nspr/pr/include/obsolete/pralarm.h',
-        '<(nss_directory)/nspr/pr/include/obsolete/probslet.h',
-        '<(nss_directory)/nspr/pr/include/obsolete/protypes.h',
-        '<(nss_directory)/nspr/pr/include/obsolete/prsem.h',
-        '<(nss_directory)/nspr/pr/include/pratom.h',
-        '<(nss_directory)/nspr/pr/include/prbit.h',
-        '<(nss_directory)/nspr/pr/include/prclist.h',
-        '<(nss_directory)/nspr/pr/include/prcmon.h',
-        '<(nss_directory)/nspr/pr/include/prcountr.h',
-        '<(nss_directory)/nspr/pr/include/prcpucfg.h',
-        '<(nss_directory)/nspr/pr/include/prcvar.h',
-        '<(nss_directory)/nspr/pr/include/prdtoa.h',
-        '<(nss_directory)/nspr/pr/include/prenv.h',
-        '<(nss_directory)/nspr/pr/include/prerr.h',
-        '<(nss_directory)/nspr/pr/include/prerror.h',
-        '<(nss_directory)/nspr/pr/include/prinet.h',
-        '<(nss_directory)/nspr/pr/include/prinit.h',
-        '<(nss_directory)/nspr/pr/include/prinrval.h',
-        '<(nss_directory)/nspr/pr/include/prio.h',
-        '<(nss_directory)/nspr/pr/include/pripcsem.h',
-        '<(nss_directory)/nspr/pr/include/private/pprio.h',
-        '<(nss_directory)/nspr/pr/include/private/pprmwait.h',
-        '<(nss_directory)/nspr/pr/include/private/pprthred.h',
-        '<(nss_directory)/nspr/pr/include/private/primpl.h',
-        '<(nss_directory)/nspr/pr/include/private/prpriv.h',
-        '<(nss_directory)/nspr/pr/include/prlink.h',
-        '<(nss_directory)/nspr/pr/include/prlock.h',
-        '<(nss_directory)/nspr/pr/include/prlog.h',
-        '<(nss_directory)/nspr/pr/include/prlong.h',
-        '<(nss_directory)/nspr/pr/include/prmem.h',
-        '<(nss_directory)/nspr/pr/include/prmon.h',
-        '<(nss_directory)/nspr/pr/include/prmwait.h',
-        '<(nss_directory)/nspr/pr/include/prnetdb.h',
-        '<(nss_directory)/nspr/pr/include/prolock.h',
-        '<(nss_directory)/nspr/pr/include/prpdce.h',
-        '<(nss_directory)/nspr/pr/include/prprf.h',
-        '<(nss_directory)/nspr/pr/include/prproces.h',
-        '<(nss_directory)/nspr/pr/include/prrng.h',
-        '<(nss_directory)/nspr/pr/include/prrwlock.h',
-        '<(nss_directory)/nspr/pr/include/prshm.h',
-        '<(nss_directory)/nspr/pr/include/prshma.h',
-        '<(nss_directory)/nspr/pr/include/prsystem.h',
-        '<(nss_directory)/nspr/pr/include/prthread.h',
-        '<(nss_directory)/nspr/pr/include/prtime.h',
-        '<(nss_directory)/nspr/pr/include/prtpool.h',
-        '<(nss_directory)/nspr/pr/include/prtrace.h',
-        '<(nss_directory)/nspr/pr/include/prtypes.h',
-        '<(nss_directory)/nspr/pr/include/prvrsion.h',
-        '<(nss_directory)/nspr/pr/include/prwin16.h',
-        '<(nss_directory)/nspr/pr/src/io/prdir.c',
-        '<(nss_directory)/nspr/pr/src/io/prfdcach.c',
-        '<(nss_directory)/nspr/pr/src/io/prfile.c',
-        '<(nss_directory)/nspr/pr/src/io/prio.c',
-        '<(nss_directory)/nspr/pr/src/io/priometh.c',
-        '<(nss_directory)/nspr/pr/src/io/pripv6.c',
-        '<(nss_directory)/nspr/pr/src/io/prlayer.c',
-        '<(nss_directory)/nspr/pr/src/io/prlog.c',
-        '<(nss_directory)/nspr/pr/src/io/prmapopt.c',
-        '<(nss_directory)/nspr/pr/src/io/prmmap.c',
-        '<(nss_directory)/nspr/pr/src/io/prmwait.c',
-        '<(nss_directory)/nspr/pr/src/io/prpolevt.c',
-        '<(nss_directory)/nspr/pr/src/io/prprf.c',
-        '<(nss_directory)/nspr/pr/src/io/prscanf.c',
-        '<(nss_directory)/nspr/pr/src/io/prsocket.c',
-        '<(nss_directory)/nspr/pr/src/io/prstdio.c',
-        '<(nss_directory)/nspr/pr/src/linking/prlink.c',
-        '<(nss_directory)/nspr/pr/src/malloc/prmalloc.c',
-        '<(nss_directory)/nspr/pr/src/malloc/prmem.c',
-        '<(nss_directory)/nspr/pr/src/md/prosdep.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/darwin.c',
-        # Added by Dart.
-        '<(nss_directory)/nspr/pr/src/md/unix/linux.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin.s',
-        '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86.s',
-        '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86_64.s',
-        # Added by Dart.
-        '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86.s',
-        # Added by Dart.
-        '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86_64.s',
-        '<(nss_directory)/nspr/pr/src/md/unix/unix.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/unix_errors.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/uxproces.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/uxrng.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/uxshm.c',
-        '<(nss_directory)/nspr/pr/src/md/unix/uxwrap.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/ntgc.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/ntinrval.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/ntmisc.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/ntsec.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/ntsem.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w32ipcsem.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w32poll.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w32rng.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w32shm.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w95cv.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w95dllmain.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w95io.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w95sock.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/w95thred.c',
-        '<(nss_directory)/nspr/pr/src/md/windows/win32_errors.c',
-        '<(nss_directory)/nspr/pr/src/memory/prseg.c',
-        '<(nss_directory)/nspr/pr/src/memory/prshm.c',
-        '<(nss_directory)/nspr/pr/src/memory/prshma.c',
-        '<(nss_directory)/nspr/pr/src/misc/pralarm.c',
-        '<(nss_directory)/nspr/pr/src/misc/pratom.c',
-        '<(nss_directory)/nspr/pr/src/misc/praton.c',
-        '<(nss_directory)/nspr/pr/src/misc/prcountr.c',
-        '<(nss_directory)/nspr/pr/src/misc/prdtoa.c',
-        '<(nss_directory)/nspr/pr/src/misc/prenv.c',
-        '<(nss_directory)/nspr/pr/src/misc/prerr.c',
-        '<(nss_directory)/nspr/pr/src/misc/prerror.c',
-        '<(nss_directory)/nspr/pr/src/misc/prerrortable.c',
-        '<(nss_directory)/nspr/pr/src/misc/prinit.c',
-        '<(nss_directory)/nspr/pr/src/misc/prinrval.c',
-        '<(nss_directory)/nspr/pr/src/misc/pripc.c',
-        '<(nss_directory)/nspr/pr/src/misc/pripcsem.c',
-        '<(nss_directory)/nspr/pr/src/misc/prlog2.c',
-        '<(nss_directory)/nspr/pr/src/misc/prlong.c',
-        '<(nss_directory)/nspr/pr/src/misc/prnetdb.c',
-        '<(nss_directory)/nspr/pr/src/misc/prolock.c',
-        '<(nss_directory)/nspr/pr/src/misc/prrng.c',
-        '<(nss_directory)/nspr/pr/src/misc/prsystem.c',
-        '<(nss_directory)/nspr/pr/src/misc/prthinfo.c',
-        '<(nss_directory)/nspr/pr/src/misc/prtime.c',
-        '<(nss_directory)/nspr/pr/src/misc/prtpool.c',
-        '<(nss_directory)/nspr/pr/src/misc/prtrace.c',
-        '<(nss_directory)/nspr/pr/src/pthreads/ptio.c',
-        '<(nss_directory)/nspr/pr/src/pthreads/ptmisc.c',
-        '<(nss_directory)/nspr/pr/src/pthreads/ptsynch.c',
-        '<(nss_directory)/nspr/pr/src/pthreads/ptthread.c',
-        '<(nss_directory)/nspr/pr/src/threads/combined/prucpu.c',
-        '<(nss_directory)/nspr/pr/src/threads/combined/prucv.c',
-        '<(nss_directory)/nspr/pr/src/threads/combined/prulock.c',
-        '<(nss_directory)/nspr/pr/src/threads/combined/prustack.c',
-        '<(nss_directory)/nspr/pr/src/threads/combined/pruthr.c',
-        '<(nss_directory)/nspr/pr/src/threads/prcmon.c',
-        '<(nss_directory)/nspr/pr/src/threads/prcthr.c',
-        '<(nss_directory)/nspr/pr/src/threads/prdump.c',
-        '<(nss_directory)/nspr/pr/src/threads/prmon.c',
-        '<(nss_directory)/nspr/pr/src/threads/prrwlock.c',
-        '<(nss_directory)/nspr/pr/src/threads/prsem.c',
-        '<(nss_directory)/nspr/pr/src/threads/prtpd.c',
-      ],
-      'defines': [
-        '_NSPR_BUILD_',
-        'FORCE_PR_LOG',
-      ],
-      'include_dirs': [
-        '<(nss_directory)/nspr/pr/include',
-        '<(nss_directory)/nspr/pr/include/private',
-        '<(nss_directory)/nspr/lib/ds',
-        '<(nss_directory)/nspr/lib/libc/include',
-      ],
-      'direct_dependent_settings': {
-        'defines': [
-          'NO_NSPR_10_SUPPORT',
-        ],
-        'include_dirs': [
-          '<(nss_directory)/nspr/pr/include',
-          '<(nss_directory)/nspr/lib/ds',
-          '<(nss_directory)/nspr/lib/libc/include',
-        ],
-      },
-      # TODO(wtc): suppress C4244 and C4554 in prdtoa.c.
-      'msvs_disabled_warnings': [4018, 4244, 4554, 4267,],
-      'variables': {
-        'clang_warning_flags': [
-          # nspr passes "const char*" through "void*".
-          '-Wno-incompatible-pointer-types',
-          # nspr passes "int*" through "unsigned int*".
-          '-Wno-pointer-sign',
-        ],
-      },
-      'conditions': [
-        ['OS=="mac" or OS=="ios"', {
-          'defines': [
-            'XP_UNIX',
-            'DARWIN',
-            'XP_MACOSX',
-            '_PR_PTHREADS',
-            'HAVE_BSD_FLOCK',
-            'HAVE_CRT_EXTERNS_H',
-            'HAVE_DLADDR',
-            'HAVE_LCHOWN',
-            'HAVE_SOCKLEN_T',
-            'HAVE_STRERROR',
-          ],
-          # Changed by Dart:
-          # nss_directory contains .., which is bad in a regular expression.
-          # So we use the partial match by dropping '^' from '^nspr/...
-          'sources/': [
-            ['exclude', 'nspr/pr/src/md/windows/'],
-            ['exclude', 'nspr/pr/src/threads/combined/'],
-          ],
-          'sources!': [
-            # Added by Dart.
-            'os_linux.S',
-            '<(nss_directory)/nspr/pr/src/io/prdir.c',
-            '<(nss_directory)/nspr/pr/src/io/prfile.c',
-            '<(nss_directory)/nspr/pr/src/io/prio.c',
-            '<(nss_directory)/nspr/pr/src/io/prsocket.c',
-            # os_Darwin_x86.s and os_Darwin_x86_64.s are included by
-            # os_Darwin.s.
-            # Added by Dart.
-            '<(nss_directory)/nspr/pr/src/md/unix/linux.c',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86.s',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86_64.s',
-            # Added by Dart.
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86.s',
-            # Added by Dart.
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86_64.s',
-            '<(nss_directory)/nspr/pr/src/misc/pripcsem.c',
-            '<(nss_directory)/nspr/pr/src/threads/prcthr.c',
-            '<(nss_directory)/nspr/pr/src/threads/prdump.c',
-            '<(nss_directory)/nspr/pr/src/threads/prmon.c',
-            '<(nss_directory)/nspr/pr/src/threads/prsem.c',
-          ],
-        }],
-        # Added by Dart.
-        ['OS=="linux"', {
-          'defines': [
-            'HAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1',
-            'HAVE_VISIBILITY_PRAGMA=1',
-            'XP_UNIX=1',
-            '_GNU_SOURCE=1',
-            'HAVE_FCNTL_FILE_LOCKING=1',
-            'LINUX=1',
-            'i386=1',
-            'HAVE_LCHOWN=1',
-            'HAVE_STRERROR=1',
-            'HAVE_DLADDR=1',
-            'HAVE_SETPRIORITY=1',
-            'HAVE_SYSCALL=1',
-            '_REENTRANT=1',
-             'FORCE_PR_LOG',
-            '_PR_PTHREADS',
-            '_NSPR_BUILD_',
-          ],
-          'sources/': [
-            ['exclude', 'nspr/pr/src/md/windows/'],
-            ['exclude', 'nspr/pr/src/threads/combined/'],
-          ],
-          'sources!': [
-            '<(nss_directory)/nspr/pr/src/md/unix/darwin.c',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin.s',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86.s',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Darwin_x86_64.s',
-            # os_Linux_x86.s and os_Linux_x86_64.s are included by
-            # runtime/bin/net/os_Linux.S.
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86.s',
-            '<(nss_directory)/nspr/pr/src/md/unix/os_Linux_x86_64.s',
-            '<(nss_directory)/nspr/pr/src/misc/pripcsem.c',
-            '<(nss_directory)/nspr/pr/src/threads/prcthr.c',
-            '<(nss_directory)/nspr/pr/src/threads/prdump.c',
-            '<(nss_directory)/nspr/pr/src/threads/prmon.c',
-            '<(nss_directory)/nspr/pr/src/threads/prsem.c',
-            '<(nss_directory)/nspr/pr/src/io/prdir.c',
-            '<(nss_directory)/nspr/pr/src/io/prfile.c',
-            '<(nss_directory)/nspr/pr/src/io/prio.c',
-            '<(nss_directory)/nspr/pr/src/io/prsocket.c',
-          ],
-        }],
-        ['OS=="mac"', {
-          'link_settings': {
-            'libraries': [
-              '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
-              '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
-            ],
-          },
-        }],
-        ['OS=="ios"', {
-          'defines!': [
-            'HAVE_CRT_EXTERNS_H',
-          ],
-        }],
-        ['OS=="win"', {
-          'defines': [
-            'XP_PC',
-            'WIN32',
-            'WIN95',
-            '_PR_GLOBAL_THREADS_ONLY',
-            '_CRT_SECURE_NO_WARNINGS',
-            '_CRT_NONSTDC_NO_WARNINGS',
-          ],
-          'sources!': [
-            # Added by Dart.
-            'os_linux.S',
-          ],
-          # Changed by Dart:
-          # nss_directory contains .., which is bad in a regular expression.
-          # So we use the partial match by dropping '^' from '^nspr/...
-          'sources/': [
-            ['exclude', 'nspr/pr/src/md/unix/'],
-            ['exclude', 'nspr/pr/src/pthreads/'],
-          ],
-          # Changed by Dart. We don't use target_arch.
-          # 'conditions': [
-          #  ['target_arch=="ia32"', {
-          #    'defines': [
-          #      '_X86_',
-          #    ],
-          #  }],
-          # ],
-        }],
-        ['component == "static_library"', {
-          'defines': [
-            'NSPR_STATIC',
-          ],
-          'direct_dependent_settings': {
-            'defines': [
-              'NSPR_STATIC',
-            ],
-          },
-        }],
-        ['clang==1', {
-          'xcode_settings': {
-            'WARNING_CFLAGS': [
-              # nspr uses a bunch of deprecated functions (NSLinkModule etc) in
-              # prlink.c on mac.
-              '-Wno-deprecated-declarations',
-            ],
-          },
-        }],
-      ],
-    },
-    {
-      'target_name': 'nss_dart',  # Added by Dart (the _dart postfix)
-      'product_name': 'crnss',
-      'type': '<(component)',
-      'toolsets':['host','target'],
-      'dependencies': [
-        'nss_static_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'export_dependent_settings': [
-        'nss_static_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'sources': [
-        # Ensure at least one object file is produced, so that MSVC does not
-        # warn when creating the static/shared library. See the note for
-        # the 'nssckbi' target for why the 'nss' target was split as such.
-        '<(nss_directory)/nss/lib/nss/nssver.c',
-      ],
-      'conditions': [
-        ['exclude_nss_root_certs==0', {
-          'dependencies': [
-            'nssckbi_dart',  # Added by Dart (the _dart postfix)
-          ],
-          'export_dependent_settings': [
-            'nssckbi_dart',  # Added by Dart (the _dart postfix)
-          ],
-        }],
-        ['OS == "mac" and component == "shared_library"', {
-          'xcode_settings': {
-            'OTHER_LDFLAGS': ['-all_load'],
-          },
-        }],
-        ['OS == "win" and component == "shared_library"', {
-          'sources': [
-            '<(nss_directory)/nss/exports_win.def',
-          ],
-        }],
-      ],
-    },
-    {
-      # This is really more of a pseudo-target to work around the fact that
-      # a single static_library target cannot contain two object files of the
-      # same name (hash.o / hash.obj). Logically, this is part of the
-      # 'nss_static' target. By separating it out, it creates a possible
-      # circular dependency between 'nss_static' and 'nssckbi' when
-      # 'exclude_nss_root_certs' is not specified, as 'nss_static' depends on
-      # the 'builtinsC_GetFunctionList' exported by this target. This is an
-      # artifact of how NSS is being statically built, which is not an
-      # officially supported configuration - normally, 'nssckbi.dll/so' would
-      # depend on libnss3.dll/so, and the higher layer caller would instruct
-      # libnss3.dll to dynamically load nssckbi.dll, breaking the circle.
-      #
-      # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency
-      # without requiring nssckbi to be built as a shared library.
-      'target_name': 'nssckbi_dart',  # Added by Dart (the _dart postfix)
-      'product_name': 'crnssckbi',
-      'type': 'static_library',
-      'toolsets':['host','target'],
-      # This target is an implementation detail - the public dependencies
-      # should be on 'nss'.
-      'suppress_wildcard': 1,
-      'sources': [
-        '<(nss_directory)/nss/lib/ckfw/builtins/anchor.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/bfind.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/binst.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/bobject.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/bsession.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/bslot.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/btoken.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/builtins.h',
-        '<(nss_directory)/nss/lib/ckfw/builtins/certdata.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/ckbiver.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/constants.c',
-        '<(nss_directory)/nss/lib/ckfw/builtins/nssckbi.h',
-        '<(nss_directory)/nss/lib/ckfw/ck.h',
-        '<(nss_directory)/nss/lib/ckfw/ckfw.h',
-        '<(nss_directory)/nss/lib/ckfw/ckfwm.h',
-        '<(nss_directory)/nss/lib/ckfw/ckfwtm.h',
-        '<(nss_directory)/nss/lib/ckfw/ckmd.h',
-        '<(nss_directory)/nss/lib/ckfw/ckt.h',
-        '<(nss_directory)/nss/lib/ckfw/crypto.c',
-        '<(nss_directory)/nss/lib/ckfw/find.c',
-        '<(nss_directory)/nss/lib/ckfw/hash.c',
-        '<(nss_directory)/nss/lib/ckfw/instance.c',
-        '<(nss_directory)/nss/lib/ckfw/mechanism.c',
-        '<(nss_directory)/nss/lib/ckfw/mutex.c',
-        '<(nss_directory)/nss/lib/ckfw/nssck.api',
-        '<(nss_directory)/nss/lib/ckfw/nssckepv.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckft.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckfw.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckfwc.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckfwt.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckg.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckmdt.h',
-        '<(nss_directory)/nss/lib/ckfw/nssckt.h',
-        '<(nss_directory)/nss/lib/ckfw/object.c',
-        '<(nss_directory)/nss/lib/ckfw/session.c',
-        '<(nss_directory)/nss/lib/ckfw/sessobj.c',
-        '<(nss_directory)/nss/lib/ckfw/slot.c',
-        '<(nss_directory)/nss/lib/ckfw/token.c',
-        '<(nss_directory)/nss/lib/ckfw/wrap.c',
-      ],
-      'dependencies': [
-        'nss_static_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'export_dependent_settings': [
-        'nss_static_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'include_dirs': [
-        '<(nss_directory)/nss/lib/ckfw',
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(nss_directory)/nss/lib/ckfw/builtins',
-        ],
-      },
-    },
-    # Removed by Dart: the target nss_static_avx_dart.
-    # This is an optimization of AES on 32 bit Windows using new
-    # Intel assembly instructions.  Not enabling it on Dart.
-    {
-      'target_name': 'nss_static_dart',  # Added by Dart (the _dart postfix)
-      'type': 'static_library',
-      'toolsets':['host','target'],
-      # This target is an implementation detail - the public dependencies
-      # should be on 'nss'.
-      'suppress_wildcard': 1,
-      'sources': [
-        'os_windows.c',
-        '<(nss_directory)/nss/lib/base/arena.c',
-        '<(nss_directory)/nss/lib/base/base.h',
-        '<(nss_directory)/nss/lib/base/baset.h',
-        '<(nss_directory)/nss/lib/base/error.c',
-        '<(nss_directory)/nss/lib/base/errorval.c',
-        '<(nss_directory)/nss/lib/base/hash.c',
-        '<(nss_directory)/nss/lib/base/hashops.c',
-        '<(nss_directory)/nss/lib/base/item.c',
-        '<(nss_directory)/nss/lib/base/libc.c',
-        '<(nss_directory)/nss/lib/base/list.c',
-        '<(nss_directory)/nss/lib/base/nssbase.h',
-        '<(nss_directory)/nss/lib/base/nssbaset.h',
-        '<(nss_directory)/nss/lib/base/nssutf8.c',
-        '<(nss_directory)/nss/lib/base/tracker.c',
-        '<(nss_directory)/nss/lib/certdb/alg1485.c',
-        '<(nss_directory)/nss/lib/certdb/cert.h',
-        '<(nss_directory)/nss/lib/certdb/certdb.c',
-        '<(nss_directory)/nss/lib/certdb/certdb.h',
-        '<(nss_directory)/nss/lib/certdb/certi.h',
-        '<(nss_directory)/nss/lib/certdb/certt.h',
-        '<(nss_directory)/nss/lib/certdb/certv3.c',
-        '<(nss_directory)/nss/lib/certdb/certxutl.c',
-        '<(nss_directory)/nss/lib/certdb/certxutl.h',
-        '<(nss_directory)/nss/lib/certdb/crl.c',
-        '<(nss_directory)/nss/lib/certdb/genname.c',
-        '<(nss_directory)/nss/lib/certdb/genname.h',
-        '<(nss_directory)/nss/lib/certdb/polcyxtn.c',
-        '<(nss_directory)/nss/lib/certdb/secname.c',
-        '<(nss_directory)/nss/lib/certdb/stanpcertdb.c',
-        '<(nss_directory)/nss/lib/certdb/xauthkid.c',
-        '<(nss_directory)/nss/lib/certdb/xbsconst.c',
-        '<(nss_directory)/nss/lib/certdb/xconst.c',
-        '<(nss_directory)/nss/lib/certdb/xconst.h',
-        '<(nss_directory)/nss/lib/certhigh/certhigh.c',
-        '<(nss_directory)/nss/lib/certhigh/certhtml.c',
-        '<(nss_directory)/nss/lib/certhigh/certreq.c',
-        '<(nss_directory)/nss/lib/certhigh/certvfy.c',
-        '<(nss_directory)/nss/lib/certhigh/certvfypkix.c',
-        '<(nss_directory)/nss/lib/certhigh/certvfypkixprint.c',
-        '<(nss_directory)/nss/lib/certhigh/crlv2.c',
-        '<(nss_directory)/nss/lib/certhigh/ocsp.c',
-        '<(nss_directory)/nss/lib/certhigh/ocsp.h',
-        '<(nss_directory)/nss/lib/certhigh/ocspi.h',
-        '<(nss_directory)/nss/lib/certhigh/ocspt.h',
-        '<(nss_directory)/nss/lib/certhigh/ocspti.h',
-        '<(nss_directory)/nss/lib/certhigh/xcrldist.c',
-        '<(nss_directory)/nss/lib/cryptohi/cryptohi.h',
-        '<(nss_directory)/nss/lib/cryptohi/cryptoht.h',
-        '<(nss_directory)/nss/lib/cryptohi/dsautil.c',
-        '<(nss_directory)/nss/lib/cryptohi/key.h',
-        '<(nss_directory)/nss/lib/cryptohi/keyhi.h',
-        '<(nss_directory)/nss/lib/cryptohi/keyi.h',
-        '<(nss_directory)/nss/lib/cryptohi/keyt.h',
-        '<(nss_directory)/nss/lib/cryptohi/keythi.h',
-        '<(nss_directory)/nss/lib/cryptohi/sechash.c',
-        '<(nss_directory)/nss/lib/cryptohi/sechash.h',
-        '<(nss_directory)/nss/lib/cryptohi/seckey.c',
-        '<(nss_directory)/nss/lib/cryptohi/secsign.c',
-        '<(nss_directory)/nss/lib/cryptohi/secvfy.c',
-        '<(nss_directory)/nss/lib/dev/ckhelper.c',
-        '<(nss_directory)/nss/lib/dev/ckhelper.h',
-        '<(nss_directory)/nss/lib/dev/dev.h',
-        '<(nss_directory)/nss/lib/dev/devm.h',
-        '<(nss_directory)/nss/lib/dev/devslot.c',
-        '<(nss_directory)/nss/lib/dev/devt.h',
-        '<(nss_directory)/nss/lib/dev/devtm.h',
-        '<(nss_directory)/nss/lib/dev/devtoken.c',
-        '<(nss_directory)/nss/lib/dev/devutil.c',
-        '<(nss_directory)/nss/lib/dev/nssdev.h',
-        '<(nss_directory)/nss/lib/dev/nssdevt.h',
-        '<(nss_directory)/nss/lib/freebl/aeskeywrap.c',
-        '<(nss_directory)/nss/lib/freebl/alg2268.c',
-        '<(nss_directory)/nss/lib/freebl/alghmac.c',
-        '<(nss_directory)/nss/lib/freebl/alghmac.h',
-        '<(nss_directory)/nss/lib/freebl/arcfive.c',
-        '<(nss_directory)/nss/lib/freebl/arcfour.c',
-        '<(nss_directory)/nss/lib/freebl/blapi.h',
-        '<(nss_directory)/nss/lib/freebl/blapii.h',
-        '<(nss_directory)/nss/lib/freebl/blapit.h',
-        '<(nss_directory)/nss/lib/freebl/camellia.c',
-        '<(nss_directory)/nss/lib/freebl/camellia.h',
-        '<(nss_directory)/nss/lib/freebl/chacha20/chacha20.c',
-        '<(nss_directory)/nss/lib/freebl/chacha20/chacha20.h',
-        '<(nss_directory)/nss/lib/freebl/chacha20/chacha20_vec.c',
-        '<(nss_directory)/nss/lib/freebl/chacha20poly1305.c',
-        '<(nss_directory)/nss/lib/freebl/chacha20poly1305.h',
-        '<(nss_directory)/nss/lib/freebl/ctr.c',
-        '<(nss_directory)/nss/lib/freebl/ctr.h',
-        '<(nss_directory)/nss/lib/freebl/cts.c',
-        '<(nss_directory)/nss/lib/freebl/cts.h',
-        '<(nss_directory)/nss/lib/freebl/des.c',
-        '<(nss_directory)/nss/lib/freebl/des.h',
-        '<(nss_directory)/nss/lib/freebl/desblapi.c',
-        '<(nss_directory)/nss/lib/freebl/dh.c',
-        '<(nss_directory)/nss/lib/freebl/drbg.c',
-        '<(nss_directory)/nss/lib/freebl/dsa.c',
-        '<(nss_directory)/nss/lib/freebl/ec.c',
-        '<(nss_directory)/nss/lib/freebl/ec.h',
-        '<(nss_directory)/nss/lib/freebl/ecdecode.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ec2.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl-curve.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl-exp.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl-priv.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl_curve.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl_gf.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecl_mult.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp.h',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_256.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_256_32.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_384.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_521.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_aff.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_jac.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_jm.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ecp_mont.c',
-        '<(nss_directory)/nss/lib/freebl/ecl/ec_naf.c',
-        '<(nss_directory)/nss/lib/freebl/gcm.c',
-        '<(nss_directory)/nss/lib/freebl/gcm.h',
-        # Changed by Dart: intel-aes assembly language files dropped.
-        '<(nss_directory)/nss/lib/freebl/hmacct.c',
-        '<(nss_directory)/nss/lib/freebl/hmacct.h',
-        '<(nss_directory)/nss/lib/freebl/jpake.c',
-        '<(nss_directory)/nss/lib/freebl/md2.c',
-        '<(nss_directory)/nss/lib/freebl/md5.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/logtab.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpcpucache.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi-config.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi-priv.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mplogic.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mplogic.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpmontg.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpprime.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mpprime.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mp_gf2m-priv.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/mp_gf2m.c',
-        '<(nss_directory)/nss/lib/freebl/mpi/mp_gf2m.h',
-        '<(nss_directory)/nss/lib/freebl/mpi/primes.c',
-        '<(nss_directory)/nss/lib/freebl/nss_build_config_mac.h',
-        '<(nss_directory)/nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c',
-        '<(nss_directory)/nss/lib/freebl/poly1305/poly1305.c',
-        '<(nss_directory)/nss/lib/freebl/poly1305/poly1305.h',
-        '<(nss_directory)/nss/lib/freebl/pqg.c',
-        '<(nss_directory)/nss/lib/freebl/pqg.h',
-        '<(nss_directory)/nss/lib/freebl/rawhash.c',
-        '<(nss_directory)/nss/lib/freebl/rijndael.c',
-        '<(nss_directory)/nss/lib/freebl/rijndael.h',
-        '<(nss_directory)/nss/lib/freebl/rijndael32.tab',
-        '<(nss_directory)/nss/lib/freebl/rsa.c',
-        '<(nss_directory)/nss/lib/freebl/rsapkcs.c',
-        '<(nss_directory)/nss/lib/freebl/secmpi.h',
-        '<(nss_directory)/nss/lib/freebl/secrng.h',
-        '<(nss_directory)/nss/lib/freebl/seed.c',
-        '<(nss_directory)/nss/lib/freebl/seed.h',
-        '<(nss_directory)/nss/lib/freebl/sha256.h',
-        '<(nss_directory)/nss/lib/freebl/sha512.c',
-        '<(nss_directory)/nss/lib/freebl/sha_fast.c',
-        '<(nss_directory)/nss/lib/freebl/sha_fast.h',
-        '<(nss_directory)/nss/lib/freebl/shsign.h',
-        '<(nss_directory)/nss/lib/freebl/shvfy.c',
-        '<(nss_directory)/nss/lib/freebl/sysrand.c',
-        '<(nss_directory)/nss/lib/freebl/tlsprfalg.c',
-        '<(nss_directory)/nss/lib/freebl/unix_rand.c',
-        '<(nss_directory)/nss/lib/freebl/win_rand.c',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_certsel.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_certstore.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_checker.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_crlsel.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_errorstrings.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_params.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_pl_pki.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_pl_system.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_results.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_revchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_sample_modules.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkix_util.h',
-        '<(nss_directory)/nss/lib/libpkix/include/pkixt.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/certsel/pkix_certselector.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/certsel/pkix_certselector.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_crlchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_crlchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_policychecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_policychecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_procparams.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_procparams.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_resourcelimits.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_resourcelimits.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_trustanchor.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_trustanchor.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_valparams.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params/pkix_valparams.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_buildresult.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_buildresult.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_policynode.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_policynode.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_valresult.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_valresult.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_verifynode.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results/pkix_verifynode.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/store/pkix_store.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/store/pkix_store.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_build.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_build.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_lifecycle.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_lifecycle.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_validate.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top/pkix_validate.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_error.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_error.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_errpaths.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_list.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_list.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_logger.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_logger.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_tools.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util/pkix_tools.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaptemplates.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h',
-        '<(nss_directory)/nss/lib/nss/nss.h',
-        '<(nss_directory)/nss/lib/nss/nssinit.c',
-        '<(nss_directory)/nss/lib/nss/nssrenam.h',
-        '<(nss_directory)/nss/lib/nss/utilwrap.c',
-        '<(nss_directory)/nss/lib/pk11wrap/debug_module.c',
-        '<(nss_directory)/nss/lib/pk11wrap/dev3hack.c',
-        '<(nss_directory)/nss/lib/pk11wrap/dev3hack.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11akey.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11auth.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11cert.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11cxt.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11err.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11func.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11kea.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11list.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11load.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11mech.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11merge.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11nobj.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11obj.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pars.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pbe.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pk12.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pqg.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pqg.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11priv.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11pub.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11sdr.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11sdr.h',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11skey.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11slot.c',
-        '<(nss_directory)/nss/lib/pk11wrap/pk11util.c',
-        '<(nss_directory)/nss/lib/pk11wrap/secmod.h',
-        '<(nss_directory)/nss/lib/pk11wrap/secmodi.h',
-        '<(nss_directory)/nss/lib/pk11wrap/secmodt.h',
-        '<(nss_directory)/nss/lib/pk11wrap/secmodti.h',
-        '<(nss_directory)/nss/lib/pk11wrap/secpkcs5.h',
-        '<(nss_directory)/nss/lib/pkcs7/certread.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7common.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7create.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7decode.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7encode.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7local.c',
-        '<(nss_directory)/nss/lib/pkcs7/p7local.h',
-        '<(nss_directory)/nss/lib/pkcs7/pkcs7t.h',
-        '<(nss_directory)/nss/lib/pkcs7/secmime.c',
-        '<(nss_directory)/nss/lib/pkcs7/secmime.h',
-        '<(nss_directory)/nss/lib/pkcs7/secpkcs7.h',
-        '<(nss_directory)/nss/lib/pki/asymmkey.c',
-        '<(nss_directory)/nss/lib/pki/certdecode.c',
-        '<(nss_directory)/nss/lib/pki/certificate.c',
-        '<(nss_directory)/nss/lib/pki/cryptocontext.c',
-        '<(nss_directory)/nss/lib/pki/nsspki.h',
-        '<(nss_directory)/nss/lib/pki/nsspkit.h',
-        '<(nss_directory)/nss/lib/pki/pki.h',
-        '<(nss_directory)/nss/lib/pki/pki3hack.c',
-        '<(nss_directory)/nss/lib/pki/pki3hack.h',
-        '<(nss_directory)/nss/lib/pki/pkibase.c',
-        '<(nss_directory)/nss/lib/pki/pkim.h',
-        '<(nss_directory)/nss/lib/pki/pkistore.c',
-        '<(nss_directory)/nss/lib/pki/pkistore.h',
-        '<(nss_directory)/nss/lib/pki/pkit.h',
-        '<(nss_directory)/nss/lib/pki/pkitm.h',
-        '<(nss_directory)/nss/lib/pki/symmkey.c',
-        '<(nss_directory)/nss/lib/pki/tdcache.c',
-        '<(nss_directory)/nss/lib/pki/trustdomain.c',
-        '<(nss_directory)/nss/lib/smime/cms.h',
-        '<(nss_directory)/nss/lib/smime/cmslocal.h',
-        '<(nss_directory)/nss/lib/smime/cmsreclist.h',
-        '<(nss_directory)/nss/lib/smime/cmst.h',
-        '<(nss_directory)/nss/lib/smime/smime.h',
-        '<(nss_directory)/nss/lib/softoken/fipsaudt.c',
-        '<(nss_directory)/nss/lib/softoken/fipstest.c',
-        '<(nss_directory)/nss/lib/softoken/fipstokn.c',
-        '<(nss_directory)/nss/lib/softoken/jpakesftk.c',
-        '<(nss_directory)/nss/lib/softoken/lgglue.c',
-        '<(nss_directory)/nss/lib/softoken/lgglue.h',
-        '<(nss_directory)/nss/lib/softoken/lowkey.c',
-        '<(nss_directory)/nss/lib/softoken/lowkeyi.h',
-        '<(nss_directory)/nss/lib/softoken/lowkeyti.h',
-        '<(nss_directory)/nss/lib/softoken/lowpbe.c',
-        '<(nss_directory)/nss/lib/softoken/lowpbe.h',
-        '<(nss_directory)/nss/lib/softoken/padbuf.c',
-        '<(nss_directory)/nss/lib/softoken/pkcs11.c',
-        '<(nss_directory)/nss/lib/softoken/pkcs11c.c',
-        '<(nss_directory)/nss/lib/softoken/pkcs11i.h',
-        '<(nss_directory)/nss/lib/softoken/pkcs11ni.h',
-        '<(nss_directory)/nss/lib/softoken/pkcs11u.c',
-        '<(nss_directory)/nss/lib/softoken/sdb.c',
-        '<(nss_directory)/nss/lib/softoken/sdb.h',
-        '<(nss_directory)/nss/lib/softoken/sftkdb.c',
-        '<(nss_directory)/nss/lib/softoken/sftkdb.h',
-        '<(nss_directory)/nss/lib/softoken/sftkdbt.h',
-        '<(nss_directory)/nss/lib/softoken/sftkdbti.h',
-        '<(nss_directory)/nss/lib/softoken/sftkhmac.c',
-        '<(nss_directory)/nss/lib/softoken/sftkpars.c',
-        '<(nss_directory)/nss/lib/softoken/sftkpars.h',
-        '<(nss_directory)/nss/lib/softoken/sftkpwd.c',
-        '<(nss_directory)/nss/lib/softoken/softkver.c',
-        '<(nss_directory)/nss/lib/softoken/softkver.h',
-        '<(nss_directory)/nss/lib/softoken/softoken.h',
-        '<(nss_directory)/nss/lib/softoken/softoknt.h',
-        '<(nss_directory)/nss/lib/softoken/tlsprf.c',
-        '<(nss_directory)/nss/lib/ssl/sslerr.h',
-        '<(nss_directory)/nss/lib/util/SECerrs.h',
-        '<(nss_directory)/nss/lib/util/base64.h',
-        '<(nss_directory)/nss/lib/util/ciferfam.h',
-        '<(nss_directory)/nss/lib/util/derdec.c',
-        '<(nss_directory)/nss/lib/util/derenc.c',
-        '<(nss_directory)/nss/lib/util/dersubr.c',
-        '<(nss_directory)/nss/lib/util/dertime.c',
-        '<(nss_directory)/nss/lib/util/errstrs.c',
-        '<(nss_directory)/nss/lib/util/hasht.h',
-        '<(nss_directory)/nss/lib/util/nssb64.h',
-        '<(nss_directory)/nss/lib/util/nssb64d.c',
-        '<(nss_directory)/nss/lib/util/nssb64e.c',
-        '<(nss_directory)/nss/lib/util/nssb64t.h',
-        '<(nss_directory)/nss/lib/util/nssilckt.h',
-        '<(nss_directory)/nss/lib/util/nssilock.c',
-        '<(nss_directory)/nss/lib/util/nssilock.h',
-        '<(nss_directory)/nss/lib/util/nsslocks.h',
-        '<(nss_directory)/nss/lib/util/nssrwlk.c',
-        '<(nss_directory)/nss/lib/util/nssrwlk.h',
-        '<(nss_directory)/nss/lib/util/nssrwlkt.h',
-        '<(nss_directory)/nss/lib/util/nssutil.h',
-        '<(nss_directory)/nss/lib/util/oidstring.c',
-        '<(nss_directory)/nss/lib/util/pkcs11.h',
-        '<(nss_directory)/nss/lib/util/pkcs11f.h',
-        '<(nss_directory)/nss/lib/util/pkcs11n.h',
-        '<(nss_directory)/nss/lib/util/pkcs11p.h',
-        '<(nss_directory)/nss/lib/util/pkcs11t.h',
-        '<(nss_directory)/nss/lib/util/pkcs11u.h',
-        '<(nss_directory)/nss/lib/util/pkcs1sig.c',
-        '<(nss_directory)/nss/lib/util/pkcs1sig.h',
-        '<(nss_directory)/nss/lib/util/portreg.c',
-        '<(nss_directory)/nss/lib/util/portreg.h',
-        '<(nss_directory)/nss/lib/util/quickder.c',
-        '<(nss_directory)/nss/lib/util/secalgid.c',
-        '<(nss_directory)/nss/lib/util/secasn1.h',
-        '<(nss_directory)/nss/lib/util/secasn1d.c',
-        '<(nss_directory)/nss/lib/util/secasn1e.c',
-        '<(nss_directory)/nss/lib/util/secasn1t.h',
-        '<(nss_directory)/nss/lib/util/secasn1u.c',
-        '<(nss_directory)/nss/lib/util/seccomon.h',
-        '<(nss_directory)/nss/lib/util/secder.h',
-        '<(nss_directory)/nss/lib/util/secdert.h',
-        '<(nss_directory)/nss/lib/util/secdig.c',
-        '<(nss_directory)/nss/lib/util/secdig.h',
-        '<(nss_directory)/nss/lib/util/secdigt.h',
-        '<(nss_directory)/nss/lib/util/secerr.h',
-        '<(nss_directory)/nss/lib/util/secitem.c',
-        '<(nss_directory)/nss/lib/util/secitem.h',
-        '<(nss_directory)/nss/lib/util/secoid.c',
-        '<(nss_directory)/nss/lib/util/secoid.h',
-        '<(nss_directory)/nss/lib/util/secoidt.h',
-        '<(nss_directory)/nss/lib/util/secport.c',
-        '<(nss_directory)/nss/lib/util/secport.h',
-        '<(nss_directory)/nss/lib/util/sectime.c',
-        '<(nss_directory)/nss/lib/util/templates.c',
-        '<(nss_directory)/nss/lib/util/utf8.c',
-        '<(nss_directory)/nss/lib/util/utilmod.c',
-        '<(nss_directory)/nss/lib/util/utilmodt.h',
-        '<(nss_directory)/nss/lib/util/utilpars.c',
-        '<(nss_directory)/nss/lib/util/utilpars.h',
-        '<(nss_directory)/nss/lib/util/utilparst.h',
-        '<(nss_directory)/nss/lib/util/utilrename.h',
-      ],
-      'sources!': [
-        # mpi_arm.c is included by mpi_arm_mac.c.
-        # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need
-        # to be excluded conditionally if we start to build NSS on Linux.
-        '<(nss_directory)/nss/lib/freebl/mpi/mpi_arm.c',
-        # primes.c is included by mpprime.c.
-        '<(nss_directory)/nss/lib/freebl/mpi/primes.c',
-        # unix_rand.c and win_rand.c are included by sysrand.c.
-        '<(nss_directory)/nss/lib/freebl/unix_rand.c',
-        '<(nss_directory)/nss/lib/freebl/win_rand.c',
-        # debug_module.c is included by pk11load.c.
-        '<(nss_directory)/nss/lib/pk11wrap/debug_module.c',
-      ],
-      'dependencies': [
-        'nspr_dart',  # Added by Dart (the _dart postfix)
-        # Removed by Dart: nss_static_avx target dependency.
-        'sqlite.gyp:sqlite_dart',  # Changed by Dart prefix ../sqllite removed _dart postfix added.
-      ],
-      'export_dependent_settings': [
-        'nspr_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'defines': [
-        'MP_API_COMPATIBLE',
-        'NSS_DISABLE_DBM',
-        'NSS_STATIC',
-        'NSS_USE_STATIC_LIBS',
-        'RIJNDAEL_INCLUDE_TABLES',
-        'SHLIB_VERSION=\"3\"',
-        'SOFTOKEN_SHLIB_VERSION=\"3\"',
-        'USE_UTIL_DIRECTLY',
-      ],
-      'include_dirs': [
-        '<(nss_directory)/nss/lib/base',
-        '<(nss_directory)/nss/lib/certdb',
-        '<(nss_directory)/nss/lib/certhigh',
-        '<(nss_directory)/nss/lib/cryptohi',
-        '<(nss_directory)/nss/lib/dev',
-        '<(nss_directory)/nss/lib/freebl',
-        '<(nss_directory)/nss/lib/freebl/ecl',
-        '<(nss_directory)/nss/lib/freebl/mpi',
-        '<(nss_directory)/nss/lib/libpkix/include',
-        '<(nss_directory)/nss/lib/libpkix/pkix/certsel',
-        '<(nss_directory)/nss/lib/libpkix/pkix/checker',
-        '<(nss_directory)/nss/lib/libpkix/pkix/crlsel',
-        '<(nss_directory)/nss/lib/libpkix/pkix/params',
-        '<(nss_directory)/nss/lib/libpkix/pkix/results',
-        '<(nss_directory)/nss/lib/libpkix/pkix/store',
-        '<(nss_directory)/nss/lib/libpkix/pkix/top',
-        '<(nss_directory)/nss/lib/libpkix/pkix/util',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/pki',
-        '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/system',
-        '<(nss_directory)/nss/lib/nss',
-        '<(nss_directory)/nss/lib/pk11wrap',
-        '<(nss_directory)/nss/lib/pkcs7',
-        '<(nss_directory)/nss/lib/pki',
-        '<(nss_directory)/nss/lib/smime',
-        '<(nss_directory)/nss/lib/softoken',
-        '<(nss_directory)/nss/lib/ssl',
-        '<(nss_directory)/nss/lib/util',
-      ],
-      'direct_dependent_settings': {
-        'defines': [
-          'NSS_STATIC',
-          'NSS_USE_STATIC_LIBS',
-          'USE_UTIL_DIRECTLY',
-        ],
-        'include_dirs': [
-          '<(nss_directory)/nspr/pr/include',
-          '<(nss_directory)/nspr/lib/ds',
-          '<(nss_directory)/nspr/lib/libc/include',
-          '<(nss_directory)/nss/lib/base',
-          '<(nss_directory)/nss/lib/certdb',
-          '<(nss_directory)/nss/lib/certhigh',
-          '<(nss_directory)/nss/lib/cryptohi',
-          '<(nss_directory)/nss/lib/dev',
-          '<(nss_directory)/nss/lib/freebl',
-          '<(nss_directory)/nss/lib/freebl/ecl',
-          '<(nss_directory)/nss/lib/nss',
-          '<(nss_directory)/nss/lib/pk11wrap',
-          '<(nss_directory)/nss/lib/pkcs7',
-          '<(nss_directory)/nss/lib/pki',
-          '<(nss_directory)/nss/lib/smime',
-          '<(nss_directory)/nss/lib/softoken',
-          '<(nss_directory)/nss/lib/util',
-        ],
-      },
-      'msvs_disabled_warnings': [4018, 4101, 4267, ],
-      'variables': {
-        'clang_warning_flags': [
-          # nss doesn't explicitly cast between different enum types.
-          '-Wno-conversion',
-          # nss passes "const char*" through "void*".
-          '-Wno-incompatible-pointer-types',
-          # nss prefers `a && b || c` over `(a && b) || c`.
-          '-Wno-logical-op-parentheses',
-          # nss doesn't use exhaustive switches on enums
-          '-Wno-switch',
-          # nss has some `unsigned < 0` checks.
-          '-Wno-tautological-compare',
-        ],
-      },
-      'conditions': [
-        ['exclude_nss_root_certs==1', {
-          'defines': [
-            'NSS_DISABLE_ROOT_CERTS',
-          ],
-        }],
-        ['exclude_nss_libpkix==1', {
-          'defines': [
-            'NSS_DISABLE_LIBPKIX',
-          ],
-          # Changed by Dart:
-          # nss_directory contains .., which is bad in a regular expression.
-          # So we use the partial match by dropping '^' from '^nss/...
-          'sources/': [
-            ['exclude', 'nss/lib/libpkix/'],
-          ],
-          'sources!': [
-            '<(nss_directory)/nss/lib/certhigh/certvfypkix.c',
-            '<(nss_directory)/nss/lib/certhigh/certvfypkixprint.c',
-          ],
-          # Changed by Dart:
-          # nss_directory contains .., which is bad in a regular expression.
-          # So we use the partial match by dropping '^' from '^nss/...
-          'include_dirs/': [
-            ['exclude', 'nss/lib/libpkix/'],
-          ],
-        }, { # else: exclude_nss_libpkix==0
-          # Disable the LDAP code in libpkix.
-          'defines': [
-            'NSS_PKIX_NO_LDAP',
-          ],
-          'sources!': [
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.c',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapcertstore.h',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.h',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.c',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaprequest.h',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.c',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapresponse.h',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapt.h',
-            '<(nss_directory)/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldaptemplates.c',
-          ],
-        }],
-        ['target_arch=="ia32"', {
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-          ],
-        }],
-        # Added by Dart.
-        ['OS=="linux"', {
-          'defines': [
-            'XP_UNIX',
-            'HAVE_STRERROR',
-            'SHLIB_SUFFIX=\"so\"',
-            'SHLIB_PREFIX=\"lib\"',
-            'SHLIB_VERSION=\"3\"',
-            'SOFTOKEN_SHLIB_VERSION=\"3\"',
-            'SOFTOKEN_LIB_NAME=\"libsoftokn3.so\"',
-          ],
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-          ],
-        }],
-        ['target_arch=="x64" and OS!="win"', {
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/chacha20/chacha20.c',
-            '<(nss_directory)/nss/lib/freebl/poly1305/poly1305.c',
-            ],
-        }, { # else: target_arch!="x64" or OS=="win"
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/chacha20/chacha20_vec.c',
-            '<(nss_directory)/nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c',
-            ],
-        }],
-        ['OS=="mac" or OS=="ios"', {
-          'defines': [
-            'XP_UNIX',
-            'DARWIN',
-            'HAVE_STRERROR',
-            'HAVE_BSD_FLOCK',
-            'SHLIB_SUFFIX=\"dylib\"',
-            'SHLIB_PREFIX=\"lib\"',
-            'SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"',
-          ],
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-          ],
-          'variables': {
-            'forced_include_file': 'nss_build_config_mac.h',
-          },
-          'xcode_settings': {
-            'conditions': [
-              ['component == "shared_library"', {
-                'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',  # no -fvisibility=hidden
-              }],
-            ],
-            # Define processor architecture specific macros in
-            # <(forced_include_file).
-            'OTHER_CFLAGS': [
-              '-include', '<(forced_include_file)',
-            ],
-          },
-        }, { # else: OS!="mac" and OS!="ios"
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_arm_mac.c',
-          ],
-        }],
-        ['OS=="win"', {
-          'defines': [
-            'SHLIB_SUFFIX=\"dll\"',
-            'SHLIB_PREFIX=\"\"',
-            'SOFTOKEN_LIB_NAME=\"softokn3.dll\"',
-            'XP_PC',
-            'WIN32',
-            'WIN95',
-            '_WINDOWS',
-          ],
-          'direct_dependent_settings': {
-            'defines': [
-              '_WINDOWS',
-            ],
-          },
-          'sources!': [
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-            # If needed it will be included by os_windows.c.
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-          ],
-          # Changed by Dart. We don't use target_arch. This was moved into
-          # configurations instead.
-          # 'conditions': [
-          #   ['target_arch=="ia32"', {
-          #     'defines': [
-          #       'NSS_X86_OR_X64',
-          #       'NSS_X86',
-          #       '_X86_',
-          #       'MP_ASSEMBLY_MULTIPLY',
-          #       'MP_ASSEMBLY_SQUARE',
-          #       'MP_ASSEMBLY_DIV_2DX1D',
-          #       'MP_USE_UINT_DIGIT',
-          #       'MP_NO_MP_WORD',
-          # Changed by Dart: 'USE_HW_AES' and 'INTEL_GCM' are not enabled.
-          #       'USE_HW_AES',
-          #       'INTEL_GCM',
-          #     ],
-          #   }],
-          #   'msvs_settings': {
-          #     'MASM': {
-          #       'UseSafeExceptionHandlers': 'true',
-          #     },
-          #   },
-          #   ['target_arch=="x64"', {
-          #     'defines': [
-          #       'NSS_USE_64',
-          #       'NSS_X86_OR_X64',
-          #       'NSS_X64',
-          #       '_AMD64_',
-          #       'MP_CHAR_STORE_SLOW',
-          #       'MP_IS_LITTLE_ENDIAN',
-          #       'WIN64',
-          #     ],
-          #     'sources!': [
-          #       '<(nss_directory)/nss/lib/freebl/mpi/mpi_amd64.c',
-          #       '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-          #     ],
-          #    }],
-          # ],
-        }, { # else: OS!="win"
-          'sources!': [
-            'os_windows.c',
-            # mpi_x86_asm.c contains MSVC inline assembly code.
-            '<(nss_directory)/nss/lib/freebl/mpi/mpi_x86_asm.c',
-          ],
-        }],
-      ],
-    },
-  ],
-  }]],
-}
diff --git a/runtime/bin/net/nss_memio.cc b/runtime/bin/net/nss_memio.cc
deleted file mode 100644
index f8f4f82..0000000
--- a/runtime/bin/net/nss_memio.cc
+++ /dev/null
@@ -1,538 +0,0 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Written in NSPR style to also be suitable for adding to the NSS demo suite
-
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// This file is a modified copy of Chromium's src/net/base/nss_memio.c.
-// char* has been changed to uint8_t* everywhere, and C++ casts are used.
-// Revision 291806 (this should agree with "nss_rev" in DEPS).
-
-
-/* memio is a simple NSPR I/O layer that lets you decouple NSS from
- * the real network.  It's rather like openssl's memory bio,
- * and is useful when your app absolutely, positively doesn't
- * want to let NSS do its own networking.
- */
-#include "bin/net/nss_memio.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "prerror.h"
-#include "prinit.h"
-#include "prlog.h"
-
-/*--------------- private memio types -----------------------*/
-
-/*----------------------------------------------------------------------
- Simple private circular buffer class.  Size cannot be changed once allocated.
-----------------------------------------------------------------------*/
-
-struct memio_buffer {
-    int head;     /* where to take next byte out of buf */
-    int tail;     /* where to put next byte into buf */
-    int bufsize;  /* number of bytes allocated to buf */
-    /* TODO(port): error handling is pessimistic right now.
-     * Once an error is set, the socket is considered broken
-     * (PR_WOULD_BLOCK_ERROR not included).
-     */
-    PRErrorCode last_err;
-    uint8_t* buf;
-};
-
-
-/* The 'secret' field of a PRFileDesc created by memio_CreateIOLayer points
- * to one of these.
- * In the public header, we use struct memio_Private as a typesafe alias
- * for this.  This causes a few ugly typecasts in the private file, but
- * seems safer.
- */
-struct PRFilePrivate {
-    /* read requests are satisfied from this buffer */
-    struct memio_buffer readbuf;
-
-    /* write requests are satisfied from this buffer */
-    struct memio_buffer writebuf;
-
-    /* SSL needs to know socket peer's name */
-    PRNetAddr peername;
-
-    /* if set, empty I/O returns EOF instead of EWOULDBLOCK */
-    int eof;
-
-    /* if set, the number of bytes requested from readbuf that were not
-     * fulfilled (due to readbuf being empty) */
-    int read_requested;
-};
-
-/*--------------- private memio_buffer functions ---------------------*/
-
-/* Forward declarations.  */
-
-/* Allocate a memio_buffer of given size. */
-static void memio_buffer_new(struct memio_buffer *mb, int size);
-
-/* Deallocate a memio_buffer allocated by memio_buffer_new. */
-static void memio_buffer_destroy(struct memio_buffer *mb);
-
-/* How many bytes can be read out of the buffer without wrapping */
-static int memio_buffer_used_contiguous(const struct memio_buffer *mb);
-
-/* How many bytes exist after the wrap? */
-static int memio_buffer_wrapped_bytes(const struct memio_buffer *mb);
-
-/* How many bytes can be written into the buffer without wrapping */
-static int memio_buffer_unused_contiguous(const struct memio_buffer *mb);
-
-/* Write n bytes into the buffer.  Returns number of bytes written. */
-static int memio_buffer_put(struct memio_buffer *mb, const uint8_t* buf, int n);
-
-/* Read n bytes from the buffer.  Returns number of bytes read. */
-static int memio_buffer_get(struct memio_buffer *mb, uint8_t* buf, int n);
-
-/* Allocate a memio_buffer of given size. */
-static void memio_buffer_new(struct memio_buffer *mb, int size) {
-    mb->head = 0;
-    mb->tail = 0;
-    mb->bufsize = size;
-    mb->buf = static_cast<uint8_t*>(malloc(size));
-}
-
-/* Deallocate a memio_buffer allocated by memio_buffer_new. */
-static void memio_buffer_destroy(struct memio_buffer *mb) {
-    free(mb->buf);
-    mb->buf = NULL;
-    mb->bufsize = 0;
-    mb->head = 0;
-    mb->tail = 0;
-}
-
-/* How many bytes can be read out of the buffer without wrapping */
-static int memio_buffer_used_contiguous(const struct memio_buffer *mb) {
-    return (((mb->tail >= mb->head) ? mb->tail : mb->bufsize) - mb->head);
-}
-
-/* How many bytes exist after the wrap? */
-static int memio_buffer_wrapped_bytes(const struct memio_buffer *mb) {
-    return (mb->tail >= mb->head) ? 0 : mb->tail;
-}
-
-/* How many bytes can be written into the buffer without wrapping */
-static int memio_buffer_unused_contiguous(const struct memio_buffer *mb) {
-    if (mb->head > mb->tail) return mb->head - mb->tail - 1;
-    return mb->bufsize - mb->tail - (mb->head == 0);
-}
-
-/* Write n bytes into the buffer.  Returns number of bytes written. */
-static int memio_buffer_put(struct memio_buffer *mb,
-                            const uint8_t* buf,
-                            int n) {
-    int len;
-    int transferred = 0;
-
-    /* Handle part before wrap */
-    len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
-    if (len > 0) {
-        /* Buffer not full */
-        memmove(&mb->buf[mb->tail], buf, len);
-        mb->tail += len;
-        if (mb->tail == mb->bufsize)
-            mb->tail = 0;
-        n -= len;
-        buf += len;
-        transferred += len;
-
-        /* Handle part after wrap */
-        len = PR_MIN(n, memio_buffer_unused_contiguous(mb));
-        if (len > 0) {
-            /* Output buffer still not full, input buffer still not empty */
-            memmove(&mb->buf[mb->tail], buf, len);
-            mb->tail += len;
-            if (mb->tail == mb->bufsize)
-                mb->tail = 0;
-                transferred += len;
-        }
-    }
-
-    return transferred;
-}
-
-
-/* Read n bytes from the buffer.  Returns number of bytes read. */
-static int memio_buffer_get(struct memio_buffer *mb, uint8_t* buf, int n) {
-    int len;
-    int transferred = 0;
-
-    /* Handle part before wrap */
-    len = PR_MIN(n, memio_buffer_used_contiguous(mb));
-    if (len) {
-        memmove(buf, &mb->buf[mb->head], len);
-        mb->head += len;
-        if (mb->head == mb->bufsize)
-            mb->head = 0;
-        n -= len;
-        buf += len;
-        transferred += len;
-
-        /* Handle part after wrap */
-        len = PR_MIN(n, memio_buffer_used_contiguous(mb));
-        if (len) {
-        memmove(buf, &mb->buf[mb->head], len);
-        mb->head += len;
-            if (mb->head == mb->bufsize)
-                mb->head = 0;
-                transferred += len;
-        }
-    }
-
-    return transferred;
-}
-
-/*--------------- private memio functions -----------------------*/
-
-static PRStatus PR_CALLBACK memio_Close(PRFileDesc *fd) {
-    struct PRFilePrivate *secret = fd->secret;
-    memio_buffer_destroy(&secret->readbuf);
-    memio_buffer_destroy(&secret->writebuf);
-    free(secret);
-    fd->dtor(fd);
-    return PR_SUCCESS;
-}
-
-static PRStatus PR_CALLBACK memio_Shutdown(PRFileDesc *fd, PRIntn how) {
-    /* TODO: pass shutdown status to app somehow */
-    return PR_SUCCESS;
-}
-
-/* If there was a network error in the past taking bytes
- * out of the buffer, return it to the next call that
- * tries to read from an empty buffer.
- */
-static int PR_CALLBACK memio_Recv(PRFileDesc *fd,
-                                  uint8_t *buf,
-                                  PRInt32 len,
-                                  PRIntn flags,
-                                  PRIntervalTime timeout) {
-    struct PRFilePrivate *secret;
-    struct memio_buffer *mb;
-    int rv;
-
-    if (flags) {
-        PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
-        return -1;
-    }
-
-    secret = fd->secret;
-    mb = &secret->readbuf;
-    PR_ASSERT(mb->bufsize);
-    rv = memio_buffer_get(mb, buf, len);
-    if (rv == 0 && !secret->eof) {
-        secret->read_requested = len;
-        /* If there is no more data in the buffer, report any pending errors
-         * that were previously observed. Note that both the readbuf and the
-         * writebuf are checked for errors, since the application may have
-         * encountered a socket error while writing that would otherwise not
-         * be reported until the application attempted to write again - which
-         * it may never do.
-         */
-        if (mb->last_err)
-            PR_SetError(mb->last_err, 0);
-        else if (secret->writebuf.last_err)
-            PR_SetError(secret->writebuf.last_err, 0);
-        else
-            PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
-        return -1;
-    }
-
-    secret->read_requested = 0;
-    return rv;
-}
-
-static int PR_CALLBACK memio_Read(PRFileDesc *fd, uint8_t *buf, PRInt32 len) {
-    /* pull bytes from buffer */
-    return memio_Recv(fd, buf, len, 0, PR_INTERVAL_NO_TIMEOUT);
-}
-
-static int PR_CALLBACK memio_Send(PRFileDesc *fd,
-                                  const uint8_t *buf,
-                                  PRInt32 len,
-                                  PRIntn flags,
-                                  PRIntervalTime timeout) {
-    struct PRFilePrivate *secret;
-    struct memio_buffer *mb;
-    int rv;
-
-    secret = fd->secret;
-    mb = &secret->writebuf;
-    PR_ASSERT(mb->bufsize);
-
-    /* Note that the read error state is not reported, because it cannot be
-     * reported until all buffered data has been read. If there is an error
-     * with the next layer, attempting to call Send again will report the
-     * error appropriately.
-     */
-    if (mb->last_err) {
-        PR_SetError(mb->last_err, 0);
-        return -1;
-    }
-    rv = memio_buffer_put(mb, buf, len);
-    if (rv == 0) {
-        PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
-        return -1;
-    }
-    return rv;
-}
-
-static int PR_CALLBACK memio_Write(PRFileDesc *fd,
-                                   const uint8_t *buf,
-                                   PRInt32 len) {
-    /* append bytes to buffer */
-    return memio_Send(fd, buf, len, 0, PR_INTERVAL_NO_TIMEOUT);
-}
-
-static PRStatus PR_CALLBACK memio_GetPeerName(PRFileDesc *fd, PRNetAddr *addr) {
-    /* TODO: fail if memio_SetPeerName has not been called */
-    struct PRFilePrivate *secret = fd->secret;
-    *addr = secret->peername;
-    return PR_SUCCESS;
-}
-
-static PRStatus memio_GetSocketOption(PRFileDesc *fd,
-                                      PRSocketOptionData *data) {
-    /*
-     * Even in the original version for real tcp sockets,
-     * PR_SockOpt_Nonblocking is a special case that does not
-     * translate to a getsockopt() call
-     */
-    if (PR_SockOpt_Nonblocking == data->option) {
-        data->value.non_blocking = PR_TRUE;
-        return PR_SUCCESS;
-    }
-    PR_SetError(PR_OPERATION_NOT_SUPPORTED_ERROR, 0);
-    return PR_FAILURE;
-}
-
-/*--------------- private memio data -----------------------*/
-
-/*
- * Implement just the bare minimum number of methods needed to make ssl happy.
- *
- * Oddly, PR_Recv calls ssl_Recv calls ssl_SocketIsBlocking calls
- * PR_GetSocketOption, so we have to provide an implementation of
- * PR_GetSocketOption that just says "I'm nonblocking".
- */
-
-static struct PRIOMethods  memio_layer_methods = {
-    PR_DESC_LAYERED,
-    memio_Close,
-    (PRReadFN)memio_Read,
-    (PRWriteFN)memio_Write,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    memio_Shutdown,
-    (PRRecvFN)memio_Recv,
-    (PRSendFN)memio_Send,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    memio_GetPeerName,
-    NULL,
-    NULL,
-    memio_GetSocketOption,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-};
-
-static PRDescIdentity memio_identity = PR_INVALID_IO_LAYER;
-
-static PRStatus memio_InitializeLayerName(void) {
-    memio_identity = PR_GetUniqueIdentity("memio");
-    return PR_SUCCESS;
-}
-
-/*--------------- public memio functions -----------------------*/
-
-PRFileDesc *memio_CreateIOLayer(int readbufsize, int writebufsize) {
-    PRFileDesc *fd;
-    struct PRFilePrivate *secret;
-    static PRCallOnceType once;
-
-    PR_CallOnce(&once, memio_InitializeLayerName);
-
-    fd = PR_CreateIOLayerStub(memio_identity, &memio_layer_methods);
-    secret = static_cast<PRFilePrivate*>(malloc(sizeof(struct PRFilePrivate)));
-    memset(secret, 0, sizeof(*secret));
-
-    memio_buffer_new(&secret->readbuf, readbufsize);
-    memio_buffer_new(&secret->writebuf, writebufsize);
-    fd->secret = secret;
-    return fd;
-}
-
-void memio_SetPeerName(PRFileDesc* fd, const PRNetAddr* peername) {
-    PRFileDesc *memiofd = PR_GetIdentitiesLayer(fd, memio_identity);
-    struct PRFilePrivate *secret = memiofd->secret;
-    secret->peername = *peername;
-}
-
-memio_Private* memio_GetSecret(PRFileDesc* fd) {
-  PRFileDesc* memiofd = PR_GetIdentitiesLayer(fd, memio_identity);
-  struct PRFilePrivate *secret =  memiofd->secret;
-  return reinterpret_cast<memio_Private*>(secret);
-}
-
-int memio_GetReadRequest(memio_Private *secret) {
-  return reinterpret_cast<PRFilePrivate*>(secret)->read_requested;
-}
-
-int memio_GetReadParams(memio_Private* secret, uint8_t** buf) {
-  struct memio_buffer* mb =
-      &(reinterpret_cast<PRFilePrivate*>(secret)->readbuf);
-  PR_ASSERT(mb->bufsize);
-
-  *buf = &mb->buf[mb->tail];
-  return memio_buffer_unused_contiguous(mb);
-}
-
-int memio_GetReadableBufferSize(memio_Private *secret) {
-  struct memio_buffer* mb =
-      &(reinterpret_cast<PRFilePrivate*>(secret)->readbuf);
-  PR_ASSERT(mb->bufsize);
-
-  return memio_buffer_used_contiguous(mb);
-}
-
-void memio_PutReadResult(memio_Private *secret, int bytes_read) {
-  struct memio_buffer* mb =
-      &(reinterpret_cast<PRFilePrivate*>(secret)->readbuf);
-  PR_ASSERT(mb->bufsize);
-
-  if (bytes_read > 0) {
-    mb->tail += bytes_read;
-    if (mb->tail == mb->bufsize)
-      mb->tail = 0;
-  } else if (bytes_read == 0) {
-    /* Record EOF condition and report to caller when buffer runs dry */
-    reinterpret_cast<PRFilePrivate*>(secret)->eof = PR_TRUE;
-  } else /* if (bytes_read < 0) */ {
-    mb->last_err = bytes_read;
-  }
-}
-
-int memio_GetWriteParams(memio_Private *secret,
-                          const uint8_t** buf1, unsigned int *len1,
-                          const uint8_t** buf2, unsigned int *len2) {
-  struct memio_buffer* mb =
-      &(reinterpret_cast<PRFilePrivate*>(secret)->writebuf);
-  PR_ASSERT(mb->bufsize);
-
-  if (mb->last_err)
-    return mb->last_err;
-
-  *buf1 = &mb->buf[mb->head];
-  *len1 = memio_buffer_used_contiguous(mb);
-  *buf2 = mb->buf;
-  *len2 = memio_buffer_wrapped_bytes(mb);
-  return 0;
-}
-
-void memio_PutWriteResult(memio_Private *secret, int bytes_written) {
-  struct memio_buffer* mb =
-      &(reinterpret_cast<PRFilePrivate*>(secret)->writebuf);
-  PR_ASSERT(mb->bufsize);
-
-  if (bytes_written > 0) {
-    mb->head += bytes_written;
-    if (mb->head >= mb->bufsize)
-      mb->head -= mb->bufsize;
-  } else if (bytes_written < 0) {
-    mb->last_err = bytes_written;
-  }
-}
-
-/*--------------- private memio_buffer self-test -----------------*/
-
-/* Even a trivial unit test is very helpful when doing circular buffers. */
-/*#define TRIVIAL_SELF_TEST*/
-#ifdef TRIVIAL_SELF_TEST
-
-#define TEST_BUFLEN 7
-
-#define CHECKEQ(a, b) { \
-    if ((a) != (b)) { \
-        printf("%d != %d, Test failed line %d\n", a, b, __LINE__); \
-        exit(1); \
-    } \
-}
-
-#define FROM_STR(a) reinterpret_cast<const uint8_t*>(a)
-
-int main() {
-    struct memio_buffer mb;
-    uint8_t buf[100];
-    int i;
-
-    memio_buffer_new(&mb, TEST_BUFLEN);
-
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1);
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 0);
-
-    CHECKEQ(memio_buffer_put(&mb, FROM_STR("howdy"), 5), 5);
-
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1-5);
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 5);
-    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 0);
-
-    CHECKEQ(memio_buffer_put(&mb, FROM_STR("!"), 1), 1);
-
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), 0);
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 6);
-    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 0);
-
-    CHECKEQ(memio_buffer_get(&mb, buf, 6), 6);
-    CHECKEQ(memcmp(buf, FROM_STR("howdy!"), 6), 0);
-
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), 1);
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 0);
-
-    CHECKEQ(memio_buffer_put(&mb, FROM_STR("01234"), 5), 5);
-
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 1);
-    CHECKEQ(memio_buffer_wrapped_bytes(&mb), 4);
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), TEST_BUFLEN-1-5);
-
-    CHECKEQ(memio_buffer_put(&mb, FROM_STR("5"), 1), 1);
-
-    CHECKEQ(memio_buffer_unused_contiguous(&mb), 0);
-    CHECKEQ(memio_buffer_used_contiguous(&mb), 1);
-
-    /* TODO: add more cases */
-
-    printf("Test passed\n");
-    exit(0);
-}
-
-#endif
diff --git a/runtime/bin/net/nss_memio.h b/runtime/bin/net/nss_memio.h
deleted file mode 100644
index acfd467..0000000
--- a/runtime/bin/net/nss_memio.h
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Written in NSPR style to also be suitable for adding to the NSS demo suite
-
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// This file is a modified copy of Chromium's src/net/base/nss_memio.h.
-// char* has been changed to uint8_t* everywhere, and C++ casts are used.
-// Revision 291806 (this should agree with "nss_rev" in DEPS).
-
-#ifndef BIN_NET_NSS_MEMIO_H_
-#define BIN_NET_NSS_MEMIO_H_
-
-#include <stddef.h>
-#include "vm/globals.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "prio.h"
-
-/* Opaque structure.  Really just a more typesafe alias for PRFilePrivate. */
-struct memio_Private;
-typedef struct memio_Private memio_Private;
-
-/*----------------------------------------------------------------------
- NSPR I/O layer that terminates in a pair of circular buffers
- rather than talking to the real network.
- To use this with NSS:
- 1) call memio_CreateIOLayer to create a fake NSPR socket
- 2) call SSL_ImportFD to ssl-ify the socket
- 3) Do your own networking calls to set up a TCP connection
- 4) call memio_SetPeerName to tell NSS about the other end of the connection
- 5) While at the same time doing plaintext nonblocking NSPR I/O as
-    usual to the nspr file descriptor returned by SSL_ImportFD,
-    your app must shuttle encrypted data between
-    the real network and memio's network buffers.
-    memio_GetReadParams/memio_PutReadResult
-    are the hooks you need to pump data into memio's input buffer,
-    and memio_GetWriteParams/memio_PutWriteResult
-    are the hooks you need to pump data out of memio's output buffer.
-----------------------------------------------------------------------*/
-
-/* Create the I/O layer and its two circular buffers. */
-PRFileDesc *memio_CreateIOLayer(int readbufsize, int writebufsize);
-
-/* Must call before trying to make an ssl connection */
-void memio_SetPeerName(PRFileDesc *fd, const PRNetAddr *peername);
-
-/* Return a private pointer needed by the following
- * four functions.  (We could have passed a PRFileDesc to
- * them, but that would be slower.  Better for the caller
- * to grab the pointer once and cache it.
- * This may be a premature optimization.)
- */
-memio_Private *memio_GetSecret(PRFileDesc *fd);
-
-/* Ask memio how many bytes were requested by a higher layer if the
- * last attempt to read data resulted in PR_WOULD_BLOCK_ERROR, due to the
- * transport buffer being empty. If the last attempt to read data from the
- * memio did not result in PR_WOULD_BLOCK_ERROR, returns 0.
- */
-int memio_GetReadRequest(memio_Private *secret);
-
-/* Ask memio where to put bytes from the network, and how many it can handle.
- * Returns bytes available to write, or 0 if none available.
- * Puts current buffer position into *buf.
- */
-int memio_GetReadParams(memio_Private *secret, uint8_t **buf);
-
-/* Ask memio how many bytes are contained in the internal buffer.
- * Returns bytes available to read, or 0 if none available.
- */
-int memio_GetReadableBufferSize(memio_Private *secret);
-
-/* Tell memio how many bytes were read from the network.
- * If bytes_read is 0, causes EOF to be reported to
- * NSS after it reads the last byte from the circular buffer.
- * If bytes_read is < 0, it is treated as an NSPR error code.
- * See nspr/pr/src/md/unix/unix_errors.c for how to
- * map from Unix errors to NSPR error codes.
- * On EWOULDBLOCK or the equivalent, don't call this function.
- */
-void memio_PutReadResult(memio_Private *secret, int bytes_read);
-
-/* Ask memio what data it has to send to the network.
- * If there was previous a write error, the NSPR error code is returned.
- * Otherwise, it returns 0 and provides up to two buffers of data by
- * writing the positions and lengths into |buf1|, |len1| and |buf2|, |len2|.
- */
-int memio_GetWriteParams(memio_Private *secret,
-                         const uint8_t **buf1, unsigned int *len1,
-                         const uint8_t **buf2, unsigned int *len2);
-
-/* Tell memio how many bytes were sent to the network.
- * If bytes_written is < 0, it is treated as an NSPR error code.
- * See nspr/pr/src/md/unix/unix_errors.c for how to
- * map from Unix errors to NSPR error codes.
- * On EWOULDBLOCK or the equivalent, don't call this function.
- */
-void memio_PutWriteResult(memio_Private *secret, int bytes_written);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // BIN_NET_NSS_MEMIO_H_
diff --git a/runtime/bin/net/os_linux.S b/runtime/bin/net/os_linux.S
deleted file mode 100644
index a009e83..0000000
--- a/runtime/bin/net/os_linux.S
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifdef __i386__
-#include "../../../third_party/nss/nspr/pr/src/md/unix/os_Linux_x86.s"
-#elif defined(__x86_64__)
-#include "../../../third_party/nss/nspr/pr/src/md/unix/os_Linux_x86_64.s"
-#endif
diff --git a/runtime/bin/net/os_windows.c b/runtime/bin/net/os_windows.c
deleted file mode 100644
index 07ccdc5..0000000
--- a/runtime/bin/net/os_windows.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#if !defined(_MSC_VER)
-#error "This file should only be compiled under MSVC"
-#endif
-
-#if defined(_X86_)
-#include "../../../third_party/nss/nss/lib/freebl/mpi/mpi_x86_asm.c"
-#endif
diff --git a/runtime/bin/net/sqlite.gyp b/runtime/bin/net/sqlite.gyp
deleted file mode 100644
index bcfc0c7..0000000
--- a/runtime/bin/net/sqlite.gyp
+++ /dev/null
@@ -1,226 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file is a modified copy of Chromium's src/third_party/sqlite/sqlite.gyp.
-# Revision 291806 (this should agree with "nss_rev" in DEPS).
-{
-  # Added by Dart. All Dart comments refer to the following block or line.
-  'includes': [
-    '../../tools/gyp/runtime-configurations.gypi',
-    '../../tools/gyp/nss_configurations.gypi',
-  ],
-  'variables': {
-    # Added by Dart.
-    'sqlite_directory': '../../../third_party/sqlite',
-    'use_system_sqlite%': 0,
-    'required_sqlite_version': '3.6.1',
-  },
-  'target_defaults': {
-    'defines': [
-      'SQLITE_CORE',
-      'SQLITE_ENABLE_BROKEN_FTS2',
-      'SQLITE_ENABLE_FTS2',
-      'SQLITE_ENABLE_FTS3',
-      # Disabled by Dart: An external module with advanced unicode functions.
-      # 'SQLITE_ENABLE_ICU',
-      'SQLITE_ENABLE_MEMORY_MANAGEMENT',
-      'SQLITE_SECURE_DELETE',
-      'SQLITE_SEPARATE_CACHE_POOLS',
-      'THREADSAFE',
-      '_HAS_EXCEPTIONS=0',
-    ],
-  },
-  # Added by Dart.  We do not indent, so diffs with the original are clearer.
-  'conditions': [[ 'dart_io_support==1', {
-  'targets': [
-    {
-      'target_name': 'sqlite_dart',  # Added by Dart (the _dart postfix)
-      'toolsets':['host','target'],
-      'conditions': [
-        [ 'chromeos==1' , {
-            'defines': [
-                # Despite obvious warnings about not using this flag
-                # in deployment, we are turning off sync in ChromeOS
-                # and relying on the underlying journaling filesystem
-                # to do error recovery properly.  It's much faster.
-                'SQLITE_NO_SYNC',
-                ],
-          },
-        ],
-        ['use_system_sqlite', {
-          'type': 'none',
-          'direct_dependent_settings': {
-            'defines': [
-              'USE_SYSTEM_SQLITE',
-            ],
-          },
-
-          'conditions': [
-            ['OS == "ios"', {
-              'dependencies': [
-                'sqlite_regexp',
-              ],
-              'link_settings': {
-                'libraries': [
-                  '$(SDKROOT)/usr/lib/libsqlite3.dylib',
-                ],
-              },
-            }],
-            ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
-              'direct_dependent_settings': {
-                'cflags': [
-                  # This next command produces no output but it it will fail
-                  # (and cause GYP to fail) if we don't have a recent enough
-                  # version of sqlite.
-                  '<!@(pkg-config --atleast-version=<(required_sqlite_version) sqlite3)',
-
-                  '<!@(pkg-config --cflags sqlite3)',
-                ],
-              },
-              'link_settings': {
-                'ldflags': [
-                  '<!@(pkg-config --libs-only-L --libs-only-other sqlite3)',
-                ],
-                'libraries': [
-                  '<!@(pkg-config --libs-only-l sqlite3)',
-                ],
-              },
-            }],
-          ],
-        }, { # !use_system_sqlite
-          'product_name': 'sqlite3',
-          'type': 'static_library',
-          # Changed by Dart: '<(sqlite_directory)/' added to all paths.
-          'sources': [
-            '<(sqlite_directory)/amalgamation/sqlite3.h',
-            '<(sqlite_directory)/amalgamation/sqlite3.c',
-            # fts2.c currently has a lot of conflicts when added to
-            # the amalgamation.  It is probably not worth fixing that.
-            '<(sqlite_directory)/src/ext/fts2/fts2.c',
-            '<(sqlite_directory)/src/ext/fts2/fts2.h',
-            '<(sqlite_directory)/src/ext/fts2/fts2_hash.c',
-            '<(sqlite_directory)/src/ext/fts2/fts2_hash.h',
-            '<(sqlite_directory)/src/ext/fts2/fts2_icu.c',
-            '<(sqlite_directory)/src/ext/fts2/fts2_porter.c',
-            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.c',
-            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.h',
-            '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer1.c',
-          ],
-
-          # TODO(shess): Previously fts1 and rtree files were
-          # explicitly excluded from the build.  Make sure they are
-          # logically still excluded.
-
-          # TODO(shess): Should all of the sources be listed and then
-          # excluded?  For editing purposes?
-
-          'include_dirs': [
-            '<(sqlite_directory)/amalgamation',
-            # Needed for fts2 to build.
-            '<(sqlite_directory)/src/src',
-          ],
-          'dependencies': [
-            # Disabled by Dart.
-            # '../icu/icu.gyp:icui18n',
-            # Disabled by Dart.
-            # '../icu/icu.gyp:icuuc',
-          ],
-          'direct_dependent_settings': {
-            'include_dirs': [
-              '<(sqlite_directory)/.',
-              '<(sqlite_directory)/../..',
-            ],
-          },
-          'msvs_disabled_warnings': [
-            4018, 4244, 4267,
-          ],
-          'variables': {
-            'clang_warning_flags': [
-              # sqlite does `if (*a++ && *b++);` in a non-buggy way.
-              '-Wno-empty-body',
-              # sqlite has some `unsigned < 0` checks.
-              '-Wno-tautological-compare',
-            ],
-          },
-          'conditions': [
-            ['OS=="linux"', {
-              'link_settings': {
-                'libraries': [
-                  '-ldl',
-                ],
-              },
-            }],
-            ['OS == "mac" or OS == "ios"', {
-              'link_settings': {
-                'libraries': [
-                  '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
-                ],
-              },
-            }],
-            ['OS == "android"', {
-              'defines': [
-                'HAVE_USLEEP=1',
-                'SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576',
-                'SQLITE_DEFAULT_AUTOVACUUM=1',
-                'SQLITE_TEMP_STORE=3',
-                'SQLITE_ENABLE_FTS3_BACKWARDS',
-                'DSQLITE_DEFAULT_FILE_FORMAT=4',
-              ],
-            }],
-            ['os_posix == 1 and OS != "mac" and OS != "android"', {
-              'cflags': [
-                # SQLite doesn't believe in compiler warnings,
-                # preferring testing.
-                #   http://www.sqlite.org/faq.html#q17
-                '-Wno-int-to-pointer-cast',
-                '-Wno-pointer-to-int-cast',
-              ],
-            }],
-          ],
-        }],
-      ],
-    },
-  ],
-  'conditions': [
-    ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android" and not use_system_sqlite', {
-      'targets': [
-        {
-          'target_name': 'sqlite_shell_dart',  # Added by Dart (the _dart postfix)
-          'type': 'executable',
-          'dependencies': [
-            # Disabled by Dart.
-            # '../icu/icu.gyp:icuuc',
-            'sqlite_dart',  # Added by Dart (the _dart postfix)
-          ],
-          'sources': [
-            '<(sqlite_directory)/src/src/shell.c',
-            '<(sqlite_directory)/src/src/shell_icu_linux.c',
-            # Include a dummy c++ file to force linking of libstdc++.
-            '<(sqlite_directory)/build_as_cpp.cc',
-          ],
-        },
-      ],
-    },],
-    ['OS == "ios"', {
-      'targets': [
-        {
-          'target_name': 'sqlite_regexp',
-          'type': 'static_library',
-          'dependencies': [
-            '../icu/icu.gyp:icui18n',
-            '../icu/icu.gyp:icuuc',
-          ],
-          'sources': [
-            'src/ext/icu/icu.c',
-          ],
-        },
-      ],
-    }],
-  ],
-  }]],
-}
diff --git a/runtime/bin/net/ssl.gyp b/runtime/bin/net/ssl.gyp
deleted file mode 100644
index cb15c0e4..0000000
--- a/runtime/bin/net/ssl.gyp
+++ /dev/null
@@ -1,216 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This file is a modified copy of Chromium's src/net/third_party/nss/ssl.gyp.
-# Revision 291806 (this should agree with "nss_rev" in DEPS).
-
-# The following modification was made to make sure we have the same
-# xcode_settings on all configurations (otherwise we can't build with ninja):
-#   'configurations': {
-#     'Debug_Base': {
-# +     'inherit_from': ['Dart_Base'],
-#       'defines': [
-#         'DEBUG',
-#       ],
-#    },
-#  },
-
-{
-  # Conditions section for ssl-bodge (Compiling SSL on linux using system
-  # NSS and NSPR libraries) removed:
-  # 'conditions': [
-  #   [ 'os_posix == 1 and OS != "mac" and OS != "ios"', {
-  #   ...
-  #   }]],
-
-  # Added by Dart. All Dart comments refer to the following block or line.
-  'includes': [
-    '../../tools/gyp/runtime-configurations.gypi',
-    '../../tools/gyp/nss_configurations.gypi',
-  ],
-  # Added by Dart.
-  'variables': {
-    'ssl_directory': '../../../third_party/net_nss',
-    'os_posix': 0,
-  },
-  # Added by Dart.  We do not indent, so diffs with the original are clearer.
-  'conditions': [[ 'dart_io_support==1', {
-  'targets': [
-    {
-      'target_name': 'libssl_dart',  # Added by Dart (the _dart postfix)
-      'type': 'static_library',
-      'toolsets':['host','target'],
-      # Changed by Dart: '<(ssl_directory)/' added to all paths.
-      'sources': [
-        '<(ssl_directory)/ssl/authcert.c',
-        '<(ssl_directory)/ssl/cmpcert.c',
-        '<(ssl_directory)/ssl/derive.c',
-        '<(ssl_directory)/ssl/dtlscon.c',
-        '<(ssl_directory)/ssl/os2_err.c',
-        '<(ssl_directory)/ssl/os2_err.h',
-        '<(ssl_directory)/ssl/preenc.h',
-        '<(ssl_directory)/ssl/prelib.c',
-        '<(ssl_directory)/ssl/ssl.h',
-        '<(ssl_directory)/ssl/ssl3con.c',
-        '<(ssl_directory)/ssl/ssl3ecc.c',
-        '<(ssl_directory)/ssl/ssl3ext.c',
-        '<(ssl_directory)/ssl/ssl3gthr.c',
-        '<(ssl_directory)/ssl/ssl3prot.h',
-        '<(ssl_directory)/ssl/sslauth.c',
-        '<(ssl_directory)/ssl/sslcon.c',
-        '<(ssl_directory)/ssl/ssldef.c',
-        '<(ssl_directory)/ssl/sslenum.c',
-        '<(ssl_directory)/ssl/sslerr.c',
-        '<(ssl_directory)/ssl/sslerr.h',
-        '<(ssl_directory)/ssl/SSLerrs.h',
-        '<(ssl_directory)/ssl/sslerrstrs.c',
-        '<(ssl_directory)/ssl/sslgathr.c',
-        '<(ssl_directory)/ssl/sslimpl.h',
-        '<(ssl_directory)/ssl/sslinfo.c',
-        '<(ssl_directory)/ssl/sslinit.c',
-        '<(ssl_directory)/ssl/sslmutex.c',
-        '<(ssl_directory)/ssl/sslmutex.h',
-        '<(ssl_directory)/ssl/sslnonce.c',
-        '<(ssl_directory)/ssl/sslplatf.c',
-        '<(ssl_directory)/ssl/sslproto.h',
-        '<(ssl_directory)/ssl/sslreveal.c',
-        '<(ssl_directory)/ssl/sslsecur.c',
-        '<(ssl_directory)/ssl/sslsnce.c',
-        '<(ssl_directory)/ssl/sslsock.c',
-        '<(ssl_directory)/ssl/sslt.h',
-        '<(ssl_directory)/ssl/ssltrace.c',
-        '<(ssl_directory)/ssl/sslver.c',
-        '<(ssl_directory)/ssl/unix_err.c',
-        '<(ssl_directory)/ssl/unix_err.h',
-        '<(ssl_directory)/ssl/win32err.c',
-        '<(ssl_directory)/ssl/win32err.h',
-        # Changed by Dart: All files under '<(ssl_directory)/ssl/bodge' removed.
-      ],
-      # Changed by Dart: '<(ssl_directory)/' added to all paths.
-      'sources!': [
-        '<(ssl_directory)/ssl/os2_err.c',
-        '<(ssl_directory)/ssl/os2_err.h',
-      ],
-      'defines': [
-        'NO_PKCS11_BYPASS',
-        'NSS_ENABLE_ECC',
-        'USE_UTIL_DIRECTLY',
-      ],
-      'defines!': [
-        'DEBUG',
-      ],
-      'dependencies': [
-        # Changed by Dart.
-        'zlib.gyp:zlib_dart',  # Added by Dart (the _dart postfix)
-        # Dart: Start of copy of code from 'bodge' conditions section below.
-        'nss.gyp:nspr_dart',  # Added by Dart (the _dart postfix)
-        'nss.gyp:nss_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'export_dependent_settings': [
-        'nss.gyp:nspr_dart',  # Added by Dart (the _dart postfix)
-        'nss.gyp:nss_dart',  # Added by Dart (the _dart postfix)
-      ],
-      'direct_dependent_settings': {
-        'include_dirs': [
-          '<(ssl_directory)/ssl',
-        ],
-        'defines': [
-          'NSS_PLATFORM_CLIENT_AUTH',
-        ],
-        # Dart: End of copy of code from bodge conditions section.
-      },
-      'msvs_disabled_warnings': [4018, 4244, 4267],
-      'conditions': [
-        ['component == "shared_library"', {
-          'conditions': [
-            ['OS == "mac" or OS == "ios"', {
-              'xcode_settings': {
-                'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
-              },
-            }],
-            ['OS == "win"', {
-              'sources': [
-                'ssl/exports_win.def',
-              ],
-            }],
-            ['os_posix == 1 and OS != "mac" and OS != "ios"', {
-              'cflags!': ['-fvisibility=hidden'],
-            }],
-          ],
-        }],
-        [ 'clang == 1', {
-          'cflags': [
-            # See http://crbug.com/138571#c8. In short, sslsecur.c picks up the
-            # system's cert.h because cert.h isn't in chromium's repo.
-            '-Wno-incompatible-pointer-types',
-
-            # There is a broken header guard in /usr/include/nss/secmod.h:
-            # https://bugzilla.mozilla.org/show_bug.cgi?id=884072
-            '-Wno-header-guard',
-          ],
-        }],
-        [ 'OS == "linux"', {
-          'link_settings': {
-            'libraries': [
-              '-ldl',
-            ],
-          },
-          # Added by Dart.
-          'defines': [
-            'XP_UNIX',
-            'NSS_PLATFORM_CLIENT_AUTH',
-            'NSS_USE_STATIC_LIBS',
-          ],
-        }],
-        [ 'OS == "mac" or OS == "ios"', {
-          'defines': [
-            'XP_UNIX',
-            'DARWIN',
-            'XP_MACOSX',
-          ],
-        }],
-        [ 'OS == "mac"', {
-          'link_settings': {
-            'libraries': [
-              '$(SDKROOT)/System/Library/Frameworks/Security.framework',
-            ],
-          },
-        }],
-        [ 'OS == "win"', {
-            'sources!': [
-              '<(ssl_directory)/ssl/unix_err.c',
-              '<(ssl_directory)/ssl/unix_err.h',
-            ],
-          },
-          {  # else: OS != "win"
-            'sources!': [
-              '<(ssl_directory)/ssl/win32err.c',
-              '<(ssl_directory)/ssl/win32err.h',
-            ],
-          },
-        ],
-        # Dart: Conditions sections for ssl/bodge removed.
-        #       [ 'os_posix == 1 and OS != "mac" and OS != "ios", {
-        #         ...
-        #       ],
-        #       [ 'OS == "mac" or OS == "ios" or OS == "win"', {
-        #         ...
-        #       ],
-      ],
-      'configurations': {
-        'Debug_Base': {
-          'inherit_from': ['Dart_Base'],
-          'defines': [
-            'DEBUG',
-          ],
-        },
-      },
-    },
-  ],
-  }]],
-}
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index 3880062..e821cc2 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -102,6 +102,7 @@
                                                              dart_argv);
   ASSERT(set_vm_flags_success);
   const char* err_msg = Dart::InitOnce(dart::bin::vm_isolate_snapshot_buffer,
+                                       NULL,
                                        NULL, NULL, NULL, NULL,
                                        dart::bin::DartUtils::OpenFile,
                                        dart::bin::DartUtils::ReadFile,
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index 63f600f..c32301d 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -10,21 +10,17 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <key.h>
-#include <keyt.h>
-#include <nss.h>
-#include <pk11pub.h>
-#include <prerror.h>
-#include <prinit.h>
-#include <prnetdb.h>
-#include <secmod.h>
-#include <ssl.h>
-#include <sslproto.h>
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/safestack.h>
+#include <openssl/ssl.h>
+#include <openssl/tls1.h>
+#include <openssl/x509.h>
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
 #include "bin/lockers.h"
-#include "bin/net/nss_memio.h"
+#include "bin/log.h"
 #include "bin/socket.h"
 #include "bin/thread.h"
 #include "bin/utils.h"
@@ -32,27 +28,33 @@
 
 #include "include/dart_api.h"
 
-
 namespace dart {
 namespace bin {
 
 bool SSLFilter::library_initialized_ = false;
 // To protect library initialization.
 Mutex* SSLFilter::mutex_ = new Mutex();
-// The password is needed when creating secure server sockets.  It can
-// be null if only secure client sockets are used.
-const char* SSLFilter::password_ = NULL;
+int SSLFilter::filter_ssl_index;
 
 static const int kSSLFilterNativeFieldIndex = 0;
+static const int kSecurityContextNativeFieldIndex = 0;
+static const int kX509NativeFieldIndex = 0;
 
+static const bool SSL_LOG_STATUS = false;
+static const bool SSL_LOG_DATA = false;
 
-/* Handle an error reported from the NSS library. */
-static void ThrowPRException(const char* exception_type,
+static const int SSL_ERROR_MESSAGE_BUFFER_SIZE = 200;
+
+/* Handle an error reported from the BoringSSL library. */
+static void ThrowIOException(const char* exception_type,
                              const char* message,
                              bool free_message = false) {
-  PRErrorCode error_code = PR_GetError();
-  const char* error_message = PR_ErrorToString(error_code, PR_LANGUAGE_EN);
-  OSError os_error_struct(error_code, error_message, OSError::kNSS);
+  // TODO(24068): Get the error code and message from the error stack.
+  // There may be more than one error on the stack - should we
+  // concatenate the error messages?
+  int error_code = 0;
+  const char* error_message = "Unknown error from BoringSSL library";
+  OSError os_error_struct(error_code, error_message, OSError::kBoringSSL);
   Dart_Handle os_error = DartUtils::NewDartOSError(&os_error_struct);
   Dart_Handle exception =
       DartUtils::NewDartIOException(exception_type, message, os_error);
@@ -64,20 +66,6 @@
 }
 
 
-static void ThrowCertificateException(const char* format,
-                                      const char* certificate_name) {
-  int length = strlen(certificate_name);
-  length += strlen(format);
-  char* message = reinterpret_cast<char*>(malloc(length + 1));
-  if (message == NULL) {
-    FATAL("Out of memory formatting CertificateException for throwing");
-  }
-  snprintf(message, length + 1, format, certificate_name);
-  message[length] = '\0';
-  ThrowPRException("CertificateException", message, true);
-}
-
-
 static SSLFilter* GetFilter(Dart_NativeArguments args) {
   SSLFilter* filter;
   Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
@@ -100,6 +88,48 @@
 }
 
 
+static SSL_CTX* GetSecurityContext(Dart_NativeArguments args) {
+  SSL_CTX* context;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&context)));
+  return context;
+}
+
+
+static void SetSecurityContext(Dart_NativeArguments args,
+                               SSL_CTX* context) {
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_SetNativeInstanceField(
+      dart_this,
+      kSecurityContextNativeFieldIndex,
+      reinterpret_cast<intptr_t>(context)));
+}
+
+
+static X509* GetX509Certificate(Dart_NativeArguments args) {
+  X509* certificate;
+  Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
+  ASSERT(Dart_IsInstance(dart_this));
+  ThrowIfError(Dart_GetNativeInstanceField(
+      dart_this,
+      kX509NativeFieldIndex,
+      reinterpret_cast<intptr_t*>(&certificate)));
+  return certificate;
+}
+
+
+// Forward declaration.
+static void SetAlpnProtocolList(Dart_Handle protocols_handle,
+                                SSL* ssl,
+                                SSL_CTX* context,
+                                bool is_server);
+
+
 void FUNCTION_NAME(SecureSocket_Init)(Dart_NativeArguments args) {
   Dart_Handle dart_this = ThrowIfError(Dart_GetNativeArgument(args, 0));
   SSLFilter* filter = new SSLFilter;
@@ -110,50 +140,36 @@
 
 void FUNCTION_NAME(SecureSocket_Connect)(Dart_NativeArguments args) {
   Dart_Handle host_name_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
-  Dart_Handle host_sockaddr_storage_object =
-      ThrowIfError(Dart_GetNativeArgument(args, 2));
-  Dart_Handle port_object = ThrowIfError(Dart_GetNativeArgument(args, 3));
-  bool is_server = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 4));
-  Dart_Handle certificate_name_object =
-      ThrowIfError(Dart_GetNativeArgument(args, 5));
+  Dart_Handle context_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+  bool is_server = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
   bool request_client_certificate =
-      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 6));
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 4));
   bool require_client_certificate =
-      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 7));
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 5));
   bool send_client_certificate =
-      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 8));
+      DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 6));
   Dart_Handle protocols_handle =
-      ThrowIfError(Dart_GetNativeArgument(args, 9));
+      ThrowIfError(Dart_GetNativeArgument(args, 7));
 
   const char* host_name = NULL;
   // TODO(whesse): Is truncating a Dart string containing \0 what we want?
   ThrowIfError(Dart_StringToCString(host_name_object, &host_name));
 
-  RawAddr raw_addr;
-  SocketAddress::GetSockAddr(host_sockaddr_storage_object, &raw_addr);
-
-  int64_t port;
-  if (!DartUtils::GetInt64Value(port_object, &port)) {
-    FATAL("The range of port_object was checked in Dart - it cannot fail here");
+  SSL_CTX* context = NULL;
+  if (!Dart_IsNull(context_object)) {
+    ThrowIfError(Dart_GetNativeInstanceField(
+        context_object,
+        kSecurityContextNativeFieldIndex,
+        reinterpret_cast<intptr_t*>(&context)));
   }
 
-  const char* certificate_name = NULL;
-  if (Dart_IsString(certificate_name_object)) {
-    ThrowIfError(Dart_StringToCString(certificate_name_object,
-                                      &certificate_name));
-  }
-  // If this is a server connection, it must have a certificate to connect with.
-  ASSERT(!is_server || certificate_name != NULL);
-
   // The protocols_handle is guaranteed to be a valid Uint8List.
   // It will have the correct length encoding of the protocols array.
   ASSERT(!Dart_IsNull(protocols_handle));
 
   GetFilter(args)->Connect(host_name,
-                           raw_addr,
-                           static_cast<int>(port),
+                           context,
                            is_server,
-                           certificate_name,
                            request_client_certificate,
                            require_client_certificate,
                            send_client_certificate,
@@ -217,50 +233,6 @@
 }
 
 
-void FUNCTION_NAME(SecureSocket_InitializeLibrary)
-    (Dart_NativeArguments args) {
-  Dart_Handle certificate_database_object =
-      ThrowIfError(Dart_GetNativeArgument(args, 0));
-  // Check that the type is string, and get the UTF-8 C string value from it.
-  const char* certificate_database = NULL;
-  if (Dart_IsString(certificate_database_object)) {
-    ThrowIfError(Dart_StringToCString(certificate_database_object,
-                                      &certificate_database));
-  } else if (!Dart_IsNull(certificate_database_object)) {
-    Dart_ThrowException(DartUtils::NewDartArgumentError(
-        "Non-String certificate directory argument to SetCertificateDatabase"));
-  }
-  // Leave certificate_database as NULL if no value was provided.
-
-  Dart_Handle password_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
-  // Check that the type is string or null,
-  // and get the UTF-8 C string value from it.
-  const char* password = NULL;
-  if (Dart_IsString(password_object)) {
-    ThrowIfError(Dart_StringToCString(password_object, &password));
-  } else if (Dart_IsNull(password_object)) {
-    // Pass the empty string as the password.
-    password = "";
-  } else {
-    Dart_ThrowException(DartUtils::NewDartArgumentError(
-        "Password argument to SetCertificateDatabase is not a String or null"));
-  }
-
-  Dart_Handle builtin_roots_object =
-      ThrowIfError(Dart_GetNativeArgument(args, 2));
-  // Check that the type is boolean, and get the boolean value from it.
-  bool builtin_roots = true;
-  if (Dart_IsBoolean(builtin_roots_object)) {
-    ThrowIfError(Dart_BooleanValue(builtin_roots_object, &builtin_roots));
-  } else {
-    Dart_ThrowException(DartUtils::NewDartArgumentError(
-        "UseBuiltinRoots argument to SetCertificateDatabase is not a bool"));
-  }
-
-  SSLFilter::InitializeLibrary(certificate_database, password, builtin_roots);
-}
-
-
 void FUNCTION_NAME(SecureSocket_PeerCertificate)
     (Dart_NativeArguments args) {
   Dart_SetReturnValue(args, GetFilter(args)->PeerCertificate());
@@ -273,6 +245,291 @@
 }
 
 
+static Dart_Handle WrappedX509Certificate(X509* certificate) {
+  if (certificate == NULL) return Dart_Null();
+  Dart_Handle x509_type =
+      DartUtils::GetDartType(DartUtils::kIOLibURL, "X509Certificate");
+  if (Dart_IsError(x509_type)) {
+    return x509_type;
+  }
+  Dart_Handle arguments[] = { NULL };
+  Dart_Handle result =
+      Dart_New(x509_type, DartUtils::NewString("_"), 0, arguments);
+  if (Dart_IsError(result)) {
+    return result;
+  }
+  ASSERT(Dart_IsInstance(result));
+  Dart_Handle status = Dart_SetNativeInstanceField(
+      result,
+      kX509NativeFieldIndex,
+      reinterpret_cast<intptr_t>(certificate));
+  if (Dart_IsError(status)) {
+    return status;
+  }
+  return result;
+}
+
+
+int CertificateCallback(int preverify_ok, X509_STORE_CTX* store_ctx) {
+  if (preverify_ok == 1) return 1;
+  Dart_Isolate isolate = Dart_CurrentIsolate();
+  if (isolate == NULL) {
+    FATAL("CertificateCallback called with no current isolate\n");
+  }
+  X509* certificate = X509_STORE_CTX_get_current_cert(store_ctx);
+  int ssl_index = SSL_get_ex_data_X509_STORE_CTX_idx();
+  SSL* ssl = static_cast<SSL*>(
+      X509_STORE_CTX_get_ex_data(store_ctx, ssl_index));
+  SSLFilter* filter = static_cast<SSLFilter*>(
+      SSL_get_ex_data(ssl, SSLFilter::filter_ssl_index));
+  Dart_Handle callback = filter->bad_certificate_callback();
+  if (Dart_IsNull(callback)) return 0;
+  Dart_Handle args[1];
+  args[0] = WrappedX509Certificate(certificate);
+  if (Dart_IsError(args[0])) {
+    filter->callback_error = args[0];
+    return 0;
+  }
+  Dart_Handle result = Dart_InvokeClosure(callback, 1, args);
+  if (!Dart_IsError(result) && !Dart_IsBoolean(result)) {
+    result = Dart_NewUnhandledExceptionError(DartUtils::NewDartIOException(
+        "HandshakeException",
+        "BadCertificateCallback returned a value that was not a boolean",
+        Dart_Null()));
+  }
+  if (Dart_IsError(result)) {
+    filter->callback_error = result;
+    return 0;
+  }
+  return DartUtils::GetBooleanValue(result);
+}
+
+
+void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
+  SSLFilter::InitializeLibrary();
+  SSL_CTX* context = SSL_CTX_new(TLS_method());
+  SSL_CTX_set_verify(context, SSL_VERIFY_PEER, CertificateCallback);
+  SSL_CTX_set_min_version(context, TLS1_VERSION);
+  SSL_CTX_set_cipher_list(context, "HIGH:MEDIUM");
+  SSL_CTX_set_cipher_list_tls11(context, "HIGH:MEDIUM");
+  SetSecurityContext(args, context);
+  // TODO(whesse): Use WeakPersistentHandle to free the SSL_CTX
+  // when the object is GC'd.  Also free the alpn_select_cb data pointer,
+  // if non-null (allocated in SetAlpnProtocolList).
+}
+
+
+int PasswordCallback(char* buf, int size, int rwflag, void* userdata) {
+  char* password = static_cast<char*>(userdata);
+  if (static_cast<size_t>(size) < strlen(password) + 1) {
+    Log::PrintErr("Password buffer too small.\n");
+    exit(1);
+    // TODO(24182): Find the actual value of size passed in here, and
+    // check for password length longer than this in the Dart function
+    // that passes in the password, so we never have this problem.
+  }
+  strncpy(buf, static_cast<char*>(userdata), size);
+  return strlen(static_cast<char*>(userdata));
+}
+
+
+void CheckStatus(int status, const char* message, int line) {
+  // TODO(24183): Take appropriate action on failed calls,
+  // throw exception that includes all messages from the error stack.
+  if (status != 1 && SSL_LOG_STATUS) {
+    int error = ERR_get_error();
+    Log::PrintErr("Failed: %s line %d\n", message, line);
+    char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
+    ERR_error_string_n(error, error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
+    Log::PrintErr("ERROR: %d %s\n", error, error_string);
+  }
+}
+
+
+void FUNCTION_NAME(SecurityContext_UsePrivateKey)(Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  Dart_Handle filename_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  const char* filename = NULL;
+  if (Dart_IsString(filename_object)) {
+    ThrowIfError(Dart_StringToCString(filename_object, &filename));
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "File argument to SecurityContext.usePrivateKey is not a String"));
+  }
+  Dart_Handle password_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+  const char* password = NULL;
+  if (Dart_IsString(password_object)) {
+    ThrowIfError(Dart_StringToCString(password_object, &password));
+  } else if (Dart_IsNull(password_object)) {
+    password = "";
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Password argument to SecurityContext.usePrivateKey is not "
+        "a String or null"));
+  }
+
+  SSL_CTX_set_default_passwd_cb(context, PasswordCallback);
+  SSL_CTX_set_default_passwd_cb_userdata(context, const_cast<char*>(password));
+  int status = SSL_CTX_use_PrivateKey_file(context,
+                                           filename,
+                                           SSL_FILETYPE_PEM);
+  // TODO(24184): Handle different expected errors here - file missing,
+  // incorrect password, file not a PEM, and throw exceptions.
+  // CheckStatus should also throw an exception in uncaught cases.
+  CheckStatus(status, "SSL_CTX_use_PrivateKey_file", __LINE__);
+  SSL_CTX_set_default_passwd_cb_userdata(context, NULL);
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetTrustedCertificates)(
+    Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  Dart_Handle filename_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  const char* filename = NULL;
+  if (Dart_IsString(filename_object)) {
+    ThrowIfError(Dart_StringToCString(filename_object, &filename));
+  }
+  Dart_Handle directory_object = ThrowIfError(Dart_GetNativeArgument(args, 2));
+  const char* directory = NULL;
+  if (Dart_IsString(directory_object)) {
+    ThrowIfError(Dart_StringToCString(directory_object, &directory));
+  } else if (Dart_IsNull(directory_object)) {
+    directory = NULL;
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Directory argument to SecurityContext.usePrivateKey is not "
+        "a String or null"));
+  }
+
+  int status = SSL_CTX_load_verify_locations(context, filename, directory);
+  CheckStatus(status, "SSL_CTX_load_verify_locations", __LINE__);
+}
+
+
+void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
+    Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  X509_STORE* store = SSL_CTX_get_cert_store(context);
+  BIO* roots_bio =
+      BIO_new_mem_buf(const_cast<unsigned char*>(root_certificates_pem),
+                      root_certificates_pem_length);
+  X509* root_cert;
+  // PEM_read_bio_X509 reads PEM-encoded certificates from a bio (in our case,
+  // backed by a memory buffer), and returns X509 objects, one by one.
+  // When the end of the bio is reached, it returns null.
+  while ((root_cert = PEM_read_bio_X509(roots_bio, NULL, NULL, NULL))) {
+    X509_STORE_add_cert(store, root_cert);
+  }
+  BIO_free(roots_bio);
+}
+
+
+void FUNCTION_NAME(SecurityContext_UseCertificateChain)(
+    Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  Dart_Handle filename_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  const char* filename = NULL;
+  if (Dart_IsString(filename_object)) {
+    ThrowIfError(Dart_StringToCString(filename_object, &filename));
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "file argument in SecurityContext.useCertificateChain"
+        " is not a String"));
+  }
+  int status = SSL_CTX_use_certificate_chain_file(context, filename);
+  CheckStatus(status, "SSL_CTX_use_certificate_chain_file", __LINE__);
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetClientAuthorities)(
+    Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  Dart_Handle filename_object = ThrowIfError(Dart_GetNativeArgument(args, 1));
+  const char* filename = NULL;
+  if (Dart_IsString(filename_object)) {
+    ThrowIfError(Dart_StringToCString(filename_object, &filename));
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+         "file argument in SecurityContext.setClientAuthorities"
+         " is not a String"));
+  }
+  STACK_OF(X509_NAME)* certificate_names;
+  certificate_names = SSL_load_client_CA_file(filename);
+  if (certificate_names != NULL) {
+    SSL_CTX_set_client_CA_list(context, certificate_names);
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Could not load certificate names from file in SetClientAuthorities"));
+  }
+}
+
+
+void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
+    Dart_NativeArguments args) {
+  SSL_CTX* context = GetSecurityContext(args);
+  Dart_Handle protocols_handle =
+      ThrowIfError(Dart_GetNativeArgument(args, 1));
+  Dart_Handle is_server_handle =
+      ThrowIfError(Dart_GetNativeArgument(args, 2));
+  if (Dart_IsBoolean(is_server_handle)) {
+    bool is_server = DartUtils::GetBooleanValue(is_server_handle);
+    SetAlpnProtocolList(protocols_handle, NULL, context, is_server);
+  } else {
+    Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Non-boolean is_server argument passed to SetAlpnProtocols"));
+  }
+}
+
+
+void FUNCTION_NAME(X509_Subject)(
+    Dart_NativeArguments args) {
+  X509* certificate = GetX509Certificate(args);
+  X509_NAME* subject = X509_get_subject_name(certificate);
+  char* subject_string = X509_NAME_oneline(subject, NULL, 0);
+  Dart_SetReturnValue(args, Dart_NewStringFromCString(subject_string));
+  OPENSSL_free(subject_string);
+}
+
+
+void FUNCTION_NAME(X509_Issuer)(
+    Dart_NativeArguments args) {
+  X509* certificate = GetX509Certificate(args);
+  X509_NAME* issuer = X509_get_issuer_name(certificate);
+  char* issuer_string = X509_NAME_oneline(issuer, NULL, 0);
+  Dart_SetReturnValue(args, Dart_NewStringFromCString(issuer_string));
+  OPENSSL_free(issuer_string);
+}
+
+static Dart_Handle ASN1TimeToMilliseconds(ASN1_TIME* aTime) {
+  ASN1_UTCTIME* epoch_start = M_ASN1_UTCTIME_new();
+  ASN1_UTCTIME_set_string(epoch_start, "700101000000Z");
+  int days;
+  int seconds;
+  int result = ASN1_TIME_diff(&days, &seconds, epoch_start, aTime);
+  M_ASN1_UTCTIME_free(epoch_start);
+  if (result != 1) {
+    // TODO(whesse): Propagate an error to Dart.
+    Log::PrintErr("ASN1Time error %d\n", result);
+  }
+  return Dart_NewInteger((86400LL * days + seconds) * 1000LL);
+}
+
+void FUNCTION_NAME(X509_StartValidity)(
+    Dart_NativeArguments args) {
+  X509* certificate = GetX509Certificate(args);
+  ASN1_TIME* not_before = X509_get_notBefore(certificate);
+  Dart_SetReturnValue(args, ASN1TimeToMilliseconds(not_before));
+}
+
+
+void FUNCTION_NAME(X509_EndValidity)(
+    Dart_NativeArguments args) {
+  X509* certificate = GetX509Certificate(args);
+  ASN1_TIME* not_after = X509_get_notAfter(certificate);
+  Dart_SetReturnValue(args, ASN1TimeToMilliseconds(not_after));
+}
+
+
 /**
  * Pushes data through the SSL filter, reading and writing from circular
  * buffers shared with Dart.
@@ -314,8 +571,9 @@
     }
     return result;
   } else {
-    PRErrorCode error_code = PR_GetError();
-    const char* error_message = PR_ErrorToString(error_code, PR_LANGUAGE_EN);
+    // TODO(24185): Extract the BoringSSL OS error here and return it.
+    int error_code = 1;
+    const char* error_message = "Obsolete PR Error message";
     CObjectArray* result = new CObjectArray(CObject::NewArray(2));
     result->SetAt(0, new CObjectInt32(CObject::NewInt32(error_code)));
     result->SetAt(1, new CObjectString(CObject::NewString(error_message)));
@@ -365,33 +623,24 @@
         ends[i] = end;
         break;
       case kReadEncrypted:
-        // Read data from circular buffer.
+      case kWritePlaintext:
+        // Read/Write data from circular buffer.  If the buffer is empty,
+        // neither if statement's condition is true.
         if (end < start) {
           // Data may be split into two segments.  In this case,
           // the first is [start, size).
-          int bytes = ProcessReadEncryptedBuffer(start, size);
+          int bytes = (i == kReadEncrypted) ?
+              ProcessReadEncryptedBuffer(start, size) :
+              ProcessWritePlaintextBuffer(start, size);
           if (bytes < 0) return false;
           start += bytes;
           ASSERT(start <= size);
           if (start == size) start = 0;
         }
         if (start < end) {
-          int bytes = ProcessReadEncryptedBuffer(start, end);
-          if (bytes < 0) return false;
-          start += bytes;
-          ASSERT(start <= end);
-        }
-        starts[i] = start;
-        break;
-      case kWritePlaintext:
-        if (end < start) {
-          // Data is split into two segments, [start, size) and [0, end).
-          int bytes = ProcessWritePlaintextBuffer(start, size, 0, end);
-          if (bytes < 0) return false;
-          start += bytes;
-          if (start >= size) start -= size;
-        } else {
-          int bytes = ProcessWritePlaintextBuffer(start, end, 0, 0);
+          int bytes = (i == kReadEncrypted) ?
+              ProcessReadEncryptedBuffer(start, end) :
+              ProcessWritePlaintextBuffer(start, end);
           if (bytes < 0) return false;
           start += bytes;
           ASSERT(start <= end);
@@ -406,47 +655,9 @@
 }
 
 
-static Dart_Handle X509FromCertificate(CERTCertificate* certificate) {
-  PRTime start_validity;
-  PRTime end_validity;
-  SECStatus status =
-      CERT_GetCertTimes(certificate, &start_validity, &end_validity);
-  if (status != SECSuccess) {
-    ThrowPRException("CertificateException",
-                     "Cannot get validity times from certificate");
-  }
-  int64_t start_epoch_ms = start_validity / PR_USEC_PER_MSEC;
-  int64_t end_epoch_ms = end_validity / PR_USEC_PER_MSEC;
-  Dart_Handle subject_name_object =
-      DartUtils::NewString(certificate->subjectName);
-  Dart_Handle issuer_name_object =
-      DartUtils::NewString(certificate->issuerName);
-  Dart_Handle start_epoch_ms_int = Dart_NewInteger(start_epoch_ms);
-  Dart_Handle end_epoch_ms_int = Dart_NewInteger(end_epoch_ms);
-
-  Dart_Handle date_type =
-      DartUtils::GetDartType(DartUtils::kCoreLibURL, "DateTime");
-  Dart_Handle from_milliseconds =
-      DartUtils::NewString("fromMillisecondsSinceEpoch");
-
-  Dart_Handle start_validity_date =
-      Dart_New(date_type, from_milliseconds, 1, &start_epoch_ms_int);
-  Dart_Handle end_validity_date =
-      Dart_New(date_type, from_milliseconds, 1, &end_epoch_ms_int);
-
-  Dart_Handle x509_type =
-      DartUtils::GetDartType(DartUtils::kIOLibURL, "X509Certificate");
-  Dart_Handle arguments[] = { subject_name_object,
-                              issuer_name_object,
-                              start_validity_date,
-                              end_validity_date };
-  return Dart_New(x509_type, Dart_Null(), 4, arguments);
-}
-
-
 void SSLFilter::Init(Dart_Handle dart_this) {
   if (!library_initialized_) {
-    InitializeLibrary(NULL, "", true, false);
+    InitializeLibrary();
   }
   ASSERT(string_start_ == NULL);
   string_start_ = Dart_NewPersistentHandle(DartUtils::NewString("start"));
@@ -459,7 +670,6 @@
   ASSERT(bad_certificate_callback_ != NULL);
 
   InitializeBuffers(dart_this);
-  filter_ = memio_CreateIOLayer(kMemioBufferSize, kMemioBufferSize);
 }
 
 
@@ -507,6 +717,7 @@
 void SSLFilter::RegisterHandshakeCompleteCallback(Dart_Handle complete) {
   ASSERT(NULL == handshake_complete_);
   handshake_complete_ = Dart_NewPersistentHandle(complete);
+
   ASSERT(handshake_complete_ != NULL);
 }
 
@@ -519,157 +730,123 @@
 }
 
 
-char* PasswordCallback(PK11SlotInfo* slot, PRBool retry, void* arg) {
-  if (!retry) {
-    return PL_strdup(static_cast<char*>(arg));  // Freed by NSS internals.
-  }
-  return NULL;
-}
-
-
-static const char* builtin_roots_module =
-#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_ANDROID)
-    "name=\"Root Certs\" library=\"libnssckbi.so\"";
-#elif defined(TARGET_OS_MACOS)
-    "name=\"Root Certs\" library=\"libnssckbi.dylib\"";
-#elif defined(TARGET_OS_WINDOWS)
-    "name=\"Root Certs\" library=\"nssckbi.dll\"";
-#else
-#error Automatic target os detection failed.
-#endif
-
-
-
-void SSLFilter::InitializeLibrary(const char* certificate_database,
-                                  const char* password,
-                                  bool use_builtin_root_certificates,
-                                  bool report_duplicate_initialization) {
+void SSLFilter::InitializeLibrary() {
   MutexLocker locker(mutex_);
-  SECStatus status;
   if (!library_initialized_) {
-    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
-    // TODO(whesse): Verify there are no UTF-8 issues here.
-    if (certificate_database == NULL || certificate_database[0] == '\0') {
-      status = NSS_NoDB_Init(NULL);
-      if (status != SECSuccess) {
-        mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-        ThrowPRException("TlsException",
-                         "Failed NSS_NoDB_Init call.");
-      }
-      if (use_builtin_root_certificates) {
-        SECMODModule* module = SECMOD_LoadUserModule(
-            const_cast<char*>(builtin_roots_module), NULL, PR_FALSE);
-        if (!module) {
-          mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-          ThrowPRException("TlsException",
-                           "Failed to load builtin root certificates.");
-        }
-      }
-    } else {
-      PRUint32 init_flags = NSS_INIT_READONLY;
-      if (!use_builtin_root_certificates) {
-        init_flags |= NSS_INIT_NOMODDB;
-      }
-      status = NSS_Initialize(certificate_database,
-                              "",
-                              "",
-                              SECMOD_DB,
-                              init_flags);
-      if (status != SECSuccess) {
-        mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-        ThrowPRException("TlsException",
-                         "Failed NSS_Init call.");
-      }
-      password_ = strdup(password);  // This one copy persists until Dart exits.
-      PK11_SetPasswordFunc(PasswordCallback);
-    }
+    SSL_library_init();
+    filter_ssl_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
+    ASSERT(filter_ssl_index >= 0);
     library_initialized_ = true;
-
-    status = NSS_SetDomesticPolicy();
-    if (status != SECSuccess) {
-      mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-      ThrowPRException("TlsException",
-                       "Failed NSS_SetDomesticPolicy call.");
-    }
-
-    // Enable the same additional ciphers that Chromium does.
-    // See NSSSSLInitSingleton() in Chromium's net/socket/nss_ssl_util.cc.
-    // Explicitly enable exactly those ciphers with keys of at least 80 bits.
-    const PRUint16* const ssl_ciphers = SSL_GetImplementedCiphers();
-    const PRUint16 num_ciphers = SSL_GetNumImplementedCiphers();
-    for (int i = 0; i < num_ciphers; i++) {
-      SSLCipherSuiteInfo info;
-      if (SSL_GetCipherSuiteInfo(ssl_ciphers[i], &info, sizeof(info)) ==
-          SECSuccess) {
-        bool enabled = (info.effectiveKeyBits >= 80);
-        // Trim the list of cipher suites in order to keep the size of the
-        // ClientHello down. DSS, ECDH, CAMELLIA, SEED, ECC+3DES, and
-        // HMAC-SHA256 cipher suites are disabled.
-        if (info.symCipher == ssl_calg_camellia ||
-            info.symCipher == ssl_calg_seed ||
-            (info.symCipher == ssl_calg_3des && info.keaType != ssl_kea_rsa) ||
-            info.authAlgorithm == ssl_auth_dsa ||
-            info.macAlgorithm == ssl_hmac_sha256 ||
-            info.nonStandard ||
-            strcmp(info.keaTypeName, "ECDH") == 0) {
-          enabled = false;
-        }
-
-        if (ssl_ciphers[i] == TLS_DHE_DSS_WITH_AES_128_CBC_SHA) {
-          // Enabled to allow servers with only a DSA certificate to function.
-          enabled = true;
-        }
-        SSL_CipherPrefSetDefault(ssl_ciphers[i], enabled);
-      }
-    }
-
-    status = SSL_ConfigServerSessionIDCache(0, 0, 0, NULL);
-    if (status != SECSuccess) {
-      mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-      ThrowPRException("TlsException",
-                       "Failed SSL_ConfigServerSessionIDCache call.");
-    }
-
-  } else if (report_duplicate_initialization) {
-    mutex_->Unlock();  // MutexLocker destructor not called when throwing.
-    // Like ThrowPRException, without adding an OSError.
-    Dart_ThrowException(DartUtils::NewDartIOException("TlsException",
-        "Called SecureSocket.initialize more than once",
-        Dart_Null()));
   }
 }
 
 
-SECStatus BadCertificateCallback(void* filter, PRFileDesc* fd) {
-  SSLFilter* ssl_filter = static_cast<SSLFilter*>(filter);
-  Dart_Handle callback = ssl_filter->bad_certificate_callback();
-  if (Dart_IsNull(callback)) return SECFailure;
-  Dart_Handle x509_object = ssl_filter->PeerCertificate();
-  Dart_Handle result = Dart_InvokeClosure(callback, 1, &x509_object);
-  if (Dart_IsError(result)) {
-    ssl_filter->callback_error = result;
-    return SECFailure;
-  }
-  // Our wrapper is guaranteed to return a boolean.
-  bool c_result = DartUtils::GetBooleanValue(result);
-  return c_result ? SECSuccess : SECFailure;
-}
-
-
 Dart_Handle SSLFilter::PeerCertificate() {
-  CERTCertificate* certificate = SSL_PeerCertificate(filter_);
-  if (certificate == NULL) return Dart_Null();
-  Dart_Handle x509_object = X509FromCertificate(certificate);
-  CERT_DestroyCertificate(certificate);
+  X509* certificate = SSL_get_peer_certificate(ssl_);
+  Dart_Handle x509_object = WrappedX509Certificate(certificate);
+  if (Dart_IsError(x509_object)) {
+    Dart_PropagateError(x509_object);
+  }
   return x509_object;
 }
 
 
-void SSLFilter::Connect(const char* host_name,
-                        const RawAddr& raw_addr,
-                        int port,
+int AlpnCallback(SSL *ssl,
+                 const uint8_t **out,
+                 uint8_t *outlen,
+                 const uint8_t *in,
+                 unsigned int inlen,
+                 void *arg) {
+  // 'in' and 'arg' are sequences of (length, data) strings with 1-byte lengths.
+  // 'arg' is 0-terminated. Finds the first string in 'arg' that is in 'in'.
+  uint8_t* server_list = static_cast<uint8_t*>(arg);
+  while (*server_list != 0) {
+    uint8_t protocol_length = *server_list++;
+    const uint8_t* client_list = in;
+    while (client_list < in + inlen) {
+      uint8_t client_protocol_length = *client_list++;
+      if (client_protocol_length == protocol_length) {
+        if (0 == memcmp(server_list, client_list, protocol_length)) {
+          *out = client_list;
+          *outlen = client_protocol_length;
+          return SSL_TLSEXT_ERR_OK;  // Success
+        }
+      }
+      client_list += client_protocol_length;
+    }
+    server_list += protocol_length;
+  }
+  // TODO(23580): Make failure send a fatal alert instead of ignoring ALPN.
+  return SSL_TLSEXT_ERR_NOACK;
+}
+
+
+// Sets the protocol list for ALPN on a SSL object or a context.
+static void SetAlpnProtocolList(Dart_Handle protocols_handle,
+                                SSL* ssl,
+                                SSL_CTX* context,
+                                bool is_server) {
+  // Enable ALPN (application layer protocol negotiation) if the caller provides
+  // a valid list of supported protocols.
+  Dart_TypedData_Type protocols_type;
+  uint8_t* protocol_string = NULL;
+  uint8_t* protocol_string_copy = NULL;
+  intptr_t protocol_string_len = 0;
+  int status;
+
+  Dart_Handle result = Dart_TypedDataAcquireData(
+      protocols_handle,
+      &protocols_type,
+      reinterpret_cast<void**>(&protocol_string),
+      &protocol_string_len);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
+
+  if (protocols_type != Dart_TypedData_kUint8) {
+    Dart_TypedDataReleaseData(protocols_handle);
+    Dart_PropagateError(Dart_NewApiError(
+        "Unexpected type for protocols (expected valid Uint8List)."));
+  }
+
+  if (protocol_string_len > 0) {
+    if (is_server) {
+      // ALPN on server connections must be set on an SSL_CTX object,
+      // not on the SSL object of the individual connection.
+      ASSERT(context != NULL);
+      ASSERT(ssl == NULL);
+      // Because it must be passed as a single void*, terminate
+      // the list of (length, data) strings with a length 0 string.
+      protocol_string_copy =
+          static_cast<uint8_t*>(malloc(protocol_string_len + 1));
+      memmove(protocol_string_copy, protocol_string, protocol_string_len);
+      protocol_string_copy[protocol_string_len] = '\0';
+      SSL_CTX_set_alpn_select_cb(context, AlpnCallback, protocol_string_copy);
+      // TODO(whesse): If this function is called again, free the previous
+      // protocol_string_copy.  It may be better to keep this as a native
+      // field on the Dart object, since fetching it from the structure is
+      // not in the public api.  Also free this when the context is destroyed.
+    } else {
+      // The function makes a local copy of protocol_string, which it owns.
+      if (ssl != NULL) {
+        ASSERT(context == NULL);
+        status = SSL_set_alpn_protos(ssl, protocol_string, protocol_string_len);
+      } else {
+        ASSERT(context != NULL);
+        ASSERT(ssl == NULL);
+        status = SSL_CTX_set_alpn_protos(
+            context, protocol_string, protocol_string_len);
+      }
+      ASSERT(status == 0);  // The function returns a non-standard status.
+    }
+  }
+  Dart_TypedDataReleaseData(protocols_handle);
+}
+
+
+void SSLFilter::Connect(const char* hostname,
+                        SSL_CTX* context,
                         bool is_server,
-                        const char* certificate_name,
                         bool request_client_certificate,
                         bool require_client_certificate,
                         bool send_client_certificate,
@@ -679,197 +856,137 @@
     FATAL("Connect called twice on the same _SecureFilter.");
   }
 
-  if (!is_server && certificate_name != NULL) {
-    client_certificate_name_ = strdup(certificate_name);
+  int status;
+  int error;
+  BIO* ssl_side;
+  status = BIO_new_bio_pair(&ssl_side, 10000, &socket_side_, 10000);
+  CheckStatus(status, "BIO_new_bio_pair", __LINE__);
+
+  if (context == NULL) {
+    DART_CHECK_VALID(Dart_ThrowException(DartUtils::NewDartArgumentError(
+        "Default SecurityContext not implemented, context cannot be null.")));
   }
 
-  filter_ = SSL_ImportFD(NULL, filter_);
-  if (filter_ == NULL) {
-    ThrowPRException("TlsException", "Failed SSL_ImportFD call");
+  ssl_ = SSL_new(context);
+  SSL_set_bio(ssl_, ssl_side, ssl_side);
+  SSL_set_mode(ssl_, SSL_MODE_AUTO_RETRY);  // TODO(whesse): Is this right?
+  SSL_set_ex_data(ssl_, filter_ssl_index, this);
+
+  if (is_server_) {
+    // Do not request a client certificate.
+    // TODO(24069): Allow server to request a client certificate, when desired.
+    SSL_set_verify(ssl_, SSL_VERIFY_NONE, NULL);
+  } else {
+    SetAlpnProtocolList(protocols_handle, ssl_, NULL, false);
+    // Sets the hostname in the certificate-checking object, so it is checked
+    // against the certificate presented by the server.
+    X509_VERIFY_PARAM* certificate_checking_parameters = SSL_get0_param(ssl_);
+    hostname_ = strdup(hostname);
+    X509_VERIFY_PARAM_set_hostflags(certificate_checking_parameters, 0);
+    X509_VERIFY_PARAM_set1_host(certificate_checking_parameters,
+                                hostname_, strlen(hostname_));
+    // TODO(24225) Check return value of set1_host().
+    // TODO(24186) free hostname_ if it is not freed when SSL is destroyed.
+    // otherwise, make it a local variable, not a instance field.
   }
-
-
-  SECStatus status;
-
-  // Enable ALPN (application layer protocol negogiation) if the caller provides
-  // a valid list of supported protocols.
-  {
-    Dart_TypedData_Type protocols_type;
-    uint8_t* protocol_string = NULL;
-    intptr_t protocol_string_len = 0;
-
-    Dart_Handle result = Dart_TypedDataAcquireData(
-        protocols_handle,
-        &protocols_type,
-        reinterpret_cast<void**>(&protocol_string),
-        &protocol_string_len);
-    if (Dart_IsError(result)) {
-      Dart_PropagateError(result);
+  // Make the connection:
+  if (is_server_) {
+    status = SSL_accept(ssl_);
+    if (SSL_LOG_STATUS) Log::Print("SSL_accept status: %d\n", status);
+    if (status != 1) {
+      // TODO(whesse): expect a needs-data error here.  Handle other errors.
+      error = SSL_get_error(ssl_, status);
+      if (SSL_LOG_STATUS) Log::Print("SSL_accept error: %d\n", error);
     }
-
-    if (protocols_type != Dart_TypedData_kUint8) {
-      Dart_TypedDataReleaseData(protocols_handle);
-      Dart_PropagateError(Dart_NewApiError(
-          "Unexpected type for protocols (expected valid Uint8List)."));
+  } else {
+    status = SSL_connect(ssl_);
+    if (SSL_LOG_STATUS) Log::Print("SSL_connect status: %d\n", status);
+    if (status != 1) {
+      // TODO(whesse): expect a needs-data error here.  Handle other errors.
+      error = SSL_get_error(ssl_, status);
+      if (SSL_LOG_STATUS) Log::Print("SSL_connect error: %d\n", error);
     }
-
-    if (protocol_string_len > 0) {
-      status = SSL_OptionSet(filter_, SSL_ENABLE_ALPN, PR_TRUE);
-      ASSERT(status == SECSuccess);
-
-      status = SSL_SetNextProtoNego(filter_,
-                                    protocol_string,
-                                    protocol_string_len);
-      ASSERT(status == SECSuccess);
-    }
-
-    Dart_TypedDataReleaseData(protocols_handle);
   }
-
-  SSLVersionRange vrange;
-  vrange.min = SSL_LIBRARY_VERSION_3_0;
-  vrange.max = SSL_LIBRARY_VERSION_TLS_1_2;
-  SSL_VersionRangeSet(filter_, &vrange);
-
-  if (is_server) {
-    CERTCertificate* certificate = NULL;
-    if (strstr(certificate_name, "CN=") != NULL) {
-      // Look up certificate using the distinguished name (DN) certificate_name.
-      CERTCertDBHandle* certificate_database = CERT_GetDefaultCertDB();
-      if (certificate_database == NULL) {
-        ThrowPRException("CertificateException",
-                         "Certificate database cannot be loaded");
-      }
-      certificate = CERT_FindCertByNameString(certificate_database,
-          const_cast<char*>(certificate_name));
-      if (certificate == NULL) {
-        ThrowCertificateException(
-            "Cannot find server certificate by distinguished name: %s",
-            certificate_name);
-      }
-    } else {
-      // Look up certificate using the nickname certificate_name.
-      certificate = PK11_FindCertFromNickname(
-          const_cast<char*>(certificate_name),
-          static_cast<void*>(const_cast<char*>(password_)));
-      if (certificate == NULL) {
-        ThrowCertificateException(
-            "Cannot find server certificate by nickname: %s",
-            certificate_name);
-      }
-    }
-    SECKEYPrivateKey* key = PK11_FindKeyByAnyCert(
-        certificate,
-        static_cast<void*>(const_cast<char*>(password_)));
-    if (key == NULL) {
-      CERT_DestroyCertificate(certificate);
-      if (PR_GetError() == -8177) {
-        ThrowPRException("CertificateException",
-                         "Certificate database password incorrect");
-      } else {
-        ThrowCertificateException(
-            "Cannot find private key for certificate %s",
-            certificate_name);
-      }
-    }
-
-    // kt_rsa (key type RSA) is an enum constant from the NSS libraries.
-    // TODO(whesse): Allow different key types.
-    status = SSL_ConfigSecureServer(filter_, certificate, key, kt_rsa);
-    CERT_DestroyCertificate(certificate);
-    SECKEY_DestroyPrivateKey(key);
-    if (status != SECSuccess) {
-      ThrowCertificateException(
-          "Failed SSL_ConfigSecureServer call with certificate %s",
-          certificate_name);
-    }
-
+  if (is_server_) {
     if (request_client_certificate) {
-      status = SSL_OptionSet(filter_, SSL_REQUEST_CERTIFICATE, PR_TRUE);
-      if (status != SECSuccess) {
-        ThrowPRException("TlsException",
-                         "Failed SSL_OptionSet(REQUEST_CERTIFICATE) call");
-      }
-      status = SSL_OptionSet(filter_,
-                             SSL_REQUIRE_CERTIFICATE,
-                             require_client_certificate);
-      if (status != SECSuccess) {
-        ThrowPRException("TlsException",
-                         "Failed SSL_OptionSet(REQUIRE_CERTIFICATE) call");
-      }
+      // TODO(24069): Handle client certificates on server side.
+      Dart_ThrowException(DartUtils::NewDartArgumentError(
+          "requestClientCertificate not implemented."));
     }
   } else {  // Client.
-    if (SSL_SetURL(filter_, host_name) == -1) {
-      ThrowPRException("TlsException", "Failed SetURL call");
-    }
     if (send_client_certificate) {
-      SSL_SetPKCS11PinArg(filter_, const_cast<char*>(password_));
-      status = SSL_GetClientAuthDataHook(
-          filter_,
-          NSS_GetClientAuthData,
-          static_cast<void*>(client_certificate_name_));
-      if (status != SECSuccess) {
-        ThrowPRException("TlsException",
-                         "Failed SSL_GetClientAuthDataHook call");
-      }
+      // TODO(24070): Handle client certificates on client side.
+      Dart_ThrowException(DartUtils::NewDartArgumentError(
+          "sendClientCertificate not implemented."));
     }
   }
-
-  // Install bad certificate callback, and pass 'this' to it if it is called.
-  status = SSL_BadCertHook(filter_,
-                           BadCertificateCallback,
-                           static_cast<void*>(this));
-
-  status = SSL_ResetHandshake(filter_, is_server);
-  if (status != SECSuccess) {
-    ThrowPRException("TlsException",
-                     "Failed SSL_ResetHandshake call");
-  }
-
-  // Set the peer address from the address passed. The DNS has already
-  // been done in Dart code, so just use that address. This relies on
-  // following about PRNetAddr: "The raw member of the union is
-  // equivalent to struct sockaddr", which is stated in the NSS
-  // documentation.
-  PRNetAddr peername;
-  memset(&peername, 0, sizeof(peername));
-  intptr_t len = SocketAddress::GetAddrLength(raw_addr);
-  ASSERT(static_cast<size_t>(len) <= sizeof(peername));
-  memmove(&peername, &raw_addr.addr, len);
-
-  // Adjust the address family field for BSD, whose sockaddr
-  // structure has a one-byte length and one-byte address family
-  // field at the beginning.  PRNetAddr has a two-byte address
-  // family field at the beginning.
-  peername.raw.family = raw_addr.addr.sa_family;
-
-  memio_SetPeerName(filter_, &peername);
+  Handshake();
 }
 
 
+int printErrorCallback(const char *str, size_t len, void *ctx) {
+  Log::PrintErr("%.*s\n", static_cast<int>(len), str);
+  return 1;
+}
+
 void SSLFilter::Handshake() {
-  SECStatus status = SSL_ForceHandshake(filter_);
-  if (status == SECSuccess) {
+  // Try and push handshake along.
+  int status;
+  int error;
+  status = SSL_do_handshake(ssl_);
+  if (callback_error != NULL) {
+    // The SSL_do_handshake will try performing a handshake and might call
+    // a CertificateCallback. If the certificate validation
+    // failed the 'callback_error" will be set by the certificateCallback
+    // logic and we propagate the error"
+    Dart_PropagateError(callback_error);
+  }
+  if (SSL_LOG_STATUS) Log::Print("SSL_handshake status: %d\n", status);
+  if (status != 1) {
+    error = SSL_get_error(ssl_, status);
+    if (SSL_LOG_STATUS) Log::Print("ERROR: %d\n", error);
+    ERR_print_errors_cb(printErrorCallback, NULL);
+  }
+  if (status == 1) {
     if (in_handshake_) {
+      // TODO(24071): Check return value of SSL_get_verify_result, this
+      //    should give us the hostname check.
+      int result = SSL_get_verify_result(ssl_);
+      if (SSL_LOG_STATUS) {
+        Log::Print("Handshake verification status: %d\n", result);
+        X509* peer_certificate = SSL_get_peer_certificate(ssl_);
+        if (peer_certificate == NULL) {
+          Log::Print("No peer certificate received\n");
+        } else {
+          X509_NAME* s_name = X509_get_subject_name(peer_certificate);
+          printf("Peer certificate SN: ");
+          X509_NAME_print_ex_fp(stdout, s_name, 4, 0);
+          printf("\n");
+        }
+      }
       ThrowIfError(Dart_InvokeClosure(
           Dart_HandleFromPersistent(handshake_complete_), 0, NULL));
       in_handshake_ = false;
     }
-  } else {
-    if (callback_error != NULL) {
-      Dart_PropagateError(callback_error);
+  } else if (status == 0) {
+    if (is_server_) {
+      ThrowIOException("HandshakeException",
+                       "Handshake error in server");
+    } else {
+      ThrowIOException("HandshakeException",
+                       "Handshake error in client");
     }
-    PRErrorCode error = PR_GetError();
-    if (error == PR_WOULD_BLOCK_ERROR) {
+  } else if (status < 0) {
+    if (SSL_want_write(ssl_) || SSL_want_read(ssl_)) {
       if (!in_handshake_) {
         in_handshake_ = true;
       }
     } else {
       if (is_server_) {
-        ThrowPRException("HandshakeException",
+        ThrowIOException("HandshakeException",
                          "Handshake error in server");
       } else {
-        ThrowPRException("HandshakeException",
+        ThrowIOException("HandshakeException",
                          "Handshake error in client");
       }
     }
@@ -877,42 +994,13 @@
 }
 
 void SSLFilter::GetSelectedProtocol(Dart_NativeArguments args) {
-  // Space for the selected protocol.
-  const unsigned int kBufferSize = 256;
-  unsigned char buffer[kBufferSize + 1];
-
-  unsigned int outLength = 0;
-  SSLNextProtoState outState;
-
-  SECStatus status = SSL_GetNextProto(
-      filter_, &outState, buffer, &outLength, kBufferSize);
-  if (status == SECSuccess) {
-    if (outState == SSL_NEXT_PROTO_SELECTED ||
-        outState == SSL_NEXT_PROTO_NEGOTIATED) {
-      ASSERT(outLength <= kBufferSize);
-      buffer[outLength] = '\0';
-      Dart_Handle protocol_string = DartUtils::NewString(
-          reinterpret_cast<const char *>(&buffer[0]));
-      if (Dart_IsError(protocol_string)) {
-        ThrowPRException("HandshakeException",
-                         "Protocol selected via ALPN, unable to get protocol "
-                         "string.");
-      } else {
-        Dart_SetReturnValue(args, protocol_string);
-      }
-    } else if (outState == SSL_NEXT_PROTO_NO_OVERLAP) {
-      ThrowPRException("HandshakeException",
-                       "Client and Server could not agree upon a protocol");
-    } else if (outState == SSL_NEXT_PROTO_NO_SUPPORT) {
-      // A value of `null` denotes that the client did not support protocol
-      // negogiation.
-      Dart_SetReturnValue(args, Dart_Null());
-    } else {
-      UNREACHABLE();
-    }
+  const uint8_t* protocol;
+  unsigned length;
+  SSL_get0_alpn_selected(ssl_, &protocol, &length);
+  if (length == 0) {
+    Dart_SetReturnValue(args, Dart_Null());
   } else {
-    ThrowPRException("HandshakeException",
-                     "Could not retrieve selected protocol via ALPN");
+    Dart_SetReturnValue(args, Dart_NewStringFromUTF8(protocol, length));
   }
 }
 
@@ -920,41 +1008,20 @@
 void SSLFilter::Renegotiate(bool use_session_cache,
                             bool request_client_certificate,
                             bool require_client_certificate) {
-  SECStatus status;
   // The SSL_REQUIRE_CERTIFICATE option only takes effect if the
   // SSL_REQUEST_CERTIFICATE option is also set, so set it.
   request_client_certificate =
       request_client_certificate || require_client_certificate;
-
-  status = SSL_OptionSet(filter_,
-                         SSL_REQUEST_CERTIFICATE,
-                         request_client_certificate);
-  if (status != SECSuccess) {
-    ThrowPRException("TlsException",
-       "Failure in (Raw)SecureSocket.renegotiate request_client_certificate");
-  }
-  status = SSL_OptionSet(filter_,
-                         SSL_REQUIRE_CERTIFICATE,
-                         require_client_certificate);
-  if (status != SECSuccess) {
-    ThrowPRException("TlsException",
-       "Failure in (Raw)SecureSocket.renegotiate require_client_certificate");
-  }
-  bool flush_cache = !use_session_cache;
-  status = SSL_ReHandshake(filter_, flush_cache);
-  if (status != SECSuccess) {
-    if (is_server_) {
-      ThrowPRException("HandshakeException",
-                       "Failure in (Raw)SecureSocket.renegotiate in server");
-    } else {
-      ThrowPRException("HandshakeException",
-                       "Failure in (Raw)SecureSocket.renegotiate in client");
-    }
-  }
+  // TODO(24070, 24069): Implement setting the client certificate parameters,
+  //   and triggering rehandshake.
 }
 
 
 void SSLFilter::Destroy() {
+  if (ssl_ != NULL) {
+    SSL_free(ssl_);
+    ssl_ = NULL;
+  }
   for (int i = 0; i < kNumBuffers; ++i) {
     Dart_DeletePersistentHandle(dart_buffer_objects_[i]);
     delete[] buffers_[i];
@@ -963,25 +1030,21 @@
   Dart_DeletePersistentHandle(string_length_);
   Dart_DeletePersistentHandle(handshake_complete_);
   Dart_DeletePersistentHandle(bad_certificate_callback_);
-  free(client_certificate_name_);
-
-  PR_Close(filter_);
 }
 
 
-intptr_t SSLFilter::ProcessReadPlaintextBuffer(int start, int end) {
+/* Read decrypted data from the filter to the circular buffer */
+int SSLFilter::ProcessReadPlaintextBuffer(int start, int end) {
   int length = end - start;
   int bytes_processed = 0;
   if (length > 0) {
-    bytes_processed = PR_Read(filter_,
-                              buffers_[kReadPlaintext] + start,
-                              length);
+    bytes_processed = SSL_read(
+        ssl_,
+        reinterpret_cast<char*>((buffers_[kReadPlaintext] + start)),
+        length);
     if (bytes_processed < 0) {
-      ASSERT(bytes_processed == -1);
-      PRErrorCode pr_error = PR_GetError();
-      if (PR_WOULD_BLOCK_ERROR != pr_error) {
-        return -1;
-      }
+      int error = SSL_get_error(ssl_, bytes_processed);
+      USE(error);
       bytes_processed = 0;
     }
   }
@@ -989,70 +1052,58 @@
 }
 
 
-intptr_t SSLFilter::ProcessWritePlaintextBuffer(int start1, int end1,
-                                                int start2, int end2) {
-  PRIOVec ranges[2];
-  uint8_t* buffer = buffers_[kWritePlaintext];
-  ranges[0].iov_base = reinterpret_cast<char*>(buffer + start1);
-  ranges[0].iov_len = end1 - start1;
-  ranges[1].iov_base = reinterpret_cast<char*>(buffer + start2);
-  ranges[1].iov_len = end2 - start2;
-  int bytes_processed = PR_Writev(filter_, ranges, 2, PR_INTERVAL_NO_TIMEOUT);
+int SSLFilter::ProcessWritePlaintextBuffer(int start, int end) {
+  int length = end - start;
+  int bytes_processed = SSL_write(
+      ssl_, buffers_[kWritePlaintext] + start, length);
   if (bytes_processed < 0) {
-    ASSERT(bytes_processed == -1);
-    PRErrorCode pr_error = PR_GetError();
-    if (PR_WOULD_BLOCK_ERROR != pr_error) {
-      return -1;
+    if (SSL_LOG_DATA) {
+      Log::Print("SSL_write returned error %d\n", bytes_processed);
     }
-    bytes_processed = 0;
+    return 0;
   }
   return bytes_processed;
 }
 
 
-intptr_t SSLFilter::ProcessReadEncryptedBuffer(int start, int end) {
+/* Read encrypted data from the circular buffer to the filter */
+int SSLFilter::ProcessReadEncryptedBuffer(int start, int end) {
   int length = end - start;
+  if (SSL_LOG_DATA) Log::Print(
+      "Entering ProcessReadEncryptedBuffer with %d bytes\n", length);
   int bytes_processed = 0;
   if (length > 0) {
-    memio_Private* secret = memio_GetSecret(filter_);
-    uint8_t* filter_buf;
-    int free_bytes = memio_GetReadParams(secret, &filter_buf);
-    bytes_processed = dart::Utils::Minimum(length, free_bytes);
-    memmove(filter_buf, buffers_[kReadEncrypted] + start, bytes_processed);
-    memio_PutReadResult(secret, bytes_processed);
+    bytes_processed =
+        BIO_write(socket_side_, buffers_[kReadEncrypted] + start, length);
+    if (bytes_processed <= 0) {
+      bool retry = BIO_should_retry(socket_side_);
+      if (!retry) {
+        if (SSL_LOG_DATA) Log::Print(
+            "BIO_write failed in ReadEncryptedBuffer\n");
+      }
+      bytes_processed = 0;
+    }
   }
+  if (SSL_LOG_DATA) Log::Print(
+      "Leaving ProcessReadEncryptedBuffer wrote %d bytes\n", bytes_processed);
   return bytes_processed;
 }
 
 
-intptr_t SSLFilter::ProcessWriteEncryptedBuffer(int start, int end) {
+int SSLFilter::ProcessWriteEncryptedBuffer(int start, int end) {
   int length = end - start;
   int bytes_processed = 0;
   if (length > 0) {
-    uint8_t* buffer = buffers_[kWriteEncrypted];
-    const uint8_t* buf1;
-    const uint8_t* buf2;
-    unsigned int len1;
-    unsigned int len2;
-    memio_Private* secret = memio_GetSecret(filter_);
-    int status = memio_GetWriteParams(secret, &buf1, &len1, &buf2, &len2);
-    if (status != 0) {
-      return -1;
-    }
-    int bytes_to_send =
-        dart::Utils::Minimum(len1, static_cast<unsigned>(length));
-    if (bytes_to_send > 0) {
-      memmove(buffer + start, buf1, bytes_to_send);
-      bytes_processed = bytes_to_send;
-    }
-    bytes_to_send = dart::Utils::Minimum(len2,
-        static_cast<unsigned>(length - bytes_processed));
-    if (bytes_to_send > 0) {
-      memmove(buffer + start + bytes_processed, buf2, bytes_to_send);
-      bytes_processed += bytes_to_send;
-    }
-    if (bytes_processed > 0) {
-      memio_PutWriteResult(secret, bytes_processed);
+    bytes_processed = BIO_read(socket_side_,
+                               buffers_[kWriteEncrypted] + start,
+                               length);
+    if (bytes_processed < 0) {
+      if (SSL_LOG_DATA) Log::Print(
+          "WriteEncrypted BIO_read returned error %d\n", bytes_processed);
+      return 0;
+    } else {
+      if (SSL_LOG_DATA) Log::Print(
+          "WriteEncrypted  BIO_read wrote %d bytes\n", bytes_processed);
     }
   }
   return bytes_processed;
diff --git a/runtime/bin/secure_socket.h b/runtime/bin/secure_socket.h
index 5deccc1..cd3611a 100644
--- a/runtime/bin/secure_socket.h
+++ b/runtime/bin/secure_socket.h
@@ -5,19 +5,19 @@
 #ifndef BIN_SECURE_SOCKET_H_
 #define BIN_SECURE_SOCKET_H_
 
+#ifdef DART_IO_SECURE_SOCKET_DISABLED
+#error "secure_socket.h can only be included on builds with SSL enabled"
+#endif
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <sys/types.h>
 
-#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
-#include <prinit.h>
-#include <prerror.h>
-#include <prnetdb.h>
-#include <ssl.h>
-#else
-struct PRFileDesc;
-#endif
+#include <openssl/bio.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <openssl/x509.h>
 
 #include "bin/builtin.h"
 #include "bin/dartutils.h"
@@ -28,6 +28,10 @@
 namespace dart {
 namespace bin {
 
+/* These are defined in root_certificates.cc. */
+extern const unsigned char* root_certificates_pem;
+extern unsigned int root_certificates_pem_length;
+
 /*
  * SSLFilter encapsulates the NSS SSL(TLS) code in a filter, that communicates
  * with the containing _SecureFilterImpl Dart object through four shared
@@ -49,20 +53,18 @@
 
   SSLFilter()
       : callback_error(NULL),
+        ssl_(NULL),
         string_start_(NULL),
         string_length_(NULL),
         handshake_complete_(NULL),
         bad_certificate_callback_(NULL),
         in_handshake_(false),
-        client_certificate_name_(NULL),
-        filter_(NULL) { }
+        hostname_(NULL) { }
 
   void Init(Dart_Handle dart_this);
-  void Connect(const char* host,
-               const RawAddr& raw_addr,
-               int port,
+  void Connect(const char* hostname,
+               SSL_CTX* context,
                bool is_server,
-               const char* certificate_name,
                bool request_client_certificate,
                bool require_client_certificate,
                bool send_client_certificate,
@@ -78,27 +80,29 @@
   Dart_Handle bad_certificate_callback() {
     return Dart_HandleFromPersistent(bad_certificate_callback_);
   }
-  intptr_t ProcessReadPlaintextBuffer(int start, int end);
-  intptr_t ProcessWritePlaintextBuffer(int start1, int end1,
-                                       int start2, int end2);
-  intptr_t ProcessReadEncryptedBuffer(int start, int end);
-  intptr_t ProcessWriteEncryptedBuffer(int start, int end);
+  int ProcessReadPlaintextBuffer(int start, int end);
+  int ProcessWritePlaintextBuffer(int start, int end);
+  int ProcessReadEncryptedBuffer(int start, int end);
+  int ProcessWriteEncryptedBuffer(int start, int end);
   bool ProcessAllBuffers(int starts[kNumBuffers],
                          int ends[kNumBuffers],
                          bool in_handshake);
   Dart_Handle PeerCertificate();
-  static void InitializeLibrary(const char* certificate_database,
-                                const char* password,
-                                bool use_builtin_root_certificates,
-                                bool report_duplicate_initialization = true);
+  static void InitializeLibrary();
   Dart_Handle callback_error;
 
   static CObject* ProcessFilterRequest(const CObjectArray& request);
 
+  // The index of the external data field in _ssl that points to the SSLFilter.
+  static int filter_ssl_index;
+
+  // TODO(whesse): make private:
+  SSL* ssl_;
+  BIO* socket_side_;
+
+
  private:
-  static const int kMemioBufferSize = 20 * KB;
   static bool library_initialized_;
-  static const char* password_;
   static Mutex* mutex_;  // To protect library initialization.
 
   uint8_t* buffers_[kNumBuffers];
@@ -111,8 +115,8 @@
   Dart_PersistentHandle bad_certificate_callback_;
   bool in_handshake_;
   bool is_server_;
-  char* client_certificate_name_;
-  PRFileDesc* filter_;
+  char* hostname_;
+  X509_VERIFY_PARAM* certificate_checking_parameters_;
 
   static bool isBufferEncrypted(int i) {
     return static_cast<BufferIndex>(i) >= kFirstEncrypted;
diff --git a/runtime/bin/secure_socket_patch.dart b/runtime/bin/secure_socket_patch.dart
index 4e22a14..c8b0725 100644
--- a/runtime/bin/secure_socket_patch.dart
+++ b/runtime/bin/secure_socket_patch.dart
@@ -5,11 +5,6 @@
 patch class SecureSocket {
   /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) =>
       new _SecureSocket(rawSocket);
-
-  /* patch */ static void initialize({String database,
-                                      String password,
-                                      bool useBuiltinRoots: true})
-  native "SecureSocket_InitializeLibrary";
 }
 
 
@@ -17,6 +12,9 @@
   /* patch */ factory _SecureFilter() => new _SecureFilterImpl();
 }
 
+patch class X509Certificate {
+  /* patch */ factory X509Certificate._() => new _X509CertificateImpl();
+}
 
 class _SecureSocket extends _Socket implements SecureSocket {
   _SecureSocket(RawSecureSocket raw) : super(raw);
@@ -79,10 +77,8 @@
   }
 
   void connect(String hostName,
-               Uint8List sockaddrStorage,
-               int port,
+               SecurityContext context,
                bool is_server,
-               String certificateName,
                bool requestClientCertificate,
                bool requireClientCertificate,
                bool sendClientCertificate,
@@ -119,3 +115,68 @@
 
   List<_ExternalBuffer> buffers;
 }
+
+patch class SecurityContext {
+  /* patch */ factory SecurityContext() {
+    return new _SecurityContext();
+  }
+
+  /* patch */ static SecurityContext get defaultContext {
+    return _SecurityContext.defaultContext;
+  }
+}
+
+class _SecurityContext
+    extends NativeFieldWrapperClass1
+    implements SecurityContext {
+  _SecurityContext() {
+    _createNativeContext();
+  }
+
+  void _createNativeContext() native "SecurityContext_Allocate";
+
+  static final SecurityContext defaultContext =
+      new _SecurityContext().._trustBuiltinRoots();
+
+  void usePrivateKey(String keyFile, {String password})
+      native "SecurityContext_UsePrivateKey";
+  void setTrustedCertificates({String file, String directory})
+      native "SecurityContext_SetTrustedCertificates";
+  void useCertificateChain(String file)
+      native "SecurityContext_UseCertificateChain";
+  void setClientAuthorities(String file)
+      native "SecurityContext_SetClientAuthorities";
+  void setAlpnProtocols(List<String> protocols, bool isServer) {
+    Uint8List encodedProtocols =
+        SecurityContext._protocolsToLengthEncoding(protocols);
+    _setAlpnProtocols(encodedProtocols, isServer);
+  }
+  void _setAlpnProtocols(Uint8List protocols, bool isServer)
+      native "SecurityContext_SetAlpnProtocols";
+  void _trustBuiltinRoots()
+      native "SecurityContext_TrustBuiltinRoots";
+}
+
+/**
+ * _X509CertificateImpl wraps an X509 certificate object held by the BoringSSL
+ * library. It exposes the fields of the certificate object.
+ */
+class _X509CertificateImpl extends NativeFieldWrapperClass1
+    implements X509Certificate {
+  // The native field must be set manually on a new object, in native code.
+  // This is done by WrappedX509 in secure_socket.cc.
+  _X509CertificateImpl();
+
+  String get subject native "X509_Subject";
+  String get issuer native "X509_Issuer";
+  DateTime get startValidity {
+    return new DateTime.fromMillisecondsSinceEpoch(_startValidity(),
+                                                   isUtc: true);
+  }
+  DateTime get endValidity {
+    return new DateTime.fromMillisecondsSinceEpoch(_endValidity(),
+                                                   isUtc: true);
+  }
+  int _startValidity() native "X509_StartValidity";
+  int _endValidity() native "X509_EndValidity";
+}
\ No newline at end of file
diff --git a/runtime/bin/secure_socket_unsupported.cc b/runtime/bin/secure_socket_unsupported.cc
index 231b71e..6bcc55e 100644
--- a/runtime/bin/secure_socket_unsupported.cc
+++ b/runtime/bin/secure_socket_unsupported.cc
@@ -99,6 +99,66 @@
       "Secure Sockets unsupported on this platform"));
 }
 
+void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_UsePrivateKey)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_SetClientAuthorities)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_SetTrustedCertificates)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(SecurityContext_UseCertificateChain)(
+    Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
+void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) {
+  Dart_ThrowException(DartUtils::NewDartArgumentError(
+      "Secure Sockets unsupported on this platform"));
+}
+
 class SSLFilter {
  public:
   static CObject* ProcessFilterRequest(const CObjectArray& request);
diff --git a/runtime/bin/utils.h b/runtime/bin/utils.h
index 10ca3735..bb55a76 100644
--- a/runtime/bin/utils.h
+++ b/runtime/bin/utils.h
@@ -20,7 +20,7 @@
   enum SubSystem {
     kSystem,
     kGetAddressInfo,
-    kNSS,
+    kBoringSSL,
     kUnknown = -1
   };
 
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index 1f807e7..a672bf2 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -40,6 +40,10 @@
   }
 
   void post(dynamic result) {
+    if (result == null) {
+      // Do nothing.
+      return;
+    }
     try {
       socket.add(result);
     } catch (_) {
@@ -65,6 +69,10 @@
       : super(service, sendEvents:false);
 
   void post(String result) {
+    if (result == null) {
+      close();
+      return;
+    }
     request.response..headers.contentType = jsonContentType
                     ..write(result)
                     ..close();
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index 89d802f..3037ad6 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -313,7 +313,7 @@
   RETURN_ERROR_HANDLE(result);
   ASSERT(data_buffer_length == data_list_buffer_length);
   ASSERT(data_list_buffer != NULL);
-  ASSERT(type = Dart_TypedData_kUint8);
+  ASSERT(type == Dart_TypedData_kUint8);
   memmove(data_list_buffer, &data_buffer[0], data_buffer_length);
   result = Dart_TypedDataReleaseData(data_list);
   RETURN_ERROR_HANDLE(result);
diff --git a/runtime/codereview.settings b/runtime/codereview.settings
index f0cfca3..210cc8b 100644
--- a/runtime/codereview.settings
+++ b/runtime/codereview.settings
@@ -1,4 +1,4 @@
 # This file is used by gcl to get repository specific information.
 CODE_REVIEW_SERVER: http://codereview.chromium.org/
-VIEW_VC: https://code.google.com/p/dart/source/detail?r=
+VIEW_VC: https://github.com/dart-lang/sdk/commit/
 CC_LIST: reviews@dartlang.org,vm-dev@dartlang.org
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index d3f54b1..8b9070c 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -865,6 +865,7 @@
  */
 DART_EXPORT bool Dart_Initialize(
     const uint8_t* vm_isolate_snapshot,
+    const uint8_t* instructions_snapshot,
     Dart_IsolateCreateCallback create,
     Dart_IsolateInterruptCallback interrupt,
     Dart_IsolateUnhandledExceptionCallback unhandled_exception,
@@ -1841,6 +1842,25 @@
                                        intptr_t index);
 
 /**
+* Gets a range of Objects from a List.
+*
+* If any of the requested index values are out of bounds, an error occurs.
+*
+* May generate an unhandled exception error.
+*
+* \param list A List.
+* \param offset The offset of the first item to get.
+* \param length The number of items to get.
+* \param result A pointer to fill with the objects.
+*
+* \return Success if no error occurs during the operation.
+*/
+DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list,
+                                          intptr_t offset,
+                                          intptr_t length,
+                                          Dart_Handle* result);
+
+/**
  * Sets the Object at some index of a List.
  *
  * If the index is out of bounds, an error occurs.
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index cd096de..2ba982c 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -879,6 +879,87 @@
  * ========
  */
 
+/** Timeline stream for Dart API calls */
+#define DART_TIMELINE_STREAM_API (1 << 0)
+/** Timeline stream for compiler events */
+#define DART_TIMELINE_STREAM_COMPILER (1 << 1)
+/** Timeline stream for embedder provided events */
+#define DART_TIMELINE_STREAM_EMBEDDER (1 << 2)
+/** Timeline stream for GC events */
+#define DART_TIMELINE_STREAM_GC (1 << 3)
+/** Timeline stream for isolate events */
+#define DART_TIMELINE_STREAM_ISOLATE (1 << 4)
+
+/** Enable all timeline stream recording */
+#define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API |                   \
+                                  DART_TIMELINE_STREAM_COMPILER |              \
+                                  DART_TIMELINE_STREAM_EMBEDDER |              \
+                                  DART_TIMELINE_STREAM_GC |                    \
+                                  DART_TIMELINE_STREAM_ISOLATE)
+
+/** Disable all timeline stream recording */
+#define DART_TIMELINE_STREAM_DISABLE 0
+
+/**
+ * Start recording timeline events for the current isolate.
+ *
+ * \param stream_mask A bitmask of streams that should be recorded.
+ *
+ * NOTE: Calling with 0 disables recording of all streams.
+ */
+DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask);
+
+typedef enum {
+  /** Indicates a new stream is being output */
+  Dart_StreamConsumer_kStart = 0,
+  /** Data for the current stream */
+  Dart_StreamConsumer_kData = 1,
+  /** Indicates stream is finished */
+  Dart_StreamConsumer_kFinish = 2,
+} Dart_StreamConsumer_State;
+
+/**
+ * A stream consumer callback function.
+ *
+ * This function will be called repeatedly until there is no more data in a
+ * stream and there are no more streams.
+ *
+ * \param state Indicates a new stream, data, or a finished stream.
+ * \param stream_name A name for this stream. Not guaranteed to be meaningful.
+ * \param buffer A pointer to the stream data.
+ * \param buffer_length The number of bytes at buffer that should be consumed.
+ * \param stream_callback_data The pointer passed in when requesting the stream.
+ *
+ * At the start of each stream state will be DART_STREAM_CONSUMER_STATE_START
+ * and buffer will be NULL.
+ *
+ * For each chunk of data the state will be DART_STREAM_CONSUMER_STATE_DATA
+ * and buffer will not be NULL.
+ *
+ * At the end of each stream state will be DART_STREAM_CONSUMER_STATE_FINISH
+ * and buffer will be NULL.
+ */
+typedef void (*Dart_StreamConsumer)(
+    Dart_StreamConsumer_State state,
+    const char* stream_name,
+    uint8_t* buffer,
+    intptr_t buffer_length,
+    void* stream_callback_data);
+
+
+/**
+ * Get the timeline for the current isolate in trace-event format
+ *
+ * \param consumer A Dart_StreamConsumer.
+ * \param user_data User data passed into consumer.
+ *
+ * NOTE: The trace-event format is documented here: https://goo.gl/hDZw5M
+ *
+ * \return True if a stream was output.
+ */
+DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
+                                       void* user_data);
+
 /**
  * Add a duration timeline event to the embedder stream for the current isolate.
  *
diff --git a/runtime/lib/async_patch.dart b/runtime/lib/async_patch.dart
index 682ee8b..d785347 100644
--- a/runtime/lib/async_patch.dart
+++ b/runtime/lib/async_patch.dart
@@ -4,3 +4,181 @@
 
 import "dart:_internal";
 
+// We need to pass the value as first argument and leave the second and third
+// arguments empty (used for error handling).
+// See vm/ast_transformer.cc for usage.
+Function _asyncThenWrapperHelper(continuation) {
+  // Any function that is used as an asynchronous callback must be registered
+  // in the current Zone. Normally, this is done by the future when a
+  // callback is registered (for example with `.then` or `.catchError`). In our
+  // case we want to reuse the same callback multiple times and therefore avoid
+  // the multiple registrations. For our internal futures (`_Future`) we can
+  // use the shortcut-version of `.then`, and skip the registration. However,
+  // that means that the continuation must be registered by us.
+  //
+  // Furthermore, we know that the root-zone doesn't actually do anything and
+  // we can therefore skip the registration call for it.
+  //
+  // Note, that the continuation accepts up to three arguments. If the current
+  // zone is the root zone, we don't wrap the continuation, and a bad
+  // `Future` implementation could potentially invoke the callback with the
+  // wrong number of arguments.
+  if (Zone.current == Zone.ROOT) return continuation;
+  return Zone.current.registerUnaryCallback((x) => continuation(x, null, null));
+}
+
+// We need to pass the exception and stack trace objects as second and third
+// parameter to the continuation.  See vm/ast_transformer.cc for usage.
+Function _asyncErrorWrapperHelper(continuation) {
+  // See comments of `_asyncThenWrapperHelper`.
+  var errorCallback = (e, s) => continuation(null, e, s);
+  if (Zone.current == Zone.ROOT) return errorCallback;
+  return Zone.current.registerBinaryCallback(errorCallback);
+}
+
+/// Registers the [thenCallback] and [errorCallback] on the given [object].
+///
+/// If [object] is not a future, then it is wrapped into one.
+///
+/// Returns the result of registering with `.then`.
+Future _awaitHelper(
+    var object, Function thenCallback, Function errorCallback) {
+  if (object is! Future) {
+    object = new _Future().._setValue(object);
+  } else if (object is! _Future) {
+    return object.then(thenCallback, onError: errorCallback);
+  }
+  // `object` is a `_Future`.
+  //
+  // Since the callbacks have been registered in the current zone (see
+  // [_asyncThenWrapperHelper] and [_asyncErrorWrapperHelper]), we can avoid
+  // another registration and directly invoke the no-zone-registration `.then`.
+  //
+  // We can only do this for our internal futures (the default implementation of
+  // all futures that are constructed by the `dart:async` library).
+  return object._thenNoZoneRegistration(thenCallback, errorCallback);
+}
+
+// _AsyncStarStreamController is used by the compiler to implement
+// async* generator functions.
+class _AsyncStarStreamController {
+  StreamController controller;
+  Function asyncStarBody;
+  bool isAdding = false;
+  bool onListenReceived = false;
+  bool isScheduled = false;
+  bool isSuspendedAtYield = false;
+  Completer cancellationCompleter = null;
+
+  Stream get stream => controller.stream;
+
+  void runBody() {
+    isScheduled = false;
+    isSuspendedAtYield = false;
+    asyncStarBody();
+  }
+
+  void scheduleGenerator() {
+    if (isScheduled || controller.isPaused || isAdding) {
+      return;
+    }
+    isScheduled = true;
+    scheduleMicrotask(runBody);
+  }
+
+  // Adds element to steam, returns true if the caller should terminate
+  // execution of the generator.
+  //
+  // TODO(hausner): Per spec, the generator should be suspended before
+  // exiting when the stream is closed. We could add a getter like this:
+  // get isCancelled => controller.hasListener;
+  // The generator would translate a 'yield e' statement to
+  // controller.add(e);
+  // suspend;
+  // if (controller.isCancelled) return;
+  bool add(event) {
+    if (!onListenReceived) _fatal("yield before stream is listened to!");
+    if (isSuspendedAtYield) _fatal("unexpected yield");
+    // If stream is cancelled, tell caller to exit the async generator.
+    if (!controller.hasListener) {
+      return true;
+    }
+    controller.add(event);
+    scheduleGenerator();
+    isSuspendedAtYield = true;
+    return false;
+  }
+
+  // Adds the elements of stream into this controller's stream.
+  // The generator will be scheduled again when all of the
+  // elements of the added stream have been consumed.
+  // Returns true if the caller should terminate
+  // execution of the generator.
+  bool addStream(Stream stream) {
+    if (!onListenReceived) _fatal("yield before stream is listened to!");
+    // If stream is cancelled, tell caller to exit the async generator.
+    if (!controller.hasListener) return true;
+    isAdding = true;
+    var whenDoneAdding =
+        controller.addStream(stream as Stream, cancelOnError: false);
+    whenDoneAdding.then((_) {
+      isAdding = false;
+      scheduleGenerator();
+    });
+    return false;
+  }
+
+  void addError(error, stackTrace) {
+    if ((cancellationCompleter != null) && !cancellationCompleter.isCompleted) {
+      // If the stream has been cancelled, complete the cancellation future
+      // with the error.
+      cancellationCompleter.completeError(error, stackTrace);
+      return;
+    }
+    // If stream is cancelled, tell caller to exit the async generator.
+    if (!controller.hasListener) return;
+    controller.addError(error, stackTrace);
+    // No need to schedule the generator body here. This code is only
+    // called from the catch clause of the implicit try-catch-finally
+    // around the generator body. That is, we are on the error path out
+    // of the generator and do not need to run the generator again.
+  }
+
+  close() {
+    if ((cancellationCompleter != null) && !cancellationCompleter.isCompleted) {
+      // If the stream has been cancelled, complete the cancellation future
+      // with the error.
+      cancellationCompleter.complete();
+    }
+    controller.close();
+  }
+
+  _AsyncStarStreamController(this.asyncStarBody) {
+    controller = new StreamController(onListen: this.onListen,
+                                      onResume: this.onResume,
+                                      onCancel: this.onCancel);
+  }
+
+  onListen() {
+    assert(!onListenReceived);
+    onListenReceived = true;
+    scheduleGenerator();
+  }
+
+  onResume() {
+    if (isSuspendedAtYield) {
+      scheduleGenerator();
+    }
+  }
+
+  onCancel() {
+    if (controller.isClosed) {
+      return null;
+    }
+    if (cancellationCompleter == null) {
+      cancellationCompleter = new Completer();
+      scheduleGenerator();
+    }
+    return cancellationCompleter.future;
+  }
+}
diff --git a/runtime/lib/core_patch.dart b/runtime/lib/core_patch.dart
index 2a45ae7..79749fd 100644
--- a/runtime/lib/core_patch.dart
+++ b/runtime/lib/core_patch.dart
@@ -8,12 +8,6 @@
 // Equivalent of calling FATAL from C++ code.
 _fatal(msg) native "DartCore_fatal";
 
-// We need to pass the exception and stack trace objects as second and third
-// parameter to the continuation.  See vm/ast_transformer.cc for usage.
-void  _asyncCatchHelper(catchFunction, continuation) {
-  catchFunction((e, s) => continuation(null, e, s));
-}
-
 // The members of this class are cloned and added to each class that
 // represents an enum type.
 class _EnumHelper {
@@ -26,132 +20,6 @@
   int get hashCode => _enum_names[index].hashCode;
 }
 
-
-// _AsyncStarStreamController is used by the compiler to implement
-// async* generator functions.
-class _AsyncStarStreamController {
-  StreamController controller;
-  Function asyncStarBody;
-  bool isAdding = false;
-  bool onListenReceived = false;
-  bool isScheduled = false;
-  bool isSuspendedAtYield = false;
-  Completer cancellationCompleter = null;
-
-  Stream get stream => controller.stream;
-
-  void runBody() {
-    isScheduled = false;
-    isSuspendedAtYield = false;
-    asyncStarBody();
-  }
-
-  void scheduleGenerator() {
-    if (isScheduled || controller.isPaused || isAdding) {
-      return;
-    }
-    isScheduled = true;
-    scheduleMicrotask(runBody);
-  }
-
-  // Adds element to steam, returns true if the caller should terminate
-  // execution of the generator.
-  //
-  // TODO(hausner): Per spec, the generator should be suspended before
-  // exiting when the stream is closed. We could add a getter like this:
-  // get isCancelled => controller.hasListener;
-  // The generator would translate a 'yield e' statement to
-  // controller.add(e);
-  // suspend;
-  // if (controller.isCancelled) return;
-  bool add(event) {
-    if (!onListenReceived) _fatal("yield before stream is listened to!");
-    if (isSuspendedAtYield) _fatal("unexpected yield");
-    // If stream is cancelled, tell caller to exit the async generator.
-    if (!controller.hasListener) {
-      return true;
-    }
-    controller.add(event);
-    scheduleGenerator();
-    isSuspendedAtYield = true;
-    return false;
-  }
-
-  // Adds the elements of stream into this controller's stream.
-  // The generator will be scheduled again when all of the
-  // elements of the added stream have been consumed.
-  // Returns true if the caller should terminate
-  // execution of the generator.
-  bool addStream(Stream stream) {
-    if (!onListenReceived) _fatal("yield before stream is listened to!");
-    // If stream is cancelled, tell caller to exit the async generator.
-    if (!controller.hasListener) return true;
-    isAdding = true;
-    var whenDoneAdding =
-        controller.addStream(stream as Stream, cancelOnError: false);
-    whenDoneAdding.then((_) {
-      isAdding = false;
-      scheduleGenerator();
-    });
-    return false;
-  }
-
-  void addError(error, stackTrace) {
-    if ((cancellationCompleter != null) && !cancellationCompleter.isCompleted) {
-      // If the stream has been cancelled, complete the cancellation future
-      // with the error.
-      cancellationCompleter.completeError(error, stackTrace);
-      return;
-    }
-    // If stream is cancelled, tell caller to exit the async generator.
-    if (!controller.hasListener) return;
-    controller.addError(error, stackTrace);
-    // No need to schedule the generator body here. This code is only
-    // called from the catch clause of the implicit try-catch-finally
-    // around the generator body. That is, we are on the error path out
-    // of the generator and do not need to run the generator again.
-  }
-
-  close() {
-    if ((cancellationCompleter != null) && !cancellationCompleter.isCompleted) {
-      // If the stream has been cancelled, complete the cancellation future
-      // with the error.
-      cancellationCompleter.complete();
-    }
-    controller.close();
-  }
-
-  _AsyncStarStreamController(this.asyncStarBody) {
-    controller = new StreamController(onListen: this.onListen,
-                                      onResume: this.onResume,
-                                      onCancel: this.onCancel);
-  }
-
-  onListen() {
-    assert(!onListenReceived);
-    onListenReceived = true;
-    scheduleGenerator();
-  }
-
-  onResume() {
-    if (isSuspendedAtYield) {
-      scheduleGenerator();
-    }
-  }
-
-  onCancel() {
-    if (controller.isClosed) {
-      return null;
-    }
-    if (cancellationCompleter == null) {
-      cancellationCompleter = new Completer();
-      scheduleGenerator();
-    }
-    return cancellationCompleter.future;
-  }
-}
-
-
 // _SyncIterable and _syncIterator are used by the compiler to
 // implement sync* generator functions. A sync* generator allocates
 // and returns a new _SyncIterable object.
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 0d6065d..6c5c0c2 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -67,13 +67,13 @@
              const [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]];
 
   static List _computeUpperPart(int localMs) {
-    final int DAYS_IN_4_YEARS = 4 * 365 + 1;
-    final int DAYS_IN_100_YEARS = 25 * DAYS_IN_4_YEARS - 1;
-    final int DAYS_IN_400_YEARS = 4 * DAYS_IN_100_YEARS + 1;
-    final int DAYS_1970_TO_2000 = 30 * 365 + 7;
-    final int DAYS_OFFSET = 1000 * DAYS_IN_400_YEARS + 5 * DAYS_IN_400_YEARS -
+    const int DAYS_IN_4_YEARS = 4 * 365 + 1;
+    const int DAYS_IN_100_YEARS = 25 * DAYS_IN_4_YEARS - 1;
+    const int DAYS_IN_400_YEARS = 4 * DAYS_IN_100_YEARS + 1;
+    const int DAYS_1970_TO_2000 = 30 * 365 + 7;
+    const int DAYS_OFFSET = 1000 * DAYS_IN_400_YEARS + 5 * DAYS_IN_400_YEARS -
                             DAYS_1970_TO_2000;
-    final int YEARS_OFFSET = 400000;
+    const int YEARS_OFFSET = 400000;
 
     int resultYear = 0;
     int resultMonth = 0;
@@ -295,9 +295,9 @@
    * Code is adapted from V8.
    */
   static int _yearsFromSecondsSinceEpoch(int secondsSinceEpoch) {
-    final int DAYS_IN_4_YEARS = 4 * 365 + 1;
-    final int DAYS_IN_100_YEARS = 25 * DAYS_IN_4_YEARS - 1;
-    final int DAYS_YEAR_2098 = DAYS_IN_100_YEARS + 6 * DAYS_IN_4_YEARS;
+    const int DAYS_IN_4_YEARS = 4 * 365 + 1;
+    const int DAYS_IN_100_YEARS = 25 * DAYS_IN_4_YEARS - 1;
+    const int DAYS_YEAR_2098 = DAYS_IN_100_YEARS + 6 * DAYS_IN_4_YEARS;
 
     int days = secondsSinceEpoch ~/ Duration.SECONDS_PER_DAY;
     if (days > 0 && days < DAYS_YEAR_2098) {
@@ -319,7 +319,7 @@
    * * The week day of [this] is the same as the one for the returned date.
    */
   static int _equivalentSeconds(int millisecondsSinceEpoch) {
-    final int CUT_OFF_SECONDS = 2100000000;
+    const int CUT_OFF_SECONDS = 2100000000;
 
     int secondsSinceEpoch = _flooredDivision(millisecondsSinceEpoch,
                                              Duration.MILLISECONDS_PER_SECOND);
diff --git a/runtime/lib/developer.cc b/runtime/lib/developer.cc
index 464e89b..d2466af 100644
--- a/runtime/lib/developer.cc
+++ b/runtime/lib/developer.cc
@@ -59,4 +59,18 @@
   return Object::null();
 }
 
+
+DEFINE_NATIVE_ENTRY(Developer_lookupExtension, 1) {
+  GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
+  return isolate->LookupServiceExtensionHandler(name);
+}
+
+
+DEFINE_NATIVE_ENTRY(Developer_registerExtension, 2) {
+  GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
+  GET_NON_NULL_NATIVE_ARGUMENT(Instance, handler, arguments->NativeArgAt(1));
+  isolate->RegisterServiceExtensionHandler(name, handler);
+  return Object::null();
+}
+
 }  // namespace dart
diff --git a/runtime/lib/developer.dart b/runtime/lib/developer.dart
index 707d591..71b1f5c 100644
--- a/runtime/lib/developer.dart
+++ b/runtime/lib/developer.dart
@@ -7,14 +7,14 @@
 
 patch Object inspect(Object object) native "Developer_inspect";
 
-patch log(String message,
-          {DateTime time,
-           int sequenceNumber,
-           int level: 0,
-           String name: '',
-           Zone zone,
-           Object error,
-           StackTrace stackTrace}) {
+patch void log(String message,
+               {DateTime time,
+                int sequenceNumber,
+                int level: 0,
+                String name: '',
+                Zone zone,
+                Object error,
+                StackTrace stackTrace}) {
   if (message is! String) {
     throw new ArgumentError(message, "message", "Must be a String");
   }
@@ -29,14 +29,14 @@
   } else {
     _nextSequenceNumber = sequenceNumber + 1;
   }
-  return _log(message,
-              time.millisecondsSinceEpoch,
-              sequenceNumber,
-              level,
-              name,
-              zone,
-              error,
-              stackTrace);
+  _log(message,
+       time.millisecondsSinceEpoch,
+       sequenceNumber,
+       level,
+       name,
+       zone,
+       error,
+       stackTrace);
 }
 
 int _nextSequenceNumber = 0;
@@ -49,3 +49,9 @@
      Zone zone,
      Object error,
      StackTrace stackTrace) native "Developer_log";
+
+patch ServiceExtensionHandler _lookupExtension(String method)
+    native "Developer_lookupExtension";
+
+patch _registerExtension(String method, ServiceExtensionHandler handler)
+    native "Developer_registerExtension";
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 280bf3b..ea7c1cf 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -246,7 +246,7 @@
 
   // Order is: NaN > Infinity > ... > 0.0 > -0.0 > ... > -Infinity.
   int compareTo(num other) {
-    final int EQUAL = 0, LESS = -1, GREATER = 1;
+    const int EQUAL = 0, LESS = -1, GREATER = 1;
     if (this < other) {
       return LESS;
     } else if (this > other) {
diff --git a/runtime/lib/math_patch.dart b/runtime/lib/math_patch.dart
index 5942078..e9cc083 100644
--- a/runtime/lib/math_patch.dart
+++ b/runtime/lib/math_patch.dart
@@ -114,7 +114,7 @@
   void _nextState() native "Random_nextState";
 
   int nextInt(int max) {
-    final limit = 0x3FFFFFFF;
+    const limit = 0x3FFFFFFF;
     if (max <= 0 || ((max > limit) && (max > _POW2_32))) {
       throw new ArgumentError("max must be positive and < 2^32:"
                                          " $max");
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 21a5ab0..eb1a2a2 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -312,7 +312,7 @@
 
   int indexOf(Pattern pattern, [int start = 0]) {
     if ((start < 0) || (start > this.length)) {
-      throw new RangeError.range(start, 0, this.length);
+      throw new RangeError.range(start, 0, this.length, "start");
     }
     if (pattern is String) {
       String other = pattern;
@@ -844,26 +844,10 @@
   }
 
   Iterable<Match> allMatches(String string, [int start = 0]) {
-    List<Match> result = new List<Match>();
-    int length = string.length;
-    int patternLength = this.length;
-    int startIndex = start;
-    while (true) {
-      int position = string.indexOf(this, startIndex);
-      if (position == -1) {
-        break;
-      }
-      result.add(new _StringMatch(position, string, this));
-      int endIndex = position + patternLength;
-      if (endIndex == length) {
-        break;
-      } else if (position == endIndex) {
-        ++startIndex;  // empty match, advance and restart
-      } else {
-        startIndex = endIndex;
-      }
+    if (start < 0 || start > string.length) {
+      throw new RangeError.range(start, 0, string.length, "start");
     }
-    return result;
+    return new _StringAllMatchesIterable(string, this, start);
   }
 
   Match matchAsPrefix(String string, [int start = 0]) {
@@ -1323,3 +1307,53 @@
   final String input;
   final String pattern;
 }
+
+
+class _StringAllMatchesIterable extends Iterable<Match> {
+  final String _input;
+  final String _pattern;
+  final int _index;
+
+  _StringAllMatchesIterable(this._input, this._pattern, this._index);
+
+  Iterator<Match> get iterator =>
+      new _StringAllMatchesIterator(_input, _pattern, _index);
+
+  Match get first {
+    int index = _input.indexOf(_pattern, _index);
+    if (index >= 0) {
+      return new _StringMatch(index, _input, _pattern);
+    }
+    throw IterableElementError.noElement();
+  }
+}
+
+class _StringAllMatchesIterator implements Iterator<Match> {
+  final String _input;
+  final String _pattern;
+  int _index;
+  Match _current;
+
+  _StringAllMatchesIterator(this._input, this._pattern, this._index);
+
+  bool moveNext() {
+    if (_index + _pattern.length > _input.length) {
+      _current = null;
+      return false;
+    }
+    var index = _input.indexOf(_pattern, _index);
+    if (index < 0) {
+      _index = _input.length + 1;
+      _current = null;
+      return false;
+    }
+    int end = index + _pattern.length;
+    _current = new _StringMatch(index, _input, _pattern);
+    // Empty match, don't start at same location again.
+    if (end == _index) end++;
+    _index = end;
+    return true;
+  }
+
+  Match get current => _current;
+}
diff --git a/runtime/observatory/.analysis_options b/runtime/observatory/.analysis_options
new file mode 100644
index 0000000..fd7cfbf
--- /dev/null
+++ b/runtime/observatory/.analysis_options
@@ -0,0 +1,9 @@
+analyzer:
+  exclude:
+# Remove once Dart 1.13-dev is released
+    - tests/service/developer_extension_test.dart
+# Remove once Dart 1.13-dev is released
+    - tests/service/logging_test.dart
+    - tests/ui/log.dart
+# Remove once Dart 1.13-dev is released
+    - tests/service/get_stack_rpc_test.dart
diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart
index ddbfdc2..2a5e2b7 100644
--- a/runtime/observatory/lib/object_graph.dart
+++ b/runtime/observatory/lib/object_graph.dart
@@ -682,6 +682,8 @@
       }
     }
 
+    Logger.root.info("Start remap dominators");
+
     // Reindex doms by id instead of post order index so we can throw away
     // the post order arrays.
     var domById = new Uint32List(N + 1);
@@ -689,6 +691,8 @@
       domById[id] = postOrder[domByPOI[postOrderIndex[id]]];
     }
 
+    Logger.root.info("End remap dominators");
+
     domById[root] = 0;
 
     _doms = domById;
diff --git a/runtime/observatory/lib/service_common.dart b/runtime/observatory/lib/service_common.dart
index 0faa080..cde76a2 100644
--- a/runtime/observatory/lib/service_common.dart
+++ b/runtime/observatory/lib/service_common.dart
@@ -209,7 +209,7 @@
       }
       var event = map['params']['event'];
       var streamId = map['params']['streamId'];
-      postServiceEvent(streamId, event, data);
+      scheduleMicrotask(() { postServiceEvent(streamId, event, data); });
     });
   }
 
@@ -222,7 +222,7 @@
     if (map['method'] == 'streamNotify') {
       var event = map['params']['event'];
       var streamId = map['params']['streamId'];
-      postServiceEvent(streamId, event, null);
+      scheduleMicrotask(() { postServiceEvent(streamId, event, null); });
       return;
     }
 
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index ff45043..7b2217a 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -89,6 +89,7 @@
   void _onEvent(ServiceEvent event) {
     switch(event.kind) {
       case ServiceEvent.kIsolateStart:
+      case ServiceEvent.kIsolateRunnable:
       case ServiceEvent.kIsolateUpdate:
       case ServiceEvent.kBreakpointAdded:
       case ServiceEvent.kBreakpointResolved:
diff --git a/runtime/observatory/lib/src/elements/class_view.html b/runtime/observatory/lib/src/elements/class_view.html
index a8f8165..5dadba6 100644
--- a/runtime/observatory/lib/src/elements/class_view.html
+++ b/runtime/observatory/lib/src/elements/class_view.html
@@ -38,6 +38,10 @@
         </template>
         class {{ cls.name }}
       </h1>
+
+      <object-common object="{{ cls }}"></object-common>
+      <br>
+
       <div class="memberList">
         <div class="memberItem">
           <div class="memberName">library</div>
diff --git a/runtime/observatory/lib/src/elements/context_view.html b/runtime/observatory/lib/src/elements/context_view.html
index efffcb1..44972f3 100644
--- a/runtime/observatory/lib/src/elements/context_view.html
+++ b/runtime/observatory/lib/src/elements/context_view.html
@@ -27,10 +27,9 @@
         <h1>instance of Context</h1>
 
         <object-common object="{{ context }}"></object-common>
+        <br>
 
         <div class="memberList">
-          <div class="memberItem">&nbsp;</div>
-
           <template if="{{ context.parentContext != null }}">
             <div class="memberItem">
               <div class="memberName">parent context</div>
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index ede4571..ae16694 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -317,11 +317,13 @@
       '        c\n';
 }
 
-class NextCommand extends DebuggerCommand {
-  NextCommand(Debugger debugger) : super(debugger, 'next', []);
+class SmartNextCommand extends DebuggerCommand {
+  SmartNextCommand(Debugger debugger) : super(debugger, 'next', []) {
+    alias = 'n';
+  }
 
-  Future run(List<String> args) {
-    return debugger.next();
+  Future run(List<String> args) async {
+    return debugger.smartNext();
   }
 
   String helpShort =
@@ -337,6 +339,40 @@
       'Syntax: next\n';
 }
 
+class SyncNextCommand extends DebuggerCommand {
+  SyncNextCommand(Debugger debugger) : super(debugger, 'next-sync', []);
+
+  Future run(List<String> args) {
+    return debugger.syncNext();
+  }
+
+  String helpShort =
+      'Run until return/unwind to current activation.';
+
+  String helpLong =
+      'Continue running the isolate until control returns to the current '
+      'activation or one of its callers.\n'
+      '\n'
+      'Syntax: next-sync\n';
+}
+
+class AsyncNextCommand extends DebuggerCommand {
+  AsyncNextCommand(Debugger debugger) : super(debugger, 'next-async', []);
+
+  Future run(List<String> args) {
+    return debugger.asyncNext();
+  }
+
+  String helpShort =
+      'Step over await or yield';
+
+  String helpLong =
+      'Continue running the isolate until control returns to the current '
+      'activation of an async or async* function.\n'
+      '\n'
+      'Syntax: next-async\n';
+}
+
 class StepCommand extends DebuggerCommand {
   StepCommand(Debugger debugger) : super(debugger, 'step', []) {
     alias = 's';
@@ -445,33 +481,6 @@
       '# Display all log messages.\n';
 }
 
-class AsyncNextCommand extends DebuggerCommand {
-  AsyncNextCommand(Debugger debugger) : super(debugger, 'anext', []) {
-  }
-
-  Future run(List<String> args) async {
-    if (debugger.isolatePaused()) {
-      var event = debugger.isolate.pauseEvent;
-      if (event.asyncContinuation == null) {
-        debugger.console.print("No async continuation at this location");
-      } else {
-        return debugger.isolate.asyncStepOver()[Isolate.kFirstResume];
-      }
-    } else {
-      debugger.console.print('The program is already running');
-    }
-  }
-
-  String helpShort =
-      'Step over await or yield';
-
-  String helpLong =
-      'Continue running the isolate until control returns to the current '
-      'activation of an async or async* function.\n'
-      '\n'
-      'Syntax: anext\n';
-}
-
 class FinishCommand extends DebuggerCommand {
   FinishCommand(Debugger debugger) : super(debugger, 'finish', []);
 
@@ -937,7 +946,7 @@
   Future<List<String>> complete(List<String> args) {
     if (args.length != 1) {
       return new Future.value([args.join('')]);
-    } 
+    }
     var result = [];
     for (var isolate in debugger.vm.isolates) {
       var str = isolate.number.toString();
@@ -1205,26 +1214,27 @@
   ObservatoryDebugger() {
     _loadSettings();
     cmd = new RootCommand([
-        new HelpCommand(this),
-        new PrintCommand(this),
-        new DownCommand(this),
-        new UpCommand(this),
-        new FrameCommand(this),
-        new PauseCommand(this),
-        new ContinueCommand(this),
-        new NextCommand(this),
-        new StepCommand(this),
         new AsyncNextCommand(this),
-        new FinishCommand(this),
         new BreakCommand(this),
-        new SetCommand(this),
         new ClearCommand(this),
+        new ClsCommand(this),
+        new ContinueCommand(this),
         new DeleteCommand(this),
+        new DownCommand(this),
+        new FinishCommand(this),
+        new FrameCommand(this),
+        new HelpCommand(this),
         new InfoCommand(this),
         new IsolateCommand(this),
-        new RefreshCommand(this),
         new LogCommand(this),
-        new ClsCommand(this),
+        new PauseCommand(this),
+        new PrintCommand(this),
+        new RefreshCommand(this),
+        new SetCommand(this),
+        new SmartNextCommand(this),
+        new StepCommand(this),
+        new SyncNextCommand(this),
+        new UpCommand(this),
     ]);
     _consolePrinter = new _ConsoleStreamPrinter(this);
   }
@@ -1374,9 +1384,6 @@
         } else {
           console.print('Paused at ${script.name}:${line}:${col}');
         }
-        if (event.asyncContinuation != null) {
-          console.print("Paused in async function: 'anext' available");
-        }
       });
     }
   }
@@ -1475,10 +1482,11 @@
         }
         break;
 
-      case ServiceEvent.kIsolateStart:
+      case ServiceEvent.kIsolateRunnable:
       case ServiceEvent.kGraph:
       case ServiceEvent.kGC:
       case ServiceEvent.kInspect:
+        // Ignore.
         break;
 
       case ServiceEvent.kLogging:
@@ -1618,21 +1626,48 @@
     return new Future.value(null);
   }
 
-  Future next() {
+
+  Future smartNext() async {
+    if (isolatePaused()) {
+      var event = isolate.pauseEvent;
+      if (event.atAsyncJump) {
+        return asyncNext();
+      } else {
+        return syncNext();
+      }
+    } else {
+      console.print('The program is already running');
+    }
+  }
+
+  Future asyncNext() async {
+    if (isolatePaused()) {
+      var event = isolate.pauseEvent;
+      if (event.asyncContinuation == null) {
+        console.print("No async continuation at this location");
+      } else {
+        return isolate.asyncStepOver()[Isolate.kFirstResume];
+      }
+    } else {
+      console.print('The program is already running');
+    }
+  }
+
+  Future syncNext() async {
     if (isolatePaused()) {
       var event = isolate.pauseEvent;
       if (event.kind == ServiceEvent.kPauseStart) {
         console.print("Type 'continue' [F7] or 'step' [F10] to start the isolate");
-        return new Future.value(null);
+        return;
       }
       if (event.kind == ServiceEvent.kPauseExit) {
         console.print("Type 'continue' [F7] to exit the isolate");
-        return new Future.value(null);
+        return;
       }
       return isolate.stepOver();
     } else {
       console.print('The program is already running');
-      return new Future.value(null);
+      return;
     }
   }
 
@@ -1666,6 +1701,7 @@
     debugger.page = this;
   }
 
+  StreamSubscription _resizeSubscription;
   Future<StreamSubscription> _isolateSubscriptionFuture;
   Future<StreamSubscription> _debugSubscriptionFuture;
   Future<StreamSubscription> _stdoutSubscriptionFuture;
@@ -1675,21 +1711,7 @@
   @override
   void attached() {
     super.attached();
-
-    var navbarDiv = $['navbarDiv'];
-    var stackDiv = $['stackDiv'];
-    var splitterDiv = $['splitterDiv'];
-    var cmdDiv = $['commandDiv'];
-
-    int navbarHeight = navbarDiv.clientHeight;
-    int splitterHeight = splitterDiv.clientHeight;
-    int cmdHeight = cmdDiv.clientHeight;
-
-    int windowHeight = window.innerHeight;
-    int fixedHeight = navbarHeight + splitterHeight + cmdHeight;
-    int available = windowHeight - fixedHeight;
-    int stackHeight = available ~/ 1.6;
-    stackDiv.style.setProperty('height', '${stackHeight}px');
+    _onResize(null);
 
     // Wire the debugger object to the stack, console, and command line.
     var stackElement = $['stackElement'];
@@ -1700,6 +1722,7 @@
     debugger.input.debugger = debugger;
     debugger.init();
 
+    _resizeSubscription = window.onResize.listen(_onResize);
     _isolateSubscriptionFuture =
         app.vm.listenEventStream(VM.kIsolateStream, debugger.onEvent);
     _debugSubscriptionFuture =
@@ -1740,9 +1763,28 @@
     debugger.flushStdio();
   }
 
+  void _onResize(_) {
+    var navbarDiv = $['navbarDiv'];
+    var stackDiv = $['stackDiv'];
+    var splitterDiv = $['splitterDiv'];
+    var cmdDiv = $['commandDiv'];
+
+    int navbarHeight = navbarDiv.clientHeight;
+    int splitterHeight = splitterDiv.clientHeight;
+    int cmdHeight = cmdDiv.clientHeight;
+
+    int windowHeight = window.innerHeight;
+    int fixedHeight = navbarHeight + splitterHeight + cmdHeight;
+    int available = windowHeight - fixedHeight;
+    int stackHeight = available ~/ 1.6;
+    stackDiv.style.setProperty('height', '${stackHeight}px');
+  }
+
   @override
   void detached() {
     debugger.isolate = null;
+    _resizeSubscription.cancel();
+    _resizeSubscription = null;
     cancelFutureSubscription(_isolateSubscriptionFuture);
     _isolateSubscriptionFuture = null;
     cancelFutureSubscription(_debugSubscriptionFuture);
@@ -2255,7 +2297,7 @@
             e.preventDefault();
             try {
               debugger.upFrame(1);
-            } on RangeError catch (e) {
+            } on RangeError catch (_) {
               // Ignore.
             }
             busy = false;
@@ -2265,7 +2307,7 @@
             e.preventDefault();
             try {
               debugger.downFrame(1);
-            } on RangeError catch (e) {
+            } on RangeError catch (_) {
               // Ignore.
             }
             busy = false;
@@ -2287,7 +2329,7 @@
 
           case KeyCode.F9:
             e.preventDefault();
-            debugger.next().whenComplete(() {
+            debugger.smartNext().whenComplete(() {
               busy = false;
             });
             break;
diff --git a/runtime/observatory/lib/src/elements/debugger.html b/runtime/observatory/lib/src/elements/debugger.html
index e0f5dce..44195bf 100644
--- a/runtime/observatory/lib/src/elements/debugger.html
+++ b/runtime/observatory/lib/src/elements/debugger.html
@@ -234,7 +234,8 @@
       .flex-item-vars {
         flex-grow: 5;
         flex-shrink: 0;
-        flex-basis: 225px;
+        flex-basis: 250px;
+        overflow-x: hidden;
       }
     </style>
     <div id="frameOuter" class="frameOuter">
@@ -371,8 +372,8 @@
             <div class="flex-item-script">
               <template if="{{ message.handler != null }}">
               <source-inset height="{{ scriptHeight }}"
-                              location="{{ message.handler.location }}"
-                              inDebuggerContext="{{ true }}">
+                            location="{{ message.handler.location }}"
+                            inDebuggerContext="{{ true }}">
               </source-inset>
               </template>
             </div>
diff --git a/runtime/observatory/lib/src/elements/field_view.html b/runtime/observatory/lib/src/elements/field_view.html
index d32cab0..d9cdefd 100644
--- a/runtime/observatory/lib/src/elements/field_view.html
+++ b/runtime/observatory/lib/src/elements/field_view.html
@@ -37,6 +37,10 @@
         </template>
         {{ field.name }}
       </h1>
+
+      <object-common object="{{ field }}"></object-common>
+      <br>
+
       <div class="memberList">
         <div class="memberItem">
           <div class="memberName">owner</div>
diff --git a/runtime/observatory/lib/src/elements/function_view.html b/runtime/observatory/lib/src/elements/function_view.html
index fee4cb4..2119fa8 100644
--- a/runtime/observatory/lib/src/elements/function_view.html
+++ b/runtime/observatory/lib/src/elements/function_view.html
@@ -27,6 +27,10 @@
 
     <div class="content">
       <h1>function {{ function.qualifiedName }}</h1>
+
+      <object-common object="{{ function }}"></object-common>
+      <br>
+
       <div class="memberList">
         <div class="memberItem">
           <div class="memberName">kind</div>
diff --git a/runtime/observatory/lib/src/elements/heap_snapshot.dart b/runtime/observatory/lib/src/elements/heap_snapshot.dart
index 1dee104..a9e4a8e 100644
--- a/runtime/observatory/lib/src/elements/heap_snapshot.dart
+++ b/runtime/observatory/lib/src/elements/heap_snapshot.dart
@@ -12,6 +12,7 @@
 import 'package:observatory/elements.dart';
 import 'package:observatory/object_graph.dart';
 import 'package:polymer/polymer.dart';
+import 'package:logging/logging.dart';
 
 class DominatorTreeRow extends TableTreeRow {
   final ObjectVertex vertex;
@@ -335,6 +336,8 @@
 
 
 Future<List<MergedVertex>> buildMergedVertices(ObjectGraph graph) async {
+  Logger.root.info("Start merge vertices");
+
   var cidToMergedVertex = {};
 
   for (var vertex in graph.vertices) {
@@ -365,6 +368,8 @@
     }
   }
 
+  Logger.root.info("End merge vertices");
+
   return cidToMergedVertex.values.toList();
 }
 
diff --git a/runtime/observatory/lib/src/elements/inbound_reference.dart b/runtime/observatory/lib/src/elements/inbound_reference.dart
index 39c8644..eb369ba 100644
--- a/runtime/observatory/lib/src/elements/inbound_reference.dart
+++ b/runtime/observatory/lib/src/elements/inbound_reference.dart
@@ -14,10 +14,6 @@
   @published ObservableMap ref;
   InboundReferenceElement.created() : super.created();
 
-  dynamic get slot => ref['slot'];
-  bool get slotIsArrayIndex => slot is num;
-  bool get slotIsField => slot is ServiceMap && slot['type'] == '@Field';
-
   ServiceObject get source => ref['source'];
 
   // I.e., inbound references to 'source' for recursive pointer chasing.
diff --git a/runtime/observatory/lib/src/elements/inbound_reference.html b/runtime/observatory/lib/src/elements/inbound_reference.html
index d7b9e5d..e1803e5 100644
--- a/runtime/observatory/lib/src/elements/inbound_reference.html
+++ b/runtime/observatory/lib/src/elements/inbound_reference.html
@@ -8,11 +8,16 @@
   <template>
     <link rel="stylesheet" href="css/shared.css">
     <div>
-      from
-      <template if="{{ slotIsArrayIndex }}">[{{ slot }}] of</template>
-      <template if="{{ slotIsField }}"><field-ref ref="{{ slot }}"></field-ref> of</template>
+      <template if="{{ ref['parentField'] != null }}">
+        from <any-service-ref ref="{{ ref['parentField'] }}"></any-service-ref>
+      </template>
+      <template if="{{ ref['parentListIndex'] != null }}">
+        from [{{ ref['parentListIndex'] }}] of
+      </template>
+      <template if="{{ ref['_parentWordOffset'] != null }}">
+        from word[{{ ref['_parentWordOffset'] }}] of
+      </template>
       <any-service-ref ref="{{ source }}"></any-service-ref>
-
       <curly-block callback="{{ expander() }}">
         <div class="memberList">
           <div class="memberItem">
diff --git a/runtime/observatory/lib/src/elements/instance_ref.html b/runtime/observatory/lib/src/elements/instance_ref.html
index 4781972..57dcec9 100644
--- a/runtime/observatory/lib/src/elements/instance_ref.html
+++ b/runtime/observatory/lib/src/elements/instance_ref.html
@@ -7,14 +7,20 @@
   <template>
     <link rel="stylesheet" href="css/shared.css">
     <style>
-      .errorBox {
+      .indented {
+        margin-left: 1.5em;
+        font: 400 14px 'Montserrat', sans-serif;
+        line-height: 150%;
+      }
+      .stackTraceBox {
+        margin-left: 1.5em;
         background-color: #f5f5f5;
         border: 1px solid #ccc;
         padding: 10px;
         font-family: consolas, courier, monospace;
-        font-size: 1em;
-        line-height: 1.2em;
+        font-size: 12px;
         white-space: pre;
+        overflow-x: auto;
       }
     </style>
     <span>
@@ -23,10 +29,18 @@
       </template>
 
       <template if="{{ ref.isBool || ref.isInt ||
-                       ref.isDouble || ref.isNull }}">
+                       ref.isDouble || ref.isSimdValue ||
+                       ref.isNull }}">
         <a on-click="{{ goto }}" _href="{{ url }}">{{ ref.valueAsString }}</a>
       </template>
 
+      <template if="{{ ref.isStackTrace }}">
+        <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em></a>
+        <curly-block expandKey="{{ expandKey }}">
+          <div class="stackTraceBox">{{ ref.valueAsString }}</div>
+        </curly-block>
+      </template>
+
       <template if="{{ ref.isString }}">
         <a on-click="{{ goto }}" _href="{{ url }}">{{ asStringLiteral(ref.valueAsString, ref.valueAsStringIsTruncated) }}</a>
       </template>
@@ -51,18 +65,12 @@
       <template if="{{ ref.isPlainInstance }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em></a>
         <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
+          <div class="indented">
             <template repeat="{{ field in ref.fields }}">
-              <div class="memberItem">
-                <div class="memberName">
-                  {{ field['decl'].name }}
-                </div>
-                <div class="memberValue">
-                  <any-service-ref ref="{{ field['value'] }}"
-                                   expandKey="{{ makeExpandKey(field['decl'].name) }}">
-                  </any-service-ref>
-                </div>
-              </div>
+              {{ field['decl'].name }}&nbsp;:&nbsp;
+              <any-service-ref ref="{{ field['value'] }}"
+                               expandKey="{{ makeExpandKey(field['decl'].name) }}">
+              </any-service-ref><br>
             </template>
           </div>
         </curly-block>
@@ -70,17 +78,14 @@
 
       <template if="{{ ref.isList }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em> ({{ ref.length }})</a>
-        <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
+        <curly-block callback="{{ expander() }}"
+                     expandKey="{{ expandKey }}">
+          <div class="indented">
             <template repeat="{{ index in ref.elements.asMap().keys }}">
-              <div class="memberItem">
-                <div class="memberName">[{{ index }}]</div>
-                <div class="memberValue">
-                  <any-service-ref ref="{{ ref.elements[index] }}"
-                                   expandKey="{{ makeExpandKey(index.toString()) }}">
-                  </any-service-ref>
-                </div>
-              </div>
+              [ {{ index }} ]&nbsp;&nbsp;
+              <any-service-ref ref="{{ ref.elements[index] }}"
+                               expandKey="{{ makeExpandKey(index.toString()) }}">
+              </any-service-ref><br>
             </template>
           </div>
         </curly-block>
@@ -89,20 +94,14 @@
       <template if="{{ ref.isMap }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em> ({{ ref.length }})</a>
         <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
+          <div class="indented">
             <template repeat="{{ association in ref.associations }}">
-              <div class="memberItem">
-                <div class="memberName">
-                  [<any-service-ref ref="{{ association['key'] }}"
-                                    expandKey="{{ makeExpandKey('key') }}">
-                  </any-service-ref>]
-                </div>
-                <div class="memberValue">
-                  <any-service-ref ref="{{ association['value'] }}"
-                                   expandKey="{{ makeExpandKey('value') }}">
-                  </any-service-ref>
-                </div>
-              </div>
+              [ <any-service-ref ref="{{ association['key'] }}"
+                                expandKey="{{ makeExpandKey('key') }}">
+              </any-service-ref> ]&nbsp;&nbsp;
+              <any-service-ref ref="{{ association['value'] }}"
+                                 expandKey="{{ makeExpandKey('value') }}">
+              </any-service-ref><br>
             </template>
           </div>
         </curly-block>
@@ -111,12 +110,10 @@
       <template if="{{ ref.isTypedData }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em> ({{ ref.length }})</a>
         <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
+          <div class="indented">
             <template repeat="{{ index in ref.typedElements.asMap().keys }}">
-              <div class="memberItem">
-                <div class="memberName">[{{ index }}]</div>
-                <div class="memberValue">{{ ref.typedElements[index].toString() }}</div>
-              </div>
+              [ {{ index }} ]&nbsp;&nbsp;
+              {{ ref.typedElements[index].toString() }}<br>
             </template>
           </div>
         </curly-block>
@@ -125,15 +122,11 @@
       <template if="{{ ref.isMirrorReference }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em></a>
         <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
-            <div class="memberItem">
-              <div class="memberName">referent</div>
-              <div class="memberValue">
-                <any-service-ref ref="{{ ref.referent }}"
-                                 expandKey="{{ makeExpandKey('referent') }}">
-                </any-service-ref>
-              </div>
-            </div>
+          <div class="indented">
+            &lt;referent&gt;&nbsp;:&nbsp;
+            <any-service-ref ref="{{ ref.referent }}"
+                             expandKey="{{ makeExpandKey('referent') }}">
+            </any-service-ref>
           </div>
         </curly-block>
       </template>
@@ -141,23 +134,15 @@
       <template if="{{ ref.isWeakProperty }}">
         <a on-click="{{ goto }}" _href="{{ url }}"><em>{{ ref.clazz.name }}</em></a>
         <curly-block callback="{{ expander() }}" expandKey="{{ expandKey }}">
-          <div class="memberList">
-            <div class="memberItem">
-              <div class="memberName">key</div>
-              <div class="memberValue">
-                <any-service-ref ref="{{ ref.key }}"
-                                 expandKey="{{ makeExpandKey('key') }}">
-                </any-service-ref>
-              </div>
-            </div>
-            <div class="memberItem">
-              <div class="memberName">value</div>
-              <div class="memberValue">
-                <any-service-ref ref="{{ ref.value }}"
-                                 expandKey="{{ makeExpandKey('value') }}">
-                </any-service-ref>
-              </div>
-            </div>
+          <div class="indented">
+            &lt;key&gt;&nbsp;:&nbsp;
+            <any-service-ref ref="{{ ref.key }}"
+                             expandKey="{{ makeExpandKey('key') }}">
+            </any-service-ref><br>
+            &lt;value&gt;&nbsp;:&nbsp;
+            <any-service-ref ref="{{ ref.value }}"
+                             expandKey="{{ makeExpandKey('value') }}">
+            </any-service-ref><br>
           </div>
         </curly-block>
       </template>
diff --git a/runtime/observatory/lib/src/elements/instance_view.html b/runtime/observatory/lib/src/elements/instance_view.html
index 4e718d9..28f093f 100644
--- a/runtime/observatory/lib/src/elements/instance_view.html
+++ b/runtime/observatory/lib/src/elements/instance_view.html
@@ -211,6 +211,14 @@
               </div>
             </div>
             <div class="memberItem">
+              <div class="memberName">isCaseSensitive</div>
+              <div class="memberValue">{{ instance.isCaseSensitive }}</div>
+            </div>
+            <div class="memberItem">
+              <div class="memberName">isMultiLine</div>
+              <div class="memberValue">{{ instance.isMultiLine }}</div>
+            </div>
+            <div class="memberItem">
               <div class="memberName">oneByteFunction</div>
               <div class="memberValue">
                 <any-service-ref ref="{{ instance.oneByteFunction }}"></any-service-ref>
diff --git a/runtime/observatory/lib/src/elements/isolate_summary.html b/runtime/observatory/lib/src/elements/isolate_summary.html
index 31dc45c..40b9eb2 100644
--- a/runtime/observatory/lib/src/elements/isolate_summary.html
+++ b/runtime/observatory/lib/src/elements/isolate_summary.html
@@ -45,7 +45,7 @@
 <polymer-element name="isolate-run-state" extends="observatory-element">
   <template>
     <template if="{{ isolate.paused }}">
-      <strong>paused</strong>
+      <strong title="{{ isolate.pauseEvent.timestamp.toString() }}">paused</strong>
     </template>
 
     <template if="{{ isolate.running }}">
diff --git a/runtime/observatory/lib/src/elements/library_view.html b/runtime/observatory/lib/src/elements/library_view.html
index 26ecc8e..d43fe3e 100644
--- a/runtime/observatory/lib/src/elements/library_view.html
+++ b/runtime/observatory/lib/src/elements/library_view.html
@@ -29,6 +29,10 @@
         <!-- TODO(turnidge): Handle unnamed libraries -->
         library {{ library.name }}
       </h1>
+
+      <object-common object="{{ library }}"></object-common>
+      <br>
+
       <div class="memberList">
         <div class="memberItem">
           <div class="memberName">uri</div>
diff --git a/runtime/observatory/lib/src/elements/object_common.html b/runtime/observatory/lib/src/elements/object_common.html
index c4ce618..7cad87a 100644
--- a/runtime/observatory/lib/src/elements/object_common.html
+++ b/runtime/observatory/lib/src/elements/object_common.html
@@ -22,7 +22,7 @@
       </div>
 
       <div class="memberItem" title="Space for this object in memory">
-        <div class="memberName">size</div>
+        <div class="memberName">shallow size</div>
         <div class="memberValue">{{ object.size | formatSize }}</div>
       </div>
 
@@ -50,12 +50,15 @@
             </eval-link>
           </template>
           <template if="{{ path != null }}">
+            <template if="{{ path['length'] == 0 }}">
+              &lt;root&gt;
+            </template>
             <template repeat="{{ element in path['elements'] }}">
             <div class="memberItem">
               <div class="memberName">[{{ element['index']}}]</div>
               <div class="memberValue">
                 <template if="{{ element['parentField'] != null }}">
-                  from <field-ref ref="{{ element['parentField'] }}"></field-ref> of
+                  from <any-service-ref ref="{{ element['parentField'] }}"></any-service-ref> of
                 </template>
                 <template if="{{ element['parentListIndex'] != null }}">
                   from [{{ element['parentListIndex'] }}] of
@@ -89,6 +92,9 @@
             </eval-link>
           </template>
           <template if="{{ inboundReferences != null }}">
+            <template if="{{ inboundReferences['references'].length == 0 }}">
+              &lt;root&gt;
+            </template>
             <template repeat="{{ reference in inboundReferences['references'] }}">
               <inbound-reference ref="{{ reference }}"></inbound-reference>
             </template>
diff --git a/runtime/observatory/lib/src/elements/objectpool_view.dart b/runtime/observatory/lib/src/elements/objectpool_view.dart
index 9bc5a4e..5b320a1 100644
--- a/runtime/observatory/lib/src/elements/objectpool_view.dart
+++ b/runtime/observatory/lib/src/elements/objectpool_view.dart
@@ -19,13 +19,13 @@
   bool isServiceObject(o) => o is ServiceObject;
 
   void poolChanged(oldValue) {
-    annotateRawEntries();
+    annotateExternalLabels();
   }
 
-  Future annotateRawEntries() {
+  Future annotateExternalLabels() {
     var tasks = pool.entries.map((entry) {
-     if (entry is int) {
-       var addr = entry.toRadixString(16);
+     if (entry is String) {
+       var addr = entry.substring(2);
        return pool.isolate.getObjectByAddress(addr).then((result) {
          return result is ServiceObject ? result : null;
        });
@@ -38,6 +38,6 @@
   }
 
   Future refresh() {
-    return pool.reload().then((_) => annotateRawEntries());
+    return pool.reload().then((_) => annotateExternalLabels());
   }
 }
diff --git a/runtime/observatory/lib/src/elements/objectpool_view.html b/runtime/observatory/lib/src/elements/objectpool_view.html
index a928531..d358fea 100644
--- a/runtime/observatory/lib/src/elements/objectpool_view.html
+++ b/runtime/observatory/lib/src/elements/objectpool_view.html
@@ -37,7 +37,7 @@
                 </any-service-ref>
               </template>
               <template if="{{ !isServiceObject(pool.entries[index]) }}">
-                0x{{ pool.entries[index].toRadixString(16) }}
+                {{ pool.entries[index] }}
                 <template if="{{ annotatedEntries != null && annotatedEntries[index] != null }}">
                   (<any-service-ref ref="{{ annotatedEntries[index] }}"></any-service-ref>)
                 </template>
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index ee555ca..8a95467 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -57,11 +57,15 @@
   int line;
   int columnStart;
   int columnStop;
+  int get priority;
 
   void applyStyleTo(element);
 
   int compareTo(Annotation other) {
     if (line == other.line) {
+      if (columnStart == other.columnStart) {
+        return priority.compareTo(other.priority);
+      }
       return columnStart.compareTo(other.columnStart);
     }
     return line.compareTo(other.line);
@@ -100,6 +104,8 @@
 }
 
 class CurrentExecutionAnnotation extends Annotation {
+  int priority = 0;  // highest priority.
+
   void applyStyleTo(element) {
     if (element == null) {
       return;  // TODO(rmacnak): Handling overlapping annotations.
@@ -109,9 +115,40 @@
   }
 }
 
+class BreakpointAnnotation extends Annotation {
+  Breakpoint bpt;
+  int priority = 1;
+
+  BreakpointAnnotation(this.bpt) {
+    var script = bpt.location.script;
+    var pos = bpt.location.tokenPos;
+    line = script.tokenToLine(pos);
+    columnStart = script.tokenToCol(pos) - 1;  // tokenToCol is 1-origin.
+    var length = script.guessTokenLength(line, columnStart);
+    if (length == null) {
+      length = 1;
+    }
+    columnStop = columnStart + length;
+  }
+
+  void applyStyleTo(element) {
+    if (element == null) {
+      return;  // TODO(rmacnak): Handling overlapping annotations.
+    }
+    var script = bpt.location.script;
+    var pos = bpt.location.tokenPos;
+    int line = script.tokenToLine(pos);
+    int column = script.tokenToCol(pos);
+    element.classes.add("breakAnnotation");
+    element.title = "Breakpoint ${bpt.number} at ${line}:${column}";
+  }
+}
+
 class LibraryAnnotation extends Annotation {
   Library target;
   String url;
+  int priority = 2;
+
   LibraryAnnotation(this.target, this.url);
 
   void applyStyleTo(element) {
@@ -126,6 +163,8 @@
 class PartAnnotation extends Annotation {
   Script part;
   String url;
+  int priority = 2;
+
   PartAnnotation(this.part, this.url);
 
   void applyStyleTo(element) {
@@ -139,6 +178,7 @@
 
 class LocalVariableAnnotation extends Annotation {
   final value;
+  int priority = 2;
 
   LocalVariableAnnotation(LocalVarLocation location, this.value) {
     line = location.line;
@@ -157,13 +197,17 @@
 
 class CallSiteAnnotation extends Annotation {
   CallSite callSite;
+  int priority = 2;
 
   CallSiteAnnotation(this.callSite) {
     line = callSite.line;
     columnStart = callSite.column - 1;  // Call site is 1-origin.
-    var tokenLength = callSite.name.length;  // Approximate.
-    if (callSite.name.startsWith("get:") ||
-        callSite.name.startsWith("set:")) tokenLength -= 4;
+    var tokenLength = callSite.script.guessTokenLength(line, columnStart);
+    if (tokenLength == null) {
+      tokenLength = callSite.name.length;  // Approximate.
+      if (callSite.name.startsWith("get:") ||
+          callSite.name.startsWith("set:")) tokenLength -= 4;
+    }
     columnStop = columnStart + tokenLength;
   }
 
@@ -200,6 +244,8 @@
 
 abstract class DeclarationAnnotation extends Annotation {
   String url;
+  int priority = 2;
+
   DeclarationAnnotation(decl, this.url) {
     assert(decl.loaded);
     SourceLocation location = decl.location;
@@ -323,7 +369,8 @@
   var annotations = [];
   var annotationsCursor;
 
-  StreamSubscription scriptChangeSubscription;
+  StreamSubscription _scriptChangeSubscription;
+  Future<StreamSubscription> _debugSubscriptionFuture;
 
   bool hasLoadedLibraryDeclarations = false;
 
@@ -338,15 +385,45 @@
     }
   }
 
+  void attached() {
+    super.attached();
+    _debugSubscriptionFuture =
+        app.vm.listenEventStream(VM.kDebugStream, _onDebugEvent);
+  }
+
   void detached() {
-    if (scriptChangeSubscription != null) {
+    cancelFutureSubscription(_debugSubscriptionFuture);
+    _debugSubscriptionFuture = null;
+    if (_scriptChangeSubscription != null) {
       // Don't leak. If only Dart and Javascript exposed weak references...
-      scriptChangeSubscription.cancel();
-      scriptChangeSubscription = null;
+      _scriptChangeSubscription.cancel();
+      _scriptChangeSubscription = null;
     }
     super.detached();
   }
 
+  void _onDebugEvent(event) {
+    if (script == null) {
+      return;
+    }
+    switch (event.kind) {
+      case ServiceEvent.kBreakpointAdded:
+      case ServiceEvent.kBreakpointResolved:
+      case ServiceEvent.kBreakpointRemoved:
+        var loc = event.breakpoint.location;
+        if (loc.script == script) {
+          int line = script.tokenToLine(loc.tokenPos);
+          if ((line >= _startLine) && (line <= _endLine)) {
+            _updateTask.queue();
+          }
+        }
+        break;
+      default:
+        // Ignore.
+        break;
+    }
+  }
+
   void currentPosChanged(oldValue) {
     _updateTask.queue();
     _scrollToCurrentPos();
@@ -404,8 +481,8 @@
       return;
     }
 
-    if (scriptChangeSubscription == null) {
-      scriptChangeSubscription = script.changes.listen((_) => update());
+    if (_scriptChangeSubscription == null) {
+      _scriptChangeSubscription = script.changes.listen((_) => update());
     }
 
     computeAnnotations();
@@ -447,6 +524,7 @@
     annotations.clear();
 
     addCurrentExecutionAnnotation();
+    addBreakpointAnnotations();
 
     if (!inDebuggerContext && script.library != null) {
       if (hasLoadedLibraryDeclarations) {
@@ -475,11 +553,28 @@
       var a = new CurrentExecutionAnnotation();
       a.line = _currentLine;
       a.columnStart = _currentCol;
-      a.columnStop = _currentCol + 1;
+      var length = script.guessTokenLength(_currentLine, _currentCol);
+      if (length == null) {
+        length = 1;
+      }
+      a.columnStop = _currentCol + length;
       annotations.add(a);
     }
   }
 
+  void addBreakpointAnnotations() {
+    for (var line = _startLine; line <= _endLine; line++) {
+      var bpts = script.getLine(line).breakpoints;
+      if (bpts != null) {
+        for (var bpt in bpts) {
+          if (bpt.location != null) {
+            annotations.add(new BreakpointAnnotation(bpt));
+          }
+        }
+      }
+    }
+  }
+
   Future loadDeclarationsOfLibrary(Library lib) {
     return lib.load().then((lib) {
       var loads = [];
diff --git a/runtime/observatory/lib/src/elements/script_inset.html b/runtime/observatory/lib/src/elements/script_inset.html
index 167816d..ac2c08c 100644
--- a/runtime/observatory/lib/src/elements/script_inset.html
+++ b/runtime/observatory/lib/src/elements/script_inset.html
@@ -14,24 +14,24 @@
       .sourceInset {
       }
       .sourceTable {
-        display: table;
         background-color: #f5f5f5;
         border: 1px solid #ccc;
         padding: 10px;
         width: 100%;
         box-sizing: border-box;
+        overflow-x: scroll;
       }
       .sourceRow {
-        display: table-row;
+        display: flex;
+        flex-direction: row;
+        width: 100%;
       }
       .sourceItem, .sourceItemCurrent {
-        display: table-cell;
         vertical-align: top;
         font: 400 14px consolas, courier, monospace;
         line-height: 125%;
         white-space: pre;
         max-width: 0;
-	overflow-x: hidden;
       }
       .currentLine {
         background-color: #fff;
@@ -39,19 +39,24 @@
       .currentCol {
         background-color: #6cf;
       }
+      .breakAnnotation {
+        background-color: #e66;
+        color: white;
+      }
       .hitsNone, .hitsNotExecuted, .hitsExecuted {
         display: table-cell;
         vertical-align: top;
         font: 400 14px consolas, courier, monospace;
-        width: 4em;
+        margin-left: 5px;
+        margin-right: 5px;
         text-align: right;
         color: #a8a8a8;
       }
       .hitsNotExecuted {
-        background-color: #EEA7A7;
+        background-color: #faa;
       }
       .hitsExecuted {
-        background-color: #9BDD9B;
+        background-color: #aea;
       }
       .noCopy {}
       .emptyBreakpoint, .possibleBreakpoint, .busyBreakpoint, .unresolvedBreakpoint, .resolvedBreakpoint  {
diff --git a/runtime/observatory/lib/src/elements/script_view.html b/runtime/observatory/lib/src/elements/script_view.html
index 575a1ce..1dc23b4 100644
--- a/runtime/observatory/lib/src/elements/script_view.html
+++ b/runtime/observatory/lib/src/elements/script_view.html
@@ -19,6 +19,9 @@
 
   <div class="content-centered-big">
     <h1>script {{ script.name }}</h1>
+    <object-common object="{{ script }}"></object-common>
+    <br>
+
     <hr>
     <script-inset id="scriptInset" script="{{ script }}"
                   currentPos="{{ app.locationManager.internalArguments['pos'] | parseInt }}">
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 3c8e639..cf244e4 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -136,6 +136,8 @@
   bool get isMirrorReference => false;
   bool get isWeakProperty => false;
   bool get isClosure => false;
+  bool get isStackTrace => false;
+  bool get isSimdValue => false;
   bool get isPlainInstance => false;
 
   /// Has this object been fully loaded?
@@ -365,6 +367,19 @@
   @observable int retainedSize;
 
   HeapObject._empty(ServiceObjectOwner owner) : super._empty(owner);
+
+  void _update(ObservableMap map, bool mapIsRef) {
+    if (map['class'] != null) {
+      // Sent with refs for some types. Load it if available, but don't clobber
+      // it with null for kinds that only send if for full responses.
+      clazz = map['class'];
+    }
+
+    if (mapIsRef) {
+      return;
+    }
+    size = map['size'];
+  }
 }
 
 abstract class Coverage {
@@ -501,6 +516,9 @@
   // TODO(turnidge): The connection should not be stored in the VM object.
   bool get isDisconnected;
 
+  // Used for verbose logging.
+  bool verbose = false;
+
   // TODO(johnmccutchan): Ensure that isolates do not end up in _cache.
   Map<String,ServiceObject> _cache = new Map<String,ServiceObject>();
   final ObservableMap<String,Isolate> _isolateCache =
@@ -754,7 +772,7 @@
     version = map['version'];
     targetCPU = map['targetCPU'];
     architectureBits = map['architectureBits'];
-    var startTimeMillis = map['startTime'];
+    var startTimeMillis = map['startTime'].toInt();
     startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeMillis);
     refreshTime = new DateTime.now();
     notifyPropertyChange(#upTime, 0, 1);
@@ -959,10 +977,10 @@
                                                  limit: limit)) {
       result.add(isolate.getObjectByAddress(v.address)
                         .then((ServiceObject obj) {
-        if (obj is Instance) {
-          // TODO(rmacnak): size/retainedSize are properties of all heap
-          // objects, not just Instances.
+        if (obj is HeapObject) {
           obj.retainedSize = v.retainedSize;
+        } else {
+          print("${obj.runtimeType} should be a HeapObject");
         }
         return obj;
       }));
@@ -1225,7 +1243,7 @@
       entry = map['entry'];
     }
     var savedStartTime = startTime;
-    var startTimeInMillis = map['startTime'];
+    var startTimeInMillis = map['startTime'].toInt();
     startTime = new DateTime.fromMillisecondsSinceEpoch(startTimeInMillis);
     notifyPropertyChange(#upTime, 0, 1);
     var countersMap = map['_tagCounters'];
@@ -1267,7 +1285,11 @@
     _updateBreakpoints(map['breakpoints']);
     exceptionsPauseInfo = map['_debuggerSettings']['_exceptions'];
 
-    pauseEvent = map['pauseEvent'];
+    var newPauseEvent = map['pauseEvent'];
+    assert((pauseEvent == null) ||
+           (newPauseEvent == null) ||
+           !newPauseEvent.timestamp.isBefore(pauseEvent.timestamp));
+    pauseEvent = newPauseEvent;
     _updateRunState();
     error = map['error'];
 
@@ -1321,6 +1343,7 @@
   void _onEvent(ServiceEvent event) {
     switch(event.kind) {
       case ServiceEvent.kIsolateStart:
+      case ServiceEvent.kIsolateRunnable:
       case ServiceEvent.kIsolateExit:
       case ServiceEvent.kInspect:
         // Handled elsewhere.
@@ -1346,6 +1369,8 @@
       case ServiceEvent.kPauseInterrupted:
       case ServiceEvent.kPauseException:
       case ServiceEvent.kResume:
+        assert((pauseEvent == null) ||
+               !event.timestamp.isBefore(pauseEvent.timestamp));
         pauseEvent = event;
         _updateRunState();
         break;
@@ -1624,7 +1649,7 @@
     _map.addAll(map);
 
     name = _map['name'];
-    vmName = (_map.containsKey('vmName') ? _map['vmName'] : name);
+    vmName = (_map.containsKey('_vmName') ? _map['_vmName'] : name);
   }
 
   // TODO(turnidge): These are temporary until we have a proper root
@@ -1693,6 +1718,7 @@
 class ServiceEvent extends ServiceObject {
   /// The possible 'kind' values.
   static const kIsolateStart           = 'IsolateStart';
+  static const kIsolateRunnable        = 'IsolateRunnable';
   static const kIsolateExit            = 'IsolateExit';
   static const kIsolateUpdate          = 'IsolateUpdate';
   static const kPauseStart             = 'PauseStart';
@@ -1718,10 +1744,12 @@
   }
 
   @observable String kind;
+  @observable DateTime timestamp;
   @observable Breakpoint breakpoint;
   @observable Frame topFrame;
   @observable Instance exception;
   @observable Instance asyncContinuation;
+  @observable bool atAsyncJump;
   @observable ServiceObject inspectee;
   @observable ByteData data;
   @observable int count;
@@ -1729,6 +1757,7 @@
   @observable String exceptions;
   @observable String bytesAsString;
   @observable Map logRecord;
+
   int chunkIndex, chunkCount, nodeCount;
 
   @observable bool get isPauseEvent {
@@ -1743,6 +1772,8 @@
     _loaded = true;
     _upgradeCollection(map, owner);
     assert(map['isolate'] == null || owner == map['isolate']);
+    timestamp =
+        new DateTime.fromMillisecondsSinceEpoch(map['timestamp'].toInt());
     kind = map['kind'];
     notifyPropertyChange(#isPauseEvent, 0, 1);
     name = 'ServiceEvent $kind';
@@ -1764,6 +1795,9 @@
     }
     if (map['_asyncContinuation'] != null) {
       asyncContinuation = map['_asyncContinuation'];
+      atAsyncJump = map['_atAsyncJump'];
+    } else {
+      atAsyncJump = false;
     }
     if (map['inspectee'] != null) {
       inspectee = map['inspectee'];
@@ -1801,10 +1835,11 @@
 
   String toString() {
     if (data == null) {
-      return "ServiceEvent(owner='${owner.id}', kind='${kind}')";
+      return "ServiceEvent(owner='${owner.id}', kind='${kind}', "
+          "time=${timestamp})";
     } else {
       return "ServiceEvent(owner='${owner.id}', kind='${kind}', "
-          "data.lengthInBytes=${data.lengthInBytes})";
+          "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})";
     }
   }
 }
@@ -1905,7 +1940,7 @@
 }
 
 
-class Library extends ServiceObject with Coverage {
+class Library extends HeapObject with Coverage {
   @observable String uri;
   @reflectable final dependencies = new ObservableList<LibraryDependency>();
   @reflectable final scripts = new ObservableList<Script>();
@@ -1919,6 +1954,9 @@
   Library._empty(ServiceObjectOwner owner) : super._empty(owner);
 
   void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
     uri = map['uri'];
     var shortUri = uri;
     if (uri.startsWith('file://') ||
@@ -1930,12 +1968,11 @@
       // When there is no name for a library, use the shortUri.
       name = shortUri;
     }
-    vmName = (map.containsKey('vmName') ? map['vmName'] : name);
+    vmName = (map.containsKey('_vmName') ? map['_vmName'] : name);
     if (mapIsRef) {
       return;
     }
     _loaded = true;
-    _upgradeCollection(map, isolate);
     dependencies.clear();
     dependencies.addAll(map["dependencies"].map(LibraryDependency._fromMap));
     scripts.clear();
@@ -2001,7 +2038,7 @@
   bool get empty => accumulated.empty && current.empty;
 }
 
-class Class extends ServiceObject with Coverage {
+class Class extends HeapObject with Coverage {
   @observable Library library;
 
   @observable bool isAbstract;
@@ -2034,8 +2071,14 @@
   Class._empty(ServiceObjectOwner owner) : super._empty(owner);
 
   void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
     name = map['name'];
-    vmName = (map.containsKey('vmName') ? map['vmName'] : name);
+    vmName = (map.containsKey('_vmName') ? map['_vmName'] : name);
+    if (vmName == '::') {
+      name = 'top-level-class';  // Better than ''
+    }
     var idPrefix = "classes/";
     assert(id.startsWith(idPrefix));
     vmCid = int.parse(id.substring(idPrefix.length));
@@ -2128,18 +2171,15 @@
   String toString() => 'Class($vmName)';
 }
 
-class Instance extends ServiceObject {
+class Instance extends HeapObject {
   @observable String kind;
-  @observable Class clazz;
-  @observable int size;
-  @observable int retainedSize;
   @observable String valueAsString;  // If primitive.
   @observable bool valueAsStringIsTruncated;
   @observable ServiceFunction function;  // If a closure.
   @observable Context context;  // If a closure.
   @observable String name;  // If a Type.
   @observable int length; // If a List, Map or TypedData.
-  @observable String pattern;  // If a RegExp.
+  @observable Instance pattern;  // If a RegExp.
 
   @observable var typeClass;
   @observable var fields;
@@ -2155,6 +2195,8 @@
   @observable Function twoByteFunction;  // If a RegExp.
   @observable Function externalOneByteFunction;  // If a RegExp.
   @observable Function externalTwoByteFunction;  // If a RegExp.
+  @observable bool isCaseSensitive;  // If a RegExp.
+  @observable bool isMultiLine;  // If a RegExp.
 
   bool get isAbstractType {
     return (kind == 'Type' || kind == 'TypeRef' ||
@@ -2183,10 +2225,16 @@
         || kind == 'Float32x4List'
         || kind == 'Float64x2List';
   }
+  bool get isSimdValue {
+    return kind == 'Float32x4'
+        || kind == 'Float64x2'
+        || kind == 'Int32x4';
+  }
   bool get isRegExp => kind == 'RegExp';
   bool get isMirrorReference => kind == 'MirrorReference';
   bool get isWeakProperty => kind == 'WeakProperty';
   bool get isClosure => kind == 'Closure';
+  bool get isStackTrace => kind == 'StackTrace';
 
   // TODO(turnidge): Is this properly backwards compatible when new
   // instance kinds are added?
@@ -2197,9 +2245,9 @@
   void _update(ObservableMap map, bool mapIsRef) {
     // Extract full properties.
     _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
 
     kind = map['kind'];
-    clazz = map['class'];
     valueAsString = map['valueAsString'];
     // Coerce absence to false.
     valueAsStringIsTruncated = map['valueAsStringIsTruncated'] == true;
@@ -2213,8 +2261,8 @@
       return;
     }
 
-    size = map['size'];
-
+    isCaseSensitive = map['isCaseSensitive'];
+    isMultiLine = map['isMultiLine'];
     oneByteFunction = map['_oneByteFunction'];
     twoByteFunction = map['_twoByteFunction'];
     externalOneByteFunction = map['_externalOneByteFunction'];
@@ -2285,10 +2333,7 @@
 }
 
 
-class Context extends ServiceObject {
-  @observable Class clazz;
-  @observable int size;
-
+class Context extends HeapObject {
   @observable var parentContext;
   @observable int length;
   @observable var variables;
@@ -2298,6 +2343,7 @@
   void _update(ObservableMap map, bool mapIsRef) {
     // Extract full properties.
     _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
 
     length = map['length'];
     parentContext = map['parent'];
@@ -2306,8 +2352,6 @@
       return;
     }
 
-    size = map['size'];
-    clazz = map['class'];
     variables = map['variables'];
 
     // We are fully loaded.
@@ -2346,6 +2390,7 @@
       case 'Native': return kNative;
       case 'Stub': return kStub;
       case 'Tag': return kTag;
+      case 'SignatureFunction': return kSignatureFunction;
     }
     Logger.root.severe('Unrecognized function kind: $value');
     throw new FallThroughError();
@@ -2368,10 +2413,11 @@
   static FunctionKind kNative = new FunctionKind._internal('Native');
   static FunctionKind kTag = new FunctionKind._internal('Tag');
   static FunctionKind kStub = new FunctionKind._internal('Stub');
+  static FunctionKind kSignatureFunction = new FunctionKind._internal('SignatureFunction');
   static FunctionKind kUNKNOWN = new FunctionKind._internal('UNKNOWN');
 }
 
-class ServiceFunction extends ServiceObject with Coverage {
+class ServiceFunction extends HeapObject with Coverage {
   // owner is a Library, Class, or ServiceFunction.
   @observable ServiceObject dartOwner;
   @observable Library library;
@@ -2396,10 +2442,11 @@
   ServiceFunction._empty(ServiceObject owner) : super._empty(owner);
 
   void _update(ObservableMap map, bool mapIsRef) {
-    name = map['name'];
-    vmName = (map.containsKey('vmName') ? map['vmName'] : name);
-
     _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
+    name = map['name'];
+    vmName = (map.containsKey('_vmName') ? map['_vmName'] : name);
 
     dartOwner = map['owner'];
     kind = FunctionKind.fromJSON(map['_kind']);
@@ -2439,7 +2486,7 @@
 }
 
 
-class Field extends ServiceObject {
+class Field extends HeapObject {
   // Library or Class.
   @observable ServiceObject dartOwner;
   @observable Library library;
@@ -2461,9 +2508,10 @@
   void _update(ObservableMap map, bool mapIsRef) {
     // Extract full properties.
     _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
 
     name = map['name'];
-    vmName = (map.containsKey('vmName') ? map['vmName'] : name);
+    vmName = (map.containsKey('_vmName') ? map['_vmName'] : name);
     dartOwner = map['owner'];
     declaredType = map['declaredType'];
     isStatic = map['static'];
@@ -2633,7 +2681,7 @@
   LocalVarLocation(this.line, this.column, this.endColumn);
 }
 
-class Script extends ServiceObject with Coverage {
+class Script extends HeapObject with Coverage {
   Set<CallSite> callSites = new Set<CallSite>();
   final lines = new ObservableList<ScriptLine>();
   final _hits = new Map<int, int>();
@@ -2658,15 +2706,80 @@
   }
 
   /// This function maps a token position to a line number.
-  int tokenToLine(int token) => _tokenToLine[token];
+  int tokenToLine(int tokenPos) => _tokenToLine[tokenPos];
   Map _tokenToLine = {};
 
   /// This function maps a token position to a column number.
-  int tokenToCol(int token) => _tokenToCol[token];
+  int tokenToCol(int tokenPos) => _tokenToCol[tokenPos];
   Map _tokenToCol = {};
 
+  int guessTokenLength(int line, int column) {
+    String source = getLine(line).text;
+
+    var pos = column;
+    if (pos >= source.length) {
+      return null;
+    }
+
+    var c = source.codeUnitAt(pos);
+    if (c == 123) return 1; // { - Map literal
+
+    if (c == 91) return 1;  // [ - List literal, index, index assignment
+
+    if (c == 40) return 1;  // ( - Closure call
+
+    if (_isOperatorChar(c)) {
+      while (++pos < source.length &&
+             _isOperatorChar(source.codeUnitAt(pos)));
+      return pos - column;
+    }
+
+    if (_isInitialIdentifierChar(c)) {
+      while (++pos < source.length &&
+             _isIdentifierChar(source.codeUnitAt(pos)));
+      return pos - column;
+    }
+
+    return null;
+  }
+
+  static bool _isOperatorChar(int c) {
+    switch (c) {
+    case 25: // %
+    case 26: // &
+    case 42: // *
+    case 43: // +
+    case 45: // -:
+    case 47: // /
+    case 60: // <
+    case 61: // =
+    case 62: // >
+    case 94: // ^
+    case 124: // |
+    case 126: // ~
+      return true;
+    default:
+      return false;
+    }
+  }
+
+  static bool _isInitialIdentifierChar(int c) {
+    if (c >= 65 && c <= 90) return true; // Upper
+    if (c >= 97 && c <= 122) return true; // Lower
+    if (c == 95) return true; // Underscore
+    if (c == 36) return true; // Dollar
+    return false;
+  }
+
+  static bool _isIdentifierChar(int c) {
+    if (_isInitialIdentifierChar(c)) return true;
+    return c >= 48 && c <= 75; // Digit
+  }
+
   void _update(ObservableMap map, bool mapIsRef) {
     _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
     uri = map['uri'];
     kind = map['_kind'];
     _shortUri = uri.substring(uri.lastIndexOf('/') + 1);
@@ -3038,15 +3151,15 @@
 
   ObjectPool._empty(ServiceObjectOwner owner) : super._empty(owner);
 
-  void _update(ObservableMap m, bool mapIsRef) {
-    _upgradeCollection(m, isolate);
-    clazz = m['class'];
-    length = m['length'];
+  void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
+    length = map['length'];
     if (mapIsRef) {
       return;
     }
-    size = m['size'];
-    entries = m['_entries'];
+    entries = map['_entries'];
   }
 }
 
@@ -3061,17 +3174,17 @@
 
   ICData._empty(ServiceObjectOwner owner) : super._empty(owner);
 
-  void _update(ObservableMap m, bool mapIsRef) {
-    _upgradeCollection(m, isolate);
-    clazz = m['class'];
-    dartOwner = m['_owner'];
-    selector = m['_selector'];
+  void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
+    dartOwner = map['_owner'];
+    selector = map['_selector'];
     if (mapIsRef) {
       return;
     }
-    size = m['size'];
-    argumentsDescriptor = m['_argumentsDescriptor'];
-    entries = m['_entries'];
+    argumentsDescriptor = map['_argumentsDescriptor'];
+    entries = map['_entries'];
   }
 }
 
@@ -3084,15 +3197,15 @@
 
   Instructions._empty(ServiceObjectOwner owner) : super._empty(owner);
 
-  void _update(ObservableMap m, bool mapIsRef) {
-    _upgradeCollection(m, isolate);
-    clazz = m['class'];
-    code = m['_code'];
+  void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
+    code = map['_code'];
     if (mapIsRef) {
       return;
     }
-    size = m['size'];
-    objectPool = m['_objectPool'];
+    objectPool = map['_objectPool'];
   }
 }
 
@@ -3104,14 +3217,14 @@
 
   TokenStream._empty(ServiceObjectOwner owner) : super._empty(owner);
 
-  void _update(ObservableMap m, bool mapIsRef) {
+  void _update(ObservableMap map, bool mapIsRef) {
+    _upgradeCollection(map, isolate);
+    super._update(map, mapIsRef);
+
     if (mapIsRef) {
       return;
     }
-    _upgradeCollection(m, isolate);
-    clazz = m['class'];
-    size = m['size'];
-    privateKey = m['privateKey'];
+    privateKey = map['privateKey'];
   }
 }
 
@@ -3282,14 +3395,13 @@
 
   void _update(ObservableMap m, bool mapIsRef) {
     name = m['name'];
-    vmName = (m.containsKey('vmName') ? m['vmName'] : name);
+    vmName = (m.containsKey('_vmName') ? m['_vmName'] : name);
     isOptimized = m['_optimized'];
     kind = CodeKind.fromString(m['kind']);
     if (mapIsRef) {
       return;
     }
     _loaded = true;
-    size = m['size'];
     startAddress = int.parse(m['_startAddress'], radix:16);
     endAddress = int.parse(m['_endAddress'], radix:16);
     function = isolate.getFromMap(m['function']);
@@ -3324,6 +3436,9 @@
       return;
     }
     _processInline(inlinedFunctionsTable, inlinedIntervals);
+
+    _upgradeCollection(m, isolate);
+    super._update(m, mapIsRef);
   }
 
   CodeInlineInterval findInterval(int pc) {
@@ -3639,7 +3754,7 @@
     this.variables = map['vars'];
   }
 
-  String toString() => "Frame(${function.qualifiedName})";
+  String toString() => "Frame(${function.qualifiedName} $location)";
 }
 
 
diff --git a/runtime/observatory/tests/service/allocations_test.dart b/runtime/observatory/tests/service/allocations_test.dart
index 6cd953f..fc0e09f 100644
--- a/runtime/observatory/tests/service/allocations_test.dart
+++ b/runtime/observatory/tests/service/allocations_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library allocations_test;
 
diff --git a/runtime/observatory/tests/service/async_continuation_test.dart b/runtime/observatory/tests/service/async_continuation_test.dart
index 781f7ca..dfbad2d 100644
--- a/runtime/observatory/tests/service/async_continuation_test.dart
+++ b/runtime/observatory/tests/service/async_continuation_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --verbose-debug
+// VMOptions=--error_on_bad_type --error_on_bad_override --verbose-debug
 
 import 'dart:async';
 import 'dart:developer';
diff --git a/runtime/observatory/tests/service/async_generator_breakpoint_test.dart b/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
index 474b54b..7a26e42 100644
--- a/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
+++ b/runtime/observatory/tests/service/async_generator_breakpoint_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --verbose-debug
+// VMOptions=--error_on_bad_type --error_on_bad_override --verbose-debug
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/async_next_test.dart b/runtime/observatory/tests/service/async_next_test.dart
index 2e9a0f2..9e298f7 100644
--- a/runtime/observatory/tests/service/async_next_test.dart
+++ b/runtime/observatory/tests/service/async_next_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override  --verbose_debug
+// VMOptions=--error_on_bad_type --error_on_bad_override  --verbose_debug
 
 import 'package:observatory/service_io.dart';
 import 'test_helper.dart';
diff --git a/runtime/observatory/tests/service/async_scope_test.dart b/runtime/observatory/tests/service/async_scope_test.dart
index 981ea26..a3f97cc 100644
--- a/runtime/observatory/tests/service/async_scope_test.dart
+++ b/runtime/observatory/tests/service/async_scope_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'dart:developer';
 import 'package:observatory/service_io.dart';
diff --git a/runtime/observatory/tests/service/bad_web_socket_address_test.dart b/runtime/observatory/tests/service/bad_web_socket_address_test.dart
index 946a596..2417d02 100644
--- a/runtime/observatory/tests/service/bad_web_socket_address_test.dart
+++ b/runtime/observatory/tests/service/bad_web_socket_address_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:logging/logging.dart';
 import "package:observatory/service_io.dart";
diff --git a/runtime/observatory/tests/service/break_on_activation_test.dart b/runtime/observatory/tests/service/break_on_activation_test.dart
index 7de3d76..6291de5 100644
--- a/runtime/observatory/tests/service/break_on_activation_test.dart
+++ b/runtime/observatory/tests/service/break_on_activation_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/break_on_function_test.dart b/runtime/observatory/tests/service/break_on_function_test.dart
index 1988578..1a0e0ee 100644
--- a/runtime/observatory/tests/service/break_on_function_test.dart
+++ b/runtime/observatory/tests/service/break_on_function_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override  --verbose_debug
+// VMOptions=--error_on_bad_type --error_on_bad_override  --verbose_debug
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/caching_test.dart b/runtime/observatory/tests/service/caching_test.dart
index 196bab4..8a72447 100644
--- a/runtime/observatory/tests/service/caching_test.dart
+++ b/runtime/observatory/tests/service/caching_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 // If caching is working properly, the coverage data will go into the same
 // Script object from which we requested coverage data, instead of a new
diff --git a/runtime/observatory/tests/service/code_test.dart b/runtime/observatory/tests/service/code_test.dart
index bffbb79..5a3af8c 100644
--- a/runtime/observatory/tests/service/code_test.dart
+++ b/runtime/observatory/tests/service/code_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/command_test.dart b/runtime/observatory/tests/service/command_test.dart
index 69ac08f..8792d87 100644
--- a/runtime/observatory/tests/service/command_test.dart
+++ b/runtime/observatory/tests/service/command_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'dart:async';
 
diff --git a/runtime/observatory/tests/service/contexts_test.dart b/runtime/observatory/tests/service/contexts_test.dart
index 2a34ba0..12bbbfb 100644
--- a/runtime/observatory/tests/service/contexts_test.dart
+++ b/runtime/observatory/tests/service/contexts_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library inbound_references_test;
 
diff --git a/runtime/observatory/tests/service/coverage_test.dart b/runtime/observatory/tests/service/coverage_test.dart
index 9a6db65..4b44b37 100644
--- a/runtime/observatory/tests/service/coverage_test.dart
+++ b/runtime/observatory/tests/service/coverage_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/debugger_inspect_test.dart b/runtime/observatory/tests/service/debugger_inspect_test.dart
index 3037abe..1f7fe31 100644
--- a/runtime/observatory/tests/service/debugger_inspect_test.dart
+++ b/runtime/observatory/tests/service/debugger_inspect_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/debugger_location_test.dart b/runtime/observatory/tests/service/debugger_location_test.dart
index 1c26e31..407bd52 100644
--- a/runtime/observatory/tests/service/debugger_location_test.dart
+++ b/runtime/observatory/tests/service/debugger_location_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:observatory/debugger.dart';
diff --git a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
index 886b368..91ca4b2 100644
--- a/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
+++ b/runtime/observatory/tests/service/debugging_inlined_finally_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/debugging_test.dart b/runtime/observatory/tests/service/debugging_test.dart
index d3908b9..c43dcbb 100644
--- a/runtime/observatory/tests/service/debugging_test.dart
+++ b/runtime/observatory/tests/service/debugging_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/developer_extension_test.dart b/runtime/observatory/tests/service/developer_extension_test.dart
new file mode 100644
index 0000000..f134606
--- /dev/null
+++ b/runtime/observatory/tests/service/developer_extension_test.dart
@@ -0,0 +1,133 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--error_on_bad_type --error_on_bad_override
+
+import 'dart:async';
+import 'dart:convert';
+import 'dart:developer';
+import 'package:observatory/service_io.dart';
+import 'package:observatory/cpu_profile.dart';
+import 'package:unittest/unittest.dart';
+
+import 'test_helper.dart';
+
+Future<ServiceExtensionResponse> Handler(String method,
+                                         Map paremeters) {
+  print('Invoked extension: $method');
+  switch (method) {
+    case '__delay':
+      Completer c = new Completer();
+      new Timer(new Duration(seconds: 1), () {
+        c.complete(new ServiceExtensionResponse.result(JSON.encode({
+            'type': '_delayedType',
+            'method': method,
+            'parameters': paremeters,
+          })));
+      });
+      return c.future;
+    case '__error':
+      return new Future.value(
+              new ServiceExtensionResponse.error(
+                  ServiceExtensionResponse.kExtensionErrorMin,
+                  'My error detail.'));
+    case '__exception':
+      throw "I always throw!";
+    case '__success':
+      return new Future.value(
+          new ServiceExtensionResponse.result(JSON.encode({
+              'type': '_extensionType',
+              'method': method,
+              'parameters': paremeters,
+          })));
+    case '__null':
+      return null;
+    case '__nullFuture':
+      return new Future.value(null);
+  }
+}
+
+Future<ServiceExtensionResponse> LanguageErrorHandler(String method,
+                                                      Map paremeters) {
+  // The following is an intentional syntax error.
+  klajsdlkjfad
+}
+
+void test() {
+  registerExtension('__delay', Handler);
+  registerExtension('__error', Handler);
+  registerExtension('__exception', Handler);
+  registerExtension('__null', Handler);
+  registerExtension('__nullFuture', Handler);
+  registerExtension('__success', Handler);
+  bool exceptionThrown = false;
+  try {
+    registerExtension('__delay', Handler);
+  } catch (e) {
+    exceptionThrown = true;
+  }
+  expect(exceptionThrown, isTrue);
+  registerExtension('__languageError', LanguageErrorHandler);
+}
+
+var tests = [
+  // Initial.
+  (Isolate isolate) async {
+    var result;
+
+    result = await isolate.invokeRpcNoUpgrade('__delay', {});
+    expect(result['type'], equals('_delayedType'));
+    expect(result['method'], equals('__delay'));
+    expect(result['parameters']['isolateId'], isNotNull);
+
+    try {
+      await isolate.invokeRpcNoUpgrade('__error', {});
+    } on ServerRpcException catch (e, st) {
+      expect(e.code, equals(ServiceExtensionResponse.kExtensionErrorMin));
+      expect(e.message, equals('My error detail.'));
+    }
+
+    try {
+      await isolate.invokeRpcNoUpgrade('__exception', {});
+    } on ServerRpcException catch (e, st) {
+      expect(e.code, equals(ServiceExtensionResponse.kExtensionError));
+      expect(e.message.startsWith('I always throw!\n'), isTrue);
+    }
+
+    try {
+      await isolate.invokeRpcNoUpgrade('__null', {});
+    } on ServerRpcException catch (e, st) {
+      expect(e.code, equals(ServiceExtensionResponse.kExtensionError));
+      expect(e.message, equals('Extension handler must return a Future'));
+    }
+
+    try {
+      await isolate.invokeRpcNoUpgrade('__nullFuture', {});
+    } on ServerRpcException catch (e, st) {
+      expect(e.code, equals(ServiceExtensionResponse.kExtensionError));
+      expect(e.message, equals('Extension handler must complete to a '
+                               'ServiceExtensionResponse'));
+    }
+
+    result = await isolate.invokeRpcNoUpgrade('__success',
+                                              {'apple': 'banana'});
+    expect(result['type'], equals('_extensionType'));
+    expect(result['method'], equals('__success'));
+    expect(result['parameters']['isolateId'], isNotNull);
+    expect(result['parameters']['apple'], equals('banana'));
+
+
+    try {
+      result = await isolate.invokeRpcNoUpgrade('__languageError', {});
+    } on ServerRpcException catch (e, st) {
+      expect(e.code, equals(ServiceExtensionResponse.kExtensionError));
+      expect(e.message, stringContainsInOrder([
+          'Error in extension `__languageError`:',
+          'developer_extension_test.dart',
+          'semicolon expected']));
+    }
+
+  },
+];
+
+main(args) async => runIsolateTests(args, tests, testeeBefore:test);
diff --git a/runtime/observatory/tests/service/dominator_tree_test.dart b/runtime/observatory/tests/service/dominator_tree_test.dart
index ef4fcd8..a778f62 100644
--- a/runtime/observatory/tests/service/dominator_tree_test.dart
+++ b/runtime/observatory/tests/service/dominator_tree_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/echo_test.dart b/runtime/observatory/tests/service/echo_test.dart
index b64b177..64399de 100644
--- a/runtime/observatory/tests/service/echo_test.dart
+++ b/runtime/observatory/tests/service/echo_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'dart:async';
 import 'package:observatory/service_io.dart';
diff --git a/runtime/observatory/tests/service/eval_test.dart b/runtime/observatory/tests/service/eval_test.dart
index 7a535f4..c251be3 100644
--- a/runtime/observatory/tests/service/eval_test.dart
+++ b/runtime/observatory/tests/service/eval_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/evaluate_activation_test.dart b/runtime/observatory/tests/service/evaluate_activation_test.dart
index cffc6fa..eb24a0e 100644
--- a/runtime/observatory/tests/service/evaluate_activation_test.dart
+++ b/runtime/observatory/tests/service/evaluate_activation_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/gc_test.dart b/runtime/observatory/tests/service/gc_test.dart
index fba9ebd..c21c858 100644
--- a/runtime/observatory/tests/service/gc_test.dart
+++ b/runtime/observatory/tests/service/gc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'test_helper.dart';
diff --git a/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart b/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
index 10ffc2c..7db64c9 100644
--- a/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_allocation_profile_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_allocation_samples_test.dart b/runtime/observatory/tests/service/get_allocation_samples_test.dart
index b70d121..698fce5 100644
--- a/runtime/observatory/tests/service/get_allocation_samples_test.dart
+++ b/runtime/observatory/tests/service/get_allocation_samples_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'dart:developer';
 import 'package:observatory/service_io.dart';
diff --git a/runtime/observatory/tests/service/get_flag_list_rpc_test.dart b/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
index db3040c..3b646c7 100644
--- a/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_flag_list_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_heap_map_rpc_test.dart b/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
index 9999ce6..520801d 100644
--- a/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_heap_map_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_instances_rpc_test.dart b/runtime/observatory/tests/service/get_instances_rpc_test.dart
index da26013..cd9f476 100644
--- a/runtime/observatory/tests/service/get_instances_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_instances_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_isolate_rpc_test.dart b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
index 153cbb6..f45caf3 100644
--- a/runtime/observatory/tests/service/get_isolate_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_isolate_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
@@ -29,6 +29,23 @@
     expect(result['_heaps']['new']['type'], equals('HeapSpace'));
     expect(result['_heaps']['old']['type'], equals('HeapSpace'));
   },
+
+  (VM vm) async {
+    var params = {
+      'isolateId': 'badid',
+    };
+    bool caughtException;
+    try {
+      await vm.invokeRpcNoUpgrade('getIsolate', params);
+      expect(false, isTrue, reason:'Unreachable');
+    } on ServerRpcException catch(e) {
+      caughtException = true;
+      expect(e.code, equals(ServerRpcException.kInvalidParams));
+      expect(e.message,
+             "getIsolate: invalid 'isolateId' parameter: badid");
+    }
+    expect(caughtException, isTrue);
+  },
 ];
 
 main(args) async => runVMTests(args, tests);
diff --git a/runtime/observatory/tests/service/get_object_rpc_test.dart b/runtime/observatory/tests/service/get_object_rpc_test.dart
index 18d984d..fdcbaa1 100644
--- a/runtime/observatory/tests/service/get_object_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_object_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library get_object_rpc_test;
 
diff --git a/runtime/observatory/tests/service/get_ports_rpc_test.dart b/runtime/observatory/tests/service/get_ports_rpc_test.dart
index 1c08a16..7e977ed 100644
--- a/runtime/observatory/tests/service/get_ports_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_ports_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library get_ports_rpc_test;
 
diff --git a/runtime/observatory/tests/service/get_retained_size_rpc_test.dart b/runtime/observatory/tests/service/get_retained_size_rpc_test.dart
index 1ead7cf..96df916 100644
--- a/runtime/observatory/tests/service/get_retained_size_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_retained_size_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
index f773dae..74e98c9 100644
--- a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_stack_rpc_test.dart b/runtime/observatory/tests/service/get_stack_rpc_test.dart
index 7210794..2bf7c3a 100644
--- a/runtime/observatory/tests/service/get_stack_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_stack_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/get_version_rpc_test.dart b/runtime/observatory/tests/service/get_version_rpc_test.dart
index 636eb71..8c33998 100644
--- a/runtime/observatory/tests/service/get_version_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_version_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
@@ -13,7 +13,7 @@
     var result = await vm.invokeRpcNoUpgrade('getVersion', {});
     expect(result['type'], equals('Version'));
     expect(result['major'], equals(2));
-    expect(result['minor'], equals(0));
+    expect(result['minor'], equals(1));
     expect(result['_privateMajor'], equals(0));
     expect(result['_privateMinor'], equals(0));
   },
diff --git a/runtime/observatory/tests/service/get_vm_rpc_test.dart b/runtime/observatory/tests/service/get_vm_rpc_test.dart
index 95481c5..6aa8e33 100644
--- a/runtime/observatory/tests/service/get_vm_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/graph_test.dart b/runtime/observatory/tests/service/graph_test.dart
index feac00c..3cf8c46 100644
--- a/runtime/observatory/tests/service/graph_test.dart
+++ b/runtime/observatory/tests/service/graph_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/object_graph.dart';
 import 'package:observatory/service_io.dart';
diff --git a/runtime/observatory/tests/service/inbound_references_test.dart b/runtime/observatory/tests/service/inbound_references_test.dart
index ba97490..b73ace5 100644
--- a/runtime/observatory/tests/service/inbound_references_test.dart
+++ b/runtime/observatory/tests/service/inbound_references_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library inbound_references_test;
 
@@ -41,14 +41,14 @@
 
     // Assert e is referenced by at least n, array, and the top-level
     // field e.
-    hasReferenceSuchThat((r) => r['slot'] is Field &&
-                         r['slot'].name=='edge' &&
-                         r['source'].isInstance &&
-                         r['source'].clazz.name=='Node');
-    hasReferenceSuchThat((r) => r['slot'] == 1 &&
-                         r['source'].isList);
-    hasReferenceSuchThat((r) => r['slot']=='<unknown>' &&
-                         r['source'] is Field);
+    hasReferenceSuchThat((r) => r['parentField'] != null &&
+                                r['parentField'].name == 'edge' &&
+                                r['source'].isInstance &&
+                                r['source'].clazz.name == 'Node');
+    hasReferenceSuchThat((r) => r['parentListIndex'] == 1 &&
+                                r['source'].isList);
+    hasReferenceSuchThat((r) => r['source'] is Field &&
+                                r['source'].name == 'e');
   }
 
 ];
diff --git a/runtime/observatory/tests/service/isolate_lifecycle_test.dart b/runtime/observatory/tests/service/isolate_lifecycle_test.dart
index 2160d0c..f88b123 100644
--- a/runtime/observatory/tests/service/isolate_lifecycle_test.dart
+++ b/runtime/observatory/tests/service/isolate_lifecycle_test.dart
@@ -1,9 +1,10 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'dart:async';
+import 'dart:developer';
 import 'dart:isolate' as I;
 
 import 'package:observatory/service_io.dart';
@@ -18,7 +19,8 @@
 void spawnEntry(int i) {
 }
 
-Future before() async {
+Future during() async {
+  debugger();
   // Spawn spawnCount long lived isolates.
   for (var i = 0; i < spawnCount; i++) {
     var isolate = await I.Isolate.spawn(spawnEntry, i);
@@ -27,9 +29,6 @@
   print('spawned all isolates');
 }
 
-Future during() async {
-}
-
 int numPaused(vm) {
   int paused = 0;
   for (var isolate in vm.isolates) {
@@ -42,20 +41,33 @@
 
 var tests = [
   (VM vm) async {
+    expect(vm.isolates.length, 1);
+    await hasStoppedAtBreakpoint(vm.isolates[0]);
+  },
+
+  (VM vm) async {
     Completer completer = new Completer();
     var stream = await vm.getEventStream(VM.kIsolateStream);
-    if (vm.isolates.length < spawnCount + 1) {
-      var subscription;
-      subscription = stream.listen((ServiceEvent event) {
-        if (event.kind == ServiceEvent.kIsolateStart) {
-          if (vm.isolates.length == (spawnCount + 1)) {
-            subscription.cancel();
-            completer.complete(null);
-          }
-        }
-      });
-      await completer.future;
-    }
+    var subscription;
+    int startCount = 0;
+    int runnableCount = 0;
+    subscription = stream.listen((ServiceEvent event) {
+      if (event.kind == ServiceEvent.kIsolateStart) {
+        startCount++;
+      }
+      if (event.kind == ServiceEvent.kIsolateRunnable) {
+        runnableCount++;
+      }
+      if (runnableCount == spawnCount) {
+        subscription.cancel();
+        completer.complete(null);
+      }
+    });
+    expect(vm.isolates.length, 1);
+    vm.isolates[0].resume();
+    await completer.future;
+    expect(startCount, spawnCount);
+    expect(runnableCount, spawnCount);
     expect(vm.isolates.length, spawnCount + 1);
   },
 
@@ -69,7 +81,7 @@
   (VM vm) async {
     Completer completer = new Completer();
     var stream = await vm.getEventStream(VM.kDebugStream);
-    if (numPaused(vm) < spawnCount) {
+    if (numPaused(vm) < (spawnCount + 1)) {
       var subscription;
       subscription = stream.listen((ServiceEvent event) {
         if (event.kind == ServiceEvent.kPauseExit) {
@@ -124,6 +136,5 @@
 ];
 
 main(args) async => runVMTests(args, tests,
-                               testeeBefore: before,
                                testeeConcurrent: during,
                                pause_on_exit: true);
diff --git a/runtime/observatory/tests/service/library_dependency_test.dart b/runtime/observatory/tests/service/library_dependency_test.dart
index 8297261..6a91179 100644
--- a/runtime/observatory/tests/service/library_dependency_test.dart
+++ b/runtime/observatory/tests/service/library_dependency_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/malformed_test.dart b/runtime/observatory/tests/service/malformed_test.dart
index 6cf5302..ea3a093 100644
--- a/runtime/observatory/tests/service/malformed_test.dart
+++ b/runtime/observatory/tests/service/malformed_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/metrics_test.dart b/runtime/observatory/tests/service/metrics_test.dart
index 9b3a45e..d501f03 100644
--- a/runtime/observatory/tests/service/metrics_test.dart
+++ b/runtime/observatory/tests/service/metrics_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/mirror_references_test.dart b/runtime/observatory/tests/service/mirror_references_test.dart
index dacb412..b93bfa6 100644
--- a/runtime/observatory/tests/service/mirror_references_test.dart
+++ b/runtime/observatory/tests/service/mirror_references_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library vm_references_test;
 
diff --git a/runtime/observatory/tests/service/native_metrics_test.dart b/runtime/observatory/tests/service/native_metrics_test.dart
index 77bc903..dd713a2 100644
--- a/runtime/observatory/tests/service/native_metrics_test.dart
+++ b/runtime/observatory/tests/service/native_metrics_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/pause_on_exceptions_test.dart b/runtime/observatory/tests/service/pause_on_exceptions_test.dart
index f4a1da2..a9f9ece 100644
--- a/runtime/observatory/tests/service/pause_on_exceptions_test.dart
+++ b/runtime/observatory/tests/service/pause_on_exceptions_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart b/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
index b7f7935..93444d0 100644
--- a/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
+++ b/runtime/observatory/tests/service/pause_on_start_and_exit_test.dart
@@ -4,6 +4,7 @@
 // VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
 import 'test_helper.dart';
 import 'dart:async';
 
@@ -14,24 +15,41 @@
 var tests = [
 
 (Isolate isolate) async {
+  print('Getting stream...');
   Completer completer = new Completer();
   var stream = await isolate.vm.getEventStream(VM.kDebugStream);
+  print('Subscribing...');
   var subscription;
   subscription = stream.listen((ServiceEvent event) {
     if (event.kind == ServiceEvent.kPauseStart) {
-      print('Received PauseStart');
+      print('Received $event');
       subscription.cancel();
       completer.complete();
+    } else {
+      print('Ignoring event $event');
     }
   });
+  print('Subscribed.  Pause event is ${isolate.pauseEvent}');
 
   if (isolate.pauseEvent != null &&
       isolate.pauseEvent.kind == ServiceEvent.kPauseStart) {
     // Wait for the isolate to hit PauseStart.
     subscription.cancel();
+    print('Subscription cancelled.');
   } else {
+    print('Waiting for pause start event.');
     await completer.future;
   }
+  print('Done waiting for pause event.');
+
+  // Grab the timestamp.
+  var pausetime1 = isolate.pauseEvent.timestamp;
+  expect(pausetime1, isNotNull);
+  // Reload the isolate.
+  await isolate.reload();
+  // Verify that it is the same.
+  expect(pausetime1.millisecondsSinceEpoch,
+         equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
 
   completer = new Completer();
   stream = await isolate.vm.getEventStream(VM.kDebugStream);
@@ -48,10 +66,24 @@
 
   // Wait for the isolate to hit PauseExit.
   await completer.future;
+
+  // Grab the timestamp.
+  var pausetime2 = isolate.pauseEvent.timestamp;
+  expect(pausetime2, isNotNull);
+  // Reload the isolate.
+  await isolate.reload();
+  // Verify that it is the same.
+  expect(pausetime2.millisecondsSinceEpoch,
+         equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
+  expect(pausetime2.millisecondsSinceEpoch,
+         greaterThan(pausetime1.millisecondsSinceEpoch));
 },
 
 ];
 
 main(args) => runIsolateTests(args, tests,
                               testeeConcurrent: testMain,
-                              pause_on_start: true, pause_on_exit: true);
+                              pause_on_start: true,
+                              pause_on_exit: true,
+                              trace_service: true,
+                              verbose_vm: true);
diff --git a/runtime/observatory/tests/service/pause_on_start_then_step_test.dart b/runtime/observatory/tests/service/pause_on_start_then_step_test.dart
index 20e91c5..9fbf6ba 100644
--- a/runtime/observatory/tests/service/pause_on_start_then_step_test.dart
+++ b/runtime/observatory/tests/service/pause_on_start_then_step_test.dart
@@ -4,6 +4,7 @@
 // VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
 import 'test_helper.dart';
 import 'dart:async';
 
@@ -14,24 +15,41 @@
 var tests = [
 
 (Isolate isolate) async {
+  print('Getting stream...');
   Completer completer = new Completer();
   var stream = await isolate.vm.getEventStream(VM.kDebugStream);
+  print('Subscribing...');
   var subscription;
   subscription = stream.listen((ServiceEvent event) {
     if (event.kind == ServiceEvent.kPauseStart) {
-      print('Received PauseStart');
+      print('Received $event');
       subscription.cancel();
       completer.complete();
+    } else {
+      print('Ignoring event $event');
     }
   });
+  print('Subscribed.  Pause event is ${isolate.pauseEvent}');
 
   if (isolate.pauseEvent != null &&
       isolate.pauseEvent.kind == ServiceEvent.kPauseStart) {
     // Wait for the isolate to hit PauseStart.
     subscription.cancel();
+    print('Subscription cancelled.');
   } else {
+    print('Waiting for pause start event.');
     await completer.future;
   }
+  print('Done waiting for pause event.');
+
+  // Grab the timestamp.
+  var pausetime1 = isolate.pauseEvent.timestamp;
+  expect(pausetime1, isNotNull);
+  // Reload the isolate.
+  await isolate.reload();
+  // Verify that it is the same.
+  expect(pausetime1.millisecondsSinceEpoch,
+         equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
 
   completer = new Completer();
   stream = await isolate.vm.getEventStream(VM.kDebugStream);
@@ -41,17 +59,34 @@
       subscription.cancel();
       completer.complete();
     }
+    print('Got ${event.kind}');
   });
 
   print('Stepping...');
   isolate.stepInto();
 
   // Wait for the isolate to hit PauseBreakpoint.
+  print('Waiting for PauseBreakpoint');
   await completer.future;
+
+  // Grab the timestamp.
+  var pausetime2 = isolate.pauseEvent.timestamp;
+  expect(pausetime2, isNotNull);
+  // Reload the isolate.
+  await isolate.reload();
+  // Verify that it is the same.
+  expect(pausetime2.millisecondsSinceEpoch,
+         equals(isolate.pauseEvent.timestamp.millisecondsSinceEpoch));
+
+ expect(pausetime2.millisecondsSinceEpoch,
+        greaterThan(pausetime1.millisecondsSinceEpoch));
 },
 
 ];
 
 main(args) => runIsolateTests(args, tests,
                               testeeConcurrent: testMain,
-                              pause_on_start: true, pause_on_exit: true);
+                              pause_on_start: true,
+                              pause_on_exit: true,
+                              trace_service: true,
+                              verbose_vm: true);
diff --git a/runtime/observatory/tests/service/read_stream_test.dart b/runtime/observatory/tests/service/read_stream_test.dart
index 74c12a2..1376d50 100644
--- a/runtime/observatory/tests/service/read_stream_test.dart
+++ b/runtime/observatory/tests/service/read_stream_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/object_graph.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/service.status b/runtime/observatory/tests/service/service.status
index ce688fb..75b4f95 100644
--- a/runtime/observatory/tests/service/service.status
+++ b/runtime/observatory/tests/service/service.status
@@ -6,22 +6,6 @@
 evaluate_activation_test/instance: RuntimeError # http://dartbug.com/20047
 evaluate_activation_test/scope: RuntimeError # http://dartbug.com/20047
 
-# Unexpected number format
-[ $system == windows ]
-code_test: Skip
-
-# Null code assertion http://dartbug.com/23290
-[ $system == windows ]
-coverage_test: Skip
-
-# Issue 23201
-[ $system == windows ]
-debugging_test: Skip
-
-# Tests that depend on token positions (which differ in release mode).
-[ $mode == release ]
-debugging_test: Skip
-
 # Disable on simulators.
 [ $arch == simarm || $arch == simmips || $arch == simarm64]
 *: SkipSlow
@@ -29,3 +13,7 @@
 # All tests use dart:io
 [ $browser || $compiler == dart2js ]
 *: SkipByDesign
+
+# Tests with known analyzer issues
+[ $compiler == dartanalyzer || $compiler == dart2analyzer ]
+developer_extension_test: SkipByDesign
diff --git a/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart b/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart
index fea9fed..fe51ff7 100644
--- a/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart
+++ b/runtime/observatory/tests/service/set_library_debuggable_rpc_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library set_library_debuggable_rpc_test;
 
diff --git a/runtime/observatory/tests/service/smart_next_test.dart b/runtime/observatory/tests/service/smart_next_test.dart
new file mode 100644
index 0000000..aeb819f
--- /dev/null
+++ b/runtime/observatory/tests/service/smart_next_test.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--error_on_bad_type --error_on_bad_override
+
+import 'package:observatory/service_io.dart';
+import 'test_helper.dart';
+import 'dart:async';
+import 'dart:developer';
+
+foo() async { }
+bar() { }
+
+doAsync(stop) async {
+  if (stop) debugger();
+  await foo(); // Line 16.
+  bar();       // Line 17.
+  bar();       // Line 18.
+  await foo(); // Line 19.
+  await foo(); // Line 20.
+  bar();       // Line 21.
+  return null;
+}
+
+testMain() {
+  // With two runs of doAsync floating around, async step should only cause
+  // us to stop in the run we started in.
+  doAsync(false);
+  doAsync(true);
+}
+
+stepOverAwaitingResume(Isolate isolate) async {
+  Completer completer = new Completer();
+  await isolate.vm.getEventStream(VM.kDebugStream).then((stream) {
+    var subscription;
+    subscription = stream.listen((ServiceEvent event) {
+      if (event.kind == ServiceEvent.kResume) {
+        subscription.cancel();
+        completer.complete();
+      }
+    });
+  });
+  isolate.stepOver();
+  return completer.future;
+}
+
+smartNext(Isolate isolate) async {
+  if (isolate.pauseEvent.atAsyncJump) {
+    print("next-async");
+    return isolate.asyncStepOver()[Isolate.kSecondResume];
+  } else {
+    print("next-sync");
+    return stepOverAwaitingResume(isolate);
+  }
+}
+
+var tests = [
+             hasStoppedAtBreakpoint, stoppedAtLine(16), // foo()
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar()
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar()
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo()
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo()
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await
+  smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar()
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory/tests/service/steal_breakpoint_test.dart b/runtime/observatory/tests/service/steal_breakpoint_test.dart
index 95a4191..5c7c1b6 100644
--- a/runtime/observatory/tests/service/steal_breakpoint_test.dart
+++ b/runtime/observatory/tests/service/steal_breakpoint_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override --steal-breakpoints
+// VMOptions=--error_on_bad_type --error_on_bad_override --steal-breakpoints
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/string_escaping_test.dart b/runtime/observatory/tests/service/string_escaping_test.dart
index 0fd3c6a..fd99cee 100644
--- a/runtime/observatory/tests/service/string_escaping_test.dart
+++ b/runtime/observatory/tests/service/string_escaping_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library string_escaping_test;
 
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index d640dc5..6c6c223 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -26,13 +26,19 @@
                             Platform.script.toFilePath(),
                             _TESTEE_MODE_FLAG] {}
 
-  Future<int> launch(bool pause_on_start, bool pause_on_exit) {
+  Future<int> launch(bool pause_on_start, bool pause_on_exit, bool trace_service) {
+    assert(pause_on_start != null);
+    assert(pause_on_exit != null);
+    assert(trace_service != null);
     String dartExecutable = Platform.executable;
     var fullArgs = [];
-    if (pause_on_start == true) {
+    if (trace_service) {
+      fullArgs.add('--trace-service');
+    }
+    if (pause_on_start) {
       fullArgs.add('--pause-isolates-on-start');
     }
-    if (pause_on_exit == true) {
+    if (pause_on_exit) {
       fullArgs.add('--pause-isolates-on-exit');
     }
     fullArgs.addAll(Platform.executableArguments);
@@ -102,7 +108,9 @@
                      {void testeeBefore(),
                       void testeeConcurrent(),
                       bool pause_on_start: false,
-                      bool pause_on_exit: false}) {
+                      bool pause_on_exit: false,
+                      bool trace_service: false,
+                      bool verbose_vm: false}) {
   assert(!pause_on_start || testeeBefore == null);
   if (mainArgs.contains(_TESTEE_MODE_FLAG)) {
     if (!pause_on_start) {
@@ -120,7 +128,7 @@
     }
   } else {
     var process = new _TestLauncher();
-    process.launch(pause_on_start, pause_on_exit).then((port) {
+    process.launch(pause_on_start, pause_on_exit, trace_service).then((port) {
       if (mainArgs.contains("--gdb")) {
         port = 8181;
       }
@@ -133,6 +141,7 @@
         new WebSocketVM(new WebSocketVMTarget(addr)).load()
             .then((VM vm) => vm.isolates.first.load())
             .then((Isolate isolate) => Future.forEach(tests, (test) {
+              isolate.vm.verbose = verbose_vm;
               print('Running $name [$testIndex/$totalTests]');
               testIndex++;
               return test(isolate);
@@ -209,6 +218,7 @@
     expect(stack['frames'].length, greaterThanOrEqualTo(1));
 
     Frame top = stack['frames'][0];
+    print("We are at $top");
     Script script = await top.location.script.load();
     expect(script.tokenToLine(top.location.tokenPos), equals(line));
   };
@@ -276,7 +286,9 @@
                   {Future testeeBefore(),
                    Future testeeConcurrent(),
                    bool pause_on_start: false,
-                   bool pause_on_exit: false}) async {
+                   bool pause_on_exit: false,
+                   bool trace_service: false,
+                   bool verbose_vm: false}) async {
   if (mainArgs.contains(_TESTEE_MODE_FLAG)) {
     if (!pause_on_start) {
       if (testeeBefore != null) {
@@ -293,7 +305,9 @@
     }
   } else {
     var process = new _TestLauncher();
-    process.launch(pause_on_start, pause_on_exit).then((port) async {
+    process.launch(pause_on_start,
+                   pause_on_exit,
+                   trace_service).then((port) async {
       if (mainArgs.contains("--gdb")) {
         port = 8181;
       }
@@ -305,6 +319,7 @@
       runZoned(() {
         new WebSocketVM(new WebSocketVMTarget(addr)).load()
             .then((VM vm) => Future.forEach(tests, (test) {
+              vm.verbose = verbose_vm;
               print('Running $name [$testIndex/$totalTests]');
               testIndex++;
               return test(vm);
diff --git a/runtime/observatory/tests/service/type_arguments_test.dart b/runtime/observatory/tests/service/type_arguments_test.dart
index 6741520..bfa2f93 100644
--- a/runtime/observatory/tests/service/type_arguments_test.dart
+++ b/runtime/observatory/tests/service/type_arguments_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/typed_data_test.dart b/runtime/observatory/tests/service/typed_data_test.dart
index 83be522..df52afd 100644
--- a/runtime/observatory/tests/service/typed_data_test.dart
+++ b/runtime/observatory/tests/service/typed_data_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library typed_data_test;
 
diff --git a/runtime/observatory/tests/service/vm_test.dart b/runtime/observatory/tests/service/vm_test.dart
index bbce87b..eedf6ae 100644
--- a/runtime/observatory/tests/service/vm_test.dart
+++ b/runtime/observatory/tests/service/vm_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 import 'package:observatory/service_io.dart';
 import 'package:unittest/unittest.dart';
diff --git a/runtime/observatory/tests/service/weak_properties_test.dart b/runtime/observatory/tests/service/weak_properties_test.dart
index 7de95c1..02f4d31 100644
--- a/runtime/observatory/tests/service/weak_properties_test.dart
+++ b/runtime/observatory/tests/service/weak_properties_test.dart
@@ -1,7 +1,7 @@
 // Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile_all --error_on_bad_type --error_on_bad_override
+// VMOptions=--error_on_bad_type --error_on_bad_override
 
 library vm_references_test;
 
diff --git a/runtime/observatory/tests/ui/inspector.dart b/runtime/observatory/tests/ui/inspector.dart
index 450cfeb..b133e91 100644
--- a/runtime/observatory/tests/ui/inspector.dart
+++ b/runtime/observatory/tests/ui/inspector.dart
@@ -6,158 +6,246 @@
 
 library manual_inspector_test;
 
+import 'dart:async';
 import 'dart:isolate';
 import 'dart:mirrors';
 import 'dart:developer';
 import 'dart:typed_data';
 
-class A <T> {}
-class B <S extends num> {}
+part 'inspector_part.dart';
 
-var array;
-var bigint;
-var blockClean;
-var blockCopying;
-var blockFull;
-var blockFullWithChain;
-var boundedType;
-var capability;
-var counter;
-var expando;
-var float32x4;
-var float64;
-var float64x2;
-var gauge;
-var growableList;
-var int32x4;
-var isolate;
-var map;
-var mint;
-var mirrorClass;
-var mirrorClosure;
-var mirrorInstance;
-var mirrorReference;
-var portReceive;
-var portSend;
-var regex;
-var smi;
-var stacktrace;
-var string;
-var stringEscapedUnicodeEscape;
-var stringHebrew;
-var stringLatin1;
-var stringMalformedLead;
-var stringMalformedTrail;
-var stringNewLinesAndTabs;
-var stringNullInTheMiddle;
-var stringSnowflake;
-var stringTrebleClefs;
-var stringUnicode;
-var theFalse;
-var theNull;
-var theTrue;
-var type;
-var typeParameter;
-var typedData;
+var libraryField;
+var node;
 var uninitialized = new Object();
-var userTag;
-var weakProperty;
 
 extractPrivateField(obj, name) {
   return reflect(obj).getField(MirrorSystem.getSymbol(name, reflect(obj).type.owner)).reflectee;
 }
 
-genStacktrace() {
-  try {
-    num.parse(',');
-  } catch (e, s) {
-    return s;
+class A <T> {}
+class B <S extends num> {}
+
+class Node {
+  static var classField;
+
+  var nullable;
+  var mixedType;
+  var array;
+  var bigint;
+  var blockClean;
+  var blockCopying;
+  var blockFull;
+  var blockFullWithChain;
+  var boundedType;
+  var capability;
+  var counter;
+  var expando;
+  var float32x4;
+  var float64;
+  var float64x2;
+  var gauge;
+  var growableList;
+  var int32x4;
+  var isolate;
+  var map;
+  var mint;
+  var mirrorClass;
+  var mirrorClosure;
+  var mirrorInstance;
+  var mirrorReference;
+  var portReceive;
+  var portSend;
+  var regex;
+  var smi;
+  var stacktrace;
+  var string;
+  var stringLatin1;
+  var stringSnowflake;
+  var stringUnicode;
+  var stringHebrew;
+  var stringTrebleClef;
+  var theFalse;
+  var theNull;
+  var theTrue;
+  var type;
+  var typeParameter;
+  var typedData;
+  var userTag;
+  var weakProperty;
+
+  genStacktrace() {
+    try {
+      num.parse(',');
+    } catch (e, s) {
+      return s;
+    }
   }
-}
 
-genCleanBlock() {
-  block(x) => x;
-  return block;
-}
-
-genCopyingBlock() {
-  final x = 'I could be copied down';
-  block() => x;
-  return block;
-}
-
-genFullBlock() {
-  var x = 0;
-  block() => x++;
-  return block;
-}
-
-genFullBlockWithChain() {
-  var x = 0;
-  outer() {
-    var y = 0;
-    block() => x++ + y++;
+  genCleanBlock() {
+    block(x) => x;
     return block;
   }
-  return outer;
+
+  genCopyingBlock() {
+    final x = 'I could be copied down';
+    block() => x;
+    return block;
+  }
+
+  genFullBlock() {
+    var x = 0;
+    block() => x++;
+    return block;
+  }
+
+  genFullBlockWithChain() {
+    var x = 0;
+    outer() {
+      var y = 0;
+      block() => x++ + y++;
+      return block;
+    }
+    return outer;
+  }
+
+  f(int x) {
+    ++x;
+    return x;
+  }
+
+  main() {
+    print("Started main");
+
+    f(9);
+
+    nullable = 1;
+    nullable = null;
+    nullable = 1;
+    mixedType = 1;
+    mixedType = "2";
+    mixedType = false;
+
+    array = new List(3);
+    array[0] = 1;
+    array[1] = 2;
+    array[2] = 3;
+    bigint = 1 << 65;
+    blockClean = genCleanBlock();
+    blockCopying = genCopyingBlock();
+    blockFull = genFullBlock();
+    blockFullWithChain = genFullBlockWithChain();
+    boundedType = extractPrivateField(reflect(new B<int>()).type.typeVariables.single, '_reflectee');
+    counter = new Counter("CounterName", "Counter description");
+    expando = new Expando("expando-name");
+    expando[array] = 'The weakly associated value';
+    float32x4 = new Float32x4(0.0, -1.0, 3.14, 2e28);
+    float64 = 3.14;
+    float64x2 = new Float64x2(0.0, 3.14);
+    gauge = new Gauge("GaugeName", "Gauge description", 0.0, 100.0);
+    growableList = new List();
+    int32x4 = new Int32x4(0,1,10,11);
+    map = { "x-key": "x-value", "y-key": "y-value", "removed-key": "removed-value" };
+    map.remove("removed-key");
+    mint = 1 << 32;
+    mirrorClass = reflectClass(Object);
+    mirrorClosure = reflect(blockFull);
+    mirrorInstance = reflect("a reflectee");
+    mirrorReference = extractPrivateField(mirrorClass, '_reflectee');
+    portReceive = new RawReceivePort();
+    portSend = portReceive.sendPort;
+    regex = new RegExp("a*b+c");
+    smi = 7;
+    stacktrace = genStacktrace();
+    string = "Hello $smi ${smi.runtimeType}";
+    stringLatin1 = "blåbærgrød";
+    stringSnowflake = "❄";
+    stringUnicode = "Îñţérñåţîöñåļîžåţîờñ";
+    stringHebrew = "שלום רב שובך צפורה נחמדת";  // An example of Right-to-Left.
+    stringTrebleClef = "𝄞";  // An example of a surrogate pair.
+    theFalse = false;
+    theNull = null;
+    theTrue = true;
+    type = String;
+    typeParameter = extractPrivateField(reflectClass(A).typeVariables.single, '_reflectee');
+    typedData = extractPrivateField(new ByteData(64), '_typedData');
+    userTag = new UserTag("Example tag name");
+    weakProperty = extractPrivateField(expando, '_data').firstWhere((e) => e != null);
+
+    Isolate.spawn(secondMain, "Hello2").then((otherIsolate) {
+      isolate = otherIsolate;
+      portSend = otherIsolate.controlPort;
+      capability = otherIsolate.terminateCapability;
+    });
+    Isolate.spawn(secondMain, "Hello3").then((otherIsolate) {
+      isolate = otherIsolate;
+      portSend = otherIsolate.controlPort;
+      capability = otherIsolate.terminateCapability;
+    });
+
+    print("Finished main");
+    busy();
+  }
+
+  busy() {
+    var localVar = 0;
+    while (true) {
+      localVar = (localVar + 1) & 0xFFFF;
+    }
+  }
 }
 
-secondMain(msg) { }
+secondMain(msg) {
+  print("Hello from second isolate");
+}
+
+var typed;
+class Typed {
+  var float32List = new Float32List(16);
+  var float64List = new Float64List(16);
+
+  var int32x4 = new Int32x4(1, 2, 3, 4);
+  var float32x4 = new Float32x4.zero();
+  var float64x2 = new Float64x2.zero();
+  var int32x4List = new Int32x4List(16);
+  var float32x4List = new Float32x4List(16);
+  var float64x2List = new Float64x2List(16);
+
+  var int8List = new Int8List(8);
+  var int16List = new Int16List(8);
+  var int32List = new Int32List(8);
+  var int64List = new Int64List(8);
+  var uint8List = new Uint8List(8);
+  var uint16List = new Uint16List(8);
+  var uint32List = new Uint32List(8);
+  var uint64List = new Uint64List(8);
+  var uint8ClampedList = new Uint8ClampedList(8);
+
+  var byteBuffer = new Uint8List(8).buffer;
+  var byteBuffer2 = new Float32List(8).buffer;
+
+  var byteData = new ByteData(8);
+
+  Typed() {
+    float32List[0] = 3.14;
+    int8List[0] = 5;
+  }
+
+  Typed._named() {
+    float32List[0] = 3.14;
+    int8List[0] = 5;
+  }
+}
 
 main() {
-  print("Started main");
+  libraryField = 'Library field value';
+  Node.classField = 'Class field value';
+  typed = new Typed();
+  node = new Node();
+  node.main();
+}
 
-  array = new List(1);
-  bigint = 1 << 65;
-  blockClean = genCleanBlock();
-  blockCopying = genCopyingBlock();
-  blockFull = genFullBlock();
-  blockFullWithChain = genFullBlockWithChain();
-  boundedType = extractPrivateField(reflect(new B<int>()).type.typeVariables.single, '_reflectee');
-  counter = new Counter("CounterName", "Counter description");
-  expando = new Expando("expando-name");
-  expando[array] = 'The weakly associated value';
-  float32x4 = new Float32x4.zero();
-  float64 = 3.14;
-  float64x2 = new Float64x2.zero();
-  gauge = new Gauge("GaugeName", "Gauge description", 0.0, 100.0);
-  growableList = new List();
-  int32x4 = new Int32x4(0,0,0,0);
-  map = { "x":3, "y":4 };
-  mint = 1 << 32;
-  mirrorClass = reflectClass(Object);
-  mirrorClosure = reflect(blockFull);
-  mirrorInstance = reflect("a reflectee");
-  mirrorReference = extractPrivateField(mirrorClass, '_reflectee');
-  portReceive = new RawReceivePort();
-  regex = new RegExp("a*b+c");
-  smi = 7;
-  stacktrace = genStacktrace();
-  string = "Hello";
-  stringEscapedUnicodeEscape = "Should not be A: \\u0041";
-  stringHebrew = "שלום רב שובך צפורה נחמדת";  // Right-to-left text.
-  stringLatin1 = "blåbærgrød";
-  stringMalformedLead = "before" + "𝄞"[0] + "after";
-  stringMalformedTrail = "before" + "𝄞"[1] + "after";
-  stringNewLinesAndTabs = "One fish\ttwo fish\nRed fish\tBlue fish\n";
-  stringNullInTheMiddle = "There are four\u0000 words.";
-  stringSnowflake = "❄";
-  stringTrebleClefs = "1𝄞2𝄞𝄞3𝄞𝄞𝄞";  // Surrogate pair.
-  stringUnicode = "Îñţérñåţîöñåļîžåţîờñ";
-  theFalse = false;
-  theNull = null;
-  theTrue = true;
-  type = String;
-  typeParameter = extractPrivateField(reflectClass(A).typeVariables.single, '_reflectee');
-  typedData = extractPrivateField(new ByteData(64), '_typedData');
-  userTag = new UserTag("Example tag name");
-  weakProperty = extractPrivateField(expando, '_data').firstWhere((e) => e != null);
-
-  Isolate.spawn(secondMain, "Hello").then((otherIsolate) {
-    isolate = otherIsolate;
-    portSend = otherIsolate.controlPort;
-    capability = otherIsolate.terminateCapability;
-  });
-
-  print("Finished main");
+class C {
+  static doPrint() {
+    print("Original");
+  }
 }
diff --git a/runtime/observatory/tests/ui/inspector_part.dart b/runtime/observatory/tests/ui/inspector_part.dart
new file mode 100644
index 0000000..7d3bcb6
--- /dev/null
+++ b/runtime/observatory/tests/ui/inspector_part.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of manual_inspector_test;
+
+functionInPart() {
+
+}
+
+set explicitSetter(x) {}
+
+get explicitGetter {}
+
+
+class D {
+  set explicitSetter(x) {}
+
+  get explicitGetter {}
+}
+
diff --git a/runtime/tools/create_snapshot_bin.py b/runtime/tools/create_snapshot_bin.py
index 19c2943..b91de38 100755
--- a/runtime/tools/create_snapshot_bin.py
+++ b/runtime/tools/create_snapshot_bin.py
@@ -52,6 +52,10 @@
   result.add_option("--abi",
       action="store", type="string",
       help="Desired ABI for android target OS. armeabi-v7a or x86")
+  result.add_option("--timestamp_file",
+      action="store", type="string",
+      help="Path to timestamp file that will be written",
+      default="")
   return result
 
 
@@ -71,6 +75,14 @@
   return True
 
 
+def CreateTimestampFile(options):
+  if options.timestamp_file != '':
+    dir_name = os.path.dirname(options.timestamp_file)
+    if not os.path.exists(dir_name):
+      os.mkdir(dir_name)
+    open(options.timestamp_file, 'w').close()
+
+
 def Main():
   # Parse options.
   parser = BuildOptions()
@@ -113,6 +125,9 @@
   except Exception as e:
     return -1
 
+  # Success, update timestamp file.
+  CreateTimestampFile(options)
+
   return 0
 
 
diff --git a/runtime/vm/allocation.cc b/runtime/vm/allocation.cc
index 92e2885..b6fda7b 100644
--- a/runtime/vm/allocation.cc
+++ b/runtime/vm/allocation.cc
@@ -38,4 +38,16 @@
   }
 }
 
+
+#if defined(DEBUG)
+NoSafepointScope::NoSafepointScope() : StackResource(Thread::Current()) {
+  thread()->IncrementNoSafepointScopeDepth();
+}
+
+
+NoSafepointScope::~NoSafepointScope() {
+  thread()->DecrementNoSafepointScopeDepth();
+}
+#endif  // defined(DEBUG)
+
 }  // namespace dart
diff --git a/runtime/vm/allocation.h b/runtime/vm/allocation.h
index 3947f0e..74a2d7d 100644
--- a/runtime/vm/allocation.h
+++ b/runtime/vm/allocation.h
@@ -134,6 +134,27 @@
   DISALLOW_COPY_AND_ASSIGN(ZoneAllocated);
 };
 
+
+
+// Within a NoSafepointScope, the thread must not reach any safepoint. Used
+// around code that manipulates raw object pointers directly without handles.
+#if defined(DEBUG)
+class NoSafepointScope : public StackResource {
+ public:
+  NoSafepointScope();
+  ~NoSafepointScope();
+ private:
+  DISALLOW_COPY_AND_ASSIGN(NoSafepointScope);
+};
+#else  // defined(DEBUG)
+class NoSafepointScope : public ValueObject {
+ public:
+  NoSafepointScope() {}
+ private:
+  DISALLOW_COPY_AND_ASSIGN(NoSafepointScope);
+};
+#endif  // defined(DEBUG)
+
 }  // namespace dart
 
 #endif  // VM_ALLOCATION_H_
diff --git a/runtime/vm/allocation_test.cc b/runtime/vm/allocation_test.cc
index 04b4b80..f8fe5a0 100644
--- a/runtime/vm/allocation_test.cc
+++ b/runtime/vm/allocation_test.cc
@@ -153,7 +153,7 @@
 
 
 TEST_CASE(StackResourceLongJump) {
-  LongJumpScope* base = Isolate::Current()->long_jump_base();
+  LongJumpScope* base = Thread::Current()->long_jump_base();
   {
     LongJumpScope jump;
     int data = 1;
@@ -163,7 +163,7 @@
     }
     EXPECT_EQ(7, data);
   }
-  ASSERT(base == Isolate::Current()->long_jump_base());
+  ASSERT(base == Thread::Current()->long_jump_base());
 }
 
 }  // namespace dart
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
index 9d17b1b..489f090 100644
--- a/runtime/vm/assembler.cc
+++ b/runtime/vm/assembler.cc
@@ -267,7 +267,7 @@
 intptr_t ObjectPoolWrapper::AddExternalLabel(const ExternalLabel* label,
                                              Patchability patchable) {
   return AddObject(ObjectPool::Entry(label->address(),
-                                     ObjectPool::kImmediate),
+                                     ObjectPool::kExternalLabel),
                    patchable);
 }
 
@@ -301,7 +301,7 @@
 intptr_t ObjectPoolWrapper::FindExternalLabel(const ExternalLabel* label,
                                               Patchability patchable) {
   return FindObject(ObjectPool::Entry(label->address(),
-                                      ObjectPool::kImmediate),
+                                      ObjectPool::kExternalLabel),
                     patchable);
 }
 
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index bd2a6e7..71a9608 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -2065,7 +2065,7 @@
 
   if (!CanEncodeBranchOffset(offset)) {
     ASSERT(!use_far_branches());
-    Isolate::Current()->long_jump_base()->Jump(
+    Thread::Current()->long_jump_base()->Jump(
         1, Object::branch_offset_error());
   }
 
@@ -2678,46 +2678,29 @@
 }
 
 
-void Assembler::Branch(const ExternalLabel* label, Condition cond) {
-  LoadImmediate(IP, label->address(), cond);  // Address is never patched.
+void Assembler::Branch(const StubEntry& stub_entry, Condition cond) {
+  // Address is never patched.
+  LoadImmediate(IP, stub_entry.label().address(), cond);
   bx(IP, cond);
 }
 
 
-void Assembler::Branch(const StubEntry& stub_entry, Condition cond) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  Branch(&label, cond);
-}
-
-
-void Assembler::BranchPatchable(const ExternalLabel* label) {
+void Assembler::BranchPatchable(const StubEntry& stub_entry) {
   // Use a fixed size code sequence, since a function prologue may be patched
   // with this branch sequence.
   // Contrarily to BranchLinkPatchable, BranchPatchable requires an instruction
   // cache flush upon patching.
-  LoadPatchableImmediate(IP, label->address());
+  LoadPatchableImmediate(IP, stub_entry.label().address());
   bx(IP);
 }
 
 
-void Assembler::BranchPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchPatchable(&label);
-}
-
-
 void Assembler::BranchLink(const ExternalLabel* label) {
   LoadImmediate(LR, label->address());  // Target address is never patched.
   blx(LR);  // Use blx instruction so that the return branch prediction works.
 }
 
 
-void Assembler::BranchLink(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label);
-}
-
-
 void Assembler::BranchLink(const ExternalLabel* label, Patchability patchable) {
   // Make sure that class CallPattern is able to patch the label referred
   // to by this code sequence.
@@ -2732,19 +2715,12 @@
 
 void Assembler::BranchLink(const StubEntry& stub_entry,
                            Patchability patchable) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label, patchable);
-}
-
-
-void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
-  BranchLink(label, kPatchable);
+  BranchLink(&stub_entry.label(), patchable);
 }
 
 
 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLinkPatchable(&label);
+  BranchLink(&stub_entry.label(), kPatchable);
 }
 
 
@@ -3256,8 +3232,9 @@
 
 
 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
-  // Preserve volatile CPU registers.
-  EnterFrame(kDartVolatileCpuRegs | (1 << FP), 0);
+  // Preserve volatile CPU registers and PP.
+  EnterFrame(kDartVolatileCpuRegs | (1 << PP) | (1 << FP), 0);
+  COMPILE_ASSERT((kDartVolatileCpuRegs & (1 << PP)) == 0);
 
   // Preserve all volatile FPU registers.
   if (TargetCPUFeatures::vfp_supported()) {
@@ -3272,6 +3249,8 @@
     }
   }
 
+  LoadPoolPointer();
+
   ReserveAlignedFrameSpace(frame_space);
 }
 
@@ -3284,10 +3263,12 @@
       TargetCPUFeatures::vfp_supported() ?
       kDartVolatileFpuRegCount * kFpuRegisterSize : 0;
 
-  // We subtract one from the volatile cpu register count because, even though
-  // LR is volatile, it is pushed ahead of FP.
+  COMPILE_ASSERT(PP < FP);
+  COMPILE_ASSERT((kDartVolatileCpuRegs & (1 << PP)) == 0);
+  // kVolatileCpuRegCount +1 for PP, -1 because even though LR is volatile,
+  // it is pushed ahead of FP.
   const intptr_t kPushedRegistersSize =
-      (kDartVolatileCpuRegCount - 1) * kWordSize + kPushedFpuRegisterSize;
+      kDartVolatileCpuRegCount * kWordSize + kPushedFpuRegisterSize;
   AddImmediate(SP, FP, -kPushedRegistersSize);
 
   // Restore all volatile FPU registers.
@@ -3304,7 +3285,7 @@
   }
 
   // Restore volatile CPU registers.
-  LeaveFrame(kDartVolatileCpuRegs | (1 << FP));
+  LeaveFrame(kDartVolatileCpuRegs | (1 << PP) | (1 << FP));
 }
 
 
@@ -3364,9 +3345,6 @@
 
 
 void Assembler::LeaveDartFrame() {
-  // LeaveDartFrame is called from stubs (pp disallowed) and from Dart code (pp
-  // allowed), so there is no point in checking the current value of
-  // constant_pool_allowed().
   set_constant_pool_allowed(false);
   LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
   // Adjust SP for PC pushed in EnterDartFrame.
@@ -3387,10 +3365,7 @@
 
 
 void Assembler::LeaveStubFrame() {
-  LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
-  set_constant_pool_allowed(false);
-  // Adjust SP for null PC pushed in EnterStubFrame.
-  AddImmediate(SP, kWordSize);
+  LeaveDartFrame();
 }
 
 
diff --git a/runtime/vm/assembler_arm.h b/runtime/vm/assembler_arm.h
index 8218bb9..79dbea8 100644
--- a/runtime/vm/assembler_arm.h
+++ b/runtime/vm/assembler_arm.h
@@ -608,22 +608,16 @@
 
   // Macros.
   // Branch to an entry address. Call sequence is never patched.
-  void Branch(const ExternalLabel* label, Condition cond = AL);
   void Branch(const StubEntry& stub_entry, Condition cond = AL);
 
   // Branch to an entry address. Call sequence can be patched or even replaced.
-  void BranchPatchable(const ExternalLabel* label);
   void BranchPatchable(const StubEntry& stub_entry);
 
-  // Branch and link to an entry address. Call sequence is never patched.
-  void BranchLink(const ExternalLabel* label);
-  void BranchLink(const StubEntry& stub_entry);
-
+  void BranchLink(const StubEntry& stub_entry,
+                  Patchability patchable = kNotPatchable);
   void BranchLink(const ExternalLabel* label, Patchability patchable);
-  void BranchLink(const StubEntry& stub_entry, Patchability patchable);
 
   // Branch and link to an entry address. Call sequence can be patched.
-  void BranchLinkPatchable(const ExternalLabel* label);
   void BranchLinkPatchable(const StubEntry& stub_entry);
 
   // Branch and link to [base + offset]. Call sequence is never patched.
@@ -996,6 +990,8 @@
   void BindARMv6(Label* label);
   void BindARMv7(Label* label);
 
+  void BranchLink(const ExternalLabel* label);
+
   class CodeComment : public ZoneAllocated {
    public:
     CodeComment(intptr_t pc_offset, const String& comment)
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 11fbdb2..7ea74a2 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -584,27 +584,48 @@
 }
 
 
+void Assembler::Branch(const ExternalLabel* label) {
+  LoadExternalLabel(TMP, label);
+  br(TMP);
+}
+
+
 void Assembler::Branch(const StubEntry& stub_entry) {
   const ExternalLabel label(stub_entry.EntryPoint());
   Branch(&label);
 }
 
 
+void Assembler::BranchPatchable(const ExternalLabel* label) {
+  // TODO(zra): Use LoadExternalLabelFixed if possible.
+  LoadImmediateFixed(TMP, label->address());
+  br(TMP);
+}
+
 void Assembler::BranchPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchPatchable(&label);
+  BranchPatchable(&stub_entry.label());
+}
+
+
+void Assembler::BranchLink(const ExternalLabel* label) {
+  LoadExternalLabel(TMP, label);
+  blr(TMP);
 }
 
 
 void Assembler::BranchLink(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label);
+  BranchLink(&stub_entry.label());
+}
+
+
+void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
+  LoadExternalLabelFixed(TMP, label, kPatchable);
+  blr(TMP);
 }
 
 
 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLinkPatchable(&label);
+  BranchLinkPatchable(&stub_entry.label());
 }
 
 
@@ -1086,24 +1107,7 @@
 }
 
 
-void Assembler::EnterDartFrame(intptr_t frame_size) {
-  ASSERT(!constant_pool_allowed());
-  // Setup the frame.
-  adr(TMP, Immediate(-CodeSize()));  // TMP gets PC marker.
-  EnterFrame(0);
-  TagAndPushPPAndPcMarker(TMP);  // Save PP and PC marker.
-
-  // Load the pool pointer.
-  LoadPoolPointer();
-
-  // Reserve space.
-  if (frame_size > 0) {
-    AddImmediate(SP, SP, -frame_size);
-  }
-}
-
-
-void Assembler::EnterDartFrameWithInfo(intptr_t frame_size, Register new_pp) {
+void Assembler::EnterDartFrame(intptr_t frame_size, Register new_pp) {
   ASSERT(!constant_pool_allowed());
   // Setup the frame.
   adr(TMP, Immediate(-CodeSize()));  // TMP gets PC marker.
@@ -1152,9 +1156,6 @@
 
 
 void Assembler::LeaveDartFrame() {
-  // LeaveDartFrame is called from stubs (pp disallowed) and from Dart code (pp
-  // allowed), so there is no point in checking the current value of
-  // constant_pool_allowed().
   set_constant_pool_allowed(false);
   // Restore and untag PP.
   LoadFromOffset(PP, FP, kSavedCallerPpSlotFromFp * kWordSize);
@@ -1164,7 +1165,7 @@
 
 
 void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) {
-  EnterFrame(0);
+  EnterStubFrame();
 
   // Store fpu registers with the lowest register number at the lowest
   // address.
@@ -1194,7 +1195,8 @@
   // We need to restore it before restoring registers.
   const intptr_t kPushedRegistersSize =
       kDartVolatileCpuRegCount * kWordSize +
-      kDartVolatileFpuRegCount * kWordSize;
+      kDartVolatileFpuRegCount * kWordSize +
+      2 * kWordSize;  // PP and pc marker from EnterStubFrame.
   AddImmediate(SP, FP, -kPushedRegistersSize);
   for (int i = kDartLastVolatileCpuReg; i >= kDartFirstVolatileCpuReg; i--) {
     const Register reg = static_cast<Register>(i);
@@ -1212,7 +1214,7 @@
     PopDouble(reg);
   }
 
-  PopPair(LR, FP);
+  LeaveStubFrame();
 }
 
 
@@ -1232,11 +1234,7 @@
 
 
 void Assembler::LeaveStubFrame() {
-  set_constant_pool_allowed(false);
-  // Restore and untag PP.
-  LoadFromOffset(PP, FP, kSavedCallerPpSlotFromFp * kWordSize);
-  sub(PP, PP, Operand(kHeapObjectTag));
-  LeaveFrame();
+  LeaveDartFrame();
 }
 
 
diff --git a/runtime/vm/assembler_arm64.h b/runtime/vm/assembler_arm64.h
index 936e105..dbb4a3b 100644
--- a/runtime/vm/assembler_arm64.h
+++ b/runtime/vm/assembler_arm64.h
@@ -1198,37 +1198,14 @@
     LslImmediate(dst, src, kSmiTagSize);
   }
 
-  // Branching to ExternalLabels.
-  void Branch(const ExternalLabel* label) {
-    LoadExternalLabel(TMP, label);
-    br(TMP);
-  }
-
   void Branch(const StubEntry& stub_entry);
-
-  // Fixed length branch to label.
-  void BranchPatchable(const ExternalLabel* label) {
-    // TODO(zra): Use LoadExternalLabelFixed if possible.
-    LoadImmediateFixed(TMP, label->address());
-    br(TMP);
-  }
-
   void BranchPatchable(const StubEntry& stub_entry);
 
-  void BranchLink(const ExternalLabel* label) {
-    LoadExternalLabel(TMP, label);
-    blr(TMP);
-  }
-
+  void BranchLink(const ExternalLabel* label);
   void BranchLink(const StubEntry& stub_entry);
 
   // BranchLinkPatchable must be a fixed-length sequence so we can patch it
   // with the debugger.
-  void BranchLinkPatchable(const ExternalLabel* label) {
-    LoadExternalLabelFixed(TMP, label, kPatchable);
-    blr(TMP);
-  }
-
   void BranchLinkPatchable(const StubEntry& stub_entry);
 
   // Macros accepting a pp Register argument may attempt to load values from
@@ -1362,8 +1339,7 @@
     sub(CSP, CSP, Operand(reserved_space));
   }
 
-  void EnterDartFrame(intptr_t frame_size);
-  void EnterDartFrameWithInfo(intptr_t frame_size, Register new_pp);
+  void EnterDartFrame(intptr_t frame_size, Register new_pp = kNoRegister);
   void EnterOsrFrame(intptr_t extra_size, Register new_pp);
   void LeaveDartFrame();
 
@@ -1449,6 +1425,10 @@
 
   bool constant_pool_allowed_;
 
+  void Branch(const ExternalLabel* label);
+  void BranchPatchable(const ExternalLabel* label);
+  void BranchLinkPatchable(const ExternalLabel* label);
+
   void LoadObjectHelper(Register dst, const Object& obj, bool is_unique);
 
   void AddSubHelper(OperandSize os, bool set_flags, bool subtract,
@@ -1553,7 +1533,7 @@
   int32_t EncodeImm19BranchOffset(int64_t imm, int32_t instr) {
     if (!CanEncodeImm19BranchOffset(imm)) {
       ASSERT(!use_far_branches());
-      Isolate::Current()->long_jump_base()->Jump(
+      Thread::Current()->long_jump_base()->Jump(
           1, Object::branch_offset_error());
     }
     const int32_t imm32 = static_cast<int32_t>(imm);
diff --git a/runtime/vm/assembler_arm64_test.cc b/runtime/vm/assembler_arm64_test.cc
index 6fb9822..7204371 100644
--- a/runtime/vm/assembler_arm64_test.cc
+++ b/runtime/vm/assembler_arm64_test.cc
@@ -1625,146 +1625,124 @@
 // Loading immediate values with the object pool.
 ASSEMBLER_TEST_GENERATE(LoadImmediatePPSmall, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadImmediate(R0, 42);
-  __ PopAndUntagPP();
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadImmediatePPSmall, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+  EXPECT_EQ(42, test->Invoke<int64_t>());
 }
 
 
 ASSEMBLER_TEST_GENERATE(LoadImmediatePPMed, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadImmediate(R0, 0xf1234123);
-  __ PopAndUntagPP();
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadImmediatePPMed, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(0xf1234123, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+  EXPECT_EQ(0xf1234123, test->Invoke<int64_t>());
 }
 
 
 ASSEMBLER_TEST_GENERATE(LoadImmediatePPMed2, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadImmediate(R0, 0x4321f1234124);
-  __ PopAndUntagPP();
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadImmediatePPMed2, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(
-      0x4321f1234124, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+  EXPECT_EQ(0x4321f1234124, test->Invoke<int64_t>());
 }
 
 
 ASSEMBLER_TEST_GENERATE(LoadImmediatePPLarge, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadImmediate(R0, 0x9287436598237465);
-  __ PopAndUntagPP();
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadImmediatePPLarge, test) {
-  typedef int64_t (*Int64Return)() DART_UNUSED;
-  EXPECT_EQ(static_cast<int64_t>(0x9287436598237465),
-            EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
+  EXPECT_EQ(static_cast<int64_t>(0x9287436598237465), test->Invoke<int64_t>());
 }
 
 
-#if defined(USING_SIMULATOR)
-#define ASSEMBLER_TEST_RUN_WITH_THREAD(var_name) \
+#define ASSEMBLER_TEST_RUN_WITH_THREAD(result_type, var_name) \
   Thread* thread = Thread::Current(); \
-  int64_t var_name = Simulator::Current()->Call( \
-      bit_cast<intptr_t, uword>(test->entry()), \
-      reinterpret_cast<intptr_t>(thread), 0, 0, 0)
-#else
-#define ASSEMBER_TEST_RUN_WITH_THREAD(var_name) \
-  typedef int64_t (*Int64Return)(Thread* thread); \
-  Int64Return test_code = reinterpret_cast<Int64Return>(test->entry()); \
-  int64_t var_name = test_code(thread)
-#endif
+  result_type var_name = test->Invoke<result_type>(thread);
 
 
 // LoadObject null.
 ASSEMBLER_TEST_GENERATE(LoadObjectNull, assembler) {
   __ SetupDartSP(kTestStackSpace);
+  __ EnterStubFrame();
   __ Push(THR);
   __ mov(THR, R0);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
   __ LoadObject(R0, Object::null_object());
-  __ PopAndUntagPP();
   __ Pop(THR);
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadObjectNull, test) {
-  ASSEMBLER_TEST_RUN_WITH_THREAD(result);
-  EXPECT_EQ(reinterpret_cast<int64_t>(Object::null()), result);
+  ASSEMBLER_TEST_RUN_WITH_THREAD(RawObject*, result);
+  EXPECT_EQ(Object::null(), result);
 }
 
 
 ASSEMBLER_TEST_GENERATE(LoadObjectTrue, assembler) {
   __ SetupDartSP(kTestStackSpace);
+  __ EnterStubFrame();
   __ Push(THR);
   __ mov(THR, R0);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
   __ LoadObject(R0, Bool::True());
-  __ PopAndUntagPP();
   __ Pop(THR);
+  __ LeaveDartFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadObjectTrue, test) {
-  ASSEMBLER_TEST_RUN_WITH_THREAD(result);
-  EXPECT_EQ(reinterpret_cast<int64_t>(Bool::True().raw()), result);
+  ASSEMBLER_TEST_RUN_WITH_THREAD(RawObject*, result);
+  EXPECT_EQ(Bool::True().raw(), result);
 }
 
 
 ASSEMBLER_TEST_GENERATE(LoadObjectFalse, assembler) {
   __ SetupDartSP(kTestStackSpace);
+  __ EnterStubFrame();
   __ Push(THR);
   __ mov(THR, R0);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
   __ LoadObject(R0, Bool::False());
-  __ PopAndUntagPP();
   __ Pop(THR);
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(LoadObjectFalse, test) {
-  ASSEMBLER_TEST_RUN_WITH_THREAD(result);
-  EXPECT_EQ(reinterpret_cast<int64_t>(Bool::False().raw()), result);
+  ASSEMBLER_TEST_RUN_WITH_THREAD(RawObject*, result);
+  EXPECT_EQ(Bool::False().raw(), result);
 }
 
 
@@ -3570,26 +3548,19 @@
 
 // Called from assembler_test.cc.
 // LR: return address.
-// R0: context.
-// R1: value.
-// R2: growable array.
-// R3: current thread.
+// R0: value.
+// R1: growable array.
+// R2: current thread.
 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();
-  __ LoadPoolPointer();
   __ Push(THR);
-  __ Push(CTX);
   __ Push(LR);
-  __ mov(CTX, R0);
-  __ mov(THR, R3);
-  __ StoreIntoObject(R2,
-                     FieldAddress(R2, GrowableObjectArray::data_offset()),
-                     R1);
+  __ mov(THR, R2);
+  __ StoreIntoObject(R1,
+                     FieldAddress(R1, GrowableObjectArray::data_offset()),
+                     R0);
   __ Pop(LR);
-  __ Pop(CTX);
   __ Pop(THR);
-  __ PopAndUntagPP();
   __ mov(CSP, SP);
   __ ret();
 }
@@ -3597,8 +3568,7 @@
 
 ASSEMBLER_TEST_GENERATE(ComputeRange, assembler) {
   __ SetupDartSP(kTestStackSpace);
-  __ TagAndPushPP();
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   Label miss, done;
   __ mov(R1, R0);
   __ ComputeRange(R0, R1, R2, &miss);
@@ -3608,48 +3578,50 @@
   __ LoadImmediate(R0, -1);
 
   __ Bind(&done);
-  __ PopAndUntagPP();
+  __ LeaveStubFrame();
   __ mov(CSP, SP);
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(ComputeRange, test) {
-  typedef intptr_t (*ComputeRange)(intptr_t value) DART_UNUSED;
+#define RANGE_OF(arg_type, v) test->Invoke<intptr_t, arg_type>(v)
 
-#define RANGE_OF(v)                                              \
-  (EXECUTE_TEST_CODE_INTPTR_INTPTR(                              \
-    ComputeRange, test->entry(), reinterpret_cast<intptr_t>(v)))
-
-  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(Smi::New(0)));
-  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(Smi::New(1)));
-  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(Smi::New(kMaxInt32)));
+  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(RawSmi*, Smi::New(0)));
+  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(RawSmi*, Smi::New(1)));
+  EXPECT_EQ(ICData::kInt32RangeBit, RANGE_OF(RawSmi*, Smi::New(kMaxInt32)));
   EXPECT_EQ(ICData::kInt32RangeBit | ICData::kSignedRangeBit,
-            RANGE_OF(Smi::New(-1)));
+            RANGE_OF(RawSmi*, Smi::New(-1)));
   EXPECT_EQ(ICData::kInt32RangeBit | ICData::kSignedRangeBit,
-            RANGE_OF(Smi::New(kMinInt32)));
+            RANGE_OF(RawSmi*, Smi::New(kMinInt32)));
 
   EXPECT_EQ(ICData::kUint32RangeBit,
-            RANGE_OF(Smi::New(static_cast<int64_t>(kMaxInt32) + 1)));
+            RANGE_OF(RawSmi*, Smi::New(static_cast<int64_t>(kMaxInt32) + 1)));
   EXPECT_EQ(ICData::kUint32RangeBit,
-            RANGE_OF(Smi::New(kMaxUint32)));
+            RANGE_OF(RawSmi*, Smi::New(kMaxUint32)));
 
   // On 64-bit platforms we don't track the sign of the smis outside of
   // int32 range because it is not needed to distinguish kInt32Range from
   // kUint32Range.
   EXPECT_EQ(ICData::kSignedRangeBit,
-            RANGE_OF(Smi::New(static_cast<int64_t>(kMinInt32) - 1)));
+            RANGE_OF(RawSmi*, Smi::New(static_cast<int64_t>(kMinInt32) - 1)));
   EXPECT_EQ(ICData::kSignedRangeBit,
-            RANGE_OF(Smi::New(static_cast<int64_t>(kMaxUint32) + 1)));
-  EXPECT_EQ(ICData::kSignedRangeBit, RANGE_OF(Smi::New(Smi::kMaxValue)));
-  EXPECT_EQ(ICData::kSignedRangeBit, RANGE_OF(Smi::New(Smi::kMinValue)));
+            RANGE_OF(RawSmi*, Smi::New(static_cast<int64_t>(kMaxUint32) + 1)));
+  EXPECT_EQ(ICData::kSignedRangeBit,
+            RANGE_OF(RawSmi*, Smi::New(Smi::kMaxValue)));
+  EXPECT_EQ(ICData::kSignedRangeBit, RANGE_OF(RawSmi*,
+            Smi::New(Smi::kMinValue)));
 
-  EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(Smi::kMaxValue + 1)));
-  EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(Smi::kMinValue - 1)));
-  EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(kMaxInt64)));
-  EXPECT_EQ(ICData::kInt64RangeBit, RANGE_OF(Integer::New(kMinInt64)));
+  EXPECT_EQ(ICData::kInt64RangeBit,
+            RANGE_OF(RawInteger*, Integer::New(Smi::kMaxValue + 1)));
+  EXPECT_EQ(ICData::kInt64RangeBit,
+            RANGE_OF(RawInteger*, Integer::New(Smi::kMinValue - 1)));
+  EXPECT_EQ(ICData::kInt64RangeBit,
+            RANGE_OF(RawInteger*, Integer::New(kMaxInt64)));
+  EXPECT_EQ(ICData::kInt64RangeBit,
+            RANGE_OF(RawInteger*, Integer::New(kMinInt64)));
 
-  EXPECT_EQ(-1, RANGE_OF(Bool::True().raw()));
+  EXPECT_EQ(-1, RANGE_OF(RawBool*, Bool::True().raw()));
 
 #undef RANGE_OF
 }
diff --git a/runtime/vm/assembler_arm_test.cc b/runtime/vm/assembler_arm_test.cc
index 2cc40fd..dd53235 100644
--- a/runtime/vm/assembler_arm_test.cc
+++ b/runtime/vm/assembler_arm_test.cc
@@ -3928,18 +3928,16 @@
 
 // Called from assembler_test.cc.
 // LR: return address.
-// R0: context.
-// R1: value.
-// R2: growable array.
-// R3: current thread.
+// R0: value.
+// R1: growable array.
+// R2: current thread.
 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
-  __ PushList((1 << CTX) | (1 << LR) | (1 << THR));
-  __ mov(CTX, Operand(R0));
-  __ mov(THR, Operand(R3));
-  __ StoreIntoObject(R2,
-                     FieldAddress(R2, GrowableObjectArray::data_offset()),
-                     R1);
-  __ PopList((1 << CTX) | (1 << LR) | (1 << THR));
+  __ PushList((1 << LR) | (1 << THR));
+  __ mov(THR, Operand(R2));
+  __ StoreIntoObject(R1,
+                     FieldAddress(R1, GrowableObjectArray::data_offset()),
+                     R0);
+  __ PopList((1 << LR) | (1 << THR));
   __ Ret();
 }
 
diff --git a/runtime/vm/assembler_ia32_test.cc b/runtime/vm/assembler_ia32_test.cc
index b541574..2ce9da2 100644
--- a/runtime/vm/assembler_ia32_test.cc
+++ b/runtime/vm/assembler_ia32_test.cc
@@ -3394,17 +3394,14 @@
 // Called from assembler_test.cc.
 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
   __ pushl(THR);
-  __ pushl(CTX);
-  __ movl(CTX, Address(ESP, 3 * kWordSize));
-  __ movl(EAX, Address(ESP, 4 * kWordSize));
-  __ movl(ECX, Address(ESP, 5 * kWordSize));
-  __ movl(THR, Address(ESP, 6 * kWordSize));
+  __ movl(EAX, Address(ESP, 2 * kWordSize));
+  __ movl(ECX, Address(ESP, 3 * kWordSize));
+  __ movl(THR, Address(ESP, 4 * kWordSize));
   __ pushl(EAX);
   __ StoreIntoObject(ECX,
                      FieldAddress(ECX, GrowableObjectArray::data_offset()),
                      EAX);
   __ popl(EAX);
-  __ popl(CTX);
   __ popl(THR);
   __ ret();
 }
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index e4f9082..a839a58 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -52,7 +52,7 @@
 int32_t Assembler::EncodeBranchOffset(int32_t offset, int32_t instr) {
   if (!CanEncodeBranchOffset(offset)) {
     ASSERT(!use_far_branches());
-    Isolate::Current()->long_jump_base()->Jump(
+    Thread::Current()->long_jump_base()->Jump(
         1, Object::branch_offset_error());
   }
 
@@ -457,33 +457,51 @@
 
 
 void Assembler::Branch(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  Branch(&label);
+  ASSERT(!in_delay_slot_);
+  LoadImmediate(TMP, stub_entry.label().address());
+  jr(TMP);
 }
 
 
 void Assembler::BranchPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchPatchable(&label);
+  ASSERT(!in_delay_slot_);
+  const ExternalLabel& label = stub_entry.label();
+  const uint16_t low = Utils::Low16Bits(label.address());
+  const uint16_t high = Utils::High16Bits(label.address());
+  lui(T9, Immediate(high));
+  ori(T9, T9, Immediate(low));
+  jr(T9);
+  delay_slot_available_ = false;  // CodePatcher expects a nop.
 }
 
 
-void Assembler::BranchLink(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label);
+void Assembler::BranchLink(const ExternalLabel* label) {
+  ASSERT(!in_delay_slot_);
+  LoadImmediate(T9, label->address());
+  jalr(T9);
+}
+
+
+void Assembler::BranchLink(const ExternalLabel* label, Patchability patchable) {
+  ASSERT(!in_delay_slot_);
+  const int32_t offset = ObjectPool::element_offset(
+      object_pool_wrapper_.FindExternalLabel(label, patchable));
+  LoadWordFromPoolOffset(T9, offset - kHeapObjectTag);
+  jalr(T9);
+  if (patchable == kPatchable) {
+    delay_slot_available_ = false;  // CodePatcher expects a nop.
+  }
 }
 
 
 void Assembler::BranchLink(const StubEntry& stub_entry,
                            Patchability patchable) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label, patchable);
+  BranchLink(&stub_entry.label(), patchable);
 }
 
 
 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  BranchLink(&label, kPatchable);
+  BranchLink(&stub_entry.label(), kPatchable);
 }
 
 
@@ -815,12 +833,7 @@
 
 
 void Assembler::LeaveStubFrame() {
-  ASSERT(!in_delay_slot_);
-  addiu(SP, FP, Immediate(-1 * kWordSize));
-  lw(RA, Address(SP, 2 * kWordSize));
-  lw(FP, Address(SP, 1 * kWordSize));
-  lw(PP, Address(SP, 0 * kWordSize));
-  addiu(SP, SP, Immediate(4 * kWordSize));
+  LeaveDartFrame();
 }
 
 
@@ -1158,7 +1171,7 @@
   ASSERT(!in_delay_slot_);
   const intptr_t kPushedRegistersSize =
       kDartVolatileCpuRegCount * kWordSize +
-      2 * kWordSize +  // FP and RA.
+      3 * kWordSize +  // PP, FP and RA.
       kDartVolatileFpuRegCount * kWordSize;
 
   SetPrologueOffset();
@@ -1179,18 +1192,21 @@
   for (int i = kDartFirstVolatileFpuReg; i <= kDartLastVolatileFpuReg; i++) {
     // These go above the volatile CPU registers.
     const int slot =
-        (i - kDartFirstVolatileFpuReg) + kDartVolatileCpuRegCount + 2;
+        (i - kDartFirstVolatileFpuReg) + kDartVolatileCpuRegCount + 3;
     FRegister reg = static_cast<FRegister>(i);
     swc1(reg, Address(SP, slot * kWordSize));
   }
   for (int i = kDartFirstVolatileCpuReg; i <= kDartLastVolatileCpuReg; i++) {
     // + 2 because FP goes in slot 0.
-    const int slot = (i - kDartFirstVolatileCpuReg) + 2;
+    const int slot = (i - kDartFirstVolatileCpuReg) + 3;
     Register reg = static_cast<Register>(i);
     sw(reg, Address(SP, slot * kWordSize));
   }
-  sw(RA, Address(SP, 1 * kWordSize));
-  sw(FP, Address(SP, 0 * kWordSize));
+  sw(RA, Address(SP, 2 * kWordSize));
+  sw(FP, Address(SP, 1 * kWordSize));
+  sw(PP, Address(SP, 0 * kWordSize));
+  LoadPoolPointer();
+
   mov(FP, SP);
 
   ReserveAlignedFrameSpace(frame_space);
@@ -1201,7 +1217,7 @@
   ASSERT(!in_delay_slot_);
   const intptr_t kPushedRegistersSize =
       kDartVolatileCpuRegCount * kWordSize +
-      2 * kWordSize +  // FP and RA.
+      3 * kWordSize +  // FP and RA.
       kDartVolatileFpuRegCount * kWordSize;
 
   Comment("LeaveCallRuntimeFrame");
@@ -1212,18 +1228,19 @@
   mov(SP, FP);
 
   // Restore volatile CPU and FPU registers from the stack.
-  lw(FP, Address(SP, 0 * kWordSize));
-  lw(RA, Address(SP, 1 * kWordSize));
+  lw(PP, Address(SP, 0 * kWordSize));
+  lw(FP, Address(SP, 1 * kWordSize));
+  lw(RA, Address(SP, 2 * kWordSize));
   for (int i = kDartFirstVolatileCpuReg; i <= kDartLastVolatileCpuReg; i++) {
     // + 2 because FP goes in slot 0.
-    const int slot = (i - kDartFirstVolatileCpuReg) + 2;
+    const int slot = (i - kDartFirstVolatileCpuReg) + 3;
     Register reg = static_cast<Register>(i);
     lw(reg, Address(SP, slot * kWordSize));
   }
   for (int i = kDartFirstVolatileFpuReg; i <= kDartLastVolatileFpuReg; i++) {
     // These go above the volatile CPU registers.
     const int slot =
-        (i - kDartFirstVolatileFpuReg) + kDartVolatileCpuRegCount + 2;
+        (i - kDartFirstVolatileFpuReg) + kDartVolatileCpuRegCount + 3;
     FRegister reg = static_cast<FRegister>(i);
     lwc1(reg, Address(SP, slot * kWordSize));
   }
diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h
index 0f0897f..c9b4025 100644
--- a/runtime/vm/assembler_mips.h
+++ b/runtime/vm/assembler_mips.h
@@ -912,50 +912,13 @@
     SubuDetectOverflow(rd, rs, rd, ro);
   }
 
-  void Branch(const ExternalLabel* label) {
-    ASSERT(!in_delay_slot_);
-    LoadImmediate(TMP, label->address());
-    jr(TMP);
-  }
-
   void Branch(const StubEntry& stub_entry);
 
-  void BranchPatchable(const ExternalLabel* label) {
-    ASSERT(!in_delay_slot_);
-    const uint16_t low = Utils::Low16Bits(label->address());
-    const uint16_t high = Utils::High16Bits(label->address());
-    lui(T9, Immediate(high));
-    ori(T9, T9, Immediate(low));
-    jr(T9);
-    delay_slot_available_ = false;  // CodePatcher expects a nop.
-  }
-
   void BranchPatchable(const StubEntry& stub_entry);
 
-  void BranchLink(const ExternalLabel* label) {
-    ASSERT(!in_delay_slot_);
-    LoadImmediate(T9, label->address());
-    jalr(T9);
-  }
-
-  void BranchLink(const StubEntry& stub_entry);
-
-  void BranchLink(const ExternalLabel* label, Patchability patchable) {
-    ASSERT(!in_delay_slot_);
-    const int32_t offset = ObjectPool::element_offset(
-        object_pool_wrapper_.FindExternalLabel(label, patchable));
-    LoadWordFromPoolOffset(T9, offset - kHeapObjectTag);
-    jalr(T9);
-    if (patchable == kPatchable) {
-      delay_slot_available_ = false;  // CodePatcher expects a nop.
-    }
-  }
-
-  void BranchLink(const StubEntry& stub_entry, Patchability patchable);
-
-  void BranchLinkPatchable(const ExternalLabel* label) {
-    BranchLink(label, kPatchable);
-  }
+  void BranchLink(const ExternalLabel* label, Patchability patchable);
+  void BranchLink(const StubEntry& stub_entry,
+                  Patchability patchable = kNotPatchable);
 
   void BranchLinkPatchable(const StubEntry& stub_entry);
 
@@ -1670,6 +1633,8 @@
 
   bool constant_pool_allowed_;
 
+  void BranchLink(const ExternalLabel* label);
+
   void LoadObjectHelper(Register rd, const Object& object, bool is_unique);
 
   void Emit(int32_t value) {
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
index a0a3a41..ec94350 100644
--- a/runtime/vm/assembler_mips_test.cc
+++ b/runtime/vm/assembler_mips_test.cc
@@ -2083,24 +2083,20 @@
 
 // Called from assembler_test.cc.
 // RA: return address.
-// A0: context.
-// A1: value.
-// A2: growable array.
-// A3: current thread.
+// A0: value.
+// A1: growable array.
+// A2: current thread.
 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
-  __ addiu(SP, SP, Immediate(-3 * kWordSize));
-  __ sw(THR, Address(SP, 2 * kWordSize));
-  __ sw(CTX, Address(SP, 1 * kWordSize));
+  __ addiu(SP, SP, Immediate(-2 * kWordSize));
+  __ sw(THR, Address(SP, 1 * kWordSize));
   __ sw(RA, Address(SP, 0 * kWordSize));
-  __ mov(CTX, A0);
-  __ mov(THR, A3);
-  __ StoreIntoObject(A2,
-                     FieldAddress(A2, GrowableObjectArray::data_offset()),
-                     A1);
+  __ mov(THR, A2);
+  __ StoreIntoObject(A1,
+                     FieldAddress(A1, GrowableObjectArray::data_offset()),
+                     A0);
   __ lw(RA, Address(SP, 0 * kWordSize));
-  __ lw(CTX, Address(SP, 1 * kWordSize));
-  __ lw(THR, Address(SP, 2 * kWordSize));
-  __ addiu(SP, SP, Immediate(3 * kWordSize));
+  __ lw(THR, Address(SP, 1 * kWordSize));
+  __ addiu(SP, SP, Immediate(2 * kWordSize));
   __ Ret();
 }
 
diff --git a/runtime/vm/assembler_test.cc b/runtime/vm/assembler_test.cc
index 5933488..fbbd994 100644
--- a/runtime/vm/assembler_test.cc
+++ b/runtime/vm/assembler_test.cc
@@ -14,21 +14,9 @@
 ASSEMBLER_TEST_EXTERN(StoreIntoObject);
 
 ASSEMBLER_TEST_RUN(StoreIntoObject, test) {
-#if defined(USING_SIMULATOR)
-#define test_code(ctx, value, growable_array, thread)                          \
-  Simulator::Current()->Call(                                                  \
-      bit_cast<intptr_t, uword>(test->entry()),                                \
-      reinterpret_cast<intptr_t>(ctx),                                         \
-      reinterpret_cast<intptr_t>(value),                                       \
-      reinterpret_cast<intptr_t>(growable_array),                              \
-      reinterpret_cast<intptr_t>(thread))
-#else
-  typedef void (*StoreData)(RawContext* ctx,
-                            RawObject* value,
-                            RawObject* growable_array,
-                            Thread* thread);
-  StoreData test_code = reinterpret_cast<StoreData>(test->entry());
-#endif
+#define TEST_CODE(value, growable_array, thread)                               \
+  test->Invoke<void, RawObject*, RawObject*, Thread*>(                         \
+  value, growable_array, thread)
 
   const Array& old_array = Array::Handle(Array::New(3, Heap::kOld));
   const Array& new_array = Array::Handle(Array::New(3, Heap::kNew));
@@ -37,7 +25,6 @@
   const GrowableObjectArray& grow_new_array = GrowableObjectArray::Handle(
       GrowableObjectArray::New(old_array, Heap::kNew));
   Smi& smi = Smi::Handle();
-  const Context& ctx = Context::Handle(Context::New(0));
   Thread* thread = Thread::Current();
 
   EXPECT(old_array.raw() == grow_old_array.data());
@@ -48,28 +35,28 @@
   // Store Smis into the old object.
   for (int i = -128; i < 128; i++) {
     smi = Smi::New(i);
-    test_code(ctx.raw(), smi.raw(), grow_old_array.raw(), thread);
+    TEST_CODE(smi.raw(), grow_old_array.raw(), thread);
     EXPECT(reinterpret_cast<RawArray*>(smi.raw()) == grow_old_array.data());
     EXPECT(!thread->StoreBufferContains(grow_old_array.raw()));
   }
 
   // Store an old object into the old object.
-  test_code(ctx.raw(), old_array.raw(), grow_old_array.raw(), thread);
+  TEST_CODE(old_array.raw(), grow_old_array.raw(), thread);
   EXPECT(old_array.raw() == grow_old_array.data());
   EXPECT(!thread->StoreBufferContains(grow_old_array.raw()));
 
   // Store a new object into the old object.
-  test_code(ctx.raw(), new_array.raw(), grow_old_array.raw(), thread);
+  TEST_CODE(new_array.raw(), grow_old_array.raw(), thread);
   EXPECT(new_array.raw() == grow_old_array.data());
   EXPECT(thread->StoreBufferContains(grow_old_array.raw()));
 
   // Store a new object into the new object.
-  test_code(ctx.raw(), new_array.raw(), grow_new_array.raw(), thread);
+  TEST_CODE(new_array.raw(), grow_new_array.raw(), thread);
   EXPECT(new_array.raw() == grow_new_array.data());
   EXPECT(!thread->StoreBufferContains(grow_new_array.raw()));
 
   // Store an old object into the new object.
-  test_code(ctx.raw(), old_array.raw(), grow_new_array.raw(), thread);
+  TEST_CODE(old_array.raw(), grow_new_array.raw(), thread);
   EXPECT(old_array.raw() == grow_new_array.data());
   EXPECT(!thread->StoreBufferContains(grow_new_array.raw()));
 }
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index fd27c9a..fcab5ea 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -81,36 +81,25 @@
 }
 
 
-void Assembler::CallPatchable(const ExternalLabel* label) {
+void Assembler::CallPatchable(const StubEntry& stub_entry) {
   ASSERT(constant_pool_allowed());
   intptr_t call_start = buffer_.GetPosition();
   const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindExternalLabel(label, kPatchable));
+      object_pool_wrapper_.FindExternalLabel(&stub_entry.label(), kPatchable));
   call(Address::AddressBaseImm32(PP, offset - kHeapObjectTag));
   ASSERT((buffer_.GetPosition() - call_start) == kCallExternalLabelSize);
 }
 
 
-void Assembler::Call(const ExternalLabel* label) {
+void Assembler::Call(const StubEntry& stub_entry) {
   ASSERT(constant_pool_allowed());
   const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindExternalLabel(label, kNotPatchable));
+      object_pool_wrapper_.FindExternalLabel(&stub_entry.label(),
+                                             kNotPatchable));
   call(Address::AddressBaseImm32(PP, offset - kHeapObjectTag));
 }
 
 
-void Assembler::CallPatchable(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  CallPatchable(&label);
-}
-
-
-void Assembler::Call(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  Call(&label);
-}
-
-
 void Assembler::pushq(Register reg) {
   AssemblerBuffer::EnsureCapacity ensured(&buffer_);
   EmitRegisterREX(reg, REX_NONE);
@@ -2544,29 +2533,13 @@
 }
 
 
-void Assembler::j(Condition condition, const ExternalLabel* label) {
-  Label no_jump;
-  // Negate condition.
-  j(static_cast<Condition>(condition ^ 1), &no_jump, Assembler::kNearJump);
-  jmp(label);
-  Bind(&no_jump);
-}
-
-
-void Assembler::J(Condition condition, const ExternalLabel* label,
-                  Register pp) {
-  Label no_jump;
-  // Negate condition.
-  j(static_cast<Condition>(condition ^ 1), &no_jump, Assembler::kNearJump);
-  Jmp(label, pp);
-  Bind(&no_jump);
-}
-
-
 void Assembler::J(Condition condition, const StubEntry& stub_entry,
                   Register pp) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  J(condition, &label, pp);
+  Label no_jump;
+  // Negate condition.
+  j(static_cast<Condition>(condition ^ 1), &no_jump, Assembler::kNearJump);
+  Jmp(stub_entry, pp);
+  Bind(&no_jump);
 }
 
 
@@ -2626,42 +2599,30 @@
 
 
 void Assembler::jmp(const StubEntry& stub_entry) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  jmp(&label);
+  jmp(&stub_entry.label());
 }
 
 
-void Assembler::JmpPatchable(const ExternalLabel* label, Register pp) {
+void Assembler::JmpPatchable(const StubEntry& stub_entry, Register pp) {
   ASSERT((pp != PP) || constant_pool_allowed());
   intptr_t call_start = buffer_.GetPosition();
   const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindExternalLabel(label, kPatchable));
+      object_pool_wrapper_.FindExternalLabel(&stub_entry.label(), kPatchable));
   // Patchable jumps always use a 32-bit immediate encoding.
   jmp(Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
   ASSERT((buffer_.GetPosition() - call_start) == JumpPattern::kLengthInBytes);
 }
 
 
-void Assembler::JmpPatchable(const StubEntry& stub_entry, Register pp) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  JmpPatchable(&label, pp);
-}
-
-
-void Assembler::Jmp(const ExternalLabel* label, Register pp) {
+void Assembler::Jmp(const StubEntry& stub_entry, Register pp) {
   ASSERT((pp != PP) || constant_pool_allowed());
   const int32_t offset = ObjectPool::element_offset(
-      object_pool_wrapper_.FindExternalLabel(label, kNotPatchable));
+      object_pool_wrapper_.FindExternalLabel(&stub_entry.label(),
+                                             kNotPatchable));
   jmp(Address(pp, offset - kHeapObjectTag));
 }
 
 
-void Assembler::Jmp(const StubEntry& stub_entry, Register pp) {
-  const ExternalLabel label(stub_entry.EntryPoint());
-  Jmp(&label, pp);
-}
-
-
 void Assembler::lock() {
   AssemblerBuffer::EnsureCapacity ensured(&buffer_);
   EmitUint8(0xF0);
@@ -3356,7 +3317,7 @@
 
 
 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
-  EnterFrame(0);
+  EnterStubFrame();
 
   // TODO(vegorov): avoid saving FpuTMP, it is used only as scratch.
   PushRegisters(CallingConventions::kVolatileCpuRegisters,
@@ -3376,23 +3337,15 @@
       RegisterSet::RegisterCount(CallingConventions::kVolatileXmmRegisters);
   const intptr_t kPushedRegistersSize =
       kPushedCpuRegistersCount * kWordSize +
-      kPushedXmmRegistersCount * kFpuRegisterSize;
+      kPushedXmmRegistersCount * kFpuRegisterSize +
+      2 * kWordSize;  // PP, pc marker from EnterStubFrame
   leaq(RSP, Address(RBP, -kPushedRegistersSize));
 
   // TODO(vegorov): avoid saving FpuTMP, it is used only as scratch.
   PopRegisters(CallingConventions::kVolatileCpuRegisters,
                CallingConventions::kVolatileXmmRegisters);
 
-  leave();
-}
-
-
-void Assembler::CallCFunction(const ExternalLabel* label) {
-  // Reserve shadow space for outgoing arguments.
-  if (CallingConventions::kShadowSpaceBytes != 0) {
-    subq(RSP, Immediate(CallingConventions::kShadowSpaceBytes));
-  }
-  call(label);
+  LeaveStubFrame();
 }
 
 
@@ -3424,9 +3377,9 @@
 }
 
 
-void Assembler::EnterDartFrameWithInfo(intptr_t frame_size,
-                                       Register new_pp,
-                                       Register pc_marker_override) {
+void Assembler::EnterDartFrame(intptr_t frame_size,
+                               Register new_pp,
+                               Register pc_marker_override) {
   ASSERT(!constant_pool_allowed());
   EnterFrame(0);
   pushq(pc_marker_override);
@@ -3440,9 +3393,6 @@
 
 
 void Assembler::LeaveDartFrame() {
-  // LeaveDartFrame is called from stubs (pp disallowed) and from Dart code (pp
-  // allowed), so there is no point in checking the current value of
-  // constant_pool_allowed().
   set_constant_pool_allowed(false);
   // Restore caller's PP register that was pushed in EnterDartFrame.
   movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize)));
@@ -3482,10 +3432,7 @@
 
 
 void Assembler::LeaveStubFrame() {
-  set_constant_pool_allowed(false);
-  // Restore caller's PP register that was pushed in EnterStubFrame.
-  movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize)));
-  LeaveFrame();
+  LeaveDartFrame();
 }
 
 
diff --git a/runtime/vm/assembler_x64.h b/runtime/vm/assembler_x64.h
index edc7bc2..5cb3c17 100644
--- a/runtime/vm/assembler_x64.h
+++ b/runtime/vm/assembler_x64.h
@@ -686,7 +686,6 @@
 
   // Note: verified_mem mode forces far jumps.
   void j(Condition condition, Label* label, bool near = kFarJump);
-  void j(Condition condition, const ExternalLabel* label);
 
   void jmp(Register reg);
   void jmp(const Address& address);
@@ -767,15 +766,10 @@
   void LoadFunctionFromCalleePool(Register dst,
                                   const Function& function,
                                   Register new_pp);
-  void JmpPatchable(const ExternalLabel* label, Register pp);
   void JmpPatchable(const StubEntry& stub_entry, Register pp);
-  void Jmp(const ExternalLabel* label, Register pp);
   void Jmp(const StubEntry& stub_entry, Register pp);
-  void J(Condition condition, const ExternalLabel* label, Register pp);
   void J(Condition condition, const StubEntry& stub_entry, Register pp);
-  void CallPatchable(const ExternalLabel* label);
   void CallPatchable(const StubEntry& stub_entry);
-  void Call(const ExternalLabel* label);
   void Call(const StubEntry& stub_entry);
   // Unaware of write barrier (use StoreInto* methods for storing to objects).
   // TODO(koda): Add StackAddress/HeapAddress types to prevent misuse.
@@ -849,7 +843,6 @@
 
   // Call runtime function. Reserves shadow space on the stack before calling
   // if platform ABI requires that. Does not restore RSP after the call itself.
-  void CallCFunction(const ExternalLabel* label);
   void CallCFunction(Register reg);
 
   /*
@@ -947,8 +940,9 @@
   //   ...
   //   pushq r15
   //   .....
-  void EnterDartFrameWithInfo(intptr_t frame_size,
-                              Register new_pp, Register pc_marker_override);
+  void EnterDartFrame(intptr_t frame_size,
+                      Register new_pp,
+                      Register pc_marker_override);
   void LeaveDartFrame();
 
   // Set up a Dart frame for a function compiled for on-stack replacement.
diff --git a/runtime/vm/assembler_x64_test.cc b/runtime/vm/assembler_x64_test.cc
index cd99603..eaa9ce0 100644
--- a/runtime/vm/assembler_x64_test.cc
+++ b/runtime/vm/assembler_x64_test.cc
@@ -2025,20 +2025,18 @@
     double a;
     double b;
   } constant0 = { 1.0, 2.0 };
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ movq(RAX, Immediate(reinterpret_cast<uword>(&constant0)));
   __ movups(XMM10, Address(RAX, 0));
   __ negatepd(XMM10);
   __ movaps(XMM0, XMM10);
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedDoubleNegate, test) {
-  typedef double (*PackedDoubleNegate)();
-  double res = reinterpret_cast<PackedDoubleNegate>(test->entry())();
+  double res = test->Invoke<double>();
   EXPECT_FLOAT_EQ(-1.0, res, 0.000001f);
 }
 
@@ -2048,20 +2046,18 @@
     double a;
     double b;
   } constant0 = { -1.0, 2.0 };
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ movq(RAX, Immediate(reinterpret_cast<uword>(&constant0)));
   __ movups(XMM10, Address(RAX, 0));
   __ abspd(XMM10);
   __ movaps(XMM0, XMM10);
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedDoubleAbsolute, test) {
-  typedef double (*PackedDoubleAbsolute)();
-  double res = reinterpret_cast<PackedDoubleAbsolute>(test->entry())();
+  double res = test->Invoke<double>();
   EXPECT_FLOAT_EQ(1.0, res, 0.000001f);
 }
 
@@ -2495,59 +2491,53 @@
 
 
 ASSEMBLER_TEST_GENERATE(PackedNegate, assembler) {
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ movl(RAX, Immediate(bit_cast<int32_t, float>(12.3f)));
   __ movd(XMM0, RAX);
   __ shufps(XMM0, XMM0, Immediate(0x0));
   __ negateps(XMM0);
   __ shufps(XMM0, XMM0, Immediate(0xAA));  // Copy third lane into all 4 lanes.
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedNegate, test) {
-  typedef float (*PackedNegateCode)();
-  float res = reinterpret_cast<PackedNegateCode>(test->entry())();
+  float res = test->Invoke<float>();
   EXPECT_FLOAT_EQ(-12.3f, res, 0.001f);
 }
 
 
 ASSEMBLER_TEST_GENERATE(PackedAbsolute, assembler) {
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ movl(RAX, Immediate(bit_cast<int32_t, float>(-15.3f)));
   __ movd(XMM0, RAX);
   __ shufps(XMM0, XMM0, Immediate(0x0));
   __ absps(XMM0);
   __ shufps(XMM0, XMM0, Immediate(0xAA));  // Copy third lane into all 4 lanes.
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedAbsolute, test) {
-  typedef float (*PackedAbsoluteCode)();
-  float res = reinterpret_cast<PackedAbsoluteCode>(test->entry())();
+  float res = test->Invoke<float>();
   EXPECT_FLOAT_EQ(15.3f, res, 0.001f);
 }
 
 
 ASSEMBLER_TEST_GENERATE(PackedSetWZero, assembler) {
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ set1ps(XMM0, RAX, Immediate(bit_cast<int32_t, float>(12.3f)));
   __ zerowps(XMM0);
   __ shufps(XMM0, XMM0, Immediate(0xFF));  // Copy the W lane which is now 0.0.
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedSetWZero, test) {
-  typedef float (*PackedSetWZeroCode)();
-  float res = reinterpret_cast<PackedSetWZeroCode>(test->entry())();
+  float res = test->Invoke<float>();
   EXPECT_FLOAT_EQ(0.0f, res, 0.001f);
 }
 
@@ -2657,8 +2647,7 @@
     uint32_t d;
   } constant1 =
       { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF };
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadImmediate(RAX, Immediate(reinterpret_cast<intptr_t>(&constant1)));
   __ movups(XMM9, Address(RAX, 0));
   __ notps(XMM9);
@@ -2666,14 +2655,13 @@
   __ pushq(RAX);
   __ movss(Address(RSP, 0), XMM0);
   __ popq(RAX);
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(PackedLogicalNot, test) {
-  typedef uint32_t (*PackedLogicalNotCode)();
-  uint32_t res = reinterpret_cast<PackedLogicalNotCode>(test->entry())();
+  uint32_t res = test->Invoke<uint32_t>();
   EXPECT_EQ(static_cast<uword>(0x0), res);
 }
 
@@ -3065,9 +3053,7 @@
   ObjectStore* object_store = Isolate::Current()->object_store();
   const Object& obj = Object::ZoneHandle(object_store->smi_class());
   Label fail;
-  __ EnterFrame(0);
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadObject(RAX, obj);
   __ CompareObject(RAX, obj);
   __ j(NOT_EQUAL, &fail);
@@ -3094,15 +3080,13 @@
   __ ret();
   __ Bind(&fail);
   __ movl(RAX, Immediate(0));  // Fail.
-  __ popq(PP);  // Restore caller's pool pointer.
-  __ LeaveFrame();
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(TestObjectCompare, test) {
-  typedef bool (*TestObjectCompare)();
-  bool res = reinterpret_cast<TestObjectCompare>(test->entry())();
+  bool res = test->Invoke<bool>();
   EXPECT_EQ(true, res);
 }
 
@@ -3306,19 +3290,13 @@
 
 // Called from assembler_test.cc.
 ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
   __ pushq(THR);
-  __ movq(THR, CallingConventions::kArg4Reg);
-  __ pushq(CTX);
-  __ movq(CTX, CallingConventions::kArg1Reg);
-  __ StoreIntoObject(CallingConventions::kArg3Reg,
-                     FieldAddress(CallingConventions::kArg3Reg,
+  __ movq(THR, CallingConventions::kArg3Reg);
+  __ StoreIntoObject(CallingConventions::kArg2Reg,
+                     FieldAddress(CallingConventions::kArg2Reg,
                                   GrowableObjectArray::data_offset()),
-                     CallingConventions::kArg2Reg);
-  __ popq(CTX);
+                     CallingConventions::kArg1Reg);
   __ popq(THR);
-  __ popq(PP);  // Restore caller's pool pointer.
   __ ret();
 }
 
@@ -3432,21 +3410,19 @@
 
 
 ASSEMBLER_TEST_GENERATE(DoubleAbs, assembler) {
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ DoubleAbs(XMM0);
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
 
 ASSEMBLER_TEST_RUN(DoubleAbs, test) {
-  typedef double (*DoubleAbsCode)(double d);
   double val = -12.45;
-  double res =  reinterpret_cast<DoubleAbsCode>(test->entry())(val);
+  double res =  test->Invoke<double, double>(val);
   EXPECT_FLOAT_EQ(-val, res, 0.001);
   val = 12.45;
-  res =  reinterpret_cast<DoubleAbsCode>(test->entry())(val);
+  res = test->Invoke<double, double>(val);
   EXPECT_FLOAT_EQ(val, res, 0.001);
 }
 
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index 79283b3..32fd18d 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -1805,13 +1805,15 @@
                  const String& native_c_function_name,
                  NativeFunction native_c_function,
                  LocalScope* scope,
-                 bool is_bootstrap_native)
+                 bool is_bootstrap_native,
+                 bool link_lazily = false)
       : AstNode(token_pos),
         function_(function),
         native_c_function_name_(native_c_function_name),
         native_c_function_(native_c_function),
         scope_(scope),
-        is_bootstrap_native_(is_bootstrap_native) {
+        is_bootstrap_native_(is_bootstrap_native),
+        link_lazily_(link_lazily) {
     ASSERT(function_.IsZoneHandle());
     ASSERT(native_c_function_ != NULL);
     ASSERT(native_c_function_name_.IsZoneHandle());
@@ -1826,6 +1828,8 @@
   LocalScope* scope() const { return scope_; }
   bool is_bootstrap_native() const { return is_bootstrap_native_; }
 
+  bool link_lazily() const { return link_lazily_; }
+
   virtual void VisitChildren(AstNodeVisitor* visitor) const { }
 
   DECLARE_COMMON_NODE_FUNCTIONS(NativeBodyNode);
@@ -1836,6 +1840,7 @@
   NativeFunction native_c_function_;  // Actual non-Dart implementation.
   LocalScope* scope_;
   const bool is_bootstrap_native_;  // Is a bootstrap native method.
+  const bool link_lazily_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(NativeBodyNode);
 };
diff --git a/runtime/vm/ast_printer.cc b/runtime/vm/ast_printer.cc
index 8197dd9..4877eac 100644
--- a/runtime/vm/ast_printer.cc
+++ b/runtime/vm/ast_printer.cc
@@ -508,8 +508,6 @@
 void AstPrinter::PrintFunctionScope(const ParsedFunction& parsed_function) {
   HANDLESCOPE(Isolate::Current());
   const Function& function = parsed_function.function();
-  const Array& default_parameter_values =
-      parsed_function.default_parameter_values();
   SequenceNode* node_sequence = parsed_function.node_sequence();
   ASSERT(node_sequence != NULL);
   const LocalScope* scope = node_sequence->scope();
@@ -538,8 +536,8 @@
               param->name().ToCString());
     // Print the default value if the parameter is optional.
     if (pos >= num_fixed_params && pos < num_params) {
-      const Object& default_parameter_value = Object::Handle(
-          default_parameter_values.At(pos - num_fixed_params));
+      const Instance& default_parameter_value =
+          parsed_function.DefaultParameterValueAt(pos - num_fixed_params);
       ISL_Print(" =%s", default_parameter_value.ToCString());
     }
     if (param->HasIndex()) {
diff --git a/runtime/vm/ast_transformer.cc b/runtime/vm/ast_transformer.cc
index ac3f9f1..11cb61c 100644
--- a/runtime/vm/ast_transformer.cc
+++ b/runtime/vm/ast_transformer.cc
@@ -112,13 +112,9 @@
   // Await transformation:
   //
   //   :await_temp_var_X = <expr>;
-  //   :result_param = :await_temp_var_X;
-  //   if (:result_param is !Future) {
-  //     :result_param = Future.value(:result_param);
-  //   }
   //   AwaitMarker(kNewContinuationState);
-  //   :result_param = :result_param.then(:async_op);
-  //   _asyncCatchHelper(:result_param.catchError, :async_op);
+  //   :result_param = _awaitHelper(
+  //      :await_temp_var_X, :async_then_callback, :async_catch_error_callback);
   //   return;  // (return_type() == kContinuationTarget)
   //
   //   :saved_try_ctx_var = :await_saved_try_ctx_var_y;
@@ -126,6 +122,10 @@
 
   LocalVariable* async_op = GetVariableInScope(
       preamble_->scope(), Symbols::AsyncOperation());
+  LocalVariable* async_then_callback = GetVariableInScope(
+      preamble_->scope(), Symbols::AsyncThenCallback());
+  LocalVariable* async_catch_error_callback = GetVariableInScope(
+      preamble_->scope(), Symbols::AsyncCatchErrorCallback());
   LocalVariable* result_param = GetVariableInScope(
       preamble_->scope(), Symbols::AsyncOperationParam());
   LocalVariable* error_param = GetVariableInScope(
@@ -134,78 +134,34 @@
       preamble_->scope(), Symbols::AsyncOperationStackTraceParam());
 
   AstNode* transformed_expr = Transform(node->expr());
-  preamble_->Add(new(Z) StoreLocalNode(
-      Scanner::kNoSourcePos, result_param, transformed_expr));
-
-  LoadLocalNode* load_result_param = new(Z) LoadLocalNode(
-      Scanner::kNoSourcePos, result_param);
-
-  const Class& future_cls =
-      Class::ZoneHandle(Z, thread()->isolate()->object_store()->future_class());
-  ASSERT(!future_cls.IsNull());
-  const AbstractType& future_type =
-      AbstractType::ZoneHandle(Z, future_cls.RareType());
-  ASSERT(!future_type.IsNull());
-
-  LocalScope* is_not_future_scope = ChainNewScope(preamble_->scope());
-  SequenceNode* is_not_future_branch =
-      new (Z) SequenceNode(Scanner::kNoSourcePos, is_not_future_scope);
-
-  // if (:result_param is !Future) {
-  //   :result_param = Future.value(:result_param);
-  // }
-  const Function& value_ctor = Function::ZoneHandle(
-      Z, future_cls.LookupFunction(Symbols::FutureValue()));
-  ASSERT(!value_ctor.IsNull());
-  ArgumentListNode* ctor_args = new (Z) ArgumentListNode(Scanner::kNoSourcePos);
-  ctor_args->Add(new (Z) LoadLocalNode(Scanner::kNoSourcePos, result_param));
-  ConstructorCallNode* ctor_call =
-      new (Z) ConstructorCallNode(Scanner::kNoSourcePos,
-                                  TypeArguments::ZoneHandle(Z),
-                                  value_ctor,
-                                  ctor_args);
-  is_not_future_branch->Add(new (Z) StoreLocalNode(
-      Scanner::kNoSourcePos, result_param, ctor_call));
-  AstNode* is_not_future_test = new (Z) ComparisonNode(
-      Scanner::kNoSourcePos,
-      Token::kISNOT,
-      load_result_param,
-      new (Z) TypeNode(Scanner::kNoSourcePos, future_type));
-  preamble_->Add(new(Z) IfNode(Scanner::kNoSourcePos,
-                               is_not_future_test,
-                               is_not_future_branch,
-                               NULL));
+  LocalVariable* await_temp = AddToPreambleNewTempVar(transformed_expr);
 
   AwaitMarkerNode* await_marker = new (Z) AwaitMarkerNode();
   await_marker->set_scope(preamble_->scope());
   preamble_->Add(await_marker);
-  ArgumentListNode* args = new(Z) ArgumentListNode(Scanner::kNoSourcePos);
 
-  args->Add(new(Z) LoadLocalNode(Scanner::kNoSourcePos, async_op));
-  preamble_->Add(new (Z) StoreLocalNode(
-      Scanner::kNoSourcePos,
-      result_param,
-      new(Z) InstanceCallNode(node->token_pos(),
-                              load_result_param,
-                              Symbols::FutureThen(),
-                              args)));
-  const Library& core_lib = Library::Handle(Library::CoreLibrary());
-  const Function& async_catch_helper = Function::ZoneHandle(
-      Z, core_lib.LookupFunctionAllowPrivate(Symbols::AsyncCatchHelper()));
-  ASSERT(!async_catch_helper.IsNull());
-  ArgumentListNode* catch_helper_args = new (Z) ArgumentListNode(
+  // :result_param = _awaitHelper(
+  //      :await_temp, :async_then_callback, :async_catch_error_callback)
+  const Library& async_lib = Library::Handle(Library::AsyncLibrary());
+  const Function& async_await_helper = Function::ZoneHandle(
+      Z, async_lib.LookupFunctionAllowPrivate(Symbols::AsyncAwaitHelper()));
+  ASSERT(!async_await_helper.IsNull());
+  ArgumentListNode* async_await_helper_args = new (Z) ArgumentListNode(
       Scanner::kNoSourcePos);
-  InstanceGetterNode* catch_error_getter = new (Z) InstanceGetterNode(
-      Scanner::kNoSourcePos,
-      load_result_param,
-      Symbols::FutureCatchError());
-  catch_helper_args->Add(catch_error_getter);
-  catch_helper_args->Add(new (Z) LoadLocalNode(
-      Scanner::kNoSourcePos, async_op));
-  preamble_->Add(new (Z) StaticCallNode(
-      Scanner::kNoSourcePos,
-      async_catch_helper,
-      catch_helper_args));
+  async_await_helper_args->Add(
+      new(Z) LoadLocalNode(Scanner::kNoSourcePos, await_temp));
+  async_await_helper_args->Add(
+      new(Z) LoadLocalNode(Scanner::kNoSourcePos, async_then_callback));
+  async_await_helper_args->Add(
+      new(Z) LoadLocalNode(Scanner::kNoSourcePos, async_catch_error_callback));
+  StaticCallNode* await_helper_call = new (Z) StaticCallNode(
+      node->token_pos(),
+      async_await_helper,
+      async_await_helper_args);
+
+  preamble_->Add(new(Z) StoreLocalNode(
+      Scanner::kNoSourcePos, result_param, await_helper_call));
+
   ReturnNode* continuation_return = new(Z) ReturnNode(Scanner::kNoSourcePos);
   continuation_return->set_return_type(ReturnNode::kContinuationTarget);
   preamble_->Add(continuation_return);
@@ -230,6 +186,12 @@
     ASSERT(node->outer_saved_try_ctx() == NULL);
   }
 
+  // Load the async_op variable. It is unused, but the observatory uses it
+  // to determine if a breakpoint is inside an asynchronous function.
+  LoadLocalNode* load_async_op = new (Z) LoadLocalNode(
+      Scanner::kNoSourcePos, async_op);
+  preamble_->Add(load_async_op);
+
   LoadLocalNode* load_error_param = new (Z) LoadLocalNode(
       Scanner::kNoSourcePos, error_param);
   LoadLocalNode* load_stack_trace_param = new (Z) LoadLocalNode(
diff --git a/runtime/vm/atomic.h b/runtime/vm/atomic.h
index c256fe5..9d1fd13 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -21,7 +21,24 @@
   // that are accessed by generated code
   static uintptr_t FetchAndIncrement(uintptr_t* p);
 
+  // Atomically fetch the value at p and decrement the value at p.
+  // Returns the original value at p.
+  //
+  // NOTE: Not to be used for any atomic operations involving memory locations
+  // that are accessed by generated code
+  static uintptr_t FetchAndDecrement(uintptr_t* p);
+
+  // Atomically compare *ptr to old_value, and if equal, store new_value.
+  // Returns the original value at ptr.
+  //
+  // NOTE: OK to use with memory locations that are accessed by generated code
   static uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value);
+
+  // Performs a load of a word from 'ptr', but without any guarantees about
+  // memory order (i.e., no load barriers/fences).
+  static uword LoadRelaxed(uword* ptr) {
+    return *static_cast<volatile uword*>(ptr);
+  }
 };
 
 
diff --git a/runtime/vm/atomic_android.h b/runtime/vm/atomic_android.h
index 06208f2..9f4df90 100644
--- a/runtime/vm/atomic_android.h
+++ b/runtime/vm/atomic_android.h
@@ -21,6 +21,11 @@
 }
 
 
+inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
+  return __sync_fetch_and_sub(p, 1);
+}
+
+
 #if !defined(USING_SIMULATOR)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
diff --git a/runtime/vm/atomic_linux.h b/runtime/vm/atomic_linux.h
index 9789ae5..dc57f2d 100644
--- a/runtime/vm/atomic_linux.h
+++ b/runtime/vm/atomic_linux.h
@@ -21,6 +21,11 @@
 }
 
 
+inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
+  return __sync_fetch_and_sub(p, 1);
+}
+
+
 #if !defined(USING_SIMULATOR)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
diff --git a/runtime/vm/atomic_macos.h b/runtime/vm/atomic_macos.h
index 288fe3c..b56d2a0 100644
--- a/runtime/vm/atomic_macos.h
+++ b/runtime/vm/atomic_macos.h
@@ -21,6 +21,11 @@
 }
 
 
+inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
+  return __sync_fetch_and_sub(p, 1);
+}
+
+
 #if !defined(USING_SIMULATOR)
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
diff --git a/runtime/vm/atomic_test.cc b/runtime/vm/atomic_test.cc
new file mode 100644
index 0000000..5e22606
--- /dev/null
+++ b/runtime/vm/atomic_test.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "platform/assert.h"
+#include "platform/utils.h"
+#include "vm/atomic.h"
+#include "vm/globals.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+UNIT_TEST_CASE(FetchAndIncrement) {
+  uintptr_t v = 42;
+  EXPECT_EQ(static_cast<uintptr_t>(42),
+            AtomicOperations::FetchAndIncrement(&v));
+  EXPECT_EQ(static_cast<uintptr_t>(43), v);
+}
+
+
+UNIT_TEST_CASE(FetchAndDecrement) {
+  uintptr_t v = 42;
+  EXPECT_EQ(static_cast<uintptr_t>(42),
+            AtomicOperations::FetchAndDecrement(&v));
+  EXPECT_EQ(static_cast<uintptr_t>(41), v);
+}
+
+
+UNIT_TEST_CASE(LoadRelaxed) {
+  uword v = 42;
+  EXPECT_EQ(static_cast<uword>(42), AtomicOperations::LoadRelaxed(&v));
+}
+
+}  // namespace dart
diff --git a/runtime/vm/atomic_win.h b/runtime/vm/atomic_win.h
index 24be3b1..4ef539c 100644
--- a/runtime/vm/atomic_win.h
+++ b/runtime/vm/atomic_win.h
@@ -16,14 +16,27 @@
 namespace dart {
 
 inline uintptr_t AtomicOperations::FetchAndIncrement(uintptr_t* p) {
-#if defined(TARGET_ARCH_X64)
+#if defined(HOST_ARCH_X64)
   return static_cast<uintptr_t>(
       InterlockedIncrement64(reinterpret_cast<LONGLONG*>(p))) - 1;
-#elif defined(TARGET_ARCH_IA32)
+#elif defined(HOST_ARCH_IA32)
   return static_cast<uintptr_t>(
       InterlockedIncrement(reinterpret_cast<LONG*>(p))) - 1;
 #else
-  UNIMPLEMENTED();
+#error Unsupported host architecture.
+#endif
+}
+
+
+inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
+#if defined(HOST_ARCH_X64)
+  return static_cast<uintptr_t>(
+      InterlockedDecrement64(reinterpret_cast<LONGLONG*>(p))) + 1;
+#elif defined(HOST_ARCH_IA32)
+  return static_cast<uintptr_t>(
+      InterlockedDecrement(reinterpret_cast<LONG*>(p))) + 1;
+#else
+#error Unsupported host architecture.
 #endif
 }
 
@@ -32,18 +45,18 @@
 inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
                                                   uword old_value,
                                                   uword new_value) {
-#if defined(TARGET_ARCH_X64)
+#if defined(HOST_ARCH_X64)
   return static_cast<uword>(
       InterlockedCompareExchange64(reinterpret_cast<LONGLONG*>(ptr),
                                    static_cast<LONGLONG>(new_value),
                                    static_cast<LONGLONG>(old_value)));
-#elif defined(TARGET_ARCH_IA32)
+#elif defined(HOST_ARCH_IA32)
   return static_cast<uword>(
       InterlockedCompareExchange(reinterpret_cast<LONG*>(ptr),
                                  static_cast<LONG>(new_value),
                                  static_cast<LONG>(old_value)));
 #else
-  UNIMPLEMENTED();
+#error Unsupported host architecture.
 #endif
 }
 #endif  // !defined(USING_SIMULATOR)
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index 7f51ac4..b65d639 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -502,7 +502,8 @@
   // Write snapshot with object content.
   FullSnapshotWriter writer(&vm_isolate_snapshot_buffer,
                             &isolate_snapshot_buffer,
-                            &malloc_allocator);
+                            &malloc_allocator,
+                            false /* snapshot_code */);
   writer.WriteFullSnapshot();
   const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer);
   ASSERT(snapshot->kind() == Snapshot::kFull);
@@ -536,7 +537,8 @@
   // Write snapshot with object content.
   FullSnapshotWriter writer(&vm_isolate_snapshot_buffer,
                             &isolate_snapshot_buffer,
-                            &malloc_allocator);
+                            &malloc_allocator,
+                            false /* snapshot_code */);
   writer.WriteFullSnapshot();
   const Snapshot* snapshot = Snapshot::SetupFromBuffer(isolate_snapshot_buffer);
   ASSERT(snapshot->kind() == Snapshot::kFull);
diff --git a/runtime/vm/benchmark_test.h b/runtime/vm/benchmark_test.h
index de7d6ae..a91bc01 100644
--- a/runtime/vm/benchmark_test.h
+++ b/runtime/vm/benchmark_test.h
@@ -38,8 +38,10 @@
   void Dart_Benchmark##name(Benchmark* benchmark) {                            \
     FLAG_old_gen_growth_space_ratio = 100;                                     \
     BenchmarkIsolateScope __isolate__(benchmark);                              \
-    StackZone __zone__(benchmark->isolate());                                  \
-    HandleScope __hs__(benchmark->isolate());                                  \
+    Thread* __thread__ = Thread::Current();                                    \
+    ASSERT(__thread__->isolate() == benchmark->isolate());                     \
+    StackZone __zone__(__thread__);                                            \
+    HandleScope __hs__(__thread__);                                            \
     Dart_BenchmarkHelper##name(benchmark);                                     \
   }                                                                            \
   static void Dart_BenchmarkHelper##name(Benchmark* benchmark)
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index b844d01..a9b9485 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -154,7 +154,7 @@
     } else {
       // Compilation errors are not Dart instances, so just mark the library
       // as having failed to load without providing an error instance.
-      library.SetLoadError(Instance::Handle());
+      library.SetLoadError(Object::null_instance());
     }
   }
   return error.raw();
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 0358a00..38a92de 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -70,6 +70,8 @@
   V(Bigint_allocate, 4)                                                        \
   V(Developer_debugger, 2)                                                     \
   V(Developer_inspect, 1)                                                      \
+  V(Developer_lookupExtension, 1)                                              \
+  V(Developer_registerExtension, 2)                                            \
   V(Developer_log, 8)                                                          \
   V(Double_getIsNegative, 1)                                                   \
   V(Double_getIsInfinite, 1)                                                   \
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 75b832b..48bbfce 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -9,6 +9,7 @@
 #include "vm/heap.h"
 #include "vm/isolate.h"
 #include "vm/longjump.h"
+#include "vm/log.h"
 #include "vm/object_store.h"
 #include "vm/report.h"
 #include "vm/symbols.h"
@@ -166,15 +167,16 @@
 
 // Adds all interfaces of cls into 'collected'. Duplicate entries may occur.
 // No cycles are allowed.
-void ClassFinalizer::CollectInterfaces(const Class& cls,
-                                       const GrowableObjectArray& collected) {
-  const Array& interface_array = Array::Handle(cls.interfaces());
-  AbstractType& interface = AbstractType::Handle();
-  Class& interface_class = Class::Handle();
+void ClassFinalizer::CollectInterfaces(
+    const Class& cls, GrowableArray<const Class*>* collected) {
+  Zone* zone = Thread::Current()->zone();
+  const Array& interface_array = Array::Handle(zone, cls.interfaces());
+  AbstractType& interface = AbstractType::Handle(zone);
+  Class& interface_class = Class::Handle(zone);
   for (intptr_t i = 0; i < interface_array.Length(); i++) {
     interface ^= interface_array.At(i);
     interface_class = interface.type_class();
-    collected.Add(interface_class);
+    collected->Add(&Class::ZoneHandle(zone, interface_class.raw()));
     CollectInterfaces(interface_class, collected);
   }
 }
@@ -335,7 +337,7 @@
 
   // Target is not resolved yet.
   if (FLAG_trace_class_finalization) {
-    OS::Print("Resolving redirecting factory: %s\n",
+    ISL_Print("Resolving redirecting factory: %s\n",
               String::Handle(factory.name()).ToCString());
   }
   type ^= FinalizeType(cls, type, kCanonicalize);
@@ -457,7 +459,7 @@
     return;
   }
   if (FLAG_trace_type_finalization) {
-    OS::Print("Resolve type class of '%s'\n",
+    ISL_Print("Resolve type class of '%s'\n",
               String::Handle(type.Name()).ToCString());
   }
 
@@ -496,7 +498,7 @@
   }
   ASSERT(type.IsType());
   if (FLAG_trace_type_finalization) {
-    OS::Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
+    ISL_Print("Resolve type '%s'\n", String::Handle(type.Name()).ToCString());
   }
   ResolveTypeClass(cls, type);
   if (type.IsMalformed()) {
@@ -523,7 +525,7 @@
     const Class& cls,
     GrowableObjectArray* pending_types) {
   if (FLAG_trace_type_finalization) {
-    OS::Print("Finalizing type parameters of '%s'\n",
+    ISL_Print("Finalizing type parameters of '%s'\n",
               String::Handle(cls.Name()).ToCString());
   }
   if (cls.IsMixinApplication()) {
@@ -562,7 +564,7 @@
                                         GrowableObjectArray* pending_types) {
   Isolate* isolate = Isolate::Current();
   if (FLAG_trace_type_finalization) {
-    OS::Print("Checking recursive type '%s': %s\n",
+    ISL_Print("Checking recursive type '%s': %s\n",
               String::Handle(type.Name()).ToCString(),
               type.ToCString());
   }
@@ -593,7 +595,7 @@
   for (intptr_t i = num_pending_types - 1; i >= 0; i--) {
     pending_type ^= pending_types->At(i);
     if (FLAG_trace_type_finalization) {
-      OS::Print("  Comparing with pending type '%s': %s\n",
+      ISL_Print("  Comparing with pending type '%s': %s\n",
                 String::Handle(pending_type.Name()).ToCString(),
                 pending_type.ToCString());
     }
@@ -654,7 +656,7 @@
     intptr_t num_uninitialized_arguments,
     Error* bound_error,
     GrowableObjectArray* pending_types,
-    GrowableObjectArray* trail) {
+    TrailPtr trail) {
   ASSERT(arguments.Length() >= cls.NumTypeArguments());
   if (!cls.is_type_finalized()) {
     FinalizeTypeParameters(cls, pending_types);
@@ -685,7 +687,7 @@
             ASSERT(super_type_arg.IsType());
             CheckRecursiveType(cls, Type::Cast(super_type_arg), pending_types);
             if (FLAG_trace_type_finalization) {
-              OS::Print("Creating TypeRef '%s': '%s'\n",
+              ISL_Print("Creating TypeRef '%s': '%s'\n",
                         String::Handle(super_type_arg.Name()).ToCString(),
                         super_type_arg.ToCString());
             }
@@ -706,7 +708,7 @@
           if (FLAG_trace_type_finalization && super_type_arg.IsTypeRef()) {
             AbstractType& ref_type = AbstractType::Handle(
                 TypeRef::Cast(super_type_arg).type());
-            OS::Print("Instantiating TypeRef '%s': '%s'\n"
+            ISL_Print("Instantiating TypeRef '%s': '%s'\n"
                       "  instantiator: '%s'\n",
                       String::Handle(super_type_arg.Name()).ToCString(),
                       ref_type.ToCString(),
@@ -892,7 +894,7 @@
                            "type '%s' has an out of bound type argument",
                            type_name.ToCString());
     if (FLAG_trace_type_finalization) {
-      OS::Print("Marking type '%s' as malbounded: %s\n",
+      ISL_Print("Marking type '%s' as malbounded: %s\n",
                 String::Handle(type.Name()).ToCString(),
                 bound_error.ToCString());
     }
@@ -935,17 +937,17 @@
     return type.raw();
   }
 
-  Isolate* isolate = Isolate::Current();
+  Zone* Z = Thread::Current()->zone();
   if (FLAG_trace_type_finalization) {
-    OS::Print("Finalizing type '%s' for class '%s'\n",
-              String::Handle(isolate, type.Name()).ToCString(),
+    ISL_Print("Finalizing type '%s' for class '%s'\n",
+              String::Handle(Z, type.Name()).ToCString(),
               cls.ToCString());
   }
 
   if (type.IsTypeParameter()) {
     const TypeParameter& type_parameter = TypeParameter::Cast(type);
     const Class& parameterized_class =
-        Class::Handle(isolate, type_parameter.parameterized_class());
+        Class::Handle(Z, type_parameter.parameterized_class());
     ASSERT(!parameterized_class.IsNull());
     // The index must reflect the position of this type parameter in the type
     // arguments vector of its parameterized class. The offset to add is the
@@ -964,8 +966,8 @@
     }
 
     if (FLAG_trace_type_finalization) {
-      OS::Print("Done finalizing type parameter '%s' with index %" Pd "\n",
-                String::Handle(isolate, type_parameter.name()).ToCString(),
+      ISL_Print("Done finalizing type parameter '%s' with index %" Pd "\n",
+                String::Handle(Z, type_parameter.name()).ToCString(),
                 type_parameter.index());
     }
 
@@ -979,7 +981,7 @@
   // This type is the root type of the type graph if no pending types queue is
   // allocated yet.
   const bool is_root_type = (pending_types == NULL);
-  GrowableObjectArray& types = GrowableObjectArray::Handle(isolate);
+  GrowableObjectArray& types = GrowableObjectArray::Handle(Z);
   if (is_root_type) {
     types = GrowableObjectArray::New();
     pending_types = &types;
@@ -990,7 +992,7 @@
   // the type itself, a precondition to calling FinalizeType).
   // Also, the interfaces of the type class must be resolved and the type
   // parameters of the type class must be finalized.
-  Class& type_class = Class::Handle(isolate, parameterized_type.type_class());
+  Class& type_class = Class::Handle(Z, parameterized_type.type_class());
   if (!type_class.is_type_finalized()) {
     FinalizeTypeParameters(type_class, pending_types);
     ResolveUpperBounds(type_class);
@@ -1006,12 +1008,12 @@
   // Specifying no type arguments indicates a raw type, which is not an error.
   // However, type parameter bounds are checked below, even for a raw type.
   TypeArguments& arguments =
-      TypeArguments::Handle(isolate, parameterized_type.arguments());
+      TypeArguments::Handle(Z, parameterized_type.arguments());
   if (!arguments.IsNull() && (arguments.Length() != num_type_parameters)) {
     // Wrong number of type arguments. The type is mapped to the raw type.
     if (Isolate::Current()->flags().error_on_bad_type()) {
       const String& type_class_name =
-          String::Handle(isolate, type_class.Name());
+          String::Handle(Z, type_class.Name());
       ReportError(cls, parameterized_type.token_pos(),
                   "wrong number of type arguments for class '%s'",
                   type_class_name.ToCString());
@@ -1031,8 +1033,8 @@
   // The full type argument vector consists of the type arguments of the
   // super types of type_class, which are initialized from the parsed
   // type arguments, followed by the parsed type arguments.
-  TypeArguments& full_arguments = TypeArguments::Handle(isolate);
-  Error& bound_error = Error::Handle(isolate);
+  TypeArguments& full_arguments = TypeArguments::Handle(Z);
+  Error& bound_error = Error::Handle(Z);
   if (num_type_arguments > 0) {
     // If no type arguments were parsed and if the super types do not prepend
     // type arguments to the vector, we can leave the vector as null.
@@ -1042,7 +1044,7 @@
       // argument vector.
       const intptr_t offset = num_type_arguments - num_type_parameters;
       AbstractType& type_arg =
-          AbstractType::Handle(isolate, Type::DynamicType());
+          AbstractType::Handle(Z, Type::DynamicType());
       // Leave the temporary type arguments at indices [0..offset[ as null.
       for (intptr_t i = 0; i < num_type_parameters; i++) {
         // If no type parameters were provided, a raw type is desired, so we
@@ -1081,20 +1083,19 @@
       // signature function may either be an alias or the enclosing class of a
       // local function, in which case the super type of the enclosing class is
       // also considered when filling up the argument vector.
-      Class& owner_class = Class::Handle(isolate);
+      Class& owner_class = Class::Handle(Z);
       if (type_class.IsSignatureClass()) {
         const Function& signature_fun =
-            Function::Handle(isolate, type_class.signature_function());
+            Function::Handle(Z, type_class.signature_function());
         ASSERT(!signature_fun.is_static());
         owner_class = signature_fun.Owner();
       } else {
         owner_class = type_class.raw();
       }
       if (offset > 0) {
-        GrowableObjectArray& trail =
-            GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+        TrailPtr trail = new Trail(Z, 4);
         FinalizeTypeArguments(owner_class, full_arguments, offset,
-                              &bound_error, pending_types, &trail);
+                              &bound_error, pending_types, trail);
       }
       if (full_arguments.IsRaw(0, num_type_arguments)) {
         // The parameterized_type is raw. Set its argument vector to null, which
@@ -1119,13 +1120,13 @@
   // If we are done finalizing a graph of mutually recursive types, check their
   // bounds.
   if (is_root_type) {
-    Type& type = Type::Handle(isolate);
+    Type& type = Type::Handle(Z);
     for (intptr_t i = types.Length() - 1; i >= 0; i--) {
       type ^= types.At(i);
       CheckTypeBounds(cls, type);
       if (FLAG_trace_type_finalization && type.IsRecursive()) {
-        OS::Print("Done finalizing recursive type '%s': %s\n",
-                  String::Handle(isolate, type.Name()).ToCString(),
+        ISL_Print("Done finalizing recursive type '%s': %s\n",
+                  String::Handle(Z, type.Name()).ToCString(),
                   type.ToCString());
       }
     }
@@ -1143,8 +1144,8 @@
   }
 
   if (FLAG_trace_type_finalization) {
-    OS::Print("Done finalizing type '%s' with %" Pd " type args: %s\n",
-              String::Handle(isolate, parameterized_type.Name()).ToCString(),
+    ISL_Print("Done finalizing type '%s' with %" Pd " type args: %s\n",
+              String::Handle(Z, parameterized_type.Name()).ToCString(),
               parameterized_type.arguments() == TypeArguments::null() ?
                   0 : num_type_arguments,
               parameterized_type.ToCString());
@@ -1152,10 +1153,10 @@
 
   if (finalization >= kCanonicalize) {
     if (FLAG_trace_type_finalization && parameterized_type.IsRecursive()) {
-      AbstractType& type = Type::Handle(isolate);
+      AbstractType& type = Type::Handle(Z);
       type = parameterized_type.Canonicalize();
-      OS::Print("Done canonicalizing recursive type '%s': %s\n",
-                String::Handle(isolate, type.Name()).ToCString(),
+      ISL_Print("Done canonicalizing recursive type '%s': %s\n",
+                String::Handle(Z, type.Name()).ToCString(),
                 type.ToCString());
       return type.raw();
     }
@@ -1301,14 +1302,14 @@
   //   instance method.
 
   // Resolve type of fields and check for conflicts in super classes.
-  Isolate* I = Isolate::Current();
-  Array& array = Array::Handle(I, cls.fields());
-  Field& field = Field::Handle(I);
-  AbstractType& type = AbstractType::Handle(I);
-  String& name = String::Handle(I);
-  String& getter_name = String::Handle(I);
-  String& setter_name = String::Handle(I);
-  Class& super_class = Class::Handle(I);
+  Zone* Z = Thread::Current()->zone();
+  Array& array = Array::Handle(Z, cls.fields());
+  Field& field = Field::Handle(Z);
+  AbstractType& type = AbstractType::Handle(Z);
+  String& name = String::Handle(Z);
+  String& getter_name = String::Handle(Z);
+  String& setter_name = String::Handle(Z);
+  Class& super_class = Class::Handle(Z);
   const intptr_t num_fields = array.Length();
   for (intptr_t i = 0; i < num_fields; i++) {
     field ^= array.At(i);
@@ -1320,8 +1321,8 @@
       getter_name = Field::GetterSymbol(name);
       super_class = FindSuperOwnerOfInstanceMember(cls, name, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "static field '%s' of class '%s' conflicts with "
                     "instance member '%s' of super class '%s'",
@@ -1336,8 +1337,8 @@
       setter_name = Field::SetterSymbol(name);
       super_class = FindSuperOwnerOfFunction(cls, setter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "static field '%s' of class '%s' conflicts with "
                     "instance setter '%s=' of super class '%s'",
@@ -1352,8 +1353,8 @@
       // (but not getter).
       super_class = FindSuperOwnerOfFunction(cls, name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, field.token_pos(),
                     "field '%s' of class '%s' conflicts with method '%s' "
                     "of super class '%s'",
@@ -1368,13 +1369,13 @@
         (field.value() != Object::sentinel().raw())) {
       // The parser does not preset the value if the type is a type parameter or
       // is parameterized unless the value is null.
-      Error& error = Error::Handle(I);
+      Error& error = Error::Handle(Z);
       if (type.IsMalformedOrMalbounded()) {
         error = type.error();
       } else {
         ASSERT(type.IsInstantiated());
       }
-      const Instance& const_value = Instance::Handle(I, field.value());
+      const Instance& const_value = Instance::Handle(Z, field.value());
       if (!error.IsNull() ||
           (!type.IsDynamicType() &&
            !const_value.IsInstanceOf(type,
@@ -1382,10 +1383,10 @@
                                      &error))) {
         if (Isolate::Current()->flags().error_on_bad_type()) {
           const AbstractType& const_value_type = AbstractType::Handle(
-              I, const_value.GetType());
+              Z, const_value.GetType());
           const String& const_value_type_name = String::Handle(
-              I, const_value_type.UserVisibleName());
-          const String& type_name = String::Handle(I, type.UserVisibleName());
+              Z, const_value_type.UserVisibleName());
+          const String& type_name = String::Handle(Z, type.UserVisibleName());
           ReportErrors(error, cls, field.token_pos(),
                        "error initializing static %s field '%s': "
                        "type '%s' is not a subtype of type '%s'",
@@ -1403,7 +1404,7 @@
           // we create an implicit static final getter and reset the field value
           // to the sentinel value.
           const Function& getter = Function::Handle(
-              I,
+              Z,
               Function::New(getter_name,
                             RawFunction::kImplicitStaticFinalGetter,
                             /* is_static = */ true,
@@ -1416,29 +1417,28 @@
           getter.set_result_type(type);
           getter.set_is_debuggable(false);
           cls.AddFunction(getter);
-          field.set_value(Instance::Handle(I, Object::sentinel().raw()));
+          field.set_value(Object::sentinel());
         }
       }
     }
   }
   // Collect interfaces, super interfaces, and super classes of this class.
-  const GrowableObjectArray& interfaces =
-      GrowableObjectArray::Handle(I, GrowableObjectArray::New());
-  CollectInterfaces(cls, interfaces);
+  GrowableArray<const Class*> interfaces(Z, 4);
+  CollectInterfaces(cls, &interfaces);
   // Include superclasses in list of interfaces and super interfaces.
   super_class = cls.SuperClass();
   while (!super_class.IsNull()) {
-    interfaces.Add(super_class);
-    CollectInterfaces(super_class, interfaces);
+    interfaces.Add(&Class::ZoneHandle(Z, super_class.raw()));
+    CollectInterfaces(super_class, &interfaces);
     super_class = super_class.SuperClass();
   }
   // Resolve function signatures and check for conflicts in super classes and
   // interfaces.
   array = cls.functions();
-  Function& function = Function::Handle(I);
-  Function& overridden_function = Function::Handle(I);
+  Function& function = Function::Handle(Z);
+  Function& overridden_function = Function::Handle(Z);
   const intptr_t num_functions = array.Length();
-  Error& error = Error::Handle(I);
+  Error& error = Error::Handle(Z);
   for (intptr_t i = 0; i < num_functions; i++) {
     function ^= array.At(i);
     ResolveAndFinalizeSignature(cls, function);
@@ -1447,18 +1447,18 @@
     if (Isolate::Current()->flags().error_on_bad_override() &&
         !function.is_static() && !function.IsGenerativeConstructor()) {
       // A constructor cannot override anything.
-      for (intptr_t i = 0; i < interfaces.Length(); i++) {
-        super_class ^= interfaces.At(i);
+      for (intptr_t i = 0; i < interfaces.length(); i++) {
+        const Class* super_class = interfaces.At(i);
         // Finalize superclass since overrides check relies on all members
         // of the superclass to be finalized.
-        FinalizeClass(super_class);
-        overridden_function = super_class.LookupDynamicFunction(name);
+        FinalizeClass(*super_class);
+        overridden_function = super_class->LookupDynamicFunction(name);
         if (!overridden_function.IsNull() &&
             !function.HasCompatibleParametersWith(overridden_function,
                                                   &error)) {
-          const String& class_name = String::Handle(I, cls.Name());
+          const String& class_name = String::Handle(Z, cls.Name());
           const String& super_class_name =
-              String::Handle(I, super_class.Name());
+              String::Handle(Z, super_class->Name());
           ReportErrors(error, cls, function.token_pos(),
                        "class '%s' overrides method '%s' of super "
                        "class '%s' with incompatible parameters",
@@ -1472,9 +1472,9 @@
       if (function.is_static()) {
         super_class = FindSuperOwnerOfFunction(cls, name);
         if (!super_class.IsNull()) {
-          const String& class_name = String::Handle(I, cls.Name());
+          const String& class_name = String::Handle(Z, cls.Name());
           const String& super_class_name =
-              String::Handle(I, super_class.Name());
+              String::Handle(Z, super_class.Name());
           ReportError(cls, function.token_pos(),
                       "static setter '%s=' of class '%s' conflicts with "
                       "instance setter '%s=' of super class '%s'",
@@ -1495,8 +1495,8 @@
     if (function.is_static()) {
       super_class = FindSuperOwnerOfInstanceMember(cls, name, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "static %s '%s' of class '%s' conflicts with "
                     "instance member '%s' of super class '%s'",
@@ -1513,7 +1513,7 @@
         // However, the redirection type should be finalized.
         // If the redirection type is from a deferred library and is not
         // yet loaded, do not attempt to resolve.
-        Type& type = Type::Handle(I, function.RedirectionType());
+        Type& type = Type::Handle(Z, function.RedirectionType());
         if (IsLoaded(type)) {
           type ^= FinalizeType(cls, type, kCanonicalize);
           function.SetRedirectionType(type);
@@ -1523,8 +1523,8 @@
                function.IsImplicitGetterFunction()) {
       super_class = FindSuperOwnerOfFunction(cls, name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "getter '%s' of class '%s' conflicts with "
                     "method '%s' of super class '%s'",
@@ -1539,8 +1539,8 @@
       // have the same name. Thus, we do not need to check setters.
       super_class = FindSuperOwnerOfFunction(cls, getter_name);
       if (!super_class.IsNull()) {
-        const String& class_name = String::Handle(I, cls.Name());
-        const String& super_class_name = String::Handle(I, super_class.Name());
+        const String& class_name = String::Handle(Z, cls.Name());
+        const String& super_class_name = String::Handle(Z, super_class.Name());
         ReportError(cls, function.token_pos(),
                     "method '%s' of class '%s' conflicts with "
                     "getter '%s' of super class '%s'",
@@ -1641,8 +1641,7 @@
       for (intptr_t i = 0; i < num_super_type_params; i++) {
         param ^= super_type_params.TypeAt(i);
         param_name = param.name();
-        param_name = String::Concat(param_name, Symbols::Backtick());
-        param_name = Symbols::New(param_name);
+        param_name = Symbols::FromConcat(param_name, Symbols::Backtick());
         cloned_param = TypeParameter::New(mixin_app_class,
                                           cloned_index,
                                           param_name,
@@ -1856,7 +1855,7 @@
     library.AddClass(inserted_class);
 
     if (FLAG_trace_class_finalization) {
-      OS::Print("Creating mixin application alias %s\n",
+      ISL_Print("Creating mixin application alias %s\n",
                 inserted_class.ToCString());
     }
 
@@ -1991,7 +1990,7 @@
   ASSERT(!mixin_app_class.is_type_finalized());
   ASSERT(!mixin_app_class.is_mixin_type_applied());
   if (FLAG_trace_class_finalization) {
-    OS::Print("Inserting class '%s' %s\n"
+    ISL_Print("Inserting class '%s' %s\n"
               "  as super type '%s' with %" Pd " type args: %s\n"
               "  of mixin application alias '%s' %s\n",
               String::Handle(inserted_class.Name()).ToCString(),
@@ -2018,7 +2017,7 @@
   const Class& mixin_class = Class::Handle(mixin_type.type_class());
 
   if (FLAG_trace_class_finalization) {
-    OS::Print("Applying mixin type '%s' to %s at pos %" Pd "\n",
+    ISL_Print("Applying mixin type '%s' to %s at pos %" Pd "\n",
               String::Handle(mixin_type.Name()).ToCString(),
               mixin_app_class.ToCString(),
               mixin_app_class.token_pos());
@@ -2061,7 +2060,7 @@
   ResolveSuperTypeAndInterfaces(mixin_app_class, &visited_interfaces);
 
   if (FLAG_trace_class_finalization) {
-    OS::Print("Done applying mixin type '%s' to class '%s' %s extending '%s'\n",
+    ISL_Print("Done applying mixin type '%s' to class '%s' %s extending '%s'\n",
               String::Handle(mixin_type.Name()).ToCString(),
               String::Handle(mixin_app_class.Name()).ToCString(),
               TypeArguments::Handle(
@@ -2103,11 +2102,10 @@
       const String& ctor_name = String::Handle(func.name());
       String& clone_name = String::Handle(
           String::SubString(ctor_name, super_name.Length()));
-      clone_name = String::Concat(mixin_name, clone_name);
-      clone_name = Symbols::New(clone_name);
+      clone_name = Symbols::FromConcat(mixin_name, clone_name);
 
       if (FLAG_trace_class_finalization) {
-        OS::Print("Cloning constructor '%s' as '%s'\n",
+        ISL_Print("Cloning constructor '%s' as '%s'\n",
                   ctor_name.ToCString(),
                   clone_name.ToCString());
       }
@@ -2146,11 +2144,11 @@
 
 
 void ClassFinalizer::ApplyMixinMembers(const Class& cls) {
-  Isolate* isolate = Isolate::Current();
-  const Type& mixin_type = Type::Handle(isolate, cls.mixin());
+  Zone* zone = Thread::Current()->zone();
+  const Type& mixin_type = Type::Handle(zone, cls.mixin());
   ASSERT(!mixin_type.IsNull());
   ASSERT(mixin_type.HasResolvedTypeClass());
-  const Class& mixin_cls = Class::Handle(isolate, mixin_type.type_class());
+  const Class& mixin_cls = Class::Handle(zone, mixin_type.type_class());
   FinalizeClass(mixin_cls);
   // If the mixin is a mixin application alias class, there are no members to
   // apply here. A new synthesized class representing the aliased mixin
@@ -2158,23 +2156,23 @@
   // class. Members of the actual mixin class will be applied when visiting
   // the mixin application class referring to the actual mixin.
   ASSERT(!mixin_cls.is_mixin_app_alias() ||
-         Class::Handle(isolate, cls.SuperClass()).IsMixinApplication());
+         Class::Handle(zone, cls.SuperClass()).IsMixinApplication());
   // A default constructor will be created for the mixin app alias class.
 
   if (FLAG_trace_class_finalization) {
-    OS::Print("Applying mixin members of %s to %s at pos %" Pd "\n",
+    ISL_Print("Applying mixin members of %s to %s at pos %" Pd "\n",
               mixin_cls.ToCString(),
               cls.ToCString(),
               cls.token_pos());
   }
 
   const GrowableObjectArray& cloned_funcs =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+      GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
 
   CreateForwardingConstructors(cls, cloned_funcs);
 
-  Array& functions = Array::Handle(isolate);
-  Function& func = Function::Handle(isolate);
+  Array& functions = Array::Handle(zone);
+  Function& func = Function::Handle(zone);
   // The parser creates the mixin application class with no functions.
   ASSERT((functions = cls.functions(), functions.Length() == 0));
   // Now clone the functions from the mixin class.
@@ -2187,7 +2185,7 @@
       if (!func.IsImplicitConstructor()) {
         ReportError(cls, cls.token_pos(),
                     "mixin class '%s' must not have constructors\n",
-                    String::Handle(isolate, mixin_cls.Name()).ToCString());
+                    String::Handle(zone, mixin_cls.Name()).ToCString());
       }
       continue;  // Skip the implicit constructor.
     }
@@ -2205,24 +2203,23 @@
   // Now clone the fields from the mixin class. There should be no
   // existing fields in the mixin application class.
   ASSERT(Array::Handle(cls.fields()).Length() == 0);
-  const Array& fields = Array::Handle(isolate, mixin_cls.fields());
-  Field& field = Field::Handle(isolate);
-  const GrowableObjectArray& cloned_fields =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New());
+  const Array& fields = Array::Handle(zone, mixin_cls.fields());
   const intptr_t num_fields = fields.Length();
+  Field& field = Field::Handle(zone);
+  GrowableArray<const Field*> cloned_fields(num_fields);
   for (intptr_t i = 0; i < num_fields; i++) {
     field ^= fields.At(i);
     // Static fields are shared between the mixin class and the mixin
     // application class.
     if (!field.is_static()) {
-      field = field.Clone(cls);
-      cloned_fields.Add(field);
+      const Field& cloned = Field::ZoneHandle(zone, field.Clone(cls));
+      cloned_fields.Add(&cloned);
     }
   }
   cls.AddFields(cloned_fields);
 
   if (FLAG_trace_class_finalization) {
-    OS::Print("Done applying mixin members of %s to %s\n",
+    ISL_Print("Done applying mixin members of %s to %s\n",
               mixin_cls.ToCString(),
               cls.ToCString());
   }
@@ -2235,7 +2232,7 @@
     return;
   }
   if (FLAG_trace_class_finalization) {
-    OS::Print("Finalize types in %s\n", cls.ToCString());
+    ISL_Print("Finalize types in %s\n", cls.ToCString());
   }
   if (!IsSuperCycleFree(cls)) {
     const String& name = String::Handle(cls.Name());
@@ -2368,7 +2365,7 @@
     return;
   }
   if (FLAG_trace_class_finalization) {
-    OS::Print("Finalize %s\n", cls.ToCString());
+    ISL_Print("Finalize %s\n", cls.ToCString());
   }
   if (cls.is_patch()) {
     // The fields and functions of a patch class are copied to the
@@ -2741,7 +2738,7 @@
       // processed via the super_type chain of a pending class.
 
       if (FLAG_trace_class_finalization) {
-        OS::Print("Creating mixin application %s\n",
+        ISL_Print("Creating mixin application %s\n",
                   mixin_app_class.ToCString());
       }
     }
@@ -2762,7 +2759,7 @@
     }
   }
   if (FLAG_trace_class_finalization) {
-    OS::Print("ResolveMixinAppType: mixin appl type args: %s\n",
+    ISL_Print("ResolveMixinAppType: mixin appl type args: %s\n",
               mixin_app_args.ToCString());
   }
   // The mixin application class at depth k is a subclass of mixin application
@@ -2789,7 +2786,7 @@
   }
   ASSERT(visited != NULL);
   if (FLAG_trace_class_finalization) {
-    OS::Print("Resolving super and interfaces: %s\n", cls.ToCString());
+    ISL_Print("Resolving super and interfaces: %s\n", cls.ToCString());
   }
   Isolate* isolate = Isolate::Current();
   const intptr_t cls_index = cls.id();
@@ -2995,46 +2992,46 @@
 void ClassFinalizer::PrintClassInformation(const Class& cls) {
   HANDLESCOPE(Isolate::Current());
   const String& class_name = String::Handle(cls.Name());
-  OS::Print("class '%s'", class_name.ToCString());
+  ISL_Print("class '%s'", class_name.ToCString());
   const Library& library = Library::Handle(cls.library());
   if (!library.IsNull()) {
-    OS::Print(" library '%s%s':\n",
+    ISL_Print(" library '%s%s':\n",
               String::Handle(library.url()).ToCString(),
               String::Handle(library.private_key()).ToCString());
   } else {
-    OS::Print(" (null library):\n");
+    ISL_Print(" (null library):\n");
   }
   const AbstractType& super_type = AbstractType::Handle(cls.super_type());
   if (super_type.IsNull()) {
-    OS::Print("  Super: NULL");
+    ISL_Print("  Super: NULL");
   } else {
     const String& super_name = String::Handle(super_type.Name());
-    OS::Print("  Super: %s", super_name.ToCString());
+    ISL_Print("  Super: %s", super_name.ToCString());
   }
   const Array& interfaces_array = Array::Handle(cls.interfaces());
   if (interfaces_array.Length() > 0) {
-    OS::Print("; interfaces: ");
+    ISL_Print("; interfaces: ");
     AbstractType& interface = AbstractType::Handle();
     intptr_t len = interfaces_array.Length();
     for (intptr_t i = 0; i < len; i++) {
       interface ^= interfaces_array.At(i);
-      OS::Print("  %s ", interface.ToCString());
+      ISL_Print("  %s ", interface.ToCString());
     }
   }
-  OS::Print("\n");
+  ISL_Print("\n");
   const Array& functions_array = Array::Handle(cls.functions());
   Function& function = Function::Handle();
   intptr_t len = functions_array.Length();
   for (intptr_t i = 0; i < len; i++) {
     function ^= functions_array.At(i);
-    OS::Print("  %s\n", function.ToCString());
+    ISL_Print("  %s\n", function.ToCString());
   }
   const Array& fields_array = Array::Handle(cls.fields());
   Field& field = Field::Handle();
   len = fields_array.Length();
   for (intptr_t i = 0; i < len; i++) {
     field ^= fields_array.At(i);
-    OS::Print("  %s\n", field.ToCString());
+    ISL_Print("  %s\n", field.ToCString());
   }
 }
 
diff --git a/runtime/vm/class_finalizer.h b/runtime/vm/class_finalizer.h
index de8cdde..a43689f 100644
--- a/runtime/vm/class_finalizer.h
+++ b/runtime/vm/class_finalizer.h
@@ -7,23 +7,10 @@
 
 #include "vm/allocation.h"
 #include "vm/growable_array.h"
+#include "vm/object.h"
 
 namespace dart {
 
-class AbstractType;
-class Class;
-class Error;
-class Function;
-class GrowableObjectArray;
-class MixinAppType;
-class RawAbstractType;
-class RawClass;
-class RawType;
-class Script;
-class Type;
-class TypeArguments;
-class UnresolvedClass;
-
 // Traverses all pending, unfinalized classes, validates and marks them as
 // finalized.
 class ClassFinalizer : public AllStatic {
@@ -149,7 +136,7 @@
                                     intptr_t num_uninitialized_arguments,
                                     Error* bound_error,
                                     GrowableObjectArray* pending_types,
-                                    GrowableObjectArray* trail);
+                                    TrailPtr trail);
   static void CheckRecursiveType(const Class& cls,
                                  const Type& type,
                                  GrowableObjectArray* pending_types);
@@ -163,8 +150,9 @@
                                           const Function& function);
   static void ResolveAndFinalizeMemberTypes(const Class& cls);
   static void PrintClassInformation(const Class& cls);
-  static void CollectInterfaces(const Class& cls,
-                                const GrowableObjectArray& interfaces);
+  static void CollectInterfaces(
+      const Class& cls, GrowableArray<const Class*>* collected);
+
   static void MarkTypeMalformed(const Error& prev_error,
                                 const Script& script,
                                 const Type& type,
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index 9c760bb..2586a97 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -32,7 +32,6 @@
   test->node_sequence()->Add(new ReturnNode(kPos, l));
   parsed_function->SetNodeSequence(test->node_sequence());
   parsed_function->set_instantiator(NULL);
-  parsed_function->set_default_parameter_values(Object::null_array());
   parsed_function->EnsureExpressionTemp();
   test->node_sequence()->scope()->AddVariable(
       parsed_function->expression_temp_var());
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 5df3636..daa15fd 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -57,6 +57,7 @@
 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks.");
 
 DECLARE_FLAG(int, deoptimization_counter_threshold);
+DECLARE_FLAG(bool, trace_compiler);
 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
 
 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement.");
@@ -106,31 +107,38 @@
 // Return value: newly allocated array of length arg0.
 DEFINE_RUNTIME_ENTRY(AllocateArray, 2) {
   const Instance& length = Instance::CheckedHandle(arguments.ArgAt(0));
-  if (!length.IsSmi()) {
-    const String& error = String::Handle(String::NewFormatted(
-        "Length must be an integer in the range [0..%" Pd "].",
-        Array::kMaxElements));
-    Exceptions::ThrowArgumentError(error);
+  if (!length.IsInteger()) {
+    // Throw: new ArgumentError.value(length, "length", "is not an integer");
+    const Array& args = Array::Handle(Array::New(3));
+    args.SetAt(0, length);
+    args.SetAt(1, Symbols::Length());
+    args.SetAt(2, String::Handle(String::New("is not an integer")));
+    Exceptions::ThrowByType(Exceptions::kArgumentValue, args);
   }
-  const intptr_t len = Smi::Cast(length).Value();
-  if ((len < 0) || (len > Array::kMaxElements)) {
-    const String& error = String::Handle(String::NewFormatted(
-        "Length (%" Pd ") must be an integer in the range [0..%" Pd "].",
-        len, Array::kMaxElements));
-    Exceptions::ThrowArgumentError(error);
+  if (length.IsSmi()) {
+    const intptr_t len = Smi::Cast(length).Value();
+    if ((len >= 0) && (len <= Array::kMaxElements)) {
+      Heap::Space space = isolate->heap()->SpaceForAllocation(kArrayCid);
+      const Array& array = Array::Handle(Array::New(len, space));
+      arguments.SetReturn(array);
+      TypeArguments& element_type =
+          TypeArguments::CheckedHandle(arguments.ArgAt(1));
+      // An Array is raw or takes one type argument. However, its type argument
+      // vector may be longer than 1 due to a type optimization reusing the type
+      // argument vector of the instantiator.
+      ASSERT(element_type.IsNull() ||
+             ((element_type.Length() >= 1) && element_type.IsInstantiated()));
+      array.SetTypeArguments(element_type);  // May be null.
+      return;
+    }
   }
-
-  Heap::Space space = isolate->heap()->SpaceForAllocation(kArrayCid);
-  const Array& array = Array::Handle(Array::New(len, space));
-  arguments.SetReturn(array);
-  TypeArguments& element_type =
-      TypeArguments::CheckedHandle(arguments.ArgAt(1));
-  // An Array is raw or takes one type argument. However, its type argument
-  // vector may be longer than 1 due to a type optimization reusing the type
-  // argument vector of the instantiator.
-  ASSERT(element_type.IsNull() ||
-         ((element_type.Length() >= 1) && element_type.IsInstantiated()));
-  array.SetTypeArguments(element_type);  // May be null.
+  // Throw: new RangeError.range(length, 0, Array::kMaxElements, "length");
+  const Array& args = Array::Handle(Array::New(4));
+  args.SetAt(0, length);
+  args.SetAt(1, Integer::Handle(Integer::New(0)));
+  args.SetAt(2, Integer::Handle(Integer::New(Array::kMaxElements)));
+  args.SetAt(3, Symbols::Length());
+  Exceptions::ThrowByType(Exceptions::kRangeRange, args);
 }
 
 
@@ -1370,7 +1378,7 @@
     Debugger::SignalIsolateInterrupted();
 
     Dart_IsolateInterruptCallback callback = isolate->InterruptCallback();
-    if (callback) {
+    if (callback != NULL) {
       if ((*callback)()) {
         return;
       } else {
@@ -1466,6 +1474,12 @@
     // Reset usage counter for reoptimization before calling optimizer to
     // prevent recursive triggering of function optimization.
     function.set_usage_counter(0);
+    if (FLAG_trace_compiler) {
+      if (function.HasOptimizedCode()) {
+        ISL_Print("ReCompiling function: '%s' \n",
+                  function.ToFullyQualifiedCString());
+      }
+    }
     const Error& error = Error::Handle(
         isolate, Compiler::CompileOptimizedFunction(thread, function));
     if (!error.IsNull()) {
@@ -1680,9 +1694,10 @@
 // Returns the stack size of unoptimized frame.
 DEFINE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
                           1, uword saved_registers_address) {
-  Isolate* isolate = Isolate::Current();
-  StackZone zone(isolate);
-  HANDLESCOPE(isolate);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  StackZone zone(thread);
+  HANDLESCOPE(thread);
 
   // All registers have been saved below last-fp as if they were locals.
   const uword last_fp = saved_registers_address
@@ -1718,9 +1733,10 @@
 // The stack has been adjusted to fit all values for unoptimized frame.
 // Fill the unoptimized frame.
 DEFINE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, 1, uword last_fp) {
-  Isolate* isolate = Isolate::Current();
-  StackZone zone(isolate);
-  HANDLESCOPE(isolate);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  StackZone zone(thread);
+  HANDLESCOPE(thread);
 
   DeoptContext* deopt_context = isolate->deopt_context();
   DartFrameIterator iterator(last_fp);
@@ -1777,9 +1793,9 @@
                           2,
                           RawBigint* left,
                           RawBigint* right) {
-  Isolate* isolate = Isolate::Current();
-  StackZone zone(isolate);
-  HANDLESCOPE(isolate);
+  Thread* thread = Thread::Current();
+  StackZone zone(thread);
+  HANDLESCOPE(thread);
   const Bigint& big_left = Bigint::Handle(left);
   const Bigint& big_right = Bigint::Handle(right);
   return big_left.CompareWith(big_right);
diff --git a/runtime/vm/code_generator.h b/runtime/vm/code_generator.h
index 49a63f6..62e8e23 100644
--- a/runtime/vm/code_generator.h
+++ b/runtime/vm/code_generator.h
@@ -15,43 +15,6 @@
 class ICData;
 class Instance;
 
-// Declaration of runtime entries called from stub or generated code.
-DECLARE_RUNTIME_ENTRY(AllocateArray);
-DECLARE_RUNTIME_ENTRY(AllocateContext);
-DECLARE_RUNTIME_ENTRY(AllocateObject);
-DECLARE_RUNTIME_ENTRY(BreakpointRuntimeHandler);
-DECLARE_RUNTIME_ENTRY(SingleStepHandler);
-DECLARE_RUNTIME_ENTRY(CloneContext);
-DECLARE_RUNTIME_ENTRY(Deoptimize);
-DECLARE_RUNTIME_ENTRY(FixCallersTarget);
-DECLARE_RUNTIME_ENTRY(FixAllocationStubTarget);
-DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerOneArg);
-DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerTwoArgs);
-DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs);
-DECLARE_RUNTIME_ENTRY(StaticCallMissHandlerOneArg);
-DECLARE_RUNTIME_ENTRY(StaticCallMissHandlerTwoArgs);
-DECLARE_RUNTIME_ENTRY(Instanceof);
-DECLARE_RUNTIME_ENTRY(TypeCheck);
-DECLARE_RUNTIME_ENTRY(BadTypeError);
-DECLARE_RUNTIME_ENTRY(NonBoolTypeError);
-DECLARE_RUNTIME_ENTRY(InstantiateType);
-DECLARE_RUNTIME_ENTRY(InstantiateTypeArguments);
-DECLARE_RUNTIME_ENTRY(InvokeClosureNoSuchMethod);
-DECLARE_RUNTIME_ENTRY(InvokeNoSuchMethodDispatcher);
-DECLARE_RUNTIME_ENTRY(MegamorphicCacheMissHandler);
-DECLARE_RUNTIME_ENTRY(OptimizeInvokedFunction);
-DECLARE_RUNTIME_ENTRY(TraceICCall);
-DECLARE_RUNTIME_ENTRY(PatchStaticCall);
-DECLARE_RUNTIME_ENTRY(ReThrow);
-DECLARE_RUNTIME_ENTRY(StackOverflow);
-DECLARE_RUNTIME_ENTRY(Throw);
-DECLARE_RUNTIME_ENTRY(TraceFunctionEntry);
-DECLARE_RUNTIME_ENTRY(TraceFunctionExit);
-DECLARE_RUNTIME_ENTRY(DeoptimizeMaterialize);
-DECLARE_RUNTIME_ENTRY(UpdateFieldCid);
-DECLARE_RUNTIME_ENTRY(InitStaticField);
-DECLARE_RUNTIME_ENTRY(GrowRegExpStack);
-
 const char* DeoptReasonToCString(ICData::DeoptReasonId deopt_reason);
 
 void DeoptimizeAt(const Code& optimized_code, uword pc);
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index 90c1360..aac9311 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -209,8 +209,9 @@
   local_scope->InsertParameterAt(0, NewTestLocalVariable("a"));
   local_scope->InsertParameterAt(1, NewTestLocalVariable("b"));
   ASSERT(local_scope->num_variables() == num_params);
-  const Array& default_values = Array::ZoneHandle(Array::New(num_opt_params));
-  default_values.SetAt(0, Smi::ZoneHandle(Smi::New(1)));  // b = 1.
+  ZoneGrowableArray<const Instance*>* default_values =
+      new ZoneGrowableArray<const Instance*>(num_opt_params);
+  default_values->Add(&Smi::ZoneHandle(Smi::New(1)));  // b = 1.
   test->set_default_parameter_values(default_values);
   const Function& function = test->function();
   function.set_is_native(true);
@@ -383,10 +384,11 @@
   local_scope->InsertParameterAt(3, NewTestLocalVariable("d"));
   local_scope->InsertParameterAt(4, NewTestLocalVariable("e"));
   ASSERT(local_scope->num_variables() == num_params);
-  const Array& default_values = Array::ZoneHandle(Array::New(num_opt_params));
-  default_values.SetAt(0, Smi::ZoneHandle(Smi::New(10)));
-  default_values.SetAt(1, Smi::ZoneHandle(Smi::New(21)));
-  default_values.SetAt(2, Smi::ZoneHandle(Smi::New(-32)));
+  ZoneGrowableArray<const Instance*>* default_values =
+      new ZoneGrowableArray<const Instance*>(num_opt_params);
+  default_values->Add(&Smi::ZoneHandle(Smi::New(10)));
+  default_values->Add(&Smi::ZoneHandle(Smi::New(21)));
+  default_values->Add(&Smi::ZoneHandle(Smi::New(-32)));
   test->set_default_parameter_values(default_values);
   const Function& function = test->function();
   function.set_is_native(true);
diff --git a/runtime/vm/code_patcher.h b/runtime/vm/code_patcher.h
index f563426..57ee46a 100644
--- a/runtime/vm/code_patcher.h
+++ b/runtime/vm/code_patcher.h
@@ -7,6 +7,7 @@
 #define VM_CODE_PATCHER_H_
 
 #include "vm/allocation.h"
+#include "vm/native_entry.h"
 
 namespace dart {
 
@@ -88,11 +89,18 @@
 
   static RawObject* GetEdgeCounterAt(uword pc, const Code& code);
 
-  static int32_t GetPoolOffsetAt(uword return_address);
-  static void SetPoolOffsetAt(uword return_address, int32_t offset);
   static void PatchPoolPointerCallAt(uword return_address,
                                      const Code& code,
                                      uword new_target);
+
+  static uword GetNativeCallAt(uword return_address,
+                               const Code& code,
+                               NativeFunction* target);
+
+  static void PatchNativeCallAt(uword return_address,
+                                const Code& code,
+                                NativeFunction target,
+                                const Code& trampoline);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/code_patcher_arm.cc b/runtime/vm/code_patcher_arm.cc
index f443c13..49477c9 100644
--- a/runtime/vm/code_patcher_arm.cc
+++ b/runtime/vm/code_patcher_arm.cc
@@ -78,6 +78,27 @@
 }
 
 
+void CodePatcher::PatchNativeCallAt(uword return_address,
+                                    const Code& code,
+                                    NativeFunction target,
+                                    const Code& trampoline) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  call.set_target(trampoline.EntryPoint());
+  call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+                                   const Code& code,
+                                   NativeFunction* target) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  *target = call.native_function();
+  return call.target();
+}
+
+
 // This class pattern matches on a load from the object pool.  Loading on
 // ARM is complicated because it can take four possible different forms.  We
 // match backwards from the end of the sequence so we can reuse the code for
diff --git a/runtime/vm/code_patcher_arm64.cc b/runtime/vm/code_patcher_arm64.cc
index 7b0afef..3e10b5a 100644
--- a/runtime/vm/code_patcher_arm64.cc
+++ b/runtime/vm/code_patcher_arm64.cc
@@ -118,6 +118,27 @@
 }
 
 
+void CodePatcher::PatchNativeCallAt(uword return_address,
+                                    const Code& code,
+                                    NativeFunction target,
+                                    const Code& trampoline) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  call.set_target(trampoline.EntryPoint());
+  call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+                                   const Code& code,
+                                   NativeFunction* target) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  *target = call.native_function();
+  return call.target();
+}
+
+
 // This class pattern matches on a load from the object pool.  Loading on
 // ARM64 is complicated because it can take more than one form.  We
 // match backwards from the end of the sequence so we can reuse the code for
diff --git a/runtime/vm/code_patcher_ia32.cc b/runtime/vm/code_patcher_ia32.cc
index 08d95b4..95d64e0 100644
--- a/runtime/vm/code_patcher_ia32.cc
+++ b/runtime/vm/code_patcher_ia32.cc
@@ -44,6 +44,8 @@
   void set_target(uword target) const {
     uword* target_addr = reinterpret_cast<uword*>(call_address() + 1);
     uword offset = target - return_address();
+    WritableInstructionsScope writable(reinterpret_cast<uword>(target_addr),
+                                       sizeof(offset));
     *target_addr = offset;
     CPU::FlushICache(call_address(), kInstructionSize);
   }
@@ -64,11 +66,33 @@
     return start_ + 1 * kInstructionSize;
   }
 
+ protected:
   uword start_;
+
+ private:
   DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedCall);
 };
 
 
+class NativeCall : public UnoptimizedCall {
+ public:
+  explicit NativeCall(uword return_address) : UnoptimizedCall(return_address) {
+  }
+
+  NativeFunction native_function() const {
+    return *reinterpret_cast<NativeFunction*>(start_ + 1);
+  }
+
+  void set_native_function(NativeFunction func) const {
+    WritableInstructionsScope writable(start_ + 1, sizeof(func));
+    *reinterpret_cast<NativeFunction*>(start_ + 1) = func;
+  }
+
+ private:
+  DISALLOW_IMPLICIT_CONSTRUCTORS(NativeCall);
+};
+
+
 class InstanceCall : public UnoptimizedCall {
  public:
   explicit InstanceCall(uword return_address)
@@ -178,11 +202,11 @@
 
 void CodePatcher::InsertCallAt(uword start, uword target) {
   // The inserted call should not overlap the lazy deopt jump code.
-  ASSERT(start + CallPattern::InstructionLength() <= target);
+  ASSERT(start + CallPattern::pattern_length_in_bytes() <= target);
   *reinterpret_cast<uint8_t*>(start) = 0xE8;
   CallPattern call(start);
   call.SetTargetAddress(target);
-  CPU::FlushICache(start, CallPattern::InstructionLength());
+  CPU::FlushICache(start, CallPattern::pattern_length_in_bytes());
 }
 
 
@@ -210,6 +234,28 @@
 }
 
 
+void CodePatcher::PatchNativeCallAt(uword return_address,
+                                    const Code& code,
+                                    NativeFunction target,
+                                    const Code& trampoline) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCall call(return_address);
+  call.set_target(trampoline.EntryPoint());
+  call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+                                   const Code& code,
+                                   NativeFunction* target) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCall call(return_address);
+  *target = call.native_function();
+  return call.target();
+}
+
+
+
 intptr_t CodePatcher::InstanceCallSizeInBytes() {
   return InstanceCall::kNumInstructions * InstanceCall::kInstructionSize;
 }
diff --git a/runtime/vm/code_patcher_mips.cc b/runtime/vm/code_patcher_mips.cc
index 1794ab8..1014aed 100644
--- a/runtime/vm/code_patcher_mips.cc
+++ b/runtime/vm/code_patcher_mips.cc
@@ -77,6 +77,27 @@
 }
 
 
+void CodePatcher::PatchNativeCallAt(uword return_address,
+                                    const Code& code,
+                                    NativeFunction target,
+                                    const Code& trampoline) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  call.set_target(trampoline.EntryPoint());
+  call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+                                   const Code& code,
+                                   NativeFunction* target) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCallPattern call(return_address, code);
+  *target = call.native_function();
+  return call.target();
+}
+
+
 // This class pattern matches on a load from the object pool.  Loading on
 // MIPS is complicated because it can take four possible different forms.
 // We match backwards from the end of the sequence so we can reuse the code
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc
index 1f3f8e1..e9e678d 100644
--- a/runtime/vm/code_patcher_x64.cc
+++ b/runtime/vm/code_patcher_x64.cc
@@ -23,8 +23,8 @@
 class UnoptimizedCall : public ValueObject {
  public:
   UnoptimizedCall(uword return_address, const Code& code)
-      : start_(return_address - kCallPatternSize),
-        object_pool_(ObjectPool::Handle(code.GetObjectPool())) {
+      : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+        start_(return_address - kCallPatternSize) {
     ASSERT(IsValid(return_address));
     ASSERT((kCallPatternSize - 7) == Assembler::kCallExternalLabelSize);
   }
@@ -40,29 +40,55 @@
            (code_bytes[9] == 0x97);
   }
 
+  intptr_t argument_index() const {
+    return IndexFromPPLoad(start_ + 3);
+  }
+
   RawObject* ic_data() const {
-    intptr_t index = InstructionPattern::IndexFromPPLoad(start_ + 3);
-    return object_pool_.ObjectAt(index);
+    return object_pool_.ObjectAt(argument_index());
   }
 
   uword target() const {
-    intptr_t index = InstructionPattern::IndexFromPPLoad(start_ + 10);
+    intptr_t index = IndexFromPPLoad(start_ + 10);
     return object_pool_.RawValueAt(index);
   }
 
   void set_target(uword target) const {
-    intptr_t index = InstructionPattern::IndexFromPPLoad(start_ + 10);
+    intptr_t index = IndexFromPPLoad(start_ + 10);
     object_pool_.SetRawValueAt(index, target);
     // No need to flush the instruction cache, since the code is not modified.
   }
 
+ protected:
+  const ObjectPool& object_pool_;
+
  private:
   uword start_;
-  const ObjectPool& object_pool_;
   DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedCall);
 };
 
 
+class NativeCall : public UnoptimizedCall {
+ public:
+  NativeCall(uword return_address, const Code& code)
+      : UnoptimizedCall(return_address, code) {
+  }
+
+  NativeFunction native_function() const {
+    return reinterpret_cast<NativeFunction>(
+        object_pool_.RawValueAt(argument_index()));
+  }
+
+  void set_native_function(NativeFunction func) const {
+    object_pool_.SetRawValueAt(argument_index(),
+        reinterpret_cast<uword>(func));
+  }
+
+ private:
+  DISALLOW_IMPLICIT_CONSTRUCTORS(NativeCall);
+};
+
+
 class InstanceCall : public UnoptimizedCall {
  public:
   InstanceCall(uword return_address, const Code& code)
@@ -117,7 +143,7 @@
   }
 
   intptr_t pp_index() const {
-    return InstructionPattern::IndexFromPPLoad(start_ + 3);
+    return IndexFromPPLoad(start_ + 3);
   }
 
   uword Target() const {
@@ -190,11 +216,11 @@
 
 void CodePatcher::InsertCallAt(uword start, uword target) {
   // The inserted call should not overlap the lazy deopt jump code.
-  ASSERT(start + ShortCallPattern::InstructionLength() <= target);
+  ASSERT(start + ShortCallPattern::pattern_length_in_bytes() <= target);
   *reinterpret_cast<uint8_t*>(start) = 0xE8;
   ShortCallPattern call(start);
   call.SetTargetAddress(target);
-  CPU::FlushICache(start, ShortCallPattern::InstructionLength());
+  CPU::FlushICache(start, ShortCallPattern::pattern_length_in_bytes());
 }
 
 
@@ -211,6 +237,27 @@
 }
 
 
+void CodePatcher::PatchNativeCallAt(uword return_address,
+                                    const Code& code,
+                                    NativeFunction target,
+                                    const Code& trampoline) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCall call(return_address, code);
+  call.set_target(trampoline.EntryPoint());
+  call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+                                   const Code& code,
+                                   NativeFunction* target) {
+  ASSERT(code.ContainsInstructionAt(return_address));
+  NativeCall call(return_address, code);
+  *target = call.native_function();
+  return call.target();
+}
+
+
 // The expected code pattern of an edge counter in unoptimized code:
 //  49 8b 87 imm32    mov RAX, [PP + offset]
 class EdgeCounter : public ValueObject {
@@ -227,7 +274,7 @@
   }
 
   RawObject* edge_counter() const {
-    return object_pool_.ObjectAt(InstructionPattern::IndexFromPPLoad(end_ - 4));
+    return object_pool_.ObjectAt(IndexFromPPLoad(end_ - 4));
   }
 
  private:
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 001f980..4ba0378 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -187,8 +187,8 @@
 RawError* Compiler::Compile(const Library& library, const Script& script) {
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
-    Isolate* const isolate = Isolate::Current();
-    StackZone zone(isolate);
+    Thread* const thread = Thread::Current();
+    StackZone zone(thread);
     if (FLAG_trace_compiler) {
       const String& script_url = String::Handle(script.url());
       // TODO(iposva): Extract script kind.
@@ -199,8 +199,9 @@
     Parser::ParseCompilationUnit(library, script);
     return Error::null();
   } else {
-    Isolate* const isolate = Isolate::Current();
-    StackZone zone(isolate);
+    Thread* const thread = Thread::Current();
+    Isolate* const isolate = thread->isolate();
+    StackZone zone(thread);
     Error& error = Error::Handle();
     error = isolate->object_store()->sticky_error();
     isolate->object_store()->clear_sticky_error();
@@ -288,21 +289,22 @@
     }
   }
 
-  Isolate* const isolate = Isolate::Current();
+  Thread* const thread = Thread::Current();
+  Isolate* const isolate = thread->isolate();
   // We remember all the classes that are being compiled in these lists. This
   // also allows us to reset the marked_for_parsing state in case we see an
   // error.
-  VMTagScope tagScope(isolate, VMTag::kCompileClassTagId);
+  VMTagScope tagScope(thread, VMTag::kCompileClassTagId);
   Class& parse_class = Class::Handle(isolate);
   const GrowableObjectArray& parse_list =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New(4));
+      GrowableObjectArray::Handle(thread->zone(), GrowableObjectArray::New(4));
   const GrowableObjectArray& patch_list =
-      GrowableObjectArray::Handle(isolate, GrowableObjectArray::New(4));
+      GrowableObjectArray::Handle(thread->zone(), GrowableObjectArray::New(4));
 
   // Parse the class and all the interfaces it implements and super classes.
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
-    StackZone zone(isolate);
+    StackZone zone(thread);
     if (FLAG_trace_compiler) {
       ISL_Print("Compiling Class %s '%s'\n", "", cls.ToCString());
     }
@@ -367,8 +369,9 @@
         parse_class.reset_is_marked_for_parsing();
       }
     }
+    Thread* const thread = Thread::Current();
     Isolate* const isolate = Isolate::Current();
-    StackZone zone(isolate);
+    StackZone zone(thread);
     Error& error = Error::Handle(isolate);
     error = isolate->object_store()->sticky_error();
     isolate->object_store()->clear_sticky_error();
@@ -392,8 +395,8 @@
   Thread* const thread = Thread::Current();
   Zone* const zone = thread->zone();
   Isolate* const isolate = thread->isolate();
-  CSTAT_TIMER_SCOPE(isolate, codegen_timer);
-  HANDLESCOPE(isolate);
+  CSTAT_TIMER_SCOPE(thread, codegen_timer);
+  HANDLESCOPE(thread);
 
   // We may reattempt compilation if the function needs to be assembled using
   // far branches on ARM and MIPS. In the else branch of the setjmp call,
@@ -418,7 +421,7 @@
       // TimerScope needs an isolate to be properly terminated in case of a
       // LongJump.
       {
-        CSTAT_TIMER_SCOPE(isolate, graphbuilder_timer);
+        CSTAT_TIMER_SCOPE(thread, graphbuilder_timer);
         ZoneGrowableArray<const ICData*>* ic_data_array =
             new(zone) ZoneGrowableArray<const ICData*>();
         if (optimized) {
@@ -464,7 +467,7 @@
       }
 
       if (optimized) {
-        CSTAT_TIMER_SCOPE(isolate, ssa_timer);
+        CSTAT_TIMER_SCOPE(thread, ssa_timer);
         // Transform to SSA (virtual register 0 and no inlining arguments).
         flow_graph->ComputeSSA(0, NULL);
         DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -485,7 +488,7 @@
         inline_id_to_function.Add(&function);
         // Top scope function has no caller (-1).
         caller_inline_id.Add(-1);
-        CSTAT_TIMER_SCOPE(isolate, graphoptimizer_timer);
+        CSTAT_TIMER_SCOPE(thread, graphoptimizer_timer);
 
         FlowGraphOptimizer optimizer(flow_graph);
         if (Compiler::always_optimize()) {
@@ -503,7 +506,7 @@
 
         // Inlining (mutates the flow graph)
         if (FLAG_use_inlining) {
-          CSTAT_TIMER_SCOPE(isolate, graphinliner_timer);
+          CSTAT_TIMER_SCOPE(thread, graphinliner_timer);
           // Propagate types to create more inlining opportunities.
           FlowGraphTypePropagator::Propagate(flow_graph);
           DEBUG_ASSERT(flow_graph->VerifyUseLists());
@@ -717,16 +720,16 @@
                                        inline_id_to_function,
                                        caller_inline_id);
       {
-        CSTAT_TIMER_SCOPE(isolate, graphcompiler_timer);
+        CSTAT_TIMER_SCOPE(thread, graphcompiler_timer);
         graph_compiler.CompileGraph();
         pipeline->FinalizeCompilation();
       }
       {
-        CSTAT_TIMER_SCOPE(isolate, codefinalizer_timer);
+        CSTAT_TIMER_SCOPE(thread, codefinalizer_timer);
         // CreateDeoptInfo uses the object pool and needs to be done before
         // FinalizeCode.
         const Array& deopt_info_array =
-            Array::Handle(isolate, graph_compiler.CreateDeoptInfo(&assembler));
+            Array::Handle(zone, graph_compiler.CreateDeoptInfo(&assembler));
         INC_STAT(isolate, total_code_size,
                  deopt_info_array.Length() * sizeof(uword));
         const Code& code = Code::Handle(
@@ -739,13 +742,13 @@
         code.SetInlinedIntervals(intervals);
 
         const Array& inlined_id_array =
-            Array::Handle(isolate, graph_compiler.InliningIdToFunction());
+            Array::Handle(zone, graph_compiler.InliningIdToFunction());
         INC_STAT(isolate, total_code_size,
                  inlined_id_array.Length() * sizeof(uword));
         code.SetInlinedIdToFunction(inlined_id_array);
 
         const Array& caller_inlining_id_map_array =
-            Array::Handle(isolate, graph_compiler.CallerInliningIdMap());
+            Array::Handle(zone, graph_compiler.CallerInliningIdMap());
         INC_STAT(isolate, total_code_size,
                  caller_inlining_id_map_array.Length() * sizeof(uword));
         code.SetInlinedCallerIdMap(caller_inlining_id_map_array);
@@ -929,10 +932,13 @@
       } else if (kind == RawLocalVarDescriptors::kStackVar) {
         ISL_Print("  stack var '%s' offset %d",
           var_name.ToCString(), var_info.index());
-      } else {
-        ASSERT(kind == RawLocalVarDescriptors::kContextVar);
+      } else if (kind == RawLocalVarDescriptors::kContextVar) {
         ISL_Print("  context var '%s' level %d offset %d",
             var_name.ToCString(), var_info.scope_id, var_info.index());
+      } else {
+        ASSERT(kind == RawLocalVarDescriptors::kAsyncOperation);
+        ISL_Print("  async operation '%s' level %d offset %d",
+            var_name.ToCString(), var_info.scope_id, var_info.index());
       }
       ISL_Print(" (valid %d-%d)\n", var_info.begin_pos, var_info.end_pos);
     }
@@ -1019,9 +1025,9 @@
   if (setjmp(*jump.Set()) == 0) {
     Thread* const thread = Thread::Current();
     Isolate* const isolate = thread->isolate();
-    StackZone stack_zone(isolate);
+    StackZone stack_zone(thread);
     Zone* const zone = stack_zone.GetZone();
-    TIMERSCOPE(isolate, time_compilation);
+    TIMERSCOPE(thread, time_compilation);
     Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
     per_compile_timer.Start();
 
@@ -1047,7 +1053,7 @@
                 (function.end_token_pos() - function.token_pos()));
     }
     {
-      HANDLESCOPE(isolate);
+      HANDLESCOPE(thread);
       pipeline->ParseFunction(parsed_function);
     }
 
@@ -1101,7 +1107,7 @@
   } else {
     Thread* const thread = Thread::Current();
     Isolate* const isolate = thread->isolate();
-    StackZone stack_zone(isolate);
+    StackZone stack_zone(thread);
     Error& error = Error::Handle();
     // We got an error during compilation.
     error = isolate->object_store()->sticky_error();
@@ -1116,8 +1122,8 @@
 RawError* Compiler::CompileFunction(Thread* thread,
                                     const Function& function) {
   Isolate* isolate = thread->isolate();
-  VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId);
-  TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "Function", function);
+  VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
+  TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "Function", function);
 
   if (!isolate->compilation_allowed()) {
     FATAL3("Precompilation missed function %s (%" Pd ", %s)\n",
@@ -1138,7 +1144,7 @@
 
 
 RawError* Compiler::EnsureUnoptimizedCode(Thread* thread,
-                                     const Function& function) {
+                                          const Function& function) {
   if (function.unoptimized_code() != Object::null()) {
     return Error::null();
   }
@@ -1170,9 +1176,8 @@
 RawError* Compiler::CompileOptimizedFunction(Thread* thread,
                                              const Function& function,
                                              intptr_t osr_id) {
-  Isolate* isolate = thread->isolate();
-  VMTagScope tagScope(isolate, VMTag::kCompileOptimizedTagId);
-  TIMELINE_FUNCTION_COMPILATION_DURATION(isolate,
+  VMTagScope tagScope(thread, VMTag::kCompileOptimizedTagId);
+  TIMELINE_FUNCTION_COMPILATION_DURATION(thread,
                                          "OptimizedFunction", function);
 
   CompilationPipeline* pipeline =
@@ -1295,8 +1300,8 @@
     return;
   }
   ASSERT(field.initializer() == Function::null());
-  Isolate* isolate = Isolate::Current();
-  StackZone zone(isolate);
+  Thread* thread = Thread::Current();
+  StackZone zone(thread);
 
   ParsedFunction* parsed_function = Parser::ParseStaticFieldInitializer(field);
 
@@ -1327,8 +1332,8 @@
     // initializer has not yet been created, so create it now, but don't bother
     // remembering it because it won't be used again.
     if (initializer.IsNull()) {
-      Isolate* const isolate = Isolate::Current();
-      StackZone zone(isolate);
+      Thread* const thread = Thread::Current();
+      StackZone zone(thread);
       ParsedFunction* parsed_function =
           Parser::ParseStaticFieldInitializer(field);
 
@@ -1349,10 +1354,11 @@
         DartEntry::InvokeFunction(initializer, Object::empty_array()));
     return result.raw();
   } else {
-    Isolate* const isolate = Isolate::Current();
-    StackZone zone(isolate);
+    Thread* const thread = Thread::Current();
+    Isolate* const isolate = thread->isolate();
+    StackZone zone(thread);
     const Error& error =
-        Error::Handle(isolate, isolate->object_store()->sticky_error());
+        Error::Handle(thread->zone(), isolate->object_store()->sticky_error());
     isolate->object_store()->clear_sticky_error();
     return error.raw();
   }
@@ -1398,7 +1404,6 @@
     // here.
     ParsedFunction* parsed_function = new ParsedFunction(thread, func);
     parsed_function->SetNodeSequence(fragment);
-    parsed_function->set_default_parameter_values(Object::null_array());
     fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp());
     fragment->scope()->AddVariable(
         parsed_function->current_context_var());
diff --git a/runtime/vm/compiler.h b/runtime/vm/compiler.h
index 746d5d8..9dc11b8 100644
--- a/runtime/vm/compiler.h
+++ b/runtime/vm/compiler.h
@@ -20,8 +20,6 @@
 class Script;
 class SequenceNode;
 
-DECLARE_RUNTIME_ENTRY(CompileFunction);
-
 class Compiler : public AllStatic {
  public:
   // Extracts top level entities from the script and populates
diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc
index 2a03611..59d1dd4 100644
--- a/runtime/vm/compiler_stats.cc
+++ b/runtime/vm/compiler_stats.cc
@@ -73,6 +73,8 @@
       num_tokens_consumed(0),
       num_token_checks(0),
       num_tokens_lookahead(0),
+      num_cached_consts(0),
+      num_const_cache_hits(0),
       num_classes_compiled(0),
       num_functions_compiled(0),
       num_implicit_final_getters(0),
@@ -111,6 +113,8 @@
   OS::Print("Token lookahead:    %" Pd64 " (%" Pd64 "%% of tokens checked)\n",
             num_tokens_lookahead,
             (100 * num_tokens_lookahead) / num_token_checks);
+  OS::Print("Consts cached:      %" Pd64 "\n", num_cached_consts);
+  OS::Print("Consts cache hits:  %" Pd64 "\n", num_const_cache_hits);
 
   OS::Print("Classes parsed:     %" Pd64 "\n", num_classes_compiled);
   OS::Print("Functions compiled: %" Pd64 "\n", num_functions_compiled);
diff --git a/runtime/vm/compiler_stats.h b/runtime/vm/compiler_stats.h
index a9ea0f1..e6d4162 100644
--- a/runtime/vm/compiler_stats.h
+++ b/runtime/vm/compiler_stats.h
@@ -50,6 +50,8 @@
   int64_t num_tokens_consumed;
   int64_t num_token_checks;
   int64_t num_tokens_lookahead;
+  int64_t num_cached_consts;
+  int64_t num_const_cache_hits;
 
   int64_t num_classes_compiled;
   int64_t num_functions_compiled;
@@ -67,10 +69,10 @@
 #define INC_STAT(isolate, counter, incr)                                       \
   if (FLAG_compiler_stats) { (isolate)->compiler_stats()->counter += (incr); }
 
-#define CSTAT_TIMER_SCOPE(iso, t)                                              \
+#define CSTAT_TIMER_SCOPE(thr, t)                                              \
   TimerScope timer(FLAG_compiler_stats,                                        \
-  FLAG_compiler_stats ? &((iso)->compiler_stats()->t) : NULL,                  \
-  iso);
+      FLAG_compiler_stats ? &((thr)->isolate()->compiler_stats()->t) : NULL,   \
+      thr);
 
 }  // namespace dart
 
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index aa5b892..f6431d2 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -9,6 +9,7 @@
 #include "vm/dart_api_impl.h"
 #include "vm/object.h"
 #include "vm/symbols.h"
+#include "vm/thread_pool.h"
 #include "vm/unit_test.h"
 
 namespace dart {
@@ -69,6 +70,99 @@
 }
 
 
+class CompileFunctionTask : public ThreadPool::Task {
+ public:
+  CompileFunctionTask(Isolate* isolate,
+                      const Function& func,
+                      Monitor* done_monitor,
+                      bool* done)
+      : isolate_(isolate),
+        func_(func),
+        done_monitor_(done_monitor),
+        done_(done) {
+  }
+
+  virtual void Run() {
+    Thread::EnterIsolateAsHelper(isolate_);
+    {
+      Thread* thread = Thread::Current();
+      StackZone stack_zone(thread);
+      HANDLESCOPE(thread);
+      EXPECT(func_.HasCode());
+      EXPECT(!func_.HasOptimizedCode());
+      const Error& err =
+          Error::Handle(Compiler::CompileOptimizedFunction(thread, func_));
+      EXPECT(err.IsNull());
+      EXPECT(func_.HasOptimizedCode());
+    }
+    Thread::ExitIsolateAsHelper();
+    // Tell main thread that we are done.
+    {
+      MonitorLocker ml(done_monitor_);
+      ASSERT(!*done_);
+      *done_ = true;
+      ml.Notify();
+    }
+  }
+
+ private:
+  Isolate* isolate_;
+  const Function& func_;
+  Monitor* done_monitor_;
+  bool* done_;
+};
+
+
+TEST_CASE(CompileFunctionOnHelperThread) {
+  Monitor done_monitor;
+  bool done = false;
+  Isolate* isolate = Thread::Current()->isolate();
+  // Flush store buffers, etc.
+  // TODO(koda): Currently, the GC only does this for the current thread, (i.e,
+  // the helper, in this test), but it should be done for all *threads*
+  // after/at safepointing.
+  Thread::PrepareForGC();
+
+  // Create a simple function and compile it without optimization.
+  const char* kScriptChars =
+            "class A {\n"
+            "  static foo() { return 42; }\n"
+            "}\n";
+  String& url =
+      String::Handle(String::New("dart-test:CompileFunctionOnHelperThread"));
+  String& source = String::Handle(String::New(kScriptChars));
+  Script& script = Script::Handle(Script::New(url,
+                                              source,
+                                              RawScript::kScriptTag));
+  Library& lib = Library::Handle(Library::CoreLibrary());
+  EXPECT(CompilerTest::TestCompileScript(lib, script));
+  EXPECT(ClassFinalizer::ProcessPendingClasses());
+  Class& cls = Class::Handle(
+      lib.LookupClass(String::Handle(Symbols::New("A"))));
+  EXPECT(!cls.IsNull());
+  String& function_foo_name = String::Handle(String::New("foo"));
+  Function& func =
+      Function::Handle(cls.LookupStaticFunction(function_foo_name));
+  EXPECT(!func.HasCode());
+  CompilerTest::TestCompileFunction(func);
+  EXPECT(func.HasCode());
+  EXPECT(!func.HasOptimizedCode());
+
+  // Now optimize it on a helper thread.
+  Dart::thread_pool()->Run(
+      new CompileFunctionTask(isolate, func, &done_monitor, &done));
+  {
+    // Manually wait.
+    // TODO(koda): Replace with execution of Dart and/or VM code when GC
+    // actually safepoints everything.
+    MonitorLocker ml(&done_monitor);
+    while (!done) {
+      ml.Wait();
+    }
+  }
+}
+
+
 TEST_CASE(RegenerateAllocStubs) {
   const char* kScriptChars =
             "class A {\n"
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 8718c00..70b0504 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -28,16 +28,15 @@
 #include "vm/symbols.h"
 #include "vm/thread_interrupter.h"
 #include "vm/thread_pool.h"
-#include "vm/timeline.h"
 #include "vm/virtual_memory.h"
 #include "vm/zone.h"
 
 namespace dart {
 
-DEFINE_FLAG(bool, keep_code, false,
-            "Keep deoptimized code for profiling.");
 DECLARE_FLAG(bool, print_class_table);
 DECLARE_FLAG(bool, trace_isolates);
+DEFINE_FLAG(bool, keep_code, false,
+            "Keep deoptimized code for profiling.");
 
 Isolate* Dart::vm_isolate_ = NULL;
 ThreadPool* Dart::thread_pool_ = NULL;
@@ -69,6 +68,7 @@
 
 
 const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
+                           const uint8_t* instructions_snapshot,
                            Dart_IsolateCreateCallback create,
                            Dart_IsolateInterruptCallback interrupt,
                            Dart_IsolateUnhandledExceptionCallback unhandled,
@@ -87,6 +87,10 @@
   OS::InitOnce();
   VirtualMemory::InitOnce();
   Thread::InitOnceBeforeIsolate();
+  Timeline::InitOnce();
+  Thread::EnsureInit();
+  TimelineDurationScope tds(Timeline::GetVMStream(),
+                            "Dart::InitOnce");
   Isolate::InitOnce();
   PortMap::InitOnce();
   FreeListElement::InitOnce();
@@ -97,6 +101,7 @@
   SemiSpace::InitOnce();
   Metric::InitOnce();
   StoreBuffer::InitOnce();
+  Thread::EnsureInit();
 
 #if defined(USING_SIMULATOR)
   Simulator::InitOnce();
@@ -217,6 +222,8 @@
 
   Profiler::Shutdown();
   CodeObservers::DeleteAll();
+  Timeline::Shutdown();
+  Metric::Cleanup();
 
   return NULL;
 }
@@ -233,12 +240,24 @@
 
 RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
   // Initialize the new isolate.
-  Isolate* isolate = Isolate::Current();
-  TIMERSCOPE(isolate, time_isolate_initialization);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  TIMERSCOPE(thread, time_isolate_initialization);
+  TimelineDurationScope tds(isolate,
+                            isolate->GetIsolateStream(),
+                            "InitializeIsolate");
+  tds.SetNumArguments(1);
+  tds.CopyArgument(0, "isolateName", isolate->name());
+
   ASSERT(isolate != NULL);
   StackZone zone(isolate);
   HandleScope handle_scope(isolate);
-  ObjectStore::Init(isolate);
+  {
+    TimelineDurationScope tds(isolate,
+                              isolate->GetIsolateStream(),
+                              "ObjectStore::Init");
+    ObjectStore::Init(isolate);
+  }
 
   // Setup for profiling.
   Profiler::InitProfilingForIsolate(isolate);
@@ -249,7 +268,9 @@
   }
   if (snapshot_buffer != NULL) {
     // Read the snapshot and setup the initial state.
-
+    TimelineDurationScope tds(isolate,
+                              isolate->GetIsolateStream(),
+                              "IsolateSnapshotReader");
     // TODO(turnidge): Remove once length is not part of the snapshot.
     const Snapshot* snapshot = Snapshot::SetupFromBuffer(snapshot_buffer);
     if (snapshot == NULL) {
@@ -283,7 +304,13 @@
 
   Object::VerifyBuiltinVtables();
 
-  StubCode::Init(isolate);
+  {
+    TimelineDurationScope tds(isolate,
+                              isolate->GetIsolateStream(),
+                              "StubCode::Init");
+    StubCode::Init(isolate);
+  }
+
   isolate->megamorphic_cache_table()->InitMissHandler();
   if (snapshot_buffer == NULL) {
     if (!isolate->object_store()->PreallocateObjects()) {
@@ -310,8 +337,6 @@
   const UserTag& default_tag = UserTag::Handle(UserTag::DefaultTag());
   isolate->set_current_tag(default_tag);
 
-  isolate->SetTimelineEventRecorder(new TimelineEventRingRecorder());
-
   if (FLAG_keep_code) {
     isolate->set_deoptimized_code_array(
       GrowableObjectArray::Handle(GrowableObjectArray::New()));
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index be6db3b..e06ae4e 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -22,6 +22,7 @@
  public:
   static const char* InitOnce(
       const uint8_t* vm_isolate_snapshot,
+      const uint8_t* instructions_snapshot,
       Dart_IsolateCreateCallback create,
       Dart_IsolateInterruptCallback interrupt,
       Dart_IsolateUnhandledExceptionCallback unhandled,
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3ccb68b..151d669 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -36,6 +36,7 @@
 #include "vm/stack_frame.h"
 #include "vm/symbols.h"
 #include "vm/tags.h"
+#include "vm/thread_registry.h"
 #include "vm/timeline.h"
 #include "vm/timer.h"
 #include "vm/unicode.h"
@@ -1265,6 +1266,7 @@
 
 DART_EXPORT bool Dart_Initialize(
     const uint8_t* vm_isolate_snapshot,
+    const uint8_t* instructions_snapshot,
     Dart_IsolateCreateCallback create,
     Dart_IsolateInterruptCallback interrupt,
     Dart_IsolateUnhandledExceptionCallback unhandled,
@@ -1275,6 +1277,7 @@
     Dart_FileCloseCallback file_close,
     Dart_EntropySource entropy_source) {
   const char* err_msg = Dart::InitOnce(vm_isolate_snapshot,
+                                       instructions_snapshot,
                                        create, interrupt, unhandled, shutdown,
                                        file_open, file_read, file_write,
                                        file_close, entropy_source);
@@ -1509,9 +1512,10 @@
     uint8_t** isolate_snapshot_buffer,
     intptr_t* isolate_snapshot_size) {
   ASSERT(FLAG_load_deferred_eagerly);
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_creating_snapshot);
+  TIMERSCOPE(thread, time_creating_snapshot);
   if (vm_isolate_snapshot_buffer != NULL &&
       vm_isolate_snapshot_size == NULL) {
     RETURN_NULL_ERROR(vm_isolate_snapshot_size);
@@ -1537,7 +1541,8 @@
   isolate->object_store()->set_root_library(Library::Handle(isolate));
   FullSnapshotWriter writer(vm_isolate_snapshot_buffer,
                             isolate_snapshot_buffer,
-                            ApiReallocate);
+                            ApiReallocate,
+                            false /* snapshot_code */);
   writer.WriteFullSnapshot();
   *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
   *isolate_snapshot_size = writer.IsolateSnapshotSize();
@@ -1548,9 +1553,10 @@
 static Dart_Handle createLibrarySnapshot(Dart_Handle library,
                                          uint8_t** buffer,
                                          intptr_t* size) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_creating_snapshot);
+  TIMERSCOPE(thread, time_creating_snapshot);
   if (buffer == NULL) {
     RETURN_NULL_ERROR(buffer);
   }
@@ -1600,7 +1606,13 @@
   }
   // TODO(16615): Validate isolate parameter.
   Isolate* iso = reinterpret_cast<Isolate*>(isolate);
+  // Schedule the interrupt. The isolate will notice this bit being set if it
+  // is currently executing in Dart code.
   iso->ScheduleInterrupts(Isolate::kApiInterrupt);
+  // If the isolate is blocked on the message queue, we post a dummy message
+  // to the isolate's main port. The message will be ultimately ignored, but as
+  // part of handling the message the interrupt bit which was set above will be
+  // honored.
   // Can't use Dart_Post() since there isn't a current isolate.
   Dart_CObject api_null = { Dart_CObject_kNull , { 0 } };
   Dart_PostCObject(iso->main_port(), &api_null);
@@ -2742,6 +2754,68 @@
 }
 
 
+#define GET_LIST_RANGE(isolate, type, obj, offset, length)                     \
+  const type& array_obj = type::Cast(obj);                                     \
+  if ((offset >= 0) && (offset + length <= array_obj.Length())) {              \
+    for (intptr_t index = 0; index < length; ++index) {                        \
+      result[index] = Api::NewHandle(isolate, array_obj.At(index + offset));   \
+    }                                                                          \
+    return Api::Success();                                                     \
+  }                                                                            \
+  return Api::NewError("Invalid offset/length passed in to access list");      \
+
+
+DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list,
+                                          intptr_t offset,
+                                          intptr_t length,
+                                          Dart_Handle* result) {
+  Isolate* isolate = Isolate::Current();
+  DARTSCOPE(isolate);
+  if (result == NULL) {
+    RETURN_NULL_ERROR(result);
+  }
+  const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(list));
+  if (obj.IsArray()) {
+    GET_LIST_RANGE(isolate, Array, obj, offset, length);
+  } else if (obj.IsGrowableObjectArray()) {
+    GET_LIST_RANGE(isolate, GrowableObjectArray, obj, offset, length);
+  } else if (obj.IsError()) {
+    return list;
+  } else {
+    CHECK_CALLBACK_STATE(isolate);
+    // Check and handle a dart object that implements the List interface.
+    const Instance& instance =
+        Instance::Handle(isolate, GetListInstance(isolate, obj));
+    if (!instance.IsNull()) {
+      const intptr_t kNumArgs = 2;
+      ArgumentsDescriptor args_desc(
+          Array::Handle(ArgumentsDescriptor::New(kNumArgs)));
+      const Function& function = Function::Handle(
+          isolate,
+          Resolver::ResolveDynamic(instance,
+                                   Symbols::AssignIndexToken(),
+                                   args_desc));
+      if (!function.IsNull()) {
+        const Array& args = Array::Handle(Array::New(kNumArgs));
+        args.SetAt(0, instance);
+        Instance& index = Instance::Handle(isolate);
+        for (intptr_t i = 0; i < length; ++i) {
+          index = Integer::New(i);
+          args.SetAt(1, index);
+          Dart_Handle value = Api::NewHandle(isolate,
+              DartEntry::InvokeFunction(function, args));
+          if (::Dart_IsError(value))
+            return value;
+          result[i] = value;
+        }
+        return Api::Success();
+      }
+    }
+    return Api::NewError("Object does not implement the 'List' interface");
+  }
+}
+
+
 #define SET_LIST_ELEMENT(isolate, type, obj, index, value)                     \
   const type& array = type::Cast(obj);                                         \
   const Object& value_obj = Object::Handle(isolate, Api::UnwrapHandle(value)); \
@@ -4113,12 +4187,13 @@
                                     Dart_Handle name,
                                     int number_of_arguments,
                                     Dart_Handle* arguments) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
   CHECK_CALLBACK_STATE(isolate);
   // TODO(turnidge): This is a bit simplistic.  It overcounts when
   // other operations (gc, compilation) are active.
-  TIMERSCOPE(isolate, time_dart_execution);
+  TIMERSCOPE(thread, time_dart_execution);
 
   const String& function_name = Api::UnwrapStringHandle(isolate, name);
   if (function_name.IsNull()) {
@@ -5123,7 +5198,7 @@
     *result = Api::NewHandle(isolate, error.raw());
     // Compilation errors are not Dart instances, so just mark the library
     // as having failed to load without providing an error instance.
-    lib.SetLoadError(Instance::Handle());
+    lib.SetLoadError(Object::null_instance());
   }
 }
 
@@ -5132,9 +5207,10 @@
                                         Dart_Handle source,
                                         intptr_t line_offset,
                                         intptr_t column_offset) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_script_loading);
+  TIMERSCOPE(thread, time_script_loading);
   const String& url_str = Api::UnwrapStringHandle(isolate, url);
   if (url_str.IsNull()) {
     RETURN_TYPE_ERROR(isolate, url, String);
@@ -5178,9 +5254,10 @@
 
 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer,
                                                     intptr_t buffer_len) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_script_loading);
+  TIMERSCOPE(thread, time_script_loading);
   StackZone zone(isolate);
   if (buffer == NULL) {
     RETURN_NULL_ERROR(buffer);
@@ -5391,9 +5468,10 @@
                                          Dart_Handle source,
                                          intptr_t line_offset,
                                          intptr_t column_offset) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_script_loading);
+  TIMERSCOPE(thread, time_script_loading);
   const String& url_str = Api::UnwrapStringHandle(isolate, url);
   if (url_str.IsNull()) {
     RETURN_TYPE_ERROR(isolate, url, String);
@@ -5497,9 +5575,10 @@
                                         Dart_Handle source,
                                         intptr_t line_offset,
                                         intptr_t column_offset) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_script_loading);
+  TIMERSCOPE(thread, time_script_loading);
   const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
   if (lib.IsNull()) {
     RETURN_TYPE_ERROR(isolate, library, Library);
@@ -5536,9 +5615,10 @@
 DART_EXPORT Dart_Handle Dart_LibraryLoadPatch(Dart_Handle library,
                                               Dart_Handle url,
                                               Dart_Handle patch_source) {
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   DARTSCOPE(isolate);
-  TIMERSCOPE(isolate, time_script_loading);
+  TIMERSCOPE(thread, time_script_loading);
   const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
   if (lib.IsNull()) {
     RETURN_TYPE_ERROR(isolate, library, Library);
@@ -5768,6 +5848,96 @@
 }
 
 
+DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) {
+  Isolate* isolate = Isolate::Current();
+  CHECK_ISOLATE(isolate);
+  isolate->GetAPIStream()->set_enabled(
+      (stream_mask & DART_TIMELINE_STREAM_API) != 0);
+  isolate->GetCompilerStream()->set_enabled(
+      (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0);
+  isolate->GetEmbedderStream()->set_enabled(
+      (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0);
+  isolate->GetGCStream()->set_enabled(
+      (stream_mask & DART_TIMELINE_STREAM_GC) != 0);
+  isolate->GetIsolateStream()->set_enabled(
+      (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0);
+}
+
+
+DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
+                                       void* user_data) {
+  Isolate* isolate = Isolate::Current();
+  CHECK_ISOLATE(isolate);
+  if (consumer == NULL) {
+    return false;
+  }
+  TimelineEventRecorder* timeline_recorder = Timeline::recorder();
+  if (timeline_recorder == NULL) {
+    // Nothing has been recorded.
+    return false;
+  }
+  // Suspend execution of other threads while serializing to JSON.
+  isolate->thread_registry()->SafepointThreads();
+  JSONStream js;
+  IsolateTimelineEventFilter filter(isolate);
+  timeline_recorder->PrintJSON(&js, &filter);
+  // Resume execution of other threads.
+  isolate->thread_registry()->ResumeAllThreads();
+
+  // Copy output.
+  char* output = NULL;
+  intptr_t output_length = 0;
+  js.Steal(const_cast<const char**>(&output), &output_length);
+  if (output != NULL) {
+    // Add one for the '\0' character.
+    output_length++;
+  }
+  // Start stream.
+  const char* kStreamName = "timeline";
+  const intptr_t kDataSize = 64 * KB;
+  consumer(Dart_StreamConsumer_kStart,
+           kStreamName,
+           NULL,
+           0,
+           user_data);
+
+  // Stream out data.
+  intptr_t cursor = 0;
+  intptr_t remaining = output_length;
+  while (remaining >= kDataSize) {
+    consumer(Dart_StreamConsumer_kData,
+             kStreamName,
+             reinterpret_cast<uint8_t*>(&output[cursor]),
+             kDataSize,
+             user_data);
+    cursor += kDataSize;
+    remaining -= kDataSize;
+  }
+  if (remaining > 0) {
+    ASSERT(remaining < kDataSize);
+    consumer(Dart_StreamConsumer_kData,
+             kStreamName,
+             reinterpret_cast<uint8_t*>(&output[cursor]),
+             remaining,
+             user_data);
+    cursor += remaining;
+    remaining -= remaining;
+  }
+  ASSERT(cursor == output_length);
+  ASSERT(remaining == 0);
+  // We stole the JSONStream's output buffer, free it.
+  free(output);
+
+  // Finish stream.
+  consumer(Dart_StreamConsumer_kFinish,
+           kStreamName,
+           NULL,
+           0,
+           user_data);
+  return true;
+}
+
+
 DART_EXPORT Dart_Handle Dart_TimelineDuration(const char* label,
                                               int64_t start_micros,
                                               int64_t end_micros) {
@@ -5823,7 +5993,10 @@
   ASSERT(stream != NULL);
   TimelineEvent* event = stream->StartEvent();
   if (event != NULL) {
-    *async_id = event->AsyncBegin(label);
+    TimelineEventRecorder* recorder = Timeline::recorder();
+    ASSERT(recorder != NULL);
+    *async_id = recorder->GetNextAsyncId();
+    event->AsyncBegin(label, *async_id);
     event->Complete();
   }
   return Api::Success();
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index 46653c8..70d59d9 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1368,6 +1368,28 @@
   result = Dart_ListGetAt(list_access_test_obj, 4);
   EXPECT(Dart_IsError(result));
 
+  // Check if we can get a range of values.
+  result = Dart_ListGetRange(list_access_test_obj, 8, 4, NULL);
+  EXPECT(Dart_IsError(result));
+  const int kRangeOffset = 1;
+  const int kRangeLength = 2;
+  Dart_Handle values[kRangeLength];
+
+  result = Dart_ListGetRange(list_access_test_obj, 8, 4, values);
+  EXPECT(Dart_IsError(result));
+
+  result = Dart_ListGetRange(
+      list_access_test_obj, kRangeOffset, kRangeLength, values);
+  EXPECT_VALID(result);
+
+  result = Dart_IntegerToInt64(values[0], &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(20, value);
+
+  result = Dart_IntegerToInt64(values[1], &value);
+  EXPECT_VALID(result);
+  EXPECT_EQ(30, value);
+
   // Check that we get an exception (and not a fatal error) when
   // calling ListSetAt and ListSetAsBytes with an immutable list.
   list_access_test_obj = Dart_Invoke(lib, NewString("immutable"), 0, NULL);
@@ -3145,6 +3167,47 @@
 }
 
 
+TEST_CASE(DuplicateWeakReferenceSetEntries) {
+  Isolate* isolate = Isolate::Current();
+  Dart_PersistentHandle strong = NULL;
+  Dart_WeakPersistentHandle weak = NULL;  // A weak handle to strong.
+
+  Dart_EnterScope();
+  {
+    DARTSCOPE(isolate);
+
+    // Strong handle to keep the reference set alive.
+    Dart_Handle local = Api::NewHandle(isolate, String::New("string"));
+    strong = Dart_NewPersistentHandle(local);
+    EXPECT_VALID(AsHandle(strong));
+    EXPECT(!Dart_IsNull(AsHandle(strong)));
+    // Corresponding weak handle to use as key and duplicated value.
+    weak = Dart_NewWeakPersistentHandle(local, NULL, 0, NopCallback);
+    EXPECT_VALID(AsHandle(weak));
+    EXPECT(!Dart_IsNull(AsHandle(weak)));
+  }
+  Dart_ExitScope();
+
+  {
+    Dart_EnterScope();
+    // Create the weak reference set.
+    Dart_WeakReferenceSetBuilder builder = Dart_NewWeakReferenceSetBuilder();
+    EXPECT_NOTNULL(builder);
+    // Register the key and the first copy of the value.
+    Dart_WeakReferenceSet set = Dart_NewWeakReferenceSet(builder, weak, weak);
+    EXPECT_NOTNULL(set);
+    // Add the second copy of the value.
+    Dart_Handle result = Dart_AppendValueToWeakReferenceSet(set, weak);
+    EXPECT_VALID(result);
+
+    // Trigger GC to ensure that we can visit duplicate entries in weak
+    // reference sets.
+    isolate->heap()->CollectGarbage(Heap::kNew);
+    Dart_ExitScope();
+  }
+}
+
+
 static Dart_WeakPersistentHandle old_pwph = NULL;
 static Dart_WeakPersistentHandle new_pwph = NULL;
 
@@ -3917,7 +3980,7 @@
 }
 
 
-TEST_CASE(TypeGetParamterizedTypes) {
+TEST_CASE(TypeGetParameterizedTypes) {
   const char* kScriptChars =
       "class MyClass0<A, B> {\n"
       "}\n"
@@ -9216,9 +9279,10 @@
   // Add a duration event.
   Dart_TimelineDuration("testDurationEvent", 0, 1);
   // Check that it is in the output.
-  TimelineEventRecorder* recorder = isolate->timeline_event_recorder();
+  TimelineEventRecorder* recorder = Timeline::recorder();
   JSONStream js;
-  recorder->PrintJSON(&js);
+  IsolateTimelineEventFilter filter(isolate);
+  recorder->PrintJSON(&js, &filter);
   EXPECT_SUBSTRING("testDurationEvent", js.ToCString());
 }
 
@@ -9231,9 +9295,10 @@
   stream->set_enabled(true);
   Dart_TimelineInstant("testInstantEvent");
   // Check that it is in the output.
-  TimelineEventRecorder* recorder = isolate->timeline_event_recorder();
+  TimelineEventRecorder* recorder = Timeline::recorder();
   JSONStream js;
-  recorder->PrintJSON(&js);
+  IsolateTimelineEventFilter filter(isolate);
+  recorder->PrintJSON(&js, &filter);
   EXPECT_SUBSTRING("testInstantEvent", js.ToCString());
 }
 
@@ -9251,9 +9316,10 @@
   // Call Dart_TimelineAsyncEnd with a negative async_id.
   Dart_TimelineAsyncEnd("testAsyncEvent", async_id);
   // Check that testAsync is not in the output.
-  TimelineEventRecorder* recorder = isolate->timeline_event_recorder();
+  TimelineEventRecorder* recorder = Timeline::recorder();
   JSONStream js;
-  recorder->PrintJSON(&js);
+  TimelineEventFilter filter;
+  recorder->PrintJSON(&js, &filter);
   EXPECT_NOTSUBSTRING("testAsyncEvent", js.ToCString());
 }
 
@@ -9272,10 +9338,87 @@
   Dart_TimelineAsyncEnd("testAsyncEvent", async_id);
 
   // Check that it is in the output.
-  TimelineEventRecorder* recorder = isolate->timeline_event_recorder();
+  TimelineEventRecorder* recorder = Timeline::recorder();
   JSONStream js;
-  recorder->PrintJSON(&js);
+  IsolateTimelineEventFilter filter(isolate);
+  recorder->PrintJSON(&js, &filter);
   EXPECT_SUBSTRING("testAsyncEvent", js.ToCString());
 }
 
+
+struct AppendData {
+  uint8_t* buffer;
+  intptr_t buffer_length;
+};
+
+
+static void AppendStreamConsumer(Dart_StreamConsumer_State state,
+                                 const char* stream_name,
+                                 uint8_t* buffer,
+                                 intptr_t buffer_length,
+                                 void* user_data) {
+  if (state == Dart_StreamConsumer_kFinish) {
+    return;
+  }
+  AppendData* data = reinterpret_cast<AppendData*>(user_data);
+  if (state == Dart_StreamConsumer_kStart) {
+    // Initialize append data.
+    data->buffer = NULL;
+    data->buffer_length = 0;
+    return;
+  }
+  ASSERT(state == Dart_StreamConsumer_kData);
+  // Grow buffer.
+  data->buffer = reinterpret_cast<uint8_t*>(
+      realloc(data->buffer, data->buffer_length + buffer_length));
+  // Copy new data.
+  memmove(&data->buffer[data->buffer_length],
+          buffer,
+          buffer_length);
+  // Update length.
+  data->buffer_length += buffer_length;
+}
+
+
+TEST_CASE(Timeline_Dart_TimelineGetTrace) {
+  const char* kScriptChars =
+    "foo() => 'a';\n"
+    "main() => foo();\n";
+
+  Dart_Handle lib =
+      TestCase::LoadTestScript(kScriptChars, NULL);
+
+  const char* buffer = NULL;
+  intptr_t buffer_length = 0;
+  bool success = false;
+
+  // Enable recording of all streams.
+  Dart_TimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL);
+
+  // Invoke main, which will be compiled resulting in a compiler event in
+  // the timeline.
+  Dart_Handle result = Dart_Invoke(lib,
+                                   NewString("main"),
+                                   0,
+                                   NULL);
+  EXPECT_VALID(result);
+
+  // Grab the trace.
+  AppendData data;
+  success = Dart_TimelineGetTrace(AppendStreamConsumer, &data);
+  EXPECT(success);
+  buffer = reinterpret_cast<char*>(data.buffer);
+  buffer_length = data.buffer_length;
+  EXPECT(buffer_length > 0);
+  EXPECT(buffer != NULL);
+
+  // Heartbeat test.
+  EXPECT_SUBSTRING("\"cat\":\"Compiler\"", buffer);
+  EXPECT_SUBSTRING("\"name\":\"CompileFunction\"", buffer);
+  EXPECT_SUBSTRING("\"function\":\"::_main\"", buffer);
+
+  // Free buffer allocated by AppendStreamConsumer
+  free(data.buffer);
+}
+
 }  // namespace dart
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
index 69fb891..d9debad 100644
--- a/runtime/vm/dart_api_message.cc
+++ b/runtime/vm/dart_api_message.cc
@@ -12,14 +12,16 @@
 
 static const int kNumInitialReferences = 4;
 
-ApiMessageReader::ApiMessageReader(const uint8_t* buffer,
-                                   intptr_t length,
-                                   ReAlloc alloc)
+ApiMessageReader::ApiMessageReader(const uint8_t* buffer, intptr_t length)
     : BaseReader(buffer, length),
-      alloc_(alloc),
+      zone_(NULL),
       backward_references_(kNumInitialReferences),
       vm_isolate_references_(kNumInitialReferences),
       vm_symbol_references_(NULL) {
+  // We need to have an enclosing ApiNativeScope.
+  ASSERT(ApiNativeScope::Current() != NULL);
+  zone_ = ApiNativeScope::Current()->zone();
+  ASSERT(zone_ != NULL);
   Init();
 }
 
@@ -54,7 +56,7 @@
 
 Dart_CObject* ApiMessageReader::AllocateDartCObject(Dart_CObject_Type type) {
   Dart_CObject* value =
-      reinterpret_cast<Dart_CObject*>(alloc_(NULL, 0, sizeof(Dart_CObject)));
+      reinterpret_cast<Dart_CObject*>(allocator(sizeof(Dart_CObject)));
   ASSERT(value != NULL);
   value->type = type;
   return value;
@@ -121,7 +123,7 @@
   // up to this area.
   Dart_CObject* value =
       reinterpret_cast<Dart_CObject*>(
-          alloc_(NULL, 0, sizeof(Dart_CObject) + length + 1));
+          allocator(sizeof(Dart_CObject) + length + 1));
   ASSERT(value != NULL);
   value->value.as_string = reinterpret_cast<char*>(value) + sizeof(*value);
   value->type = Dart_CObject_kString;
@@ -162,7 +164,7 @@
   intptr_t length_in_bytes = GetTypedDataSizeInBytes(type) * length;
   Dart_CObject* value =
       reinterpret_cast<Dart_CObject*>(
-          alloc_(NULL, 0, sizeof(Dart_CObject) + length_in_bytes));
+          allocator(sizeof(Dart_CObject) + length_in_bytes));
   ASSERT(value != NULL);
   value->type = Dart_CObject_kTypedData;
   value->value.as_typed_data.type = type;
@@ -183,7 +185,7 @@
   // content is set up to this area.
   Dart_CObject* value =
       reinterpret_cast<Dart_CObject*>(
-          alloc_(NULL, 0, sizeof(Dart_CObject) + length * sizeof(value)));
+          allocator(sizeof(Dart_CObject) + length * sizeof(value)));
   ASSERT(value != NULL);
   value->type = Dart_CObject_kArray;
   value->value.as_array.length = length;
@@ -239,7 +241,7 @@
     Dart_CObject_Internal::Type type) {
   Dart_CObject_Internal* value =
       reinterpret_cast<Dart_CObject_Internal*>(
-          alloc_(NULL, 0, sizeof(Dart_CObject_Internal)));
+          allocator(sizeof(Dart_CObject_Internal)));
   ASSERT(value != NULL);
   value->type = static_cast<Dart_CObject_Type>(type);
   return value;
@@ -255,7 +257,7 @@
     Dart_CObject* reference,
     DeserializeState state) {
   BackRefNode* value =
-      reinterpret_cast<BackRefNode*>(alloc_(NULL, 0, sizeof(BackRefNode)));
+      reinterpret_cast<BackRefNode*>(allocator(sizeof(BackRefNode)));
   value->set_reference(reference);
   value->set_state(state);
   return value;
@@ -405,7 +407,7 @@
     intptr_t size =
         (sizeof(*vm_symbol_references_) * Symbols::kMaxPredefinedId);
     vm_symbol_references_ =
-        reinterpret_cast<Dart_CObject**>(alloc_(NULL, 0, size));
+        reinterpret_cast<Dart_CObject**>(allocator(size));
     memset(vm_symbol_references_, 0, size);
   }
 
@@ -621,7 +623,7 @@
       intptr_t hash = ReadSmiValue();
       USE(hash);
       uint8_t *latin1 =
-          reinterpret_cast<uint8_t*>(::malloc(len * sizeof(uint8_t)));
+          reinterpret_cast<uint8_t*>(allocator(len * sizeof(uint8_t)));
       intptr_t utf8_len = 0;
       for (intptr_t i = 0; i < len; i++) {
         latin1[i] = Read<uint8_t>();
@@ -635,15 +637,14 @@
       }
       *p = '\0';
       ASSERT(p == (object->value.as_string + utf8_len));
-      ::free(latin1);
       return object;
     }
     case kTwoByteStringCid: {
       intptr_t len = ReadSmiValue();
       intptr_t hash = ReadSmiValue();
       USE(hash);
-      uint16_t *utf16 =
-          reinterpret_cast<uint16_t*>(::malloc(len * sizeof(uint16_t)));
+      uint16_t *utf16 = reinterpret_cast<uint16_t*>(
+          allocator(len * sizeof(uint16_t)));
       intptr_t utf8_len = 0;
       // Read all the UTF-16 code units.
       for (intptr_t i = 0; i < len; i++) {
@@ -670,7 +671,6 @@
       }
       *p = '\0';
       ASSERT(p == (object->value.as_string + utf8_len));
-      ::free(utf16);
       return object;
     }
     case kSendPortCid: {
diff --git a/runtime/vm/dart_api_message.h b/runtime/vm/dart_api_message.h
index 70d55f9..16a138b 100644
--- a/runtime/vm/dart_api_message.h
+++ b/runtime/vm/dart_api_message.h
@@ -41,14 +41,10 @@
 // Reads a message snapshot into a C structure.
 class ApiMessageReader : public BaseReader {
  public:
-  // The allocator passed is used to allocate memory for the C structure used
-  // to represent the message snapshot. This allocator must keep track of the
-  // memory allocated as there is no way to run through the resulting C
-  // structure and free the individual pieces. Using a zone based allocator is
-  // recommended.
-  ApiMessageReader(const uint8_t* buffer,
-                   intptr_t length,
-                   ReAlloc alloc);
+  // The ApiMessageReader object must be enclosed by an ApiNativeScope.
+  // Allocation of all C Heap objects is done in the zone associated with
+  // the enclosing ApiNativeScope.
+  ApiMessageReader(const uint8_t* buffer, intptr_t length);
   ~ApiMessageReader() { }
 
   Dart_CObject* ReadMessage();
@@ -139,10 +135,11 @@
   Dart_CObject* GetCanonicalMintObject(Dart_CObject_Type type,
                                        int64_t value64);
 
-  // Allocation of the structures for the decoded message happens
-  // either in the supplied zone or using the supplied allocation
-  // function.
-  ReAlloc alloc_;
+  uint8_t* allocator(intptr_t size) {
+    return zone_->Realloc<uint8_t>(NULL, 0, size);
+  }
+
+  Zone* zone_;  // Zone in which C heap objects are allocated.
   ApiGrowableArray<BackRefNode*> backward_references_;
   ApiGrowableArray<Dart_CObject*> vm_isolate_references_;
   Dart_CObject** vm_symbol_references_;
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 211ce7f..1053404 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -55,19 +55,19 @@
 };
 
 
-// Clears/restores Isolate::long_jump_base on construction/destruction.
+// Clears/restores Thread::long_jump_base on construction/destruction.
 // Ensures that we do not attempt to long jump across Dart frames.
 class SuspendLongJumpScope : public StackResource {
  public:
-  explicit SuspendLongJumpScope(Isolate* isolate)
-      : StackResource(isolate),
-        saved_long_jump_base_(isolate->long_jump_base()) {
-    isolate->set_long_jump_base(NULL);
+  explicit SuspendLongJumpScope(Thread* thread)
+      : StackResource(thread),
+        saved_long_jump_base_(thread->long_jump_base()) {
+    thread->set_long_jump_base(NULL);
   }
 
   ~SuspendLongJumpScope() {
-    ASSERT(isolate()->long_jump_base() == NULL);
-    isolate()->set_long_jump_base(saved_long_jump_base_);
+    ASSERT(thread()->long_jump_base() == NULL);
+    thread()->set_long_jump_base(saved_long_jump_base_);
   }
 
  private:
@@ -98,7 +98,7 @@
   ASSERT(!code.IsNull());
   ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
   ScopedIsolateStackLimits stack_limit(isolate);
-  SuspendLongJumpScope suspend_long_jump_scope(isolate);
+  SuspendLongJumpScope suspend_long_jump_scope(thread);
 #if defined(USING_SIMULATOR)
 #if defined(ARCH_IS_64_BIT)
   // TODO(zra): Change to intptr_t so we have only one case.
@@ -558,6 +558,20 @@
 }
 
 
+RawObject* DartLibraryCalls::DrainMicrotaskQueue() {
+  Isolate* isolate = Isolate::Current();
+  Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary());
+  ASSERT(!isolate_lib.IsNull());
+  Function& function = Function::Handle(isolate,
+      isolate_lib.LookupFunctionAllowPrivate(
+          Symbols::_runPendingImmediateCallback()));
+  const Object& result = Object::Handle(isolate,
+      DartEntry::InvokeFunction(function, Object::empty_array()));
+  ASSERT(result.IsNull() || result.IsError());
+  return result.raw();
+}
+
+
 RawObject* DartLibraryCalls::MapSetAt(const Instance& map,
                                       const Instance& key,
                                       const Instance& value) {
diff --git a/runtime/vm/dart_entry.h b/runtime/vm/dart_entry.h
index f88a416..9a5b92f 100644
--- a/runtime/vm/dart_entry.h
+++ b/runtime/vm/dart_entry.h
@@ -163,6 +163,9 @@
   static RawObject* HandleMessage(const Object& handler,
                                   const Instance& dart_message);
 
+  // Returns null on success, a RawError on failure.
+  static RawObject* DrainMicrotaskQueue();
+
   // map[key] = value;
   //
   // Returns null on success, a RawError on failure.
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 5573f4b..0cd16d8 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -234,6 +234,11 @@
 }
 
 
+void DebuggerEvent::UpdateTimestamp() {
+  timestamp_ = OS::GetCurrentTimeMillis();
+}
+
+
 bool Debugger::HasEventHandler() {
   return ((event_handler_ != NULL) ||
           Service::isolate_stream.enabled() ||
@@ -2314,6 +2319,7 @@
   ASSERT(obj_cache_ == NULL);
 
   pause_event_ = event;
+  pause_event_->UpdateTimestamp();
   obj_cache_ = new RemoteObjectCache(64);
 
   InvokeEventHandler(event);
@@ -2395,7 +2401,17 @@
   event.set_top_frame(top_frame);
   event.set_breakpoint(bpt);
   Object& closure_or_null = Object::Handle(top_frame->GetAsyncOperation());
-  event.set_async_continuation(&closure_or_null);
+  if (!closure_or_null.IsNull()) {
+    event.set_async_continuation(&closure_or_null);
+    const Script& script = Script::Handle(top_frame->SourceScript());
+    const TokenStream& tokens = TokenStream::Handle(script.tokens());
+    TokenStream::Iterator iter(tokens, top_frame->TokenPos());
+    if ((iter.CurrentTokenKind() == Token::kIDENT) &&
+        ((iter.CurrentLiteral() == Symbols::Await().raw()) ||
+         (iter.CurrentLiteral() == Symbols::YieldKw().raw()))) {
+      event.set_at_async_jump(true);
+    }
+  }
   Pause(&event);
 }
 
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 79a620c..396e8b2 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -354,7 +354,9 @@
         top_frame_(NULL),
         breakpoint_(NULL),
         exception_(NULL),
-        async_continuation_(NULL) {}
+        async_continuation_(NULL),
+        at_async_jump_(false),
+        timestamp_(-1) {}
 
   Isolate* isolate() const { return isolate_; }
 
@@ -402,10 +404,23 @@
     async_continuation_ = closure;
   }
 
+  bool at_async_jump() const {
+    return at_async_jump_;
+  }
+  void set_at_async_jump(bool value) {
+    at_async_jump_ = value;
+  }
+
   Dart_Port isolate_id() const {
     return isolate_->main_port();
   }
 
+  void UpdateTimestamp();
+
+  int64_t timestamp() const {
+    return timestamp_;
+  }
+
  private:
   Isolate* isolate_;
   EventType type_;
@@ -413,6 +428,8 @@
   Breakpoint* breakpoint_;
   const Object* exception_;
   const Object* async_continuation_;
+  bool at_async_jump_;
+  int64_t timestamp_;
 };
 
 
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index 852621b..b18dd3f 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -1405,17 +1405,17 @@
             data += 5;
           } else if (*(data+2) == 0x80 &&
                      *(data+3) == 0x00 &&
-                     *(data+3) == 0x00 &&
-                     *(data+3) == 0x00 &&
-                     *(data+4) == 0x00) {
+                     *(data+4) == 0x00 &&
+                     *(data+5) == 0x00 &&
+                     *(data+6) == 0x00) {
             Print("nop");
             data += 7;
           } else if (*(data+2) == 0x84 &&
                      *(data+3) == 0x00 &&
-                     *(data+3) == 0x00 &&
-                     *(data+3) == 0x00 &&
-                     *(data+3) == 0x00 &&
-                     *(data+4) == 0x00) {
+                     *(data+4) == 0x00 &&
+                     *(data+5) == 0x00 &&
+                     *(data+6) == 0x00 &&
+                     *(data+7) == 0x00) {
             Print("nop");
             data += 8;
           } else {
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 9f79640..de44cf0 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -598,6 +598,11 @@
       library = Library::CoreLibrary();
       class_name = &Symbols::ArgumentError();
       break;
+    case kArgumentValue:
+      library = Library::CoreLibrary();
+      class_name = &Symbols::ArgumentError();
+      constructor_name = &Symbols::DotValue();
+      break;
     case kNoSuchMethod:
       library = Library::CoreLibrary();
       class_name = &Symbols::NoSuchMethodError();
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index a2a1cb1..75addb2 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -53,6 +53,7 @@
     kRange,
     kRangeRange,
     kArgument,
+    kArgumentValue,
     kNoSuchMethod,
     kFormat,
     kUnsupported,
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 53106a8..b6984ac 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -185,7 +185,7 @@
 
 
 void FlowGraph::DiscoverBlocks() {
-  StackZone zone(isolate());
+  StackZone zone(thread());
 
   // Initialize state.
   preorder_.Clear();
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index ce0fb5a..8214f69 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -325,8 +325,7 @@
         nesting_stack_(NULL),
         osr_id_(osr_id),
         jump_count_(0),
-        await_joins_(new(Z) ZoneGrowableArray<JoinEntryInstr*>()),
-        await_levels_(new(Z) ZoneGrowableArray<intptr_t>()) { }
+        await_joins_(new(Z) ZoneGrowableArray<JoinEntryInstr*>()) { }
 
 
 void FlowGraphBuilder::AddCatchEntry(CatchBlockEntryInstr* entry) {
@@ -1618,148 +1617,6 @@
 }
 
 
-void EffectGraphVisitor::BuildSyncYieldJump(LocalVariable* old_context,
-                                            LocalVariable* iterator_param,
-                                            const intptr_t old_ctx_level,
-                                            JoinEntryInstr* target) {
-  // Building a jump consists of the following actions:
-  // * Load the generator body's iterator parameter (:iterator)
-  //   from the current context into a temporary.
-  // * Restore the old context from :await_cxt_var.
-  // * Copy the iterator saved above into the restored context.
-  // * Append a Goto to the target's join.
-  ASSERT((iterator_param != NULL) && iterator_param->is_captured());
-  ASSERT((old_context != NULL) && old_context->is_captured());
-  // Before restoring the context we need to temporarily save the
-  // iterator parameter.
-  LocalVariable* temp_iterator_var =
-      EnterTempLocalScope(Bind(BuildLoadLocal(*iterator_param)));
-
-  // Restore the saved continuation context, i.e. the context that was
-  // saved into :await_ctx_var before the closure suspended.
-  BuildRestoreContext(*old_context);
-
-  // Store the continuation result and continuation error values into
-  // the restored context.
-
-  // FlowGraphBuilder is at top context level, but the continuation
-  // target has possibly been recorded in a nested context (old_ctx_level).
-  // We need to unroll manually here.
-  intptr_t delta =
-      old_ctx_level - iterator_param->owner()->context_level();
-  ASSERT(delta >= 0);
-  Value* context = Bind(BuildCurrentContext());
-  while (delta-- > 0) {
-    context = Bind(new(Z) LoadFieldInstr(
-        context, Context::parent_offset(), Type::ZoneHandle(Z, Type::null()),
-        Scanner::kNoSourcePos));
-  }
-  LocalVariable* temp_context_var = EnterTempLocalScope(context);
-
-  Value* context_val = Bind(new(Z) LoadLocalInstr(*temp_context_var));
-  Value* store_val = Bind(new(Z) LoadLocalInstr(*temp_iterator_var));
-  StoreInstanceFieldInstr* store = new(Z) StoreInstanceFieldInstr(
-      Context::variable_offset(iterator_param->index()),
-      context_val,
-      store_val,
-      kEmitStoreBarrier,
-      Scanner::kNoSourcePos);
-  Do(store);
-
-  Do(ExitTempLocalScope(temp_context_var));
-  Do(ExitTempLocalScope(temp_iterator_var));
-
-  // Goto saved join.
-  Goto(target);
-}
-
-
-void EffectGraphVisitor::BuildAsyncJump(LocalVariable* old_context,
-                                        LocalVariable* continuation_result,
-                                        LocalVariable* continuation_error,
-                                        LocalVariable* continuation_stack_trace,
-                                        const intptr_t old_ctx_level,
-                                        JoinEntryInstr* target) {
-  // Building a jump consists of the following actions:
-  // * Load the current continuation result parameter (:async_result)
-  //   and continuation error parameter (:async_error_param) from
-  //   the current context into temporaries.
-  // * Restore the old context from :await_cxt_var.
-  // * Copy the result and error parameters saved above into the restored
-  //   context.
-  // * Append a Goto to the target's join.
-  ASSERT((continuation_result != NULL) && continuation_result->is_captured());
-  ASSERT((continuation_error != NULL) && continuation_error->is_captured());
-  ASSERT((old_context != NULL) && old_context->is_captured());
-  // Before restoring the continuation context we need to temporary save the
-  // result and error parameter.
-  LocalVariable* temp_result_var =
-      EnterTempLocalScope(Bind(BuildLoadLocal(*continuation_result)));
-  LocalVariable* temp_error_var =
-      EnterTempLocalScope(Bind(BuildLoadLocal(*continuation_error)));
-  LocalVariable* temp_stack_trace_var =
-      EnterTempLocalScope(Bind(BuildLoadLocal(*continuation_stack_trace)));
-
-  // Restore the saved continuation context, i.e. the context that was
-  // saved into :await_ctx_var before the closure suspended.
-  BuildRestoreContext(*old_context);
-
-  // Store the continuation result and continuation error values into
-  // the restored context.
-
-  // FlowGraphBuilder is at top context level, but the await target has possibly
-  // been recorded in a nested context (old_ctx_level). We need to unroll
-  // manually here.
-  intptr_t delta =
-      old_ctx_level - continuation_result->owner()->context_level();
-  ASSERT(delta >= 0);
-  Value* context = Bind(BuildCurrentContext());
-  while (delta-- > 0) {
-    context = Bind(new(Z) LoadFieldInstr(
-        context, Context::parent_offset(), Type::ZoneHandle(Z, Type::null()),
-        Scanner::kNoSourcePos));
-  }
-  LocalVariable* temp_context_var = EnterTempLocalScope(context);
-
-  Value* context_val = Bind(new(Z) LoadLocalInstr(*temp_context_var));
-  Value* store_val = Bind(new(Z) LoadLocalInstr(*temp_result_var));
-  StoreInstanceFieldInstr* store = new(Z) StoreInstanceFieldInstr(
-      Context::variable_offset(continuation_result->index()),
-      context_val,
-      store_val,
-      kEmitStoreBarrier,
-      Scanner::kNoSourcePos);
-  Do(store);
-  context_val = Bind(new(Z) LoadLocalInstr(*temp_context_var));
-  store_val = Bind(new(Z) LoadLocalInstr(*temp_error_var));
-  StoreInstanceFieldInstr* store2 = new(Z) StoreInstanceFieldInstr(
-      Context::variable_offset(continuation_error->index()),
-      context_val,
-      store_val,
-      kEmitStoreBarrier,
-      Scanner::kNoSourcePos);
-  Do(store2);
-
-  context_val = Bind(new(Z) LoadLocalInstr(*temp_context_var));
-  store_val = Bind(new(Z) LoadLocalInstr(*temp_stack_trace_var));
-  StoreInstanceFieldInstr* store3 = new(Z) StoreInstanceFieldInstr(
-      Context::variable_offset(continuation_stack_trace->index()),
-      context_val,
-      store_val,
-      kEmitStoreBarrier,
-      Scanner::kNoSourcePos);
-  Do(store3);
-
-  Do(ExitTempLocalScope(temp_context_var));
-  Do(ExitTempLocalScope(temp_stack_trace_var));
-  Do(ExitTempLocalScope(temp_error_var));
-  Do(ExitTempLocalScope(temp_result_var));
-
-  // Goto saved join.
-  Goto(target);
-}
-
-
 // Used for type casts and to test assignments.
 Value* EffectGraphVisitor::BuildAssignableValue(intptr_t token_pos,
                                                 Value* value,
@@ -2492,7 +2349,6 @@
   Do(BuildStoreLocal(*jump_var, jump_val));
   // Save the current context for resuming.
   BuildSaveContext(*ctx_var);
-  owner()->await_levels()->Add(owner()->context_level());
 }
 
 
@@ -4399,30 +4255,17 @@
       EffectGraphVisitor for_true(owner());
       EffectGraphVisitor for_false(owner());
 
-      if (function.IsAsyncClosure() || function.IsAsyncGenClosure()) {
-        LocalVariable* result_param =
-            top_scope->LookupVariable(Symbols::AsyncOperationParam(), false);
-        LocalVariable* error_param =
-            top_scope->LookupVariable(Symbols::AsyncOperationErrorParam(),
-                                      false);
-        LocalVariable* stack_trace_param =
-            top_scope->LookupVariable(Symbols::AsyncOperationStackTraceParam(),
-                                      false);
-        for_true.BuildAsyncJump(old_context,
-                                result_param,
-                                error_param,
-                                stack_trace_param,
-                                (*owner()->await_levels())[i],
-                                (*owner()->await_joins())[i]);
-      } else {
-        ASSERT(function.IsSyncGenClosure());
-        LocalVariable* iterator_param =
-            top_scope->LookupVariable(Symbols::IteratorParameter(), false);
-        for_true.BuildSyncYieldJump(old_context,
-                                    iterator_param,
-                                    (*owner()->await_levels())[i],
-                                    (*owner()->await_joins())[i]);
-      }
+      // Build async jump or sync yield jump.
+      ASSERT(function.IsAsyncClosure() ||
+             function.IsAsyncGenClosure() ||
+             function.IsSyncGenClosure());
+
+      // Restore the saved continuation context, i.e. the context that was
+      // saved into :await_ctx_var before the closure suspended.
+      for_true.BuildRestoreContext(*old_context);
+
+      // Goto saved join.
+      for_true.Goto((*owner()->await_joins())[i]);
 
       Join(for_test, for_true, for_false);
       if (i == 0) {
@@ -4784,7 +4627,7 @@
 
 
 FlowGraph* FlowGraphBuilder::BuildGraph() {
-  VMTagScope tagScope(Thread::Current()->isolate(),
+  VMTagScope tagScope(Thread::Current(),
                       VMTag::kCompileFlowGraphBuilderTagId,
                       FLAG_profile_vm);
   if (FLAG_print_ast) {
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 2211da4..7070e2a 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -164,7 +164,6 @@
 
   intptr_t next_await_counter() { return jump_count_++; }
 
-  ZoneGrowableArray<intptr_t>* await_levels() const { return await_levels_; }
   ZoneGrowableArray<JoinEntryInstr*>* await_joins() const {
     return await_joins_;
   }
@@ -254,7 +253,6 @@
 
   intptr_t jump_count_;
   ZoneGrowableArray<JoinEntryInstr*>* await_joins_;
-  ZoneGrowableArray<intptr_t>* await_levels_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder);
 };
@@ -465,18 +463,6 @@
 
   void BuildLetTempExpressions(LetNode* node);
 
-  void BuildSyncYieldJump(LocalVariable* old_context,
-                          LocalVariable* iterator_param,
-                          const intptr_t old_ctx_level,
-                          JoinEntryInstr* target);
-
-  void BuildAsyncJump(LocalVariable* old_context,
-                      LocalVariable* continuation_result,
-                      LocalVariable* continuation_error,
-                      LocalVariable* continuation_stack_trace,
-                      const intptr_t old_ctx_level,
-                      JoinEntryInstr* target);
-
   void BuildInstanceGetterConditional(InstanceGetterNode* node);
   void BuildInstanceCallConditional(InstanceCallNode* node);
 
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index c7d3215..4a41786 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -67,6 +67,7 @@
 DECLARE_FLAG(bool, use_osr);
 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
 DECLARE_FLAG(bool, precompile_collect_closures);
+DECLARE_FLAG(bool, print_stop_message);
 
 
 static void NooptModeHandler(bool value) {
@@ -83,7 +84,6 @@
     FLAG_load_deferred_eagerly = true;
     FLAG_deoptimize_alot = false;  // Used in some tests.
     FLAG_deoptimize_every = 0;     // Used in some tests.
-    FLAG_collect_code = false;
     FLAG_guess_other_cid = true;
     Compiler::set_always_optimize(true);
     // Triggers assert if we try to recompile (e.g., because of deferred
@@ -93,6 +93,9 @@
     // TODO(srdjan): Enable CHA deoptimization when eager class finalization is
     // implemented, either with precompilation or as a special pass.
     FLAG_use_cha_deopt = false;
+    // Calling the PrintStopMessage stub is not supported in precompiled code
+    // since it is done at places where no pool pointer is loaded.
+    FLAG_print_stop_message = false;
   }
 }
 
@@ -107,7 +110,7 @@
 DECLARE_FLAG(bool, lazy_dispatchers);
 DECLARE_FLAG(bool, interpret_irregexp);
 DECLARE_FLAG(bool, enable_mirrors);
-
+DECLARE_FLAG(bool, link_natives_lazily);
 
 static void PrecompileModeHandler(bool value) {
   if (value) {
@@ -116,6 +119,7 @@
     FLAG_interpret_irregexp = true;
     FLAG_enable_mirrors = false;
     FLAG_precompile_collect_closures = true;
+    FLAG_link_natives_lazily = true;
   }
 }
 
@@ -174,8 +178,7 @@
         stackmap_table_builder_(NULL),
         block_info_(block_order_.length()),
         deopt_infos_(),
-        static_calls_target_table_(GrowableObjectArray::ZoneHandle(
-            GrowableObjectArray::New())),
+        static_calls_target_table_(),
         is_optimizing_(is_optimizing),
         may_reoptimize_(false),
         intrinsic_mode_(false),
@@ -226,8 +229,8 @@
 
 
 void FlowGraphCompiler::InitCompiler() {
-  pc_descriptors_list_ = new DescriptorList(64);
-  exception_handlers_list_ = new ExceptionHandlerList();
+  pc_descriptors_list_ = new(zone()) DescriptorList(64);
+  exception_handlers_list_ = new(zone())ExceptionHandlerList();
   block_info_.Clear();
   // Conservative detection of leaf routines used to remove the stack check
   // on function entry.
@@ -238,7 +241,7 @@
   // indicating a non-leaf routine and calls without IC data indicating
   // possible reoptimization.
   for (int i = 0; i < block_order_.length(); ++i) {
-    block_info_.Add(new BlockInfo());
+    block_info_.Add(new(zone()) BlockInfo());
     if (is_optimizing() && !flow_graph().IsCompiledForOsr()) {
       BlockEntryInstr* entry = block_order_[i];
       for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
@@ -390,15 +393,16 @@
   if ((instr->token_pos() == Scanner::kNoSourcePos) || (instr->env() == NULL)) {
     return;
   }
-  const Function& function =
-      Function::Handle(instr->env()->code().function());
-  const Script& s = Script::Handle(function.script());
+  const Script& script =
+      Script::Handle(zone(), instr->env()->function().script());
   intptr_t line_nr;
   intptr_t column_nr;
-  s.GetTokenLocation(instr->token_pos(), &line_nr, &column_nr);
-  const String& line = String::Handle(s.GetLine(line_nr));
+  script.GetTokenLocation(instr->token_pos(), &line_nr, &column_nr);
+  const String& line = String::Handle(zone(), script.GetLine(line_nr));
   assembler()->Comment("Line %" Pd " in '%s':\n           %s",
-      line_nr, function.ToFullyQualifiedCString(), line.ToCString());
+      line_nr,
+      instr->env()->function().ToFullyQualifiedCString(),
+      line.ToCString());
 }
 
 
@@ -516,7 +520,7 @@
   }
 
   if (is_optimizing()) {
-    LogBlock lb(Isolate::Current());
+    LogBlock lb(Thread::Current());
     intervals.Add(IntervalStruct(prev_offset, prev_inlining_id));
     inlined_code_intervals_ =
         Array::New(intervals.length() * Code::kInlIntNumEntries, Heap::kOld);
@@ -591,7 +595,7 @@
   // Parameters first.
   intptr_t i = 0;
   const intptr_t num_non_copied_params = flow_graph().num_non_copied_params();
-  ParallelMoveInstr* move_instr = new ParallelMoveInstr();
+  ParallelMoveInstr* move_instr = new(zone()) ParallelMoveInstr();
   for (; i < num_non_copied_params; ++i) {
     // Don't sync captured parameters. They are not in the environment.
     if (flow_graph().captured_parameters()->Contains(i)) continue;
@@ -717,26 +721,16 @@
 
 
 void FlowGraphCompiler::AddStaticCallTarget(const Function& func) {
-  ASSERT(Code::kSCallTableEntryLength == 3);
-  ASSERT(Code::kSCallTableOffsetEntry == 0);
+  ASSERT(func.IsZoneHandle());
   static_calls_target_table_.Add(
-      Smi::Handle(Smi::New(assembler()->CodeSize())));
-  ASSERT(Code::kSCallTableFunctionEntry == 1);
-  static_calls_target_table_.Add(func);
-  ASSERT(Code::kSCallTableCodeEntry == 2);
-  static_calls_target_table_.Add(Code::Handle());
+      new(zone()) StaticCallsStruct(assembler()->CodeSize(), &func, NULL));
 }
 
 
 void FlowGraphCompiler::AddStubCallTarget(const Code& code) {
-  ASSERT(Code::kSCallTableEntryLength == 3);
-  ASSERT(Code::kSCallTableOffsetEntry == 0);
+  ASSERT(code.IsZoneHandle());
   static_calls_target_table_.Add(
-      Smi::Handle(Smi::New(assembler()->CodeSize())));
-  ASSERT(Code::kSCallTableFunctionEntry == 1);
-  static_calls_target_table_.Add(Function::Handle());
-  ASSERT(Code::kSCallTableCodeEntry == 2);
-  static_calls_target_table_.Add(code);
+      new(zone()) StaticCallsStruct(assembler()->CodeSize(), NULL, &code));
 }
 
 
@@ -745,10 +739,10 @@
   ASSERT(is_optimizing());
   ASSERT(!intrinsic_mode());
   CompilerDeoptInfo* info =
-      new CompilerDeoptInfo(deopt_id,
-                            ICData::kDeoptAtCall,
-                            0,  // No flags.
-                            pending_deoptimization_env_);
+      new(zone()) CompilerDeoptInfo(deopt_id,
+                                    ICData::kDeoptAtCall,
+                                    0,  // No flags.
+                                    pending_deoptimization_env_);
   info->set_pc_offset(assembler()->CodeSize());
   deopt_infos_.Add(info);
 }
@@ -894,10 +888,10 @@
   ASSERT(!Compiler::always_optimize());
   ASSERT(is_optimizing_);
   CompilerDeoptInfoWithStub* stub =
-      new CompilerDeoptInfoWithStub(deopt_id,
-                                    reason,
-                                    flags,
-                                    pending_deoptimization_env_);
+      new(zone()) CompilerDeoptInfoWithStub(deopt_id,
+                                            reason,
+                                            flags,
+                                            pending_deoptimization_env_);
   deopt_infos_.Add(stub);
   return stub->entry_label();
 }
@@ -1000,8 +994,23 @@
 
 void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) {
   ASSERT(code.static_calls_target_table() == Array::null());
-  const Array& targets =
-      Array::Handle(Array::MakeArray(static_calls_target_table_));
+  const Array& targets = Array::Handle(zone(), Array::New(
+      (static_calls_target_table_.length() * Code::kSCallTableEntryLength),
+      Heap::kOld));
+  Smi& smi_offset = Smi::Handle(zone());
+  for (intptr_t i = 0; i < static_calls_target_table_.length(); i++) {
+    const intptr_t target_ix = Code::kSCallTableEntryLength * i;
+    smi_offset = Smi::New(static_calls_target_table_[i]->offset);
+    targets.SetAt(target_ix + Code::kSCallTableOffsetEntry, smi_offset);
+    if (static_calls_target_table_[i]->function != NULL) {
+      targets.SetAt(target_ix + Code::kSCallTableFunctionEntry,
+          *static_calls_target_table_[i]->function);
+    }
+    if (static_calls_target_table_[i]->code != NULL) {
+      targets.SetAt(target_ix + Code::kSCallTableCodeEntry,
+          *static_calls_target_table_[i]->code);
+    }
+  }
   code.set_static_calls_target_table(targets);
   INC_STAT(isolate(), total_code_size, targets.Length() * sizeof(uword));
 }
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h
index 536720e..2b61c46 100644
--- a/runtime/vm/flow_graph_compiler.h
+++ b/runtime/vm/flow_graph_compiler.h
@@ -662,6 +662,24 @@
   void FrameStateClear();
 #endif
 
+  // This struct contains either function or code, the other one being NULL.
+  class StaticCallsStruct : public ZoneAllocated {
+   public:
+    const intptr_t offset;
+    const Function* function;  // Can be NULL.
+    const Code* code;          // Can be NULL.
+    StaticCallsStruct(intptr_t offset_arg,
+                      const Function* function_arg,
+                      const Code* code_arg)
+        : offset(offset_arg), function(function_arg), code(code_arg) {
+      ASSERT((function == NULL) || function->IsZoneHandle());
+      ASSERT((code == NULL) || code->IsZoneHandle());
+    }
+
+   private:
+    DISALLOW_COPY_AND_ASSIGN(StaticCallsStruct);
+  };
+
   Isolate* isolate_;
   Zone* zone_;
   Assembler* assembler_;
@@ -683,11 +701,10 @@
   GrowableArray<BlockInfo*> block_info_;
   GrowableArray<CompilerDeoptInfo*> deopt_infos_;
   GrowableArray<SlowPathCode*> slow_path_code_;
-  // Stores: [code offset, function or null, null(code)].
   // Stores static call targets as well as stub targets.
   // TODO(srdjan): Evaluate if we should store allocation stub targets into a
   // separate table?
-  const GrowableObjectArray& static_calls_target_table_;
+  GrowableArray<StaticCallsStruct*> static_calls_target_table_;
   const bool is_optimizing_;
   // Set to true if optimized code has IC calls.
   bool may_reoptimize_;
diff --git a/runtime/vm/flow_graph_compiler_arm.cc b/runtime/vm/flow_graph_compiler_arm.cc
index f7b1fb4..17f61ac 100644
--- a/runtime/vm/flow_graph_compiler_arm.cc
+++ b/runtime/vm/flow_graph_compiler_arm.cc
@@ -101,11 +101,9 @@
   Zone* zone = compiler->zone();
 
   // Current PP, FP, and PC.
-  builder->AddPp(Function::Handle(zone, current->code().function()), slot_ix++);
+  builder->AddPp(current->function(), slot_ix++);
   builder->AddCallerFp(slot_ix++);
-  builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
-                            deopt_id(),
-                            slot_ix++);
+  builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
   // Callee's PC marker is not used anymore. Pass Function::null() to set to 0.
   builder->AddPcMarker(Function::Handle(zone), slot_ix++);
@@ -126,20 +124,18 @@
   current = current->outer();
   while (current != NULL) {
     // PP, FP, and PC.
-    builder->AddPp(
-        Function::Handle(zone, current->code().function()), slot_ix++);
+    builder->AddPp(current->function(), slot_ix++);
     builder->AddCallerFp(slot_ix++);
 
     // For any outer environment the deopt id is that of the call instruction
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
-        Function::Handle(zone, current->code().function()),
+        current->function(),
         Isolate::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // PC marker.
-    builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                         slot_ix++);
+    builder->AddPcMarker(previous->function(), slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
     // we must read them from the previous environment.
@@ -171,8 +167,7 @@
   builder->AddCallerPc(slot_ix++);
 
   // PC marker.
-  builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                       slot_ix++);
+  builder->AddPcMarker(previous->function(), slot_ix++);
 
   // For the outermost environment, set the incoming arguments.
   for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) {
@@ -864,9 +859,8 @@
       __ b(&assign_optional_parameter);
       __ Bind(&load_default_value);
       // Load R5 with default argument.
-      const Object& value = Object::ZoneHandle(
-          zone(), parsed_function().default_parameter_values().At(
-              param_pos - num_fixed_params));
+      const Instance& value = parsed_function().DefaultParameterValueAt(
+          param_pos - num_fixed_params);
       __ LoadObject(R5, value);
       __ Bind(&assign_optional_parameter);
       // Assign R5 to fp[kFirstLocalSlotFromFp - param_pos].
@@ -900,8 +894,7 @@
       __ CompareImmediate(R9, param_pos);
       __ b(&next_parameter, GT);
       // Load R5 with default argument.
-      const Object& value = Object::ZoneHandle(
-          zone(), parsed_function().default_parameter_values().At(i));
+      const Object& value = parsed_function().DefaultParameterValueAt(i);
       __ LoadObject(R5, value);
       // Assign R5 to fp[kFirstLocalSlotFromFp - param_pos].
       // We do not use the final allocation index of the variable here, i.e.
@@ -1555,7 +1548,8 @@
                      *StubCode::CallStaticFunction_entry(),
                      RawPcDescriptors::kOther,
                      locs);
-    const Function& function = Function::Handle(zone(), ic_data.GetTargetAt(0));
+    const Function& function = Function::ZoneHandle(
+        zone(), ic_data.GetTargetAt(0));
     AddStaticCallTarget(function);
     __ Drop(argument_count);
     if (kNumChecks > 1) {
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index a473953..11bc02d 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -98,12 +98,10 @@
   Zone* zone = compiler->zone();
 
   // Current PP, FP, and PC.
-  builder->AddPp(Function::Handle(zone, current->code().function()), slot_ix++);
+  builder->AddPp(current->function(), slot_ix++);
   builder->AddPcMarker(Function::Handle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
-  builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
-                            deopt_id(),
-                            slot_ix++);
+  builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
   // Emit all values that are needed for materialization as a part of the
   // expression stack for the bottom-most frame. This guarantees that GC
@@ -121,16 +119,14 @@
   current = current->outer();
   while (current != NULL) {
     // PP, FP, and PC.
-    builder->AddPp(Function::Handle(
-        zone, current->code().function()), slot_ix++);
-    builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                         slot_ix++);
+    builder->AddPp(current->function(), slot_ix++);
+    builder->AddPcMarker(previous->function(), slot_ix++);
     builder->AddCallerFp(slot_ix++);
 
     // For any outer environment the deopt id is that of the call instruction
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
-        Function::Handle(zone, current->code().function()),
+        current->function(),
         Isolate::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
@@ -161,8 +157,7 @@
   // For the outermost environment, set caller PC, caller PP, and caller FP.
   builder->AddCallerPp(slot_ix++);
   // PC marker.
-  builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                       slot_ix++);
+  builder->AddPcMarker(previous->function(), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddCallerPc(slot_ix++);
 
@@ -861,9 +856,8 @@
       __ b(&assign_optional_parameter);
       __ Bind(&load_default_value);
       // Load R5 with default argument.
-      const Object& value = Object::ZoneHandle(
-          zone(), parsed_function().default_parameter_values().At(
-              param_pos - num_fixed_params));
+      const Instance& value = parsed_function().DefaultParameterValueAt(
+          param_pos - num_fixed_params);
       __ LoadObject(R5, value);
       __ Bind(&assign_optional_parameter);
       // Assign R5 to fp[kFirstLocalSlotFromFp - param_pos].
@@ -896,8 +890,7 @@
       __ CompareImmediate(R8, param_pos);
       __ b(&next_parameter, GT);
       // Load R5 with default argument.
-      const Object& value = Object::ZoneHandle(
-          zone(), parsed_function().default_parameter_values().At(i));
+      const Object& value = parsed_function().DefaultParameterValueAt(i);
       __ LoadObject(R5, value);
       // Assign R5 to fp[kFirstLocalSlotFromFp - param_pos].
       // We do not use the final allocation index of the variable here, i.e.
@@ -1022,7 +1015,7 @@
     __ EnterOsrFrame(extra_slots * kWordSize, new_pp);
   } else {
     ASSERT(StackSize() >= 0);
-    __ EnterDartFrameWithInfo(StackSize() * kWordSize, new_pp);
+    __ EnterDartFrame(StackSize() * kWordSize, new_pp);
   }
 }
 
@@ -1510,7 +1503,8 @@
                      *StubCode::CallStaticFunction_entry(),
                      RawPcDescriptors::kOther,
                      locs);
-    const Function& function = Function::Handle(zone(), ic_data.GetTargetAt(0));
+    const Function& function = Function::ZoneHandle(
+        zone(), ic_data.GetTargetAt(0));
     AddStaticCallTarget(function);
     __ Drop(argument_count);
     if (kNumChecks > 1) {
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 388b6d1..8df27db 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -107,9 +107,7 @@
 
   // Current FP and PC.
   builder->AddCallerFp(slot_ix++);
-  builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
-                            deopt_id(),
-                            slot_ix++);
+  builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
   // Emit all values that are needed for materialization as a part of the
   // expression stack for the bottom-most frame. This guarantees that GC
@@ -124,8 +122,7 @@
   }
 
   // Current PC marker and caller FP.
-  builder->AddPcMarker(Function::Handle(
-      zone, current->code().function()), slot_ix++);
+  builder->AddPcMarker(current->function(), slot_ix++);
   builder->AddCallerFp(slot_ix++);
 
   Environment* previous = current;
@@ -134,7 +131,7 @@
     // For any outer environment the deopt id is that of the call instruction
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
-        Function::Handle(zone, current->code().function()),
+        current->function(),
         Isolate::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
@@ -156,8 +153,7 @@
     }
 
     // PC marker and caller FP.
-    builder->AddPcMarker(Function::Handle(zone, current->code().function()),
-                         slot_ix++);
+    builder->AddPcMarker(current->function(), slot_ix++);
     builder->AddCallerFp(slot_ix++);
 
     // Iterate on the outer environment.
@@ -884,9 +880,8 @@
       __ jmp(&assign_optional_parameter, Assembler::kNearJump);
       __ Bind(&load_default_value);
       // Load EAX with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(
-              param_pos - num_fixed_params));
+      const Instance& value = parsed_function().DefaultParameterValueAt(
+          param_pos - num_fixed_params);
       __ LoadObject(EAX, value);
       __ Bind(&assign_optional_parameter);
       // Assign EAX to fp[kFirstLocalSlotFromFp - param_pos].
@@ -919,8 +914,7 @@
       __ cmpl(ECX, Immediate(param_pos));
       __ j(GREATER, &next_parameter, Assembler::kNearJump);
       // Load EAX with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(i));
+      const Object& value = parsed_function().DefaultParameterValueAt(i);
       __ LoadObject(EAX, value);
       // Assign EAX to fp[kFirstLocalSlotFromFp - param_pos].
       // We do not use the final allocation index of the variable here, i.e.
@@ -1540,7 +1534,8 @@
                      *StubCode::CallStaticFunction_entry(),
                      RawPcDescriptors::kOther,
                      locs);
-    const Function& function = Function::Handle(zone(), ic_data.GetTargetAt(0));
+    const Function& function = Function::ZoneHandle(
+        zone(), ic_data.GetTargetAt(0));
     AddStaticCallTarget(function);
     __ Drop(argument_count);
     if (kNumChecks > 1) {
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index a717323..93716a8 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -97,11 +97,9 @@
   Zone* zone = compiler->zone();
 
   // Current PP, FP, and PC.
-  builder->AddPp(Function::Handle(zone, current->code().function()), slot_ix++);
+  builder->AddPp(current->function(), slot_ix++);
   builder->AddCallerFp(slot_ix++);
-  builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
-                            deopt_id(),
-                            slot_ix++);
+  builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
   // Callee's PC marker is not used anymore. Pass Code::null() to set to 0.
   builder->AddPcMarker(Function::Handle(zone), slot_ix++);
@@ -122,20 +120,18 @@
   current = current->outer();
   while (current != NULL) {
     // PP, FP, and PC.
-    builder->AddPp(
-        Function::Handle(zone, current->code().function()), slot_ix++);
+    builder->AddPp(current->function(), slot_ix++);
     builder->AddCallerFp(slot_ix++);
 
     // For any outer environment the deopt id is that of the call instruction
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
-        Function::Handle(zone, current->code().function()),
+        current->function(),
         Isolate::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
     // PC marker.
-    builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                         slot_ix++);
+    builder->AddPcMarker(previous->function(), slot_ix++);
 
     // The values of outgoing arguments can be changed from the inlined call so
     // we must read them from the previous environment.
@@ -167,8 +163,7 @@
   builder->AddCallerPc(slot_ix++);
 
   // PC marker.
-  builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                       slot_ix++);
+  builder->AddPcMarker(previous->function(), slot_ix++);
 
   // For the outermost environment, set the incoming arguments.
   for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) {
@@ -880,9 +875,8 @@
 
       __ Bind(&load_default_value);
       // Load T3 with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(
-              param_pos - num_fixed_params));
+      const Instance& value = parsed_function().DefaultParameterValueAt(
+          param_pos - num_fixed_params);
       __ LoadObject(T3, value);
       __ Bind(&assign_optional_parameter);
       // Assign T3 to fp[kFirstLocalSlotFromFp - param_pos].
@@ -914,8 +908,7 @@
       const int param_pos = num_fixed_params + i;
       __ BranchSignedGreater(T2, Immediate(param_pos), &next_parameter);
       // Load T3 with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(i));
+      const Object& value = parsed_function().DefaultParameterValueAt(i);
       __ LoadObject(T3, value);
       // Assign T3 to fp[kFirstLocalSlotFromFp - param_pos].
       // We do not use the final allocation index of the variable here, i.e.
@@ -1576,7 +1569,8 @@
                      *StubCode::CallStaticFunction_entry(),
                      RawPcDescriptors::kOther,
                      locs);
-    const Function& function = Function::Handle(zone(), ic_data.GetTargetAt(0));
+    const Function& function = Function::ZoneHandle(
+        zone(), ic_data.GetTargetAt(0));
     AddStaticCallTarget(function);
     __ Drop(argument_count);
     if (kNumChecks > 1) {
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index b28c25a..40143d4 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -101,12 +101,10 @@
   Zone* zone = compiler->zone();
 
   // Current PP, FP, and PC.
-  builder->AddPp(Function::Handle(zone, current->code().function()), slot_ix++);
+  builder->AddPp(current->function(), slot_ix++);
   builder->AddPcMarker(Function::Handle(zone), slot_ix++);
   builder->AddCallerFp(slot_ix++);
-  builder->AddReturnAddress(Function::Handle(zone, current->code().function()),
-                            deopt_id(),
-                            slot_ix++);
+  builder->AddReturnAddress(current->function(), deopt_id(), slot_ix++);
 
   // Emit all values that are needed for materialization as a part of the
   // expression stack for the bottom-most frame. This guarantees that GC
@@ -124,16 +122,14 @@
   current = current->outer();
   while (current != NULL) {
     // PP, FP, and PC.
-    builder->AddPp(Function::Handle(zone, current->code().function()),
-                   slot_ix++);
-    builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                         slot_ix++);
+    builder->AddPp(current->function(), slot_ix++);
+    builder->AddPcMarker(previous->function(), slot_ix++);
     builder->AddCallerFp(slot_ix++);
 
     // For any outer environment the deopt id is that of the call instruction
     // which is recorded in the outer environment.
     builder->AddReturnAddress(
-        Function::Handle(zone, current->code().function()),
+        current->function(),
         Isolate::ToDeoptAfter(current->deopt_id()),
         slot_ix++);
 
@@ -164,8 +160,7 @@
   // For the outermost environment, set caller PC, caller PP, and caller FP.
   builder->AddCallerPp(slot_ix++);
   // PC marker.
-  builder->AddPcMarker(Function::Handle(zone, previous->code().function()),
-                       slot_ix++);
+  builder->AddPcMarker(previous->function(), slot_ix++);
   builder->AddCallerFp(slot_ix++);
   builder->AddCallerPc(slot_ix++);
 
@@ -873,9 +868,8 @@
       __ jmp(&assign_optional_parameter, Assembler::kNearJump);
       __ Bind(&load_default_value);
       // Load RAX with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(
-              param_pos - num_fixed_params));
+      const Instance& value = parsed_function().DefaultParameterValueAt(
+          param_pos - num_fixed_params);
       __ LoadObject(RAX, value);
       __ Bind(&assign_optional_parameter);
       // Assign RAX to fp[kFirstLocalSlotFromFp - param_pos].
@@ -909,8 +903,7 @@
       __ CompareImmediate(RCX, Immediate(param_pos));
       __ j(GREATER, &next_parameter, Assembler::kNearJump);
       // Load RAX with default argument.
-      const Object& value = Object::ZoneHandle(zone(),
-          parsed_function().default_parameter_values().At(i));
+      const Object& value = parsed_function().DefaultParameterValueAt(i);
       __ LoadObject(RAX, value);
       // Assign RAX to fp[kFirstLocalSlotFromFp - param_pos].
       // We do not use the final allocation index of the variable here, i.e.
@@ -1044,7 +1037,7 @@
     }
     ASSERT(StackSize() >= 0);
     __ Comment("Enter frame");
-    __ EnterDartFrameWithInfo(StackSize() * kWordSize, new_pp, new_pc);
+    __ EnterDartFrame(StackSize() * kWordSize, new_pp, new_pc);
   }
 }
 
@@ -1513,7 +1506,8 @@
                      *StubCode::CallStaticFunction_entry(),
                      RawPcDescriptors::kOther,
                      locs);
-    const Function& function = Function::Handle(zone(), ic_data.GetTargetAt(0));
+    const Function& function = Function::ZoneHandle(
+        zone(), ic_data.GetTargetAt(0));
     AddStaticCallTarget(function);
     __ Drop(argument_count, RCX);
     if (kNumChecks > 1) {
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index a646017..6c14228 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -82,10 +82,10 @@
 
 
 // Test if a call is recursive by looking in the deoptimization environment.
-static bool IsCallRecursive(const Code& code, Definition* call) {
+static bool IsCallRecursive(const Function& function, Definition* call) {
   Environment* env = call->env();
   while (env != NULL) {
-    if (code.raw() == env->code().raw()) {
+    if (function.raw() == env->function().raw()) {
       return true;
     }
     env = env->outer();
@@ -97,8 +97,7 @@
 // Helper to get the default value of a formal parameter.
 static ConstantInstr* GetDefaultValue(intptr_t i,
                                       const ParsedFunction& parsed_function) {
-  return new ConstantInstr(Object::ZoneHandle(
-      parsed_function.default_parameter_values().At(i)));
+  return new ConstantInstr(parsed_function.DefaultParameterValueAt(i));
 }
 
 
@@ -668,7 +667,7 @@
     // Abort if this is a recursive occurrence.
     Definition* call = call_data->call;
     // Added 'volatile' works around a possible GCC 4.9 compiler bug.
-    volatile bool is_recursive_call = IsCallRecursive(unoptimized_code, call);
+    volatile bool is_recursive_call = IsCallRecursive(function, call);
     if (is_recursive_call &&
         inlining_recursion_depth_ >= FLAG_inlining_recursion_depth_threshold) {
       TRACE_INLINING(ISL_Print("     Bailout: recursive function\n"));
@@ -687,7 +686,7 @@
       bool in_cache;
       ParsedFunction* parsed_function;
       {
-        CSTAT_TIMER_SCOPE(isolate(), graphinliner_parse_timer);
+        CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer);
         if (!Compiler::always_optimize()) {
           const Error& error = Error::Handle(Z,
               Compiler::EnsureUnoptimizedCode(Thread::Current(), function));
@@ -713,7 +712,7 @@
       builder.SetInitialBlockId(caller_graph_->max_block_id());
       FlowGraph* callee_graph;
       {
-        CSTAT_TIMER_SCOPE(isolate(), graphinliner_build_timer);
+        CSTAT_TIMER_SCOPE(thread(), graphinliner_build_timer);
         callee_graph = builder.BuildGraph();
       }
 
@@ -767,7 +766,7 @@
       block_scheduler.AssignEdgeWeights();
 
       {
-        CSTAT_TIMER_SCOPE(isolate(), graphinliner_ssa_timer);
+        CSTAT_TIMER_SCOPE(thread(), graphinliner_ssa_timer);
         // Compute SSA on the callee graph, catching bailouts.
         callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(),
                                  param_stubs);
@@ -775,7 +774,7 @@
       }
 
       {
-        CSTAT_TIMER_SCOPE(isolate(), graphinliner_opt_timer);
+        CSTAT_TIMER_SCOPE(thread(), graphinliner_opt_timer);
         // TODO(zerny): Do more optimization passes on the callee graph.
         FlowGraphOptimizer optimizer(callee_graph);
         if (Compiler::always_optimize()) {
@@ -956,7 +955,7 @@
   }
 
   void InlineCall(InlinedCallData* call_data) {
-    CSTAT_TIMER_SCOPE(Isolate::Current(), graphinliner_subst_timer);
+    CSTAT_TIMER_SCOPE(Thread::Current(), graphinliner_subst_timer);
     FlowGraph* callee_graph = call_data->callee_graph;
     TargetEntryInstr* callee_entry =
         callee_graph->graph_entry()->normal_entry();
@@ -1200,10 +1199,8 @@
       // For each optional positional parameter without an actual, add its
       // default value.
       for (intptr_t i = arg_count; i < param_count; ++i) {
-        const Object& object =
-            Object::ZoneHandle(
-                parsed_function.default_parameter_values().At(
-                    i - fixed_param_count));
+        const Instance& object =
+            parsed_function.DefaultParameterValueAt(i - fixed_param_count);
         ConstantInstr* constant = new(Z) ConstantInstr(object);
         arguments->Add(NULL);
         param_stubs->Add(constant);
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index cf07132..95ea36e 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -51,6 +51,7 @@
 
 DECLARE_FLAG(bool, polymorphic_with_deopt);
 DECLARE_FLAG(bool, source_lines);
+DECLARE_FLAG(bool, trace_cha);
 DECLARE_FLAG(bool, trace_field_guards);
 DECLARE_FLAG(bool, trace_type_check_elimination);
 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
@@ -770,7 +771,7 @@
 void FlowGraphOptimizer::ConvertEnvironmentUse(Value* use,
                                                Representation from_rep) {
   const Representation to_rep = kTagged;
-  if (from_rep == to_rep || to_rep == kNoRepresentation) {
+  if (from_rep == to_rep) {
     return;
   }
   InsertConversion(from_rep, to_rep, use, /*is_environment_use=*/ true);
@@ -2335,6 +2336,11 @@
         : call->function_name();
     const Class& cls = Class::Handle(Z, function.Owner());
     if (!thread()->cha()->HasOverride(cls, name)) {
+      if (FLAG_trace_cha) {
+        ISL_Print("  **(CHA) Instance call needs no check, "
+            "no overrides of '%s' '%s'\n",
+            name.ToCString(), cls.ToCString());
+      }
       thread()->cha()->AddToLeafClasses(cls);
       return false;
     }
@@ -4029,6 +4035,11 @@
   // Private classes cannot be subclassed by later loaded libs.
   if (!type_class.IsPrivate()) {
     if (FLAG_use_cha_deopt) {
+      if (FLAG_trace_cha) {
+        ISL_Print("  **(CHA) Typecheck as class equality since no "
+            "subclasses: %s\n",
+            type_class.ToCString());
+      }
       thread()->cha()->AddToLeafClasses(type_class);
     } else {
       return false;
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 6fcd874..6af05d6 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -15,6 +15,7 @@
             "Trace flow graph type propagation");
 
 DECLARE_FLAG(bool, propagate_types);
+DECLARE_FLAG(bool, trace_cha);
 DECLARE_FLAG(bool, use_cha_deopt);
 
 
@@ -549,6 +550,10 @@
           // Type of a private class cannot change through later loaded libs.
           cid_ = type_class.id();
         } else if (FLAG_use_cha_deopt) {
+          if (FLAG_trace_cha) {
+            ISL_Print("  **(CHA) Compile type not subclassed: %s\n",
+                type_class.ToCString());
+          }
           cha->AddToLeafClasses(type_class);
           cid_ = type_class.id();
         } else {
@@ -749,7 +754,7 @@
     // from being generated.
     switch (index()) {
       case RegExpMacroAssembler::kParamStringIndex:
-        return CompileType::FromCid(function.regexp_cid());
+        return CompileType::FromCid(function.string_specialization_cid());
       case RegExpMacroAssembler::kParamStartOffsetIndex:
         return CompileType::FromCid(kSmiCid);
       default: UNREACHABLE();
@@ -786,6 +791,11 @@
           cid = type_class.id();
         } else {
           if (FLAG_use_cha_deopt) {
+            if (FLAG_trace_cha) {
+              ISL_Print("  **(CHA) Computing exact type of parameters, "
+                  "no subclasses: %s\n",
+                  type_class.ToCString());
+            }
             thread->cha()->AddToLeafClasses(type_class);
             cid = type_class.id();
           }
diff --git a/runtime/vm/gc_marker.cc b/runtime/vm/gc_marker.cc
index 12ad8c4..42a08bd 100644
--- a/runtime/vm/gc_marker.cc
+++ b/runtime/vm/gc_marker.cc
@@ -15,111 +15,19 @@
 #include "vm/pages.h"
 #include "vm/raw_object.h"
 #include "vm/stack_frame.h"
+#include "vm/store_buffer.h"
 #include "vm/thread_pool.h"
 #include "vm/visitor.h"
 #include "vm/object_id_ring.h"
 
 namespace dart {
 
-// A simple chunked marking stack.
-class MarkingStack : public ValueObject {
- public:
-  MarkingStack()
-      : head_(new MarkingStackChunk()),
-        empty_chunks_(NULL),
-        marking_stack_(NULL),
-        top_(0) {
-    marking_stack_ = head_->MarkingStackChunkMemory();
-  }
+DEFINE_FLAG(int, marker_tasks, 1,
+            "The number of tasks to spawn during old gen GC marking (0 means "
+            "perform all marking on main thread).");
 
-  ~MarkingStack() {
-    // TODO(iposva): Consider caching a couple emtpy marking stack chunks.
-    ASSERT(IsEmpty());
-    delete head_;
-    MarkingStackChunk* next;
-    while (empty_chunks_ != NULL) {
-      next = empty_chunks_->next();
-      delete empty_chunks_;
-      empty_chunks_ = next;
-    }
-  }
-
-  bool IsEmpty() const {
-    return IsMarkingStackChunkEmpty() && (head_->next() == NULL);
-  }
-
-  void Push(RawObject* value) {
-    ASSERT(!IsMarkingStackChunkFull());
-    marking_stack_[top_] = value;
-    top_++;
-    if (IsMarkingStackChunkFull()) {
-      MarkingStackChunk* new_chunk;
-      if (empty_chunks_ == NULL) {
-        new_chunk = new MarkingStackChunk();
-      } else {
-        new_chunk = empty_chunks_;
-        empty_chunks_ = new_chunk->next();
-      }
-      new_chunk->set_next(head_);
-      head_ = new_chunk;
-      marking_stack_ = head_->MarkingStackChunkMemory();
-      top_ = 0;
-    }
-  }
-
-  RawObject* Pop() {
-    ASSERT(head_ != NULL);
-    ASSERT(!IsEmpty());
-    if (IsMarkingStackChunkEmpty()) {
-      MarkingStackChunk* empty_chunk = head_;
-      head_ = head_->next();
-      empty_chunk->set_next(empty_chunks_);
-      empty_chunks_ = empty_chunk;
-      marking_stack_ = head_->MarkingStackChunkMemory();
-      top_ = MarkingStackChunk::kMarkingStackChunkSize;
-    }
-    top_--;
-    return marking_stack_[top_];
-  }
-
- private:
-  class MarkingStackChunk {
-   public:
-    MarkingStackChunk() : next_(NULL) {}
-    ~MarkingStackChunk() {}
-
-    RawObject** MarkingStackChunkMemory() {
-      return &memory_[0];
-    }
-
-    MarkingStackChunk* next() const { return next_; }
-    void set_next(MarkingStackChunk* value) { next_ = value; }
-
-    static const uint32_t kMarkingStackChunkSize = 1024;
-
-   private:
-    RawObject* memory_[kMarkingStackChunkSize];
-    MarkingStackChunk* next_;
-
-    DISALLOW_COPY_AND_ASSIGN(MarkingStackChunk);
-  };
-
-  bool IsMarkingStackChunkFull() const {
-    return top_ == MarkingStackChunk::kMarkingStackChunkSize;
-  }
-
-  bool IsMarkingStackChunkEmpty() const {
-    return top_ == 0;
-  }
-
-  MarkingStackChunk* head_;
-  MarkingStackChunk* empty_chunks_;
-  RawObject** marking_stack_;
-  uint32_t top_;
-
-  DISALLOW_COPY_AND_ASSIGN(MarkingStack);
-};
-
+typedef StoreBufferBlock PointerBlock;  // TODO(koda): Rename to PointerBlock.
+typedef StoreBuffer MarkingStack;  // TODO(koda): Create shared base class.
 
 class DelaySet {
  private:
@@ -170,6 +78,70 @@
 };
 
 
+class SkippedCodeFunctions : public ZoneAllocated {
+ public:
+  SkippedCodeFunctions() {}
+
+  void Add(RawFunction* func) {
+    skipped_code_functions_.Add(func);
+  }
+
+  void DetachCode() {
+    intptr_t unoptimized_code_count = 0;
+    intptr_t current_code_count = 0;
+    for (int i = 0; i < skipped_code_functions_.length(); i++) {
+      RawFunction* func = skipped_code_functions_[i];
+      RawCode* code = func->ptr()->instructions_->ptr()->code_;
+      if (!code->IsMarked()) {
+        // If the code wasn't strongly visited through other references
+        // after skipping the function's code pointer, then we disconnect the
+        // code from the function.
+        func->StorePointer(
+            &(func->ptr()->instructions_),
+            StubCode::LazyCompile_entry()->code()->ptr()->instructions_);
+        uword entry_point = StubCode::LazyCompile_entry()->EntryPoint();
+        func->ptr()->entry_point_ = entry_point;
+        if (FLAG_log_code_drop) {
+          // NOTE: This code runs while GC is in progress and runs within
+          // a NoHandleScope block. Hence it is not okay to use a regular Zone
+          // or Scope handle. We use a direct stack handle so the raw pointer in
+          // this handle is not traversed. The use of a handle is mainly to
+          // be able to reuse the handle based code and avoid having to add
+          // helper functions to the raw object interface.
+          String name;
+          name = func->ptr()->name_;
+          ISL_Print("Detaching code: %s\n", name.ToCString());
+          current_code_count++;
+        }
+      }
+
+      code = func->ptr()->unoptimized_code_;
+      if (!code->IsMarked()) {
+        // If the code wasn't strongly visited through other references
+        // after skipping the function's code pointer, then we disconnect the
+        // code from the function.
+        func->StorePointer(&(func->ptr()->unoptimized_code_), Code::null());
+        if (FLAG_log_code_drop) {
+          unoptimized_code_count++;
+        }
+      }
+    }
+    if (FLAG_log_code_drop) {
+      ISL_Print("  total detached current: %" Pd "\n", current_code_count);
+      ISL_Print("  total detached unoptimized: %" Pd "\n",
+                unoptimized_code_count);
+    }
+    // Clean up.
+    skipped_code_functions_.Clear();
+  }
+
+ private:
+  GrowableArray<RawFunction*> skipped_code_functions_;
+
+  DISALLOW_COPY_AND_ASSIGN(SkippedCodeFunctions);
+};
+
+
 class MarkingVisitor : public ObjectPointerVisitor {
  public:
   MarkingVisitor(Isolate* isolate,
@@ -177,27 +149,49 @@
                  PageSpace* page_space,
                  MarkingStack* marking_stack,
                  DelaySet* delay_set,
-                 bool visit_function_code)
+                 SkippedCodeFunctions* skipped_code_functions)
       : ObjectPointerVisitor(isolate),
         thread_(Thread::Current()),
         heap_(heap),
         vm_heap_(Dart::vm_isolate()->heap()),
         class_table_(isolate->class_table()),
         page_space_(page_space),
-        marking_stack_(marking_stack),
+        work_list_(marking_stack),
         delay_set_(delay_set),
         visiting_old_object_(NULL),
-        visit_function_code_(visit_function_code) {
+        skipped_code_functions_(skipped_code_functions),
+        marked_bytes_(0) {
     ASSERT(heap_ != vm_heap_);
     ASSERT(thread_->isolate() == isolate);
   }
 
-  ~MarkingVisitor() {
-    // 'Finalize' should be explicitly called before destruction.
-    ASSERT(marking_stack_ == NULL);
-  }
+  uintptr_t marked_bytes() const { return marked_bytes_; }
 
-  MarkingStack* marking_stack() const { return marking_stack_; }
+  // Returns true if some non-zero amount of work was performed.
+  bool DrainMarkingStack() {
+    RawObject* raw_obj = work_list_.Pop();
+    if (raw_obj == NULL) {
+      ASSERT(visiting_old_object_ == NULL);
+      return false;
+    }
+    do {
+      VisitingOldObject(raw_obj);
+      const intptr_t class_id = raw_obj->GetClassId();
+      // Currently, classes are considered roots (see issue 18284), so at this
+      // point, they should all be marked.
+      ASSERT(isolate()->class_table()->At(class_id)->IsMarked());
+      if (class_id != kWeakPropertyCid) {
+        marked_bytes_ += raw_obj->VisitPointers(this);
+      } else {
+        RawWeakProperty* raw_weak = reinterpret_cast<RawWeakProperty*>(raw_obj);
+        marked_bytes_ += raw_weak->Size();
+        ProcessWeakProperty(raw_weak);
+      }
+      raw_obj = work_list_.Pop();
+    } while (raw_obj != NULL);
+    VisitingOldObject(NULL);
+    return true;
+  }
 
   void VisitPointers(RawObject** first, RawObject** last) {
     for (RawObject** current = first; current <= last; current++) {
@@ -205,10 +199,13 @@
     }
   }
 
-  bool visit_function_code() const { return visit_function_code_; }
+  bool visit_function_code() const {
+    return skipped_code_functions_ == NULL;
+  }
 
-  virtual MallocGrowableArray<RawFunction*>* skipped_code_functions() {
-    return &skipped_code_functions_;
+  virtual void add_skipped_code_function(RawFunction* func) {
+    ASSERT(!visit_function_code());
+    skipped_code_functions_->Add(func);
   }
 
   // Returns the mark bit. Sets the watch bit if unmarked. (The prior value of
@@ -245,11 +242,10 @@
 
   // Called when all marking is complete.
   void Finalize() {
-    if (!visit_function_code_) {
-      DetachCode();
+    work_list_.Finalize();
+    if (skipped_code_functions_ != NULL) {
+      skipped_code_functions_->DetachCode();
     }
-    // Fail fast on attempts to mark after finalizing.
-    marking_stack_ = NULL;
   }
 
   void VisitingOldObject(RawObject* obj) {
@@ -258,6 +254,57 @@
   }
 
  private:
+  class WorkList : public ValueObject {
+   public:
+    explicit WorkList(MarkingStack* marking_stack)
+        : marking_stack_(marking_stack) {
+      work_ = marking_stack_->PopEmptyBlock();
+    }
+
+    ~WorkList() {
+      ASSERT(work_ == NULL);
+      ASSERT(marking_stack_ == NULL);
+    }
+
+    // Returns NULL if no more work was found.
+    RawObject* Pop() {
+      ASSERT(work_ != NULL);
+      if (work_->IsEmpty()) {
+        // TODO(koda): Track over/underflow events and use in heuristics to
+        // distribute work and prevent degenerate flip-flopping.
+        PointerBlock* new_work = marking_stack_->PopNonEmptyBlock();
+        if (new_work == NULL) {
+          return NULL;
+        }
+        marking_stack_->PushBlock(work_, false);
+        work_ = new_work;
+      }
+      return work_->Pop();
+    }
+
+    void Push(RawObject* raw_obj) {
+      if (work_->IsFull()) {
+        // TODO(koda): Track over/underflow events and use in heuristics to
+        // distribute work and prevent degenerate flip-flopping.
+        marking_stack_->PushBlock(work_, false);
+        work_ = marking_stack_->PopEmptyBlock();
+      }
+      work_->Push(raw_obj);
+    }
+
+    void Finalize() {
+      ASSERT(work_->IsEmpty());
+      marking_stack_->PushBlock(work_, false);
+      work_ = NULL;
+      // Fail fast on attempts to mark after finalizing.
+      marking_stack_ = NULL;
+    }
+
+   private:
+    PointerBlock* work_;
+    MarkingStack* marking_stack_;
+  };
+
   void MarkAndPush(RawObject* raw_obj) {
     ASSERT(raw_obj->IsHeapObject());
     ASSERT((FLAG_verify_before_gc || FLAG_verify_before_gc) ?
@@ -273,7 +320,7 @@
     if (is_watched) {
       delay_set_->VisitValuesForKey(raw_obj, this);
     }
-    marking_stack_->Push(raw_obj);
+    work_list_.Push(raw_obj);
   }
 
   void MarkObject(RawObject* raw_obj, RawObject** p) {
@@ -307,63 +354,16 @@
     MarkAndPush(raw_obj);
   }
 
-  void DetachCode() {
-    intptr_t unoptimized_code_count = 0;
-    intptr_t current_code_count = 0;
-    for (int i = 0; i < skipped_code_functions_.length(); i++) {
-      RawFunction* func = skipped_code_functions_[i];
-      RawCode* code = func->ptr()->instructions_->ptr()->code_;
-      if (!code->IsMarked()) {
-        // If the code wasn't strongly visited through other references
-        // after skipping the function's code pointer, then we disconnect the
-        // code from the function.
-        func->StorePointer(
-            &(func->ptr()->instructions_),
-            StubCode::LazyCompile_entry()->code()->ptr()->instructions_);
-        if (FLAG_log_code_drop) {
-          // NOTE: This code runs while GC is in progress and runs within
-          // a NoHandleScope block. Hence it is not okay to use a regular Zone
-          // or Scope handle. We use a direct stack handle so the raw pointer in
-          // this handle is not traversed. The use of a handle is mainly to
-          // be able to reuse the handle based code and avoid having to add
-          // helper functions to the raw object interface.
-          String name;
-          name = func->ptr()->name_;
-          ISL_Print("Detaching code: %s\n", name.ToCString());
-          current_code_count++;
-        }
-      }
-
-      code = func->ptr()->unoptimized_code_;
-      if (!code->IsMarked()) {
-        // If the code wasn't strongly visited through other references
-        // after skipping the function's code pointer, then we disconnect the
-        // code from the function.
-        func->StorePointer(&(func->ptr()->unoptimized_code_), Code::null());
-        if (FLAG_log_code_drop) {
-          unoptimized_code_count++;
-        }
-      }
-    }
-    if (FLAG_log_code_drop) {
-      ISL_Print("  total detached current: %" Pd "\n", current_code_count);
-      ISL_Print("  total detached unoptimized: %" Pd "\n",
-                unoptimized_code_count);
-    }
-    // Clean up.
-    skipped_code_functions_.Clear();
-  }
-
   Thread* thread_;
   Heap* heap_;
   Heap* vm_heap_;
   ClassTable* class_table_;
   PageSpace* page_space_;
-  MarkingStack* marking_stack_;
+  WorkList work_list_;
   DelaySet* delay_set_;
   RawObject* visiting_old_object_;
-  const bool visit_function_code_;
-  MallocGrowableArray<RawFunction*> skipped_code_functions_;
+  SkippedCodeFunctions* skipped_code_functions_;
+  uintptr_t marked_bytes_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(MarkingVisitor);
 };
@@ -483,9 +483,7 @@
         state->DelayWeakReferenceSet(reference_set);
       }
     }
-    if (!visitor->marking_stack()->IsEmpty()) {
-      DrainMarkingStack(isolate, visitor);
-    } else {
+    if (!visitor->DrainMarkingStack()) {
       // Break out of the loop if there has been no forward process.
       // All key objects in the weak reference sets are unreachable
       // so we reset the weak reference sets queue.
@@ -500,27 +498,6 @@
 }
 
 
-void GCMarker::DrainMarkingStack(Isolate* isolate,
-                                 MarkingVisitor* visitor) {
-  while (!visitor->marking_stack()->IsEmpty()) {
-    RawObject* raw_obj = visitor->marking_stack()->Pop();
-    visitor->VisitingOldObject(raw_obj);
-    const intptr_t class_id = raw_obj->GetClassId();
-    // Currently, classes are considered roots (see issue 18284), so at this
-    // point, they should all be marked.
-    ASSERT(isolate->class_table()->At(class_id)->IsMarked());
-    if (class_id != kWeakPropertyCid) {
-      marked_bytes_ += raw_obj->VisitPointers(visitor);
-    } else {
-      RawWeakProperty* raw_weak = reinterpret_cast<RawWeakProperty*>(raw_obj);
-      marked_bytes_ += raw_weak->Size();
-      visitor->ProcessWeakProperty(raw_weak);
-    }
-  }
-  visitor->VisitingOldObject(NULL);
-}
-
-
 void GCMarker::ProcessWeakTables(PageSpace* page_space) {
   for (int sel = 0;
        sel < Heap::kNumWeakSelectors;
@@ -568,26 +545,169 @@
 }
 
 
+class MarkTask : public ThreadPool::Task {
+ public:
+  MarkTask(GCMarker* marker,
+           Isolate* isolate,
+           Heap* heap,
+           PageSpace* page_space,
+           MarkingStack* marking_stack,
+           DelaySet* delay_set,
+           bool collect_code,
+           bool visit_prologue_weak_persistent_handles)
+      : marker_(marker),
+        isolate_(isolate),
+        heap_(heap),
+        page_space_(page_space),
+        marking_stack_(marking_stack),
+        delay_set_(delay_set),
+        collect_code_(collect_code),
+        visit_prologue_weak_persistent_handles_(
+            visit_prologue_weak_persistent_handles) {
+  }
+
+  virtual void Run() {
+    Thread::EnterIsolateAsHelper(isolate_, true);
+    {
+      StackZone stack_zone(Thread::Current());
+      Zone* zone = stack_zone.GetZone();
+      SkippedCodeFunctions* skipped_code_functions =
+        collect_code_ ? new(zone) SkippedCodeFunctions() : NULL;
+      MarkingVisitor visitor(isolate_, heap_, page_space_, marking_stack_,
+                             delay_set_, skipped_code_functions);
+      // Phase 1: Populate and drain marking stack in task.
+      // TODO(koda): Split root iteration work among multiple tasks.
+      marker_->IterateRoots(isolate_, &visitor,
+                            visit_prologue_weak_persistent_handles_);
+      visitor.DrainMarkingStack();
+      marker_->TaskSync();
+      // Phase 2: Weak processing and follow-up marking on main thread.
+      marker_->TaskSync();
+      // Phase 3: Finalize results from all markers (detach code, etc.).
+      marker_->FinalizeResultsFrom(&visitor);
+    }
+    Thread::ExitIsolateAsHelper(true);
+    // This task is done. Notify the original thread.
+    marker_->TaskNotifyDone();
+  }
+
+ private:
+  GCMarker* marker_;
+  Isolate* isolate_;
+  Heap* heap_;
+  PageSpace* page_space_;
+  MarkingStack* marking_stack_;
+  DelaySet* delay_set_;
+  bool collect_code_;
+  bool visit_prologue_weak_persistent_handles_;
+
+  DISALLOW_COPY_AND_ASSIGN(MarkTask);
+};
+
+
+void GCMarker::MainSync(intptr_t num_tasks) {
+  MonitorLocker ml(&monitor_);
+  while (done_count_ < num_tasks) {
+    ml.Wait();
+  }
+  done_count_ = 0;  // Tasks may now resume.
+  // TODO(koda): Add barrier utility with two condition variables to allow for
+  // Notify rather than NotifyAll. Also use it for safepoints.
+  ml.NotifyAll();
+}
+
+
+void GCMarker::TaskNotifyDone() {
+  MonitorLocker ml(&monitor_);
+  ++done_count_;
+  // TODO(koda): Add barrier utility with two condition variables to allow for
+  // Notify rather than NotifyAll. Also use it for safepoints.
+  ml.NotifyAll();
+}
+
+
+void GCMarker::TaskSync() {
+  MonitorLocker ml(&monitor_);
+  ++done_count_;
+  ml.NotifyAll();  // Notify controller that this thread reached end of phase.
+  ASSERT(done_count_ > 0);
+  while (done_count_ > 0) {
+    // Wait for the controller to release into next phase.
+    ml.Wait();
+  }
+}
+
+
+void GCMarker::FinalizeResultsFrom(MarkingVisitor* visitor) {
+  {
+    MonitorLocker ml(&monitor_);
+    marked_bytes_ += visitor->marked_bytes();
+  }
+  visitor->Finalize();
+}
+
+
 void GCMarker::MarkObjects(Isolate* isolate,
                            PageSpace* page_space,
                            bool invoke_api_callbacks,
                            bool collect_code) {
-  const bool visit_function_code = !collect_code;
   Prologue(isolate, invoke_api_callbacks);
   // The API prologue/epilogue may create/destroy zones, so we must not
   // depend on zone allocations surviving beyond the epilogue callback.
   {
-    StackZone zone(isolate);
+    StackZone stack_zone(Thread::Current());
+    Zone* zone = stack_zone.GetZone();
     MarkingStack marking_stack;
     DelaySet delay_set;
-    MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
-                        &delay_set, visit_function_code);
-    IterateRoots(isolate, &mark, !invoke_api_callbacks);
-    DrainMarkingStack(isolate, &mark);
-    IterateWeakReferences(isolate, &mark);
-    MarkingWeakVisitor mark_weak;
-    IterateWeakRoots(isolate, &mark_weak, invoke_api_callbacks);
-    mark.Finalize();
+    const bool visit_prologue_weak_persistent_handles = !invoke_api_callbacks;
+    marked_bytes_ = 0;
+    const int num_tasks = FLAG_marker_tasks;
+    if (num_tasks == 0) {
+      // Mark everything on main thread.
+      SkippedCodeFunctions* skipped_code_functions =
+          collect_code ? new(zone) SkippedCodeFunctions() : NULL;
+      MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
+                          &delay_set, skipped_code_functions);
+      IterateRoots(isolate, &mark, visit_prologue_weak_persistent_handles);
+      mark.DrainMarkingStack();
+      IterateWeakReferences(isolate, &mark);
+      MarkingWeakVisitor mark_weak;
+      IterateWeakRoots(isolate, &mark_weak,
+                       !visit_prologue_weak_persistent_handles);
+      // All marking done; detach code, etc.
+      FinalizeResultsFrom(&mark);
+    } else {
+      if (num_tasks > 1) {
+        // TODO(koda): Support multiple:
+        // 1. non-concurrent tasks, after splitting root iteration work, then
+        // 2. concurrent tasks, after synchronizing headers.
+        FATAL("Multiple marking tasks not yet supported");
+      }
+      // Phase 1: Populate and drain marking stack in task.
+      MarkTask* mark_task =
+          new MarkTask(this, isolate, heap_, page_space, &marking_stack,
+                       &delay_set, collect_code,
+                       visit_prologue_weak_persistent_handles);
+      ThreadPool* pool = Dart::thread_pool();
+      pool->Run(mark_task);
+      MainSync(num_tasks);
+      // Phase 2: Weak processing and follow-up marking on main thread.
+      SkippedCodeFunctions* skipped_code_functions =
+          collect_code ? new(zone) SkippedCodeFunctions() : NULL;
+      MarkingVisitor mark(isolate, heap_, page_space, &marking_stack,
+                          &delay_set, skipped_code_functions);
+      IterateWeakReferences(isolate, &mark);
+      MarkingWeakVisitor mark_weak;
+      IterateWeakRoots(isolate, &mark_weak,
+                       !visit_prologue_weak_persistent_handles);
+      // TODO(koda): Move this into Phase 3 after making ISL_Print thread-safe
+      // (used in SkippedCodeFunctions::DetachCode).
+      FinalizeResultsFrom(&mark);
+      MainSync(num_tasks);
+      // Phase 3: Finalize results from all markers (detach code, etc.).
+      MainSync(num_tasks);
+      // Finalization complete and all tasks exited.
+    }
     delay_set.ClearReferences();
     ProcessWeakTables(page_space);
     ProcessObjectIdTable(isolate);
diff --git a/runtime/vm/gc_marker.h b/runtime/vm/gc_marker.h
index 978cf3d..87fed84 100644
--- a/runtime/vm/gc_marker.h
+++ b/runtime/vm/gc_marker.h
@@ -22,7 +22,8 @@
 // of the mark-sweep collection. The marking bit used is defined in RawObject.
 class GCMarker : public ValueObject {
  public:
-  explicit GCMarker(Heap* heap) : heap_(heap), marked_bytes_(0) { }
+  explicit GCMarker(Heap* heap)
+      : heap_(heap), marked_bytes_(0), done_count_(0) { }
   ~GCMarker() { }
 
   void MarkObjects(Isolate* isolate,
@@ -42,14 +43,25 @@
                         HandleVisitor* visitor,
                         bool visit_prologue_weak_persistent_handles);
   void IterateWeakReferences(Isolate* isolate, MarkingVisitor* visitor);
-  void DrainMarkingStack(Isolate* isolate, MarkingVisitor* visitor);
   void ProcessWeakTables(PageSpace* page_space);
   void ProcessObjectIdTable(Isolate* isolate);
 
+  // Synchronization between GCMarker's main thread and its marking tasks.
+  // Called by main thread: wait for 'num_tasks' tasks, then let them resume.
+  void MainSync(intptr_t num_tasks);
+  // Called by tasks: notify main thread; wait until it lets us continue.
+  void TaskSync();
+  // Called by tasks: notify main thread, but don't wait (used for exiting).
+  void TaskNotifyDone();
+  // Called by anyone: finalize and accumulate stats from 'visitor'.
+  void FinalizeResultsFrom(MarkingVisitor* visitor);
 
+  Monitor monitor_;  // Protects marked_bytes_ and done_count_.
   Heap* heap_;
   uintptr_t marked_bytes_;
+  intptr_t done_count_;
 
+  friend class MarkTask;
   DISALLOW_IMPLICIT_CONSTRUCTORS(GCMarker);
 };
 
diff --git a/runtime/vm/gc_sweeper.cc b/runtime/vm/gc_sweeper.cc
index 4cd2243..6332dee 100644
--- a/runtime/vm/gc_sweeper.cc
+++ b/runtime/vm/gc_sweeper.cc
@@ -10,6 +10,7 @@
 #include "vm/lockers.h"
 #include "vm/pages.h"
 #include "vm/thread_pool.h"
+#include "vm/thread_registry.h"
 
 namespace dart {
 
@@ -120,6 +121,7 @@
     HeapPage* prev_page = NULL;
 
     while (page != NULL) {
+      task_isolate_->thread_registry()->CheckSafepoint();
       HeapPage* next_page = page->next();
       ASSERT(page->type() == HeapPage::kData);
       bool page_in_use = sweeper.SweepPage(page, freelist_, false);
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index 597756d..dc7932e 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -90,6 +90,37 @@
 #endif
 
 
+// Macros to get the contents of the fp register.
+#if defined(TARGET_OS_WINDOWS)
+
+#if defined(HOST_ARCH_IA32)
+#define COPY_FP_REGISTER(fp) __asm { mov fp, ebp };  // NOLINT
+#elif defined(HOST_ARCH_X64)
+#define COPY_FP_REGISTER(fp) UNIMPLEMENTED();
+#else
+#error Unknown host architecture.
+#endif
+
+#else  // !defined(TARGET_OS_WINDOWS))
+
+// Assume GCC-like inline syntax is valid.
+#if defined(HOST_ARCH_IA32)
+#define COPY_FP_REGISTER(fp) asm volatile ("movl %%ebp, %0" : "=r" (fp) );
+#elif defined(HOST_ARCH_X64)
+#define COPY_FP_REGISTER(fp) asm volatile ("movq %%rbp, %0" : "=r" (fp) );
+#elif defined(HOST_ARCH_ARM)
+#define COPY_FP_REGISTER(fp) asm volatile ("mov %0, r11" : "=r" (fp) );
+#elif defined(HOST_ARCH_ARM64)
+#define COPY_FP_REGISTER(fp) asm volatile ("mov %0, x29" : "=r" (fp) );
+#elif defined(HOST_ARCH_MIPS)
+#define COPY_FP_REGISTER(fp) asm volatile ("move %0, $fp" : "=r" (fp) );
+#else
+#error Unknown host architecture.
+#endif
+
+
+#endif  // !defined(TARGET_OS_WINDOWS))
+
 }  // namespace dart
 
 #endif  // VM_GLOBALS_H_
diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
index 1e7c204..88163fb 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -195,6 +195,57 @@
 };
 
 
+// T must be a Handle type.
+template<typename T, typename B>
+class BaseGrowableHandlePtrArray : public B {
+ public:
+  BaseGrowableHandlePtrArray(Zone* zone, intptr_t initial_capacity)
+      : zone_(zone), array_(zone, initial_capacity) {}
+
+  // Use unique zone handles to store objects.
+  void Add(const T& t) {
+    array_.Add(&T::ZoneHandle(zone_, t.raw()));
+  }
+
+  T& operator[](intptr_t index) const {
+    return *array_[index];
+  }
+
+  const T& At(intptr_t index) const {
+    return operator[](index);
+  }
+
+  intptr_t length() const { return array_.length(); }
+
+  const GrowableArray<T*>& growable_array() const { return array_; }
+
+ private:
+  Zone* zone_;
+  GrowableArray<T*> array_;
+
+  DISALLOW_COPY_AND_ASSIGN(BaseGrowableHandlePtrArray);
+};
+
+
+template<typename T>
+class GrowableHandlePtrArray :
+    public BaseGrowableHandlePtrArray<T, ValueObject> {
+ public:
+  GrowableHandlePtrArray(Zone* zone, intptr_t initial_capacity)
+      : BaseGrowableHandlePtrArray<T, ValueObject>(zone, initial_capacity) {}
+};
+
+
+template<typename T>
+class ZoneGrowableHandlePtrArray :
+    public BaseGrowableHandlePtrArray<T, ZoneAllocated> {
+ public:
+  ZoneGrowableHandlePtrArray(Zone* zone, intptr_t initial_capacity)
+      : BaseGrowableHandlePtrArray<T, ZoneAllocated>(zone, initial_capacity) {}
+};
+
+
+
 class Malloc : public AllStatic {
  public:
   template <class T>
diff --git a/runtime/vm/growable_array_test.cc b/runtime/vm/growable_array_test.cc
index 09c1605..fedb9c8 100644
--- a/runtime/vm/growable_array_test.cc
+++ b/runtime/vm/growable_array_test.cc
@@ -96,4 +96,20 @@
   EXPECT_EQ(4, g.Last());
 }
 
+
+TEST_CASE(GrowableHandlePtr) {
+  Zone* zone = Thread::Current()->zone();
+  GrowableHandlePtrArray<const String> test1(zone, 1);
+  EXPECT_EQ(0, test1.length());
+  test1.Add(Symbols::Int());
+  EXPECT(test1[0].raw() == Symbols::Int().raw());
+  EXPECT_EQ(1, test1.length());
+
+  ZoneGrowableHandlePtrArray<const String>* test2 =
+      new ZoneGrowableHandlePtrArray<const String>(zone, 1);
+  test2->Add(Symbols::GetterPrefix());
+  EXPECT((*test2)[0].raw() == Symbols::GetterPrefix().raw());
+  EXPECT_EQ(1, test2->length());
+}
+
 }  // namespace dart
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
index 5c20d04..f2caa9e 100644
--- a/runtime/vm/hash_map.h
+++ b/runtime/vm/hash_map.h
@@ -5,6 +5,8 @@
 #ifndef VM_HASH_MAP_H_
 #define VM_HASH_MAP_H_
 
+#include "vm/zone.h"
+
 namespace dart {
 
 template <typename KeyValueTrait>
diff --git a/runtime/vm/hash_table.h b/runtime/vm/hash_table.h
index 195c6a5..592cf07 100644
--- a/runtime/vm/hash_table.h
+++ b/runtime/vm/hash_table.h
@@ -41,7 +41,7 @@
 // lookup key types (e.g., look up a char* in a set of String objects), and
 // any equality and hash code computation.
 //
-// The classes all wrap an Array handle, and metods like HashSet::Insert can
+// The classes all wrap an Array handle, and methods like HashSet::Insert can
 // trigger growth into a new RawArray, updating the handle. Debug mode asserts
 // that 'Release' was called once to access the final array before destruction.
 // NOTE: The handle returned by 'Release' is cleared by ~HashTable.
@@ -85,20 +85,20 @@
 class HashTable : public ValueObject {
  public:
   typedef KeyTraits Traits;
-  // Uses 'isolate' for handle allocation. 'Release' must be called at the end
+  // Uses 'zone' for handle allocation. 'Release' must be called at the end
   // to obtain the final table after potential growth/shrinkage.
-  HashTable(Isolate* isolate, RawArray* data)
-      : isolate_(isolate),
-        key_handle_(Object::Handle(isolate_)),
-        smi_handle_(Smi::Handle(isolate_)),
-        data_(&Array::Handle(isolate_, data)),
+  HashTable(Zone* zone, RawArray* data)
+      : zone_(zone),
+        key_handle_(Object::Handle(zone_)),
+        smi_handle_(Smi::Handle(zone_)),
+        data_(&Array::Handle(zone_, data)),
         released_data_(NULL) {}
-  // Like above, except uses current isolate.
+  // Like above, except uses current zone.
   explicit HashTable(RawArray* data)
-      : isolate_(Isolate::Current()),
-        key_handle_(Object::Handle(isolate_)),
-        smi_handle_(Smi::Handle(isolate_)),
-        data_(&Array::Handle(isolate_, data)),
+      : zone_(Thread::Current()->zone()),
+        key_handle_(Object::Handle(zone_)),
+        smi_handle_(Smi::Handle(zone_)),
+        data_(&Array::Handle(zone_, data)),
         released_data_(NULL) {}
 
   // Returns the final table. The handle is cleared when this HashTable is
@@ -296,7 +296,7 @@
   }
 
   intptr_t GetSmiValueAt(intptr_t index) const {
-    ASSERT(Object::Handle(isolate(), data_->At(index)).IsSmi());
+    ASSERT(Object::Handle(zone(), data_->At(index)).IsSmi());
     return Smi::Value(Smi::RawCast(data_->At(index)));
   }
 
@@ -309,9 +309,9 @@
     SetSmiValueAt(index, (GetSmiValueAt(index) + delta));
   }
 
-  Isolate* isolate() const { return isolate_; }
+  Zone* zone() const { return zone_; }
 
-  Isolate* isolate_;
+  Zone* zone_;
   Object& key_handle_;
   Smi& smi_handle_;
   // Exactly one of these is non-NULL, depending on whether Release was called.
@@ -329,8 +329,8 @@
   typedef HashTable<KeyTraits, kUserPayloadSize, 0> BaseTable;
   static const intptr_t kPayloadSize = kUserPayloadSize;
   explicit UnorderedHashTable(RawArray* data) : BaseTable(data) {}
-  UnorderedHashTable(Isolate* isolate, RawArray* data)
-      : BaseTable(isolate, data) {}
+  UnorderedHashTable(Zone* zone, RawArray* data)
+      : BaseTable(zone, data) {}
   // Note: Does not check for concurrent modification.
   class Iterator {
    public:
@@ -367,8 +367,8 @@
   typedef HashTable<KeyTraits, kUserPayloadSize + 1, 1> BaseTable;
   static const intptr_t kPayloadSize = kUserPayloadSize;
   static const intptr_t kNextEnumIndex = BaseTable::kMetaDataIndex;
-  EnumIndexHashTable(Isolate* isolate, RawArray* data)
-      : BaseTable(isolate, data) {}
+  EnumIndexHashTable(Zone* zone, RawArray* data)
+      : BaseTable(zone, data) {}
   explicit EnumIndexHashTable(RawArray* data) : BaseTable(data) {}
   // Note: Does not check for concurrent modification.
   class Iterator {
@@ -503,7 +503,7 @@
 class HashMap : public BaseIterTable {
  public:
   explicit HashMap(RawArray* data) : BaseIterTable(data) {}
-  HashMap(Isolate* isolate, RawArray* data) : BaseIterTable(isolate, data) {}
+  HashMap(Zone* zone, RawArray* data) : BaseIterTable(zone, data) {}
   template<typename Key>
   RawObject* GetOrNull(const Key& key, bool* present = NULL) const {
     intptr_t entry = BaseIterTable::FindKey(key);
@@ -589,7 +589,7 @@
  public:
   typedef HashMap<UnorderedHashTable<KeyTraits, 1> > BaseMap;
   explicit UnorderedHashMap(RawArray* data) : BaseMap(data) {}
-  UnorderedHashMap(Isolate* isolate, RawArray* data) : BaseMap(isolate, data) {}
+  UnorderedHashMap(Zone* zone, RawArray* data) : BaseMap(zone, data) {}
 };
 
 
@@ -598,7 +598,7 @@
  public:
   typedef HashMap<EnumIndexHashTable<KeyTraits, 1> > BaseMap;
   explicit EnumIndexHashMap(RawArray* data) : BaseMap(data) {}
-  EnumIndexHashMap(Isolate* isolate, RawArray* data) : BaseMap(isolate, data) {}
+  EnumIndexHashMap(Zone* zone, RawArray* data) : BaseMap(zone, data) {}
 };
 
 
@@ -606,7 +606,7 @@
 class HashSet : public BaseIterTable {
  public:
   explicit HashSet(RawArray* data) : BaseIterTable(data) {}
-  HashSet(Isolate* isolate, RawArray* data) : BaseIterTable(isolate, data) {}
+  HashSet(Zone* zone, RawArray* data) : BaseIterTable(zone, data) {}
   bool Insert(const Object& key) {
     EnsureCapacity();
     intptr_t entry = -1;
@@ -683,7 +683,7 @@
  public:
   typedef HashSet<UnorderedHashTable<KeyTraits, 0> > BaseSet;
   explicit UnorderedHashSet(RawArray* data) : BaseSet(data) {}
-  UnorderedHashSet(Isolate* isolate, RawArray* data) : BaseSet(isolate, data) {}
+  UnorderedHashSet(Zone* zone, RawArray* data) : BaseSet(zone, data) {}
 };
 
 
@@ -692,7 +692,7 @@
  public:
   typedef HashSet<EnumIndexHashTable<KeyTraits, 0> > BaseSet;
   explicit EnumIndexHashSet(RawArray* data) : BaseSet(data) {}
-  EnumIndexHashSet(Isolate* isolate, RawArray* data) : BaseSet(isolate, data) {}
+  EnumIndexHashSet(Zone* zone, RawArray* data) : BaseSet(zone, data) {}
 };
 
 }  // namespace dart
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 6897af8..f599742 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -91,12 +91,6 @@
 
 uword Heap::AllocateOld(intptr_t size, HeapPage::PageType type) {
   ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
-#if defined(DEBUG)
-  // Currently, allocation from non-Dart threads must not trigger GC.
-  if (GrowthControlState()) {
-    isolate()->AssertCurrentThreadIsMutator();
-  }
-#endif
   uword addr = old_space_.TryAllocate(size, type);
   if (addr != 0) {
     return addr;
@@ -231,12 +225,15 @@
   MonitorLocker ml(old_space_->tasks_lock());
 #if defined(DEBUG)
   // We currently don't support nesting of HeapIterationScopes.
-  ASSERT(!old_space_->is_iterating_);
-  old_space_->is_iterating_ = true;
+  ASSERT(old_space_->iterating_thread_ != thread());
 #endif
   while (old_space_->tasks() > 0) {
     ml.Wait();
   }
+#if defined(DEBUG)
+  ASSERT(old_space_->iterating_thread_ == NULL);
+  old_space_->iterating_thread_ = thread();
+#endif
   old_space_->set_tasks(1);
 }
 
@@ -244,8 +241,8 @@
 HeapIterationScope::~HeapIterationScope() {
   MonitorLocker ml(old_space_->tasks_lock());
 #if defined(DEBUG)
-  ASSERT(old_space_->is_iterating_);
-  old_space_->is_iterating_ = false;
+  ASSERT(old_space_->iterating_thread_ == thread());
+  old_space_->iterating_thread_ = NULL;
 #endif
   ASSERT(old_space_->tasks() == 1);
   old_space_->set_tasks(0);
@@ -309,18 +306,39 @@
 }
 
 
+bool Heap::gc_in_progress() {
+  MutexLocker ml(&gc_in_progress_mutex_);
+  return gc_in_progress_;
+}
+
+
+void Heap::BeginGC() {
+  MutexLocker ml(&gc_in_progress_mutex_);
+  ASSERT(!gc_in_progress_);
+  gc_in_progress_ = true;
+}
+
+
+void Heap::EndGC() {
+  MutexLocker ml(&gc_in_progress_mutex_);
+  ASSERT(gc_in_progress_);
+  gc_in_progress_ = false;
+}
+
+
 void Heap::CollectGarbage(Space space,
                           ApiCallbacks api_callbacks,
                           GCReason reason) {
-  TIMERSCOPE(isolate(), time_gc);
+  Thread* thread = Thread::Current();
   bool invoke_api_callbacks = (api_callbacks == kInvokeApiCallbacks);
   switch (space) {
     case kNew: {
-      VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
-      TimelineDurationScope tds(isolate(),
+      RecordBeforeGC(kNew, reason);
+      TimerScope timer(true, &(isolate()->timer_list().time_gc()), thread);
+      VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
+      TimelineDurationScope tds(thread,
                                 isolate()->GetGCStream(),
                                 "CollectNewGeneration");
-      RecordBeforeGC(kNew, reason);
       UpdateClassHeapStatsBeforeGC(kNew);
       new_space_.Scavenge(invoke_api_callbacks);
       isolate()->class_table()->UpdatePromoted();
@@ -335,11 +353,12 @@
     }
     case kOld:
     case kCode: {
-      VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
-      TimelineDurationScope tds(isolate(),
+      RecordBeforeGC(kOld, reason);
+      TimerScope timer(true, &(isolate()->timer_list().time_gc()), thread);
+      VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
+      TimelineDurationScope tds(thread,
                                 isolate()->GetGCStream(),
                                 "CollectOldGeneration");
-      RecordBeforeGC(kOld, reason);
       UpdateClassHeapStatsBeforeGC(kOld);
       old_space_.MarkSweep(invoke_api_callbacks);
       RecordAfterGC();
@@ -373,13 +392,14 @@
 
 
 void Heap::CollectAllGarbage() {
-  TIMERSCOPE(isolate(), time_gc);
+  Thread* thread = Thread::Current();
   {
-    VMTagScope tagScope(isolate(), VMTag::kGCNewSpaceTagId);
-    TimelineDurationScope tds(isolate(),
+    RecordBeforeGC(kNew, kFull);
+    TimerScope timer(true, &(isolate()->timer_list().time_gc()), thread);
+    VMTagScope tagScope(thread, VMTag::kGCNewSpaceTagId);
+    TimelineDurationScope tds(thread,
                               isolate()->GetGCStream(),
                               "CollectNewGeneration");
-    RecordBeforeGC(kNew, kFull);
     UpdateClassHeapStatsBeforeGC(kNew);
     new_space_.Scavenge(kInvokeApiCallbacks);
     isolate()->class_table()->UpdatePromoted();
@@ -388,11 +408,12 @@
     PrintStats();
   }
   {
-    VMTagScope tagScope(isolate(), VMTag::kGCOldSpaceTagId);
-    TimelineDurationScope tds(isolate(),
+    RecordBeforeGC(kOld, kFull);
+    TimerScope timer(true, &(isolate()->timer_list().time_gc()), thread);
+    VMTagScope tagScope(thread, VMTag::kGCOldSpaceTagId);
+    TimelineDurationScope tds(thread,
                               isolate()->GetGCStream(),
                               "CollectOldGeneration");
-    RecordBeforeGC(kOld, kFull);
     UpdateClassHeapStatsBeforeGC(kOld);
     old_space_.MarkSweep(kInvokeApiCallbacks);
     RecordAfterGC();
@@ -413,11 +434,12 @@
 void Heap::UpdatePretenurePolicy() {
   if (FLAG_disable_alloc_stubs_after_gc) {
     ClassTable* table = isolate_->class_table();
+    Zone* zone = Thread::Current()->zone();
     for (intptr_t cid = 1; cid < table->NumCids(); ++cid) {
       if (((cid >= kNumPredefinedCids) || (cid == kArrayCid)) &&
           table->IsValidIndex(cid) &&
           table->HasValidClassAt(cid)) {
-        const Class& cls = Class::Handle(isolate_, table->At(cid));
+        const Class& cls = Class::Handle(zone, table->At(cid));
         cls.DisableAllocationStub();
       }
     }
@@ -651,8 +673,7 @@
 
 
 void Heap::RecordBeforeGC(Space space, GCReason reason) {
-  ASSERT(!gc_in_progress_);
-  gc_in_progress_ = true;
+  BeginGC();
   stats_.num_++;
   stats_.space_ = space;
   stats_.reason_ = reason;
@@ -682,8 +703,7 @@
   }
   stats_.after_.new_ = new_space_.GetCurrentUsage();
   stats_.after_.old_ = old_space_.GetCurrentUsage();
-  ASSERT(gc_in_progress_);
-  gc_in_progress_ = false;
+  EndGC();
   if (Service::gc_stream.enabled()) {
     ServiceEvent event(Isolate::Current(), ServiceEvent::kGC);
     event.set_gc_stats(&stats_);
@@ -746,18 +766,6 @@
 }
 
 
-#if defined(DEBUG)
-NoSafepointScope::NoSafepointScope() : StackResource(Thread::Current()) {
-  thread()->IncrementNoSafepointScopeDepth();
-}
-
-
-NoSafepointScope::~NoSafepointScope() {
-  thread()->DecrementNoSafepointScopeDepth();
-}
-#endif  // defined(DEBUG)
-
-
 NoHeapGrowthControlScope::NoHeapGrowthControlScope()
     : StackResource(Isolate::Current()) {
     Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 05e0ef0..1a5f2b6 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -219,7 +219,7 @@
     stats_.data_[id] = value;
   }
 
-  bool gc_in_progress() const { return gc_in_progress_; }
+  bool gc_in_progress();
 
   static bool IsAllocatableInNewSpace(intptr_t size) {
     return size <= kNewAllocatableSize;
@@ -297,6 +297,10 @@
   void UpdateClassHeapStatsBeforeGC(Heap::Space space);
   void UpdatePretenurePolicy();
 
+  // Updates gc_in_progress.
+  void BeginGC();
+  void EndGC();
+
   // If this heap is non-empty, updates start and end to the smallest range that
   // contains both the original [start, end) and the [lowest, highest) addresses
   // of this heap.
@@ -318,6 +322,7 @@
   bool read_only_;
 
   // GC on the heap is in progress.
+  Mutex gc_in_progress_mutex_;
   bool gc_in_progress_;
 
   int pretenure_policy_;
@@ -328,26 +333,6 @@
 };
 
 
-// Within a NoSafepointScope, the thread must not reach any safepoint. Used
-// around code that manipulates raw object pointers directly without handles.
-#if defined(DEBUG)
-class NoSafepointScope : public StackResource {
- public:
-  NoSafepointScope();
-  ~NoSafepointScope();
- private:
-  DISALLOW_COPY_AND_ASSIGN(NoSafepointScope);
-};
-#else  // defined(DEBUG)
-class NoSafepointScope : public ValueObject {
- public:
-  NoSafepointScope() {}
- private:
-  DISALLOW_COPY_AND_ASSIGN(NoSafepointScope);
-};
-#endif  // defined(DEBUG)
-
-
 class HeapIterationScope : public StackResource {
  public:
   HeapIterationScope();
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 9c0a808..9e0b653 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -168,7 +168,7 @@
   const char* type_name = "?";
   if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
     const Class& cls =
-      Class::Handle(Isolate::Current()->class_table()->At(cid_));
+        Class::Handle(Isolate::Current()->class_table()->At(cid_));
     type_name = String::Handle(cls.PrettyName()).ToCString();
   } else if (type_ != NULL &&
              !type_->Equals(Type::Handle(Type::DynamicType()))) {
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index 6709c19..9002d50 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -16,10 +16,8 @@
 CallPattern::CallPattern(uword pc, const Code& code)
     : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
       end_(pc),
-      args_desc_load_end_(0),
       ic_data_load_end_(0),
       target_address_pool_index_(-1),
-      args_desc_(Array::Handle()),
       ic_data_(ICData::Handle()) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blx lr.
@@ -45,6 +43,51 @@
 }
 
 
+NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
+    : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+      end_(pc),
+      native_function_pool_index_(-1),
+      target_address_pool_index_(-1) {
+  ASSERT(code.ContainsInstructionAt(pc));
+  // Last instruction: blx lr.
+  ASSERT(*(reinterpret_cast<uword*>(end_) - 1) == 0xe12fff3e);
+
+  Register reg;
+  uword native_function_load_end =
+      InstructionPattern::DecodeLoadWordFromPool(end_ - Instr::kInstrSize,
+                                                 &reg,
+                                                 &target_address_pool_index_);
+  ASSERT(reg == LR);
+  InstructionPattern::DecodeLoadWordFromPool(native_function_load_end,
+                                             &reg,
+                                             &native_function_pool_index_);
+  ASSERT(reg == R5);
+}
+
+
+uword NativeCallPattern::target() const {
+  return object_pool_.RawValueAt(target_address_pool_index_);
+}
+
+
+void NativeCallPattern::set_target(uword target_address) const {
+  object_pool_.SetRawValueAt(target_address_pool_index_, target_address);
+  // No need to flush the instruction cache, since the code is not modified.
+}
+
+
+NativeFunction NativeCallPattern::native_function() const {
+  return reinterpret_cast<NativeFunction>(
+      object_pool_.RawValueAt(native_function_pool_index_));
+}
+
+
+void NativeCallPattern::set_native_function(NativeFunction func) const {
+  object_pool_.SetRawValueAt(native_function_pool_index_,
+      reinterpret_cast<uword>(func));
+}
+
+
 // Decodes a load sequence ending at 'end' (the last instruction of the load
 // sequence is the instruction before the one at end).  Returns a pointer to
 // the first instruction in the sequence.  Returns the register being loaded
@@ -150,9 +193,7 @@
       end = DecodeLoadWordImmediate(end, reg, &offset);
     }
   }
-  offset += kHeapObjectTag;
-  ASSERT(Utils::IsAligned(offset, 4));
-  *index = (offset - Array::data_offset()) / 4;
+  *index = ObjectPool::IndexFromOffset(offset);
   return start;
 }
 
@@ -160,31 +201,16 @@
 RawICData* CallPattern::IcData() {
   if (ic_data_.IsNull()) {
     Register reg;
-    args_desc_load_end_ =
-        InstructionPattern::DecodeLoadObject(ic_data_load_end_,
-                                             object_pool_,
-                                             &reg,
-                                             &ic_data_);
+    InstructionPattern::DecodeLoadObject(ic_data_load_end_,
+                                         object_pool_,
+                                         &reg,
+                                         &ic_data_);
     ASSERT(reg == R5);
   }
   return ic_data_.raw();
 }
 
 
-RawArray* CallPattern::ClosureArgumentsDescriptor() {
-  if (args_desc_.IsNull()) {
-    IcData();  // Loading of the ic_data must be decoded first, if not already.
-    Register reg;
-    InstructionPattern::DecodeLoadObject(args_desc_load_end_,
-                                         object_pool_,
-                                         &reg,
-                                         &args_desc_);
-    ASSERT(reg == R4);
-  }
-  return args_desc_.raw();
-}
-
-
 uword CallPattern::TargetAddress() const {
   return object_pool_.RawValueAt(target_address_pool_index_);
 }
diff --git a/runtime/vm/instructions_arm.h b/runtime/vm/instructions_arm.h
index 4d708ca..991b2b3 100644
--- a/runtime/vm/instructions_arm.h
+++ b/runtime/vm/instructions_arm.h
@@ -11,6 +11,7 @@
 #endif
 
 #include "vm/constants_arm.h"
+#include "vm/native_entry.h"
 #include "vm/object.h"
 
 namespace dart {
@@ -52,7 +53,6 @@
   CallPattern(uword pc, const Code& code);
 
   RawICData* IcData();
-  RawArray* ClosureArgumentsDescriptor();
 
   uword TargetAddress() const;
   void SetTargetAddress(uword target_address) const;
@@ -67,17 +67,36 @@
   const ObjectPool& object_pool_;
 
   uword end_;
-  uword args_desc_load_end_;
   uword ic_data_load_end_;
 
   intptr_t target_address_pool_index_;
-  Array& args_desc_;
   ICData& ic_data_;
 
   DISALLOW_COPY_AND_ASSIGN(CallPattern);
 };
 
 
+class NativeCallPattern : public ValueObject {
+ public:
+  NativeCallPattern(uword pc, const Code& code);
+
+  uword target() const;
+  void set_target(uword target_address) const;
+
+  NativeFunction native_function() const;
+  void set_native_function(NativeFunction target) const;
+
+ private:
+  const ObjectPool& object_pool_;
+
+  uword end_;
+  intptr_t native_function_pool_index_;
+  intptr_t target_address_pool_index_;
+
+  DISALLOW_COPY_AND_ASSIGN(NativeCallPattern);
+};
+
+
 class JumpPattern : public ValueObject {
  public:
   JumpPattern(uword pc, const Code& code);
diff --git a/runtime/vm/instructions_arm64.cc b/runtime/vm/instructions_arm64.cc
index 1690456..59da8d5 100644
--- a/runtime/vm/instructions_arm64.cc
+++ b/runtime/vm/instructions_arm64.cc
@@ -16,10 +16,8 @@
 CallPattern::CallPattern(uword pc, const Code& code)
     : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
       end_(pc),
-      args_desc_load_end_(0),
       ic_data_load_end_(0),
       target_address_pool_index_(-1),
-      args_desc_(Array::Handle()),
       ic_data_(ICData::Handle()) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: blr ip0.
@@ -34,6 +32,51 @@
 }
 
 
+NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
+    : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+      end_(pc),
+      native_function_pool_index_(-1),
+      target_address_pool_index_(-1) {
+  ASSERT(code.ContainsInstructionAt(pc));
+  // Last instruction: blr ip0.
+  ASSERT(*(reinterpret_cast<uint32_t*>(end_) - 1) == 0xd63f0200);
+
+  Register reg;
+  uword native_function_load_end =
+      InstructionPattern::DecodeLoadWordFromPool(end_ - Instr::kInstrSize,
+                                                 &reg,
+                                                 &target_address_pool_index_);
+  ASSERT(reg == IP0);
+  InstructionPattern::DecodeLoadWordFromPool(native_function_load_end,
+                                             &reg,
+                                             &native_function_pool_index_);
+  ASSERT(reg == R5);
+}
+
+
+uword NativeCallPattern::target() const {
+  return object_pool_.RawValueAt(target_address_pool_index_);
+}
+
+
+void NativeCallPattern::set_target(uword target_address) const {
+  object_pool_.SetRawValueAt(target_address_pool_index_, target_address);
+  // No need to flush the instruction cache, since the code is not modified.
+}
+
+
+NativeFunction NativeCallPattern::native_function() const {
+  return reinterpret_cast<NativeFunction>(
+      object_pool_.RawValueAt(native_function_pool_index_));
+}
+
+
+void NativeCallPattern::set_native_function(NativeFunction func) const {
+  object_pool_.SetRawValueAt(native_function_pool_index_,
+      reinterpret_cast<uword>(func));
+}
+
+
 intptr_t InstructionPattern::OffsetFromPPIndex(intptr_t index) {
   return Array::element_offset(index);
 }
@@ -208,8 +251,9 @@
       offset |= instr->Imm16Field();
     }
   }
+  // PP is untagged on ARM64.
   ASSERT(Utils::IsAligned(offset, 8));
-  *index = (offset - Array::data_offset()) / 8;
+  *index = ObjectPool::IndexFromOffset(offset - kHeapObjectTag);
   return start;
 }
 
@@ -238,31 +282,16 @@
 RawICData* CallPattern::IcData() {
   if (ic_data_.IsNull()) {
     Register reg;
-    args_desc_load_end_ =
-        InstructionPattern::DecodeLoadObject(ic_data_load_end_,
-                                             object_pool_,
-                                             &reg,
-                                             &ic_data_);
+    InstructionPattern::DecodeLoadObject(ic_data_load_end_,
+                                         object_pool_,
+                                         &reg,
+                                         &ic_data_);
     ASSERT(reg == R5);
   }
   return ic_data_.raw();
 }
 
 
-RawArray* CallPattern::ClosureArgumentsDescriptor() {
-  if (args_desc_.IsNull()) {
-    IcData();  // Loading of the ic_data must be decoded first, if not already.
-    Register reg;
-    InstructionPattern::DecodeLoadObject(args_desc_load_end_,
-                                         object_pool_,
-                                         &reg,
-                                         &args_desc_);
-    ASSERT(reg == R4);
-  }
-  return args_desc_.raw();
-}
-
-
 uword CallPattern::TargetAddress() const {
   return object_pool_.RawValueAt(target_address_pool_index_);
 }
diff --git a/runtime/vm/instructions_arm64.h b/runtime/vm/instructions_arm64.h
index 568d57e..430be0f 100644
--- a/runtime/vm/instructions_arm64.h
+++ b/runtime/vm/instructions_arm64.h
@@ -11,6 +11,7 @@
 #endif
 
 #include "vm/constants_arm64.h"
+#include "vm/native_entry.h"
 #include "vm/object.h"
 
 namespace dart {
@@ -59,7 +60,6 @@
   CallPattern(uword pc, const Code& code);
 
   RawICData* IcData();
-  RawArray* ClosureArgumentsDescriptor();
 
   uword TargetAddress() const;
   void SetTargetAddress(uword target_address) const;
@@ -74,17 +74,36 @@
   const ObjectPool& object_pool_;
 
   uword end_;
-  uword args_desc_load_end_;
   uword ic_data_load_end_;
 
   intptr_t target_address_pool_index_;
-  Array& args_desc_;
   ICData& ic_data_;
 
   DISALLOW_COPY_AND_ASSIGN(CallPattern);
 };
 
 
+class NativeCallPattern : public ValueObject {
+ public:
+  NativeCallPattern(uword pc, const Code& code);
+
+  uword target() const;
+  void set_target(uword target_address) const;
+
+  NativeFunction native_function() const;
+  void set_native_function(NativeFunction target) const;
+
+ private:
+  const ObjectPool& object_pool_;
+
+  uword end_;
+  intptr_t native_function_pool_index_;
+  intptr_t target_address_pool_index_;
+
+  DISALLOW_COPY_AND_ASSIGN(NativeCallPattern);
+};
+
+
 class JumpPattern : public ValueObject {
  public:
   JumpPattern(uword pc, const Code& code);
diff --git a/runtime/vm/instructions_ia32.cc b/runtime/vm/instructions_ia32.cc
index 4093e20..84ba433 100644
--- a/runtime/vm/instructions_ia32.cc
+++ b/runtime/vm/instructions_ia32.cc
@@ -11,61 +11,6 @@
 
 namespace dart {
 
-bool InstructionPattern::TestBytesWith(const int* data, int num_bytes) const {
-  ASSERT(data != NULL);
-  const uint8_t* byte_array = reinterpret_cast<const uint8_t*>(start_);
-  for (int i = 0; i < num_bytes; i++) {
-    // Skip comparison for data[i] < 0.
-    if ((data[i] >= 0) && (byte_array[i] != (0xFF & data[i]))) {
-      return false;
-    }
-  }
-  return true;
-}
-
-
-uword CallOrJumpPattern::TargetAddress() const {
-  ASSERT(IsValid());
-  return start() + kLengthInBytes + *reinterpret_cast<uword*>(start() + 1);
-}
-
-
-void CallOrJumpPattern::SetTargetAddress(uword target) const {
-  ASSERT(IsValid());
-  *reinterpret_cast<uword*>(start() + 1) = target - start() - kLengthInBytes;
-  CPU::FlushICache(start() + 1, kWordSize);
-}
-
-
-const int* CallPattern::pattern() const {
-  static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1};
-  return kCallPattern;
-}
-
-
-const int* JumpPattern::pattern() const {
-  static const int kJumpPattern[kLengthInBytes] = {0xE9, -1, -1, -1, -1};
-  return kJumpPattern;
-}
-
-
-const int* ReturnPattern::pattern() const {
-  static const int kReturnPattern[kLengthInBytes] = { 0xC3 };
-  return kReturnPattern;
-}
-
-
-const int* ProloguePattern::pattern() const {
-  static const int kProloguePattern[kLengthInBytes] = { 0x55, 0x89, 0xe5 };
-  return kProloguePattern;
-}
-
-
-const int* SetFramePointerPattern::pattern() const {
-  static const int kFramePointerPattern[kLengthInBytes] = { 0x89, 0xe5 };
-  return kFramePointerPattern;
-}
-
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_IA32
diff --git a/runtime/vm/instructions_ia32.h b/runtime/vm/instructions_ia32.h
index c536124..1a839c8 100644
--- a/runtime/vm/instructions_ia32.h
+++ b/runtime/vm/instructions_ia32.h
@@ -11,6 +11,7 @@
 #endif
 
 #include "vm/allocation.h"
+#include "vm/cpu.h"
 #include "vm/object.h"
 
 namespace dart {
@@ -20,24 +21,22 @@
 class Immediate;
 class RawObject;
 
-// Abstract class for all instruction pattern classes.
-class InstructionPattern : public ValueObject {
+// Template class for all instruction pattern classes.
+// P has to specify a static pattern and a pattern length method.
+template<class P> class InstructionPattern : public ValueObject {
  public:
   explicit InstructionPattern(uword pc) : start_(pc) {
     ASSERT(pc != 0);
   }
-  virtual ~InstructionPattern() {}
 
   // Call to check if the instruction pattern at 'pc' match the instruction.
-  virtual bool IsValid() const {
-    return TestBytesWith(pattern(), pattern_length_in_bytes());
+  // 'P::pattern()' returns the expected byte pattern in form of an integer
+  // array with length of 'P::pattern_length_in_bytes()'. A '-1' element means
+  // 'any byte'.
+  bool IsValid() const {
+    return TestBytesWith(P::pattern(), P::pattern_length_in_bytes());
   }
 
-  // 'pattern' returns the expected byte pattern in form of an integer array
-  // with length of 'pattern_length_in_bytes'. A '-1' element means 'any byte'.
-  virtual const int* pattern() const = 0;
-  virtual int pattern_length_in_bytes() const = 0;
-
  protected:
   uword start() const { return start_; }
 
@@ -45,7 +44,17 @@
   // Returns true if the 'num_bytes' bytes at 'start_' correspond to
   // array of integers 'data'. 'data' elements are either a byte or -1, which
   // represents any byte.
-  bool TestBytesWith(const int* data, int num_bytes) const;
+  bool TestBytesWith(const int* data, int num_bytes) const {
+    ASSERT(data != NULL);
+    const uint8_t* byte_array = reinterpret_cast<const uint8_t*>(start_);
+    for (int i = 0; i < num_bytes; i++) {
+      // Skip comparison for data[i] < 0.
+      if ((data[i] >= 0) && (byte_array[i] != (0xFF & data[i]))) {
+        return false;
+      }
+    }
+    return true;
+  }
 
   const uword start_;
 
@@ -53,54 +62,74 @@
 };
 
 
-class CallOrJumpPattern : public InstructionPattern {
+template<class P>
+class CallOrJumpPattern : public InstructionPattern<P> {
  public:
-  virtual int pattern_length_in_bytes() const {
-    return kLengthInBytes;
+  uword TargetAddress() const {
+    ASSERT(this->IsValid());
+    return this->start() +
+        P::pattern_length_in_bytes() +
+        *reinterpret_cast<uword*>(this->start() + 1);
   }
-  uword TargetAddress() const;
-  void SetTargetAddress(uword new_target) const;
+
+  void SetTargetAddress(uword new_target) const {
+    ASSERT(this->IsValid());
+    *reinterpret_cast<uword*>(this->start() + 1) =
+        new_target - this->start() - P::pattern_length_in_bytes();
+    CPU::FlushICache(this->start() + 1, kWordSize);
+  }
 
  protected:
-  explicit CallOrJumpPattern(uword pc) : InstructionPattern(pc) {}
-  static const int kLengthInBytes = 5;
+  explicit CallOrJumpPattern(uword pc) : InstructionPattern<P>(pc) {}
 
  private:
   DISALLOW_COPY_AND_ASSIGN(CallOrJumpPattern);
 };
 
 
-class CallPattern : public CallOrJumpPattern {
+class CallPattern : public CallOrJumpPattern<CallPattern> {
  public:
   explicit CallPattern(uword pc) : CallOrJumpPattern(pc) {}
-  static int InstructionLength() {
-    return kLengthInBytes;
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1};
+    return kCallPattern;
   }
 
  private:
-  virtual const int* pattern() const;
+  static const int kLengthInBytes = 5;
 
   DISALLOW_COPY_AND_ASSIGN(CallPattern);
 };
 
 
-class JumpPattern : public CallOrJumpPattern {
+class JumpPattern : public CallOrJumpPattern<JumpPattern> {
  public:
   JumpPattern(uword pc, const Code& code) : CallOrJumpPattern(pc) {}
 
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kJumpPattern[kLengthInBytes] = {0xE9, -1, -1, -1, -1};
+    return kJumpPattern;
+  }
+
  private:
-  virtual const int* pattern() const;
+  static const int kLengthInBytes = 5;
 
   DISALLOW_COPY_AND_ASSIGN(JumpPattern);
 };
 
 
-class ReturnPattern : public InstructionPattern {
+class ReturnPattern : public InstructionPattern<ReturnPattern> {
  public:
   explicit ReturnPattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kReturnPattern[kLengthInBytes] = { 0xC3 };
+    return kReturnPattern;
+  }
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 1;
@@ -109,12 +138,16 @@
 
 // push ebp
 // mov ebp, esp
-class ProloguePattern : public InstructionPattern {
+class ProloguePattern : public InstructionPattern<ProloguePattern> {
  public:
   explicit ProloguePattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kProloguePattern[kLengthInBytes] = { 0x55, 0x89, 0xe5 };
+    return kProloguePattern;
+  }
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 3;
@@ -122,12 +155,17 @@
 
 
 // mov ebp, esp
-class SetFramePointerPattern : public InstructionPattern {
+class SetFramePointerPattern :
+    public InstructionPattern<SetFramePointerPattern> {
  public:
   explicit SetFramePointerPattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kFramePointerPattern[kLengthInBytes] = { 0x89, 0xe5 };
+    return kFramePointerPattern;
+  }
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 2;
diff --git a/runtime/vm/instructions_mips.cc b/runtime/vm/instructions_mips.cc
index 34a5c3a..fc758cd 100644
--- a/runtime/vm/instructions_mips.cc
+++ b/runtime/vm/instructions_mips.cc
@@ -15,10 +15,8 @@
 CallPattern::CallPattern(uword pc, const Code& code)
     : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
       end_(pc),
-      args_desc_load_end_(0),
       ic_data_load_end_(0),
       target_address_pool_index_(-1),
-      args_desc_(Array::Handle()),
       ic_data_(ICData::Handle()) {
   ASSERT(code.ContainsInstructionAt(pc));
   // Last instruction: jalr RA, T9(=R25).
@@ -118,9 +116,7 @@
     // Offset is signed, so add the upper 16 bits.
     offset += (instr->UImmField() << 16);
   }
-  offset += kHeapObjectTag;
-  ASSERT(Utils::IsAligned(offset, 4));
-  *index = (offset - Array::data_offset()) / 4;
+  *index = ObjectPool::IndexFromOffset(offset);
   return start;
 }
 
@@ -128,31 +124,16 @@
 RawICData* CallPattern::IcData() {
   if (ic_data_.IsNull()) {
     Register reg;
-    args_desc_load_end_ =
-        InstructionPattern::DecodeLoadObject(ic_data_load_end_,
-                                             object_pool_,
-                                             &reg,
-                                             &ic_data_);
+    InstructionPattern::DecodeLoadObject(ic_data_load_end_,
+                                         object_pool_,
+                                         &reg,
+                                         &ic_data_);
     ASSERT(reg == S5);
   }
   return ic_data_.raw();
 }
 
 
-RawArray* CallPattern::ClosureArgumentsDescriptor() {
-  if (args_desc_.IsNull()) {
-    IcData();  // Loading of the ic_data must be decoded first, if not already.
-    Register reg;
-    InstructionPattern::DecodeLoadObject(args_desc_load_end_,
-                                         object_pool_,
-                                         &reg,
-                                         &args_desc_);
-    ASSERT(reg == S4);
-  }
-  return args_desc_.raw();
-}
-
-
 uword CallPattern::TargetAddress() const {
   return object_pool_.RawValueAt(target_address_pool_index_);
 }
@@ -164,6 +145,51 @@
 }
 
 
+NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
+    : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
+      end_(pc),
+      native_function_pool_index_(-1),
+      target_address_pool_index_(-1) {
+  ASSERT(code.ContainsInstructionAt(pc));
+  // Last instruction: jalr RA, T9(=R25).
+  ASSERT(*(reinterpret_cast<uword*>(end_) - 2) == 0x0320f809);
+
+  Register reg;
+  uword native_function_load_end =
+      InstructionPattern::DecodeLoadWordFromPool(end_ - 2 * Instr::kInstrSize,
+                                                 &reg,
+                                                 &target_address_pool_index_);
+  ASSERT(reg == T9);
+  InstructionPattern::DecodeLoadWordFromPool(native_function_load_end,
+                                             &reg,
+                                             &native_function_pool_index_);
+  ASSERT(reg == T5);
+}
+
+
+uword NativeCallPattern::target() const {
+  return object_pool_.RawValueAt(target_address_pool_index_);
+}
+
+
+void NativeCallPattern::set_target(uword target_address) const {
+  object_pool_.SetRawValueAt(target_address_pool_index_, target_address);
+  // No need to flush the instruction cache, since the code is not modified.
+}
+
+
+NativeFunction NativeCallPattern::native_function() const {
+  return reinterpret_cast<NativeFunction>(
+      object_pool_.RawValueAt(native_function_pool_index_));
+}
+
+
+void NativeCallPattern::set_native_function(NativeFunction func) const {
+  object_pool_.SetRawValueAt(native_function_pool_index_,
+      reinterpret_cast<uword>(func));
+}
+
+
 void CallPattern::InsertAt(uword pc, uword target_address) {
   Instr* lui = Instr::At(pc + (0 * Instr::kInstrSize));
   Instr* ori = Instr::At(pc + (1 * Instr::kInstrSize));
diff --git a/runtime/vm/instructions_mips.h b/runtime/vm/instructions_mips.h
index 0091a95..51875b5 100644
--- a/runtime/vm/instructions_mips.h
+++ b/runtime/vm/instructions_mips.h
@@ -11,6 +11,7 @@
 #endif
 
 #include "vm/constants_mips.h"
+#include "vm/native_entry.h"
 #include "vm/object.h"
 
 namespace dart {
@@ -52,7 +53,6 @@
   CallPattern(uword pc, const Code& code);
 
   RawICData* IcData();
-  RawArray* ClosureArgumentsDescriptor();
 
   uword TargetAddress() const;
   void SetTargetAddress(uword target_address) const;
@@ -67,17 +67,36 @@
   const ObjectPool& object_pool_;
 
   uword end_;
-  uword args_desc_load_end_;
   uword ic_data_load_end_;
 
   intptr_t target_address_pool_index_;
-  Array& args_desc_;
   ICData& ic_data_;
 
   DISALLOW_COPY_AND_ASSIGN(CallPattern);
 };
 
 
+class NativeCallPattern : public ValueObject {
+ public:
+  NativeCallPattern(uword pc, const Code& code);
+
+  uword target() const;
+  void set_target(uword target_address) const;
+
+  NativeFunction native_function() const;
+  void set_native_function(NativeFunction target) const;
+
+ private:
+  const ObjectPool& object_pool_;
+
+  uword end_;
+  intptr_t native_function_pool_index_;
+  intptr_t target_address_pool_index_;
+
+  DISALLOW_COPY_AND_ASSIGN(NativeCallPattern);
+};
+
+
 class JumpPattern : public ValueObject {
  public:
   JumpPattern(uword pc, const Code& code);
diff --git a/runtime/vm/instructions_x64.cc b/runtime/vm/instructions_x64.cc
index 51128dd..83f427d 100644
--- a/runtime/vm/instructions_x64.cc
+++ b/runtime/vm/instructions_x64.cc
@@ -11,54 +11,27 @@
 
 namespace dart {
 
-intptr_t InstructionPattern::IndexFromPPLoad(uword start) {
+intptr_t IndexFromPPLoad(uword start) {
   int32_t offset = *reinterpret_cast<int32_t*>(start);
   return ObjectPool::IndexFromOffset(offset);
 }
 
 
-intptr_t InstructionPattern::OffsetFromPPIndex(intptr_t index) {
-  intptr_t offset = ObjectPool::element_offset(index);
-  return offset - kHeapObjectTag;
-}
-
-
-bool InstructionPattern::TestBytesWith(const int* data, int num_bytes) const {
-  ASSERT(data != NULL);
-  const uint8_t* byte_array = reinterpret_cast<const uint8_t*>(start_);
-  for (int i = 0; i < num_bytes; i++) {
-    // Skip comparison for data[i] < 0.
-    if ((data[i] >= 0) && (byte_array[i] != (0xFF & data[i]))) {
-      return false;
-    }
-  }
-  return true;
-}
-
-
 uword JumpPattern::TargetAddress() const {
   ASSERT(IsValid());
-  int index = InstructionPattern::IndexFromPPLoad(start() + 3);
+  int index = IndexFromPPLoad(start() + 3);
   return object_pool_.RawValueAt(index);
 }
 
 
 void JumpPattern::SetTargetAddress(uword target) const {
   ASSERT(IsValid());
-  int index = InstructionPattern::IndexFromPPLoad(start() + 3);
+  int index = IndexFromPPLoad(start() + 3);
   object_pool_.SetRawValueAt(index, target);
   // No need to flush the instruction cache, since the code is not modified.
 }
 
 
-const int* JumpPattern::pattern() const {
-  //  07: 41 ff a7 imm32  jmpq [reg + off]
-  static const int kJumpPattern[kLengthInBytes] =
-      {0x41, 0xFF, -1, -1, -1, -1, -1};
-  return kJumpPattern;
-}
-
-
 void ShortCallPattern::SetTargetAddress(uword target) const {
   ASSERT(IsValid());
   *reinterpret_cast<uint32_t*>(start() + 1) = target - start() - kLengthInBytes;
@@ -66,30 +39,6 @@
 }
 
 
-const int* ShortCallPattern::pattern() const {
-  static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1};
-  return kCallPattern;
-}
-
-
-const int* ReturnPattern::pattern() const {
-  static const int kReturnPattern[kLengthInBytes] = { 0xC3 };
-  return kReturnPattern;
-}
-
-
-const int* ProloguePattern::pattern() const {
-  static const int kProloguePattern[kLengthInBytes] =
-      { 0x55, 0x48, 0x89, 0xe5 };
-  return kProloguePattern;
-}
-
-
-const int* SetFramePointerPattern::pattern() const {
-  static const int kFramePointerPattern[kLengthInBytes] = { 0x48, 0x89, 0xe5 };
-  return kFramePointerPattern;
-}
-
 }  // namespace dart
 
 #endif  // defined TARGET_ARCH_X64
diff --git a/runtime/vm/instructions_x64.h b/runtime/vm/instructions_x64.h
index 8f5cda4..4c4aae8 100644
--- a/runtime/vm/instructions_x64.h
+++ b/runtime/vm/instructions_x64.h
@@ -20,27 +20,26 @@
 class Immediate;
 class RawObject;
 
-// Abstract class for all instruction pattern classes.
-class InstructionPattern : public ValueObject {
+
+intptr_t IndexFromPPLoad(uword start);
+
+
+// Template class for all instruction pattern classes.
+// P has to specify a static pattern and a pattern length method.
+template<class P> class InstructionPattern : public ValueObject {
  public:
   explicit InstructionPattern(uword pc) : start_(pc) {
     ASSERT(pc != 0);
   }
-  virtual ~InstructionPattern() {}
 
   // Call to check if the instruction pattern at 'pc' match the instruction.
-  virtual bool IsValid() const {
-    return TestBytesWith(pattern(), pattern_length_in_bytes());
+  // 'P::pattern()' returns the expected byte pattern in form of an integer
+  // array with length of 'P::pattern_length_in_bytes()'. A '-1' element means
+  // 'any byte'.
+  bool IsValid() const {
+    return TestBytesWith(P::pattern(), P::pattern_length_in_bytes());
   }
 
-  // 'pattern' returns the expected byte pattern in form of an integer array
-  // with length of 'pattern_length_in_bytes'. A '-1' element means 'any byte'.
-  virtual const int* pattern() const = 0;
-  virtual int pattern_length_in_bytes() const = 0;
-
-  static intptr_t IndexFromPPLoad(uword start);
-  static intptr_t OffsetFromPPIndex(intptr_t index);
-
  protected:
   uword start() const { return start_; }
 
@@ -48,7 +47,17 @@
   // Returns true if the 'num_bytes' bytes at 'start_' correspond to
   // array of integers 'data'. 'data' elements are either a byte or -1, which
   // represents any byte.
-  bool TestBytesWith(const int* data, int num_bytes) const;
+  bool TestBytesWith(const int* data, int num_bytes) const {
+    ASSERT(data != NULL);
+    const uint8_t* byte_array = reinterpret_cast<const uint8_t*>(start_);
+    for (int i = 0; i < num_bytes; i++) {
+      // Skip comparison for data[i] < 0.
+      if ((data[i] >= 0) && (byte_array[i] != (0xFF & data[i]))) {
+        return false;
+      }
+    }
+    return true;
+  }
 
   const uword start_;
 
@@ -56,23 +65,24 @@
 };
 
 
-class JumpPattern : public InstructionPattern {
+class JumpPattern : public InstructionPattern<JumpPattern> {
  public:
   JumpPattern(uword pc, const Code& code)
       : InstructionPattern(pc),
         object_pool_(ObjectPool::Handle(code.GetObjectPool())) {}
-  static int InstructionLength() {
-    return kLengthInBytes;
-  }
+
   uword TargetAddress() const;
   void SetTargetAddress(uword new_target) const;
-  virtual int pattern_length_in_bytes() const {
-    return kLengthInBytes;
-  }
 
   static const int kLengthInBytes = 7;
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
+  static const int* pattern() {
+    //  07: 41 ff a7 imm32  jmpq [reg + off]
+    static const int kJumpPattern[kLengthInBytes] =
+        {0x41, 0xFF, -1, -1, -1, -1, -1};
+    return kJumpPattern;
+  }
  private:
-  virtual const int* pattern() const;
   const ObjectPool& object_pool_;
 
   DISALLOW_COPY_AND_ASSIGN(JumpPattern);
@@ -80,33 +90,34 @@
 
 
 // 5 byte call instruction.
-class ShortCallPattern : public InstructionPattern {
+class ShortCallPattern : public InstructionPattern<ShortCallPattern> {
  public:
   explicit ShortCallPattern(uword pc) : InstructionPattern(pc) {}
-  static int InstructionLength() {
-    return kLengthInBytes;
-  }
-
-  virtual int pattern_length_in_bytes() const {
-    return kLengthInBytes;
-  }
 
   void SetTargetAddress(uword new_target) const;
 
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kCallPattern[kLengthInBytes] = {0xE8, -1, -1, -1, -1};
+    return kCallPattern;
+  }
+
  private:
   static const int kLengthInBytes = 5;
-  virtual const int* pattern() const;
-
   DISALLOW_COPY_AND_ASSIGN(ShortCallPattern);
 };
 
 
-class ReturnPattern : public InstructionPattern {
+class ReturnPattern : public InstructionPattern<ReturnPattern> {
  public:
   explicit ReturnPattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kReturnPattern[kLengthInBytes] = { 0xC3 };
+    return kReturnPattern;
+  }
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 1;
@@ -115,12 +126,17 @@
 
 // push rbp
 // mov rbp, rsp
-class ProloguePattern : public InstructionPattern {
+class ProloguePattern : public InstructionPattern<ProloguePattern> {
  public:
   explicit ProloguePattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kProloguePattern[kLengthInBytes] =
+        { 0x55, 0x48, 0x89, 0xe5 };
+    return kProloguePattern;
+  }
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 4;
@@ -128,12 +144,18 @@
 
 
 // mov rbp, rsp
-class SetFramePointerPattern : public InstructionPattern {
+class SetFramePointerPattern :
+    public InstructionPattern<SetFramePointerPattern> {
  public:
   explicit SetFramePointerPattern(uword pc) : InstructionPattern(pc) {}
 
-  virtual const int* pattern() const;
-  virtual int pattern_length_in_bytes() const { return kLengthInBytes; }
+  static const int* pattern() {
+    static const int kFramePointerPattern[kLengthInBytes] =
+        { 0x48, 0x89, 0xe5 };
+    return kFramePointerPattern;
+  }
+
+  static int pattern_length_in_bytes() { return kLengthInBytes; }
 
  private:
   static const int kLengthInBytes = 3;
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 9bae137..60f2db9 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3409,6 +3409,10 @@
     return ast_node_.is_bootstrap_native();
   }
 
+  bool link_lazily() const {
+    return ast_node_.link_lazily();
+  }
+
   virtual void PrintOperandsTo(BufferFormatter* f) const;
 
   virtual bool CanDeoptimize() const { return false; }
@@ -3473,7 +3477,7 @@
                           Value* value,
                           StoreBarrierType emit_store_barrier,
                           intptr_t token_pos)
-      : field_(Field::Handle()),
+      : field_(Field::ZoneHandle()),
         offset_in_bytes_(offset_in_bytes),
         emit_store_barrier_(emit_store_barrier),
         token_pos_(token_pos),
@@ -3875,7 +3879,7 @@
   StringInterpolateInstr(Value* value, intptr_t token_pos)
       : TemplateDefinition(Isolate::Current()->GetNextDeoptId()),
         token_pos_(token_pos),
-        function_(Function::Handle()) {
+        function_(Function::ZoneHandle()) {
     SetInputAt(0, value);
   }
 
@@ -8011,7 +8015,7 @@
     return count;
   }
 
-  const Code& code() const { return parsed_function_.code(); }
+  const Function& function() const { return parsed_function_.function(); }
 
   Environment* DeepCopy(Zone* zone) const {
     return DeepCopy(zone, Length());
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index cc2ebcd..c816561 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -222,12 +222,11 @@
   // R4: Arguments descriptor.
   // R0: Function.
   ASSERT(locs()->in(0).reg() == R0);
-  __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
+  __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
 
-  // R2: instructions.
+  // R2: instructions entry point.
   // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
   __ LoadImmediate(R5, 0);
-  __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
   __ blx(R2);
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
@@ -938,31 +937,42 @@
   // Compute the effective address. When running under the simulator,
   // this is a redirection address that forces the simulator to call
   // into the runtime system.
-  uword entry = reinterpret_cast<uword>(native_c_function());
+  uword entry;
   const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
   const bool is_leaf_call =
     (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
-  const StubEntry* stub_entry = NULL;
-  if (is_bootstrap_native() || is_leaf_call) {
+  const StubEntry* stub_entry;
+  if (link_lazily()) {
     stub_entry = StubCode::CallBootstrapCFunction_entry();
+    entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
 #if defined(USING_SIMULATOR)
     entry = Simulator::RedirectExternalReference(
         entry, Simulator::kBootstrapNativeCall, function().NumParameters());
 #endif
   } else {
-    // In the case of non bootstrap native methods the CallNativeCFunction
-    // stub generates the redirection address when running under the simulator
-    // and hence we do not change 'entry' here.
-    stub_entry = StubCode::CallNativeCFunction_entry();
+    entry = reinterpret_cast<uword>(native_c_function());
+    if (is_bootstrap_native() || is_leaf_call) {
+      stub_entry = StubCode::CallBootstrapCFunction_entry();
 #if defined(USING_SIMULATOR)
-    if (!function().IsNativeAutoSetupScope()) {
       entry = Simulator::RedirectExternalReference(
           entry, Simulator::kBootstrapNativeCall, function().NumParameters());
-    }
 #endif
+    } else {
+      // In the case of non bootstrap native methods the CallNativeCFunction
+      // stub generates the redirection address when running under the simulator
+      // and hence we do not change 'entry' here.
+      stub_entry = StubCode::CallNativeCFunction_entry();
+#if defined(USING_SIMULATOR)
+      if (!function().IsNativeAutoSetupScope()) {
+        entry = Simulator::RedirectExternalReference(
+            entry, Simulator::kBootstrapNativeCall, function().NumParameters());
+      }
+#endif
+    }
   }
-  __ LoadImmediate(R5, entry);
   __ LoadImmediate(R1, argc_tag);
+  ExternalLabel label(entry);
+  __ LoadExternalLabel(R5, &label, link_lazily() ? kPatchable : kNotPatchable);
   compiler->GenerateCall(token_pos(),
                          *stub_entry,
                          RawPcDescriptors::kOther,
@@ -986,8 +996,9 @@
   ASSERT(compiler->is_optimizing());
   const Register char_code = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
-  __ LoadImmediate(result,
-                   reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+
+  ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+  __ LoadExternalLabel(result, &label, kNotPatchable);
   __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
   __ ldr(result, Address(result, char_code, LSL, 1));  // Char code is a smi.
 }
@@ -1811,16 +1822,14 @@
         result_(result) { }
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
-    Isolate* isolate = compiler->isolate();
-
     if (Assembler::EmittingComments()) {
       __ Comment("%s slow path allocation of %s",
                  instruction_->DebugName(),
                  String::Handle(cls_.PrettyName()).ToCString());
     }
     __ Bind(entry_label());
-    const Code& stub =
-        Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::GetAllocationStubForClass(cls_));
     const StubEntry stub_entry(stub);
 
     LocationSummary* locs = instruction_->locs();
@@ -2393,8 +2402,8 @@
       return;
     }
   }
-  const Code& stub = Code::Handle(compiler->isolate(),
-                                  StubCode::AllocateArray_entry()->code());
+  const Code& stub = Code::ZoneHandle(compiler->zone(),
+                                      StubCode::AllocateArray_entry()->code());
   compiler->AddStubCallTarget(stub);
   compiler->GenerateCall(token_pos(),
                          *StubCode::AllocateArray_entry(),
@@ -2683,8 +2692,8 @@
     compiler->SaveLiveRegisters(locs);
 
     __ LoadImmediate(R1, instruction_->num_context_variables());
-    const Code& stub = Code::Handle(compiler->isolate(),
-                                    StubCode::AllocateContext_entry()->code());
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::AllocateContext_entry()->code());
     compiler->AddStubCallTarget(stub);
     compiler->GenerateCall(instruction_->token_pos(),
                            *StubCode::AllocateContext_entry(),
@@ -6811,9 +6820,8 @@
 
 
 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  Isolate* isolate = compiler->isolate();
-  const Code& stub = Code::Handle(isolate,
-                                  StubCode::GetAllocationStubForClass(cls()));
+  const Code& stub = Code::ZoneHandle(
+      compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
   const StubEntry stub_entry(stub);
   compiler->GenerateCall(token_pos(),
                          stub_entry,
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index e126292..785d8f7 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -218,12 +218,11 @@
   // R4: Arguments descriptor.
   // R0: Function.
   ASSERT(locs()->in(0).reg() == R0);
-  __ LoadFieldFromOffset(R2, R0, Function::instructions_offset());
+  __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
 
   // R2: instructions.
   // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
   __ LoadImmediate(R5, 0);
-  __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag);
   __ blr(R2);
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
@@ -791,31 +790,42 @@
   // Compute the effective address. When running under the simulator,
   // this is a redirection address that forces the simulator to call
   // into the runtime system.
-  uword entry = reinterpret_cast<uword>(native_c_function());
+  uword entry;
   const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
   const bool is_leaf_call =
     (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
-  const StubEntry* stub_entry = NULL;
-  if (is_bootstrap_native() || is_leaf_call) {
+  const StubEntry* stub_entry;
+  if (link_lazily()) {
     stub_entry = StubCode::CallBootstrapCFunction_entry();
+    entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
 #if defined(USING_SIMULATOR)
     entry = Simulator::RedirectExternalReference(
         entry, Simulator::kBootstrapNativeCall, function().NumParameters());
 #endif
   } else {
-    // In the case of non bootstrap native methods the CallNativeCFunction
-    // stub generates the redirection address when running under the simulator
-    // and hence we do not change 'entry' here.
-    stub_entry = StubCode::CallNativeCFunction_entry();
+    entry = reinterpret_cast<uword>(native_c_function());
+    if (is_bootstrap_native() || is_leaf_call) {
+      stub_entry = StubCode::CallBootstrapCFunction_entry();
 #if defined(USING_SIMULATOR)
-    if (!function().IsNativeAutoSetupScope()) {
       entry = Simulator::RedirectExternalReference(
           entry, Simulator::kBootstrapNativeCall, function().NumParameters());
-    }
 #endif
+    } else {
+      // In the case of non bootstrap native methods the CallNativeCFunction
+      // stub generates the redirection address when running under the simulator
+      // and hence we do not change 'entry' here.
+      stub_entry = StubCode::CallNativeCFunction_entry();
+#if defined(USING_SIMULATOR)
+      if (!function().IsNativeAutoSetupScope()) {
+        entry = Simulator::RedirectExternalReference(
+            entry, Simulator::kBootstrapNativeCall, function().NumParameters());
+      }
+#endif
+    }
   }
-  __ LoadImmediate(R5, entry);
   __ LoadImmediate(R1, argc_tag);
+  ExternalLabel label(entry);
+  __ LoadExternalLabel(R5, &label);
   compiler->GenerateCall(token_pos(),
                          *stub_entry,
                          RawPcDescriptors::kOther,
@@ -839,8 +849,9 @@
   ASSERT(compiler->is_optimizing());
   const Register char_code = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
-  __ LoadImmediate(
-      result, reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+
+  ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+  __ LoadExternalLabel(result, &label);
   __ AddImmediate(
       result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
   __ SmiUntag(TMP, char_code);  // Untag to use scaled adress mode.
@@ -1667,16 +1678,14 @@
         result_(result) { }
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
-    Isolate* isolate = compiler->isolate();
-
     if (Assembler::EmittingComments()) {
       __ Comment("%s slow path allocation of %s",
                  instruction_->DebugName(),
                  String::Handle(cls_.PrettyName()).ToCString());
     }
     __ Bind(entry_label());
-    const Code& stub =
-        Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
+    const Code& stub = Code::ZoneHandle(compiler->zone(),
+        StubCode::GetAllocationStubForClass(cls_));
     const StubEntry stub_entry(stub);
 
     LocationSummary* locs = instruction_->locs();
@@ -2119,8 +2128,8 @@
       return;
     }
   }
-  const Code& stub = Code::Handle(compiler->isolate(),
-                                  StubCode::AllocateArray_entry()->code());
+  const Code& stub = Code::ZoneHandle(compiler->zone(),
+                                      StubCode::AllocateArray_entry()->code());
   compiler->AddStubCallTarget(stub);
   compiler->GenerateCall(token_pos(),
                          *StubCode::AllocateArray_entry(),
@@ -2397,8 +2406,8 @@
     compiler->SaveLiveRegisters(locs);
 
     __ LoadImmediate(R1, instruction_->num_context_variables());
-    const Code& stub = Code::Handle(compiler->isolate(),
-                                    StubCode::AllocateContext_entry()->code());
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::AllocateContext_entry()->code());
     compiler->AddStubCallTarget(stub);
     compiler->GenerateCall(instruction_->token_pos(),
                            *StubCode::AllocateContext_entry(),
@@ -5572,9 +5581,8 @@
 
 
 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  Isolate* isolate = compiler->isolate();
-  const Code& stub = Code::Handle(isolate,
-                                  StubCode::GetAllocationStubForClass(cls()));
+  const Code& stub = Code::ZoneHandle(
+      compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
   const StubEntry stub_entry(stub);
   compiler->GenerateCall(token_pos(),
                          stub_entry,
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 3f4d4dc..af1185c1 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -828,11 +828,19 @@
   } else {
     __ leal(EAX, Address(EBP, kFirstLocalSlotFromFp * kWordSize));
   }
-  __ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function())));
   __ movl(EDX, Immediate(argc_tag));
-  const StubEntry* stub_entry = (is_bootstrap_native() || is_leaf_call) ?
-      StubCode::CallBootstrapCFunction_entry() :
-      StubCode::CallNativeCFunction_entry();
+
+  const StubEntry* stub_entry;
+  if (link_lazily()) {
+    stub_entry = StubCode::CallBootstrapCFunction_entry();
+    __ movl(ECX, Immediate(NativeEntry::LinkNativeCallLabel().address()));
+  } else {
+    stub_entry = (is_bootstrap_native() || is_leaf_call) ?
+        StubCode::CallBootstrapCFunction_entry() :
+        StubCode::CallNativeCFunction_entry();
+    const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
+    __ movl(ECX, Immediate(label.address()));
+  }
   compiler->GenerateCall(token_pos(),
                          *stub_entry,
                          RawPcDescriptors::kOther,
@@ -1648,16 +1656,14 @@
         result_(result) { }
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
-    Isolate* isolate = compiler->isolate();
-
     if (Assembler::EmittingComments()) {
       __ Comment("%s slow path allocation of %s",
                  instruction_->DebugName(),
                  String::Handle(cls_.PrettyName()).ToCString());
     }
     __ Bind(entry_label());
-    const Code& stub =
-        Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::GetAllocationStubForClass(cls_));
     const StubEntry stub_entry(stub);
 
     LocationSummary* locs = instruction_->locs();
@@ -2128,8 +2134,8 @@
   }
 
   __ Bind(&slow_path);
-  const Code& stub = Code::Handle(compiler->isolate(),
-                                  StubCode::AllocateArray_entry()->code());
+  const Code& stub = Code::ZoneHandle(compiler->zone(),
+                                      StubCode::AllocateArray_entry()->code());
   compiler->AddStubCallTarget(stub);
   compiler->GenerateCall(token_pos(),
                          *StubCode::AllocateArray_entry(),
@@ -2403,8 +2409,8 @@
     compiler->SaveLiveRegisters(locs);
 
     __ movl(EDX, Immediate(instruction_->num_context_variables()));
-    const Code& stub = Code::Handle(compiler->isolate(),
-                                    StubCode::AllocateContext_entry()->code());
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::AllocateContext_entry()->code());
     compiler->AddStubCallTarget(stub);
     compiler->GenerateCall(instruction_->token_pos(),
                            *StubCode::AllocateContext_entry(),
@@ -6761,13 +6767,12 @@
 
   // EBX: Code (compiled code or lazy compile stub).
   ASSERT(locs()->in(0).reg() == EAX);
-  __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
+  __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
 
   // EAX: Function.
   // EDX: Arguments descriptor array.
   // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
   __ xorl(ECX, ECX);
-  __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
   __ call(EBX);
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
@@ -6815,9 +6820,8 @@
 
 
 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  Isolate* isolate = compiler->isolate();
-  const Code& stub = Code::Handle(isolate,
-                                  StubCode::GetAllocationStubForClass(cls()));
+  const Code& stub = Code::ZoneHandle(
+      compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
   const StubEntry stub_entry(stub);
   compiler->GenerateCall(token_pos(),
                          stub_entry,
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 309198c..e888e84 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -272,8 +272,7 @@
   // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
   ASSERT(locs()->in(0).reg() == T0);
   __ LoadImmediate(S5, 0);
-  __ lw(T2, FieldAddress(T0, Function::instructions_offset()));
-  __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T2, FieldAddress(T0, Function::entry_point_offset()));
   __ jalr(T2);
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
@@ -989,31 +988,42 @@
   // Compute the effective address. When running under the simulator,
   // this is a redirection address that forces the simulator to call
   // into the runtime system.
-  uword entry = reinterpret_cast<uword>(native_c_function());
+  uword entry;
   const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
   const bool is_leaf_call =
     (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
-  const StubEntry* stub_entry = NULL;
-  if (is_bootstrap_native() || is_leaf_call) {
+  const StubEntry* stub_entry;
+  if (link_lazily()) {
     stub_entry = StubCode::CallBootstrapCFunction_entry();
+    entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
 #if defined(USING_SIMULATOR)
     entry = Simulator::RedirectExternalReference(
         entry, Simulator::kBootstrapNativeCall, function().NumParameters());
 #endif
   } else {
-    // In the case of non bootstrap native methods the CallNativeCFunction
-    // stub generates the redirection address when running under the simulator
-    // and hence we do not change 'entry' here.
-    stub_entry = StubCode::CallNativeCFunction_entry();
+    entry = reinterpret_cast<uword>(native_c_function());
+    if (is_bootstrap_native() || is_leaf_call) {
+      stub_entry = StubCode::CallBootstrapCFunction_entry();
 #if defined(USING_SIMULATOR)
-    if (!function().IsNativeAutoSetupScope()) {
       entry = Simulator::RedirectExternalReference(
           entry, Simulator::kBootstrapNativeCall, function().NumParameters());
-    }
 #endif
+    } else {
+      // In the case of non bootstrap native methods the CallNativeCFunction
+      // stub generates the redirection address when running under the simulator
+      // and hence we do not change 'entry' here.
+      stub_entry = StubCode::CallNativeCFunction_entry();
+#if defined(USING_SIMULATOR)
+      if (!function().IsNativeAutoSetupScope()) {
+        entry = Simulator::RedirectExternalReference(
+            entry, Simulator::kBootstrapNativeCall, function().NumParameters());
+      }
+#endif
+    }
   }
-  __ LoadImmediate(T5, entry);
   __ LoadImmediate(A1, argc_tag);
+  ExternalLabel label(entry);
+  __ LoadExternalLabel(T5, &label, kNotPatchable);
   compiler->GenerateCall(token_pos(),
                          *stub_entry,
                          RawPcDescriptors::kOther,
@@ -1040,8 +1050,8 @@
 
   __ Comment("StringFromCharCodeInstr");
 
-  __ LoadImmediate(result,
-                   reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+  ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+  __ LoadExternalLabel(result, &label, kNotPatchable);
   __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
   __ sll(TMP, char_code, 1);  // Char code is a smi.
   __ addu(TMP, TMP, result);
@@ -1837,16 +1847,14 @@
         result_(result) { }
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
-    Isolate* isolate = compiler->isolate();
-
     if (Assembler::EmittingComments()) {
       __ Comment("%s slow path allocation of %s",
                  instruction_->DebugName(),
                  String::Handle(cls_.PrettyName()).ToCString());
     }
     __ Bind(entry_label());
-    const Code& stub =
-        Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::GetAllocationStubForClass(cls_));
     const StubEntry stub_entry(stub);
 
     LocationSummary* locs = instruction_->locs();
@@ -2246,8 +2254,8 @@
   }
 
   __ Bind(&slow_path);
-  const Code& stub = Code::Handle(compiler->isolate(),
-                                  StubCode::AllocateArray_entry()->code());
+  const Code& stub = Code::ZoneHandle(compiler->zone(),
+                                      StubCode::AllocateArray_entry()->code());
   compiler->AddStubCallTarget(stub);
   compiler->GenerateCall(token_pos(),
                          *StubCode::AllocateArray_entry(),
@@ -2498,8 +2506,8 @@
     compiler->SaveLiveRegisters(locs);
 
     __ LoadImmediate(T1, instruction_->num_context_variables());
-    const Code& stub = Code::Handle(compiler->isolate(),
-                                    StubCode::AllocateContext_entry()->code());
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::AllocateContext_entry()->code());
     compiler->AddStubCallTarget(stub);
     compiler->GenerateCall(instruction_->token_pos(),
                            *StubCode::AllocateContext_entry(),
@@ -5545,9 +5553,8 @@
 
 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   __ Comment("AllocateObjectInstr");
-  Isolate* isolate = compiler->isolate();
-  const Code& stub = Code::Handle(isolate,
-                                  StubCode::GetAllocationStubForClass(cls()));
+  const Code& stub = Code::ZoneHandle(
+      compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
   const StubEntry stub_entry(stub);
   compiler->GenerateCall(token_pos(),
                          stub_entry,
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 927c699..252bb13 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -781,14 +781,21 @@
   } else {
     __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize));
   }
-  __ LoadImmediate(
-      RBX, Immediate(reinterpret_cast<uword>(native_c_function())));
   __ LoadImmediate(R10, Immediate(argc_tag));
-  const StubEntry& stub_entry = (is_bootstrap_native() || is_leaf_call) ?
-      *StubCode::CallBootstrapCFunction_entry() :
-      *StubCode::CallNativeCFunction_entry();
+  const StubEntry* stub_entry;
+  if (link_lazily()) {
+    stub_entry = StubCode::CallBootstrapCFunction_entry();
+    __ LoadExternalLabel(
+        RBX, &NativeEntry::LinkNativeCallLabel(), kPatchable);
+  } else {
+    stub_entry = (is_bootstrap_native() || is_leaf_call)
+        ? StubCode::CallBootstrapCFunction_entry()
+        : StubCode::CallNativeCFunction_entry();
+    const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
+    __ LoadExternalLabel(RBX, &label, kNotPatchable);
+  }
   compiler->GenerateCall(token_pos(),
-                         stub_entry,
+                         *stub_entry,
                          RawPcDescriptors::kOther,
                          locs());
   __ popq(result);
@@ -822,8 +829,9 @@
   ASSERT(compiler->is_optimizing());
   Register char_code = locs()->in(0).reg();
   Register result = locs()->out(0).reg();
-  __ LoadImmediate(result,
-      Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())));
+
+  ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress()));
+  __ LoadExternalLabel(result, &label, kNotPatchable);
   __ movq(result, Address(result,
                           char_code,
                           TIMES_HALF_WORD_SIZE,  // Char code is a smi.
@@ -1657,16 +1665,14 @@
         result_(result) { }
 
   virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
-    Isolate* isolate = compiler->isolate();
-
     if (Assembler::EmittingComments()) {
       __ Comment("%s slow path allocation of %s",
                  instruction_->DebugName(),
                  String::Handle(cls_.PrettyName()).ToCString());
     }
     __ Bind(entry_label());
-    const Code& stub =
-        Code::Handle(isolate, StubCode::GetAllocationStubForClass(cls_));
+    const Code& stub = Code::ZoneHandle(compiler->zone(),
+        StubCode::GetAllocationStubForClass(cls_));
     const StubEntry stub_entry(stub);
 
     LocationSummary* locs = instruction_->locs();
@@ -2127,8 +2133,8 @@
   }
 
   __ Bind(&slow_path);
-  const Code& stub = Code::Handle(compiler->isolate(),
-                                  StubCode::AllocateArray_entry()->code());
+  const Code& stub = Code::ZoneHandle(compiler->zone(),
+                                      StubCode::AllocateArray_entry()->code());
   compiler->AddStubCallTarget(stub);
   compiler->GenerateCall(token_pos(),
                          *StubCode::AllocateArray_entry(),
@@ -2400,8 +2406,8 @@
     compiler->SaveLiveRegisters(locs);
 
     __ LoadImmediate(R10, Immediate(instruction_->num_context_variables()));
-    const Code& stub = Code::Handle(compiler->isolate(),
-                                    StubCode::AllocateContext_entry()->code());
+    const Code& stub = Code::ZoneHandle(
+        compiler->zone(), StubCode::AllocateContext_entry()->code());
     compiler->AddStubCallTarget(stub);
     compiler->GenerateCall(instruction_->token_pos(),
                            *StubCode::AllocateContext_entry(),
@@ -6336,13 +6342,12 @@
 
   // Function in RAX.
   ASSERT(locs()->in(0).reg() == RAX);
-  __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
+  __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
 
   // RAX: Function.
   // R10: Arguments descriptor array.
   // RBX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
   __ xorq(RBX, RBX);
-  __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
   __ call(RCX);
   compiler->RecordSafepoint(locs());
   // Marks either the continuation point in unoptimized code or the
@@ -6390,9 +6395,8 @@
 
 
 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  Isolate* isolate = compiler->isolate();
-  const Code& stub = Code::Handle(isolate,
-                                  StubCode::GetAllocationStubForClass(cls()));
+  const Code& stub = Code::ZoneHandle(
+      compiler->zone(), StubCode::GetAllocationStubForClass(cls()));
   const StubEntry stub_entry(stub);
   compiler->GenerateCall(token_pos(),
                          stub_entry,
diff --git a/runtime/vm/intrinsifier.cc b/runtime/vm/intrinsifier.cc
index 9bfb434..ffeda36 100644
--- a/runtime/vm/intrinsifier.cc
+++ b/runtime/vm/intrinsifier.cc
@@ -277,7 +277,7 @@
       new LoadFieldInstr(new Value(array),
                          length_offset,
                          Type::ZoneHandle(Type::SmiType()),
-                         true));  // immutable
+                         Scanner::kNoSourcePos));
   builder->AddInstruction(
       new CheckArrayBoundInstr(new Value(length),
                                new Value(index),
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 70ce883..4d37b8b 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -2027,8 +2027,7 @@
   __ eor(R5, R5, Operand(R5));
 
   // Tail-call the function.
-  __ ldr(R1, FieldAddress(R0, Function::instructions_offset()));
-  __ AddImmediate(R1, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
   __ bx(R1);
 }
 
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index 4d27700..c8b4df7 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -229,8 +229,8 @@
   /* R1: potential next object start. */                                       \
   /* R2: allocation size. */                                                   \
   /* R3: heap. */                                                              \
-  __ ldr(R4, Address(R3, Heap::EndOffset(space)));                             \
-  __ cmp(R1, Operand(R4));                                                     \
+  __ ldr(R6, Address(R3, Heap::EndOffset(space)));                             \
+  __ cmp(R1, Operand(R6));                                                     \
   __ b(&fall_through, CS);                                                     \
                                                                                \
   /* Successfully allocated the object(s), now update top to point to */       \
@@ -2102,8 +2102,7 @@
   __ eor(R5, R5, Operand(R5));
 
   // Tail-call the function.
-  __ ldr(R1, FieldAddress(R0, Function::instructions_offset()));
-  __ AddImmediate(R1, R1, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R1, FieldAddress(R0, Function::entry_point_offset()));
   __ br(R1);
 }
 
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 11f93e6..1814d20 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -2113,8 +2113,7 @@
   __ xorl(ECX, ECX);
 
   // Tail-call the function.
-  __ movl(EDI, FieldAddress(EAX, Function::instructions_offset()));
-  __ addl(EDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EDI, FieldAddress(EAX, Function::entry_point_offset()));
   __ jmp(EDI);
 }
 
diff --git a/runtime/vm/intrinsifier_mips.cc b/runtime/vm/intrinsifier_mips.cc
index d66ffb2..73d9ccd 100644
--- a/runtime/vm/intrinsifier_mips.cc
+++ b/runtime/vm/intrinsifier_mips.cc
@@ -2141,8 +2141,7 @@
   __ mov(S5, ZR);
 
   // Tail-call the function.
-  __ lw(T3, FieldAddress(T0, Function::instructions_offset()));
-  __ AddImmediate(T3, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T3, FieldAddress(T0, Function::entry_point_offset()));
   __ jr(T3);
 }
 
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index aeea84b..b911a99 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -1976,8 +1976,7 @@
   __ xorq(RCX, RCX);
 
   // Tail-call the function.
-  __ movq(RDI, FieldAddress(RAX, Function::instructions_offset()));
-  __ addq(RDI, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RDI, FieldAddress(RAX, Function::entry_point_offset()));
   __ jmp(RDI);
 }
 
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 933afd7..4d6c56c 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -44,6 +44,9 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, print_metrics);
+DECLARE_FLAG(bool, trace_service);
+
 DEFINE_FLAG(bool, trace_isolates, false,
             "Trace isolate creation and shut down.");
 DEFINE_FLAG(bool, pause_isolates_on_start, false,
@@ -57,9 +60,6 @@
             "Log isolates whose name include the filter. "
             "Default: service isolate log messages are suppressed.");
 
-DEFINE_FLAG(charp, timeline_trace_dir, NULL,
-            "Enable all timeline trace streams and output traces "
-            "into specified directory.");
 DEFINE_FLAG(int, new_gen_semi_max_size, (kWordSize <= 4) ? 16 : 32,
             "Max size of new gen semi space in MB");
 DEFINE_FLAG(int, old_gen_heap_size, 0,
@@ -381,19 +381,24 @@
 
 
 bool IsolateMessageHandler::HandleMessage(Message* message) {
-  StackZone zone(I);
-  HandleScope handle_scope(I);
-  TimelineDurationScope tds(I, I->GetIsolateStream(), "HandleMessage");
+  ASSERT(IsCurrentIsolate());
+  Thread* thread = Thread::Current();
+  StackZone stack_zone(thread);
+  Zone* zone = stack_zone.GetZone();
+  HandleScope handle_scope(thread);
+  TimelineDurationScope tds(thread, I->GetIsolateStream(), "HandleMessage");
+  tds.SetNumArguments(1);
+  tds.CopyArgument(0, "isolateName", I->name());
 
   // TODO(turnidge): Rework collection total dart execution.  This can
   // overcount when other things (gc, compilation) are active.
-  TIMERSCOPE(isolate_, time_dart_execution);
+  TIMERSCOPE(thread, time_dart_execution);
 
   // If the message is in band we lookup the handler to dispatch to.  If the
   // receive port was closed, we drop the message without deserializing it.
   // Illegal port is a special case for artificially enqueued isolate library
   // messages which are handled in C++ code below.
-  Object& msg_handler = Object::Handle(I);
+  Object& msg_handler = Object::Handle(zone);
   if (!message->IsOOB() && (message->dest_port() != Message::kIllegalPort)) {
     msg_handler = DartLibraryCalls::LookupHandler(message->dest_port());
     if (msg_handler.IsError()) {
@@ -415,8 +420,8 @@
   // Parse the message.
   MessageSnapshotReader reader(message->data(),
                                message->len(),
-                               I, zone.GetZone());
-  const Object& msg_obj = Object::Handle(I, reader.ReadObject());
+                               I, zone);
+  const Object& msg_obj = Object::Handle(zone, reader.ReadObject());
   if (msg_obj.IsError()) {
     // An error occurred while reading the message.
     delete message;
@@ -431,7 +436,7 @@
     UNREACHABLE();
   }
 
-  Instance& msg = Instance::Handle(I);
+  Instance& msg = Instance::Handle(zone);
   msg ^= msg_obj.raw();  // Can't use Instance::Cast because may be null.
 
   bool success = true;
@@ -442,7 +447,7 @@
     if (msg.IsArray()) {
       const Array& oob_msg = Array::Cast(msg);
       if (oob_msg.Length() > 0) {
-        const Object& oob_tag = Object::Handle(I, oob_msg.At(0));
+        const Object& oob_tag = Object::Handle(zone, oob_msg.At(0));
         if (oob_tag.IsSmi()) {
           switch (Smi::Cast(oob_tag).Value()) {
             case Message::kServiceOOBMsg: {
@@ -471,7 +476,7 @@
     if (msg.IsArray()) {
       const Array& msg_arr = Array::Cast(msg);
       if (msg_arr.Length() > 0) {
-        const Object& oob_tag = Object::Handle(I, msg_arr.At(0));
+        const Object& oob_tag = Object::Handle(zone, msg_arr.At(0));
         if (oob_tag.IsSmi() &&
             (Smi::Cast(oob_tag).Value() == Message::kDelayedIsolateLibOOBMsg)) {
           success = HandleLibMessage(Array::Cast(msg_arr));
@@ -479,7 +484,7 @@
       }
     }
   } else {
-    const Object& result = Object::Handle(I,
+    const Object& result = Object::Handle(zone,
         DartLibraryCalls::HandleMessage(msg_handler, msg));
     if (result.IsError()) {
       success = ProcessUnhandledException(Error::Cast(result));
@@ -488,6 +493,15 @@
     }
   }
   delete message;
+  if (success) {
+    const Object& result =
+        Object::Handle(zone, I->InvokePendingServiceExtensionCalls());
+    if (result.IsError()) {
+      success = ProcessUnhandledException(Error::Cast(result));
+    } else {
+      ASSERT(result.IsNull());
+    }
+  }
   return success;
 }
 
@@ -499,6 +513,9 @@
     HandleScope handle_scope(I);
     ServiceEvent pause_event(isolate(), ServiceEvent::kPauseStart);
     Service::HandleEvent(&pause_event);
+  } else if (FLAG_trace_service) {
+    OS::Print("vm-service: Dropping event of type PauseStart (%s)\n",
+              isolate()->name());
   }
 }
 
@@ -510,6 +527,9 @@
     HandleScope handle_scope(I);
     ServiceEvent pause_event(isolate(), ServiceEvent::kPauseExit);
     Service::HandleEvent(&pause_event);
+  } else if (FLAG_trace_service) {
+    OS::Print("vm-service: Dropping event of type PauseExit (%s)\n",
+              isolate()->name());
   }
 }
 
@@ -569,10 +589,14 @@
   } else {
     exc_str = String::New(result.ToErrorCString());
   }
-  I->NotifyErrorListeners(exc_str, stacktrace_str);
+  bool has_listener = I->NotifyErrorListeners(exc_str, stacktrace_str);
 
   if (I->ErrorsFatal()) {
-    I->object_store()->set_sticky_error(result);
+    if (has_listener) {
+      I->object_store()->clear_sticky_error();
+    } else {
+      I->object_store()->set_sticky_error(result);
+    }
     return false;
   }
   return true;
@@ -653,11 +677,11 @@
       debugger_(NULL),
       single_step_(false),
       resume_request_(false),
+      last_resume_timestamp_(OS::GetCurrentTimeMillis()),
       has_compiled_(false),
       flags_(),
       random_(),
       simulator_(NULL),
-      long_jump_base_(NULL),
       timer_list_(),
       deopt_id_(0),
       mutex_(new Mutex()),
@@ -683,14 +707,14 @@
       last_allocationprofile_gc_timestamp_(0),
       object_id_ring_(NULL),
       trace_buffer_(NULL),
-      timeline_event_recorder_(NULL),
       profiler_data_(NULL),
-      thread_state_(NULL),
       tag_table_(GrowableObjectArray::null()),
       current_tag_(UserTag::null()),
       default_tag_(UserTag::null()),
       collected_closures_(GrowableObjectArray::null()),
       deoptimized_code_array_(GrowableObjectArray::null()),
+      pending_service_extension_calls_(GrowableObjectArray::null()),
+      registered_service_extension_handlers_(GrowableObjectArray::null()),
       metrics_list_head_(NULL),
       compilation_allowed_(true),
       cha_(NULL),
@@ -734,7 +758,6 @@
     delete compiler_stats_;
     compiler_stats_ = NULL;
   }
-  RemoveTimelineEventRecorder();
   delete thread_registry_;
 }
 
@@ -765,11 +788,11 @@
   ISOLATE_METRIC_LIST(ISOLATE_METRIC_INIT);
 #undef ISOLATE_METRIC_INIT
 
-  const bool force_streams = FLAG_timeline_trace_dir != NULL;
-
   // Initialize Timeline streams.
 #define ISOLATE_TIMELINE_STREAM_INIT(name, enabled_by_default)                 \
-  result->stream_##name##_.Init(#name, force_streams || enabled_by_default);
+  result->stream_##name##_.Init(#name,                                         \
+                                Timeline::EnableStreamByDefault(#name) ||      \
+                                enabled_by_default);
   ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_INIT);
 #undef ISOLATE_TIMELINE_STREAM_INIT
 
@@ -1011,6 +1034,10 @@
     event->Instant("Runnable");
     event->Complete();
   }
+  if (Service::isolate_stream.enabled()) {
+    ServiceEvent runnableEvent(this, ServiceEvent::kIsolateRunnable);
+    Service::HandleEvent(&runnableEvent);
+  }
   return true;
 }
 
@@ -1204,11 +1231,11 @@
 }
 
 
-void Isolate::NotifyErrorListeners(const String& msg,
+bool Isolate::NotifyErrorListeners(const String& msg,
                                    const String& stacktrace) {
   const GrowableObjectArray& listeners = GrowableObjectArray::Handle(
       this, this->object_store()->error_listeners());
-  if (listeners.IsNull()) return;
+  if (listeners.IsNull()) return false;
 
   const Array& arr = Array::Handle(this, Array::New(2));
   arr.SetAt(0, msg);
@@ -1225,6 +1252,7 @@
       PortMap::PostMessage(msg);
     }
   }
+  return listeners.Length() > 0;
 }
 
 
@@ -1473,11 +1501,6 @@
 
     // Write out the coverage data if collection has been enabled.
     CodeCoverage::Write(this);
-
-    if ((timeline_event_recorder_ != NULL) &&
-        (FLAG_timeline_trace_dir != NULL)) {
-      timeline_event_recorder_->WriteTo(FLAG_timeline_trace_dir);
-    }
   }
 
   // Remove this isolate from the list *before* we start tearing it down, to
@@ -1536,6 +1559,15 @@
       OS::Print("[-] Stopping isolate:\n"
                 "\tisolate:    %s\n", name());
     }
+    if (FLAG_print_metrics) {
+      LogBlock lb(this);
+      ISL_Print("Printing metrics for %s\n", name());
+#define ISOLATE_METRIC_PRINT(type, variable, name, unit)                       \
+  ISL_Print("%s\n", metric_##variable##_.ToString());
+  ISOLATE_METRIC_LIST(ISOLATE_METRIC_PRINT);
+#undef ISOLATE_METRIC_PRINT
+      ISL_Print("\n");
+    }
   }
 
 #if defined(DEBUG)
@@ -1599,14 +1631,6 @@
   // Visit objects in isolate specific handles area.
   reusable_handles_.VisitObjectPointers(visitor);
 
-  // Iterate over all the stack frames and visit objects on the stack.
-  StackFrameIterator frames_iterator(validate_frames);
-  StackFrame* frame = frames_iterator.NextFrame();
-  while (frame != NULL) {
-    frame->VisitObjectPointers(visitor);
-    frame = frames_iterator.NextFrame();
-  }
-
   // Visit the dart api state for all local and persistent handles.
   if (api_state() != NULL) {
     api_state()->VisitObjectPointers(visitor, visit_prologue_weak_handles);
@@ -1628,6 +1652,14 @@
   visitor->VisitPointer(
       reinterpret_cast<RawObject**>(&deoptimized_code_array_));
 
+  // Visit the pending service extension calls.
+  visitor->VisitPointer(
+      reinterpret_cast<RawObject**>(&pending_service_extension_calls_));
+
+  // Visit the registered service extension handlers.
+  visitor->VisitPointer(
+      reinterpret_cast<RawObject**>(&registered_service_extension_handlers_));
+
   // Visit objects in the debugger.
   debugger()->VisitObjectPointers(visitor);
 
@@ -1636,8 +1668,8 @@
     deopt_context()->VisitObjectPointers(visitor);
   }
 
-  // Visit objects in thread registry (e.g., handles in zones).
-  thread_registry()->VisitObjectPointers(visitor);
+  // Visit objects in thread registry (e.g., Dart stack, handles in zones).
+  thread_registry()->VisitObjectPointers(visitor, validate_frames);
 }
 
 
@@ -1656,21 +1688,6 @@
 }
 
 
-void Isolate::SetTimelineEventRecorder(
-    TimelineEventRecorder* timeline_event_recorder) {
-#define ISOLATE_TIMELINE_STREAM_SET_BUFFER(name, enabled_by_default)           \
-  stream_##name##_.set_recorder(timeline_event_recorder);
-  ISOLATE_TIMELINE_STREAM_LIST(ISOLATE_TIMELINE_STREAM_SET_BUFFER)
-#undef ISOLATE_TIMELINE_STREAM_SET_BUFFER
-  timeline_event_recorder_ = timeline_event_recorder;
-}
-
-void Isolate::RemoveTimelineEventRecorder() {
-  delete timeline_event_recorder_;
-  SetTimelineEventRecorder(NULL);
-}
-
-
 void Isolate::PrintJSON(JSONStream* stream, bool ref) {
   JSONObject jsobj(stream);
   jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
@@ -1684,7 +1701,7 @@
     return;
   }
   int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond;
-  jsobj.AddProperty64("startTime", start_time_millis);
+  jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
   IsolateSpawnState* state = spawn_state();
   if (state != NULL) {
     const Object& entry = Object::Handle(this, state->ResolveFunction());
@@ -1711,7 +1728,7 @@
     ASSERT(debugger()->PauseEvent() == NULL);
     ServiceEvent pause_event(this, ServiceEvent::kPauseExit);
     jsobj.AddProperty("pauseEvent", &pause_event);
-  } else if (debugger()->PauseEvent() != NULL) {
+  } else if (debugger()->PauseEvent() != NULL && !resume_request_) {
     ServiceEvent pause_event(debugger()->PauseEvent());
     jsobj.AddProperty("pauseEvent", &pause_event);
   } else {
@@ -1727,7 +1744,9 @@
 
   const Library& lib =
       Library::Handle(object_store()->root_library());
-  jsobj.AddProperty("rootLib", lib);
+  if (!lib.IsNull()) {
+    jsobj.AddProperty("rootLib", lib);
+  }
 
   timer_list().PrintTimersToJSONProperty(&jsobj);
   {
@@ -1862,6 +1881,169 @@
 }
 
 
+void Isolate::set_pending_service_extension_calls(
+      const GrowableObjectArray& value) {
+  pending_service_extension_calls_ = value.raw();
+}
+
+
+void Isolate::set_registered_service_extension_handlers(
+    const GrowableObjectArray& value) {
+  registered_service_extension_handlers_ = value.raw();
+}
+
+
+RawObject* Isolate::InvokePendingServiceExtensionCalls() {
+  GrowableObjectArray& calls =
+      GrowableObjectArray::Handle(GetAndClearPendingServiceExtensionCalls());
+  if (calls.IsNull()) {
+    return Object::null();
+  }
+  // Grab run function.
+  const Library& developer_lib = Library::Handle(Library::DeveloperLibrary());
+  ASSERT(!developer_lib.IsNull());
+  const Function& run_extension = Function::Handle(
+      developer_lib.LookupLocalFunction(Symbols::_runExtension()));
+  ASSERT(!run_extension.IsNull());
+
+  const Array& arguments =
+      Array::Handle(Array::New(kPendingEntrySize, Heap::kNew));
+  Object& result = Object::Handle();
+  String& method_name = String::Handle();
+  Instance& closure = Instance::Handle();
+  Array& parameter_keys = Array::Handle();
+  Array& parameter_values = Array::Handle();
+  Instance& reply_port = Instance::Handle();
+  Instance& id = Instance::Handle();
+  for (intptr_t i = 0; i < calls.Length(); i += kPendingEntrySize) {
+    // Grab arguments for call.
+    closure ^= calls.At(i + kPendingHandlerIndex);
+    ASSERT(!closure.IsNull());
+    arguments.SetAt(kPendingHandlerIndex, closure);
+    method_name ^= calls.At(i + kPendingMethodNameIndex);
+    ASSERT(!method_name.IsNull());
+    arguments.SetAt(kPendingMethodNameIndex, method_name);
+    parameter_keys ^= calls.At(i + kPendingKeysIndex);
+    ASSERT(!parameter_keys.IsNull());
+    arguments.SetAt(kPendingKeysIndex, parameter_keys);
+    parameter_values ^= calls.At(i + kPendingValuesIndex);
+    ASSERT(!parameter_values.IsNull());
+    arguments.SetAt(kPendingValuesIndex, parameter_values);
+    reply_port ^= calls.At(i + kPendingReplyPortIndex);
+    ASSERT(!reply_port.IsNull());
+    arguments.SetAt(kPendingReplyPortIndex, reply_port);
+    id ^= calls.At(i + kPendingIdIndex);
+    arguments.SetAt(kPendingIdIndex, id);
+
+    result = DartEntry::InvokeFunction(run_extension, arguments);
+    if (result.IsError()) {
+      if (result.IsUnwindError()) {
+        // Propagate the unwind error. Remaining service extension calls
+        // are dropped.
+        return result.raw();
+      } else {
+        // Send error back over the protocol.
+        Service::PostError(method_name,
+                           parameter_keys,
+                           parameter_values,
+                           reply_port,
+                           id,
+                           Error::Cast(result));
+      }
+    }
+    result = DartLibraryCalls::DrainMicrotaskQueue();
+    if (result.IsError()) {
+      return result.raw();
+    }
+  }
+  return Object::null();
+}
+
+
+RawGrowableObjectArray* Isolate::GetAndClearPendingServiceExtensionCalls() {
+  RawGrowableObjectArray* r = pending_service_extension_calls_;
+  pending_service_extension_calls_ = GrowableObjectArray::null();
+  return r;
+}
+
+
+void Isolate::AppendServiceExtensionCall(const Instance& closure,
+                                         const String& method_name,
+                                         const Array& parameter_keys,
+                                         const Array& parameter_values,
+                                         const Instance& reply_port,
+                                         const Instance& id) {
+  GrowableObjectArray& calls =
+      GrowableObjectArray::Handle(pending_service_extension_calls());
+  if (calls.IsNull()) {
+    calls ^= GrowableObjectArray::New();
+    ASSERT(!calls.IsNull());
+    set_pending_service_extension_calls(calls);
+  }
+  ASSERT(kPendingHandlerIndex == 0);
+  calls.Add(closure);
+  ASSERT(kPendingMethodNameIndex == 1);
+  calls.Add(method_name);
+  ASSERT(kPendingKeysIndex == 2);
+  calls.Add(parameter_keys);
+  ASSERT(kPendingValuesIndex == 3);
+  calls.Add(parameter_values);
+  ASSERT(kPendingReplyPortIndex == 4);
+  calls.Add(reply_port);
+  ASSERT(kPendingIdIndex == 5);
+  calls.Add(id);
+}
+
+
+// This function is written in C++ and not Dart because we must do this
+// operation atomically in the face of random OOB messages. Do not port
+// to Dart code unless you can ensure that the operations will can be
+// done atomically.
+void Isolate::RegisterServiceExtensionHandler(const String& name,
+                                              const Instance& closure) {
+  GrowableObjectArray& handlers =
+      GrowableObjectArray::Handle(registered_service_extension_handlers());
+  if (handlers.IsNull()) {
+    handlers ^= GrowableObjectArray::New(Heap::kOld);
+    set_registered_service_extension_handlers(handlers);
+  }
+#if defined(DEBUG)
+  {
+    // Sanity check.
+    const Instance& existing_handler =
+        Instance::Handle(LookupServiceExtensionHandler(name));
+    ASSERT(existing_handler.IsNull());
+  }
+#endif
+  ASSERT(kRegisteredNameIndex == 0);
+  handlers.Add(name, Heap::kOld);
+  ASSERT(kRegisteredHandlerIndex == 1);
+  handlers.Add(closure, Heap::kOld);
+}
+
+
+// This function is written in C++ and not Dart because we must do this
+// operation atomically in the face of random OOB messages. Do not port
+// to Dart code unless you can ensure that the operations will can be
+// done atomically.
+RawInstance* Isolate::LookupServiceExtensionHandler(const String& name) {
+  const GrowableObjectArray& handlers =
+      GrowableObjectArray::Handle(registered_service_extension_handlers());
+  if (handlers.IsNull()) {
+    return Instance::null();
+  }
+  String& handler_name = String::Handle();
+  for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) {
+    handler_name ^= handlers.At(i + kRegisteredNameIndex);
+    ASSERT(!handler_name.IsNull());
+    if (handler_name.Equals(name)) {
+      return Instance::RawCast(handlers.At(i + kRegisteredHandlerIndex));
+    }
+  }
+  return Instance::null();
+}
+
+
 void Isolate::WakePauseEventHandler(Dart_Isolate isolate) {
   Isolate* iso = reinterpret_cast<Isolate*>(isolate);
   MonitorLocker ml(iso->pause_loop_monitor_);
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 9621311..90f97c4 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -7,6 +7,7 @@
 
 #include "include/dart_api.h"
 #include "platform/assert.h"
+#include "vm/atomic.h"
 #include "vm/base_isolate.h"
 #include "vm/class_table.h"
 #include "vm/counters.h"
@@ -47,10 +48,8 @@
 class Instance;
 class IsolateProfilerData;
 class IsolateSpawnState;
-class InterruptableThreadState;
 class Library;
 class Log;
-class LongJumpScope;
 class MessageHandler;
 class Mutex;
 class Object;
@@ -237,9 +236,6 @@
   ApiState* api_state() const { return api_state_; }
   void set_api_state(ApiState* value) { api_state_ = value; }
 
-  LongJumpScope* long_jump_base() const { return long_jump_base_; }
-  void set_long_jump_base(LongJumpScope* value) { long_jump_base_ = value; }
-
   TimerList& timer_list() { return timer_list_; }
 
   void set_init_callback_data(void* value) {
@@ -270,15 +266,28 @@
 
   // Returns the current C++ stack pointer. Equivalent taking the address of a
   // stack allocated local, but plays well with AddressSanitizer.
+  // TODO(koda): Move to Thread.
   static uword GetCurrentStackPointer();
 
+  // Returns true if any of the interrupts specified by 'interrupt_bits' are
+  // currently scheduled for this isolate, but leaves them unchanged.
+  //
+  // NOTE: The read uses relaxed memory ordering, i.e., it is atomic and
+  // an interrupt is guaranteed to be observed eventually, but any further
+  // order guarantees must be ensured by other synchronization. See the
+  // tests in isolate_test.cc for example usage.
+  bool HasInterruptsScheduled(uword interrupt_bits) {
+    ASSERT(interrupt_bits == (interrupt_bits & kInterruptsMask));
+    uword limit = AtomicOperations::LoadRelaxed(&stack_limit_);
+    return (limit != saved_stack_limit_) &&
+        (((limit & kInterruptsMask) & interrupt_bits) != 0);
+  }
+
+  // Access to the current stack limit for generated code.  This may be
+  // overwritten with a special value to trigger interrupts.
   uword stack_limit_address() const {
     return reinterpret_cast<uword>(&stack_limit_);
   }
-
-  // The current stack limit.  This may be overwritten with a special
-  // value to trigger interrupts.
-  uword stack_limit() const { return stack_limit_; }
   static intptr_t stack_limit_offset() {
     return OFFSET_OF(Isolate, stack_limit_);
   }
@@ -438,6 +447,15 @@
   // Requests that the debugger resume execution.
   void Resume() {
     resume_request_ = true;
+    set_last_resume_timestamp();
+  }
+
+  void set_last_resume_timestamp() {
+    last_resume_timestamp_ = OS::GetCurrentTimeMillis();
+  }
+
+  int64_t last_resume_timestamp() const {
+    return last_resume_timestamp_;
   }
 
   // Returns whether the vm service has requested that the debugger
@@ -464,7 +482,7 @@
 
   void AddErrorListener(const SendPort& listener);
   void RemoveErrorListener(const SendPort& listener);
-  void NotifyErrorListeners(const String& msg, const String& stacktrace);
+  bool NotifyErrorListeners(const String& msg, const String& stacktrace);
 
   bool ErrorsFatal() const { return errors_fatal_; }
   void SetErrorsFatal(bool val) { errors_fatal_ = val; }
@@ -563,14 +581,6 @@
     return trace_buffer_;
   }
 
-  void SetTimelineEventRecorder(TimelineEventRecorder* timeline_event_recorder);
-
-  TimelineEventRecorder* timeline_event_recorder() const {
-    return timeline_event_recorder_;
-  }
-
-  void RemoveTimelineEventRecorder();
-
   DeoptContext* deopt_context() const { return deopt_context_; }
   void set_deopt_context(DeoptContext* value) {
     ASSERT(value == NULL || deopt_context_ == NULL);
@@ -701,6 +711,17 @@
     compilation_allowed_ = allowed;
   }
 
+  RawObject* InvokePendingServiceExtensionCalls();
+  void AppendServiceExtensionCall(const Instance& closure,
+                           const String& method_name,
+                           const Array& parameter_keys,
+                           const Array& parameter_values,
+                           const Instance& reply_port,
+                           const Instance& id);
+  void RegisterServiceExtensionHandler(const String& name,
+                                       const Instance& closure);
+  RawInstance* LookupServiceExtensionHandler(const String& name);
+
 #if defined(DEBUG)
 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object)                                \
   void set_reusable_##object##_handle_scope_active(bool value) {               \
@@ -764,6 +785,17 @@
     user_tag_ = tag;
   }
 
+  RawGrowableObjectArray* GetAndClearPendingServiceExtensionCalls();
+  RawGrowableObjectArray* pending_service_extension_calls() const {
+    return pending_service_extension_calls_;
+  }
+  void set_pending_service_extension_calls(const GrowableObjectArray& value);
+  RawGrowableObjectArray* registered_service_extension_handlers() const {
+    return registered_service_extension_handlers_;
+  }
+  void set_registered_service_extension_handlers(
+      const GrowableObjectArray& value);
+
   void ClearMutatorThread() {
     mutator_thread_ = NULL;
   }
@@ -802,11 +834,11 @@
   Debugger* debugger_;
   bool single_step_;
   bool resume_request_;
+  int64_t last_resume_timestamp_;
   bool has_compiled_;
   Flags flags_;
   Random random_;
   Simulator* simulator_;
-  LongJumpScope* long_jump_base_;
   TimerList timer_list_;
   intptr_t deopt_id_;
   Mutex* mutex_;  // protects stack_limit_ and saved_stack_limit_.
@@ -844,12 +876,8 @@
   // Trace buffer support.
   TraceBuffer* trace_buffer_;
 
-  // TimelineEvent buffer.
-  TimelineEventRecorder* timeline_event_recorder_;
-
   IsolateProfilerData* profiler_data_;
   Mutex profiler_data_mutex_;
-  InterruptableThreadState* thread_state_;
 
   VMTagCounters vm_tag_counters_;
   uword user_tag_;
@@ -860,6 +888,26 @@
   RawGrowableObjectArray* collected_closures_;
   RawGrowableObjectArray* deoptimized_code_array_;
 
+  // We use 6 list entries for each pending service extension calls.
+  enum {
+    kPendingHandlerIndex = 0,
+    kPendingMethodNameIndex,
+    kPendingKeysIndex,
+    kPendingValuesIndex,
+    kPendingReplyPortIndex,
+    kPendingIdIndex,
+    kPendingEntrySize
+  };
+  RawGrowableObjectArray* pending_service_extension_calls_;
+
+  // We use 2 list entries for each registered extension handler.
+  enum {
+    kRegisteredNameIndex = 0,
+    kRegisteredHandlerIndex,
+    kRegisteredEntrySize
+  };
+  RawGrowableObjectArray* registered_service_extension_handlers_;
+
   Metric* metrics_list_head_;
 
   Counters counters_;
diff --git a/runtime/vm/isolate_test.cc b/runtime/vm/isolate_test.cc
index f5f0506..6000ee6 100644
--- a/runtime/vm/isolate_test.cc
+++ b/runtime/vm/isolate_test.cc
@@ -6,6 +6,8 @@
 #include "platform/assert.h"
 #include "vm/globals.h"
 #include "vm/isolate.h"
+#include "vm/lockers.h"
+#include "vm/thread_pool.h"
 #include "vm/unit_test.h"
 
 namespace dart {
@@ -80,4 +82,134 @@
   EXPECT_VALID(exception_result);
 }
 
+
+class InterruptChecker : public ThreadPool::Task {
+ public:
+  static const intptr_t kTaskCount;
+  static const intptr_t kIterations;
+
+  InterruptChecker(Isolate* isolate,
+                   Monitor* awake_monitor,
+                   bool* awake,
+                   Monitor* round_monitor,
+                   const intptr_t* round)
+    : isolate_(isolate),
+      awake_monitor_(awake_monitor),
+      awake_(awake),
+      round_monitor_(round_monitor),
+      round_(round) {
+  }
+
+  virtual void Run() {
+    Thread::EnterIsolateAsHelper(isolate_);
+    // Tell main thread that we are ready.
+    {
+      MonitorLocker ml(awake_monitor_);
+      ASSERT(!*awake_);
+      *awake_ = true;
+      ml.Notify();
+    }
+    for (intptr_t i = 0; i < kIterations; ++i) {
+      // Busy wait for interrupts.
+      while (!isolate_->HasInterruptsScheduled(Isolate::kVMInterrupt)) {
+        // Do nothing.
+      }
+      // Tell main thread that we observed the interrupt.
+      {
+        MonitorLocker ml(awake_monitor_);
+        ASSERT(!*awake_);
+        *awake_ = true;
+        ml.Notify();
+      }
+      // Wait for main thread to let us resume, i.e., until all tasks are here.
+      {
+        MonitorLocker ml(round_monitor_);
+        EXPECT(*round_ == i || *round_ == (i + 1));
+        while (*round_ == i) {
+          ml.Wait();
+        }
+        EXPECT(*round_ == i + 1);
+      }
+    }
+    Thread::ExitIsolateAsHelper();
+    // Use awake also to signal exit.
+    {
+      MonitorLocker ml(awake_monitor_);
+      *awake_ = true;
+      ml.Notify();
+    }
+  }
+
+ private:
+  Isolate* isolate_;
+  Monitor* awake_monitor_;
+  bool* awake_;
+  Monitor* round_monitor_;
+  const intptr_t* round_;
+};
+
+
+const intptr_t InterruptChecker::kTaskCount = 5;
+const intptr_t InterruptChecker::kIterations = 10;
+
+
+// Waits for all tasks to set their individual flag, then clears them all.
+static void WaitForAllTasks(bool* flags, Monitor* monitor) {
+  MonitorLocker ml(monitor);
+  while (true) {
+    intptr_t count = 0;
+    for (intptr_t task = 0; task < InterruptChecker::kTaskCount; ++task) {
+      if (flags[task]) {
+        ++count;
+      }
+    }
+    if (count == InterruptChecker::kTaskCount) {
+      memset(flags, 0, sizeof(*flags) * count);
+      break;
+    } else {
+      ml.Wait();
+    }
+  }
+}
+
+// Test and document usage of Isolate::HasInterruptsScheduled.
+//
+// Go through a number of rounds of scheduling interrupts and waiting until all
+// unsynchronized busy-waiting tasks observe it (in the current implementation,
+// the exact latency depends on cache coherence). Synchronization is then used
+// to ensure that the response to the interrupt, i.e., starting a new round,
+// happens *after* the interrupt is observed. Without this synchronization, the
+// compiler and/or CPU could reorder operations to make the tasks observe the
+// round update *before* the interrupt is set.
+TEST_CASE(StackLimitInterrupts) {
+  Monitor awake_monitor;  // Synchronizes the 'awake' flags.
+  bool awake[InterruptChecker::kTaskCount];
+  memset(awake, 0, sizeof(awake));
+  Monitor round_monitor;  // Synchronizes the 'round' counter.
+  intptr_t round = 0;
+  Isolate* isolate = Thread::Current()->isolate();
+  // Start all tasks. They will busy-wait until interrupted in the first round.
+  for (intptr_t task = 0; task < InterruptChecker::kTaskCount; task++) {
+    Dart::thread_pool()->Run(new InterruptChecker(
+        isolate, &awake_monitor, &awake[task], &round_monitor, &round));
+  }
+  // Wait for all tasks to get ready for the first round.
+  WaitForAllTasks(awake, &awake_monitor);
+  for (intptr_t i = 0; i < InterruptChecker::kIterations; ++i) {
+    isolate->ScheduleInterrupts(Isolate::kVMInterrupt);
+    // Wait for all tasks to observe the interrupt.
+    WaitForAllTasks(awake, &awake_monitor);
+    // Continue with next round.
+    uword interrupts = isolate->GetAndClearInterrupts();
+    EXPECT((interrupts & Isolate::kVMInterrupt) != 0);
+    {
+      MonitorLocker ml(&round_monitor);
+      ++round;
+      ml.NotifyAll();
+    }
+  }
+  // Wait for tasks to exit cleanly.
+  WaitForAllTasks(awake, &awake_monitor);
+}
+
 }  // namespace dart
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 6fc9e92..e0ee6b7 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -23,15 +23,20 @@
 JSONStream::JSONStream(intptr_t buf_size)
     : open_objects_(0),
       buffer_(buf_size),
-      default_id_zone_(Isolate::Current()->object_id_ring(),
-                       ObjectIdRing::kAllocateId),
+      default_id_zone_(),
       id_zone_(&default_id_zone_),
       reply_port_(ILLEGAL_PORT),
-      seq_(Instance::Handle(Instance::null())),
+      seq_(NULL),
       method_(""),
       param_keys_(NULL),
       param_values_(NULL),
       num_params_(0) {
+  ObjectIdRing* ring = NULL;
+  Isolate* isolate = Isolate::Current();
+  if (isolate != NULL) {
+    ring = isolate->object_id_ring();
+  }
+  default_id_zone_.Init(ring, ObjectIdRing::kAllocateId);
 }
 
 
@@ -46,7 +51,7 @@
                        const Array& param_keys,
                        const Array& param_values) {
   set_reply_port(reply_port);
-  seq_ ^= seq.raw();
+  seq_ = &Instance::ZoneHandle(seq.raw());
   method_ = method.ToCString();
 
   String& string_iterator = String::Handle();
@@ -103,8 +108,7 @@
     case kCannotAddBreakpoint:
       return "Cannot add breakpoint";
     default:
-      UNIMPLEMENTED();
-      return "Unexpected rpc error code";
+      return "Extension error";
   }
 }
 
@@ -154,6 +158,20 @@
 }
 
 
+void JSONStream::PostNullReply(Dart_Port port) {
+  const Object& reply = Object::Handle(Object::null());
+  ASSERT(reply.IsNull());
+
+  uint8_t* data = NULL;
+  MessageWriter writer(&data, &allocator, false);
+  writer.WriteMessage(reply);
+  PortMap::PostMessage(new Message(port,
+                                   data,
+                                   writer.BytesWritten(),
+                                   Message::kNormalPriority));
+}
+
+
 void JSONStream::PostReply() {
   Dart_Port port = reply_port();
   ASSERT(port != ILLEGAL_PORT);
@@ -162,18 +180,19 @@
   if (FLAG_trace_service) {
     process_delta_micros = OS::GetCurrentTimeMicros() - setup_time_micros_;
   }
-
-  if (seq_.IsString()) {
-    const String& str = String::Cast(seq_);
+  ASSERT(seq_ != NULL);
+  if (seq_->IsString()) {
+    const String& str = String::Cast(*seq_);
     PrintProperty("id", str.ToCString());
-  } else if (seq_.IsInteger()) {
-    const Integer& integer = Integer::Cast(seq_);
+  } else if (seq_->IsInteger()) {
+    const Integer& integer = Integer::Cast(*seq_);
     PrintProperty64("id", integer.AsInt64Value());
-  } else if (seq_.IsDouble()) {
-    const Double& dbl = Double::Cast(seq_);
+  } else if (seq_->IsDouble()) {
+    const Double& dbl = Double::Cast(*seq_);
     PrintProperty("id", dbl.value());
-  } else if (seq_.IsNull()) {
+  } else if (seq_->IsNull()) {
     // JSON-RPC 2.0 says that a request with a null ID shouldn't get a reply.
+    PostNullReply(port);
     return;
   }
   buffer_.AddChar('}');
@@ -535,6 +554,14 @@
 }
 
 
+void JSONStream::Steal(const char** buffer, intptr_t* buffer_length) {
+  ASSERT(buffer != NULL);
+  ASSERT(buffer_length != NULL);
+  *buffer_length = buffer_.length();
+  *buffer = buffer_.Steal();
+}
+
+
 void JSONStream::set_reply_port(Dart_Port port) {
   reply_port_ = port;
 }
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index e581560..cdc5c4e 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -42,6 +42,8 @@
   kInvalidParams  = -32602,
   kInternalError  = -32603,
 
+  kExtensionError = -32000,
+
   kFeatureDisabled         = 100,
   kVMMustBePaused          = 101,
   kCannotAddBreakpoint     = 102,
@@ -77,6 +79,8 @@
   TextBuffer* buffer() { return &buffer_; }
   const char* ToCString() { return buffer_.buf(); }
 
+  void Steal(const char** buffer, intptr_t* buffer_length);
+
   void set_reply_port(Dart_Port port);
 
   void SetParams(const char** param_keys, const char** param_values,
@@ -106,6 +110,7 @@
 
  private:
   void Clear();
+  void PostNullReply(Dart_Port port);
 
   void OpenObject(const char* property_name = NULL);
   void CloseObject();
@@ -170,7 +175,7 @@
   RingServiceIdZone default_id_zone_;
   ServiceIdZone* id_zone_;
   Dart_Port reply_port_;
-  Instance& seq_;
+  Instance* seq_;
   const char* method_;
   const char** param_keys_;
   const char** param_values_;
diff --git a/runtime/vm/longjump.cc b/runtime/vm/longjump.cc
index 66de5af..0e53b60 100644
--- a/runtime/vm/longjump.cc
+++ b/runtime/vm/longjump.cc
@@ -17,7 +17,7 @@
 
 jmp_buf* LongJumpScope::Set() {
   ASSERT(top_ == NULL);
-  top_ = Isolate::Current()->top_resource();
+  top_ = Thread::Current()->top_resource();
   return &environment_;
 }
 
@@ -25,13 +25,19 @@
 bool LongJumpScope::IsSafeToJump() {
   // We do not want to jump past Dart frames.  Note that this code
   // assumes the stack grows from high to low.
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
   uword jumpbuf_addr = Isolate::GetCurrentStackPointer();
 #if defined(USING_SIMULATOR)
   uword top_exit_frame_info = isolate->simulator()->top_exit_frame_info();
 #else
-  uword top_exit_frame_info = isolate->top_exit_frame_info();
+  uword top_exit_frame_info = thread->top_exit_frame_info();
 #endif
+  if (!isolate->MutatorThreadIsCurrentThread()) {
+    // A helper thread does not execute Dart code, so it's safe to jump.
+    ASSERT(top_exit_frame_info == 0);
+    return true;
+  }
   return ((top_exit_frame_info == 0) || (jumpbuf_addr < top_exit_frame_info));
 }
 
diff --git a/runtime/vm/longjump.h b/runtime/vm/longjump.h
index adf9449..ce4f813 100644
--- a/runtime/vm/longjump.h
+++ b/runtime/vm/longjump.h
@@ -17,14 +17,14 @@
 class LongJumpScope : public StackResource {
  public:
   LongJumpScope()
-    : StackResource(Isolate::Current()),
+    : StackResource(Thread::Current()),
       top_(NULL),
-      base_(Isolate::Current()->long_jump_base()) {
-    Isolate::Current()->set_long_jump_base(this);
+      base_(Thread::Current()->long_jump_base()) {
+    Thread::Current()->set_long_jump_base(this);
   }
 
   ~LongJumpScope() {
-    Isolate::Current()->set_long_jump_base(base_);
+    Thread::Current()->set_long_jump_base(base_);
   }
 
   jmp_buf* Set();
diff --git a/runtime/vm/longjump_test.cc b/runtime/vm/longjump_test.cc
index f23956b..4f48050 100644
--- a/runtime/vm/longjump_test.cc
+++ b/runtime/vm/longjump_test.cc
@@ -2,8 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#include "vm/isolate.h"
 #include "vm/longjump.h"
+#include "vm/thread.h"
 #include "vm/unit_test.h"
 
 namespace dart {
@@ -18,7 +18,7 @@
 
 
 TEST_CASE(LongJump) {
-  LongJumpScope* base = Isolate::Current()->long_jump_base();
+  LongJumpScope* base = Thread::Current()->long_jump_base();
   {
     LongJumpScope jump;
     if (setjmp(*jump.Set()) == 0) {
@@ -26,7 +26,7 @@
       UNREACHABLE();
     }
   }
-  ASSERT(base == Isolate::Current()->long_jump_base());
+  ASSERT(base == Thread::Current()->long_jump_base());
 }
 
 }  // namespace dart
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc
index 3291b0f..3bbc529 100644
--- a/runtime/vm/megamorphic_cache_table.cc
+++ b/runtime/vm/megamorphic_cache_table.cc
@@ -88,7 +88,7 @@
 
 
 void MegamorphicCacheTable::PrintSizes() {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   intptr_t size = 0;
   MegamorphicCache& cache = MegamorphicCache::Handle();
   Array& buckets = Array::Handle();
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 6a473dd..f832cbc 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -6,9 +6,11 @@
 
 #include "vm/dart.h"
 #include "vm/lockers.h"
+#include "vm/os.h"
 #include "vm/port.h"
 #include "vm/thread_interrupter.h"
 
+
 namespace dart {
 
 DECLARE_FLAG(bool, trace_isolates);
@@ -42,6 +44,7 @@
       pause_on_exit_(false),
       paused_on_start_(false),
       paused_on_exit_(false),
+      paused_timestamp_(-1),
       pool_(NULL),
       task_(NULL),
       start_callback_(NULL),
@@ -242,16 +245,25 @@
     // main() function.
     if (pause_on_start()) {
       if (!paused_on_start_) {
-        NotifyPauseOnStart();
+        // Temporarily drop the lock when calling out to NotifyPauseOnStart.
+        // This avoids a dead lock that can occur when this message handler
+        // tries to post a message while a message is being posted to it.
         paused_on_start_ = true;
+        paused_timestamp_ = OS::GetCurrentTimeMillis();
+        monitor_.Exit();
+        NotifyPauseOnStart();
+        monitor_.Enter();
       }
+      // More messages may have come in while we released monitor_.
       HandleMessages(false, false);
       if (pause_on_start()) {
         // Still paused.
+        ASSERT(oob_queue_->IsEmpty());
         task_ = NULL;  // No task in queue.
         return;
       } else {
         paused_on_start_ = false;
+        paused_timestamp_ = -1;
       }
     }
 
@@ -269,30 +281,49 @@
     if (ok) {
       ok = HandleMessages(true, true);
     }
-    task_ = NULL;  // No task in queue.
 
     if (!ok || !HasLivePorts()) {
       if (pause_on_exit()) {
         if (!paused_on_exit_) {
           if (FLAG_trace_service_pause_events) {
             OS::PrintErr("Isolate %s paused before exiting. "
-                       "Use the Observatory to release it.\n", name());
+                         "Use the Observatory to release it.\n", name());
           }
-          NotifyPauseOnExit();
+          // Temporarily drop the lock when calling out to NotifyPauseOnExit.
+          // This avoids a dead lock that can occur when this message handler
+          // tries to post a message while a message is being posted to it.
           paused_on_exit_ = true;
+          paused_timestamp_ = OS::GetCurrentTimeMillis();
+          monitor_.Exit();
+          NotifyPauseOnExit();
+          monitor_.Enter();
         }
-      } else {
-        if (FLAG_trace_isolates) {
+        // More messages may have come in while we released monitor_.
+        HandleMessages(false, false);
+        if (pause_on_exit()) {
+          // Still paused.
+          ASSERT(oob_queue_->IsEmpty());
+          task_ = NULL;  // No task in queue.
+          return;
+        } else {
+          paused_on_exit_ = false;
+          paused_timestamp_ = -1;
+        }
+      }
+      if (FLAG_trace_isolates) {
         OS::Print("[-] Stopping message handler (%s):\n"
                   "\thandler:    %s\n",
                   (ok ? "no live ports" : "error"),
                   name());
-        }
-        pool_ = NULL;
-        run_end_callback = true;
-        paused_on_exit_ = false;
       }
+      pool_ = NULL;
+      run_end_callback = true;
     }
+
+    // Clear the task_ last.  This allows other tasks to potentially start
+    // for this message handler.
+    ASSERT(oob_queue_->IsEmpty());
+    task_ = NULL;
   }
   if (run_end_callback && end_callback_ != NULL) {
     end_callback_(callback_data_);
diff --git a/runtime/vm/message_handler.h b/runtime/vm/message_handler.h
index 07fa5ab..78c5f6c 100644
--- a/runtime/vm/message_handler.h
+++ b/runtime/vm/message_handler.h
@@ -96,6 +96,11 @@
     return paused_on_exit_;
   }
 
+  // Timestamp of the paused on start or paused on exit.
+  int64_t paused_timestamp() const {
+    return paused_timestamp_;
+  }
+
   class AcquiredQueues : public ValueObject {
    public:
     AcquiredQueues();
@@ -207,6 +212,7 @@
   bool pause_on_exit_;
   bool paused_on_start_;
   bool paused_on_exit_;
+  int64_t paused_timestamp_;
   ThreadPool* pool_;
   ThreadPool::Task* task_;
   StartCallback start_callback_;
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index 0e04e6b..79038fb 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -9,9 +9,13 @@
 #include "vm/native_entry.h"
 #include "vm/runtime_entry.h"
 #include "vm/object.h"
+#include "vm/log.h"
 
 namespace dart {
 
+DEFINE_FLAG(bool, print_metrics, false,
+            "Print metrics when isolates (and the VM) are shutdown.");
+
 Metric* Metric::vm_list_head_ = NULL;
 
 Metric::Metric()
@@ -92,6 +96,48 @@
 }
 
 
+char* Metric::ValueToString(int64_t value, Unit unit) {
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+  Zone* zone = thread->zone();
+  ASSERT(zone != NULL);
+  switch (unit) {
+    case kCounter:
+      return zone->PrintToString("%" Pd64 "", value);
+    case kByte: {
+      const char* scaled_suffix = "b";
+      double scaled_value = static_cast<double>(value);
+      if (value > KB) {
+        scaled_suffix = "kb";
+        scaled_value /= KB;
+      } else if (value > MB) {
+        scaled_suffix = "mb";
+        scaled_value /= MB;
+      } else if (value > GB) {
+        scaled_suffix = "gb";
+        scaled_value /= GB;
+      }
+      return zone->PrintToString("%.3f %s (%" Pd64 ")",
+                                 scaled_value,
+                                 scaled_suffix,
+                                 value);
+    }
+    default:
+      UNREACHABLE();
+      return NULL;
+  }
+}
+
+
+char* Metric::ToString() {
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+  Zone* zone = thread->zone();
+  ASSERT(zone != NULL);
+  return zone->PrintToString("%s %s", name(), ValueToString(value(), unit()));
+}
+
+
 bool Metric::NameExists(Metric* head, const char* name) {
   ASSERT(name != NULL);
   while (head != NULL) {
@@ -247,4 +293,18 @@
 #undef VM_METRIC_INIT
 }
 
+void Metric::Cleanup() {
+  if (FLAG_print_metrics) {
+    // Create a zone to allocate temporary strings in.
+    StackZone sz(Thread::Current());
+    OS::Print("Printing metrics for VM\n");
+    Metric* current = Metric::vm_head();
+    while (current != NULL) {
+      OS::Print("%s\n", current->ToString());
+      current = current->next();
+    }
+    OS::Print("\n");
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/metrics.h b/runtime/vm/metrics.h
index ab58881..03cead2 100644
--- a/runtime/vm/metrics.h
+++ b/runtime/vm/metrics.h
@@ -35,6 +35,8 @@
 
   static void InitOnce();
 
+  static void Cleanup();
+
   // Initialize and register a metric for an isolate.
   void Init(Isolate* isolate,
             const char* name,
@@ -50,6 +52,12 @@
 
   void PrintJSON(JSONStream* stream);
 
+  // Returns a zone allocated string.
+  static char* ValueToString(int64_t value, Unit unit);
+
+  // Returns a zone allocated string.
+  char* ToString();
+
   int64_t value() const { return value_; }
   void set_value(int64_t value) { value_ = value; }
 
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
index 0180c09..ad351c8 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -6,10 +6,14 @@
 
 #include "include/dart_api.h"
 
+#include "vm/bootstrap.h"
+#include "vm/code_patcher.h"
 #include "vm/dart_api_impl.h"
 #include "vm/dart_api_state.h"
 #include "vm/object_store.h"
 #include "vm/reusable_handles.h"
+#include "vm/stack_frame.h"
+#include "vm/symbols.h"
 #include "vm/tags.h"
 
 
@@ -23,6 +27,10 @@
     reinterpret_cast<uword>(&NativeEntry::NativeCallWrapper));
 
 
+static ExternalLabel link_native_call_label(
+    reinterpret_cast<uword>(&NativeEntry::LinkNativeCall));
+
+
 NativeFunction NativeEntry::ResolveNative(const Library& library,
                                           const String& function_name,
                                           int number_of_arguments,
@@ -123,4 +131,147 @@
   VERIFY_ON_TRANSITION;
 }
 
+
+static bool IsNativeKeyword(const TokenStream::Iterator& it) {
+  return Token::IsIdentifier(it.CurrentTokenKind()) &&
+      (it.CurrentLiteral() == Symbols::Native().raw());
+}
+
+
+static NativeFunction ResolveNativeFunction(Isolate *isolate,
+                                            const Function& func,
+                                            bool* is_bootstrap_native) {
+  const Script& script = Script::Handle(isolate, func.script());
+  const Class& cls = Class::Handle(isolate, func.Owner());
+  const Library& library = Library::Handle(isolate, cls.library());
+
+  *is_bootstrap_native =
+      Bootstrap::IsBootstapResolver(library.native_entry_resolver());
+
+  TokenStream::Iterator it(TokenStream::Handle(isolate, script.tokens()),
+                           func.token_pos());
+
+  const intptr_t end_pos = func.end_token_pos();
+  while (!IsNativeKeyword(it) && it.CurrentPosition() <= end_pos) {
+    it.Advance();
+  }
+  ASSERT(IsNativeKeyword(it));
+  it.Advance();
+  ASSERT(it.CurrentTokenKind() == Token::kSTRING);
+  const String& native_name = String::Handle(it.CurrentLiteral());
+
+  const int num_params = NativeArguments::ParameterCountForResolution(func);
+  bool auto_setup_scope = true;
+  return NativeEntry::ResolveNative(
+      library, native_name, num_params, &auto_setup_scope);
+}
+
+
+const ExternalLabel& NativeEntry::LinkNativeCallLabel() {
+  return link_native_call_label;
+}
+
+
+void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
+  CHECK_STACK_ALIGNMENT;
+  VERIFY_ON_TRANSITION;
+  NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
+  /* Tell MemorySanitizer 'arguments' is initialized by generated code. */
+  MSAN_UNPOISON(arguments, sizeof(*arguments));
+  TRACE_NATIVE_CALL("%s", "LinkNative");
+
+  NativeFunction target_function = NULL;
+  bool call_through_wrapper = false;
+#ifdef USING_SIMULATOR
+  bool is_native_auto_setup_scope = false;
+  intptr_t num_parameters = -1;
+#endif
+
+  {
+    StackZone zone(arguments->thread());
+
+    DartFrameIterator iterator;
+    StackFrame* caller_frame = iterator.NextFrame();
+
+    const Code& code = Code::Handle(caller_frame->LookupDartCode());
+    const Function& func = Function::Handle(code.function());
+#ifdef USING_SIMULATOR
+    is_native_auto_setup_scope = func.IsNativeAutoSetupScope();
+    num_parameters = func.NumParameters();
+#endif
+
+    if (FLAG_trace_natives) {
+      OS::Print("Resolving native target for %s\n", func.ToCString());
+    }
+
+    bool is_bootstrap_native = false;
+    target_function = ResolveNativeFunction(
+        arguments->thread()->isolate(), func, &is_bootstrap_native);
+    ASSERT(target_function != NULL);
+
+#if defined(DEBUG)
+    {
+      NativeFunction current_function = NULL;
+      uword current_trampoline =
+          CodePatcher::GetNativeCallAt(caller_frame->pc(),
+                                       code,
+                                       &current_function);
+#if !defined(USING_SIMULATOR)
+      ASSERT(current_function ==
+             reinterpret_cast<NativeFunction>(LinkNativeCall));
+#else
+      ASSERT(current_function ==
+             reinterpret_cast<NativeFunction>(
+                 Simulator::RedirectExternalReference(
+                     reinterpret_cast<uword>(LinkNativeCall),
+                     Simulator::kBootstrapNativeCall,
+                     func.NumParameters())));
+#endif
+      ASSERT(current_trampoline ==
+             StubCode::CallBootstrapCFunction_entry()->EntryPoint());
+    }
+#endif
+
+    const intptr_t argc_tag = NativeArguments::ComputeArgcTag(func);
+    const bool is_leaf_call =
+      (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
+
+    call_through_wrapper = !is_bootstrap_native && !is_leaf_call;
+
+    const Code& trampoline = Code::Handle(call_through_wrapper ?
+        StubCode::CallNativeCFunction_entry()->code() :
+        StubCode::CallBootstrapCFunction_entry()->code());
+
+    NativeFunction patch_target_function = target_function;
+#if defined(USING_SIMULATOR)
+    if (!call_through_wrapper || !is_native_auto_setup_scope) {
+      patch_target_function = reinterpret_cast<NativeFunction>(
+          Simulator::RedirectExternalReference(
+              reinterpret_cast<uword>(patch_target_function),
+              Simulator::kBootstrapNativeCall, num_parameters));
+    }
+#endif
+
+    CodePatcher::PatchNativeCallAt(
+        caller_frame->pc(), code, patch_target_function, trampoline);
+
+    if (FLAG_trace_natives) {
+      OS::Print("    -> %p (%s, %s)\n",
+                target_function,
+                is_bootstrap_native ? "bootstrap" : "non-bootstrap",
+                is_leaf_call ? "leaf" : "non-leaf");
+    }
+  }
+  VERIFY_ON_TRANSITION;
+
+  // Tail-call resolved target.
+  if (call_through_wrapper) {
+    NativeEntry::NativeCallWrapper(
+        args, reinterpret_cast<Dart_NativeFunction>(target_function));
+  } else {
+    target_function(arguments);
+  }
+}
+
+
 }  // namespace dart
diff --git a/runtime/vm/native_entry.h b/runtime/vm/native_entry.h
index 45dd5c9..cacf42d 100644
--- a/runtime/vm/native_entry.h
+++ b/runtime/vm/native_entry.h
@@ -54,7 +54,7 @@
       Thread* thread = arguments->thread();                                    \
       ASSERT(thread == Thread::Current());                                     \
       Isolate* isolate = thread->isolate();                                    \
-      StackZone zone(isolate);                                                 \
+      StackZone zone(thread);                                                  \
       SET_NATIVE_RETVAL(arguments,                                             \
                         DN_Helper##name(isolate,                               \
                                         thread,                                \
@@ -112,9 +112,13 @@
   static const uint8_t* ResolveSymbolInLibrary(const Library& library,
                                                uword pc);
   static const uint8_t* ResolveSymbol(uword pc);
+
+  static const ExternalLabel& NativeCallWrapperLabel();
   static void NativeCallWrapper(Dart_NativeArguments args,
                                 Dart_NativeFunction func);
-  static const ExternalLabel& NativeCallWrapperLabel();
+
+  static const ExternalLabel& LinkNativeCallLabel();
+  static void LinkNativeCall(Dart_NativeArguments args);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/native_entry_test.h b/runtime/vm/native_entry_test.h
index 2c34548..7e51a24 100644
--- a/runtime/vm/native_entry_test.h
+++ b/runtime/vm/native_entry_test.h
@@ -6,9 +6,13 @@
 #define VM_NATIVE_ENTRY_TEST_H_
 
 #include "include/dart_api.h"
+#include "vm/runtime_entry.h"
 
 namespace dart {
 
+DECLARE_RUNTIME_ENTRY(TestSmiSub)
+DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*)
+
 void TestSmiSub(Dart_NativeArguments args);
 void TestSmiSum(Dart_NativeArguments args);
 void TestNonNullSmiSum(Dart_NativeArguments args);
diff --git a/runtime/vm/native_message_handler.cc b/runtime/vm/native_message_handler.cc
index 08bc7e9..da869e2 100644
--- a/runtime/vm/native_message_handler.cc
+++ b/runtime/vm/native_message_handler.cc
@@ -32,23 +32,16 @@
 #endif
 
 
-static uint8_t* zone_allocator(uint8_t* ptr,
-                               intptr_t old_size,
-                               intptr_t new_size) {
-  Zone* zone = ApiNativeScope::Current()->zone();
-  return zone->Realloc<uint8_t>(ptr, old_size, new_size);
-}
-
-
 bool NativeMessageHandler::HandleMessage(Message* message) {
   if (message->IsOOB()) {
     // We currently do not use OOB messages for native ports.
     UNREACHABLE();
   }
-  // Enter a native scope for handling the message. This will create a
-  // zone for allocating the objects for decoding the message.
+  // We create a native scope for handling the message.
+  // All allocation of objects for decoding the message is done in the
+  // zone associated with this scope.
   ApiNativeScope scope;
-  ApiMessageReader reader(message->data(), message->len(), zone_allocator);
+  ApiMessageReader reader(message->data(), message->len());
   Dart_CObject* object = reader.ReadMessage();
   (*func())(message->dest_port(), object);
   delete message;
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 8e2460e..1d6e33b 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -62,6 +62,7 @@
 DEFINE_FLAG(bool, throw_on_javascript_int_overflow, false,
     "Throw an exception when the result of an integer calculation will not "
     "fit into a javascript integer.");
+DEFINE_FLAG(bool, trace_cha, false, "Trace CHA operations");
 DEFINE_FLAG(bool, use_field_guards, true, "Guard field cids.");
 DEFINE_FLAG(bool, use_lib_cache, true, "Use library name cache");
 DEFINE_FLAG(bool, trace_field_guards, false, "Trace changes in field's cids.");
@@ -97,6 +98,7 @@
 TypeArguments* Object::null_type_arguments_ = NULL;
 Array* Object::empty_array_ = NULL;
 Array* Object::zero_array_ = NULL;
+ContextScope* Object::empty_context_scope_ = NULL;
 ObjectPool* Object::empty_object_pool_ = NULL;
 PcDescriptors* Object::empty_descriptors_ = NULL;
 LocalVarDescriptors* Object::empty_var_descriptors_ = NULL;
@@ -426,6 +428,7 @@
   null_type_arguments_ = TypeArguments::ReadOnlyHandle();
   empty_array_ = Array::ReadOnlyHandle();
   zero_array_ = Array::ReadOnlyHandle();
+  empty_context_scope_ = ContextScope::ReadOnlyHandle();
   empty_object_pool_ = ObjectPool::ReadOnlyHandle();
   empty_descriptors_ = PcDescriptors::ReadOnlyHandle();
   empty_var_descriptors_ = LocalVarDescriptors::ReadOnlyHandle();
@@ -655,6 +658,22 @@
     zero_array_->SetAt(0, smi);
   }
 
+  // Allocate and initialize the canonical empty context scope object.
+  {
+    uword address = heap->Allocate(ContextScope::InstanceSize(0), Heap::kOld);
+    InitializeObject(address,
+                     kContextScopeCid,
+                     ContextScope::InstanceSize(0),
+                     true);
+    ContextScope::initializeHandle(
+        empty_context_scope_,
+        reinterpret_cast<RawContextScope*>(address + kHeapObjectTag));
+    empty_context_scope_->StoreNonPointer(
+        &empty_context_scope_->raw_ptr()->num_variables_, 0);
+    empty_context_scope_->StoreNonPointer(
+        &empty_context_scope_->raw_ptr()->is_implicit_, true);
+  }
+
   // Allocate and initialize the canonical empty object pool object.
   {
     uword address =
@@ -775,6 +794,8 @@
   ASSERT(empty_array_->IsArray());
   ASSERT(!zero_array_->IsSmi());
   ASSERT(zero_array_->IsArray());
+  ASSERT(!empty_context_scope_->IsSmi());
+  ASSERT(empty_context_scope_->IsContextScope());
   ASSERT(!empty_descriptors_->IsSmi());
   ASSERT(empty_descriptors_->IsPcDescriptors());
   ASSERT(!empty_var_descriptors_->IsSmi());
@@ -987,7 +1008,12 @@
 
 
 RawError* Object::Init(Isolate* isolate) {
-  TIMERSCOPE(isolate, time_bootstrap);
+  Thread* thread = Thread::Current();
+  ASSERT(isolate == thread->isolate());
+  TIMERSCOPE(thread, time_bootstrap);
+  TimelineDurationScope tds(isolate,
+                            isolate->GetIsolateStream(),
+                            "Object::Init");
 
 #if defined(DART_NO_SNAPSHOT)
   // Object::Init version when we are running in a version of dart that does
@@ -1078,6 +1104,10 @@
   RegisterPrivateClass(cls, Symbols::_List(), core_lib);
   pending_classes.Add(cls);
   // We cannot use NewNonParameterizedType(cls), because Array is parameterized.
+  // Warning: class _List has not been patched yet. Its declared number of type
+  // parameters is still 0. It will become 1 after patching. The array type
+  // allocated below represents the raw type _List and not _List<E> as we
+  // could expect. Use with caution.
   type ^= Type::New(Object::Handle(isolate, cls.raw()),
                     TypeArguments::Handle(isolate),
                     Scanner::kNoSourcePos);
@@ -1609,7 +1639,7 @@
 
 
 void Object::Print() const {
-  OS::Print("%s\n", ToCString());
+  ISL_Print("%s\n", ToCString());
 }
 
 
@@ -1858,29 +1888,17 @@
 
 RawType* Class::SignatureType() const {
   ASSERT(IsSignatureClass());
-  const Function& function = Function::Handle(signature_function());
+  Zone* zone = Thread::Current()->zone();
+  const Function& function = Function::Handle(zone, signature_function());
   ASSERT(!function.IsNull());
   if (function.signature_class() != raw()) {
     // This class is a function type alias. Return the canonical signature type.
-    const Class& canonical_class = Class::Handle(function.signature_class());
-    return canonical_class.SignatureType();
+    const Class& canonical_signature_class =
+        Class::Handle(zone, function.signature_class());
+    return canonical_signature_class.SignatureType();
   }
-  // Return the first canonical signature type if already computed at class
-  // finalization time. The optimizer may canonicalize instantiated function
-  // types of the same signature class, but these will be added after the
-  // uninstantiated signature class at index 0.
-  Array& signature_types = Array::Handle();
-  signature_types ^= canonical_types();
-  if (signature_types.IsNull()) {
-    set_canonical_types(empty_array());
-    signature_types ^= canonical_types();
-  }
-  // The canonical_types array is initialized to the empty array.
-  ASSERT(!signature_types.IsNull());
-  if (signature_types.Length() > 0) {
-    Type& signature_type = Type::Handle();
-    signature_type ^= signature_types.At(0);
-    ASSERT(!signature_type.IsNull());
+  const Type& signature_type = Type::Handle(zone, CanonicalType());
+  if (!signature_type.IsNull()) {
     return signature_type.raw();
   }
   // A signature class extends class Instance and is parameterized in the same
@@ -1892,13 +1910,9 @@
   // argument vector. Therefore, we only need to set the type arguments
   // matching the type parameters here.
   const TypeArguments& signature_type_arguments =
-      TypeArguments::Handle(type_parameters());
-  const Type& signature_type = Type::Handle(
-      Type::New(*this, signature_type_arguments, token_pos()));
-
+      TypeArguments::Handle(zone, type_parameters());
   // Return the still unfinalized signature type.
-  ASSERT(!signature_type.IsFinalized());
-  return signature_type.raw();
+  return Type::New(*this, signature_type_arguments, token_pos());
 }
 
 
@@ -2715,7 +2729,7 @@
   virtual void ReportDeoptimization(const Code& code) {
     if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
       Function& function = Function::Handle(code.function());
-      OS::PrintErr("Deoptimizing %s because CHA optimized (%s).\n",
+      ISL_Print("Deoptimizing %s because CHA optimized (%s).\n",
           function.ToFullyQualifiedCString(),
           cls_.ToCString());
     }
@@ -2724,10 +2738,10 @@
   virtual void ReportSwitchingCode(const Code& code) {
     if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
       Function& function = Function::Handle(code.function());
-      OS::PrintErr("Switching %s to unoptimized code because CHA invalid"
-                   " (%s)\n",
-                   function.ToFullyQualifiedCString(),
-                   cls_.ToCString());
+      ISL_Print("Switching %s to unoptimized code because CHA invalid"
+                " (%s)\n",
+                function.ToFullyQualifiedCString(),
+                cls_.ToCString());
     }
   }
 
@@ -2738,6 +2752,10 @@
 
 
 void Class::RegisterCHACode(const Code& code) {
+  if (FLAG_trace_cha) {
+    ISL_Print("RegisterCHACode %s class %s\n",
+        Function::Handle(code.function()).ToQualifiedCString(), ToCString());
+  }
   ASSERT(code.is_optimized());
   CHACodeArray a(*this);
   a.Register(code);
@@ -2949,6 +2967,7 @@
 
 
 // Ensure that top level parsing of the class has been done.
+// TODO(24109): Migrate interface to Thread*.
 RawError* Class::EnsureIsFinalized(Isolate* isolate) const {
   // Finalized classes have already been parsed.
   if (is_finalized()) {
@@ -2956,9 +2975,12 @@
   }
   ASSERT(isolate != NULL);
   const Error& error = Error::Handle(isolate, Compiler::CompileClass(*this));
-  if (!error.IsNull() && (isolate->long_jump_base() != NULL)) {
-    Report::LongJump(error);
-    UNREACHABLE();
+  if (!error.IsNull()) {
+    ASSERT(isolate == Thread::Current()->isolate());
+    if (Thread::Current()->long_jump_base() != NULL) {
+      Report::LongJump(error);
+      UNREACHABLE();
+    }
   }
   return error.raw();
 }
@@ -2988,17 +3010,15 @@
 }
 
 
-void Class::AddFields(const GrowableObjectArray& new_fields) const {
-  const intptr_t num_new_fields = new_fields.Length();
+void Class::AddFields(const GrowableArray<const Field*>& new_fields) const {
+  const intptr_t num_new_fields = new_fields.length();
   if (num_new_fields == 0) return;
   const Array& arr = Array::Handle(fields());
   const intptr_t num_old_fields = arr.Length();
   const Array& new_arr = Array::Handle(
       Array::Grow(arr, num_old_fields + num_new_fields, Heap::kOld));
-  Field& field = Field::Handle();
   for (intptr_t i = 0; i < num_new_fields; i++) {
-    field ^= new_fields.At(i);
-    new_arr.SetAt(i + num_old_fields, field);
+    new_arr.SetAt(i + num_old_fields, *new_fields.At(i));
   }
   SetFields(new_arr);
 }
@@ -3589,20 +3609,32 @@
 }
 
 
-intptr_t Class::NumCanonicalTypes() const {
-  if (CanonicalType() != Type::null()) {
-    return 1;
+RawType* Class::CanonicalType() const {
+  if (NumTypeArguments() == 0) {
+    return reinterpret_cast<RawType*>(raw_ptr()->canonical_types_);
   }
-  const Object& types = Object::Handle(canonical_types());
-  if (types.IsNull()) {
-    return 0;
+  Array& types = Array::Handle();
+  types ^= canonical_types();
+  if (!types.IsNull() && (types.Length() > 0)) {
+    return reinterpret_cast<RawType*>(types.At(0));
   }
-  intptr_t num_types = Array::Cast(types).Length();
-  while ((num_types > 0) &&
-         (Array::Cast(types).At(num_types - 1) == Type::null())) {
-    num_types--;
+  return reinterpret_cast<RawType*>(Object::null());
+}
+
+
+void Class::SetCanonicalType(const Type& type) const {
+  ASSERT(type.IsCanonical());
+  if (NumTypeArguments() == 0) {
+    ASSERT((canonical_types() == Object::null()) ||
+           (canonical_types() == type.raw()));  // Set during own finalization.
+    set_canonical_types(type);
+  } else {
+    Array& types = Array::Handle();
+    types ^= canonical_types();
+    ASSERT(!types.IsNull() && (types.Length() > 1));
+    ASSERT((types.At(0) == Object::null()) || (types.At(0) == type.raw()));
+    types.SetAt(0, type);
   }
-  return num_types;
 }
 
 
@@ -3612,6 +3644,8 @@
     return -1;
   }
   if (needle.raw() == CanonicalType()) {
+    // For a generic type or signature type, there exists another index with the
+    // same type. It will never be returned by this function.
     return 0;
   }
   REUSABLE_OBJECT_HANDLESCOPE(isolate);
@@ -4418,32 +4452,31 @@
 RawString* TypeArguments::SubvectorName(intptr_t from_index,
                                         intptr_t len,
                                         NameVisibility name_visibility) const {
+  Zone* zone = Thread::Current()->zone();
   ASSERT(from_index + len <= Length());
-  String& name = String::Handle();
+  String& name = String::Handle(zone);
   const intptr_t num_strings = (len == 0) ? 2 : 2*len + 1;  // "<""T"", ""T"">".
-  const Array& strings = Array::Handle(Array::New(num_strings));
-  intptr_t s = 0;
-  strings.SetAt(s++, Symbols::LAngleBracket());
+  GrowableHandlePtrArray<const String> pieces(zone, num_strings);
+  pieces.Add(Symbols::LAngleBracket());
   AbstractType& type = AbstractType::Handle();
   for (intptr_t i = 0; i < len; i++) {
     type = TypeAt(from_index + i);
     name = type.BuildName(name_visibility);
-    strings.SetAt(s++, name);
+    pieces.Add(name);
     if (i < len - 1) {
-      strings.SetAt(s++, Symbols::CommaSpace());
+      pieces.Add(Symbols::CommaSpace());
     }
   }
-  strings.SetAt(s++, Symbols::RAngleBracket());
-  ASSERT(s == num_strings);
-  name = String::ConcatAll(strings);
-  return Symbols::New(name);
+  pieces.Add(Symbols::RAngleBracket());
+  ASSERT(pieces.length() == num_strings);
+  return Symbols::FromConcatAll(pieces);
 }
 
 
 bool TypeArguments::IsSubvectorEquivalent(const TypeArguments& other,
                                           intptr_t from_index,
                                           intptr_t len,
-                                          GrowableObjectArray* trail) const {
+                                          TrailPtr trail) const {
   if (this->raw() == other.raw()) {
     return true;
   }
@@ -4640,7 +4673,7 @@
 
 bool TypeArguments::IsSubvectorInstantiated(intptr_t from_index,
                                             intptr_t len,
-                                            GrowableObjectArray* trail) const {
+                                            TrailPtr trail) const {
   ASSERT(!IsNull());
   AbstractType& type = AbstractType::Handle();
   for (intptr_t i = 0; i < len; i++) {
@@ -4798,7 +4831,7 @@
 RawTypeArguments* TypeArguments::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   ASSERT(!IsInstantiated());
   if (!instantiator_type_arguments.IsNull() &&
       IsUninstantiatedIdentity() &&
@@ -5032,7 +5065,7 @@
 
 RawTypeArguments* TypeArguments::CloneUninstantiated(
     const Class& new_owner,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   ASSERT(!IsNull());
   ASSERT(IsFinalized());
   ASSERT(!IsInstantiated());
@@ -5052,8 +5085,7 @@
 }
 
 
-RawTypeArguments* TypeArguments::Canonicalize(
-    GrowableObjectArray* trail) const {
+RawTypeArguments* TypeArguments::Canonicalize(TrailPtr trail) const {
   if (IsNull() || IsCanonical()) {
     ASSERT(IsOld());
     return this->raw();
@@ -5191,6 +5223,7 @@
 
 void Function::SetInstructions(const Code& value) const {
   StorePointer(&raw_ptr()->instructions_, value.instructions());
+  StoreNonPointer(&raw_ptr()->entry_point_, value.EntryPoint());
 }
 
 void Function::AttachCode(const Code& value) const {
@@ -5211,8 +5244,7 @@
 void Function::ClearCode() const {
   ASSERT(ic_data_array() == Array::null());
   StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
-  StorePointer(&raw_ptr()->instructions_,
-      Code::Handle(StubCode::LazyCompile_entry()->code()).instructions());
+  SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
 }
 
 
@@ -5224,7 +5256,7 @@
   const Code& current_code = Code::Handle(zone, CurrentCode());
 
   if (FLAG_trace_deoptimization_verbose) {
-    OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n",
+    ISL_Print("Disabling optimized code: '%s' entry: %#" Px "\n",
       ToFullyQualifiedCString(),
       current_code.EntryPoint());
   }
@@ -5554,24 +5586,27 @@
 
 RawJSRegExp* Function::regexp() const {
   ASSERT(kind() == RawFunction::kIrregexpFunction);
-  const Object& obj = Object::Handle(raw_ptr()->data_);
-  return JSRegExp::Cast(obj).raw();
+  const Array& pair = Array::Cast(Object::Handle(raw_ptr()->data_));
+  return JSRegExp::RawCast(pair.At(0));
 }
 
 
-void Function::set_regexp(const JSRegExp& value) const {
+intptr_t Function::string_specialization_cid() const {
   ASSERT(kind() == RawFunction::kIrregexpFunction);
-  ASSERT(raw_ptr()->data_ == Object::null());
-  set_data(value);
+  const Array& pair = Array::Cast(Object::Handle(raw_ptr()->data_));
+  return Smi::Value(Smi::RawCast(pair.At(1)));
 }
 
 
-void Function::set_regexp_cid(intptr_t regexp_cid) const {
-    ASSERT((regexp_cid == kIllegalCid) ||
-           (kind() == RawFunction::kIrregexpFunction));
-    ASSERT((regexp_cid == kIllegalCid) ||
-           RawObject::IsStringClassId(regexp_cid));
-    StoreNonPointer(&raw_ptr()->regexp_cid_, regexp_cid);
+void Function::SetRegExpData(const JSRegExp& regexp,
+                             intptr_t string_specialization_cid) const {
+  ASSERT(kind() == RawFunction::kIrregexpFunction);
+  ASSERT(RawObject::IsStringClassId(string_specialization_cid));
+  ASSERT(raw_ptr()->data_ == Object::null());
+  const Array& pair = Array::Handle(Array::New(2, Heap::kOld));
+  pair.SetAt(0, regexp);
+  pair.SetAt(1, Smi::Handle(Smi::New(string_specialization_cid)));
+  set_data(pair);
 }
 
 
@@ -6274,7 +6309,6 @@
   result.set_num_optional_parameters(0);
   result.set_usage_counter(0);
   result.set_deoptimization_counter(0);
-  result.set_regexp_cid(kIllegalCid);
   result.set_optimized_instruction_count(0);
   result.set_optimized_call_site_count(0);
   result.set_is_optimizable(is_native ? false : true);
@@ -6302,7 +6336,6 @@
   clone.ClearCode();
   clone.set_usage_counter(0);
   clone.set_deoptimization_counter(0);
-  clone.set_regexp_cid(kIllegalCid);
   clone.set_optimized_instruction_count(0);
   clone.set_optimized_call_site_count(0);
   if (new_owner.NumTypeParameters() > 0) {
@@ -6378,13 +6411,13 @@
       NewClosureFunction(closure_name, *this, token_pos()));
 
   // Set closure function's context scope.
-  ContextScope& context_scope = ContextScope::Handle();
   if (is_static()) {
-    context_scope = ContextScope::New(0);
+    closure_function.set_context_scope(Object::empty_context_scope());
   } else {
-    context_scope = LocalScope::CreateImplicitClosureScope(*this);
+    const ContextScope& context_scope =
+        ContextScope::Handle(LocalScope::CreateImplicitClosureScope(*this));
+    closure_function.set_context_scope(context_scope);
   }
-  closure_function.set_context_scope(context_scope);
 
   // Set closure function's result type to this result type.
   closure_function.set_result_type(AbstractType::Handle(result_type()));
@@ -6444,6 +6477,9 @@
   } else {
     closure_function.set_signature_class(signature_class);
   }
+  // Finalize types in signature class here, so that the
+  // signature type is not computed twice.
+  ClassFinalizer::FinalizeTypesInClass(signature_class);
   const Type& signature_type = Type::Handle(signature_class.SignatureType());
   if (!signature_type.IsFinalized()) {
     ClassFinalizer::FinalizeType(
@@ -6457,12 +6493,12 @@
 
 
 RawString* Function::UserVisibleFormalParameters() const {
-  const GrowableObjectArray& pieces =
-      GrowableObjectArray::Handle(GrowableObjectArray::New());
+  // Typically 3, 5,.. elements in 'pieces', e.g.:
+  // '_LoadRequest', CommaSpace, '_LoadError'.
+  GrowableHandlePtrArray<const String> pieces(Thread::Current()->zone(), 5);
   const TypeArguments& instantiator = TypeArguments::Handle();
-  BuildSignatureParameters(false, kUserVisibleName, instantiator, pieces);
-  const Array& strings = Array::Handle(Array::MakeArray(pieces));
-  return String::ConcatAll(strings);
+  BuildSignatureParameters(false, kUserVisibleName, instantiator, &pieces);
+  return Symbols::FromConcatAll(pieces);
 }
 
 
@@ -6470,20 +6506,23 @@
     bool instantiate,
     NameVisibility name_visibility,
     const TypeArguments& instantiator,
-    const GrowableObjectArray& pieces) const {
-  AbstractType& param_type = AbstractType::Handle();
+    GrowableHandlePtrArray<const String>* pieces) const {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+
+  AbstractType& param_type = AbstractType::Handle(zone);
   const intptr_t num_params = NumParameters();
   const intptr_t num_fixed_params = num_fixed_parameters();
   const intptr_t num_opt_pos_params = NumOptionalPositionalParameters();
   const intptr_t num_opt_named_params = NumOptionalNamedParameters();
   const intptr_t num_opt_params = num_opt_pos_params + num_opt_named_params;
   ASSERT((num_fixed_params + num_opt_params) == num_params);
-  String& name = String::Handle();
   intptr_t i = 0;
   if (name_visibility == kUserVisibleName) {
     // Hide implicit parameters.
     i = NumImplicitParameters();
   }
+  String& name = String::Handle(zone);
   while (i < num_fixed_params) {
     param_type = ParameterTypeAt(i);
     ASSERT(!param_type.IsNull());
@@ -6491,25 +6530,25 @@
       param_type = param_type.InstantiateFrom(instantiator, NULL);
     }
     name = param_type.BuildName(name_visibility);
-    pieces.Add(name);
+    pieces->Add(name);
     if (i != (num_params - 1)) {
-      pieces.Add(Symbols::CommaSpace());
+      pieces->Add(Symbols::CommaSpace());
     }
     i++;
   }
   if (num_opt_params > 0) {
     if (num_opt_pos_params > 0) {
-      pieces.Add(Symbols::LBracket());
+      pieces->Add(Symbols::LBracket());
     } else {
-      pieces.Add(Symbols::LBrace());
+      pieces->Add(Symbols::LBrace());
     }
     for (intptr_t i = num_fixed_params; i < num_params; i++) {
       // The parameter name of an optional positional parameter does not need
       // to be part of the signature, since it is not used.
       if (num_opt_named_params > 0) {
         name = ParameterNameAt(i);
-        pieces.Add(name);
-        pieces.Add(Symbols::ColonSpace());
+        pieces->Add(name);
+        pieces->Add(Symbols::ColonSpace());
       }
       param_type = ParameterTypeAt(i);
       if (instantiate && !param_type.IsInstantiated()) {
@@ -6517,15 +6556,15 @@
       }
       ASSERT(!param_type.IsNull());
       name = param_type.BuildName(name_visibility);
-      pieces.Add(name);
+      pieces->Add(name);
       if (i != (num_params - 1)) {
-        pieces.Add(Symbols::CommaSpace());
+        pieces->Add(Symbols::CommaSpace());
       }
     }
     if (num_opt_pos_params > 0) {
-      pieces.Add(Symbols::RBracket());
+      pieces->Add(Symbols::RBracket());
     } else {
-      pieces.Add(Symbols::RBrace());
+      pieces->Add(Symbols::RBrace());
     }
   }
 }
@@ -6566,25 +6605,27 @@
 RawString* Function::BuildSignature(bool instantiate,
                                     NameVisibility name_visibility,
                                     const TypeArguments& instantiator) const {
-  const GrowableObjectArray& pieces =
-      GrowableObjectArray::Handle(GrowableObjectArray::New());
-  String& name = String::Handle();
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  GrowableHandlePtrArray<const String> pieces(zone, 4);
+  String& name = String::Handle(zone);
   if (!instantiate && !is_static() && (name_visibility == kInternalName)) {
     // Prefix the signature with its signature class and type parameters, if any
     // (e.g. "Map<K, V>(K) => bool"). In case of a function type alias, the
     // signature class name is the alias name.
     // The signature of static functions cannot be type parameterized.
-    const Class& function_class = Class::Handle(Owner());
+    const Class& function_class = Class::Handle(zone, Owner());
     ASSERT(!function_class.IsNull());
     const TypeArguments& type_parameters = TypeArguments::Handle(
-        function_class.type_parameters());
+        zone, function_class.type_parameters());
     if (!type_parameters.IsNull()) {
-      const String& function_class_name = String::Handle(function_class.Name());
+      const String& function_class_name =
+          String::Handle(zone, function_class.Name());
       pieces.Add(function_class_name);
       const intptr_t num_type_parameters = type_parameters.Length();
       pieces.Add(Symbols::LAngleBracket());
-      TypeParameter& type_parameter = TypeParameter::Handle();
-      AbstractType& bound = AbstractType::Handle();
+      TypeParameter& type_parameter = TypeParameter::Handle(zone);
+      AbstractType& bound = AbstractType::Handle(zone);
       for (intptr_t i = 0; i < num_type_parameters; i++) {
         type_parameter ^= type_parameters.TypeAt(i);
         name = type_parameter.name();
@@ -6606,16 +6647,15 @@
   BuildSignatureParameters(instantiate,
                            name_visibility,
                            instantiator,
-                           pieces);
+                           &pieces);
   pieces.Add(Symbols::RParenArrow());
-  AbstractType& res_type = AbstractType::Handle(result_type());
+  AbstractType& res_type = AbstractType::Handle(zone, result_type());
   if (instantiate && !res_type.IsInstantiated()) {
     res_type = res_type.InstantiateFrom(instantiator, NULL);
   }
   name = res_type.BuildName(name_visibility);
   pieces.Add(name);
-  const Array& strings = Array::Handle(Array::MakeArray(pieces));
-  return Symbols::New(String::Handle(String::ConcatAll(strings)));
+  return Symbols::FromConcatAll(pieces);
 }
 
 
@@ -6902,10 +6942,10 @@
       // to replace the old values.
       // sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h
       // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h
-      OS::Print("s/V(%s, %d)/V(%s, %d)/\n",
+      ISL_Print("s/V(%s, %d)/V(%s, %d)/\n",
                 prefix, fp, prefix, SourceFingerprint());
     } else {
-      OS::Print("FP mismatch while recognizing method %s:"
+      ISL_Print("FP mismatch while recognizing method %s:"
                 " expecting %d found %d\n",
                 ToFullyQualifiedCString(),
                 fp,
@@ -7139,7 +7179,7 @@
 
 
 RawString* Field::GetterName(const String& field_name) {
-  return String::Concat(Symbols::GetterPrefix(), field_name);
+  return Field::GetterSymbol(field_name);
 }
 
 
@@ -7159,12 +7199,14 @@
 
 
 RawString* Field::NameFromGetter(const String& getter_name) {
-  return String::SubString(getter_name, strlen(kGetterPrefix));
+  return Symbols::New(getter_name, kGetterPrefixLength,
+      getter_name.Length() - kGetterPrefixLength);
 }
 
 
 RawString* Field::NameFromSetter(const String& setter_name) {
-  return String::SubString(setter_name, strlen(kSetterPrefix));
+  return Symbols::New(setter_name, kSetterPrefixLength,
+      setter_name.Length() - kSetterPrefixLength);
 }
 
 
@@ -7254,7 +7296,6 @@
   result.set_owner(owner);
   result.set_token_pos(token_pos);
   result.set_has_initializer(false);
-  result.set_initializer(Function::Handle());
   result.set_is_unboxing_candidate(true);
   result.set_guarded_cid(FLAG_use_field_guards ? kIllegalCid : kDynamicCid);
   result.set_is_nullable(FLAG_use_field_guards ? false : true);
@@ -7265,7 +7306,6 @@
   } else {
     result.set_guarded_list_length(Field::kNoFixedLength);
   }
-  result.set_dependent_code(Object::null_array());
   return result.raw();
 }
 
@@ -7278,7 +7318,6 @@
   const PatchClass& clone_owner =
       PatchClass::Handle(PatchClass::New(new_owner, owner));
   clone.set_owner(clone_owner);
-  clone.set_dependent_code(Object::null_array());
   if (!clone.is_static()) {
     clone.SetOffset(0);
   }
@@ -7509,19 +7548,18 @@
   virtual void ReportDeoptimization(const Code& code) {
     if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
       Function& function = Function::Handle(code.function());
-          OS::PrintErr("Deoptimizing %s because guard on field %s failed.\n",
-          function.ToFullyQualifiedCString(),
-          field_.ToCString());
+      ISL_Print("Deoptimizing %s because guard on field %s failed.\n",
+                function.ToFullyQualifiedCString(), field_.ToCString());
     }
   }
 
   virtual void ReportSwitchingCode(const Code& code) {
     if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
       Function& function = Function::Handle(code.function());
-      OS::PrintErr("Switching %s to unoptimized code because guard"
-                   " on field %s was violated.\n",
-                   function.ToFullyQualifiedCString(),
-                   field_.ToCString());
+      ISL_Print("Switching %s to unoptimized code because guard"
+                " on field %s was violated.\n",
+                function.ToFullyQualifiedCString(),
+                field_.ToCString());
     }
   }
 
@@ -7686,7 +7724,7 @@
     }
 
     if (FLAG_trace_field_guards) {
-      OS::Print("    => %s\n", GuardedPropertiesAsCString());
+      ISL_Print("    => %s\n", GuardedPropertiesAsCString());
     }
 
     return false;
@@ -7741,7 +7779,7 @@
   }
 
   if (FLAG_trace_field_guards) {
-    OS::Print("Store %s %s <- %s\n",
+    ISL_Print("Store %s %s <- %s\n",
               ToCString(),
               GuardedPropertiesAsCString(),
               value.ToCString());
@@ -7749,7 +7787,7 @@
 
   if (UpdateGuardedCidAndLength(value)) {
     if (FLAG_trace_field_guards) {
-      OS::Print("    => %s\n", GuardedPropertiesAsCString());
+      ISL_Print("    => %s\n", GuardedPropertiesAsCString());
     }
 
     DeoptimizeDependentCode();
@@ -8521,18 +8559,20 @@
 
 
 void Script::Tokenize(const String& private_key) const {
-  Isolate* isolate = Isolate::Current();
-  const TokenStream& tkns = TokenStream::Handle(isolate, tokens());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  const TokenStream& tkns = TokenStream::Handle(zone, tokens());
   if (!tkns.IsNull()) {
     // Already tokenized.
     return;
   }
   // Get the source, scan and allocate the token stream.
-  VMTagScope tagScope(isolate, VMTag::kCompileScannerTagId);
-  CSTAT_TIMER_SCOPE(isolate, scanner_timer);
-  const String& src = String::Handle(isolate, Source());
+  VMTagScope tagScope(thread, VMTag::kCompileScannerTagId);
+  CSTAT_TIMER_SCOPE(thread, scanner_timer);
+  const String& src = String::Handle(zone, Source());
   Scanner scanner(src, private_key);
-  set_tokens(TokenStream::Handle(isolate,
+  set_tokens(TokenStream::Handle(zone,
                                  TokenStream::New(scanner.GetStream(),
                                                   private_key)));
   INC_STAT(isolate, src_length, src.Length());
@@ -10018,8 +10058,7 @@
   String& name = String::Handle(class_name.raw());
   if (class_name.CharAt(0) == kPrivateIdentifierStart) {
     // Private identifiers are mangled on a per library basis.
-    name = String::Concat(name, String::Handle(core_lib.private_key()));
-    name = Symbols::New(name);
+    name = Symbols::FromConcat(name, String::Handle(core_lib.private_key()));
   }
   return core_lib.LookupClass(name);
 }
@@ -10032,8 +10071,7 @@
   // ASSERT(strchr(name, '@') == NULL);
   String& str = String::Handle();
   str = name.raw();
-  str = String::Concat(str, String::Handle(this->private_key()));
-  str = Symbols::New(str);
+  str = Symbols::FromConcat(str, String::Handle(this->private_key()));
   return str.raw();
 }
 
@@ -10461,11 +10499,11 @@
 
   virtual void ReportSwitchingCode(const Code& code) {
     if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
-      OS::PrintErr("Prefix '%s': disabling %s code for %s function '%s'\n",
-        String::Handle(prefix_.name()).ToCString(),
-        code.is_optimized() ? "optimized" : "unoptimized",
-        CodePatcher::IsEntryPatched(code) ? "patched" : "unpatched",
-        Function::Handle(code.function()).ToCString());
+      ISL_Print("Prefix '%s': disabling %s code for %s function '%s'\n",
+          String::Handle(prefix_.name()).ToCString(),
+          code.is_optimized() ? "optimized" : "unoptimized",
+          CodePatcher::IsEntryPatched(code) ? "patched" : "unpatched",
+          Function::Handle(code.function()).ToCString());
     }
   }
 
@@ -10510,7 +10548,6 @@
   result.StoreNonPointer(&result.raw_ptr()->is_loaded_, !deferred_load);
   result.set_imports(Array::Handle(Array::New(kInitialSize)));
   result.AddImport(import);
-  result.set_dependent_code(Object::null_array());
   return result.raw();
 }
 
@@ -10967,11 +11004,13 @@
         jsarr.AddValue(obj);
         break;
       case ObjectPool::kImmediate:
-        // We might want to distingiush between immediates and addresses
-        // in the future.
         imm = RawValueAt(i);
         jsarr.AddValue64(imm);
         break;
+      case ObjectPool::kExternalLabel:
+        imm = RawValueAt(i);
+        jsarr.AddValueF("0x%" Px, imm);
+        break;
       default:
         UNREACHABLE();
       }
@@ -10980,15 +11019,45 @@
 }
 
 
+static const char* DescribeExternalLabel(uword addr) {
+  const char* stub_name = StubCode::NameOfStub(addr);
+  if (stub_name != NULL) {
+    return stub_name;
+  }
+
+  RuntimeFunctionId rt_id = RuntimeEntry::RuntimeFunctionIdFromAddress(addr);
+  if (rt_id != kNoRuntimeFunctionId) {
+    return "runtime entry";
+  }
+
+  if (addr == NativeEntry::LinkNativeCallLabel().address()) {
+    return "link native";
+  }
+
+  if (addr == reinterpret_cast<uword>(Symbols::PredefinedAddress())) {
+    return "predefined symbols";
+  }
+
+  return "UNKNOWN";
+}
+
+
 void ObjectPool::DebugPrint() const {
   ISL_Print("Object Pool: {\n");
   for (intptr_t i = 0; i < Length(); i++) {
+    intptr_t offset = OffsetFromIndex(i);
+    ISL_Print("  %" Pd " PP+0x%" Px ": ", i, offset);
     if (InfoAt(i) == kTaggedObject) {
-      ISL_Print("  %" Pd ": 0x%" Px " %s (obj)\n", i,
-          reinterpret_cast<uword>(ObjectAt(i)),
-          Object::Handle(ObjectAt(i)).ToCString());
+      RawObject* obj = ObjectAt(i);
+      ISL_Print("0x%" Px " %s (obj)\n",
+          reinterpret_cast<uword>(obj),
+          Object::Handle(obj).ToCString());
+    } else if (InfoAt(i) == kExternalLabel) {
+      uword addr = RawValueAt(i);
+      ISL_Print("0x%" Px " (external label: %s)\n",
+                addr, DescribeExternalLabel(addr));
     } else {
-      ISL_Print("  %" Pd ": 0x%" Px " (raw)\n", i, RawValueAt(i));
+      ISL_Print("0x%" Px " (raw)\n", RawValueAt(i));
     }
   }
   ISL_Print("}\n");
@@ -11016,8 +11085,9 @@
 
 RawPcDescriptors* PcDescriptors::New(GrowableArray<uint8_t>* data) {
   ASSERT(Object::pc_descriptors_class() != Class::null());
-  Isolate* isolate = Isolate::Current();
-  PcDescriptors& result = PcDescriptors::Handle(isolate);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  PcDescriptors& result = PcDescriptors::Handle(thread->zone());
   {
     uword size = PcDescriptors::InstanceSize(data->length());
     RawObject* raw = Object::Allocate(PcDescriptors::kClassId,
@@ -11036,8 +11106,9 @@
 
 RawPcDescriptors* PcDescriptors::New(intptr_t length) {
   ASSERT(Object::pc_descriptors_class() != Class::null());
-  Isolate* isolate = Isolate::Current();
-  PcDescriptors& result = PcDescriptors::Handle(isolate);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  PcDescriptors& result = PcDescriptors::Handle(thread->zone());
   {
     uword size = PcDescriptors::InstanceSize(length);
     RawObject* raw = Object::Allocate(PcDescriptors::kClassId,
@@ -11080,7 +11151,7 @@
 
 const char* PcDescriptors::ToCString() const {
   if (Length() == 0) {
-    return "No pc descriptors\n";
+    return "empty PcDescriptors\n";
   }
   // 4 bits per hex digit.
   const int addr_width = kBitsPerWord / 4;
@@ -11409,6 +11480,9 @@
   if (IsNull()) {
     return "LocalVarDescriptors(NULL)";
   }
+  if (Length() == 0) {
+    return "empty LocalVarDescriptors";
+  }
   intptr_t len = 1;  // Trailing '\0'.
   String& var_name = String::Handle();
   for (intptr_t i = 0; i < Length(); i++) {
@@ -11604,7 +11678,7 @@
   }
   const Array& handled_types_data = (num_handlers == 0) ?
       Object::empty_array() :
-      Array::Handle(Array::New(num_handlers));
+      Array::Handle(Array::New(num_handlers, Heap::kOld));
   result.set_handled_types_data(handled_types_data);
   return result.raw();
 }
@@ -12344,6 +12418,22 @@
 }
 
 
+RawICData* ICData::New() {
+  ICData& result = ICData::Handle();
+  {
+    // IC data objects are long living objects, allocate them in old generation.
+    RawObject* raw = Object::Allocate(ICData::kClassId,
+                                      ICData::InstanceSize(),
+                                      Heap::kOld);
+    NoSafepointScope no_safepoint;
+    result ^= raw;
+  }
+  result.set_deopt_id(Isolate::kNoDeoptId);
+  result.set_state_bits(0);
+  return result.raw();
+}
+
+
 RawICData* ICData::New(const Function& owner,
                        const String& target_name,
                        const Array& arguments_descriptor,
@@ -13097,11 +13187,13 @@
 
 
 const char* Code::ToCString() const {
-  const char* kFormat = "Code entry:%p";
-  intptr_t len = OS::SNPrint(NULL, 0, kFormat, EntryPoint()) + 1;
-  char* chars = Thread::Current()->zone()->Alloc<char>(len);
-  OS::SNPrint(chars, len, kFormat, EntryPoint());
-  return chars;
+  Zone* zone = Thread::Current()->zone();
+  if (IsStubCode()) {
+    const char* name = StubCode::NameOfStub(EntryPoint());
+    return zone->PrintToString("[stub: %s]", name);
+  } else {
+    return zone->PrintToString("Code entry:%" Px, EntryPoint());
+  }
 }
 
 
@@ -13451,7 +13543,7 @@
 
 static void IndentN(int count) {
   for (int i = 0; i < count; i++) {
-    OS::PrintErr(" ");
+    ISL_Print(" ");
   }
 }
 
@@ -13459,17 +13551,17 @@
 void Context::Dump(int indent) const {
   if (IsNull()) {
     IndentN(indent);
-    OS::PrintErr("Context@null\n");
+    ISL_Print("Context@null\n");
     return;
   }
 
   IndentN(indent);
-  OS::PrintErr("Context@%p vars(%" Pd ") {\n", this->raw(), num_variables());
+  ISL_Print("Context@%p vars(%" Pd ") {\n", this->raw(), num_variables());
   Object& obj = Object::Handle();
   for (intptr_t i = 0; i < num_variables(); i++) {
     IndentN(indent + 2);
     obj = At(i);
-    OS::PrintErr("[%" Pd "] = %s\n", i, obj.ToCString());
+    ISL_Print("[%" Pd "] = %s\n", i, obj.ToCString());
   }
 
   const Context& parent_ctx = Context::Handle(parent());
@@ -13477,7 +13569,7 @@
     parent_ctx.Dump(indent + 2);
   }
   IndentN(indent);
-  OS::PrintErr("}\n");
+  ISL_Print("}\n");
 }
 
 
@@ -13509,7 +13601,7 @@
 }
 
 
-RawContextScope* ContextScope::New(intptr_t num_variables) {
+RawContextScope* ContextScope::New(intptr_t num_variables, bool is_implicit) {
   ASSERT(Object::context_scope_class() != Class::null());
   if (num_variables < 0 || num_variables > kMaxElements) {
     // This should be caught before we reach here.
@@ -13525,6 +13617,7 @@
     NoSafepointScope no_safepoint;
     result ^= raw;
     result.set_num_variables(num_variables);
+    result.set_is_implicit(is_implicit);
   }
   return result.raw();
 }
@@ -13778,7 +13871,7 @@
     NoSafepointScope no_safepoint;
     result ^= raw;
   }
-  const Array& cache = Array::Handle(Array::New(kTestEntryLength));
+  const Array& cache = Array::Handle(Array::New(kTestEntryLength, Heap::kOld));
   result.set_cache(cache);
   return result.raw();
 }
@@ -14350,7 +14443,10 @@
     return Type::NullType();
   }
   const Class& cls = Class::Handle(clazz());
-  Type& type = Type::Handle(cls.CanonicalType());
+  Type& type = Type::Handle();
+  if (cls.NumTypeArguments() == 0) {
+    type = cls.CanonicalType();
+  }
   if (type.IsNull()) {
     TypeArguments& type_arguments = TypeArguments::Handle();
     if (cls.NumTypeArguments() > 0) {
@@ -14753,7 +14849,7 @@
 }
 
 
-bool AbstractType::IsInstantiated(GrowableObjectArray* trail) const {
+bool AbstractType::IsInstantiated(TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return false;
@@ -14808,8 +14904,7 @@
 }
 
 
-bool AbstractType::IsEquivalent(const Instance& other,
-                                GrowableObjectArray* trail) const {
+bool AbstractType::IsEquivalent(const Instance& other, TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return false;
@@ -14826,7 +14921,7 @@
 RawAbstractType* AbstractType::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return NULL;
@@ -14841,43 +14936,44 @@
 
 
 RawAbstractType* AbstractType::CloneUninstantiated(
-    const Class& new_owner,
-    GrowableObjectArray* trail) const {
+    const Class& new_owner, TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return NULL;
 }
 
 
-RawAbstractType* AbstractType::Canonicalize(GrowableObjectArray* trail) const {
+RawAbstractType* AbstractType::Canonicalize(TrailPtr trail) const {
   // AbstractType is an abstract class.
   UNREACHABLE();
   return NULL;
 }
 
 
-RawObject* AbstractType::OnlyBuddyInTrail(GrowableObjectArray* trail) const {
+RawAbstractType* AbstractType::OnlyBuddyInTrail(TrailPtr trail) const {
   if (trail == NULL) {
-    return Object::null();
+    return AbstractType::null();
   }
-  const intptr_t len = trail->Length();
+  const intptr_t len = trail->length();
   ASSERT((len % 2) == 0);
   for (intptr_t i = 0; i < len; i += 2) {
-    if (trail->At(i) == this->raw()) {
-      ASSERT(trail->At(i + 1) != Object::null());
-      return trail->At(i + 1);
+    ASSERT(trail->At(i).IsZoneHandle());
+    ASSERT(trail->At(i + 1).IsZoneHandle());
+    if (trail->At(i).raw() == this->raw()) {
+      ASSERT(!trail->At(i + 1).IsNull());
+      return trail->At(i + 1).raw();
     }
   }
-  return Object::null();
+  return AbstractType::null();
 }
 
 
-void AbstractType::AddOnlyBuddyToTrail(GrowableObjectArray** trail,
-                                       const Object& buddy) const {
+void AbstractType::AddOnlyBuddyToTrail(TrailPtr* trail,
+                                       const AbstractType& buddy) const {
   if (*trail == NULL) {
-    *trail = &GrowableObjectArray::ZoneHandle(GrowableObjectArray::New());
+    *trail = new Trail(Thread::Current()->zone(), 4);
   } else {
-    ASSERT(OnlyBuddyInTrail(*trail) == Object::null());
+    ASSERT(OnlyBuddyInTrail(*trail) == AbstractType::null());
   }
   (*trail)->Add(*this);
   (*trail)->Add(buddy);
@@ -14885,6 +14981,7 @@
 
 
 RawString* AbstractType::BuildName(NameVisibility name_visibility) const {
+  Zone* zone = Thread::Current()->zone();
   if (IsBoundedType()) {
     const AbstractType& type = AbstractType::Handle(
         BoundedType::Cast(*this).type());
@@ -14893,38 +14990,41 @@
     } else if (name_visibility == kUserVisibleName) {
       return type.BuildName(kUserVisibleName);
     }
-    String& type_name = String::Handle(type.BuildName(kInternalName));
-    type_name = String::Concat(type_name, Symbols::SpaceExtendsSpace());
+    GrowableHandlePtrArray<const String> pieces(zone, 5);
+    String& type_name = String::Handle(zone, type.BuildName(kInternalName));
+    pieces.Add(type_name);
+    pieces.Add(Symbols::SpaceExtendsSpace());
     // Build the bound name without causing divergence.
     const AbstractType& bound = AbstractType::Handle(
-        BoundedType::Cast(*this).bound());
-    String& bound_name = String::Handle();
+        zone, BoundedType::Cast(*this).bound());
+    String& bound_name = String::Handle(zone);
     if (bound.IsTypeParameter()) {
       bound_name = TypeParameter::Cast(bound).name();
+      pieces.Add(bound_name);
     } else if (bound.IsType()) {
-      const Class& cls = Class::Handle(Type::Cast(bound).type_class());
+      const Class& cls = Class::Handle(zone, Type::Cast(bound).type_class());
       bound_name = cls.Name();
       if (Type::Cast(bound).arguments() != TypeArguments::null()) {
-        bound_name = String::Concat(bound_name, Symbols::OptimizedOut());
+        pieces.Add(bound_name);
+        pieces.Add(Symbols::OptimizedOut());
       }
     } else {
-      bound_name = String::New(Symbols::OptimizedOut());
+      pieces.Add(Symbols::OptimizedOut());
     }
-    type_name = String::Concat(type_name, bound_name);
-    return Symbols::New(type_name);
+    return Symbols::FromConcatAll(pieces);
   }
   if (IsTypeParameter()) {
     return TypeParameter::Cast(*this).name();
   }
   // If the type is still being finalized, we may be reporting an error about
   // a malformed type, so proceed with caution.
-  const TypeArguments& args = TypeArguments::Handle(arguments());
+  const TypeArguments& args = TypeArguments::Handle(zone, arguments());
   const intptr_t num_args = args.IsNull() ? 0 : args.Length();
-  String& class_name = String::Handle();
+  String& class_name = String::Handle(zone);
   intptr_t first_type_param_index;
   intptr_t num_type_params;  // Number of type parameters to print.
   if (HasResolvedTypeClass()) {
-    const Class& cls = Class::Handle(type_class());
+    const Class& cls = Class::Handle(zone, type_class());
     if (IsResolved() || !cls.IsMixinApplication()) {
       // Do not print the full vector, but only the declared type parameters.
       num_type_params = cls.NumTypeParameters();
@@ -14972,7 +15072,7 @@
       // signature class) as a regular, possibly parameterized, class.
       if (cls.IsCanonicalSignatureClass()) {
         const Function& signature_function = Function::Handle(
-            cls.signature_function());
+            zone, cls.signature_function());
         // Signature classes have no super type, however, they take as many
         // type arguments as the owner class of their signature function (if it
         // is non static and generic, see Class::NumTypeArguments()). Therefore,
@@ -14982,26 +15082,28 @@
       }
     }
   } else {
-    const UnresolvedClass& cls = UnresolvedClass::Handle(unresolved_class());
+    const UnresolvedClass& cls =
+        UnresolvedClass::Handle(zone, unresolved_class());
     class_name = cls.Name();
     num_type_params = num_args;
     first_type_param_index = 0;
   }
-  String& type_name = String::Handle();
+  GrowableHandlePtrArray<const String> pieces(zone, 4);
+  pieces.Add(class_name);
   if ((num_type_params == 0) ||
       args.IsRaw(first_type_param_index, num_type_params)) {
-    type_name = class_name.raw();
+    // Do nothing.
   } else {
-    const String& args_name = String::Handle(
+    const String& args_name = String::Handle(zone,
         args.SubvectorName(first_type_param_index,
                            num_type_params,
                            name_visibility));
-    type_name = String::Concat(class_name, args_name);
+    pieces.Add(args_name);
   }
   // The name is only used for type checking and debugging purposes.
   // Unless profiling data shows otherwise, it is not worth caching the name in
   // the type.
-  return Symbols::New(type_name);
+  return Symbols::FromConcatAll(pieces);
 }
 
 
@@ -15386,7 +15488,7 @@
 }
 
 
-bool Type::IsInstantiated(GrowableObjectArray* trail) const {
+bool Type::IsInstantiated(TrailPtr trail) const {
   if (raw_ptr()->type_state_ == RawType::kFinalizedInstantiated) {
     return true;
   }
@@ -15420,7 +15522,7 @@
 RawAbstractType* Type::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   ASSERT(IsFinalized() || IsBeingFinalized());
   ASSERT(!IsInstantiated());
   // Return the uninstantiated type unchanged if malformed. No copy needed.
@@ -15466,8 +15568,7 @@
 }
 
 
-bool Type::IsEquivalent(const Instance& other,
-                        GrowableObjectArray* trail) const {
+bool Type::IsEquivalent(const Instance& other, TrailPtr trail) const {
   ASSERT(!IsNull());
   if (raw() == other.raw()) {
     return true;
@@ -15562,7 +15663,7 @@
 
 
 RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
-                                           GrowableObjectArray* trail) const {
+                                           TrailPtr trail) const {
   ASSERT(IsFinalized());
   ASSERT(!IsMalformed());
   if (IsInstantiated()) {
@@ -15589,7 +15690,7 @@
 }
 
 
-RawAbstractType* Type::Canonicalize(GrowableObjectArray* trail) const {
+RawAbstractType* Type::Canonicalize(TrailPtr trail) const {
   ASSERT(IsFinalized());
   if (IsCanonical() || IsMalformed()) {
     ASSERT(IsMalformed() || TypeArguments::Handle(arguments()).IsOld());
@@ -15602,7 +15703,7 @@
     return Object::dynamic_type();
   }
   // Fast canonical lookup/registry for simple types.
-  if ((cls.NumTypeArguments() == 0) && !cls.IsSignatureClass()) {
+  if (cls.NumTypeArguments() == 0) {
     type = cls.CanonicalType();
     if (type.IsNull()) {
       ASSERT(!cls.raw()->IsVMHeapObject() || (isolate == Dart::vm_isolate()));
@@ -15625,7 +15726,7 @@
   // list of canonicalized types.
   // TODO(asiva): Try to re-factor this lookup code to make sharing
   // easy between the 4 versions of this loop.
-  intptr_t index = 0;
+  intptr_t index = 1;  // Slot 0 is reserved for CanonicalType().
   while (index < length) {
     type ^= canonical_types.At(index);
     if (type.IsNull()) {
@@ -15669,19 +15770,20 @@
   }
 
   // The type needs to be added to the list. Grow the list if it is full.
-  if (index == length) {
+  if (index >= length) {
+    ASSERT((index == length) || ((index == 1) && (length == 0)));
     const intptr_t new_length = (length > 64) ?
         (length + 64) :
-        ((length == 0) ? 1 : (length * 2));
+        ((length == 0) ? 2 : (length * 2));
     const Array& new_canonical_types = Array::Handle(
         isolate, Array::Grow(canonical_types, new_length, Heap::kOld));
     cls.set_canonical_types(new_canonical_types);
-    new_canonical_types.SetAt(index, *this);
-  } else {
-    canonical_types.SetAt(index, *this);
+    canonical_types = new_canonical_types.raw();
   }
+  canonical_types.SetAt(index, *this);
+  if ((index == 1) && cls.IsCanonicalSignatureClass()) {
+    canonical_types.SetAt(0, *this);  // Also set canonical signature type at 0.
 #ifdef DEBUG
-  if ((index == 0) && cls.IsCanonicalSignatureClass()) {
     // Verify that the first canonical type is the signature type by checking
     // that the type argument vector of the canonical type ends with the
     // uninstantiated type parameters of the signature class. Note that these
@@ -15707,8 +15809,8 @@
       type_param ^= type_params.TypeAt(i);
       ASSERT(type_arg.Equals(type_param));
     }
-  }
 #endif
+  }
   ASSERT(IsOld());
   ASSERT(type_args.IsNull() || type_args.IsOld());
   SetCanonical();
@@ -15836,7 +15938,7 @@
 }
 
 
-bool TypeRef::IsInstantiated(GrowableObjectArray* trail) const {
+bool TypeRef::IsInstantiated(TrailPtr trail) const {
   if (TestAndAddToTrail(&trail)) {
     return true;
   }
@@ -15844,12 +15946,14 @@
 }
 
 
-bool TypeRef::IsEquivalent(const Instance& other,
-                           GrowableObjectArray* trail) const {
+bool TypeRef::IsEquivalent(const Instance& other, TrailPtr trail) const {
   if (raw() == other.raw()) {
     return true;
   }
-  if (TestAndAddBuddyToTrail(&trail, other)) {
+  if (!other.IsAbstractType()) {
+    return false;
+  }
+  if (TestAndAddBuddyToTrail(&trail, AbstractType::Cast(other))) {
     return true;
   }
   return AbstractType::Handle(type()).IsEquivalent(other, trail);
@@ -15859,7 +15963,7 @@
 RawTypeRef* TypeRef::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   TypeRef& instantiated_type_ref = TypeRef::Handle();
   instantiated_type_ref ^= OnlyBuddyInTrail(trail);
   if (!instantiated_type_ref.IsNull()) {
@@ -15878,7 +15982,7 @@
 
 
 RawTypeRef* TypeRef::CloneUninstantiated(const Class& new_owner,
-                                         GrowableObjectArray* trail) const {
+                                         TrailPtr trail) const {
   TypeRef& cloned_type_ref = TypeRef::Handle();
   cloned_type_ref ^= OnlyBuddyInTrail(trail);
   if (!cloned_type_ref.IsNull()) {
@@ -15906,7 +16010,7 @@
 // Consider the type Derived, where class Derived extends Base<Derived>.
 // The first type argument of its flattened type argument vector is Derived,
 // represented by a TypeRef pointing to itself.
-RawAbstractType* TypeRef::Canonicalize(GrowableObjectArray* trail) const {
+RawAbstractType* TypeRef::Canonicalize(TrailPtr trail) const {
   if (TestAndAddToTrail(&trail)) {
     return raw();
   }
@@ -15927,13 +16031,13 @@
 }
 
 
-bool TypeRef::TestAndAddToTrail(GrowableObjectArray** trail) const {
+bool TypeRef::TestAndAddToTrail(TrailPtr* trail) const {
   if (*trail == NULL) {
-    *trail = &GrowableObjectArray::ZoneHandle(GrowableObjectArray::New());
+    *trail = new Trail(Thread::Current()->zone(), 4);
   } else {
-    const intptr_t len = (*trail)->Length();
+    const intptr_t len = (*trail)->length();
     for (intptr_t i = 0; i < len; i++) {
-      if ((*trail)->At(i) == this->raw()) {
+      if ((*trail)->At(i).raw() == this->raw()) {
         return true;
       }
     }
@@ -15943,16 +16047,16 @@
 }
 
 
-bool TypeRef::TestAndAddBuddyToTrail(GrowableObjectArray** trail,
-                                     const Object& buddy) const {
+bool TypeRef::TestAndAddBuddyToTrail(TrailPtr* trail,
+                                     const AbstractType& buddy) const {
   if (*trail == NULL) {
-    *trail = &GrowableObjectArray::ZoneHandle(GrowableObjectArray::New());
+    *trail = new Trail(Thread::Current()->zone(), 4);
   } else {
-    const intptr_t len = (*trail)->Length();
+    const intptr_t len = (*trail)->length();
     ASSERT((len % 2) == 0);
     for (intptr_t i = 0; i < len; i += 2) {
-      if (((*trail)->At(i) == this->raw()) &&
-          ((*trail)->At(i + 1) == buddy.raw())) {
+      if (((*trail)->At(i).raw() == this->raw()) &&
+          ((*trail)->At(i + 1).raw() == buddy.raw())) {
         return true;
       }
     }
@@ -16021,8 +16125,7 @@
 }
 
 
-bool TypeParameter::IsEquivalent(const Instance& other,
-                                 GrowableObjectArray* trail) const {
+bool TypeParameter::IsEquivalent(const Instance& other, TrailPtr trail) const {
   if (raw() == other.raw()) {
     return true;
   }
@@ -16074,7 +16177,7 @@
 RawAbstractType* TypeParameter::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   ASSERT(IsFinalized());
   if (instantiator_type_arguments.IsNull()) {
     return Type::DynamicType();
@@ -16150,8 +16253,7 @@
 
 
 RawAbstractType* TypeParameter::CloneUninstantiated(
-    const Class& new_owner,
-    GrowableObjectArray* trail) const {
+    const Class& new_owner, TrailPtr trail) const {
   ASSERT(IsFinalized());
   AbstractType& upper_bound = AbstractType::Handle(bound());
   upper_bound = upper_bound.CloneUninstantiated(new_owner, trail);
@@ -16274,8 +16376,7 @@
 }
 
 
-bool BoundedType::IsEquivalent(const Instance& other,
-                               GrowableObjectArray* trail) const {
+bool BoundedType::IsEquivalent(const Instance& other, TrailPtr trail) const {
   // BoundedType are not canonicalized, because their bound may get finalized
   // after the BoundedType is created and initialized.
   if (raw() == other.raw()) {
@@ -16339,7 +16440,7 @@
 RawAbstractType* BoundedType::InstantiateFrom(
     const TypeArguments& instantiator_type_arguments,
     Error* bound_error,
-    GrowableObjectArray* trail) const {
+    TrailPtr trail) const {
   ASSERT(IsFinalized());
   AbstractType& bounded_type = AbstractType::Handle(type());
   ASSERT(bounded_type.IsFinalized());
@@ -16395,8 +16496,7 @@
 
 
 RawAbstractType* BoundedType::CloneUninstantiated(
-    const Class& new_owner,
-    GrowableObjectArray* trail) const {
+    const Class& new_owner, TrailPtr trail) const {
   if (IsInstantiated()) {
     return raw();
   }
@@ -18089,6 +18189,11 @@
 }
 
 
+intptr_t String::Hash(const char* characters, intptr_t len) {
+  return HashImpl(characters, len);
+}
+
+
 intptr_t String::Hash(const uint8_t* characters, intptr_t len) {
   return HashImpl(characters, len);
 }
@@ -20328,7 +20433,11 @@
 
 
 void Float32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Instance::PrintJSONImpl(stream, ref);
+  JSONObject jsobj(stream);
+  PrintSharedInstanceJSON(&jsobj, ref);
+  jsobj.AddProperty("kind", "Float32x4");
+  jsobj.AddServiceId(*this);
+  jsobj.AddProperty("valueAsString", ToCString());
 }
 
 
@@ -20433,7 +20542,11 @@
 
 
 void Int32x4::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Instance::PrintJSONImpl(stream, ref);
+  JSONObject jsobj(stream);
+  PrintSharedInstanceJSON(&jsobj, ref);
+  jsobj.AddProperty("kind", "Int32x4");
+  jsobj.AddServiceId(*this);
+  jsobj.AddProperty("valueAsString", ToCString());
 }
 
 
@@ -20513,7 +20626,11 @@
 
 
 void Float64x2::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Instance::PrintJSONImpl(stream, ref);
+  JSONObject jsobj(stream);
+  PrintSharedInstanceJSON(&jsobj, ref);
+  jsobj.AddProperty("kind", "Float64x2");
+  jsobj.AddServiceId(*this);
+  jsobj.AddProperty("valueAsString", ToCString());
 }
 
 
@@ -20875,20 +20992,19 @@
 }
 
 
-RawString* Stacktrace::FullStacktrace() const {
-  intptr_t idx = 0;
-  return String::New(ToCStringInternal(&idx));
-}
-
-
 const char* Stacktrace::ToCString() const {
-  const String& trace = String::Handle(FullStacktrace());
-  return trace.ToCString();
+  intptr_t idx = 0;
+  return ToCStringInternal(&idx);
 }
 
 
 void Stacktrace::PrintJSONImpl(JSONStream* stream, bool ref) const {
-  Instance::PrintJSONImpl(stream, ref);
+  JSONObject jsobj(stream);
+  PrintSharedInstanceJSON(&jsobj, ref);
+  jsobj.AddProperty("kind", "StackTrace");
+  jsobj.AddServiceId(*this);
+  intptr_t idx = 0;
+  jsobj.AddProperty("valueAsString", ToCStringInternal(&idx));
 }
 
 
@@ -21131,6 +21247,9 @@
     return;
   }
 
+  jsobj.AddProperty("isCaseSensitive", !is_ignore_case());
+  jsobj.AddProperty("isMultiLine", is_multi_line());
+
   Function& func = Function::Handle();
   func = function(kOneByteStringCid);
   jsobj.AddProperty("_oneByteFunction", func);
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 16dc598..a271d16 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -12,6 +12,7 @@
 #include "vm/bitmap.h"
 #include "vm/dart.h"
 #include "vm/globals.h"
+#include "vm/growable_array.h"
 #include "vm/handles.h"
 #include "vm/heap.h"
 #include "vm/isolate.h"
@@ -338,7 +339,7 @@
   }
 
   static Object& Handle() {
-    return Handle(Isolate::Current(), null_);
+    return Handle(Thread::Current()->zone(), null_);
   }
 
   static Object& Handle(Zone* zone) {
@@ -350,7 +351,7 @@
   }
 
   static Object& Handle(RawObject* raw_ptr) {
-    return Handle(Isolate::Current(), raw_ptr);
+    return Handle(Thread::Current()->zone(), raw_ptr);
   }
 
   static Object& ZoneHandle(Zone* zone, RawObject* raw_ptr) {
@@ -400,6 +401,11 @@
     return *zero_array_;
   }
 
+  static const ContextScope& empty_context_scope() {
+    ASSERT(empty_context_scope_ != NULL);
+    return *empty_context_scope_;
+  }
+
   static const ObjectPool& empty_object_pool() {
     ASSERT(empty_object_pool_ != NULL);
     return *empty_object_pool_;
@@ -790,6 +796,7 @@
   static TypeArguments* null_type_arguments_;
   static Array* empty_array_;
   static Array* zero_array_;
+  static ContextScope* empty_context_scope_;
   static ObjectPool* empty_object_pool_;
   static PcDescriptors* empty_descriptors_;
   static LocalVarDescriptors* empty_var_descriptors_;
@@ -1034,12 +1041,16 @@
     return OFFSET_OF(RawClass, type_arguments_field_offset_in_words_);
   }
 
-  RawType* CanonicalType() const {
-    if ((NumTypeArguments() == 0) && !IsSignatureClass()) {
-      return reinterpret_cast<RawType*>(raw_ptr()->canonical_types_);
-    }
-    return reinterpret_cast<RawType*>(Object::null());
-  }
+  // Returns the cached canonical type of this class, i.e. the canonical type
+  // whose type class is this class and whose type arguments are the
+  // uninstantiated type parameters declared by this class if it is generic,
+  // e.g. Map<K, V>.
+  // Returns Type::null() if the canonical type is not cached yet.
+  RawType* CanonicalType() const;
+
+  // Caches the canonical type of this class.
+  void SetCanonicalType(const Type& type) const;
+
   static intptr_t canonical_types_offset() {
     return OFFSET_OF(RawClass, canonical_types_);
   }
@@ -1143,7 +1154,7 @@
   RawArray* fields() const { return raw_ptr()->fields_; }
   void SetFields(const Array& value) const;
   void AddField(const Field& field) const;
-  void AddFields(const GrowableObjectArray& fields) const;
+  void AddFields(const GrowableArray<const Field*>& fields) const;
   intptr_t FindFieldIndex(const Field& field) const;
   RawField* FieldFromIndex(intptr_t idx) const;
 
@@ -1193,7 +1204,6 @@
 
   void InsertCanonicalConstant(intptr_t index, const Instance& constant) const;
 
-  intptr_t NumCanonicalTypes() const;
   intptr_t FindCanonicalTypeIndex(const Type& needle) const;
   RawType* CanonicalTypeFromIndex(intptr_t idx) const;
 
@@ -1524,6 +1534,9 @@
 };
 
 
+typedef ZoneGrowableHandlePtrArray<const AbstractType> Trail;
+typedef ZoneGrowableHandlePtrArray<const AbstractType>* TrailPtr;
+
 // A TypeArguments is an array of AbstractType.
 class TypeArguments : public Object {
  public:
@@ -1589,22 +1602,21 @@
     return IsSubvectorEquivalent(other, 0, IsNull() ? 0 : Length());
   }
 
-  bool IsEquivalent(const TypeArguments& other,
-                    GrowableObjectArray* trail = NULL) const {
+  bool IsEquivalent(const TypeArguments& other, TrailPtr trail = NULL) const {
     return IsSubvectorEquivalent(other, 0, IsNull() ? 0 : Length(), trail);
   }
   bool IsSubvectorEquivalent(const TypeArguments& other,
                              intptr_t from_index,
                              intptr_t len,
-                             GrowableObjectArray* trail = NULL) const;
+                             TrailPtr trail = NULL) const;
 
   // Check if the vector is instantiated (it must not be null).
-  bool IsInstantiated(GrowableObjectArray* trail = NULL) const {
+  bool IsInstantiated(TrailPtr trail = NULL) const {
     return IsSubvectorInstantiated(0, Length(), trail);
   }
   bool IsSubvectorInstantiated(intptr_t from_index,
                                intptr_t len,
-                               GrowableObjectArray* trail = NULL) const;
+                               TrailPtr trail = NULL) const;
   bool IsUninstantiatedIdentity() const;
   bool CanShareInstantiatorTypeArguments(const Class& instantiator_class) const;
 
@@ -1625,11 +1637,10 @@
   // arguments, changing the class owner of type parameters.
   // Instantiated type arguments are shared.
   RawTypeArguments* CloneUninstantiated(
-      const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
+      const Class& new_owner, TrailPtr trail = NULL) const;
 
   // Canonicalize only if instantiated, otherwise returns 'this'.
-  RawTypeArguments* Canonicalize(GrowableObjectArray* trail = NULL) const;
+  RawTypeArguments* Canonicalize(TrailPtr trail = NULL) const;
 
   // Return 'this' if this type argument vector is instantiated, i.e. if it does
   // not refer to type parameters. Otherwise, return a new type argument vector
@@ -1639,7 +1650,7 @@
   RawTypeArguments* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
 
   // Runtime instantiation with canonicalization. Not to be used during type
   // finalization at compile time.
@@ -2002,6 +2013,8 @@
                         bool is_static_call) const;
 
  private:
+  static RawICData* New();
+
   RawArray* ic_data() const {
     return raw_ptr()->ic_data_;
   }
@@ -2104,13 +2117,10 @@
   RawClass* origin() const;
   RawScript* script() const;
 
-  void set_regexp(const JSRegExp& value) const;
   RawJSRegExp* regexp() const;
-
-  // Get and set the class id this function is specialized for. Only set for
-  // irregexp functions.
-  intptr_t regexp_cid() const { return raw_ptr()->regexp_cid_; }
-  void set_regexp_cid(intptr_t regexp_cid) const;
+  intptr_t string_specialization_cid() const;
+  void SetRegExpData(const JSRegExp& regexp,
+                     intptr_t string_specialization_cid) const;
 
   RawAbstractType* result_type() const { return raw_ptr()->result_type_; }
   void set_result_type(const AbstractType& value) const;
@@ -2145,8 +2155,8 @@
   void set_unoptimized_code(const Code& value) const;
   bool HasCode() const;
 
-  static intptr_t instructions_offset() {
-    return OFFSET_OF(RawFunction, instructions_);
+  static intptr_t entry_point_offset() {
+    return OFFSET_OF(RawFunction, entry_point_);
   }
 
   // Returns true if there is at least one debugger breakpoint
@@ -2695,10 +2705,11 @@
 
   static RawFunction* New();
 
-  void BuildSignatureParameters(bool instantiate,
-                                NameVisibility name_visibility,
-                                const TypeArguments& instantiator,
-                                const GrowableObjectArray& pieces) const;
+  void BuildSignatureParameters(
+      bool instantiate,
+      NameVisibility name_visibility,
+      const TypeArguments& instantiator,
+      GrowableHandlePtrArray<const String>* pieces) const;
   RawString* BuildSignature(bool instantiate,
                             NameVisibility name_visibility,
                             const TypeArguments& instantiator) const;
@@ -3551,6 +3562,7 @@
   enum EntryType {
     kTaggedObject,
     kImmediate,
+    kExternalLabel,
   };
 
   struct Entry {
@@ -3625,10 +3637,17 @@
 
   static RawObjectPool* New(intptr_t len);
 
+  // Returns the pool index from the offset relative to a tagged RawObjectPool*,
+  // adjusting for the tag-bit.
   static intptr_t IndexFromOffset(intptr_t offset) {
+    ASSERT(Utils::IsAligned(offset + kHeapObjectTag, kWordSize));
     return (offset + kHeapObjectTag - data_offset()) / kBytesPerElement;
   }
 
+  static intptr_t OffsetFromIndex(intptr_t index) {
+    return element_offset(index) - kHeapObjectTag;
+  }
+
   void DebugPrint() const;
 
  private:
@@ -4031,9 +4050,11 @@
 class Code : public Object {
  public:
   RawInstructions* instructions() const { return raw_ptr()->instructions_; }
-  static intptr_t instructions_offset() {
-    return OFFSET_OF(RawCode, instructions_);
+
+  static intptr_t entry_point_offset() {
+    return OFFSET_OF(RawCode, entry_point_);
   }
+
   intptr_t pointer_offsets_length() const {
     return PtrOffBits::decode(raw_ptr()->state_bits_);
   }
@@ -4048,8 +4069,9 @@
   void set_is_alive(bool value) const;
 
   uword EntryPoint() const {
-    const Instructions& instr = Instructions::Handle(instructions());
-    return instr.EntryPoint();
+    ASSERT(raw_ptr()->entry_point_ ==
+           Instructions::Handle(instructions()).EntryPoint());
+    return raw_ptr()->entry_point_;
   }
   intptr_t Size() const {
     const Instructions& instr = Instructions::Handle(instructions());
@@ -4330,6 +4352,10 @@
     DISALLOW_COPY_AND_ASSIGN(FindRawCodeVisitor);
   };
 
+  static bool IsOptimized(RawCode* code) {
+    return Code::OptimizedBit::decode(code->ptr()->state_bits_);
+  }
+
   static const intptr_t kEntrySize = sizeof(int32_t);  // NOLINT
 
   void set_compile_timestamp(int64_t timestamp) const {
@@ -4340,6 +4366,9 @@
     // RawInstructions are never allocated in New space and hence a
     // store buffer update is not needed here.
     StorePointer(&raw_ptr()->instructions_, instructions);
+    uword entry_point = reinterpret_cast<uword>(instructions->ptr()) +
+        Instructions::HeaderSize();
+    StoreNonPointer(&raw_ptr()->entry_point_, entry_point);
   }
 
   void set_pointer_offsets_length(intptr_t value) {
@@ -4372,6 +4401,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object);
   friend class Class;
+  friend class SnapshotWriter;
 
   // So that the RawFunction pointer visitor can determine whether code the
   // function points to is optimized.
@@ -4443,7 +4473,8 @@
 // by its token position in the source, its name, its type, its allocation index
 // in the context, and its context level. The function nesting level and loop
 // nesting level are not preserved, since they are only used until the context
-// level is assigned.
+// level is assigned. In addition the ContextScope has a field 'is_implicit'
+// which is true if the ContextScope was created for an implicit closure.
 class ContextScope : public Object {
  public:
   intptr_t num_variables() const { return raw_ptr()->num_variables_; }
@@ -4488,13 +4519,17 @@
         sizeof(RawContextScope) + (len * kBytesPerElement));
   }
 
-  static RawContextScope* New(intptr_t num_variables);
+  static RawContextScope* New(intptr_t num_variables, bool is_implicit);
 
  private:
   void set_num_variables(intptr_t num_variables) const {
     StoreNonPointer(&raw_ptr()->num_variables_, num_variables);
   }
 
+  void set_is_implicit(bool is_implicit) const {
+    StoreNonPointer(&raw_ptr()->is_implicit_, is_implicit);
+  }
+
   const RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const {
     ASSERT((index >= 0) && (index < num_variables()));
     return raw_ptr()->VariableDescAddr(index);
@@ -4502,6 +4537,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
   friend class Class;
+  friend class Object;
 };
 
 
@@ -4954,15 +4990,14 @@
   virtual RawUnresolvedClass* unresolved_class() const;
   virtual RawTypeArguments* arguments() const;
   virtual intptr_t token_pos() const;
-  virtual bool IsInstantiated(GrowableObjectArray* trail = NULL) const;
+  virtual bool IsInstantiated(TrailPtr trail = NULL) const;
   virtual bool CanonicalizeEquals(const Instance& other) const {
     return Equals(other);
   }
   virtual bool Equals(const Instance& other) const {
     return IsEquivalent(other);
   }
-  virtual bool IsEquivalent(const Instance& other,
-                            GrowableObjectArray* trail = NULL) const;
+  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
 
   // Instantiate this type using the given type argument vector.
@@ -4971,7 +5006,7 @@
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
 
   // Return a clone of this unfinalized type or the type itself if it is
   // already finalized. Apply recursively to type arguments, i.e. finalized
@@ -4984,25 +5019,22 @@
   // Apply recursively to type arguments, i.e. instantiated type arguments of
   // an uninstantiated type are not cloned, but shared.
   virtual RawAbstractType* CloneUninstantiated(
-      const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
+      const Class& new_owner, TrailPtr trail = NULL) const;
 
   virtual RawInstance* CheckAndCanonicalize(const char** error_str) const {
     return Canonicalize();
   }
 
   // Return the canonical version of this type.
-  virtual RawAbstractType* Canonicalize(
-      GrowableObjectArray* trail = NULL) const;
+  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
 
   // Return the object associated with the receiver in the trail or
-  // Object::null() if the receiver is not contained in the trail.
-  RawObject* OnlyBuddyInTrail(GrowableObjectArray* trail) const;
+  // AbstractType::null() if the receiver is not contained in the trail.
+  RawAbstractType* OnlyBuddyInTrail(TrailPtr trail) const;
 
   // If the trail is null, allocate a trail, add the pair <receiver, buddy> to
   // the trail. The receiver may only be added once with its only buddy.
-  void AddOnlyBuddyToTrail(GrowableObjectArray** trail,
-                           const Object& buddy) const;
+  void AddOnlyBuddyToTrail(TrailPtr* trail, const AbstractType& buddy) const;
 
   // The name of this type, including the names of its type arguments, if any.
   virtual RawString* Name() const {
@@ -5141,20 +5173,18 @@
   virtual RawTypeArguments* arguments() const;
   void set_arguments(const TypeArguments& value) const;
   virtual intptr_t token_pos() const { return raw_ptr()->token_pos_; }
-  virtual bool IsInstantiated(GrowableObjectArray* trail = NULL) const;
-  virtual bool IsEquivalent(const Instance& other,
-                            GrowableObjectArray* trail = NULL) const;
+  virtual bool IsInstantiated(TrailPtr trail = NULL) const;
+  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* malformed_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
   virtual RawAbstractType* CloneUnfinalized() const;
   virtual RawAbstractType* CloneUninstantiated(
       const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
+  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
 
   virtual intptr_t Hash() const;
 
@@ -5263,33 +5293,31 @@
   virtual intptr_t token_pos() const {
     return AbstractType::Handle(type()).token_pos();
   }
-  virtual bool IsInstantiated(GrowableObjectArray* trail = NULL) const;
+  virtual bool IsInstantiated(TrailPtr trail = NULL) const;
   virtual bool IsEquivalent(const Instance& other,
-                            GrowableObjectArray* trail = NULL) const;
+                            TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const { return true; }
   virtual RawTypeRef* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
   virtual RawTypeRef* CloneUninstantiated(
       const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
+  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const;
 
   virtual intptr_t Hash() const;
 
   // Return true if the receiver is contained in the trail.
   // Otherwise, if the trail is null, allocate a trail, then add the receiver to
   // the trail and return false.
-  bool TestAndAddToTrail(GrowableObjectArray** trail) const;
+  bool TestAndAddToTrail(TrailPtr* trail) const;
 
   // Return true if the pair <receiver, buddy> is contained in the trail.
   // Otherwise, if the trail is null, allocate a trail, add the pair <receiver,
   // buddy> to the trail and return false.
   // The receiver may be added several times, each time with a different buddy.
-  bool TestAndAddBuddyToTrail(GrowableObjectArray** trail,
-                              const Object& buddy) const;
+  bool TestAndAddBuddyToTrail(TrailPtr* trail, const AbstractType& buddy) const;
 
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawTypeRef));
@@ -5344,22 +5372,19 @@
                   const AbstractType& upper_bound,
                   Error* bound_error) const;
   virtual intptr_t token_pos() const { return raw_ptr()->token_pos_; }
-  virtual bool IsInstantiated(GrowableObjectArray* trail = NULL) const {
+  virtual bool IsInstantiated(TrailPtr trail = NULL) const {
     return false;
   }
-  virtual bool IsEquivalent(const Instance& other,
-                            GrowableObjectArray* trail = NULL) const;
+  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const { return false; }
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
   virtual RawAbstractType* CloneUnfinalized() const;
   virtual RawAbstractType* CloneUninstantiated(
-      const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(
-      GrowableObjectArray* trail = NULL) const {
+      const Class& new_owner, TrailPtr trail = NULL) const;
+  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const {
     return raw();
   }
 
@@ -5427,26 +5452,23 @@
   virtual intptr_t token_pos() const {
     return AbstractType::Handle(type()).token_pos();
   }
-  virtual bool IsInstantiated(GrowableObjectArray* trail = NULL) const {
+  virtual bool IsInstantiated(TrailPtr trail = NULL) const {
     // It is not possible to encounter an instantiated bounded type with an
     // uninstantiated upper bound. Therefore, we do not need to check if the
     // bound is instantiated. Moreover, doing so could lead into cycles, as in
     // class C<T extends C<C>> { }.
     return AbstractType::Handle(type()).IsInstantiated();
   }
-  virtual bool IsEquivalent(const Instance& other,
-                            GrowableObjectArray* trail = NULL) const;
+  virtual bool IsEquivalent(const Instance& other, TrailPtr trail = NULL) const;
   virtual bool IsRecursive() const;
   virtual RawAbstractType* InstantiateFrom(
       const TypeArguments& instantiator_type_arguments,
       Error* bound_error,
-      GrowableObjectArray* trail = NULL) const;
+      TrailPtr trail = NULL) const;
   virtual RawAbstractType* CloneUnfinalized() const;
   virtual RawAbstractType* CloneUninstantiated(
-      const Class& new_owner,
-      GrowableObjectArray* trail = NULL) const;
-  virtual RawAbstractType* Canonicalize(
-      GrowableObjectArray* trail = NULL) const {
+      const Class& new_owner, TrailPtr trail = NULL) const;
+  virtual RawAbstractType* Canonicalize(TrailPtr trail = NULL) const {
     return raw();
   }
 
@@ -5926,7 +5948,7 @@
 
   static intptr_t hash_offset() { return OFFSET_OF(RawString, hash_); }
   static intptr_t Hash(const String& str, intptr_t begin_index, intptr_t len);
-  static intptr_t HashLatin1(const uint8_t* characters, intptr_t len);
+  static intptr_t Hash(const char* characters, intptr_t len);
   static intptr_t Hash(const uint16_t* characters, intptr_t len);
   static intptr_t Hash(const int32_t* characters, intptr_t len);
   static intptr_t HashRawSymbol(const RawString* symbol) {
@@ -6164,8 +6186,8 @@
   friend class TwoByteString;
   friend class ExternalOneByteString;
   friend class ExternalTwoByteString;
-  // So that the MarkingVisitor can print a debug string from a NoHandleScope.
-  friend class MarkingVisitor;
+  // So that SkippedCodeFunctions can print a debug string from a NoHandleScope.
+  friend class SkippedCodeFunctions;
 };
 
 
@@ -7638,8 +7660,6 @@
                             const Array& pc_offset_array,
                             Heap::Space space = Heap::kNew);
 
-  RawString* FullStacktrace() const;
-
   // The argument 'max_frames' limits the number of printed frames.
   const char* ToCStringInternal(intptr_t* frame_index,
                                 intptr_t max_frames = kMaxInt32) const;
diff --git a/runtime/vm/object_arm64_test.cc b/runtime/vm/object_arm64_test.cc
index 9383cc2..4349bb9 100644
--- a/runtime/vm/object_arm64_test.cc
+++ b/runtime/vm/object_arm64_test.cc
@@ -35,12 +35,9 @@
 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
   const String& string_object =
       String::ZoneHandle(String::New(str, Heap::kOld));
-  __ mov(SP, CSP);
-  __ TagAndPushPP();  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadObject(R0, string_object);
-  __ set_constant_pool_allowed(false);
-  __ PopAndUntagPP();  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index c2c14d539..25469da 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -87,7 +87,8 @@
     lookup_port_handler_(Function::null()),
     empty_uint32_array_(TypedData::null()),
     handle_message_function_(Function::null()),
-    library_load_error_table_(Array::null()) {
+    library_load_error_table_(Array::null()),
+    compile_time_constants_(Array::null()) {
   for (RawObject** current = from(); current <= to(); current++) {
     ASSERT(*current == Object::null());
   }
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index 5e220e9..e22a096 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -426,6 +426,13 @@
     return OFFSET_OF(ObjectStore, library_load_error_table_);
   }
 
+  RawArray* compile_time_constants() const {
+    return compile_time_constants_;
+  }
+  void set_compile_time_constants(const Array& value) {
+    compile_time_constants_ = value.raw();
+  }
+
   // Visit all object pointers.
   void VisitObjectPointers(ObjectPointerVisitor* visitor);
 
@@ -515,8 +522,9 @@
   RawTypedData* empty_uint32_array_;
   RawFunction* handle_message_function_;
   RawArray* library_load_error_table_;
+  RawArray* compile_time_constants_;
   RawObject** to() {
-    return reinterpret_cast<RawObject**>(&library_load_error_table_);
+    return reinterpret_cast<RawObject**>(&compile_time_constants_);
   }
 
   friend class SnapshotReader;
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 764de50..a344bb2 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -1964,9 +1964,9 @@
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
   OS::SNPrint(buffer, sizeof(buffer),
       "Unhandled exception:\n"
-      "Invalid argument(s): Length (%" Pd ") must be an integer "
-      "in the range [0..%" Pd "].",
-      length, Array::kMaxElements);
+      "RangeError (length): Invalid value: "
+      "Not in range 0..%" Pd ", inclusive: %" Pd,
+      Array::kMaxElements, length);
   EXPECT_ERROR(result, buffer);
 }
 
@@ -2685,7 +2685,7 @@
 }
 
 
-static Function* CreateFunction(const char* name) {
+static RawFunction* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const String& lib_name = String::Handle(Symbols::New("ownerLibrary"));
   const Script& script = Script::Handle();
@@ -2695,10 +2695,8 @@
       Library::Handle(CreateDummyLibrary(lib_name));
   owner_class.set_library(owner_library);
   const String& function_name = String::ZoneHandle(Symbols::New(name));
-  Function& function = Function::ZoneHandle(
-      Function::New(function_name, RawFunction::kRegularFunction,
-                    true, false, false, false, false, owner_class, 0));
-  return &function;
+  return Function::New(function_name, RawFunction::kRegularFunction,
+                       true, false, false, false, false, owner_class, 0);
 }
 
 
@@ -2707,20 +2705,15 @@
   extern void GenerateIncrement(Assembler* assembler);
   Assembler _assembler_;
   GenerateIncrement(&_assembler_);
-  Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_Code"), &_assembler_));
-  Instructions& instructions = Instructions::Handle(code.instructions());
+  const Function& function = Function::Handle(CreateFunction("Test_Code"));
+  Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
+  function.AttachCode(code);
+  const Instructions& instructions = Instructions::Handle(code.instructions());
   uword entry_point = instructions.EntryPoint();
-  intptr_t retval = 0;
-#if defined(USING_SIMULATOR)
-  retval = bit_copy<intptr_t, int64_t>(Simulator::Current()->Call(
-      static_cast<intptr_t>(entry_point), 0, 0, 0, 0));
-#else
-  typedef intptr_t (*IncrementCode)();
-  retval = reinterpret_cast<IncrementCode>(entry_point)();
-#endif
-  EXPECT_EQ(2, retval);
   EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
+  const Object& result = Object::Handle(
+      DartEntry::InvokeFunction(function, Array::empty_array()));
+  EXPECT_EQ(1, Smi::Cast(result).Value());
 }
 
 
@@ -2730,22 +2723,14 @@
   extern void GenerateIncrement(Assembler* assembler);
   Assembler _assembler_;
   GenerateIncrement(&_assembler_);
-  Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_Code"), &_assembler_));
+  const Function& function = Function::Handle(CreateFunction("Test_Code"));
+  Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
+  function.AttachCode(code);
   Instructions& instructions = Instructions::Handle(code.instructions());
   uword entry_point = instructions.EntryPoint();
+  EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
   // Try writing into the generated code, expected to crash.
   *(reinterpret_cast<char*>(entry_point) + 1) = 1;
-  intptr_t retval = 0;
-#if defined(USING_SIMULATOR)
-  retval = bit_copy<intptr_t, int64_t>(Simulator::Current()->Call(
-      static_cast<intptr_t>(entry_point), 0, 0, 0, 0));
-#else
-  typedef intptr_t (*IncrementCode)();
-  retval = reinterpret_cast<IncrementCode>(entry_point)();
-#endif
-  EXPECT_EQ(3, retval);
-  EXPECT_EQ(instructions.raw(), Instructions::FromEntryPoint(entry_point));
   if (!FLAG_write_protect_code) {
     // Since this test is expected to crash, crash if write protection of code
     // is switched off.
@@ -2762,20 +2747,15 @@
   word expected_length = static_cast<word>(strlen(kHello));
   Assembler _assembler_;
   GenerateEmbedStringInCode(&_assembler_, kHello);
-  Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_EmbedStringInCode"), &_assembler_));
-  Instructions& instructions = Instructions::Handle(code.instructions());
-  uword retval = 0;
-#if defined(USING_SIMULATOR)
-  retval = bit_copy<uword, int64_t>(Simulator::Current()->Call(
-      static_cast<intptr_t>(instructions.EntryPoint()), 0, 0, 0, 0));
-#else
-  typedef uword (*EmbedStringCode)();
-  retval = reinterpret_cast<EmbedStringCode>(instructions.EntryPoint())();
-#endif
-  EXPECT((retval & kSmiTagMask) == kHeapObjectTag);
+  const Function& function =
+      Function::Handle(CreateFunction("Test_EmbedStringInCode"));
+  const Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
+  function.AttachCode(code);
+  const Object& result =
+      Object::Handle(DartEntry::InvokeFunction(function, Array::empty_array()));
+  EXPECT(result.raw()->IsHeapObject());
   String& string_object = String::Handle();
-  string_object ^= reinterpret_cast<RawInstructions*>(retval);
+  string_object ^= result.raw();
   EXPECT(string_object.Length() == expected_length);
   for (int i = 0; i < expected_length; i ++) {
     EXPECT(string_object.CharAt(i) == kHello[i]);
@@ -2789,18 +2769,13 @@
   const intptr_t kSmiTestValue = 5;
   Assembler _assembler_;
   GenerateEmbedSmiInCode(&_assembler_, kSmiTestValue);
-  Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_EmbedSmiInCode"), &_assembler_));
-  Instructions& instructions = Instructions::Handle(code.instructions());
-  intptr_t retval = 0;
-#if defined(USING_SIMULATOR)
-  retval = bit_copy<intptr_t, int64_t>(Simulator::Current()->Call(
-      static_cast<intptr_t>(instructions.EntryPoint()), 0, 0, 0, 0));
-#else
-  typedef intptr_t (*EmbedSmiCode)();
-  retval = reinterpret_cast<EmbedSmiCode>(instructions.EntryPoint())();
-#endif
-  EXPECT((retval >> kSmiTagShift) == kSmiTestValue);
+  const Function& function =
+      Function::Handle(CreateFunction("Test_EmbedSmiInCode"));
+  const Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
+  function.AttachCode(code);
+  const Object& result =
+      Object::Handle(DartEntry::InvokeFunction(function, Array::empty_array()));
+  EXPECT(Smi::Cast(result).Value() == kSmiTestValue);
 }
 
 
@@ -2811,18 +2786,13 @@
   const intptr_t kSmiTestValue = 5L << 32;
   Assembler _assembler_;
   GenerateEmbedSmiInCode(&_assembler_, kSmiTestValue);
-  Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_EmbedSmiIn64BitCode"), &_assembler_));
-  Instructions& instructions = Instructions::Handle(code.instructions());
-  intptr_t retval = 0;
-#if defined(USING_SIMULATOR)
-  retval = bit_copy<intptr_t, int64_t>(Simulator::Current()->Call(
-      static_cast<intptr_t>(instructions.EntryPoint()), 0, 0, 0, 0));
-#else
-  typedef intptr_t (*EmbedSmiCode)();
-  retval = reinterpret_cast<EmbedSmiCode>(instructions.EntryPoint())();
-#endif
-  EXPECT((retval >> kSmiTagShift) == kSmiTestValue);
+  const Function& function =
+      Function::Handle(CreateFunction("Test_EmbedSmiIn64BitCode"));
+  const Code& code = Code::Handle(Code::FinalizeCode(function, &_assembler_));
+  function.AttachCode(code);
+  const Object& result =
+      Object::Handle(DartEntry::InvokeFunction(function, Array::empty_array()));
+  EXPECT(Smi::Cast(result).Value() == kSmiTestValue);
 }
 #endif  // ARCH_IS_64_BIT
 
@@ -2843,7 +2813,7 @@
   Assembler _assembler_;
   GenerateIncrement(&_assembler_);
   Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_Code"), &_assembler_));
+      Function::Handle(CreateFunction("Test_Code")), &_assembler_));
   code.set_exception_handlers(exception_handlers);
 
   // Verify the exception handler table entries by accessing them.
@@ -2883,7 +2853,7 @@
   Assembler _assembler_;
   GenerateIncrement(&_assembler_);
   Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_Code"), &_assembler_));
+      Function::Handle(CreateFunction("Test_Code")), &_assembler_));
   code.set_pc_descriptors(descriptors);
 
   // Verify the PcDescriptor entries by accessing them.
@@ -2940,7 +2910,7 @@
   Assembler _assembler_;
   GenerateIncrement(&_assembler_);
   Code& code = Code::Handle(Code::FinalizeCode(
-      *CreateFunction("Test_Code"), &_assembler_));
+      Function::Handle(CreateFunction("Test_Code")), &_assembler_));
   code.set_pc_descriptors(descriptors);
 
   // Verify the PcDescriptor entries by accessing them.
diff --git a/runtime/vm/object_x64_test.cc b/runtime/vm/object_x64_test.cc
index 639d8d0..e5b1033 100644
--- a/runtime/vm/object_x64_test.cc
+++ b/runtime/vm/object_x64_test.cc
@@ -34,10 +34,9 @@
 void GenerateEmbedStringInCode(Assembler* assembler, const char* str) {
   const String& string_object =
       String::ZoneHandle(String::New(str, Heap::kOld));
-  __ pushq(PP);  // Save caller's pool pointer and load a new one here.
-  __ LoadPoolPointer();
+  __ EnterStubFrame();
   __ LoadObject(RAX, string_object);
-  __ popq(PP);  // Restore caller's pool pointer.
+  __ LeaveStubFrame();
   __ ret();
 }
 
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index c3250d8..36436aa 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -49,6 +49,7 @@
   static ThreadId GetCurrentThreadId();
   static bool Join(ThreadId id);
   static intptr_t ThreadIdToIntPtr(ThreadId id);
+  static ThreadId ThreadIdFromIntPtr(intptr_t id);
   static bool Compare(ThreadId a, ThreadId b);
   static void GetThreadCpuUsage(ThreadId thread_id, int64_t* cpu_usage);
 };
diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc
index ae1b9f2..377fd94 100644
--- a/runtime/vm/os_thread_android.cc
+++ b/runtime/vm/os_thread_android.cc
@@ -169,6 +169,11 @@
 }
 
 
+ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) {
+  return static_cast<ThreadId>(id);
+}
+
+
 bool OSThread::Compare(ThreadId a, ThreadId b) {
   return a == b;
 }
diff --git a/runtime/vm/os_thread_linux.cc b/runtime/vm/os_thread_linux.cc
index 94bb823..c99189b 100644
--- a/runtime/vm/os_thread_linux.cc
+++ b/runtime/vm/os_thread_linux.cc
@@ -170,6 +170,11 @@
 }
 
 
+ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) {
+  return static_cast<ThreadId>(id);
+}
+
+
 bool OSThread::Compare(ThreadId a, ThreadId b) {
   return pthread_equal(a, b) != 0;
 }
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index 6a9aca2..bcac828 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -162,6 +162,11 @@
 }
 
 
+ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) {
+  return reinterpret_cast<ThreadId>(id);
+}
+
+
 bool OSThread::Compare(ThreadId a, ThreadId b) {
   return pthread_equal(a, b) != 0;
 }
diff --git a/runtime/vm/os_thread_win.cc b/runtime/vm/os_thread_win.cc
index cdcf36c..12659491 100644
--- a/runtime/vm/os_thread_win.cc
+++ b/runtime/vm/os_thread_win.cc
@@ -118,6 +118,11 @@
 }
 
 
+ThreadId OSThread::ThreadIdFromIntPtr(intptr_t id) {
+  return static_cast<ThreadId>(id);
+}
+
+
 bool OSThread::Compare(ThreadId a, ThreadId b) {
   return a == b;
 }
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index b6f0b2e..79ea761 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -11,6 +11,7 @@
 #include "vm/lockers.h"
 #include "vm/object.h"
 #include "vm/os_thread.h"
+#include "vm/thread_registry.h"
 #include "vm/verified_memory.h"
 #include "vm/virtual_memory.h"
 
@@ -161,7 +162,7 @@
       tasks_lock_(new Monitor()),
       tasks_(0),
 #if defined(DEBUG)
-      is_iterating_(false),
+      iterating_thread_(NULL),
 #endif
       page_space_controller_(heap,
                              FLAG_old_gen_growth_space_ratio,
@@ -767,11 +768,17 @@
     }
     set_tasks(1);
   }
+  // Ensure that all threads for this isolate are at a safepoint (either stopped
+  // or in native code). If two threads are racing at this point, the loser
+  // will continue with its collection after waiting for the winner to complete.
+  // TODO(koda): Consider moving SafepointThreads into allocation failure/retry
+  // logic to avoid needless collections.
+  isolate->thread_registry()->SafepointThreads();
 
   // Perform various cleanup that relies on no tasks interfering.
   isolate->class_table()->FreeOldTables();
 
-  NoHandleScope no_handles(isolate);
+  NoSafepointScope no_safepoints;
 
   if (FLAG_print_free_list_before_gc) {
     OS::Print("Data Freelist (before GC):\n");
@@ -907,6 +914,8 @@
     freelist_[HeapPage::kExecutable].Print();
   }
 
+  isolate->thread_registry()->ResumeAllThreads();
+
   // Done, reset the task count.
   {
     MonitorLocker ml(tasks_lock());
diff --git a/runtime/vm/pages.h b/runtime/vm/pages.h
index ca10ee0..cb5c1dc 100644
--- a/runtime/vm/pages.h
+++ b/runtime/vm/pages.h
@@ -427,7 +427,7 @@
   Monitor* tasks_lock_;
   intptr_t tasks_;
 #if defined(DEBUG)
-  bool is_iterating_;
+  Thread* iterating_thread_;
 #endif
   PageSpaceController page_space_controller_;
 
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index fed3ae5..f7e3a27 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -16,6 +16,7 @@
 #include "vm/flags.h"
 #include "vm/growable_array.h"
 #include "vm/handles.h"
+#include "vm/hash_table.h"
 #include "vm/heap.h"
 #include "vm/isolate.h"
 #include "vm/longjump.h"
@@ -45,6 +46,7 @@
 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
 DEFINE_FLAG(bool, supermixin, false, "Allow super calls in mixins.");
 DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
+DEFINE_FLAG(bool, link_natives_lazily, false, "Link native calls lazily");
 
 DECLARE_FLAG(bool, lazy_dispatchers);
 DECLARE_FLAG(bool, load_deferred_eagerly);
@@ -52,7 +54,8 @@
 DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
 
-// Quick access to the current isolate and zone.
+// Quick access to the current thread, isolate and zone.
+#define T (thread())
 #define I (isolate())
 #define Z (zone())
 
@@ -115,13 +118,12 @@
 };
 
 
-static RawTypeArguments* NewTypeArguments(const GrowableObjectArray& objs) {
+static RawTypeArguments* NewTypeArguments(
+    const GrowableArray<AbstractType*>& objs) {
   const TypeArguments& a =
-      TypeArguments::Handle(TypeArguments::New(objs.Length()));
-  AbstractType& type = AbstractType::Handle();
-  for (int i = 0; i < objs.Length(); i++) {
-    type ^= objs.At(i);
-    a.SetTypeAt(i, type);
+      TypeArguments::Handle(TypeArguments::New(objs.length()));
+  for (int i = 0; i < objs.length(); i++) {
+    a.SetTypeAt(i, *objs.At(i));
   }
   // Cannot canonicalize TypeArgument yet as its types may not have been
   // finalized yet.
@@ -445,10 +447,10 @@
 
 void Parser::ParseCompilationUnit(const Library& library,
                                   const Script& script) {
-  Isolate* isolate = Isolate::Current();
-  ASSERT(isolate->long_jump_base()->IsSafeToJump());
-  CSTAT_TIMER_SCOPE(isolate, parser_timer);
-  VMTagScope tagScope(isolate, VMTag::kCompileTopLevelTagId);
+  Thread* thread = Thread::Current();
+  ASSERT(thread->long_jump_base()->IsSafeToJump());
+  CSTAT_TIMER_SCOPE(thread, parser_timer);
+  VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId);
   Parser parser(script, library, 0);
   parser.ParseTopLevel();
 }
@@ -514,7 +516,7 @@
   const AbstractType* type;
   intptr_t name_pos;
   const String* name;
-  const Object* default_value;  // NULL if not an optional parameter.
+  const Instance* default_value;  // NULL if not an optional parameter.
   const Object* metadata;  // NULL if no metadata or metadata not evaluated.
   LocalVariable* var;  // Scope variable allocated for this parameter.
   bool is_final;
@@ -683,30 +685,32 @@
 
 class ClassDesc : public ValueObject {
  public:
-  ClassDesc(const Class& cls,
+  ClassDesc(Zone* zone,
+            const Class& cls,
             const String& cls_name,
             bool is_interface,
             intptr_t token_pos)
-      : clazz_(cls),
+      : zone_(zone),
+        clazz_(cls),
         class_name_(cls_name),
         token_pos_(token_pos),
-        functions_(GrowableObjectArray::Handle(GrowableObjectArray::New())),
-        fields_(GrowableObjectArray::Handle(GrowableObjectArray::New())) {
+        functions_(zone, 4),
+        fields_(zone, 4) {
   }
 
   void AddFunction(const Function& function) {
-    functions_.Add(function);
+    functions_.Add(&Function::ZoneHandle(zone_, function.raw()));
   }
 
-  const GrowableObjectArray& functions() const {
+  const GrowableArray<const Function*>& functions() const {
     return functions_;
   }
 
   void AddField(const Field& field) {
-    fields_.Add(field);
+    fields_.Add(&Field::ZoneHandle(zone_, field.raw()));
   }
 
-  const GrowableObjectArray& fields() const {
+  const GrowableArray<const Field*>& fields() const {
     return fields_;
   }
 
@@ -719,10 +723,9 @@
   }
 
   bool has_constructor() const {
-    Function& func = Function::Handle();
-    for (int i = 0; i < functions_.Length(); i++) {
-      func ^= functions_.At(i);
-      if (func.kind() == RawFunction::kConstructor) {
+    for (int i = 0; i < functions_.length(); i++) {
+      const Function* func = functions_.At(i);
+      if (func->kind() == RawFunction::kConstructor) {
         return true;
       }
     }
@@ -750,41 +753,73 @@
     return NULL;
   }
 
+  RawArray* MakeFunctionsArray() {
+    const intptr_t len = functions_.length();
+    const Array& res = Array::Handle(zone_, Array::New(len, Heap::kOld));
+    for (intptr_t i = 0; i < len; i++) {
+      res.SetAt(i, *functions_[i]);
+    }
+    return res.raw();
+  }
+
  private:
+  Zone* zone_;
   const Class& clazz_;
   const String& class_name_;
   intptr_t token_pos_;   // Token index of "class" keyword.
-  GrowableObjectArray& functions_;
-  GrowableObjectArray& fields_;
+  GrowableArray<const Function*> functions_;
+  GrowableArray<const Field*> fields_;
   GrowableArray<MemberDesc> members_;
 };
 
 
-struct TopLevel {
-  TopLevel() :
-      fields(GrowableObjectArray::Handle(GrowableObjectArray::New())),
-      functions(GrowableObjectArray::Handle(GrowableObjectArray::New())) { }
+class TopLevel : public ValueObject {
+ public:
+  explicit TopLevel(Zone* zone) :
+      zone_(zone),
+      fields_(zone, 4),
+      functions_(zone, 4) { }
 
-  GrowableObjectArray& fields;
-  GrowableObjectArray& functions;
+  void AddField(const Field& field) {
+    fields_.Add(&Field::ZoneHandle(zone_, field.raw()));
+  }
+
+  void AddFunction(const Function& function) {
+    functions_.Add(&Function::ZoneHandle(zone_, function.raw()));
+  }
+
+  const GrowableArray<const Field*>& fields() const {
+    return fields_;
+  }
+
+  const GrowableArray<const Function*>& functions() const {
+    return functions_;
+  }
+
+ private:
+  Zone* zone_;
+  GrowableArray<const Field*> fields_;
+  GrowableArray<const Function*> functions_;
 };
 
 
 void Parser::ParseClass(const Class& cls) {
   if (!cls.is_synthesized_class()) {
-    Isolate* isolate = Isolate::Current();
-    CSTAT_TIMER_SCOPE(isolate, parser_timer);
-    ASSERT(isolate->long_jump_base()->IsSafeToJump());
-    const Script& script = Script::Handle(isolate, cls.script());
-    const Library& lib = Library::Handle(isolate, cls.library());
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
+    CSTAT_TIMER_SCOPE(thread, parser_timer);
+    ASSERT(thread->long_jump_base()->IsSafeToJump());
+    const Script& script = Script::Handle(zone, cls.script());
+    const Library& lib = Library::Handle(zone, cls.library());
     Parser parser(script, lib, cls.token_pos());
     parser.ParseClassDefinition(cls);
   } else if (cls.is_enum_class()) {
-    Isolate* isolate = Isolate::Current();
-    CSTAT_TIMER_SCOPE(isolate, parser_timer);
-    ASSERT(isolate->long_jump_base()->IsSafeToJump());
-    const Script& script = Script::Handle(isolate, cls.script());
-    const Library& lib = Library::Handle(isolate, cls.library());
+    Thread* thread = Thread::Current();
+    Zone* zone = thread->zone();
+    CSTAT_TIMER_SCOPE(thread, parser_timer);
+    ASSERT(thread->long_jump_base()->IsSafeToJump());
+    const Script& script = Script::Handle(zone, cls.script());
+    const Library& lib = Library::Handle(zone, cls.library());
     Parser parser(script, lib, cls.token_pos());
     parser.ParseEnumDefinition(cls);
   }
@@ -795,7 +830,7 @@
   ASSERT(!func.IsNull());
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  StackZone stack_zone(isolate);
+  StackZone stack_zone(thread);
   Zone* zone = stack_zone.GetZone();
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
@@ -872,30 +907,31 @@
 
 
 void Parser::ParseFunction(ParsedFunction* parsed_function) {
-  Isolate* isolate = parsed_function->isolate();
-  Zone* zone = parsed_function->zone();
-  CSTAT_TIMER_SCOPE(isolate, parser_timer);
+  Thread* thread = parsed_function->thread();
+  ASSERT(thread == Thread::Current());
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
+  CSTAT_TIMER_SCOPE(thread, parser_timer);
   INC_STAT(isolate, num_functions_compiled, 1);
-  VMTagScope tagScope(isolate, VMTag::kCompileParseFunctionTagId,
+  VMTagScope tagScope(thread, VMTag::kCompileParseFunctionTagId,
                       FLAG_profile_vm);
 
-  ASSERT(isolate->long_jump_base()->IsSafeToJump());
+  ASSERT(thread->long_jump_base()->IsSafeToJump());
   ASSERT(parsed_function != NULL);
   const Function& func = parsed_function->function();
   const Script& script = Script::Handle(zone, func.script());
   Parser parser(script, parsed_function, func.token_pos());
   SequenceNode* node_sequence = NULL;
-  Array& default_parameter_values = Array::ZoneHandle(zone, Array::null());
   switch (func.kind()) {
     case RawFunction::kClosureFunction:
       if (func.IsImplicitClosureFunction()) {
         node_sequence =
-            parser.ParseImplicitClosure(func, &default_parameter_values);
+            parser.ParseImplicitClosure(func);
         break;
       }
       if (func.IsConstructorClosureFunction()) {
         node_sequence =
-            parser.ParseConstructorClosure(func, &default_parameter_values);
+            parser.ParseConstructorClosure(func);
         break;
       }
       // Fall-through: Handle non-implicit closures.
@@ -908,7 +944,7 @@
       if (!func.IsImplicitConstructor()) {
         parser.SkipFunctionPreamble();
       }
-      node_sequence = parser.ParseFunc(func, &default_parameter_values);
+      node_sequence = parser.ParseFunc(func);
       break;
     case RawFunction::kImplicitGetter:
       ASSERT(!func.is_static());
@@ -927,11 +963,11 @@
       break;
     case RawFunction::kNoSuchMethodDispatcher:
       node_sequence =
-          parser.ParseNoSuchMethodDispatcher(func, &default_parameter_values);
+          parser.ParseNoSuchMethodDispatcher(func);
       break;
     case RawFunction::kInvokeFieldDispatcher:
       node_sequence =
-          parser.ParseInvokeFieldDispatcher(func, &default_parameter_values);
+          parser.ParseInvokeFieldDispatcher(func);
       break;
     case RawFunction::kIrregexpFunction:
       UNREACHABLE();  // Irregexp functions have their own parser.
@@ -968,15 +1004,13 @@
       parsed_function->set_instantiator(instantiator);
     }
   }
-
-  parsed_function->set_default_parameter_values(default_parameter_values);
 }
 
 
 RawObject* Parser::ParseMetadata(const Class& cls, intptr_t token_pos) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  StackZone stack_zone(isolate);
+  StackZone stack_zone(thread);
   Zone* zone = stack_zone.GetZone();
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
@@ -1116,8 +1150,7 @@
 
   const String& field_name = String::Handle(zone, field.name());
   String& init_name = String::Handle(zone,
-      String::Concat(Symbols::InitPrefix(), field_name));
-  init_name = Symbols::New(init_name);
+      Symbols::FromConcat(Symbols::InitPrefix(), field_name));
 
   const Function& initializer = Function::ZoneHandle(zone,
       Function::New(init_name,
@@ -1144,7 +1177,6 @@
 
   SequenceNode* body = parser.ParseStaticInitializer();
   parsed_function->SetNodeSequence(body);
-  parsed_function->set_default_parameter_values(Object::null_array());
 
   if (parsed_function->has_expression_temp_var()) {
     body->scope()->AddVariable(parsed_function->expression_temp_var());
@@ -1164,7 +1196,7 @@
                                            const String& source) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
-  StackZone stack_zone(isolate);
+  StackZone stack_zone(thread);
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
     const String& uri = String::Handle(Symbols::New("dynamically-added"));
@@ -1178,12 +1210,15 @@
     parser.is_top_level_ = true;
     parser.set_current_class(owning_class);
     const String& class_name = String::Handle(owning_class.Name());
-    ClassDesc members(owning_class, class_name, false, token_pos);
+    ClassDesc members(stack_zone.GetZone(),
+                      owning_class,
+                      class_name,
+                      false,  /* is_interface */
+                      token_pos);
     const intptr_t metadata_pos = parser.SkipMetadata();
     parser.ParseClassMemberDefinition(&members, metadata_pos);
-    ASSERT(members.functions().Length() == 1);
-    const Function& func =
-        Function::ZoneHandle(Function::RawCast(members.functions().At(0)));
+    ASSERT(members.functions().length() == 1);
+    const Function& func = *members.functions().At(0);
     func.set_eval_script(script);
     ParsedFunction* parsed_function = new ParsedFunction(thread, func);
     Parser::ParseFunction(parsed_function);
@@ -1330,8 +1365,7 @@
 }
 
 
-SequenceNode* Parser::ParseConstructorClosure(const Function& func,
-                                              Array* default_values) {
+SequenceNode* Parser::ParseConstructorClosure(const Function& func) {
   TRACE_PARSER("ParseConstructorClosure");
   const intptr_t token_pos = func.token_pos();
 
@@ -1353,7 +1387,7 @@
   // Replace the types parsed from the constructor.
   params.EraseParameterTypes();
 
-  SetupDefaultsForOptionalParams(&params, default_values);
+  SetupDefaultsForOptionalParams(params);
   ASSERT(func.num_fixed_parameters() == params.num_fixed_parameters);
   ASSERT(func.NumOptionalParameters() == params.num_optional_parameters);
 
@@ -1385,8 +1419,7 @@
 }
 
 
-SequenceNode* Parser::ParseImplicitClosure(const Function& func,
-                                           Array* default_values) {
+SequenceNode* Parser::ParseImplicitClosure(const Function& func) {
   TRACE_PARSER("ParseImplicitClosure");
   intptr_t token_pos = func.token_pos();
 
@@ -1415,7 +1448,7 @@
     const bool allow_explicit_default_values = true;
     SkipFunctionPreamble();
     ParseFormalParameterList(allow_explicit_default_values, false, &params);
-    SetupDefaultsForOptionalParams(&params, default_values);
+    SetupDefaultsForOptionalParams(params);
   }
 
   // Populate function scope with the formal parameters.
@@ -1481,8 +1514,7 @@
 
 
 void Parser::BuildDispatcherScope(const Function& func,
-                                  const ArgumentsDescriptor& desc,
-                                  Array* default_values) {
+                                  const ArgumentsDescriptor& desc) {
   ParamList params;
   // Receiver first.
   intptr_t token_pos = func.token_pos();
@@ -1506,25 +1538,24 @@
     intptr_t index = i - desc.PositionalCount();
     p.name = &String::ZoneHandle(Z, desc.NameAt(index));
     p.type = &Type::ZoneHandle(Z, Type::DynamicType());
-    p.default_value = &Object::null_object();
+    p.default_value = &Object::null_instance();
     params.parameters->Add(p);
     params.num_optional_parameters++;
     params.has_optional_named_parameters = true;
   }
   ASSERT(desc.NamedCount() == params.num_optional_parameters);
 
-  SetupDefaultsForOptionalParams(&params, default_values);
+  SetupDefaultsForOptionalParams(params);
 
   // Build local scope for function and populate with the formal parameters.
   OpenFunctionBlock(func);
   AddFormalParamsToScope(&params, current_block_->scope);
 }
 
-SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func,
-                                                  Array* default_values) {
+
+SequenceNode* Parser::ParseNoSuchMethodDispatcher(const Function& func) {
   TRACE_PARSER("ParseNoSuchMethodDispatcher");
   ASSERT(FLAG_lazy_dispatchers);
-
   ASSERT(func.IsNoSuchMethodDispatcher());
   intptr_t token_pos = func.token_pos();
   ASSERT(func.token_pos() == 0);
@@ -1534,7 +1565,7 @@
   ASSERT(desc.Count() > 0);
 
   // Set up scope for this function.
-  BuildDispatcherScope(func, desc, default_values);
+  BuildDispatcherScope(func, desc);
 
   // Receiver is local 0.
   LocalScope* scope = current_block_->scope;
@@ -1578,11 +1609,9 @@
 }
 
 
-SequenceNode* Parser::ParseInvokeFieldDispatcher(const Function& func,
-                                                 Array* default_values) {
+SequenceNode* Parser::ParseInvokeFieldDispatcher(const Function& func) {
   TRACE_PARSER("ParseInvokeFieldDispatcher");
   ASSERT(FLAG_lazy_dispatchers);
-
   ASSERT(func.IsInvokeFieldDispatcher());
   intptr_t token_pos = func.token_pos();
   ASSERT(func.token_pos() == 0);
@@ -1593,7 +1622,7 @@
   ASSERT(desc.Count() > 0);
 
   // Set up scope for this function.
-  BuildDispatcherScope(func, desc, default_values);
+  BuildDispatcherScope(func, desc);
 
   // Receiver is local 0.
   LocalScope* scope = current_block_->scope;
@@ -1888,12 +1917,14 @@
         signature_function.set_signature_class(signature_class);
       }
       ASSERT(signature_function.signature_class() == signature_class.raw());
-      Type& signature_type =
-          Type::ZoneHandle(Z, signature_class.SignatureType());
-      if (!is_top_level_ && !signature_type.IsFinalized()) {
-        signature_type ^= ClassFinalizer::FinalizeType(
-            signature_class, signature_type, ClassFinalizer::kCanonicalize);
+      if (!is_top_level_) {
+        // Finalize types in signature class here, so that the
+        // signature type is not computed twice.
+        ClassFinalizer::FinalizeTypesInClass(signature_class);
       }
+      const Type& signature_type =
+          Type::ZoneHandle(Z, signature_class.SignatureType());
+      ASSERT(is_top_level_ || signature_type.IsFinalized());
       // A signature type itself cannot be malformed or malbounded, only its
       // signature function's result type or parameter types may be.
       ASSERT(!signature_type.IsMalformed());
@@ -1920,7 +1951,7 @@
       // Skip default value parsing.
       SkipExpr();
     } else {
-      const Object& const_value = ParseConstExpr()->literal();
+      const Instance& const_value = ParseConstExpr()->literal();
       parameter.default_value = &const_value;
     }
   } else {
@@ -1928,7 +1959,7 @@
         params->has_optional_named_parameters) {
       // Implicit default value is null.
       params->num_optional_parameters++;
-      parameter.default_value = &Object::null_object();
+      parameter.default_value = &Object::null_instance();
     } else {
       params->num_fixed_parameters++;
       ASSERT(params->num_optional_parameters == 0);
@@ -2345,7 +2376,7 @@
     return;
   }
   String& super_ctor_name = String::Handle(Z, super_class.Name());
-  super_ctor_name = String::Concat(super_ctor_name, Symbols::Dot());
+  super_ctor_name = Symbols::FromConcat(super_ctor_name, Symbols::Dot());
 
   ArgumentListNode* arguments = new ArgumentListNode(supercall_pos);
   // Implicit 'this' parameter is the first argument.
@@ -2406,11 +2437,11 @@
   const Class& super_class = Class::Handle(Z, cls.SuperClass());
   ASSERT(!super_class.IsNull());
   String& ctor_name = String::Handle(Z, super_class.Name());
-  ctor_name = String::Concat(ctor_name, Symbols::Dot());
+  ctor_name = Symbols::FromConcat(ctor_name, Symbols::Dot());
   if (CurrentToken() == Token::kPERIOD) {
     ConsumeToken();
-    ctor_name = String::Concat(ctor_name,
-                               *ExpectIdentifier("constructor name expected"));
+    ctor_name = Symbols::FromConcat(
+        ctor_name, *ExpectIdentifier("constructor name expected"));
   }
   CheckToken(Token::kLPAREN, "parameter list expected");
 
@@ -2901,8 +2932,7 @@
 
 // Parser is at the opening parenthesis of the formal parameter declaration
 // of function. Parse the formal parameters, initializers and code.
-SequenceNode* Parser::ParseConstructor(const Function& func,
-                                       Array* default_parameter_values) {
+SequenceNode* Parser::ParseConstructor(const Function& func) {
   TRACE_PARSER("ParseConstructor");
   ASSERT(func.IsGenerativeConstructor());
   ASSERT(!func.IsFactory());
@@ -2944,7 +2974,7 @@
   }
   ParseFormalParameterList(allow_explicit_default_values, false, &params);
 
-  SetupDefaultsForOptionalParams(&params, default_parameter_values);
+  SetupDefaultsForOptionalParams(params);
   ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
   ASSERT(func.NumParameters() == params.parameters->length());
 
@@ -3210,8 +3240,7 @@
 // Parser is at the opening parenthesis of the formal parameter
 // declaration of the function or constructor.
 // Parse the formal parameters and code.
-SequenceNode* Parser::ParseFunc(const Function& func,
-                                Array* default_parameter_values) {
+SequenceNode* Parser::ParseFunc(const Function& func) {
   TRACE_PARSER("ParseFunc");
   Function& saved_innermost_function =
       Function::Handle(Z, innermost_function().raw());
@@ -3226,7 +3255,7 @@
   LocalScope* saved_async_temp_scope = async_temp_scope_;
 
   if (func.IsGenerativeConstructor()) {
-    SequenceNode* statements = ParseConstructor(func, default_parameter_values);
+    SequenceNode* statements = ParseConstructor(func);
     innermost_function_ = saved_innermost_function.raw();
     last_used_try_index_ = saved_try_index;
     return statements;
@@ -3270,7 +3299,7 @@
     AddFormalParamsToScope(&params, current_block_->scope);
   } else if (func.IsAsyncClosure()) {
     AddAsyncClosureParameters(&params);
-    SetupDefaultsForOptionalParams(&params, default_parameter_values);
+    SetupDefaultsForOptionalParams(params);
     AddFormalParamsToScope(&params, current_block_->scope);
     ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
     ASSERT(func.NumParameters() == params.parameters->length());
@@ -3284,7 +3313,7 @@
     }
   } else if (func.IsSyncGenClosure()) {
     AddSyncGenClosureParameters(&params);
-    SetupDefaultsForOptionalParams(&params, default_parameter_values);
+    SetupDefaultsForOptionalParams(params);
     AddFormalParamsToScope(&params, current_block_->scope);
     ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
     if (!Function::Handle(func.parent_function()).IsGetterFunction()) {
@@ -3297,7 +3326,7 @@
     }
   } else if (func.IsAsyncGenClosure()) {
     AddAsyncGenClosureParameters(&params);
-    SetupDefaultsForOptionalParams(&params, default_parameter_values);
+    SetupDefaultsForOptionalParams(params);
     AddFormalParamsToScope(&params, current_block_->scope);
     ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
     ASSERT(func.NumParameters() == params.parameters->length());
@@ -3317,7 +3346,7 @@
     if (func.IsLocalFunction()) {
       AddFormalParamsToFunction(&params, func);
     }
-    SetupDefaultsForOptionalParams(&params, default_parameter_values);
+    SetupDefaultsForOptionalParams(params);
     ASSERT(AbstractType::Handle(Z, func.result_type()).IsResolved());
     ASSERT(func.NumParameters() == params.parameters->length());
 
@@ -4260,16 +4289,16 @@
 
     // We must be dealing with a constructor or named constructor.
     member.kind = RawFunction::kConstructor;
-    *member.name = String::Concat(*member.name, Symbols::Dot());
+    GrowableHandlePtrArray<const String> to_concat(Z, 3);
+    to_concat.Add(*member.name);
+    to_concat.Add(Symbols::Dot());
     if (CurrentToken() == Token::kPERIOD) {
       // Named constructor.
       ConsumeToken();
       member.dict_name = ExpectIdentifier("identifier expected");
-      *member.name = String::Concat(*member.name, *member.dict_name);
+      to_concat.Add(*member.dict_name);
     }
-    // Ensure that names are symbols.
-    *member.name = Symbols::New(*member.name);
-
+    *member.name = Symbols::FromConcatAll(to_concat);
     CheckToken(Token::kLPAREN);
   } else if ((CurrentToken() == Token::kGET) && !member.has_var &&
              (LookaheadToken(1) != Token::kLPAREN) &&
@@ -4615,7 +4644,7 @@
   }
   ExpectToken(Token::kCLASS);
   const intptr_t class_pos = TokenPos();
-  ClassDesc members(cls, class_name, false, class_pos);
+  ClassDesc members(Z, cls, class_name, false, class_pos);
   while (CurrentToken() != Token::kLBRACE) {
     ConsumeToken();
   }
@@ -4636,7 +4665,7 @@
   cls.AddFields(members.fields());
 
   // Creating a new array for functions marks the class as parsed.
-  const Array& array = Array::Handle(Z, Array::MakeArray(members.functions()));
+  Array& array = Array::Handle(Z, members.MakeFunctionsArray());
   cls.SetFunctions(array);
 
   // Add an implicit constructor if no explicit constructor is present.
@@ -4667,7 +4696,7 @@
   ExpectToken(Token::kENUM);
 
   const String& enum_name = String::Handle(Z, cls.Name());
-  ClassDesc enum_members(cls, enum_name, false, cls.token_pos());
+  ClassDesc enum_members(Z, cls, enum_name, false, cls.token_pos());
 
   // Add instance field 'final int index'.
   Field& index_field = Field::ZoneHandle(Z);
@@ -4825,8 +4854,7 @@
   enum_members.AddFunction(hash_code_func);
 
   cls.AddFields(enum_members.fields());
-  const Array& functions =
-      Array::Handle(Z, Array::MakeArray(enum_members.functions()));
+  const Array& functions = Array::Handle(Z, enum_members.MakeFunctionsArray());
   cls.SetFunctions(functions);
 }
 
@@ -4835,8 +4863,7 @@
 void Parser::AddImplicitConstructor(const Class& cls) {
   // The implicit constructor is unnamed, has no explicit parameter.
   String& ctor_name = String::ZoneHandle(Z, cls.Name());
-  ctor_name = String::Concat(ctor_name, Symbols::Dot());
-  ctor_name = Symbols::New(ctor_name);
+  ctor_name = Symbols::FromConcat(ctor_name, Symbols::Dot());
   // To indicate that this is an implicit constructor, we set the
   // token position and end token position of the function
   // to the token position of the class.
@@ -5208,8 +5235,7 @@
 void Parser::ParseTypeParameters(const Class& cls) {
   TRACE_PARSER("ParseTypeParameters");
   if (CurrentToken() == Token::kLT) {
-    const GrowableObjectArray& type_parameters_array =
-        GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
+    GrowableArray<AbstractType*> type_parameters_array(Z, 2);
     intptr_t index = 0;
     TypeParameter& type_parameter = TypeParameter::Handle(Z);
     TypeParameter& existing_type_parameter = TypeParameter::Handle(Z);
@@ -5225,7 +5251,7 @@
           *ExpectUserDefinedTypeIdentifier("type parameter expected");
       // Check for duplicate type parameters.
       for (intptr_t i = 0; i < index; i++) {
-        existing_type_parameter ^= type_parameters_array.At(i);
+        existing_type_parameter ^= type_parameters_array.At(i)->raw();
         existing_type_parameter_name = existing_type_parameter.name();
         if (existing_type_parameter_name.Equals(type_parameter_name)) {
           ReportError(type_parameter_pos, "duplicate type parameter '%s'",
@@ -5247,7 +5273,8 @@
                                           type_parameter_name,
                                           type_parameter_bound,
                                           declaration_pos);
-      type_parameters_array.Add(type_parameter);
+      type_parameters_array.Add(
+          &AbstractType::ZoneHandle(Z, type_parameter.raw()));
       if (metadata_pos >= 0) {
         library_.AddTypeParameterMetadata(type_parameter, metadata_pos);
       }
@@ -5282,8 +5309,7 @@
     ClassFinalizer::FinalizationKind finalization) {
   TRACE_PARSER("ParseTypeArguments");
   if (CurrentToken() == Token::kLT) {
-    const GrowableObjectArray& types =
-        GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
+    GrowableArray<AbstractType*> types;
     AbstractType& type = AbstractType::Handle(Z);
     do {
       ConsumeToken();
@@ -5292,7 +5318,7 @@
       if (type.IsMalformed()) {
         type = Type::DynamicType();
       }
-      types.Add(type);
+      types.Add(&AbstractType::ZoneHandle(Z, type.raw()));
     } while (CurrentToken() == Token::kCOMMA);
     Token::Kind token = CurrentToken();
     if ((token == Token::kGT) || (token == Token::kSHR)) {
@@ -5403,8 +5429,8 @@
     field = Field::New(var_name, is_static, is_final, is_const, is_reflectable,
                        current_class(), name_pos);
     field.set_type(type);
-    field.set_value(Instance::Handle(Z, Instance::null()));
-    top_level->fields.Add(field);
+    field.set_value(Object::null_instance());
+    top_level->AddField(field);
     library_.AddObject(field, var_name);
     if (metadata_pos >= 0) {
       library_.AddFieldMetadata(field, metadata_pos);
@@ -5437,7 +5463,7 @@
         if (library_.is_dart_scheme() && library_.IsPrivate(var_name)) {
           getter.set_is_reflectable(false);
         }
-        top_level->functions.Add(getter);
+        top_level->AddFunction(getter);
       }
     } else if (is_final) {
       ReportError(name_pos, "missing initializer for final or const variable");
@@ -5582,7 +5608,7 @@
     func.set_is_reflectable(false);
   }
   AddFormalParamsToFunction(&params, func);
-  top_level->functions.Add(func);
+  top_level->AddFunction(func);
   if (!is_patch) {
     library_.AddObject(func, func_name);
   } else {
@@ -5736,7 +5762,7 @@
     func.set_is_reflectable(false);
   }
   AddFormalParamsToFunction(&params, func);
-  top_level->functions.Add(func);
+  top_level->AddFunction(func);
   if (!is_patch) {
     library_.AddObject(func, accessor_name);
   } else {
@@ -6047,7 +6073,7 @@
       GrowableObjectArray::Handle(Z, object_store->pending_classes());
   SetPosition(0);
   is_top_level_ = true;
-  TopLevel top_level;
+  TopLevel top_level(Z);
   Class& toplevel_class = Class::Handle(Z,
       Class::New(Symbols::TopLevel(), script_, TokenPos()));
   toplevel_class.set_library(library_);
@@ -6094,13 +6120,15 @@
   }
 
   if ((library_.num_anonymous_classes() == 0) ||
-    (top_level.fields.Length() > 0) || (top_level.functions.Length() > 0)) {
-    toplevel_class.AddFields(top_level.fields);
-
-    const Array& array = Array::Handle(Z,
-                                       Array::MakeArray(top_level.functions));
+      (top_level.fields().length() > 0) ||
+      (top_level.functions().length() > 0)) {
+    toplevel_class.AddFields(top_level.fields());
+    const intptr_t len = top_level.functions().length();
+    const Array& array = Array::Handle(Z, Array::New(len, Heap::kOld));
+    for (intptr_t i = 0; i < len; i++) {
+      array.SetAt(i, *top_level.functions()[i]);
+    }
     toplevel_class.SetFunctions(array);
-
     library_.AddAnonymousClass(toplevel_class);
     pending_classes.Add(toplevel_class, Heap::kOld);
   }
@@ -6563,30 +6591,29 @@
       library_.AddClass(sig_cls);
     }
     body.set_signature_class(sig_cls);
+    // Finalize types in signature class here, so that the
+    // signature type is not computed twice.
+    ClassFinalizer::FinalizeTypesInClass(sig_cls);
     const Type& sig_type = Type::Handle(Z, sig_cls.SignatureType());
-    if (!sig_type.IsFinalized()) {
-      ClassFinalizer::FinalizeType(
-          sig_cls, sig_type, ClassFinalizer::kCanonicalize);
-    }
+    ASSERT(sig_type.IsFinalized());
     ASSERT(AbstractType::Handle(Z, body.result_type()).IsResolved());
     ASSERT(body.NumParameters() == closure_params.parameters->length());
   }
 
   OpenFunctionBlock(body);
   AddFormalParamsToScope(&closure_params, current_block_->scope);
-  OpenBlock();
   async_temp_scope_ = current_block_->scope;
   return body.raw();
 }
 
 SequenceNode* Parser::CloseSyncGenFunction(const Function& closure,
                                            SequenceNode* closure_body) {
-  // The block for the closure body has already been closed. Close the
-  // corresponding function block.
-  CloseBlock();
-
-  closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
-  closure_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
+  LocalVariable* existing_var =
+      closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var =
+      closure_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
 
   // :await_jump_var = -1;
   LocalVariable* jump_var =
@@ -6703,17 +6730,16 @@
       library_.AddClass(sig_cls);
     }
     closure.set_signature_class(sig_cls);
+    // Finalize types in signature class here, so that the
+    // signature type is not computed twice.
+    ClassFinalizer::FinalizeTypesInClass(sig_cls);
     const Type& sig_type = Type::Handle(Z, sig_cls.SignatureType());
-    if (!sig_type.IsFinalized()) {
-      ClassFinalizer::FinalizeType(
-          sig_cls, sig_type, ClassFinalizer::kCanonicalize);
-    }
+    ASSERT(sig_type.IsFinalized());
     ASSERT(AbstractType::Handle(Z, closure.result_type()).IsResolved());
     ASSERT(closure.NumParameters() == closure_params.parameters->length());
   }
   OpenFunctionBlock(closure);
   AddFormalParamsToScope(&closure_params, current_block_->scope);
-  OpenBlock();
   async_temp_scope_ = current_block_->scope;
   return closure.raw();
 }
@@ -6727,31 +6753,37 @@
   LocalVariable* await_jump_var = new (Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::AwaitJumpVar(), dynamic_type);
   current_block_->scope->AddVariable(await_jump_var);
-  current_block_->scope->CaptureVariable(Symbols::AwaitJumpVar());
-  await_jump_var->set_is_captured();
+  current_block_->scope->CaptureVariable(await_jump_var);
   LocalVariable* await_ctx_var = new (Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::AwaitContextVar(), dynamic_type);
   current_block_->scope->AddVariable(await_ctx_var);
-  current_block_->scope->CaptureVariable(Symbols::AwaitContextVar());
-  await_ctx_var->set_is_captured();
+  current_block_->scope->CaptureVariable(await_ctx_var);
 }
 
 
 void Parser::AddAsyncClosureVariables() {
   // Add to current block's scope:
   //   var :async_op;
+  //   var :async_then_callback;
+  //   var :async_catch_error_callback;
   //   var :async_completer;
   const Type& dynamic_type = Type::ZoneHandle(Z, Type::DynamicType());
   LocalVariable* async_op_var = new(Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::AsyncOperation(), dynamic_type);
   current_block_->scope->AddVariable(async_op_var);
-  current_block_->scope->CaptureVariable(Symbols::AsyncOperation());
-  async_op_var->set_is_captured();
+  current_block_->scope->CaptureVariable(async_op_var);
+  LocalVariable* async_then_callback_var = new(Z) LocalVariable(
+      Scanner::kNoSourcePos, Symbols::AsyncThenCallback(), dynamic_type);
+  current_block_->scope->AddVariable(async_then_callback_var);
+  current_block_->scope->CaptureVariable(async_then_callback_var);
+  LocalVariable* async_catch_error_callback_var = new(Z) LocalVariable(
+      Scanner::kNoSourcePos, Symbols::AsyncCatchErrorCallback(), dynamic_type);
+  current_block_->scope->AddVariable(async_catch_error_callback_var);
+  current_block_->scope->CaptureVariable(async_catch_error_callback_var);
   LocalVariable* async_completer = new(Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::AsyncCompleter(), dynamic_type);
   current_block_->scope->AddVariable(async_completer);
-  current_block_->scope->CaptureVariable(Symbols::AsyncCompleter());
-  async_completer->set_is_captured();
+  current_block_->scope->CaptureVariable(async_completer);
 }
 
 
@@ -6762,20 +6794,27 @@
   // store the StreamController object to which the yielded expressions
   // are added.
   //   var :async_op;
-  // This variable is used to store the async generator closure containing
-  // the body of the async* function. It is used by the await operator.
+  //   var :async_then_callback;
+  //   var :async_catch_error_callback;
+  // These variables are used to store the async generator closure containing
+  // the body of the async* function. They are used by the await operator.
   const Type& dynamic_type = Type::ZoneHandle(Z, Type::DynamicType());
   LocalVariable* controller_var = new(Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::Controller(), dynamic_type);
   current_block_->scope->AddVariable(controller_var);
-  current_block_->scope->CaptureVariable(Symbols::Controller());
-  controller_var->set_is_captured();
-
+  current_block_->scope->CaptureVariable(controller_var);
   LocalVariable* async_op_var = new(Z) LocalVariable(
       Scanner::kNoSourcePos, Symbols::AsyncOperation(), dynamic_type);
   current_block_->scope->AddVariable(async_op_var);
-  current_block_->scope->CaptureVariable(Symbols::AsyncOperation());
-  async_op_var->set_is_captured();
+  current_block_->scope->CaptureVariable(async_op_var);
+  LocalVariable* async_then_callback_var = new(Z) LocalVariable(
+      Scanner::kNoSourcePos, Symbols::AsyncThenCallback(), dynamic_type);
+  current_block_->scope->AddVariable(async_then_callback_var);
+  current_block_->scope->CaptureVariable(async_then_callback_var);
+  LocalVariable* async_catch_error_callback_var = new(Z) LocalVariable(
+      Scanner::kNoSourcePos, Symbols::AsyncCatchErrorCallback(), dynamic_type);
+  current_block_->scope->AddVariable(async_catch_error_callback_var);
+  current_block_->scope->CaptureVariable(async_catch_error_callback_var);
 }
 
 
@@ -6830,18 +6869,17 @@
       library_.AddClass(sig_cls);
     }
     closure.set_signature_class(sig_cls);
+    // Finalize types in signature class here, so that the
+    // signature type is not computed twice.
+    ClassFinalizer::FinalizeTypesInClass(sig_cls);
     const Type& sig_type = Type::Handle(Z, sig_cls.SignatureType());
-    if (!sig_type.IsFinalized()) {
-      ClassFinalizer::FinalizeType(
-          sig_cls, sig_type, ClassFinalizer::kCanonicalize);
-    }
+    ASSERT(sig_type.IsFinalized());
     ASSERT(AbstractType::Handle(Z, closure.result_type()).IsResolved());
     ASSERT(closure.NumParameters() == closure_params.parameters->length());
   }
 
   OpenFunctionBlock(closure);
   AddFormalParamsToScope(&closure_params, current_block_->scope);
-  OpenBlock();
   async_temp_scope_ = current_block_->scope;
   return closure.raw();
 }
@@ -6857,6 +6895,8 @@
 //     ... source code of f ...
 //   }
 //   var :async_op = f_async_body;
+//   var :async_then_callback = _asyncThenWrapperHelper(:async_op);
+//   var :async_catch_error_callback = _asyncCatchErrorWrapperHelper(:async_op);
 //   :controller = new _AsyncStarStreamController(:async_op);
 //   return :controller.stream;
 // }
@@ -6866,19 +6906,32 @@
   ASSERT(!closure_func.IsNull());
   ASSERT(closure_body != NULL);
 
-  // The block for the async closure body has already been closed. Close the
-  // corresponding function block.
-  CloseBlock();
-
   // Make sure the implicit variables of the async generator function
   // are captured.
-  closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
-  closure_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
-  closure_body->scope()->LookupVariable(Symbols::Controller(), false);
-  closure_body->scope()->LookupVariable(Symbols::AsyncOperation(), false);
+  LocalVariable* existing_var = closure_body->scope()->LookupVariable(
+      Symbols::AwaitJumpVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = closure_body->scope()->LookupVariable(
+      Symbols::AwaitContextVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = closure_body->scope()->LookupVariable(
+      Symbols::Controller(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = closure_body->scope()->LookupVariable(
+      Symbols::AsyncOperation(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = closure_body->scope()->LookupVariable(
+      Symbols::AsyncThenCallback(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = closure_body->scope()->LookupVariable(
+      Symbols::AsyncCatchErrorCallback(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+
+  const Library& async_lib = Library::Handle(Library::AsyncLibrary());
 
   const Class& controller_class = Class::Handle(Z,
-      Library::LookupCoreClass(Symbols::_AsyncStarStreamController()));
+      async_lib.LookupClassAllowPrivate(
+          Symbols::_AsyncStarStreamController()));
   ASSERT(!controller_class.IsNull());
   const Function& controller_constructor = Function::ZoneHandle(Z,
       controller_class.LookupConstructorAllowPrivate(
@@ -6902,8 +6955,56 @@
       Scanner::kNoSourcePos,
       async_op_var,
       closure_obj);
+
   current_block_->statements->Add(store_async_op);
 
+  // :async_then_callback = _asyncThenWrapperHelper(:async_op)
+  const Function& async_then_wrapper_helper = Function::ZoneHandle(
+      Z, async_lib.LookupFunctionAllowPrivate(
+          Symbols::AsyncThenWrapperHelper()));
+  ASSERT(!async_then_wrapper_helper.IsNull());
+  ArgumentListNode* async_then_wrapper_helper_args = new (Z) ArgumentListNode(
+      Scanner::kNoSourcePos);
+  async_then_wrapper_helper_args->Add(
+      new (Z) LoadLocalNode(Scanner::kNoSourcePos, async_op_var));
+  StaticCallNode* then_wrapper_call = new (Z) StaticCallNode(
+      Scanner::kNoSourcePos,
+      async_then_wrapper_helper,
+      async_then_wrapper_helper_args);
+  LocalVariable* async_then_callback_var =
+      current_block_->scope->LookupVariable(
+          Symbols::AsyncThenCallback(), false);
+  StoreLocalNode* store_async_then_callback = new (Z) StoreLocalNode(
+      Scanner::kNoSourcePos,
+      async_then_callback_var,
+      then_wrapper_call);
+
+  current_block_->statements->Add(store_async_then_callback);
+
+  // :async_catch_error_callback = _asyncErrorWrapperHelper(:async_op)
+
+  const Function& async_error_wrapper_helper = Function::ZoneHandle(
+      Z, async_lib.LookupFunctionAllowPrivate(
+          Symbols::AsyncErrorWrapperHelper()));
+  ASSERT(!async_error_wrapper_helper.IsNull());
+  ArgumentListNode* async_error_wrapper_helper_args = new (Z) ArgumentListNode(
+      Scanner::kNoSourcePos);
+  async_error_wrapper_helper_args->Add(
+      new (Z) LoadLocalNode(Scanner::kNoSourcePos, async_op_var));
+  StaticCallNode* error_wrapper_call = new (Z) StaticCallNode(
+      Scanner::kNoSourcePos,
+      async_error_wrapper_helper,
+      async_error_wrapper_helper_args);
+  LocalVariable* async_catch_error_callback_var =
+      current_block_->scope->LookupVariable(
+          Symbols::AsyncCatchErrorCallback(), false);
+  StoreLocalNode* store_async_catch_error_callback = new (Z) StoreLocalNode(
+      Scanner::kNoSourcePos,
+      async_catch_error_callback_var,
+      error_wrapper_call);
+
+  current_block_->statements->Add(store_async_catch_error_callback);
+
   // :controller = new _AsyncStarStreamController(body_closure);
   ArgumentListNode* arguments = new(Z) ArgumentListNode(Scanner::kNoSourcePos);
   arguments->Add(new (Z) LoadLocalNode(Scanner::kNoSourcePos, async_op_var));
@@ -6948,13 +7049,24 @@
   // Implicitly mark those variables below as captured. We currently mark all
   // variables of all scopes as captured, but as soon as we do something
   // smarter we rely on these internal variables to be available.
-  new_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
-  new_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
-  new_body->scope()->LookupVariable(Symbols::Controller(), false);
-  new_body->scope()->LookupVariable(Symbols::AsyncOperationParam(), false);
-  new_body->scope()->LookupVariable(Symbols::AsyncOperationErrorParam(), false);
-  new_body->scope()->LookupVariable(
+  LocalVariable* existing_var = new_body->scope()->LookupVariable(
+      Symbols::AwaitJumpVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = new_body->scope()->LookupVariable(
+      Symbols::AwaitContextVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = new_body->scope()->LookupVariable(
+      Symbols::Controller(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var = new_body->scope()->LookupVariable(
+      Symbols::AsyncOperationParam(), false);
+  ASSERT(existing_var != NULL);
+  existing_var = new_body->scope()->LookupVariable(
+      Symbols::AsyncOperationErrorParam(), false);
+  ASSERT(existing_var != NULL);
+  existing_var = new_body->scope()->LookupVariable(
       Symbols::AsyncOperationStackTraceParam(), false);
+  ASSERT(existing_var != NULL);
   new_body->scope()->RecursivelyCaptureAllVariables();
   return new_body;
 }
@@ -6995,20 +7107,22 @@
   ASSERT(!closure.IsNull());
   ASSERT(closure_body != NULL);
 
-  // The block for the async closure body has already been closed. Close the
-  // corresponding function block.
-  CloseBlock();
-
-  closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
-  closure_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
-  closure_body->scope()->CaptureVariable(Symbols::AsyncCompleter());
+  LocalVariable* existing_var =
+      closure_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var =
+      closure_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var =
+      closure_body->scope()->LookupVariable(Symbols::AsyncCompleter(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
 
   // Create and return a new future that executes a closure with the current
   // body.
 
   // No need to capture parameters or other variables, since they have already
   // been captured in the corresponding scope as the body has been parsed within
-  // a nested block (contained in the async funtion's block).
+  // a nested block (contained in the async function's block).
   const Class& future =
       Class::ZoneHandle(Z, I->object_store()->future_class());
   ASSERT(!future.IsNull());
@@ -7019,14 +7133,14 @@
       Class::ZoneHandle(Z, I->object_store()->completer_class());
   ASSERT(!completer.IsNull());
   const Function& completer_constructor = Function::ZoneHandle(Z,
-      completer.LookupFunction(Symbols::CompleterConstructor()));
+      completer.LookupFunction(Symbols::CompleterSyncConstructor()));
   ASSERT(!completer_constructor.IsNull());
 
   LocalVariable* async_completer = current_block_->scope->LookupVariable(
       Symbols::AsyncCompleter(), false);
 
   // Add to AST:
-  //   :async_completer = new Completer();
+  //   :async_completer = new Completer.sync();
   ArgumentListNode* empty_args =
       new (Z) ArgumentListNode(Scanner::kNoSourcePos);
   ConstructorCallNode* completer_constructor_node = new (Z) ConstructorCallNode(
@@ -7060,6 +7174,54 @@
       cn);
   current_block_->statements->Add(store_async_op);
 
+  const Library& async_lib = Library::Handle(Library::AsyncLibrary());
+  // :async_then_callback = _asyncThenWrapperHelper(:async_op)
+  const Function& async_then_wrapper_helper = Function::ZoneHandle(
+      Z, async_lib.LookupFunctionAllowPrivate(
+          Symbols::AsyncThenWrapperHelper()));
+  ASSERT(!async_then_wrapper_helper.IsNull());
+  ArgumentListNode* async_then_wrapper_helper_args = new (Z) ArgumentListNode(
+      Scanner::kNoSourcePos);
+  async_then_wrapper_helper_args->Add(
+      new (Z) LoadLocalNode(Scanner::kNoSourcePos, async_op_var));
+  StaticCallNode* then_wrapper_call = new (Z) StaticCallNode(
+      Scanner::kNoSourcePos,
+      async_then_wrapper_helper,
+      async_then_wrapper_helper_args);
+  LocalVariable* async_then_callback_var =
+      current_block_->scope->LookupVariable(
+          Symbols::AsyncThenCallback(), false);
+  StoreLocalNode* store_async_then_callback = new (Z) StoreLocalNode(
+      Scanner::kNoSourcePos,
+      async_then_callback_var,
+      then_wrapper_call);
+
+  current_block_->statements->Add(store_async_then_callback);
+
+  // :async_catch_error_callback = _asyncErrorWrapperHelper(:async_op)
+
+  const Function& async_error_wrapper_helper = Function::ZoneHandle(
+      Z, async_lib.LookupFunctionAllowPrivate(
+          Symbols::AsyncErrorWrapperHelper()));
+  ASSERT(!async_error_wrapper_helper.IsNull());
+  ArgumentListNode* async_error_wrapper_helper_args = new (Z) ArgumentListNode(
+      Scanner::kNoSourcePos);
+  async_error_wrapper_helper_args->Add(
+      new (Z) LoadLocalNode(Scanner::kNoSourcePos, async_op_var));
+  StaticCallNode* error_wrapper_call = new (Z) StaticCallNode(
+      Scanner::kNoSourcePos,
+      async_error_wrapper_helper,
+      async_error_wrapper_helper_args);
+  LocalVariable* async_catch_error_callback_var =
+      current_block_->scope->LookupVariable(
+          Symbols::AsyncCatchErrorCallback(), false);
+  StoreLocalNode* store_async_catch_error_callback = new (Z) StoreLocalNode(
+      Scanner::kNoSourcePos,
+      async_catch_error_callback_var,
+      error_wrapper_call);
+
+  current_block_->statements->Add(store_async_catch_error_callback);
+
   // Add to AST:
   //   new Future.microtask(:async_op);
   ArgumentListNode* arguments = new (Z) ArgumentListNode(Scanner::kNoSourcePos);
@@ -7094,27 +7256,36 @@
   SequenceNode* new_body = CloseAsyncTryBlock(body);
   ASSERT(new_body != NULL);
   ASSERT(new_body->scope() != NULL);
-  new_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
-  new_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
-  new_body->scope()->LookupVariable(Symbols::AsyncCompleter(), false);
+  LocalVariable* existing_var =
+      new_body->scope()->LookupVariable(Symbols::AwaitJumpVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var =
+      new_body->scope()->LookupVariable(Symbols::AwaitContextVar(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
+  existing_var =
+      new_body->scope()->LookupVariable(Symbols::AsyncCompleter(), false);
+  ASSERT((existing_var != NULL) && existing_var->is_captured());
   new_body->scope()->RecursivelyCaptureAllVariables();
   return new_body;
 }
 
 
 // Set up default values for all optional parameters to the function.
-void Parser::SetupDefaultsForOptionalParams(const ParamList* params,
-                                            Array* default_values) {
-  if (params->num_optional_parameters > 0) {
+void Parser::SetupDefaultsForOptionalParams(const ParamList& params) {
+  if ((current_function().raw() == innermost_function().raw()) &&
+      (params.num_optional_parameters > 0)) {
+    ZoneGrowableArray<const Instance*>* default_values =
+        new ZoneGrowableArray<const Instance*>(zone(),
+                                               params.num_optional_parameters);
     // Build array of default parameter values.
-    ParamDesc* param =
-      params->parameters->data() + params->num_fixed_parameters;
-    *default_values = Array::New(params->num_optional_parameters);
-    for (int i = 0; i < params->num_optional_parameters; i++) {
-      ASSERT(param->default_value != NULL);
-      default_values->SetAt(i, *param->default_value);
-      param++;
+    const ZoneGrowableArray<ParamDesc>& parameters = *params.parameters;
+    const int first_opt_param_offset = params.num_fixed_parameters;
+    for (int i = 0; i < params.num_optional_parameters; i++) {
+      const Instance* default_value =
+          parameters[i + first_opt_param_offset].default_value;
+      default_values->Add(default_value);
     }
+    parsed_function()->set_default_parameter_values(default_values);
   }
 }
 
@@ -7214,7 +7385,8 @@
           native_name,
           native_function,
           current_block_->scope,
-          is_bootstrap_native)));
+          is_bootstrap_native,
+          FLAG_link_natives_lazily)));
 }
 
 
@@ -7241,14 +7413,10 @@
 
 void Parser::CaptureInstantiator() {
   ASSERT(current_block_->scope->function_level() > 0);
-  bool found = false;
-  if (current_function().IsInFactoryScope()) {
-    found = current_block_->scope->CaptureVariable(
-        Symbols::TypeArgumentsParameter());
-  } else {
-    found = current_block_->scope->CaptureVariable(Symbols::This());
-  }
-  ASSERT(found);
+  const String* variable_name = current_function().IsInFactoryScope() ?
+      &Symbols::TypeArgumentsParameter() : &Symbols::This();
+  current_block_->scope->CaptureVariable(
+      current_block_->scope->LookupVariable(*variable_name, true));
 }
 
 
@@ -7336,14 +7504,10 @@
     LocalVariable* existing_var =
         current_block_->scope->LookupVariable(variable->name(), true);
     ASSERT(existing_var != NULL);
-    if (existing_var->owner() == current_block_->scope) {
-      ReportError(ident_pos, "identifier '%s' already defined",
-                  variable->name().ToCString());
-    } else {
-      ReportError(ident_pos, "'%s' from outer scope has already been used, "
-                  "cannot redefine",
-                  variable->name().ToCString());
-    }
+    // Use before define cases have already been detected and reported above.
+    ASSERT(existing_var->owner() == current_block_->scope);
+    ReportError(ident_pos, "identifier '%s' already defined",
+                variable->name().ToCString());
   }
   if (is_final || is_const) {
     variable->set_is_final();
@@ -7536,22 +7700,15 @@
           current_block_->scope->LookupVariable(function_variable->name(),
                                                 true);
       ASSERT(existing_var != NULL);
-      if (existing_var->owner() == current_block_->scope) {
-        ReportError(function_pos, "identifier '%s' already defined",
-                    function_variable->name().ToCString());
-      } else {
-        ReportError(function_pos,
-                    "'%s' from outer scope has already been used, "
-                    "cannot redefine",
-                    function_variable->name().ToCString());
-      }
+      // Use before define cases have already been detected and reported above.
+      ASSERT(existing_var->owner() == current_block_->scope);
+      ReportError(function_pos, "identifier '%s' already defined",
+                  function_variable->name().ToCString());
     }
   }
 
   // Parse the local function.
-  Array& default_parameter_values = Array::Handle(Z);
-  SequenceNode* statements = Parser::ParseFunc(function,
-                                               &default_parameter_values);
+  SequenceNode* statements = Parser::ParseFunc(function);
 
   // Now that the local function has formal parameters, lookup the signature
   // class in the current library (but not in its imports) and only create a new
@@ -7590,27 +7747,11 @@
     CaptureInstantiator();
   }
 
-  // Since the signature type is cached by the signature class, it may have
-  // been finalized already.
-  Type& signature_type =
-      Type::Handle(Z, signature_class.SignatureType());
-  TypeArguments& signature_type_arguments =
-      TypeArguments::Handle(Z, signature_type.arguments());
-
-  if (!signature_type.IsFinalized()) {
-    signature_type ^= ClassFinalizer::FinalizeType(
-        signature_class, signature_type, ClassFinalizer::kCanonicalize);
-
-    // The call to ClassFinalizer::FinalizeType may have
-    // extended the vector of type arguments.
-    signature_type_arguments = signature_type.arguments();
-    ASSERT(signature_type_arguments.IsNull() ||
-           (signature_type_arguments.Length() ==
-            signature_class.NumTypeArguments()));
-
-    // The signature_class should not have changed.
-    ASSERT(signature_type.type_class() == signature_class.raw());
-  }
+  // Finalize types in signature class here, so that the
+  // signature type is not computed twice.
+  ClassFinalizer::FinalizeTypesInClass(signature_class);
+  const Type& signature_type = Type::Handle(Z, signature_class.SignatureType());
+  ASSERT(signature_type.IsFinalized());
 
   // A signature type itself cannot be malformed or malbounded, only its
   // signature function's result type or parameter types may be.
@@ -7620,7 +7761,8 @@
   if (variable_name != NULL) {
     // Patch the function type of the variable now that the signature is known.
     function_type.set_type_class(signature_class);
-    function_type.set_arguments(signature_type_arguments);
+    function_type.set_arguments(
+        TypeArguments::Handle(Z, signature_type.arguments()));
 
     // The function type was initially marked as instantiated, but it may
     // actually be uninstantiated.
@@ -8400,7 +8542,7 @@
               Symbols::AsyncSavedTryCtxVarPrefix().ToCString(),
               try_index))));
   LocalVariable* var = scope->LocalLookupVariable(async_saved_try_ctx_name);
-  ASSERT((var != NULL) && var->is_captured());\
+  ASSERT((var != NULL) && var->is_captured());
   return var;
 }
 
@@ -8436,7 +8578,8 @@
       // The block declaring :saved_try_ctx_var variable is the parent of the
       // pushed try block.
       *saved_try_ctx = LookupSavedTryContextVar(scope->parent());
-      *async_saved_try_ctx = LookupAsyncSavedTryContextVar(scope, try_index);
+      *async_saved_try_ctx = LookupAsyncSavedTryContextVar(async_temp_scope_,
+                                                           try_index);
       if ((try_stack_->outer_try() != NULL) && !try_stack_->inside_finally()) {
         // Collecting the outer try scope is not necessary if we
         // are in a finally block.
@@ -8445,7 +8588,7 @@
         if (scope->function_level() == current_function_level) {
           *outer_saved_try_ctx = LookupSavedTryContextVar(scope->parent());
           *outer_async_saved_try_ctx =
-              LookupAsyncSavedTryContextVar(scope, try_index);
+              LookupAsyncSavedTryContextVar(async_temp_scope_, try_index);
         }
       }
     }
@@ -9117,7 +9260,7 @@
         LocalVariable* saved_try_ctx =
             LookupSavedTryContextVar(scope->parent());
         LocalVariable* async_saved_try_ctx =
-            LookupAsyncSavedTryContextVar(scope->parent(),
+            LookupAsyncSavedTryContextVar(async_temp_scope_,
                                           try_stack_->try_index());
         current_block_->statements->Add(
             new (Z) StoreLocalNode(
@@ -9391,7 +9534,7 @@
         LocalVariable* saved_try_ctx =
             LookupSavedTryContextVar(scope->parent());
         LocalVariable* async_saved_try_ctx =
-            LookupAsyncSavedTryContextVar(scope->parent(),
+            LookupAsyncSavedTryContextVar(async_temp_scope_,
                                           try_block->try_index());
         async_code->Add(
             new (Z) StoreLocalNode(
@@ -9430,10 +9573,7 @@
       Type::ZoneHandle(Z, Type::DynamicType()));
   ASSERT(async_temp_scope_ != NULL);
   async_temp_scope_->AddVariable(async_saved_try_ctx);
-  async_saved_try_ctx->set_is_captured();
-  async_saved_try_ctx = current_block_->scope->LookupVariable(
-      async_saved_try_ctx_name, false);
-  ASSERT(async_saved_try_ctx != NULL);
+  current_block_->scope->CaptureVariable(async_saved_try_ctx);
   ASSERT(saved_try_context != NULL);
   current_block_->statements->Add(new(Z) StoreLocalNode(
       Scanner::kNoSourcePos,
@@ -11557,8 +11697,7 @@
   if (is_setter_name) {
     extractor_name = String::Concat(Symbols::SetterPrefix(), extractor_name);
   }
-  extractor_name = String::Concat(Symbols::HashMark(), extractor_name);
-  extractor_name = Symbols::New(extractor_name);
+  extractor_name = Symbols::FromConcat(Symbols::HashMark(), extractor_name);
   return new(Z) InstanceGetterNode(property_pos, primary, extractor_name);
 }
 
@@ -11738,16 +11877,21 @@
 
 const AbstractType* Parser::ReceiverType(const Class& cls) {
   ASSERT(!cls.IsNull());
-  const TypeArguments& type_arguments = TypeArguments::Handle(
-      Z,
-      (cls.NumTypeParameters() > 0) ?
-          cls.type_parameters() : TypeArguments::null());
-  AbstractType& type = AbstractType::ZoneHandle(
-      Z, Type::New(cls, type_arguments, cls.token_pos()));
+  Type& type = Type::ZoneHandle(Z, cls.CanonicalType());
+  if (!type.IsNull()) {
+    return &type;
+  }
+  if (cls.IsSignatureClass()) {
+    type = cls.SignatureType();
+  } else {
+    type = Type::New(cls,
+        TypeArguments::Handle(Z, cls.type_parameters()), cls.token_pos());
+  }
   if (cls.is_type_finalized()) {
     type ^= ClassFinalizer::FinalizeType(
         cls, type, ClassFinalizer::kCanonicalizeWellFormed);
     // Note that the receiver type may now be a malbounded type.
+    cls.SetCanonicalType(type);
   }
   return &type;
 }
@@ -11763,6 +11907,66 @@
 }
 
 
+class ConstMapKeyEqualsTraits {
+ public:
+  static bool IsMatch(const Object& a, const Object& b) {
+    return String::Cast(a).Equals(String::Cast(b));
+  }
+  static bool IsMatch(const char* key, const Object& b) {
+    return String::Cast(b).Equals(key);
+  }
+  static uword Hash(const Object& obj) {
+    return String::Cast(obj).Hash();
+  }
+  static uword Hash(const char* key) {
+    return String::Hash(key, strlen(key));
+  }
+};
+typedef UnorderedHashMap<ConstMapKeyEqualsTraits> ConstantsMap;
+
+
+void Parser::CacheConstantValue(intptr_t token_pos, const Instance& value) {
+  String& key = String::Handle(Z, script_.url());
+  String& suffix =
+      String::Handle(Z, String::NewFormatted("_%" Pd "", token_pos));
+  key = Symbols::FromConcat(key, suffix);
+  if (isolate()->object_store()->compile_time_constants() == Array::null()) {
+    const intptr_t kInitialConstMapSize = 16;
+    isolate()->object_store()->set_compile_time_constants(
+        Array::Handle(Z, HashTables::New<ConstantsMap>(kInitialConstMapSize,
+                                                       Heap::kNew)));
+  }
+  ConstantsMap constants(isolate()->object_store()->compile_time_constants());
+  constants.UpdateOrInsert(key, value);
+  if (FLAG_compiler_stats) {
+    isolate_->compiler_stats()->num_cached_consts = constants.NumOccupied();
+  }
+  isolate()->object_store()->set_compile_time_constants(constants.Release());
+}
+
+
+bool Parser::GetCachedConstant(intptr_t token_pos, Instance* value) {
+  if (isolate()->object_store()->compile_time_constants() == Array::null()) {
+    return false;
+  }
+  // We don't want to allocate anything in the heap here since this code
+  // is called from the optimizing compiler in the background thread. Allocate
+  // the key value in the zone instead.
+  const char* key = Z->PrintToString("%s_%" Pd "",
+      String::Handle(Z, script_.url()).ToCString(),
+      token_pos);
+  ConstantsMap constants(isolate()->object_store()->compile_time_constants());
+  bool is_present = false;
+  *value ^= constants.GetOrNull<const char *>(key, &is_present);
+  ASSERT(constants.Release().raw() ==
+      isolate()->object_store()->compile_time_constants());
+  if (FLAG_compiler_stats && is_present) {
+    isolate_->compiler_stats()->num_const_cache_hits++;
+  }
+  return is_present;
+}
+
+
 RawInstance* Parser::TryCanonicalize(const Instance& instance,
                                      intptr_t token_pos) {
   if (instance.IsNull()) {
@@ -11815,7 +12019,7 @@
       ASSERT(func.kind() == RawFunction::kImplicitStaticFinalGetter);
       Object& const_value = Object::Handle(Z);
       {
-        PAUSETIMERSCOPE(I, time_compilation);
+        PAUSETIMERSCOPE(T, time_compilation);
         const_value = DartEntry::InvokeFunction(func, Object::empty_array());
       }
       if (const_value.IsError()) {
@@ -11896,7 +12100,7 @@
       ArgumentsDescriptor::New(num_arguments, arguments->names()));
   Object& result = Object::Handle(Z);
   {
-    PAUSETIMERSCOPE(I, time_compilation);
+    PAUSETIMERSCOPE(T, time_compilation);
     result = DartEntry::InvokeFunction(
         constructor, arg_values, args_descriptor);
   }
@@ -11908,7 +12112,7 @@
       if (result.IsUnhandledException()) {
         return result.raw();
       } else {
-        I->long_jump_base()->Jump(1, Error::Cast(result));
+        thread()->long_jump_base()->Jump(1, Error::Cast(result));
         UNREACHABLE();
         return Object::null();
       }
@@ -12033,7 +12237,7 @@
 AstNode* Parser::ResolveIdentInCurrentLibraryScope(intptr_t ident_pos,
                                                    const String& ident) {
   TRACE_PARSER("ResolveIdentInCurrentLibraryScope");
-  HANDLESCOPE(I);
+  HANDLESCOPE(thread());
   const Object& obj = Object::Handle(Z, library_.ResolveName(ident));
   if (obj.IsClass()) {
     const Class& cls = Class::Cast(obj);
@@ -12080,7 +12284,7 @@
                                            const LibraryPrefix& prefix,
                                            const String& ident) {
   TRACE_PARSER("ResolveIdentInPrefixScope");
-  HANDLESCOPE(I);
+  HANDLESCOPE(thread());
   if (ident.CharAt(0) == Library::kPrivateIdentifierStart) {
     // Private names are not exported by libraries. The name mangling
     // of private names with a library-specific suffix usually ensures
@@ -12385,6 +12589,15 @@
   ASSERT(type_pos >= 0);
   ASSERT(CurrentToken() == Token::kLBRACK || CurrentToken() == Token::kINDEX);
   const intptr_t literal_pos = TokenPos();
+
+  if (is_const) {
+    Instance& existing_const = Instance::ZoneHandle(Z);
+    if (GetCachedConstant(literal_pos, &existing_const)) {
+      SkipListLiteral();
+      return new(Z) LiteralNode(literal_pos, existing_const);
+    }
+  }
+
   bool is_empty_literal = CurrentToken() == Token::kINDEX;
   ConsumeToken();
 
@@ -12452,8 +12665,8 @@
 
   if (is_const) {
     // Allocate and initialize the const list at compile time.
-    Array& const_list =
-        Array::ZoneHandle(Z, Array::New(element_list.length(), Heap::kOld));
+    Array& const_list = Array::ZoneHandle(Z,
+        Array::New(element_list.length(), Heap::kOld));
     const_list.SetTypeArguments(
         TypeArguments::Handle(Z, list_type_arguments.Canonicalize()));
     Error& malformed_error = Error::Handle(Z);
@@ -12485,6 +12698,7 @@
     }
     const_list.MakeImmutable();
     const_list ^= TryCanonicalize(const_list, literal_pos);
+    CacheConstantValue(literal_pos, const_list);
     return new(Z) LiteralNode(literal_pos, const_list);
   } else {
     // Factory call at runtime.
@@ -12578,8 +12792,16 @@
   ASSERT(type_pos >= 0);
   ASSERT(CurrentToken() == Token::kLBRACE);
   const intptr_t literal_pos = TokenPos();
-  ConsumeToken();
 
+  if (is_const) {
+    Instance& existing_const = Instance::ZoneHandle(Z);
+    if (GetCachedConstant(literal_pos, &existing_const)) {
+      SkipMapLiteral();
+      return new(Z) LiteralNode(literal_pos, existing_const);
+    }
+  }
+
+  ConsumeToken();  // Opening brace.
   AbstractType& key_type = Type::ZoneHandle(Z, Type::DynamicType());
   AbstractType& value_type = Type::ZoneHandle(Z, Type::DynamicType());
   TypeArguments& map_type_arguments =
@@ -12736,6 +12958,7 @@
                    "error executing const Map constructor");
     } else {
       const Instance& const_instance = Instance::Cast(constructor_result);
+      CacheConstantValue(literal_pos, const_instance);
       return new(Z) LiteralNode(
           literal_pos, Instance::ZoneHandle(Z, const_instance.raw()));
     }
@@ -12900,14 +13123,13 @@
     library_.AddClass(sig_cls);
   }
   closure.set_signature_class(sig_cls);
+  // Finalize types in signature class here, so that the
+  // signature type is not computed twice.
+  ClassFinalizer::FinalizeTypesInClass(sig_cls);
   const Type& sig_type = Type::Handle(Z, sig_cls.SignatureType());
-  if (!sig_type.IsFinalized()) {
-    // Finalization would be premature when top-level parsing.
-    ASSERT(!is_top_level_);
-    ClassFinalizer::FinalizeType(sig_cls,
-                                 sig_type,
-                                 ClassFinalizer::kCanonicalize);
-  }
+  ASSERT(sig_type.IsFinalized());
+  // Finalization would be premature when top-level parsing.
+  ASSERT(!is_top_level_);
   return closure.raw();
 }
 
@@ -12919,9 +13141,10 @@
   // unnamed constructor for class 'A' is labeled 'A.'.
   // This convention prevents users from explicitly calling constructors.
   String& constructor_name =
-      String::Handle(String::Concat(type_class_name, Symbols::Dot()));
+      String::Handle(Symbols::FromConcat(type_class_name, Symbols::Dot()));
   if (named_constructor != NULL) {
-    constructor_name = String::Concat(constructor_name, *named_constructor);
+    constructor_name =
+        Symbols::FromConcat(constructor_name, *named_constructor);
   }
   return constructor_name;
 }
@@ -13278,41 +13501,43 @@
                   "const object creation",
                   external_constructor_name.ToCString());
     }
-    const Object& constructor_result = Object::Handle(Z,
-        EvaluateConstConstructorCall(type_class,
-                                     type_arguments,
-                                     constructor,
-                                     arguments));
-    if (constructor_result.IsUnhandledException()) {
-      // It's a compile-time error if invocation of a const constructor
-      // call fails.
-      ReportErrors(Error::Cast(constructor_result),
-                   script_, new_pos,
-                   "error while evaluating const constructor");
+
+    Instance& const_instance = Instance::ZoneHandle(Z);
+    if (GetCachedConstant(new_pos, &const_instance)) {
+      // Cache hit, nothing else to do.
     } else {
-      // Const constructors can return null in the case where a const native
-      // factory returns a null value. Thus we cannot use a Instance::Cast here.
-      Instance& const_instance = Instance::Handle(Z);
-      const_instance ^= constructor_result.raw();
-      new_object = new(Z) LiteralNode(
-          new_pos, Instance::ZoneHandle(Z, const_instance.raw()));
-      if (!type_bound.IsNull()) {
-        ASSERT(!type_bound.IsMalformed());
-        Error& malformed_error = Error::Handle(Z);
-        ASSERT(!is_top_level_);  // We cannot check unresolved types.
-        if (!const_instance.IsInstanceOf(type_bound,
-                                         TypeArguments::Handle(Z),
-                                         &malformed_error)) {
-          type_bound = ClassFinalizer::NewFinalizedMalformedType(
-              malformed_error,
-              script_,
-              new_pos,
-              "const factory result is not an instance of '%s'",
-              String::Handle(Z, type_bound.UserVisibleName()).ToCString());
-          new_object = ThrowTypeError(new_pos, type_bound);
-        }
-        type_bound = AbstractType::null();
+      Object& constructor_result = Object::Handle(Z,
+          EvaluateConstConstructorCall(type_class,
+                                       type_arguments,
+                                       constructor,
+                                       arguments));
+      if (constructor_result.IsUnhandledException()) {
+        // It's a compile-time error if invocation of a const constructor
+        // call fails.
+        ReportErrors(Error::Cast(constructor_result),
+                     script_, new_pos,
+                     "error while evaluating const constructor");
       }
+      const_instance ^= constructor_result.raw();
+      CacheConstantValue(new_pos, const_instance);
+    }
+    new_object = new(Z) LiteralNode(new_pos, const_instance);
+    if (!type_bound.IsNull()) {
+      ASSERT(!type_bound.IsMalformed());
+      Error& malformed_error = Error::Handle(Z);
+      ASSERT(!is_top_level_);  // We cannot check unresolved types.
+      if (!const_instance.IsInstanceOf(type_bound,
+                                       TypeArguments::Handle(Z),
+                                       &malformed_error)) {
+        type_bound = ClassFinalizer::NewFinalizedMalformedType(
+            malformed_error,
+            script_,
+            new_pos,
+            "const factory result is not an instance of '%s'",
+            String::Handle(Z, type_bound.UserVisibleName()).ToCString());
+        new_object = ThrowTypeError(new_pos, type_bound);
+      }
+      type_bound = AbstractType::null();
     }
   } else {
     CheckConstructorCallTypeArguments(new_pos, constructor, type_arguments);
@@ -13357,7 +13582,7 @@
   // Call interpolation function.
   Object& result = Object::Handle(Z);
   {
-    PAUSETIMERSCOPE(I, time_compilation);
+    PAUSETIMERSCOPE(T, time_compilation);
     result = DartEntry::InvokeFunction(func, interpolate_arg);
   }
   if (result.IsUnhandledException()) {
@@ -13538,8 +13763,7 @@
           // field access.
           String& qualified_name = String::ZoneHandle(Z, prefix.name());
           qualified_name = String::Concat(qualified_name, Symbols::Dot());
-          qualified_name = String::Concat(qualified_name, ident);
-          qualified_name = Symbols::New(qualified_name);
+          qualified_name = Symbols::FromConcat(qualified_name, ident);
           InvocationMirror::Type call_type =
               CurrentToken() == Token::kLPAREN ?
                   InvocationMirror::kMethod : InvocationMirror::kGetter;
@@ -13555,8 +13779,7 @@
         // primary != NULL.
         String& qualified_name = String::ZoneHandle(Z, prefix.name());
         qualified_name = String::Concat(qualified_name, Symbols::Dot());
-        qualified_name = String::Concat(qualified_name, ident);
-        qualified_name = Symbols::New(qualified_name);
+        qualified_name = Symbols::FromConcat(qualified_name, ident);
         InvocationMirror::Type call_type =
             CurrentToken() == Token::kLPAREN ?
                 InvocationMirror::kMethod : InvocationMirror::kGetter;
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index 5199cb6..ece2729 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -35,7 +35,7 @@
 struct MemberDesc;
 struct ParamList;
 struct QualIdent;
-struct TopLevel;
+class TopLevel;
 
 // The class ParsedFunction holds the result of parsing a function.
 class ParsedFunction : public ZoneAllocated {
@@ -47,12 +47,12 @@
         node_sequence_(NULL),
         regexp_compile_data_(NULL),
         instantiator_(NULL),
-        default_parameter_values_(Array::ZoneHandle(zone(), Array::null())),
         current_context_var_(NULL),
         expression_temp_var_(NULL),
         finally_return_temp_var_(NULL),
         deferred_prefixes_(new ZoneGrowableArray<const LibraryPrefix*>()),
         guarded_fields_(new ZoneGrowableArray<const Field*>()),
+        default_parameter_values_(NULL),
         first_parameter_index_(0),
         first_stack_local_index_(0),
         num_copied_params_(0),
@@ -85,13 +85,24 @@
     instantiator_ = instantiator;
   }
 
-  const Array& default_parameter_values() const {
-    return default_parameter_values_;
+  void set_default_parameter_values(ZoneGrowableArray<const Instance*>* list) {
+    default_parameter_values_ = list;
+#if defined(DEBUG)
+    if (list == NULL) return;
+    for (intptr_t i = 0; i < list->length(); i++) {
+      ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMHeap());
+    }
+#endif
   }
-  void set_default_parameter_values(const Array& default_parameter_values) {
-    ASSERT(default_parameter_values.IsZoneHandle() ||
-           default_parameter_values.InVMHeap());
-    default_parameter_values_ = default_parameter_values.raw();
+
+
+  const Instance& DefaultParameterValueAt(intptr_t i) const {
+    ASSERT(default_parameter_values_ != NULL);
+    return *default_parameter_values_->At(i);
+  }
+
+  ZoneGrowableArray<const Instance*>* default_parameter_values() const {
+    return default_parameter_values_;
   }
 
   LocalVariable* current_context_var() const {
@@ -150,6 +161,7 @@
   void record_await() { have_seen_await_expr_ = true; }
   bool have_seen_await() const { return have_seen_await_expr_; }
 
+  Thread* thread() const { return thread_; }
   Isolate* isolate() const { return thread_->isolate(); }
   Zone* zone() const { return thread_->zone(); }
 
@@ -160,12 +172,12 @@
   SequenceNode* node_sequence_;
   RegExpCompileData* regexp_compile_data_;
   LocalVariable* instantiator_;
-  Array& default_parameter_values_;
   LocalVariable* current_context_var_;
   LocalVariable* expression_temp_var_;
   LocalVariable* finally_return_temp_var_;
   ZoneGrowableArray<const LibraryPrefix*>* deferred_prefixes_;
   ZoneGrowableArray<const Field*>* guarded_fields_;
+  ZoneGrowableArray<const Instance*>* default_parameter_values_;
 
   int first_parameter_index_;
   int first_stack_local_index_;
@@ -511,8 +523,7 @@
 
   static bool ParseFormalParameters(const Function& func, ParamList* params);
 
-  static void SetupDefaultsForOptionalParams(const ParamList* params,
-                                             Array* default_values);
+  void SetupDefaultsForOptionalParams(const ParamList& params);
   ClosureNode* CreateImplicitClosureNode(const Function& func,
                                          intptr_t token_pos,
                                          AstNode* receiver);
@@ -520,10 +531,8 @@
                                         const Function& func);
   void AddFormalParamsToScope(const ParamList* params, LocalScope* scope);
 
-  SequenceNode* ParseConstructor(const Function& func,
-                                 Array* default_parameter_values);
-  SequenceNode* ParseFunc(const Function& func,
-                          Array* default_parameter_values);
+  SequenceNode* ParseConstructor(const Function& func);
+  SequenceNode* ParseFunc(const Function& func);
 
   void ParseNativeFunctionBlock(const ParamList* params, const Function& func);
 
@@ -532,18 +541,13 @@
   SequenceNode* ParseStaticFinalGetter(const Function& func);
   SequenceNode* ParseStaticInitializer();
   SequenceNode* ParseMethodExtractor(const Function& func);
-  SequenceNode* ParseNoSuchMethodDispatcher(const Function& func,
-                                            Array* default_values);
-  SequenceNode* ParseInvokeFieldDispatcher(const Function& func,
-                                           Array* default_values);
-  SequenceNode* ParseImplicitClosure(const Function& func,
-                                     Array* default_values);
-  SequenceNode* ParseConstructorClosure(const Function& func,
-                                        Array* default_values);
+  SequenceNode* ParseNoSuchMethodDispatcher(const Function& func);
+  SequenceNode* ParseInvokeFieldDispatcher(const Function& func);
+  SequenceNode* ParseImplicitClosure(const Function& func);
+  SequenceNode* ParseConstructorClosure(const Function& func);
 
   void BuildDispatcherScope(const Function& func,
-                            const ArgumentsDescriptor& desc,
-                            Array* default_values);
+                            const ArgumentsDescriptor& desc);
 
   void EnsureHasReturnStatement(SequenceNode* seq, intptr_t return_pos);
   void ChainNewBlock(LocalScope* outer_scope);
@@ -816,7 +820,10 @@
                             ArgumentListNode* arguments);
 
   RawInstance* TryCanonicalize(const Instance& instance, intptr_t token_pos);
+  void CacheConstantValue(intptr_t token_pos, const Instance& value);
+  bool GetCachedConstant(intptr_t token_pos, Instance* value);
 
+  Thread* thread() const { return thread_; }
   Isolate* isolate() const { return isolate_; }
   Zone* zone() const { return thread_->zone(); }
 
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 52287f3..bd9b73f 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -6,6 +6,7 @@
 
 #include "vm/compiler.h"
 #include "vm/isolate.h"
+#include "vm/log.h"
 #include "vm/longjump.h"
 #include "vm/object.h"
 #include "vm/object_store.h"
@@ -23,7 +24,7 @@
 
 
 static void Jump(const Error& error) {
-  Isolate::Current()->long_jump_base()->Jump(1, error);
+  Thread::Current()->long_jump_base()->Jump(1, error);
 }
 
 
@@ -49,16 +50,20 @@
   changed_(false),
   function_count_(0),
   class_count_(0),
+  selector_count_(0),
+  dropped_function_count_(0),
   libraries_(GrowableObjectArray::Handle(Z, I->object_store()->libraries())),
   pending_functions_(GrowableObjectArray::Handle(Z,
                                                  GrowableObjectArray::New())),
   collected_closures_(GrowableObjectArray::Handle(Z, I->collected_closures())),
-  sent_selectors_(GrowableObjectArray::Handle(Z, GrowableObjectArray::New())),
+  sent_selectors_(Z),
   error_(Error::Handle(Z)) {
 }
 
 
 void Precompiler::DoCompileAll() {
+  LogBlock lb(thread_);
+
   // Drop all existing code so we can use the presence of code as an indicator
   // that we have already looked for the function's callees.
   ClearAllCode();
@@ -76,11 +81,12 @@
   CleanUp();
 
   if (FLAG_trace_precompiler) {
-    OS::Print("Precompiled %" Pd " functions, %" Pd " dynamic types,"
-              " %" Pd " dynamic selectors\n",
+    ISL_Print("Precompiled %" Pd " functions, %" Pd " dynamic types,"
+              " %" Pd " dynamic selectors.\n Dropped %" Pd " functions.\n",
               function_count_,
               class_count_,
-              sent_selectors_.Length());
+              selector_count_,
+              dropped_function_count_);
   }
 
   I->set_compilation_allowed(false);
@@ -270,7 +276,7 @@
     lib = Library::LookupLibrary(library_name);
     if (lib.IsNull()) {
       if (FLAG_trace_precompiler) {
-        OS::Print("WARNING: Missing %s\n", kExternallyCalled[i].library_);
+        ISL_Print("WARNING: Missing %s\n", kExternallyCalled[i].library_);
       }
       continue;
     }
@@ -281,7 +287,7 @@
       cls = lib.LookupClassAllowPrivate(class_name);
       if (cls.IsNull()) {
         if (FLAG_trace_precompiler) {
-          OS::Print("WARNING: Missing %s %s\n",
+          ISL_Print("WARNING: Missing %s %s\n",
                     kExternallyCalled[i].library_,
                     kExternallyCalled[i].class_);
         }
@@ -294,7 +300,7 @@
 
     if (func.IsNull()) {
       if (FLAG_trace_precompiler) {
-        OS::Print("WARNING: Missing %s %s %s\n",
+        ISL_Print("WARNING: Missing %s %s %s\n",
                   kExternallyCalled[i].library_,
                   kExternallyCalled[i].class_,
                   kExternallyCalled[i].function_);
@@ -333,7 +339,9 @@
 void Precompiler::CleanUp() {
   I->set_collected_closures(GrowableObjectArray::Handle(Z));
 
-  // TODO(rmacnak): Drop functions without code, classes without functions, etc.
+  DropUncompiledFunctions();
+
+  // TODO(rmacnak): DropEmptyClasses();
 }
 
 
@@ -342,7 +350,7 @@
     function_count_++;
 
     if (FLAG_trace_precompiler) {
-      OS::Print("Precompiling %" Pd " %s (%" Pd ", %s)\n",
+      ISL_Print("Precompiling %" Pd " %s (%" Pd ", %s)\n",
                 function_count_,
                 function.ToLibNamePrefixedQualifiedCString(),
                 function.token_pos(),
@@ -434,7 +442,7 @@
       if (field.initializer() != Function::null()) return;
 
       if (FLAG_trace_precompiler) {
-        OS::Print("Precompiling initializer for %s\n", field.ToCString());
+        ISL_Print("Precompiling initializer for %s\n", field.ToCString());
       }
       Compiler::CompileStaticInitializer(field);
 
@@ -454,36 +462,26 @@
 
 
 bool Precompiler::IsSent(const String& selector) {
-  ASSERT(selector.IsSymbol());
-
-  // TODO(rmacnak): Use a proper set.
-  for (intptr_t i = 0; i < sent_selectors_.Length(); i++) {
-    if (sent_selectors_.At(i) == selector.raw()) {
-      return true;
-    }
-  }
-
-  return false;
+  return sent_selectors_.Includes(selector);
 }
 
 
 void Precompiler::AddSelector(const String& selector) {
   if (!IsSent(selector)) {
+    sent_selectors_.Add(selector);
+    selector_count_++;
+    changed_ = true;
+
     if (FLAG_trace_precompiler) {
-      OS::Print("Enqueueing selector %" Pd " %s\n",
-                sent_selectors_.Length(),
+      ISL_Print("Enqueueing selector %" Pd " %s\n",
+                selector_count_,
                 selector.ToCString());
     }
 
-    sent_selectors_.Add(selector);
-    changed_ = true;
-
     if (!Field::IsGetterName(selector) &&
         !Field::IsSetterName(selector)) {
       // Regular method may be call-through-getter.
-      // TODO(rmacnak): Do not create the symbol if it does not already exist.
-      String& getter = String::Handle(Field::GetterName(selector));
-      getter = Symbols::New(getter);
+      const String& getter = String::Handle(Field::GetterSymbol(selector));
       AddSelector(getter);
     }
   }
@@ -498,7 +496,7 @@
   changed_ = true;
 
   if (FLAG_trace_precompiler) {
-    OS::Print("Allocation %" Pd " %s\n", class_count_, cls.ToCString());
+    ISL_Print("Allocation %" Pd " %s\n", class_count_, cls.ToCString());
   }
 
   const Class& superclass = Class::Handle(cls.SuperClass());
@@ -577,10 +575,7 @@
         if (function.kind() == RawFunction::kRegularFunction &&
             !Field::IsGetterName(selector) &&
             !Field::IsSetterName(selector)) {
-          // TODO(rmacnak): Do not create the symbol if it does not already
-          // exist.
-          selector = Field::GetterName(selector);
-          selector = Symbols::New(selector);
+          selector = Field::GetterSymbol(selector);
           if (IsSent(selector)) {
             function = function.ImplicitClosureFunction();
             AddFunction(function);
@@ -591,4 +586,55 @@
   }
 }
 
+
+void Precompiler::DropUncompiledFunctions() {
+  Library& lib = Library::Handle(Z);
+  Class& cls = Class::Handle(Z);
+  Array& functions = Array::Handle(Z);
+  Function& function = Function::Handle(Z);
+  GrowableObjectArray& retained_functions = GrowableObjectArray::Handle(Z);
+  GrowableObjectArray& closures = GrowableObjectArray::Handle(Z);
+
+  for (intptr_t i = 0; i < libraries_.Length(); i++) {
+    lib ^= libraries_.At(i);
+    ClassDictionaryIterator it(lib, ClassDictionaryIterator::kIteratePrivate);
+    while (it.HasNext()) {
+      cls = it.GetNextClass();
+      if (cls.IsDynamicClass()) {
+        continue;  // class 'dynamic' is in the read-only VM isolate.
+      }
+
+      functions = cls.functions();
+      retained_functions = GrowableObjectArray::New();
+      for (intptr_t j = 0; j < functions.Length(); j++) {
+        function ^= functions.At(j);
+        if (function.HasCode()) {
+          retained_functions.Add(function);
+        } else {
+          dropped_function_count_++;
+          if (FLAG_trace_precompiler) {
+            ISL_Print("Precompilation dropping %s\n",
+                      function.ToLibNamePrefixedQualifiedCString());
+          }
+        }
+      }
+
+      functions = Array::New(retained_functions.Length(), Heap::kOld);
+      for (intptr_t j = 0; j < retained_functions.Length(); j++) {
+        function ^= retained_functions.At(j);
+        functions.SetAt(j, function);
+      }
+      cls.SetFunctions(functions);
+
+      closures = cls.closures();
+      if (!closures.IsNull()) {
+        for (intptr_t j = 0; j < closures.Length(); j++) {
+          function ^= closures.At(j);
+          ASSERT(function.HasCode());
+        }
+      }
+    }
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/precompiler.h b/runtime/vm/precompiler.h
index 158a8ba..1d98aeb 100644
--- a/runtime/vm/precompiler.h
+++ b/runtime/vm/precompiler.h
@@ -6,6 +6,8 @@
 #define VM_PRECOMPILER_H_
 
 #include "vm/allocation.h"
+#include "vm/hash_map.h"
+#include "vm/object.h"
 
 namespace dart {
 
@@ -18,6 +20,62 @@
 class RawError;
 class String;
 
+class SymbolPair {
+ public:
+  // Typedefs needed for the DirectChainedHashMap template.
+  typedef const String* Key;
+  typedef bool Value;
+  typedef SymbolPair Pair;
+
+  SymbolPair() : key_(NULL), value_(false) {}
+  SymbolPair(Key key, Value value) : key_(key), value_(value) {
+    ASSERT(key->IsNotTemporaryScopedHandle());
+  }
+
+  static Key KeyOf(Pair kv) { return kv.key_; }
+
+  static Value ValueOf(Pair kv) { return kv.value_; }
+
+  static inline intptr_t Hashcode(Key key) {
+    return key->Hash();
+  }
+
+  static inline bool IsKeyEqual(Pair pair, Key key) {
+    return pair.key_->raw() == key->raw();
+  }
+
+ private:
+  Key key_;
+  Value value_;
+};
+
+
+class SymbolSet : public ValueObject {
+ public:
+  explicit SymbolSet(Zone* zone) : zone_(zone), map_() {}
+
+  void Add(const String& symbol) {
+    ASSERT(symbol.IsSymbol());
+    if (symbol.IsNotTemporaryScopedHandle()) {
+      SymbolPair pair(&symbol, true);
+      map_.Insert(pair);
+    } else {
+      SymbolPair pair(&String::ZoneHandle(zone_, symbol.raw()), true);
+      map_.Insert(pair);
+    }
+  }
+
+  bool Includes(const String& symbol) {
+    ASSERT(symbol.IsSymbol());
+    return map_.Lookup(&symbol);
+  }
+
+ private:
+  Zone* zone_;
+  DirectChainedHashMap<SymbolPair> map_;
+};
+
+
 class Precompiler : public ValueObject {
  public:
   static RawError* CompileAll();
@@ -41,6 +99,8 @@
   void ProcessFunction(const Function& function);
   void CheckForNewDynamicFunctions();
 
+  void DropUncompiledFunctions();
+
   Thread* thread() const { return thread_; }
   Zone* zone() const { return zone_; }
   Isolate* isolate() const { return isolate_; }
@@ -52,11 +112,13 @@
   bool changed_;
   intptr_t function_count_;
   intptr_t class_count_;
+  intptr_t selector_count_;
+  intptr_t dropped_function_count_;
 
   const GrowableObjectArray& libraries_;
   const GrowableObjectArray& pending_functions_;
   const GrowableObjectArray& collected_closures_;
-  const GrowableObjectArray& sent_selectors_;
+  SymbolSet sent_selectors_;
   Error& error_;
 };
 
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 0ace0cc..c470b6a 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -25,6 +25,8 @@
 namespace dart {
 
 
+static const intptr_t kSampleSize = 8;
+
 DECLARE_FLAG(bool, trace_profiler);
 
 DEFINE_FLAG(bool, profile, true, "Enable Sampling Profiler");
@@ -38,7 +40,7 @@
   DEFINE_FLAG(int, profile_period, 1000,
               "Time between profiler samples in microseconds. Minimum 50.");
 #endif
-DEFINE_FLAG(int, profile_depth, 8,
+DEFINE_FLAG(int, max_profile_depth, kSampleSize,
             "Maximum number stack frames walked. Minimum 1. Maximum 255.");
 #if defined(USING_SIMULATOR)
 DEFINE_FLAG(bool, profile_vm, true,
@@ -51,18 +53,11 @@
 bool Profiler::initialized_ = false;
 SampleBuffer* Profiler::sample_buffer_ = NULL;
 
-static intptr_t NumberOfFramesToCollect() {
-  if (FLAG_profile_depth <= 0) {
-    return 0;
-  }
-  // Subtract to reserve space for the possible missing frame.
-  return FLAG_profile_depth - 1;
-}
 
 void Profiler::InitOnce() {
   // Place some sane restrictions on user controlled flags.
   SetSamplePeriod(FLAG_profile_period);
-  SetSampleDepth(FLAG_profile_depth);
+  SetSampleDepth(FLAG_max_profile_depth);
   Sample::InitOnce();
   if (!FLAG_profile) {
     return;
@@ -90,11 +85,11 @@
   const int kMinimumDepth = 2;
   const int kMaximumDepth = 255;
   if (depth < kMinimumDepth) {
-    FLAG_profile_depth = kMinimumDepth;
+    FLAG_max_profile_depth = kMinimumDepth;
   } else if (depth > kMaximumDepth) {
-    FLAG_profile_depth = kMaximumDepth;
+    FLAG_max_profile_depth = kMaximumDepth;
   } else {
-    FLAG_profile_depth = depth;
+    FLAG_max_profile_depth = depth;
   }
 }
 
@@ -228,8 +223,7 @@
 
 
 void Sample::InitOnce() {
-  ASSERT(FLAG_profile_depth >= 2);
-  pcs_length_ = FLAG_profile_depth;
+  pcs_length_ = kSampleSize;
   instance_size_ =
       sizeof(Sample) + (sizeof(uword) * pcs_length_);  // NOLINT.
 }
@@ -265,14 +259,31 @@
 }
 
 
-Sample* SampleBuffer::ReserveSample() {
+intptr_t SampleBuffer::ReserveSampleSlot() {
   ASSERT(samples_ != NULL);
   uintptr_t cursor = AtomicOperations::FetchAndIncrement(&cursor_);
   // Map back into sample buffer range.
   cursor = cursor % capacity_;
-  return At(cursor);
+  return cursor;
 }
 
+Sample* SampleBuffer::ReserveSample() {
+  return At(ReserveSampleSlot());
+}
+
+
+Sample* SampleBuffer::ReserveSampleAndLink(Sample* previous) {
+  ASSERT(previous != NULL);
+  intptr_t next_index = ReserveSampleSlot();
+  Sample* next = At(next_index);
+  next->Init(previous->isolate(), previous->timestamp(), previous->tid());
+  next->set_head_sample(false);
+  // Mark that previous continues at next.
+  previous->SetContinuationIndex(next_index);
+  return next;
+}
+
+
 // Attempts to find the true return address when a Dart frame is being setup
 // or torn down.
 // NOTE: Architecture specific implementations below.
@@ -407,50 +418,96 @@
 }
 
 
-// Given an exit frame, walk the Dart stack.
-class ProfilerDartExitStackWalker : public ValueObject {
+class ProfilerStackWalker : public ValueObject {
  public:
-  ProfilerDartExitStackWalker(Isolate* isolate, Sample* sample)
-      : sample_(sample),
-        frame_iterator_(isolate) {
+  ProfilerStackWalker(Isolate* isolate,
+                      Sample* head_sample,
+                      SampleBuffer* sample_buffer)
+    : isolate_(isolate),
+      sample_(head_sample),
+      sample_buffer_(sample_buffer),
+      frame_index_(0),
+      total_frames_(0) {
+    ASSERT(isolate_ != NULL);
     ASSERT(sample_ != NULL);
+    ASSERT(sample_buffer_ != NULL);
+    ASSERT(sample_->head_sample());
+  }
+
+  bool Append(uword pc) {
+    if (total_frames_ >= FLAG_max_profile_depth) {
+      sample_->set_truncated_trace(true);
+      return false;
+    }
+    ASSERT(sample_ != NULL);
+    if (frame_index_ == kSampleSize) {
+      Sample* new_sample = sample_buffer_->ReserveSampleAndLink(sample_);
+      if (new_sample == NULL) {
+        // Could not reserve new sample- mark this as truncated.
+        sample_->set_truncated_trace(true);
+        return false;
+      }
+      frame_index_ = 0;
+      sample_ = new_sample;
+    }
+    ASSERT(frame_index_ < kSampleSize);
+    sample_->SetAt(frame_index_, pc);
+    frame_index_++;
+    total_frames_++;
+    return true;
+  }
+
+ protected:
+  Isolate* isolate_;
+  Sample* sample_;
+  SampleBuffer* sample_buffer_;
+  intptr_t frame_index_;
+  intptr_t total_frames_;
+};
+
+
+// Given an exit frame, walk the Dart stack.
+class ProfilerDartExitStackWalker : public ProfilerStackWalker {
+ public:
+  ProfilerDartExitStackWalker(Isolate* isolate,
+                              Sample* sample,
+                              SampleBuffer* sample_buffer)
+      : ProfilerStackWalker(isolate, sample, sample_buffer),
+        frame_iterator_(isolate) {
   }
 
   void walk() {
     // Mark that this sample was collected from an exit frame.
     sample_->set_exit_frame_sample(true);
-    intptr_t frame_index = 0;
+
     StackFrame* frame = frame_iterator_.NextFrame();
     while (frame != NULL) {
-      sample_->SetAt(frame_index, frame->pc());
-      frame_index++;
-      if (frame_index >= NumberOfFramesToCollect()) {
-        sample_->set_truncated_trace(true);
-        break;
+      if (!Append(frame->pc())) {
+        return;
       }
       frame = frame_iterator_.NextFrame();
     }
   }
 
  private:
-  Sample* sample_;
   DartFrameIterator frame_iterator_;
 };
 
 
 // Executing Dart code, walk the stack.
-class ProfilerDartStackWalker : public ValueObject {
+class ProfilerDartStackWalker : public ProfilerStackWalker {
  public:
-  ProfilerDartStackWalker(Sample* sample,
+  ProfilerDartStackWalker(Isolate* isolate,
+                          Sample* sample,
+                          SampleBuffer* sample_buffer,
                           uword stack_lower,
                           uword stack_upper,
                           uword pc,
                           uword fp,
                           uword sp)
-      : sample_(sample),
+      : ProfilerStackWalker(isolate, sample, sample_buffer),
         stack_upper_(stack_upper),
         stack_lower_(stack_lower) {
-    ASSERT(sample_ != NULL);
     pc_ = reinterpret_cast<uword*>(pc);
     fp_ = reinterpret_cast<uword*>(fp);
     sp_ = reinterpret_cast<uword*>(sp);
@@ -474,13 +531,14 @@
         return;
       }
     }
-    for (int i = 0; i < NumberOfFramesToCollect(); i++) {
-      sample_->SetAt(i, reinterpret_cast<uword>(pc_));
+    while (true) {
+      if (!Append(reinterpret_cast<uword>(pc_))) {
+        return;
+      }
       if (!Next()) {
         return;
       }
     }
-    sample_->set_truncated_trace(true);
   }
 
  private:
@@ -583,7 +641,6 @@
   uword* pc_;
   uword* fp_;
   uword* sp_;
-  Sample* sample_;
   const uword stack_upper_;
   uword stack_lower_;
 };
@@ -593,27 +650,28 @@
 // recent GCC versions with optimizing enabled) the stack walking code may
 // fail.
 //
-class ProfilerNativeStackWalker : public ValueObject {
+class ProfilerNativeStackWalker : public ProfilerStackWalker {
  public:
-  ProfilerNativeStackWalker(Sample* sample,
+  ProfilerNativeStackWalker(Isolate* isolate,
+                            Sample* sample,
+                            SampleBuffer* sample_buffer,
                             uword stack_lower,
                             uword stack_upper,
                             uword pc,
                             uword fp,
                             uword sp)
-      : sample_(sample),
+      : ProfilerStackWalker(isolate, sample, sample_buffer),
         stack_upper_(stack_upper),
         original_pc_(pc),
         original_fp_(fp),
         original_sp_(sp),
         lower_bound_(stack_lower) {
-    ASSERT(sample_ != NULL);
   }
 
   void walk() {
     const uword kMaxStep = VirtualMemory::PageSize();
 
-    sample_->SetAt(0, original_pc_);
+    Append(original_pc_);
 
     uword* pc = reinterpret_cast<uword*>(original_pc_);
     uword* fp = reinterpret_cast<uword*>(original_fp_);
@@ -630,8 +688,10 @@
       return;
     }
 
-    for (int i = 0; i < NumberOfFramesToCollect(); i++) {
-      sample_->SetAt(i, reinterpret_cast<uword>(pc));
+    while (true) {
+      if (!Append(reinterpret_cast<uword>(pc))) {
+        return;
+      }
 
       pc = CallerPC(fp);
       previous_fp = fp;
@@ -660,8 +720,6 @@
       // Move the lower bound up.
       lower_bound_ = reinterpret_cast<uword>(fp);
     }
-
-    sample_->set_truncated_trace(true);
   }
 
  private:
@@ -693,7 +751,6 @@
     return r;
   }
 
-  Sample* sample_;
   const uword stack_upper_;
   const uword original_pc_;
   const uword original_fp_;
@@ -817,40 +874,113 @@
 }
 
 
-void Profiler::RecordAllocation(Isolate* isolate, intptr_t cid) {
-  if ((isolate == NULL) || (Dart::vm_isolate() == NULL)) {
-    // No isolate.
-    return;
+// Is |isolate| executing Dart code?
+static bool ExecutingDart(Isolate* isolate) {
+  ASSERT(isolate != NULL);
+  return (isolate->top_exit_frame_info() == 0) &&
+         (isolate->vm_tag() == VMTag::kDartTagId);
+}
+
+
+// Has |isolate| exited Dart code?
+static bool ExitedDart(Isolate* isolate) {
+  return (isolate->top_exit_frame_info() != 0) &&
+         (isolate->vm_tag() != VMTag::kDartTagId);
+}
+
+
+// Get |isolate|'s stack boundary and verify that |sp| and |fp| are within
+// it. Return |false| if anything looks suspicious.
+static bool GetAndValidateIsolateStackBounds(Isolate* isolate,
+                                             uintptr_t sp,
+                                             uintptr_t fp,
+                                             uword* stack_lower,
+                                             uword* stack_upper) {
+  ASSERT(isolate != NULL);
+  ASSERT(stack_lower != NULL);
+  ASSERT(stack_upper != NULL);
+#if defined(USING_SIMULATOR)
+  const bool in_dart_code = ExecutingDart(isolate);
+  if (in_dart_code) {
+    Simulator* simulator = isolate->simulator();
+    *stack_lower = simulator->StackBase();
+    *stack_upper = simulator->StackTop();
+  } else if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper)) {
+    // Could not get stack boundary.
+    return false;
   }
-  ASSERT(isolate != Dart::vm_isolate());
-
-  const bool exited_dart_code = (isolate->top_exit_frame_info() != 0) &&
-                                (isolate->vm_tag() != VMTag::kDartTagId);
-
-  if (!exited_dart_code) {
-    // No Dart frames on stack.
-    // TODO(johnmccutchan): Support collecting native stack.
-    return;
+  if ((*stack_lower == 0) || (*stack_upper == 0)) {
+    return false;
+  }
+#else
+  if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper) ||
+      (*stack_lower == 0) || (*stack_upper == 0)) {
+    // Could not get stack boundary.
+    return false;
+  }
+#endif
+  if (sp > *stack_lower) {
+    // The stack pointer gives us a tighter lower bound.
+    *stack_lower = sp;
   }
 
+  if (*stack_lower >= *stack_upper) {
+    // Stack boundary is invalid.
+    return false;
+  }
+
+  if ((sp < *stack_lower) || (sp >= *stack_upper)) {
+    // Stack pointer is outside isolate stack boundary.
+    return false;
+  }
+
+  if ((fp < *stack_lower) || (fp >= *stack_upper)) {
+    // Frame pointer is outside isolate stack boundary.
+    return false;
+  }
+
+  return true;
+}
+
+
+// Some simple sanity checking of |pc|, |sp|, and |fp|.
+static bool InitialRegisterCheck(uintptr_t pc, uintptr_t sp, uintptr_t fp) {
+  if ((sp == 0) || (fp == 0) || (pc == 0)) {
+    // None of these registers should be zero.
+    return false;
+  }
+
+  if (sp > fp) {
+    // Assuming the stack grows down, we should never have a stack pointer above
+    // the frame pointer.
+    return false;
+  }
+
+  return true;
+}
+
+
+// Return |isolate|'s sample buffer.
+static SampleBuffer* GetSampleBuffer(Isolate* isolate) {
   IsolateProfilerData* profiler_data = isolate->profiler_data();
   if (profiler_data == NULL) {
     // Profiler not initialized.
-    return;
+    return NULL;
   }
-
   SampleBuffer* sample_buffer = profiler_data->sample_buffer();
-  if (sample_buffer == NULL) {
-    // Profiler not initialized.
-    return;
-  }
+  return sample_buffer;
+}
 
-  const ThreadId thread_id = OSThread::GetCurrentThreadId();
-  // Setup sample.
+
+static Sample* SetupSample(Isolate* isolate,
+                           SampleBuffer* sample_buffer,
+                           ThreadId tid) {
+  ASSERT(isolate != NULL);
+  ASSERT(sample_buffer != NULL);
   Sample* sample = sample_buffer->ReserveSample();
-  sample->Init(isolate, OS::GetCurrentTimeMicros(), thread_id);
+  sample->Init(isolate, OS::GetCurrentTimeMicros(), tid);
   uword vm_tag = isolate->vm_tag();
-  #if defined(USING_SIMULATOR)
+#if defined(USING_SIMULATOR)
   // When running in the simulator, the runtime entry function address
   // (stored as the vm tag) is the address of a redirect function.
   // Attempt to find the real runtime entry function address and use that.
@@ -858,13 +988,103 @@
   if (redirect_vm_tag != 0) {
     vm_tag = redirect_vm_tag;
   }
-  #endif
+#endif
   sample->set_vm_tag(vm_tag);
   sample->set_user_tag(isolate->user_tag());
-  sample->SetAllocationCid(cid);
+  return sample;
+}
 
-  ProfilerDartExitStackWalker dart_exit_stack_walker(isolate, sample);
-  dart_exit_stack_walker.walk();
+
+static bool CheckIsolate(Isolate* isolate) {
+  if ((isolate == NULL) || (Dart::vm_isolate() == NULL)) {
+    // No isolate.
+    return false;
+  }
+  ASSERT(isolate != Dart::vm_isolate());
+  return true;
+}
+
+
+#if defined(TARGET_OS_WINDOWS)
+__declspec(noinline)
+static uintptr_t GetProgramCounter() {
+  return reinterpret_cast<uintptr_t>(_ReturnAddress());
+}
+#else
+static uintptr_t __attribute__((noinline)) GetProgramCounter() {
+  return reinterpret_cast<uintptr_t>(
+      __builtin_extract_return_addr(__builtin_return_address(0)));
+}
+#endif
+
+void Profiler::RecordAllocation(Isolate* isolate, intptr_t cid) {
+  if (!CheckIsolate(isolate)) {
+    return;
+  }
+
+  const bool exited_dart_code = ExitedDart(isolate);
+
+  SampleBuffer* sample_buffer = GetSampleBuffer(isolate);
+  if (sample_buffer == NULL) {
+    // Profiler not initialized.
+    return;
+  }
+
+  if (FLAG_profile_vm) {
+    uintptr_t sp = Isolate::GetCurrentStackPointer();
+    uintptr_t fp = 0;
+    uintptr_t pc = GetProgramCounter();
+
+    COPY_FP_REGISTER(fp);
+
+    uword stack_lower = 0;
+    uword stack_upper = 0;
+
+    if (!InitialRegisterCheck(pc, sp, fp)) {
+      return;
+    }
+
+    if (!GetAndValidateIsolateStackBounds(isolate,
+                                          sp,
+                                          fp,
+                                          &stack_lower,
+                                          &stack_upper)) {
+      // Could not get stack boundary.
+      return;
+    }
+
+    Sample* sample = SetupSample(isolate,
+                                 sample_buffer,
+                                 OSThread::GetCurrentThreadId());
+    sample->SetAllocationCid(cid);
+    ProfilerNativeStackWalker native_stack_walker(isolate,
+                                                  sample,
+                                                  sample_buffer,
+                                                  stack_lower,
+                                                  stack_upper,
+                                                  pc,
+                                                  fp,
+                                                  sp);
+    native_stack_walker.walk();
+  } else if (exited_dart_code) {
+    Sample* sample = SetupSample(isolate,
+                                 sample_buffer,
+                                 OSThread::GetCurrentThreadId());
+    sample->SetAllocationCid(cid);
+    ProfilerDartExitStackWalker dart_exit_stack_walker(isolate,
+                                                       sample,
+                                                       sample_buffer);
+    dart_exit_stack_walker.walk();
+  } else {
+    // Fall back.
+    uintptr_t pc = GetProgramCounter();
+    Sample* sample = SetupSample(isolate,
+                                 sample_buffer,
+                                 OSThread::GetCurrentThreadId());
+    sample->SetAllocationCid(cid);
+    sample->set_vm_tag(VMTag::kEmbedderTagId);
+    sample->SetAt(0, pc);
+  }
 }
 
 
@@ -876,18 +1096,20 @@
     // No isolate.
     return;
   }
-
   ASSERT(isolate != Dart::vm_isolate());
 
-  const bool exited_dart_code = (isolate->top_exit_frame_info() != 0) &&
-                                (isolate->vm_tag() != VMTag::kDartTagId);
-  const bool in_dart_code = (isolate->top_exit_frame_info() == 0) &&
-                            (isolate->vm_tag() == VMTag::kDartTagId);
+  SampleBuffer* sample_buffer = GetSampleBuffer(isolate);
+  if (sample_buffer == NULL) {
+    // Profiler not initialized.
+    return;
+  }
+
+  const bool exited_dart_code = ExitedDart(isolate);
+  const bool in_dart_code = ExecutingDart(isolate);
 
   uintptr_t sp = 0;
   uintptr_t fp = state.fp;
   uintptr_t pc = state.pc;
-  uintptr_t lr = state.lr;
 #if defined(USING_SIMULATOR)
   Simulator* simulator = NULL;
 #endif
@@ -899,7 +1121,6 @@
     sp = simulator->get_register(SPREG);
     fp = simulator->get_register(FPREG);
     pc = simulator->get_pc();
-    lr = simulator->get_register(LRREG);
 #else
     sp = state.dsp;
 #endif
@@ -908,26 +1129,7 @@
     sp = state.csp;
   }
 
-  IsolateProfilerData* profiler_data = isolate->profiler_data();
-  if (profiler_data == NULL) {
-    // Profiler not initialized.
-    return;
-  }
-
-  SampleBuffer* sample_buffer = profiler_data->sample_buffer();
-  if (sample_buffer == NULL) {
-    // Profiler not initialized.
-    return;
-  }
-
-  if ((sp == 0) || (fp == 0) || (pc == 0)) {
-    // None of these registers should be zero.
-    return;
-  }
-
-  if (sp > fp) {
-    // Assuming the stack grows down, we should never have a stack pointer above
-    // the frame pointer.
+  if (!InitialRegisterCheck(pc, sp, fp)) {
     return;
   }
 
@@ -940,79 +1142,43 @@
 
   uword stack_lower = 0;
   uword stack_upper = 0;
-#if defined(USING_SIMULATOR)
-  if (in_dart_code) {
-    stack_lower = simulator->StackBase();
-    stack_upper = simulator->StackTop();
-  } else if (!isolate->GetProfilerStackBounds(&stack_lower, &stack_upper)) {
+  if (!GetAndValidateIsolateStackBounds(isolate,
+                                        sp,
+                                        fp,
+                                        &stack_lower,
+                                        &stack_upper)) {
     // Could not get stack boundary.
     return;
   }
-  if ((stack_lower == 0) || (stack_upper == 0)) {
-    return;
-  }
-#else
-  if (!isolate->GetProfilerStackBounds(&stack_lower, &stack_upper) ||
-      (stack_lower == 0) || (stack_upper == 0)) {
-    // Could not get stack boundary.
-    return;
-  }
-#endif
-
-  if (sp > stack_lower) {
-    // The stack pointer gives us a tighter lower bound.
-    stack_lower = sp;
-  }
-
-  if (stack_lower >= stack_upper) {
-    // Stack boundary is invalid.
-    return;
-  }
-
-  if ((sp < stack_lower) || (sp >= stack_upper)) {
-    // Stack pointer is outside isolate stack boundary.
-    return;
-  }
-
-  if ((fp < stack_lower) || (fp >= stack_upper)) {
-    // Frame pointer is outside isolate stack boundary.
-    return;
-  }
 
   // At this point we have a valid stack boundary for this isolate and
   // know that our initial stack and frame pointers are within the boundary.
 
   // Setup sample.
-  Sample* sample = sample_buffer->ReserveSample();
-  sample->Init(isolate, OS::GetCurrentTimeMicros(), state.tid);
-  uword vm_tag = isolate->vm_tag();
-#if defined(USING_SIMULATOR)
-  // When running in the simulator, the runtime entry function address
-  // (stored as the vm tag) is the address of a redirect function.
-  // Attempt to find the real runtime entry function address and use that.
-  uword redirect_vm_tag = Simulator::FunctionForRedirect(vm_tag);
-  if (redirect_vm_tag != 0) {
-    vm_tag = redirect_vm_tag;
-  }
-#endif
+  Sample* sample = SetupSample(isolate,
+                               sample_buffer,
+                               OSThread::GetCurrentThreadId());
   // Increment counter for vm tag.
   VMTagCounters* counters = isolate->vm_tag_counters();
   ASSERT(counters != NULL);
-  counters->Increment(vm_tag);
-  sample->set_vm_tag(vm_tag);
-  sample->set_user_tag(isolate->user_tag());
-  sample->set_lr(lr);
+  counters->Increment(sample->vm_tag());
 
-  ProfilerNativeStackWalker native_stack_walker(sample,
+  ProfilerNativeStackWalker native_stack_walker(isolate,
+                                                sample,
+                                                sample_buffer,
                                                 stack_lower,
                                                 stack_upper,
                                                 pc,
                                                 fp,
                                                 sp);
 
-  ProfilerDartExitStackWalker dart_exit_stack_walker(isolate, sample);
+  ProfilerDartExitStackWalker dart_exit_stack_walker(isolate,
+                                                     sample,
+                                                     sample_buffer);
 
-  ProfilerDartStackWalker dart_stack_walker(sample,
+  ProfilerDartStackWalker dart_stack_walker(isolate,
+                                            sample,
+                                            sample_buffer,
                                             stack_lower,
                                             stack_upper,
                                             pc,
@@ -1048,6 +1214,10 @@
       // Bad sample.
       continue;
     }
+    if (!sample->head_sample()) {
+        // An inner sample in a chain of samples.
+        continue;
+      }
     if (sample->isolate() != filter->isolate()) {
       // Another isolate.
       continue;
@@ -1089,7 +1259,7 @@
   bool truncated = false;
   Sample* current = sample;
   while (current != NULL) {
-    for (intptr_t i = 0; i < FLAG_profile_depth; i++) {
+    for (intptr_t i = 0; i < kSampleSize; i++) {
       if (current->At(i) == 0) {
         break;
       }
@@ -1097,7 +1267,7 @@
     }
 
     truncated = truncated || current->truncated_trace();
-    current = Next(sample);
+    current = Next(current);
   }
 
   if (!sample->exit_frame_sample()) {
@@ -1115,13 +1285,27 @@
 
 
 Sample* SampleBuffer::Next(Sample* sample) {
-  // TODO(johnmccutchan): Support chaining samples for complete stack traces.
-  return NULL;
+  if (!sample->is_continuation_sample())
+    return NULL;
+  Sample* next_sample = At(sample->continuation_index());
+  // Sanity check.
+  ASSERT(sample != next_sample);
+  // Detect invalid chaining.
+  if (sample->isolate() != next_sample->isolate()) {
+    return NULL;
+  }
+  if (sample->timestamp() != next_sample->timestamp()) {
+    return NULL;
+  }
+  if (sample->tid() != next_sample->tid()) {
+    return NULL;
+  }
+  return next_sample;
 }
 
 
 ProcessedSample::ProcessedSample()
-    : pcs_(FLAG_profile_depth),
+    : pcs_(kSampleSize),
       timestamp_(0),
       vm_tag_(0),
       user_tag_(0),
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index d7406a2..fc5ecae 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -155,6 +155,11 @@
     return isolate_;
   }
 
+  // Thread sample was taken on.
+  ThreadId tid() const {
+    return tid_;
+  }
+
   void Clear() {
     isolate_ = NULL;
     pc_marker_ = 0;
@@ -166,10 +171,12 @@
     lr_ = 0;
     metadata_ = 0;
     state_ = 0;
+    continuation_index_ = -1;
     uword* pcs = GetPCArray();
     for (intptr_t i = 0; i < pcs_length_; i++) {
       pcs[i] = 0;
     }
+    set_head_sample(true);
   }
 
   // Timestamp sample was taken at.
@@ -229,30 +236,6 @@
     lr_ = link_register;
   }
 
-  void InsertCallerForTopFrame(uword pc) {
-    if (pcs_length_ == 1) {
-      // Only sampling top frame.
-      return;
-    }
-    uword* pcs = GetPCArray();
-    // The caller for the top frame is store at index 1.
-    // Shift all entries down by one.
-    for (intptr_t i = pcs_length_ - 1; i >= 2; i--) {
-      pcs[i] = pcs[i - 1];
-    }
-    // Insert caller for top frame.
-    pcs[1] = pc;
-    set_missing_frame_inserted(true);
-  }
-
-  bool processed() const {
-    return ProcessedBit::decode(state_);
-  }
-
-  void set_processed(bool processed) {
-    state_ = ProcessedBit::update(processed, state_);
-  }
-
   bool leaf_frame_is_dart() const {
     return LeafFrameIsDart::decode(state_);
   }
@@ -301,11 +284,36 @@
     state_ = ClassAllocationSampleBit::update(allocation_sample, state_);
   }
 
+  bool is_continuation_sample() const {
+    return ContinuationSampleBit::decode(state_);
+  }
+
+  void SetContinuationIndex(intptr_t index) {
+    ASSERT(!is_continuation_sample());
+    ASSERT(continuation_index_ == -1);
+    state_ = ContinuationSampleBit::update(true, state_);
+    continuation_index_ = index;
+    ASSERT(is_continuation_sample());
+  }
+
+  intptr_t continuation_index() const {
+    ASSERT(is_continuation_sample());
+    return continuation_index_;
+  }
+
   intptr_t allocation_cid() const {
     ASSERT(is_allocation_sample());
     return metadata_;
   }
 
+  void set_head_sample(bool head_sample) {
+    state_ = HeadSampleBit::update(head_sample, state_);
+  }
+
+  bool head_sample() const {
+    return HeadSampleBit::decode(state_);
+  }
+
   void set_metadata(intptr_t metadata) {
     metadata_ = metadata;
   }
@@ -332,23 +340,26 @@
   static intptr_t instance_size_;
   static intptr_t pcs_length_;
   enum StateBits {
-    kProcessedBit = 0,
+    kHeadSampleBit = 0,
     kLeafFrameIsDartBit = 1,
     kIgnoreBit = 2,
     kExitFrameBit = 3,
     kMissingFrameInsertedBit = 4,
-    kTruncatedTrace = 5,
-    kClassAllocationSample = 6,
+    kTruncatedTraceBit = 5,
+    kClassAllocationSampleBit = 6,
+    kContinuationSampleBit = 7,
   };
-  class ProcessedBit : public BitField<bool, kProcessedBit, 1> {};
+  class HeadSampleBit : public BitField<bool, kHeadSampleBit, 1> {};
   class LeafFrameIsDart : public BitField<bool, kLeafFrameIsDartBit, 1> {};
   class IgnoreBit : public BitField<bool, kIgnoreBit, 1> {};
   class ExitFrameBit : public BitField<bool, kExitFrameBit, 1> {};
   class MissingFrameInsertedBit
-    : public BitField<bool, kMissingFrameInsertedBit, 1> {};
-  class TruncatedTraceBit : public BitField<bool, kTruncatedTrace, 1> {};
+      : public BitField<bool, kMissingFrameInsertedBit, 1> {};
+  class TruncatedTraceBit : public BitField<bool, kTruncatedTraceBit, 1> {};
   class ClassAllocationSampleBit
-      : public BitField<bool, kClassAllocationSample, 1> {};
+      : public BitField<bool, kClassAllocationSampleBit, 1> {};
+  class ContinuationSampleBit
+      : public BitField<bool, kContinuationSampleBit, 1> {};
 
   int64_t timestamp_;
   ThreadId tid_;
@@ -360,6 +371,7 @@
   uword metadata_;
   uword lr_;
   uword state_;
+  intptr_t continuation_index_;
 
   /* There are a variable number of words that follow, the words hold the
    * sampled pc values. Access via GetPCArray() */
@@ -387,13 +399,19 @@
   intptr_t capacity() const { return capacity_; }
 
   Sample* At(intptr_t idx) const;
+  intptr_t ReserveSampleSlot();
   Sample* ReserveSample();
+  Sample* ReserveSampleAndLink(Sample* previous);
 
   void VisitSamples(SampleVisitor* visitor) {
     ASSERT(visitor != NULL);
     const intptr_t length = capacity();
     for (intptr_t i = 0; i < length; i++) {
       Sample* sample = At(i);
+      if (!sample->head_sample()) {
+        // An inner sample in a chain of samples.
+        continue;
+      }
       if (sample->ignore_sample()) {
         // Bad sample.
         continue;
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index e773e95..1c2c118 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -14,7 +14,7 @@
 
 namespace dart {
 
-DECLARE_FLAG(int, profile_depth);
+DECLARE_FLAG(int, max_profile_depth);
 DECLARE_FLAG(int, profile_period);
 
 DEFINE_FLAG(bool, trace_profiler, false, "Trace profiler.");
@@ -58,7 +58,7 @@
       return false;
     }
     NoSafepointScope no_safepoint_scope;
-    for (intptr_t i = 0; array.Length(); i++) {
+    for (intptr_t i = 0; i < array.Length(); i++) {
       if (code.raw() == array.At(i)) {
         return true;
       }
@@ -2043,7 +2043,7 @@
   obj.AddProperty("samplePeriod",
                   static_cast<intptr_t>(FLAG_profile_period));
   obj.AddProperty("stackDepth",
-                  static_cast<intptr_t>(FLAG_profile_depth));
+                  static_cast<intptr_t>(FLAG_max_profile_depth));
   obj.AddProperty("sampleCount", sample_count());
   obj.AddProperty("timeSpan", MicrosecondsToSeconds(GetTimeSpan()));
   {
diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc
index 965d6b3..ac7309b 100644
--- a/runtime/vm/profiler_test.cc
+++ b/runtime/vm/profiler_test.cc
@@ -13,6 +13,43 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, profile_vm);
+DECLARE_FLAG(int, max_profile_depth);
+
+// Some tests are written assuming native stack trace profiling is disabled.
+class DisableNativeProfileScope : public ValueObject {
+ public:
+  DisableNativeProfileScope()
+      : FLAG_profile_vm_(FLAG_profile_vm) {
+    FLAG_profile_vm = false;
+  }
+
+  ~DisableNativeProfileScope() {
+    FLAG_profile_vm = FLAG_profile_vm_;
+  }
+
+ private:
+  const bool FLAG_profile_vm_;
+};
+
+
+// Temporarily adjust the maximum profile depth.
+class MaxProfileDepthScope : public ValueObject {
+ public:
+  explicit MaxProfileDepthScope(intptr_t new_max_depth)
+      : FLAG_max_profile_depth_(FLAG_max_profile_depth) {
+    Profiler::SetSampleDepth(new_max_depth);
+  }
+
+  ~MaxProfileDepthScope() {
+    Profiler::SetSampleDepth(FLAG_max_profile_depth_);
+  }
+
+ private:
+  const intptr_t FLAG_max_profile_depth_;
+};
+
+
 class ProfileSampleBufferTestHelper {
  public:
   static intptr_t IterateCount(const Isolate* isolate,
@@ -113,19 +150,32 @@
  public:
   explicit AllocationFilter(Isolate* isolate, intptr_t cid)
       : SampleFilter(isolate),
-        cid_(cid) {
+        cid_(cid),
+        enable_embedder_ticks_(false) {
   }
 
   bool FilterSample(Sample* sample) {
-    return sample->is_allocation_sample() && (sample->allocation_cid() == cid_);
+    if (!enable_embedder_ticks_ &&
+        (sample->vm_tag() == VMTag::kEmbedderTagId)) {
+      // We don't want to see embedder ticks in the test.
+      return false;
+    }
+    return sample->is_allocation_sample() &&
+           (sample->allocation_cid() == cid_);
+  }
+
+  void set_enable_embedder_ticks(bool enable) {
+    enable_embedder_ticks_ = enable;
   }
 
  private:
   intptr_t cid_;
+  bool enable_embedder_ticks_;
 };
 
 
 TEST_CASE(Profiler_TrivialRecordAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
       "  var a;\n"
@@ -154,9 +204,10 @@
 
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -204,6 +255,7 @@
 
 
 TEST_CASE(Profiler_ToggleRecordAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
       "  var a;\n"
@@ -231,9 +283,10 @@
 
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -248,9 +301,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -302,9 +356,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -315,6 +370,7 @@
 
 
 TEST_CASE(Profiler_CodeTicks) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
       "  var a;\n"
@@ -341,9 +397,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -363,9 +420,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -407,6 +465,7 @@
 
 
 TEST_CASE(Profiler_FunctionTicks) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
       "  var a;\n"
@@ -433,9 +492,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -455,9 +515,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -499,6 +560,7 @@
 
 
 TEST_CASE(Profiler_IntrinsicAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript = "double foo(double a, double b) => a + b;";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
   EXPECT_VALID(lib);
@@ -566,6 +628,7 @@
 
 
 TEST_CASE(Profiler_ArrayAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "List foo() => new List(4);\n"
       "List bar() => new List();\n";
@@ -668,7 +731,148 @@
 }
 
 
+TEST_CASE(Profiler_ContextAllocation) {
+  DisableNativeProfileScope dnps;
+  const char* kScript =
+      "var msg1 = 'a';\n"
+      "foo() {\n"
+      "  var msg = msg1 + msg1;\n"
+      "  return (x) { return '$msg + $msg'; }(msg);\n"
+      "}\n";
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+  Isolate* isolate = Isolate::Current();
+
+  const Class& context_class =
+      Class::Handle(Object::context_class());
+  EXPECT(!context_class.IsNull());
+
+  Dart_Handle result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    StackZone zone(isolate);
+    HANDLESCOPE(isolate);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, context_class.id());
+    profile.Build(&filter, Profile::kNoTags);
+    // We should have no allocation samples.
+    EXPECT_EQ(0, profile.sample_count());
+  }
+
+  context_class.SetTraceAllocation(true);
+  result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    StackZone zone(isolate);
+    HANDLESCOPE(isolate);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, context_class.id());
+    profile.Build(&filter, Profile::kNoTags);
+    // We should have one allocation sample.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    walker.Reset(Profile::kExclusiveCode);
+    EXPECT(walker.Down());
+    EXPECT_STREQ("foo", walker.CurrentName());
+    EXPECT(!walker.Down());
+  }
+
+  context_class.SetTraceAllocation(false);
+  result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    StackZone zone(isolate);
+    HANDLESCOPE(isolate);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, context_class.id());
+    profile.Build(&filter, Profile::kNoTags);
+    // We should still only have one allocation sample.
+    EXPECT_EQ(1, profile.sample_count());
+  }
+}
+
+
+TEST_CASE(Profiler_ClassAllocation) {
+  DisableNativeProfileScope dnps;
+  const char* kScript =
+      "var msg1 = 'a';\n"
+      "\n"
+      "foo() {\n"
+      "  var msg = msg1 + msg1;\n"
+      "  var msg2 = msg + msg;\n"
+      "  return (x, y, z, w) { return '$x + $y + $z'; }(msg, msg2, msg, msg);\n"
+      "}\n"
+      "bar() {\n"
+      "  var msg = msg1 + msg1;\n"
+      "  var msg2 = msg + msg;\n"
+      "  return (x, y) { return '$x + $y'; }(msg, msg2);\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+  Isolate* isolate = Isolate::Current();
+
+  const Class& class_class =
+      Class::Handle(Object::class_class());
+  EXPECT(!class_class.IsNull());
+  class_class.SetTraceAllocation(true);
+
+  // Invoke "foo" which during compilation, triggers a closure class allocation.
+  Dart_Handle result = Dart_Invoke(lib, NewString("foo"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    StackZone zone(isolate);
+    HANDLESCOPE(isolate);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_class.id());
+    filter.set_enable_embedder_ticks(true);
+    profile.Build(&filter, Profile::kNoTags);
+    // We should have one allocation sample.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    walker.Reset(Profile::kExclusiveCode);
+    EXPECT(walker.Down());
+#if defined(TARGET_OS_WINDOWS)
+    // TODO(johnmccutchan): Hookup native symbol resolver on Windows.
+    EXPECT_SUBSTRING("[Native]", walker.CurrentName());
+#else
+    EXPECT_SUBSTRING("dart::Profiler::RecordAllocation", walker.CurrentName());
+#endif
+    EXPECT(!walker.Down());
+  }
+
+  // Disable allocation tracing for Class.
+  class_class.SetTraceAllocation(false);
+
+  // Invoke "bar" which during compilation, triggers a closure class allocation.
+  result = Dart_Invoke(lib, NewString("bar"), 0, NULL);
+  EXPECT_VALID(result);
+
+  {
+    StackZone zone(isolate);
+    HANDLESCOPE(isolate);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_class.id());
+    filter.set_enable_embedder_ticks(true);
+    profile.Build(&filter, Profile::kNoTags);
+    // We should still only have one allocation sample.
+    EXPECT_EQ(1, profile.sample_count());
+  }
+}
+
+
 TEST_CASE(Profiler_TypedArrayAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "import 'dart:typed_data';\n"
       "List foo() => new Float32List(4);\n";
@@ -755,6 +959,7 @@
 
 
 TEST_CASE(Profiler_StringAllocation) {
+  DisableNativeProfileScope dnps;
   const char* kScript = "String foo(String a, String b) => a + b;";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
   EXPECT_VALID(lib);
@@ -834,6 +1039,7 @@
 
 
 TEST_CASE(Profiler_StringInterpolation) {
+  DisableNativeProfileScope dnps;
   const char* kScript = "String foo(String a, String b) => '$a | $b';";
   Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
   EXPECT_VALID(lib);
@@ -917,6 +1123,7 @@
 
 
 TEST_CASE(Profiler_FunctionInline) {
+  DisableNativeProfileScope dnps;
   const char* kScript =
       "class A {\n"
       "  var a;\n"
@@ -960,9 +1167,10 @@
   // At this point B.boo should be optimized and inlined B.foo and B.choo.
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -978,9 +1186,10 @@
   EXPECT_VALID(result);
 
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter, Profile::kNoTags);
@@ -1079,9 +1288,10 @@
 
   // Test code transition tags.
   {
-    Isolate* isolate = Isolate::Current();
-    StackZone zone(isolate);
-    HANDLESCOPE(isolate);
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
     Profile profile(isolate);
     AllocationFilter filter(isolate, class_a.id());
     profile.Build(&filter,
@@ -1157,5 +1367,115 @@
   }
 }
 
+
+TEST_CASE(Profiler_ChainedSamples) {
+  MaxProfileDepthScope mpds(32);
+  DisableNativeProfileScope dnps;
+
+  // Each sample holds 8 stack frames.
+  // This chain is 20 stack frames deep.
+  const char* kScript =
+      "class A {\n"
+      "  var a;\n"
+      "  var b;\n"
+      "}\n"
+      "class B {\n"
+      "  static boo() {\n"
+      "    return new A();\n"
+      "  }\n"
+      "}\n"
+      "go() => init();\n"
+      "init() => secondInit();\n"
+      "secondInit() => apple();\n"
+      "apple() => banana();\n"
+      "banana() => cantaloupe();\n"
+      "cantaloupe() => dog();\n"
+      "dog() => elephant();\n"
+      "elephant() => fred();\n"
+      "fred() => granola();\n"
+      "granola() => haystack();\n"
+      "haystack() => ice();\n"
+      "ice() => jeep();\n"
+      "jeep() => kindle();\n"
+      "kindle() => lemon();\n"
+      "lemon() => mayo();\n"
+      "mayo() => napkin();\n"
+      "napkin() => orange();\n"
+      "orange() => B.boo();\n"
+      "main() {\n"
+      "  return go();\n"
+      "}\n";
+
+  Dart_Handle lib = TestCase::LoadTestScript(kScript, NULL);
+  EXPECT_VALID(lib);
+  Library& root_library = Library::Handle();
+  root_library ^= Api::UnwrapHandle(lib);
+
+  const Class& class_a = Class::Handle(GetClass(root_library, "A"));
+  EXPECT(!class_a.IsNull());
+  class_a.SetTraceAllocation(true);
+
+  Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  EXPECT_VALID(result);
+
+
+  {
+    Thread* thread = Thread::Current();
+    Isolate* isolate = thread->isolate();
+    StackZone zone(thread);
+    HANDLESCOPE(thread);
+    Profile profile(isolate);
+    AllocationFilter filter(isolate, class_a.id());
+    profile.Build(&filter, Profile::kNoTags);
+    // We should have 1 allocation sample.
+    EXPECT_EQ(1, profile.sample_count());
+    ProfileTrieWalker walker(&profile);
+
+    walker.Reset(Profile::kExclusiveCode);
+    // Move down from the root.
+    EXPECT(walker.Down());
+    EXPECT_STREQ("B.boo", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("orange", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("napkin", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("mayo", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("lemon", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("kindle", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("jeep", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("ice", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("haystack", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("granola", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("fred", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("elephant", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("dog", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("cantaloupe", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("banana", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("apple", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("secondInit", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("init", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("go", walker.CurrentName());
+    EXPECT(walker.Down());
+    EXPECT_STREQ("main", walker.CurrentName());
+    EXPECT(!walker.Down());
+  }
+}
+
 }  // namespace dart
 
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 61c2994..47e9306 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -231,7 +231,6 @@
 
 intptr_t RawObject::VisitPointers(ObjectPointerVisitor* visitor) {
   intptr_t size = 0;
-  NoHandleScope no_handles(visitor->isolate());
 
   // Only reasonable to be called on heap objects.
   ASSERT(IsHeapObject());
@@ -444,14 +443,14 @@
     visitor->VisitPointer(
         reinterpret_cast<RawObject**>(&raw_obj->ptr()->instructions_));
   } else {
-    visitor->skipped_code_functions()->Add(raw_obj);
+    visitor->add_skipped_code_function(raw_obj);
   }
 
   if (ShouldVisitCode(raw_obj->ptr()->unoptimized_code_)) {
     visitor->VisitPointer(
         reinterpret_cast<RawObject**>(&raw_obj->ptr()->unoptimized_code_));
   } else {
-    visitor->skipped_code_functions()->Add(raw_obj);
+    visitor->add_skipped_code_function(raw_obj);
   }
   return Function::InstanceSize();
 }
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 517379b..16d5728 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -583,6 +583,7 @@
   friend class ScavengerVisitor;
   friend class SizeExcludingClassVisitor;  // GetClassId
   friend class RetainingPathVisitor;  // GetClassId
+  friend class SkippedCodeFunctions;  // StorePointer
   friend class SnapshotReader;
   friend class SnapshotWriter;
   friend class String;
@@ -743,8 +744,8 @@
   };
 
  private:
-  // So that the MarkingVisitor::DetachCode can null out the code fields.
-  friend class MarkingVisitor;
+  // So that the SkippedCodeFunctions::DetachCode can null out the code fields.
+  friend class SkippedCodeFunctions;
   friend class Class;
   RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
   static bool ShouldVisitCode(RawCode* raw_code);
@@ -771,6 +772,7 @@
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_);
   }
+  uword entry_point_;
 
   int32_t token_pos_;
   int32_t end_token_pos_;
@@ -778,7 +780,6 @@
   int16_t num_fixed_parameters_;
   int16_t num_optional_parameters_;  // > 0: positional; < 0: named.
   int16_t deoptimization_counter_;
-  classid_t regexp_cid_;
   uint32_t kind_tag_;  // See Function::KindTagBits.
   uint16_t optimized_instruction_count_;
   uint16_t optimized_call_site_count_;
@@ -928,16 +929,19 @@
   RawScript* script_;
   RawString* private_key_;
   RawArray* dictionary_;         // Top-level names in this library.
-  RawArray* resolved_names_;     // Cache of resolved names in library scope.
   RawGrowableObjectArray* metadata_;  // Metadata on classes, methods etc.
   RawArray* anonymous_classes_;  // Classes containing top-level elements.
   RawArray* imports_;            // List of Namespaces imported without prefix.
   RawArray* exports_;            // List of re-exported Namespaces.
-  RawArray* loaded_scripts_;     // Array of scripts loaded in this library.
   RawInstance* load_error_;      // Error iff load_state_ == kLoadError.
-  RawObject** to() {
+  RawObject** to_snapshot() {
     return reinterpret_cast<RawObject**>(&ptr()->load_error_);
   }
+  RawArray* resolved_names_;     // Cache of resolved names in library scope.
+  RawArray* loaded_scripts_;     // Array of scripts loaded in this library.
+  RawObject** to() {
+    return reinterpret_cast<RawObject**>(&ptr()->loaded_scripts_);
+  }
 
   Dart_NativeEntryResolver native_entry_resolver_;  // Resolves natives.
   Dart_NativeEntrySymbol native_entry_symbol_resolver_;
@@ -1004,6 +1008,7 @@
   RawObject** to() {
     return reinterpret_cast<RawObject**>(&ptr()->comments_);
   }
+  uword entry_point_;
 
   // Compilation timestamp.
   int64_t compile_timestamp_;
@@ -1025,6 +1030,7 @@
 
   friend class Function;
   friend class MarkingVisitor;
+  friend class SkippedCodeFunctions;
   friend class StackFrame;
 };
 
@@ -1076,6 +1082,7 @@
   friend class Code;
   friend class StackFrame;
   friend class MarkingVisitor;
+  friend class SkippedCodeFunctions;
   friend class Function;
 };
 
@@ -1307,6 +1314,7 @@
   };
 
   int32_t num_variables_;
+  bool is_implicit_;  // true, if this context scope is for an implicit closure.
 
   RawObject** from() {
     VariableDesc* begin = const_cast<VariableDesc*>(ptr()->VariableDescAddr(0));
@@ -1324,6 +1332,9 @@
     // 'end' is the address just beyond the last descriptor, so step back.
     return reinterpret_cast<RawObject**>(end - kWordSize);
   }
+
+  friend class Object;
+  friend class RawClosureData;
 };
 
 
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 0cff97a..3bb7b96 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -11,6 +11,8 @@
 
 namespace dart {
 
+DECLARE_FLAG(int, optimization_counter_threshold);
+
 #define NEW_OBJECT(type)                                                       \
   ((kind == Snapshot::kFull) ? reader->New##type() : type::New())
 
@@ -604,7 +606,17 @@
   writer->WriteTags(writer->GetObjectTags(this));
 
   // Context scope.
-  // We don't write the context scope in the snapshot.
+  if (ptr()->context_scope_ == Object::empty_context_scope().raw()) {
+    writer->WriteVMIsolateObject(kEmptyContextScopeObject);
+  } else {
+    if (ptr()->context_scope_->ptr()->is_implicit_) {
+      writer->WriteObjectImpl(ptr()->context_scope_, kAsInlinedObject);
+    } else {
+      // We don't write non implicit context scopes in the snapshot.
+      writer->WriteVMIsolateObject(kNullObject);
+    }
+  }
+
   writer->WriteObjectImpl(Object::null(), kAsInlinedObject);
 
   // Parent function.
@@ -615,7 +627,7 @@
 
   // Static closure/Closure allocation stub.
   // We don't write the closure or allocation stub in the snapshot.
-  writer->WriteObjectImpl(Object::null(), kAsInlinedObject);
+  writer->WriteVMIsolateObject(kNullObject);
 }
 
 
@@ -685,7 +697,6 @@
   func.set_num_fixed_parameters(reader->Read<int16_t>());
   func.set_num_optional_parameters(reader->Read<int16_t>());
   func.set_deoptimization_counter(reader->Read<int16_t>());
-  func.set_regexp_cid(reader->ReadClassIDValue());
   func.set_kind_tag(reader->Read<uint32_t>());
   func.set_optimized_instruction_count(reader->Read<uint16_t>());
   func.set_optimized_call_site_count(reader->Read<uint16_t>());
@@ -693,7 +704,9 @@
   // Set all the object fields.
   // TODO(5411462): Need to assert No GC can happen here, even though
   // allocations may happen.
-  intptr_t num_flds = (func.raw()->to_snapshot() - func.raw()->from());
+  RawObject** toaddr = reader->snapshot_code() ? func.raw()->to()
+                                               : func.raw()->to_snapshot();
+  intptr_t num_flds = toaddr - func.raw()->from();
   intptr_t from_offset = OFFSET_OF_FROM(func);
   for (intptr_t i = 0; i <= num_flds; i++) {
     (*reader->PassiveObjectHandle()) =
@@ -702,9 +715,11 @@
                       reader->PassiveObjectHandle()->raw());
   }
 
-  // Initialize all fields that are not part of the snapshot.
-  func.ClearICDataArray();
-  func.ClearCode();
+  if (!reader->snapshot_code()) {
+    // Initialize all fields that are not part of the snapshot.
+    func.ClearICDataArray();
+    func.ClearCode();
+  }
   return func.raw();
 }
 
@@ -725,18 +740,22 @@
   // Write out all the non object fields.
   writer->Write<int32_t>(ptr()->token_pos_);
   writer->Write<int32_t>(ptr()->end_token_pos_);
-  writer->Write<int32_t>(ptr()->usage_counter_);
+  if (Code::IsOptimized(ptr()->instructions_->ptr()->code_)) {
+    writer->Write<int32_t>(FLAG_optimization_counter_threshold);
+  } else {
+    writer->Write<int32_t>(0);
+  }
   writer->Write<int16_t>(ptr()->num_fixed_parameters_);
   writer->Write<int16_t>(ptr()->num_optional_parameters_);
   writer->Write<int16_t>(ptr()->deoptimization_counter_);
-  writer->WriteClassIDValue(ptr()->regexp_cid_);
   writer->Write<uint32_t>(ptr()->kind_tag_);
   writer->Write<uint16_t>(ptr()->optimized_instruction_count_);
   writer->Write<uint16_t>(ptr()->optimized_call_site_count_);
 
   // Write out all the object pointer fields.
   SnapshotWriterVisitor visitor(writer);
-  visitor.VisitPointers(from(), to_snapshot());
+  visitor.VisitPointers(from(), writer->snapshot_code() ? to()
+                                                        : to_snapshot());
 }
 
 
@@ -1021,13 +1040,18 @@
     // Set all the object fields.
     // TODO(5411462): Need to assert No GC can happen here, even though
     // allocations may happen.
-    intptr_t num_flds = (library.raw()->to() - library.raw()->from());
+    RawObject** toobj = (kind == Snapshot::kFull) ?
+        library.raw()->to() : library.raw()->to_snapshot();
+    intptr_t num_flds = (toobj - library.raw()->from());
     for (intptr_t i = 0; i <= num_flds; i++) {
       (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
       library.StorePointer((library.raw()->from() + i),
                            reader->PassiveObjectHandle()->raw());
     }
     if (kind != Snapshot::kFull) {
+      // The cache of resolved names in library scope is not serialized.
+      const intptr_t kInitialNameCacheSize = 64;
+      library.InitResolvedNamesCache(kInitialNameCacheSize);
       library.Register();
     }
   }
@@ -1073,8 +1097,9 @@
     // be rebuilt lazily.
 
     // Write out all the object pointer fields.
+    RawObject** toobj = (kind == Snapshot::kFull) ? to() : to_snapshot();
     SnapshotWriterVisitor visitor(writer);
-    visitor.VisitPointers(from(), to());
+    visitor.VisitPointers(from(), toobj);
   }
 }
 
@@ -1185,17 +1210,63 @@
                         intptr_t object_id,
                         intptr_t tags,
                         Snapshot::Kind kind) {
-  UNREACHABLE();
-  return Code::null();
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  Code& result = Code::ZoneHandle(reader->zone(), NEW_OBJECT_WITH_LEN(Code, 0));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+
+  result.set_compile_timestamp(reader->Read<int64_t>());
+  result.set_state_bits(reader->Read<int32_t>());
+  result.set_entry_patch_pc_offset(reader->Read<int32_t>());
+  result.set_patch_code_pc_offset(reader->Read<int32_t>());
+  result.set_lazy_deopt_pc_offset(reader->Read<int32_t>());
+
+  // Set all the object fields.
+  // TODO(5411462): Need to assert No GC can happen here, even though
+  // allocations may happen.
+  intptr_t num_flds = (result.raw()->to() - result.raw()->from());
+  for (intptr_t i = 0; i <= num_flds; i++) {
+    (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
+    result.StorePointer((result.raw()->from() + i),
+                        reader->PassiveObjectHandle()->raw());
+  }
+
+  return result.raw();
 }
 
 
 void RawCode::WriteTo(SnapshotWriter* writer,
                       intptr_t object_id,
                       Snapshot::Kind kind) {
-  // We have already checked for this and written a NULL object, hence we
-  // should not reach here.
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  intptr_t pointer_offsets_length =
+      Code::PtrOffBits::decode(ptr()->state_bits_);
+  if (pointer_offsets_length != 0) {
+    // Should only be IA32.
+    FATAL("Serializing embedded pointer offsets unimplemented");
+  }
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteVMIsolateObject(kCodeCid);
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  // Write out all the non object fields.
+  writer->Write<int64_t>(ptr()->compile_timestamp_);
+  writer->Write<int32_t>(ptr()->state_bits_);
+  writer->Write<int32_t>(ptr()->entry_patch_pc_offset_);
+  writer->Write<int32_t>(ptr()->patch_code_pc_offset_);
+  writer->Write<int32_t>(ptr()->lazy_deopt_pc_offset_);
+
+  // Write out all the object pointer fields.
+  SnapshotWriterVisitor visitor(writer);
+  visitor.VisitPointers(from(), to());
 }
 
 
@@ -1203,15 +1274,35 @@
                                         intptr_t object_id,
                                         intptr_t tags,
                                         Snapshot::Kind kind) {
-  UNREACHABLE();
-  return Instructions::null();
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  intptr_t id = reader->Read<int32_t>();
+  Instructions& result =
+      Instructions::ZoneHandle(reader->zone(),
+                               reader->GetInstructionsById(id));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+  return result.raw();
 }
 
 
 void RawInstructions::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
                               Snapshot::Kind kind) {
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  {
+    // TODO(rmacnak): Drop after calling convention change.
+    writer->WriteInlinedObjectHeader(object_id);
+    writer->WriteVMIsolateObject(kInstructionsCid);
+    writer->WriteTags(writer->GetObjectTags(this));
+    writer->WriteObjectImpl(ptr()->code_, kAsReference);
+    writer->WriteObjectImpl(ptr()->object_pool_, kAsReference);
+  }
+
+  writer->Write<int32_t>(writer->GetInstructionsId(this));
 }
 
 
@@ -1219,15 +1310,90 @@
                                     intptr_t object_id,
                                     intptr_t tags,
                                     Snapshot::Kind kind) {
-  UNREACHABLE();
-  return ObjectPool::null();
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  intptr_t length = reader->Read<intptr_t>();
+
+  ObjectPool& result =
+      ObjectPool::ZoneHandle(reader->zone(),
+                             NEW_OBJECT_WITH_LEN(ObjectPool, length));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+
+  RawTypedData* info_array = result.raw_ptr()->info_array_->ptr();
+
+  // Set all the object fields.
+  // TODO(5411462): Need to assert No GC can happen here, even though
+  // allocations may happen.
+  for (intptr_t i = 0; i < length; i++) {
+    ObjectPool::EntryType entry_type =
+        static_cast<ObjectPool::EntryType>(reader->Read<uint8_t>());
+    info_array->data()[i] = entry_type;
+    switch (entry_type) {
+      case ObjectPool::kTaggedObject: {
+        (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
+        result.SetObjectAt(i, *(reader->PassiveObjectHandle()));
+        break;
+      }
+      case ObjectPool::kImmediate: {
+        intptr_t raw_value = reader->Read<intptr_t>();
+        result.SetRawValueAt(i, raw_value);
+        break;
+      }
+      case ObjectPool::kExternalLabel: {
+        // TODO(rmacnak): Relocate.
+        intptr_t raw_value = reader->Read<intptr_t>();
+        result.SetRawValueAt(i, raw_value);
+        break;
+      }
+      default:
+        UNREACHABLE();
+    }
+  }
+
+  return result.raw();
 }
 
 
 void RawObjectPool::WriteTo(SnapshotWriter* writer,
                             intptr_t object_id,
                             Snapshot::Kind kind) {
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteVMIsolateObject(kObjectPoolCid);
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  intptr_t length = ptr()->length_;
+  RawTypedData* info_array = ptr()->info_array_->ptr();
+  ASSERT(info_array != TypedData::null());
+
+  writer->Write<intptr_t>(length);
+  for (intptr_t i = 0; i < length; i++) {
+    ObjectPool::EntryType entry_type =
+        static_cast<ObjectPool::EntryType>(info_array->data()[i]);
+    writer->Write<uint8_t>(entry_type);
+    Entry& entry = ptr()->data()[i];
+    switch (entry_type) {
+      case ObjectPool::kTaggedObject:
+        writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+        break;
+      case ObjectPool::kImmediate:
+        writer->Write<intptr_t>(entry.raw_value_);
+        break;
+      case ObjectPool::kExternalLabel:
+        // TODO(rmacnak): Write symbolically.
+        writer->Write<intptr_t>(entry.raw_value_);
+        break;
+      default:
+        UNREACHABLE();
+    }
+  }
 }
 
 
@@ -1235,7 +1401,8 @@
                                           intptr_t object_id,
                                           intptr_t tags,
                                           Snapshot::Kind kind) {
-  ASSERT(reader->allow_code());
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
 
   const int32_t length = reader->Read<int32_t>();
   PcDescriptors& result = PcDescriptors::ZoneHandle(reader->zone(),
@@ -1256,7 +1423,7 @@
 void RawPcDescriptors::WriteTo(SnapshotWriter* writer,
                                intptr_t object_id,
                                Snapshot::Kind kind) {
-  ASSERT(writer->allow_code());
+  ASSERT(writer->snapshot_code());
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
@@ -1275,7 +1442,8 @@
                                 intptr_t object_id,
                                 intptr_t tags,
                                 Snapshot::Kind kind) {
-  ASSERT(reader->allow_code());
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
 
   const int32_t length = reader->Read<int32_t>();
   const int32_t register_bit_count = reader->Read<int32_t>();
@@ -1300,7 +1468,7 @@
 void RawStackmap::WriteTo(SnapshotWriter* writer,
                           intptr_t object_id,
                           Snapshot::Kind kind) {
-  ASSERT(writer->allow_code());
+  ASSERT(writer->snapshot_code());
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
@@ -1321,7 +1489,8 @@
                                                       intptr_t object_id,
                                                       intptr_t tags,
                                                       Snapshot::Kind kind) {
-  ASSERT(reader->allow_code());
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
 
   const int32_t num_entries = reader->Read<int32_t>();
 
@@ -1351,7 +1520,7 @@
 void RawLocalVarDescriptors::WriteTo(SnapshotWriter* writer,
                                      intptr_t object_id,
                                      Snapshot::Kind kind) {
-  ASSERT(writer->allow_code());
+  ASSERT(writer->snapshot_code());
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
@@ -1373,7 +1542,8 @@
                                                   intptr_t object_id,
                                                   intptr_t tags,
                                                   Snapshot::Kind kind) {
-  ASSERT(reader->allow_code());
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
 
   // handled_types_data.
   *(reader->ArrayHandle()) ^= reader->ReadObjectImpl(kAsInlinedObject);
@@ -1399,7 +1569,7 @@
 void RawExceptionHandlers::WriteTo(SnapshotWriter* writer,
                                    intptr_t object_id,
                                    Snapshot::Kind kind) {
-  ASSERT(writer->allow_code());
+  ASSERT(writer->snapshot_code());
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
@@ -1471,6 +1641,27 @@
                                         intptr_t object_id,
                                         intptr_t tags,
                                         Snapshot::Kind kind) {
+  ASSERT(reader != NULL);
+
+  // Allocate context object.
+  bool is_implicit = reader->Read<bool>();
+  if (is_implicit) {
+    ContextScope& context_scope =
+        ContextScope::ZoneHandle(ContextScope::New(1, true));
+    reader->AddBackRef(object_id, &context_scope, kIsDeserialized);
+
+    *reader->TypeHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
+
+    // Create a descriptor for 'this' variable.
+    context_scope.SetTokenIndexAt(0, 0);
+    context_scope.SetNameAt(0, Symbols::This());
+    context_scope.SetIsFinalAt(0, true);
+    context_scope.SetIsConstAt(0, false);
+    context_scope.SetTypeAt(0, *reader->TypeHandle());
+    context_scope.SetContextIndexAt(0, 0);
+    context_scope.SetContextLevelAt(0, 0);
+    return context_scope.raw();
+  }
   UNREACHABLE();
   return NULL;
 }
@@ -1479,6 +1670,27 @@
 void RawContextScope::WriteTo(SnapshotWriter* writer,
                               intptr_t object_id,
                               Snapshot::Kind kind) {
+  ASSERT(writer != NULL);
+
+  if (ptr()->is_implicit_) {
+    ASSERT(ptr()->num_variables_ == 1);
+    const VariableDesc* var = ptr()->VariableDescAddr(0);
+
+    // Write out the serialization header value for this object.
+    writer->WriteInlinedObjectHeader(object_id);
+
+    // Write out the class and tags information.
+    writer->WriteVMIsolateObject(kContextScopeCid);
+    writer->WriteTags(writer->GetObjectTags(this));
+
+    // Write out is_implicit flag for the context scope.
+    writer->Write<bool>(true);
+
+    // Write out the type of 'this' the variable.
+    writer->WriteObjectImpl(var->type, kAsInlinedObject);
+
+    return;
+  }
   UNREACHABLE();
 }
 
@@ -1487,15 +1699,50 @@
                             intptr_t object_id,
                             intptr_t tags,
                             Snapshot::Kind kind) {
-  UNREACHABLE();
-  return NULL;
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  ICData& result = ICData::ZoneHandle(reader->zone(), NEW_OBJECT(ICData));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+
+  result.set_deopt_id(reader->Read<int32_t>());
+  result.set_state_bits(reader->Read<uint32_t>());
+
+  // Set all the object fields.
+  // TODO(5411462): Need to assert No GC can happen here, even though
+  // allocations may happen.
+  intptr_t num_flds = (result.raw()->to() - result.raw()->from());
+  for (intptr_t i = 0; i <= num_flds; i++) {
+    (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
+    result.StorePointer((result.raw()->from() + i),
+                        reader->PassiveObjectHandle()->raw());
+  }
+
+  return result.raw();
 }
 
 
 void RawICData::WriteTo(SnapshotWriter* writer,
                         intptr_t object_id,
                         Snapshot::Kind kind) {
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteVMIsolateObject(kICDataCid);
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  // Write out all the non object fields.
+  writer->Write<int32_t>(ptr()->deopt_id_);
+  writer->Write<uint32_t>(ptr()->state_bits_);
+
+  // Write out all the object pointer fields.
+  SnapshotWriterVisitor visitor(writer);
+  visitor.VisitPointers(from(), to());
 }
 
 
@@ -1503,15 +1750,50 @@
                                                 intptr_t object_id,
                                                 intptr_t tags,
                                                 Snapshot::Kind kind) {
-  UNREACHABLE();
-  return NULL;
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  MegamorphicCache& result =
+      MegamorphicCache::ZoneHandle(reader->zone(),
+                                   NEW_OBJECT(MegamorphicCache));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+
+  result.set_filled_entry_count(reader->Read<int32_t>());
+
+  // Set all the object fields.
+  // TODO(5411462): Need to assert No GC can happen here, even though
+  // allocations may happen.
+  intptr_t num_flds = (result.raw()->to() - result.raw()->from());
+  for (intptr_t i = 0; i <= num_flds; i++) {
+    (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
+    result.StorePointer((result.raw()->from() + i),
+                        reader->PassiveObjectHandle()->raw());
+  }
+
+  return result.raw();
 }
 
 
 void RawMegamorphicCache::WriteTo(SnapshotWriter* writer,
                                   intptr_t object_id,
                                   Snapshot::Kind kind) {
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteVMIsolateObject(kMegamorphicCacheCid);
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  // Write out all the non object fields.
+  writer->Write<int32_t>(ptr()->filled_entry_count_);
+
+  // Write out all the object pointer fields.
+  SnapshotWriterVisitor visitor(writer);
+  visitor.VisitPointers(from(), to());
 }
 
 
@@ -1519,15 +1801,41 @@
                                                 intptr_t object_id,
                                                 intptr_t tags,
                                                 Snapshot::Kind kind) {
-  UNREACHABLE();
-  return NULL;
+  UNREACHABLE();  // Untested.
+  ASSERT(reader->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  SubtypeTestCache& result =
+      SubtypeTestCache::ZoneHandle(reader->zone(),
+                                   NEW_OBJECT(SubtypeTestCache));
+  reader->AddBackRef(object_id, &result, kIsDeserialized);
+
+  // Set all the object fields.
+  // TODO(5411462): Need to assert No GC can happen here, even though
+  // allocations may happen.
+  (*reader->ArrayHandle()) ^= reader->ReadObjectImpl(kAsReference);
+  result.StorePointer(&result.raw_ptr()->cache_,
+                      reader->ArrayHandle()->raw());
+
+  return result.raw();
 }
 
 
 void RawSubtypeTestCache::WriteTo(SnapshotWriter* writer,
                                   intptr_t object_id,
                                   Snapshot::Kind kind) {
-  UNREACHABLE();
+  ASSERT(writer->snapshot_code());
+  ASSERT(kind == Snapshot::kFull);
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteVMIsolateObject(kSubtypeTestCacheCid);
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  // Write out all the object pointer fields.
+  writer->WriteObjectImpl(ptr()->cache_, kAsReference);
 }
 
 
diff --git a/runtime/vm/regexp.cc b/runtime/vm/regexp.cc
index db115a5..f20e015 100644
--- a/runtime/vm/regexp.cc
+++ b/runtime/vm/regexp.cc
@@ -5017,7 +5017,7 @@
   Zone* zone = Thread::Current()->zone();
 
   const Function& function = parsed_function->function();
-  const intptr_t specialization_cid = function.regexp_cid();
+  const intptr_t specialization_cid = function.string_specialization_cid();
   const bool is_one_byte = (specialization_cid == kOneByteStringCid ||
                             specialization_cid == kExternalOneByteStringCid);
   JSRegExp& regexp = JSRegExp::Handle(zone, function.regexp());
@@ -5284,8 +5284,7 @@
   // Cache the result.
   regexp.set_function(specialization_cid, fn);
 
-  fn.set_regexp(regexp);
-  fn.set_regexp_cid(specialization_cid);
+  fn.SetRegExpData(regexp, specialization_cid);
   fn.set_is_debuggable(false);
 
   // The function is compiled lazily during the first call.
diff --git a/runtime/vm/regexp_parser.cc b/runtime/vm/regexp_parser.cc
index 716afa4..b24e8ca 100644
--- a/runtime/vm/regexp_parser.cc
+++ b/runtime/vm/regexp_parser.cc
@@ -217,7 +217,7 @@
 
 
 bool RegExpParser::ParseFunction(ParsedFunction *parsed_function) {
-  VMTagScope tagScope(Thread::Current()->isolate(),
+  VMTagScope tagScope(parsed_function->thread(),
                       VMTag::kCompileParseRegExpTagId);
   Zone* zone = parsed_function->zone();
   JSRegExp& regexp = JSRegExp::Handle(parsed_function->function().regexp());
diff --git a/runtime/vm/report.cc b/runtime/vm/report.cc
index 4ef7362..5637adc 100644
--- a/runtime/vm/report.cc
+++ b/runtime/vm/report.cc
@@ -88,7 +88,7 @@
 
 
 void Report::LongJump(const Error& error) {
-  Isolate::Current()->long_jump_base()->Jump(1, error);
+  Thread::Current()->long_jump_base()->Jump(1, error);
   UNREACHABLE();
 }
 
diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h
index 27c9619..2d4790f 100644
--- a/runtime/vm/runtime_entry.h
+++ b/runtime/vm/runtime_entry.h
@@ -6,17 +6,75 @@
 #define VM_RUNTIME_ENTRY_H_
 
 #include "vm/allocation.h"
-#include "vm/assembler.h"
 #include "vm/flags.h"
 #include "vm/native_arguments.h"
 #include "vm/tags.h"
 
 namespace dart {
 
+class Assembler;
+
 DECLARE_FLAG(bool, trace_runtime_calls);
 
 typedef void (*RuntimeFunction)(NativeArguments arguments);
 
+#define RUNTIME_ENTRY_LIST(V)                                                  \
+  V(AllocateArray)                                                             \
+  V(AllocateContext)                                                           \
+  V(AllocateObject)                                                            \
+  V(BreakpointRuntimeHandler)                                                  \
+  V(SingleStepHandler)                                                         \
+  V(CloneContext)                                                              \
+  V(FixCallersTarget)                                                          \
+  V(FixAllocationStubTarget)                                                   \
+  V(InlineCacheMissHandlerOneArg)                                              \
+  V(InlineCacheMissHandlerTwoArgs)                                             \
+  V(InlineCacheMissHandlerThreeArgs)                                           \
+  V(StaticCallMissHandlerOneArg)                                               \
+  V(StaticCallMissHandlerTwoArgs)                                              \
+  V(Instanceof)                                                                \
+  V(TypeCheck)                                                                 \
+  V(BadTypeError)                                                              \
+  V(NonBoolTypeError)                                                          \
+  V(InstantiateType)                                                           \
+  V(InstantiateTypeArguments)                                                  \
+  V(InvokeClosureNoSuchMethod)                                                 \
+  V(InvokeNoSuchMethodDispatcher)                                              \
+  V(MegamorphicCacheMissHandler)                                               \
+  V(OptimizeInvokedFunction)                                                   \
+  V(TraceICCall)                                                               \
+  V(PatchStaticCall)                                                           \
+  V(ReThrow)                                                                   \
+  V(StackOverflow)                                                             \
+  V(Throw)                                                                     \
+  V(TraceFunctionEntry)                                                        \
+  V(TraceFunctionExit)                                                         \
+  V(DeoptimizeMaterialize)                                                     \
+  V(UpdateFieldCid)                                                            \
+  V(InitStaticField)                                                           \
+  V(GrowRegExpStack)                                                           \
+  V(CompileFunction)                                                           \
+
+#define LEAF_RUNTIME_ENTRY_LIST(V)                                             \
+  V(void, PrintStopMessage, const char*)                                       \
+  V(intptr_t, DeoptimizeCopyFrame, uword)                                      \
+  V(void, DeoptimizeFillFrame, uword)                                          \
+  V(void, StoreBufferBlockProcess, Thread*)                                    \
+  V(intptr_t, BigintCompare, RawBigint*, RawBigint*)                           \
+
+
+enum RuntimeFunctionId {
+  kNoRuntimeFunctionId = -1,
+#define DECLARE_ENUM_VALUE(name) \
+  k##name##Id,
+  RUNTIME_ENTRY_LIST(DECLARE_ENUM_VALUE)
+#undef DECLARE_ENUM_VALUE
+
+#define DECLARE_LEAF_ENUM_VALUE(type, name, ...) \
+  k##name##Id,
+  LEAF_RUNTIME_ENTRY_LIST(DECLARE_LEAF_ENUM_VALUE)
+#undef DECLARE_LEAF_ENUM_VALUE
+};
 
 // Class RuntimeEntry is used to encapsulate runtime functions, it includes
 // the entry point for the runtime function and the number of arguments expected
@@ -49,6 +107,9 @@
   void set_next(const RuntimeEntry* next) { next_ = next; }
   const RuntimeEntry* next() const { return next_; }
 
+  static inline uword AddressFromId(RuntimeFunctionId id);
+  static inline RuntimeFunctionId RuntimeFunctionIdFromAddress(uword address);
+
  private:
   const char* name_;
   const RuntimeFunction function_;
@@ -80,7 +141,7 @@
       Thread* thread = arguments.thread();                                     \
       ASSERT(thread == Thread::Current());                                     \
       Isolate* isolate = thread->isolate();                                    \
-      StackZone zone(isolate);                                                 \
+      StackZone zone(thread);                                                  \
       HANDLESCOPE(isolate);                                                    \
       DRT_Helper##name(isolate, thread, zone.GetZone(), arguments);            \
     }                                                                          \
@@ -92,7 +153,8 @@
                                NativeArguments arguments)
 
 #define DECLARE_RUNTIME_ENTRY(name)                                            \
-  extern const RuntimeEntry k##name##RuntimeEntry
+  extern const RuntimeEntry k##name##RuntimeEntry;                             \
+  extern void DRT_##name(NativeArguments arguments);                           \
 
 #define DEFINE_LEAF_RUNTIME_ENTRY(type, name, argument_count, ...)             \
   extern "C" type DLRT_##name(__VA_ARGS__);                                    \
@@ -107,7 +169,49 @@
 
 #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...)                            \
   extern const RuntimeEntry k##name##RuntimeEntry;                             \
-  extern "C" type DLRT_##name(__VA_ARGS__)
+  extern "C" type DLRT_##name(__VA_ARGS__);                                    \
+
+
+// Declare all runtime functions here.
+RUNTIME_ENTRY_LIST(DECLARE_RUNTIME_ENTRY)
+LEAF_RUNTIME_ENTRY_LIST(DECLARE_LEAF_RUNTIME_ENTRY)
+
+
+// Declare all runtime functions here.
+RUNTIME_ENTRY_LIST(DECLARE_RUNTIME_ENTRY)
+LEAF_RUNTIME_ENTRY_LIST(DECLARE_LEAF_RUNTIME_ENTRY)
+
+
+uword RuntimeEntry::AddressFromId(RuntimeFunctionId id) {
+    switch (id) {
+#define DEFINE_RUNTIME_CASE(name)                                              \
+    case k##name##Id: return reinterpret_cast<uword>(&DRT_##name);
+    RUNTIME_ENTRY_LIST(DEFINE_RUNTIME_CASE)
+#undef DEFINE_RUNTIME_CASE
+
+#define DEFINE_LEAF_RUNTIME_CASE(type, name, ...)                              \
+    case k##name##Id: return reinterpret_cast<uword>(&DLRT_##name);
+    LEAF_RUNTIME_ENTRY_LIST(DEFINE_LEAF_RUNTIME_CASE)
+#undef DEFINE_LEAF_RUNTIME_CASE
+    default:
+      break;
+  }
+  return 0;
+}
+
+
+RuntimeFunctionId RuntimeEntry::RuntimeFunctionIdFromAddress(uword address) {
+#define CHECK_RUNTIME_ADDRESS(name)                                            \
+  if (address == reinterpret_cast<uword>(&DRT_##name)) return k##name##Id;
+  RUNTIME_ENTRY_LIST(CHECK_RUNTIME_ADDRESS)
+#undef CHECK_RUNTIME_ADDRESS
+
+#define CHECK_LEAF_RUNTIME_ADDRESS(type, name, ...)                            \
+  if (address == reinterpret_cast<uword>(&DLRT_##name)) return k##name##Id;
+  LEAF_RUNTIME_ENTRY_LIST(CHECK_LEAF_RUNTIME_ADDRESS)
+#undef CHECK_LEAF_RUNTIME_ADDRESS
+  return kNoRuntimeFunctionId;
+}
 
 }  // namespace dart
 
diff --git a/runtime/vm/runtime_entry_arm.cc b/runtime/vm/runtime_entry_arm.cc
index d355254..b373811 100644
--- a/runtime/vm/runtime_entry_arm.cc
+++ b/runtime/vm/runtime_entry_arm.cc
@@ -43,7 +43,7 @@
   ExternalLabel label(entry);
   if (is_leaf()) {
     ASSERT(argument_count == this->argument_count());
-    __ BranchLink(&label);
+    __ BranchLink(&label, kNotPatchable);
   } else {
     // Argument count is not checked here, but in the runtime entry for a more
     // informative error message.
diff --git a/runtime/vm/runtime_entry_mips.cc b/runtime/vm/runtime_entry_mips.cc
index 03cfa1f..e4a5dbf 100644
--- a/runtime/vm/runtime_entry_mips.cc
+++ b/runtime/vm/runtime_entry_mips.cc
@@ -43,7 +43,7 @@
   ExternalLabel label(entry);
   if (is_leaf()) {
     ASSERT(argument_count == this->argument_count());
-    __ BranchLink(&label);
+    __ BranchLink(&label, kNotPatchable);
   } else {
     // Argument count is not checked here, but in the runtime entry for a more
     // informative error message.
diff --git a/runtime/vm/runtime_entry_test.cc b/runtime/vm/runtime_entry_test.cc
index b0b04c5..f02f6f7 100644
--- a/runtime/vm/runtime_entry_test.cc
+++ b/runtime/vm/runtime_entry_test.cc
@@ -10,6 +10,10 @@
 
 namespace dart {
 
+DECLARE_RUNTIME_ENTRY(TestSmiSub)
+DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*)
+
+
 // Add function to a class and that class to the class dictionary so that
 // frame walking can be used.
 const Function& RegisterFakeFunction(const char* name, const Code& code) {
diff --git a/runtime/vm/runtime_entry_x64.cc b/runtime/vm/runtime_entry_x64.cc
index df24e70..a6ff635 100644
--- a/runtime/vm/runtime_entry_x64.cc
+++ b/runtime/vm/runtime_entry_x64.cc
@@ -24,7 +24,9 @@
   if (is_leaf()) {
     ASSERT(argument_count == this->argument_count());
     ExternalLabel label(GetEntryPoint());
-    __ CallCFunction(&label);
+    COMPILE_ASSERT(CallingConventions::kVolatileCpuRegisters & (1 << RAX));
+    __ LoadExternalLabel(RAX, &label, kNotPatchable);
+    __ CallCFunction(RAX);
   } else {
     // Argument count is not checked here, but in the runtime entry for a more
     // informative error message.
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index 3e7f028..d5533eb 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -331,8 +331,7 @@
       String::ZoneHandle(Z, Symbols::New(source_, ident_pos, ident_length));
   if (ident_char0 == Library::kPrivateIdentifierStart) {
     // Private identifiers are mangled on a per library basis.
-    literal = String::Concat(literal, private_key_);
-    literal = Symbols::New(literal);
+    literal = Symbols::FromConcat(literal, private_key_);
   }
   current_token_.literal = &literal;
 }
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index ecf1ed0..fd1256e 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -16,6 +16,7 @@
 #include "vm/object_id_ring.h"
 #include "vm/stack_frame.h"
 #include "vm/store_buffer.h"
+#include "vm/thread_registry.h"
 #include "vm/verified_memory.h"
 #include "vm/verifier.h"
 #include "vm/visitor.h"
@@ -78,12 +79,13 @@
 
 class ScavengerVisitor : public ObjectPointerVisitor {
  public:
-  explicit ScavengerVisitor(Isolate* isolate, Scavenger* scavenger)
+  explicit ScavengerVisitor(Isolate* isolate,
+                            Scavenger* scavenger,
+                            SemiSpace* from)
       : ObjectPointerVisitor(isolate),
         thread_(Thread::Current()),
         scavenger_(scavenger),
-        from_start_(scavenger_->from_->start()),
-        from_size_(scavenger_->from_->end() - scavenger_->from_->start()),
+        from_(from),
         heap_(scavenger->heap_),
         vm_heap_(Dart::vm_isolate()->heap()),
         page_space_(scavenger->heap_->old_space()),
@@ -156,17 +158,9 @@
       return;
     }
 
-    // The scavenger is only interested in objects located in the from space.
-    //
-    // We are using address math here and relying on the unsigned underflow
-    // in the code below to avoid having two checks.
-    uword obj_offset = reinterpret_cast<uword>(raw_obj) - from_start_;
-    if (obj_offset > from_size_) {
-      ASSERT(scavenger_->to_->Contains(RawObject::ToAddr(raw_obj)));
-      return;
-    }
-
     uword raw_addr = RawObject::ToAddr(raw_obj);
+    // The scavenger is only expects objects located in the from space.
+    ASSERT(from_->Contains(raw_addr));
     // Read the header word of the object and determine if the object has
     // already been copied.
     uword header = *reinterpret_cast<uword*>(raw_addr);
@@ -242,8 +236,7 @@
 
   Thread* thread_;
   Scavenger* scavenger_;
-  uword from_start_;
-  uword from_size_;
+  SemiSpace* from_;
   Heap* heap_;
   Heap* vm_heap_;
   PageSpace* page_space_;
@@ -422,7 +415,6 @@
   if (to_ == NULL) {
     FATAL("Out of memory.\n");
   }
-  from_ = NULL;
 
   // Setup local fields.
   top_ = FirstObjectStart();
@@ -435,7 +427,6 @@
 
 Scavenger::~Scavenger() {
   ASSERT(!scavenging_);
-  ASSERT(from_ == NULL);
   to_->Delete();
 }
 
@@ -454,15 +445,15 @@
 }
 
 
-void Scavenger::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
+SemiSpace* Scavenger::Prologue(Isolate* isolate, bool invoke_api_callbacks) {
   if (invoke_api_callbacks && (isolate->gc_prologue_callback() != NULL)) {
     (isolate->gc_prologue_callback())();
   }
   Thread::PrepareForGC();
   // Flip the two semi-spaces so that to_ is always the space for allocating
   // objects.
-  from_ = to_;
-  to_ = SemiSpace::New(NewSizeInWords(from_->size_in_words()));
+  SemiSpace* from = to_;
+  to_ = SemiSpace::New(NewSizeInWords(from->size_in_words()));
   if (to_ == NULL) {
     // TODO(koda): We could try to recover (collect old space, wait for another
     // isolate to finish scavenge, etc.).
@@ -471,10 +462,12 @@
   top_ = FirstObjectStart();
   resolved_top_ = top_;
   end_ = to_->end();
+  return from;
 }
 
 
 void Scavenger::Epilogue(Isolate* isolate,
+                         SemiSpace* from,
                          bool invoke_api_callbacks) {
   // All objects in the to space have been copied from the from space at this
   // moment.
@@ -506,8 +499,7 @@
     }
   }
 #endif  // defined(DEBUG)
-  from_->Delete();
-  from_ = NULL;
+  from->Delete();
   if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) {
     (isolate->gc_epilogue_callback())();
   }
@@ -583,7 +575,7 @@
     return false;
   }
   uword raw_addr = RawObject::ToAddr(raw_obj);
-  if (!from_->Contains(raw_addr)) {
+  if (to_->Contains(raw_addr)) {
     return false;
   }
   uword header = *reinterpret_cast<uword*>(raw_addr);
@@ -624,7 +616,16 @@
       for (intptr_t k = 0; k < num_keys; ++k) {
         if (!IsUnreachable(reference_set->get_key(k))) {
           for (intptr_t v = 0; v < num_values; ++v) {
-            visitor->VisitPointer(reference_set->get_value(v));
+            RawObject** raw_obj_addr = reference_set->get_value(v);
+            RawObject* raw_obj = *raw_obj_addr;
+            // Only visit heap objects which are in from space, aka new objects
+            // not in to space. This avoids visiting a value multiple times
+            // during a scavenge.
+            if (raw_obj->IsHeapObject() &&
+                raw_obj->IsNewObject() &&
+                !to_->Contains(RawObject::ToAddr(raw_obj))) {
+              visitor->VisitPointer(raw_obj_addr);
+            }
           }
           is_unreachable = false;
           // Since we have found a key object that is reachable and all
@@ -799,12 +800,20 @@
 
 
 void Scavenger::Scavenge(bool invoke_api_callbacks) {
+  Isolate* isolate = heap_->isolate();
+  // Ensure that all threads for this isolate are at a safepoint (either stopped
+  // or in native code). If two threads are racing at this point, the loser
+  // will continue with its scavenge after waiting for the winner to complete.
+  // TODO(koda): Consider moving SafepointThreads into allocation failure/retry
+  // logic to avoid needless collections.
+  isolate->thread_registry()->SafepointThreads();
+
   // Scavenging is not reentrant. Make sure that is the case.
   ASSERT(!scavenging_);
   scavenging_ = true;
-  Isolate* isolate = heap_->isolate();
+
   PageSpace* page_space = heap_->old_space();
-  NoHandleScope no_handles(isolate);
+  NoSafepointScope no_safepoints;
 
   // TODO(koda): Make verification more compatible with concurrent sweep.
   if (FLAG_verify_before_gc && !FLAG_concurrent_sweep) {
@@ -817,13 +826,13 @@
   SpaceUsage usage_before = GetCurrentUsage();
   intptr_t promo_candidate_words =
       (survivor_end_ - FirstObjectStart()) / kWordSize;
-  Prologue(isolate, invoke_api_callbacks);
+  SemiSpace* from = Prologue(isolate, invoke_api_callbacks);
   // The API prologue/epilogue may create/destroy zones, so we must not
   // depend on zone allocations surviving beyond the epilogue callback.
   {
-    StackZone zone(isolate);
+    StackZone zone(Thread::Current());
     // Setup the visitor and run the scavenge.
-    ScavengerVisitor visitor(isolate, this);
+    ScavengerVisitor visitor(isolate, this, from);
     page_space->AcquireDataLock();
     const bool prologue_weak_are_strong = !invoke_api_callbacks;
     IterateRoots(isolate, &visitor, prologue_weak_are_strong);
@@ -849,7 +858,7 @@
                       promo_candidate_words,
                       visitor.bytes_promoted() >> kWordSizeLog2));
   }
-  Epilogue(isolate, invoke_api_callbacks);
+  Epilogue(isolate, from, invoke_api_callbacks);
 
   // TODO(koda): Make verification more compatible with concurrent sweep.
   if (FLAG_verify_after_gc && !FLAG_concurrent_sweep) {
@@ -861,12 +870,13 @@
   // Done scavenging. Reset the marker.
   ASSERT(scavenging_);
   scavenging_ = false;
+
+  isolate->thread_registry()->ResumeAllThreads();
 }
 
 
 void Scavenger::WriteProtect(bool read_only) {
   ASSERT(!scavenging_);
-  ASSERT(from_ == NULL);
   to_->WriteProtect(read_only);
 }
 
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index d1e9a24..00b5706 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -121,10 +121,6 @@
   // During a scavenge this function only returns true for addresses that will
   // be part of the surviving objects.
   bool Contains(uword addr) const {
-    // No reasonable algorithm should be checking for objects in from space. At
-    // least unless it is debugging code. This might need to be relaxed later,
-    // but currently it helps prevent dumb bugs.
-    ASSERT(from_ == NULL || !from_->Contains(addr));
     return to_->Contains(addr);
   }
 
@@ -232,7 +228,7 @@
   };
 
   uword FirstObjectStart() const { return to_->start() | object_alignment_; }
-  void Prologue(Isolate* isolate, bool invoke_api_callbacks);
+  SemiSpace* Prologue(Isolate* isolate, bool invoke_api_callbacks);
   void IterateStoreBuffers(Isolate* isolate, ScavengerVisitor* visitor);
   void IterateObjectIdTable(Isolate* isolate, ScavengerVisitor* visitor);
   void IterateRoots(Isolate* isolate,
@@ -246,8 +242,7 @@
   void ProcessToSpace(ScavengerVisitor* visitor);
   uword ProcessWeakProperty(RawWeakProperty* raw_weak,
                             ScavengerVisitor* visitor);
-  void Epilogue(Isolate* isolate,
-                bool invoke_api_callbacks);
+  void Epilogue(Isolate* isolate, SemiSpace* from, bool invoke_api_callbacks);
 
   bool IsUnreachable(RawObject** p);
 
@@ -277,7 +272,6 @@
 
   intptr_t NewSizeInWords(intptr_t old_size_in_words) const;
 
-  SemiSpace* from_;
   SemiSpace* to_;
 
   Heap* heap_;
diff --git a/runtime/vm/scopes.cc b/runtime/vm/scopes.cc
index 0d4233a..f0c5080 100644
--- a/runtime/vm/scopes.cc
+++ b/runtime/vm/scopes.cc
@@ -404,18 +404,10 @@
   LocalScope* current_scope = this;
   while (current_scope != NULL) {
     LocalVariable* var = current_scope->LocalLookupVariable(name);
-    if ((var != NULL) && !var->is_invisible_) {
-      if (!test_only) {
-        if (var->owner()->function_level() != function_level()) {
-          var->set_is_captured();
-        }
-        // Insert aliases of the variable in intermediate scopes.
-        LocalScope* intermediate_scope = this;
-        while (intermediate_scope != current_scope) {
-          intermediate_scope->variables_.Add(var);
-          ASSERT(var->owner() != intermediate_scope);  // Item is an alias.
-          intermediate_scope = intermediate_scope->parent();
-        }
+    // If testing only, return the variable even if invisible.
+    if ((var != NULL) && (!var->is_invisible_ || test_only)) {
+      if (!test_only && (var->owner()->function_level() != function_level())) {
+        CaptureVariable(var);
       }
       return var;
     }
@@ -425,27 +417,29 @@
 }
 
 
-bool LocalScope::CaptureVariable(const String& name) {
-  ASSERT(name.IsSymbol());
-  LocalScope* current_scope = this;
-  while (current_scope != NULL) {
-    LocalVariable* var = current_scope->LocalLookupVariable(name);
-    if (var != NULL) {
-      if (var->owner()->function_level() != function_level()) {
-        var->set_is_captured();
-      }
-      // Insert aliases of the variable in intermediate scopes.
-      LocalScope* intermediate_scope = this;
-      while (intermediate_scope != current_scope) {
-        intermediate_scope->variables_.Add(var);
-        ASSERT(var->owner() != intermediate_scope);  // Item is an alias.
-        intermediate_scope = intermediate_scope->parent();
-      }
-      return true;
+void LocalScope::CaptureVariable(LocalVariable* variable) {
+  ASSERT(variable != NULL);
+  // The variable must exist in an enclosing scope, not necessarily in this one.
+  variable->set_is_captured();
+  const int variable_function_level = variable->owner()->function_level();
+  LocalScope* scope = this;
+  while (scope->function_level() != variable_function_level) {
+    // Insert an alias of the variable in the top scope of each function
+    // level so that the variable is found in the context.
+    LocalScope* parent_scope = scope->parent();
+    while ((parent_scope != NULL) &&
+           (parent_scope->function_level() == scope->function_level())) {
+      scope = parent_scope;
+      parent_scope = scope->parent();
     }
-    current_scope = current_scope->parent();
+    // An alias may already have been added in this scope, and in that case,
+    // in parent scopes as needed. If so, we are done.
+    if (!scope->AddVariable(variable)) {
+      return;
+    }
+    ASSERT(variable->owner() != scope);  // Item is an alias.
+    scope = parent_scope;
   }
-  return false;
 }
 
 
@@ -520,9 +514,10 @@
 
 int LocalScope::NumCapturedVariables() const {
   // It is not necessary to traverse parent scopes, since we are only interested
-  // in the captured variables referenced in this scope. If this scope
-  // references a captured variable declared in a parent scope, it will contain
-  // an alias for that variable.
+  // in the captured variables referenced in this scope. If this scope is the
+  // top scope at function level 1 and it (or its children scopes) references a
+  // captured variable declared in a parent scope at function level 0, it will
+  // contain an alias for that variable.
 
   // Since code generation for nested functions is postponed until first
   // invocation, the function level of the closure scope can only be 1.
@@ -553,7 +548,7 @@
 
   // Create a ContextScope with space for num_captured_vars descriptors.
   const ContextScope& context_scope =
-      ContextScope::Handle(ContextScope::New(num_captured_vars));
+      ContextScope::Handle(ContextScope::New(num_captured_vars, false));
 
   // Create a descriptor for each referenced captured variable of enclosing
   // functions to preserve its name and its context allocation information.
@@ -623,7 +618,6 @@
 
 
 void LocalScope::RecursivelyCaptureAllVariables() {
-  bool found = false;
   for (intptr_t i = 0; i < num_variables(); i++) {
     if ((VariableAt(i)->name().raw() == Symbols::StackTraceVar().raw()) ||
         (VariableAt(i)->name().raw() == Symbols::ExceptionVar().raw()) ||
@@ -632,11 +626,7 @@
       // stack.
       continue;
     }
-    found = CaptureVariable(VariableAt(i)->name());
-    // Also manually set the variable as captured as CaptureVariable() does not
-    // handle capturing variables on the same scope level.
-    VariableAt(i)->set_is_captured();
-    ASSERT(found);
+    CaptureVariable(VariableAt(i));
   }
   if (sibling() != NULL) { sibling()->RecursivelyCaptureAllVariables(); }
   if (child() != NULL) { child()->RecursivelyCaptureAllVariables(); }
@@ -648,7 +638,7 @@
 
   // Create a ContextScope with space for kNumCapturedVars descriptors.
   const ContextScope& context_scope =
-      ContextScope::Handle(ContextScope::New(kNumCapturedVars));
+      ContextScope::Handle(ContextScope::New(kNumCapturedVars, true));
 
   // Create a descriptor for 'this' variable.
   context_scope.SetTokenIndexAt(0, func.token_pos());
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index bc6d263..b9a2b1a 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -279,10 +279,8 @@
   // Returns NULL if this scope is not embedded in a switch.
   LocalScope* LookupSwitchScope();
 
-  // Looks up variable in this scope and mark as captured if applicable.
-  // Finds the variable even if it is marked invisible. Returns true if
-  // the variable was found, false if it was not found.
-  bool CaptureVariable(const String& name);
+  // Mark this variable as captured by this scope.
+  void CaptureVariable(LocalVariable* variable);
 
   // Look for unresolved forward references to labels in this scope.
   // If there are any, propagate the forward reference to the next
@@ -329,7 +327,6 @@
   // from this scope and belonging to outer scopes.
   RawContextScope* PreserveOuterScope(int current_context_level) const;
 
-
   // Recursively traverses all siblings and children and marks all variables as
   // captured.
   void RecursivelyCaptureAllVariables();
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 89cf1fa..5c57b1f 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -48,11 +48,9 @@
 }
 
 
-RingServiceIdZone::RingServiceIdZone(
-    ObjectIdRing* ring, ObjectIdRing::IdPolicy policy)
-        : ring_(ring),
-          policy_(policy) {
-  ASSERT(ring_ != NULL);
+RingServiceIdZone::RingServiceIdZone()
+    : ring_(NULL),
+      policy_(ObjectIdRing::kAllocateId) {
 }
 
 
@@ -60,7 +58,15 @@
 }
 
 
+void RingServiceIdZone::Init(
+    ObjectIdRing* ring, ObjectIdRing::IdPolicy policy) {
+  ring_ = ring;
+  policy_ = policy;
+}
+
+
 char* RingServiceIdZone::GetServiceId(const Object& obj) {
+  ASSERT(ring_ != NULL);
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   ASSERT(zone != NULL);
@@ -499,6 +505,25 @@
 }
 
 
+void Service::PostError(const String& method_name,
+                        const Array& parameter_keys,
+                        const Array& parameter_values,
+                        const Instance& reply_port,
+                        const Instance& id,
+                        const Error& error) {
+  Isolate* isolate = Isolate::Current();
+  StackZone zone(isolate);
+  HANDLESCOPE(isolate);
+  JSONStream js;
+  js.Setup(zone.GetZone(), SendPort::Cast(reply_port).Id(),
+           id, method_name, parameter_keys, parameter_values);
+  js.PrintError(kExtensionError,
+                "Error in extension `%s`: %s",
+                js.method(), error.ToErrorCString());
+  js.PostReply();
+}
+
+
 void Service::InvokeMethod(Isolate* isolate, const Array& msg) {
   ASSERT(isolate != NULL);
   ASSERT(!msg.IsNull());
@@ -585,6 +610,20 @@
       return;
     }
 
+    const Instance& extension_handler =
+        Instance::Handle(isolate->LookupServiceExtensionHandler(method_name));
+    if (!extension_handler.IsNull()) {
+      ScheduleExtensionHandler(extension_handler,
+                               method_name,
+                               param_keys,
+                               param_values,
+                               reply_port,
+                               seq);
+      // Schedule was successful. Extension code will post a reply
+      // asynchronously.
+      return;
+    }
+
     PrintUnrecognizedMethodError(&js);
     js.PostReply();
     return;
@@ -628,8 +667,8 @@
   intptr_t len = writer.BytesWritten();
   if (FLAG_trace_service) {
     OS::Print(
-        "vm-service: Pushing event of type %s to stream %s, len %" Pd "\n",
-        event_type, stream_id, len);
+        "vm-service: Pushing event of type %s to stream %s (%s), len %" Pd "\n",
+        event_type, stream_id, isolate->name(), len);
   }
   // TODO(turnidge): For now we ignore failure to send an event.  Revisit?
   PortMap::PostMessage(
@@ -720,8 +759,14 @@
   list_values[1] = &json_cobj;
 
   if (FLAG_trace_service) {
+    Isolate* isolate = Isolate::Current();
+    const char* isolate_name = "<no current isolate>";
+    if (isolate != NULL) {
+      isolate_name = isolate->name();
+    }
     OS::Print(
-        "vm-service: Pushing event of type %s to stream %s\n", kind, stream_id);
+        "vm-service: Pushing event of type %s to stream %s (%s)\n",
+        kind, stream_id, isolate_name);
   }
 
   Dart_PostCObject(ServiceIsolate::Port(), &list_cobj);
@@ -869,6 +914,28 @@
 }
 
 
+void Service::ScheduleExtensionHandler(const Instance& handler,
+                                       const String& method_name,
+                                       const Array& parameter_keys,
+                                       const Array& parameter_values,
+                                       const Instance& reply_port,
+                                       const Instance& id) {
+  ASSERT(!handler.IsNull());
+  ASSERT(!method_name.IsNull());
+  ASSERT(!parameter_keys.IsNull());
+  ASSERT(!parameter_values.IsNull());
+  ASSERT(!reply_port.IsNull());
+  Isolate* isolate = Isolate::Current();
+  ASSERT(isolate != NULL);
+  isolate->AppendServiceExtensionCall(handler,
+                                      method_name,
+                                      parameter_keys,
+                                      parameter_values,
+                                      reply_port,
+                                      id);
+}
+
+
 static const MethodParameter* get_isolate_params[] = {
   ISOLATE_PARAMETER,
   NULL,
@@ -943,6 +1010,7 @@
         if (text != NULL) {
           event.AddProperty("text", text);
         }
+        event.AddPropertyTimeMillis("timestamp", OS::GetCurrentTimeMillis());
       }
     }
   }
@@ -968,7 +1036,8 @@
   ObjectIdRing* ring = isolate->object_id_ring();
   ASSERT(ring != NULL);
   // When printing the ObjectIdRing, force object id reuse policy.
-  RingServiceIdZone reuse_zone(ring, ObjectIdRing::kReuseId);
+  RingServiceIdZone reuse_zone;
+  reuse_zone.Init(ring, ObjectIdRing::kReuseId);
   js->set_id_zone(&reuse_zone);
   ring->PrintJSON(js);
   return true;
@@ -1443,19 +1512,21 @@
       slot_offset ^= path.At((i * 2) + 1);
 
       jselement.AddProperty("source", source);
-      jselement.AddProperty("slot", "<unknown>");
       if (source.IsArray()) {
         intptr_t element_index = slot_offset.Value() -
             (Array::element_offset(0) >> kWordSizeLog2);
-        jselement.AddProperty("slot", element_index);
+        jselement.AddProperty("parentListIndex", element_index);
       } else if (source.IsInstance()) {
         source_class ^= source.clazz();
         parent_field_map = source_class.OffsetToFieldMap();
         intptr_t offset = slot_offset.Value();
         if (offset > 0 && offset < parent_field_map.Length()) {
           field ^= parent_field_map.At(offset);
-          jselement.AddProperty("slot", field);
+          jselement.AddProperty("parentField", field);
         }
+      } else {
+        intptr_t element_index = slot_offset.Value();
+        jselement.AddProperty("_parentWordOffset", element_index);
       }
 
       // We nil out the array after generating the response to prevent
@@ -1828,7 +1899,7 @@
     JSONArray samples(&jsobj, "samples");
     for (int i = 0; i < storage.Length(); i++) {
       const Object& sample = Object::Handle(storage.At(i));
-      samples.AddValue(Instance::Cast(sample));
+      samples.AddValue(sample);
     }
   }
   return true;
@@ -2265,6 +2336,7 @@
       isolate->debugger()->EnterSingleStepMode();
     }
     isolate->message_handler()->set_pause_on_start(false);
+    isolate->set_last_resume_timestamp();
     if (Service::debug_stream.enabled()) {
       ServiceEvent event(isolate, ServiceEvent::kResume);
       Service::HandleEvent(&event);
@@ -2499,6 +2571,7 @@
           event.AddProperty("type", "Event");
           event.AddProperty("kind", "_Graph");
           event.AddProperty("isolate", isolate);
+          event.AddPropertyTimeMillis("timestamp", OS::GetCurrentTimeMillis());
 
           event.AddProperty("chunkIndex", i);
           event.AddProperty("chunkCount", num_chunks);
@@ -2783,7 +2856,7 @@
   JSONObject jsobj(js);
   jsobj.AddProperty("type", "Version");
   jsobj.AddProperty("major", static_cast<intptr_t>(2));
-  jsobj.AddProperty("minor", static_cast<intptr_t>(0));
+  jsobj.AddProperty("minor", static_cast<intptr_t>(1));
   jsobj.AddProperty("_privateMajor", static_cast<intptr_t>(0));
   jsobj.AddProperty("_privateMinor", static_cast<intptr_t>(0));
   return true;
@@ -2831,7 +2904,7 @@
   jsobj.AddProperty("_typeChecksEnabled", isolate->flags().type_checks());
   int64_t start_time_millis = (Dart::vm_isolate()->start_time() /
                                kMicrosecondsPerMillisecond);
-  jsobj.AddProperty64("startTime", start_time_millis);
+  jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
   // Construct the isolate list.
   {
     JSONArray jsarr(&jsobj, "isolates");
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 3b23f6d..4e4ccd2 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -15,6 +15,7 @@
 
 class Array;
 class EmbedderServiceHandler;
+class Error;
 class GCEvent;
 class GrowableObjectArray;
 class Instance;
@@ -39,9 +40,11 @@
 
 class RingServiceIdZone : public ServiceIdZone {
  public:
-  explicit RingServiceIdZone(ObjectIdRing* ring, ObjectIdRing::IdPolicy policy);
+  RingServiceIdZone();
   virtual ~RingServiceIdZone();
 
+  void Init(ObjectIdRing* ring, ObjectIdRing::IdPolicy policy);
+
   // Returned string will be zone allocated.
   virtual char* GetServiceId(const Object& obj);
 
@@ -118,6 +121,13 @@
                            const Object& error,
                            const Instance& stack_trace);
 
+  static void PostError(const String& method_name,
+                        const Array& parameter_keys,
+                        const Array& parameter_values,
+                        const Instance& reply_port,
+                        const Instance& id,
+                        const Error& error);
+
   // Well-known streams.
   static StreamInfo isolate_stream;
   static StreamInfo debug_stream;
@@ -144,7 +154,12 @@
 
   static EmbedderServiceHandler* FindIsolateEmbedderHandler(const char* name);
   static EmbedderServiceHandler* FindRootEmbedderHandler(const char* name);
-
+  static void ScheduleExtensionHandler(const Instance& handler,
+                                       const String& method_name,
+                                       const Array& parameter_keys,
+                                       const Array& parameter_values,
+                                       const Instance& reply_port,
+                                       const Instance& id);
   static void SendEvent(const char* stream_id,
                         const char* event_type,
                         const Object& eventMessage);
diff --git a/runtime/vm/service/client.dart b/runtime/vm/service/client.dart
index c8a374a..1ac2a23 100644
--- a/runtime/vm/service/client.dart
+++ b/runtime/vm/service/client.dart
@@ -29,7 +29,8 @@
         post(response);
       });
     } catch (e, st) {
-      message.setErrorResponse('Internal error: $e');
+      message.setErrorResponse(
+          kInternalError, 'Unexpected exception:$e\n$st');
       post(message.response);
     }
   }
diff --git a/runtime/vm/service/message.dart b/runtime/vm/service/message.dart
index f27a48b..043c941 100644
--- a/runtime/vm/service/message.dart
+++ b/runtime/vm/service/message.dart
@@ -94,7 +94,6 @@
     final receivePort = new RawReceivePort();
     receivePort.handler = (value) {
       receivePort.close();
-      assert(value is String);
       _completer.complete(value);
     };
     var keys = _makeAllString(params.keys.toList(growable:false));
@@ -121,7 +120,6 @@
     final receivePort = new RawReceivePort();
     receivePort.handler = (value) {
       receivePort.close();
-      assert(value is String);
       _completer.complete(value);
     };
     var keys = _makeAllString(params.keys.toList(growable:false));
@@ -141,20 +139,9 @@
     _completer.complete(response);
   }
 
-  void setErrorResponse(String message) {
-    var response = {
-      'jsonrpc': '2.0',
-      'id': serial,
-      'result' : {
-        'type': 'Error',
-        'message': message,
-        'request': {
-          'method': method,
-          'params': params
-        }
-      }
-    };
-    _completer.complete(JSON.encode(response));
+  void setErrorResponse(int code, String details) {
+    _completer.complete(encodeRpcError(this, code,
+                                       details: '$method: $details'));
   }
 }
 
diff --git a/runtime/vm/service/running_isolates.dart b/runtime/vm/service/running_isolates.dart
index 12ca0b7..48ac1f5 100644
--- a/runtime/vm/service/running_isolates.dart
+++ b/runtime/vm/service/running_isolates.dart
@@ -29,7 +29,8 @@
     String isolateParam = message.params['isolateId'];
     int isolateId;
     if (!isolateParam.startsWith('isolates/')) {
-      message.setErrorResponse('Malformed isolate id $isolateParam');
+      message.setErrorResponse(
+          kInvalidParams, "invalid 'isolateId' parameter: $isolateParam");
       return message.response;
     }
     isolateParam = isolateParam.substring('isolates/'.length);
@@ -39,13 +40,15 @@
       try {
         isolateId = int.parse(isolateParam);
       } catch (e) {
-        message.setErrorResponse('Could not parse isolate id: $e');
+        message.setErrorResponse(
+            kInvalidParams, "invalid 'isolateId' parameter: $isolateParam");
         return message.response;
       }
     }
     var isolate = isolates[isolateId];
     if (isolate == null) {
-      message.setErrorResponse('Cannot find isolate id: $isolateId');
+      message.setErrorResponse(
+          kInvalidParams, "invalid 'isolateId' parameter: $isolateParam");
       return message.response;
     }
     return isolate.route(message);
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index f05214d..c18f390 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -620,7 +620,7 @@
 
 streamId | event types provided
 -------- | -----------
-Isolate | IsolateStart, IsolateExit, IsolateUpdate
+Isolate | IsolateStart, IsolateRunnable, IsolateExit, IsolateUpdate
 Debug | PauseStart, PauseExit, PauseBreakpoint, PauseInterrupted, PauseException, Resume, BreakpointAdded, BreakpointResolved, BreakpointRemoved, Inspect
 GC | GC
 
@@ -756,7 +756,7 @@
 ### Breakpoint
 
 ```
-class Breakpoint extends Response {
+class Breakpoint extends Object {
   int breakpointNumber;
   bool resolved;
   SourceLocation location;
@@ -782,7 +782,7 @@
   string name;
 
   // The error which occurred during class finalization, if it exists.
-  @Instance error [optional];
+  @Error error [optional];
 
   // Is this an abstract class?
   bool abstract;
@@ -790,15 +790,6 @@
   // Is this a const class?
   bool const;
 
-  // Has this class been finalized?
-  bool finalized;
-
-  // Is this class implemented?
-  bool implemented;
-
-  // Is this a vm patch class?
-  bool patch;
-
   // The library which contains this class.
   @Library library;
 
@@ -968,6 +959,11 @@
   // The isolate with which this event is associated.
   @Isolate isolate;
 
+  // The timestamp (in milliseconds since the epoch) associated with this event.
+  // For some isolate pause events, the timestamp is from when the isolate was
+  // paused. For other events, the timestamp is from when the event was created.
+  int timestamp;
+
   // The breakpoint which was added, removed, or resolved.
   //
   // This is provided for the event kinds:
@@ -1026,6 +1022,9 @@
   // Notification that a new isolate has started.
   IsolateStart,
 
+  // Notification that an isolate is ready to run.
+  IsolateRunnable,
+
   // Notification that an isolate has exited.
   IsolateExit,
 
@@ -1164,11 +1163,8 @@
 
 ```
 class FlagList extends Response {
-  // A list of all flags which are set to default values.
-  Flag[] unmodifiedFlags;
-
-  // A list of all flags which have been modified by the user.
-  Flag[] modifiedFlags;
+  // A list of all flags in the VM.
+  Flag[] flags;
 }
 ```
 
@@ -1181,8 +1177,7 @@
   int index;
   @Function function;
   @Code code;
-  @Script script;
-  int tokenPos;
+  SourceLocation location;
   BoundVariable[] vars;
 }
 ```
@@ -1246,6 +1241,10 @@
   //   Double (suitable for passing to Double.parse())
   //   Int (suitable for passing to int.parse())
   //   String (value may be truncated)
+  //   Float32x4
+  //   Float64x2
+  //   Int32x4
+  //   StackTrace
   string valueAsString [optional];
 
   // The valueAsString for String references may be truncated. If so,
@@ -1420,6 +1419,18 @@
   //   RegExp
   String pattern [optional];
 
+  // Whether this regular expression is case sensitive.
+  //
+  // Provided for instance kinds:
+  //   RegExp
+  bool isCaseSensitive [optional];
+
+  // Whether this regular expression matches multiple lines.
+  //
+  // Provided for instance kinds:
+  //   RegExp
+  bool isMultiLine [optional];
+
   // The key for a WeakProperty instance.
   //
   // Provided for instance kinds:
@@ -1500,6 +1511,11 @@
   // Maps will be PlainInstance.
   Map,
 
+  // Vector instance kinds.
+  Float32x4,
+  Float64x2,
+  Int32x4
+
   // An instance of the built-in VM TypedData implementations.  User-defined
   // TypedDatas will be PlainInstance.
   Uint8ClampedList,
@@ -1517,6 +1533,9 @@
   Float32x4List,
   Float64x2List,
 
+  // An instance of the Dart class StackTrace.
+  StackTrace,
+
   // An instance of the built-in VM Closure implementation. User-defined
   // Closures will be PlainInstance.
   Closure,
@@ -1582,9 +1601,6 @@
   // Suitable to pass to DateTime.fromMillisecondsSinceEpoch.
   int startTime;
 
-  // The entry function for this isolate.
-  @Function entry [optional];
-
   // The number of live ports for this isolate.
   int livePorts;
 
@@ -1595,17 +1611,26 @@
   // running, this will be a resume event.
   Event pauseEvent;
 
-  // The error that is causing this isolate to exit, if applicable.
-  Error error [optional];
+  // The entry function for this isolate.
+  //
+  // Guaranteed to be initialized when the IsolateRunnable event fires.
+  @Function entry [optional];
 
   // The root library for this isolate.
-  @Library rootLib;
+  //
+  // Guaranteed to be initialized when the IsolateRunnable event fires.
+  @Library rootLib [optional];
 
   // A list of all libraries for this isolate.
+  //
+  // Guaranteed to be initialized when the IsolateRunnable event fires.
   @Library[] libraries;
 
   // A list of all breakpoints for this isolate.
   Breakpoint[] breakpoints;
+
+  // The error that is causing this isolate to exit, if applicable.
+  Error error [optional];
 }
 ```
 
diff --git a/runtime/vm/service/vmservice.dart b/runtime/vm/service/vmservice.dart
index 2be15b6..4c12cdb 100644
--- a/runtime/vm/service/vmservice.dart
+++ b/runtime/vm/service/vmservice.dart
@@ -21,6 +21,36 @@
 
 typedef ShutdownCallback();
 
+// These must be kept in sync with the declarations in vm/json_stream.h.
+const kInvalidParams = -32602;
+const kInternalError = -32603;
+const kStreamAlreadySubscribed = 103;
+const kStreamNotSubscribed = 104;
+
+var _errorMessages = {
+  kInvalidParams: 'Invalid params',
+  kInternalError: 'Internal error',
+  kStreamAlreadySubscribed: 'Stream already subscribed',
+  kStreamNotSubscribed: 'Stream not subscribed',
+};
+
+String encodeRpcError(Message message, int code, {String details}) {
+  var response = {
+    'jsonrpc': '2.0',
+    'id' : message.serial,
+    'error' : {
+      'code': code,
+      'message': _errorMessages[code],
+    },
+  };
+  if (details != null) {
+    response['error']['data'] = {
+      'details': details,
+    };
+  }
+  return JSON.encode(response);
+}
+
 class VMService extends MessageRouter {
   static VMService _instance;
 
@@ -143,34 +173,6 @@
     message.setResponse(JSON.encode(result));
   }
 
-  // These must be kept in sync with the declarations in vm/json_stream.h.
-  static const _kInvalidParams = -32602;
-  static const _kStreamAlreadySubscribed = 103;
-  static const _kStreamNotSubscribed = 104;
-
-  var _errorMessages = {
-    _kInvalidParams: 'Invalid params"',
-    _kStreamAlreadySubscribed: 'Stream already subscribed',
-    _kStreamNotSubscribed: 'Stream not subscribed',
-  };
-
-  String _encodeError(Message message, int code, {String details}) {
-    var response = {
-      'jsonrpc': '2.0',
-      'id' : message.serial,
-      'error' : {
-        'code': code,
-        'message': _errorMessages[code],
-      },
-    };
-    if (details != null) {
-      response['error']['data'] = {
-        'details': details,
-      };
-    }
-    return JSON.encode(response);
-  }
-
   String _encodeResult(Message message, Map result) {
     var response = {
       'jsonrpc': '2.0',
@@ -194,12 +196,12 @@
     var streamId = message.params['streamId'];
 
     if (client.streams.contains(streamId)) {
-      return _encodeError(message, _kStreamAlreadySubscribed);
+      return encodeRpcError(message, kStreamAlreadySubscribed);
     }
     if (!_isAnyClientSubscribed(streamId)) {
       if (!_vmListenStream(streamId)) {
-        return _encodeError(
-            message, _kInvalidParams,
+        return encodeRpcError(
+            message, kInvalidParams,
             details:"streamListen: invalid 'streamId' parameter: ${streamId}");
       }
     }
@@ -214,7 +216,7 @@
     var streamId = message.params['streamId'];
 
     if (!client.streams.contains(streamId)) {
-      return _encodeError(message, _kStreamNotSubscribed);
+      return encodeRpcError(message, kStreamNotSubscribed);
     }
     client.streams.remove(streamId);
     if (!_isAnyClientSubscribed(streamId)) {
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index d704091..42dd202 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -4,6 +4,8 @@
 
 #include "vm/service_event.h"
 
+#include "vm/message_handler.h"
+
 namespace dart {
 
 // Translate from the legacy DebugEvent to a ServiceEvent.
@@ -30,6 +32,31 @@
     }
 }
 
+
+ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
+    : isolate_(isolate),
+      kind_(event_kind),
+      embedder_kind_(NULL),
+      embedder_stream_id_(NULL),
+      breakpoint_(NULL),
+      top_frame_(NULL),
+      exception_(NULL),
+      async_continuation_(NULL),
+      at_async_jump_(false),
+      inspectee_(NULL),
+      gc_stats_(NULL),
+      bytes_(NULL),
+      bytes_length_(0),
+      timestamp_(OS::GetCurrentTimeMillis()) {
+  if ((event_kind == ServiceEvent::kPauseStart) ||
+      (event_kind == ServiceEvent::kPauseExit)) {
+    timestamp_ = isolate->message_handler()->paused_timestamp();
+  } else if (event_kind == ServiceEvent::kResume) {
+    timestamp_ = isolate->last_resume_timestamp();
+  }
+}
+
+
 ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
     : isolate_(debugger_event->isolate()),
       kind_(TranslateEventKind(debugger_event->type())),
@@ -40,11 +67,13 @@
       inspectee_(NULL),
       gc_stats_(NULL),
       bytes_(NULL),
-      bytes_length_(0) {
+      bytes_length_(0),
+      timestamp_(OS::GetCurrentTimeMillis()) {
   DebuggerEvent::EventType type = debugger_event->type();
   if (type == DebuggerEvent::kBreakpointReached) {
     set_breakpoint(debugger_event->breakpoint());
     set_async_continuation(debugger_event->async_continuation());
+    set_at_async_jump(debugger_event->at_async_jump());
   }
   if (type == DebuggerEvent::kExceptionThrown) {
     set_exception(debugger_event->exception());
@@ -54,6 +83,9 @@
       type == DebuggerEvent::kExceptionThrown) {
     set_top_frame(debugger_event->top_frame());
   }
+  if (debugger_event->timestamp() != -1) {
+    timestamp_ = debugger_event->timestamp();
+  }
 }
 
 
@@ -61,6 +93,8 @@
   switch (kind()) {
     case kIsolateStart:
       return "IsolateStart";
+    case kIsolateRunnable:
+      return "IsolateRunnable";
     case kIsolateExit:
       return "IsolateExit";
     case kIsolateUpdate:
@@ -105,6 +139,7 @@
 const char* ServiceEvent::stream_id() const {
   switch (kind()) {
     case kIsolateStart:
+    case kIsolateRunnable:
     case kIsolateExit:
     case kIsolateUpdate:
       return Service::isolate_stream.id();
@@ -168,6 +203,7 @@
   }
   if (async_continuation() != NULL && !async_continuation()->IsNull()) {
     jsobj.AddProperty("_asyncContinuation", *(async_continuation()));
+    jsobj.AddProperty("_atAsyncJump", at_async_jump());
   }
   if (inspectee() != NULL) {
     jsobj.AddProperty("inspectee", *(inspectee()));
@@ -199,6 +235,8 @@
   jsobj->AddProperty("type", "Event");
   jsobj->AddProperty("kind", KindAsCString());
   jsobj->AddProperty("isolate", isolate());
+  ASSERT(timestamp_ != -1);
+  jsobj->AddPropertyTimeMillis("timestamp", timestamp_);
 }
 
 }  // namespace dart
diff --git a/runtime/vm/service_event.h b/runtime/vm/service_event.h
index 6ebc211..3268051 100644
--- a/runtime/vm/service_event.h
+++ b/runtime/vm/service_event.h
@@ -15,6 +15,7 @@
  public:
   enum EventKind {
     kIsolateStart,       // New isolate has started
+    kIsolateRunnable,    // Isolate is ready to run
     kIsolateExit,        // Isolate has exited
     kIsolateUpdate,      // Isolate identity information has changed
 
@@ -50,19 +51,7 @@
     const Instance* stack_trace;
   };
 
-  ServiceEvent(Isolate* isolate, EventKind event_kind)
-      : isolate_(isolate),
-        kind_(event_kind),
-        embedder_kind_(NULL),
-        embedder_stream_id_(NULL),
-        breakpoint_(NULL),
-        top_frame_(NULL),
-        exception_(NULL),
-        async_continuation_(NULL),
-        inspectee_(NULL),
-        gc_stats_(NULL),
-        bytes_(NULL),
-        bytes_length_(0) {}
+  ServiceEvent(Isolate* isolate, EventKind event_kind);
 
   explicit ServiceEvent(const DebuggerEvent* debugger_event);
 
@@ -122,6 +111,13 @@
     async_continuation_ = closure;
   }
 
+  bool at_async_jump() const {
+    return at_async_jump_;
+  }
+  void set_at_async_jump(bool value) {
+    at_async_jump_ = value;
+  }
+
   const Object* inspectee() const {
     return inspectee_;
   }
@@ -155,6 +151,10 @@
     log_record_ = log_record;
   }
 
+  int64_t timestamp() const {
+    return timestamp_;
+  }
+
   void PrintJSON(JSONStream* js) const;
 
   void PrintJSONHeader(JSONObject* jsobj) const;
@@ -168,11 +168,13 @@
   ActivationFrame* top_frame_;
   const Object* exception_;
   const Object* async_continuation_;
+  bool at_async_jump_;
   const Object* inspectee_;
   const Heap::GCStats* gc_stats_;
   const uint8_t* bytes_;
   intptr_t bytes_length_;
   LogRecord log_record_;
+  int64_t timestamp_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 3779905..177129d 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -614,6 +614,8 @@
  public:
   virtual void Run() {
     ASSERT(Isolate::Current() == NULL);
+    TimelineDurationScope tds(Timeline::GetVMStream(),
+                              "ServiceIsolateStartup");
     char* error = NULL;
     Isolate* isolate = NULL;
 
@@ -643,7 +645,6 @@
       return;
     }
 
-    isolate->RemoveTimelineEventRecorder();
 
     Thread::ExitIsolate();
 
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 310305a..f5fe86f 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -120,7 +120,8 @@
   // Both RingServiceIdZones share the same backing store and id space.
 
   // Always allocate a new id.
-  RingServiceIdZone always_new_zone(ring, ObjectIdRing::kAllocateId);
+  RingServiceIdZone always_new_zone;
+  always_new_zone.Init(ring, ObjectIdRing::kAllocateId);
   EXPECT_STREQ("objects/0", always_new_zone.GetServiceId(test_a));
   EXPECT_STREQ("objects/1", always_new_zone.GetServiceId(test_a));
   EXPECT_STREQ("objects/2", always_new_zone.GetServiceId(test_a));
@@ -128,7 +129,8 @@
   EXPECT_STREQ("objects/4", always_new_zone.GetServiceId(test_c));
 
   // Reuse an existing id or allocate a new id.
-  RingServiceIdZone reuse_zone(ring, ObjectIdRing::kReuseId);
+  RingServiceIdZone reuse_zone;
+  reuse_zone.Init(ring, ObjectIdRing::kReuseId);
   EXPECT_STREQ("objects/0", reuse_zone.GetServiceId(test_a));
   EXPECT_STREQ("objects/0", reuse_zone.GetServiceId(test_a));
   EXPECT_STREQ("objects/3", reuse_zone.GetServiceId(test_b));
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
index 5e0d1ed..3976c0c 100644
--- a/runtime/vm/simulator_arm.h
+++ b/runtime/vm/simulator_arm.h
@@ -88,7 +88,7 @@
   // Call on program start.
   static void InitOnce();
 
-  // Dart generally calls into generated code with 5 parameters. This is a
+  // Dart generally calls into generated code with 4 parameters. This is a
   // convenience function, which sets up the simulator state and grabs the
   // result on return. When fp_return is true the return value is the D0
   // floating point register. Otherwise, the return value is R1:R0.
diff --git a/runtime/vm/simulator_arm64.h b/runtime/vm/simulator_arm64.h
index ceecb49..d23e83b 100644
--- a/runtime/vm/simulator_arm64.h
+++ b/runtime/vm/simulator_arm64.h
@@ -85,7 +85,7 @@
   // Call on program start.
   static void InitOnce();
 
-  // Dart generally calls into generated code with 5 parameters. This is a
+  // Dart generally calls into generated code with 4 parameters. This is a
   // convenience function, which sets up the simulator state and grabs the
   // result on return. The return value is R0. The parameters are placed in
   // R0-3.
diff --git a/runtime/vm/simulator_mips.h b/runtime/vm/simulator_mips.h
index 4243072..b4807bf 100644
--- a/runtime/vm/simulator_mips.h
+++ b/runtime/vm/simulator_mips.h
@@ -104,7 +104,7 @@
   // Call on program start.
   static void InitOnce();
 
-  // Dart generally calls into generated code with 5 parameters. This is a
+  // Dart generally calls into generated code with 4 parameters. This is a
   // convenience function, which sets up the simulator state and grabs the
   // result on return. When fp_return is true the return value is the D0
   // floating point register. Otherwise, the return value is V1:V0.
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 4b92acd..415d1ed 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -177,6 +177,7 @@
     Zone* zone)
     : BaseReader(buffer, size),
       kind_(kind),
+      snapshot_code_(false),
       isolate_(isolate),
       zone_(zone),
       heap_(isolate->heap()),
@@ -303,20 +304,21 @@
 
 
 void SnapshotReader::SetReadException(const char* msg) {
-  Isolate* isolate = Isolate::Current();
-  const String& error_str = String::Handle(isolate, String::New(msg));
-  const Array& args = Array::Handle(isolate, Array::New(1));
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const String& error_str = String::Handle(zone, String::New(msg));
+  const Array& args = Array::Handle(zone, Array::New(1));
   args.SetAt(0, error_str);
-  Object& result = Object::Handle(isolate);
-  const Library& library = Library::Handle(isolate, Library::CoreLibrary());
+  Object& result = Object::Handle(zone);
+  const Library& library = Library::Handle(zone, Library::CoreLibrary());
   result = DartLibraryCalls::InstanceCreate(library,
                                             Symbols::ArgumentError(),
                                             Symbols::Dot(),
                                             args);
-  const Stacktrace& stacktrace = Stacktrace::Handle(isolate);
+  const Stacktrace& stacktrace = Stacktrace::Handle(zone);
   const UnhandledException& error = UnhandledException::Handle(
-      isolate, UnhandledException::New(Instance::Cast(result), stacktrace));
-  isolate->long_jump_base()->Jump(1, error);
+      zone, UnhandledException::New(Instance::Cast(result), stacktrace));
+  thread->long_jump_base()->Jump(1, error);
 }
 
 
@@ -925,6 +927,32 @@
 }
 
 
+RawCode* SnapshotReader::NewCode(intptr_t pointer_offsets_length) {
+  ASSERT(pointer_offsets_length == 0);
+  ALLOC_NEW_OBJECT(Code);
+}
+
+
+RawObjectPool* SnapshotReader::NewObjectPool(intptr_t length) {
+  ALLOC_NEW_OBJECT(ObjectPool);
+}
+
+
+RawICData* SnapshotReader::NewICData() {
+  ALLOC_NEW_OBJECT(ICData);
+}
+
+
+RawMegamorphicCache* SnapshotReader::NewMegamorphicCache() {
+  ALLOC_NEW_OBJECT(MegamorphicCache);
+}
+
+
+RawSubtypeTestCache* SnapshotReader::NewSubtypeTestCache() {
+  ALLOC_NEW_OBJECT(SubtypeTestCache);
+}
+
+
 RawField* SnapshotReader::NewField() {
   ALLOC_NEW_OBJECT(Field);
 }
@@ -1032,6 +1060,12 @@
 }
 
 
+RawInstructions* SnapshotReader::GetInstructionsById(int32_t id) {
+  // TODO(rmacnak): Read from shared library.
+  return Instructions::null();
+}
+
+
 intptr_t SnapshotReader::LookupInternalClass(intptr_t class_header) {
   // If the header is an object Id, lookup singleton VM classes or classes
   // stored in the object store.
@@ -1065,7 +1099,7 @@
     // read part and return the error object back.
     const UnhandledException& error = UnhandledException::Handle(
         object_store()->preallocated_unhandled_exception());
-    Isolate::Current()->long_jump_base()->Jump(1, error);
+    Thread::Current()->long_jump_base()->Jump(1, error);
   }
   VerifiedMemory::Accept(address, size);
 
@@ -1089,6 +1123,9 @@
   if (object_id == kSentinelObject) {
     return Object::sentinel().raw();
   }
+  if (object_id == kTransitionSentinelObject) {
+    return Object::transition_sentinel().raw();
+  }
   if (object_id == kEmptyArrayObject) {
     return Object::empty_array().raw();
   }
@@ -1107,6 +1144,15 @@
   if (object_id == kFalseValue) {
     return Bool::False().raw();
   }
+  if (object_id == kExtractorParameterTypes) {
+    return Object::extractor_parameter_types().raw();
+  }
+  if (object_id == kExtractorParameterNames) {
+    return Object::extractor_parameter_names().raw();
+  }
+  if (object_id == kEmptyContextScopeObject) {
+    return Object::empty_context_scope().raw();
+  }
   if (object_id == kDoubleObject) {
     ASSERT(kind_ == Snapshot::kMessage);
     return Double::New(ReadDouble());
@@ -1353,7 +1399,8 @@
                                ReAlloc alloc,
                                intptr_t initial_size,
                                ForwardList* forward_list,
-                               bool can_send_any_object)
+                               bool can_send_any_object,
+                               bool snapshot_code)
     : BaseWriter(buffer, alloc, initial_size),
       kind_(kind),
       isolate_(Isolate::Current()),
@@ -1363,7 +1410,8 @@
       exception_type_(Exceptions::kNone),
       exception_msg_(NULL),
       unmarked_objects_(false),
-      can_send_any_object_(can_send_any_object) {
+      can_send_any_object_(can_send_any_object),
+      snapshot_code_(snapshot_code) {
   ASSERT(forward_list_ != NULL);
 }
 
@@ -1378,6 +1426,7 @@
   V(Mint)                                                                      \
   V(Bigint)                                                                    \
   V(Double)                                                                    \
+  V(ImmutableArray)                                                            \
 
 #define VM_OBJECT_WRITE(clazz)                                                 \
   case clazz::kClassId: {                                                      \
@@ -1400,6 +1449,12 @@
     return;
   }
 
+  // Check if it is a singleton sentinel object.
+  if (rawobj == Object::transition_sentinel().raw()) {
+    WriteVMIsolateObject(kTransitionSentinelObject);
+    return;
+  }
+
   // Check if it is a singleton empty array object.
   if (rawobj == Object::empty_array().raw()) {
     WriteVMIsolateObject(kEmptyArrayObject);
@@ -1436,6 +1491,24 @@
     return;
   }
 
+  // Check if it is a singleton extractor parameter types array.
+  if (rawobj == Object::extractor_parameter_types().raw()) {
+    WriteVMIsolateObject(kExtractorParameterTypes);
+    return;
+  }
+
+  // Check if it is a singleton extractor parameter names array.
+  if (rawobj == Object::extractor_parameter_names().raw()) {
+    WriteVMIsolateObject(kExtractorParameterNames);
+    return;
+  }
+
+  // Check if it is a singleton empty context scope object.
+  if (rawobj == Object::empty_context_scope().raw()) {
+    WriteVMIsolateObject(kEmptyContextScopeObject);
+    return;
+  }
+
   // Check if it is a singleton class object which is shared by
   // all isolates.
   intptr_t id = rawobj->GetClassId();
@@ -1486,7 +1559,9 @@
       }
     }
   }
-  UNREACHABLE();
+
+  const Object& obj = Object::Handle(rawobj);
+  FATAL1("Unexpected reference to object in VM isolate: %s\n", obj.ToCString());
 }
 
 #undef VM_OBJECT_WRITE
@@ -1531,7 +1606,8 @@
 
 FullSnapshotWriter::FullSnapshotWriter(uint8_t** vm_isolate_snapshot_buffer,
                                        uint8_t** isolate_snapshot_buffer,
-                                       ReAlloc alloc)
+                                       ReAlloc alloc,
+                                       bool snapshot_code)
     : isolate_(Isolate::Current()),
       vm_isolate_snapshot_buffer_(vm_isolate_snapshot_buffer),
       isolate_snapshot_buffer_(isolate_snapshot_buffer),
@@ -1540,7 +1616,8 @@
       isolate_snapshot_size_(0),
       forward_list_(NULL),
       scripts_(Array::Handle(isolate_)),
-      symbol_table_(Array::Handle(isolate_)) {
+      symbol_table_(Array::Handle(isolate_)),
+      snapshot_code_(snapshot_code) {
   ASSERT(isolate_snapshot_buffer_ != NULL);
   ASSERT(alloc_ != NULL);
   ASSERT(isolate_ != NULL);
@@ -1591,7 +1668,8 @@
                         alloc_,
                         kInitialSize,
                         forward_list_,
-                        true);  // Can send any kind of object.
+                        true, /* can_send_any_object */
+                        snapshot_code_);
   // Write full snapshot for the VM isolate.
   // Setup for long jump in case there is an exception while writing
   // the snapshot.
@@ -1635,7 +1713,8 @@
                         alloc_,
                         kInitialSize,
                         forward_list_,
-                        true);
+                        true, /* can_send_any_object */
+                        snapshot_code_);
   ObjectStore* object_store = isolate_->object_store();
   ASSERT(object_store != NULL);
 
@@ -1678,6 +1757,20 @@
 }
 
 
+PrecompiledSnapshotWriter::PrecompiledSnapshotWriter(
+    uint8_t** vm_isolate_snapshot_buffer,
+    uint8_t** isolate_snapshot_buffer,
+    ReAlloc alloc)
+  : FullSnapshotWriter(vm_isolate_snapshot_buffer,
+                       isolate_snapshot_buffer,
+                       alloc,
+                       true /* snapshot_code */) {
+}
+
+
+PrecompiledSnapshotWriter::~PrecompiledSnapshotWriter() {}
+
+
 uword SnapshotWriter::GetObjectTags(RawObject* raw) {
   uword tags = raw->ptr()->tags_;
   if (SerializedHeaderTag::decode(tags) == kObjectId) {
@@ -1808,7 +1901,7 @@
 
   // Check if it is a code object in that case just write a Null object
   // as we do not want code objects in the snapshot.
-  if (cid == kCodeCid) {
+  if (cid == kCodeCid && !snapshot_code()) {
     WriteVMIsolateObject(kNullObject);
     return true;
   }
@@ -2178,7 +2271,7 @@
   set_exception_type(type);
   set_exception_msg(msg);
   // The more specific error is set up in SnapshotWriter::ThrowException().
-  isolate()->long_jump_base()->
+  thread()->long_jump_base()->
       Jump(1, Object::snapshot_writer_error());
 }
 
@@ -2325,7 +2418,8 @@
                      alloc,
                      kInitialSize,
                      &forward_list_,
-                     true),
+                     true, /* can_send_any_object */
+                     false /* snapshot_code */),
       forward_list_(kMaxPredefinedObjectIds) {
   ASSERT(buffer != NULL);
   ASSERT(alloc != NULL);
@@ -2379,7 +2473,8 @@
                      alloc,
                      kInitialSize,
                      &forward_list_,
-                     can_send_any_object),
+                     can_send_any_object,
+                     false /* snapshot_code */),
       forward_list_(kMaxPredefinedObjectIds) {
   ASSERT(buffer != NULL);
   ASSERT(alloc != NULL);
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 4b3a278..d58490e 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -45,18 +45,22 @@
 class RawFloat64x2;
 class RawFunction;
 class RawGrowableObjectArray;
+class RawICData;
 class RawImmutableArray;
+class RawInstructions;
 class RawInt32x4;
 class RawLanguageError;
 class RawLibrary;
 class RawLibraryPrefix;
 class RawLinkedHashMap;
 class RawLiteralToken;
+class RawMegamorphicCache;
 class RawMint;
 class RawMixinAppType;
 class RawBigint;
 class RawNamespace;
 class RawObject;
+class RawObjectPool;
 class RawOneByteString;
 class RawPatchClass;
 class RawReceivePort;
@@ -65,6 +69,7 @@
 class RawSendPort;
 class RawSmi;
 class RawStacktrace;
+class RawSubtypeTestCache;
 class RawTokenStream;
 class RawTwoByteString;
 class RawType;
@@ -308,7 +313,7 @@
   ExternalTypedData* DataHandle() { return &data_; }
   TypedData* TypedDataHandle() { return &typed_data_; }
   Snapshot::Kind kind() const { return kind_; }
-  bool allow_code() const { return false; }
+  bool snapshot_code() const { return snapshot_code_; }
 
   // Reads an object.
   RawObject* ReadObject();
@@ -357,6 +362,11 @@
   RawClosureData* NewClosureData();
   RawRedirectionData* NewRedirectionData();
   RawFunction* NewFunction();
+  RawCode* NewCode(intptr_t pointer_offsets_length);
+  RawObjectPool* NewObjectPool(intptr_t length);
+  RawICData* NewICData();
+  RawMegamorphicCache* NewMegamorphicCache();
+  RawSubtypeTestCache* NewSubtypeTestCache();
   RawField* NewField();
   RawLibrary* NewLibrary();
   RawLibraryPrefix* NewLibraryPrefix();
@@ -373,6 +383,8 @@
   RawObject* NewInteger(int64_t value);
   RawStacktrace* NewStacktrace();
 
+  RawInstructions* GetInstructionsById(int32_t id);
+
  protected:
   SnapshotReader(const uint8_t* buffer,
                  intptr_t size,
@@ -453,6 +465,7 @@
   bool is_vm_isolate() const;
 
   Snapshot::Kind kind_;  // Indicates type of snapshot(full, script, message).
+  bool snapshot_code_;
   Isolate* isolate_;  // Current isolate.
   Zone* zone_;  // Zone for allocations while reading snapshot.
   Heap* heap_;  // Heap of the current isolate.
@@ -476,39 +489,44 @@
 
   friend class ApiError;
   friend class Array;
+  friend class Bigint;
   friend class BoundedType;
-  friend class MixinAppType;
   friend class Class;
+  friend class ClosureData;
+  friend class Code;
   friend class Context;
   friend class ContextScope;
+  friend class ExceptionHandlers;
   friend class Field;
-  friend class ClosureData;
-  friend class RedirectionData;
   friend class Function;
   friend class GrowableObjectArray;
-  friend class LinkedHashMap;
+  friend class ICData;
   friend class ImmutableArray;
   friend class JSRegExp;
   friend class LanguageError;
   friend class Library;
   friend class LibraryPrefix;
-  friend class Namespace;
-  friend class Bigint;
+  friend class LinkedHashMap;
   friend class LiteralToken;
+  friend class LocalVarDescriptors;
+  friend class MegamorphicCache;
+  friend class MirrorReference;
+  friend class MixinAppType;
+  friend class Namespace;
+  friend class ObjectPool;
   friend class PatchClass;
+  friend class RedirectionData;
   friend class Script;
   friend class Stacktrace;
+  friend class SubtypeTestCache;
   friend class TokenStream;
   friend class Type;
   friend class TypeArguments;
   friend class TypeParameter;
   friend class TypeRef;
-  friend class UnresolvedClass;
   friend class UnhandledException;
+  friend class UnresolvedClass;
   friend class WeakProperty;
-  friend class MirrorReference;
-  friend class ExceptionHandlers;
-  friend class LocalVarDescriptors;
   DISALLOW_COPY_AND_ASSIGN(SnapshotReader);
 };
 
@@ -722,12 +740,12 @@
                  ReAlloc alloc,
                  intptr_t initial_size,
                  ForwardList* forward_list,
-                 bool can_send_any_object);
+                 bool can_send_any_object,
+                 bool snapshot_code);
 
  public:
   // Snapshot kind.
   Snapshot::Kind kind() const { return kind_; }
-  bool allow_code() const { return false; }
 
   // Serialize an object into the buffer.
   void WriteObject(RawObject* raw);
@@ -745,6 +763,7 @@
     exception_msg_ = msg;
   }
   bool can_send_any_object() const { return can_send_any_object_; }
+  bool snapshot_code() const { return snapshot_code_; }
   void ThrowException(Exceptions::ExceptionType type, const char* msg);
 
   // Write a version string for the snapshot.
@@ -752,6 +771,8 @@
 
   static intptr_t FirstObjectId();
 
+  int32_t GetInstructionsId(RawInstructions* instructions) { return 0; }
+
  protected:
   void UnmarkAll() {
     if (!unmarked_objects_ && forward_list_ != NULL) {
@@ -811,26 +832,31 @@
   const char* exception_msg_;  // Message associated with exception.
   bool unmarked_objects_;  // True if marked objects have been unmarked.
   bool can_send_any_object_;  // True if any Dart instance can be sent.
+  bool snapshot_code_;
 
   friend class FullSnapshotWriter;
   friend class RawArray;
   friend class RawClass;
   friend class RawClosureData;
+  friend class RawContextScope;
+  friend class RawExceptionHandlers;
   friend class RawGrowableObjectArray;
-  friend class RawLinkedHashMap;
   friend class RawImmutableArray;
+  friend class RawInstructions;
   friend class RawJSRegExp;
   friend class RawLibrary;
+  friend class RawLinkedHashMap;
   friend class RawLiteralToken;
+  friend class RawLocalVarDescriptors;
   friend class RawMirrorReference;
+  friend class RawObjectPool;
   friend class RawReceivePort;
   friend class RawScript;
   friend class RawStacktrace;
+  friend class RawSubtypeTestCache;
   friend class RawTokenStream;
   friend class RawTypeArguments;
   friend class RawUserTag;
-  friend class RawExceptionHandlers;
-  friend class RawLocalVarDescriptors;
   friend class SnapshotWriterVisitor;
   friend class WriteInlinedObjectVisitor;
   DISALLOW_COPY_AND_ASSIGN(SnapshotWriter);
@@ -842,7 +868,8 @@
   static const intptr_t kInitialSize = 64 * KB;
   FullSnapshotWriter(uint8_t** vm_isolate_snapshot_buffer,
                      uint8_t** isolate_snapshot_buffer,
-                     ReAlloc alloc);
+                     ReAlloc alloc,
+                     bool snapshot_code);
   ~FullSnapshotWriter();
 
   uint8_t** vm_isolate_snapshot_buffer() {
@@ -879,11 +906,21 @@
   ForwardList* forward_list_;
   Array& scripts_;
   Array& symbol_table_;
+  bool snapshot_code_;
 
   DISALLOW_COPY_AND_ASSIGN(FullSnapshotWriter);
 };
 
 
+class PrecompiledSnapshotWriter : public FullSnapshotWriter {
+ public:
+  PrecompiledSnapshotWriter(uint8_t** vm_isolate_snapshot_buffer,
+                            uint8_t** isolate_snapshot_buffer,
+                            ReAlloc alloc);
+  ~PrecompiledSnapshotWriter();
+};
+
+
 class ScriptSnapshotWriter : public SnapshotWriter {
  public:
   static const intptr_t kInitialSize = 64 * KB;
diff --git a/runtime/vm/snapshot_ids.h b/runtime/vm/snapshot_ids.h
index dc1500e..a65df69 100644
--- a/runtime/vm/snapshot_ids.h
+++ b/runtime/vm/snapshot_ids.h
@@ -13,6 +13,7 @@
 enum {
   kNullObject = 0,
   kSentinelObject,
+  kTransitionSentinelObject,
   kEmptyArrayObject,
   kZeroArrayObject,
   kTrueValue,
@@ -41,6 +42,11 @@
   kStringType,
   kArrayType,
 
+  kExtractorParameterTypes,
+  kExtractorParameterNames,
+  kEmptyContextScopeObject,
+  kImplicitClosureScopeObject,
+
   kInstanceObjectId,
   kStaticImplicitClosureObjectId,
   kMaxPredefinedObjectIds,
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 0c4ccaa..9c67df8 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -135,7 +135,7 @@
   ApiMessageWriter writer(&buffer, &malloc_allocator);
   writer.WriteCMessage(root);
 
-  ApiMessageReader api_reader(buffer, writer.BytesWritten(), &zone_allocator);
+  ApiMessageReader api_reader(buffer, writer.BytesWritten());
   Dart_CObject* new_root = api_reader.ReadMessage();
 
   // Check that the two messages are the same.
@@ -152,7 +152,7 @@
 
 
 TEST_CASE(SerializeNull) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const Object& null_object = Object::Handle();
@@ -171,7 +171,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kNull, root->type);
@@ -180,7 +180,7 @@
 
 
 TEST_CASE(SerializeSmi1) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const Smi& smi = Smi::Handle(Smi::New(124));
@@ -199,7 +199,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kInt32, root->type);
@@ -209,7 +209,7 @@
 
 
 TEST_CASE(SerializeSmi2) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const Smi& smi = Smi::Handle(Smi::New(-1));
@@ -228,7 +228,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kInt32, root->type);
@@ -246,7 +246,7 @@
 
   {
     // Switch to a regular zone, where VM handle allocation is allowed.
-    StackZone zone(Isolate::Current());
+    StackZone zone(Thread::Current());
     // Read object back from the snapshot.
     MessageSnapshotReader reader(buffer,
                                  buffer_len,
@@ -257,7 +257,7 @@
   }
 
   // Read object back from the snapshot into a C structure.
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   CheckEncodeDecodeMessage(root);
@@ -266,7 +266,7 @@
 
 
 void CheckMint(int64_t value) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   Mint& mint = Mint::Handle();
   mint ^= Integer::New(value);
@@ -312,7 +312,7 @@
 
 
 TEST_CASE(SerializeDouble) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const Double& dbl = Double::Handle(Double::New(101.29));
@@ -331,7 +331,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kDouble, root->type);
@@ -341,7 +341,7 @@
 
 
 TEST_CASE(SerializeTrue) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with true object.
   const Bool& bl = Bool::True();
@@ -362,7 +362,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kBool, root->type);
@@ -372,7 +372,7 @@
 
 
 TEST_CASE(SerializeFalse) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with false object.
   const Bool& bl = Bool::False();
@@ -391,7 +391,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kBool, root->type);
@@ -406,7 +406,7 @@
 
 
 TEST_CASE(SerializeCapability) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const Capability& capability = Capability::Handle(Capability::New(12345));
@@ -427,7 +427,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kCapability, root->type);
@@ -438,7 +438,7 @@
 
 
 TEST_CASE(SerializeBigint) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const char* cstr = "0x270FFFFFFFFFFFFFD8F0";
@@ -462,7 +462,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kBigint, root->type);
@@ -482,7 +482,7 @@
 
   {
     // Switch to a regular zone, where VM handle allocation is allowed.
-    StackZone zone(Isolate::Current());
+    StackZone zone(Thread::Current());
     // Read object back from the snapshot.
     MessageSnapshotReader reader(buffer,
                                  buffer_len,
@@ -498,7 +498,7 @@
   }
 
   // Read object back from the snapshot into a C structure.
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   // Bigint not supported.
   EXPECT_NOTNULL(root);
@@ -508,7 +508,7 @@
 
 
 void CheckBigint(const char* bigint_value) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   Bigint& bigint = Bigint::Handle();
   bigint ^= Bigint::NewFromCString(bigint_value);
   ApiNativeScope scope;
@@ -573,7 +573,7 @@
 
 
 static void TestString(const char* cstr) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   EXPECT(Utf8::IsValid(reinterpret_cast<const uint8_t*>(cstr), strlen(cstr)));
   // Write snapshot with object content.
   String& str = String::Handle(String::New(cstr));
@@ -593,7 +593,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kString, root->type);
   EXPECT_STREQ(cstr, root->value.as_string);
@@ -617,7 +617,7 @@
 
 
 TEST_CASE(SerializeArray) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const int kArrayLength = 10;
@@ -643,7 +643,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kArray, root->type);
   EXPECT_EQ(kArrayLength, root->value.as_array.length);
@@ -709,7 +709,7 @@
 
 
 TEST_CASE(SerializeEmptyArray) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const int kArrayLength = 0;
@@ -730,7 +730,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kArray, root->type);
   EXPECT_EQ(kArrayLength, root->value.as_array.length);
@@ -740,7 +740,7 @@
 
 
 TEST_CASE(SerializeByteArray) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const int kTypedDataLength = 256;
@@ -765,7 +765,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kTypedData, root->type);
   EXPECT_EQ(kTypedDataLength, root->value.as_typed_data.length);
@@ -778,7 +778,7 @@
 
 #define TEST_TYPED_ARRAY(darttype, ctype)                                     \
   {                                                                           \
-    StackZone zone(Isolate::Current());                                       \
+    StackZone zone(Thread::Current());                                       \
     const int kArrayLength = 127;                                             \
     TypedData& array = TypedData::Handle(                                     \
         TypedData::New(kTypedData##darttype##ArrayCid, kArrayLength));        \
@@ -804,7 +804,7 @@
 
 #define TEST_EXTERNAL_TYPED_ARRAY(darttype, ctype)                            \
   {                                                                           \
-    StackZone zone(Isolate::Current());                                       \
+    StackZone zone(Thread::Current());                                       \
     ctype data[] = { 0, 11, 22, 33, 44, 55, 66, 77 };                         \
     intptr_t length = ARRAY_SIZE(data);                                       \
     ExternalTypedData& array = ExternalTypedData::Handle(                     \
@@ -856,7 +856,7 @@
 
 
 TEST_CASE(SerializeEmptyByteArray) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
 
   // Write snapshot with object content.
   const int kTypedDataLength = 0;
@@ -878,7 +878,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kTypedData, root->type);
   EXPECT_EQ(Dart_TypedData_kUint8, root->value.as_typed_data.type);
@@ -897,7 +897,8 @@
                        alloc,
                        kInitialSize,
                        &forward_list_,
-                       true),
+                       true, /* can_send_any_object */
+                       false /* snapshot_code */),
         forward_list_(kMaxPredefinedObjectIds) {
     ASSERT(buffer != NULL);
     ASSERT(alloc != NULL);
@@ -1244,7 +1245,8 @@
     {
       FullSnapshotWriter writer(NULL,
                                 &isolate_snapshot_buffer,
-                                &malloc_allocator);
+                                &malloc_allocator,
+                                false /* snapshot_code */);
       writer.WriteFullSnapshot();
     }
   }
@@ -1302,7 +1304,8 @@
     {
       FullSnapshotWriter writer(NULL,
                                 &isolate_snapshot_buffer,
-                                &malloc_allocator);
+                                &malloc_allocator,
+                                false /* snapshot_code */);
       writer.WriteFullSnapshot();
     }
 
@@ -1716,7 +1719,7 @@
 
 
 TEST_CASE(IntArrayMessage) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   uint8_t* buffer = NULL;
   ApiMessageWriter writer(&buffer, &zone_allocator);
 
@@ -1727,9 +1730,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer,
-                              writer.BytesWritten(),
-                              &zone_allocator);
+  ApiMessageReader api_reader(buffer, writer.BytesWritten());
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_EQ(Dart_CObject_kArray, root->type);
   EXPECT_EQ(kArrayLength, root->value.as_array.length);
@@ -1763,13 +1764,13 @@
 // Helper function to deserialize the result into a Dart_CObject structure.
 static Dart_CObject* GetDeserialized(uint8_t* buffer, intptr_t buffer_len) {
   // Read object back from the snapshot into a C structure.
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   return api_reader.ReadMessage();
 }
 
 
 static void CheckString(Dart_Handle dart_string, const char* expected) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   String& str = String::Handle();
   str ^= Api::UnwrapHandle(dart_string);
   uint8_t* buffer;
@@ -1779,7 +1780,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kString, root->type);
@@ -1789,7 +1790,7 @@
 
 
 static void CheckStringInvalid(Dart_Handle dart_string) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   String& str = String::Handle();
   str ^= Api::UnwrapHandle(dart_string);
   uint8_t* buffer;
@@ -1799,7 +1800,7 @@
 
   // Read object back from the snapshot into a C structure.
   ApiNativeScope scope;
-  ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+  ApiMessageReader api_reader(buffer, buffer_len);
   Dart_CObject* root = api_reader.ReadMessage();
   EXPECT_NOTNULL(root);
   EXPECT_EQ(Dart_CObject_kUnsupported, root->type);
@@ -1899,7 +1900,7 @@
     DARTSCOPE(isolate);
 
     {
-      StackZone zone(Isolate::Current());
+      StackZone zone(Thread::Current());
       Smi& smi = Smi::Handle();
       smi ^= Api::UnwrapHandle(smi_result);
       uint8_t* buffer;
@@ -1909,7 +1910,7 @@
 
       // Read object back from the snapshot into a C structure.
       ApiNativeScope scope;
-      ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+      ApiMessageReader api_reader(buffer, buffer_len);
       Dart_CObject* root = api_reader.ReadMessage();
       EXPECT_NOTNULL(root);
       EXPECT_EQ(Dart_CObject_kInt32, root->type);
@@ -1917,7 +1918,7 @@
       CheckEncodeDecodeMessage(root);
     }
     {
-      StackZone zone(Isolate::Current());
+      StackZone zone(Thread::Current());
       Bigint& bigint = Bigint::Handle();
       bigint ^= Api::UnwrapHandle(bigint_result);
       uint8_t* buffer;
@@ -1927,7 +1928,7 @@
 
       // Read object back from the snapshot into a C structure.
       ApiNativeScope scope;
-      ApiMessageReader api_reader(buffer, buffer_len, &zone_allocator);
+      ApiMessageReader api_reader(buffer, buffer_len);
       Dart_CObject* root = api_reader.ReadMessage();
       EXPECT_NOTNULL(root);
       EXPECT_EQ(Dart_CObject_kBigint, root->type);
@@ -3050,7 +3051,7 @@
 
 
 TEST_CASE(OmittedObjectEncodingLength) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   uint8_t* buffer;
   MessageWriter writer(&buffer, &zone_allocator, true);
   writer.WriteInlinedObjectHeader(kOmittedObjectId);
diff --git a/runtime/vm/store_buffer.cc b/runtime/vm/store_buffer.cc
index fee1281..ca1ff21 100644
--- a/runtime/vm/store_buffer.cc
+++ b/runtime/vm/store_buffer.cc
@@ -96,7 +96,7 @@
 }
 
 
-StoreBufferBlock* StoreBuffer::PopBlock() {
+StoreBufferBlock* StoreBuffer::PopNonFullBlock() {
   {
     MutexLocker ml(mutex_);
     if (!partial_.IsEmpty()) {
@@ -118,6 +118,24 @@
 }
 
 
+StoreBufferBlock* StoreBuffer::PopNonEmptyBlock() {
+  MutexLocker ml(mutex_);
+  if (!full_.IsEmpty()) {
+    return full_.Pop();
+  } else if (!partial_.IsEmpty()) {
+    return partial_.Pop();
+  } else {
+    return NULL;
+  }
+}
+
+
+bool StoreBuffer::IsEmpty() {
+  MutexLocker ml(global_mutex_);
+  return full_.IsEmpty() && partial_.IsEmpty();
+}
+
+
 StoreBuffer::List::~List() {
   while (!IsEmpty()) {
     delete Pop();
diff --git a/runtime/vm/store_buffer.h b/runtime/vm/store_buffer.h
index 12a0535..d6fcb7d 100644
--- a/runtime/vm/store_buffer.h
+++ b/runtime/vm/store_buffer.h
@@ -89,8 +89,9 @@
   // Partially filled blocks can be reused, and there is an "inifite" supply
   // of empty blocks (reused or newly allocated). In any case, the caller
   // takes ownership of the returned block.
-  StoreBufferBlock* PopBlock();
+  StoreBufferBlock* PopNonFullBlock();
   StoreBufferBlock* PopEmptyBlock();
+  StoreBufferBlock* PopNonEmptyBlock();
 
   // Pops and returns all non-empty blocks as a linked list (owned by caller).
   StoreBufferBlock* Blocks();
@@ -101,6 +102,8 @@
   // Check whether non-empty blocks have exceeded kMaxNonEmpty.
   bool Overflowed();
 
+  bool IsEmpty();
+
  private:
   class List {
    public:
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 2625200..ab56734 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -200,7 +200,7 @@
   __ LoadImmediate(R2, entry);
   __ blx(R2);
 #else
-  __ BranchLink(&NativeEntry::NativeCallWrapperLabel());
+  __ BranchLink(&NativeEntry::NativeCallWrapperLabel(), kNotPatchable);
 #endif
 
   // Mark that the isolate is executing Dart code.
@@ -311,8 +311,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ ldr(R0, FieldAddress(R0, Code::instructions_offset()));
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R0, FieldAddress(R0, Code::entry_point_offset()));
   __ bx(R0);
 }
 
@@ -333,8 +332,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ ldr(R0, FieldAddress(R0, Code::instructions_offset()));
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R0, FieldAddress(R0, Code::entry_point_offset()));
   __ bx(R0);
 }
 
@@ -352,8 +350,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ ldr(R0, FieldAddress(R0, Code::instructions_offset()));
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R0, FieldAddress(R0, Code::entry_point_offset()));
   __ bx(R0);
 }
 
@@ -387,13 +384,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
-                           intptr_t deopt_reason,
-                           uword saved_registers_address);
-
-DECLARE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, uword last_fp);
-
-
 // Used by eager and lazy deoptimization. Preserve result in R0 if necessary.
 // This stub translates optimized frame into unoptimized frame. The optimized
 // frame can contain values in registers and on stack, the unoptimized
@@ -437,6 +427,8 @@
   __ mov(FP, Operand(SP));
   __ Push(PP);
 
+  __ LoadPoolPointer();
+
   // Now that IP holding the return address has been written to the stack,
   // we can clobber it with 0 to write the null PC marker.
   __ mov(IP, Operand(0));
@@ -479,9 +471,7 @@
 
   // DeoptimizeFillFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ mov(IP, Operand(LR));
-  __ mov(LR, Operand(0));
-  __ EnterFrame((1 << PP) | (1 << FP) | (1 << IP) | (1 << LR), 0);
+  __ EnterStubFrame();
   __ mov(R0, Operand(FP));  // Get last FP address.
   if (preserve_result) {
     __ Push(R1);  // Preserve result as first local.
@@ -493,7 +483,7 @@
     __ ldr(R1, Address(FP, kFirstLocalSlotFromFp * kWordSize));
   }
   // Code above cannot cause GC.
-  __ LeaveDartFrame();
+  __ LeaveStubFrame();
 
   // Frame is fully rewritten at this point and it is safe to perform a GC.
   // Materialize any objects that were deferred by FillFrame because they
@@ -592,8 +582,7 @@
   }
 
   // Tail-call to target function.
-  __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
-  __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
   __ bx(R2);
 }
 
@@ -964,8 +953,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate);
-
 // Helper stub to implement Assembler::StoreIntoObject.
 // Input parameters:
 //   R0: address (i.e. object) being stored into.
@@ -1479,8 +1466,7 @@
   __ Comment("Call target");
   __ Bind(&call_target_function);
   // R0: target function.
-  __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
-  __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
   if (range_collection_mode == kCollectRanges) {
     __ ldr(R1, Address(SP, 0 * kWordSize));
     if (num_args == 2) {
@@ -1660,11 +1646,7 @@
 
   // Get function and call it, if possible.
   __ LoadFromOffset(kWord, R0, R6, target_offset);
-  __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
-
-  // R0: function.
-  // R2: target instructions.
-  __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
   __ bx(R2);
 
   if (FLAG_support_debugger) {
@@ -1709,8 +1691,7 @@
   __ PopList((1 << R4) | (1 << R5));  // Restore arg desc. and IC data.
   __ LeaveStubFrame();
 
-  __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
-  __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R2, FieldAddress(R0, Function::entry_point_offset()));
   __ bx(R2);
 }
 
@@ -1915,20 +1896,13 @@
   __ Pop(R0);  // Discard argument.
   __ Pop(R0);  // Get Code object
   __ Pop(R4);  // Restore argument descriptor.
-  __ ldr(R0, FieldAddress(R0, Code::instructions_offset()));
-  __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(R0, FieldAddress(R0, Code::entry_point_offset()));
   __ LeaveStubFrame();
   __ bx(R0);
   __ bkpt(0);
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t,
-                           BigintCompare,
-                           RawBigint* left,
-                           RawBigint* right);
-
-
 // Does identical check (object references are equal or not equal) with special
 // checks for boxed numbers.
 // LR: return address.
@@ -2084,10 +2058,7 @@
   // be invoked as a normal Dart function.
   __ add(IP, R2, Operand(R3, LSL, 2));
   __ ldr(R0, FieldAddress(IP, base + kWordSize));
-  __ ldr(target, FieldAddress(R0, Function::instructions_offset()));
-  // TODO(srdjan): Evaluate performance impact of moving the instruction below
-  // to the call site, instead of having it here.
-  __ AddImmediate(target, Instructions::HeaderSize() - kHeapObjectTag);
+  __ ldr(target, FieldAddress(R0, Function::entry_point_offset()));
 }
 
 
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index c8ef95a..4148925 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -128,6 +128,13 @@
 }
 
 
+// Print the stop message.
+DEFINE_LEAF_RUNTIME_ENTRY(void, PrintStopMessage, 1, const char* message) {
+  OS::Print("Stop message: %s\n", message);
+}
+END_LEAF_RUNTIME_ENTRY
+
+
 void StubCode::GeneratePrintStopMessageStub(Assembler* assembler) {
   __ Stop("GeneratePrintStopMessageStub");
 }
@@ -344,8 +351,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ LoadFieldFromOffset(R0, R0, Code::instructions_offset());
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R0, R0, Code::entry_point_offset());
   __ br(R0);
 }
 
@@ -367,8 +373,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ LoadFieldFromOffset(R0, R0, Code::instructions_offset());
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R0, R0, Code::entry_point_offset());
   __ br(R0);
 }
 
@@ -385,8 +390,7 @@
   // Remove the stub frame.
   __ LeaveStubFrame();
   // Jump to the dart function.
-  __ LoadFieldFromOffset(R0, R0, Code::instructions_offset());
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R0, R0, Code::entry_point_offset());
   __ br(R0);
 }
 
@@ -423,13 +427,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
-                           intptr_t deopt_reason,
-                           uword saved_registers_address);
-
-DECLARE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, uword last_fp);
-
-
 // Used by eager and lazy deoptimization. Preserve result in RAX if necessary.
 // This stub translates optimized frame into unoptimized frame. The optimized
 // frame can contain values in registers and on stack, the unoptimized
@@ -458,8 +455,7 @@
                                            bool preserve_result) {
   // DeoptimizeCopyFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ EnterFrame(0);
-  __ TagAndPushPPAndPcMarker(ZR);
+  __ EnterStubFrame();
 
   // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
   // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
@@ -490,13 +486,12 @@
   }
 
   // There is a Dart Frame on the stack. We must restore PP and leave frame.
-  __ LeaveDartFrame();
+  __ LeaveStubFrame();
   __ sub(SP, FP, Operand(R0));
 
   // DeoptimizeFillFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ EnterFrame(0);
-  __ TagAndPushPPAndPcMarker(ZR);
+  __ EnterStubFrame();
 
   if (preserve_result) {
     __ Push(R1);  // Preserve result as first local.
@@ -510,7 +505,7 @@
   }
   // Code above cannot cause GC.
   // There is a Dart Frame on the stack. We must restore PP and leave frame.
-  __ LeaveDartFrame();
+  __ LeaveStubFrame();
 
   // Frame is fully rewritten at this point and it is safe to perform a GC.
   // Materialize any objects that were deferred by FillFrame because they
@@ -518,7 +513,6 @@
   // Enter stub frame with loading PP. The caller's PP is not materialized yet.
   __ EnterStubFrame();
   if (preserve_result) {
-    __ Push(ZR);  // Workaround for dropped stack slot during GC.
     __ Push(R1);  // Preserve result, it will be GC-d here.
   }
   __ Push(ZR);  // Space for the result.
@@ -529,7 +523,6 @@
   __ SmiUntag(R1);
   if (preserve_result) {
     __ Pop(R0);  // Restore result.
-    __ Drop(1);  // Workaround for dropped stack slot during GC.
   }
   __ LeaveStubFrame();
   // Remove materialization arguments.
@@ -617,8 +610,7 @@
   }
 
   // Tail-call to target function.
-  __ LoadFieldFromOffset(R2, R0, Function::instructions_offset());
-  __ AddImmediate(R2, R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
   __ br(R2);
 }
 
@@ -1023,8 +1015,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate);
-
 // Helper stub to implement Assembler::StoreIntoObject.
 // Input parameters:
 //   R0: Address being stored
@@ -1552,9 +1542,7 @@
   __ Comment("Call target");
   __ Bind(&call_target_function);
   // R0: target function.
-  __ LoadFieldFromOffset(R2, R0, Function::instructions_offset());
-  __ AddImmediate(
-      R2, R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
   if (range_collection_mode == kCollectRanges) {
     __ ldr(R1, Address(SP, 0 * kWordSize));
     if (num_args == 2) {
@@ -1728,12 +1716,7 @@
 
   // Get function and call it, if possible.
   __ LoadFromOffset(R0, R6, target_offset);
-  __ LoadFieldFromOffset(R2, R0, Function::instructions_offset());
-
-  // R0: function.
-  // R2: target instructons.
-  __ AddImmediate(
-      R2, R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
   __ br(R2);
 
   if (FLAG_support_debugger) {
@@ -1780,9 +1763,7 @@
   __ Pop(R5);  // Restore IC Data.
   __ LeaveStubFrame();
 
-  __ LoadFieldFromOffset(R2, R0, Function::instructions_offset());
-  __ AddImmediate(
-      R2, R2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
   __ br(R2);
 }
 
@@ -1985,20 +1966,13 @@
   __ Pop(R0);  // Discard argument.
   __ Pop(R0);  // Get Code object
   __ Pop(R4);  // Restore argument descriptor.
-  __ LoadFieldFromOffset(R0, R0, Code::instructions_offset());
-  __ AddImmediate(R0, R0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R0, R0, Code::entry_point_offset());
   __ LeaveStubFrame();
   __ br(R0);
   __ brk(0);
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t,
-                           BigintCompare,
-                           RawBigint* left,
-                           RawBigint* right);
-
-
 // Does identical check (object references are equal or not equal) with special
 // checks for boxed numbers.
 // Left and right are pushed on stack.
@@ -2143,10 +2117,7 @@
   // be invoked as a normal Dart function.
   __ add(TMP, R2, Operand(R3, LSL, 3));
   __ LoadFieldFromOffset(R0, TMP, base + kWordSize);
-  __ LoadFieldFromOffset(R1, R0, Function::instructions_offset());
-  // TODO(srdjan): Evaluate performance impact of moving the instruction below
-  // to the call site, instead of having it here.
-  __ AddImmediate(target, R1, Instructions::HeaderSize() - kHeapObjectTag);
+  __ LoadFieldFromOffset(R1, R0, Function::entry_point_offset());
 }
 
 
diff --git a/runtime/vm/stub_code_arm64_test.cc b/runtime/vm/stub_code_arm64_test.cc
index 142a824..1c93003 100644
--- a/runtime/vm/stub_code_arm64_test.cc
+++ b/runtime/vm/stub_code_arm64_test.cc
@@ -19,10 +19,6 @@
 
 namespace dart {
 
-DECLARE_RUNTIME_ENTRY(TestSmiSub);
-DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
-
-
 static Function* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const Script& script = Script::Handle();
diff --git a/runtime/vm/stub_code_arm_test.cc b/runtime/vm/stub_code_arm_test.cc
index 986007f..ae1ce83 100644
--- a/runtime/vm/stub_code_arm_test.cc
+++ b/runtime/vm/stub_code_arm_test.cc
@@ -19,10 +19,6 @@
 
 namespace dart {
 
-DECLARE_RUNTIME_ENTRY(TestSmiSub);
-DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
-
-
 static Function* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const Script& script = Script::Handle();
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 5469d45..669c874 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -276,8 +276,7 @@
   // Remove the stub frame as we are about to jump to the dart function.
   __ LeaveFrame();
 
-  __ movl(ECX, FieldAddress(EAX, Code::instructions_offset()));
-  __ addl(ECX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(ECX, FieldAddress(EAX, Code::entry_point_offset()));
   __ jmp(ECX);
 }
 
@@ -296,8 +295,7 @@
   __ CallRuntime(kFixCallersTargetRuntimeEntry, 0);
   __ popl(EAX);  // Get Code object.
   __ popl(EDX);  // Restore arguments descriptor array.
-  __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
-  __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
   __ LeaveFrame();
   __ jmp(EAX);
   __ int3();
@@ -313,8 +311,7 @@
   __ pushl(raw_null);  // Setup space on stack for return value.
   __ CallRuntime(kFixAllocationStubTargetRuntimeEntry, 0);
   __ popl(EAX);  // Get Code object.
-  __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
-  __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
   __ LeaveFrame();
   __ jmp(EAX);
   __ int3();
@@ -353,13 +350,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
-                           intptr_t deopt_reason,
-                           uword saved_registers_address);
-
-DECLARE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, uword last_fp);
-
-
 // Used by eager and lazy deoptimization. Preserve result in EAX if necessary.
 // This stub translates optimized frame into unoptimized frame. The optimized
 // frame can contain values in registers and on stack, the unoptimized
@@ -468,7 +458,7 @@
   // Correct return address to point just after the call that is being
   // deoptimized.
   __ popl(EBX);
-  __ subl(EBX, Immediate(CallPattern::InstructionLength()));
+  __ subl(EBX, Immediate(CallPattern::pattern_length_in_bytes()));
   __ pushl(EBX);
   GenerateDeoptimizationSequence(assembler, true);  // Preserve EAX.
 }
@@ -543,8 +533,7 @@
     __ Bind(&call_target_function);
   }
 
-  __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
-  __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
   __ jmp(EBX);
 }
 
@@ -935,7 +924,6 @@
   __ ret();
 }
 
-DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate);
 
 // Helper stub to implement Assembler::StoreIntoObject.
 // Input parameters:
@@ -1459,8 +1447,7 @@
   __ Bind(&call_target_function);
   __ Comment("Call target");
   // EAX: Target function.
-  __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
-  __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
   if (range_collection_mode == kCollectRanges) {
     __ EnterStubFrame();
     __ pushl(ECX);
@@ -1653,10 +1640,7 @@
 
   // Get function and call it, if possible.
   __ movl(EAX, Address(EBX, target_offset));
-  __ movl(EBX, FieldAddress(EAX, Function::instructions_offset()));
-
-  // EBX: Target instructions.
-  __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EBX, FieldAddress(EAX, Function::entry_point_offset()));
   __ jmp(EBX);
 
   if (FLAG_support_debugger) {
@@ -1704,8 +1688,7 @@
   __ popl(EDX);  // Restore arguments descriptor array.
   __ LeaveFrame();
 
-  __ movl(EAX, FieldAddress(EAX, Function::instructions_offset()));
-  __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EAX, FieldAddress(EAX, Function::entry_point_offset()));
   __ jmp(EAX);
 }
 
@@ -1923,20 +1906,13 @@
   __ popl(EAX);  // Discard argument.
   __ popl(EAX);  // Get Code object
   __ popl(EDX);  // Restore argument descriptor.
-  __ movl(EAX, FieldAddress(EAX, Code::instructions_offset()));
-  __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(EAX, FieldAddress(EAX, Code::entry_point_offset()));
   __ LeaveFrame();
   __ jmp(EAX);
   __ int3();
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t,
-                           BigintCompare,
-                           RawBigint* left,
-                           RawBigint* right);
-
-
 // Does identical check (object references are equal or not equal) with special
 // checks for boxed numbers.
 // Return ZF set.
@@ -2087,10 +2063,7 @@
   // illegal class id was found, the target is a cache miss handler that can
   // be invoked as a normal Dart function.
   __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize));
-  __ movl(target, FieldAddress(EAX, Function::instructions_offset()));
-  // TODO(srdjan): Evaluate performance impact of moving the instruction below
-  // to the call site, instead of having it here.
-  __ addl(target, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movl(target, FieldAddress(EAX, Function::entry_point_offset()));
 }
 
 
diff --git a/runtime/vm/stub_code_ia32_test.cc b/runtime/vm/stub_code_ia32_test.cc
index ce07b83..301259b 100644
--- a/runtime/vm/stub_code_ia32_test.cc
+++ b/runtime/vm/stub_code_ia32_test.cc
@@ -19,10 +19,6 @@
 
 namespace dart {
 
-DECLARE_RUNTIME_ENTRY(TestSmiSub);
-DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
-
-
 static Function* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const Script& script = Script::Handle();
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index 73a0ba4..44498fc 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -207,7 +207,7 @@
   __ LoadImmediate(T9, entry);
   __ jalr(T9);
 #else
-  __ BranchLink(&NativeEntry::NativeCallWrapperLabel());
+  __ BranchLink(&NativeEntry::NativeCallWrapperLabel(), kNotPatchable);
 #endif
   __ Comment("CallNativeCFunctionStub return");
 
@@ -327,8 +327,7 @@
   __ lw(S4, Address(SP, 1 * kWordSize));
   __ addiu(SP, SP, Immediate(2 * kWordSize));
 
-  __ lw(T0, FieldAddress(T0, Code::instructions_offset()));
-  __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T0, FieldAddress(T0, Code::entry_point_offset()));
 
   // Remove the stub frame as we are about to jump to the dart function.
   __ LeaveStubFrameAndReturn(T0);
@@ -355,8 +354,7 @@
   __ addiu(SP, SP, Immediate(2 * kWordSize));
 
   // Jump to the dart function.
-  __ lw(T0, FieldAddress(T0, Code::instructions_offset()));
-  __ AddImmediate(T0, T0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T0, FieldAddress(T0, Code::entry_point_offset()));
 
   // Remove the stub frame.
   __ LeaveStubFrameAndReturn(T0);
@@ -378,8 +376,7 @@
   __ addiu(SP, SP, Immediate(1 * kWordSize));
 
   // Jump to the dart function.
-  __ lw(T0, FieldAddress(T0, Code::instructions_offset()));
-  __ AddImmediate(T0, T0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T0, FieldAddress(T0, Code::entry_point_offset()));
 
   // Remove the stub frame.
   __ LeaveStubFrameAndReturn(T0);
@@ -421,13 +418,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
-                           intptr_t deopt_reason,
-                           uword saved_registers_address);
-
-DECLARE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, uword last_fp);
-
-
 // Used by eager and lazy deoptimization. Preserve result in V0 if necessary.
 // This stub translates optimized frame into unoptimized frame. The optimized
 // frame can contain values in registers and on stack, the unoptimized
@@ -470,6 +460,8 @@
   __ sw(PP, Address(SP, kPushedRegistersSize - 4 * kWordSize));
   __ addiu(FP, SP, Immediate(kPushedRegistersSize - 3 * kWordSize));
 
+  __ LoadPoolPointer();
+
   // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
   // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
   const intptr_t saved_result_slot_from_fp =
@@ -500,20 +492,12 @@
     __ lw(T1, Address(FP, saved_result_slot_from_fp * kWordSize));
   }
 
-  __ addiu(SP, FP, Immediate(-kWordSize));
-  __ lw(RA, Address(SP, 2 * kWordSize));
-  __ lw(FP, Address(SP, 1 * kWordSize));
-  __ lw(PP, Address(SP, 0 * kWordSize));
+  __ LeaveDartFrame();
   __ subu(SP, FP, V0);
 
   // DeoptimizeFillFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ addiu(SP, SP, Immediate(-4 * kWordSize));
-  __ sw(ZR, Address(SP, 3 * kWordSize));
-  __ sw(RA, Address(SP, 2 * kWordSize));
-  __ sw(FP, Address(SP, 1 * kWordSize));
-  __ sw(PP, Address(SP, 0 * kWordSize));
-  __ addiu(FP, SP, Immediate(kWordSize));
+  __ EnterStubFrame();
 
   __ mov(A0, FP);  // Get last FP address.
   if (preserve_result) {
@@ -526,11 +510,7 @@
     __ lw(T1, Address(FP, kFirstLocalSlotFromFp * kWordSize));
   }
   // Code above cannot cause GC.
-  __ addiu(SP, FP, Immediate(-kWordSize));
-  __ lw(RA, Address(SP, 2 * kWordSize));
-  __ lw(FP, Address(SP, 1 * kWordSize));
-  __ lw(PP, Address(SP, 0 * kWordSize));
-  __ addiu(SP, SP, Immediate(4 * kWordSize));
+  __ LeaveStubFrame();
 
   // Frame is fully rewritten at this point and it is safe to perform a GC.
   // Materialize any objects that were deferred by FillFrame because they
@@ -643,8 +623,7 @@
     __ Bind(&call_target_function);
   }
 
-  __ lw(T2, FieldAddress(T0, Function::instructions_offset()));
-  __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T2, FieldAddress(T0, Function::entry_point_offset()));
   __ jr(T2);
 }
 
@@ -1059,9 +1038,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate);
-
-
 // Helper stub to implement Assembler::StoreIntoObject.
 // Input parameters:
 //   T0: Address (i.e. object) being stored into.
@@ -1614,8 +1590,7 @@
   // T0 <- T3: Target function.
   __ mov(T0, T3);
   Label is_compiled;
-  __ lw(T4, FieldAddress(T0, Function::instructions_offset()));
-  __ AddImmediate(T4, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T4, FieldAddress(T0, Function::entry_point_offset()));
   if (range_collection_mode == kCollectRanges) {
     const intptr_t frame_size = num_args + 2;
     __ lw(T3, Address(SP, 0 * kWordSize));
@@ -1799,10 +1774,7 @@
 
   // Get function and call it, if possible.
   __ lw(T0, Address(T0, target_offset));
-  __ lw(T4, FieldAddress(T0, Function::instructions_offset()));
-
-  // T4: target instructions.
-  __ AddImmediate(T4, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T4, FieldAddress(T0, Function::entry_point_offset()));
   __ jr(T4);
 
   // Call single step callback in debugger.
@@ -1855,8 +1827,7 @@
   __ addiu(SP, SP, Immediate(3 * kWordSize));
   __ LeaveStubFrame();
 
-  __ lw(T2, FieldAddress(T0, Function::instructions_offset()));
-  __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T2, FieldAddress(T0, Function::entry_point_offset()));
   __ jr(T2);
 }
 
@@ -2086,19 +2057,12 @@
   __ lw(S4, Address(SP, 2 * kWordSize));  // Restore argument descriptor.
   __ addiu(SP, SP, Immediate(3 * kWordSize));  // Discard argument.
 
-  __ lw(T0, FieldAddress(T0, Code::instructions_offset()));
-  __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(T0, FieldAddress(T0, Code::entry_point_offset()));
   __ LeaveStubFrameAndReturn(T0);
   __ break_(0);
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t,
-                           BigintCompare,
-                           RawBigint* left,
-                           RawBigint* right);
-
-
 // Does identical check (object references are equal or not equal) with special
 // checks for boxed numbers.
 // Returns: CMPRES1 is zero if equal, non-zero otherwise.
@@ -2274,10 +2238,7 @@
   __ addu(T1, T2, T1);
   __ lw(T0, FieldAddress(T1, base + kWordSize));
 
-  __ lw(target, FieldAddress(T0, Function::instructions_offset()));
-  // TODO(srdjan): Evaluate performance impact of moving the instruction below
-  // to the call site, instead of having it here.
-  __ AddImmediate(target, Instructions::HeaderSize() - kHeapObjectTag);
+  __ lw(target, FieldAddress(T0, Function::entry_point_offset()));
 }
 
 
diff --git a/runtime/vm/stub_code_mips_test.cc b/runtime/vm/stub_code_mips_test.cc
index 7a87baf..c01edf5 100644
--- a/runtime/vm/stub_code_mips_test.cc
+++ b/runtime/vm/stub_code_mips_test.cc
@@ -19,10 +19,6 @@
 
 namespace dart {
 
-DECLARE_RUNTIME_ENTRY(TestSmiSub);
-DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
-
-
 static Function* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const Script& script = Script::Handle();
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 877d750..9d389c1 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -184,7 +184,9 @@
   __ movq(CallingConventions::kArg1Reg, RSP);
   // Pass pointer to function entrypoint.
   __ movq(CallingConventions::kArg2Reg, RBX);
-  __ CallCFunction(&NativeEntry::NativeCallWrapperLabel());
+  __ LoadExternalLabel(
+      RAX, &NativeEntry::NativeCallWrapperLabel(), kNotPatchable);
+  __ CallCFunction(RAX);
 
   // Mark that the isolate is executing Dart code.
   __ movq(Address(R12, Isolate::vm_tag_offset()),
@@ -283,8 +285,7 @@
   // Remove the stub frame as we are about to jump to the dart function.
   __ LeaveStubFrame();
 
-  __ movq(RBX, FieldAddress(RAX, Code::instructions_offset()));
-  __ addq(RBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RBX, FieldAddress(RAX, Code::entry_point_offset()));
   __ jmp(RBX);
 }
 
@@ -300,8 +301,7 @@
   __ CallRuntime(kFixCallersTargetRuntimeEntry, 0);
   __ popq(RAX);  // Get Code object.
   __ popq(R10);  // Restore arguments descriptor array.
-  __ movq(RAX, FieldAddress(RAX, Code::instructions_offset()));
-  __ addq(RAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RAX, FieldAddress(RAX, Code::entry_point_offset()));
   __ LeaveStubFrame();
   __ jmp(RAX);
   __ int3();
@@ -316,8 +316,7 @@
   __ PushObject(Object::null_object());
   __ CallRuntime(kFixAllocationStubTargetRuntimeEntry, 0);
   __ popq(RAX);  // Get Code object.
-  __ movq(RAX, FieldAddress(RAX, Code::instructions_offset()));
-  __ addq(RAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RAX, FieldAddress(RAX, Code::entry_point_offset()));
   __ LeaveStubFrame();
   __ jmp(RAX);
   __ int3();
@@ -359,13 +358,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
-                           intptr_t deopt_reason,
-                           uword saved_registers_address);
-
-DECLARE_LEAF_RUNTIME_ENTRY(void, DeoptimizeFillFrame, uword last_fp);
-
-
 // Used by eager and lazy deoptimization. Preserve result in RAX if necessary.
 // This stub translates optimized frame into unoptimized frame. The optimized
 // frame can contain values in registers and on stack, the unoptimized
@@ -394,9 +386,7 @@
                                            bool preserve_result) {
   // DeoptimizeCopyFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ EnterFrame(0);
-  __ pushq(Immediate(0));
-  __ pushq(PP);
+  __ EnterStubFrame();
 
   // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
   // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
@@ -429,7 +419,7 @@
   }
 
   // There is a Dart Frame on the stack. We must restore PP and leave frame.
-  __ LeaveDartFrame();
+  __ LeaveStubFrame();
 
   __ popq(RCX);   // Preserve return address.
   __ movq(RSP, RBP);  // Discard optimized frame.
@@ -438,9 +428,7 @@
 
   // DeoptimizeFillFrame expects a Dart frame, i.e. EnterDartFrame(0), but there
   // is no need to set the correct PC marker or load PP, since they get patched.
-  __ EnterFrame(0);
-  __ pushq(Immediate(0));
-  __ pushq(PP);
+  __ EnterStubFrame();
 
   if (preserve_result) {
     __ pushq(RBX);  // Preserve result as first local.
@@ -455,7 +443,7 @@
   }
   // Code above cannot cause GC.
   // There is a Dart Frame on the stack. We must restore PP and leave frame.
-  __ LeaveDartFrame();
+  __ LeaveStubFrame();
 
   // Frame is fully rewritten at this point and it is safe to perform a GC.
   // Materialize any objects that were deferred by FillFrame because they
@@ -463,7 +451,6 @@
   // Enter stub frame with loading PP. The caller's PP is not materialized yet.
   __ EnterStubFrame();
   if (preserve_result) {
-    __ pushq(Immediate(0));  // Workaround for dropped stack slot during GC.
     __ pushq(RBX);  // Preserve result, it will be GC-d here.
   }
   __ pushq(Immediate(Smi::RawValue(0)));  // Space for the result.
@@ -474,7 +461,6 @@
   __ SmiUntag(RBX);
   if (preserve_result) {
     __ popq(RAX);  // Restore result.
-    __ Drop(1);  // Workaround for dropped stack slot during GC.
   }
   __ LeaveStubFrame();
 
@@ -491,7 +477,7 @@
   // Correct return address to point just after the call that is being
   // deoptimized.
   __ popq(RBX);
-  __ subq(RBX, Immediate(ShortCallPattern::InstructionLength()));
+  __ subq(RBX, Immediate(ShortCallPattern::pattern_length_in_bytes()));
   __ pushq(RBX);
   GenerateDeoptimizationSequence(assembler, true);  // Preserve RAX.
 }
@@ -566,8 +552,7 @@
     __ Bind(&call_target_function);
   }
 
-  __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
-  __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
   __ jmp(RCX);
 }
 
@@ -978,8 +963,6 @@
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(void, StoreBufferBlockProcess, Isolate* isolate);
-
 // Helper stub to implement Assembler::StoreIntoObject.
 // Input parameters:
 //   RDX: Address being stored
@@ -1503,8 +1486,7 @@
   __ Bind(&call_target_function);
   // RAX: Target function.
   Label is_compiled;
-  __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
-  __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
   if (range_collection_mode == kCollectRanges) {
     __ movq(R8, Address(RSP, + 1 * kWordSize));
     if (num_args == 2) {
@@ -1703,9 +1685,7 @@
 
   // Get function and call it, if possible.
   __ movq(RAX, Address(R12, target_offset));
-  __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
-  // RCX: Target instructions.
-  __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
   __ jmp(RCX);
 
   if (FLAG_support_debugger) {
@@ -1756,8 +1736,7 @@
   __ popq(R10);  // Restore arguments descriptor array.
   __ LeaveStubFrame();
 
-  __ movq(RAX, FieldAddress(RAX, Function::instructions_offset()));
-  __ addq(RAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RAX, FieldAddress(RAX, Function::entry_point_offset()));
   __ jmp(RAX);
 }
 
@@ -1984,20 +1963,13 @@
   __ popq(RAX);  // Disard argument.
   __ popq(RAX);  // Get Code object.
   __ popq(R10);  // Restore argument descriptor.
-  __ movq(RAX, FieldAddress(RAX, Code::instructions_offset()));
-  __ addq(RAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(RAX, FieldAddress(RAX, Code::entry_point_offset()));
   __ LeaveStubFrame();
   __ jmp(RAX);
   __ int3();
 }
 
 
-DECLARE_LEAF_RUNTIME_ENTRY(intptr_t,
-                           BigintCompare,
-                           RawBigint* left,
-                           RawBigint* right);
-
-
 // Does identical check (object references are equal or not equal) with special
 // checks for boxed numbers.
 // Left and right are pushed on stack.
@@ -2141,11 +2113,7 @@
   // illegal class id was found, the target is a cache miss handler that can
   // be invoked as a normal Dart function.
   __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize));
-  __ movq(target, FieldAddress(RAX, Function::instructions_offset()));
-  // TODO(srdjan): Evaluate performance impact of moving the instruction below
-  // to the call site, instead of having it here.
-  __ AddImmediate(
-      target, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
+  __ movq(target, FieldAddress(RAX, Function::entry_point_offset()));
 }
 
 
diff --git a/runtime/vm/stub_code_x64_test.cc b/runtime/vm/stub_code_x64_test.cc
index 4f67eed..d3b94dc 100644
--- a/runtime/vm/stub_code_x64_test.cc
+++ b/runtime/vm/stub_code_x64_test.cc
@@ -19,10 +19,6 @@
 
 namespace dart {
 
-DECLARE_RUNTIME_ENTRY(TestSmiSub);
-DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
-
-
 static Function* CreateFunction(const char* name) {
   const String& class_name = String::Handle(Symbols::New("ownerClass"));
   const Script& script = Script::Handle();
@@ -80,12 +76,12 @@
                                               int value2) {
   const Smi& smi1 = Smi::ZoneHandle(Smi::New(value1));
   const Smi& smi2 = Smi::ZoneHandle(Smi::New(value2));
-  __ enter(Immediate(0));
+  __ EnterStubFrame();
   __ ReserveAlignedFrameSpace(0);
   __ LoadObject(CallingConventions::kArg1Reg, smi1);
   __ LoadObject(CallingConventions::kArg2Reg, smi2);
   __ CallRuntime(kTestLeafSmiAddRuntimeEntry, 2);  // Call SmiAdd runtime func.
-  __ leave();
+  __ LeaveStubFrame();
   __ ret();  // Return value is in RAX.
 }
 
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 7cafda2..be08181 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -197,6 +197,7 @@
   // Should only be run by the vm isolate.
   ASSERT(Isolate::Current() == Dart::vm_isolate());
   ASSERT(vm_isolate == Dart::vm_isolate());
+  Zone* zone = Thread::Current()->zone();
 
   // Create and setup a symbol table in the vm isolate.
   SetupSymbolTable(vm_isolate);
@@ -204,7 +205,7 @@
   // Create all predefined symbols.
   ASSERT((sizeof(names) / sizeof(const char*)) == Symbols::kNullCharId);
 
-  SymbolTable table(vm_isolate, vm_isolate->object_store()->symbol_table());
+  SymbolTable table(zone, vm_isolate->object_store()->symbol_table());
 
   // First set up all the predefined string symbols.
   // Create symbols for language keywords. Some keywords are equal to
@@ -244,8 +245,9 @@
   // Should only be run by the vm isolate.
   ASSERT(Isolate::Current() == Dart::vm_isolate());
   ASSERT(vm_isolate == Dart::vm_isolate());
+  Zone* zone = Thread::Current()->zone();
 
-  SymbolTable table(vm_isolate, vm_isolate->object_store()->symbol_table());
+  SymbolTable table(zone, vm_isolate->object_store()->symbol_table());
 
   // Lookup all the predefined string symbols and language keyword symbols
   // and cache them in the read only handles for fast access.
@@ -282,11 +284,13 @@
 
 void Symbols::AddPredefinedSymbolsToIsolate() {
   // Should only be run by regular Dart isolates.
-  Isolate* isolate = Isolate::Current();
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
   ASSERT(isolate != Dart::vm_isolate());
   String& str = String::Handle(isolate);
 
-  SymbolTable table(isolate, isolate->object_store()->symbol_table());
+  SymbolTable table(zone, isolate->object_store()->symbol_table());
 
   // Set up all the predefined string symbols and create symbols for
   // language keywords.
@@ -329,7 +333,7 @@
 
 void Symbols::GetStats(Isolate* isolate, intptr_t* size, intptr_t* capacity) {
   ASSERT(isolate != NULL);
-  SymbolTable table(isolate, isolate->object_store()->symbol_table());
+  SymbolTable table(isolate->object_store()->symbol_table());
   *size = table.NumOccupied();
   *capacity = table.NumEntries();
   table.Release();
@@ -379,23 +383,59 @@
 
 
 RawString* Symbols::FromConcat(const String& str1, const String& str2) {
-  return NewSymbol(ConcatString(str1, str2));
+  if (str1.Length() == 0) {
+    return New(str2);
+  } else if (str2.Length() == 0) {
+    return New(str1);
+  } else {
+    return NewSymbol(ConcatString(str1, str2));
+  }
+}
+
+
+// TODO(srdjan): If this becomes performance critical code, consider looking
+// up symbol from pieces instead of concatenating them first into a big string.
+RawString* Symbols::FromConcatAll(
+    const GrowableHandlePtrArray<const String>& strs) {
+  GrowableArray<const char*> cchars(strs.length());
+  GrowableArray<intptr_t> lengths(strs.length());
+  intptr_t len_sum = 0;
+  for (intptr_t i = 0; i < strs.length(); i++) {
+    const char* to_cstr = strs[i].ToCString();
+    intptr_t len = strlen(to_cstr);
+    cchars.Add(to_cstr);
+    lengths.Add(len);
+    len_sum += len;
+  }
+
+  Zone* zone = Thread::Current()->zone();
+  char* buffer = zone->Alloc<char>(len_sum);
+  const char* const orig_buffer = buffer;
+  for (intptr_t i = 0; i < cchars.length(); i++) {
+    intptr_t len = lengths[i];
+    strncpy(buffer, cchars[i], len);
+    buffer += len;
+  }
+  ASSERT(len_sum == buffer - orig_buffer);
+  return Symbols::New(orig_buffer, len_sum);
 }
 
 
 // StringType can be StringSlice, ConcatString, or {Latin1,UTF16,UTF32}Array.
 template<typename StringType>
 RawString* Symbols::NewSymbol(const StringType& str) {
-  Isolate* isolate = Isolate::Current();
-  String& symbol = String::Handle(isolate);
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  Zone* zone = thread->zone();
+  String& symbol = String::Handle(zone);
   {
     Isolate* vm_isolate = Dart::vm_isolate();
-    SymbolTable table(isolate, vm_isolate->object_store()->symbol_table());
+    SymbolTable table(zone, vm_isolate->object_store()->symbol_table());
     symbol ^= table.GetOrNull(str);
     table.Release();
   }
   if (symbol.IsNull()) {
-    SymbolTable table(isolate, isolate->object_store()->symbol_table());
+    SymbolTable table(zone, isolate->object_store()->symbol_table());
     symbol ^= table.InsertNewOrGet(str);
     isolate->object_store()->set_symbol_table(table.Release());
   }
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 2cdaf9e..29682eb 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -5,6 +5,7 @@
 #ifndef VM_SYMBOLS_H_
 #define VM_SYMBOLS_H_
 
+#include "vm/growable_array.h"
 #include "vm/object.h"
 #include "vm/snapshot_ids.h"
 
@@ -103,11 +104,16 @@
   V(YieldKw, "yield")                                                          \
   V(AsyncCompleter, ":async_completer")                                        \
   V(AsyncOperation, ":async_op")                                               \
+  V(AsyncThenCallback, ":async_op_then")                                       \
+  V(AsyncCatchErrorCallback, ":async_op_catch_error")                          \
   V(AsyncOperationParam, ":async_result")                                      \
   V(AsyncOperationErrorParam, ":async_error_param")                            \
   V(AsyncOperationStackTraceParam, ":async_stack_trace_param")                 \
   V(AsyncSavedTryCtxVarPrefix, ":async_saved_try_ctx_var_")                    \
   V(AsyncCatchHelper, "_asyncCatchHelper")                                     \
+  V(AsyncThenWrapperHelper, "_asyncThenWrapperHelper")                         \
+  V(AsyncErrorWrapperHelper, "_asyncErrorWrapperHelper")                       \
+  V(AsyncAwaitHelper, "_awaitHelper")                                          \
   V(Await, "await")                                                            \
   V(AwaitContextVar, ":await_ctx_var")                                         \
   V(AwaitJumpVar, ":await_jump_var")                                           \
@@ -119,7 +125,7 @@
   V(Completer, "Completer")                                                    \
   V(CompleterComplete, "complete")                                             \
   V(CompleterCompleteError, "completeError")                                   \
-  V(CompleterConstructor, "Completer.")                                        \
+  V(CompleterSyncConstructor, "Completer.sync")                                \
   V(CompleterFuture, "future")                                                 \
   V(StreamIterator, "StreamIterator")                                          \
   V(StreamIteratorConstructor, "StreamIterator.")                              \
@@ -291,6 +297,7 @@
   V(RangeError, "RangeError")                                                  \
   V(DotRange, ".range")                                                        \
   V(ArgumentError, "ArgumentError")                                            \
+  V(DotValue, ".value")                                                        \
   V(FormatException, "FormatException")                                        \
   V(UnsupportedError, "UnsupportedError")                                      \
   V(StackOverflowError, "StackOverflowError")                                  \
@@ -390,6 +397,8 @@
   V(removeLast, "removeLast")                                                  \
   V(add, "add")                                                                \
   V(ConstructorClosurePrefix, "new#")                                          \
+  V(_runExtension, "_runExtension")                                            \
+  V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
 
 
 // Contains a list of frequently used strings in a canonicalized form. This
@@ -587,6 +596,9 @@
 
   static RawString* FromConcat(const String& str1, const String& str2);
 
+  static RawString* FromConcatAll(
+      const GrowableHandlePtrArray<const String>& strs);
+
   // Returns char* of predefined symbol.
   static const char* Name(SymbolId symbol);
 
diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
index ffd224f..4224a22 100644
--- a/runtime/vm/tags.cc
+++ b/runtime/vm/tags.cc
@@ -81,8 +81,8 @@
 };
 
 
-VMTagScope::VMTagScope(Isolate* base_isolate, uword tag, bool conditional_set)
-    : StackResource(base_isolate) {
+VMTagScope::VMTagScope(Thread* thread, uword tag, bool conditional_set)
+    : StackResource(thread) {
   ASSERT(isolate() != NULL);
   previous_tag_ = isolate()->vm_tag();
   if (conditional_set) {
diff --git a/runtime/vm/tags.h b/runtime/vm/tags.h
index 6b16be3..926aed8 100644
--- a/runtime/vm/tags.h
+++ b/runtime/vm/tags.h
@@ -41,9 +41,13 @@
     VM_TAG_LIST(DEFINE_VM_TAG_ID)
 #undef DEFINE_VM_TAG_KIND
     kNumVMTags,
+    //
+    // All tags below |kNumVMTags| are special meta-data tags and do not
+    // indicate the state of the VM during a sample.
+    //
     kRootTagId,       // Special tag used as root of all profiles.
     kTruncatedTagId,  // Special tag used to indicate a truncated call stack.
-    // ProfileInfo tags.
+    // Code transition tags (used by unit tests).
     kNoneCodeTagId,
     kOptimizedCodeTagId,
     kUnoptimizedCodeTagId,
@@ -75,7 +79,7 @@
 
 class VMTagScope : StackResource {
  public:
-  VMTagScope(Isolate* isolate, uword tag, bool conditional_set = true);
+  VMTagScope(Thread* thread, uword tag, bool conditional_set = true);
   ~VMTagScope();
  private:
   uword previous_tag_;
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 09a0774..a52c1bc 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -18,7 +18,6 @@
 
 // The single thread local key which stores all the thread local data
 // for a thread.
-// TODO(koda): Can we merge this with ThreadInterrupter::thread_state_key_?
 ThreadLocalKey Thread::thread_key_ = OSThread::kUnsetThreadLocalKey;
 
 
@@ -94,9 +93,9 @@
 void Thread::CleanUp() {
   Thread* current = Current();
   if (current != NULL) {
+    SetCurrent(NULL);
     delete current;
   }
-  SetCurrent(NULL);
 }
 #endif
 
@@ -134,19 +133,19 @@
 }
 
 
-void Thread::Schedule(Isolate* isolate) {
+void Thread::Schedule(Isolate* isolate, bool bypass_safepoint) {
   State st;
-  if (isolate->thread_registry()->RestoreStateTo(this, &st)) {
+  if (isolate->thread_registry()->RestoreStateTo(this, &st, bypass_safepoint)) {
     ASSERT(isolate->thread_registry()->Contains(this));
     state_ = st;
   }
 }
 
 
-void Thread::Unschedule() {
+void Thread::Unschedule(bool bypass_safepoint) {
   ThreadRegistry* reg = isolate_->thread_registry();
   ASSERT(reg->Contains(this));
-  reg->SaveStateFrom(this, state_);
+  reg->SaveStateFrom(this, state_, bypass_safepoint);
   ClearState();
 }
 
@@ -160,7 +159,7 @@
   isolate->MakeCurrentThreadMutator(thread);
   isolate->set_vm_tag(VMTag::kVMTagId);
   ASSERT(thread->store_buffer_block_ == NULL);
-  thread->store_buffer_block_ = isolate->store_buffer()->PopBlock();
+  thread->StoreBufferAcquire();
   ASSERT(isolate->heap() != NULL);
   thread->heap_ = isolate->heap();
   thread->Schedule(isolate);
@@ -176,9 +175,8 @@
   Isolate* isolate = thread->isolate();
   Profiler::EndExecution(isolate);
   thread->Unschedule();
-  StoreBufferBlock* block = thread->store_buffer_block_;
-  thread->store_buffer_block_ = NULL;
-  isolate->store_buffer()->PushBlock(block);
+  // TODO(koda): Move store_buffer_block_ into State.
+  thread->StoreBufferRelease();
   if (isolate->is_runnable()) {
     isolate->set_vm_tag(VMTag::kIdleTagId);
   } else {
@@ -191,51 +189,55 @@
 }
 
 
-void Thread::EnterIsolateAsHelper(Isolate* isolate) {
+void Thread::EnterIsolateAsHelper(Isolate* isolate, bool bypass_safepoint) {
   Thread* thread = Thread::Current();
   ASSERT(thread != NULL);
   ASSERT(thread->isolate() == NULL);
   thread->isolate_ = isolate;
+  ASSERT(thread->store_buffer_block_ == NULL);
+  // TODO(koda): Use StoreBufferAcquire once we properly flush before Scavenge.
+  thread->store_buffer_block_ =
+      thread->isolate()->store_buffer()->PopEmptyBlock();
   ASSERT(isolate->heap() != NULL);
   thread->heap_ = isolate->heap();
+  ASSERT(thread->thread_interrupt_callback_ == NULL);
+  ASSERT(thread->thread_interrupt_data_ == NULL);
   // Do not update isolate->mutator_thread, but perform sanity check:
   // this thread should not be both the main mutator and helper.
   ASSERT(!isolate->MutatorThreadIsCurrentThread());
-  thread->Schedule(isolate);
+  thread->Schedule(isolate, bypass_safepoint);
 }
 
 
-void Thread::ExitIsolateAsHelper() {
+void Thread::ExitIsolateAsHelper(bool bypass_safepoint) {
   Thread* thread = Thread::Current();
-  // If the helper thread chose to use the store buffer, check that it has
-  // already been flushed manually.
-  ASSERT(thread->store_buffer_block_ == NULL);
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
-  thread->Unschedule();
+  thread->Unschedule(bypass_safepoint);
+  // TODO(koda): Move store_buffer_block_ into State.
+  thread->StoreBufferRelease();
   thread->isolate_ = NULL;
   thread->heap_ = NULL;
   ASSERT(!isolate->MutatorThreadIsCurrentThread());
 }
 
 
+// TODO(koda): Make non-static and invoke in SafepointThreads.
 void Thread::PrepareForGC() {
   Thread* thread = Thread::Current();
-  StoreBuffer* sb = thread->isolate()->store_buffer();
-  StoreBufferBlock* block = thread->store_buffer_block_;
-  thread->store_buffer_block_ = NULL;
-  const bool kCheckThreshold = false;  // Prevent scheduling another GC.
-  sb->PushBlock(block, kCheckThreshold);
-  thread->store_buffer_block_ = sb->PopEmptyBlock();
+  const bool kDoNotCheckThreshold = false;  // Prevent scheduling another GC.
+  thread->StoreBufferRelease(kDoNotCheckThreshold);
+  // Make sure to get an *empty* block; the isolate needs all entries
+  // at GC time.
+  // TODO(koda): Replace with an epilogue (PrepareAfterGC) that acquires.
+  thread->store_buffer_block_ =
+      thread->isolate()->store_buffer()->PopEmptyBlock();
 }
 
 
 void Thread::StoreBufferBlockProcess(bool check_threshold) {
-  StoreBuffer* sb = isolate()->store_buffer();
-  StoreBufferBlock* block = store_buffer_block_;
-  store_buffer_block_ = NULL;
-  sb->PushBlock(block, check_threshold);
-  store_buffer_block_ = sb->PopBlock();
+  StoreBufferRelease(check_threshold);
+  StoreBufferAcquire();
 }
 
 
@@ -255,6 +257,18 @@
 }
 
 
+void Thread::StoreBufferRelease(bool check_threshold) {
+  StoreBufferBlock* block = store_buffer_block_;
+  store_buffer_block_ = NULL;
+  isolate_->store_buffer()->PushBlock(block, check_threshold);
+}
+
+
+void Thread::StoreBufferAcquire() {
+  store_buffer_block_ = isolate()->store_buffer()->PopNonFullBlock();
+}
+
+
 CHA* Thread::cha() const {
   ASSERT(isolate_ != NULL);
   return isolate_->cha_;
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 557b862..904d751 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -15,10 +15,12 @@
 class HandleScope;
 class Heap;
 class Isolate;
+class LongJumpScope;
 class Object;
 class RawBool;
 class RawObject;
 class StackResource;
+class TimelineEventBlock;
 class Zone;
 
 
@@ -81,8 +83,9 @@
   // "helper" to gain limited concurrent access to the isolate. One example is
   // SweeperTask (which uses the class table, which is copy-on-write).
   // TODO(koda): Properly synchronize heap access to expand allowed operations.
-  static void EnterIsolateAsHelper(Isolate* isolate);
-  static void ExitIsolateAsHelper();
+  static void EnterIsolateAsHelper(Isolate* isolate,
+                                   bool bypass_safepoint = false);
+  static void ExitIsolateAsHelper(bool bypass_safepoint = false);
 
   // Called when the current thread transitions from mutator to collector.
   // Empties the store buffer block into the isolate.
@@ -207,6 +210,8 @@
     Zone* zone;
     uword top_exit_frame_info;
     StackResource* top_resource;
+    TimelineEventBlock* timeline_block;
+    LongJumpScope* long_jump_base;
 #if defined(DEBUG)
     HandleScope* top_handle_scope;
     intptr_t no_handle_scope_depth;
@@ -224,6 +229,19 @@
   static bool CanLoadFromThread(const Object& object);
   static intptr_t OffsetFromThread(const Object& object);
 
+  TimelineEventBlock* timeline_block() const {
+    return state_.timeline_block;
+  }
+
+  void set_timeline_block(TimelineEventBlock* block) {
+    state_.timeline_block = block;
+  }
+
+  LongJumpScope* long_jump_base() const { return state_.long_jump_base; }
+  void set_long_jump_base(LongJumpScope* value) {
+    state_.long_jump_base = value;
+  }
+
   ThreadId id() const {
     ASSERT(id_ != OSThread::kInvalidThreadId);
     return id_;
@@ -257,6 +275,9 @@
     memset(&state_, 0, sizeof(state_));
   }
 
+  void StoreBufferRelease(bool check_threshold = true);
+  void StoreBufferAcquire();
+
   void set_zone(Zone* zone) {
     state_.zone = zone;
   }
@@ -267,12 +288,13 @@
 
   static void SetCurrent(Thread* current);
 
-  void Schedule(Isolate* isolate);
-  void Unschedule();
+  void Schedule(Isolate* isolate, bool bypass_safepoint = false);
+  void Unschedule(bool bypass_safepoint = false);
 
   friend class ApiZone;
   friend class Isolate;
   friend class StackZone;
+  friend class ThreadRegistry;
   DISALLOW_COPY_AND_ASSIGN(Thread);
 };
 
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc
index b28bf25..0cf7c38 100644
--- a/runtime/vm/thread_interrupter.cc
+++ b/runtime/vm/thread_interrupter.cc
@@ -56,15 +56,10 @@
 Monitor* ThreadInterrupter::monitor_ = NULL;
 intptr_t ThreadInterrupter::interrupt_period_ = 1000;
 intptr_t ThreadInterrupter::current_wait_time_ = Monitor::kNoTimeout;
-ThreadLocalKey ThreadInterrupter::thread_state_key_ =
-    OSThread::kUnsetThreadLocalKey;
 
 
 void ThreadInterrupter::InitOnce() {
   ASSERT(!initialized_);
-  ASSERT(thread_state_key_ == OSThread::kUnsetThreadLocalKey);
-  thread_state_key_ = OSThread::CreateThreadLocal();
-  ASSERT(thread_state_key_ != OSThread::kUnsetThreadLocalKey);
   monitor_ = new Monitor();
   ASSERT(monitor_ != NULL);
   initialized_ = true;
diff --git a/runtime/vm/thread_interrupter.h b/runtime/vm/thread_interrupter.h
index 2e84b13..0fa00e1 100644
--- a/runtime/vm/thread_interrupter.h
+++ b/runtime/vm/thread_interrupter.h
@@ -44,7 +44,6 @@
   static Monitor* monitor_;
   static intptr_t interrupt_period_;
   static intptr_t current_wait_time_;
-  static ThreadLocalKey thread_state_key_;
 
   static bool InDeepSleep() {
     return current_wait_time_ == Monitor::kNoTimeout;
diff --git a/runtime/vm/thread_interrupter_win.cc b/runtime/vm/thread_interrupter_win.cc
index 72220ed..70a5e8c 100644
--- a/runtime/vm/thread_interrupter_win.cc
+++ b/runtime/vm/thread_interrupter_win.cc
@@ -21,29 +21,29 @@
   static bool GrabRegisters(HANDLE handle, InterruptedThreadState* state) {
     CONTEXT context;
     memset(&context, 0, sizeof(context));
-#if defined(TARGET_ARCH_IA32)
+#if defined(HOST_ARCH_IA32)
     // On IA32, CONTEXT_CONTROL includes Eip, Ebp, and Esp.
     context.ContextFlags = CONTEXT_CONTROL;
-#elif defined(TARGET_ARCH_X64)
+#elif defined(HOST_ARCH_X64)
     // On X64, CONTEXT_CONTROL includes Rip and Rsp. Rbp is classified
     // as an "integer" register.
     context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
 #else
-    UNIMPLEMENTED();
+#error Unsupported architecture.
 #endif
     if (GetThreadContext(handle, &context) != 0) {
-#if defined(TARGET_ARCH_IA32)
+#if defined(HOST_ARCH_IA32)
       state->pc = static_cast<uintptr_t>(context.Eip);
       state->fp = static_cast<uintptr_t>(context.Ebp);
       state->csp = static_cast<uintptr_t>(context.Esp);
       state->dsp = static_cast<uintptr_t>(context.Esp);
-#elif defined(TARGET_ARCH_X64)
+#elif defined(HOST_ARCH_X64)
       state->pc = static_cast<uintptr_t>(context.Rip);
       state->fp = static_cast<uintptr_t>(context.Rbp);
       state->csp = static_cast<uintptr_t>(context.Rsp);
       state->dsp = static_cast<uintptr_t>(context.Rsp);
 #else
-      UNIMPLEMENTED();
+#error Unsupported architecture.
 #endif
       return true;
     }
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index 23e22b7..d4ef68d 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -10,6 +10,24 @@
 namespace dart {
 
 ThreadRegistry::~ThreadRegistry() {
+  {
+    // Each thread that is scheduled in this isolate may have a cached timeline
+    // block. Mark these timeline blocks as finished.
+    MonitorLocker ml(monitor_);
+    TimelineEventRecorder* recorder = Timeline::recorder();
+    if (recorder != NULL) {
+      MutexLocker recorder_lock(&recorder->lock_);
+      for (intptr_t i = 0; i < entries_.length(); i++) {
+        // NOTE: It is only safe to access |entry.state| here.
+        const Entry& entry = entries_.At(i);
+        if (entry.state.timeline_block != NULL) {
+          entry.state.timeline_block->Finish();
+        }
+      }
+    }
+  }
+
+  // Delete monitor.
   delete monitor_;
 }
 
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index abe669a..cb10626 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -9,6 +9,7 @@
 #include "vm/growable_array.h"
 #include "vm/isolate.h"
 #include "vm/lockers.h"
+#include "vm/stack_frame.h"
 #include "vm/thread.h"
 
 namespace dart {
@@ -47,10 +48,11 @@
     CheckSafepointLocked();
   }
 
-  bool RestoreStateTo(Thread* thread, Thread::State* state) {
+  bool RestoreStateTo(Thread* thread, Thread::State* state,
+                      bool bypass_safepoint) {
     MonitorLocker ml(monitor_);
     // Wait for any rendezvous in progress.
-    while (in_rendezvous_) {
+    while (!bypass_safepoint && in_rendezvous_) {
       ml.Wait(Monitor::kNoTimeout);
     }
     Entry* entry = FindEntry(thread);
@@ -82,14 +84,15 @@
     return false;
   }
 
-  void SaveStateFrom(Thread* thread, const Thread::State& state) {
+  void SaveStateFrom(Thread* thread, const Thread::State& state,
+                     bool bypass_safepoint) {
     MonitorLocker ml(monitor_);
     Entry* entry = FindEntry(thread);
     ASSERT(entry != NULL);
     ASSERT(entry->scheduled);
     entry->scheduled = false;
     entry->state = state;
-    if (in_rendezvous_) {
+    if (!bypass_safepoint && in_rendezvous_) {
       // Don't wait for this thread.
       ASSERT(remaining_ > 0);
       if (--remaining_ == 0) {
@@ -116,13 +119,23 @@
     }
   }
 
-  void VisitObjectPointers(ObjectPointerVisitor* visitor) {
+  void VisitObjectPointers(ObjectPointerVisitor* visitor,
+                           bool validate_frames) {
     MonitorLocker ml(monitor_);
     for (int i = 0; i < entries_.length(); ++i) {
       const Entry& entry = entries_[i];
-      Zone* zone = entry.scheduled ? entry.thread->zone() : entry.state.zone;
-      if (zone != NULL) {
-        zone->VisitObjectPointers(visitor);
+      const Thread::State& state =
+          entry.scheduled ? entry.thread->state_ : entry.state;
+      if (state.zone != NULL) {
+        state.zone->VisitObjectPointers(visitor);
+      }
+      // Iterate over all the stack frames and visit objects on the stack.
+      StackFrameIterator frames_iterator(state.top_exit_frame_info,
+                                         validate_frames);
+      StackFrame* frame = frames_iterator.NextFrame();
+      while (frame != NULL) {
+        frame->VisitObjectPointers(visitor);
+        frame = frames_iterator.NextFrame();
       }
     }
   }
@@ -130,6 +143,9 @@
   void PruneThread(Thread* thread);
 
   struct Entry {
+    // NOTE: |thread| is deleted automatically when the thread exits.
+    // In other words, it is not safe to dereference |thread| unless you are on
+    // the thread itself.
     Thread* thread;
     bool scheduled;
     Thread::State state;
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 39bec07..560aa1c 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -131,12 +131,15 @@
       const intptr_t unique_smi = id_ + 928327281;
       Smi& smi = Smi::Handle(zone, Smi::New(unique_smi));
       EXPECT(smi.Value() == unique_smi);
-      ObjectCounter counter(isolate_, &smi);
-      // Ensure that our particular zone is visited.
-      // TODO(koda): Remove "->thread_registry()" after updating stack walker.
-      isolate_->thread_registry()->VisitObjectPointers(&counter);
-      EXPECT_EQ(1, counter.count());
-
+      {
+        ObjectCounter counter(isolate_, &smi);
+        // Ensure that our particular zone is visited.
+        isolate_->IterateObjectPointers(
+            &counter,
+            /* visit_prologue_weak_handles = */ true,
+            StackFrameIterator::kValidateFrames);
+        EXPECT_EQ(1, counter.count());
+      }
       char* unique_chars = zone->PrintToString("unique_str_%" Pd, id_);
       String& unique_str = String::Handle(zone);
       {
@@ -146,12 +149,16 @@
         unique_str = String::New(unique_chars, Heap::kOld);
       }
       EXPECT(unique_str.Equals(unique_chars));
-      ObjectCounter str_counter(isolate_, &unique_str);
-      // Ensure that our particular zone is visited.
-      // TODO(koda): Remove "->thread_registry()" after updating stack walker.
-      isolate_->thread_registry()->VisitObjectPointers(&str_counter);
-      // We should visit the string object exactly once.
-      EXPECT_EQ(1, str_counter.count());
+      {
+        ObjectCounter str_counter(isolate_, &unique_str);
+        // Ensure that our particular zone is visited.
+        isolate_->IterateObjectPointers(
+            &str_counter,
+            /* visit_prologue_weak_handles = */ true,
+            StackFrameIterator::kValidateFrames);
+        // We should visit the string object exactly once.
+        EXPECT_EQ(1, str_counter.count());
+      }
     }
     Thread::ExitIsolateAsHelper();
     {
@@ -272,7 +279,10 @@
         // But occasionally, organize a rendezvous.
         isolate_->thread_registry()->SafepointThreads();
         ObjectCounter counter(isolate_, &smi);
-        isolate_->thread_registry()->VisitObjectPointers(&counter);
+        isolate_->IterateObjectPointers(
+            &counter,
+            /* visit_prologue_weak_handles = */ true,
+            StackFrameIterator::kValidateFrames);
         {
           MutexLocker ml(mutex_);
           EXPECT_EQ(*expected_count_, counter.count());
@@ -438,4 +448,64 @@
   }
 }
 
+
+class AllocAndGCTask : public ThreadPool::Task {
+ public:
+  AllocAndGCTask(Isolate* isolate,
+                 Monitor* done_monitor,
+                 bool* done)
+    : isolate_(isolate),
+      done_monitor_(done_monitor),
+      done_(done) {
+  }
+
+  virtual void Run() {
+    Thread::EnterIsolateAsHelper(isolate_);
+    {
+      Thread* thread = Thread::Current();
+      StackZone stack_zone(thread);
+      Zone* zone = stack_zone.GetZone();
+      HANDLESCOPE(thread);
+      String& old_str = String::Handle(zone, String::New("old", Heap::kOld));
+      isolate_->heap()->CollectAllGarbage();
+      EXPECT(old_str.Equals("old"));
+    }
+    Thread::ExitIsolateAsHelper();
+    // Tell main thread that we are ready.
+    {
+      MonitorLocker ml(done_monitor_);
+      ASSERT(!*done_);
+      *done_ = true;
+      ml.Notify();
+    }
+  }
+
+ private:
+  Isolate* isolate_;
+  Monitor* done_monitor_;
+  bool* done_;
+};
+
+
+TEST_CASE(HelperAllocAndGC) {
+  Monitor done_monitor;
+  bool done = false;
+  Isolate* isolate = Thread::Current()->isolate();
+  // Flush store buffers, etc.
+  // TODO(koda): Currently, the GC only does this for the current thread, (i.e,
+  // the helper, in this test), but it should be done for all *threads*
+  // while reaching a safepoint.
+  Thread::PrepareForGC();
+  Dart::thread_pool()->Run(new AllocAndGCTask(isolate, &done_monitor, &done));
+  {
+    while (true) {
+      isolate->thread_registry()->CheckSafepoint();
+      MonitorLocker ml(&done_monitor);
+      if (done) {
+        break;
+      }
+    }
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 4c3fb9b..ecdd085 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -4,15 +4,70 @@
 
 #include <cstdlib>
 
+#include "vm/atomic.h"
 #include "vm/isolate.h"
 #include "vm/json_stream.h"
+#include "vm/lockers.h"
 #include "vm/object.h"
 #include "vm/thread.h"
 #include "vm/timeline.h"
 
 namespace dart {
 
-DEFINE_FLAG(bool, trace_timeline, false, "Timeline trace");
+DEFINE_FLAG(bool, trace_timeline, false, "Trace timeline backend");
+DEFINE_FLAG(bool, complete_timeline, false, "Record the complete timeline");
+
+DEFINE_FLAG(charp, timeline_dir, NULL,
+            "Enable all timeline trace streams and output VM global trace "
+            "into specified directory.");
+
+void Timeline::InitOnce() {
+  ASSERT(recorder_ == NULL);
+  // Default to ring recorder being enabled.
+  const bool use_ring_recorder = true;
+  // Some flags require that we use the endless recorder.
+  const bool use_endless_recorder = (FLAG_timeline_dir != NULL);
+  if (use_endless_recorder) {
+    recorder_ = new TimelineEventEndlessRecorder();
+  } else if (use_ring_recorder) {
+    recorder_ = new TimelineEventRingRecorder();
+  }
+  vm_stream_ = new TimelineStream();
+  vm_stream_->Init("VM", EnableStreamByDefault("VM"));
+}
+
+
+void Timeline::Shutdown() {
+  ASSERT(recorder_ != NULL);
+  if (FLAG_timeline_dir != NULL) {
+    recorder_->WriteTo(FLAG_timeline_dir);
+  }
+  delete recorder_;
+  recorder_ = NULL;
+  delete vm_stream_;
+  vm_stream_ = NULL;
+}
+
+
+TimelineEventRecorder* Timeline::recorder() {
+  return recorder_;
+}
+
+
+bool Timeline::EnableStreamByDefault(const char* stream_name) {
+  // TODO(johnmccutchan): Allow for command line control over streams.
+  return FLAG_timeline_dir != NULL;
+}
+
+
+TimelineStream* Timeline::GetVMStream() {
+  ASSERT(vm_stream_ != NULL);
+  return vm_stream_;
+}
+
+
+TimelineEventRecorder* Timeline::recorder_ = NULL;
+TimelineStream* Timeline::vm_stream_ = NULL;
 
 TimelineEvent::TimelineEvent()
     : timestamp0_(0),
@@ -21,8 +76,8 @@
       arguments_length_(0),
       state_(0),
       label_(NULL),
-      stream_(NULL),
-      thread_(NULL) {
+      category_(""),
+      thread_(OSThread::kInvalidThreadId) {
 }
 
 
@@ -33,21 +88,19 @@
 
 void TimelineEvent::Reset() {
   set_event_type(kNone);
-  thread_ = NULL;
-  stream_ = NULL;
+  thread_ = OSThread::kInvalidThreadId;
+  isolate_ = NULL;
+  category_ = "";
   label_ = NULL;
   FreeArguments();
 }
 
 
-int64_t TimelineEvent::AsyncBegin(const char* label) {
+void TimelineEvent::AsyncBegin(const char* label, int64_t async_id) {
   Init(kAsyncBegin, label);
   timestamp0_ = OS::GetCurrentTimeMicros();
-  ASSERT(stream_ != NULL);
-  int64_t async_id = stream_->GetNextSeq();
   // Overload timestamp1_ with the async_id.
   timestamp1_ = async_id;
-  return async_id;
 }
 
 
@@ -140,7 +193,10 @@
 
 
 void TimelineEvent::Complete() {
-  stream_->CompleteEvent(this);
+  TimelineEventRecorder* recorder = Timeline::recorder();
+  if (recorder != NULL) {
+    recorder->CompleteEvent(this);
+  }
 }
 
 
@@ -158,8 +214,11 @@
 
 
 void TimelineEvent::StreamInit(TimelineStream* stream) {
-  ASSERT(stream != NULL);
-  stream_ = stream;
+  if (stream != NULL) {
+    category_ = stream->name();
+  } else {
+    category_ = "";
+  }
 }
 
 
@@ -169,32 +228,19 @@
   set_event_type(event_type);
   timestamp0_ = 0;
   timestamp1_ = 0;
-  thread_ = Thread::Current();
+  thread_ = OSThread::GetCurrentThreadId();
+  isolate_ = Isolate::Current();
   label_ = label;
   FreeArguments();
 }
 
 
-static int64_t GetPid(Isolate* isolate) {
-  // Some mapping from Isolate* to an integer process id.
-  // TODO(Cutch): Investigate if process ids can be strings.
-  return static_cast<int64_t>(reinterpret_cast<uintptr_t>(isolate));
-}
-
-
-static int64_t GetTid(Thread* thread) {
-  // Some mapping from Thread* to an integer thread id.
-  // TODO(Cutch): Investigate if process ids can be strings.
-  return static_cast<int64_t>(reinterpret_cast<uintptr_t>(thread));
-}
-
-
 void TimelineEvent::PrintJSON(JSONStream* stream) const {
   JSONObject obj(stream);
-  int64_t pid = GetPid(Isolate::Current());
-  int64_t tid = GetTid(thread_);
+  int64_t pid = OS::ProcessId();
+  int64_t tid = OSThread::ThreadIdToIntPtr(thread_);
   obj.AddProperty("name", label_);
-  obj.AddProperty("cat", stream_->name());
+  obj.AddProperty("cat", category_);
   obj.AddProperty64("tid", tid);
   obj.AddProperty64("pid", pid);
   obj.AddPropertyTimeMillis("ts", TimeOrigin());
@@ -258,10 +304,8 @@
 
 
 TimelineStream::TimelineStream()
-    : recorder_(NULL),
-      name_(NULL),
-      enabled_(false),
-      seq_(0) {
+    : name_(NULL),
+      enabled_(false) {
 }
 
 
@@ -271,26 +315,13 @@
 }
 
 
-TimelineEvent* TimelineStream::StartEvent(const Object& obj) {
-  if (!enabled_ || (recorder_ == NULL)) {
-    return NULL;
-  }
-  ASSERT(name_ != NULL);
-  ASSERT(recorder_ != NULL);
-  TimelineEvent* event = recorder_->StartEvent(obj);
-  if (event != NULL) {
-    event->StreamInit(this);
-  }
-  return event;
-}
-
-
 TimelineEvent* TimelineStream::StartEvent() {
-  if (!enabled_ || (recorder_ == NULL)) {
+  TimelineEventRecorder* recorder = Timeline::recorder();
+  if (!enabled_ || (recorder == NULL)) {
     return NULL;
   }
   ASSERT(name_ != NULL);
-  TimelineEvent* event = recorder_->StartEvent();
+  TimelineEvent* event = recorder->StartEvent();
   if (event != NULL) {
     event->StreamInit(this);
   }
@@ -298,23 +329,6 @@
 }
 
 
-void TimelineStream::CompleteEvent(TimelineEvent* event) {
-  if (!enabled_ || (recorder_ == NULL)) {
-    return;
-  }
-  recorder_->CompleteEvent(event);
-}
-
-
-int64_t TimelineStream::GetNextSeq() {
-  seq_++;
-  if (seq_ < 0) {
-    seq_ = 0;
-  }
-  return seq_;
-}
-
-
 void TimelineDurationScope::FormatArgument(intptr_t i,
                                            const char* name,
                                            const char* fmt, ...) {
@@ -336,27 +350,84 @@
 }
 
 
-TimelineEventRecorder::TimelineEventRecorder() {
+TimelineEventFilter::TimelineEventFilter() {
+}
+
+
+TimelineEventFilter::~TimelineEventFilter() {
+}
+
+
+IsolateTimelineEventFilter::IsolateTimelineEventFilter(Isolate* isolate)
+    : isolate_(isolate) {
+}
+
+
+TimelineEventRecorder::TimelineEventRecorder()
+    : global_block_(NULL),
+      async_id_(0) {
 }
 
 
 void TimelineEventRecorder::PrintJSONMeta(JSONArray* events) const {
-  Isolate* isolate = Isolate::Current();
-  JSONObject obj(events);
-  int64_t pid = GetPid(isolate);
-  obj.AddProperty("ph", "M");
-  obj.AddProperty64("pid", pid);
-  obj.AddProperty("name", "process_name");
-  {
-    JSONObject args(&obj, "args");
-    args.AddProperty("name", isolate->debugger_name());
+}
+
+
+TimelineEvent* TimelineEventRecorder::ThreadBlockStartEvent() {
+  // Grab the thread's timeline event block.
+  Thread* thread = Thread::Current();
+  ASSERT(thread != NULL);
+
+  if (thread->isolate() == NULL) {
+    // Non-isolate thread case. This should be infrequent.
+    return GlobalBlockStartEvent();
   }
+
+  TimelineEventBlock* thread_block = thread->timeline_block();
+
+  if ((thread_block != NULL) && thread_block->IsFull()) {
+    MutexLocker ml(&lock_);
+    // Thread has a block and it is full:
+    // 1) Mark it as finished.
+    thread_block->Finish();
+    // 2) Allocate a new block.
+    thread_block = GetNewBlockLocked(thread->isolate());
+    thread->set_timeline_block(thread_block);
+  } else if (thread_block == NULL) {
+    MutexLocker ml(&lock_);
+    // Thread has no block. Attempt to allocate one.
+    thread_block = GetNewBlockLocked(thread->isolate());
+    thread->set_timeline_block(thread_block);
+  }
+  if (thread_block != NULL) {
+    ASSERT(!thread_block->IsFull());
+    return thread_block->StartEvent();
+  }
+  return NULL;
+}
+
+
+
+TimelineEvent* TimelineEventRecorder::GlobalBlockStartEvent() {
+  MutexLocker ml(&lock_);
+  if ((global_block_ != NULL) && global_block_->IsFull()) {
+    // Global block is full.
+    global_block_->Finish();
+    global_block_ = NULL;
+  }
+  if (global_block_ == NULL) {
+    // Allocate a new block.
+    global_block_ = GetNewBlockLocked(NULL);
+  }
+  if (global_block_ != NULL) {
+    ASSERT(!global_block_->IsFull());
+    return global_block_->StartEvent();
+  }
+  return NULL;
 }
 
 
 void TimelineEventRecorder::WriteTo(const char* directory) {
-  Isolate* isolate = Isolate::Current();
-
   Dart_FileOpenCallback file_open = Isolate::file_open_callback();
   Dart_FileWriteCallback file_write = Isolate::file_write_callback();
   Dart_FileCloseCallback file_close = Isolate::file_close_callback();
@@ -364,111 +435,165 @@
     return;
   }
 
-  JSONStream js;
-  PrintJSON(&js);
+  FinishGlobalBlock();
 
-  const char* format = "%s/dart-timeline-%" Pd "-%" Pd ".json";
+  JSONStream js;
+  TimelineEventFilter filter;
+  PrintJSON(&js, &filter);
+
+  const char* format = "%s/dart-timeline-%" Pd ".json";
   intptr_t pid = OS::ProcessId();
-  intptr_t len = OS::SNPrint(NULL, 0, format,
-                             directory, pid, isolate->main_port());
-  char* filename = Thread::Current()->zone()->Alloc<char>(len + 1);
-  OS::SNPrint(filename, len + 1, format,
-              directory, pid, isolate->main_port());
+  intptr_t len = OS::SNPrint(NULL, 0, format, directory, pid);
+  char* filename = reinterpret_cast<char*>(malloc(len + 1));
+  OS::SNPrint(filename, len + 1, format, directory, pid);
   void* file = (*file_open)(filename, true);
   if (file == NULL) {
     OS::Print("Failed to write timeline file: %s\n", filename);
+    free(filename);
     return;
   }
+  free(filename);
   (*file_write)(js.buffer()->buf(), js.buffer()->length(), file);
   (*file_close)(file);
 }
 
 
-intptr_t TimelineEventRingRecorder::SizeForCapacity(intptr_t capacity) {
-  return sizeof(TimelineEvent) * capacity;
+void TimelineEventRecorder::FinishGlobalBlock() {
+  MutexLocker ml(&lock_);
+  if (global_block_ != NULL) {
+    global_block_->Finish();
+    global_block_ = NULL;
+  }
+}
+
+
+int64_t TimelineEventRecorder::GetNextAsyncId() {
+  // TODO(johnmccutchan): Gracefully handle wrap around.
+  uint32_t next = static_cast<uint32_t>(
+      AtomicOperations::FetchAndIncrement(&async_id_));
+  return static_cast<int64_t>(next);
+}
+
+
+TimelineEventBlock* TimelineEventRecorder::GetNewBlock() {
+  MutexLocker ml(&lock_);
+  return GetNewBlockLocked(Isolate::Current());
 }
 
 
 TimelineEventRingRecorder::TimelineEventRingRecorder(intptr_t capacity)
-    : events_(NULL),
-      event_objects_(Array::null()),
-      cursor_(0),
-      capacity_(capacity) {
-  if (FLAG_trace_timeline) {
-    // 32-bit: 262,144 bytes per isolate.
-    // 64-bit: 393,216 bytes per isolate.
-    // NOTE: Internal isolates (vm and service) do not have a timeline
-    // event buffer.
-    OS::Print("TimelineEventRingRecorder is %" Pd " bytes (%" Pd " events)\n",
-              SizeForCapacity(capacity),
-              capacity);
+    : blocks_(NULL),
+      capacity_(capacity),
+      num_blocks_(0),
+      block_cursor_(0) {
+  // Capacity must be a multiple of TimelineEventBlock::kBlockSize
+  ASSERT((capacity % TimelineEventBlock::kBlockSize) == 0);
+  // Allocate blocks array.
+  num_blocks_ = capacity / TimelineEventBlock::kBlockSize;
+  blocks_ =
+      reinterpret_cast<TimelineEventBlock**>(
+          calloc(num_blocks_, sizeof(TimelineEventBlock*)));
+  // Allocate each block.
+  for (intptr_t i = 0; i < num_blocks_; i++) {
+    blocks_[i] = new TimelineEventBlock(i);
   }
-  events_ =
-      reinterpret_cast<TimelineEvent*>(calloc(capacity, sizeof(TimelineEvent)));
-  const Array& array = Array::Handle(Array::New(capacity, Heap::kOld));
-  event_objects_ = array.raw();
+  // Chain blocks together.
+  for (intptr_t i = 0; i < num_blocks_ - 1; i++) {
+    blocks_[i]->set_next(blocks_[i + 1]);
+  }
 }
 
 
 TimelineEventRingRecorder::~TimelineEventRingRecorder() {
-  for (intptr_t i = 0; i < capacity_; i++) {
-    // Clear any extra data.
-    events_[i].Reset();
+  // Delete all blocks.
+  for (intptr_t i = 0; i < num_blocks_; i++) {
+    TimelineEventBlock* block = blocks_[i];
+    delete block;
   }
-  free(events_);
-  event_objects_ = Array::null();
+  free(blocks_);
 }
 
 
-void TimelineEventRingRecorder::PrintJSONEvents(JSONArray* events) const {
-  for (intptr_t i = 0; i < capacity_; i++) {
-    if (events_[i].IsValid()) {
-      events->AddValue(&events_[i]);
+void TimelineEventRingRecorder::PrintJSONEvents(
+    JSONArray* events,
+    TimelineEventFilter* filter) const {
+  intptr_t block_offset = FindOldestBlockIndex();
+  if (block_offset == -1) {
+    // All blocks are empty.
+    return;
+  }
+  for (intptr_t block_idx = 0; block_idx < num_blocks_; block_idx++) {
+    TimelineEventBlock* block =
+        blocks_[(block_idx + block_offset) % num_blocks_];
+    if (!filter->IncludeBlock(block)) {
+      continue;
+    }
+    for (intptr_t event_idx = 0; event_idx < block->length(); event_idx++) {
+      TimelineEvent* event = block->At(event_idx);
+      if (filter->IncludeEvent(event)) {
+        events->AddValue(event);
+      }
     }
   }
 }
 
 
-void TimelineEventRingRecorder::PrintJSON(JSONStream* js) const {
+void TimelineEventRingRecorder::PrintJSON(JSONStream* js,
+                                          TimelineEventFilter* filter) {
+  MutexLocker ml(&lock_);
   JSONObject topLevel(js);
   topLevel.AddProperty("type", "_Timeline");
   {
     JSONArray events(&topLevel, "traceEvents");
     PrintJSONMeta(&events);
-    PrintJSONEvents(&events);
+    PrintJSONEvents(&events, filter);
   }
 }
 
 
-intptr_t TimelineEventRingRecorder::GetNextIndex() {
-  uintptr_t cursor = AtomicOperations::FetchAndIncrement(&cursor_);
-  return cursor % capacity_;
+TimelineEventBlock* TimelineEventRingRecorder::GetHeadBlockLocked() {
+  return blocks_[0];
 }
 
 
-void TimelineEventRingRecorder::VisitObjectPointers(
-    ObjectPointerVisitor* visitor) {
-  visitor->VisitPointer(reinterpret_cast<RawObject**>(&event_objects_));
+TimelineEventBlock* TimelineEventRingRecorder::GetNewBlockLocked(
+    Isolate* isolate) {
+  // TODO(johnmccutchan): This function should only hand out blocks
+  // which have been marked as finished.
+  if (block_cursor_ == num_blocks_) {
+    block_cursor_ = 0;
+  }
+  TimelineEventBlock* block = blocks_[block_cursor_++];
+  block->Reset();
+  block->Open(isolate);
+  return block;
 }
 
 
-TimelineEvent* TimelineEventRingRecorder::StartEvent(const Object& obj) {
-  ASSERT(events_ != NULL);
-  uintptr_t index = GetNextIndex();
-  const Array& event_objects = Array::Handle(event_objects_);
-  event_objects.SetAt(index, obj);
-  return &events_[index];
+intptr_t TimelineEventRingRecorder::FindOldestBlockIndex() const {
+  int64_t earliest_time = kMaxInt64;
+  intptr_t earliest_index = -1;
+  for (intptr_t block_idx = 0; block_idx < num_blocks_; block_idx++) {
+    TimelineEventBlock* block = blocks_[block_idx];
+    if (block->IsEmpty()) {
+      // Skip empty blocks.
+      continue;
+    }
+    if (block->LowerTimeBound() < earliest_time) {
+      earliest_time = block->LowerTimeBound();
+      earliest_index = block_idx;
+    }
+  }
+  return earliest_index;
 }
 
 
 TimelineEvent* TimelineEventRingRecorder::StartEvent() {
-  ASSERT(events_ != NULL);
-  uintptr_t index = GetNextIndex();
-  return &events_[index];
+  return ThreadBlockStartEvent();
 }
 
+
 void TimelineEventRingRecorder::CompleteEvent(TimelineEvent* event) {
-  ASSERT(events_ != NULL);
   // no-op.
 }
 
@@ -481,7 +606,8 @@
 }
 
 
-void TimelineEventStreamingRecorder::PrintJSON(JSONStream* js) const {
+void TimelineEventStreamingRecorder::PrintJSON(JSONStream* js,
+                                               TimelineEventFilter* filter) {
   JSONObject topLevel(js);
   topLevel.AddProperty("type", "_Timeline");
   {
@@ -490,18 +616,6 @@
   }
 }
 
-void TimelineEventStreamingRecorder::VisitObjectPointers(
-    ObjectPointerVisitor* visitor) {
-  // no-op.
-}
-
-
-TimelineEvent* TimelineEventStreamingRecorder::StartEvent(
-    const Object& object) {
-  // The streaming recorder does not track Dart objects.
-  return StartEvent();
-}
-
 
 TimelineEvent* TimelineEventStreamingRecorder::StartEvent() {
   TimelineEvent* event = new TimelineEvent();
@@ -514,4 +628,208 @@
   delete event;
 }
 
+
+TimelineEventEndlessRecorder::TimelineEventEndlessRecorder()
+    : head_(NULL),
+      block_index_(0) {
+  GetNewBlock();
+}
+
+
+void TimelineEventEndlessRecorder::PrintJSON(JSONStream* js,
+                                             TimelineEventFilter* filter) {
+  MutexLocker ml(&lock_);
+  JSONObject topLevel(js);
+  topLevel.AddProperty("type", "_Timeline");
+  {
+    JSONArray events(&topLevel, "traceEvents");
+    PrintJSONMeta(&events);
+    PrintJSONEvents(&events, filter);
+  }
+}
+
+
+TimelineEventBlock* TimelineEventEndlessRecorder::GetHeadBlockLocked() {
+  return head_;
+}
+
+
+TimelineEvent* TimelineEventEndlessRecorder::StartEvent() {
+  return ThreadBlockStartEvent();
+}
+
+
+void TimelineEventEndlessRecorder::CompleteEvent(TimelineEvent* event) {
+  // no-op.
+}
+
+
+TimelineEventBlock* TimelineEventEndlessRecorder::GetNewBlockLocked(
+    Isolate* isolate) {
+  TimelineEventBlock* block = new TimelineEventBlock(block_index_++);
+  block->set_next(head_);
+  block->Open(isolate);
+  head_ = block;
+  return head_;
+}
+
+
+void TimelineEventEndlessRecorder::PrintJSONEvents(
+    JSONArray* events,
+    TimelineEventFilter* filter) const {
+  TimelineEventBlock* current = head_;
+
+  while (current != NULL) {
+    if (!filter->IncludeBlock(current)) {
+      current = current->next();
+      continue;
+    }
+    intptr_t length = current->length();
+    for (intptr_t i = 0; i < length; i++) {
+      TimelineEvent* event = current->At(i);
+      if (!filter->IncludeEvent(event)) {
+        continue;
+      }
+      events->AddValue(event);
+    }
+    current = current->next();
+  }
+}
+
+
+void TimelineEventEndlessRecorder::Clear() {
+  TimelineEventBlock* current = head_;
+  while (current != NULL) {
+    TimelineEventBlock* next = current->next();
+    delete current;
+    current = next;
+  }
+  head_ = NULL;
+  block_index_ = 0;
+  Thread* thread = Thread::Current();
+  thread->set_timeline_block(NULL);
+}
+
+
+TimelineEventBlock::TimelineEventBlock(intptr_t block_index)
+    : next_(NULL),
+      length_(0),
+      block_index_(block_index) {
+}
+
+
+TimelineEventBlock::~TimelineEventBlock() {
+  Reset();
+}
+
+
+TimelineEvent* TimelineEventBlock::StartEvent() {
+  ASSERT(!IsFull());
+  return &events_[length_++];
+}
+
+
+ThreadId TimelineEventBlock::thread() const {
+  ASSERT(length_ > 0);
+  return events_[0].thread();
+}
+
+
+int64_t TimelineEventBlock::LowerTimeBound() const {
+  ASSERT(length_ > 0);
+  return events_[0].TimeOrigin();
+}
+
+
+bool TimelineEventBlock::CheckBlock() {
+  if (length() == 0) {
+    return true;
+  }
+
+  // - events in the block come from one thread.
+  ThreadId tid = thread();
+  for (intptr_t i = 0; i < length(); i++) {
+    if (At(i)->thread() != tid) {
+      return false;
+    }
+  }
+
+  // - events have monotonically increasing timestamps.
+  int64_t last_time = LowerTimeBound();
+  for (intptr_t i = 0; i < length(); i++) {
+    if (last_time > At(i)->TimeOrigin()) {
+      return false;
+    }
+    last_time = At(i)->TimeOrigin();
+  }
+
+  return true;
+}
+
+
+void TimelineEventBlock::Reset() {
+  for (intptr_t i = 0; i < kBlockSize; i++) {
+    // Clear any extra data.
+    events_[i].Reset();
+  }
+  length_ = 0;
+  isolate_ = NULL;
+  open_ = false;
+}
+
+
+void TimelineEventBlock::Open(Isolate* isolate) {
+  isolate_ = isolate;
+  open_ = true;
+}
+
+
+void TimelineEventBlock::Finish() {
+  open_ = false;
+}
+
+
+TimelineEventBlockIterator::TimelineEventBlockIterator(
+    TimelineEventRecorder* recorder)
+    : current_(NULL),
+      recorder_(NULL) {
+  Reset(recorder);
+}
+
+
+TimelineEventBlockIterator::~TimelineEventBlockIterator() {
+  Reset(NULL);
+}
+
+
+void TimelineEventBlockIterator::Reset(TimelineEventRecorder* recorder) {
+  // Clear current.
+  current_ = NULL;
+  if (recorder_ != NULL) {
+    // Unlock old recorder.
+    recorder_->lock_.Unlock();
+  }
+  recorder_ = recorder;
+  if (recorder_ == NULL) {
+    return;
+  }
+  // Lock new recorder.
+  recorder_->lock_.Lock();
+  // Queue up first block.
+  current_ = recorder_->GetHeadBlockLocked();
+}
+
+
+bool TimelineEventBlockIterator::HasNext() const {
+  return current_ != NULL;
+}
+
+
+TimelineEventBlock* TimelineEventBlockIterator::Next() {
+  ASSERT(current_ != NULL);
+  TimelineEventBlock* r = current_;
+  current_ = current_->next();
+  return r;
+}
+
 }  // namespace dart
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 81977ad..983d3fc 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -5,18 +5,47 @@
 #ifndef VM_TIMELINE_H_
 #define VM_TIMELINE_H_
 
+#include "vm/allocation.h"
 #include "vm/bitfield.h"
 
 namespace dart {
 
+class JSONArray;
+class JSONObject;
 class JSONStream;
 class Object;
+class ObjectPointerVisitor;
 class RawArray;
 class Thread;
 class TimelineEvent;
+class TimelineEventBlock;
 class TimelineEventRecorder;
 class TimelineStream;
 
+
+class Timeline : public AllStatic {
+ public:
+  // Initialize timeline system. Not thread safe.
+  static void InitOnce();
+
+  // Shutdown timeline system. Not thread safe.
+  static void Shutdown();
+
+  // Access the global recorder. Not thread safe.
+  static TimelineEventRecorder* recorder();
+
+  static bool EnableStreamByDefault(const char* stream_name);
+
+  static TimelineStream* GetVMStream();
+
+ private:
+  static TimelineEventRecorder* recorder_;
+  static TimelineStream* vm_stream_;
+
+  friend class TimelineRecorderOverride;
+};
+
+
 // You should get a |TimelineEvent| from a |TimelineStream|.
 class TimelineEvent {
  public:
@@ -40,9 +69,8 @@
     return (event_type() > kNone) && (event_type() < kNumEventTypes);
   }
 
-  // Marks the beginning of an asynchronous operation.
-  // Returns |async_id| which must be passed to |AsyncInstant| and |AsyncEnd|.
-  int64_t AsyncBegin(const char* label);
+  // Marks the beginning of an asynchronous operation with |async_id|.
+  void AsyncBegin(const char* label, int64_t async_id);
   // Marks an instantaneous event associated with |async_id|.
   void AsyncInstant(const char* label,
                     int64_t async_id);
@@ -76,12 +104,52 @@
     return EventTypeField::decode(state_);
   }
 
+  bool IsFinishedDuration() const {
+    return (event_type() == kDuration) && (timestamp1_ > timestamp0_);
+  }
+
   int64_t TimeOrigin() const;
   int64_t AsyncId() const;
   int64_t TimeDuration() const;
+  int64_t TimeEnd() const {
+    ASSERT(IsFinishedDuration());
+    return timestamp1_;
+  }
 
   void PrintJSON(JSONStream* stream) const;
 
+  ThreadId thread() const {
+    return thread_;
+  }
+
+  const char* label() const {
+    return label_;
+  }
+
+  // Does this duration end before |micros| ?
+  bool DurationFinishedBefore(int64_t micros) const {
+    return TimeEnd() <= micros;
+  }
+
+  // Does this duration fully contain |other| ?
+  bool DurationContains(TimelineEvent* other) const {
+    ASSERT(IsFinishedDuration());
+    ASSERT(other->IsFinishedDuration());
+    if (other->TimeOrigin() < TimeOrigin()) {
+      return false;
+    }
+    if (other->TimeEnd() < TimeOrigin()) {
+      return false;
+    }
+    if (other->TimeOrigin() > TimeEnd()) {
+      return false;
+    }
+    if (other->TimeEnd() > TimeEnd()) {
+      return false;
+    }
+    return true;
+  }
+
  private:
   struct TimelineEventArgument {
     const char* name;
@@ -94,8 +162,9 @@
   intptr_t arguments_length_;
   uword state_;
   const char* label_;
-  TimelineStream* stream_;
-  Thread* thread_;
+  const char* category_;
+  ThreadId thread_;
+  Isolate* isolate_;
 
   void FreeArguments();
 
@@ -140,33 +209,13 @@
     enabled_ = enabled;
   }
 
-  TimelineEventRecorder* recorder() const {
-    return recorder_;
-  }
-
-  // TODO(johnmccutchan): Disallow setting recorder after Init?
-  void set_recorder(TimelineEventRecorder* recorder) {
-    recorder_ = recorder;
-  }
-
-  // Records an event. Will return |NULL| if not enabled. The returned
-  // |TimelineEvent| is in an undefined state and must be initialized.
-  // |obj| is associated with the returned |TimelineEvent|.
-  TimelineEvent* StartEvent(const Object& obj);
-
   // Records an event. Will return |NULL| if not enabled. The returned
   // |TimelineEvent| is in an undefined state and must be initialized.
   TimelineEvent* StartEvent();
 
-  void CompleteEvent(TimelineEvent* event);
-
-  int64_t GetNextSeq();
-
  private:
-  TimelineEventRecorder* recorder_;
   const char* name_;
   bool enabled_;
-  int64_t seq_;
 };
 
 
@@ -179,24 +228,44 @@
   V(Isolate, false)                                                            \
 
 
-#define TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, suffix, function)      \
-  TimelineDurationScope tds(isolate,                                           \
-                            isolate->GetCompilerStream(),                      \
-                            "Compile"#suffix);                                 \
+#define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function)       \
+  TimelineDurationScope tds(thread,                                            \
+                            thread->isolate()->GetCompilerStream(),            \
+                            "Compile" suffix);                                 \
   if (tds.enabled()) {                                                         \
     tds.SetNumArguments(1);                                                    \
     tds.CopyArgument(                                                          \
         0,                                                                     \
         "function",                                                            \
-        const_cast<char*>(function.QualifiedUserVisibleNameCString()));        \
+        const_cast<char*>(function.ToLibNamePrefixedQualifiedCString()));      \
   }
 
+
+// TODO(johnmccutchan): TimelineDurationScope should only allocate the
+// event when complete.
 class TimelineDurationScope : public StackResource {
  public:
   TimelineDurationScope(Isolate* isolate,
                         TimelineStream* stream,
                         const char* label)
       : StackResource(isolate) {
+    Init(stream, label);
+  }
+
+  TimelineDurationScope(Thread* thread,
+                        TimelineStream* stream,
+                        const char* label)
+      : StackResource(thread) {
+    Init(stream, label);
+  }
+
+  TimelineDurationScope(TimelineStream* stream,
+                        const char* label)
+      : StackResource(reinterpret_cast<Thread*>(NULL)) {
+    Init(stream, label);
+  }
+
+  void Init(TimelineStream* stream, const char* label) {
     event_ = stream->StartEvent();
     if (event_ == NULL) {
       return;
@@ -246,28 +315,180 @@
 };
 
 
+// A block of |TimelineEvent|s. Not thread safe.
+class TimelineEventBlock {
+ public:
+  static const intptr_t kBlockSize = 64;
+
+  explicit TimelineEventBlock(intptr_t index);
+  ~TimelineEventBlock();
+
+  TimelineEventBlock* next() const {
+    return next_;
+  }
+  void set_next(TimelineEventBlock* next) {
+    next_ = next;
+  }
+
+  intptr_t length() const {
+    return length_;
+  }
+
+  intptr_t block_index() const {
+    return block_index_;
+  }
+
+  bool IsEmpty() const {
+    return length_ == 0;
+  }
+
+  bool IsFull() const {
+    return length_ == kBlockSize;
+  }
+
+  TimelineEvent* At(intptr_t index) {
+    ASSERT(index >= 0);
+    ASSERT(index < kBlockSize);
+    return &events_[index];
+  }
+
+  const TimelineEvent* At(intptr_t index) const {
+    ASSERT(index >= 0);
+    ASSERT(index < kBlockSize);
+    return &events_[index];
+  }
+
+  // Attempt to sniff a thread id from the first event.
+  ThreadId thread() const;
+  // Attempt to sniff the timestamp from the first event.
+  int64_t LowerTimeBound() const;
+
+  // Returns false if |this| violates any of the following invariants:
+  // - events in the block come from one thread.
+  // - events have monotonically increasing timestamps.
+  bool CheckBlock();
+
+  // Call Reset on all events and set length to 0.
+  void Reset();
+
+  // Only safe to access under the recorder's lock.
+  bool open() const {
+    return open_;
+  }
+
+  // Only safe to access under the recorder's lock.
+  Isolate* isolate() const {
+    return isolate_;
+  }
+
+ protected:
+  TimelineEvent* StartEvent();
+
+  TimelineEvent events_[kBlockSize];
+  TimelineEventBlock* next_;
+  intptr_t length_;
+  intptr_t block_index_;
+
+  // Only accessed under the recorder's lock.
+  Isolate* isolate_;
+  bool open_;
+
+  void Open(Isolate* isolate);
+  void Finish();
+
+  friend class ThreadRegistry;
+  friend class TimelineEventRecorder;
+  friend class TimelineEventRingRecorder;
+  friend class TimelineEventEndlessRecorder;
+  friend class TimelineTestHelper;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(TimelineEventBlock);
+};
+
+
+class TimelineEventFilter : public ValueObject {
+ public:
+  TimelineEventFilter();
+  virtual ~TimelineEventFilter();
+
+  virtual bool IncludeBlock(TimelineEventBlock* block) {
+    if (block == NULL) {
+      return false;
+    }
+    // Not empty and not open.
+    return !block->IsEmpty() && !block->open();
+  }
+
+  virtual bool IncludeEvent(TimelineEvent* event) {
+    if (event == NULL) {
+      return false;
+    }
+    return event->IsValid();
+  }
+
+ private:
+};
+
+
+class IsolateTimelineEventFilter : public TimelineEventFilter {
+ public:
+  explicit IsolateTimelineEventFilter(Isolate* isolate);
+
+  bool IncludeBlock(TimelineEventBlock* block) {
+    if (block == NULL) {
+      return false;
+    }
+    // Not empty, not open, and isolate match.
+    return !block->IsEmpty() &&
+           (block->isolate() == isolate_);
+  }
+
+ private:
+  Isolate* isolate_;
+};
+
+
 // Recorder of |TimelineEvent|s.
 class TimelineEventRecorder {
  public:
   TimelineEventRecorder();
   virtual ~TimelineEventRecorder() {}
 
-  // Interface method(s) which must be implemented.
-  virtual void PrintJSON(JSONStream* js) const = 0;
+  TimelineEventBlock* GetNewBlock();
 
-  void WriteTo(const char* directory);
+  // Interface method(s) which must be implemented.
+  virtual void PrintJSON(JSONStream* js, TimelineEventFilter* filter) = 0;
+
+  int64_t GetNextAsyncId();
 
  protected:
+  void WriteTo(const char* directory);
+
   // Interface method(s) which must be implemented.
-  virtual void VisitObjectPointers(ObjectPointerVisitor* visitor) = 0;
-  virtual TimelineEvent* StartEvent(const Object& object) = 0;
   virtual TimelineEvent* StartEvent() = 0;
   virtual void CompleteEvent(TimelineEvent* event) = 0;
+  virtual TimelineEventBlock* GetHeadBlockLocked() = 0;
+  virtual TimelineEventBlock* GetNewBlockLocked(Isolate* isolate) = 0;
 
   // Utility method(s).
   void PrintJSONMeta(JSONArray* array) const;
+  TimelineEvent* ThreadBlockStartEvent();
+  TimelineEvent* GlobalBlockStartEvent();
 
+  Mutex lock_;
+  // Only accessed under |lock_|.
+  TimelineEventBlock* global_block_;
+  void FinishGlobalBlock();
+
+  uintptr_t async_id_;
+
+  friend class ThreadRegistry;
+  friend class TimelineEvent;
+  friend class TimelineEventBlockIterator;
   friend class TimelineStream;
+  friend class TimelineTestHelper;
+  friend class Timeline;
   friend class Isolate;
 
  private:
@@ -280,51 +501,100 @@
  public:
   static const intptr_t kDefaultCapacity = 8192;
 
-  static intptr_t SizeForCapacity(intptr_t capacity);
-
   explicit TimelineEventRingRecorder(intptr_t capacity = kDefaultCapacity);
   ~TimelineEventRingRecorder();
 
-  void PrintJSON(JSONStream* js) const;
+  void PrintJSON(JSONStream* js, TimelineEventFilter* filter);
 
  protected:
-  void VisitObjectPointers(ObjectPointerVisitor* visitor);
-  TimelineEvent* StartEvent(const Object& object);
   TimelineEvent* StartEvent();
   void CompleteEvent(TimelineEvent* event);
+  TimelineEventBlock* GetHeadBlockLocked();
+  intptr_t FindOldestBlockIndex() const;
+  TimelineEventBlock* GetNewBlockLocked(Isolate* isolate);
 
-  void PrintJSONEvents(JSONArray* array) const;
+  void PrintJSONEvents(JSONArray* array, TimelineEventFilter* filter) const;
 
-  intptr_t GetNextIndex();
-
-  // events_[i] and event_objects_[i] are indexed together.
-  TimelineEvent* events_;
-  RawArray* event_objects_;
-  uintptr_t cursor_;
+  TimelineEventBlock** blocks_;
   intptr_t capacity_;
+  intptr_t num_blocks_;
+  intptr_t block_cursor_;
 };
 
 
 // An abstract recorder that calls |StreamEvent| whenever an event is complete.
-// This recorder does not track Dart objects.
 class TimelineEventStreamingRecorder : public TimelineEventRecorder {
  public:
   TimelineEventStreamingRecorder();
   ~TimelineEventStreamingRecorder();
 
-  void PrintJSON(JSONStream* js) const;
+  void PrintJSON(JSONStream* js, TimelineEventFilter* filter);
 
   // Called when |event| is ready to be streamed. It is unsafe to keep a
   // reference to |event| as it may be freed as soon as this function returns.
   virtual void StreamEvent(TimelineEvent* event) = 0;
 
  protected:
-  void VisitObjectPointers(ObjectPointerVisitor* visitor);
-  TimelineEvent* StartEvent(const Object& object);
+  TimelineEventBlock* GetNewBlockLocked(Isolate* isolate) {
+    return NULL;
+  }
+  TimelineEventBlock* GetHeadBlockLocked() {
+    return NULL;
+  }
   TimelineEvent* StartEvent();
   void CompleteEvent(TimelineEvent* event);
 };
 
+
+// A recorder that stores events in chains of blocks of events.
+// NOTE: This recorder will continue to allocate blocks until it exhausts
+// memory.
+class TimelineEventEndlessRecorder : public TimelineEventRecorder {
+ public:
+  TimelineEventEndlessRecorder();
+
+  // NOTE: Calling this while threads are filling in their blocks is not safe
+  // and there are no checks in place to ensure that doesn't happen.
+  // TODO(koda): Add isolate count to |ThreadRegistry| and verify that it is 1.
+  void PrintJSON(JSONStream* js, TimelineEventFilter* filter);
+
+ protected:
+  TimelineEvent* StartEvent();
+  void CompleteEvent(TimelineEvent* event);
+  TimelineEventBlock* GetNewBlockLocked(Isolate* isolate);
+  TimelineEventBlock* GetHeadBlockLocked();
+
+  void PrintJSONEvents(JSONArray* array, TimelineEventFilter* filter) const;
+
+  // Useful only for testing. Only works for one thread.
+  void Clear();
+
+  TimelineEventBlock* head_;
+  intptr_t block_index_;
+
+  friend class TimelineTestHelper;
+};
+
+
+// An iterator for blocks.
+class TimelineEventBlockIterator {
+ public:
+  explicit TimelineEventBlockIterator(TimelineEventRecorder* recorder);
+  ~TimelineEventBlockIterator();
+
+  void Reset(TimelineEventRecorder* recorder);
+
+  // Returns false when there are no more blocks.
+  bool HasNext() const;
+
+  // Returns the next block and moves forward.
+  TimelineEventBlock* Next();
+
+ private:
+  TimelineEventBlock* current_;
+  TimelineEventRecorder* recorder_;
+};
+
 }  // namespace dart
 
 #endif  // VM_TIMELINE_H_
diff --git a/runtime/vm/timeline_analysis.cc b/runtime/vm/timeline_analysis.cc
new file mode 100644
index 0000000..08deb77
--- /dev/null
+++ b/runtime/vm/timeline_analysis.cc
@@ -0,0 +1,425 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/timeline_analysis.h"
+
+#include "vm/flags.h"
+#include "vm/log.h"
+#include "vm/os_thread.h"
+
+namespace dart {
+
+DEFINE_FLAG(bool, trace_timeline_analysis, false, "Trace timeline analysis");
+
+TimelineAnalysisThread::TimelineAnalysisThread(ThreadId id)
+    : id_(id) {
+}
+
+
+TimelineAnalysisThread::~TimelineAnalysisThread() {
+}
+
+
+void TimelineAnalysisThread::AddBlock(TimelineEventBlock* block) {
+  blocks_.Add(block);
+}
+
+
+static int CompareBlocksLowerTimeBound(TimelineEventBlock* const* a,
+                                       TimelineEventBlock* const* b) {
+  ASSERT(a != NULL);
+  ASSERT(*a != NULL);
+  ASSERT(b != NULL);
+  ASSERT(*b != NULL);
+  return (*a)->LowerTimeBound() - (*b)->LowerTimeBound();
+}
+
+
+void TimelineAnalysisThread::Finalize() {
+  blocks_.Sort(CompareBlocksLowerTimeBound);
+  if (FLAG_trace_timeline_analysis) {
+    ISL_Print("Thread %" Px " has %" Pd " blocks\n",
+              OSThread::ThreadIdToIntPtr(id_),
+              blocks_.length());
+  }
+}
+
+
+TimelineAnalysisThreadEventIterator::TimelineAnalysisThreadEventIterator(
+    TimelineAnalysisThread* thread) {
+  Reset(thread);
+}
+
+
+TimelineAnalysisThreadEventIterator::~TimelineAnalysisThreadEventIterator() {
+  Reset(NULL);
+}
+
+
+void TimelineAnalysisThreadEventIterator::Reset(
+    TimelineAnalysisThread* thread) {
+  current_ = NULL;
+  thread_ = thread;
+  block_cursor_ = 0;
+  event_cursor_ = 0;
+  if (thread_ == NULL) {
+    return;
+  }
+  if (thread_->NumBlocks() == 0) {
+    return;
+  }
+  TimelineEventBlock* block = thread_->At(block_cursor_);
+  ASSERT(!block->IsEmpty());
+  current_ = block->At(event_cursor_++);
+}
+
+
+bool TimelineAnalysisThreadEventIterator::HasNext() const {
+  return current_ != NULL;
+}
+
+
+TimelineEvent* TimelineAnalysisThreadEventIterator::Next() {
+  ASSERT(current_ != NULL);
+  TimelineEvent* r = current_;
+  current_ = NULL;
+
+  TimelineEventBlock* block = thread_->At(block_cursor_);
+  if (event_cursor_ == block->length()) {
+    // Reached the end of this block, move to the next.
+    block_cursor_++;
+    if (block_cursor_ == thread_->NumBlocks()) {
+      // Exhausted our supply of blocks.
+      return r;
+    }
+    // Grab next block.
+    block = thread_->At(block_cursor_);
+    event_cursor_ = 0;
+    ASSERT(!block->IsEmpty());
+  }
+  current_ = block->At(event_cursor_++);
+  return r;
+}
+
+
+TimelineAnalysis::TimelineAnalysis(Zone* zone,
+                                   Isolate* isolate,
+                                   TimelineEventRecorder* recorder)
+    : zone_(zone),
+      isolate_(isolate),
+      recorder_(recorder),
+      has_error_(false),
+      error_msg_(NULL) {
+  ASSERT(zone_ != NULL);
+  ASSERT(isolate_ != NULL);
+  ASSERT(recorder_ != NULL);
+}
+
+
+TimelineAnalysis::~TimelineAnalysis() {
+}
+
+
+void TimelineAnalysis::BuildThreads() {
+  DiscoverThreads();
+  FinalizeThreads();
+}
+
+
+TimelineAnalysisThread* TimelineAnalysis::GetThread(ThreadId tid) {
+  // Linear lookup because we expect N (# of threads in an isolate) to be small.
+  for (intptr_t i = 0; i < threads_.length(); i++) {
+    TimelineAnalysisThread* thread = threads_.At(i);
+    ASSERT(thread != NULL);
+    if (thread->id() == tid) {
+      return thread;
+    }
+  }
+  return NULL;
+}
+
+
+TimelineAnalysisThread* TimelineAnalysis::GetOrAddThread(ThreadId tid) {
+  TimelineAnalysisThread* thread = GetThread(tid);
+  if (thread != NULL) {
+    return thread;
+  }
+  // New thread.
+  thread = new TimelineAnalysisThread(tid);
+  threads_.Add(thread);
+  return thread;
+}
+
+
+void TimelineAnalysis::DiscoverThreads() {
+  TimelineEventBlockIterator it(recorder_);
+  while (it.HasNext()) {
+    TimelineEventBlock* block = it.Next();
+    ASSERT(block != NULL);
+    if (block->IsEmpty()) {
+      // Skip empty blocks.
+      continue;
+    }
+    if (!block->CheckBlock()) {
+      if (FLAG_trace_timeline_analysis) {
+        ISL_Print("DiscoverThreads block %" Pd " "
+                  "violates invariants.\n", block->block_index());
+      }
+      SetError("Block %" Pd " violates invariants. See "
+               "TimelineEventBlock::CheckBlock", block->block_index());
+      return;
+    }
+    TimelineAnalysisThread* thread = GetOrAddThread(block->thread());
+    ASSERT(thread != NULL);
+    thread->AddBlock(block);
+  }
+}
+
+
+void TimelineAnalysis::FinalizeThreads() {
+  for (intptr_t i = 0; i < threads_.length(); i++) {
+    TimelineAnalysisThread* thread = threads_.At(i);
+    ASSERT(thread != NULL);
+    thread->Finalize();
+  }
+}
+
+
+void TimelineAnalysis::SetError(const char* format, ...) {
+  ASSERT(!has_error_);
+  ASSERT(error_msg_ == NULL);
+  has_error_ = true;
+  va_list args;
+  va_start(args, format);
+  error_msg_ = zone_->VPrint(format, args);
+  ASSERT(error_msg_ != NULL);
+}
+
+
+TimelineLabelPauseInfo::TimelineLabelPauseInfo(const char* name)
+    : name_(name),
+      inclusive_micros_(0),
+      exclusive_micros_(0),
+      max_inclusive_micros_(0),
+      max_exclusive_micros_(0) {
+  ASSERT(name_ != NULL);
+}
+
+
+void TimelineLabelPauseInfo::OnPush(int64_t micros, bool already_on_stack) {
+  if (!already_on_stack) {
+    // Only adjust inclusive counts if we aren't already on the stack.
+    add_inclusive_micros(micros);
+    if (micros > max_inclusive_micros_) {
+      max_inclusive_micros_ = micros;
+    }
+  }
+}
+
+
+void TimelineLabelPauseInfo::OnPop(int64_t exclusive_micros) {
+  add_exclusive_micros(exclusive_micros);
+  if (exclusive_micros > max_exclusive_micros_) {
+    max_exclusive_micros_ = exclusive_micros;
+  }
+}
+
+
+TimelinePauses::TimelinePauses(Zone* zone,
+                               Isolate* isolate,
+                               TimelineEventRecorder* recorder)
+    : TimelineAnalysis(zone, isolate, recorder) {
+}
+
+
+void TimelinePauses::Setup() {
+  BuildThreads();
+}
+
+
+void TimelinePauses::CalculatePauseTimesForThread(ThreadId tid) {
+  if (has_error()) {
+    return;
+  }
+  TimelineAnalysisThread* thread = GetThread(tid);
+  if (thread == NULL) {
+    SetError("Thread %" Px " does not exist.", OSThread::ThreadIdToIntPtr(tid));
+    return;
+  }
+  ProcessThread(thread);
+}
+
+
+TimelineLabelPauseInfo* TimelinePauses::GetLabelPauseInfo(
+    const char* name) const {
+  ASSERT(name != NULL);
+  // Linear lookup because we expect N (# of labels in an isolate) to be small.
+  for (intptr_t i = 0; i < labels_.length(); i++) {
+    TimelineLabelPauseInfo* label = labels_.At(i);
+    if (strcmp(label->name(), name) == 0) {
+      return label;
+    }
+  }
+  return NULL;
+}
+
+
+int64_t TimelinePauses::InclusiveTime(const char* name) const {
+  TimelineLabelPauseInfo* pause_info = GetLabelPauseInfo(name);
+  ASSERT(pause_info != NULL);
+  return pause_info->inclusive_micros();
+}
+
+
+int64_t TimelinePauses::ExclusiveTime(const char* name) const {
+  TimelineLabelPauseInfo* pause_info = GetLabelPauseInfo(name);
+  ASSERT(pause_info != NULL);
+  return pause_info->exclusive_micros();
+}
+
+
+int64_t TimelinePauses::MaxInclusiveTime(const char* name) const {
+  TimelineLabelPauseInfo* pause_info = GetLabelPauseInfo(name);
+  ASSERT(pause_info != NULL);
+  return pause_info->max_inclusive_micros();
+}
+
+
+int64_t TimelinePauses::MaxExclusiveTime(const char* name) const {
+  TimelineLabelPauseInfo* pause_info = GetLabelPauseInfo(name);
+  ASSERT(pause_info != NULL);
+  return pause_info->max_exclusive_micros();
+}
+
+
+void TimelinePauses::ProcessThread(TimelineAnalysisThread* thread) {
+  ASSERT(thread != NULL);
+  stack_.Clear();
+  labels_.Clear();
+
+  TimelineAnalysisThreadEventIterator it(thread);
+  if (FLAG_trace_timeline_analysis) {
+    ISL_Print(">>> TimelinePauses::ProcessThread %" Px "\n",
+              OSThread::ThreadIdToIntPtr(thread->id()));
+  }
+  intptr_t event_count = 0;
+  while (it.HasNext()) {
+    TimelineEvent* event = it.Next();
+    if (!event->IsFinishedDuration()) {
+      // We only care about finished duration events.
+      continue;
+    }
+    int64_t start = event->TimeOrigin();
+    PopFinished(start);
+    if (!CheckStack(event)) {
+      SetError("Duration check fail.");
+      return;
+    }
+    event_count++;
+    Push(event);
+  }
+  // Pop remaining stack.
+  PopFinished(kMaxInt64);
+  if (FLAG_trace_timeline_analysis) {
+    ISL_Print("<<< TimelinePauses::ProcessThread %" Px " had %" Pd " events\n",
+              OSThread::ThreadIdToIntPtr(thread->id()),
+              event_count);
+  }
+}
+
+
+// Verify that |event| is contained within all parent events on the stack.
+bool TimelinePauses::CheckStack(TimelineEvent* event) {
+  ASSERT(event != NULL);
+  for (intptr_t i = 0; i < stack_.length(); i++) {
+    const StackItem& slot = stack_.At(i);
+    if (!slot.event->DurationContains(event)) {
+      return false;
+    }
+  }
+  return true;
+}
+
+
+void TimelinePauses::PopFinished(int64_t start) {
+  while (stack_.length() > 0) {
+    const StackItem& top = stack_.Last();
+    if (top.event->DurationFinishedBefore(start)) {
+      top.pause_info->OnPop(top.exclusive_micros);
+      // Top of stack completes before |start|.
+      stack_.RemoveLast();
+      if (FLAG_trace_timeline_analysis) {
+        ISL_Print("Popping %s (%" Pd64 " <= %" Pd64 ")\n",
+                  top.event->label(),
+                  top.event->TimeEnd(),
+                  start);
+      }
+    } else {
+      return;
+    }
+  }
+}
+
+
+void TimelinePauses::Push(TimelineEvent* event) {
+  TimelineLabelPauseInfo* pause_info = GetOrAddLabelPauseInfo(event->label());
+  ASSERT(pause_info != NULL);
+  // |pause_info| will be running for |event->TimeDuration()|.
+  if (FLAG_trace_timeline_analysis) {
+    ISL_Print("Pushing %s %" Pd64 " us\n",
+              pause_info->name(),
+              event->TimeDuration());
+  }
+  pause_info->OnPush(event->TimeDuration(), IsLabelOnStack(event->label()));
+  if (StackDepth() > 0) {
+    StackItem& top = GetStackTop();
+    // |top| is under |event|'s shadow, adjust the exclusive micros.
+    top.exclusive_micros -= event->TimeDuration();
+  }
+  // Push onto the stack.
+  StackItem item;
+  item.event = event;
+  item.pause_info = pause_info;
+  item.exclusive_micros = event->TimeDuration();
+  stack_.Add(item);
+}
+
+
+bool TimelinePauses::IsLabelOnStack(const char* label) {
+  ASSERT(label != NULL);
+  for (intptr_t i = 0; i < stack_.length(); i++) {
+    const StackItem& slot = stack_.At(i);
+    if (strcmp(slot.event->label(), label) == 0) {
+      return true;
+    }
+  }
+  return false;
+}
+
+
+intptr_t TimelinePauses::StackDepth() const {
+  return stack_.length();
+}
+
+
+TimelinePauses::StackItem& TimelinePauses::GetStackTop() {
+  ASSERT(stack_.length() > 0);
+  return stack_.Last();
+}
+
+
+TimelineLabelPauseInfo* TimelinePauses::GetOrAddLabelPauseInfo(
+    const char* name) {
+  ASSERT(name != NULL);
+  TimelineLabelPauseInfo* pause_info = GetLabelPauseInfo(name);
+  if (pause_info != NULL) {
+    return pause_info;
+  }
+  // New label.
+  pause_info = new TimelineLabelPauseInfo(name);
+  labels_.Add(pause_info);
+  return pause_info;
+}
+
+}  // namespace dart
diff --git a/runtime/vm/timeline_analysis.h b/runtime/vm/timeline_analysis.h
new file mode 100644
index 0000000..5f5049b
--- /dev/null
+++ b/runtime/vm/timeline_analysis.h
@@ -0,0 +1,202 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_TIMELINE_ANALYSIS_H_
+#define VM_TIMELINE_ANALYSIS_H_
+
+#include "vm/growable_array.h"
+#include "vm/timeline.h"
+
+namespace dart {
+
+class TimelineAnalysisThread : public ZoneAllocated {
+ public:
+  explicit TimelineAnalysisThread(ThreadId id);
+  ~TimelineAnalysisThread();
+
+  ThreadId id() const {
+    return id_;
+  }
+
+  intptr_t NumBlocks() const {
+    return blocks_.length();
+  }
+
+  TimelineEventBlock* At(intptr_t i) const {
+    return blocks_.At(i);
+  }
+
+ private:
+  void AddBlock(TimelineEventBlock* block);
+  void Finalize();
+
+  const ThreadId id_;
+  ZoneGrowableArray<TimelineEventBlock*> blocks_;
+
+  friend class TimelineAnalysis;
+};
+
+
+class TimelineAnalysisThreadEventIterator : public ValueObject {
+ public:
+  explicit TimelineAnalysisThreadEventIterator(TimelineAnalysisThread* thread);
+  ~TimelineAnalysisThreadEventIterator();
+
+  void Reset(TimelineAnalysisThread* thread);
+
+  bool HasNext() const;
+
+  TimelineEvent* Next();
+
+ private:
+  TimelineAnalysisThread* thread_;
+  TimelineEvent* current_;
+  intptr_t block_cursor_;
+  intptr_t event_cursor_;
+};
+
+
+// Base of all timeline analysis classes. Base functionality:
+// - discovery of all thread ids in a recording.
+// - collecting all ThreadEventBlocks by thread id.
+class TimelineAnalysis : public ValueObject {
+ public:
+  TimelineAnalysis(Zone* zone,
+                   Isolate* isolate,
+                   TimelineEventRecorder* recorder);
+  ~TimelineAnalysis();
+
+  void BuildThreads();
+
+  intptr_t NumThreads() const {
+    return threads_.length();
+  }
+
+  TimelineAnalysisThread* At(intptr_t i) const {
+    return threads_[i];
+  }
+
+  TimelineAnalysisThread* GetThread(ThreadId tid);
+
+  bool has_error() const {
+    return has_error_;
+  }
+
+  const char* error_msg() const {
+    return error_msg_;
+  }
+
+ protected:
+  TimelineAnalysisThread* GetOrAddThread(ThreadId tid);
+
+  void DiscoverThreads();
+  void FinalizeThreads();
+
+  void SetError(const char* format, ...);
+
+  Zone* zone_;
+  Isolate* isolate_;
+  TimelineEventRecorder* recorder_;
+  bool has_error_;
+  const char* error_msg_;
+
+  ZoneGrowableArray<TimelineAnalysisThread*> threads_;
+};
+
+
+class TimelineLabelPauseInfo : public ZoneAllocated {
+ public:
+  explicit TimelineLabelPauseInfo(const char* name);
+
+  const char* name() const {
+    return name_;
+  }
+
+  int64_t inclusive_micros() const {
+    return inclusive_micros_;
+  }
+
+  int64_t exclusive_micros() const {
+    return exclusive_micros_;
+  }
+
+  int64_t max_inclusive_micros() const {
+    return max_inclusive_micros_;
+  }
+
+  int64_t max_exclusive_micros() const {
+    return max_exclusive_micros_;
+  }
+
+ private:
+  // Adjusts |inclusive_micros_| and |exclusive_micros_| by |micros|.
+  // Also, may adjust, max_inclusive_micros_.
+  void OnPush(int64_t micros, bool already_on_stack);
+
+  // Adjusts |exclusive_micros_| by |exclusive_micros|.
+  // Also, may adjust |max_exclusive_micros_|.
+  void OnPop(int64_t exclusive_micros);
+
+  // Adjust inclusive micros.
+  void add_inclusive_micros(int64_t delta_micros) {
+    inclusive_micros_ += delta_micros;
+    ASSERT(inclusive_micros_ >= 0);
+  }
+
+  // Adjust exclusive micros.
+  void add_exclusive_micros(int64_t delta_micros) {
+    exclusive_micros_ += delta_micros;
+    ASSERT(exclusive_micros_ >= 0);
+  }
+
+  const char* name_;
+  int64_t inclusive_micros_;
+  int64_t exclusive_micros_;
+  int64_t max_inclusive_micros_;
+  int64_t max_exclusive_micros_;
+
+  friend class TimelinePauses;
+};
+
+
+class TimelinePauses : public TimelineAnalysis {
+ public:
+  TimelinePauses(Zone* zone,
+                 Isolate* isolate,
+                 TimelineEventRecorder* recorder);
+
+  void Setup();
+
+  void CalculatePauseTimesForThread(ThreadId tid);
+
+  TimelineLabelPauseInfo* GetLabelPauseInfo(const char* name) const;
+
+  int64_t InclusiveTime(const char* name) const;
+  int64_t ExclusiveTime(const char* name) const;
+  int64_t MaxInclusiveTime(const char* name) const;
+  int64_t MaxExclusiveTime(const char* name) const;
+
+ private:
+  struct StackItem {
+    TimelineEvent* event;
+    TimelineLabelPauseInfo* pause_info;
+    int64_t exclusive_micros;
+  };
+
+  void ProcessThread(TimelineAnalysisThread* thread);
+  bool CheckStack(TimelineEvent* event);
+  void PopFinished(int64_t start);
+  void Push(TimelineEvent* event);
+  bool IsLabelOnStack(const char* label);
+  intptr_t StackDepth() const;
+  StackItem& GetStackTop();
+  TimelineLabelPauseInfo* GetOrAddLabelPauseInfo(const char* name);
+
+  ZoneGrowableArray<StackItem> stack_;
+  ZoneGrowableArray<TimelineLabelPauseInfo*> labels_;
+};
+
+}  // namespace dart
+
+#endif  // VM_TIMELINE_ANALYSIS_H_
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 38f907b..6657e04 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -2,21 +2,77 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include <cstring>
+
 #include "platform/assert.h"
 
 #include "vm/dart_api_impl.h"
 #include "vm/dart_api_state.h"
 #include "vm/globals.h"
 #include "vm/timeline.h"
+#include "vm/timeline_analysis.h"
 #include "vm/unit_test.h"
 
 namespace dart {
 
+class TimelineRecorderOverride : public ValueObject {
+ public:
+  explicit TimelineRecorderOverride(TimelineEventRecorder* new_recorder)
+      : recorder_(Timeline::recorder()) {
+    Timeline::recorder_ = new_recorder;
+  }
+
+  ~TimelineRecorderOverride() {
+    Timeline::recorder_ = recorder_;
+  }
+
+ private:
+  TimelineEventRecorder* recorder_;
+};
+
+
 class TimelineTestHelper : public AllStatic {
  public:
   static void SetStream(TimelineEvent* event, TimelineStream* stream) {
     event->StreamInit(stream);
   }
+
+  static TimelineEvent* FakeThreadEvent(
+      TimelineEventBlock* block,
+      intptr_t ftid,
+      const char* label = "fake",
+      TimelineStream* stream = NULL) {
+    TimelineEvent* event = block->StartEvent();
+    ASSERT(event != NULL);
+    event->DurationBegin(label);
+    event->thread_ = OSThread::ThreadIdFromIntPtr(ftid);
+    if (stream != NULL) {
+      event->StreamInit(stream);
+    }
+    return event;
+  }
+
+  static void FakeDuration(
+      TimelineEventRecorder* recorder,
+      const char* label,
+      int64_t start,
+      int64_t end) {
+    ASSERT(recorder != NULL);
+    ASSERT(start < end);
+    ASSERT(label != NULL);
+    TimelineEvent* event = recorder->StartEvent();
+    ASSERT(event != NULL);
+    event->Duration(label, start, end);
+  }
+
+  static void Clear(TimelineEventEndlessRecorder* recorder) {
+    ASSERT(recorder != NULL);
+    recorder->Clear();
+  }
+
+  static void FinishBlock(TimelineEventBlock* block) {
+    block->Finish();
+  }
 };
 
 
@@ -136,10 +192,10 @@
 
 
 TEST_CASE(TimelineEventBufferPrintJSON) {
-  Isolate* isolate = Isolate::Current();
-  TimelineEventRecorder* recorder = isolate->timeline_event_recorder();
+  TimelineEventRecorder* recorder = Timeline::recorder();
   JSONStream js;
-  recorder->PrintJSON(&js);
+  TimelineEventFilter filter;
+  recorder->PrintJSON(&js, &filter);
   // Check the type. This test will fail if we ever make Timeline public.
   EXPECT_SUBSTRING("\"type\":\"_Timeline\"", js.ToCString());
   // Check that there is a traceEvents array.
@@ -171,6 +227,7 @@
 
 TEST_CASE(TimelineEventStreamingRecorderBasic) {
   EventCounterRecorder* recorder = new EventCounterRecorder();
+  TimelineRecorderOverride override(recorder);
 
   // Initial counts are all zero.
   for (intptr_t i = TimelineEvent::kNone + 1;
@@ -182,7 +239,6 @@
   // Create a test stream.
   TimelineStream stream;
   stream.Init("testStream", true);
-  stream.set_recorder(recorder);
 
   TimelineEvent* event = NULL;
 
@@ -204,8 +260,9 @@
 
   event = stream.StartEvent();
   EXPECT_EQ(0, recorder->CountFor(TimelineEvent::kAsyncBegin));
-  int64_t async_id = event->AsyncBegin("asyncBeginCabbage");
+  int64_t async_id = recorder->GetNextAsyncId();
   EXPECT(async_id >= 0);
+  event->AsyncBegin("asyncBeginCabbage", async_id);
   EXPECT_EQ(0, recorder->CountFor(TimelineEvent::kAsyncBegin));
   event->Complete();
   EXPECT_EQ(1, recorder->CountFor(TimelineEvent::kAsyncBegin));
@@ -225,4 +282,329 @@
   EXPECT_EQ(1, recorder->CountFor(TimelineEvent::kAsyncEnd));
 }
 
+
+static bool LabelMatch(TimelineEvent* event, const char* label) {
+  ASSERT(event != NULL);
+  return strcmp(event->label(), label) == 0;
+}
+
+
+TEST_CASE(TimelineAnalysis_ThreadBlockCount) {
+  TimelineEventEndlessRecorder* recorder = new TimelineEventEndlessRecorder();
+  ASSERT(recorder != NULL);
+  // Blocks owned by thread "1".
+  TimelineEventBlock* block_1_0 = recorder->GetNewBlock();
+  TimelineEventBlock* block_1_1 = recorder->GetNewBlock();
+  TimelineEventBlock* block_1_2 = recorder->GetNewBlock();
+  // Blocks owned by thread "2".
+  TimelineEventBlock* block_2_0 = recorder->GetNewBlock();
+  // Blocks owned by thread "3".
+  TimelineEventBlock* block_3_0 = recorder->GetNewBlock();
+  USE(block_3_0);
+
+  // Add events to each block for thread 1.
+  TimelineTestHelper::FakeThreadEvent(block_1_2, 1, "B1");
+  TimelineTestHelper::FakeThreadEvent(block_1_2, 1, "B2");
+  TimelineTestHelper::FakeThreadEvent(block_1_2, 1, "B3");
+  // Sleep to ensure timestamps differ.
+  OS::Sleep(1);
+  TimelineTestHelper::FakeThreadEvent(block_1_0, 1, "A1");
+  OS::Sleep(1);
+  TimelineTestHelper::FakeThreadEvent(block_1_1, 1, "C1");
+  TimelineTestHelper::FakeThreadEvent(block_1_1, 1, "C2");
+  OS::Sleep(1);
+
+  // Add events to each block for thread 2.
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "A");
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "B");
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "C");
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "D");
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "E");
+  TimelineTestHelper::FakeThreadEvent(block_2_0, 2, "F");
+
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+
+  // Discover threads in recorder.
+  TimelineAnalysis ta(zone, isolate, recorder);
+  ta.BuildThreads();
+  // block_3_0 is never used by a thread, so we only have two threads.
+  EXPECT_EQ(2, ta.NumThreads());
+
+  // Extract both threads.
+  TimelineAnalysisThread* thread_1 =
+      ta.GetThread(OSThread::ThreadIdFromIntPtr(1));
+  TimelineAnalysisThread* thread_2 =
+      ta.GetThread(OSThread::ThreadIdFromIntPtr(2));
+  EXPECT_EQ(OSThread::ThreadIdFromIntPtr(1), thread_1->id());
+  EXPECT_EQ(OSThread::ThreadIdFromIntPtr(2), thread_2->id());
+
+  // Thread "1" should have three blocks.
+  EXPECT_EQ(3, thread_1->NumBlocks());
+
+  // Verify that blocks for thread "1" are sorted based on start time.
+  EXPECT_EQ(thread_1->At(0), block_1_2);
+  EXPECT_EQ(thread_1->At(1), block_1_0);
+  EXPECT_EQ(thread_1->At(2), block_1_1);
+
+  // Verify that block_1_2 has three events.
+  EXPECT_EQ(3, block_1_2->length());
+
+  // Verify that block_1_0 has one events.
+  EXPECT_EQ(1, block_1_0->length());
+
+  // Verify that block_1_1 has two events.
+  EXPECT_EQ(2, block_1_1->length());
+
+  // Thread '2" should have one block.'
+  EXPECT_EQ(1, thread_2->NumBlocks());
+  EXPECT_EQ(thread_2->At(0), block_2_0);
+  // Verify that block_2_0 has six events.
+  EXPECT_EQ(6, block_2_0->length());
+
+  {
+    TimelineAnalysisThreadEventIterator it(thread_1);
+    // Six events spread across three blocks.
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "B1"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "B2"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "B3"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "A1"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "C1"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "C2"));
+    EXPECT(!it.HasNext());
+  }
+
+  {
+    TimelineAnalysisThreadEventIterator it(thread_2);
+    // Six events spread across three blocks.
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "A"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "B"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "C"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "D"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "E"));
+    EXPECT(it.HasNext());
+    EXPECT(LabelMatch(it.Next(), "F"));
+    EXPECT(!it.HasNext());
+  }
+}
+
+
+TEST_CASE(TimelineRingRecorderJSONOrder) {
+  TimelineStream stream;
+  stream.Init("testStream", true);
+
+  TimelineEventRingRecorder* recorder =
+      new TimelineEventRingRecorder(TimelineEventBlock::kBlockSize * 2);
+
+  TimelineEventBlock* block_0 = recorder->GetNewBlock();
+  EXPECT(block_0 != NULL);
+  TimelineEventBlock* block_1 = recorder->GetNewBlock();
+  EXPECT(block_1 != NULL);
+  // Test that we wrapped.
+  EXPECT(block_0 == recorder->GetNewBlock());
+
+  // Emit the earlier event into block_1.
+  TimelineTestHelper::FakeThreadEvent(block_1, 2, "Alpha", &stream);
+  OS::Sleep(1);
+  // Emit the later event into block_0.
+  TimelineTestHelper::FakeThreadEvent(block_0, 2, "Beta", &stream);
+
+  TimelineTestHelper::FinishBlock(block_0);
+  TimelineTestHelper::FinishBlock(block_1);
+
+  JSONStream js;
+  TimelineEventFilter filter;
+  recorder->PrintJSON(&js, &filter);
+  // trace-event has a requirement that events for a thread must have
+  // monotonically increasing timestamps.
+  // Verify that "Alpha" comes before "Beta" even though "Beta" is in the first
+  // block.
+  const char* alpha = strstr(js.ToCString(), "Alpha");
+  const char* beta = strstr(js.ToCString(), "Beta");
+  EXPECT(alpha < beta);
+}
+
+
+TEST_CASE(TimelinePauses_Basic) {
+  TimelineEventEndlessRecorder* recorder = new TimelineEventEndlessRecorder();
+  ASSERT(recorder != NULL);
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Isolate* isolate = thread->isolate();
+  ThreadId tid = OSThread::GetCurrentThreadId();
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxExclusiveTime("a"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "b", 0, 10);
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.InclusiveTime("b"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(10, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "b", 1, 8);
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(3, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(3, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(7, pauses.InclusiveTime("b"));
+    EXPECT_EQ(7, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(7, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(7, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "b", 0, 1);
+  TimelineTestHelper::FakeDuration(recorder, "b", 1, 2);
+  TimelineTestHelper::FakeDuration(recorder, "b", 2, 3);
+  TimelineTestHelper::FakeDuration(recorder, "b", 3, 4);
+  TimelineTestHelper::FakeDuration(recorder, "b", 4, 5);
+  TimelineTestHelper::FakeDuration(recorder, "b", 5, 6);
+  TimelineTestHelper::FakeDuration(recorder, "b", 6, 7);
+  TimelineTestHelper::FakeDuration(recorder, "b", 7, 8);
+  TimelineTestHelper::FakeDuration(recorder, "b", 8, 9);
+  TimelineTestHelper::FakeDuration(recorder, "b", 9, 10);
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.InclusiveTime("b"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(1, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(1, pauses.MaxExclusiveTime("b"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "b", 0, 5);
+  TimelineTestHelper::FakeDuration(recorder, "c", 1, 4);
+  TimelineTestHelper::FakeDuration(recorder, "d", 5, 10);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(0, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(0, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(5, pauses.InclusiveTime("b"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(5, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("b"));
+    EXPECT_EQ(3, pauses.InclusiveTime("c"));
+    EXPECT_EQ(3, pauses.ExclusiveTime("c"));
+    EXPECT_EQ(3, pauses.MaxInclusiveTime("c"));
+    EXPECT_EQ(3, pauses.MaxExclusiveTime("c"));
+    EXPECT_EQ(5, pauses.InclusiveTime("d"));
+    EXPECT_EQ(5, pauses.ExclusiveTime("d"));
+    EXPECT_EQ(5, pauses.MaxInclusiveTime("d"));
+    EXPECT_EQ(5, pauses.MaxExclusiveTime("d"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "b", 1, 9);
+  TimelineTestHelper::FakeDuration(recorder, "c", 2, 8);
+  TimelineTestHelper::FakeDuration(recorder, "d", 3, 7);
+  TimelineTestHelper::FakeDuration(recorder, "e", 4, 6);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("a"));
+    EXPECT_EQ(8, pauses.InclusiveTime("b"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("b"));
+    EXPECT_EQ(8, pauses.MaxInclusiveTime("b"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("b"));
+    EXPECT_EQ(6, pauses.InclusiveTime("c"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("c"));
+    EXPECT_EQ(6, pauses.MaxInclusiveTime("c"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("c"));
+    EXPECT_EQ(4, pauses.InclusiveTime("d"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("d"));
+    EXPECT_EQ(4, pauses.MaxInclusiveTime("d"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("d"));
+    EXPECT_EQ(2, pauses.InclusiveTime("e"));
+    EXPECT_EQ(2, pauses.ExclusiveTime("e"));
+    EXPECT_EQ(2, pauses.MaxInclusiveTime("e"));
+    EXPECT_EQ(2, pauses.MaxExclusiveTime("e"));
+  }
+  TimelineTestHelper::Clear(recorder);
+
+  // Test case.
+  TimelineTestHelper::FakeDuration(recorder, "a", 0, 10);
+  TimelineTestHelper::FakeDuration(recorder, "a", 1, 9);
+
+  {
+    TimelinePauses pauses(zone, isolate, recorder);
+    pauses.Setup();
+    pauses.CalculatePauseTimesForThread(tid);
+    EXPECT(!pauses.has_error());
+    EXPECT_EQ(10, pauses.InclusiveTime("a"));
+    EXPECT_EQ(10, pauses.ExclusiveTime("a"));
+    EXPECT_EQ(10, pauses.MaxInclusiveTime("a"));
+    EXPECT_EQ(8, pauses.MaxExclusiveTime("a"));
+  }
+  TimelineTestHelper::Clear(recorder);
+}
+
 }  // namespace dart
diff --git a/runtime/vm/timer.h b/runtime/vm/timer.h
index 6cb0a20..32af994 100644
--- a/runtime/vm/timer.h
+++ b/runtime/vm/timer.h
@@ -136,10 +136,21 @@
 // }
 class TimerScope : public StackResource {
  public:
+  TimerScope(bool flag, Timer* timer, Thread* thread = NULL)
+      : StackResource(thread),
+        nested_(false),
+        timer_(flag ? timer : NULL) {
+    Init();
+  }
+
   TimerScope(bool flag, Timer* timer, Isolate* isolate = NULL)
       : StackResource(isolate),
         nested_(false),
         timer_(flag ? timer : NULL) {
+    Init();
+  }
+
+  void Init() {
     if (timer_ != NULL) {
       if (!timer_->running()) {
         timer_->Start();
@@ -167,8 +178,8 @@
 
 class PauseTimerScope : public StackResource {
  public:
-  PauseTimerScope(bool flag, Timer* timer, Isolate* isolate = NULL)
-      : StackResource(isolate),
+  PauseTimerScope(bool flag, Timer* timer, Thread* thread = NULL)
+      : StackResource(thread),
         nested_(false),
         timer_(flag ? timer : NULL) {
     if (timer_) {
@@ -203,13 +214,14 @@
 #define STOP_TIMER(isolate, name)                                              \
 isolate->timer_list().name().Stop();
 
-#define TIMERSCOPE(isolate, name)                                              \
-  TimerScope vm_internal_timer_(true, &(isolate->timer_list().name()), isolate)
+#define TIMERSCOPE(thread, name)                                               \
+  TimerScope vm_internal_timer_(                                               \
+      true, &(thread->isolate()->timer_list().name()), thread)
 
-#define PAUSETIMERSCOPE(isolate, name)                                         \
+#define PAUSETIMERSCOPE(thread, name)                                          \
 PauseTimerScope vm_internal_timer_(true,                                       \
-                                   &(isolate->timer_list().name()),            \
-                                   isolate)
+                                   &(thread->isolate()->timer_list().name()),  \
+                                   thread)
 
 }  // namespace dart
 
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 3b58c7a..421bbdc 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -215,8 +215,6 @@
     Disassembler::Disassemble(start, start + assembler_->CodeSize());
     OS::Print("}\n");
   }
-  const Instructions& instructions = Instructions::Handle(code_.instructions());
-  entry_ = instructions.EntryPoint();
 }
 
 
@@ -224,7 +222,7 @@
   : function_(Function::ZoneHandle()),
     node_sequence_(new SequenceNode(Scanner::kNoSourcePos,
                                     new LocalScope(NULL, 0, 0))),
-    default_parameter_values_(Array::ZoneHandle()) {
+    default_parameter_values_(new ZoneGrowableArray<const Instance*> ()) {
   ASSERT(name != NULL);
   const String& function_name = String::ZoneHandle(Symbols::New(name));
   // Add function to a class and that class to the class dictionary so that
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index 01ba009..c9c4812 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -34,8 +34,10 @@
   UNIT_TEST_CASE(name)                                                         \
   {                                                                            \
     TestIsolateScope __test_isolate__;                                         \
-    StackZone __zone__(__test_isolate__.isolate());                            \
-    HandleScope __hs__(__test_isolate__.isolate());                            \
+    Thread* __thread__ = Thread::Current();                                    \
+    ASSERT(__thread__->isolate() == __test_isolate__.isolate());               \
+    StackZone __zone__(__thread__);                                            \
+    HandleScope __hs__(__thread__);                                            \
     Dart_TestHelper##name();                                                   \
   }                                                                            \
   static void Dart_TestHelper##name()
@@ -321,6 +323,26 @@
 };
 
 
+template<typename T> struct is_void {
+  static const bool value = false;
+};
+
+
+template<> struct is_void<void> {
+  static const bool value = true;
+};
+
+
+template<typename T> struct is_double {
+  static const bool value = false;
+};
+
+
+template<> struct is_double<double> {
+  static const bool value = true;
+};
+
+
 class AssemblerTest {
  public:
   AssemblerTest(const char* name, Assembler* assembler)
@@ -336,16 +358,87 @@
 
   const Code& code() const { return code_; }
 
-  uword entry() const { return entry_; }
+  uword entry() const { return code_.EntryPoint(); }
 
-  // Assemble test and set code_ and entry_.
+  // Invoke is used to call assembler test functions using the ABI calling
+  // convention.
+  // ResultType is the return type of the assembler test function.
+  // ArgNType is the type of the Nth argument.
+#if defined(USING_SIMULATOR)
+
+#if defined(ARCH_IS_64_BIT)
+  // TODO(fschneider): Make Invoke<> more general and work on 32-bit platforms.
+  // Since Simulator::Call always return a int64_t, bit_cast does not work
+  // on 32-bit platforms when returning an int32_t. Since template functions
+  // don't support partial specialization, we'd need to introduce a helper
+  // class to support 32-bit return types.
+  template<typename ResultType> ResultType Invoke() {
+    const bool fp_return = is_double<ResultType>::value;
+    const bool fp_args = false;
+    return bit_cast<ResultType, int64_t>(Simulator::Current()->Call(
+        bit_cast<intptr_t, uword>(entry()), 0, 0, 0, 0, fp_return, fp_args));
+  }
+  template<typename ResultType, typename Arg1Type>
+  ResultType Invoke(Arg1Type arg1) {
+    const bool fp_return = is_double<ResultType>::value;
+    const bool fp_args = is_double<Arg1Type>::value;
+    // TODO(fschneider): Support double arguments for simulator calls.
+    COMPILE_ASSERT(!fp_args);
+    return bit_cast<ResultType, int64_t>(Simulator::Current()->Call(
+        bit_cast<intptr_t, uword>(entry()),
+        reinterpret_cast<intptr_t>(arg1),
+        0, 0, 0, fp_return, fp_args));
+  }
+#endif  // ARCH_IS_64_BIT
+
+  template<typename ResultType,
+           typename Arg1Type,
+           typename Arg2Type,
+           typename Arg3Type>
+  ResultType Invoke(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3) {
+    // TODO(fschneider): Support double arguments for simulator calls.
+    COMPILE_ASSERT(is_void<ResultType>::value);
+    COMPILE_ASSERT(!is_double<Arg1Type>::value);
+    COMPILE_ASSERT(!is_double<Arg2Type>::value);
+    COMPILE_ASSERT(!is_double<Arg3Type>::value);
+    const bool fp_args = false;
+    const bool fp_return = false;
+    Simulator::Current()->Call(
+        bit_cast<intptr_t, uword>(entry()),
+        reinterpret_cast<intptr_t>(arg1),
+        reinterpret_cast<intptr_t>(arg2),
+        reinterpret_cast<intptr_t>(arg3),
+        0, fp_return, fp_args);
+  }
+#else
+  template<typename ResultType> ResultType Invoke() {
+    typedef ResultType (*FunctionType) ();
+    return reinterpret_cast<FunctionType>(entry())();
+  }
+
+  template<typename ResultType, typename Arg1Type>
+  ResultType Invoke(Arg1Type arg1) {
+    typedef ResultType (*FunctionType) (Arg1Type);
+    return reinterpret_cast<FunctionType>(entry())(arg1);
+  }
+
+  template<typename ResultType,
+           typename Arg1Type,
+           typename Arg2Type,
+           typename Arg3Type>
+  ResultType Invoke(Arg1Type arg1, Arg2Type arg2, Arg3Type arg3) {
+    typedef ResultType (*FunctionType) (Arg1Type, Arg2Type, Arg3Type);
+    return reinterpret_cast<FunctionType>(entry())(arg1, arg2, arg3);
+  }
+#endif  // USING_SIMULATOR
+
+  // Assemble test and set code_.
   void Assemble();
 
  private:
   const char* name_;
   Assembler* assembler_;
   Code& code_;
-  uword entry_;
 
   DISALLOW_COPY_AND_ASSIGN(AssemblerTest);
 };
@@ -361,8 +454,8 @@
 
   SequenceNode* node_sequence() const { return node_sequence_; }
 
-  void set_default_parameter_values(const Array& value) {
-    default_parameter_values_ = value.raw();
+  void set_default_parameter_values(ZoneGrowableArray<const Instance*>* value) {
+    default_parameter_values_ = value;
   }
 
   // Compile test and set code in function.
@@ -371,7 +464,7 @@
  private:
   Function& function_;
   SequenceNode* node_sequence_;
-  Array& default_parameter_values_;
+  ZoneGrowableArray<const Instance*>* default_parameter_values_;
 
   DISALLOW_COPY_AND_ASSIGN(CodeGenTest);
 };
diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h
index 70fe619..9e8780b 100644
--- a/runtime/vm/visitor.h
+++ b/runtime/vm/visitor.h
@@ -5,6 +5,7 @@
 #ifndef VM_VISITOR_H_
 #define VM_VISITOR_H_
 
+#include "vm/allocation.h"
 #include "vm/globals.h"
 #include "vm/growable_array.h"
 
@@ -26,8 +27,8 @@
   virtual void VisitPointers(RawObject** first, RawObject** last) = 0;
 
   virtual bool visit_function_code() const { return true; }
-  virtual MallocGrowableArray<RawFunction*>* skipped_code_functions() {
-    return NULL;
+  virtual void add_skipped_code_function(RawFunction* funct) {
+    UNREACHABLE();
   }
   // len argument is the number of pointers to visit starting from 'p'.
   void VisitPointers(RawObject** p, intptr_t len) {
@@ -38,6 +39,7 @@
 
  private:
   Isolate* isolate_;
+  NoSafepointScope no_safepoints_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectPointerVisitor);
 };
diff --git a/runtime/vm/vm_sources.gypi b/runtime/vm/vm_sources.gypi
index 52dc222..e6902f8 100644
--- a/runtime/vm/vm_sources.gypi
+++ b/runtime/vm/vm_sources.gypi
@@ -41,6 +41,7 @@
     'atomic_linux.h',
     'atomic_macos.h',
     'atomic_simulator.h',
+    'atomic_test.cc',
     'atomic_win.h',
     'base_isolate.h',
     'benchmark_test.cc',
@@ -459,6 +460,8 @@
     'thread_test.cc',
     'timeline.cc',
     'timeline.h',
+    'timeline_analysis.cc',
+    'timeline_analysis.h',
     'timeline_test.cc',
     'timer.cc',
     'timer.h',
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 58fb1d1..c271991 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -203,16 +203,25 @@
 char* Zone::PrintToString(const char* format, ...) {
   va_list args;
   va_start(args, format);
-  intptr_t len = OS::VSNPrint(NULL, 0, format, args);
-  va_end(args);
+  return VPrint(format, args);
+}
 
+
+char* Zone::VPrint(const char* format, va_list args) {
+  // Measure.
+  va_list measure_args;
+  va_copy(measure_args, args);
+  intptr_t len = OS::VSNPrint(NULL, 0, format, measure_args);
+  va_end(measure_args);
+
+  // Print.
   char* buffer = Alloc<char>(len + 1);
-  va_list args2;
-  va_start(args2, format);
-  OS::VSNPrint(buffer, (len + 1), format, args2);
-  va_end(args2);
-
+  va_list print_args;
+  va_copy(print_args, args);
+  OS::VSNPrint(buffer, (len + 1), format, print_args);
+  va_end(print_args);
   return buffer;
 }
 
+
 }  // namespace dart
diff --git a/runtime/vm/zone.h b/runtime/vm/zone.h
index ee0add5..79591a5 100644
--- a/runtime/vm/zone.h
+++ b/runtime/vm/zone.h
@@ -49,6 +49,8 @@
   // Make a zone-allocated string based on printf format and args.
   char* PrintToString(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
 
+  char* VPrint(const char* format, va_list args);
+
   // Compute the total size of this zone. This includes wasted space that is
   // due to internal fragmentation in the segments.
   intptr_t SizeInBytes() const;
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index da5f208..9c43743 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -166,7 +166,7 @@
 
 
 TEST_CASE(PrintToString) {
-  StackZone zone(Isolate::Current());
+  StackZone zone(Thread::Current());
   const char* result = zone.GetZone()->PrintToString("Hello %s!", "World");
   EXPECT_STREQ("Hello World!", result);
 }
diff --git a/sdk/bin/dart b/sdk/bin/dart
index 675963f..3de8c25 100755
--- a/sdk/bin/dart
+++ b/sdk/bin/dart
@@ -18,16 +18,40 @@
 # Handle the case where dart-sdk/bin has been symlinked to.
 CUR_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
 
-if [ -z "$DART_CONFIGURATION" ];
-then
-  DART_CONFIGURATION="ReleaseIA32"
-fi
-
 if [[ `uname` == 'Darwin' ]];
 then
-  BIN_DIR="$CUR_DIR"/../../xcodebuild/$DART_CONFIGURATION
+  OUT_DIR="$CUR_DIR"/../../xcodebuild/
 else
-  BIN_DIR="$CUR_DIR"/../../out/$DART_CONFIGURATION
+  OUT_DIR="$CUR_DIR"/../../out/
 fi
 
+if [ -z "$DART_CONFIGURATION" ];
+then
+  DIRS=$( ls "$OUT_DIR" )
+  # list of possible configurations in decreasing desirability
+  CONFIGS=("ReleaseIA32" "ReleaseX64" "DebugIA32" "DebugX64"
+    "ReleaseARM"    "ReleaseARM64"    "ReleaseARMV5TE"    "ReleaseMIPS"
+    "DebugARM"      "DebugARM64"      "DebugARMV5TE"      "DebugMIPS")
+  DART_CONFIGURATION="None"
+  for CONFIG in ${CONFIGS[*]}
+  do
+    for DIR in $DIRS;
+    do
+      if [ "$CONFIG" = "$DIR" ];
+      then
+        # choose most desirable configuration that is available and break
+        DART_CONFIGURATION="$DIR"
+        break 2
+      fi
+    done
+  done
+  if [ "$DART_CONFIGURATION" = "None" ]
+  then
+    echo "No valid dart configuration found in $OUT_DIR"
+    exit 1
+  fi
+fi
+
+BIN_DIR="$OUT_DIR$DART_CONFIGURATION"
+
 exec "$BIN_DIR"/dart "$@"
diff --git a/sdk/bin/dartanalyzer b/sdk/bin/dartanalyzer
index ea69738..9b4a2ab 100755
--- a/sdk/bin/dartanalyzer
+++ b/sdk/bin/dartanalyzer
@@ -45,17 +45,42 @@
 
 ANALYZER="$DART_ROOT/third_party/pkg/analyzer_cli/bin/analyzer.dart"
 
-if [ -z "$DART_CONFIGURATION" ];
+if [[ `uname` == 'Darwin' ]];
 then
-  DART_CONFIGURATION="ReleaseIA32"
+  OUT_DIR="$DART_ROOT/xcodebuild/"
+else
+  OUT_DIR="$DART_ROOT/out/"
 fi
 
-if [[ `uname` == 'Darwin' ]]; then
-  BUILD_DIR="$DART_ROOT/xcodebuild/$DART_CONFIGURATION"
-else
-  BUILD_DIR="$DART_ROOT/out/$DART_CONFIGURATION"
+if [ -z "$DART_CONFIGURATION" ];
+then
+  DIRS=$( ls "$OUT_DIR" )
+  # list of possible configurations in decreasing desirability
+  CONFIGS=("ReleaseIA32" "ReleaseX64" "DebugIA32" "DebugX64"
+    "ReleaseARM"    "ReleaseARM64"    "ReleaseARMV5TE"    "ReleaseMIPS"
+    "DebugARM"      "DebugARM64"      "DebugARMV5TE"      "DebugMIPS")
+  DART_CONFIGURATION="None"
+  for CONFIG in ${CONFIGS[*]}
+  do
+    for DIR in $DIRS;
+    do
+      if [ "$CONFIG" = "$DIR" ];
+      then
+        # choose most desirable configuration that is available and break
+        DART_CONFIGURATION="$DIR"
+        break 2
+      fi
+    done
+  done
+  if [ "$DART_CONFIGURATION" = "None" ]
+  then
+    echo "No valid dart configuration found in $OUT_DIR"
+    exit 1
+  fi
 fi
 
+BUILD_DIR="$OUT_DIR$DART_CONFIGURATION"
+
 PACKAGE_ROOT="$BUILD_DIR/packages/"
 
 exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$ANALYZER" "$SDK_ARG" "$@"
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index 1377957..f8412c1 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -6,9 +6,12 @@
 
 import 'dart:_js_helper' show
     patch,
+    ExceptionAndStackTrace,
     Primitives,
     convertDartClosureToJS,
-    requiresPreamble;
+    getTraceFromException,
+    requiresPreamble,
+    unwrapException;
 import 'dart:_isolate_helper' show
     IsolateNatives,
     TimerImpl,
@@ -18,6 +21,8 @@
 
 import 'dart:_foreign_helper' show JS;
 
+import 'dart:_async_await_error_codes' as async_error_codes;
+
 @patch
 class _AsyncRun {
   @patch
@@ -121,3 +126,383 @@
     return new TimerImpl.periodic(milliseconds, callback);
   }
 }
+
+/// Runtime support for async-await transformation.
+///
+/// This function is called by a transformed function on each await and return
+/// in the untransformed function, and before starting.
+///
+/// If [object] is not a future it will be wrapped in a `new Future.value`.
+///
+/// If [asyncBody] is [async_error_codes.SUCCESS]/[async_error_codes.ERROR] it
+/// indicates a return or throw from the async function, and
+/// complete/completeError is called on [completer] with [object].
+///
+/// Otherwise [asyncBody] is set up to be called when the future is completed
+/// with a code [async_error_codes.SUCCESS]/[async_error_codes.ERROR] depending
+/// on the success of the future.
+///
+/// Returns the future of the completer for convenience of the first call.
+dynamic _asyncHelper(dynamic object,
+    dynamic /* int | _WrappedAsyncBody */ bodyFunctionOrErrorCode,
+    Completer completer) {
+  if (identical(bodyFunctionOrErrorCode, async_error_codes.SUCCESS)) {
+    completer.complete(object);
+    return;
+  } else if (identical(bodyFunctionOrErrorCode, async_error_codes.ERROR)) {
+    // The error is a js-error.
+    completer.completeError(unwrapException(object),
+    getTraceFromException(object));
+    return;
+  }
+
+  _awaitOnObject(object, bodyFunctionOrErrorCode);
+  return completer.future;
+}
+
+/// Awaits on the given [object].
+///
+/// If the [object] is a Future, registers on it, otherwise wraps it into a
+/// future first.
+///
+/// The [bodyFunction] argument is the continuation that should be invoked
+/// when the future completes.
+void _awaitOnObject(object, _WrappedAsyncBody bodyFunction) {
+  Function thenCallback =
+      (result) => bodyFunction(async_error_codes.SUCCESS, result);
+
+  Function errorCallback = (dynamic error, StackTrace stackTrace) {
+    ExceptionAndStackTrace wrappedException =
+        new ExceptionAndStackTrace(error, stackTrace);
+    bodyFunction(async_error_codes.ERROR, wrappedException);
+  };
+
+  if (object is _Future) {
+    // We can skip the zone registration, since the bodyFunction is already
+    // registered (see [_wrapJsFunctionForAsync]).
+    object._thenNoZoneRegistration(thenCallback, errorCallback);
+  } else if (object is Future) {
+    object.then(thenCallback, onError: errorCallback);
+  } else {
+    _Future future = new _Future();
+    future._setValue(object);
+    // We can skip the zone registration, since the bodyFunction is already
+    // registered (see [_wrapJsFunctionForAsync]).
+    future._thenNoZoneRegistration(thenCallback, null);
+  }
+}
+
+typedef void _WrappedAsyncBody(int errorCode, dynamic result);
+
+_WrappedAsyncBody _wrapJsFunctionForAsync(dynamic /* js function */ function) {
+  var protected = JS('', """
+    // Invokes [function] with [errorCode] and [result].
+    //
+    // If (and as long as) the invocation throws, calls [function] again,
+    // with an error-code.
+    function(errorCode, result) {
+      while (true) {
+        try {
+          #(errorCode, result);
+          break;
+        } catch (error) {
+          result = error;
+          errorCode = #;
+        }
+      }
+    }""", function, async_error_codes.ERROR);
+  return Zone.current.registerBinaryCallback((int errorCode, dynamic result) {
+    JS('', '#(#, #)', protected, errorCode, result);
+  });
+}
+
+/// Implements the runtime support for async* functions.
+///
+/// Called by the transformed function for each original return, await, yield,
+/// yield* and before starting the function.
+///
+/// When the async* function wants to return it calls this function with
+/// [asyncBody] == [async_error_codes.SUCCESS], the asyncStarHelper takes this
+/// as signal to close the stream.
+///
+/// When the async* function wants to signal that an uncaught error was thrown,
+/// it calls this function with [asyncBody] == [async_error_codes.ERROR],
+/// the streamHelper takes this as signal to addError [object] to the
+/// [controller] and close it.
+///
+/// If the async* function wants to do a yield or yield*, it calls this function
+/// with [object] being an [IterationMarker].
+///
+/// In the case of a yield or yield*, if the stream subscription has been
+/// canceled, schedules [asyncBody] to be called with
+/// [async_error_codes.STREAM_WAS_CANCELED].
+///
+/// If [object] is a single-yield [IterationMarker], adds the value of the
+/// [IterationMarker] to the stream. If the stream subscription has been
+/// paused, return early. Otherwise schedule the helper function to be
+/// executed again.
+///
+/// If [object] is a yield-star [IterationMarker], starts listening to the
+/// yielded stream, and adds all events and errors to our own controller (taking
+/// care if the subscription has been paused or canceled) - when the sub-stream
+/// is done, schedules [asyncBody] again.
+///
+/// If the async* function wants to do an await it calls this function with
+/// [object] not and [IterationMarker].
+///
+/// If [object] is not a [Future], it is wrapped in a `Future.value`.
+/// The [asyncBody] is called on completion of the future (see [asyncHelper].
+void _asyncStarHelper(dynamic object,
+    dynamic /* int | _WrappedAsyncBody */ bodyFunctionOrErrorCode,
+    _AsyncStarStreamController controller) {
+  if (identical(bodyFunctionOrErrorCode, async_error_codes.SUCCESS)) {
+    // This happens on return from the async* function.
+    if (controller.isCanceled) {
+      controller.cancelationCompleter.complete();
+    } else {
+      controller.close();
+    }
+    return;
+  } else if (identical(bodyFunctionOrErrorCode, async_error_codes.ERROR)) {
+    // The error is a js-error.
+    if (controller.isCanceled) {
+      controller.cancelationCompleter.completeError(
+          unwrapException(object),
+          getTraceFromException(object));
+    } else {
+      controller.addError(unwrapException(object),
+                          getTraceFromException(object));
+      controller.close();
+    }
+    return;
+  }
+
+  if (object is _IterationMarker) {
+    if (controller.isCanceled) {
+      bodyFunctionOrErrorCode(async_error_codes.STREAM_WAS_CANCELED, null);
+      return;
+    }
+    if (object.state == _IterationMarker.YIELD_SINGLE) {
+      controller.add(object.value);
+
+      scheduleMicrotask(() {
+        if (controller.isPaused) {
+          // We only suspend the thread inside the microtask in order to allow
+          // listeners on the output stream to pause in response to the just
+          // output value, and have the stream immediately stop producing.
+          controller.isSuspended = true;
+          return;
+        }
+        bodyFunctionOrErrorCode(null, async_error_codes.SUCCESS);
+      });
+      return;
+    } else if (object.state == _IterationMarker.YIELD_STAR) {
+      Stream stream = object.value;
+      // Errors of [stream] are passed though to the main stream. (see
+      // [AsyncStreamController.addStream]).
+      // TODO(sigurdm): The spec is not very clear here. Clarify with Gilad.
+      controller.addStream(stream).then((_) {
+        // No check for isPaused here because the spec 17.16.2 only
+        // demands checks *before* each element in [stream] not after the last
+        // one. On the other hand we check for isCanceled, as that check happens
+        // after insertion of each element.
+        int errorCode = controller.isCanceled
+            ? async_error_codes.STREAM_WAS_CANCELED
+            : async_error_codes.SUCCESS;
+        bodyFunctionOrErrorCode(errorCode, null);
+      });
+      return;
+    }
+  }
+
+  _awaitOnObject(object, bodyFunctionOrErrorCode);
+}
+
+Stream _streamOfController(_AsyncStarStreamController controller) {
+  return controller.stream;
+}
+
+/// A wrapper around a [StreamController] that keeps track of the state of
+/// the execution of an async* function.
+/// It can be in 1 of 3 states:
+///
+/// - running/scheduled
+/// - suspended
+/// - canceled
+///
+/// If yielding while the subscription is paused it will become suspended. And
+/// only resume after the subscription is resumed or canceled.
+class _AsyncStarStreamController {
+  StreamController controller;
+  Stream get stream => controller.stream;
+
+  /// True when the async* function has yielded while being paused.
+  /// When true execution will only resume after a `onResume` or `onCancel`
+  /// event.
+  bool isSuspended = false;
+
+  bool get isPaused => controller.isPaused;
+
+  Completer cancelationCompleter = null;
+
+  /// True after the StreamSubscription has been cancelled.
+  /// When this is true, errors thrown from the async* body should go to the
+  /// [cancelationCompleter] instead of adding them to [controller], and
+  /// returning from the async function should complete [cancelationCompleter].
+  bool get isCanceled => cancelationCompleter != null;
+
+  add(event) => controller.add(event);
+
+  addStream(Stream stream) {
+    return controller.addStream(stream, cancelOnError: false);
+  }
+
+  addError(error, stackTrace) => controller.addError(error, stackTrace);
+
+  close() => controller.close();
+
+  _AsyncStarStreamController(_WrappedAsyncBody body) {
+
+    _resumeBody() {
+      scheduleMicrotask(() {
+        body(async_error_codes.SUCCESS, null);
+      });
+    }
+
+    controller = new StreamController(
+      onListen: () {
+        _resumeBody();
+      }, onResume: () {
+        // Only schedule again if the async* function actually is suspended.
+        // Resume directly instead of scheduling, so that the sequence
+        // `pause-resume-pause` will result in one extra event produced.
+        if (isSuspended) {
+          isSuspended = false;
+          _resumeBody();
+        }
+      }, onCancel: () {
+        // If the async* is finished we ignore cancel events.
+        if (!controller.isClosed) {
+          cancelationCompleter = new Completer();
+          if (isSuspended) {
+            // Resume the suspended async* function to run finalizers.
+            isSuspended = false;
+            scheduleMicrotask(() {
+              body(async_error_codes.STREAM_WAS_CANCELED, null);
+            });
+          }
+          return cancelationCompleter.future;
+        }
+      });
+  }
+}
+
+_makeAsyncStarController(body) {
+  return new _AsyncStarStreamController(body);
+}
+
+class _IterationMarker {
+  static const YIELD_SINGLE = 0;
+  static const YIELD_STAR = 1;
+  static const ITERATION_ENDED = 2;
+  static const UNCAUGHT_ERROR = 3;
+
+  final value;
+  final int state;
+
+  _IterationMarker._(this.state, this.value);
+
+  static yieldStar(dynamic /* Iterable or Stream */ values) {
+    return new _IterationMarker._(YIELD_STAR, values);
+  }
+
+  static endOfIteration() {
+    return new _IterationMarker._(ITERATION_ENDED, null);
+  }
+
+  static yieldSingle(dynamic value) {
+    return new _IterationMarker._(YIELD_SINGLE, value);
+  }
+
+  static uncaughtError(dynamic error) {
+    return new _IterationMarker._(UNCAUGHT_ERROR, error);
+  }
+
+  toString() => "IterationMarker($state, $value)";
+}
+
+class _SyncStarIterator implements Iterator {
+  final dynamic _body;
+
+  // If [runningNested] this is the nested iterator, otherwise it is the
+  // current value.
+  dynamic _current = null;
+  bool _runningNested = false;
+
+  get current => _runningNested ? _current.current : _current;
+
+  _SyncStarIterator(this._body);
+
+  _runBody() {
+    return JS('', '''
+// Invokes [body] with [errorCode] and [result].
+//
+// If (and as long as) the invocation throws, calls [function] again,
+// with an error-code.
+(function(body) {
+  var errorValue, errorCode = #;
+  while (true) {
+    try {
+      return body(errorCode, errorValue);
+    } catch (error) {
+      errorValue = error;
+      errorCode = #
+    }
+  }
+})(#)''', async_error_codes.SUCCESS, async_error_codes.ERROR, _body);
+  }
+
+
+  bool moveNext() {
+    if (_runningNested) {
+      if (_current.moveNext()) {
+        return true;
+      } else {
+        _runningNested = false;
+      }
+    }
+    _current = _runBody();
+    if (_current is _IterationMarker) {
+      if (_current.state == _IterationMarker.ITERATION_ENDED) {
+        _current = null;
+        // Rely on [_body] to repeatedly return `ITERATION_ENDED`.
+        return false;
+      } else if (_current.state == _IterationMarker.UNCAUGHT_ERROR) {
+        // Rely on [_body] to repeatedly return `UNCAUGHT_ERROR`.
+        // This is a wrapped exception, so we use JavaScript throw to throw it.
+        JS('', 'throw #', _current.value);
+      } else {
+        assert(_current.state == _IterationMarker.YIELD_STAR);
+        _current = _current.value.iterator;
+        _runningNested = true;
+        return moveNext();
+      }
+    }
+    return true;
+  }
+}
+
+/// An Iterable corresponding to a sync* method.
+///
+/// Each invocation of a sync* method will return a new instance of this class.
+class _SyncStarIterable extends IterableBase {
+  // This is a function that will return a helper function that does the
+  // iteration of the sync*.
+  //
+  // Each invocation should give a body with fresh state.
+  final dynamic /* js function */ _outerHelper;
+
+  _SyncStarIterable(this._outerHelper);
+
+  Iterator get iterator => new _SyncStarIterator(JS('', '#()', _outerHelper));
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index 971b37f..3c639dc 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -17,10 +17,15 @@
                               ConstantMap,
                               stringJoinUnchecked,
                               objectHashCode,
-                              Closure;
+                              Closure,
+                              readHttp;
+
+import 'dart:_foreign_helper' show JS;
 
 import 'dart:_native_typed_data' show NativeUint8List;
 
+import 'dart:async' show StreamController;
+
 String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
 
 _symbolMapToStringMap(Map<Symbol, dynamic> map) {
@@ -400,7 +405,7 @@
 // Patch for 'identical' function.
 @patch
 bool identical(Object a, Object b) {
-  return Primitives.identicalImplementation(a, b);
+  return JS('bool', '(# == null ? # == null : # === #)', a, b, a, b);
 }
 
 @patch
@@ -570,20 +575,53 @@
       uri = _resolvePackageUri(uri);
     }
     if (uri.scheme == "http" || uri.scheme == "https") {
-      return _readAsString(uri);
+      return _readAsString(uri, encoding);
     }
     throw new StateError("Unable to find resource, unknown scheme: $_location");
   }
 
+  // TODO(het): Use a streaming XHR request instead of returning the entire
+  // payload in one event.
   Stream<List<int>> _readAsStream(Uri uri) {
-    throw new UnimplementedError("Streaming bytes via HTTP");
+    var controller = new StreamController.broadcast();
+    // We only need to implement the listener as there is no way to provide
+    // back pressure into the channel.
+    controller.onListen = () {
+      // Once there is a listener, we kick off the loading of the resource.
+      _readAsBytes(uri).then((value) {
+        // The resource loading implementation sends all of the data in a
+        // single message. So the stream will only get a single value posted.
+        controller.add(value);
+        controller.close();
+      },
+      onError: (e, s) {
+        // In case the future terminates with an error we propagate it to the
+        // stream.
+        controller.addError(e, s);
+        controller.close();
+      });
+    };
+
+    return controller.stream;
   }
 
   Future<List<int>> _readAsBytes(Uri uri) {
-    throw new UnimplementedError("Reading bytes via HTTP");
+    return readHttp('$uri').then((data) {
+      if (data is NativeUint8List) return data;
+      if (data is String) return data.codeUnits;
+      throw new StateError(
+          "Unable to read Resource, data could not be decoded");
+    });
   }
 
-  Future<String> _readAsString(Uri uri) {
-    throw new UnimplementedError("Reading string via HTTP");
+  Future<String> _readAsString(Uri uri, Encoding encoding) {
+    return readHttp('$uri').then((data) {
+      if (data is String) return data;
+      if (data is NativeUint8List) {
+        return encoding.decode(data);
+      };
+      throw new StateError(
+          "Unable to read Resource, data could not be decoded");
+    });
   }
 }
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index 4f06174d..15cafa8 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -22,13 +22,25 @@
 }
 
 @patch
-log(String message,
-    {DateTime time,
-     int sequenceNumber,
-     int level: 0,
-     String name: '',
-     Zone zone,
-     Object error,
-     StackTrace stackTrace}) {
+void log(String message,
+         {DateTime time,
+          int sequenceNumber,
+          int level: 0,
+          String name: '',
+          Zone zone,
+          Object error,
+          StackTrace stackTrace}) {
   // TODO.
 }
+
+final _extensions = new Map<String, ServiceExtensionHandler>();
+
+@patch
+ServiceExtensionHandler _lookupExtension(String method) {
+  return _extensions[method];
+}
+
+@patch
+_registerExtension(String method, ServiceExtensionHandler handler) {
+  _extensions[method] = handler;
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/interceptors.dart b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
index cf4d39b..0247af4 100644
--- a/sdk/lib/_internal/js_runtime/lib/interceptors.dart
+++ b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
@@ -68,6 +68,7 @@
  * to emit a call to an intercepted method, that is a method that is
  * defined in an interceptor class.
  */
+@NoInline()
 getInterceptor(object) {
   // This is a magic method: the compiler does specialization of it
   // depending on the uses of intercepted methods and instantiated
diff --git a/sdk/lib/_internal/js_runtime/lib/io_patch.dart b/sdk/lib/_internal/js_runtime/lib/io_patch.dart
index 792b74d..23f4708 100644
--- a/sdk/lib/_internal/js_runtime/lib/io_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/io_patch.dart
@@ -403,12 +403,26 @@
   factory SecureSocket._(RawSecureSocket rawSocket) {
     throw new UnsupportedError("SecureSocket constructor");
   }
+}
+
+@patch
+class SecurityContext {
+  @patch
+  factory SecurityContext() {
+    throw new UnsupportedError("SecurityContext constructor");
+  }
 
   @patch
-  static void initialize({String database,
-                          String password,
-                          bool useBuiltinRoots: true}) {
-    throw new UnsupportedError("SecureSocket.initialize");
+  static SecurityContext get defaultContext {
+    throw new UnsupportedError("default SecurityContext getter");
+  }
+}
+
+@patch
+class X509Certificate {
+  @patch
+  factory X509Certificate._() {
+    throw new UnsupportedError("X509Certificate constructor");
   }
 }
 
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
index 397c8d8..9e463ba 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
@@ -96,9 +96,6 @@
  * call is not emitted.
  */
 void startRootIsolate(entry, args) {
-  // The dartMainRunner can inject a new arguments array. We pass the arguments
-  // through a "JS", so that the type-inferrer loses track of it.
-  args = JS("", "#", args);
   if (args == null) args = [];
   if (args is! List) {
     throw new ArgumentError("Arguments to main must be a List: $args");
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart
index f6bcbbb..51a8fb4 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -22,8 +22,14 @@
   factory JSArray.fixed(int length)  {
     // Explicit type test is necessary to guard against JavaScript conversions
     // in unchecked mode.
-    if ((length is !int) || (length < 0)) {
-      throw new ArgumentError("Length must be a non-negative integer: $length");
+    if (length is !int) {
+      throw new ArgumentError.value(length, "length", "is not an integer");
+    }
+    // The JavaScript Array constructor with one argument throws if
+    // the value is not a UInt32. Give a better error message.
+    int maxJSArrayLength = 0xFFFFFFFF;
+    if (length < 0 || length > maxJSArrayLength) {
+      throw new RangeError.range(length, 0, maxJSArrayLength, "length");
     }
     return new JSArray<E>.markFixed(JS('', 'new Array(#)', length));
   }
@@ -208,8 +214,10 @@
   }
 
   void addAll(Iterable<E> collection) {
+    int i = this.length;
     checkGrowable('addAll');
     for (E e in collection) {
+      assert(i++ == this.length || (throw new ConcurrentModificationError(this)));
       JS('void', r'#.push(#)', this, e);
     }
   }
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index fd53e61..2a91a2e 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -4,8 +4,6 @@
 
 library _js_helper;
 
-import 'dart:_async_await_error_codes' as async_error_codes;
-
 import 'dart:_js_embedded_names' show
     DEFERRED_LIBRARY_URIS,
     DEFERRED_LIBRARY_HASHES,
@@ -20,7 +18,8 @@
     JsGetName,
     LEAF_TAGS,
     NATIVE_SUPERCLASS_TAG_NAME,
-    STATIC_FUNCTION_NAME_PROPERTY_NAME;
+    STATIC_FUNCTION_NAME_PROPERTY_NAME,
+    TRACE_BUFFER;
 
 import 'dart:collection';
 
@@ -37,7 +36,8 @@
     StreamController,
     Stream,
     StreamSubscription,
-    scheduleMicrotask;
+    scheduleMicrotask,
+    Zone;
 
 import 'dart:_foreign_helper' show
     DART_CLOSURE_TO_JS,
@@ -57,7 +57,10 @@
 
 import 'dart:_interceptors';
 import 'dart:_internal' as _symbol_dev;
-import 'dart:_internal' show EfficientLength, MappedIterable;
+import 'dart:_internal' show
+    EfficientLength,
+    MappedIterable,
+    IterableElementError;
 
 import 'dart:_native_typed_data';
 
@@ -148,7 +151,7 @@
 @ForceInline()
 bool isDartFunctionTypeRti(Object type) {
   return JS_BUILTIN('returns:bool;effects:none;depends:none',
-                    JsBuiltin.isGivenTypeRti, 
+                    JsBuiltin.isGivenTypeRti,
                     type,
                     JS_GET_NAME(JsGetName.FUNCTION_CLASS_TYPE_NAME));
 }
@@ -158,7 +161,7 @@
 @ForceInline()
 bool isDartObjectTypeRti(type) {
   return JS_BUILTIN('returns:bool;effects:none;depends:none',
-                    JsBuiltin.isGivenTypeRti, 
+                    JsBuiltin.isGivenTypeRti,
                     type,
                     JS_GET_NAME(JsGetName.OBJECT_CLASS_TYPE_NAME));
 }
@@ -168,7 +171,7 @@
 @ForceInline()
 bool isNullTypeRti(type) {
   return JS_BUILTIN('returns:bool;effects:none;depends:none',
-                    JsBuiltin.isGivenTypeRti, 
+                    JsBuiltin.isGivenTypeRti,
                     type,
                     JS_GET_NAME(JsGetName.NULL_CLASS_TYPE_NAME));
 }
@@ -257,7 +260,7 @@
 /// Helper to print the given method information to the console the first
 /// time it is called with it.
 @NoInline()
-void traceHelper(String method) {
+void consoleTraceHelper(String method) {
   if (JS('bool', '!this.cache')) {
     JS('', 'this.cache = Object.create(null)');
   }
@@ -267,6 +270,31 @@
   }
 }
 
+List _traceBuffer;
+
+/// Helper to send coverage information as a POST request to a server.
+@NoInline()
+void postTraceHelper(int id, String name) {
+  // Note: we can't move this initialization to the declaration of
+  // [_traceBuffer] because [postTraceHelper] is called very early on functions
+  // that define constants, this happens before getters and setters are expanded
+  // and before main starts executing. This initialization here allows us to
+  // skip the lazy field initialization logic.
+  if (_traceBuffer == null) _traceBuffer = JS('JSArray', '[]');
+  if (JS('bool', '#.length == 0', _traceBuffer)) {
+    JS('', r'''
+      window.setTimeout((function(buffer) {
+        return function() {
+          var xhr = new XMLHttpRequest();
+          xhr.open("POST", "/coverage_uri_to_amend_by_server");
+          xhr.send(JSON.stringify(buffer));
+          buffer.length = 0;
+        };
+      })(#), 1000)''', _traceBuffer);
+  }
+  JS('', '#.push([#, #])', _traceBuffer, id, name);
+}
+
 class JSInvocationMirror implements Invocation {
   static const METHOD = 0;
   static const GETTER = 1;
@@ -1482,12 +1510,6 @@
     return JS('', '#.apply(#, #)', jsFunction, function, positionalArguments);
   }
 
-  static bool identicalImplementation(a, b) {
-    return JS('bool', '# == null', a)
-      ? JS('bool', '# == null', b)
-      : JS('bool', '# === #', a, b);
-  }
-
   static StackTrace extractStackTrace(Error error) {
     return getTraceFromException(JS('', r'#.$thrownJsError', error));
   }
@@ -2046,6 +2068,15 @@
   String toString() => _message.isEmpty ? 'Error' : 'Error: $_message';
 }
 
+/// A wrapper around an exception, much like the one created by [wrapException]
+/// but with a pre-given stack-trace.
+class ExceptionAndStackTrace {
+  dynamic dartException;
+  StackTrace stackTrace;
+
+  ExceptionAndStackTrace(this.dartException, this.stackTrace);
+}
+
 /**
  * Called from catch blocks in generated code to extract the Dart
  * exception from the thrown value. The thrown value may have been
@@ -3866,6 +3897,58 @@
   return completer.future;
 }
 
+// Performs an HTTP GET of the given URI and returns the response. The response
+// is either a String or a ByteBuffer.
+Future<dynamic> readHttp(String uri) {
+  Completer completer = new Completer();
+
+  void failure([error, StackTrace stackTrace]) {
+    completer.completeError(
+        new Exception("Loading $uri failed: $error"),
+        stackTrace);
+  }
+
+  enterJsAsync();
+  completer.future.whenComplete(leaveJsAsync);
+
+  var xhr = JS('var', 'new XMLHttpRequest()');
+  JS('void', '#.open("GET", #)', xhr, uri);
+  JS('void', '#.addEventListener("load", #, false)',
+     xhr, convertDartClosureToJS((event) {
+    int status = JS('int', '#.status', xhr);
+    if (status != 200) {
+      failure("Status code: $status");
+      return;
+    }
+    String responseType = JS('String', '#.responseType', xhr);
+    var data;
+    if (responseType.isEmpty || responseType == 'text') {
+      data = JS('String', '#.response', xhr);
+      completer.complete(data);
+    } else if (responseType == 'document' || responseType == 'json') {
+      data = JS('String', '#.responseText', xhr);
+      completer.complete(data);
+    } else if (responseType == 'arraybuffer') {
+      data = JS('var', '#.response', xhr);
+      completer.complete(data);
+    } else if (responseType == 'blob') {
+      var reader = JS('var', 'new FileReader()');
+      JS('void', '#.addEventListener("loadend", #, false)',
+          reader, convertDartClosureToJS((event) {
+            data = JS('var', '#.result', reader);
+            completer.complete(data);
+          }, 1));
+    } else {
+      failure('Result had unexpected type: $responseType');
+    }
+  }, 1));
+
+  JS('void', '#.addEventListener("error", #, false)', xhr, failure);
+  JS('void', '#.addEventListener("abort", #, false)', xhr, failure);
+  JS('void', '#.send()', xhr);
+  return completer.future;
+}
+
 class MainError extends Error implements NoSuchMethodError {
   final String _message;
 
@@ -3885,386 +3968,3 @@
 void mainHasTooManyParameters() {
   throw new MainError("'main' expects too many parameters.");
 }
-
-/// A wrapper around an exception, much like the one created by [wrapException]
-/// but with a pre-given stack-trace.
-class ExceptionAndStackTrace {
-  dynamic dartException;
-  StackTrace stackTrace;
-
-  ExceptionAndStackTrace(this.dartException, this.stackTrace);
-}
-
-/// Runtime support for async-await transformation.
-///
-/// This function is called by a transformed function on each await and return
-/// in the untransformed function, and before starting.
-///
-/// If [object] is not a future it will be wrapped in a `new Future.value`.
-///
-/// If [asyncBody] is [async_error_codes.SUCCESS]/[async_error_codes.ERROR] it
-/// indicates a return or throw from the async function, and
-/// complete/completeError is called on [completer] with [object].
-///
-/// Otherwise [asyncBody] is set up to be called when the future is completed
-/// with a code [async_error_codes.SUCCESS]/[async_error_codes.ERROR] depending
-/// on the success of the future.
-///
-/// Returns the future of the completer for convenience of the first call.
-dynamic asyncHelper(dynamic object,
-                    dynamic /* js function */ bodyFunctionOrErrorCode,
-                    Completer completer) {
-  if (identical(bodyFunctionOrErrorCode, async_error_codes.SUCCESS)) {
-    completer.complete(object);
-    return;
-  } else if (identical(bodyFunctionOrErrorCode, async_error_codes.ERROR)) {
-    // The error is a js-error.
-    completer.completeError(unwrapException(object),
-                            getTraceFromException(object));
-    return;
-  }
-  Future future = object is Future ? object : new Future.value(object);
-  future.then(_wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-                                      async_error_codes.SUCCESS),
-      onError: (dynamic error, StackTrace stackTrace) {
-        ExceptionAndStackTrace wrappedException =
-            new ExceptionAndStackTrace(error, stackTrace);
-        Function wrapped =_wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-            async_error_codes.ERROR);
-        wrapped(wrappedException);
-      });
-  return completer.future;
-}
-
-Function _wrapJsFunctionForAsync(dynamic /* js function */ function,
-                                 int errorCode) {
-  var protected = JS('', """
-    // Invokes [function] with [errorCode] and [result].
-    //
-    // If (and as long as) the invocation throws, calls [function] again,
-    // with an error-code.
-    function(errorCode, result) {
-      while (true) {
-        try {
-          #(errorCode, result);
-          break;
-        } catch (error) {
-          result = error;
-          errorCode = #;
-        }
-      }
-    }""", function, async_error_codes.ERROR);
-  return (result) {
-    JS('', '#(#, #)', protected, errorCode, result);
-  };
-}
-
-/// Implements the runtime support for async* functions.
-///
-/// Called by the transformed function for each original return, await, yield,
-/// yield* and before starting the function.
-///
-/// When the async* function wants to return it calls this function with
-/// [asyncBody] == [async_error_codes.SUCCESS], the asyncStarHelper takes this
-/// as signal to close the stream.
-///
-/// When the async* function wants to signal that an uncaught error was thrown,
-/// it calls this function with [asyncBody] == [async_error_codes.ERROR],
-/// the streamHelper takes this as signal to addError [object] to the
-/// [controller] and close it.
-///
-/// If the async* function wants to do a yield or yield*, it calls this function
-/// with [object] being an [IterationMarker].
-///
-/// In the case of a yield or yield*, if the stream subscription has been
-/// canceled, schedules [asyncBody] to be called with
-/// [async_error_codes.STREAM_WAS_CANCELED].
-///
-/// If [object] is a single-yield [IterationMarker], adds the value of the
-/// [IterationMarker] to the stream. If the stream subscription has been
-/// paused, return early. Otherwise schedule the helper function to be
-/// executed again.
-///
-/// If [object] is a yield-star [IterationMarker], starts listening to the
-/// yielded stream, and adds all events and errors to our own controller (taking
-/// care if the subscription has been paused or canceled) - when the sub-stream
-/// is done, schedules [asyncBody] again.
-///
-/// If the async* function wants to do an await it calls this function with
-/// [object] not and [IterationMarker].
-///
-/// If [object] is not a [Future], it is wrapped in a `Future.value`.
-/// The [asyncBody] is called on completion of the future (see [asyncHelper].
-void asyncStarHelper(dynamic object,
-                     dynamic /* int | js function */ bodyFunctionOrErrorCode,
-                     AsyncStarStreamController controller) {
-  if (identical(bodyFunctionOrErrorCode, async_error_codes.SUCCESS)) {
-    // This happens on return from the async* function.
-    if (controller.isCanceled) {
-      controller.cancelationCompleter.complete();
-    } else {
-      controller.close();
-    }
-    return;
-  } else if (identical(bodyFunctionOrErrorCode, async_error_codes.ERROR)) {
-    // The error is a js-error.
-    if (controller.isCanceled) {
-      controller.cancelationCompleter.completeError(
-          unwrapException(object),
-          getTraceFromException(object));
-    } else {
-      controller.addError(unwrapException(object),
-                          getTraceFromException(object));
-      controller.close();
-    }
-    return;
-  }
-
-  if (object is IterationMarker) {
-    if (controller.isCanceled) {
-      Function wrapped = _wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-          async_error_codes.STREAM_WAS_CANCELED);
-      wrapped(null);
-      return;
-    }
-    if (object.state == IterationMarker.YIELD_SINGLE) {
-      controller.add(object.value);
-
-      scheduleMicrotask(() {
-        if (controller.isPaused) {
-          // We only suspend the thread inside the microtask in order to allow
-          // listeners on the output stream to pause in response to the just
-          // output value, and have the stream immediately stop producing.
-          controller.isSuspended = true;
-          return;
-        }
-        Function wrapped = _wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-            async_error_codes.SUCCESS);
-        wrapped(null);
-      });
-      return;
-    } else if (object.state == IterationMarker.YIELD_STAR) {
-      Stream stream = object.value;
-      // Errors of [stream] are passed though to the main stream. (see
-      // [AsyncStreamController.addStream]).
-      // TODO(sigurdm): The spec is not very clear here. Clarify with Gilad.
-      controller.addStream(stream).then((_) {
-        // No check for isPaused here because the spec 17.16.2 only
-        // demands checks *before* each element in [stream] not after the last
-        // one. On the other hand we check for isCanceled, as that check happens
-        // after insertion of each element.
-        int errorCode = controller.isCanceled
-            ? async_error_codes.STREAM_WAS_CANCELED
-            : async_error_codes.SUCCESS;
-        Function wrapped = _wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-                                errorCode);
-        wrapped(null);
-      });
-      return;
-    }
-  }
-
-  Future future = object is Future ? object : new Future.value(object);
-  future.then(_wrapJsFunctionForAsync(bodyFunctionOrErrorCode,
-                                      async_error_codes.SUCCESS),
-              onError: (error, StackTrace stackTrace) {
-                ExceptionAndStackTrace wrappedException =
-                    new ExceptionAndStackTrace(error, stackTrace);
-                Function wrapped = _wrapJsFunctionForAsync(
-                    bodyFunctionOrErrorCode, async_error_codes.ERROR);
-                return wrapped(wrappedException);
-              });
-}
-
-Stream streamOfController(AsyncStarStreamController controller) {
-  return controller.stream;
-}
-
-/// A wrapper around a [StreamController] that keeps track of the state of
-/// the execution of an async* function.
-/// It can be in 1 of 3 states:
-///
-/// - running/scheduled
-/// - suspended
-/// - canceled
-///
-/// If yielding while the subscription is paused it will become suspended. And
-/// only resume after the subscription is resumed or canceled.
-class AsyncStarStreamController {
-  StreamController controller;
-  Stream get stream => controller.stream;
-
-  /// True when the async* function has yielded while being paused.
-  /// When true execution will only resume after a `onResume` or `onCancel`
-  /// event.
-  bool isSuspended = false;
-
-  bool get isPaused => controller.isPaused;
-
-  Completer cancelationCompleter = null;
-
-  /// True after the StreamSubscription has been cancelled.
-  /// When this is true, errors thrown from the async* body should go to the
-  /// [cancelationCompleter] instead of adding them to [controller], and
-  /// returning from the async function should complete [cancelationCompleter].
-  bool get isCanceled => cancelationCompleter != null;
-
-  add(event) => controller.add(event);
-
-  addStream(Stream stream) {
-    return controller.addStream(stream, cancelOnError: false);
-  }
-
-  addError(error, stackTrace) => controller.addError(error, stackTrace);
-
-  close() => controller.close();
-
-  AsyncStarStreamController(body) {
-
-    _resumeBody() {
-      scheduleMicrotask(() {
-        Function wrapped =
-            _wrapJsFunctionForAsync(body, async_error_codes.SUCCESS);
-        wrapped(null);
-      });
-    }
-
-    controller = new StreamController(
-      onListen: () {
-        _resumeBody();
-      }, onResume: () {
-        // Only schedule again if the async* function actually is suspended.
-        // Resume directly instead of scheduling, so that the sequence
-        // `pause-resume-pause` will result in one extra event produced.
-        if (isSuspended) {
-          isSuspended = false;
-          _resumeBody();
-        }
-      }, onCancel: () {
-        // If the async* is finished we ignore cancel events.
-        if (!controller.isClosed) {
-          cancelationCompleter = new Completer();
-          if (isSuspended) {
-            // Resume the suspended async* function to run finalizers.
-            isSuspended = false;
-            scheduleMicrotask(() {
-              Function wrapped =_wrapJsFunctionForAsync(body,
-                  async_error_codes.STREAM_WAS_CANCELED);
-              wrapped(null);
-            });
-          }
-          return cancelationCompleter.future;
-        }
-      });
-  }
-}
-
-makeAsyncStarController(body) {
-  return new AsyncStarStreamController(body);
-}
-
-class IterationMarker {
-  static const YIELD_SINGLE = 0;
-  static const YIELD_STAR = 1;
-  static const ITERATION_ENDED = 2;
-  static const UNCAUGHT_ERROR = 3;
-
-  final value;
-  final int state;
-
-  IterationMarker._(this.state, this.value);
-
-  static yieldStar(dynamic /* Iterable or Stream */ values) {
-    return new IterationMarker._(YIELD_STAR, values);
-  }
-
-  static endOfIteration() {
-    return new IterationMarker._(ITERATION_ENDED, null);
-  }
-
-  static yieldSingle(dynamic value) {
-    return new IterationMarker._(YIELD_SINGLE, value);
-  }
-
-  static uncaughtError(dynamic error) {
-    return new IterationMarker._(UNCAUGHT_ERROR, error);
-  }
-
-  toString() => "IterationMarker($state, $value)";
-}
-
-class SyncStarIterator implements Iterator {
-  final dynamic _body;
-
-  // If [runningNested] this is the nested iterator, otherwise it is the
-  // current value.
-  dynamic _current = null;
-  bool _runningNested = false;
-
-  get current => _runningNested ? _current.current : _current;
-
-  SyncStarIterator(this._body);
-
-  _runBody() {
-    return JS('', '''
-      // Invokes [body] with [errorCode] and [result].
-      //
-      // If (and as long as) the invocation throws, calls [function] again,
-      // with an error-code.
-      (function(body) {
-        var errorValue, errorCode = #;
-        while (true) {
-          try {
-            return body(errorCode, errorValue);
-          } catch (error) {
-            errorValue = error;
-            errorCode = #
-          }
-        }
-      })(#)''', async_error_codes.SUCCESS, async_error_codes.ERROR, _body);
-  }
-
-
-  bool moveNext() {
-    if (_runningNested) {
-      if (_current.moveNext()) {
-        return true;
-      } else {
-        _runningNested = false;
-      }
-    }
-    _current = _runBody();
-    if (_current is IterationMarker) {
-      if (_current.state == IterationMarker.ITERATION_ENDED) {
-        _current = null;
-        // Rely on [_body] to repeatedly return `ITERATION_ENDED`.
-        return false;
-      } else if (_current.state == IterationMarker.UNCAUGHT_ERROR) {
-        // Rely on [_body] to repeatedly return `UNCAUGHT_ERROR`.
-        // This is a wrapped exception, so we use JavaScript throw to throw it.
-        JS('', 'throw #', _current.value);
-      } else {
-        assert(_current.state == IterationMarker.YIELD_STAR);
-        _current = _current.value.iterator;
-        _runningNested = true;
-        return moveNext();
-      }
-    }
-    return true;
-  }
-}
-
-/// An Iterable corresponding to a sync* method.
-///
-/// Each invocation of a sync* method will return a new instance of this class.
-class SyncStarIterable extends IterableBase {
-  // This is a function that will return a helper function that does the
-  // iteration of the sync*.
-  //
-  // Each invocation should give a body with fresh state.
-  final dynamic /* js function */ _outerHelper;
-
-  SyncStarIterable(this._outerHelper);
-
-  Iterator get iterator => new SyncStarIterator(JS('', '#()', _outerHelper));
-}
diff --git a/sdk/lib/_internal/js_runtime/lib/math_patch.dart b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
index 0a43708..34476f2 100644
--- a/sdk/lib/_internal/js_runtime/lib/math_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
@@ -8,43 +8,43 @@
 
 @patch
 double sqrt(num x)
-  => JS('double', r'Math.sqrt(#)', checkNum(x));
+  => JS('num', r'Math.sqrt(#)', checkNum(x));
 
 @patch
 double sin(num x)
-  => JS('double', r'Math.sin(#)', checkNum(x));
+  => JS('num', r'Math.sin(#)', checkNum(x));
 
 @patch
 double cos(num x)
-  => JS('double', r'Math.cos(#)', checkNum(x));
+  => JS('num', r'Math.cos(#)', checkNum(x));
 
 @patch
 double tan(num x)
-  => JS('double', r'Math.tan(#)', checkNum(x));
+  => JS('num', r'Math.tan(#)', checkNum(x));
 
 @patch
 double acos(num x)
-  => JS('double', r'Math.acos(#)', checkNum(x));
+  => JS('num', r'Math.acos(#)', checkNum(x));
 
 @patch
 double asin(num x)
-  => JS('double', r'Math.asin(#)', checkNum(x));
+  => JS('num', r'Math.asin(#)', checkNum(x));
 
 @patch
 double atan(num x)
-  => JS('double', r'Math.atan(#)', checkNum(x));
+  => JS('num', r'Math.atan(#)', checkNum(x));
 
 @patch
 double atan2(num a, num b)
-  => JS('double', r'Math.atan2(#, #)', checkNum(a), checkNum(b));
+  => JS('num', r'Math.atan2(#, #)', checkNum(a), checkNum(b));
 
 @patch
 double exp(num x)
-  => JS('double', r'Math.exp(#)', checkNum(x));
+  => JS('num', r'Math.exp(#)', checkNum(x));
 
 @patch
 double log(num x)
-  => JS('double', r'Math.log(#)', checkNum(x));
+  => JS('num', r'Math.log(#)', checkNum(x));
 
 @patch
 num pow(num x, num exponent) {
diff --git a/sdk/lib/_internal/js_runtime/lib/string_helper.dart b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
index 51b696b..9ce91f8 100644
--- a/sdk/lib/_internal/js_runtime/lib/string_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
@@ -49,29 +49,58 @@
   final String pattern;
 }
 
-List<Match> allMatchesInStringUnchecked(String pattern, String string,
-                                        int startIndex) {
-  // Copied from StringBase.allMatches in
-  // /runtime/lib/string_base.dart
-  List<Match> result = new List<Match>();
-  int length = string.length;
-  int patternLength = pattern.length;
-  while (true) {
-    int position = stringIndexOfStringUnchecked(string, pattern, startIndex);
-    if (position == -1) {
-      break;
+Iterable<Match> allMatchesInStringUnchecked(String pattern, String string,
+                                            int startIndex) {
+  return new _StringAllMatchesIterable(string, pattern, startIndex);
+}
+
+class _StringAllMatchesIterable extends Iterable<Match> {
+  final String _input;
+  final String _pattern;
+  final int _index;
+
+  _StringAllMatchesIterable(this._input, this._pattern, this._index);
+
+  Iterator<Match> get iterator =>
+      new _StringAllMatchesIterator(_input, _pattern, _index);
+
+  Match get first {
+    int index = stringIndexOfStringUnchecked(_input, _pattern, _index);
+    if (index >= 0) {
+      return new StringMatch(index, _input, _pattern);
     }
-    result.add(new StringMatch(position, string, pattern));
-    int endIndex = position + patternLength;
-    if (endIndex == length) {
-      break;
-    } else if (position == endIndex) {
-      ++startIndex;  // empty match, advance and restart
-    } else {
-      startIndex = endIndex;
-    }
+    throw IterableElementError.noElement();
   }
-  return result;
+}
+
+class _StringAllMatchesIterator implements Iterator<Match> {
+  final String _input;
+  final String _pattern;
+  int _index;
+  Match _current;
+
+  _StringAllMatchesIterator(this._input, this._pattern, this._index);
+
+  bool moveNext() {
+    if (_index + _pattern.length > _input.length) {
+      _current = null;
+      return false;
+    }
+    var index = stringIndexOfStringUnchecked(_input, _pattern, _index);
+    if (index < 0) {
+      _index = _input.length + 1;
+      _current = null;
+      return false;
+    }
+    int end = index + _pattern.length;
+    _current = new StringMatch(index, _input, _pattern);
+    // Empty match, don't start at same location again.
+    if (end == _index) end++;
+    _index = end;
+    return true;
+  }
+
+  Match get current => _current;
 }
 
 stringContainsUnchecked(receiver, other, startIndex) {
diff --git a/sdk/lib/_internal/js_runtime/pubspec.yaml b/sdk/lib/_internal/js_runtime/pubspec.yaml
index 058f035..c8fa809 100644
--- a/sdk/lib/_internal/js_runtime/pubspec.yaml
+++ b/sdk/lib/_internal/js_runtime/pubspec.yaml
@@ -1,4 +1,4 @@
 # Note: This package is not meant to be uploaded to pub. This file is used to
-# make it easer to develop on dart2js.
+# make it easier to develop on dart2js.
 name: js_runtime
 # version: do-not-upload
diff --git a/sdk/lib/async/broadcast_stream_controller.dart b/sdk/lib/async/broadcast_stream_controller.dart
index e5a1efc..6f4ddab 100644
--- a/sdk/lib/async/broadcast_stream_controller.dart
+++ b/sdk/lib/async/broadcast_stream_controller.dart
@@ -79,8 +79,8 @@
   static const int _STATE_CLOSED = 4;
   static const int _STATE_ADDSTREAM = 8;
 
-  _NotificationHandler _onListen;
-  _NotificationHandler _onCancel;
+  ControllerCallback onListen;
+  ControllerCancelCallback onCancel;
 
   // State of the controller.
   int _state;
@@ -107,25 +107,31 @@
    */
   _Future _doneFuture;
 
-  _BroadcastStreamController(this._onListen, this._onCancel)
+  _BroadcastStreamController(this.onListen, this.onCancel)
       : _state = _STATE_INITIAL {
     _next = _previous = this;
   }
 
-  void set onListen(void onListenHandler()) { _onListen = onListenHandler; }
+  ControllerCallback get onPause {
+    throw new UnsupportedError(
+        "Broadcast stream controllers do not support pause callbacks");
+  }
 
   void set onPause(void onPauseHandler()) {
     throw new UnsupportedError(
         "Broadcast stream controllers do not support pause callbacks");
   }
 
+  ControllerCallback get onResume {
+    throw new UnsupportedError(
+        "Broadcast stream controllers do not support pause callbacks");
+  }
+
   void set onResume(void onResumeHandler())  {
     throw new UnsupportedError(
         "Broadcast stream controllers do not support pause callbacks");
   }
 
-  void set onCancel(onCancelHandler()) { _onCancel = onCancelHandler; }
-
   // StreamController interface.
 
   Stream<T> get stream => new _BroadcastStream<T>(this);
@@ -209,7 +215,7 @@
     _addListener(subscription);
     if (identical(_next, _previous)) {
       // Only one listener, so it must be the first listener.
-      _runGuarded(_onListen);
+      _runGuarded(onListen);
     }
     return subscription;
   }
@@ -310,7 +316,7 @@
 
     // Get event id of this event.
     int id = (_state & _STATE_EVENT_ID);
-    // Start firing (set the _STATE_FIRING bit). We don't do [_onCancel]
+    // Start firing (set the _STATE_FIRING bit). We don't do [onCancel]
     // callbacks while firing, and we prevent reentrancy of this function.
     //
     // Set [_state]'s event id to the next event's id.
@@ -346,7 +352,7 @@
       // When closed, _doneFuture is not null.
       _doneFuture._asyncComplete(null);
     }
-    _runGuarded(_onCancel);
+    _runGuarded(onCancel);
   }
 }
 
diff --git a/sdk/lib/async/future.dart b/sdk/lib/async/future.dart
index 5d6a650..30016f7 100644
--- a/sdk/lib/async/future.dart
+++ b/sdk/lib/async/future.dart
@@ -221,7 +221,7 @@
    * See also [Completer] for a way to create and complete a future at a
    * later time that isn't necessarily after a known fixed duration.
    */
-  factory Future.delayed(Duration duration, [T computation()]) {
+  factory Future.delayed(Duration duration, [computation()]) {
     _Future result = new _Future<T>();
     new Timer(duration, () {
       try {
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index 980f0ca..35dfd119 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -175,6 +175,7 @@
    */
   var _resultOrListeners;
 
+  // This constructor is used by async/await.
   _Future();
 
   /// Valid types for value: `T` or `Future<T>`.
@@ -203,13 +204,19 @@
   }
 
   Future then(f(T value), { Function onError }) {
-    _Future result = new _Future();
-    if (!identical(result._zone, _ROOT_ZONE)) {
-      f = result._zone.registerUnaryCallback(f);
+    Zone currentZone = Zone.current;
+    if (!identical(currentZone, _ROOT_ZONE)) {
+      f = currentZone.registerUnaryCallback(f);
       if (onError != null) {
-        onError = _registerErrorHandler(onError, result._zone);
+        onError = _registerErrorHandler(onError, currentZone);
       }
     }
+    return _thenNoZoneRegistration(f, onError);
+  }
+
+  // This method is used by async/await.
+  Future _thenNoZoneRegistration(f(T value), Function onError) {
+    _Future result = new _Future();
     _addListener(new _FutureListener.then(result, f, onError));
     return result;
   }
@@ -250,6 +257,7 @@
     return _resultOrListeners;
   }
 
+  // This method is used by async/await.
   void _setValue(T value) {
     assert(!_isComplete);  // But may have a completion pending.
     _state = _VALUE;
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index f856b61..c8a2465 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -9,6 +9,18 @@
 // -------------------------------------------------------------------
 
 /**
+ * Type of a stream controller's `onListen`, `onPause` and `onResume` callbacks.
+ */
+typedef void ControllerCallback();
+
+/**
+ * Type of stream controller `onCancel` callbacks.
+ *
+ * The callback may return either `void` or a future.
+ */
+typedef ControllerCancelCallback();
+
+/**
  * A controller with the stream it controls.
  *
  * This controller allows sending data, error and done events on
@@ -133,39 +145,43 @@
   }
 
   /**
-   * Sets the callback which is called when the stream is listened to.
+   * The callback which is called when the stream is listened to.
    *
-   * This overrides the previous callback, or clears it if the [onListenHandler]
-   * is `null`.
+   * May be set to `null`, in which case no callback will happen.
    */
+  ControllerCallback get onListen;
+
   void set onListen(void onListenHandler());
 
   /**
-   * Sets the callback which is called when the stream is paused.
+   * The callback which is called when the stream is paused.
    *
-   * This overrides the previous callback, or clears it if the [onPauseHandler]
-   * is `null`.
+   * May be set to `null`, in which case no callback will happen.
    *
    * Pause related callbacks are not supported on broadcast stream controllers.
    */
+  ControllerCallback get onPause;
+
   void set onPause(void onPauseHandler());
 
   /**
-   * Sets the callback which is called when the stream is resumed.
+   * The callback which is called when the stream is resumed.
    *
-   * This overrides the previous callback, or clears it if the [onResumeHandler]
-   * is `null`.
+   * May be set to `null`, in which case no callback will happen.
    *
    * Pause related callbacks are not supported on broadcast stream controllers.
    */
+  ControllerCallback get onResume;
+
   void set onResume(void onResumeHandler());
 
   /**
-   * Sets the callback which is called when the stream is canceled.
+   * The callback which is called when the stream is canceled.
    *
-   * This overrides the previous callback, or clears it if the [onCancelHandler]
-   * is `null`.
+   * May be set to `null`, in which case no callback will happen.
    */
+  ControllerCancelCallback get onCancel;
+
   void set onCancel(onCancelHandler());
 
   /**
@@ -413,23 +429,15 @@
   // accessed earlier, or if close is called before subscribing.
   _Future _doneFuture;
 
-  _NotificationHandler _onListen;
-  _NotificationHandler _onPause;
-  _NotificationHandler _onResume;
-  _NotificationHandler _onCancel;
+  ControllerCallback onListen;
+  ControllerCallback onPause;
+  ControllerCallback onResume;
+  ControllerCancelCallback onCancel;
 
-  _StreamController(void this._onListen(),
-                    void this._onPause(),
-                    void this._onResume(),
-                    this._onCancel());
-
-  void set onListen(void onListenHandler()) { _onListen = onListenHandler; }
-
-  void set onPause(void onPauseHandler()) { _onPause = onPauseHandler; }
-
-  void set onResume(void onResumeHandler()) { _onResume = onResumeHandler; }
-
-  void set onCancel(onCancelHandler()) { _onCancel = onCancelHandler; }
+  _StreamController(this.onListen,
+                    this.onPause,
+                    this.onResume,
+                    this.onCancel);
 
   // Return a new stream every time. The streams are equal, but not identical.
   Stream<T> get stream => new _ControllerStream<T>(this);
@@ -653,7 +661,7 @@
     }
     subscription._setPendingEvents(pendingEvents);
     subscription._guardCallback(() {
-      _runGuarded(_onListen);
+      _runGuarded(onListen);
     });
 
     return subscription;
@@ -661,8 +669,8 @@
 
   Future _recordCancel(StreamSubscription<T> subscription) {
     // When we cancel, we first cancel any stream being added,
-    // Then we call _onCancel, and finally the _doneFuture is completed.
-    // If either of addStream's cancel or _onCancel returns a future,
+    // Then we call `onCancel`, and finally the _doneFuture is completed.
+    // If either of addStream's cancel or `onCancel` returns a future,
     // we wait for it before continuing.
     // Any error during this process ends up in the returned future.
     // If more errors happen, we act as if it happens inside nested try/finallys
@@ -677,12 +685,12 @@
     _state =
         (_state & ~(_STATE_SUBSCRIBED | _STATE_ADDSTREAM)) | _STATE_CANCELED;
 
-    if (_onCancel != null) {
+    if (onCancel != null) {
       if (result == null) {
         // Only introduce a future if one is needed.
         // If _onCancel returns null, no future is needed.
         try {
-          result = _onCancel();
+          result = onCancel();
         } catch (e, s) {
           // Return the error in the returned future.
           // Complete it asynchronously, so there is time for a listener
@@ -691,7 +699,7 @@
         }
       } else {
         // Simpler case when we already know that we will return a future.
-        result = result.whenComplete(_onCancel);
+        result = result.whenComplete(onCancel);
       }
     }
 
@@ -715,7 +723,7 @@
       _StreamControllerAddStreamState addState = _varData;
       addState.pause();
     }
-    _runGuarded(_onPause);
+    _runGuarded(onPause);
   }
 
   void _recordResume(StreamSubscription<T> subscription) {
@@ -723,7 +731,7 @@
       _StreamControllerAddStreamState addState = _varData;
       addState.resume();
     }
-    _runGuarded(_onResume);
+    _runGuarded(onResume);
   }
 }
 
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index c23b0f0..51f8b14 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -203,7 +203,7 @@
   }
 
   Future asFuture([var futureValue]) {
-    _Future<T> result = new _Future<T>();
+    _Future result = new _Future();
 
     // Overwrite the onDone and onError handlers.
     _onDone = () { result._complete(futureValue); };
@@ -839,7 +839,8 @@
   void _onCancel() {
     bool shutdown = (_controller == null) || _controller.isClosed;
     if (_onCancelHandler != null) {
-      _zone.runUnary(_onCancelHandler, new _BroadcastSubscriptionWrapper(this));
+      _zone.runUnary(
+          _onCancelHandler, new _BroadcastSubscriptionWrapper<T>(this));
     }
     if (shutdown) {
       if (_subscription != null) {
@@ -851,7 +852,8 @@
 
   void _onListen() {
     if (_onListenHandler != null) {
-      _zone.runUnary(_onListenHandler, new _BroadcastSubscriptionWrapper(this));
+      _zone.runUnary(
+          _onListenHandler, new _BroadcastSubscriptionWrapper<T>(this));
     }
   }
 
diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart
index a2fc15d..b3c3aaf 100644
--- a/sdk/lib/async/stream_pipe.dart
+++ b/sdk/lib/async/stream_pipe.dart
@@ -161,7 +161,7 @@
     if (_subscription != null) {
       StreamSubscription subscription = _subscription;
       _subscription = null;
-      subscription.cancel();
+      return subscription.cancel();
     }
     return null;
   }
diff --git a/sdk/lib/async/stream_transformers.dart b/sdk/lib/async/stream_transformers.dart
index 0ed4117..ea4aaf7 100644
--- a/sdk/lib/async/stream_transformers.dart
+++ b/sdk/lib/async/stream_transformers.dart
@@ -250,7 +250,7 @@
   /** Default error handler forwards all errors. */
   static void _defaultHandleError(error, StackTrace stackTrace,
                                   EventSink sink) {
-    sink.addError(error);
+    sink.addError(error, stackTrace);
   }
 
   /** Default done handler forwards done. */
diff --git a/sdk/lib/async/zone.dart b/sdk/lib/async/zone.dart
index fba3dc9..225f5d1 100644
--- a/sdk/lib/async/zone.dart
+++ b/sdk/lib/async/zone.dart
@@ -203,20 +203,19 @@
     this.fork: null
   });
 
-  // TODO(13406): Enable types when dart2js supports it.
-  final /*HandleUncaughtErrorHandler*/ handleUncaughtError;
-  final /*RunHandler*/ run;
-  final /*RunUnaryHandler*/ runUnary;
-  final /*RunBinaryHandler*/ runBinary;
-  final /*RegisterCallbackHandler*/ registerCallback;
-  final /*RegisterUnaryCallbackHandler*/ registerUnaryCallback;
-  final /*RegisterBinaryCallbackHandler*/ registerBinaryCallback;
-  final /*ErrorCallbackHandler*/ errorCallback;
-  final /*ScheduleMicrotaskHandler*/ scheduleMicrotask;
-  final /*CreateTimerHandler*/ createTimer;
-  final /*CreatePeriodicTimerHandler*/ createPeriodicTimer;
-  final /*PrintHandler*/ print;
-  final /*ForkHandler*/ fork;
+  final HandleUncaughtErrorHandler handleUncaughtError;
+  final RunHandler run;
+  final RunUnaryHandler runUnary;
+  final RunBinaryHandler runBinary;
+  final RegisterCallbackHandler registerCallback;
+  final RegisterUnaryCallbackHandler registerUnaryCallback;
+  final RegisterBinaryCallbackHandler registerBinaryCallback;
+  final ErrorCallbackHandler errorCallback;
+  final ScheduleMicrotaskHandler scheduleMicrotask;
+  final CreateTimerHandler createTimer;
+  final CreatePeriodicTimerHandler createPeriodicTimer;
+  final PrintHandler print;
+  final ForkHandler fork;
 }
 
 /**
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index 9b6b753..02e4b71 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -244,8 +244,12 @@
   }
 
   void addAll(Iterable<E> iterable) {
+    int i = this.length;
     for (E element in iterable) {
-      this[this.length++] = element;
+      assert(this.length == i || (throw new ConcurrentModificationError(this)));
+      this.length = i + 1;
+      this[i] = element;
+      i++;
     }
   }
 
diff --git a/sdk/lib/core/pattern.dart b/sdk/lib/core/pattern.dart
index cf898af..f47ba15 100644
--- a/sdk/lib/core/pattern.dart
+++ b/sdk/lib/core/pattern.dart
@@ -17,8 +17,10 @@
    *
    * If [start] is provided, matching will start at that index.
    *
-   * The iterable will contain all the non-overlapping matches of the
-   * pattern on the string, ordered by start index.
+   * The returned iterable lazily computes all the non-overlapping matches
+   * of the pattern on the string, ordered by start index.
+   * If a user only requests the first
+   * match, this function should not compute all possible matches.
    *
    * The matches are found by repeatedly finding the first match
    * of the pattern on the string, starting from the end of the previous
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 3eb81a4..78f42de 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -986,6 +986,16 @@
   }
 
   /**
+   * Returns a `Uri` that differs from this only in not having a fragment.
+   *
+   * If this `Uri` does not have a fragment, it is itself returned.
+   */
+  Uri removeFragment() {
+    if (!this.hasFragment) return this;
+    return new Uri._internal(scheme, userInfo, host, port, path, query, null);
+  }
+
+  /**
    * Returns the URI path split into its segments. Each of the
    * segments in the returned list have been decoded. If the path is
    * empty the empty list will be returned. A leading slash `/` does
diff --git a/sdk/lib/developer/developer.dart b/sdk/lib/developer/developer.dart
index 97c449e..c51a680 100644
--- a/sdk/lib/developer/developer.dart
+++ b/sdk/lib/developer/developer.dart
@@ -13,7 +13,9 @@
 
 import 'dart:async';
 import 'dart:convert';
+import 'dart:isolate' show SendPort;
 
+part 'extension.dart';
 part 'profiler.dart';
 
 /// If [when] is true, stop the program as if a breakpoint were hit at the
@@ -42,11 +44,11 @@
 /// [zone] (optional) the zone where the log was emitted
 /// [error] (optional) an error object associated with this log event.
 /// [stackTrace] (optional) a stack trace associated with this log event.
-external log(String message,
-             {DateTime time,
-              int sequenceNumber,
-              int level: 0,
-              String name: '',
-              Zone zone,
-              Object error,
-              StackTrace stackTrace});
+external void log(String message,
+                  {DateTime time,
+                   int sequenceNumber,
+                   int level: 0,
+                   String name: '',
+                   Zone zone,
+                   Object error,
+                   StackTrace stackTrace});
diff --git a/sdk/lib/developer/developer_sources.gypi b/sdk/lib/developer/developer_sources.gypi
index adbaea9..63d69cc 100644
--- a/sdk/lib/developer/developer_sources.gypi
+++ b/sdk/lib/developer/developer_sources.gypi
@@ -5,6 +5,7 @@
 {
   'sources': [
     'developer.dart',
+    'extension.dart',
     'profiler.dart',
     # The above file needs to be first if additional parts are added to the lib.
   ],
diff --git a/sdk/lib/developer/extension.dart b/sdk/lib/developer/extension.dart
new file mode 100644
index 0000000..05eeae7
--- /dev/null
+++ b/sdk/lib/developer/extension.dart
@@ -0,0 +1,191 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.developer;
+
+class ServiceExtensionResponse {
+  final String _result;
+  final int _errorCode;
+  final String _errorDetail;
+
+  ServiceExtensionResponse.result(this._result)
+      : _errorCode = null,
+        _errorDetail = null {
+    if (_result is! String) {
+      throw new ArgumentError.value(_result, "result", "Must be a String");
+    }
+  }
+
+  ServiceExtensionResponse.error(this._errorCode, this._errorDetail)
+      : _result = null {
+    _validateErrorCode(_errorCode);
+    if (_errorDetail is! String) {
+      throw new ArgumentError.value(_errorDetail,
+                                    "errorDetail",
+                                    "Must be a String");
+    }
+  }
+
+  /// Invalid method parameter(s) error code.
+  static const kInvalidParams = -32602;
+  /// Generic extension error code.
+  static const kExtensionError = -32000;
+  /// Maximum extension provided error code.
+  static const kExtensionErrorMax = -32000;
+  /// Minimum extension provided error code.
+  static const kExtensionErrorMin = -32016;
+
+  static String _errorCodeMessage(int errorCode) {
+    _validateErrorCode(errorCode);
+    if (errorCode == kInvalidParams) {
+      return "Invalid params";
+    }
+    return "Server error";
+  }
+
+  static _validateErrorCode(int errorCode) {
+    if (errorCode is! int) {
+      throw new ArgumentError.value(errorCode, "errorCode", "Must be an int");
+    }
+    if (errorCode == kInvalidParams) {
+      return;
+    }
+    if ((errorCode >= kExtensionErrorMin) &&
+        (errorCode <= kExtensionErrorMax)) {
+      return;
+    }
+    throw new ArgumentError.value(errorCode, "errorCode", "Out of range");
+  }
+
+  bool _isError() => (_errorCode != null) && (_errorDetail != null);
+
+  String _toString() {
+    if (_result != null) {
+      return _result;
+    } else {
+      assert(_errorCode != null);
+      assert(_errorDetail != null);
+      return JSON.encode({
+        'code': _errorCode,
+        'message': _errorCodeMessage(_errorCode),
+        'data': {
+          'details': _errorDetail
+        }
+      });
+    }
+  }
+}
+
+/// A service protocol extension handler. Registered with [registerExtension].
+///
+/// Must complete to a [ServiceExtensionResponse].
+///
+/// [method] - the method name.
+/// [parameters] - the parameters.
+typedef Future<ServiceExtensionResponse>
+    ServiceExtensionHandler(String method, Map parameters);
+
+/// Register a [ServiceExtensionHandler] that will be invoked in this isolate
+/// for [method].
+void registerExtension(String method, ServiceExtensionHandler handler) {
+  if (method is! String) {
+    throw new ArgumentError.value(method,
+                                  'method',
+                                  'Must be a String');
+  }
+  if (_lookupExtension(method) != null) {
+    throw new ArgumentError('Extension already registered: $method');
+  }
+  if (handler is! ServiceExtensionHandler) {
+    throw new ArgumentError.value(handler,
+                                  'handler',
+                                  'Must be a ServiceExtensionHandler');
+  }
+  _registerExtension(method, handler);
+}
+
+// Both of these functions are written inside C++ to avoid updating the data
+// structures in Dart, getting an OOB, and observing stale state. Do not move
+// these into Dart code unless you can ensure that the operations will can be
+// done atomically. Native code lives in vm/isolate.cc-
+// LookupServiceExtensionHandler and RegisterServiceExtensionHandler.
+external ServiceExtensionHandler _lookupExtension(String method);
+external _registerExtension(String method, ServiceExtensionHandler handler);
+
+// This code is only invoked when there is no other Dart code on the stack.
+_runExtension(ServiceExtensionHandler handler,
+              String method,
+              List<String> parameterKeys,
+              List<String> parameterValues,
+              SendPort replyPort,
+              Object id) {
+  var parameters = {};
+  for (var i = 0; i < parameterKeys.length; i++) {
+    parameters[parameterKeys[i]] = parameterValues[i];
+  }
+  var response;
+  try {
+    response = handler(method, parameters);
+  } catch (e, st) {
+    var errorDetails = (st == null) ? '$e' : '$e\n$st';
+    response = new ServiceExtensionResponse.error(
+        ServiceExtensionResponse.kExtensionError,
+        errorDetails);
+    _postResponse(replyPort, id, response);
+    return;
+  }
+  if (response is! Future) {
+    response = new ServiceExtensionResponse.error(
+          ServiceExtensionResponse.kExtensionError,
+          "Extension handler must return a Future");
+    _postResponse(replyPort, id, response);
+    return;
+  }
+  response.catchError((e, st) {
+    // Catch any errors eagerly and wrap them in a ServiceExtensionResponse.
+    var errorDetails = (st == null) ? '$e' : '$e\n$st';
+    return new ServiceExtensionResponse.error(
+        ServiceExtensionResponse.kExtensionError,
+        errorDetails);
+  }).then((response) {
+    // Post the valid response or the wrapped error after verifying that
+    // the response is a ServiceExtensionResponse.
+    if (response is! ServiceExtensionResponse) {
+      response = new ServiceExtensionResponse.error(
+          ServiceExtensionResponse.kExtensionError,
+          "Extension handler must complete to a ServiceExtensionResponse");
+    }
+    _postResponse(replyPort, id, response);
+  }).catchError((e, st) {
+    // We do not expect any errors to occur in the .then or .catchError blocks
+    // but, suppress them just in case.
+  });
+}
+
+// This code is only invoked by _runExtension.
+_postResponse(SendPort replyPort,
+              Object id,
+              ServiceExtensionResponse response) {
+  assert(replyPort != null);
+  if (id == null) {
+    // No id -> no response.
+    replyPort.send(null);
+    return;
+  }
+  assert(id != null);
+  StringBuffer sb = new StringBuffer();
+  sb.write('{"jsonrpc":"2.0",');
+  if (response._isError()) {
+    sb.write('"error":');
+  } else {
+    sb.write('"result":');
+  }
+  sb.write('${response._toString()},');
+  if (id is String) {
+    sb.write('"id":"$id"}');
+  } else {
+    sb.write('"id":$id}');
+  }
+  replyPort.send(sb.toString());
+}
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 218dc51..06cecb0 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -24466,8 +24466,6 @@
    */
   @DomName('Node.childNodes')
   @DocsEditable()
-  @Returns('NodeList')
-  @Creates('NodeList')
   List<Node> get childNodes => _blink.BlinkNode.instance.childNodes_Getter_(this);
   // To suppress missing implicit constructor warnings.
   factory Node._() { throw new UnsupportedError("Not supported"); }
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 4bc5448..dd71559 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -93,23 +93,28 @@
  *
  * Use [bindSecure] to create an HTTPS server.
  *
- * The server presents a certificate to the client. In the following
- * example, the certificate is named `localhost_cert` and comes from
- * the database found in the `pkcert` directory.
+ * The server presents a certificate to the client. The certificate
+ * chain and the private key are set in the SecurityContext
+ * object that is passed to [bindSecure].
  *
  *     import 'dart:io';
  *     import "dart:isolate";
  *
  *     main() {
- *       var testPkcertDatabase = Platform.script.resolve('pkcert')
- *                                        .toFilePath();
- *       SecureSocket.initialize(database: testPkcertDatabase,
- *                               password: 'dartdart');
+ *       SecurityContext context = new SecurityContext();
+ *       var chain =
+ *           Platform.script.resolve('certificates/server_chain.pem')
+ *           .toFilePath();
+ *       var key =
+ *           Platform.script.resolve('certificates/server_key.pem')
+ *           .toFilePath();
+ *       context.useCertificateChain(chain);
+ *       context.usePrivateKey(key, password: 'dartdart');
  *
  *       HttpServer
  *           .bindSecure(InternetAddress.ANY_IP_V6,
  *                       443,
- *                       certificateName: 'localhost_cert')
+ *                       context)
  *           .then((server) {
  *             server.listen((HttpRequest request) {
  *               request.response.write('Hello, world!');
@@ -118,10 +123,8 @@
  *           });
  *     }
  *
- * The certificate database is managed using the Mozilla certutil tool (see
- * [NSS Tools certutil](https://developer.mozilla.org/en-US/docs/NSS/tools/NSS_Tools_certutil)).
- * Dart uses the NSS library to handle SSL, and the Mozilla certutil
- * must be used to manipulate the certificate database.
+ *  The certificates and keys are pem files, which can be created and
+ *  managed with the tools in OpenSSL and BoringSSL.
  *
  * ## Connect to a server socket
  *
@@ -291,6 +294,7 @@
 
   static Future<HttpServer> bindSecure(address,
                                        int port,
+                                       SecurityContext context,
                                        {int backlog: 0,
                                         bool v6Only: false,
                                         String certificateName,
@@ -298,6 +302,7 @@
                                         bool shared: false})
       => _HttpServer.bindSecure(address,
                                 port,
+                                context,
                                 backlog,
                                 v6Only,
                                 certificateName,
@@ -958,7 +963,7 @@
    * The URI for the request.
    *
    * This provides access to the
-   * path, query string, and fragment identifier for the request.
+   * path and query string for the request.
    */
   Uri get uri;
 
@@ -1331,14 +1336,15 @@
    */
   String userAgent;
 
-  factory HttpClient() => new _HttpClient();
+  factory HttpClient({SecurityContext context}) => new _HttpClient(context);
 
   /**
    * Opens a HTTP connection.
    *
    * The HTTP method to use is specified in [method], the server is
    * specified using [host] and [port], and the path (including
-   * possible fragment and query) is specified using [path].
+   * a possible query) is specified using [path].
+   * The path may also contain a URI fragment, which will be ignored.
    *
    * The `Host` header for the request will be set to the value
    * [host]:[port]. This can be overridden through the
@@ -1377,7 +1383,7 @@
    * Opens a HTTP connection using the GET method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
+   * (including a possible query) is specified using
    * [path].
    *
    * See [open] for details.
@@ -1397,7 +1403,7 @@
    * Opens a HTTP connection using the POST method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
+   * (including a possible query) is specified using
    * [path].
    *
    * See [open] for details.
@@ -1417,8 +1423,7 @@
    * Opens a HTTP connection using the PUT method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
-   * [path].
+   * (including a possible query) is specified using [path].
    *
    * See [open] for details.
    */
@@ -1437,8 +1442,7 @@
    * Opens a HTTP connection using the DELETE method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
-   * [path].
+   * (including s possible query) is specified using [path].
    *
    * See [open] for details.
    */
@@ -1457,8 +1461,7 @@
    * Opens a HTTP connection using the PATCH method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
-   * [path].
+   * (including a possible query) is specified using [path].
    *
    * See [open] for details.
    */
@@ -1477,8 +1480,7 @@
    * Opens a HTTP connection using the HEAD method.
    *
    * The server is specified using [host] and [port], and the path
-   * (including possible fragment and query) is specified using
-   * [path].
+   * (including a possible query) is specified using [path].
    *
    * See [open] for details.
    */
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index f06179b..880d771 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -791,13 +791,9 @@
     // Generate the request URI starting from the path component.
     String uriStartingFromPath() {
       String result = uri.path;
-      if (result.length == 0) result = "/";
-      if (uri.query != "") {
-        if (uri.fragment != "") {
-          result = "${result}?${uri.query}#${uri.fragment}";
-        } else {
-          result = "${result}?${uri.query}";
-        }
+      if (result.isEmpty) result = "/";
+      if (uri.hasQuery) {
+        result = "${result}?${uri.query}";
       }
       return result;
     }
@@ -814,7 +810,7 @@
         if (_httpClientConnection._proxyTunnel) {
           return uriStartingFromPath();
         } else {
-          return uri.toString();
+          return uri.removeFragment().toString();
         }
       }
     }
@@ -1260,6 +1256,7 @@
   final String key;
   final Socket _socket;
   final bool _proxyTunnel;
+  final SecurityContext _context;
   final _HttpParser _httpParser;
   StreamSubscription _subscription;
   final _HttpClient _httpClient;
@@ -1272,7 +1269,7 @@
   Future _streamFuture;
 
   _HttpClientConnection(this.key, this._socket, this._httpClient,
-                        [this._proxyTunnel = false])
+                        [this._proxyTunnel = false, this._context])
       : _httpParser = new _HttpParser.responseParser() {
     _httpParser.listenToStream(_socket);
 
@@ -1500,7 +1497,10 @@
           }
           var socket = response._httpRequest._httpClientConnection._socket;
           return SecureSocket.secure(
-              socket, host: host, onBadCertificate: callback);
+              socket,
+              host: host,
+              context: _context,
+              onBadCertificate: callback);
         })
         .then((secureSocket) {
           String key = _HttpClientConnection.makeKey(true, host, port);
@@ -1547,12 +1547,17 @@
   final String host;
   final int port;
   final bool isSecure;
+  final SecurityContext context;
   final Set<_HttpClientConnection> _idle = new HashSet();
   final Set<_HttpClientConnection> _active = new HashSet();
   final Queue _pending = new ListQueue();
   int _connecting = 0;
 
-  _ConnectionTarget(this.key, this.host, this.port, this.isSecure);
+  _ConnectionTarget(this.key,
+                    this.host,
+                    this.port,
+                    this.isSecure,
+                    this.context);
 
   bool get isEmpty => _idle.isEmpty && _active.isEmpty && _connecting == 0;
 
@@ -1624,12 +1629,13 @@
       return completer.future;
     }
     var currentBadCertificateCallback = client._badCertificateCallback;
-    bool callback(X509Certificate certificate) =>
+    callback(X509Certificate certificate) =>
         currentBadCertificateCallback == null ? false :
         currentBadCertificateCallback(certificate, uriHost, uriPort);
     Future socketFuture = (isSecure && proxy.isDirect
         ? SecureSocket.connect(host,
                                port,
+                               context: context,
                                sendClientCertificate: true,
                                onBadCertificate: callback)
         : Socket.connect(host, port));
@@ -1637,7 +1643,8 @@
     return socketFuture.then((socket) {
         _connecting--;
         socket.setOption(SocketOption.TCP_NODELAY, true);
-        var connection = new _HttpClientConnection(key, socket, client);
+        var connection =
+            new _HttpClientConnection(key, socket, client, false, context);
         if (isSecure && !proxy.isDirect) {
           connection._dispose = true;
           return connection.createProxyTunnel(uriHost, uriPort, proxy, callback)
@@ -1666,6 +1673,7 @@
       = new HashMap<String, _ConnectionTarget>();
   final List<_Credentials> _credentials = [];
   final List<_ProxyCredentials> _proxyCredentials = [];
+  final SecurityContext _context;
   Function _authenticate;
   Function _authenticateProxy;
   Function _findProxy = HttpClient.findProxyFromEnvironment;
@@ -1680,6 +1688,8 @@
 
   String userAgent = _getHttpVersion();
 
+  _HttpClient(SecurityContext this._context);
+
   void set idleTimeout(Duration timeout) {
     _idleTimeout = timeout;
     for (var c in _connectionTargets.values) {
@@ -1702,9 +1712,26 @@
                                  String host,
                                  int port,
                                  String path) {
-    Uri uri = new Uri(scheme: "http", host: host, port: port).resolve(path);
-    // TODO(sgjesse): The path set here can contain both query and
-    // fragment. They should be cracked and set correctly.
+    const int hashMark = 0x23;
+    const int questionMark = 0x3f;
+    int fragmentStart = path.length;
+    int queryStart = path.length;
+    for (int i = path.length - 1; i >= 0; i--) {
+      var char = path.codeUnitAt(i);
+      if (char == hashMark) {
+        fragmentStart = i;
+        queryStart = i;
+      } else if (char == questionMark) {
+        queryStart = i;
+      }
+    }
+    String query = null;
+    if (queryStart < fragmentStart) {
+      query = path.substring(queryStart + 1, fragmentStart);
+      path = path.substring(0, queryStart);
+    }
+    Uri uri = new Uri(scheme: "http", host: host, port: port,
+                      path: path, query: query);
     return _openUrl(method, uri);
   }
 
@@ -1772,6 +1799,9 @@
   set findProxy(String f(Uri uri)) => _findProxy = f;
 
   Future<HttpClientRequest> _openUrl(String method, Uri uri) {
+    // Ignore any fragments on the request URI.
+    uri = uri.removeFragment();
+
     if (method == null) {
       throw new ArgumentError(method);
     }
@@ -1878,8 +1908,9 @@
 
   _ConnectionTarget _getConnectionTarget(String host, int port, bool isSecure) {
     String key = _HttpClientConnection.makeKey(isSecure, host, port);
-    return _connectionTargets.putIfAbsent(
-        key, () => new _ConnectionTarget(key, host, port, isSecure));
+    return _connectionTargets.putIfAbsent(key, () {
+      return new _ConnectionTarget(key, host, port, isSecure, _context);
+    });
   }
 
   // Get a new _HttpClientConnection, from the matching _ConnectionTarget.
@@ -2191,6 +2222,7 @@
 
   static Future<HttpServer> bindSecure(address,
                                        int port,
+                                       SecurityContext context,
                                        int backlog,
                                        bool v6Only,
                                        String certificate_name,
@@ -2199,7 +2231,7 @@
     return SecureServerSocket.bind(
         address,
         port,
-        certificate_name,
+        context,
         backlog: backlog,
         v6Only: v6Only,
         requestClientCertificate: requestClientCertificate,
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index c066b30..b3ca214 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -232,11 +232,12 @@
 part 'platform.dart';
 part 'platform_impl.dart';
 part 'process.dart';
+part 'secure_server_socket.dart';
+part 'secure_socket.dart';
+part 'security_context.dart';
 part 'service_object.dart';
 part 'socket.dart';
 part 'stdio.dart';
 part 'string_transformer.dart';
-part 'secure_socket.dart';
-part 'secure_server_socket.dart';
 part 'websocket.dart';
 part 'websocket_impl.dart';
diff --git a/sdk/lib/io/iolib_sources.gypi b/sdk/lib/io/iolib_sources.gypi
index 96900f7..bb8848c 100644
--- a/sdk/lib/io/iolib_sources.gypi
+++ b/sdk/lib/io/iolib_sources.gypi
@@ -27,11 +27,12 @@
     'platform_impl.dart',
     'process.dart',
     'service_object.dart',
+    'secure_server_socket.dart',
+    'secure_socket.dart',
+    'security_context.dart',
     'socket.dart',
     'stdio.dart',
     'string_transformer.dart',
-    'secure_socket.dart',
-    'secure_server_socket.dart',
     'websocket.dart',
     'websocket_impl.dart',
   ],
diff --git a/sdk/lib/io/secure_server_socket.dart b/sdk/lib/io/secure_server_socket.dart
index c3ce9cf..04ec9e0 100644
--- a/sdk/lib/io/secure_server_socket.dart
+++ b/sdk/lib/io/secure_server_socket.dart
@@ -45,12 +45,6 @@
    *
    * [address] must be given as a numeric address, not a host name.
    *
-   * [certificateName] is the nickname or the distinguished name (DN) of
-   * the certificate in the certificate database. It is looked up in the
-   * NSS certificate database set by SecureSocket.initialize.
-   * If [certificateName] contains "CN=", it is assumed to be a distinguished
-   * name.  Otherwise, it is looked up as a nickname.
-   *
    * To request or require that clients authenticate by providing an SSL (TLS)
    * client certificate, set the optional parameter [requestClientCertificate]
    * or [requireClientCertificate] to true.  Requiring a certificate implies
@@ -70,7 +64,7 @@
   static Future<SecureServerSocket> bind(
       address,
       int port,
-      String certificateName,
+      SecurityContext context,
       {int backlog: 0,
        bool v6Only: false,
        bool requestClientCertificate: false,
@@ -80,7 +74,7 @@
     return RawSecureServerSocket.bind(
         address,
         port,
-        certificateName,
+        context,
         backlog: backlog,
         v6Only: v6Only,
         requestClientCertificate: requestClientCertificate,
@@ -128,21 +122,20 @@
  * See [RawSecureSocket] for more info.
  */
 class RawSecureServerSocket extends Stream<RawSecureSocket> {
-  RawServerSocket _socket;
+  final RawServerSocket _socket;
   StreamController<RawSecureSocket> _controller;
   StreamSubscription<RawSocket> _subscription;
-  final String certificateName;
+  final SecurityContext _context;
   final bool requestClientCertificate;
   final bool requireClientCertificate;
   final List<String> supportedProtocols;
   bool _closed = false;
 
-  RawSecureServerSocket._(RawServerSocket serverSocket,
-                          this.certificateName,
+  RawSecureServerSocket._(this._socket,
+                          this._context,
                           this.requestClientCertificate,
                           this.requireClientCertificate,
                           this.supportedProtocols) {
-    _socket = serverSocket;
     _controller = new StreamController<RawSecureSocket>(
         sync: true,
         onListen: _onSubscriptionStateChange,
@@ -205,7 +198,7 @@
   static Future<RawSecureServerSocket> bind(
       address,
       int port,
-      String certificateName,
+      SecurityContext context,
       {int backlog: 0,
        bool v6Only: false,
        bool requestClientCertificate: false,
@@ -216,7 +209,7 @@
         address, port, backlog: backlog, v6Only: v6Only, shared: shared)
         .then((serverSocket) => new RawSecureServerSocket._(
             serverSocket,
-            certificateName,
+            context,
             requestClientCertificate,
             requireClientCertificate,
             supportedProtocols));
@@ -263,7 +256,7 @@
     _RawSecureSocket.connect(
         connection.address,
         remotePort,
-        certificateName,
+        context: _context,
         is_server: true,
         socket: connection,
         requestClientCertificate: requestClientCertificate,
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 6b36eba..468e1bd 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -18,16 +18,6 @@
    * [host] on port [port]. The returned Future will complete with a
    * [SecureSocket] that is connected and ready for subscription.
    *
-   * If [sendClientCertificate] is set to true, the socket will send a client
-   * certificate if one is requested by the server.
-   *
-   * If [certificateName] is the nickname of a certificate in the certificate
-   * database, that certificate will be sent.
-   *
-   * If [certificateName] is null, which is the usual use case, an
-   * appropriate certificate will be searched for in the database and
-   * sent automatically, based on what the server says it will accept.
-   *
    * [onBadCertificate] is an optional handler for unverifiable certificates.
    * The handler receives the [X509Certificate], and can inspect it and
    * decide (or let the user decide) whether to accept
@@ -37,14 +27,13 @@
   static Future<SecureSocket> connect(
       host,
       int port,
-      {bool sendClientCertificate: false,
-       String certificateName,
+      {SecurityContext context,
        bool onBadCertificate(X509Certificate certificate),
+       bool sendClientCertificate,
        List<String> supportedProtocols}) {
     return RawSecureSocket.connect(host,
                                    port,
-                                   sendClientCertificate: sendClientCertificate,
-                                   certificateName: certificateName,
+                                   context: context,
                                    onBadCertificate: onBadCertificate,
                                    supportedProtocols: supportedProtocols)
         .then((rawSocket) => new SecureSocket._(rawSocket));
@@ -79,8 +68,7 @@
   static Future<SecureSocket> secure(
       Socket socket,
       {host,
-       bool sendClientCertificate: false,
-       String certificateName,
+       SecurityContext context,
        bool onBadCertificate(X509Certificate certificate)}) {
     var completer = new Completer();
     (socket as dynamic)._detachRaw()
@@ -89,7 +77,7 @@
             detachedRaw[0],
             subscription: detachedRaw[1],
             host: host,
-            sendClientCertificate: sendClientCertificate,
+            context: context,
             onBadCertificate: onBadCertificate);
           })
         .then((raw) {
@@ -121,7 +109,7 @@
    */
   static Future<SecureSocket> secureServer(
       Socket socket,
-      String certificateName,
+      SecurityContext context,
       {List<int> bufferedData,
        bool requestClientCertificate: false,
        bool requireClientCertificate: false,
@@ -131,7 +119,7 @@
         .then((detachedRaw) {
           return RawSecureSocket.secureServer(
             detachedRaw[0],
-            certificateName,
+            context,
             subscription: detachedRaw[1],
             bufferedData: bufferedData,
             requestClientCertificate: requestClientCertificate,
@@ -168,52 +156,6 @@
   void renegotiate({bool useSessionCache: true,
                     bool requestClientCertificate: false,
                     bool requireClientCertificate: false});
-
-  /**
-   * Initializes the NSS library. If [initialize] is not called, the library
-   * is automatically initialized as if [initialize] were called with no
-   * arguments. If [initialize] is called more than once, or called after
-   * automatic initialization has happened (when a secure connection is made),
-   * then a TlsException is thrown.
-   *
-   * The optional argument [database] is the path to a certificate database
-   * directory containing root certificates for verifying certificate paths on
-   * client connections, and server certificates to provide on server
-   * connections. The argument [password] should be used when creating
-   * secure server sockets, to allow the private key of the server
-   * certificate to be fetched. If [useBuiltinRoots] is true (the default),
-   * then a built-in set of root certificates for trusted certificate
-   * authorities is merged with the certificates in the database.
-   * The list of built-in root certificates, and documentation about this
-   * default database, is available at
-   * http://www.mozilla.org/projects/security/certs/included/ .
-   *
-   * If the [database] argument is omitted, then only the
-   * builtin root certificates are used. If [useBuiltinRoots] is also false,
-   * then no certificates are available.
-   *
-   * Examples:
-   *   1) Use only the builtin root certificates:
-   *     SecureSocket.initialize(); or
-   *
-   *   2) Use a specified database directory and the builtin roots:
-   *     SecureSocket.initialize(database: 'path/to/my/database',
-   *                             password: 'my_password');
-   *
-   *   3) Use a specified database directory, without builtin roots:
-   *     SecureSocket.initialize(database: 'path/to/my/database',
-   *                             password: 'my_password'.
-   *                             useBuiltinRoots: false);
-   *
-   * The database should be an NSS certificate database directory
-   * containing a cert9.db file, not a cert8.db file.  This version of
-   * the database can be created using the NSS certutil tool with "sql:" in
-   * front of the absolute path of the database directory, or setting the
-   * environment variable [[NSS_DEFAULT_DB_TYPE]] to "sql".
-   */
-  external static void initialize({String database,
-                                   String password,
-                                   bool useBuiltinRoots: true});
 }
 
 
@@ -224,7 +166,7 @@
  * RawSecureServerSocket, also returns RawSecureSocket objects representing
  * the server end of a secure connection.
  * The certificate provided by the server is checked
- * using the certificate database provided in SecureSocket.initialize, and/or
+ * using the trusted certificates set in the SecurityContext object and/or
  * the default built-in root certificates.
  */
 abstract class RawSecureSocket implements RawSocket {
@@ -233,8 +175,9 @@
    * host on the given port. The returned Future is completed with the
    * RawSecureSocket when it is connected and ready for subscription.
    *
-   * The certificate provided by the server is checked using the certificate
-   * database provided in [SecureSocket.initialize], and/or the default built-in
+   * The certificate provided by the server is checked
+   * using the trusted certificates set in the SecurityContext object and/or
+   * the default built-in
    * root certificates. If [sendClientCertificate] is
    * set to true, the socket will send a client certificate if one is
    * requested by the server. If [certificateName] is the nickname of
@@ -252,24 +195,20 @@
   static Future<RawSecureSocket> connect(
       host,
       int port,
-      {bool sendClientCertificate: false,
-       String certificateName,
+      {SecurityContext context,
        bool onBadCertificate(X509Certificate certificate),
        List<String> supportedProtocols}) {
     _RawSecureSocket._verifyFields(
         host,
         port,
-        certificateName,
         false,
         false,
         false,
-        sendClientCertificate,
         onBadCertificate);
     return RawSocket.connect(host, port)
         .then((socket) {
           return secure(socket,
-                        sendClientCertificate: sendClientCertificate,
-                        certificateName: certificateName,
+                        context: context,
                         onBadCertificate: onBadCertificate,
                         supportedProtocols: supportedProtocols);
         });
@@ -307,8 +246,7 @@
       RawSocket socket,
       {StreamSubscription subscription,
        host,
-       bool sendClientCertificate: false,
-       String certificateName,
+       SecurityContext context,
        bool onBadCertificate(X509Certificate certificate),
        List<String> supportedProtocols}) {
     socket.readEventsEnabled = false;
@@ -316,11 +254,10 @@
     return  _RawSecureSocket.connect(
         host != null ? host : socket.address.host,
         socket.port,
-        certificateName,
         is_server: false,
         socket: socket,
         subscription: subscription,
-        sendClientCertificate: sendClientCertificate,
+        context: context,
         onBadCertificate: onBadCertificate,
         supportedProtocols: supportedProtocols);
   }
@@ -350,7 +287,7 @@
    */
   static Future<RawSecureSocket> secureServer(
       RawSocket socket,
-      String certificateName,
+      SecurityContext context,
       {StreamSubscription subscription,
        List<int> bufferedData,
        bool requestClientCertificate: false,
@@ -361,7 +298,7 @@
     return _RawSecureSocket.connect(
         socket.address,
         socket.remotePort,
-        certificateName,
+        context: context,
         is_server: true,
         socket: socket,
         subscription: subscription,
@@ -402,15 +339,13 @@
  * X509Certificate represents an SSL certificate, with accessors to
  * get the fields of the certificate.
  */
-class X509Certificate {
-  X509Certificate(this.subject,
-                  this.issuer,
-                  this.startValidity,
-                  this.endValidity);
-  final String subject;
-  final String issuer;
-  final DateTime startValidity;
-  final DateTime endValidity;
+abstract class X509Certificate {
+  external factory X509Certificate._();
+
+  String get subject;
+  String get issuer;
+  DateTime get startValidity;
+  DateTime get endValidity;
 }
 
 
@@ -456,10 +391,9 @@
   int _bufferedDataIndex = 0;
   final InternetAddress address;
   final bool is_server;
-  final String certificateName;
+  SecurityContext context;
   final bool requestClientCertificate;
   final bool requireClientCertificate;
-  final bool sendClientCertificate;
   final Function onBadCertificate;
 
   var _status = HANDSHAKE;
@@ -484,8 +418,8 @@
   static Future<_RawSecureSocket> connect(
       host,
       int requestedPort,
-      String certificateName,
       {bool is_server,
+       SecurityContext context,
        RawSocket socket,
        StreamSubscription subscription,
        List<int> bufferedData,
@@ -494,22 +428,21 @@
        bool sendClientCertificate: false,
        bool onBadCertificate(X509Certificate certificate),
        List<String> supportedProtocols}) {
-    _verifyFields(host, requestedPort, certificateName, is_server,
+    _verifyFields(host, requestedPort, is_server,
                  requestClientCertificate, requireClientCertificate,
-                 sendClientCertificate, onBadCertificate);
+                 onBadCertificate);
     if (host is InternetAddress) host = host.host;
     var address = socket.address;
     if (host != null) address =  address._cloneWithNewHost(host);
     return new _RawSecureSocket(address,
                                 requestedPort,
-                                certificateName,
                                 is_server,
+                                context,
                                 socket,
                                 subscription,
                                 bufferedData,
                                 requestClientCertificate,
                                 requireClientCertificate,
-                                sendClientCertificate,
                                 onBadCertificate,
                                 supportedProtocols)
         ._handshakeComplete.future;
@@ -518,16 +451,18 @@
   _RawSecureSocket(
       this.address,
       int requestedPort,
-      this.certificateName,
       this.is_server,
+      this.context,
       RawSocket this._socket,
       this._socketSubscription,
       this._bufferedData,
       this.requestClientCertificate,
       this.requireClientCertificate,
-      this.sendClientCertificate,
       this.onBadCertificate(X509Certificate certificate),
       List<String> supportedProtocols) {
+    if (context == null) {
+      context = SecurityContext.defaultContext;
+    }
     _controller = new StreamController<RawSocketEvent>(
         sync: true,
         onListen: _onSubscriptionStateChange,
@@ -570,144 +505,24 @@
           ..onDone(_doneHandler);
     }
     try {
+      var encodedProtocols =
+          SecurityContext._protocolsToLengthEncoding(supportedProtocols);
       _secureFilter.connect(address.host,
-                            (address as dynamic)._in_addr,
-                            port,
+                            context,
                             is_server,
-                            certificateName,
                             requestClientCertificate ||
                                 requireClientCertificate,
                             requireClientCertificate,
-                            sendClientCertificate,
-                            _protocolsToLengthEncoding(supportedProtocols));
+                            // TODO(whesse): Remove sendClientCertificate
+                            // argument, or add it to API.
+                            false, // sendClientCertificate,
+                            encodedProtocols);
       _secureHandshake();
     } catch (e, s) {
       _reportError(e, s);
     }
   }
 
-  /// Encodes a set of supported protocols for ALPN/NPN usage.
-  ///
-  /// The `protocols` list is expected to contain protocols in descending order
-  /// of preference.
-  ///
-  /// See RFC 7301 (https://tools.ietf.org/html/rfc7301) for the encoding of
-  /// `List<String> protocols`:
-  ///     opaque ProtocolName<1..2^8-1>;
-  ///
-  ///     struct {
-  ///         ProtocolName protocol_name_list<2..2^16-1>
-  ///     } ProtocolNameList;
-  ///
-  /// The encoding of the opaque `ProtocolName<lower..upper>` vector is
-  /// described in RFC 2246: 4.3 Vectors.
-  ///
-  /// Note: Even though this encoding scheme would allow a total
-  /// `ProtocolNameList` length of 65535, this limit cannot be reached. Testing
-  /// showed that more than ~ 65480 bytes will fail to negogiate a protocol.
-  /// We will be conservative and support only messages up to (1<<15) -1 bytes.
-  ///
-  /// Our NSS implementation will support ALPN and NPN transparently. The
-  /// default protocol will be the first in the encoded Uint8List.
-  ///
-  /// NOTE: The NSS library will treat the first protocol as the fallback
-  /// protocol. The remaining ones are sorted in (decreasing) priority order.
-  /// We therefore put the protocol least desired to the front, to make it the
-  /// default.
-  Uint8List _protocolsToLengthEncoding(List<String> protocols) {
-    if (protocols == null || protocols.length == 0) {
-      return new Uint8List(0);
-    }
-    int protocolsLength = protocols.length;
-
-    // Calculate the number of bytes we will need if it is ASCII.
-    int expectedLength = protocolsLength;
-    for (int i = 0; i < protocolsLength; i++) {
-      int length = protocols[i].length;
-      if (length > 0 && length <= 255) {
-        expectedLength += length;
-      } else {
-        throw new ArgumentError(
-            'Length of protocol must be between 1 and 255 (was: $length).');
-      }
-    }
-
-    if (expectedLength >= (1 << 15)) {
-      throw new ArgumentError(
-          'The maximum message length supported is 2^15-1.');
-    }
-
-    // Try encoding the `List<String> protocols` array using fast ASCII path.
-    var bytes = new Uint8List(expectedLength);
-    int bytesOffset = 0;
-    for (int i = 0; i < protocolsLength; i++) {
-      // The last protocol will be encoded as the first/default one in the list.
-      // (i.e. rotate `protocols` by 1 to the right).
-      int index = i;
-      if (index == 0) index = protocols.length;
-      String proto = protocols[index - 1];
-
-      // Add length byte.
-      bytes[bytesOffset++] = proto.length;
-      int bits = 0;
-
-      // Add protocol bytes.
-      for (int j = 0; j < proto.length; j++) {
-        var char = proto.codeUnitAt(j);
-        bits |= char;
-        bytes[bytesOffset++] = char & 0xff;
-      }
-
-      // Go slow case if we have encountered anything non-ascii.
-      if (bits > 0x7f) {
-        return _protocolsToLengthEncodingNonAsciiBailout(protocols);
-      }
-    }
-    return bytes;
-  }
-
-  Uint8List _protocolsToLengthEncodingNonAsciiBailout(List<String> protocols) {
-    void addProtocol(List<int> outBytes, String protocol) {
-      var protocolBytes = UTF8.encode(protocol);
-      var len = protocolBytes.length;
-
-      if (len > 255) {
-        throw new ArgumentError(
-            'Length of protocol must be between 1 and 255 (was: $len)');
-      }
-      // Add length byte.
-      outBytes.add(len);
-
-      // Add protocol bytes.
-      outBytes.addAll(protocolBytes);
-    }
-
-    List<int> bytes = [];
-    addProtocol(bytes, protocols.last);
-    for (var i = 0; i < protocols.length -1; i++) {
-      addProtocol(bytes, protocols[i]);
-    }
-
-    if (bytes.length >= (1 << 15)) {
-      throw new ArgumentError(
-          'The maximum message length supported is 2^15-1.');
-    }
-
-    return new Uint8List.fromList(bytes);
-  }
-
-  void _addProtocolBytes(List<int> outBytes, String protocol) {
-    var protocolBytes = UTF8.encode(protocol);
-    var len = protocolBytes.length;
-
-    if (len > 255) {
-      throw new ArgumentError(
-          'Cannot support protocols with more than 255 characters');
-    }
-    outBytes.add(len);
-    outBytes.addAll(protocolBytes);
-  }
-
   StreamSubscription listen(void onData(RawSocketEvent data),
                             {Function onError,
                              void onDone(),
@@ -721,11 +536,9 @@
 
   static void _verifyFields(host,
                             int requestedPort,
-                            String certificateName,
                             bool is_server,
                             bool requestClientCertificate,
                             bool requireClientCertificate,
-                            bool sendClientCertificate,
                             Function onBadCertificate) {
     if (host is! String && host is! InternetAddress) {
       throw new ArgumentError("host is not a String or an InternetAddress");
@@ -736,21 +549,12 @@
     if (requestedPort < 0 || requestedPort > 65535) {
       throw new ArgumentError("requestedPort is not in the range 0..65535");
     }
-    if (certificateName != null && certificateName is! String) {
-      throw new ArgumentError("certificateName is not null or a String");
-    }
-    if (certificateName == null && is_server) {
-      throw new ArgumentError("certificateName is null on a server");
-    }
     if (requestClientCertificate is! bool) {
       throw new ArgumentError("requestClientCertificate is not a bool");
     }
     if (requireClientCertificate is! bool) {
       throw new ArgumentError("requireClientCertificate is not a bool");
     }
-    if (sendClientCertificate is! bool) {
-      throw new ArgumentError("sendClientCertificate is not a bool");
-    }
     if (onBadCertificate != null && onBadCertificate is! Function) {
       throw new ArgumentError("onBadCertificate is not null or a Function");
     }
@@ -891,7 +695,7 @@
     if (onBadCertificate == null) return false;
     var result = onBadCertificate(certificate);
     if (result is bool) return result;
-    throw new ArgumentError(
+    throw new HandshakeException(
         "onBadCertificate callback returned non-boolean $result");
   }
 
@@ -1360,10 +1164,8 @@
   external factory _SecureFilter();
 
   void connect(String hostName,
-               Uint8List addr,
-               int port,
+               SecurityContext context,
                bool is_server,
-               String certificateName,
                bool requestClientCertificate,
                bool requireClientCertificate,
                bool sendClientCertificate,
diff --git a/sdk/lib/io/security_context.dart b/sdk/lib/io/security_context.dart
new file mode 100644
index 0000000..47234ff
--- /dev/null
+++ b/sdk/lib/io/security_context.dart
@@ -0,0 +1,184 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.io;
+
+/**
+ * The object containing the certificates to trust when making
+ * a secure client connection, and the certificate chain and
+ * private key to serve from a secure server.
+ * 
+ * The [SecureSocket]  and [SecureServer] classes take a SecurityContext
+ * as an argument to their connect and bind methods.
+ *
+ * Certificates and keys can be added to a SecurityContext from PEM files
+ * on the disk.  A PEM file contains one or more base-64 encoded DER-serialized
+ * ASN1 objects, surrounded with delimiter strings like
+ * "-----BEGIN CERTIFICATE -----" and "-----END CERTIFICATE-----".
+ * Distinguished encoding rules (DER) is a canonical binary serialization
+ * of ASN1 objects into an octet string.
+ */
+abstract class SecurityContext {
+  external factory SecurityContext();
+  external static SecurityContext get defaultContext;
+
+  /**
+   * Sets the private key for a server certificate or client certificate.
+   * A secure connection using this SecurityContext will use this key with
+   * the server or client certificate to sign and decrypt messages.
+   * [keyFile] is a PEM file containing an encrypted
+   * private key, encrypted with [password].  An unencrypted file can be
+   * used, but this is not usual.
+   */
+  void usePrivateKey(String keyFile, {String password});
+
+  /**
+   * Sets the set of trusted X509 certificates used by [SecureSocket]
+   * client connections, when connecting to a secure server.
+   *
+   * There are two ways to set a set of trusted certificates, with a single
+   * PEM file, or with a directory containing individual PEM files for
+   * certificates.
+   *
+   * [file] is an optional PEM file containing X509 certificates, usually
+   * root certificates from certificate authorities.
+   *
+   * [directory] is an optional directory containing PEM files.  The directory
+   * must also have filesystem links added, which link extra filenames based
+   * on the hash of a certificate's distinguished name (DN) to the file
+   * containing that certificate. OpenSSL contains a tool called c_rehash
+   * to create these links in a directory.
+   */
+  void setTrustedCertificates({String file, String directory});
+
+  /**
+   * Sets the chain of X509 certificates served by [SecureServer]
+   * when making secure connections, including the server certificate.
+   * [file] is an PEM file containing X509 certificates, starting with
+   * the root authority and intermediate authorities forming the signed
+   * chain to the server certificate, and ending with the server certificate.
+   * The private key for the server certificate is set by [usePrivateKey].
+   */
+  void useCertificateChain(String file);
+
+  /**
+   * Sets the list of authority names that a [SecureServer] will advertise
+   * as accepted, when requesting a client certificate from a connecting
+   * client.  [file] is a PEM file containing the accepted signing authority
+   * certificates - the authority names are extracted from the certificates.
+   */
+  void setClientAuthorities(String file);
+
+  /**
+   * Sets the list of application-level protocols supported by a client
+   * connection or server connection. The ALPN (application level protocol
+   * negotiation) extension to TLS allows a client to send a list of
+   * protocols in the TLS client hello message, and the server to pick
+   * one and send the selected one back in its server hello message.
+   *
+   * Separate lists of protocols can be sent for client connections and
+   * for server connections, using the same SecurityContext.  The [isServer]
+   * boolean argument specifies whether to set the list for server connections
+   * or client connections.
+   */
+   void setAlpnProtocols(List<String> protocols, bool isServer);
+
+  /// Encodes a set of supported protocols for ALPN/NPN usage.
+  ///
+  /// The `protocols` list is expected to contain protocols in descending order
+  /// of preference.
+  ///
+  /// See RFC 7301 (https://tools.ietf.org/html/rfc7301) for the encoding of
+  /// `List<String> protocols`:
+  ///     opaque ProtocolName<1..2^8-1>;
+  ///
+  ///     struct {
+  ///         ProtocolName protocol_name_list<2..2^16-1>
+  ///     } ProtocolNameList;
+  ///
+  /// The encoding of the opaque `ProtocolName<lower..upper>` vector is
+  /// described in RFC 2246: 4.3 Vectors.
+  ///
+  /// Note: Even though this encoding scheme would allow a total
+  /// `ProtocolNameList` length of 65535, this limit cannot be reached. Testing
+  /// showed that more than ~ 2^14  bytes will fail to negotiate a protocol.
+  /// We will be conservative and support only messages up to (1<<13)-1 bytes.
+  static Uint8List _protocolsToLengthEncoding(List<String> protocols) {
+    if (protocols == null || protocols.length == 0) {
+      return new Uint8List(0);
+    }
+    int protocolsLength = protocols.length;
+
+    // Calculate the number of bytes we will need if it is ASCII.
+    int expectedLength = protocolsLength;
+    for (int i = 0; i < protocolsLength; i++) {
+      int length = protocols[i].length;
+      if (length > 0 && length <= 255) {
+        expectedLength += length;
+      } else {
+        throw new ArgumentError(
+            'Length of protocol must be between 1 and 255 (was: $length).');
+      }
+    }
+
+    if (expectedLength >= (1 << 13)) {
+      throw new ArgumentError(
+          'The maximum message length supported is 2^13-1.');
+    }
+
+    // Try encoding the `List<String> protocols` array using fast ASCII path.
+    var bytes = new Uint8List(expectedLength);
+    int bytesOffset = 0;
+    for (int i = 0; i < protocolsLength; i++) {
+      String proto = protocols[i];
+
+      // Add length byte.
+      bytes[bytesOffset++] = proto.length;
+      int bits = 0;
+
+      // Add protocol bytes.
+      for (int j = 0; j < proto.length; j++) {
+        var char = proto.codeUnitAt(j);
+        bits |= char;
+        bytes[bytesOffset++] = char & 0xff;
+      }
+
+      // Go slow case if we have encountered anything non-ascii.
+      if (bits > 0x7f) {
+        return _protocolsToLengthEncodingNonAsciiBailout(protocols);
+      }
+    }
+    return bytes;
+  }
+
+  static Uint8List _protocolsToLengthEncodingNonAsciiBailout(
+      List<String> protocols) {
+    void addProtocol(List<int> outBytes, String protocol) {
+      var protocolBytes = UTF8.encode(protocol);
+      var len = protocolBytes.length;
+
+      if (len > 255) {
+        throw new ArgumentError(
+            'Length of protocol must be between 1 and 255 (was: $len)');
+      }
+      // Add length byte.
+      outBytes.add(len);
+
+      // Add protocol bytes.
+      outBytes.addAll(protocolBytes);
+    }
+
+    List<int> bytes = [];
+    for (var i = 0; i < protocols.length; i++) {
+      addProtocol(bytes, protocols[i]);
+    }
+
+    if (bytes.length >= (1 << 13)) {
+      throw new ArgumentError(
+          'The maximum message length supported is 2^13-1.');
+    }
+
+    return new Uint8List.fromList(bytes);
+  }
+}
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 8c2b86e..d239ef2 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -485,6 +485,10 @@
    * is also possible to send object instances (which would be copied in the
    * process). This is currently only supported by the dartvm.  For now, the
    * dart2js compiler only supports the restricted messages described above.
+   *
+   * The send happens immediately and doesn't block.  The corresponding receive
+   * port can receive the message as soon as its isolate's event loop is ready
+   * to deliver it, independently of what the sending isolate is doing.
    */
   void send(var message);
 
diff --git a/site/try/poi/poi.dart b/site/try/poi/poi.dart
index e86bfc5..d523f80 100644
--- a/site/try/poi/poi.dart
+++ b/site/try/poi/poi.dart
@@ -26,11 +26,13 @@
 
 import 'package:compiler/compiler.dart' as api;
 
-import 'package:compiler/src/dart2jslib.dart' show
-    Compiler,
-    CompilerTask,
-    Enqueuer,
-    QueueFilter,
+import 'package:compiler/src/compiler.dart' show
+    Compiler;
+
+import 'package:compiler/src/common/tasks.dart' show
+    CompilerTask;
+
+import 'package:compiler/src/common/work.dart' show
     WorkItem;
 
 import 'package:compiler/src/elements/visitor.dart' show
@@ -51,6 +53,10 @@
 import 'package:compiler/src/elements/modelx.dart' show
     DeclarationSite;
 
+import 'package:compiler/src/enqueue.dart' show
+    Enqueuer,
+    QueueFilter;
+
 import 'package:compiler/src/dart_types.dart' show
     DartType;
 
diff --git a/site/try/poi/scope_information_visitor.dart b/site/try/poi/scope_information_visitor.dart
index fa4572d..c9d2af0 100644
--- a/site/try/poi/scope_information_visitor.dart
+++ b/site/try/poi/scope_information_visitor.dart
@@ -13,7 +13,7 @@
 import 'package:compiler/src/elements/visitor.dart' show
     BaseElementVisitor;
 
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/compiler.dart' show
     Compiler;
 
 import 'package:compiler/src/elements/elements.dart' show
diff --git a/site/try/src/compiler_isolate.dart b/site/try/src/compiler_isolate.dart
index 810de41..ea82650 100644
--- a/site/try/src/compiler_isolate.dart
+++ b/site/try/src/compiler_isolate.dart
@@ -19,7 +19,7 @@
 import 'package:dart2js_incremental/dart2js_incremental.dart' show
     reuseCompiler, OutputProvider;
 
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/compiler.dart' show
     Compiler;
 
 const bool THROW_ON_ERROR = false;
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 3434fcf..0d1832d 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -3,6 +3,7 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dart2js ]
+Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Issue 1533 (int/double related)
 Language/03_Overview/1_Scoping_A02_t05: CompileTimeError # Issue 21072
 Language/03_Overview/1_Scoping_A02_t06: CompileTimeError # Issue 21072
 Language/03_Overview/1_Scoping_A02_t28: fail # Issue 21092 and co19 issue 713
@@ -240,7 +241,6 @@
 LibTest/core/List/List_class_A01_t01: Pass, Timeout
 
 [ $compiler == dart2js && $runtime == jsshell ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Issue 21198 (int/double related)
 LibTest/async/Future/Future.delayed_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
 LibTest/async/Future/Future.delayed_A03_t01: fail # Issue 7728, timer not supported in jsshell
 LibTest/async/Future/wait_A01_t07: RuntimeError # Issue 7728, timer not supported in jsshell
@@ -321,7 +321,6 @@
 
 [ $compiler == dart2js && $runtime == d8 ]
 LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: fail # co19-roll r587: Please triage this failure
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Issue 21198 (int/double related)
 LibTest/typed_data/Int32x4/operator_OR_A01_t01: RuntimeError # Issue 7728, timer not supported in jsshell
 
 [ $compiler == dart2js && $runtime == d8 && $system == windows ]
@@ -528,7 +527,6 @@
 #
 
 [ $compiler == dart2js && $runtime == chromeOnAndroid ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure.
 Language/12_Expressions/05_Strings_A06_t01: Pass, Slow # Please triage this failure.
 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: Fail # Issue 22200.
 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t05: Fail # Issue 22200.
@@ -558,7 +556,6 @@
 LibTest/typed_data/Uint8ClampedList/map_A02_t01: Pass, Slow # Please triage this failure.
 
 [ $compiler == dart2js && $runtime == chrome ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError # Please triage this failure
@@ -1548,7 +1545,6 @@
 LayoutTests/fast/text/text-combine-shrink-to-fit_t01: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == ff ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 Language/12_Expressions/28_Postfix_Expressions_A07_t02: Skip # Times out. Please triage this failure
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
@@ -1906,7 +1902,6 @@
 LayoutTests/fast/css/link-alternate-stylesheet-4_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/link-alternate-stylesheet-5_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/link-disabled-attr-parser_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/css/list-item-text-align_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/margin-start-end_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/max-device-aspect-ratio_t01: Pass, RuntimeError # Please triage this failure
 LayoutTests/fast/css/media-query-recovery_t01: RuntimeError # Please triage this failure
@@ -2146,7 +2141,6 @@
 LayoutTests/fast/dom/client-width-height-quirks_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/containerNode_t01: Skip # Times out. Please triage this failure
 LayoutTests/fast/dom/css-delete-doc_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-rule-functions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-selectorText_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/css-shortHands_t01: RuntimeError # Please triage this failure
@@ -2474,7 +2468,6 @@
 LayoutTests/fast/forms/textarea-maxlength_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-no-scroll-on-blur_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-paste-newline_t01: RuntimeError # Please triage this failure
-LayoutTests/fast/forms/textarea-rows-cols_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-set-defaultvalue-after-value_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textarea-trailing-newline_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/forms/textfield-clone_t01: RuntimeError # Please triage this failure
@@ -3075,6 +3068,7 @@
 LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/surroundContents-check-boundary-points_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/Range/surroundContents-for-detached-node_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/encoding/css-charset-dom_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/insertAdjacentElement_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/insertAllBefore_A01_t01: RuntimeError # Please triage this failure
 LibTest/html/Element/insertAllBefore_A02_t01: RuntimeError # Please triage this failure
@@ -3097,16 +3091,18 @@
 [ $compiler == dart2js && $runtime == ff && $system != windows ]
 LayoutTests/fast/canvas/canvas-resetTransform_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/canvas/canvas-setTransform_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/css/list-item-text-align_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css/parsing-object-fit_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-style_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/dom/css-mediarule-functions_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/MutationObserver/observe-options-attributes_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/dom/MutationObserver/observe-options-character-data_t01: RuntimeError # Please triage this failure
+LayoutTests/fast/forms/textarea-rows-cols_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/table/incorrect-colgroup-span-values_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/xmlhttprequest/xmlhttprequest-responsetype-before-open_t01: RuntimeError # Please triage this failure
 LibTest/html/HttpRequest/responseType_A01_t02: RuntimeError # Please triage this failure
 
 [ $compiler == dart2js && $runtime == safari ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError # Please triage this failure
@@ -4355,7 +4351,6 @@
 WebPlatformTest/webstorage/storage_session_setitem_t01: Skip # Times out. Please triage this failure
 
 [ $compiler == dart2js && $runtime == safarimobilesim ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-justify-self_t01: RuntimeError # Please triage this failure
@@ -5681,7 +5676,6 @@
 LayoutTests/fast/table/hittest-tablecell-with-borders-bottom-edge_t01: RuntimeError, Pass # Issue 22752. Please triage this failure.
 
 [ $compiler == dart2js && $runtime == ie10 ]
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 Language/12_Expressions/17_Getter_Invocation_A03_t02: Skip # Times out. Please triage this failure
 LayoutTests/fast/alignment/parse-align-items_t01: RuntimeError # Please triage this failure
 LayoutTests/fast/alignment/parse-align-self_t01: RuntimeError # Please triage this failure
@@ -7710,7 +7704,6 @@
 [ $compiler == dart2js && $runtime == ie11 ]
 Language/05_Variables/05_Variables_A14_t07: Skip # Times out. Please triage this failure
 Language/06_Functions/2_Formal_Parameters_A02_t01: Skip # Times out. Please triage this failure
-Language/12_Expressions/00_Object_Identity/1_Object_Identity_A05_t02: RuntimeError # Please triage this failure
 Language/12_Expressions/19_Conditional_A06_t04: Skip # Times out. Please triage this failure
 Language/12_Expressions/30_Identifier_Reference_A10_t02: Skip # Times out. Please triage this failure
 Language/13_Statements/03_Variable_Declaration_A01_t18: Skip # Times out. Please triage this failure
@@ -9586,6 +9579,7 @@
 Language/13_Statements/14_Continue_A02_t13: Crash # (switch (2){case 2:continue L;L:case 1:flag=true;}): continue to a labeled switch case
 Language/15_Types/4_Interface_Types_A12_t09: RuntimeError # Please triage this failure.
 LibTest/async/DeferredLibrary/DeferredLibrary_A01_t01: Crash # (lazy.method()): deferred access is not implemented
+LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Timeout
 LibTest/core/Invocation/isAccessor_A01_t01: Crash # Class 'PartialMethodElement' has no instance getter 'initializer'.
 LibTest/core/Invocation/isGetter_A01_t01: RuntimeError # Please triage this failure.
 LibTest/core/Invocation/isGetter_A01_t02: RuntimeError # Please triage this failure.
@@ -9599,30 +9593,3 @@
 LibTest/core/Symbol/Symbol_A01_t05: RuntimeError # Please triage this failure.
 LibTest/core/double/INFINITY_A01_t04: Pass # Please triage this failure.
 LibTest/core/double/NEGATIVE_INFINITY_A01_t04: Pass # Please triage this failure.
-LibTest/typed_data/Float32List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Float32List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Float32List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Float64List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Float64List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Float64List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int16List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int16List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int16List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int32List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int32List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int32List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int8List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int8List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Int8List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint16List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint16List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint16List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint32List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint32List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint32List/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8ClampedList/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8ClampedList/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8ClampedList/setRange_A02_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8List/setAll_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8List/setRange_A01_t01: RuntimeError # this.get$length is not a function
-LibTest/typed_data/Uint8List/setRange_A02_t01: RuntimeError # this.get$length is not a function
diff --git a/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart b/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart
new file mode 100644
index 0000000..ac72614
--- /dev/null
+++ b/tests/compiler/dart2js/analyze_dart2js_helpers_test.dart
@@ -0,0 +1,235 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.analyze_helpers.test;
+
+import 'dart:io';
+
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/compiler_new.dart' show
+    Diagnostic;
+import 'package:compiler/src/apiimpl.dart' show
+    Compiler;
+import 'package:compiler/src/constants/expressions.dart' show
+    ConstructedConstantExpression;
+import 'package:compiler/src/dart_types.dart' show
+    InterfaceType;
+import 'package:compiler/src/diagnostics/source_span.dart' show
+    SourceSpan;
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/filenames.dart' show
+    nativeToUriPath;
+import 'package:compiler/src/resolution/semantic_visitor.dart';
+import 'package:compiler/src/resolution/tree_elements.dart' show
+    TreeElements;
+import 'package:compiler/src/source_file_provider.dart' show
+    FormattingDiagnosticHandler;
+import 'package:compiler/src/tree/tree.dart';
+import 'package:compiler/src/universe/universe.dart' show
+    CallStructure;
+import 'package:expect/expect.dart';
+
+import 'memory_compiler.dart';
+
+main(List<String> arguments) {
+  bool verbose = arguments.contains('-v');
+
+  List<String> options = <String>[
+    '--analyze-only',
+    '--analyze-main',
+    '--categories=Client,Server'];
+  if (verbose) {
+    options.add('--verbose');
+  }
+  asyncTest(() async {
+    Compiler compiler = compilerFor(
+        options: options, showDiagnostics: verbose);
+    FormattingDiagnosticHandler diagnostics =
+        new FormattingDiagnosticHandler(compiler.provider);
+    HelperAnalyzer analyzer = new HelperAnalyzer(diagnostics);
+    Directory dir =
+        new Directory.fromUri(Uri.base.resolve('pkg/compiler/lib/'));
+    for (FileSystemEntity entity in dir.listSync(recursive: true)) {
+      if (entity is File && entity.path.endsWith('.dart')) {
+        Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
+        if (verbose) {
+          print('---- analyzing $file ----');
+        }
+        LibraryElement library = await compiler.analyzeUri(file);
+        if (library != null) {
+          library.forEachLocalMember((Element element) {
+            if (element is ClassElement) {
+              element.forEachLocalMember((AstElement member) {
+                analyzer.analyze(member.resolvedAst);
+              });
+            } else if (element is MemberElement) {
+              analyzer.analyze(element.resolvedAst);
+            }
+          });
+        }
+      }
+    }
+    Expect.isTrue(analyzer.errors.isEmpty, "Errors found.");
+  });
+}
+
+class HelperAnalyzer extends TraversalVisitor {
+  final FormattingDiagnosticHandler diagnostics;
+  List<SourceSpan> errors = <SourceSpan>[];
+
+  ResolvedAst resolvedAst;
+
+  @override
+  TreeElements get elements => resolvedAst.elements;
+
+  AnalyzableElement get analyzedElement => resolvedAst.element;
+
+  HelperAnalyzer(this.diagnostics) : super(null);
+
+  @override
+  void apply(Node node, [_]) {
+    node.accept(this);
+  }
+
+  void analyze(ResolvedAst resolvedAst) {
+    if (resolvedAst.node == null) {
+      // Skip synthesized members.
+      return;
+    }
+    this.resolvedAst = resolvedAst;
+    apply(resolvedAst.node);
+    this.resolvedAst = null;
+  }
+
+  bool isHelper(Element element) {
+    Uri uri = element.library.canonicalUri;
+    return uri.path.endsWith('src/helpers/helpers.dart');
+  }
+
+  void checkAccess(Node node, MemberElement element) {
+    if (isHelper(element) && !isHelper(analyzedElement)) {
+      Uri uri = analyzedElement.implementation.sourcePosition.uri;
+      SourceSpan span = new SourceSpan.fromNode(uri, node);
+      diagnostics.report(null, span.uri, span.begin, span.end,
+          "Helper used in production code.",
+          Diagnostic.ERROR);
+      errors.add(span);
+    }
+  }
+
+  @override
+  void visitTopLevelFieldInvoke(
+      Send node,
+      FieldElement field,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, field);
+    apply(arguments);
+  }
+
+  @override
+  void visitTopLevelGetterInvoke(
+      Send node,
+      GetterElement getter,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, getter);
+    apply(arguments);
+  }
+
+  @override
+  void visitTopLevelFunctionInvoke(
+      Send node,
+      MethodElement method,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, method);
+    apply(arguments);
+  }
+
+  @override
+  void visitTopLevelFieldGet(
+      Send node,
+      FieldElement field,
+      _) {
+    checkAccess(node, field);
+  }
+
+  @override
+  void visitTopLevelGetterGet(
+      Send node,
+      GetterElement getter,
+      _) {
+    checkAccess(node, getter);
+  }
+
+  @override
+  void visitTopLevelFunctionGet(
+      Send node,
+      MethodElement method,
+      _) {
+    checkAccess(node, method);
+  }
+
+  @override
+  void visitGenerativeConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, constructor);
+    apply(arguments);
+  }
+
+  @override
+  void visitRedirectingGenerativeConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, constructor);
+    apply(arguments);
+  }
+
+  @override
+  void visitFactoryConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, constructor);
+    apply(arguments);
+  }
+
+  @override
+  void visitRedirectingFactoryConstructorInvoke(
+      NewExpression node,
+      ConstructorElement constructor,
+      InterfaceType type,
+      ConstructorElement effectiveTarget,
+      InterfaceType effectiveTargetType,
+      NodeList arguments,
+      CallStructure callStructure,
+      _) {
+    checkAccess(node, constructor);
+    apply(arguments);
+  }
+
+  @override
+  void visitConstConstructorInvoke(
+      NewExpression node,
+      ConstructedConstantExpression constant,
+      _) {
+    checkAccess(node, constant.target);
+  }
+}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/analyze_dart2js_test.dart b/tests/compiler/dart2js/analyze_dart2js_test.dart
index 5fb720d..602f904 100644
--- a/tests/compiler/dart2js/analyze_dart2js_test.dart
+++ b/tests/compiler/dart2js/analyze_dart2js_test.dart
@@ -4,7 +4,6 @@
 
 library analyze_dart2js;
 
-import "package:expect/expect.dart";
 import 'package:compiler/src/filenames.dart';
 import 'analyze_helper.dart';
 import "package:async_helper/async_helper.dart";
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index 3ed51d4..ccd9b3b 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -8,8 +8,8 @@
 import 'dart:io';
 import 'package:compiler/compiler.dart' as api;
 import 'package:compiler/src/apiimpl.dart';
-import 'package:compiler/src/dart2jslib.dart'
-    hide Compiler;
+import 'package:compiler/src/diagnostics/messages.dart' show
+    Message;
 import 'package:compiler/src/filenames.dart';
 import 'package:compiler/src/source_file_provider.dart';
 import 'package:compiler/src/util/uri_extras.dart';
diff --git a/tests/compiler/dart2js/analyze_only_test.dart b/tests/compiler/dart2js/analyze_only_test.dart
index ff28085..bb42728 100644
--- a/tests/compiler/dart2js/analyze_only_test.dart
+++ b/tests/compiler/dart2js/analyze_only_test.dart
@@ -12,7 +12,7 @@
 import '../../utils/dummy_compiler_test.dart' as dummy;
 import 'package:compiler/compiler.dart';
 
-import 'package:compiler/src/warnings.dart' show
+import 'package:compiler/src/diagnostics/messages.dart' show
     MessageKind, MessageTemplate;
 
 import 'output_collector.dart';
diff --git a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
index dc2aeef..8c68b18 100644
--- a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
+++ b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
@@ -6,7 +6,8 @@
 
 import 'package:async_helper/async_helper.dart';
 
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
 import 'package:compiler/src/filenames.dart';
 
 import 'analyze_helper.dart';
@@ -28,16 +29,15 @@
   "lib/src/resolution/semantic_visitor.dart": const [
       "The method 'error"],
   "lib/src/resolution/semantic_visitor_mixins.dart": const [
-      "The class 'Base", "The method 'error", "The method 'visit"],
+      "The class 'SuperBulkMixin'",
+      "The class 'Base",
+      "The method 'error",
+      "The method 'visit"],
 
   // Uncalled type predicate.  Keep while related predicates are used.
   "lib/src/ssa/nodes.dart": const [
       "The method 'isArray' is never called"],
 
-  // Method in abstract class. Currently only instantiated trough tests.
-  "lib/src/constants/expressions.dart": const [
-      "The method 'readFromEnvironment' is never called"],
-
   // Serialization code is only used in test.
   "lib/src/serialization/": const [
       "is never"],
@@ -55,9 +55,16 @@
     "accept", "CreateFunction",
   ],
 
-  "/lib/src/dart_backend/backend_ast_to_frontend_ast.dart": const [
+  "lib/src/dart_backend/backend_ast_to_frontend_ast.dart": const [
     " is never "
   ],
+
+  // Useful utility functions that are not currently used.
+  "lib/src/cps_ir/cps_fragment.dart": const [
+    "The method 'beginLoop' is never called.",
+    "The method 'continueLoop' is never called.",
+    "The method 'invokeMethod' is never called.",
+  ],
 };
 
 void main() {
diff --git a/tests/compiler/dart2js/async_await_js_transform_test.dart b/tests/compiler/dart2js/async_await_js_transform_test.dart
index 863f1c8..d0f4c85 100644
--- a/tests/compiler/dart2js/async_await_js_transform_test.dart
+++ b/tests/compiler/dart2js/async_await_js_transform_test.dart
@@ -7,8 +7,6 @@
 import "package:compiler/src/js/rewrite_async.dart";
 import "package:compiler/src/js_backend/js_backend.dart" show StringBackedName;
 
-import "backend_dart/dart_printer_test.dart" show PrintDiagnosticListener;
-
 void testTransform(String source, String expected, AsyncRewriterBase rewriter) {
   Fun fun = js(source);
   Fun rewritten = rewriter.rewrite(fun);
@@ -27,6 +25,7 @@
       null,
       asyncHelper: new VariableUse("thenHelper"),
       newCompleter: new VariableUse("Completer"),
+      wrapBody: new VariableUse("_wrapJsFunctionForAsync"),
       safeVariableName: (String name) => "__$name",
       bodyName: new StringBackedName("body")));
 }
@@ -44,6 +43,52 @@
 }
 
 main() {
+  testAsyncTransform(  /// 01: ok
+r"""function() async {
+  var closures = [new A.main_closure()], v0 = await closures, v1 = 0, v2, v3;
+  if (v1 < 0 || v1 >= v0.length)
+    H.ioore(v0, v1);
+  v2 = 4;
+  v3 = 2;
+  P.print(v0[v1].call$2(v2, v3));
+}"""
+,  /// 01: ok
+ r"""function() {
+  var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, closures, v0, v1, v2, v3;
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
+    if (__errorCode === 1) {
+      __currentError = __result;
+      __goto = __handler;
+    }
+    while (true)
+      switch (__goto) {
+        case 0:
+          // Function start
+          __goto = 2;
+        closures = [new A.main_closure()];
+        return thenHelper(closures, body, __completer);
+        case 2:
+          // returning from await.
+          v0 = __result, v1 = 0;
+          if (v1 < 0 || v1 >= v0.length)
+            H.ioore(v0, v1);
+          else
+            ;
+          v2 = 4;
+          v3 = 2;
+          P.print(v0[v1].call$2(v2, v3));
+          // implicit return
+          return thenHelper(null, 0, __completer, null);
+        case 1:
+          // rethrow
+          return thenHelper(__currentError, 1, __completer);
+      }
+  });
+  return thenHelper(null, body, __completer, null);
+}"""
+  )  /// 01: ok
+  ;
+
   testAsyncTransform("""
 function(a) async {
   print(this.x); // Ensure `this` is translated in the helper function.
@@ -51,7 +96,7 @@
 }""", """
 function(a) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __self = this;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -71,7 +116,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -101,7 +146,7 @@
   }""", """
 function(b) {
   var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, __next = [], __helper;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -195,7 +240,7 @@
             // rethrow
             return thenHelper(__currentError, 1, __completer);
         }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -211,7 +256,7 @@
 }""", """
 function(c) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, a, b, c, d, e, f, __temp1;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -250,7 +295,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -268,7 +313,7 @@
   }""", """
 function(d2) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, a, b, c, d, e, f, g, h, __temp1;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -383,7 +428,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -405,7 +450,7 @@
 }""", """
 function(x, y) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -477,7 +522,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -494,7 +539,7 @@
   """, """
 function(f) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, a;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -538,7 +583,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -559,7 +604,7 @@
 """, """
 function(g) {
   var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, i, __temp1;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -628,7 +673,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -644,7 +689,7 @@
   """, """
 function(a, h) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, x, __temp1, __temp2;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -703,7 +748,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -725,7 +770,7 @@
 """, """
 function(c, i) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __next = [], x, y, __error, __error1;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -820,7 +865,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -835,7 +880,7 @@
   """, """
 function(x, y, j) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __temp1, __temp2, __temp3;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -886,7 +931,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -918,7 +963,7 @@
 }""", """
 function(x, y, k) {
   var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, __temp1;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -1026,7 +1071,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -1046,7 +1091,7 @@
   }""", """
 function(l) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -1075,7 +1120,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
@@ -1098,7 +1143,7 @@
   }""", """
 function(m) {
   var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __next = [], exception, __exception;
-  function body(__errorCode, __result) {
+  var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
     if (__errorCode === 1) {
       __currentError = __result;
       __goto = __handler;
@@ -1154,7 +1199,7 @@
           // rethrow
           return thenHelper(__currentError, 1, __completer);
       }
-  }
+  });
   return thenHelper(null, body, __completer, null);
 }""");
 
diff --git a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart b/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
index ea10c9c..fb5c3ee 100644
--- a/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
+++ b/tests/compiler/dart2js/backend_dart/dart_backend_test.dart
@@ -9,7 +9,7 @@
 import '../mock_libraries.dart';
 import '../output_collector.dart';
 import 'package:compiler/compiler.dart';
-import 'package:compiler/src/dart2jslib.dart' as leg;
+import 'package:compiler/src/common/names.dart' show Identifiers;
 import 'package:compiler/src/dart_backend/dart_backend.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/tree/tree.dart';
@@ -633,7 +633,7 @@
   asyncTest(() => compiler.init().then((_) {
     assert(compiler.backend is DartBackend);
     compiler.parseScript(src);
-    FunctionElement mainElement = compiler.mainApp.find(leg.Compiler.MAIN);
+    FunctionElement mainElement = compiler.mainApp.find(Identifiers.main);
     compiler.processQueue(compiler.enqueuer.resolution, mainElement);
     PlaceholderCollector collector = collectPlaceholders(compiler, mainElement);
     FunctionExpression mainNode = mainElement.node;
diff --git a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
index 407b149..3ab7e86 100644
--- a/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
+++ b/tests/compiler/dart2js/backend_dart/dart_printer_test.dart
@@ -4,18 +4,20 @@
 
 library dart_printer_test;
 
-import "package:expect/expect.dart";
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
 import 'package:compiler/src/constants/values.dart';
 import 'package:compiler/src/dart_backend/backend_ast_nodes.dart';
-import 'package:compiler/src/scanner/scannerlib.dart';
-import 'package:compiler/src/io/source_file.dart';
-import 'package:compiler/src/dart2jslib.dart';
-import 'package:compiler/src/tree/tree.dart' show DartString;
-import 'dart:mirrors';
-import 'package:compiler/src/tree/tree.dart' as tree;
-import 'package:compiler/src/string_validator.dart';
 import 'package:compiler/src/dart_backend/backend_ast_to_frontend_ast.dart'
     show TreePrinter;
+import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
+import 'package:compiler/src/diagnostics/spannable.dart' show Spannable;
+import 'package:compiler/src/scanner/scannerlib.dart';
+import 'package:compiler/src/io/source_file.dart';
+import 'package:compiler/src/string_validator.dart';
+import 'package:compiler/src/tree/tree.dart' show DartString;
+import 'package:compiler/src/tree/tree.dart' as tree;
 
 /// For debugging the [AstBuilder] stack. Prints information about [x].
 void show(x) {
diff --git a/tests/compiler/dart2js/backend_dart/end2end_test.dart b/tests/compiler/dart2js/backend_dart/end2end_test.dart
index 3a7f902..60156c7 100644
--- a/tests/compiler/dart2js/backend_dart/end2end_test.dart
+++ b/tests/compiler/dart2js/backend_dart/end2end_test.dart
@@ -6,7 +6,7 @@
 library dart_backend.end2end_test;
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/dart_backend/dart_backend.dart';
 import 'package:expect/expect.dart';
 
diff --git a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart b/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
index 71d294b..03803bd 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr2_test.dart
@@ -5,7 +5,7 @@
 /// Unittest test of the CPS ir generated by the dart2dart compiler.
 library dart_backend.sexpr2_test;
 
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
 import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
 import 'package:compiler/src/elements/elements.dart';
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_test.dart b/tests/compiler/dart2js/backend_dart/sexpr_test.dart
index bbe09e2..2293cdb 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr_test.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr_test.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/cps_ir/cps_ir_nodes.dart';
 import 'package:compiler/src/cps_ir/cps_ir_nodes_sexpr.dart';
 import 'package:expect/expect.dart';
diff --git a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
index df70baf..736faf0 100644
--- a/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
+++ b/tests/compiler/dart2js/backend_dart/sexpr_unstringifier.dart
@@ -9,10 +9,10 @@
 
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/dart2jslib.dart' as dart2js
-    show MessageKind;
 import 'package:compiler/src/dart_types.dart' as dart_types
     show DartType;
+import 'package:compiler/src/diagnostics/messages.dart'
+    show MessageKind;
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/elements/modelx.dart'
     show ErroneousElementX, TypeVariableElementX;
@@ -48,7 +48,7 @@
 class DummyElement extends ErroneousElementX
     implements TypeVariableElement, FieldElement {
   DummyElement(String name)
-      : super(dart2js.MessageKind.GENERIC, {}, name, null);
+      : super(MessageKind.GENERIC, {}, name, null);
 
   final dart_types.DartType bound = null;
   final TypeDeclarationElement typeDeclaration = null;
diff --git a/tests/compiler/dart2js/backend_dart/test_helper.dart b/tests/compiler/dart2js/backend_dart/test_helper.dart
index a355d7e..0eeb656 100644
--- a/tests/compiler/dart2js/backend_dart/test_helper.dart
+++ b/tests/compiler/dart2js/backend_dart/test_helper.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/compiler.dart' as api;
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import '../../../../pkg/analyzer2dart/test/test_helper.dart';
 import '../compiler_helper.dart';
 
diff --git a/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart b/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
index 0c94f8e..247a25f 100644
--- a/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
+++ b/tests/compiler/dart2js/call_site_simple_type_inferer_test.dart
@@ -4,11 +4,8 @@
 
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/types/types.dart'
-    show TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 void compileAndFind(String code,
diff --git a/tests/compiler/dart2js/class_codegen2_test.dart b/tests/compiler/dart2js/class_codegen2_test.dart
index 0169e4e..7b4f479 100644
--- a/tests/compiler/dart2js/class_codegen2_test.dart
+++ b/tests/compiler/dart2js/class_codegen2_test.dart
@@ -7,7 +7,6 @@
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST_ONE = r"""
 class A { foo() => 499; }
diff --git a/tests/compiler/dart2js/class_codegen_test.dart b/tests/compiler/dart2js/class_codegen_test.dart
index 13c21f0..58c49bd 100644
--- a/tests/compiler/dart2js/class_codegen_test.dart
+++ b/tests/compiler/dart2js/class_codegen_test.dart
@@ -3,11 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-import 'dart:async';
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST_ONE = r"""
 class A { }
diff --git a/tests/compiler/dart2js/class_set_test.dart b/tests/compiler/dart2js/class_set_test.dart
index cd8abdd..2e12cdbf 100644
--- a/tests/compiler/dart2js/class_set_test.dart
+++ b/tests/compiler/dart2js/class_set_test.dart
@@ -11,9 +11,9 @@
 import 'type_test_helper.dart';
 import 'package:compiler/src/elements/elements.dart'
        show Element, ClassElement;
-import 'package:compiler/src/dart2jslib.dart';
 import 'package:compiler/src/universe/class_set.dart';
 import 'package:compiler/src/util/util.dart';
+import 'package:compiler/src/world.dart';
 
 void main() {
   asyncTest(() => TypeEnvironment.create(r"""
diff --git a/tests/compiler/dart2js/closure_tracer_test.dart b/tests/compiler/dart2js/closure_tracer_test.dart
index 8d68083..8053c01 100644
--- a/tests/compiler/dart2js/closure_tracer_test.dart
+++ b/tests/compiler/dart2js/closure_tracer_test.dart
@@ -6,7 +6,6 @@
 import "package:async_helper/async_helper.dart";
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = '''
diff --git a/tests/compiler/dart2js/compile_with_empty_libraries_test.dart b/tests/compiler/dart2js/compile_with_empty_libraries_test.dart
new file mode 100644
index 0000000..b133d85
--- /dev/null
+++ b/tests/compiler/dart2js/compile_with_empty_libraries_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Test that the dart2js compiler can compile an empty script without
+/// references to core library definitions.
+
+import 'package:async_helper/async_helper.dart';
+import 'mock_compiler.dart';
+
+const String TEST = r"main() {}";
+
+main() {
+  Uri uri = new Uri(scheme: 'source');
+  MockCompiler compiler =
+    new MockCompiler.internal(librariesOverride: (_) => '');
+  asyncTest(() => compiler.runCompiler(uri));
+}
diff --git a/tests/compiler/dart2js/compiler_helper.dart b/tests/compiler/dart2js/compiler_helper.dart
index ce972e5..9c84a8c 100644
--- a/tests/compiler/dart2js/compiler_helper.dart
+++ b/tests/compiler/dart2js/compiler_helper.dart
@@ -16,17 +16,12 @@
 import 'package:compiler/src/js_backend/js_backend.dart'
        as js;
 
-import 'package:compiler/src/dart2jslib.dart'
-       as leg;
-export 'package:compiler/src/dart2jslib.dart'
-       show Constant,
-            Message,
-            MessageKind,
-            MessageTemplate,
-            Selector,
-            TypedSelector,
-            SourceSpan,
-            World;
+import 'package:compiler/src/common/codegen.dart';
+import 'package:compiler/src/common/resolution.dart';
+
+export 'package:compiler/src/diagnostics/messages.dart';
+export 'package:compiler/src/diagnostics/source_span.dart';
+export 'package:compiler/src/diagnostics/spannable.dart';
 
 import 'package:compiler/src/types/types.dart'
        as types;
@@ -36,7 +31,7 @@
 import 'package:compiler/src/util/util.dart';
 export 'package:compiler/src/util/util.dart';
 
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/compiler.dart'
        show Compiler;
 
 export 'package:compiler/src/tree/tree.dart';
@@ -72,11 +67,11 @@
     compiler.world.populate();
     compiler.backend.onResolutionComplete();
     var context = new js.JavaScriptItemCompilationContext();
-    leg.ResolutionWorkItem resolutionWork =
-        new leg.ResolutionWorkItem(element, context);
+    ResolutionWorkItem resolutionWork =
+        new ResolutionWorkItem(element, context);
     resolutionWork.run(compiler, compiler.enqueuer.resolution);
-    leg.CodegenWorkItem work =
-        new leg.CodegenWorkItem(compiler, element, context);
+    CodegenWorkItem work =
+        new CodegenWorkItem(compiler, element, context);
     compiler.phase = Compiler.PHASE_COMPILING;
     work.run(compiler, compiler.enqueuer.codegen);
     js.JavaScriptBackend backend = compiler.backend;
@@ -96,6 +91,7 @@
                           bool disableInlining: true,
                           bool minify: false,
                           bool trustTypeAnnotations: false,
+                          bool enableTypeAssertions: false,
                           int expectedErrors,
                           int expectedWarnings,
                           api.CompilerOutputProvider outputProvider}) {
@@ -106,6 +102,7 @@
       disableInlining: disableInlining,
       enableMinification: minify,
       trustTypeAnnotations: trustTypeAnnotations,
+      enableTypeAssertions: enableTypeAssertions,
       expectedErrors: expectedErrors,
       expectedWarnings: expectedWarnings,
       outputProvider: outputProvider);
diff --git a/tests/compiler/dart2js/compiler_test.dart b/tests/compiler/dart2js/compiler_test.dart
index 6e16da6..d96f695 100644
--- a/tests/compiler/dart2js/compiler_test.dart
+++ b/tests/compiler/dart2js/compiler_test.dart
@@ -5,10 +5,10 @@
 import "dart:async";
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
-import "package:compiler/src/dart2jslib.dart";
+import "package:compiler/src/diagnostics/messages.dart";
 import "package:compiler/src/elements/elements.dart";
-import "package:compiler/src/resolution/resolution.dart";
-import "package:compiler/src/util/util.dart";
+import "package:compiler/src/resolution/members.dart";
+import "package:compiler/src/diagnostics/spannable.dart";
 import "mock_compiler.dart";
 
 
diff --git a/tests/compiler/dart2js/concrete_type_inference_test.dart b/tests/compiler/dart2js/concrete_type_inference_test.dart
index fb94801..6c8cb9f 100644
--- a/tests/compiler/dart2js/concrete_type_inference_test.dart
+++ b/tests/compiler/dart2js/concrete_type_inference_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 Future compileAndFind(String code, String name,
                     check(compiler, element)) {
diff --git a/tests/compiler/dart2js/constant_expression_evaluate_test.dart b/tests/compiler/dart2js/constant_expression_evaluate_test.dart
index fba3a20..5fa34cc 100644
--- a/tests/compiler/dart2js/constant_expression_evaluate_test.dart
+++ b/tests/compiler/dart2js/constant_expression_evaluate_test.dart
@@ -7,10 +7,11 @@
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
+import 'package:compiler/src/constants/evaluation.dart';
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/constants/values.dart';
 import 'package:compiler/src/constant_system_dart.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/constant_expression_test.dart b/tests/compiler/dart2js/constant_expression_test.dart
index 166a0ae..e028ac6 100644
--- a/tests/compiler/dart2js/constant_expression_test.dart
+++ b/tests/compiler/dart2js/constant_expression_test.dart
@@ -8,7 +8,7 @@
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 import 'package:compiler/src/constants/expressions.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/constant_folding_codeUnitAt_test.dart b/tests/compiler/dart2js/constant_folding_codeUnitAt_test.dart
index 1238724..0bb8f6f 100644
--- a/tests/compiler/dart2js/constant_folding_codeUnitAt_test.dart
+++ b/tests/compiler/dart2js/constant_folding_codeUnitAt_test.dart
@@ -4,7 +4,6 @@
 // Test constant folding on numbers.
 
 import 'dart:async';
-import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'compiler_helper.dart';
 
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index 0d36b71..114cf3c 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -7,6 +7,9 @@
 import "package:async_helper/async_helper.dart";
 import 'package:compiler/src/types/types.dart';
 import 'package:compiler/src/inferrer/concrete_types_inferrer.dart';
+import 'package:compiler/src/universe/universe.dart' show
+    CallStructure,
+    Selector;
 
 import "compiler_helper.dart";
 import "type_mask_test_helper.dart";
@@ -158,6 +161,7 @@
   MockCompiler compiler = new MockCompiler.internal(
       enableConcreteTypeInference: true,
       maxConcreteTypeSize: maxConcreteTypeSize);
+  compiler.diagnosticHandler = createHandler(compiler, code);
   compiler.registerSource(uri, code);
   compiler.typesTask.concreteTypesInferrer.testMode = true;
   return compiler.runCompiler(uri).then((_) {
@@ -1452,7 +1456,7 @@
     final expectedEType = [result.int];
     result.checkNodeHasType('e', expectedEType);
     result.checkNodeHasType('eNull', maybe(expectedEType));
-    final expectedFType = [result.double];
+    final expectedFType = [result.num];
     result.checkNodeHasType('f', expectedFType);
     result.checkNodeHasType('fNull', maybe(expectedFType));
     final expectedGType = [result.num];
@@ -1646,7 +1650,8 @@
     ClassElement y = findElement(result.compiler, 'Y');
     ClassElement z = findElement(result.compiler, 'Z');
 
-    Selector foo = new Selector.call("foo", null, 0);
+    Selector foo =
+        new Selector.call(const PublicName("foo"), CallStructure.NO_ARGS);
 
     result.checkSelectorHasType(
         foo,
@@ -1672,7 +1677,9 @@
         new TypeMask.unionOf([b, c].map((cls) =>
             new TypeMask.nonNullExact(cls, world)), world));
 
-    result.checkSelectorHasType(new Selector.call("bar", null, 0), null, null);
+    result.checkSelectorHasType(
+        new Selector.call(const PublicName("bar"), CallStructure.NO_ARGS),
+        null, null);
   });
 }
 
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 096a7bc..d2c606b 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -2,8 +2,12 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
+compile_with_empty_libraries_test: Fail # Issue 24223
+
 boolified_operator_test: Fail # Issue 8001
 
+async_await_js_transform_test/01: RuntimeError # Issue 23997
+
 # Don't mark these tests as failing. Instead, fix the errors/warnings that they
 # report or update the whitelist in the test-files to temporarily allow
 # digression.
@@ -32,6 +36,8 @@
 
 patch_test/bug: RuntimeError # Issue 21132
 
+http_test: Pass, Slow
+
 # These tests are for the now-deleted dart2dart variant of the CPS IR.
 # We want to adapt them to test the JS variant of the CPS IR instead,
 # but for now they are disabled.
@@ -56,7 +62,6 @@
 mirror_final_field_inferrer2_test: Pass, Slow
 check_elements_invariants_test: Slow, Pass
 import_mirrors_test: Slow, Pass
-http_test: Pass, Slow
 exit_code_test: Pass, Slow
 
 [ $mode == debug ]
diff --git a/tests/compiler/dart2js/deferred_custom_element_test.dart b/tests/compiler/dart2js/deferred_custom_element_test.dart
index b1f1b3e..07851d8 100644
--- a/tests/compiler/dart2js/deferred_custom_element_test.dart
+++ b/tests/compiler/dart2js/deferred_custom_element_test.dart
@@ -7,7 +7,7 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/deferred_dont_inline_deferred_constants_test.dart b/tests/compiler/dart2js/deferred_dont_inline_deferred_constants_test.dart
index fa9753e..ae6fd61 100644
--- a/tests/compiler/dart2js/deferred_dont_inline_deferred_constants_test.dart
+++ b/tests/compiler/dart2js/deferred_dont_inline_deferred_constants_test.dart
@@ -6,7 +6,7 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 import 'output_collector.dart';
@@ -23,7 +23,7 @@
       return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
     }
 
-    var main = compiler.mainApp.find(Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
 
diff --git a/tests/compiler/dart2js/deferred_dont_inline_deferred_globals_test.dart b/tests/compiler/dart2js/deferred_dont_inline_deferred_globals_test.dart
index 1a85a12..46674f0 100644
--- a/tests/compiler/dart2js/deferred_dont_inline_deferred_globals_test.dart
+++ b/tests/compiler/dart2js/deferred_dont_inline_deferred_globals_test.dart
@@ -6,7 +6,7 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 import 'output_collector.dart';
@@ -22,7 +22,7 @@
       return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
     }
 
-    var main = compiler.mainApp.find(Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
 
diff --git a/tests/compiler/dart2js/deferred_emit_type_checks_test.dart b/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
index 2132fde..f6df078 100644
--- a/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
+++ b/tests/compiler/dart2js/deferred_emit_type_checks_test.dart
@@ -6,7 +6,7 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/js_backend/js_backend.dart'
        show JavaScriptBackend;
 import 'package:expect/expect.dart';
diff --git a/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart b/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart
index 7d2c686..d1175e7 100644
--- a/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart
+++ b/tests/compiler/dart2js/deferred_follow_constant_dependencies_test.dart
@@ -6,7 +6,7 @@
 
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/deferred_follow_implicit_super_regression_test.dart b/tests/compiler/dart2js/deferred_follow_implicit_super_regression_test.dart
index acd0146..b083958 100644
--- a/tests/compiler/dart2js/deferred_follow_implicit_super_regression_test.dart
+++ b/tests/compiler/dart2js/deferred_follow_implicit_super_regression_test.dart
@@ -6,7 +6,7 @@
 import 'package:async_helper/async_helper.dart';
 import 'memory_compiler.dart';
 
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/compiler.dart'
        as dart2js;
 
 void main() {
@@ -19,7 +19,7 @@
       return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
     }
 
-    var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
 
diff --git a/tests/compiler/dart2js/deferred_inline_restrictions_test.dart b/tests/compiler/dart2js/deferred_inline_restrictions_test.dart
index a750587..14d0a7b 100644
--- a/tests/compiler/dart2js/deferred_inline_restrictions_test.dart
+++ b/tests/compiler/dart2js/deferred_inline_restrictions_test.dart
@@ -6,7 +6,7 @@
 // allow inlining of empty functions and from main.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/deferred_load_graph_segmentation2_test.dart b/tests/compiler/dart2js/deferred_load_graph_segmentation2_test.dart
index 0b79a13..52ad4d4 100644
--- a/tests/compiler/dart2js/deferred_load_graph_segmentation2_test.dart
+++ b/tests/compiler/dart2js/deferred_load_graph_segmentation2_test.dart
@@ -7,7 +7,7 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart b/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
index 1fa3534..9c91d69 100644
--- a/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
+++ b/tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart
@@ -7,7 +7,7 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/deferred_load.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
@@ -22,7 +22,7 @@
       return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
     }
 
-    var main = compiler.mainApp.find(Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
 
diff --git a/tests/compiler/dart2js/deferred_mirrors_test.dart b/tests/compiler/dart2js/deferred_mirrors_test.dart
index c92aaa1..d48550c 100644
--- a/tests/compiler/dart2js/deferred_mirrors_test.dart
+++ b/tests/compiler/dart2js/deferred_mirrors_test.dart
@@ -10,7 +10,7 @@
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'memory_compiler.dart';
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/compiler.dart'
        as dart2js;
 
 Future runTest(String mainScript, test) async {
@@ -30,7 +30,7 @@
 
 runTests() async {
   await runTest('memory:main.dart', (compiler) {
-    var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
     var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
@@ -53,7 +53,7 @@
     Expect.isTrue(true);
   });
   await runTest('memory:main3.dart', (compiler) {
-    var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
     var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
@@ -68,7 +68,7 @@
     Expect.equals(outputUnitForElement(main), outputUnitForElement(C));
   });
   await runTest('memory:main4.dart', (compiler) {
-    var main = compiler.mainApp.find(dart2js.Compiler.MAIN);
+    var main = compiler.mainFunction;
     Expect.isNotNull(main, "Could not find 'main'");
     compiler.deferredLoadTask.onResolutionComplete(main);
     var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
diff --git a/tests/compiler/dart2js/deferred_not_in_main_test.dart b/tests/compiler/dart2js/deferred_not_in_main_test.dart
index 002d9e5..80f2a23 100644
--- a/tests/compiler/dart2js/deferred_not_in_main_test.dart
+++ b/tests/compiler/dart2js/deferred_not_in_main_test.dart
@@ -7,7 +7,7 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
@@ -21,7 +21,7 @@
       return compiler.libraryLoader.lookupLibrary(Uri.parse(name));
     }
 
-    var main = compiler.mainApp.find(Compiler.MAIN);
+    var main = compiler.mainFunction;
     var outputUnitForElement = compiler.deferredLoadTask.outputUnitForElement;
 
     var mainOutputUnit = compiler.deferredLoadTask.mainOutputUnit;
diff --git a/tests/compiler/dart2js/dictionary_types_test.dart b/tests/compiler/dart2js/dictionary_types_test.dart
index af56b54..11734e1 100644
--- a/tests/compiler/dart2js/dictionary_types_test.dart
+++ b/tests/compiler/dart2js/dictionary_types_test.dart
@@ -146,7 +146,7 @@
   if (!createCode) {
     checker(typesTask, getType, compiler);
   } else {
-    var element = compiler.mainApp.findExported('main');
+    var element = compiler.mainFunction;
     var code = compiler.backend.assembleCode(element);
     checker(code);
   }
diff --git a/tests/compiler/dart2js/dump_info_test.dart b/tests/compiler/dart2js/dump_info_test.dart
index c5da18c..2f3d022 100644
--- a/tests/compiler/dart2js/dump_info_test.dart
+++ b/tests/compiler/dart2js/dump_info_test.dart
@@ -3,11 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 // Test that parameters keep their names in the output.
 
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart';
-import 'package:compiler/src/dump_info.dart';
 import 'dart:convert';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+import 'memory_compiler.dart';
 
 const String TEST_BASIC= r"""
 library main;
diff --git a/tests/compiler/dart2js/duplicate_library_test.dart b/tests/compiler/dart2js/duplicate_library_test.dart
index 8536370..0164981 100644
--- a/tests/compiler/dart2js/duplicate_library_test.dart
+++ b/tests/compiler/dart2js/duplicate_library_test.dart
@@ -8,7 +8,7 @@
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import 'package:compiler/src/dart2jslib.dart' show MessageKind;
+import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
 import 'memory_compiler.dart';
 
 void check(String kind,
diff --git a/tests/compiler/dart2js/erroneous_element_test.dart b/tests/compiler/dart2js/erroneous_element_test.dart
index 154ff0a..737f721 100644
--- a/tests/compiler/dart2js/erroneous_element_test.dart
+++ b/tests/compiler/dart2js/erroneous_element_test.dart
@@ -2,16 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import "package:expect/expect.dart";
-import 'package:compiler/src/elements/elements.dart';
-import 'parser_helper.dart';
+import 'package:expect/expect.dart';
 
+import 'package:compiler/src/diagnostics/messages.dart'
+    show MessageKind;
+import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/elements/modelx.dart'
     show ErroneousElementX;
 
-import 'package:compiler/src/dart2jslib.dart'
-    show MessageKind;
-
 void main() {
   ErroneousElement e = new ErroneousElementX(MessageKind.GENERIC,
                                              {'text': 'error'},
diff --git a/tests/compiler/dart2js/exit_code_test.dart b/tests/compiler/dart2js/exit_code_test.dart
index 0ef45e3..30c61ac 100644
--- a/tests/compiler/dart2js/exit_code_test.dart
+++ b/tests/compiler/dart2js/exit_code_test.dart
@@ -13,17 +13,21 @@
 
 import 'package:compiler/compiler.dart' as old_api;
 import 'package:compiler/compiler_new.dart' as api;
+import 'package:compiler/src/common/codegen.dart';
 import 'package:compiler/src/compile_time_constants.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/dart2js.dart' as entry;
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/diagnostics/invariant.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
+import 'package:compiler/src/diagnostics/spannable.dart';
 import 'package:compiler/src/apiimpl.dart' as apiimpl;
+import 'package:compiler/src/enqueue.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/library_loader.dart';
 import 'package:compiler/src/null_compiler_output.dart';
 import 'package:compiler/src/old_to_new_api.dart';
 import 'package:compiler/src/resolution/resolution.dart';
 import 'package:compiler/src/scanner/scannerlib.dart';
-import 'package:compiler/src/util/util.dart';
 
 class TestCompiler extends apiimpl.Compiler {
   final String testMarker;
diff --git a/tests/compiler/dart2js/expect_annotations_test.dart b/tests/compiler/dart2js/expect_annotations_test.dart
index e8ecc40..62e29ae 100644
--- a/tests/compiler/dart2js/expect_annotations_test.dart
+++ b/tests/compiler/dart2js/expect_annotations_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/js_backend/js_backend.dart';
 import 'package:compiler/src/types/types.dart';
diff --git a/tests/compiler/dart2js/field_codegen_test.dart b/tests/compiler/dart2js/field_codegen_test.dart
index eb1a6c4..c7036a4 100644
--- a/tests/compiler/dart2js/field_codegen_test.dart
+++ b/tests/compiler/dart2js/field_codegen_test.dart
@@ -6,7 +6,6 @@
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST_NULL0 = r"""
 class A { static var x; }
diff --git a/tests/compiler/dart2js/field_type_simple_inferer_test.dart b/tests/compiler/dart2js/field_type_simple_inferer_test.dart
index be6259d..2a33d95 100644
--- a/tests/compiler/dart2js/field_type_simple_inferer_test.dart
+++ b/tests/compiler/dart2js/field_type_simple_inferer_test.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/types/types.dart'
     show TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 void compileAndFind(String code,
diff --git a/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart b/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
index 1f0ab5d..d2b29b0 100644
--- a/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
+++ b/tests/compiler/dart2js/generate_code_with_compile_time_errors_test.dart
@@ -9,7 +9,7 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/dart_backend/dart_backend.dart';
 import 'package:compiler/src/js_backend/js_backend.dart';
 import 'memory_compiler.dart';
diff --git a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
index 2da3b97..2dafdf2 100644
--- a/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
+++ b/tests/compiler/dart2js/gvn_dynamic_field_get_test.dart
@@ -4,10 +4,10 @@
 // Test that dart2js gvns dynamic getters that don't have side
 // effects.
 
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
+import 'package:compiler/src/universe/universe.dart' show Selector;
 
 const String TEST = r"""
 class A {
diff --git a/tests/compiler/dart2js/if_do_while_test.dart b/tests/compiler/dart2js/if_do_while_test.dart
index 64b76f8..406e981 100644
--- a/tests/compiler/dart2js/if_do_while_test.dart
+++ b/tests/compiler/dart2js/if_do_while_test.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'compiler_helper.dart';
diff --git a/tests/compiler/dart2js/import_mirrors_test.dart b/tests/compiler/dart2js/import_mirrors_test.dart
index 190d414..514bedb 100644
--- a/tests/compiler/dart2js/import_mirrors_test.dart
+++ b/tests/compiler/dart2js/import_mirrors_test.dart
@@ -10,7 +10,9 @@
 import 'dart:async';
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/warnings.dart' show MessageKind, MessageTemplate;
+import 'package:compiler/src/diagnostics/messages.dart' show
+    MessageKind,
+    MessageTemplate;
 import 'memory_compiler.dart';
 
 const DIRECT_IMPORT = const {
diff --git a/tests/compiler/dart2js/in_user_code_test.dart b/tests/compiler/dart2js/in_user_code_test.dart
index 00b2549..9870491 100644
--- a/tests/compiler/dart2js/in_user_code_test.dart
+++ b/tests/compiler/dart2js/in_user_code_test.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import 'package:compiler/src/dart2jslib.dart' show Compiler;
+import 'package:compiler/src/compiler.dart' show Compiler;
 import 'memory_compiler.dart';
 
 const SOURCE = const {
diff --git a/tests/compiler/dart2js/incremental/compile_all.dart b/tests/compiler/dart2js/incremental/compile_all.dart
index ea41d2c..a89ec32 100644
--- a/tests/compiler/dart2js/incremental/compile_all.dart
+++ b/tests/compiler/dart2js/incremental/compile_all.dart
@@ -43,7 +43,7 @@
   int testCount = 0;
   int skipCount = 0;
   Set<String> crashes = new Set<String>();
-  Compiler memoryCompiler = compilerFor(sources);
+  Compiler memoryCompiler = compilerFor(memorySourceFiles: sources);
   FormattingDiagnosticHandler handler = memoryCompiler.handler;
   handler.verbose = verbose;
   var options = ['--analyze-main'];
diff --git a/tests/compiler/dart2js/issue13354_test.dart b/tests/compiler/dart2js/issue13354_test.dart
index 6a38130..3402206 100644
--- a/tests/compiler/dart2js/issue13354_test.dart
+++ b/tests/compiler/dart2js/issue13354_test.dart
@@ -5,7 +5,6 @@
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = """
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart
index 6873d05..e8e5ebc 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart
@@ -35,8 +35,8 @@
   P.print("(" + H.S(P.LinkedHashMap_LinkedHashMap$_literal(["s", 1])) + ")");
 }"""),
   const TestEntry("""
-foo(a, [b = "b"]) => b;
-bar(a, {b: "b", c: "c"}) => c;
+foo(a, [b = "b"]) { print(b); return b; }
+bar(a, {b: "b", c: "c"}) { print(c); return c; }
 main() {
   foo(0);
   foo(1, 2);
@@ -58,6 +58,7 @@
   const TestEntry(
   """
 foo(a) {
+  print(a);
   return a;
 }
 main() {
@@ -83,7 +84,7 @@
 }"""),
   const TestEntry(
   """
-foo() { return 42; }
+foo() { print(42); return 42; }
 main() { return foo(); }
   """,
   """function() {
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart
index 2f58293..f5345c0 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart
@@ -86,10 +86,8 @@
 r"""
 function() {
   var a = null, i = 0;
-  while (i < 10) {
-    a = new V.main_closure(i);
-    i = i + 1;
-  }
+  for (; i < 10; a = new V.main_closure(i), i = i + 1)
+    ;
   P.print(a.call$0());
 }"""),
 
@@ -108,7 +106,7 @@
 }"""),
 
   const TestEntry("""
-staticMethod(x) => x;
+staticMethod(x) { print(x); return x; }
 main(x) {
   var tearOff = staticMethod;
   print(tearOff(123));
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
index e777044..cc37c08 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_control_flow_test.dart
@@ -19,7 +19,7 @@
     ;
 }"""),
   const TestEntry("""
-foo(a) => a;
+foo(a) { print(a); return a; }
 
 main() {
   while (true) {
@@ -46,7 +46,7 @@
       }
 }"""),
   const TestEntry("""
-foo(a) => a;
+foo(a) { print(a); return a; }
 
 main() {
   for (int i = 0; foo(true); i = foo(i)) {
@@ -57,16 +57,15 @@
 }""", """
 function() {
   var i = 0;
-  while (P.identical(V.foo(true), true)) {
+  for (; V.foo(true) === true; i = V.foo(i)) {
     P.print(1);
-    if (P.identical(V.foo(false), true))
+    if (V.foo(false) === true)
       break;
-    i = V.foo(i);
   }
   P.print(2);
 }"""),
 const TestEntry("""
-foo(a) => a;
+foo(a) { print(a); return a; }
 
 main() {
  if (foo(true)) {
@@ -81,7 +80,7 @@
   P.print(3);
 }"""),
 const TestEntry("""
-foo(a) => a;
+foo(a) { print(a); return a; }
 
 main() {
  if (foo(true)) {
@@ -115,7 +114,7 @@
   P.print("good");
 }"""),
   const TestEntry("""
-foo() => 2;
+foo() { print('2'); return 2; }
 main() {
   if (foo()) {
     print('bad');
@@ -136,11 +135,10 @@
 }""",r"""
 function() {
   var list = [1, 2, 3, 4, 5, 6], $length = list.length, i = 0;
-  while (i < list.length) {
+  for (; i < list.length; i = i + 1) {
     P.print(list[i]);
     if ($length !== list.length)
       H.throwConcurrentModificationError(list);
-    i = i + 1;
   }
 }"""),
   const TestEntry("""
@@ -158,7 +156,7 @@
     H.throwConcurrentModificationError(xs);
   i = 0;
   i1 = 0;
-  while (i < xs.length) {
+  for (; i < xs.length; i = i + 1, i1 = i1 + 1) {
     current = xs[i];
     if (length1 !== ys.length)
       H.throwConcurrentModificationError(ys);
@@ -169,8 +167,6 @@
     P.print(current1);
     if ($length !== xs.length)
       H.throwConcurrentModificationError(xs);
-    i = i + 1;
-    i1 = i1 + 1;
   }
 }"""),
 ];
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
index 4e7b0cf..bb5e902 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
@@ -34,17 +34,12 @@
 r"""
 function() {
   var l = ["hest", ["h", "e", "s", "t"]], i = 0, x_, x, j;
-  P.print(l.length);
-  while (i < l.length) {
+  for (P.print(l.length); i < l.length; i = i + 1) {
     if (i < 0 || i >= l.length)
       H.ioore(l, i);
     x_ = J.getInterceptor$as(x = l[i]);
-    j = 0;
-    while (j < x_.get$length(x)) {
+    for (j = 0; j < x_.get$length(x); j = j + 1)
       P.print(x_.$index(x, j));
-      j = j + 1;
-    }
-    i = i + 1;
   }
 }"""),
 ];
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
index 138e684..97de317 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
@@ -19,7 +19,7 @@
   P.print(V.foo() ? "hello world" : "bad bad");
 }"""),
   const TestEntry("""
-foo() => null;
+foo() { print('foo'); }
 main() {
   print(foo() ? "hello world" : "bad bad");
 }""","""
@@ -40,14 +40,14 @@
 main() { print(foo && foo); }
 """, """
 function() {
-  P.print(V.foo() ? !!P.identical(V.foo(), true) : false);
+  P.print(V.foo() ? V.foo() === true : false);
 }"""),
   const TestEntry("""
 get foo => foo;
 main() { print(foo || foo); }
 ""","""
 function() {
-  P.print(V.foo() ? true : !!P.identical(V.foo(), true));
+  P.print(V.foo() ? true : V.foo() === true);
 }"""),
 
 // Needs interceptor calling convention
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
index 713281f..ac16a08 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_source_information_test.dart
@@ -66,7 +66,8 @@
   for (TestEntry test in tests) {
     Map files = {TEST_MAIN_FILE: test.source};
     asyncTest(() {
-      Compiler compiler = compilerFor(files, options: <String>['--use-cps-ir']);
+      Compiler compiler = compilerFor(
+          memorySourceFiles: files, options: <String>['--use-cps-ir']);
       ir.FunctionDefinition irNodeForMain;
 
       void cacheIrNodeForMain(Element function, ir.FunctionDefinition irNode) {
diff --git a/tests/compiler/dart2js/js_spec_string_test.dart b/tests/compiler/dart2js/js_spec_string_test.dart
index 5344177..ca1ac9a 100644
--- a/tests/compiler/dart2js/js_spec_string_test.dart
+++ b/tests/compiler/dart2js/js_spec_string_test.dart
@@ -6,8 +6,7 @@
 
 import 'package:expect/expect.dart';
 import 'package:compiler/src/native/native.dart';
-import 'package:compiler/src/dart2jslib.dart'
-    show DiagnosticListener;
+import 'package:compiler/src/diagnostics/diagnostic_listener.dart';
 import 'package:compiler/src/universe/universe.dart'
     show SideEffects;
 
diff --git a/tests/compiler/dart2js/least_upper_bound_test.dart b/tests/compiler/dart2js/least_upper_bound_test.dart
index 23aa02b..d239812 100644
--- a/tests/compiler/dart2js/least_upper_bound_test.dart
+++ b/tests/compiler/dart2js/least_upper_bound_test.dart
@@ -6,11 +6,11 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'type_test_helper.dart';
 import 'package:compiler/src/dart_types.dart';
-import "package:compiler/src/elements/elements.dart"
+import 'package:compiler/src/elements/elements.dart'
        show Element, ClassElement;
-import 'package:compiler/src/util/util.dart';
+
+import 'type_test_helper.dart';
 
 void main() {
   testInterface1();
diff --git a/tests/compiler/dart2js/library_resolution_test.dart b/tests/compiler/dart2js/library_resolution_test.dart
index 5eeb342..5841727 100644
--- a/tests/compiler/dart2js/library_resolution_test.dart
+++ b/tests/compiler/dart2js/library_resolution_test.dart
@@ -17,13 +17,13 @@
 import 'package:expect/expect.dart' show
     Expect;
 
-import 'package:compiler/src/elements/elements.dart' show
-    LibraryElement;
-
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/diagnostics/messages.dart' show
     MessageKind,
     MessageTemplate;
 
+import 'package:compiler/src/elements/elements.dart' show
+    LibraryElement;
+
 import 'package:compiler/src/null_compiler_output.dart' show
     NullCompilerOutput;
 
diff --git a/tests/compiler/dart2js/list_tracer2_test.dart b/tests/compiler/dart2js/list_tracer2_test.dart
index 249f956..5c60954 100644
--- a/tests/compiler/dart2js/list_tracer2_test.dart
+++ b/tests/compiler/dart2js/list_tracer2_test.dart
@@ -11,7 +11,6 @@
     show ContainerTypeMask, TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = r'''
diff --git a/tests/compiler/dart2js/list_tracer3_test.dart b/tests/compiler/dart2js/list_tracer3_test.dart
index 27451ba..e9decd9 100644
--- a/tests/compiler/dart2js/list_tracer3_test.dart
+++ b/tests/compiler/dart2js/list_tracer3_test.dart
@@ -11,7 +11,6 @@
     show ContainerTypeMask, TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 
diff --git a/tests/compiler/dart2js/list_tracer_test.dart b/tests/compiler/dart2js/list_tracer_test.dart
index 8391cb6..d6edb88 100644
--- a/tests/compiler/dart2js/list_tracer_test.dart
+++ b/tests/compiler/dart2js/list_tracer_test.dart
@@ -8,7 +8,6 @@
     show ContainerTypeMask, TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 String generateTest(String listAllocation) {
diff --git a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
index 992aab0..77aa786 100644
--- a/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
+++ b/tests/compiler/dart2js/list_tracer_typed_data_length_test.dart
@@ -6,7 +6,7 @@
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/types/types.dart'
     show ContainerTypeMask, TypeMask;
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 
 import 'memory_compiler.dart';
 import 'compiler_helper.dart' show findElement;
diff --git a/tests/compiler/dart2js/map_tracer_keys_test.dart b/tests/compiler/dart2js/map_tracer_keys_test.dart
index 5610c59..0c2edb7 100644
--- a/tests/compiler/dart2js/map_tracer_keys_test.dart
+++ b/tests/compiler/dart2js/map_tracer_keys_test.dart
@@ -8,8 +8,6 @@
     show ContainerTypeMask, TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
-import 'type_mask_test_helper.dart';
 
 
 String generateTest(String key, String value, bool initial) {
diff --git a/tests/compiler/dart2js/map_tracer_test.dart b/tests/compiler/dart2js/map_tracer_test.dart
index 3405b5c..c45370a 100644
--- a/tests/compiler/dart2js/map_tracer_test.dart
+++ b/tests/compiler/dart2js/map_tracer_test.dart
@@ -8,7 +8,6 @@
     show MapTypeMask, TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 
diff --git a/tests/compiler/dart2js/memory_compiler.dart b/tests/compiler/dart2js/memory_compiler.dart
index 4d3c893..06e73144 100644
--- a/tests/compiler/dart2js/memory_compiler.dart
+++ b/tests/compiler/dart2js/memory_compiler.dart
@@ -4,32 +4,26 @@
 
 library dart2js.test.memory_compiler;
 
-import 'memory_source_file_helper.dart';
-
-
-import 'package:compiler/src/null_compiler_output.dart' show
-    NullCompilerOutput;
-
-import 'package:compiler/src/dart2jslib.dart' show
-    Message;
+import 'dart:async';
 
 import 'package:compiler/compiler.dart' show
     DiagnosticHandler;
-
 import 'package:compiler/compiler_new.dart' show
     CompilationResult,
     CompilerDiagnostics,
     CompilerOutput,
     Diagnostic,
     PackagesDiscoveryProvider;
-
-import 'dart:async';
-
+import 'package:compiler/src/diagnostics/messages.dart' show
+    Message;
 import 'package:compiler/src/mirrors/source_mirrors.dart';
 import 'package:compiler/src/mirrors/analyze.dart';
+import 'package:compiler/src/null_compiler_output.dart' show
+    NullCompilerOutput;
+import 'package:compiler/src/library_loader.dart' show
+    LoadedLibraries;
 
-import 'package:compiler/src/library_loader.dart'
-    show LoadedLibraries;
+import 'memory_source_file_helper.dart';
 
 export 'output_collector.dart';
 export 'package:compiler/compiler_new.dart' show
@@ -106,13 +100,15 @@
 CompilerDiagnostics createCompilerDiagnostics(
     CompilerDiagnostics diagnostics,
     SourceFileProvider provider,
-    bool showDiagnostics) {
+    {bool showDiagnostics: true,
+     bool verbose: false}) {
   CompilerDiagnostics handler = diagnostics;
   if (showDiagnostics) {
     if (diagnostics == null) {
-      handler = new FormattingDiagnosticHandler(provider);
+      handler = new FormattingDiagnosticHandler(provider)..verbose = verbose;
     } else {
-      var formattingHandler = new FormattingDiagnosticHandler(provider);
+      var formattingHandler =
+          new FormattingDiagnosticHandler(provider)..verbose = verbose;
       handler = new MultiDiagnostics([diagnostics, formattingHandler]);
     }
   } else if (diagnostics == null) {
@@ -141,7 +137,7 @@
     entryPoint = Uri.parse('memory:main.dart');
   }
   Compiler compiler = compilerFor(
-      memorySourceFiles,
+      memorySourceFiles: memorySourceFiles,
       diagnosticHandler: diagnosticHandler,
       outputProvider: outputProvider,
       options: options,
@@ -159,8 +155,8 @@
 }
 
 Compiler compilerFor(
-    Map<String, String> memorySourceFiles,
-    {CompilerDiagnostics diagnosticHandler,
+    {Map<String, String> memorySourceFiles: const <String, String>{},
+     CompilerDiagnostics diagnosticHandler,
      CompilerOutput outputProvider,
      List<String> options: const <String>[],
      Compiler cachedCompiler,
@@ -187,8 +183,10 @@
     provider = expando[cachedCompiler.provider];
     provider.memorySourceFiles = memorySourceFiles;
   }
-  diagnosticHandler =
-      createCompilerDiagnostics(diagnosticHandler, provider, showDiagnostics);
+  diagnosticHandler = createCompilerDiagnostics(
+      diagnosticHandler, provider,
+      showDiagnostics: showDiagnostics,
+      verbose: options.contains('-v') || options.contains('--verbose'));
 
   if (outputProvider == null) {
     outputProvider = const NullCompilerOutput();
diff --git a/tests/compiler/dart2js/message_kind_helper.dart b/tests/compiler/dart2js/message_kind_helper.dart
index b579e95..af32b58 100644
--- a/tests/compiler/dart2js/message_kind_helper.dart
+++ b/tests/compiler/dart2js/message_kind_helper.dart
@@ -7,12 +7,13 @@
 import 'package:expect/expect.dart';
 import 'dart:async';
 
-import 'package:compiler/src/dart2jslib.dart' show
-    Compiler,
-    MessageKind,
-    MessageTemplate;
+import 'package:compiler/src/compiler.dart' show
+    Compiler;
 import 'package:compiler/src/dart_backend/dart_backend.dart' show
     DartBackend;
+import 'package:compiler/src/diagnostics/messages.dart' show
+    MessageKind,
+    MessageTemplate;
 import 'package:compiler/src/old_to_new_api.dart' show
     LegacyCompilerDiagnostics;
 
@@ -81,7 +82,7 @@
     bool newBackendIsDart = template.options.contains('--output-type=dart');
 
     Compiler compiler = compilerFor(
-        example,
+        memorySourceFiles: example,
         diagnosticHandler: new LegacyCompilerDiagnostics(collect),
         options: ['--analyze-only',
                   '--enable-experimental-mirrors']..addAll(template.options),
diff --git a/tests/compiler/dart2js/message_kind_test.dart b/tests/compiler/dart2js/message_kind_test.dart
index 9796595..efaecc8 100644
--- a/tests/compiler/dart2js/message_kind_test.dart
+++ b/tests/compiler/dart2js/message_kind_test.dart
@@ -5,7 +5,7 @@
 import 'package:expect/expect.dart';
 import 'dart:async';
 import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/warnings.dart' show
+import 'package:compiler/src/diagnostics/messages.dart' show
     MessageKind,
     MessageTemplate;
 
diff --git a/tests/compiler/dart2js/mirror_tree_shaking_test.dart b/tests/compiler/dart2js/mirror_tree_shaking_test.dart
index 87accd5..2b69501 100644
--- a/tests/compiler/dart2js/mirror_tree_shaking_test.dart
+++ b/tests/compiler/dart2js/mirror_tree_shaking_test.dart
@@ -5,7 +5,7 @@
 // Test that tree-shaking hasn't been turned off.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/js_backend/js_backend.dart'
        show JavaScriptBackend;
 import 'package:expect/expect.dart';
diff --git a/tests/compiler/dart2js/mirrors/mirrors_reader_test.dart b/tests/compiler/dart2js/mirrors/mirrors_reader_test.dart
index bd41ab2..3059fd1 100644
--- a/tests/compiler/dart2js/mirrors/mirrors_reader_test.dart
+++ b/tests/compiler/dart2js/mirrors/mirrors_reader_test.dart
@@ -12,7 +12,7 @@
 
 import "mirrors_test_helper.dart";
 import "../../../lib/mirrors/mirrors_reader.dart";
-import "package:compiler/src/util/util.dart";
+import "package:compiler/src/diagnostics/spannable.dart";
 import "package:compiler/src/mirrors/dart2js_mirrors.dart";
 import "package:compiler/src/mirrors/source_mirrors.dart";
 
diff --git a/tests/compiler/dart2js/mirrors_exports_test.dart b/tests/compiler/dart2js/mirrors_exports_test.dart
index 07b70e7..302dd31 100644
--- a/tests/compiler/dart2js/mirrors_exports_test.dart
+++ b/tests/compiler/dart2js/mirrors_exports_test.dart
@@ -4,10 +4,10 @@
 
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
-import 'dart:async';
-import 'memory_compiler.dart';
 import 'package:compiler/src/mirrors/source_mirrors.dart';
 
+import 'memory_compiler.dart';
+
 const SOURCE_FILES = const {
 'main.dart': '''
 import 'a.dart' show A1, A2;
diff --git a/tests/compiler/dart2js/missing_file_test.dart b/tests/compiler/dart2js/missing_file_test.dart
index 26a4e9b..efbc43f 100644
--- a/tests/compiler/dart2js/missing_file_test.dart
+++ b/tests/compiler/dart2js/missing_file_test.dart
@@ -8,7 +8,7 @@
 
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import "package:compiler/src/diagnostics/messages.dart";
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
 
diff --git a/tests/compiler/dart2js/mixin_constructor_default_parameter_values_test.dart b/tests/compiler/dart2js/mixin_constructor_default_parameter_values_test.dart
index 9d0fc86..a3924a8 100644
--- a/tests/compiler/dart2js/mixin_constructor_default_parameter_values_test.dart
+++ b/tests/compiler/dart2js/mixin_constructor_default_parameter_values_test.dart
@@ -7,8 +7,7 @@
 // to D without optional parameters is inferred using D's context, the default
 // value `_SECRET` will not be visible and compilation will fail.
 
-import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+import 'package:async_helper/async_helper.dart';
 import 'memory_compiler.dart';
 
 const Map MEMORY_SOURCE_FILES = const {
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 6f8cb51..2a9a39f 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -9,15 +9,23 @@
 import 'dart:collection';
 
 import 'package:compiler/compiler.dart' as api;
+import 'package:compiler/src/common/names.dart' show
+    Uris;
 import 'package:compiler/src/constants/expressions.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
+import 'package:compiler/src/diagnostics/source_span.dart';
+import 'package:compiler/src/diagnostics/spannable.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/js_backend/js_backend.dart'
     show JavaScriptBackend;
-import 'package:compiler/src/resolution/resolution.dart';
 import 'package:compiler/src/io/source_file.dart';
+import 'package:compiler/src/resolution/members.dart';
+import 'package:compiler/src/resolution/registry.dart';
+import 'package:compiler/src/resolution/scope.dart';
+import 'package:compiler/src/resolution/tree_elements.dart';
+import 'package:compiler/src/script.dart';
 import 'package:compiler/src/tree/tree.dart';
 import 'package:compiler/src/old_to_new_api.dart';
-import 'package:compiler/src/util/util.dart';
 import 'parser_helper.dart';
 
 import 'package:compiler/src/elements/modelx.dart'
@@ -26,8 +34,7 @@
          ErroneousElementX,
          FunctionElementX;
 
-import 'package:compiler/src/dart2jslib.dart'
-    hide TreeElementMapping;
+import 'package:compiler/src/compiler.dart';
 
 import 'package:compiler/src/deferred_load.dart'
     show DeferredLoadTask,
@@ -40,11 +47,13 @@
   Message message;
   WarningMessage(this.node, this.message);
 
-  toString() => message.toString();
+  toString() => message.kind.toString();
 }
 
 final Uri PATCH_CORE = new Uri(scheme: 'patch', path: 'core');
 
+typedef String LibrarySourceProvider(Uri uri);
+
 class MockCompiler extends Compiler {
   api.DiagnosticHandler diagnosticHandler;
   List<WarningMessage> warnings;
@@ -60,6 +69,7 @@
   final Map<String, SourceFile> sourceFiles;
   Node parsedTree;
   final String testedPatchVersion;
+  final LibrarySourceProvider librariesOverride;
 
   MockCompiler.internal(
       {Map<String, String> coreSource,
@@ -80,7 +90,8 @@
        int this.expectedWarnings,
        int this.expectedErrors,
        api.CompilerOutputProvider outputProvider,
-       String patchVersion})
+       String patchVersion,
+       LibrarySourceProvider this.librariesOverride})
       : sourceFiles = new Map<String, SourceFile>(),
         testedPatchVersion = patchVersion,
         super(enableTypeAssertions: enableTypeAssertions,
@@ -101,7 +112,7 @@
 
     clearMessages();
 
-    registerSource(Compiler.DART_CORE,
+    registerSource(Uris.dart_core,
                    buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource));
     registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE);
 
@@ -113,10 +124,16 @@
                    buildLibrarySource(DEFAULT_INTERCEPTORS_LIBRARY));
     registerSource(JavaScriptBackend.DART_ISOLATE_HELPER,
                    buildLibrarySource(DEFAULT_ISOLATE_HELPER_LIBRARY));
-    registerSource(Compiler.DART_MIRRORS,
+    registerSource(Uris.dart_mirrors,
                    buildLibrarySource(DEFAULT_MIRRORS_LIBRARY));
-    registerSource(Compiler.DART_ASYNC,
-                   buildLibrarySource(DEFAULT_ASYNC_LIBRARY));
+
+    Map<String, String> asyncLibrarySource = <String, String>{};
+    asyncLibrarySource.addAll(DEFAULT_ASYNC_LIBRARY);
+    if (enableAsyncAwait) {
+      asyncLibrarySource.addAll(ASYNC_AWAIT_LIBRARY);
+    }
+    registerSource(Uris.dart_async,
+                   buildLibrarySource(asyncLibrarySource));
   }
 
   String get patchVersion {
@@ -156,9 +173,16 @@
 
   /**
    * Registers the [source] with [uri] making it possible load [source] as a
-   * library.
+   * library.  If an override has been provided in [librariesOverride], that
+   * is used instead.
    */
   void registerSource(Uri uri, String source) {
+    if (librariesOverride != null) {
+      String override = librariesOverride(uri);
+      if (override != null) {
+        source = override;
+      }
+    }
     sourceFiles[uri.toString()] = new MockFile(source);
   }
 
@@ -216,7 +240,7 @@
                                           ExecutableElement element) {
     ResolverVisitor visitor =
         new ResolverVisitor(this, element,
-            new ResolutionRegistry.internal(this,
+            new ResolutionRegistry(this,
                 new CollectingTreeElements(element)));
     if (visitor.scope is LibraryScope) {
       visitor.scope = new MethodScope(visitor.scope, element);
@@ -230,7 +254,7 @@
     Element mockElement = new MockElement(mainApp.entryCompilationUnit);
     ResolverVisitor visitor =
         new ResolverVisitor(this, mockElement,
-          new ResolutionRegistry.internal(this,
+          new ResolutionRegistry(this,
               new CollectingTreeElements(mockElement)));
     visitor.scope = new MethodScope(visitor.scope, mockElement);
     return visitor;
diff --git a/tests/compiler/dart2js/mock_libraries.dart b/tests/compiler/dart2js/mock_libraries.dart
index c823f6b..d70afdb 100644
--- a/tests/compiler/dart2js/mock_libraries.dart
+++ b/tests/compiler/dart2js/mock_libraries.dart
@@ -81,6 +81,7 @@
         String toString() { return null; }
         noSuchMethod(im) { throw im; }
       }''',
+  'Resource': 'class Resource {}',
   'StackTrace': 'abstract class StackTrace {}',
   'String': 'class String implements Pattern {}',
   'Symbol': 'class Symbol { final name; const Symbol(this.name); }',
@@ -386,6 +387,12 @@
   'StreamIterator': 'class StreamIterator<T> {}',
 };
 
+/// These members are only needed when async/await is used.
+const Map<String, String> ASYNC_AWAIT_LIBRARY = const <String, String>{
+  '_wrapJsFunctionForAsync': '_wrapJsFunctionForAsync(f) {}',
+  '_asyncHelper': '_asyncHelper(o, f, c) {}',
+};
+
 const Map<String, String> DEFAULT_MIRRORS_LIBRARY = const <String, String>{
   'Comment': 'class Comment {}',
   'MirrorSystem': 'class MirrorSystem {}',
diff --git a/tests/compiler/dart2js/package_root_test.dart b/tests/compiler/dart2js/package_root_test.dart
index 122170c..40cab4a 100644
--- a/tests/compiler/dart2js/package_root_test.dart
+++ b/tests/compiler/dart2js/package_root_test.dart
@@ -12,7 +12,7 @@
 import 'package:expect/expect.dart';
 import 'package:compiler/compiler.dart'
        show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider;
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/diagnostics/messages.dart'
        show MessageKind;
 import 'package:package_config/packages.dart';
 
diff --git a/tests/compiler/dart2js/parser_helper.dart b/tests/compiler/dart2js/parser_helper.dart
index 4fe8790..c2d3bdf 100644
--- a/tests/compiler/dart2js/parser_helper.dart
+++ b/tests/compiler/dart2js/parser_helper.dart
@@ -15,10 +15,14 @@
 import "package:compiler/src/elements/modelx.dart"
     show CompilationUnitElementX, ElementX, LibraryElementX;
 
-import "package:compiler/src/dart2jslib.dart";
+import "package:compiler/src/compiler.dart";
+import "package:compiler/src/diagnostics/source_span.dart";
+import "package:compiler/src/diagnostics/spannable.dart";
+import "package:compiler/src/diagnostics/diagnostic_listener.dart";
+import "package:compiler/src/diagnostics/messages.dart";
+import "package:compiler/src/script.dart";
 
-export "package:compiler/src/dart2jslib.dart"
-    show DiagnosticListener;
+export "package:compiler/src/diagnostics/diagnostic_listener.dart";
 // TODO(ahe): We should have token library to export instead.
 export "package:compiler/src/scanner/scannerlib.dart";
 
diff --git a/tests/compiler/dart2js/part_of_test.dart b/tests/compiler/dart2js/part_of_test.dart
index 91aa645..979d9ca 100644
--- a/tests/compiler/dart2js/part_of_test.dart
+++ b/tests/compiler/dart2js/part_of_test.dart
@@ -6,9 +6,9 @@
 
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
+import 'package:compiler/src/diagnostics/messages.dart' show
+    MessageKind;
 import 'mock_compiler.dart';
-import 'package:compiler/src/dart2jslib.dart'
-    show MessageKind;
 
 final libraryUri = Uri.parse('test:library.dart');
 const String LIBRARY_SOURCE = '''
diff --git a/tests/compiler/dart2js/patch_test.dart b/tests/compiler/dart2js/patch_test.dart
index c198012..1981842 100644
--- a/tests/compiler/dart2js/patch_test.dart
+++ b/tests/compiler/dart2js/patch_test.dart
@@ -3,15 +3,22 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-import "package:compiler/src/dart2jslib.dart";
-import "package:compiler/src/elements/elements.dart";
-import "package:compiler/src/tree/tree.dart";
-import "package:compiler/src/types/types.dart";
-import "mock_compiler.dart";
-import "mock_libraries.dart";
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/messages.dart' show
+    MessageKind;
+import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/elements/modelx.dart';
+import 'package:compiler/src/tree/tree.dart';
+import 'package:compiler/src/types/types.dart';
+import 'package:compiler/src/universe/universe.dart' show
+    CallStructure,
+    Selector;
+import 'package:compiler/src/world.dart';
+
+import 'mock_compiler.dart';
+import 'mock_libraries.dart';
 
 Future<Compiler> applyPatch(String script, String patch,
                             {bool analyzeAll: false,
@@ -868,7 +875,8 @@
 
     // Check that a method just in the patch class is a target for a
     // typed selector.
-    Selector selector = new Selector.call('method', compiler.coreLibrary, 0);
+    Selector selector =
+        new Selector.call(const PublicName('method'), CallStructure.NO_ARGS);
     TypeMask typeMask = new TypeMask.exact(cls, world);
     FunctionElement method = cls.implementation.lookupLocalMember('method');
     method.computeType(compiler);
@@ -877,7 +885,8 @@
 
     // Check that the declaration method in the declaration class is a target
     // for a typed selector.
-    selector = new Selector.call('clear', compiler.coreLibrary, 0);
+    selector =
+        new Selector.call(const PublicName('clear'), CallStructure.NO_ARGS);
     typeMask = new TypeMask.exact(cls, world);
     method = cls.lookupLocalMember('clear');
     method.computeType(compiler);
diff --git a/tests/compiler/dart2js/preserve_uris_test.dart b/tests/compiler/dart2js/preserve_uris_test.dart
index 70d1d5e..9d58894 100644
--- a/tests/compiler/dart2js/preserve_uris_test.dart
+++ b/tests/compiler/dart2js/preserve_uris_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'memory_compiler.dart' show runCompiler, OutputCollector;
diff --git a/tests/compiler/dart2js/private_test.dart b/tests/compiler/dart2js/private_test.dart
index 5121422..ed55d66 100644
--- a/tests/compiler/dart2js/private_test.dart
+++ b/tests/compiler/dart2js/private_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-import 'mock_compiler.dart';
 
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
 import 'package:compiler/src/io/source_file.dart';
-import 'package:compiler/src/dart2jslib.dart';
+
+import 'mock_compiler.dart';
 
 const String PRIVATE_SOURCE_URI = 'src:private';
 const String PRIVATE_SOURCE = '''
diff --git a/tests/compiler/dart2js/resolution_test.dart b/tests/compiler/dart2js/resolution_test.dart
index 2305eb8..639755a 100644
--- a/tests/compiler/dart2js/resolution_test.dart
+++ b/tests/compiler/dart2js/resolution_test.dart
@@ -5,11 +5,10 @@
 // Test that resolution does not resolve things we know will not be
 // needed by the backend.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
-import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'package:compiler/src/apiimpl.dart';
+import 'compiler_helper.dart';
 
 const String NO_RUNTIME_TYPE = r"""
 import 'dart:core' as prefix;
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 35c2ded..3f18c93 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -10,7 +10,12 @@
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/dart_types.dart';
 import 'package:compiler/src/elements/modelx.dart';
-import 'package:compiler/src/resolution/resolution.dart';
+import 'package:compiler/src/resolution/constructors.dart';
+import 'package:compiler/src/resolution/members.dart';
+import 'package:compiler/src/resolution/registry.dart';
+import 'package:compiler/src/resolution/resolution_result.dart';
+import 'package:compiler/src/resolution/scope.dart';
+import 'package:compiler/src/resolution/tree_elements.dart';
 
 import 'compiler_helper.dart';
 import 'link_helper.dart';
@@ -212,7 +217,7 @@
 
     ResolverVisitor visitor =
         new ResolverVisitor(compiler, fooB,
-            new ResolutionRegistry.internal(compiler,
+            new ResolutionRegistry(compiler,
                 new CollectingTreeElements(fooB)));
     FunctionExpression node = (fooB as FunctionElementX).parseNode(compiler);
     visitor.visit(node.body);
@@ -254,7 +259,7 @@
       FunctionElement funElement = fooElement.lookupLocalMember("foo");
       ResolverVisitor visitor =
           new ResolverVisitor(compiler, funElement,
-              new ResolutionRegistry.internal(compiler,
+              new ResolutionRegistry(compiler,
                   new CollectingTreeElements(funElement)));
       FunctionExpression function =
           (funElement as FunctionElementX).parseNode(compiler);
@@ -277,7 +282,7 @@
       ClassElement fooElement = compiler.mainApp.find("Foo");
       FunctionElement funElement = fooElement.lookupLocalMember("foo");
       ResolverVisitor visitor = new ResolverVisitor(compiler, funElement,
-          new ResolutionRegistry.internal(compiler,
+          new ResolutionRegistry(compiler,
               new CollectingTreeElements(funElement)));
       FunctionExpression function =
           (funElement as FunctionElementX).parseNode(compiler);
@@ -421,7 +426,7 @@
 
     MethodScope scope = visitor.scope;
     Expect.equals(0, scope.elements.length);
-    Expect.equals(7, map(visitor).length);
+    Expect.equals(5, map(visitor).length);
 
     VariableDefinitions initializer = tree.initializer;
     Node iNode = initializer.definitions.nodes.head;
@@ -442,24 +447,16 @@
     checkSend(iElement, nodes[1], elements[1]);
 
     // for (int i = 0; i < 10; i = i + 1) { i = 5; };
-    //                         ^
-    checkIdentifier(iElement, nodes[2], elements[2]);
-
-    // for (int i = 0; i < 10; i = i + 1) { i = 5; };
     //                             ^
-    checkSend(iElement, nodes[3], elements[3]);
+    checkSend(iElement, nodes[2], elements[2]);
 
     // for (int i = 0; i < 10; i = i + 1) { i = 5; };
     //                         ^^^^^^^^^
-    checkSendSet(iElement, nodes[4], elements[4]);
-
-    // for (int i = 0; i < 10; i = i + 1) { i = 5; };
-    //                                      ^
-    checkIdentifier(iElement, nodes[5], elements[5]);
+    checkSendSet(iElement, nodes[3], elements[3]);
 
     // for (int i = 0; i < 10; i = i + 1) { i = 5; };
     //                                      ^^^^^
-    checkSendSet(iElement, nodes[6], elements[6]);
+    checkSendSet(iElement, nodes[4], elements[4]);
   });
 }
 
@@ -573,7 +570,7 @@
 
     ResolverVisitor visitor =
         new ResolverVisitor(compiler, null,
-            new ResolutionRegistry.internal(compiler,
+            new ResolutionRegistry(compiler,
                 new CollectingTreeElements(null)));
     compiler.resolveStatement("Foo bar;");
 
@@ -598,8 +595,8 @@
     compiler.resolveStatement("Foo bar;");
 
     ClassElement c = compiler.mainApp.find('C');
-    Element i1 = compiler.mainApp.find('I1');
-    Element i2 = compiler.mainApp.find('I2');
+    ClassElement i1 = compiler.mainApp.find('I1');
+    ClassElement i2 = compiler.mainApp.find('I2');
 
     Expect.equals(2, length(c.interfaces));
     Expect.equals(i1.computeType(compiler), at(c.interfaces, 0));
@@ -690,7 +687,7 @@
     FunctionExpression tree = (element as FunctionElement).node;
     ResolverVisitor visitor =
         new ResolverVisitor(compiler, element,
-            new ResolutionRegistry.internal(compiler,
+            new ResolutionRegistry(compiler,
                 new CollectingTreeElements(element)));
     new InitializerResolver(visitor, element, tree).resolveInitializers();
     visitor.visit(tree.body);
@@ -1222,7 +1219,9 @@
   checkWarningOn('''
       m() {}
       main() { m = 4; }
-      ''', [MessageKind.ASSIGNING_METHOD]);
+      ''', [MessageKind.ASSIGNING_METHOD,
+            // TODO(johnniwinther): Avoid duplicate warnings.
+            MessageKind.NOT_ASSIGNABLE]);
 
   // Can't override instance methods
   checkWarningOn('''
@@ -1255,7 +1254,9 @@
           super.mname = () => 6;
         }
       }
-      ''', [MessageKind.ASSIGNING_METHOD_IN_SUPER]);
+      ''', [MessageKind.ASSIGNING_METHOD_IN_SUPER,
+            // TODO(johnniwinther): Avoid duplicate warnings.
+            MessageKind.SETTER_NOT_FOUND]);
 
   // But index operators should be OK
   checkWarningOn('''
@@ -1331,7 +1332,9 @@
       class B extends A {
         m() { super.x = 2; }
       }
-      ''', [MessageKind.SETTER_NOT_FOUND_IN_SUPER]);
+      ''', [MessageKind.ASSIGNING_FINAL_FIELD_IN_SUPER,
+            // TODO(johnniwinther): Avoid duplicate warnings.
+            MessageKind.SETTER_NOT_FOUND]);
 
   // But non-final fields are OK:
   checkWarningOn('''
@@ -1343,14 +1346,30 @@
         m() { super.x = 2; }
       }
       ''', []);
+
+  // Check getter without setter.
+  checkWarningOn('''
+      main() => new B().m();
+      class A {
+        get x => 1;
+      }
+      class B extends A {
+        m() { super.x = 2; }
+      }
+      ''', [MessageKind.SETTER_NOT_FOUND_IN_SUPER,
+            // TODO(johnniwinther): Avoid duplicate warnings.
+            MessageKind.SETTER_NOT_FOUND]);
 }
 
 /// Helper to test that [script] produces all the given [warnings].
 checkWarningOn(String script, List<MessageKind> warnings) {
   Expect.isTrue(warnings.length >= 0 && warnings.length <= 2);
   asyncTest(() => compileScript(script).then((compiler) {
-    Expect.equals(0, compiler.errors.length);
-    Expect.equals(warnings.length, compiler.warnings.length);
+    Expect.equals(0, compiler.errors.length,
+        'Unexpected errors in\n$script\n${compiler.errors}');
+    Expect.equals(warnings.length, compiler.warnings.length,
+        'Unexpected warnings in\n$script\n'
+        'Expected:$warnings\nFound:${compiler.warnings}');
     for (int i = 0; i < warnings.length; i++) {
       Expect.equals(warnings[i], compiler.warnings[i].message.kind);
     }
diff --git a/tests/compiler/dart2js/semantic_visitor_test.dart b/tests/compiler/dart2js/semantic_visitor_test.dart
index 10833d3..37d83bb 100644
--- a/tests/compiler/dart2js/semantic_visitor_test.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test.dart
@@ -10,13 +10,17 @@
 import 'package:expect/expect.dart';
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/dart_types.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/diagnostics/spannable.dart';
+import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/resolution/resolution.dart';
-import 'package:compiler/src/resolution/semantic_visitor.dart';
 import 'package:compiler/src/resolution/operators.dart';
+import 'package:compiler/src/resolution/semantic_visitor.dart';
+import 'package:compiler/src/resolution/tree_elements.dart';
 import 'package:compiler/src/tree/tree.dart';
-import 'package:compiler/src/util/util.dart';
+import 'package:compiler/src/universe/universe.dart' show
+    CallStructure,
+    Selector;
 import 'memory_compiler.dart';
 
 part 'semantic_visitor_test_send_data.dart';
@@ -178,50 +182,29 @@
   // A final field shadowing a non-final field is currently not supported in
   // resolution.
   VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND,
+  VisitKind.VISIT_SUPER_FIELD_FIELD_SET_IF_NULL,
   VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX,
   VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX,
   // Combination of method and setter with the same name is currently not
   // supported by the element model.
   VisitKind.VISIT_STATIC_METHOD_SETTER_COMPOUND,
+  VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
   VisitKind.VISIT_STATIC_METHOD_SETTER_PREFIX,
   VisitKind.VISIT_STATIC_METHOD_SETTER_POSTFIX,
   VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
+  VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_SET_IF_NULL,
   VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
   VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
   VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND,
+  VisitKind.VISIT_SUPER_METHOD_SETTER_SET_IF_NULL,
   VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX,
   VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX,
-  // The constant expressions of assignment to constant type literals cannot be
-  // handled the compile constant evaluator.
-  VisitKind.VISIT_CLASS_TYPE_LITERAL_SET,
-  VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET,
-  VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
-  // Invalid assignments is currently report through an erroneous element.
-  VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
-  VisitKind.VISIT_FINAL_PARAMETER_SET,
-  VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET,
-  VisitKind.VISIT_LOCAL_FUNCTION_SET,
-  VisitKind.VISIT_STATIC_GETTER_SET,
-  VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
-  VisitKind.VISIT_STATIC_FUNCTION_SET,
-  VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
-  VisitKind.VISIT_TOP_LEVEL_GETTER_SET,
-  VisitKind.VISIT_TOP_LEVEL_FUNCTION_SET,
-  VisitKind.VISIT_FINAL_SUPER_FIELD_SET,
-  VisitKind.VISIT_SUPER_GETTER_SET,
-  VisitKind.VISIT_SUPER_METHOD_SET,
   // The only undefined unary, `+`, is currently handled and skipped in the
   // parser.
   VisitKind.ERROR_UNDEFINED_UNARY_EXPRESSION,
   // Constant expression are currently not computed during resolution.
   VisitKind.VISIT_CONSTANT_GET,
   VisitKind.VISIT_CONSTANT_INVOKE,
-  // TODO(johnniwinther): Test these when ResolverVisitor.visitSendSet has been
-  // rewritten.
-  VisitKind.ERROR_INVALID_SET,
-  VisitKind.ERROR_INVALID_PREFIX,
-  VisitKind.ERROR_INVALID_POSTFIX,
-  VisitKind.ERROR_INVALID_COMPOUND,
 ];
 
 main(List<String> arguments) {
@@ -392,10 +375,12 @@
   VISIT_PARAMETER_SET,
   VISIT_PARAMETER_INVOKE,
   VISIT_PARAMETER_COMPOUND,
+  VISIT_PARAMETER_SET_IF_NULL,
   VISIT_PARAMETER_PREFIX,
   VISIT_PARAMETER_POSTFIX,
   VISIT_FINAL_PARAMETER_SET,
   VISIT_FINAL_PARAMETER_COMPOUND,
+  VISIT_FINAL_PARAMETER_SET_IF_NULL,
   VISIT_FINAL_PARAMETER_PREFIX,
   VISIT_FINAL_PARAMETER_POSTFIX,
 
@@ -403,12 +388,14 @@
   VISIT_LOCAL_VARIABLE_SET,
   VISIT_LOCAL_VARIABLE_INVOKE,
   VISIT_LOCAL_VARIABLE_COMPOUND,
+  VISIT_LOCAL_VARIABLE_SET_IF_NULL,
   VISIT_LOCAL_VARIABLE_PREFIX,
   VISIT_LOCAL_VARIABLE_POSTFIX,
   VISIT_LOCAL_VARIABLE_DECL,
   VISIT_LOCAL_CONSTANT_DECL,
   VISIT_FINAL_LOCAL_VARIABLE_SET,
   VISIT_FINAL_LOCAL_VARIABLE_COMPOUND,
+  VISIT_FINAL_LOCAL_VARIABLE_SET_IF_NULL,
   VISIT_FINAL_LOCAL_VARIABLE_PREFIX,
   VISIT_FINAL_LOCAL_VARIABLE_POSTFIX,
 
@@ -419,6 +406,7 @@
   VISIT_CLOSURE_DECL,
   VISIT_LOCAL_FUNCTION_SET,
   VISIT_LOCAL_FUNCTION_COMPOUND,
+  VISIT_LOCAL_FUNCTION_SET_IF_NULL,
   VISIT_LOCAL_FUNCTION_PREFIX,
   VISIT_LOCAL_FUNCTION_POSTFIX,
 
@@ -426,6 +414,7 @@
   VISIT_STATIC_FIELD_SET,
   VISIT_STATIC_FIELD_INVOKE,
   VISIT_STATIC_FIELD_COMPOUND,
+  VISIT_STATIC_FIELD_SET_IF_NULL,
   VISIT_STATIC_FIELD_PREFIX,
   VISIT_STATIC_FIELD_POSTFIX,
   VISIT_STATIC_FIELD_DECL,
@@ -440,7 +429,9 @@
   VISIT_STATIC_SETTER_INVOKE,
 
   VISIT_STATIC_GETTER_SETTER_COMPOUND,
+  VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
   VISIT_STATIC_METHOD_SETTER_COMPOUND,
+  VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
   VISIT_STATIC_GETTER_SETTER_PREFIX,
   VISIT_STATIC_GETTER_SETTER_POSTFIX,
 
@@ -449,6 +440,7 @@
 
   VISIT_FINAL_STATIC_FIELD_SET,
   VISIT_STATIC_FINAL_FIELD_COMPOUND,
+  VISIT_STATIC_FINAL_FIELD_SET_IF_NULL,
   VISIT_STATIC_FINAL_FIELD_POSTFIX,
   VISIT_STATIC_FINAL_FIELD_PREFIX,
 
@@ -461,8 +453,11 @@
   VISIT_STATIC_METHOD_SETTER_POSTFIX,
 
   VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND,
+  VISIT_UNRESOLVED_STATIC_GETTER_SET_IF_NULL,
   VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND,
+  VISIT_UNRESOLVED_STATIC_SETTER_SET_IF_NULL,
   VISIT_STATIC_METHOD_COMPOUND,
+  VISIT_STATIC_METHOD_SET_IF_NULL,
   VISIT_UNRESOLVED_STATIC_GETTER_PREFIX,
   VISIT_UNRESOLVED_STATIC_SETTER_PREFIX,
   VISIT_STATIC_METHOD_PREFIX,
@@ -475,11 +470,13 @@
   VISIT_TOP_LEVEL_FIELD_INVOKE,
   VISIT_FINAL_TOP_LEVEL_FIELD_SET,
   VISIT_TOP_LEVEL_FIELD_COMPOUND,
+  VISIT_TOP_LEVEL_FIELD_SET_IF_NULL,
   VISIT_TOP_LEVEL_FIELD_PREFIX,
   VISIT_TOP_LEVEL_FIELD_POSTFIX,
   VISIT_TOP_LEVEL_FIELD_DECL,
   VISIT_TOP_LEVEL_CONSTANT_DECL,
   VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND,
+  VISIT_TOP_LEVEL_FINAL_FIELD_SET_IF_NULL,
   VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX,
   VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX,
 
@@ -490,6 +487,7 @@
   VISIT_TOP_LEVEL_SETTER_SET,
   VISIT_TOP_LEVEL_SETTER_INVOKE,
   VISIT_TOP_LEVEL_GETTER_SETTER_COMPOUND,
+  VISIT_TOP_LEVEL_GETTER_SETTER_SET_IF_NULL,
   VISIT_TOP_LEVEL_GETTER_SETTER_PREFIX,
   VISIT_TOP_LEVEL_GETTER_SETTER_POSTFIX,
   VISIT_TOP_LEVEL_GETTER_DECL,
@@ -501,12 +499,16 @@
   VISIT_TOP_LEVEL_FUNCTION_INCOMPATIBLE_INVOKE,
   VISIT_TOP_LEVEL_FUNCTION_DECL,
   VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
+  VISIT_TOP_LEVEL_METHOD_SETTER_SET_IF_NULL,
   VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
   VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
 
   VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND,
+  VISIT_UNRESOLVED_TOP_LEVEL_GETTER_SET_IF_NULL,
   VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND,
+  VISIT_UNRESOLVED_TOP_LEVEL_SETTER_SET_IF_NULL,
   VISIT_TOP_LEVEL_METHOD_COMPOUND,
+  VISIT_TOP_LEVEL_METHOD_SET_IF_NULL,
   VISIT_UNRESOLVED_TOP_LEVEL_GETTER_PREFIX,
   VISIT_UNRESOLVED_TOP_LEVEL_SETTER_PREFIX,
   VISIT_TOP_LEVEL_METHOD_PREFIX,
@@ -518,6 +520,7 @@
   VISIT_DYNAMIC_PROPERTY_SET,
   VISIT_DYNAMIC_PROPERTY_INVOKE,
   VISIT_DYNAMIC_PROPERTY_COMPOUND,
+  VISIT_DYNAMIC_PROPERTY_SET_IF_NULL,
   VISIT_DYNAMIC_PROPERTY_PREFIX,
   VISIT_DYNAMIC_PROPERTY_POSTFIX,
 
@@ -528,6 +531,7 @@
   VISIT_THIS_PROPERTY_SET,
   VISIT_THIS_PROPERTY_INVOKE,
   VISIT_THIS_PROPERTY_COMPOUND,
+  VISIT_THIS_PROPERTY_SET_IF_NULL,
   VISIT_THIS_PROPERTY_PREFIX,
   VISIT_THIS_PROPERTY_POSTFIX,
 
@@ -536,12 +540,15 @@
   VISIT_FINAL_SUPER_FIELD_SET,
   VISIT_SUPER_FIELD_INVOKE,
   VISIT_SUPER_FIELD_COMPOUND,
+  VISIT_SUPER_FIELD_SET_IF_NULL,
   VISIT_SUPER_FIELD_PREFIX,
   VISIT_SUPER_FIELD_POSTFIX,
   VISIT_SUPER_FINAL_FIELD_COMPOUND,
+  VISIT_SUPER_FINAL_FIELD_SET_IF_NULL,
   VISIT_SUPER_FINAL_FIELD_PREFIX,
   VISIT_SUPER_FINAL_FIELD_POSTFIX,
   VISIT_SUPER_FIELD_FIELD_COMPOUND,
+  VISIT_SUPER_FIELD_FIELD_SET_IF_NULL,
   VISIT_SUPER_FIELD_FIELD_PREFIX,
   VISIT_SUPER_FIELD_FIELD_POSTFIX,
 
@@ -552,8 +559,11 @@
   VISIT_SUPER_SETTER_SET,
   VISIT_SUPER_SETTER_INVOKE,
   VISIT_SUPER_GETTER_SETTER_COMPOUND,
+  VISIT_SUPER_GETTER_SETTER_SET_IF_NULL,
   VISIT_SUPER_GETTER_FIELD_COMPOUND,
+  VISIT_SUPER_GETTER_FIELD_SET_IF_NULL,
   VISIT_SUPER_FIELD_SETTER_COMPOUND,
+  VISIT_SUPER_FIELD_SETTER_SET_IF_NULL,
   VISIT_SUPER_GETTER_SETTER_PREFIX,
   VISIT_SUPER_GETTER_FIELD_PREFIX,
   VISIT_SUPER_FIELD_SETTER_PREFIX,
@@ -566,9 +576,11 @@
   VISIT_SUPER_METHOD_INVOKE,
   VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE,
   VISIT_SUPER_METHOD_SETTER_COMPOUND,
+  VISIT_SUPER_METHOD_SETTER_SET_IF_NULL,
   VISIT_SUPER_METHOD_SETTER_PREFIX,
   VISIT_SUPER_METHOD_SETTER_POSTFIX,
   VISIT_SUPER_METHOD_COMPOUND,
+  VISIT_SUPER_METHOD_SET_IF_NULL,
   VISIT_SUPER_METHOD_PREFIX,
   VISIT_SUPER_METHOD_POSTFIX,
 
@@ -593,7 +605,9 @@
   VISIT_SUPER_NOT_EQUALS,
   VISIT_SUPER_INDEX_PREFIX,
   VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND,
+  VISIT_UNRESOLVED_SUPER_GETTER_SET_IF_NULL,
   VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND,
+  VISIT_UNRESOLVED_SUPER_SETTER_SET_IF_NULL,
   VISIT_UNRESOLVED_SUPER_GETTER_PREFIX,
   VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
   VISIT_UNRESOLVED_SUPER_INDEX_PREFIX,
@@ -607,6 +621,7 @@
   VISIT_UNRESOLVED_SUPER_SETTER_INDEX_POSTFIX,
 
   VISIT_UNRESOLVED_SUPER_COMPOUND,
+  VISIT_UNRESOLVED_SUPER_SET_IF_NULL,
   VISIT_UNRESOLVED_SUPER_PREFIX,
   VISIT_UNRESOLVED_SUPER_POSTFIX,
 
@@ -621,6 +636,7 @@
   VISIT_CLASS_TYPE_LITERAL_SET,
   VISIT_CLASS_TYPE_LITERAL_INVOKE,
   VISIT_CLASS_TYPE_LITERAL_COMPOUND,
+  VISIT_CLASS_TYPE_LITERAL_SET_IF_NULL,
   VISIT_CLASS_TYPE_LITERAL_PREFIX,
   VISIT_CLASS_TYPE_LITERAL_POSTFIX,
 
@@ -628,6 +644,7 @@
   VISIT_TYPEDEF_TYPE_LITERAL_SET,
   VISIT_TYPEDEF_TYPE_LITERAL_INVOKE,
   VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
+  VISIT_TYPEDEF_TYPE_LITERAL_SET_IF_NULL,
   VISIT_TYPEDEF_TYPE_LITERAL_PREFIX,
   VISIT_TYPEDEF_TYPE_LITERAL_POSTFIX,
 
@@ -635,6 +652,7 @@
   VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
   VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE,
   VISIT_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND,
+  VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET_IF_NULL,
   VISIT_TYPE_VARIABLE_TYPE_LITERAL_PREFIX,
   VISIT_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
 
@@ -642,6 +660,7 @@
   VISIT_DYNAMIC_TYPE_LITERAL_SET,
   VISIT_DYNAMIC_TYPE_LITERAL_INVOKE,
   VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
+  VISIT_DYNAMIC_TYPE_LITERAL_SET_IF_NULL,
   VISIT_DYNAMIC_TYPE_LITERAL_PREFIX,
   VISIT_DYNAMIC_TYPE_LITERAL_POSTFIX,
 
@@ -703,6 +722,7 @@
   VISIT_NAMED_INITIALIZING_FORMAL_DECL,
 
   VISIT_UNRESOLVED_COMPOUND,
+  VISIT_UNRESOLVED_SET_IF_NULL,
   VISIT_UNRESOLVED_PREFIX,
   VISIT_UNRESOLVED_POSTFIX,
 
@@ -711,6 +731,7 @@
   VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET,
   VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_INVOKE,
   VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_COMPOUND,
+  VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET_IF_NULL,
   VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_PREFIX,
   VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_POSTFIX,
 
@@ -723,6 +744,7 @@
   ERROR_INVALID_PREFIX,
   ERROR_INVALID_POSTFIX,
   ERROR_INVALID_COMPOUND,
+  ERROR_INVALID_SET_IF_NULL,
   ERROR_INVALID_UNARY,
   ERROR_INVALID_EQUALS,
   ERROR_INVALID_NOT_EQUALS,
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
index d1fa072..8dc6e3d 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_data.dart
@@ -19,10 +19,9 @@
                     element: 'parameter(m#o)',
                     arguments: '(null,42)',
                     selector: 'CallStructure(arity=2)')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_PARAMETER_SET] instead.
     const Test('m(final o) { o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_PARAMETER_SET,
+                    element: 'parameter(m#o)',
                     rhs:'42')),
   ],
   'Local variables': const [
@@ -39,15 +38,13 @@
                     element: 'variable(m#o)',
                     arguments: '(null,42)',
                     selector: 'CallStructure(arity=2)')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_LOCAL_VARIABLE_SET] instead.
     const Test('m() { final o = 0; o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET,
+                    element: 'variable(m#o)',
                     rhs:'42')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_LOCAL_VARIABLE_SET] instead.
     const Test('m() { const o = 0; o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET,
+                    element: 'variable(m#o)',
                     rhs:'42')),
   ],
   'Local functions': const [
@@ -65,10 +62,9 @@
                     element: 'function(m#o)',
                     arguments: '(null,42)',
                     selector: 'CallStructure(arity=2)')),
-    // TODO(johnniwinther): Expect [VISIT_LOCAL_FUNCTION_SET] instead.
     const Test('m() { o(a, b) {}; o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_LOCAL_FUNCTION_SET,
+                    element: 'function(m#o)',
                     rhs: '42')),
   ],
   'Static fields': const [
@@ -107,6 +103,15 @@
         'm() => p.C.o;',
         const Visit(VisitKind.VISIT_STATIC_FIELD_GET,
                     element: 'field(C#o)')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() => o;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_GET,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE)),
     const Test.prefix(
         '''
         class C {
@@ -133,6 +138,16 @@
     const Test(
         '''
         class C {
+          var o;
+        }
+        m() { C.o = 42; }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
+                    name: 'o',
+                    rhs: '42')),
+    const Test(
+        '''
+        class C {
           C.o();
         }
         m() => C.o;
@@ -189,7 +204,9 @@
         null),
     const Test(
         '''
-        class C { static var o; }
+        class C {
+          static var o;
+        }
         m() { C.o = 42; }
         ''',
         const Visit(VisitKind.VISIT_STATIC_FIELD_SET,
@@ -225,9 +242,21 @@
         const Visit(VisitKind.VISIT_STATIC_FIELD_SET,
                     element: 'field(C#o)',
                     rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { o = 42; }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_SET,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    rhs: '42')),
     const Test(
         '''
-        class C { static var o; }
+        class C {
+          static var o;
+        }
         m() { C.o(null, 42); }
         ''',
         const Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE,
@@ -253,6 +282,16 @@
         const Visit(VisitKind.VISIT_STATIC_FIELD_INVOKE,
                     element: 'field(C#o)',
                     arguments: '(null,42)')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { o(null, 42); }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_INVOKE,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    arguments: '(null,42)')),
     const Test.prefix(
         '''
         class C {
@@ -269,15 +308,15 @@
         m() => C.this(null, 42);
         ''',
         const Visit(VisitKind.ERROR_INVALID_INVOKE,
-                    error: MessageKind.THIS_PROPERTY, arguments: '(null,42)')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_STATIC_FIELD_SET] instead.
+                    error: MessageKind.THIS_PROPERTY,
+                    arguments: '(null,42)')),
     const Test(
         '''
         class C { static final o = 0; }
         m() { C.o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -286,8 +325,8 @@
           m() { o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -296,8 +335,8 @@
           m() { C.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.prefix(
         '''
@@ -306,16 +345,16 @@
         }
         ''',
         'm() { p.C.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test(
         '''
         class C { static const o = 0; }
         m() { C.o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -324,8 +363,8 @@
           m() { o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -334,8 +373,8 @@
           m() { C.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
     const Test.prefix(
         '''
@@ -344,8 +383,8 @@
         }
         ''',
         'm() { p.C.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_STATIC_FIELD_SET,
+                    element: 'field(C#o)',
                     rhs: '42')),
   ],
   'Static properties': const [
@@ -386,14 +425,13 @@
         'm() => p.C.o;',
         const Visit(VisitKind.VISIT_STATIC_GETTER_GET,
                     element: 'getter(C#o)')),
-    // TODO(johnniwinther): Expected [VISIT_STATIC_GETTER_SET] instead.
     const Test(
         '''
         class C { static get o => 42; }
         m() { C.o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SET,
+                    element: 'getter(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -402,8 +440,8 @@
           m() { o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SET,
+                    element: 'getter(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -412,8 +450,8 @@
           m() { C.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SET,
+                    element: 'getter(C#o)',
                     rhs: '42')),
     const Test.prefix(
         '''
@@ -422,8 +460,8 @@
         }
         ''',
         'm() { p.C.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SET,
+                    element: 'getter(C#o)',
                     rhs: '42')),
     const Test(
         '''
@@ -613,14 +651,13 @@
         ''',
         const Visit(VisitKind.VISIT_STATIC_FUNCTION_GET,
                     element: 'function(C#o)')),
-    // TODO(johnniwinther): Expect [VISIT_STATIC_FUNCTION_SET] instead.
     const Test(
         '''
         class C { static o(a, b) {} }
         m() { C.o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_FUNCTION_SET,
+                    element: 'function(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -629,8 +666,8 @@
           m() { o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_FUNCTION_SET,
+                    element: 'function(C#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -639,8 +676,8 @@
           m() { C.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_FUNCTION_SET,
+                    element: 'function(C#o)',
                     rhs: '42')),
     const Test.prefix(
         '''
@@ -649,8 +686,8 @@
         '''
         m() { p.C.o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_STATIC_FUNCTION_SET,
+                    element: 'function(C#o)',
                     rhs: '42')),
     const Test(
         '''
@@ -766,38 +803,37 @@
         const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET,
                     element: 'field(o)',
                     rhs: '42')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_TOP_LEVEL_FIELD_SET] instead.
     const Test(
         '''
         final o = 0;
         m() { o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
+                    element: 'field(o)',
                     rhs: '42')),
     const Test.prefix(
         '''
         final o = 0;
         ''',
         'm() { p.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
+                    element: 'field(o)',
                     rhs: '42')),
     const Test(
         '''
         const o = 0;
         m() { o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
+                    element: 'field(o)',
                     rhs: '42')),
     const Test.prefix(
         '''
         const o = 0;
         ''',
         'm() { p.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_TOP_LEVEL_FIELD_SET,
+                    element: 'field(o)',
                     rhs: '42')),
     const Test(
         '''
@@ -821,6 +857,13 @@
         ''',
         const Visit(VisitKind.VISIT_UNRESOLVED_GET,
                     name: 'o')),
+    const Test(
+        '''
+        m() { o = 42; }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
+                    name: 'o',
+                    rhs: '42')),
   ],
   'Top level properties': const [
     // Top level properties
@@ -856,22 +899,21 @@
         ''',
         const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_GET,
                     element: 'setter(o)')),
-    // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_GETTER_SET] instead.
     const Test(
         '''
         get o => null;
         m() { o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_SET,
+                    element: 'getter(o)',
                     rhs: '42')),
     const Test.prefix(
         '''
         get o => null;
         ''',
         'm() { p.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_SET,
+                    element: 'getter(o)',
                     rhs: '42')),
     const Test(
         '''
@@ -1001,22 +1043,21 @@
         const Visit(VisitKind.ERROR_INVALID_INVOKE,
                     error: MessageKind.PREFIX_AS_EXPRESSION,
                     arguments: '(null,42)')),
-    // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_FUNCTION_SET] instead.
     const Test(
         '''
         o(a, b) {}
         m() { o = 42; }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_SET,
+                    element: 'function(o)',
                     rhs: '42')),
     const Test.prefix(
         '''
         o(a, b) {}
         ''',
         'm() { p.o = 42; }',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_FUNCTION_SET,
+                    element: 'function(o)',
                     rhs: '42')),
   ],
   'Dynamic properties': const [
@@ -1066,6 +1107,16 @@
         ''',
         const Visit(VisitKind.VISIT_THIS_INVOKE,
                     arguments: '(null,42)')),
+    const Test.clazz(
+        '''
+        class C {
+          call(a, b) {}
+          static m() { this(null, 42); }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_INVOKE,
+                    error: MessageKind.NO_THIS_AVAILABLE,
+                    arguments: '(null,42)')),
   ],
   'This properties': const [
     // This properties
@@ -1099,6 +1150,15 @@
     const Test.clazz(
         '''
         class C {
+          var foo;
+          static m() => this.foo;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_GET,
+                    error: MessageKind.NO_THIS_AVAILABLE)),
+    const Test.clazz(
+        '''
+        class C {
           get foo => null;
           m() => this.foo;
         }
@@ -1165,6 +1225,16 @@
         const Visit(VisitKind.VISIT_THIS_PROPERTY_INVOKE,
                     name: 'foo',
                     arguments: '(null,42)')),
+    const Test.clazz(
+        '''
+        class C {
+          var foo;
+          static m() { this.foo(null, 42); }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_INVOKE,
+                    error: MessageKind.NO_THIS_AVAILABLE,
+                    arguments: '(null,42)')),
   ],
   'Super fields': const [
     // Super fields
@@ -1191,7 +1261,6 @@
         const Visit(VisitKind.VISIT_SUPER_FIELD_SET,
                     element: 'field(B#o)',
                     rhs: '42')),
-    // TODO(johnniwinther): Expect [VISIT_FINAL_SUPER_FIELD_SET] instead.
     const Test.clazz(
         '''
         class B {
@@ -1201,8 +1270,8 @@
           m() { super.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_FINAL_SUPER_FIELD_SET,
+                    element: 'field(B#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -1250,7 +1319,6 @@
         ''',
         const Visit(VisitKind.VISIT_SUPER_SETTER_GET,
                     element: 'setter(B#o)')),
-    // TODO(johnniwinther): Expect [VISIT_SUPER_GETTER_SET] instead.
     const Test.clazz(
         '''
         class B {
@@ -1260,8 +1328,8 @@
           m() { super.o = 42; }
         }
         ''',
-        const Visit(VisitKind.VISIT_UNRESOLVED_SET,
-                    name: 'o',
+        const Visit(VisitKind.VISIT_SUPER_GETTER_SET,
+                    element: 'getter(B#o)',
                     rhs: '42')),
     const Test.clazz(
         '''
@@ -1319,6 +1387,18 @@
           o(a, b) {}
         }
         class C extends B {
+          m() { super.o = 42; }
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_METHOD_SET,
+                    element: 'function(B#o)',
+                    rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          o(a, b) {}
+        }
+        class C extends B {
           m() { super.o(null, 42); }
         }
         ''',
@@ -1375,6 +1455,14 @@
     const Test(
         '''
         class C {}
+        m() => C = 42;
+        ''',
+        const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_SET,
+                    constant: 'C',
+                    rhs: '42')),
+    const Test(
+        '''
+        class C {}
         m() => C += 42;
         ''',
         const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_COMPOUND,
@@ -1384,6 +1472,14 @@
     const Test(
         '''
         class C {}
+        m() => C ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_SET_IF_NULL,
+                    constant: 'C',
+                    rhs: '42')),
+    const Test(
+        '''
+        class C {}
         m() => ++C;
         ''',
         const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_PREFIX,
@@ -1429,6 +1525,14 @@
     const Test(
         '''
         typedef F();
+        m() => F = 42;
+        ''',
+        const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET,
+                    constant: 'F',
+                    rhs: '42')),
+    const Test(
+        '''
+        typedef F();
         m() => F += 42;
         ''',
         const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
@@ -1438,6 +1542,14 @@
     const Test(
         '''
         typedef F();
+        m() => F ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET_IF_NULL,
+                    constant: 'F',
+                    rhs: '42')),
+    const Test(
+        '''
+        typedef F();
         m() => ++F;
         ''',
         const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_PREFIX,
@@ -1474,6 +1586,15 @@
     const Test.clazz(
         '''
         class C<T> {
+          m() => T = 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
+                    element: 'type_variable(C#T)',
+                    rhs: '42')),
+    const Test.clazz(
+        '''
+        class C<T> {
           m() => T += 42;
         }
         ''',
@@ -1484,6 +1605,15 @@
     const Test.clazz(
         '''
         class C<T> {
+          m() => T ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET_IF_NULL,
+                    element: 'type_variable(C#T)',
+                    rhs: '42')),
+    const Test.clazz(
+        '''
+        class C<T> {
           m() => ++T;
         }
         ''',
@@ -1499,7 +1629,59 @@
         const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
                     element: 'type_variable(C#T)',
                     operator: '--')),
-
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => T;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_GET,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER)),
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => T(null, 42);
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_INVOKE,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+                    arguments: '(null,42)')),
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => T ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_SET_IF_NULL,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+                    rhs: '42')),
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => T ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_SET_IF_NULL,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+                    rhs: '42')),
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => ++T;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_PREFIX,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+                    operator: '++')),
+    const Test.clazz(
+        '''
+        class C<T> {
+          static m() => T--;
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_POSTFIX,
+                    error: MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+                    operator: '--')),
   ],
   'Dynamic type literals': const [
     // Dynamic type literals
@@ -1521,25 +1703,39 @@
                     arguments: '(null,42)')),
     const Test(
         '''
+        m() => dynamic = 42;
+        ''',
+        const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
+                    constant: 'dynamic',
+                    rhs: '42')),
+    const Test(
+        '''
         m() => dynamic += 42;
         ''',
         const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
-                    constant: 'Type',
+                    constant: 'dynamic',
                     operator: '+=',
                     rhs: '42')),
     const Test(
         '''
+        m() => dynamic ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET_IF_NULL,
+                    constant: 'dynamic',
+                    rhs: '42')),
+    const Test(
+        '''
         m() => ++dynamic;
         ''',
         const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_PREFIX,
-                    constant: 'Type',
+                    constant: 'dynamic',
                     operator: '++')),
     const Test(
         '''
         m() => dynamic--;
         ''',
         const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_POSTFIX,
-                    constant: 'Type',
+                    constant: 'dynamic',
                     operator: '--')),
   ],
   'Assert': const [
@@ -2118,9 +2314,7 @@
         ''',
         const [
           const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND,
-              receiver: 'a', operator: '+=', rhs: '42',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)'),
+              receiver: 'a', name: 'b', operator: '+=', rhs: '42'),
           const Visit(VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)')
         ]),
@@ -2217,6 +2411,17 @@
         ''',
         const Visit(VisitKind.VISIT_STATIC_FIELD_COMPOUND,
             element: 'field(C#a)', operator: '+=', rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { o += 42; }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_COMPOUND,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    operator: '+=',
+                    rhs: '42')),
     const Test(
         '''
         class C {
@@ -2319,9 +2524,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_COMPOUND,
-            operator: '+=', rhs: '42',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            operator: '+=', name: 'a', rhs: '42')),
     const Test.clazz(
         '''
         class C {
@@ -2330,9 +2533,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_COMPOUND,
-            operator: '+=', rhs: '42',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            name: 'a', operator: '+=', rhs: '42')),
     const Test.clazz(
         '''
         class B {
@@ -2633,9 +2834,7 @@
         ''',
         const [
           const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_PREFIX,
-              receiver: 'a', operator: '--',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)'),
+              receiver: 'a', name: 'b', operator: '--'),
           const Visit(VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)')
         ]),
@@ -2732,6 +2931,16 @@
         ''',
         const Visit(VisitKind.VISIT_STATIC_FIELD_PREFIX,
             element: 'field(C#a)', operator: '--')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { ++o; }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_PREFIX,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    operator: '++')),
     const Test(
         '''
         class C {
@@ -2786,9 +2995,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_PREFIX,
-            operator: '--',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            name: 'a', operator: '--')),
     const Test.clazz(
         '''
         class C {
@@ -2797,9 +3004,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_PREFIX,
-            operator: '++',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            name: 'a', operator: '++')),
     const Test.clazz(
         '''
         class B {
@@ -3014,9 +3219,7 @@
         ''',
         const [
           const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_POSTFIX,
-              receiver: 'a', operator: '--',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)'),
+              receiver: 'a', name: 'b', operator: '--'),
           const Visit(VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)')
         ]),
@@ -3113,6 +3316,16 @@
         ''',
         const Visit(VisitKind.VISIT_STATIC_FIELD_POSTFIX,
             element: 'field(C#a)', operator: '--')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { o--; }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_POSTFIX,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    operator: '--')),
     const Test(
         '''
         class C {
@@ -3167,9 +3380,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_POSTFIX,
-            operator: '--',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            name: 'a', operator: '--')),
     const Test.clazz(
         '''
         class C {
@@ -3178,9 +3389,7 @@
         }
         ''',
         const Visit(VisitKind.VISIT_THIS_PROPERTY_POSTFIX,
-            operator: '++',
-            getter: 'Selector(getter, a, arity=0)',
-            setter: 'Selector(setter, a, arity=1)')),
+            name: 'a', operator: '++')),
     const Test.clazz(
         '''
         class B {
@@ -3698,15 +3907,9 @@
         }
         m(a) => C?.b;
         ''',
-        const [
-          const Visit(
-              VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_GET,
-              receiver: 'C',
-              name: 'b'),
-          const Visit(
-              VisitKind.VISIT_CLASS_TYPE_LITERAL_GET,
-              constant: 'C'),
-        ]),
+        const Visit(
+            VisitKind.VISIT_STATIC_FIELD_GET,
+            element: 'field(C#b)')),
     const Test(
         '''
         m(a) => a?.b = 42;
@@ -3742,10 +3945,7 @@
         const [
           const Visit(
               VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_PREFIX,
-              receiver: 'a',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)',
-              operator: '++'),
+              receiver: 'a', name: 'b', operator: '++'),
           const Visit(
               VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)'),
@@ -3757,10 +3957,7 @@
         const [
           const Visit(
               VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_POSTFIX,
-              receiver: 'a',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)',
-              operator: '--'),
+              receiver: 'a', name: 'b', operator: '--'),
           const Visit(
               VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)'),
@@ -3772,11 +3969,19 @@
         const [
           const Visit(
               VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_COMPOUND,
-              receiver: 'a',
-              getter: 'Selector(getter, b, arity=0)',
-              setter: 'Selector(setter, b, arity=1)',
-              operator: '*=',
-              rhs: '42'),
+              receiver: 'a', name: 'b', operator: '*=', rhs: '42'),
+          const Visit(
+              VisitKind.VISIT_PARAMETER_GET,
+              element: 'parameter(m#a)'),
+        ]),
+    const Test(
+        '''
+        m(a) => a?.b ??= 42;
+        ''',
+        const [
+          const Visit(
+              VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET_IF_NULL,
+              receiver: 'a', name: 'b', rhs: '42'),
           const Visit(
               VisitKind.VISIT_PARAMETER_GET,
               element: 'parameter(m#a)'),
@@ -3800,9 +4005,464 @@
         m(a) => a ??= 42;
         ''',
         const Visit(
-            VisitKind.VISIT_PARAMETER_COMPOUND,
+            VisitKind.VISIT_PARAMETER_SET_IF_NULL,
             element: 'parameter(m#a)',
-            operator: '??=',
             rhs: '42')),
+    const Test.prefix(
+        '''
+        var o;
+        ''',
+        'm() => p?.o;',
+        const Visit(VisitKind.ERROR_INVALID_GET,
+            error: MessageKind.PREFIX_AS_EXPRESSION)),
+  ],
+  'Set if null': const [
+    const Test(
+        '''
+        m(a) => a.b ??= 42;
+        ''',
+        const [
+          const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_SET_IF_NULL,
+              receiver: 'a', name: 'b', rhs: '42'),
+          const Visit(VisitKind.VISIT_PARAMETER_GET,
+              element: 'parameter(m#a)')
+        ]),
+    const Test(
+        '''
+        m(a) => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_PARAMETER_SET_IF_NULL,
+            element: 'parameter(m#a)', rhs: '42')),
+    const Test(
+        '''
+        m(final a) => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_FINAL_PARAMETER_SET_IF_NULL,
+            element: 'parameter(m#a)', rhs: '42')),
+    const Test(
+        '''
+        m() {
+          var a;
+          a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET_IF_NULL,
+            element: 'variable(m#a)', rhs: '42')),
+    const Test(
+        '''
+        m() {
+          final a = 0;
+          a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET_IF_NULL,
+            element: 'variable(m#a)', rhs: '42')),
+    const Test(
+        '''
+        m() {
+          a() {}
+          a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_LOCAL_FUNCTION_SET_IF_NULL,
+            element: 'function(m#a)', rhs: '42')),
+    const Test(
+        '''
+        var a;
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET_IF_NULL,
+            element: 'field(a)', rhs: '42')),
+    const Test(
+        '''
+        get a => 0;
+        set a(_) {}
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(a)', setter: 'setter(a)',
+            rhs: '42')),
+    const Test(
+        '''
+        class C {
+          static var a;
+        }
+        m() => C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_FIELD_SET_IF_NULL,
+            element: 'field(C#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static var a;
+          m() => C.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_FIELD_SET_IF_NULL,
+            element: 'field(C#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static var a;
+          m() => a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_FIELD_SET_IF_NULL,
+            element: 'field(C#a)', rhs: '42')),
+    const Test.prefix(
+        '''
+        class C {
+          static var a;
+        }
+        ''',
+        '''
+        m() => p.C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_FIELD_SET_IF_NULL,
+            element: 'field(C#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          var o;
+          static m() { o ??= 42; }
+        }
+        ''',
+        const Visit(VisitKind.ERROR_INVALID_SET_IF_NULL,
+                    error: MessageKind.NO_INSTANCE_AVAILABLE,
+                    rhs: '42')),
+    const Test(
+        '''
+        class C {
+          static get a => 0;
+          static set a(_) {}
+        }
+        m() => C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static get a => 0;
+          static set a(_) {}
+          m() => C.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static get a => 0;
+          static set a(_) {}
+          m() => a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.prefix(
+        '''
+        class C {
+          static get a => 0;
+          static set a(_) {}
+        }
+        ''',
+        '''
+        m() => p.C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    // TODO(johnniwinther): Enable these when dart2js supports method and setter
+    // with the same name.
+    /*const Test(
+        '''
+        class C {
+          static a() {}
+          static set a(_) {}
+        }
+        m() => C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
+            getter: 'function(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static a() {}
+          static set a(_) {}
+          m() => C.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
+            getter: 'function(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          static a() {}
+          static set a(_) {}
+          m() => a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
+            getter: 'function(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),
+    const Test.prefix(
+        '''
+        class C {
+          static a() {}
+          static set a(_) {}
+        }
+        ''',
+        '''
+        m() => p.C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
+            getter: 'function(C#a)', setter: 'setter(C#a)',
+            rhs: '42')),*/
+    const Test.clazz(
+        '''
+        class C {
+          var a;
+          m() => a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_THIS_PROPERTY_SET_IF_NULL,
+            name: 'a', rhs: '42')),
+    const Test.clazz(
+        '''
+        class C {
+          var a = 0;
+          m() => this.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_THIS_PROPERTY_SET_IF_NULL,
+            name: 'a', rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          var a = 0;
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_FIELD_SET_IF_NULL,
+            element: 'field(B#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          final a = 0;
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_SET_IF_NULL,
+            element: 'field(B#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          get a => 0;
+          set a (_) {}
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(B#a)', setter: 'setter(B#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class A {
+          get a => 0;
+        }
+        class B extends A {
+          set a (_) {}
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_SET_IF_NULL,
+            getter: 'getter(A#a)', setter: 'setter(B#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class A {
+          var a;
+        }
+        class B extends A {
+          get a => 0;
+        }
+
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_GETTER_FIELD_SET_IF_NULL,
+            getter: 'getter(B#a)', setter: 'field(A#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class A {
+          var a;
+        }
+        class B extends A {
+          set a(_) {}
+        }
+
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_SET_IF_NULL,
+            getter: 'field(A#a)', setter: 'setter(B#a)',
+            rhs: '42')),
+    // TODO(johnniwinther): Enable this when dart2js supports shadow setters.
+    /*const Test.clazz(
+        '''
+        class A {
+          var a;
+        }
+        class B extends A {
+          final a = 0;
+        }
+
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_SET_IF_NULL,
+            getter: 'field(B#a)', setter: 'field(A#a)',
+            rhs: '42')),*/
+    const Test.clazz(
+        '''
+        class B {
+          a() {}
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_SUPER_METHOD_SET_IF_NULL,
+            element: 'function(B#a)',
+            rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SET_IF_NULL,
+            name: 'a', rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          set a(_) {}
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_SET_IF_NULL,
+            setter: 'setter(B#a)', rhs: '42')),
+    const Test.clazz(
+        '''
+        class B {
+          get a => 42;
+        }
+        class C extends B {
+          m() => super.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_SET_IF_NULL,
+            getter: 'getter(B#a)', rhs: '42')),
+
+    const Test.clazz(
+        '''
+        class C {
+          static set a(var value) { }
+          m() => a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_SET_IF_NULL,
+            setter: 'setter(C#a)', rhs: '42')),
+
+    const Test.clazz(
+        '''
+        class C {
+          static get a => 42;
+          m() => C.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_SET_IF_NULL,
+            getter: 'getter(C#a)', rhs: '42')),
+
+    const Test.clazz(
+        '''
+        class C {
+          static final a = 42;
+          m() => C.a ??= 42;
+        }
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_SET_IF_NULL,
+            element: 'field(C#a)', rhs: '42')),
+
+    const Test(
+        '''
+        class C {
+          static a(var value) { }
+        }
+        m() => C.a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_STATIC_METHOD_SET_IF_NULL,
+            element: 'function(C#a)', rhs: '42')),
+
+    const Test(
+        '''
+        set a(var value) { }
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_SET_IF_NULL,
+            setter: 'setter(a)', rhs: '42')),
+
+    const Test(
+        '''
+        get a => 42;
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_SET_IF_NULL,
+            getter: 'getter(a)', rhs: '42')),
+
+    const Test(
+        '''
+        a(var value) { }
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SET_IF_NULL,
+            element: 'function(a)', rhs: '42')),
+
+    const Test(
+        '''
+        final a = 42;
+        m() => a ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_SET_IF_NULL,
+            element: 'field(a)', rhs: '42')),
+
+    const Test(
+        '''
+        m() => unresolved ??= 42;
+        ''',
+        const Visit(VisitKind.VISIT_UNRESOLVED_SET_IF_NULL,
+            name: 'unresolved', rhs: '42')),
   ],
 };
diff --git a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
index 97531f3..3aa941e 100644
--- a/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
+++ b/tests/compiler/dart2js/semantic_visitor_test_send_visitor.dart
@@ -105,6 +105,17 @@
   }
 
   @override
+  errorInvalidSetIfNull(
+      Send node,
+      ErroneousElement error,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.ERROR_INVALID_SET_IF_NULL,
+        error: error.messageKind, rhs: rhs));
+    super.errorInvalidSetIfNull(node, error, rhs, arg);
+  }
+
+  @override
   errorInvalidUnary(
       Send node,
       UnaryOperator operator,
@@ -272,7 +283,7 @@
       ConstantExpression constant,
       Node rhs,
       arg) {
-    visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE,
+    visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_SET,
         constant: constant.getText(), rhs: rhs));
     super.visitClassTypeLiteralSet(node, constant, rhs, arg);
   }
@@ -293,39 +304,35 @@
   visitDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_PREFIX,
-        receiver: receiver, operator: operator,
-        getter: getterSelector, setter: setterSelector));
-    apply(receiver, arg);
+        receiver: receiver, operator: operator, name: name));
+    super.visitDynamicPropertyPrefix(node, receiver, name, operator, arg);
   }
 
   @override
   visitDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_POSTFIX,
-        receiver: receiver, operator: operator,
-        getter: getterSelector, setter: setterSelector));
-    apply(receiver, arg);
+        receiver: receiver, operator: operator, name: name));
+    super.visitDynamicPropertyPostfix(node, receiver, name, operator, arg);
   }
 
   @override
   visitDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_GET,
-        receiver: receiver, name: selector.name));
-    apply(receiver, arg);
+        receiver: receiver, name: name));
+    super.visitDynamicPropertyGet(node, receiver, name, arg);
   }
 
   @override
@@ -337,20 +344,19 @@
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_INVOKE,
         receiver: receiver, name: selector.name, arguments: arguments));
-    apply(receiver, arg);
-    apply(arguments, arg);
+    super.visitDynamicPropertyInvoke(node, receiver, arguments, selector, arg);
   }
 
   @override
   visitDynamicPropertySet(
       SendSet node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_SET,
-        receiver: receiver, name: selector.name, rhs: rhs));
-    super.visitDynamicPropertySet(node, receiver, selector, rhs, arg);
+        receiver: receiver, name: name, rhs: rhs));
+    super.visitDynamicPropertySet(node, receiver, name, rhs, arg);
   }
 
   @override
@@ -380,7 +386,7 @@
       Node rhs,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
-        rhs: rhs));
+        constant: constant.getText(), rhs: rhs));
     super.visitDynamicTypeLiteralSet(node, constant, rhs, arg);
   }
 
@@ -389,7 +395,7 @@
       Send node,
       Node expression,
       NodeList arguments,
-      Selector selector,
+      CallStructure callStructure,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_EXPRESSION_INVOKE,
         receiver: expression, arguments: arguments));
@@ -800,10 +806,11 @@
   @override
   visitThisPropertyGet(
       Send node,
-      Selector selector,
+      Name name,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_GET,
-                         name: selector.name));
+                         name: name));
+    super.visitThisPropertyGet(node, name, arg);
   }
 
   @override
@@ -814,18 +821,18 @@
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_INVOKE,
                          name: selector.name, arguments: arguments));
-    apply(arguments, arg);
+    super.visitThisPropertyInvoke(node, arguments, selector, arg);
   }
 
   @override
   visitThisPropertySet(
       SendSet node,
-      Selector selector,
+      Name name,
       Node rhs,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_SET,
-                         name: selector.name, rhs: rhs));
-    apply(rhs, arg);
+                         name: name, rhs: rhs));
+    super.visitThisPropertySet(node, name, rhs, arg);
   }
 
   @override
@@ -1319,16 +1326,15 @@
   visitDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND,
         receiver: receiver, operator: operator, rhs: rhs,
-        getter: getterSelector, setter: setterSelector));
-    apply(receiver, arg);
-    apply(rhs, arg);
+        name: name));
+    super.visitDynamicPropertyCompound(
+        node, receiver, name, operator, rhs, arg);
   }
 
   @override
@@ -1562,15 +1568,13 @@
   @override
   visitThisPropertyCompound(
       Send node,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_COMPOUND,
-        operator: operator, rhs: rhs,
-        getter: getterSelector, setter: setterSelector));
-    apply(rhs, arg);
+        name: name, operator: operator, rhs: rhs));
+    super.visitThisPropertyCompound(node, name, operator, rhs, arg);
   }
 
   @override
@@ -1983,13 +1987,12 @@
   @override
   visitThisPropertyPrefix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_PREFIX,
-        operator: operator,
-        getter: getterSelector, setter: setterSelector));
+        name: name, operator: operator));
+    super.visitThisPropertyPrefix(node, name, operator, arg);
   }
 
   @override
@@ -2204,13 +2207,12 @@
   @override
   visitThisPropertyPostfix(
       Send node,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_POSTFIX,
-        operator: operator,
-        getter: getterSelector, setter: setterSelector));
+        name: name, operator: operator));
+    super.visitThisPropertyPostfix(node, name, operator, arg);
   }
 
   @override
@@ -3003,23 +3005,23 @@
   visitIfNotNullDynamicPropertyGet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_GET,
-        receiver: receiver, name: selector.name));
-    super.visitIfNotNullDynamicPropertyGet(node, receiver, selector, arg);
+        receiver: receiver, name: name));
+    super.visitIfNotNullDynamicPropertyGet(node, receiver, name, arg);
   }
 
   @override
   visitIfNotNullDynamicPropertySet(
       Send node,
       Node receiver,
-      Selector selector,
+      Name name,
       Node rhs,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET,
-        receiver: receiver, name: selector.name, rhs: rhs));
-    super.visitIfNotNullDynamicPropertySet(node, receiver, selector, rhs, arg);
+        receiver: receiver, name: name, rhs: rhs));
+    super.visitIfNotNullDynamicPropertySet(node, receiver, name, rhs, arg);
   }
 
   @override
@@ -3039,46 +3041,40 @@
   visitIfNotNullDynamicPropertyPrefix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_PREFIX,
-        receiver: receiver, operator: operator,
-        getter: getterSelector, setter: setterSelector));
+        receiver: receiver, name: name, operator: operator));
     super.visitIfNotNullDynamicPropertyPrefix(
-        node, receiver, operator, getterSelector, setterSelector, arg);
+        node, receiver, name, operator, arg);
   }
 
   @override
   visitIfNotNullDynamicPropertyPostfix(
       Send node,
       Node receiver,
+      Name name,
       IncDecOperator operator,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_POSTFIX,
-        receiver: receiver, operator: operator,
-        getter: getterSelector, setter: setterSelector));
+        receiver: receiver, name: name, operator: operator));
     super.visitIfNotNullDynamicPropertyPostfix(
-        node, receiver, operator, getterSelector, setterSelector, arg);
+        node, receiver, name, operator, arg);
   }
 
   @override
   visitIfNotNullDynamicPropertyCompound(
       Send node,
       Node receiver,
+      Name name,
       AssignmentOperator operator,
       Node rhs,
-      Selector getterSelector,
-      Selector setterSelector,
       arg) {
     visits.add(new Visit(VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_COMPOUND,
-        receiver: receiver, operator: operator, rhs: rhs,
-        getter: getterSelector, setter: setterSelector));
+        receiver: receiver, name: name, operator: operator, rhs: rhs));
     super.visitIfNotNullDynamicPropertyCompound(
-        node, receiver, operator, rhs, getterSelector, setterSelector, arg);
+        node, receiver, name, operator, rhs, arg);
   }
 
   @override
@@ -3120,4 +3116,446 @@
       arg) {
     visits.add(new Visit(VisitKind.PREVISIT_DEFERRED_ACCESS, element: prefix));
   }
+
+  @override
+  visitClassTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_SET_IF_NULL,
+        constant: constant.getText(), rhs: rhs));
+    super.visitClassTypeLiteralSetIfNull(node, constant, rhs, arg);
+  }
+
+  @override
+  visitDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_SET_IF_NULL,
+        receiver: receiver, name: name, rhs: rhs));
+    super.visitDynamicPropertySetIfNull(node, receiver, name, rhs, arg);
+  }
+
+  @override
+  visitDynamicTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET_IF_NULL,
+        constant: constant.getText(), rhs: rhs));
+    super.visitDynamicTypeLiteralSetIfNull(node, constant, rhs, arg);
+  }
+
+  @override
+  visitFinalLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET_IF_NULL,
+        element: variable, rhs: rhs));
+    super.visitFinalLocalVariableSetIfNull(node, variable, rhs, arg);
+  }
+
+  @override
+  visitFinalParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_FINAL_PARAMETER_SET_IF_NULL,
+        element: parameter, rhs: rhs));
+    super.visitFinalParameterSetIfNull(node, parameter, rhs, arg);
+  }
+
+  @override
+  visitFinalStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitFinalStaticFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitFinalSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitFinalSuperFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitFinalTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitFinalTopLevelFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitIfNotNullDynamicPropertySetIfNull(
+      Send node,
+      Node receiver,
+      Name name,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_IF_NOT_NULL_DYNAMIC_PROPERTY_SET_IF_NULL,
+        receiver: receiver, name: name, rhs: rhs));
+    super.visitIfNotNullDynamicPropertySetIfNull(
+        node, receiver, name, rhs, arg);
+  }
+
+  @override
+  visitLocalFunctionSetIfNull(
+      Send node,
+      LocalFunctionElement function,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_SET_IF_NULL,
+        element: function, rhs: rhs));
+    super.visitLocalFunctionSetIfNull(node, function, rhs, arg);
+  }
+
+  @override
+  visitLocalVariableSetIfNull(
+      Send node,
+      LocalVariableElement variable,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_SET_IF_NULL,
+        element: variable, rhs: rhs));
+    super.visitLocalVariableSetIfNull(node, variable, rhs, arg);
+  }
+
+  @override
+  visitParameterSetIfNull(
+      Send node,
+      ParameterElement parameter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_PARAMETER_SET_IF_NULL,
+        element: parameter, rhs: rhs));
+    super.visitParameterSetIfNull(node, parameter, rhs, arg);
+  }
+
+  @override
+  visitStaticFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitStaticFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitStaticGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_SETTER_SET_IF_NULL,
+        getter: getter, setter: setter, rhs: rhs));
+    super.visitStaticGetterSetterSetIfNull(node, getter, setter, rhs, arg);
+  }
+
+  @override
+  visitStaticMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_SET_IF_NULL,
+        element: method, rhs: rhs));
+    super.visitStaticMethodSetIfNull(node, method, rhs, arg);
+  }
+
+  @override
+  visitStaticMethodSetterSetIfNull(
+      Send node,
+      MethodElement method,
+      MethodElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_SET_IF_NULL,
+        getter: method, setter: setter, rhs: rhs));
+    super.visitStaticMethodSetterSetIfNull(node, method, setter, rhs, arg);
+  }
+
+  @override
+  visitSuperFieldFieldSetIfNull(
+      Send node,
+      FieldElement readField,
+      FieldElement writtenField,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_SET_IF_NULL,
+        getter: readField, setter: writtenField, rhs: rhs));
+    super.visitSuperFieldFieldSetIfNull(
+        node, readField, writtenField, rhs, arg);
+  }
+
+  @override
+  visitSuperFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitSuperFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitSuperFieldSetterSetIfNull(
+      Send node,
+      FieldElement field,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_SET_IF_NULL,
+        getter: field, setter: setter, rhs: rhs));
+    super.visitSuperFieldSetterSetIfNull(node, field, setter, rhs, arg);
+  }
+
+  @override
+  visitSuperGetterFieldSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_FIELD_SET_IF_NULL,
+        getter: getter, setter: field, rhs: rhs));
+    super.visitSuperGetterFieldSetIfNull(node, getter, field, rhs, arg);
+  }
+
+  @override
+  visitSuperGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_SET_IF_NULL,
+        getter: getter, setter: setter, rhs: rhs));
+    super.visitSuperGetterSetterSetIfNull(node, getter, setter, rhs, arg);
+  }
+
+  @override
+  visitSuperMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SET_IF_NULL,
+        element: method, rhs: rhs));
+    super.visitSuperMethodSetIfNull(node, method, rhs, arg);
+  }
+
+  @override
+  visitSuperMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SETTER_SET_IF_NULL,
+        getter: method, setter: setter, rhs: rhs));
+    super.visitSuperMethodSetterSetIfNull(node, method, setter, rhs, arg);
+  }
+
+  @override
+  visitThisPropertySetIfNull(
+      Send node,
+      Name name,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_SET_IF_NULL,
+        name: name, rhs: rhs));
+    super.visitThisPropertySetIfNull(node, name, rhs, arg);
+  }
+
+  @override
+  visitTopLevelFieldSetIfNull(
+      Send node,
+      FieldElement field,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_SET_IF_NULL,
+        element: field, rhs: rhs));
+    super.visitTopLevelFieldSetIfNull(node, field, rhs, arg);
+  }
+
+  @override
+  visitTopLevelGetterSetterSetIfNull(
+      Send node,
+      FunctionElement getter,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_SETTER_SET_IF_NULL,
+        getter: getter, setter: setter, rhs: rhs));
+    super.visitTopLevelGetterSetterSetIfNull(node, getter, setter, rhs, arg);
+  }
+
+  @override
+  visitTopLevelMethodSetIfNull(
+      Send node,
+      FunctionElement method,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SET_IF_NULL,
+        element: method, rhs: rhs));
+    super.visitTopLevelMethodSetIfNull(node, method, rhs, arg);
+  }
+
+  @override
+  visitTopLevelMethodSetterSetIfNull(
+      Send node,
+      FunctionElement method,
+      FunctionElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_SET_IF_NULL,
+        getter: method, setter: setter, rhs: rhs));
+    super.visitTopLevelMethodSetterSetIfNull(node, method, setter, rhs, arg);
+  }
+
+  @override
+  visitTypeVariableTypeLiteralSetIfNull(
+      Send node,
+      TypeVariableElement element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET_IF_NULL,
+        element: element, rhs: rhs));
+    super.visitTypeVariableTypeLiteralSetIfNull(node, element, rhs, arg);
+  }
+
+  @override
+  visitTypedefTypeLiteralSetIfNull(
+      Send node,
+      ConstantExpression constant,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET_IF_NULL,
+        constant: constant.getText(), rhs: rhs));
+    super.visitTypedefTypeLiteralSetIfNull(node, constant, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SET_IF_NULL,
+        name: element.name, rhs: rhs));
+    super.visitUnresolvedSetIfNull(node, element, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedStaticGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_SET_IF_NULL,
+        setter: setter, rhs: rhs));
+    super.visitUnresolvedStaticGetterSetIfNull(node, element, setter, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedStaticSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_SET_IF_NULL,
+        getter: getter, rhs: rhs));
+    super.visitUnresolvedStaticSetterSetIfNull(node, getter, element, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_SET_IF_NULL,
+        setter: setter, rhs: rhs));
+    super.visitUnresolvedSuperGetterSetIfNull(node, element, setter, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperSetIfNull(
+      Send node,
+      Element element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SET_IF_NULL,
+        name: element.name, rhs: rhs));
+    super.visitUnresolvedSuperSetIfNull(node, element, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedSuperSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_SET_IF_NULL,
+        getter: getter, rhs: rhs));
+    super.visitUnresolvedSuperSetterSetIfNull(node, getter, element, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedTopLevelGetterSetIfNull(
+      Send node,
+      Element element,
+      MethodElement setter,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_SET_IF_NULL,
+        setter: setter, rhs: rhs));
+    super.visitUnresolvedTopLevelGetterSetIfNull(
+        node, element, setter, rhs, arg);
+  }
+
+  @override
+  visitUnresolvedTopLevelSetterSetIfNull(
+      Send node,
+      MethodElement getter,
+      Element element,
+      Node rhs,
+      arg) {
+    visits.add(new Visit(
+        VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_SET_IF_NULL,
+        getter: getter, rhs: rhs));
+    super.visitUnresolvedTopLevelSetterSetIfNull(
+        node, getter, element, rhs, arg);
+  }
 }
diff --git a/tests/compiler/dart2js/serialization_analysis_test.dart b/tests/compiler/dart2js/serialization_analysis_test.dart
index 147c82b..e20726f 100644
--- a/tests/compiler/dart2js/serialization_analysis_test.dart
+++ b/tests/compiler/dart2js/serialization_analysis_test.dart
@@ -8,11 +8,12 @@
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/enqueue.dart';
+import 'package:compiler/src/filenames.dart';
 import 'package:compiler/src/serialization/serialization.dart';
 import 'package:compiler/src/serialization/json_serializer.dart';
 import 'package:compiler/src/serialization/task.dart';
-import 'package:compiler/src/dart2jslib.dart';
-import 'package:compiler/src/filenames.dart';
 import 'memory_compiler.dart';
 
 const List<Test> TESTS = const <Test>[
@@ -200,7 +201,7 @@
 }
 
 Future<String> serializeDartCore() async {
-  Compiler compiler = compilerFor({},
+  Compiler compiler = compilerFor(
       options: ['--analyze-all', '--output-type=dart']);
   await compiler.runCompiler(Uri.parse('dart:core'));
   return serialize(compiler.libraryLoader.libraries);
diff --git a/tests/compiler/dart2js/serialization_test.dart b/tests/compiler/dart2js/serialization_test.dart
index 5f4b19b..53bfa02 100644
--- a/tests/compiler/dart2js/serialization_test.dart
+++ b/tests/compiler/dart2js/serialization_test.dart
@@ -7,9 +7,11 @@
 import 'dart:io';
 import 'memory_compiler.dart';
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/constants/constructors.dart';
 import 'package:compiler/src/constants/expressions.dart';
 import 'package:compiler/src/dart_types.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/diagnostics/invariant.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/elements/visitor.dart';
 import 'package:compiler/src/ordered_typeset.dart';
diff --git a/tests/compiler/dart2js/side_effect_tdiv_regression_test.dart b/tests/compiler/dart2js/side_effect_tdiv_regression_test.dart
index 1cede18..59d30805 100644
--- a/tests/compiler/dart2js/side_effect_tdiv_regression_test.dart
+++ b/tests/compiler/dart2js/side_effect_tdiv_regression_test.dart
@@ -6,7 +6,6 @@
 import "package:async_helper/async_helper.dart";
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST = r'''
 class A {
@@ -26,5 +25,5 @@
 void main() {
   asyncTest(() => compileAll(TEST).then((generated) {
     Expect.isTrue(generated.contains('return c + c;'));
-  }));  
+  }));
 }
diff --git a/tests/compiler/dart2js/simple_inferrer_callers_test.dart b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
index acd8872..4f2e5a8 100644
--- a/tests/compiler/dart2js/simple_inferrer_callers_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_callers_test.dart
@@ -5,13 +5,11 @@
 // Test that computation of callers of an element works when two
 // elements of the same name are being invoked in the same method.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/types/types.dart';
 import 'package:compiler/src/inferrer/type_graph_inferrer.dart';
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST = """
 class A {
diff --git a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
index 30181fe..36019136 100644
--- a/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_final_field2_test.dart
@@ -5,10 +5,10 @@
 // Test that a non-used generative constructor does not prevent
 // infering types for fields.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST = """
 
diff --git a/tests/compiler/dart2js/simple_inferrer_final_field3_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field3_test.dart
index 817747c..e010677 100644
--- a/tests/compiler/dart2js/simple_inferrer_final_field3_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_final_field3_test.dart
@@ -7,7 +7,6 @@
 import 'package:expect/expect.dart';
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = """
diff --git a/tests/compiler/dart2js/simple_inferrer_final_field_test.dart b/tests/compiler/dart2js/simple_inferrer_final_field_test.dart
index 29d0940..7e5853c 100644
--- a/tests/compiler/dart2js/simple_inferrer_final_field_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_final_field_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = """
diff --git a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
index 3f91350..f3e44d4 100644
--- a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
@@ -7,7 +7,6 @@
 import "package:async_helper/async_helper.dart";
 import 'compiler_helper.dart';
 import 'package:compiler/src/types/types.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST1 = """
diff --git a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
index 2050354..c26104d 100644
--- a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 import 'type_mask_test_helper.dart';
 
 const String TEST = """
diff --git a/tests/compiler/dart2js/simple_inferrer_relations_test.dart b/tests/compiler/dart2js/simple_inferrer_relations_test.dart
index de080f4..a076955 100644
--- a/tests/compiler/dart2js/simple_inferrer_relations_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_relations_test.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/types/types.dart' show TypeMask;
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 // Test that if (x == y) where we know nothing about x and y will get optimized
 // to if ($.$eq(x, y)) and not
diff --git a/tests/compiler/dart2js/simple_inferrer_test.dart b/tests/compiler/dart2js/simple_inferrer_test.dart
index 5999741..1bc1cf5 100644
--- a/tests/compiler/dart2js/simple_inferrer_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_test.dart
@@ -8,8 +8,6 @@
 import 'type_mask_test_helper.dart';
 
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
-import 'type_mask_test_helper.dart';
 
 const String TEST = """
 returnNum1(a) {
diff --git a/tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart b/tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart
index 5c2e11f..06bba80 100644
--- a/tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
 
 const String TEST = """
 var a = '';
diff --git a/tests/compiler/dart2js/source_map_name_test.dart b/tests/compiler/dart2js/source_map_name_test.dart
index 46aeb86..fae5649 100644
--- a/tests/compiler/dart2js/source_map_name_test.dart
+++ b/tests/compiler/dart2js/source_map_name_test.dart
@@ -6,7 +6,7 @@
 
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/elements.dart';
 import 'package:compiler/src/io/source_information.dart';
 import 'memory_compiler.dart';
diff --git a/tests/compiler/dart2js/source_mapping_test.dart b/tests/compiler/dart2js/source_mapping_test.dart
index 9c350f6..40c0f69 100644
--- a/tests/compiler/dart2js/source_mapping_test.dart
+++ b/tests/compiler/dart2js/source_mapping_test.dart
@@ -3,17 +3,17 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
-import "package:compiler/src/io/code_output.dart";
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/io/code_output.dart';
 import 'package:compiler/src/io/source_file.dart';
 import 'package:compiler/src/io/source_information.dart';
-import "mock_compiler.dart";
 import 'package:compiler/src/js_backend/js_backend.dart';
-import 'package:compiler/src/js_emitter/js_emitter.dart';
 import 'package:compiler/src/js_emitter/full_emitter/emitter.dart'
     as full show Emitter;
 
+import 'mock_compiler.dart';
+
 Future<CodeBuffer> compileAll(SourceFile sourceFile) {
   MockCompiler compiler = new MockCompiler.internal();
   Uri uri = new Uri(path: sourceFile.filename);
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
index 4691568..215092a 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_test_viewer.dart
@@ -133,19 +133,19 @@
   TestResult result =
       await runTests(config, filename, options, verbose: verbose);
   if (outputUri != null) {
-    if (result.failureMap.isNotEmpty) {
-      result.failureMap.forEach((info, missingCodePoints) {
-        print("Missing code points for ${info.element} in '$filename' "
-              "in config '$config':");
-        for (CodePoint codePoint in missingCodePoints) {
-          print("  $codePoint");
-        }
-      });
+    if (result.missingCodePointsMap.isNotEmpty) {
+      result.printMissingCodePoints();
+    }
+    if (result.multipleNodesMap.isNotEmpty) {
+      result.printMultipleNodes();
+    }
+    if (result.multipleOffsetsMap.isNotEmpty) {
+      result.printMultipleOffsets();
     }
     createTraceSourceMapHtml(outputUri, result.processor, result.userInfoList);
   }
   return new Measurement(config, filename,
-      result.failureMap.values.fold(0, (s, i) => s + i.length),
+      result.missingCodePointsMap.values.fold(0, (s, i) => s + i.length),
       result.userInfoList.fold(0, (s, i) => s + i.codePoints.length));
 }
 
diff --git a/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart b/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
index 9e7d5b6..5149b87 100644
--- a/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
+++ b/tests/compiler/dart2js/sourcemaps/source_mapping_tester.dart
@@ -5,6 +5,9 @@
 import 'dart:async';
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
+import 'package:compiler/src/io/source_information.dart';
+import 'package:compiler/src/js/js_debug.dart';
+import 'package:js_ast/js_ast.dart';
 import 'sourcemap_helper.dart';
 
 main(List<String> arguments) {
@@ -25,26 +28,28 @@
   }
 
   asyncTest(() async {
-    bool missingCodePointsFound = false;
+    bool errorsFound = false;
     for (String config in configurations) {
       List<String> options = TEST_CONFIGURATIONS[config];
       for (String file in files) {
         String filename = TEST_FILES[file];
         TestResult result = await runTests(config, filename, options);
-        if (result.failureMap.isNotEmpty) {
-          result.failureMap.forEach((info, missingCodePoints) {
-            print("Missing code points for ${info.element} in '$filename' "
-                  "in config '$config':");
-            for (CodePoint codePoint in missingCodePoints) {
-              print("  $codePoint");
-            }
-          });
-          missingCodePointsFound = true;
+        if (result.missingCodePointsMap.isNotEmpty) {
+          result.printMissingCodePoints();
+          errorsFound = true;
+        }
+        if (result.multipleNodesMap.isNotEmpty) {
+          result.printMultipleNodes();
+          errorsFound = true;
+        }
+        if (result.multipleOffsetsMap.isNotEmpty) {
+          result.printMultipleOffsets();
+          errorsFound = true;
         }
       }
     }
-    Expect.isFalse(missingCodePointsFound,
-        "Missing code points found. "
+    Expect.isFalse(errorsFound,
+        "Errors found. "
         "Run the test with a URI option, "
         "`source_mapping_test_viewer [--out=<uri>] [configs] [tests]`, to "
         "create a html visualization of the missing code points.");
@@ -101,8 +106,34 @@
     Iterable<CodePoint> missingCodePoints =
         info.codePoints.where((c) => c.isMissing);
     if (missingCodePoints.isNotEmpty) {
-      result.failureMap[info] = missingCodePoints;
+      result.missingCodePointsMap[info] = missingCodePoints;
     }
+    Map<int, Set<SourceLocation>> offsetToLocationsMap =
+        <int, Set<SourceLocation>>{};
+    for (Node node in info.nodeMap.nodes) {
+      info.nodeMap[node].forEach(
+            (int targetOffset, List<SourceLocation> sourceLocations) {
+        if (sourceLocations.length > 1) {
+          Map<Node, List<SourceLocation>> multipleMap =
+              result.multipleNodesMap.putIfAbsent(info,
+                  () => <Node, List<SourceLocation>>{});
+          multipleMap[node] = sourceLocations;
+        } else {
+          offsetToLocationsMap
+              .putIfAbsent(targetOffset, () => new Set<SourceLocation>())
+              .addAll(sourceLocations);
+        }
+      });
+    }
+    offsetToLocationsMap.forEach(
+          (int targetOffset, Set<SourceLocation> sourceLocations) {
+      if (sourceLocations.length > 1) {
+        Map<int, Set<SourceLocation>> multipleMap =
+            result.multipleOffsetsMap.putIfAbsent(info,
+                () => <int, Set<SourceLocation>>{});
+        multipleMap[targetOffset] = sourceLocations;
+      }
+    });
   }
   return result;
 }
@@ -112,8 +143,48 @@
   final String file;
   final SourceMapProcessor processor;
   List<SourceMapInfo> userInfoList = <SourceMapInfo>[];
-  Map<SourceMapInfo, Iterable<CodePoint>> failureMap =
+  Map<SourceMapInfo, Iterable<CodePoint>> missingCodePointsMap =
       <SourceMapInfo, Iterable<CodePoint>>{};
 
+  /// For each [SourceMapInfo] a map from JS node to multiple source locations
+  /// associated with the node.
+  Map<SourceMapInfo, Map<Node, List<SourceLocation>>> multipleNodesMap =
+      <SourceMapInfo, Map<Node, List<SourceLocation>>>{};
+
+  /// For each [SourceMapInfo] a map from JS offset to multiple source locations
+  /// associated with the offset.
+  Map<SourceMapInfo, Map<int, Set<SourceLocation>>> multipleOffsetsMap =
+      <SourceMapInfo, Map<int, Set<SourceLocation>>>{};
+
   TestResult(this.config, this.file, this.processor);
+
+  void printMissingCodePoints() {
+    missingCodePointsMap.forEach((info, missingCodePoints) {
+      print("Missing code points for ${info.element} in '$file' "
+            "in config '$config':");
+      for (CodePoint codePoint in missingCodePoints) {
+        print("  $codePoint");
+      }
+    });
+  }
+
+  void printMultipleNodes() {
+    multipleNodesMap.forEach((info, multipleMap) {
+      multipleMap.forEach((node, sourceLocations) {
+        print('Multiple source locations:\n ${sourceLocations.join('\n ')}\n'
+              'for `${nodeToString(node)}` in ${info.element} in '
+              '$file.');
+      });
+    });
+  }
+
+  void printMultipleOffsets() {
+    multipleOffsetsMap.forEach((info, multipleMap) {
+      multipleMap.forEach((targetOffset, sourceLocations) {
+        print(
+            'Multiple source locations:\n ${sourceLocations.join('\n ')}\n'
+            'for offset $targetOffset in ${info.element} in $file.');
+      });
+    });
+  }
 }
diff --git a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
index 1dbbc1f..eac4637 100644
--- a/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/sourcemap_helper.dart
@@ -120,7 +120,7 @@
       if (verbose) print('Using the new source information system.');
       useNewSourceInfo = true;
     }
-    api.Compiler compiler = await compilerFor({},
+    api.Compiler compiler = await compilerFor(
         outputProvider: outputProvider,
         // TODO(johnniwinther): Use [verbose] to avoid showing diagnostics.
         options: ['--out=$targetUri', '--source-map=$sourceMapFileUri']
diff --git a/tests/compiler/dart2js/trust_type_annotations2_test.dart b/tests/compiler/dart2js/trust_type_annotations2_test.dart
index cf8ad8a..4eeb0a6 100644
--- a/tests/compiler/dart2js/trust_type_annotations2_test.dart
+++ b/tests/compiler/dart2js/trust_type_annotations2_test.dart
@@ -29,7 +29,7 @@
         memorySourceFiles: MEMORY_SOURCE_FILES,
         options: ['--trust-type-annotations']);
     var compiler = result.compiler;
-    var element = compiler.mainApp.findExported('main');
+    var element = compiler.mainFunction;
     var code = compiler.backend.assembleCode(element);
     Expect.isTrue(code.contains('+'), code);
   });
diff --git a/tests/compiler/dart2js/type_checker_test.dart b/tests/compiler/dart2js/type_checker_test.dart
index f6be4cf..c906192 100644
--- a/tests/compiler/dart2js/type_checker_test.dart
+++ b/tests/compiler/dart2js/type_checker_test.dart
@@ -3,21 +3,29 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
+
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import 'package:compiler/src/elements/elements.dart';
-import 'package:compiler/src/tree/tree.dart';
-import 'package:compiler/src/util/util.dart';
-import 'package:compiler/src/io/source_file.dart';
-import 'mock_compiler.dart';
-import 'parser_helper.dart';
-
-import 'package:compiler/src/elements/modelx.dart'
-  show ClassElementX, CompilationUnitElementX, ElementX, FunctionElementX;
-
-import 'package:compiler/src/dart2jslib.dart';
 
 import 'package:compiler/src/dart_types.dart';
+import 'package:compiler/src/diagnostics/messages.dart';
+import 'package:compiler/src/elements/elements.dart';
+import 'package:compiler/src/elements/modelx.dart' show
+    ClassElementX,
+    CompilationUnitElementX,
+    ElementX,
+    FunctionElementX;
+import 'package:compiler/src/io/source_file.dart';
+import 'package:compiler/src/resolution/tree_elements.dart' show
+    TreeElements,
+    TreeElementMapping;
+import 'package:compiler/src/tree/tree.dart';
+import 'package:compiler/src/typechecker.dart';
+import 'package:compiler/src/script.dart';
+import 'package:compiler/src/util/util.dart';
+
+import 'mock_compiler.dart';
+import 'parser_helper.dart';
 
 final MessageKind NOT_ASSIGNABLE = MessageKind.NOT_ASSIGNABLE;
 final MessageKind MEMBER_NOT_FOUND = MessageKind.MEMBER_NOT_FOUND;
@@ -2173,7 +2181,7 @@
   if (expectedWarnings == null) expectedWarnings = [];
   if (expectedWarnings is !List) expectedWarnings = [expectedWarnings];
 
-  MockCompiler compiler = new MockCompiler.internal();
+  MockCompiler compiler = new MockCompiler.internal(enableAsyncAwait: true);
   compiler.diagnosticHandler = createHandler(compiler, text);
 
   return compiler.init("import 'dart:async';").then((_) {
diff --git a/tests/compiler/dart2js/type_combination_test.dart b/tests/compiler/dart2js/type_combination_test.dart
index fa2b503d..834f900 100644
--- a/tests/compiler/dart2js/type_combination_test.dart
+++ b/tests/compiler/dart2js/type_combination_test.dart
@@ -2,12 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import "package:async_helper/async_helper.dart";
-import "package:expect/expect.dart";
-import "compiler_helper.dart";
-import "package:compiler/src/types/types.dart";
-import "type_mask_test_helper.dart";
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
 import 'package:compiler/src/js_backend/js_backend.dart';
+import 'package:compiler/src/types/types.dart';
+import 'package:compiler/src/world.dart';
+import 'compiler_helper.dart';
+import 'type_mask_test_helper.dart';
 
 TypeMask nullType;
 TypeMask objectType;
diff --git a/tests/compiler/dart2js/type_equals_test.dart b/tests/compiler/dart2js/type_equals_test.dart
index 16e1066..3b71f5f 100644
--- a/tests/compiler/dart2js/type_equals_test.dart
+++ b/tests/compiler/dart2js/type_equals_test.dart
@@ -6,7 +6,6 @@
 import "package:async_helper/async_helper.dart";
 import 'package:compiler/src/dart_types.dart';
 import "compiler_helper.dart";
-import "parser_helper.dart";
 
 bool test(compiler, String name1, String name2, {bool expect}) {
   Expect.isTrue((expect != null), 'required parameter "expect" not given');
diff --git a/tests/compiler/dart2js/type_mask_test.dart b/tests/compiler/dart2js/type_mask_test.dart
index 7cbe9e4..fa7d108 100644
--- a/tests/compiler/dart2js/type_mask_test.dart
+++ b/tests/compiler/dart2js/type_mask_test.dart
@@ -2,11 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
-import "package:async_helper/async_helper.dart";
+import 'package:compiler/src/types/types.dart';
+
 import 'compiler_helper.dart';
-import 'parser_helper.dart';
-import "package:compiler/src/types/types.dart";
 
 const String CODE = """
 class A {}
diff --git a/tests/compiler/dart2js/type_mask_test_helper.dart b/tests/compiler/dart2js/type_mask_test_helper.dart
index 1efb937..e27c463 100644
--- a/tests/compiler/dart2js/type_mask_test_helper.dart
+++ b/tests/compiler/dart2js/type_mask_test_helper.dart
@@ -5,7 +5,7 @@
 library type_mask_test_helper;
 
 import 'package:compiler/src/types/types.dart';
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/compiler.dart'
     show Compiler;
 
 TypeMask simplify(TypeMask mask, Compiler compiler) {
diff --git a/tests/compiler/dart2js/type_substitution_test.dart b/tests/compiler/dart2js/type_substitution_test.dart
index 17a4b14..dad50ae 100644
--- a/tests/compiler/dart2js/type_substitution_test.dart
+++ b/tests/compiler/dart2js/type_substitution_test.dart
@@ -4,12 +4,11 @@
 
 library type_substitution_test;
 
-import "package:expect/expect.dart";
-import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/dart_types.dart';
-import "compiler_helper.dart";
-import "parser_helper.dart";
-import "type_test_helper.dart";
+import 'compiler_helper.dart';
+import 'type_test_helper.dart';
 
 DartType getType(compiler, String name) {
   var clazz = findElement(compiler, "Class");
diff --git a/tests/compiler/dart2js/type_test_helper.dart b/tests/compiler/dart2js/type_test_helper.dart
index f571b36..4f6dcd1 100644
--- a/tests/compiler/dart2js/type_test_helper.dart
+++ b/tests/compiler/dart2js/type_test_helper.dart
@@ -9,7 +9,7 @@
 import 'compiler_helper.dart' as mock;
 import 'memory_compiler.dart' as memory;
 import 'package:compiler/src/dart_types.dart';
-import 'package:compiler/src/dart2jslib.dart'
+import 'package:compiler/src/compiler.dart'
     show Compiler;
 import 'package:compiler/src/elements/elements.dart'
     show Element,
@@ -62,7 +62,7 @@
       memory.DiagnosticCollector collector = new memory.DiagnosticCollector();
       uri = Uri.parse('memory:main.dart');
       compiler = memory.compilerFor(
-          {'main.dart': source},
+          memorySourceFiles: {'main.dart': source},
           diagnosticHandler: collector,
           options: stopAfterTypeInference
               ? [] : ['--analyze-all', '--analyze-only']);
diff --git a/tests/compiler/dart2js/type_variable_bound_test.dart b/tests/compiler/dart2js/type_variable_bound_test.dart
index 6844abb..b93c42d 100644
--- a/tests/compiler/dart2js/type_variable_bound_test.dart
+++ b/tests/compiler/dart2js/type_variable_bound_test.dart
@@ -9,7 +9,8 @@
 
 Future compile(String source) {
   Uri uri = Uri.parse('test:code');
-  var compiler = compilerFor(source, uri, analyzeOnly: true);
+  var compiler =
+      compilerFor(source, uri, analyzeOnly: true, enableTypeAssertions: true);
   compiler.diagnosticHandler = createHandler(compiler, source);
   return compiler.runCompiler(uri).then((_) {
     return compiler;
@@ -71,7 +72,7 @@
     print(compiler.errors);
     Expect.isTrue(compiler.errors.isEmpty, 'unexpected errors');
     Expect.equals(2, compiler.warnings.length,
-                  'expected exactly one error, but got ${compiler.warnings}');
+                  'expected exactly two errors, but got ${compiler.warnings}');
 
     Expect.equals(MessageKind.CYCLIC_TYPE_VARIABLE,
                   compiler.warnings[0].message.kind);
@@ -214,6 +215,41 @@
                 MessageKind.INVALID_TYPE_VARIABLE_BOUND]);
 }
 
+test10() {
+  test(r"""
+class A {
+  const A();
+}
+class Test<T extends A> {
+  final T x = const A();
+  const Test();
+}
+main() {
+  print(const Test<A>());
+}
+""");
+}
+
+// TODO(het): The error is reported twice because both the Dart and JS constant
+// compilers are run on the const constructor, investigate why.
+test11() {
+  test(r"""
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+class Test<T extends A> {
+  final T x = const A();
+  const Test();
+}
+main() {
+  print(const Test<B>());
+}
+""", errors: [MessageKind.NOT_ASSIGNABLE, MessageKind.NOT_ASSIGNABLE]);
+}
+
 main() {
   test1();
   test2();
@@ -224,4 +260,6 @@
   test7();
   test8();
   test9();
+  test10();
+  test11();
 }
diff --git a/tests/compiler/dart2js/union_type_test.dart b/tests/compiler/dart2js/union_type_test.dart
index 1b7e095..c103d6f 100644
--- a/tests/compiler/dart2js/union_type_test.dart
+++ b/tests/compiler/dart2js/union_type_test.dart
@@ -2,13 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
-import "compiler_helper.dart";
-import "parser_helper.dart";
-
+import "package:expect/expect.dart";
 import "package:compiler/src/types/types.dart";
-import "package:compiler/src/dart_types.dart";
+
+import "compiler_helper.dart";
 
 main() {
   MockCompiler compiler = new MockCompiler.internal(analyzeOnly: true);
diff --git a/tests/compiler/dart2js/unparser2_test.dart b/tests/compiler/dart2js/unparser2_test.dart
index 88940b6..00a3030 100644
--- a/tests/compiler/dart2js/unparser2_test.dart
+++ b/tests/compiler/dart2js/unparser2_test.dart
@@ -6,17 +6,14 @@
 import "package:compiler/src/scanner/scannerlib.dart";
 import "package:compiler/src/tree/tree.dart";
 
-import "package:compiler/src/dart2jslib.dart"
-    show DiagnosticListener,
-         Script;
-
+import "package:compiler/src/diagnostics/diagnostic_listener.dart";
 import "package:compiler/src/elements/elements.dart"
     show CompilationUnitElement,
          LibraryElement;
-
 import "package:compiler/src/elements/modelx.dart"
     show CompilationUnitElementX,
          LibraryElementX;
+import "package:compiler/src/script.dart";
 
 main() {
   testClassDef();
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index 86d8ab9..4b9a815 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -2,9 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import "package:expect/expect.dart";
+import 'package:expect/expect.dart';
 import 'parser_helper.dart';
-import 'mock_compiler.dart';
 import 'package:compiler/src/tree/tree.dart';
 
 testUnparse(String statement) {
diff --git a/tests/compiler/dart2js/use_checks_test.dart b/tests/compiler/dart2js/use_checks_test.dart
index 24013ad..26d81c6 100644
--- a/tests/compiler/dart2js/use_checks_test.dart
+++ b/tests/compiler/dart2js/use_checks_test.dart
@@ -28,7 +28,7 @@
         memorySourceFiles: MEMORY_SOURCE_FILES,
         options: ['--enable-checked-mode']);
     var compiler = result.compiler;
-    var element = compiler.mainApp.findExported('main');
+    var element = compiler.mainFunction;
     var code = compiler.backend.assembleCode(element);
     Expect.isTrue(code.contains('+'), code);
   });
diff --git a/tests/compiler/dart2js/use_strict_test.dart b/tests/compiler/dart2js/use_strict_test.dart
index b99bfe0..d3eb09b 100644
--- a/tests/compiler/dart2js/use_strict_test.dart
+++ b/tests/compiler/dart2js/use_strict_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
 import 'package:async_helper/async_helper.dart';
 import 'package:expect/expect.dart';
 import 'memory_compiler.dart';
diff --git a/tests/compiler/dart2js/value_range3_test.dart b/tests/compiler/dart2js/value_range3_test.dart
index 5a483ed..2e65cee 100644
--- a/tests/compiler/dart2js/value_range3_test.dart
+++ b/tests/compiler/dart2js/value_range3_test.dart
@@ -26,7 +26,7 @@
   asyncTest(() async {
     var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
     var compiler = result.compiler;
-    var element = compiler.mainApp.findExported('main');
+    var element = compiler.mainFunction;
     var code = compiler.backend.assembleCode(element);
     Expect.isFalse(code.contains('ioore'));
   });
diff --git a/tests/compiler/dart2js/world_test.dart b/tests/compiler/dart2js/world_test.dart
index 4acd90f..13a0821 100644
--- a/tests/compiler/dart2js/world_test.dart
+++ b/tests/compiler/dart2js/world_test.dart
@@ -9,7 +9,7 @@
 import 'type_test_helper.dart';
 import 'package:compiler/src/elements/elements.dart'
        show Element, ClassElement;
-import 'package:compiler/src/dart2jslib.dart';
+import 'package:compiler/src/world.dart' show ClassWorld;
 
 void main() {
   asyncTest(() => TypeEnvironment.create(r"""
diff --git a/tests/compiler/dart2js_extra/22868_test.dart b/tests/compiler/dart2js_extra/22868_test.dart
index 185e0f6..0d83b955 100644
--- a/tests/compiler/dart2js_extra/22868_test.dart
+++ b/tests/compiler/dart2js_extra/22868_test.dart
@@ -2,11 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// Regression test for http://dartbug.com/22868/
+// Regression test for http://dartbug.com/22868/ and http://dartbug.com/22895/.
 // Ensure that the closure tracer properly handles await.
 
 main() async {
   var closures = [(x, y) => x + y];
   print(((await closures)[0])(4, 2));
 }
-
diff --git a/tests/compiler/dart2js_extra/22895_test.dart b/tests/compiler/dart2js_extra/22895_test.dart
deleted file mode 100644
index 73f120d..0000000
--- a/tests/compiler/dart2js_extra/22895_test.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Regression test for http://dartbug.com/22895/
-// Ensure that the type graph is retained in presence of await.
-
-main() async {
-  var closures = [(x, y) => x + y];
-  print(((await closures)[0])(4, 2));
-}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 635ce98..b2d49f9 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -63,13 +63,16 @@
 [ $host_checked && $compiler == dart2js && $cps_ir ]
 21724_test: Crash # Please triage this failure.
 
+[ $compiler == none && $runtime == vm ]
+invalid_annotation_test/01: MissingCompileTimeError, OK # vm is lazy
+
 [ $compiler == dart2js && $cps_ir ]
 16407_test: Pass # Please triage this failure.
-22868_test: Crash # (main()async{var clo...  cannot handle async/sync*/async* functions
-22895_test: Crash # (main()async{var clo...  cannot handle async/sync*/async* functions
-23432_test: RuntimeError, Pass # Please triage this failure. (Passes for the wrong reason)
-async_stacktrace_test/asyncStar: Crash # (runTests()async{awa...  cannot handle async/sync*/async* functions
-async_stacktrace_test/none: Crash # (runTests()async{awa...  cannot handle async/sync*/async* functions
+22868_test: RuntimeError # Issue 23997
+22895_test: RuntimeError # Issue 23997
+23432_test: RuntimeError # Issue 23432
+async_stacktrace_test/asyncStar: Crash # (foo()async*{try {tr...  cannot handle sync*/async* functions
+async_stacktrace_test/none: RuntimeError # $async$temp1.Tracer$ is not a function
 closure_capture5_test: Crash # (i=0): For-loop variable captured in loop header
 deferred/deferred_class_test: RuntimeError # Z.loadLibrary is not a function
 deferred/deferred_constant2_test: Crash # (lib.C1): deferred access is not implemented
@@ -81,10 +84,7 @@
 deferred_fail_and_retry_test: Crash # (lib.foo()): deferred access is not implemented
 deferred_fail_and_retry_worker_test: Crash # (lib.foo()): deferred access is not implemented
 deferred_split_test: Crash # (b.createA()): deferred access is not implemented
-mirror_printer_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-reflect_native_types_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirror_printer_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+reflect_native_types_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 switch_test/none: Crash # (switch (val){foo:ba...  continue to a labeled switch case
-
-[ $compiler == none && $runtime == vm ]
-invalid_annotation_test/01: MissingCompileTimeError, OK # vm is lazy
diff --git a/tests/compiler/dart2js_native/dart2js_native.status b/tests/compiler/dart2js_native/dart2js_native.status
index 9ea2884..1ace12b 100644
--- a/tests/compiler/dart2js_native/dart2js_native.status
+++ b/tests/compiler/dart2js_native/dart2js_native.status
@@ -21,15 +21,13 @@
 compute_this_script_test: Skip # Issue 17458
 
 [ $compiler == dart2js && $cps_ir ]
-mirror_intercepted_field_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirror_intercepted_field_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 native_exception_test: RuntimeError # value_.toString$0 is not a function
 native_method_inlining_test: RuntimeError # Please triage this failure.
-native_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+native_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 native_no_such_method_exception3_frog_test: RuntimeError # Please triage this failure.
 optimization_hints_test: RuntimeError # Please triage this failure.
 subclassing_constructor_1_test: RuntimeError # Please triage this failure.
 subclassing_constructor_2_test: RuntimeError # Please triage this failure.
-subclassing_super_call_test: RuntimeError # this.get$afield is not a function
 subclassing_super_field_1_test: RuntimeError # Please triage this failure.
 subclassing_super_field_2_test: RuntimeError # Please triage this failure.
-super_call_test: RuntimeError # this.bar$0 is not a function
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 648543c..704bd09 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -99,7 +99,6 @@
 unicode_test: Fail # Issue 14694
 
 [ $compiler == dart2js ]
-growable_list_test: RuntimeError # Fails to detect concurrent modification in addAll.
 error_stack_trace1_test: RuntimeError # Issue 12399
 hash_set_test/01: RuntimeError # Issue 11551
 integer_to_string_test/01: RuntimeError # Issue 1533
@@ -205,6 +204,12 @@
 [ $runtime == vm ]
 regexp/global_test: Skip # Timeout. Issue 21709 and 21708
 
+[ $runtime != vm && $compiler != dartanalyzer && $compiler != dart2analyzer]
+package_resource_test: RuntimeError # Issue 23825 (not implemented yet).
+data_resource_test: RuntimeError # Issue 23825 (not implemented yet).
+file_resource_test: Skip, OK # VM specific test, uses dart:io.
+http_resource_test: Skip, OK # VM specific test, uses dart:io.
+
 [ $mode == debug ]
 regexp/pcre_test: Pass, Slow # Timeout. Issue 22008
 
@@ -213,24 +218,23 @@
 big_integer_parsed_mul_div_vm_test: Pass, Slow
 
 [ $compiler == dart2js && $cps_ir ]
+data_resource_test: Crash # bailout: (await for(var byteSlice in resource.openRead()){streamBytes.addAll(byteSlice);}): await for
 error_stack_trace1_test: Pass # H.unwrapException(...).get$stackTrace is not a function
+growable_list_test: RuntimeError # Typed lists
 iterable_empty_test: RuntimeError # Please triage this failure.
 iterable_return_type_test/none: RuntimeError # Please triage this failure.
 iterable_to_list_test: RuntimeError # Please triage this failure.
 iterable_to_set_test: RuntimeError # Please triage this failure.
 list_filled_type_argument_test: RuntimeError # Please triage this failure.
-list_test/01: RuntimeError # this.get$length is not a function
-list_test/none: RuntimeError # this.get$length is not a function
 list_unmodifiable_test: RuntimeError # Please triage this failure.
 map_values2_test: RuntimeError # Please triage this failure.
 map_values3_test: RuntimeError # Please triage this failure.
 map_values4_test: RuntimeError # Please triage this failure.
+package_resource_test: Crash # (await for(var byteSlice in resource.openRead()){streamBytes.addAll(byteSlice);}): await for
 regexp/pcre_test: Crash # Stack Overflow
-shuffle_test: RuntimeError # this.get$length is not a function
-string_fromcharcodes_test: RuntimeError # this.get$length is not a function
 symbol_operator_test/03: RuntimeError # Please triage this failure.
 symbol_reserved_word_test/03: Pass # Please triage this failure.
 symbol_reserved_word_test/06: RuntimeError # Please triage this failure.
 symbol_reserved_word_test/09: RuntimeError # Please triage this failure.
 symbol_reserved_word_test/12: RuntimeError # Please triage this failure.
-symbol_test/none: RuntimeError # Expected a NoSuchMethodError or a TypeError
+symbol_test/none: RuntimeError # Please triage this failure.
diff --git a/tests/corelib/data_resource_test.dart b/tests/corelib/data_resource_test.dart
new file mode 100644
index 0000000..3b9703e
--- /dev/null
+++ b/tests/corelib/data_resource_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+const sampleText = "Sample text file.";
+
+main() async {
+  var uriEncoded = sampleText.replaceAll(' ', '%20');
+  await testUri("data:application/dart;charset=utf-8,$uriEncoded");
+  // TODO: Support other data: URI formats too.
+  // See: https://github.com/dart-lang/sdk/issues/24030
+  // await testUri("data:text/plain;charset=utf-8,$uriEncoded");
+  var base64Encoded = "U2FtcGxlIHRleHQgZmlsZS4=";
+  // await testUri("data:application/dart;charset=utf-8;base64,$base64Encoded");
+  // await testUri("data:text/plain;charset=utf-8;base64,$base64Encoded");
+}
+
+testUri(uriText) async {
+  var resource = new Resource(uriText);
+
+  if (resource.uri != Uri.parse(uriText)) {
+    throw "uriText: Incorrect URI: ${resource.uri}";
+  }
+
+  var text = await resource.readAsString();
+  if (text != sampleText) {
+    throw "uriText: Incorrect reading of text file: $text";
+  }
+
+  var bytes = await resource.readAsBytes();
+  if (!compareBytes(bytes, sampleText.codeUnits)) {
+    throw "uriText: Incorrect reading of bytes: $bytes";
+  }
+
+  var streamBytes = [];
+  await for (var byteSlice in resource.openRead()) {
+    streamBytes.addAll(byteSlice);
+  }
+  if (!compareBytes(streamBytes, sampleText.codeUnits)) {
+    throw "uriText: Incorrect reading of bytes: $bytes";
+  }
+}
+
+/// Checks that [bytes] and [expectedBytes] have the same contents.
+bool compareBytes(bytes, expectedBytes) {
+  if (bytes.length != expectedBytes.length) return false;
+  for (int i = 0; i < expectedBytes.length; i++) {
+    if (bytes[i] != expectedBytes[i]) return false;
+  }
+  return true;
+}
diff --git a/tests/corelib/file_resource_test.dart b/tests/corelib/file_resource_test.dart
new file mode 100644
index 0000000..c9da8f7
--- /dev/null
+++ b/tests/corelib/file_resource_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io";
+
+const sampleText = "Sample text file.";
+
+main() async {
+  var file = await createFile();
+  var uri = new Uri.file(file.path);
+
+  var resource = new Resource(uri.toString());
+
+  if (resource.uri != uri) {
+    throw "Incorrect URI: ${resource.uri}";
+  }
+
+  var text = await resource.readAsString();
+  if (text != sampleText) {
+    throw "Incorrect reading of text file: $text";
+  }
+
+  var bytes = await resource.readAsBytes();
+  if (!compareBytes(bytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  var streamBytes = [];
+  await for (var byteSlice in resource.openRead()) {
+    streamBytes.addAll(byteSlice);
+  }
+  if (!compareBytes(streamBytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  await deleteFile(file);
+}
+
+/// Checks that [bytes] and [expectedBytes] have the same contents.
+bool compareBytes(bytes, expectedBytes) {
+  if (bytes.length != expectedBytes.length) return false;
+  for (int i = 0; i < expectedBytes.length; i++) {
+    if (bytes[i] != expectedBytes[i]) return false;
+  }
+  return true;
+}
+
+createFile() async {
+  var tempDir = await Directory.systemTemp.createTemp("sample");
+  var filePath = tempDir.path + Platform.pathSeparator + "sample.txt";
+  var file = new File(filePath);
+  await file.create();
+  await file.writeAsString(sampleText);
+  return file;
+}
+
+deleteFile(File file) async {
+  // Removes the file and the temporary directory it's in.
+  var parentDir = new Directory(file.path.substring(0,
+                                file.path.lastIndexOf(Platform.pathSeparator)));
+  await parentDir.delete(recursive: true);
+}
diff --git a/tests/corelib/growable_list_test.dart b/tests/corelib/growable_list_test.dart
index 98b4e1f..b1d6e09 100644
--- a/tests/corelib/growable_list_test.dart
+++ b/tests/corelib/growable_list_test.dart
@@ -5,11 +5,19 @@
 // Sanity check on the growing behavior of a growable list.
 
 import "package:expect/expect.dart";
-import "dart:collection" show IterableBase;
+
+void main() {
+  testConstructor();
+
+  bool checked = false;
+  assert((checked = true));
+  // Concurrent modification checks are only guaranteed in checked mode.
+  if (checked) testConcurrentModification();
+}
 
 // Iterable generating numbers in range [0..count).
 // May perform callback at some point underways.
-class TestIterableBase extends IterableBase<int> {
+class TestIterableBase extends Iterable<int> {
   final int length;
   final int count;
   // call [callback] if generating callbackIndex.
@@ -55,29 +63,66 @@
   int get current => _current;
 }
 
+void testConstructor() {
+  // Constructor can make both growable and fixed-length lists.
+  testGrowable(list) {
+    Expect.isTrue(list is List<int>);
+    Expect.isFalse(list is List<String>);
+    int length = list.length;
+    list.add(42);
+    Expect.equals(list.length, length + 1);
+  }
 
-void main() {
+  testFixedLength(list) {
+    Expect.isTrue(list is List<int>);
+    int length = list.length;
+    Expect.throws(() { list.add(42); }, null, "adding to fixed-length list");
+    Expect.equals(length, list.length);
+  }
+
+  bool checked = false;
+  assert((checked = true));
+  testThrowsOrTypeError(fn, test, [name]) {
+    Expect.throws(fn, checked ? null : test,
+                      checked ? name : "$name w/ TypeError");
+  }
+  testFixedLength(new List<int>(0));
+  testFixedLength(new List<int>(5));
+  testGrowable(new List<int>());
+  testGrowable(new List<int>()..length = 5);
+  Expect.throws(() => new List<int>(-1), (e) => e is ArgumentError, "-1");
+  // There must be limits. Fix this test if we ever allow 10^30 elements.
+  Expect.throws(() => new List<int>(0x1000000000000000000000000000000),
+                (e) => e is ArgumentError, "bignum");
+  Expect.throws(() => new List<int>(null), (e) => e is ArgumentError, "null");
+  testThrowsOrTypeError(() => new List([] as Object),  // Cast to avoid warning.
+                        (e) => e is ArgumentError, 'list');
+  testThrowsOrTypeError(() => new List([42] as Object),
+                        (e) => e is ArgumentError, "list2");
+}
+
+void testConcurrentModification() {
   // Without EfficientLength interface
   {
-    // Change length of list after 20 additions.
+    // Change length of list after 200 additions.
     var l = [];
     var ci = new TestIterable(257, 200, () {
       l.add("X");
     });
     Expect.throws(() {
       l.addAll(ci);
-    }, (e) => e is ConcurrentModificationError);
+    }, (e) => e is ConcurrentModificationError, "cm1");
   }
 
   {
-    // Change length of list after 20 additions.
+    // Change length of list after 200 additions.
     var l = [];
     var ci = new TestIterable(257, 200, () {
       l.length = 0;
     });
     Expect.throws(() {
       l.addAll(ci);
-    }, (e) => e is ConcurrentModificationError);
+    }, (e) => e is ConcurrentModificationError, "cm2");
   }
 
   // With EfficientLength interface (uses length).
@@ -89,7 +134,7 @@
     });
     Expect.throws(() {
       l.addAll(ci);
-    }, (e) => e is ConcurrentModificationError);
+    }, (e) => e is ConcurrentModificationError, "cm3");
   }
 
   {
@@ -99,35 +144,37 @@
     });
     Expect.throws(() {
       l.addAll(ci);
-    }, (e) => e is ConcurrentModificationError);
+    }, (e) => e is ConcurrentModificationError, "cm4");
   }
 
   {
-    // Length 50, only 25 elements.
+    // Length 500, only 250 elements.
     var l = [];
     var ci = new EfficientTestIterable(500, 250);
     l.addAll(ci);
-    Expect.listEquals(new List.generate(250, (x)=>x), l);
+    Expect.listEquals(new List.generate(250, (x)=>x), l, "cm5");
   }
 
   {
-    // Length 25, but 50 elements.
+    // Length 250, but 500 elements.
     var l = [];
     var ci = new EfficientTestIterable(250, 500);
     l.addAll(ci);
-    Expect.listEquals(new List.generate(500, (x)=>x), l);
+    Expect.listEquals(new List.generate(500, (x)=>x), l, "cm6");
   }
 
   {
     // Adding to yourself.
     var l = [1];
-    Expect.throws(() { l.addAll(l); }, (e) => e is ConcurrentModificationError);
+    Expect.throws(() { l.addAll(l); },
+                  (e) => e is ConcurrentModificationError, "cm7");
   }
 
   {
     // Adding to yourself.
     var l = [1, 2, 3];
-    Expect.throws(() { l.addAll(l); }, (e) => e is ConcurrentModificationError);
+    Expect.throws(() { l.addAll(l); },
+                  (e) => e is ConcurrentModificationError, "cm8");
   }
 }
 
diff --git a/tests/corelib/http_resource_test.dart b/tests/corelib/http_resource_test.dart
new file mode 100644
index 0000000..815fe9b
--- /dev/null
+++ b/tests/corelib/http_resource_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io";
+
+const sampleText = "Sample text file.";
+
+main() async {
+  var server = await startServer();
+  var uriText = "http://localhost:${server.port}/sample.txt?query#fragment";
+  var resource = new Resource(uriText);
+
+  if (resource.uri != Uri.parse(uriText)) {
+    throw "Incorrect URI: ${resource.uri}";
+  }
+
+  var text = await resource.readAsString();
+  if (text != sampleText) {
+    throw "Incorrect reading of text file: $text";
+  }
+
+  var bytes = await resource.readAsBytes();
+  if (!compareBytes(bytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  var streamBytes = [];
+  await for (var byteSlice in resource.openRead()) {
+    streamBytes.addAll(byteSlice);
+  }
+  if (!compareBytes(streamBytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  await server.close();
+}
+
+/// Checks that [bytes] and [expectedBytes] have the same contents.
+bool compareBytes(bytes, expectedBytes) {
+  if (bytes.length != expectedBytes.length) return false;
+  for (int i = 0; i < expectedBytes.length; i++) {
+    if (bytes[i] != expectedBytes[i]) return false;
+  }
+  return true;
+}
+
+startServer() async {
+  var server = await HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 0);
+  var expectedUri = new Uri(path: "/sample.txt", query: "query");
+  server.forEach((request) async {
+    await request.drain();
+    var response = request.response;
+    if (request.uri == expectedUri) {
+      response.write(sampleText);
+    } else {
+      response.write("INCORRECT PATH!: ${request.uri}");
+    }
+    response.close();
+  });
+  return server;
+}
diff --git a/tests/corelib/package_resource_test.dart b/tests/corelib/package_resource_test.dart
new file mode 100644
index 0000000..767cd8b
--- /dev/null
+++ b/tests/corelib/package_resource_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+const sampleText = "Sample text file.";
+
+main() async {
+  const uriText = "package:package_test_data/resources/sample.txt";
+  const resource = const Resource(uriText);
+
+  if (resource.uri != Uri.parse(uriText)) {
+    throw "Incorrect URI: ${resource.uri}";
+  }
+
+  var text = await resource.readAsString();
+  if (!text.startsWith("Sample text file.")) {
+    throw "Incorrect reading of text file: $text";
+  }
+
+  var bytes = await resource.readAsBytes();
+  if (!compareBytes(bytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  var streamBytes = [];
+  await for (var byteSlice in resource.openRead()) {
+    streamBytes.addAll(byteSlice);
+  }
+  if (!compareBytes(streamBytes, sampleText.codeUnits)) {
+    throw "Incorrect reading of bytes: $bytes";
+  }
+
+  if (!compareBytes(streamBytes, bytes)) {
+    throw "Inconsistent reading of bytes: $bytes / $streamBytes";
+  }
+}
+
+/// Checks that [bytes] starts with [expectedBytes].
+///
+/// The bytes may be longer (because the test file is a text file and its
+/// terminating line ending may be mangled on some platforms).
+bool compareBytes(bytes, expectedBytes) {
+  if (bytes.length < expectedBytes.length) return false;
+  for (int i = 0; i < expectedBytes.length; i++) {
+    if (bytes[i] != expectedBytes[i]) return false;
+  }
+  return true;
+}
diff --git a/tests/html/html.status b/tests/html/html.status
index 0b02629..4d21887 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -21,6 +21,7 @@
 element_animate_test/omit_timing: Fail # Not supported on Dartium
 element_animate_test/timing_dict: Fail # Not supported on Dartium
 trusted_html_tree_sanitizer_test/untrusted: Fail # We make adoptNode throw to verify it's not being called. That doesn't work on Dartium.
+resource_http_test: Fail # Issue 24203
 
 [ $compiler == none && $mode == debug && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
 datalistelement_test: Skip # Issue 20540
@@ -200,6 +201,9 @@
 css_test/supportsPointConversions: Fail # Issues 21710
 css_test/functional: Fail # Issues 21710
 
+[ $compiler == dart2js && $cps_ir ]
+resource_http_test: Crash # Cannot handle async functions.
+
 [ $runtime == ie11 ]
 custom/document_register_type_extensions_test/single-parameter: Fail # Issue 13193.
 canvasrenderingcontext2d_test/arc: Pass, Fail # Pixel unexpected value. Please triage this failure.
@@ -417,4 +421,3 @@
 typing_test: StaticWarning
 webgl_1_test: StaticWarning
 window_nosuchmethod_test: StaticWarning
-
diff --git a/tests/html/resource_data.txt b/tests/html/resource_data.txt
new file mode 100644
index 0000000..37308e5
--- /dev/null
+++ b/tests/html/resource_data.txt
@@ -0,0 +1 @@
+This file was read by a Resource!
\ No newline at end of file
diff --git a/tests/html/resource_http_test.dart b/tests/html/resource_http_test.dart
new file mode 100644
index 0000000..042e8b3
--- /dev/null
+++ b/tests/html/resource_http_test.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library resource_http_test;
+import 'dart:async';
+import 'package:unittest/html_individual_config.dart';
+import 'package:unittest/unittest.dart';
+
+main() {
+  useHtmlIndividualConfiguration();
+  // Cache blocker is a workaround for:
+  // https://code.google.com/p/dart/issues/detail?id=11834
+  var cacheBlocker = new DateTime.now().millisecondsSinceEpoch;
+  var url = '/root_dart/tests/html/resource_data.txt?cacheBlock=$cacheBlocker';
+
+  void validateResponse(data) {
+    expect(data, equals('This file was read by a Resource!'));
+  }
+
+  group('resource', () {
+    test('readAsString', () async {
+      Resource r = new Resource(url);
+      var data = await r.readAsString();
+      validateResponse(data);
+    });
+    test('readAsBytes', () async {
+      Resource r = new Resource(url);
+      var data = await r.readAsBytes();
+      validateResponse(new String.fromCharCodes(data));
+    });
+    test('openRead', () async {
+      Resource r = new Resource(url);
+      var bytes = [];
+      await for (var b in r.openRead()) {
+        bytes.addAll(b);
+      }
+      validateResponse(new String.fromCharCodes(bytes));
+    });
+  });
+}
diff --git a/tests/language/async_star_regression_fisk_test.dart b/tests/language/async_star_regression_fisk_test.dart
index b05356a9..b46d90f 100644
--- a/tests/language/async_star_regression_fisk_test.dart
+++ b/tests/language/async_star_regression_fisk_test.dart
@@ -34,10 +34,11 @@
   fugl(3).whenComplete(() => fugl(2))
       .whenComplete(() => fugl(1))
       .whenComplete(() {
-    Expect.listEquals(res,
+    Expect.listEquals(
         ["fisk 3", "+fisk", 0, 1, "-fisk", "done",
          "fisk 2", "+fisk", 0, 1, "-fisk", "done",
-         "fisk 1", "+fisk", 0, "done", "-fisk", ]);
+         "fisk 1", "+fisk", 0, "-fisk", "done"],
+        res);
     asyncEnd();
   });
 }
diff --git a/tests/language/language.status b/tests/language/language.status
index ce9ff2e..9ad2646 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -30,7 +30,6 @@
 async_star_regression_2238_test: CompileTimeError, RuntimeError # drt only runtime-errs.
 async_star_cancel_while_paused_test: RuntimeError
 async_star_await_pauses_test: Skip # Times out. Issue 23996
-async_star_regression_fisk_test: RuntimeError # Issue 23994
 
 [ $compiler == none && $runtime == vm ]
 class_keyword_test/02: MissingCompileTimeError # Issue 13627
diff --git a/tests/language/language_analyzer2.status b/tests/language/language_analyzer2.status
index a539fa1..24de2b9 100644
--- a/tests/language/language_analyzer2.status
+++ b/tests/language/language_analyzer2.status
@@ -7,9 +7,6 @@
 # Runtime negative test. No static errors or warnings.
 closure_call_wrong_argument_count_negative_test: skip
 
-enum_syntax_test/02: Fail # 21649
-enum_syntax_test/03: Fail # 21649
-enum_syntax_test/04: Fail # 21649
 enum_syntax_test/05: Fail # 21649
 enum_syntax_test/06: Fail # 21649
 
@@ -306,8 +303,6 @@
 mixin_invalid_bound_test/none: StaticWarning # legitimate StaticWarning, cannot be annotated
 mixin_invalid_bound2_test/none: StaticWarning # legitimate StaticWarning, cannot be annotated
 mixin_super_bound_test: StaticWarning # legitimate StaticWarning, cannot be annotated
-mixin_super_bound2_test: CompileTimeError # Issue 23772
-mixin_super_test: CompileTimeError # Issue 23772
 named_constructor_test/01: StaticWarning
 named_constructor_test/03: StaticWarning
 named_parameters2_test: StaticWarning
@@ -393,14 +388,12 @@
 string_interpolate1_negative_test: CompileTimeError
 string_interpolate2_negative_test: CompileTimeError
 string_interpolate_test: StaticWarning
-string_interpolation_and_buffer_test: StaticWarning
 string_interpolation1_negative_test: CompileTimeError
 string_interpolation2_negative_test: CompileTimeError
 string_interpolation3_negative_test: CompileTimeError
 string_interpolation4_negative_test: CompileTimeError
 string_interpolation5_negative_test: CompileTimeError
 string_interpolation6_negative_test: CompileTimeError
-string_split_test: StaticWarning
 string_test: StaticWarning
 string_unicode1_negative_test: CompileTimeError
 string_unicode2_negative_test: CompileTimeError
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 0d39999..03eba0f 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -18,62 +18,6 @@
 
 call_function_apply_test: RuntimeError # Issue 23873
 
-conditional_method_invocation_test/12: Fail # Issue 23795
-conditional_method_invocation_test/13: Fail # Issue 23795
-conditional_method_invocation_test/14: Fail # Issue 23795
-conditional_method_invocation_test/15: Fail # Issue 23795
-conditional_method_invocation_test/16: Fail # Issue 23795
-conditional_method_invocation_test/17: Fail # Issue 23795
-conditional_method_invocation_test/18: Fail # Issue 23795
-conditional_method_invocation_test/19: Fail # Issue 23795
-conditional_property_access_test/10: Fail # Issue 23795
-conditional_property_access_test/11: Fail # Issue 23795
-conditional_property_access_test/12: Fail # Issue 23795
-conditional_property_access_test/13: Fail # Issue 23795
-conditional_property_access_test/14: Fail # Issue 23795
-conditional_property_access_test/15: Fail # Issue 23795
-conditional_property_access_test/16: Fail # Issue 23795
-conditional_property_access_test/17: Fail # Issue 23795
-conditional_property_assignment_test/23: Fail # Issue 23795
-conditional_property_assignment_test/24: Fail # Issue 23795
-conditional_property_assignment_test/25: Fail # Issue 23795
-conditional_property_assignment_test/26: Fail # Issue 23795
-conditional_property_assignment_test/27: Fail # Issue 23795
-conditional_property_assignment_test/28: Fail # Issue 23795
-conditional_property_assignment_test/29: Fail # Issue 23795
-conditional_property_assignment_test/30: Fail # Issue 23795
-conditional_property_assignment_test/31: Fail # Issue 23795
-conditional_property_assignment_test/32: Fail # Issue 23795
-conditional_property_assignment_test/33: Fail # Issue 23795
-conditional_property_assignment_test/34: Fail # Issue 23795
-conditional_property_assignment_test/35: Fail # Issue 23795
-conditional_property_increment_decrement_test/17: Fail # Issue 23795
-conditional_property_increment_decrement_test/18: Fail # Issue 23795
-conditional_property_increment_decrement_test/19: Fail # Issue 23795
-conditional_property_increment_decrement_test/20: Fail # Issue 23795
-conditional_property_increment_decrement_test/21: Fail # Issue 23795
-conditional_property_increment_decrement_test/22: Fail # Issue 23795
-conditional_property_increment_decrement_test/23: Fail # Issue 23795
-conditional_property_increment_decrement_test/24: Fail # Issue 23795
-conditional_property_increment_decrement_test/25: Fail # Issue 23795
-conditional_property_increment_decrement_test/26: Fail # Issue 23795
-conditional_property_increment_decrement_test/27: Fail # Issue 23795
-conditional_property_increment_decrement_test/28: Fail # Issue 23795
-conditional_property_increment_decrement_test/29: Fail # Issue 23795
-conditional_property_increment_decrement_test/30: Fail # Issue 23795
-conditional_property_increment_decrement_test/31: Fail # Issue 23795
-conditional_property_increment_decrement_test/32: Fail # Issue 23795
-conditional_property_increment_decrement_test/33: Fail # Issue 23795
-conditional_property_increment_decrement_test/34: Fail # Issue 23795
-conditional_property_increment_decrement_test/35: Fail # Issue 23795
-conditional_property_increment_decrement_test/36: Fail # Issue 23795
-conditional_property_increment_decrement_test/37: Fail # Issue 23795
-conditional_property_increment_decrement_test/38: Fail # Issue 23795
-conditional_property_increment_decrement_test/39: Fail # Issue 23795
-conditional_property_increment_decrement_test/40: Fail # Issue 23795
-if_null_assignment_behavior_test/31: Fail # Issue 23795
-if_null_assignment_behavior_test/32: Fail # Issue 23795
-
 [ $compiler == dart2js && $runtime == jsshell ]
 await_for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
 async_star_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
@@ -159,22 +103,6 @@
 malbounded_type_test2_test: Fail # Issue 14121
 default_factory2_test/01: Fail # Issue 14121
 
-[ $compiler == dart2js && $checked ]
-compile_time_constant_checked5_test/06: Fail # Issue 23182
-compile_time_constant_checked5_test/07: Fail # Issue 23182
-compile_time_constant_checked5_test/10: Fail # Issue 23182
-compile_time_constant_checked5_test/11: Fail # Issue 23182
-compile_time_constant_checked5_test/12: Fail # Issue 23182
-compile_time_constant_checked5_test/15: Fail # Issue 23182
-compile_time_constant_checked5_test/16: Fail # Issue 23182
-compile_time_constant_checked5_test/17: Fail # Issue 23182
-compile_time_constant_checked5_test/20: Fail # Issue 23182
-compile_time_constant_checked5_test/21: Fail # Issue 23182
-compile_time_constant_checked5_test/22: Fail # Issue 23182
-compile_time_constant_checked5_test/23: Fail # Issue 23182
-compile_time_constant_checked5_test/24: Fail # Issue 23182
-compile_time_constant_checked5_test/25: Fail # Issue 23182
-
 [ $compiler == dart2js && $unchecked ]
 type_checks_in_factory_method_test: RuntimeError # Issue 12746
 assertion_test: RuntimeError # Issue 12748
@@ -300,128 +228,80 @@
 generic_field_mixin5_test: Crash # Issue 18651
 many_method_calls_test: Crash # Stack overflow in HGraphVisitor.visitPostDominatorTree.visitBasicBlockAndSuccessors
 
+[ $compiler == dart2js && ($runtime == d8 || $runtime == jsshell) ]
+issue23244_test: RuntimeError # 23244
+
 [ $compiler == dart2js && $cps_ir ]
-async_and_or_test: Crash # (test()async{await test1();await test2();}): cannot handle async/sync*/async* functions
-async_await_catch_regression_test: Crash # (test()async{var exc...  cannot handle async/sync*/async* functions
-async_await_syntax_test/a01a: Crash # (a01a()async=>null;): cannot handle async/sync*/async* functions
-async_await_syntax_test/a02a: Crash # (a02a()async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a03a: Crash # (a03a()async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a03b: Crash # (a03b()async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a04a: Crash # (a04a()sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a04c: Crash # (a04c()sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a05a: Crash # (a05a()async{await 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a05b: Crash # (a05b()async{await (a){};await (0);}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a05h: Crash # (a05h()async{yield*st;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a06a: Crash # (a06a()async{await for(var o in st){}}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a07a: Crash # (a07a()sync*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a08a: Crash # (a08a()sync*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a09a: Crash # (a09a()async*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a10a: Crash # (a10a()async*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a11b: Crash # (get sync sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a11c: Crash # (get async async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a11d: Crash # (get async async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/a12g: Crash # (get a12g async=>null;): cannot handle async/sync*/async* functions
-async_await_syntax_test/b01a: Crash # (b01a()async=>null;): cannot handle async/sync*/async* functions
-async_await_syntax_test/b02a: Crash # (b02a()async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b03a: Crash # (b03a()async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b04a: Crash # (b04a()sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b05a: Crash # (b05a()async{await 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b06a: Crash # (b06a()async{await for(var o in st){}}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b07a: Crash # (b07a()sync*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b08a: Crash # (b08a()sync*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b09a: Crash # (b09a()async*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b10a: Crash # (b10a()async*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b11b: Crash # (get sync sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b11c: Crash # (get async async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b11d: Crash # (get async async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/b12g: Crash # (get b12g async=>null;): cannot handle async/sync*/async* functions
-async_await_syntax_test/c01a: Crash # (c01a()async=>null;): cannot handle async/sync*/async* functions
-async_await_syntax_test/c02a: Crash # (c02a()async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c03a: Crash # (c03a()async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c04a: Crash # (c04a()sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c05a: Crash # (c05a()async{await 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c06a: Crash # (c06a()async{await for(var o in st){}}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c07a: Crash # (c07a()sync*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c08a: Crash # (c08a()sync*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c09a: Crash # (c09a()async*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c10a: Crash # (c10a()async*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c11a: Crash # (c11a()async{yield-5;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/c11b: Crash # (c11b()async{yield*st;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d01a: Crash # (()async=>null): cannot handle async/sync*/async* functions
-async_await_syntax_test/d02a: Crash # (()async{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d03a: Crash # (()async*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d04a: Crash # (()sync*{}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d05a: Crash # (()async{await 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d06a: Crash # (()async{await for(var o in st){}}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d07a: Crash # (()sync*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d08a: Crash # (()sync*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d08b: Crash # (()sync*{yield* 0+1;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d09a: Crash # (()async*{yield 0;}): cannot handle async/sync*/async* functions
-async_await_syntax_test/d10a: Crash # (()async*{yield* [] ;}): cannot handle async/sync*/async* functions
-async_await_test/02: Crash # (f()async{return id(42);}): cannot handle async/sync*/async* functions
-async_await_test/03: Crash # (f()async{return id(42);}): cannot handle async/sync*/async* functions
-async_await_test/none: Crash # (f()async{return id(42);}): cannot handle async/sync*/async* functions
-async_break_in_finally_test: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_continue_label_test/await_in_body: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
-async_continue_label_test/await_in_condition: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
-async_continue_label_test/await_in_init: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
-async_continue_label_test/await_in_update: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
-async_continue_label_test/none: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
-async_control_structures_test: Crash # (asyncImplicitReturn...  cannot handle async/sync*/async* functions
-async_finally_rethrow_test: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-async_or_generator_return_type_stacktrace_test/01: Crash # (void badReturnTypeAsync()async{}): cannot handle async/sync*/async* functions
-async_or_generator_return_type_stacktrace_test/02: Crash # (void badReturnTypeAsyncStar()async*{}): cannot handle async/sync*/async* functions
-async_or_generator_return_type_stacktrace_test/03: Crash # (void badReturnTypeSyncStar()sync*{}): cannot handle async/sync*/async* functions
-async_regression_23058_test: Crash # (foo()async{return x.foo==2?42:x.foo;}): cannot handle async/sync*/async* functions
-async_rethrow_test: Crash # (rethrowString()asyn...  cannot handle async/sync*/async* functions
-async_return_types_test/nestedFuture: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_return_types_test/none: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_return_types_test/tooManyTypeParameters: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_return_types_test/wrongReturnType: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_return_types_test/wrongTypeParameter: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_star_cancel_and_throw_in_finally_test: Crash # (test()async{var com...  cannot handle async/sync*/async* functions
-async_star_regression_23116_test: Crash # (test()async{Complet...  cannot handle async/sync*/async* functions
-async_star_regression_2238_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_star_cancel_while_paused_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_star_stream_take_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_star_take_reyield_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_star_await_pauses_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_star_test: Crash # (f()async*{}): cannot handle async/sync*/async* functions
-async_switch_test/none: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_switch_test/withDefault: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-async_test/none: Crash # (bar(int p1,p2)async{var z=8;return p2+z+foo;}): cannot handle async/sync*/async* functions
-async_test/type-mismatch1: Crash # (bar(int p1,p2)async{var z=8;return p2+z+foo;}): cannot handle async/sync*/async* functions
-async_test/type-mismatch2: Crash # (bar(int p1,p2)async{var z=8;return p2+z+foo;}): cannot handle async/sync*/async* functions
-async_test/type-mismatch3: Crash # (bar(int p1,p2)async{var z=8;return p2+z+foo;}): cannot handle async/sync*/async* functions
-async_test/type-mismatch4: Crash # (bar(int p1,p2)async{var z=8;return p2+z+foo;}): cannot handle async/sync*/async* functions
-async_this_bound_test: Crash # (test()async{await testA();await testB();}): cannot handle async/sync*/async* functions
-async_throw_in_catch_test/forceAwait: Crash # (test()async{await r...  cannot handle async/sync*/async* functions
-async_throw_in_catch_test/none: Crash # (test()async{await r...  cannot handle async/sync*/async* functions
-asyncstar_concat_test: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-asyncstar_throw_in_catch_test: Crash # (test()async{await r...  cannot handle async/sync*/async* functions
-asyncstar_yield_test: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-asyncstar_yieldstar_test: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-await_backwards_compatibility_test/none: Crash # (test1()async{var x=await 9;Expect.equals(9,x);}): cannot handle async/sync*/async* functions
-await_exceptions_test: Crash # (awaitFoo()async{await foo();}): cannot handle async/sync*/async* functions
-await_for_cancel_test: Crash # (test()async{await test1();await test2();}): cannot handle async/sync*/async* functions
-await_for_test: Crash # (consumeSomeOfInfini...  cannot handle async/sync*/async* functions
-await_for_use_local_test: Crash # (test()async{var cou...  cannot handle async/sync*/async* functions
-await_future_test: Crash # (test()async{var res...  cannot handle async/sync*/async* functions
-await_nonfuture_test: Crash # (foo()async{Expect.equals(X,10);return await 5;}): cannot handle async/sync*/async* functions
-await_not_started_immediately_test: Crash # (foo()async{x++ ;await 1;x++ ;}): cannot handle async/sync*/async* functions
-await_postfix_expr_test: Crash # (test()async{Expect....  cannot handle async/sync*/async* functions
-await_regression_test: Crash # (main()async{testNes...  cannot handle async/sync*/async* functions
-await_test: Crash # (others()async{var a...  cannot handle async/sync*/async* functions
+async_await_syntax_test/a03a: Crash # (a03a()async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/a03b: Crash # (a03b()async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/a04a: Crash # (a04a()sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/a04c: Crash # (a04c()sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/a06a: Crash # (await for(var o in st){}): await for
+async_await_syntax_test/a07a: Crash # (a07a()sync*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/a08a: Crash # (a08a()sync*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/a09a: Crash # (a09a()async*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/a10a: Crash # (a10a()async*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/a11b: Crash # (get sync sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/a11d: Crash # (get async async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/b03a: Crash # (b03a()async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/b04a: Crash # (b04a()sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/b06a: Crash # (await for(var o in st){}): await for
+async_await_syntax_test/b07a: Crash # (b07a()sync*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/b08a: Crash # (b08a()sync*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/b09a: Crash # (b09a()async*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/b10a: Crash # (b10a()async*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/b11b: Crash # (get sync sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/b11d: Crash # (get async async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/c03a: Crash # (c03a()async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/c04a: Crash # (c04a()sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/c06a: Crash # (await for(var o in st){}): await for
+async_await_syntax_test/c07a: Crash # (c07a()sync*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/c08a: Crash # (c08a()sync*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/c09a: Crash # (c09a()async*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/c10a: Crash # (c10a()async*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/d03a: Crash # (()async*{}): cannot handle sync*/async* functions
+async_await_syntax_test/d04a: Crash # (()sync*{}): cannot handle sync*/async* functions
+async_await_syntax_test/d06a: Crash # (await for(var o in st){}): await for
+async_await_syntax_test/d07a: Crash # (()sync*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/d08a: Crash # (()sync*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_syntax_test/d08b: Crash # (()sync*{yield* 0+1;}): cannot handle sync*/async* functions
+async_await_syntax_test/d09a: Crash # (()async*{yield 0;}): cannot handle sync*/async* functions
+async_await_syntax_test/d10a: Crash # (()async*{yield* [] ;}): cannot handle sync*/async* functions
+async_await_test/02: Crash # (switch (v){label:ca...  continue to a labeled switch case
+async_await_test/03: Crash # (switch (v){label:ca...  continue to a labeled switch case
+async_await_test/none: Crash # (switch (v){label:ca...  continue to a labeled switch case
+async_continue_label_test/await_in_init: RuntimeError # Please triage this failure.
+async_continue_label_test/await_in_update: RuntimeError # Please triage this failure.
+async_or_generator_return_type_stacktrace_test/02: Crash # (void badReturnTypeAsyncStar()async*{}): cannot handle sync*/async* functions
+async_or_generator_return_type_stacktrace_test/03: Crash # (void badReturnTypeSyncStar()sync*{}): cannot handle sync*/async* functions
+async_star_await_pauses_test: Crash # (await for(var i in ...  await for
+async_star_cancel_and_throw_in_finally_test: Crash # (foo()async*{try {in...  cannot handle sync*/async* functions
+async_star_cancel_while_paused_test: Crash # (f()async*{list.add(...  cannot handle sync*/async* functions
+async_star_regression_2238_test: Crash # (f()async*{label1:label2:yield 0;}): cannot handle sync*/async* functions
+async_star_regression_23116_test: Crash # (Stream<int> foo(Com...  cannot handle sync*/async* functions
+async_star_regression_fisk_test: Crash # (fisk()async*{res.ad...  cannot handle sync*/async* functions
+async_star_stream_take_test: Crash # (await for(var v in s.take(5))r+= v;): await for
+async_star_take_reyield_test: Crash # (fivePartialSums(Str...  cannot handle sync*/async* functions
+async_star_test: Crash # (f()async*{}): cannot handle sync*/async* functions
+asyncstar_concat_test: Crash # (concat(a,b)async*{yield* a;yield* b;}): cannot handle sync*/async* functions
+asyncstar_throw_in_catch_test: Crash # (foo4(Tracer tracer)...  cannot handle sync*/async* functions
+asyncstar_yield_test: Crash # (Stream<int> foo4()a...  cannot handle sync*/async* functions
+asyncstar_yieldstar_test: Crash # (foo2(Stream subStream)async*{yield* subStream;}): cannot handle sync*/async* functions
+await_for_cancel_test: Crash # (await for(var x in controller.stream){for(int j=0;j<10;j++ ){if(j==5)continue outer;}}): await for
+await_for_test: Crash # (await for(var x in infiniteStream()){i++ ;if(i>10)break;t4.record(x);}): await for
+await_for_use_local_test: Crash # (await for(var v in s){accum+= v;}): await for
+await_future_test: RuntimeError # Please triage this failure.
+await_regression_test: RuntimeError # Please triage this failure.
+await_test: RuntimeError # $async$temp1.S is not a function
 cha_deopt1_test: Crash # (d.make_u()): deferred access is not implemented
 cha_deopt2_test: Crash # (d.make_u()): deferred access is not implemented
 cha_deopt3_test: Crash # (d.make_u()): deferred access is not implemented
-closure_in_constructor_test: Crash # Invalid argument(s)
-closure_type_variables_test: Crash # Invalid argument(s)
+closure_in_constructor_test: RuntimeError # Typed lists.
 closures_initializer_test: RuntimeError # Please triage this failure.
-const_evaluation_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+const_evaluation_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 constructor12_test: RuntimeError # Please triage this failure.
 crash_6725_test/01: Crash # unsupported operation on erroneous element
-custom_await_stack_trace_test: Crash # (main()async{try {va...  cannot handle async/sync*/async* functions
+cyclic_default_values_test: RuntimeError # Z.cyclic_default_values_test__foo$closure is not a function
 deferred_call_empty_before_load_test: Crash # (lib1.thefun()): deferred access is not implemented
 deferred_closurize_load_library_test: Crash # (lib.trueVar): deferred access is not implemented
 deferred_constant_list_test: Crash # (lib.finalConstList): deferred access is not implemented
@@ -456,31 +336,17 @@
 deferred_not_loaded_check_test: Crash # (lib.closure(sideEffect())): deferred access is not implemented
 deferred_only_constant_test: Crash # (lib.constant): deferred access is not implemented
 deferred_optimized_test: Crash # (lib.foo()): deferred access is not implemented
-deferred_redirecting_factory_test: Crash # (test()async{await t...  cannot handle async/sync*/async* functions
+deferred_redirecting_factory_test: Crash # (lib1.loadLib2()): deferred access is not implemented
 deferred_regression_22995_test: Crash # (lib.foofoo()): deferred access is not implemented
 deferred_shadow_load_library_test: Crash # (lib.trueVar): deferred access is not implemented
 deferred_shared_and_unshared_classes_test: Crash # (lib2.foo()): deferred access is not implemented
 deferred_static_seperate_test: Crash # (lib1.x): deferred access is not implemented
-deferred_type_dependency_test/as: Crash # (main()async{await l...  cannot handle async/sync*/async* functions
-deferred_type_dependency_test/is: Crash # (main()async{await l...  cannot handle async/sync*/async* functions
-deferred_type_dependency_test/none: Crash # (main()async{await l...  cannot handle async/sync*/async* functions
-deferred_type_dependency_test/type_annotation: Crash # (main()async{await l...  cannot handle async/sync*/async* functions
-enum_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-final_super_field_set_test/01: RuntimeError # Please triage this failure.
+deferred_type_dependency_test/as: Crash # (lib1.fooAs("string")): deferred access is not implemented
+deferred_type_dependency_test/is: Crash # (lib1.fooIs("string")): deferred access is not implemented
+deferred_type_dependency_test/none: Crash # (lib2.getInstance()): deferred access is not implemented
+deferred_type_dependency_test/type_annotation: Crash # (lib1.fooAnnotation("string")): deferred access is not implemented
+enum_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 first_class_types_test: RuntimeError # Please triage this failure.
-flatten_test/01: Crash # (test()async{int x=await new Derived<int>();}): cannot handle async/sync*/async* functions
-flatten_test/02: Crash # (test()async{Future<int> f()async=>new Derived<int>();}): cannot handle async/sync*/async* functions
-flatten_test/03: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/04: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/05: Crash # (test()async{FixedPo...  cannot handle async/sync*/async* functions
-flatten_test/06: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/07: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/08: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/09: Crash # (test()async{Diverge...  cannot handle async/sync*/async* functions
-flatten_test/10: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/11: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/12: Crash # (test()async{Future<...  cannot handle async/sync*/async* functions
-flatten_test/none: Crash # (test()async{}): cannot handle async/sync*/async* functions
 for2_test: Crash # The null object does not have a getter 'field'.
 for_variable_capture_test: Crash # (i=0): For-loop variable captured in loop header
 generic2_test: RuntimeError # Please triage this failure.
@@ -488,11 +354,12 @@
 generic_instanceof_test: RuntimeError # Please triage this failure.
 generic_native_test: RuntimeError # Please triage this failure.
 infinite_switch_label_test: Crash # (switch (target){l0:...  continue to a labeled switch case
-instance_creation_in_function_annotation_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+instance_creation_in_function_annotation_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 instanceof2_test: RuntimeError # Please triage this failure.
 instanceof4_test/01: RuntimeError # Please triage this failure.
 invocation_mirror_invoke_on_test: RuntimeError # Please triage this failure.
 invocation_mirror_test: Crash # (super[37]=42): visitUnresolvedSuperIndexSet
+issue21079_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 issue_1751477_test: RuntimeError # O.loadLibrary is not a function
 list_is_test: RuntimeError # Please triage this failure.
 list_test: RuntimeError # Please triage this failure.
@@ -500,21 +367,13 @@
 many_overridden_no_such_method_test: RuntimeError # Please triage this failure.
 nested_switch_label_test: Crash # (switch (target){out...  continue to a labeled switch case
 no_such_method_test: RuntimeError # Please triage this failure.
-null_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+null_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 overridden_no_such_method_test: RuntimeError # Please triage this failure.
-redirecting_factory_reflection_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-regress_18535_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-regress_22438_test: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
+redirecting_factory_reflection_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+regress_18535_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 regress_22443_test: RuntimeError # M.loadLibrary is not a function
-regress_22445_test: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-regress_22579_test: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-regress_22728_test: Crash # (main()async{bool fa...  cannot handle async/sync*/async* functions
-regress_22777_test: Crash # (test()async{try {te...  cannot handle async/sync*/async* functions
 regress_23408_test: RuntimeError # G.loadLibrary is not a function
-regress_23498_test: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-regress_23500_test/01: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-regress_23500_test/02: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
-regress_23500_test/none: Crash # (main()async{var err...  cannot handle async/sync*/async* functions
+regress_23500_test/01: Crash # (await for(var c in new Stream.fromIterable([] )){}): await for
 super_bound_closure_test/01: RuntimeError # Cannot read property 'call' of undefined
 super_bound_closure_test/none: RuntimeError # Cannot read property 'call' of undefined
 super_call4_test: RuntimeError # Please triage this failure.
@@ -528,30 +387,19 @@
 switch_label2_test: Crash # (switch (target){cas...  continue to a labeled switch case
 switch_label_test: Crash # (switch (animal){cas...  continue to a labeled switch case
 switch_try_catch_test: Crash # (switch (0){_0:case ...  continue to a labeled switch case
-sync_generator1_test/01: Crash # (dreiVier()sync*{yield* 3;}): cannot handle async/sync*/async* functions
-sync_generator1_test/none: Crash # (einsZwei()sync*{yie...  cannot handle async/sync*/async* functions
-sync_generator2_test/07: Crash # (sync()sync*{yield sync;}): cannot handle async/sync*/async* functions
-sync_generator2_test/08: Crash # (sync()sync*{yield sync;}): cannot handle async/sync*/async* functions
-sync_generator2_test/10: Crash # (sync()sync*{yield sync;}): cannot handle async/sync*/async* functions
-sync_generator2_test/none: Crash # (sync()sync*{yield sync;}): cannot handle async/sync*/async* functions
-sync_generator3_test/test1: Crash # (f()sync*{try {yield...  cannot handle async/sync*/async* functions
-sync_generator3_test/test2: Crash # (g()sync*{try {yield...  cannot handle async/sync*/async* functions
-syncstar_less_than_test: Crash # (Iterable<int> foo()...  cannot handle async/sync*/async* functions
-syncstar_yield_test/copyParameters: Crash # (Iterable<int> foo3(...  cannot handle async/sync*/async* functions
-syncstar_yield_test/none: Crash # (Iterable<int> foo3(...  cannot handle async/sync*/async* functions
-syncstar_yieldstar_test: Crash # (main()async{Expect....  cannot handle async/sync*/async* functions
-type_parameter_test/01: Crash # Invalid argument(s)
-type_parameter_test/02: Crash # Invalid argument(s)
-type_parameter_test/03: Crash # Invalid argument(s)
-type_parameter_test/04: Crash # Invalid argument(s)
-type_parameter_test/05: Crash # Invalid argument(s)
-type_parameter_test/06: Crash # Invalid argument(s)
-type_parameter_test/none: Crash # Invalid argument(s)
+sync_generator1_test/01: Crash # (dreiVier()sync*{yield* 3;}): cannot handle sync*/async* functions
+sync_generator1_test/none: Crash # (einsZwei()sync*{yie...  cannot handle sync*/async* functions
+sync_generator2_test/07: Crash # (sync()sync*{yield sync;}): cannot handle sync*/async* functions
+sync_generator2_test/08: Crash # (sync()sync*{yield sync;}): cannot handle sync*/async* functions
+sync_generator2_test/10: Crash # (sync()sync*{yield sync;}): cannot handle sync*/async* functions
+sync_generator2_test/none: Crash # (sync()sync*{yield sync;}): cannot handle sync*/async* functions
+sync_generator3_test/test1: Crash # (f()sync*{try {yield...  cannot handle sync*/async* functions
+sync_generator3_test/test2: Crash # (g()sync*{try {yield "a";throw "pow!";}finally {yield "b";}}): cannot handle sync*/async* functions
+syncstar_less_than_test: Crash # (Iterable<int> foo()...  cannot handle sync*/async* functions
+syncstar_yield_test/copyParameters: Crash # (Iterable<int> foo3(int p)sync*{int i=0;i++ ;p++ ;yield p+i;}): cannot handle sync*/async* functions
+syncstar_yield_test/none: Crash # (Iterable<int> foo3(int p)sync*{int i=0;i++ ;p++ ;yield p+i;}): cannot handle sync*/async* functions
+syncstar_yieldstar_test: Crash # (foo()sync*{yield* [1,2,3];yield null;yield* bar();}): cannot handle sync*/async* functions
 type_variable_closure2_test: RuntimeError # Please triage this failure.
-type_variable_closure_test: Crash # Invalid argument(s)
 type_variable_field_initializer_closure_test: RuntimeError # Please triage this failure.
 type_variable_field_initializer_test: RuntimeError # Please triage this failure.
 type_variable_nested_test: RuntimeError # Please triage this failure.
-
-[ $compiler == dart2js && ($runtime == d8 || $runtime == jsshell) ]
-issue23244_test: RuntimeError # 23244
diff --git a/tests/language/string_interpolation_and_buffer_test.dart b/tests/language/string_interpolation_and_buffer_test.dart
index 5006d6e..4569027 100644
--- a/tests/language/string_interpolation_and_buffer_test.dart
+++ b/tests/language/string_interpolation_and_buffer_test.dart
@@ -20,8 +20,9 @@
 final bool checkedMode = computeCheckedMode();
 bool computeCheckedMode() {
   try {
-    int x = "foo";
-  } on Error {
+    var i = 42;
+    String s = i;
+  } on TypeError catch (e) {
     return true;
   }
   return false;
diff --git a/tests/language/string_split_test.dart b/tests/language/string_split_test.dart
index 56189cc..8cf00bb 100644
--- a/tests/language/string_split_test.dart
+++ b/tests/language/string_split_test.dart
@@ -8,6 +8,7 @@
 class EvilMatch implements Match {
   int get start => 100000000;
   int get end => 3;
+  bool noSuchMethod(Invocation im) {}  // To appease dartanalyzer.
 }
 
 class EvilIterator implements Iterator {
@@ -20,7 +21,8 @@
 }
 
 class EvilPattern implements Pattern {
-  Iterable allMatches(String s) => new EvilIterable();
+  Iterable allMatches(String s, [int start=0]) => new EvilIterable();
+  bool noSuchMethod(Invocation im) {}  // To appease dartanalyzer.
 }
 
 void main() {
diff --git a/tests/lib/async/async_await_sync_completer_test.dart b/tests/lib/async/async_await_sync_completer_test.dart
new file mode 100644
index 0000000..5865729
--- /dev/null
+++ b/tests/lib/async/async_await_sync_completer_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+
+import 'dart:async';
+
+var events = [];
+var delayedValue = new Completer();
+var delayedError = new Completer();
+
+foo() async {
+  new Future.microtask(() => 'in microtask')
+      .then(events.add)
+      .then(delayedValue.complete);
+  return 'in async function';
+}
+
+bar() async {
+  new Future.microtask(() => throw 'in microtask error')
+      .catchError(events.add)
+      .then(delayedError.complete);
+  throw 'in async function error';
+}
+
+void main() {
+  asyncStart();
+  var asyncValueFuture = foo().then(events.add);
+  var asyncErrorFuture = bar().catchError(events.add);
+  Future.wait([
+      asyncValueFuture,
+      delayedValue.future,
+      asyncErrorFuture,
+      delayedError.future]).then((_) {
+    // The body completed before nested microtask. So they should appear
+    // before the delayed functions. In other words, the async function should
+    // not unnecessarily delay the propagation of errors and values.
+    Expect.listEquals([
+        "in async function",
+        "in async function error",
+        "in microtask",
+        "in microtask error"],
+        events);
+    asyncEnd();
+  });
+}
diff --git a/tests/lib/async/async_await_zones_test.dart b/tests/lib/async/async_await_zones_test.dart
new file mode 100644
index 0000000..210b05d
--- /dev/null
+++ b/tests/lib/async/async_await_zones_test.dart
@@ -0,0 +1,142 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that async functions don't zone-register their callbacks for each
+// await. Async functions should register their callback once in the beginning
+// and then reuse it for all awaits in their body.
+// This has two advantages: it is faster, when there are several awaits (on
+// the Future class from dart:async), and it avoids zone-nesting when tracing
+// stacktraces.
+// See http://dartbug.com/23394 for more information.
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+import 'package:async_helper/async_helper.dart';
+
+gee(i) async {
+  return await i;
+}
+
+bar() async* {
+  var i = 0;
+  while (true) yield await gee(i++);
+}
+
+
+awaitForTest() async {
+  var sum = 0;
+  await for (var x in bar().take(100)) {
+    sum += x;
+  }
+  Expect.equals(4950, sum);
+}
+
+awaitTest() async {
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  await null;
+  return await 499;
+}
+
+runTests() async {
+  await awaitTest();
+  await awaitForTest();
+}
+
+var depth = 0;
+
+var depthIncreases = 0;
+
+increaseDepth() {
+  depthIncreases++;
+  depth++;
+  // The async/await code should not register callbacks recursively in the
+  // then-calls. As such the depth should never grow too much. We don't want
+  // to commit to a specific value, since implementations still have some
+  // room in how async/await is implemented, but 20 should be safe.
+  Expect.isTrue(depth < 20);
+}
+
+registerCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+  var oldDepth = depth;
+  increaseDepth();
+  return parent.registerCallback(zone, () {
+    depth = oldDepth;
+    return f();
+  });
+}
+registerUnaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+  var oldDepth = depth;
+  increaseDepth();
+  return parent.registerUnaryCallback(zone, (x) {
+    depth = oldDepth;
+    return f(x);
+  });
+}
+registerBinaryCallback(Zone self, ZoneDelegate parent, Zone zone, f) {
+  var oldDepth = depth;
+  increaseDepth();
+  return parent.registerBinaryCallback(zone, (x, y) {
+    depth = oldDepth;
+    return f(x, y);
+  });
+}
+
+sm(Zone self, ZoneDelegate parent, Zone zone, f) {
+  var oldDepth = depth;
+  increaseDepth();
+  return parent.scheduleMicrotask(zone, () {
+    depth = oldDepth;
+    return f();
+  });
+}
+
+main() {
+  asyncStart();
+  var desc = new ZoneSpecification(
+      registerCallback: registerCallback,
+      registerUnaryCallback: registerUnaryCallback,
+      registerBinaryCallback: registerBinaryCallback,
+      scheduleMicrotask: sm
+      );
+  var future = runZoned(runTests, zoneSpecification: desc);
+  future.then((_) => asyncEnd());
+}
diff --git a/tests/lib/async/future_constructor2_test.dart b/tests/lib/async/future_constructor2_test.dart
new file mode 100644
index 0000000..2d64ff4
--- /dev/null
+++ b/tests/lib/async/future_constructor2_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library future_delayed_test;
+
+import 'package:async_helper/async_helper.dart';
+import "package:expect/expect.dart";
+import 'dart:async';
+
+Future<int> createIntFuture() {
+  return new Future<int>.value(499);
+}
+
+unnamed() {
+  asyncStart();
+  new Future<int>(createIntFuture)
+      .then((x) {
+    Expect.equals(499, x);
+    asyncEnd();
+  });
+}
+
+delayed() {
+  asyncStart();
+  new Future<int>.delayed(const Duration(milliseconds: 2), createIntFuture)
+      .then((x) {
+    Expect.equals(499, x);
+    asyncEnd();
+  });
+}
+
+microtask() {
+  asyncStart();
+  new Future<int>.microtask(createIntFuture)
+      .then((x) {
+    Expect.equals(499, x);
+    asyncEnd();
+  });
+}
+
+sync() {
+  asyncStart();
+  new Future<int>.sync(createIntFuture)
+      .then((x) {
+    Expect.equals(499, x);
+    asyncEnd();
+  });
+}
+
+main() {
+  asyncStart();
+  // Test that all the Future constructors take functions that return a Future
+  // as argument.
+  // In particular the constructors must not type their argument as
+  // `T computation()`.
+  unnamed();
+  delayed();
+  microtask();
+  sync();
+  asyncEnd();
+}
diff --git a/tests/lib/async/stream_controller_test.dart b/tests/lib/async/stream_controller_test.dart
index c9ef021..afc7bb5 100644
--- a/tests/lib/async/stream_controller_test.dart
+++ b/tests/lib/async/stream_controller_test.dart
@@ -729,10 +729,25 @@
   var stream = controller.stream;
   var state = initial;
 
-  controller..onListen = () { state = running; }
-            ..onPause  = () { state = paused; }
-            ..onResume = () { state = running; }
-            ..onCancel = () { state = canceled; };
+  var onListen = () { state = running; };
+  var onPause  = () { state = paused; };
+  var onResume = () { state = running; };
+  var onCancel = () { state = canceled; };
+
+  Expect.isNull(controller.onListen);
+  Expect.isNull(controller.onPause);
+  Expect.isNull(controller.onResume);
+  Expect.isNull(controller.onCancel);
+
+  controller..onListen = onListen
+            ..onPause  = onPause
+            ..onResume = onResume
+            ..onCancel = onCancel;
+
+  Expect.equals(onListen, controller.onListen);
+  Expect.equals(onPause,  controller.onPause);
+  Expect.equals(onResume, controller.onResume);
+  Expect.equals(onCancel, controller.onCancel);
 
   Expect.equals(initial, state);
   var sub = stream.listen(null);
@@ -744,11 +759,20 @@
   Expect.equals(running, state);
   Expect.isFalse(controller.isPaused);
 
+  var onListen2 = () { state = -running; };
+  var onPause2  = () { state = -paused; };
+  var onResume2 = () { state = -running; };
+  var onCancel2 = () { state = -canceled; };
   // Changing them later does make a difference.
-  controller..onListen = () { throw "Second listen?"; }
-            ..onPause  = () { state = -paused; }
-            ..onResume = () { state = -running; }
-            ..onCancel = () { state = -canceled; };
+  controller..onListen = onListen2
+            ..onPause  = onPause2
+            ..onResume = onResume2
+            ..onCancel = onCancel2;
+
+  Expect.equals(onListen2, controller.onListen);
+  Expect.equals(onPause2,  controller.onPause);
+  Expect.equals(onResume2, controller.onResume);
+  Expect.equals(onCancel2, controller.onCancel);
 
   Expect.equals(running, state);
   sub.pause();
@@ -773,28 +797,36 @@
   Expect.isFalse(controller.hasListener);
   Expect.isTrue(controller.isPaused);
 
+  Expect.isNotNull(controller.onListen);
   controller.onListen = null;
+  Expect.isNull(controller.onListen);
 
   var sub = stream.listen(null);
 
   Expect.isTrue(controller.hasListener);
   Expect.isFalse(controller.isPaused);
 
+  Expect.isNotNull(controller.onPause);
   controller.onPause = null;
+  Expect.isNull(controller.onPause);
 
   sub.pause();
 
   Expect.isTrue(controller.hasListener);
   Expect.isTrue(controller.isPaused);
 
+  Expect.isNotNull(controller.onResume);
   controller.onResume = null;
+  Expect.isNull(controller.onResume);
 
   sub.resume();
 
   Expect.isTrue(controller.hasListener);
   Expect.isFalse(controller.isPaused);
 
+  Expect.isNotNull(controller.onCancel);
   controller.onCancel = null;
+  Expect.isNull(controller.onCancel);
 
   sub.cancel();
 
diff --git a/tests/lib/async/stream_subscription_as_future_test.dart b/tests/lib/async/stream_subscription_as_future_test.dart
index ef868e2..ac1293b 100644
--- a/tests/lib/async/stream_subscription_as_future_test.dart
+++ b/tests/lib/async/stream_subscription_as_future_test.dart
@@ -40,6 +40,18 @@
     }));
   });
 
+  test("subscription.asStream different type", () {
+    Stream stream = new Stream<int>.fromIterable([1, 2, 3]);
+    var asyncCallback = expectAsync(() => {});
+    var output = [];
+    var subscription = stream.listen((x) { output.add(x); });
+    subscription.asFuture("string").then((String o) {
+      Expect.listEquals([1, 2, 3], output);
+      Expect.equals("string", o);
+      asyncCallback();
+    });
+  });
+
   test("subscription.asStream failure", () {
     StreamController controller = new StreamController(sync: true);
     [1, 2, 3].forEach(controller.add);
diff --git a/tests/lib/async/wait_for_cancel_test.dart b/tests/lib/async/wait_for_cancel_test.dart
new file mode 100644
index 0000000..7c40084
--- /dev/null
+++ b/tests/lib/async/wait_for_cancel_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "package:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+main() {
+  asyncStart();
+
+  bool waitedForCancel = false;
+
+  var controller = new StreamController(
+      onCancel: () => new Future(() => waitedForCancel = true));
+  var sub = controller.stream.take(1).listen((x) {
+    Expect.fail("onData should not be called");
+  });
+  var cancelFuture = sub.cancel();
+  Expect.isNotNull(cancelFuture);
+  cancelFuture.then((_) {
+    Expect.isTrue(waitedForCancel);
+    asyncEnd();
+  });
+}
diff --git a/tests/lib/convert/line_splitter_test.dart b/tests/lib/convert/line_splitter_test.dart
index d9956e0..5e240a9 100644
--- a/tests/lib/convert/line_splitter_test.dart
+++ b/tests/lib/convert/line_splitter_test.dart
@@ -9,6 +9,8 @@
 import 'dart:math' as MATH;
 
 
+const lineTerminators = const ['\n', '\r', '\r\n'];
+
 void main() {
   testSimpleConvert();
   testSplit();
@@ -20,18 +22,16 @@
 }
 
 void testManyLines() {
-  const breaks = const ['\n', '\r\n'];
   int breakIndex = 0;
 
   var inputs = const ['line1', 'line2', 'long line 3', ' line 4 ', 'l5'];
 
-
   var buffer = inputs.fold(new StringBuffer(), (buff, e) {
     buff.write(e);
-    buff.write(breaks[breakIndex]);
+    buff.write(lineTerminators[breakIndex]);
 
     breakIndex++;
-    breakIndex = breakIndex % breaks.length;
+    breakIndex = breakIndex % lineTerminators.length;
 
     return buff;
   });
@@ -62,22 +62,18 @@
 }
 
 void testSimpleConvert() {
-  var test = """line1
-line2
-line3""";
-
-
   var decoder = new LineSplitter();
+  for (var lf in lineTerminators) {
+    var test = "line1${lf}line2${lf}line3";
+
+    var result = decoder.convert(test);
+
+    Expect.listEquals(['line1', 'line2', 'line3'], result);
+  }
+
+  var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r";
   var result = decoder.convert(test);
 
-  Expect.listEquals(['line1', 'line2', 'line3'], result);
-
-  test = "Line1\nLine2\r\nLine3\rLi"
-      "ne4\n"
-       "\n\n\r\n\r\n\r\r";
-
-  result = decoder.convert(test);
-
   Expect.listEquals(
       ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''],
       result);
@@ -142,51 +138,45 @@
 
 
 void testSplit() {
-  var test = """line1
-line2
-line3""";
+  for (var lf in lineTerminators) {
+    var test = "line1${lf}line2${lf}line3";
+    var result = LineSplitter.split(test).toList();
+    Expect.listEquals(['line1', 'line2', 'line3'], result);
+  }
 
-
+  var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r";
   var result = LineSplitter.split(test).toList();
 
-  Expect.listEquals(['line1', 'line2', 'line3'], result);
-
-  test = "Line1\nLine2\r\nLine3\rLi"
-      "ne4\n"
-       "\n\n\r\n\r\n\r\r";
-
-  result = LineSplitter.split(test).toList();
-
   Expect.listEquals(
       ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''],
       result);
 }
 
 void testSplitWithOffsets() {
-  var test = """line1
-line2
-line3""";
+  for (var lf in lineTerminators) {
+    var test = "line1${lf}line2${lf}line3";
+    var i2 = 5 + lf.length;  // index of "line2".
+    Expect.equals(5 + lf.length, i2);
 
-  var result = LineSplitter.split(test, 4).toList();
-  Expect.listEquals(['1', 'line2', 'line3'], result);
+    var result = LineSplitter.split(test, 4).toList();
+    Expect.listEquals(['1', 'line2', 'line3'], result);
 
-  result = LineSplitter.split(test, 5).toList();
-  Expect.listEquals(['', 'line2', 'line3'], result);
+    result = LineSplitter.split(test, 5).toList();
+    Expect.listEquals(['', 'line2', 'line3'], result);
 
-  result = LineSplitter.split(test, 6).toList();
-  Expect.listEquals(['line2', 'line3'], result);
+    result = LineSplitter.split(test, i2).toList();
+    Expect.listEquals(['line2', 'line3'], result);
 
-  result = LineSplitter.split(test, 0, 8).toList();
-  Expect.listEquals(['line1', 'li'], result);
+    result = LineSplitter.split(test, 0, i2 + 2).toList();
+    Expect.listEquals(['line1', 'li'], result);
 
-  result = LineSplitter.split(test, 6, 11).toList();
-  Expect.listEquals(['line2'], result);
+    result = LineSplitter.split(test, i2, i2 + 5).toList();
+    Expect.listEquals(['line2'], result);
+  }
 
-  test = "Line1\nLine2\r\nLine3\rLi"
-      "ne4\n"
-       "\n\n\r\n\r\n\r\r";
+  var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r";
 
-  result = LineSplitter.split(test).toList();
+  var result = LineSplitter.split(test).toList();
 
   Expect.listEquals(
       ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''],
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 5e6a2b9..e409184 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -170,6 +170,7 @@
 async/stream_asyncmap_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/stream_transformation_broadcast_test: RuntimeError # Timer interface not supported: Issue 7728.
 async/stream_controller_test: Fail # Timer interface not supported: Issue 7728.
+async/future_constructor2_test: Fail # Timer interface not supported: Issue 7728.
 mirrors/mirrors_reader_test: Skip # Running in v8 suffices. Issue 16589 - RuntimeError.  Issue 22130 - Crash (out of memory).
 
 [ $compiler == dart2js && $checked ]
@@ -331,239 +332,233 @@
 mirrors/immutable_collections_test: SkipSlow  # Timeout.
 convert/streamed_conversion_json_utf8_decode_test: Skip  # Timeout.
 
-[ $compiler == dart2js && $system == windows && $runtime == chrome ]
-convert/line_splitter_test: RuntimeError
-
-[ $compiler == dart2js && $system == windows && $runtime == ff ]
-convert/line_splitter_test: RuntimeError
-
 [ $compiler == dart2js && $cps_ir ]
-async/future_test/01: Crash # (()async=>new Future.value(value)): cannot handle async/sync*/async* functions
-async/stream_empty_test: Crash # (Future runTest()asy...  cannot handle async/sync*/async* functions
-async/stream_iterator_test: Crash # (()async{var stream=...  cannot handle async/sync*/async* functions
-convert/ascii_test: RuntimeError # this.get$length is not a function
-convert/json_pretty_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-convert/latin1_test: RuntimeError # this.get$length is not a function
-convert/line_splitter_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/abstract_class_test/00: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/abstract_class_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/abstract_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/accessor_cache_overflow_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/array_tracing2_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/array_tracing_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/basic_types_in_dart_core_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/circular_factory_redirection_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/class_declarations_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/class_declarations_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/class_mirror_location_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/class_mirror_type_variables_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/closures_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/closurization_equivalence_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/constructor_kinds_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/constructor_kinds_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/constructors_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/dart2js_mirrors_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/declarations_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+async/async_await_zones_test: Crash # (await for(var x in bar().take(100)){sum+= x;}): await for
+async/stream_empty_test: RuntimeError # $async$temp1.runTest_unreachable is not a function
+async/stream_iterator_test: Crash # (Stream createCancel...  cannot handle sync*/async* functions
+convert/json_pretty_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+convert/line_splitter_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/abstract_class_test/00: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/abstract_class_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/abstract_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/accessor_cache_overflow_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/array_tracing2_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/array_tracing_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/basic_types_in_dart_core_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/circular_factory_redirection_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/class_declarations_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/class_declarations_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/class_mirror_location_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/class_mirror_type_variables_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/closures_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/closurization_equivalence_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/constructor_kinds_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/constructor_kinds_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/constructors_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/dart2js_mirrors_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/declarations_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/deferred_mirrors_metadata_test: Crash # (lib1.foo()): deferred access is not implemented
 mirrors/deferred_mirrors_metatarget_test: Crash # (lib.foo()): deferred access is not implemented
 mirrors/deferred_mirrors_update_test: Crash # (l.foo()): deferred access is not implemented
-mirrors/deferred_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/deferred_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/delegate_call_through_getter_test: RuntimeError # Please triage this failure.
+mirrors/delegate_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/delegate_library_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/delegate_test: RuntimeError # Please triage this failure.
-mirrors/disable_tree_shaking_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/empty_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/enum_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/equality_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/fake_function_with_call_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/fake_function_without_call_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/field_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/function_type_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_by_type_parameter_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_by_type_parameter_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_by_type_parameter_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_bounded_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_class_declaration_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_f_bounded_mixin_application_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_f_bounded_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_f_bounded_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_function_typedef_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_interface_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_interface_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_list_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_local_function_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_mixin_applications_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_mixin_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_superclass_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_superclass_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generic_type_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_double_substitution_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_double_substitution_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_dynamic_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_special_types_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_substitution_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/generics_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/globalized_closures2_test/00: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/globalized_closures2_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/globalized_closures_test/00: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/globalized_closures_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/hierarchy_invariants_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/immutable_collections_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/inherit_field_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/initializing_formals_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/initializing_formals_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/instance_members_easier_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/instance_members_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/instance_members_unimplemented_interface_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/instance_members_with_override_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/instantiate_abstract_class_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/intercepted_cache_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/intercepted_class_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/intercepted_object_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/intercepted_superclass_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invocation_fuzz_test/emptyarray: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invocation_fuzz_test/false: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invocation_fuzz_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invocation_fuzz_test/smi: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invocation_fuzz_test/string: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_on_closure_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_getter_previously_accessed_test/named: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_getter_previously_accessed_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_getter_test/named: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_getter_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_implicit_getter_previously_accessed_test/named: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_implicit_getter_previously_accessed_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_call_through_implicit_getter_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_closurization2_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_closurization_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_import_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_named_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_named_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_natives_malicious_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/invoke_throws_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/is_odd_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/lazy_static_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/libraries_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_declarations_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_declarations_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/disable_tree_shaking_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/empty_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/enum_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/equality_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/fake_function_with_call_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/fake_function_without_call_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/field_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/function_type_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_by_type_parameter_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_by_type_parameter_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_by_type_parameter_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_bounded_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_class_declaration_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_f_bounded_mixin_application_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_f_bounded_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_f_bounded_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_function_typedef_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_interface_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_interface_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_list_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_local_function_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_mixin_applications_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_mixin_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_superclass_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_superclass_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generic_type_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_double_substitution_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_double_substitution_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_dynamic_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_special_types_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_substitution_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/generics_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/globalized_closures2_test/00: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/globalized_closures2_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/globalized_closures_test/00: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/globalized_closures_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/hierarchy_invariants_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/immutable_collections_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/inherit_field_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/initializing_formals_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/initializing_formals_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/instance_members_easier_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/instance_members_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/instance_members_unimplemented_interface_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/instance_members_with_override_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/instantiate_abstract_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/intercepted_cache_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/intercepted_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/intercepted_object_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/intercepted_superclass_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invocation_fuzz_test/emptyarray: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invocation_fuzz_test/false: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invocation_fuzz_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invocation_fuzz_test/smi: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invocation_fuzz_test/string: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_on_closure_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_getter_previously_accessed_test/named: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_getter_previously_accessed_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_getter_test/named: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_getter_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_implicit_getter_previously_accessed_test/named: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_implicit_getter_previously_accessed_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_call_through_implicit_getter_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_closurization2_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_closurization_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_import_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_named_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_named_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_natives_malicious_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/invoke_throws_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/io_html_mutual_exclusion_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/is_odd_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/lazy_static_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/libraries_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_declarations_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_declarations_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/library_enumeration_deferred_loading_test: Crash # (other.topLevelMethod()): deferred access is not implemented
-mirrors/library_exports_hidden_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_exports_shown_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/library_exports_hidden_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_exports_shown_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/library_import_deferred_loading_test: Crash # (other.topLevelMethod()): deferred access is not implemented
-mirrors/library_imports_bad_metadata_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_deferred_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_hidden_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_prefixed_show_hide_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_prefixed_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_imports_shown_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_metadata2_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/library_uri_package_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/list_constructor_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/list_constructor_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/library_imports_bad_metadata_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_deferred_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_hidden_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_prefixed_show_hide_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_prefixed_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_imports_shown_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_metadata2_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/library_uri_package_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/list_constructor_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/list_constructor_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/load_library_test: Crash # (other.topLevelMethod()): deferred access is not implemented
-mirrors/local_function_is_static_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/local_isolate_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/05: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/10: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/11: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/13: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/14: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_allowed_values_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_class_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_constructed_constant_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_constructor_arguments_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_nested_constructor_call_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_location_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_name_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_properties_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_returntype_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_source_line_ending_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/method_mirror_source_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirror_in_static_init_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_nsm_mismatch_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_nsm_test/dart2js: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_nsm_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_reader_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_resolve_fields_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mirrors_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mixin_application_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mixin_members_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/mixin_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/native_class_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/new_instance_with_type_arguments_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/no_metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/null2_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/null_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/operator_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/parameter_is_const_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/parameter_metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/parameter_of_mixin_app_constructor_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/private_symbol_mangling_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/private_types_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/proxy_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/raw_type_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/raw_type_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/redirecting_factory_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/redirecting_factory_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/redirecting_factory_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_class_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_class_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_class_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_model_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_runtime_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflect_uninstantiated_class_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_classes_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_classes_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_classes_test/03: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_classes_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_function_type_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_special_types_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_test/02: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_test/03: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_typedefs_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflected_type_typevars_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/reflectively_instantiate_uninstantiated_class_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/regress_14304_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/regress_16321_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/regress_16321_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/regress_19731_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/relation_assignable_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/relation_subclass_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/relation_subtype_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/removed_api_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/repeated_private_anon_mixin_app_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/set_field_with_final_inheritance_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/set_field_with_final_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/spawn_function_root_library_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/static_members_easier_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/static_members_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/static_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/superclass2_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/superclass_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/symbol_validation_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/local_function_is_static_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/local_isolate_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/05: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/10: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/11: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/13: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/14: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_allowed_values_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_class_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_constructed_constant_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_constructor_arguments_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_nested_constructor_call_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_location_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_name_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_properties_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_returntype_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_source_line_ending_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/method_mirror_source_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirror_in_static_init_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_nsm_mismatch_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_nsm_test/dart2js: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_nsm_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_reader_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_resolve_fields_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mirrors_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mixin_application_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mixin_members_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/mixin_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/native_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/new_instance_with_type_arguments_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/no_metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/null2_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/null_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/operator_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/parameter_is_const_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/parameter_metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/parameter_of_mixin_app_constructor_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/private_symbol_mangling_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/private_types_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/proxy_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/raw_type_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/raw_type_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/redirecting_factory_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/redirecting_factory_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/redirecting_factory_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_class_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_class_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_class_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_model_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_runtime_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflect_uninstantiated_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_classes_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_classes_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_classes_test/03: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_classes_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_function_type_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_special_types_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_test/02: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_test/03: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_typedefs_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflected_type_typevars_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/reflectively_instantiate_uninstantiated_class_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/regress_14304_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/regress_16321_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/regress_16321_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/regress_19731_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/relation_assignable_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/relation_subclass_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/relation_subtype_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/removed_api_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/repeated_private_anon_mixin_app_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/set_field_with_final_inheritance_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/set_field_with_final_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/spawn_function_root_library_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/static_members_easier_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/static_members_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/static_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/superclass2_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/superclass_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/symbol_validation_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/symbol_validation_test/none: RuntimeError # Please triage this failure.
-mirrors/syntax_error_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/synthetic_accessor_properties_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/to_string_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/top_level_accessors_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/type_argument_is_type_variable_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/type_variable_is_static_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/type_variable_owner_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/type_variable_owner_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/typearguments_mirror_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
+mirrors/syntax_error_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/synthetic_accessor_properties_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/to_string_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/top_level_accessors_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/type_argument_is_type_variable_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/type_variable_is_static_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/type_variable_owner_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/type_variable_owner_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/typearguments_mirror_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
 mirrors/typedef_deferred_library_test: RuntimeError # G.loadLibrary is not a function
-mirrors/typedef_metadata_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/typedef_reflected_type_test/01: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/typedef_reflected_type_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/unnamed_library_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-mirrors/variable_is_const_test/none: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-typed_data/typed_data_list_test: RuntimeError # this.get$length is not a function
+mirrors/typedef_metadata_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/typedef_reflected_type_test/01: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/typedef_reflected_type_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/unnamed_library_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+mirrors/variable_is_const_test/none: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
diff --git a/tests/lib/mirrors/function_apply_mirrors_lib.dart b/tests/lib/mirrors/function_apply_mirrors_lib.dart
new file mode 100644
index 0000000..e94a55a
--- /dev/null
+++ b/tests/lib/mirrors/function_apply_mirrors_lib.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library function_apply_mirrors_lib;
+
+@MirrorsUsed(targets: "function_apply_mirrors_lib")
+import "dart:mirrors";
+
+bar() => reflect(499).reflectee;
diff --git a/tests/lib/mirrors/function_apply_mirrors_test.dart b/tests/lib/mirrors/function_apply_mirrors_test.dart
new file mode 100644
index 0000000..81d3b9e
--- /dev/null
+++ b/tests/lib/mirrors/function_apply_mirrors_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Only 'lib' imports mirrors.
+// Function.apply is resolved, before it is known that mirrors are used.
+// Dart2js has different implementations of Function.apply for different
+// emitters (like --fast-startup). Dart2js must not switch the resolved
+// Function.apply when it discovers the use of mirrors.
+// In particular it must not switch from the fast-startup emitter to the full
+// emitter without updating the Function.apply reference.
+import 'function_apply_mirrors_lib.dart' as lib;
+
+import "package:expect/expect.dart";
+
+int foo({x: 499, y: 42}) => x + y;
+
+main() {
+  Expect.equals(709, Function.apply(foo, [], {#y: 210}));
+  Expect.equals(499, lib.bar());
+}
diff --git a/tests/lib/mirrors/invocation_fuzz_test.dart b/tests/lib/mirrors/invocation_fuzz_test.dart
index 7a43d3cbb..8add257 100644
--- a/tests/lib/mirrors/invocation_fuzz_test.dart
+++ b/tests/lib/mirrors/invocation_fuzz_test.dart
@@ -41,6 +41,12 @@
   'dart.io.SystemEncoding.decode',  // Windows only
   'dart.io.SystemEncoding.encode',  // Windows only
 
+  // These construct an object with an uninitialized native field.
+  // TODO(23869): We could make this safer, but making the failure non-fatal
+  //   would we worthless aside from this test.
+  'dart.io.X509Certificate.X509Certificate._',
+  'dart.io._X509Impl._X509Impl',
+
   // Don't call private methods in dart.async as they may circumvent the zoned
   // error handling below.
   new RegExp(r"^dart\.async\._.*$"),
diff --git a/tests/standalone/io/certificates/README b/tests/standalone/io/certificates/README
new file mode 100644
index 0000000..b02f4b5
--- /dev/null
+++ b/tests/standalone/io/certificates/README
@@ -0,0 +1,30 @@
+    This directory, tests/standalone/io/certificates, contains the
+X509 TLS certificates and private keys needed to run tests of Dart's
+secure networking code.  The SecureSocket and SecureServer classes
+are tested by making TLS (formerly called SSL) connections, secured
+by certificates from a self-signed test root authority.
+
+server_chain.pem:
+  Contains the chain of certificates, from the self-signed
+test certificate authority, through the intermediate CA, to the server
+certificate, used on the server side of a test connection.
+
+server_key.pem:
+  Contains the private key for the server certificate
+
+trusted_certs.pem:
+  Contains the self-signed certificate of the test certificate authority.
+This certificate is set as "trusted" by the client side of the connection
+in its SecurityContext object, so that a verified TLS connection to the
+server can be made.
+
+untrusted_server_chain.pem:
+  Contains a chain of certificates, from a different self-signed
+test certificate authority, through an intermediate CA, to a server
+certificate, used on the server side of a test connection that is intended
+to fail because the client does not accept this certificate authority
+
+untrusted_server_key.pem:
+  Contains the private key for the untrusted server certificate 
+in untrusted_server_chain.pem
+
diff --git a/tests/standalone/io/certificates/server_chain.pem b/tests/standalone/io/certificates/server_chain.pem
new file mode 100644
index 0000000..4163fe7
--- /dev/null
+++ b/tests/standalone/io/certificates/server_chain.pem
@@ -0,0 +1,57 @@
+-----BEGIN CERTIFICATE-----
+MIIDKTCCAhGgAwIBAgIJAOWmjTS+OnTEMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
+BAMMDGludGVybWVkaWF0ZTAeFw0xNTA1MTgwOTAwNDBaFw0yMzA4MDQwOTAwNDBa
+MBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBALlcwQJuzd+xH8QFgfJSn5tRlvhkldSX98cE7NiA602NBbnAVyUrkRXq
+Ni75lgt0kwjYfA9z674m8WSVbgpLPintPCla9CYky1TH0keIs8Rz6cGWHryWEHiu
+EDuljQynu2b3sAFuHu9nfWurbJwZnFakBKpdQ9m4EyOZCHC/jHYY7HacKSXg1Cki
+we2ca0BWDrcqy8kLy0dZ5oC6IZG8O8drAK8f3f44CRYw59D3sOKBrKXaabpvyEcb
+N7Wk2HDBVwHpUJo1reVwtbM8dhqQayYSD8oXnGpP3RQNu/e2rzlXRyq/BfcDY1JI
+7TbC4t/7/N4EcPSpGsTcSOC9A7FpzvECAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg
+hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
+BBYEFCnwiEMMFZh7NhCr+qA8K0w4Q+AOMB8GA1UdIwQYMBaAFB0h1Evsaw2vfrmS
+YuoCTmC4EE6ZMA0GCSqGSIb3DQEBCwUAA4IBAQAcFmHMaXRxyoNaeOowQ6iQWoZd
+AUbvG7SHr7I6Pi2aqdqofsKWts7Ytm5WsS0M2nN+sW504houu0iCPeJJX8RQw2q4
+CCcNOs9IXk+2uMzlpocHpv+yYoUiD5DxgWh7eghQMLyMpf8FX3Gy4VazeuXznHOM
+4gE4L417xkDzYOzqVTp0FTyAPUv6G2euhNCD6TMru9REcRhYul+K9kocjA5tt2KG
+MH6y28LXbLyq4YJUxSUU9gY/xlnbbZS48KDqEcdYC9zjW9nQ0qS+XQuQuFIcwjJ5
+V4kAUYxDu6FoTpyQjgsrmBbZlKNxH7Nj4NDlcdJhp/zeSKHqWa5hSWjjKIxp
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAeqgAwIBAgIJAOWmjTS+OnTDMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
+BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
+WjAXMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDSrAO1CoPvUllgLOzDm5nG0skDF7vh1DUgAIDVGz0ecD0JFbQx
+EF79pju/6MbtpTW2FYvRp11t/G7rGtX923ybOHY/1MNFQrdIvPlO1VV7IGKjoMwP
+DNeb0fIGjHoE9QxaDxR8NX8xQbItpsw+TUtRfc9SLkR+jaYJfVRoM21BOncZbSHE
+YKiZlEbpecB/+EtwVpgvl+8mPD5U07Fi4fp/lza3WXInXQPyiTVllIEJCt4PKmlu
+MocNaJOW38bysL7i0PzDpVZtOxLHOTaW68yF3FckIHNCaA7k1ABEEEegjFMmIao7
+B9w7A0jvr4jZVvNmui5Djjn+oJxwEVVgyf8LAgMBAAGjUDBOMB0GA1UdDgQWBBQd
+IdRL7GsNr365kmLqAk5guBBOmTAfBgNVHSMEGDAWgBRk81s9d0ZbiZhh44KckwPb
+oTc0XzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBZQTK0plfdB5PC
+cC5icut4EmrByJa1RbU7ayuEE70e7hla6KVmVjVdCBGltI4jBYwfhKbRItHiAJ/8
+x+XZKBG8DLPFuDb7lAa1ObhAYF7YThUFPQYaBhfzKcWrdmWDBFpvNv6E0Mm364dZ
+e7Yxmbe5S4agkYPoxEzgEYmcUk9jbjdR6eTbs8laG169ljrECXfEU9RiAcqz5iSX
+NLSewqB47hn3B9qgKcQn+PsgO2j7M+rfklhNgeGJeWmy7j6clSOuCsIjWHU0RLQ4
+0W3SB/rpEAJ7fgQbYUPTIUNALSOWi/o1tDX2mXPRjBoxqAv7I+vYk1lZPmSzkyRh
+FKvRDxsW
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAeugAwIBAgIJAJ0MomS4Ck+8MA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
+BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
+WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAts1ijtBV92S2cOvpUMOSTp9c6A34nIGr0T5Nhz6XiqRVT+gv
+dQgmkdKJQjbvR60y6jzltYFsI2MpGVXY8h/oAL81D/k7PDB2aREgyBfTPAhBHyGw
+siR+2xYt5b/Zs99q5RdRqQNzNpLPJriIKvUsRyQWy1UiG2s7pRXQeA8qB0XtJdCj
+kFIi+G2bDsaffspGeDOCqt7t+yqvRXfSES0c/l7DIHaiMbbp4//ZNML3RNgAjPz2
+hCezZ+wOYajOIyoSPK8IgICrhYFYxvgWxwbLDBEfC5B3jOQsySe10GoRAKZz1gBV
+DmgReu81tYJmdgkc9zknnQtIFdA0ex+GvZlfWQIDAQABo1AwTjAdBgNVHQ4EFgQU
+ZPNbPXdGW4mYYeOCnJMD26E3NF8wHwYDVR0jBBgwFoAUZPNbPXdGW4mYYeOCnJMD
+26E3NF8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEATzkZ97K777uZ
+lQcduNX3ey4IbCiEzFA2zO5Blj+ilfIwNbZXNOgm/lqNvVGDYs6J1apJJe30vL3X
+J+t2zsZWzzQzb9uIU37zYemt6m0fHrSrx/iy5lGNqt3HMfqEcOqSCOIK3PCTMz2/
+uyGe1iw33PVeWsm1JUybQ9IrU/huJjbgOHU4wab+8SJCM49ipArp68Fr6j4lcEaE
+4rfRg1ZsvxiOyUB3qPn6wyL/JB8kOJ+QCBe498376eaem8AEFk0kQRh6hDaWtq/k
+t6IIXQLjx+EBDVP/veK0UnVhKRP8YTOoV8ZiG1NcdlJmX/Uk7iAfevP7CkBfSN8W
+r6AL284qtw==
+-----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/server_key.pem b/tests/standalone/io/certificates/server_key.pem
new file mode 100644
index 0000000..1fd2324
--- /dev/null
+++ b/tests/standalone/io/certificates/server_key.pem
@@ -0,0 +1,29 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIE5DAcBgoqhkiG9w0BDAEBMA4ECL7L6rj6uEHGAgIIAASCBMLbucyfqAkgCbhP
+xNSHYllPMAv/dsIjtnsBwepCXPGkCBCuOAw/2FaCHjN9hBqL5V7fkrKeaemhm2YE
+ycPtlHJYPDf3kEkyMjdZ9rIY6kePGfQizs2uJPcXj4YPyQ4HsfVXpOicKfQrouf5
+Mze9bGzeMN065q3iP4dYUMwHAyZYteXCsanQNHlqvsWli0W+H8St8fdsXefZhnv1
+qVatKWdNdWQ9t5MuljgNU2Vv56sHKEYXI0yLxk2QUMk8KlJfnmt8foYUsnPUXHmc
+gIjLKwwVkpdololnEHSNu0cEOUPowjgJru+uMpn7vdNl7TPEQ9jbEgdNg4JwoYzU
+0nao8WzjaSp7kzvZz0VFwKnk5AjstGvvuAWckADdq23QElbn/mF7AG1m/TBpYxzF
+gTt37UdndS/AcvVznWVVrRP5iTSIawdIwvqI4s7rqsoE0GCcak+RhchgAz2gWKkS
+oODUo0JL6pPVbJ3l4ebbaO6c99nDVc8dViPtc1EkStJEJ2O4kI4xgLSCr4Y9ahKn
+oAaoSkX7Xxq3aQm+BzqSpLjdGL8atsqR/YVOIHYIl3gThvP0NfZGx1xHyvO5mCdZ
+kHxSA7tKWxauZ3eQ2clbnzeRsl4El0WMHy/5K1ovene4v7sunmoXVtghBC8hK6eh
+zMO9orex2PNQ/VQC7HCvtytunOVx1lkSBoNo7hR70igg6rW9H7UyoAoBOwMpT1xa
+J6V62nqruTKOqFNfur7aHJGpHGtDb5/ickHeYCyPTvmGp67u4wChzKReeg02oECe
+d1E5FKAcIa8s9TVOB6Z+HvTRNQZu2PsI6TJnjQRowvY9DAHiWTlJZBBY/pko3hxX
+TsIeybpvRdEHpDWv86/iqtw1hv9CUxS/8ZTWUgBo+osShHW79FeDASr9FC4/Zn76
+ZDERTgV4YWlW/klVWcG2lFo7jix+OPXAB+ZQavLhlN1xdWBcIz1AUWjAM4hdPylW
+HCX4PB9CQIPl2E7F+Y2p6nMcMWSJVBi5UIH7E9LfaBguXSzMmTk2Fw5p1aOQ6wfN
+goVAMVwi8ppAVs741PfHdZ295xMmK/1LCxz5DeAdD/tsA/SYfT753GotioDuC7im
+EyJ5JyvTr5I6RFFBuqt3NlUb3Hp16wP3B2x9DZiB6jxr0l341/NHgsyeBXkuIy9j
+ON2mvpBPCJhS8kgWo3G0UyyKnx64tcgpGuSvZhGwPz843B6AbYyE6pMRfSWRMkMS
+YZYa+VNKhR4ixdj07ocFZEWLVjCH7kxkE8JZXKt8jKYmkWd0lS1QVjgaKlO6lRa3
+q6SPJkhW6pvqobvcqVNXwi1XuzpZeEbuh0B7OTekFTTxx5g9XeDl56M8SVQ1KEhT
+Q1t7H2Nba18WCB7cf+6PN0F0K0Jz1Kq7ZWaqEI/grX1m4RQuvNF5807sB/QKMO/Z
+Gz3NXvHg5xTJRd/567lxPGkor0cE7qD1EZfmJ2HrBYXQ91bhgA7LToBuMZo6ZRXH
+QfsanjbP4FPLMiGdQigLjj3A35L/f4sQOOVac/sRaFnm7pzcxsMvyVU/YtvGcjYE
+xaOOVnamg661Wo0wksXoDjeSz/JIyyKO3Gwp1FSm2wGLjjy/Ehmqcqy8rvHuf07w
+AUukhVtTNn4=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/standalone/io/certificates/trusted_certs.pem b/tests/standalone/io/certificates/trusted_certs.pem
new file mode 100644
index 0000000..a474755
--- /dev/null
+++ b/tests/standalone/io/certificates/trusted_certs.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAeugAwIBAgIJAJ0MomS4Ck+8MA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
+BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTE4MDkwMDQwWhcNMjMwODA0MDkwMDQw
+WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAts1ijtBV92S2cOvpUMOSTp9c6A34nIGr0T5Nhz6XiqRVT+gv
+dQgmkdKJQjbvR60y6jzltYFsI2MpGVXY8h/oAL81D/k7PDB2aREgyBfTPAhBHyGw
+siR+2xYt5b/Zs99q5RdRqQNzNpLPJriIKvUsRyQWy1UiG2s7pRXQeA8qB0XtJdCj
+kFIi+G2bDsaffspGeDOCqt7t+yqvRXfSES0c/l7DIHaiMbbp4//ZNML3RNgAjPz2
+hCezZ+wOYajOIyoSPK8IgICrhYFYxvgWxwbLDBEfC5B3jOQsySe10GoRAKZz1gBV
+DmgReu81tYJmdgkc9zknnQtIFdA0ex+GvZlfWQIDAQABo1AwTjAdBgNVHQ4EFgQU
+ZPNbPXdGW4mYYeOCnJMD26E3NF8wHwYDVR0jBBgwFoAUZPNbPXdGW4mYYeOCnJMD
+26E3NF8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEATzkZ97K777uZ
+lQcduNX3ey4IbCiEzFA2zO5Blj+ilfIwNbZXNOgm/lqNvVGDYs6J1apJJe30vL3X
+J+t2zsZWzzQzb9uIU37zYemt6m0fHrSrx/iy5lGNqt3HMfqEcOqSCOIK3PCTMz2/
+uyGe1iw33PVeWsm1JUybQ9IrU/huJjbgOHU4wab+8SJCM49ipArp68Fr6j4lcEaE
+4rfRg1ZsvxiOyUB3qPn6wyL/JB8kOJ+QCBe498376eaem8AEFk0kQRh6hDaWtq/k
+t6IIXQLjx+EBDVP/veK0UnVhKRP8YTOoV8ZiG1NcdlJmX/Uk7iAfevP7CkBfSN8W
+r6AL284qtw==
+-----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/untrusted_server_chain.pem b/tests/standalone/io/certificates/untrusted_server_chain.pem
new file mode 100644
index 0000000..7d30df0
--- /dev/null
+++ b/tests/standalone/io/certificates/untrusted_server_chain.pem
@@ -0,0 +1,57 @@
+-----BEGIN CERTIFICATE-----
+MIIDKTCCAhGgAwIBAgIJAOLkVK1iIzcgMA0GCSqGSIb3DQEBCwUAMBcxFTATBgNV
+BAMMDGludGVybWVkaWF0ZTAeFw0xNTA1MjgxNTAyMTlaFw0yMzA4MTQxNTAyMTla
+MBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBAJTI9uVvjQ5jsHB+UcqhXOKXmt8QlK3gOZKYs9lCFoQYWVug3daDCYp6
+p1N7/lM+V0sDhYfALBjT9aetviTck8ZJ5rCJ1xzyY16/LnvTI9wjBeizyar5K57A
+vRwX+PB4OQi4nKszWXB++jYu7AYJsIwQwkNAk5kkpaVRlWqYkDm6JqtD6hAPxQV4
+0rrqQAXBY+SP0C8buhVNDmnkshmJnHnb/yodNmwdK0CkSN9TbVZi3UpsDRL1Tbo/
+i7fRrfVK5aTjdjT7yx/5Wh2jQ4nBdm7l5BFc2owHk0FGB9h5GMgs19RzHf+O+JCc
+SabuVSehtagIouiwHOJ5iFtiq6enF58CAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg
+hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O
+BBYEFKpMad7rFfjy9iTqyCBJSWORnxqoMB8GA1UdIwQYMBaAFDqe3VrQlMZ2ABqb
+w16kdoDbumRuMA0GCSqGSIb3DQEBCwUAA4IBAQC9rRoBEcCZBVCBVZdckq0cWVYB
+IoMnpGk1ODv5Yp2b36LR3wwr2g+2u61s767L0+2ZGbGACkzWi3rJFSWIiH2j5zmi
+e+TvuOXFbw0r2PtiYDaoWIExzkC3rxnCSlUdbRPw1LI8bEd3+PYeZcEW0zs+xaId
+lctsWe8QC7EW3trLUFc8ASjED4uO83+2toqljkrD4SDnVz8t7O6bNrKrEDkNrxDW
+NHrbSP8m666U/A4MpH55BArfHNlUbzOZ6/jOkvcqhbL1pccJ2U1Ov3GnQGk7Vg+D
+JD1ptD6AHnjA8PCSkDOPibG4w9lRFWaUeAjtuCq1xJ3RFe5aUcUqgcxyF38B
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAeqgAwIBAgIJAOLkVK1iIzcfMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
+BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTI4MTUwMjE5WhcNMjMwODE0MTUwMjE5
+WjAXMRUwEwYDVQQDDAxpbnRlcm1lZGlhdGUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDS0BrhfsYaZcm68pdZ2j+TWXa/Ba5s3sKq9+EFcI5ZSq8/Atn+
+V17OgyjUYQDS//8lk0UydvHQmI6lTSAlLbIDfHMQZ1qxKGV75IgLmHO2RCoJ0W2p
+V74m6EZ3cMMOAFJ1WO292ee1H3ZynZSJcj5jxzLzJwOzaz9IjVVLpRdvm2xkhuIa
+M10aYn3gohGLaq8fe8sQx4ezx6nlqAFK1rZrMKgmPoDaV/Vsin71QywAjOApMp/c
+GkQjRzmUQf12NfXuvQU6ZP0M16e6Od0oAUFM+t0OjFUCcfhwRfGsoSesLof3Gc8+
+eJ7LbOFxWMvsFwsXkmeDvE6yuihBlPm38Va3AgMBAAGjUDBOMB0GA1UdDgQWBBQ6
+nt1a0JTGdgAam8NepHaA27pkbjAfBgNVHSMEGDAWgBSjeMkHbMP4BXJRnx4iJOhN
+ir7L+DAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAyQYc8ZrQZAlGw
+I0AFYaG/T3waQFr48j3evBEO9RT/3E8+rNbW4QKyzovJhBiNwkqJhn+WNW7B43zT
+jG3MqH3FTcQfjcXGxFUPh1HntMz7RbXs3Pv5G1f5knk6Hy63vG432kAEUZbrAdKV
+yBnR3/VqZd8cX1nzZkhEh9ePz6XTsKctXaHfnenQZJ3YwwNAwlNiNeXB/ykJliyh
+8AJxBQdx76TudXB0pl92bK0nsNVczGXg4UZ80GbCHGoYV9ZjQCX/G5ocquMB11Ou
+2n9iHTPHMdkahDvWwHggLXrCZK2to4N5zYz33dMhnRiR5hVZKaxuql1j9O2kwLCD
+Yb7VgstA
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDAzCCAeugAwIBAgIJALj/jZ2qE13WMA0GCSqGSIb3DQEBCwUAMBgxFjAUBgNV
+BAMMDXJvb3RhdXRob3JpdHkwHhcNMTUwNTI4MTUwMjE5WhcNMjMwODE0MTUwMjE5
+WjAYMRYwFAYDVQQDDA1yb290YXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAp3u9wYL5IexhJAzuCDI1nL/JFT5itluFcGA2UjKF12hDUG5b
+ipvG8Oxi7oOo9Nk32sw5hqNVyCXp35znOZBnnQn6kkLNENRZ0JlprBYZVG+2jTZI
+jxSq8kYWMkeP21BmwfgPuorpfM8ClDCHbrOJuHFeP1U/rqj7A2Hw1VjuPD+5VmWK
+N8EeZsis1vOKWtrQfwEukCUfu6gScsIFa9Pie7r5YufYYWMUGPktI0r1r0S9iTY2
+femCqWIL4jfYKQ8d0ibYE7obM/fhIYUyhSZyCes3ffDpP22/puwkwZMopqIXaB17
+At6q4YXv9RjJQm/CXGoMBzddAiQbpStKA3nAxwIDAQABo1AwTjAdBgNVHQ4EFgQU
+o3jJB2zD+AVyUZ8eIiToTYq+y/gwHwYDVR0jBBgwFoAUo3jJB2zD+AVyUZ8eIiTo
+TYq+y/gwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAjOWWBiCBmzfu
+pvct3CMMDAgLB+N51SrDeowG++Zyv8mtEzaC2nSD2rwztrHKbRInflH5FclFFFKr
+EY7wfL86MZUECpA7QjRpwhaqe7d2uUmi+kOSg3I9AL0KVdM4jOIcNTrzrDjaUpsF
+v9U4ounXQyRI9x8H/v8rzMMQmEeq3DyKqOr6y46U6SspDDlLcGGxQz1olmNYsxw5
+ftY1/Q58HGDsUEMUC2hOCsKw8XxSguLln0inMXpws+rWOZLETN4+WMxZojYmLqz+
+DksVeUKBx1IJx3WLNkj/qk55w/4dJPBfddNJ76KFKxxYwzZ851Y9f6+OndRTGW1n
+XJOiJnRvlQ==
+-----END CERTIFICATE-----
diff --git a/tests/standalone/io/certificates/untrusted_server_key.pem b/tests/standalone/io/certificates/untrusted_server_key.pem
new file mode 100644
index 0000000..ecae29bdb
--- /dev/null
+++ b/tests/standalone/io/certificates/untrusted_server_key.pem
@@ -0,0 +1,29 @@
+-----BEGIN ENCRYPTED PRIVATE KEY-----
+MIIE5DAcBgoqhkiG9w0BDAEBMA4ECPM4xVvIwo+2AgIIAASCBMJ/88x+fp/JrzbU
+TCCt4ic7v+w7nVPOpxtvbQAQ6/kWQcKyjNdeqqktlW/5NvhPOXYWzRZIFkts9BSh
+kyTHqxRa8QFn/PcoqKF6rRUCfoKfROQNnoNP/E//Z7dxg9sUPpHxs7tlwuoBr2dv
+Cnmh/WiJaeOvIEnFOa/ZwTljWjIEfmUHhVK351c6JyRVPDAPKsg2+hWNfQpdqPIz
+ptoDT+gGDY6rMp/eMbpu0g7Dal+q1sC/FQe5hGXWtIz27hHuJxY9V0yOwpW9Q5k9
+dg4KOqrJLW8O3ZF0l/oXOG+V5i9rMJWJyq9GR2LdxmdgL3nKibE6DCZXG/cMcY2O
+ApdCaUzyREM2Qidcp45rWNkVO+5enVh0tiYQY12vvUnDCq5ysKW3FmEXH+uBgy0l
+jh2Wkwlag3wwKis6YeSTQBYO5i+M5vqXXi/yZ5b45Jnjs6rhX5d7scmzaFeLitBz
+GQsNTvrQCNDmbcNVex5k10cxv9eAlsepTIlknwnFItqAmo2idf5Mh51hEvwb9jEQ
+BRLiQIEgmkba2YSU5Vg1SkAEzAm1FCcbc0U8UF90A/Uv/un0VNDii+PxCp8xskvr
+5PmKssF1q1GmuzyWpQ97HKKTP87r/a2OZhxDr876UQnBM6R6mrFF9efyARmc2a7l
+fkuBgpP0ExP69Br8KdWctuyCtIJtY/4CnCJZvEa0FTyurxqh+nrce/YBXZxK7f+2
+NWqEAIwTdmsIRvm6jAr7m/ySsXFP+wjcFVgJ3JwSHc+NO1/NhSSJFXD4dUH7+Xxw
+kUeH7jxrbcFDLA0zXLtVAMuyoX2HTp/AA+COsAXLLtSzifY8RPDloioeqFW2FZ3d
+mvsmjoCVyQK7sJ5+ZwlGqnwOtp2iK2VHjk/Y+J4HUBpcYkUjFFlqa8Bkc7w8BCkI
+nV+hWEQn3nAJiEXtK+PlJfWz4YKUTyOwCp1xvNOrBByXgG5w5bv9RtqpolyN6rh2
+WUcNtt36eMnzj6bBXib9VoOWD2ls0AIIl8EON4KIizI+inY21Lb9f15066UvRm6s
+5Rudi9v7iS+FcOG9bP2pg0sCoooLHqSVE2me1tcI3vDjZH8O3sjo4/YO7W0Vbc2+
+atxzq9cWGWZvpa7grafdqDhcRNqbpBGsUdq0Tps6pMnymjWWHK7x+m61R6wXafBm
+lyT9lyh7y3A9oTtO91QO1VhNY8E0bpF9EkGBIO+VCK7XNvRO7ITZdfsmCgjNQ14u
+iimruX0scOggq3xZ2VjPCrZXbWGO6GD1bJVFqBZmXLDq/YHHC0UbM2eQFcTWXKV3
+S2+pGmrBHlwPPQmvrLBQr8TMzRX/HOLCpUyuNU6bXrkyXIrBKBCj1XOmNtNUBe6O
+PcMQ7BoUf/zsR8XPFbQV+4pidsMNmm9j4g40CBFwAQv2INC385wJIIsjKxewPy+6
+cYmyTtQX+1XPACpQA8BLq9qNkvbJTeXAeAcoA21WtlJjREzpqRA6j0j7Em7oHJNe
+tH7EsBz+KdiYWk/xFRxHICn7TvLTpf5+Xw1pfZfV7Lxpk6ae2fcOr9MjkGqm5YqZ
+VQFdnJ8U+RNC7/yPxDoFqndSI3RsAIXFMvMDOMmToCGwDCt2fFWPgwZeGYj0Qh1c
+7shiDBng3TE=
+-----END ENCRYPTED PRIVATE KEY-----
diff --git a/tests/standalone/io/http_cookie_date_test.dart b/tests/standalone/io/http_cookie_date_test.dart
index 51e3e1f..85385b4 100644
--- a/tests/standalone/io/http_cookie_date_test.dart
+++ b/tests/standalone/io/http_cookie_date_test.dart
@@ -35,6 +35,7 @@
 part "../../../sdk/lib/io/service_object.dart";
 part "../../../sdk/lib/io/secure_socket.dart";
 part "../../../sdk/lib/io/secure_server_socket.dart";
+part "../../../sdk/lib/io/security_context.dart";
 part "../../../sdk/lib/io/socket.dart";
 
 void testParseHttpCookieDate() {
diff --git a/tests/standalone/io/http_headers_test.dart b/tests/standalone/io/http_headers_test.dart
index 6d2b92d..6e2a4ef 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -35,6 +35,7 @@
 part "../../../sdk/lib/io/service_object.dart";
 part "../../../sdk/lib/io/secure_socket.dart";
 part "../../../sdk/lib/io/secure_server_socket.dart";
+part "../../../sdk/lib/io/security_context.dart";
 part "../../../sdk/lib/io/socket.dart";
 
 void testMultiValue() {
diff --git a/tests/standalone/io/http_parser_test.dart b/tests/standalone/io/http_parser_test.dart
index 6302dc6..9d8e014 100644
--- a/tests/standalone/io/http_parser_test.dart
+++ b/tests/standalone/io/http_parser_test.dart
@@ -35,6 +35,7 @@
 part "../../../sdk/lib/io/service_object.dart";
 part "../../../sdk/lib/io/secure_socket.dart";
 part "../../../sdk/lib/io/secure_server_socket.dart";
+part "../../../sdk/lib/io/security_context.dart";
 part "../../../sdk/lib/io/socket.dart";
 
 class HttpParserTest {
diff --git a/tests/standalone/io/http_proxy_test.dart b/tests/standalone/io/http_proxy_test.dart
index 63a125f..9b8803b 100644
--- a/tests/standalone/io/http_proxy_test.dart
+++ b/tests/standalone/io/http_proxy_test.dart
@@ -9,6 +9,16 @@
 import "dart:io";
 import 'dart:convert';
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 class Server {
   HttpServer server;
   bool secure;
@@ -19,49 +29,47 @@
   Server(this.proxyHops, this.directRequestPaths, this.secure);
 
   Future<Server> start() {
-    var x = new Completer();
-    Future f = secure
-        ? HttpServer.bindSecure(
-            "localhost", 0, certificateName: 'localhost_cert')
-        : HttpServer.bind("localhost", 0);
-    return f.then((s) {
+    return (secure ?
+        HttpServer.bindSecure("localhost", 0, serverContext) :
+        HttpServer.bind("localhost", 0))
+    .then((s) {
       server = s;
-      x.complete(this);
-      server.listen((request) {
-        var response = request.response;
-        requestCount++;
-        // Check whether a proxy or direct connection is expected.
-        bool direct = directRequestPaths.fold(
-            false,
-            (prev, path) => prev ? prev : path == request.uri.path);
-        if (!secure && !direct && proxyHops > 0) {
-          Expect.isNotNull(request.headers[HttpHeaders.VIA]);
-          Expect.equals(1, request.headers[HttpHeaders.VIA].length);
-          Expect.equals(
-              proxyHops,
-              request.headers[HttpHeaders.VIA][0].split(",").length);
-        } else {
-          Expect.isNull(request.headers[HttpHeaders.VIA]);
-        }
-        var body = new StringBuffer();
-        request.listen(
-            (data) {
-              body.write(new String.fromCharCodes(data));
-            },
-            onDone: () {
-              String path = request.uri.path.substring(1);
-              if (path != "A") {
-                String content = "$path$path$path";
-                Expect.equals(content, body.toString());
-              }
-              response.write(request.uri.path);
-              response.close();
-            });
-      });
-      return x.future;
+      server.listen(requestHandler);
+      return this;
     });
   }
 
+  void requestHandler(HttpRequest request) {
+    var response = request.response;
+    requestCount++;
+    // Check whether a proxy or direct connection is expected.
+    bool direct = directRequestPaths.fold(
+        false,
+        (prev, path) => prev ? prev : path == request.uri.path);
+    if (!secure && !direct && proxyHops > 0) {
+      Expect.isNotNull(request.headers[HttpHeaders.VIA]);
+      Expect.equals(1, request.headers[HttpHeaders.VIA].length);
+      Expect.equals(
+          proxyHops,
+          request.headers[HttpHeaders.VIA][0].split(",").length);
+    } else {
+      Expect.isNull(request.headers[HttpHeaders.VIA]);
+    }
+    var body = new StringBuffer();
+    onRequestComplete() {
+      String path = request.uri.path.substring(1);
+      if (path != "A") {
+        String content = "$path$path$path";
+        Expect.equals(content, body.toString());
+      }
+      response.write(request.uri.path);
+      response.close();
+    }
+    request.listen((data) {
+      body.write(new String.fromCharCodes(data));
+    }, onDone: onRequestComplete);
+  }
+
   void shutdown() {
     server.close();
   }
@@ -336,7 +344,7 @@
   setupProxyServer().then((proxyServer) {
   setupServer(1, directRequestPaths: ["/4"]).then((server) {
   setupServer(1, directRequestPaths: ["/4"], secure: true).then((secureServer) {
-    HttpClient client = new HttpClient();
+    HttpClient client = new HttpClient(context: clientContext);
 
     List<String> proxy;
     if (Platform.operatingSystem == "windows") {
@@ -796,26 +804,22 @@
   });
 }
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
 main() {
-  InitializeSSL();
   testInvalidProxy();
   testDirectProxy();
   testProxy();
-  testProxyIPV6();
+  // testProxyIPV6();  // TODO(24074): Move failing tests to separate files.
   testProxyChain();
-  testProxyFromEnviroment();
+  // TODO(24074): Move failing tests to separate files.
+  // testProxyFromEnviroment();
   // The two invocations of uses the same global variable for state -
   // run one after the other.
-  testProxyAuthenticate(false)
-      .then((_) => testProxyAuthenticate(true));
+  // TODO(24074): Move failing tests to separate files.
+  // testProxyAuthenticate(false)
+  //    .then((_) => testProxyAuthenticate(true));
+
   // This test is not normally run. It can be used for locally testing
   // with a real proxy server (e.g. Apache).
-  //testRealProxy();
-  //testRealProxyAuth();
+  // testRealProxy();
+  // testRealProxyAuth();
 }
diff --git a/tests/standalone/io/http_requested_uri_test.dart b/tests/standalone/io/http_requested_uri_test.dart
index f573c03..03db108 100644
--- a/tests/standalone/io/http_requested_uri_test.dart
+++ b/tests/standalone/io/http_requested_uri_test.dart
@@ -7,19 +7,20 @@
 import "dart:async";
 import "dart:io";
 
-const PATH = '/path?a=b#c';
+const sendPath = '/path?a=b#c';
+const expectedPath = '/path?a=b';
 
 void test(String expected, Map headers) {
   asyncStart();
   HttpServer.bind("localhost", 0).then((server) {
     expected = expected.replaceAll('%PORT', server.port.toString());
     server.listen((request) {
-      Expect.equals("$expected$PATH",
+      Expect.equals("$expected$expectedPath",
                     request.requestedUri.toString());
       request.response.close();
     });
     HttpClient client = new HttpClient();
-    client.get("localhost", server.port, PATH)
+    client.get("localhost", server.port, sendPath)
       .then((request) {
         for (var v in headers.keys) {
           if (headers[v] != null) {
diff --git a/tests/standalone/io/https_bad_certificate_client.dart b/tests/standalone/io/https_bad_certificate_client.dart
deleted file mode 100644
index c2f79cd..0000000
--- a/tests/standalone/io/https_bad_certificate_client.dart
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Client for https_bad_certificate_test, that runs in a subprocess.
-// It verifies that the client bad certificate callback works in HttpClient.
-
-import "dart:async";
-import "dart:io";
-
-class ExpectException implements Exception {
-  ExpectException(this.message);
-  String toString() => "ExpectException: $message";
-  String message;
-}
-
-void expect(condition) {
-  if (!condition) {
-    throw new ExpectException('');
-  }
-}
-
-const HOST_NAME = "localhost";
-
-Future runHttpClient(int port, result) async {
-  bool badCertificateCallback(X509Certificate certificate,
-                              String host,
-                              int callbackPort) {
-    expect(HOST_NAME == host);
-    expect(callbackPort == port);
-    expect('CN=localhost' == certificate.subject);
-    expect('CN=myauthority' == certificate.issuer);
-    expect(result != 'exception');  // Throw exception if one is requested.
-    if (result == 'true') return true;
-    if (result == 'false') return false;
-    return result;
-  }
-
-  HttpClient client = new HttpClient();
-
-  await client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
-    .then((HttpClientRequest request) {
-      expect(result == 'true');  // The session cache may keep the session.
-      return request.close();
-    }, onError: (e) {
-      expect(e is HandshakeException || e is SocketException);
-    });
-
-  client.badCertificateCallback = badCertificateCallback;
-  await client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
-    .then((HttpClientRequest request) {
-      expect(result == 'true');
-      return request.close();
-    }, onError: (e) {
-      if (result == 'false') expect (e is HandshakeException ||
-                                     e is SocketException);
-      else if (result == 'exception') expect (e is ExpectException ||
-                                              e is SocketException);
-      else {
-        expect (e is ArgumentError || e is SocketException);
-      }
-    });
-
-  client.badCertificateCallback = null;
-  await client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
-    .then((HttpClientRequest request) {
-      expect(result == 'true');  // The session cache may keep the session.
-      return request.close();
-    }, onError: (e) {
-      expect(e is HandshakeException || e is SocketException);
-    });
-
-  client.close();
-}
-
-void main(List<String> args) {
-  SecureSocket.initialize();
-  int port = int.parse(args[0]);
-  runHttpClient(port, args[1])
-    .then((_) => print('SUCCESS'));
-}
diff --git a/tests/standalone/io/https_bad_certificate_test.dart b/tests/standalone/io/https_bad_certificate_test.dart
index d07961a..fdd83e3 100644
--- a/tests/standalone/io/https_bad_certificate_test.dart
+++ b/tests/standalone/io/https_bad_certificate_test.dart
@@ -4,52 +4,78 @@
 
 // This test verifies that the bad certificate callback works in HttpClient.
 
-import "package:expect/expect.dart";
-import "package:path/path.dart";
 import "dart:async";
 import "dart:io";
 
-const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+import "package:expect/expect.dart";
 
-Future<SecureServerSocket> runServer() {
-  SecureSocket.initialize(
-      database: Platform.script.resolve('pkcert').toFilePath(),
+final HOST_NAME = 'localhost';
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
       password: 'dartdart');
 
-  return HttpServer.bindSecure(
-      HOST_NAME, 0, backlog: 5, certificateName: 'localhost_cert')
-  .then((server) {
-    server.listen((HttpRequest request) {
-      request.listen((_) { }, onDone: () { request.response.close(); });
-    }, onError: (e) { if (e is! HandshakeException) throw e; });
-    return server;
-  });
-}
+class CustomException {}
 
 main() async {
-  var clientScript = Platform.script
-                             .resolve('https_bad_certificate_client.dart')
-                             .toFilePath();
-  Future clientProcess(int port, String acceptCertificate) {
-    return Process.run(Platform.executable,
-        [clientScript, port.toString(), acceptCertificate])
-    .then((ProcessResult result) {
-      if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
-        print("Client failed, acceptCertificate: $acceptCertificate");
-        print("  stdout:");
-        print(result.stdout);
-        print("  stderr:");
-        print(result.stderr);
-        Expect.fail('Client subprocess exit code: ${result.exitCode}');
-      }
+  var HOST = (await InternetAddress.lookup(HOST_NAME)).first;
+  var server = await HttpServer.bindSecure(HOST, 0, serverContext, backlog: 5);
+  server.listen((request) {
+    request.listen((_) {
+    }, onDone: () {
+      request.response.close();
     });
-  }
+  });
 
-  var server = await runServer();
-  await clientProcess(server.port, 'true');
-  await clientProcess(server.port, 'false');
-  await clientProcess(server.port, 'fisk');
-  await clientProcess(server.port, 'exception');
+  SecurityContext goodContext = new SecurityContext()
+    ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+  SecurityContext badContext = new SecurityContext();
+  SecurityContext defaultContext = SecurityContext.defaultContext;
+
+  await runClient(server.port, goodContext, true, 'pass');
+  await runClient(server.port, goodContext, false, 'pass');
+  await runClient(server.port, goodContext, 'fisk', 'pass');
+  await runClient(server.port, goodContext, 'exception', 'pass');
+  await runClient(server.port, badContext, true, 'pass');
+  await runClient(server.port, badContext, false, 'fail');
+  await runClient(server.port, badContext, 'fisk', 'fail');
+  await runClient(server.port, badContext, 'exception', 'throw');
+  await runClient(server.port, defaultContext, true, 'pass');
+  await runClient(server.port, defaultContext, false, 'fail');
+  await runClient(server.port, defaultContext, 'fisk', 'fail');
+  await runClient(server.port, defaultContext, 'exception', 'throw');
   server.close();
 }
+
+
+Future runClient(int port,
+                 SecurityContext context,
+                 callbackReturns,
+                 result) async {
+  HttpClient client = new HttpClient(context: context);
+  client.badCertificateCallback = (X509Certificate certificate, host, port) {
+    Expect.equals('/CN=rootauthority', certificate.subject);
+    Expect.equals('/CN=rootauthority', certificate.issuer);
+    // Throw exception if one is requested.
+    if (callbackReturns == 'exception') throw new CustomException();
+    return callbackReturns;
+  };
+
+  try {
+    var request = await client.getUrl(Uri.parse('https://$HOST_NAME:$port/'));
+    Expect.equals('pass', result);
+    await request.close();
+  } catch (error) {
+    Expect.notEquals(result, 'pass');
+    if (result == 'fail') {
+      Expect.isTrue(error is HandshakeException);
+    } else if (result == 'throw') {
+      Expect.isTrue(error is CustomException);
+    } else {
+      Expect.fail('Unknown expectation $result');
+    }
+  }
+}
diff --git a/tests/standalone/io/https_client_certificate_test.dart b/tests/standalone/io/https_client_certificate_test.dart
index f63d383..24d3978 100644
--- a/tests/standalone/io/https_client_certificate_test.dart
+++ b/tests/standalone/io/https_client_certificate_test.dart
@@ -10,14 +10,27 @@
 import "package:path/path.dart";
 
 const HOST_NAME = "localhost";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+// TODO: Specify which client certificate roots to trust.
 
-Function test() {
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'))
+// TODO: Set a client certificate here.
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+void main() {
   asyncStart();
   HttpServer.bindSecure(HOST_NAME,
                         0,
+                        serverContext,
                         backlog: 5,
-                        certificateName: 'localhost_cert',
                         requestClientCertificate: true).then((server) {
     server.listen((HttpRequest request) {
       Expect.isNotNull(request.certificate);
@@ -26,7 +39,7 @@
       request.response.close();
     });
 
-    HttpClient client = new HttpClient();
+    HttpClient client = new HttpClient(context: clientContext);
     client.getUrl(Uri.parse("https://$HOST_NAME:${server.port}/"))
         .then((request) => request.close())
         .then((response) {
@@ -44,14 +57,3 @@
         });
   });
 }
-
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
-void main() {
-  InitializeSSL();
-  test();
-}
diff --git a/tests/standalone/io/https_server_test.dart b/tests/standalone/io/https_server_test.dart
index cdba064..88a8b2a 100644
--- a/tests/standalone/io/https_server_test.dart
+++ b/tests/standalone/io/https_server_test.dart
@@ -9,14 +9,23 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 void testListenOn() {
   void test(void onDone()) {
     HttpServer.bindSecure(HOST,
                           0,
-                          backlog: 5,
-                          certificateName: CERTIFICATE).then((server) {
+                          serverContext,
+                          backlog: 5).then((server) {
       ReceivePort serverPort = new ReceivePort();
       server.listen((HttpRequest request) {
         request.listen(
@@ -27,7 +36,7 @@
           });
       });
 
-      HttpClient client = new HttpClient();
+      HttpClient client = new HttpClient(context: clientContext);
       ReceivePort clientPort = new ReceivePort();
       client.getUrl(Uri.parse("https://${HOST.host}:${server.port}/"))
         .then((HttpClientRequest request) {
@@ -58,16 +67,10 @@
   });
 }
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
 void testEarlyClientClose() {
   HttpServer.bindSecure(HOST,
                         0,
-                        certificateName: 'localhost_cert').then((server) {
+                        serverContext).then((server) {
     server.listen(
       (request) {
         String name = Platform.script.toFilePath();
@@ -96,7 +99,6 @@
 }
 
 void main() {
-  InitializeSSL();
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     testListenOn();
diff --git a/tests/standalone/io/https_unauthorized_client.dart b/tests/standalone/io/https_unauthorized_client.dart
index 925ccba..673fdf0 100644
--- a/tests/standalone/io/https_unauthorized_client.dart
+++ b/tests/standalone/io/https_unauthorized_client.dart
@@ -15,9 +15,9 @@
   String message;
 }
 
-void expect(condition) {
+void expect(condition, message) {
   if (!condition) {
-    throw new ExpectException('');
+    throw new ExpectException(message);
   }
 }
 
@@ -31,16 +31,19 @@
     testFutures.add(
         client.getUrl(Uri.parse('https://$HOST_NAME:$port/'))
           .then((HttpClientRequest request) {
-            expect(false);
+            expect(false, "Request succeeded");
           }, onError: (e) {
-            expect(e is HandshakeException || e is SocketException);
+            // Remove ArgumentError once null default context is supported.
+            expect(e is HandshakeException ||
+                   e is SocketException ||
+                   e is ArgumentError,
+                   "Error is wrong type: $e");
           }));
   }
   return Future.wait(testFutures);
 }
 
 void main(List<String> args) {
-  SecureSocket.initialize();
   runClients(int.parse(args[0]))
     .then((_) => print('SUCCESS'));
 }
diff --git a/tests/standalone/io/https_unauthorized_test.dart b/tests/standalone/io/https_unauthorized_test.dart
index 0bb6c89..43f3e53 100644
--- a/tests/standalone/io/https_unauthorized_test.dart
+++ b/tests/standalone/io/https_unauthorized_test.dart
@@ -13,13 +13,19 @@
 const HOST_NAME = "localhost";
 const CERTIFICATE = "localhost_cert";
 
-Future<SecureServerSocket> runServer() {
-  SecureSocket.initialize(
-      database: Platform.script.resolve('pkcert').toFilePath(),
-      password: 'dartdart');
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
+SecurityContext untrustedServerContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/untrusted_server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/untrusted_server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
+Future<SecureServerSocket> runServer() {
   return HttpServer.bindSecure(
-      HOST_NAME, 0, backlog: 5, certificateName: 'localhost_cert')
+      HOST_NAME, 0, untrustedServerContext, backlog: 5)
   .then((server) {
     server.listen((HttpRequest request) {
       request.listen((_) { }, onDone: () { request.response.close(); });
diff --git a/tests/standalone/io/pkcert/README b/tests/standalone/io/pkcert/README
deleted file mode 100644
index fe764a9..0000000
--- a/tests/standalone/io/pkcert/README
+++ /dev/null
@@ -1,16 +0,0 @@
-This is a certificate database used by Dart for testing purposes.
-
-It is created as a certificate database by NSS (Network Security Services),
-a library from Mozilla, using the certutil tool.  It uses a cert9.db file,
-rather than a cert8.db file, so the database directory must be specified with
-"sql:" in front of the directory path, or the environment variable
-NSS_DEFAULT_DB_TYPE must be set to "sql".
-
-The password for the key database is "dartdart".
-
-The database contains a root certificate from Equifax, used to verify the
-client https connection to www.google.dk.  It contains a self-signed
-certificate for a local certificate authority myauthority_cert, and a
-server certificate for localhost called localhost_cert, signed by
-myauthority_cert.  It contains the key for localhost_cert, but
-not the key for myauthority_cert.
diff --git a/tests/standalone/io/pkcert/cert9.db b/tests/standalone/io/pkcert/cert9.db
deleted file mode 100644
index 497fca6..0000000
--- a/tests/standalone/io/pkcert/cert9.db
+++ /dev/null
Binary files differ
diff --git a/tests/standalone/io/pkcert/key4.db b/tests/standalone/io/pkcert/key4.db
deleted file mode 100644
index fc06432..0000000
--- a/tests/standalone/io/pkcert/key4.db
+++ /dev/null
Binary files differ
diff --git a/tests/standalone/io/raw_secure_server_closing_test.dart b/tests/standalone/io/raw_secure_server_closing_test.dart
index 16fffe3..63e9cd4 100644
--- a/tests/standalone/io/raw_secure_server_closing_test.dart
+++ b/tests/standalone/io/raw_secure_server_closing_test.dart
@@ -14,7 +14,15 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 void testCloseOneEnd(String toClose) {
   asyncStart();
@@ -25,7 +33,7 @@
       .then((_) {
         asyncEnd();
       });
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     server.listen((serverConnection) {
       serverConnection.listen((event) {
         if (toClose == "server" || event == RawSocketEvent.READ_CLOSED) {
@@ -39,7 +47,8 @@
     onDone: () {
       serverDone.complete(null);
     });
-    RawSecureSocket.connect(HOST, server.port).then((clientConnection) {
+    RawSecureSocket.connect(HOST, server.port, context: clientContext)
+    .then((clientConnection) {
       clientConnection.listen((event){
         if (toClose == "client" || event == RawSocketEvent.READ_CLOSED) {
           clientConnection.shutdown(SocketDirection.SEND);
@@ -55,8 +64,9 @@
 
 void testCloseBothEnds() {
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
-    var clientEndFuture = RawSecureSocket.connect(HOST, server.port);
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
+    var clientEndFuture =
+        RawSecureSocket.connect(HOST, server.port, context: clientContext);
     server.listen((serverEnd) {
       clientEndFuture.then((clientEnd) {
         clientEnd.close();
@@ -77,7 +87,7 @@
 
   RawSecureServerSocket.bind(HOST,
                              0,
-                             CERTIFICATE,
+                             serverContext,
                              backlog: 2 * socketCount).then((server) {
     Expect.isTrue(server.port > 0);
     var subscription;
@@ -96,7 +106,8 @@
     subscription.pause();
     var connectCount = 0;
     for (int i = 0; i < socketCount; i++) {
-      RawSecureSocket.connect(HOST, server.port).then((connection) {
+      RawSecureSocket.connect(HOST, server.port, context: clientContext)
+      .then((connection) {
         connection.shutdown(SocketDirection.SEND);
       });
     }
@@ -104,7 +115,8 @@
       subscription.resume();
       resumed = true;
       for (int i = 0; i < socketCount; i++) {
-        RawSecureSocket.connect(HOST, server.port).then((connection) {
+        RawSecureSocket.connect(HOST, server.port, context: clientContext)
+        .then((connection) {
           connection.shutdown(SocketDirection.SEND);
         });
       }
@@ -117,7 +129,7 @@
   asyncStart();
   List ends = [];
 
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     Expect.isTrue(server.port > 0);
     void checkDone() {
       if (ends.length < 2 * socketCount) return;
@@ -134,7 +146,8 @@
     });
 
     for (int i = 0; i < socketCount; i++) {
-      RawSecureSocket.connect(HOST, server.port).then((connection) {
+      RawSecureSocket.connect(HOST, server.port, context: clientContext)
+      .then((connection) {
         ends.add(connection);
         checkDone();
       });
@@ -145,10 +158,6 @@
 
 main() {
   asyncStart();
-  var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     runTests();
diff --git a/tests/standalone/io/raw_secure_server_socket_argument_test.dart b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
index 2513f6d..029b750 100644
--- a/tests/standalone/io/raw_secure_server_socket_argument_test.dart
+++ b/tests/standalone/io/raw_secure_server_socket_argument_test.dart
@@ -20,17 +20,13 @@
 void testArguments() {
   bool isArgOrTypeError(e) => e is ArgumentError || e is TypeError;
   Expect.throws(() =>
-                RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, CERTIFICATE),
+                RawSecureServerSocket.bind(SERVER_ADDRESS, 65536, null),
                 isArgOrTypeError);
   Expect.throws(() =>
-                RawSecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE),
+                RawSecureServerSocket.bind(SERVER_ADDRESS, -1, null),
                 isArgOrTypeError);
   Expect.throws(() => RawSecureServerSocket.bind(SERVER_ADDRESS, 0,
-                                                 CERTIFICATE, backlog: -1),
-                isArgOrTypeError);
-  Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 3456,
-                                              sendClientCertificate: true,
-                                              certificateName: 12.3),
+                                                 null, backlog: -1),
                 isArgOrTypeError);
   Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, null),
                 isArgOrTypeError);
@@ -43,21 +39,11 @@
   Expect.throws(() => RawSecureSocket.connect(null, 0),
                 isArgOrTypeError);
   Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
-                                              certificateName: 77),
-                isArgOrTypeError);
-  Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
-                                              sendClientCertificate: 'fisk'),
-                isArgOrTypeError);
-  Expect.throws(() => RawSecureSocket.connect(SERVER_ADDRESS, 0,
                                               onBadCertificate: 'hund'),
                 isArgOrTypeError);
 }
 
 
 main() {
-  var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   testArguments();
 }
diff --git a/tests/standalone/io/raw_secure_server_socket_test.dart b/tests/standalone/io/raw_secure_server_socket_test.dart
index 33fc191..560722f 100644
--- a/tests/standalone/io/raw_secure_server_socket_test.dart
+++ b/tests/standalone/io/raw_secure_server_socket_test.dart
@@ -14,11 +14,19 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 void testSimpleBind() {
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((s) {
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((s) {
     Expect.isTrue(s.port > 0);
     s.close();
     asyncEnd();
@@ -30,7 +38,7 @@
 
   // Bind to a unknown DNS name.
   asyncStart();
-  RawSecureServerSocket.bind("ko.faar.__hest__", 0, CERTIFICATE).then((_) {
+  RawSecureServerSocket.bind("ko.faar.__hest__", 0, serverContext).then((_) {
     Expect.fail("Failure expected");
   }).catchError((error) {
     Expect.isTrue(error is SocketException);
@@ -39,7 +47,7 @@
 
   // Bind to an unavaliable IP-address.
   asyncStart();
-  RawSecureServerSocket.bind("8.8.8.8", 0, CERTIFICATE).then((_) {
+  RawSecureServerSocket.bind("8.8.8.8", 0, serverContext).then((_) {
     Expect.fail("Failure expected");
   }).catchError((error) {
     Expect.isTrue(error is SocketException);
@@ -48,10 +56,10 @@
 
   // Bind to a port already in use.
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((s) {
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((s) {
     RawSecureServerSocket.bind(HOST,
                                s.port,
-                               CERTIFICATE).then((t) {
+                               serverContext).then((t) {
       s.close();
       t.close();
       Expect.fail("Multiple listens on same port");
@@ -64,12 +72,14 @@
   });
 }
 
-void testSimpleConnect(String certificate) {
+void testSimpleConnect() {
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, certificate).then((server) {
-    var clientEndFuture = RawSecureSocket.connect(HOST, server.port);
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
+    var clientEndFuture =
+    RawSecureSocket.connect(HOST, server.port, context: clientContext);
     server.listen((serverEnd) {
       clientEndFuture.then((clientEnd) {
+        // TODO(whesse): Shutdown(SEND) not supported on secure sockets.
         clientEnd.shutdown(SocketDirection.SEND);
         serverEnd.shutdown(SocketDirection.SEND);
         server.close();
@@ -79,10 +89,11 @@
   });
 }
 
-void testSimpleConnectFail(String certificate, bool cancelOnError) {
+void testSimpleConnectFail(SecurityContext context, bool cancelOnError) {
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, certificate).then((server) {
-    var clientEndFuture = RawSecureSocket.connect(HOST, server.port)
+  RawSecureServerSocket.bind(HOST, 0, context).then((server) {
+    var clientEndFuture =
+        RawSecureSocket.connect(HOST, server.port, context: clientContext)
       .then((clientEnd) {
         Expect.fail("No client connection expected.");
       })
@@ -94,7 +105,7 @@
       Expect.fail("No server connection expected.");
     },
     onError: (error) {
-      Expect.isTrue(error is CertificateException);
+      Expect.isTrue(error is HandshakeException);
       clientEndFuture.then((_) {
         if (!cancelOnError) server.close();
         asyncEnd();
@@ -106,9 +117,10 @@
 
 void testServerListenAfterConnect() {
   asyncStart();
-  RawSecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  RawSecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     Expect.isTrue(server.port > 0);
-    var clientEndFuture = RawSecureSocket.connect(HOST, server.port);
+    var clientEndFuture =
+        RawSecureSocket.connect(HOST, server.port, context: clientContext);
     new Timer(const Duration(milliseconds: 500), () {
       server.listen((serverEnd) {
         clientEndFuture.then((clientEnd) {
@@ -422,15 +434,17 @@
 
   Future<RawSecureSocket> connectClient(int port) {
     if (connectSecure) {
-      return RawSecureSocket.connect(HOST, port);
+      return RawSecureSocket.connect(HOST, port, context: clientContext);
     } else if (!handshakeBeforeSecure) {
       return RawSocket.connect(HOST, port).then((socket) {
-        return RawSecureSocket.secure(socket);
+        return RawSecureSocket.secure(socket, context: clientContext);
       });
     } else {
       return RawSocket.connect(HOST, port).then((socket) {
         return runClientHandshake(socket).then((subscription) {
-            return RawSecureSocket.secure(socket, subscription: subscription);
+            return RawSecureSocket.secure(socket,
+                                          context: clientContext,
+                                          subscription: subscription);
         });
       });
     }
@@ -441,14 +455,14 @@
       if (listenSecure) {
         runServer(client).then((_) => server.close());
       } else if (!handshakeBeforeSecure) {
-        RawSecureSocket.secureServer(client, CERTIFICATE).then((client) {
+        RawSecureSocket.secureServer(client, serverContext).then((client) {
           runServer(client).then((_) => server.close());
         });
       } else {
         runServerHandshake(client).then((secure) {
             RawSecureSocket.secureServer(
                 client,
-                CERTIFICATE,
+                serverContext,
                 subscription: secure[0],
                 bufferedData: secure[1]).then((client) {
             runServer(client).then((_) => server.close());
@@ -465,7 +479,7 @@
 
   if (listenSecure) {
     RawSecureServerSocket.bind(
-        HOST, 0, CERTIFICATE).then(serverReady);
+        HOST, 0, serverContext).then(serverReady);
   } else {
     RawServerSocket.bind(HOST, 0).then(serverReady);
   }
@@ -490,7 +504,7 @@
         }
         try {
           RawSecureSocket.secureServer(
-              client, CERTIFICATE, subscription: subscription)
+              client, serverContext, subscription: subscription)
             .catchError((_) {})
             .whenComplete(() {
               if (pausedServer) {
@@ -543,10 +557,6 @@
 
 main() {
   asyncStart();
-  var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     runTests();
@@ -557,12 +567,22 @@
 runTests() {
   testSimpleBind();
   testInvalidBind();
-  testSimpleConnect(CERTIFICATE);
-  testSimpleConnect("CN=localhost");
-  testSimpleConnectFail("not_a_nickname", false);
-  testSimpleConnectFail("CN=notARealDistinguishedName", false);
-  testSimpleConnectFail("not_a_nickname", true);
-  testSimpleConnectFail("CN=notARealDistinguishedName", true);
+  testSimpleConnect();
+  SecurityContext context = new SecurityContext();
+  testSimpleConnectFail(context, false);
+  testSimpleConnectFail(context, true);
+  var chain =
+      Platform.script.resolve('certificates/untrusted_server_chain.pem')
+      .toFilePath();
+  context.useCertificateChain(chain);
+  testSimpleConnectFail(context, false);
+  testSimpleConnectFail(context, true);
+  var key =
+      Platform.script.resolve('certificates/untrusted_server_key.pem')
+       .toFilePath();
+  context.usePrivateKey(key, password: 'dartdart');
+  testSimpleConnectFail(context, false);
+  testSimpleConnectFail(context, true);
   testServerListenAfterConnect();
 
   testSimpleReadWrite(listenSecure: true,
@@ -575,11 +595,13 @@
                       handshakeBeforeSecure: false,
                       postponeSecure: false,
                       dropReads: false);
+
   testSimpleReadWrite(listenSecure: false,
                       connectSecure: true,
                       handshakeBeforeSecure: false,
                       postponeSecure: false,
                       dropReads: false);
+
   testSimpleReadWrite(listenSecure: false,
                       connectSecure: false,
                       handshakeBeforeSecure: false,
diff --git a/tests/standalone/io/raw_secure_socket_pause_test.dart b/tests/standalone/io/raw_secure_socket_pause_test.dart
index 3ca26cb..c3bfc43 100644
--- a/tests/standalone/io/raw_secure_socket_pause_test.dart
+++ b/tests/standalone/io/raw_secure_socket_pause_test.dart
@@ -13,12 +13,22 @@
 import "dart:io";
 import "dart:isolate";
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 Future<HttpServer> startServer() {
   return HttpServer.bindSecure(
       "localhost",
       0,
-      backlog: 5,
-      certificateName: 'localhost_cert').then((server) {
+      serverContext,
+      backlog: 5).then((server) {
     server.listen((HttpRequest request) {
       request.listen(
         (_) { },
@@ -34,77 +44,72 @@
   });
 }
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
-void main() {
+main() async {
   List<int> message = "GET / HTTP/1.0\r\nHost: localhost\r\n\r\n".codeUnits;
   int written = 0;
   List<int> body = <int>[];
-  InitializeSSL();
-  startServer().then((server) {
-    RawSecureSocket.connect("localhost", server.port).then((socket) {
-      StreamSubscription subscription;
-      bool paused = false;
-      bool readEventsTested = false;
-      bool readEventsPaused = false;
+  var server = await startServer();
+  var socket = await RawSecureSocket.connect("localhost",
+                                             server.port,
+                                             context: clientContext);
+  StreamSubscription subscription;
+  bool paused = false;
+  bool readEventsTested = false;
+  bool readEventsPaused = false;
 
-      void runPauseTest() {
-        subscription.pause();
-        paused = true;
-        new Timer(const Duration(milliseconds: 500), () {
-            paused = false;
-            subscription.resume();
-        });
-      }
-
-      void runReadEventTest() {
-        if (readEventsTested) return;
-        readEventsTested = true;
-        socket.readEventsEnabled = false;
-        readEventsPaused = true;
-        new Timer(const Duration(milliseconds: 500), () {
-            readEventsPaused = false;
-            socket.readEventsEnabled = true;
-        });
-      }
-
-      subscription = socket.listen(
-          (RawSocketEvent event) {
-            Expect.isFalse(paused);
-            switch (event) {
-              case RawSocketEvent.READ:
-                Expect.isFalse(readEventsPaused);
-                runReadEventTest();
-                body.addAll(socket.read());
-                break;
-              case RawSocketEvent.WRITE:
-                written +=
-                    socket.write(message, written, message.length - written);
-                if (written < message.length) {
-                  socket.writeEventsEnabled = true;
-                } else {
-                  socket.shutdown(SocketDirection.SEND);
-                  runPauseTest();
-                }
-                break;
-              case RawSocketEvent.READ_CLOSED:
-                Expect.isTrue(body.length > 100);
-                Expect.equals(72, body[0]);
-                Expect.equals(9, body[body.length - 1]);
-                server.close();
-                break;
-              default: throw "Unexpected event $event";
-            }
-          },
-          onError: (e, trace) {
-            String msg = "onError handler of RawSecureSocket stream hit: $e";
-            if (trace != null) msg += "\nStackTrace: $trace";
-            Expect.fail(msg);
-          });
+  void runPauseTest() {
+    subscription.pause();
+    paused = true;
+    new Timer(const Duration(milliseconds: 500), () {
+        paused = false;
+        subscription.resume();
     });
-  });
+  }
+
+  void runReadEventTest() {
+    if (readEventsTested) return;
+    readEventsTested = true;
+    socket.readEventsEnabled = false;
+    readEventsPaused = true;
+    new Timer(const Duration(milliseconds: 500), () {
+        readEventsPaused = false;
+        socket.readEventsEnabled = true;
+    });
+  }
+
+  void handleRawEvent(RawSocketEvent event) {
+    Expect.isFalse(paused);
+    switch (event) {
+      case RawSocketEvent.READ:
+        Expect.isFalse(readEventsPaused);
+        runReadEventTest();
+        body.addAll(socket.read());
+        break;
+      case RawSocketEvent.WRITE:
+        written +=
+            socket.write(message, written, message.length - written);
+        if (written < message.length) {
+          socket.writeEventsEnabled = true;
+        } else {
+          socket.shutdown(SocketDirection.SEND);
+          runPauseTest();
+        }
+        break;
+      case RawSocketEvent.READ_CLOSED:
+        Expect.isTrue(body.length > 100);
+        Expect.equals(72, body.first);
+        Expect.equals(9, body.last);
+        server.close();
+        break;
+      default: throw "Unexpected event $event";
+    }
+  }
+
+  subscription = socket.listen(
+      handleRawEvent,
+      onError: (e, trace) {
+        String msg = "onError handler of RawSecureSocket stream hit: $e";
+        if (trace != null) msg += "\nStackTrace: $trace";
+        Expect.fail(msg);
+      });
 }
diff --git a/tests/standalone/io/raw_secure_socket_test.dart b/tests/standalone/io/raw_secure_socket_test.dart
index cd327ec..9cd54a1 100644
--- a/tests/standalone/io/raw_secure_socket_test.dart
+++ b/tests/standalone/io/raw_secure_socket_test.dart
@@ -13,69 +13,61 @@
 import "dart:io";
 import "dart:isolate";
 
-Future<HttpServer> startServer() {
-  return HttpServer.bindSecure(
-      "localhost",
-      0,
-      backlog: 5,
-      certificateName: 'localhost_cert').then((server) {
-    server.listen((HttpRequest request) {
-      request.listen(
-        (_) { },
-        onDone: () {
-          request.response.contentLength = 100;
-          for (int i = 0; i < 10; i++) {
-            request.response.add([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
-          }
-          request.response.close();
-        });
-    });
-    return server;
-  });
-}
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
 
-void main() {
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
+main() async {
   List<int> message = "GET / HTTP/1.0\r\nHost: localhost\r\n\r\n".codeUnits;
   int written = 0;
   List<int> body = <int>[];
-  InitializeSSL();
-  startServer().then((server) {
-    RawSecureSocket.connect("localhost", server.port).then((socket) {
-      socket.listen(
-          (RawSocketEvent event) {
-            switch (event) {
-              case RawSocketEvent.READ:
-                body.addAll(socket.read());
-                break;
-              case RawSocketEvent.WRITE:
-                written +=
-                    socket.write(message, written, message.length - written);
-                if (written < message.length) {
-                  socket.writeEventsEnabled = true;
-                } else {
-                  socket.shutdown(SocketDirection.SEND);
-                }
-                break;
-              case RawSocketEvent.READ_CLOSED:
-                Expect.isTrue(body.length > 100, "$body\n${body.length}");
-                Expect.equals(72, body[0]);
-                Expect.equals(9, body[body.length - 1]);
-                server.close();
-                break;
-              default: throw "Unexpected event $event";
-            }
-          },
-          onError: (e, trace) {
-            String msg = "onError handler of RawSecureSocket stream hit $e";
-            if (trace != null) msg += "\nStackTrace: $trace";
-            Expect.fail(msg);
-          });
-    });
+  var server = await HttpServer.bindSecure(
+      "localhost",
+      0,
+      serverContext,
+      backlog: 5);
+  server.listen((HttpRequest request) async {
+    await request.drain();
+    request.response.contentLength = 100;
+    for (int i = 0; i < 10; i++) {
+      request.response.add([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+    }
+    request.response.close();
+  });
+  var socket = await RawSecureSocket.connect("localhost",
+                                             server.port,
+                                             context: clientContext);
+  socket.listen((RawSocketEvent event) {
+    switch (event) {
+      case RawSocketEvent.READ:
+        body.addAll(socket.read());
+        break;
+      case RawSocketEvent.WRITE:
+        written +=
+            socket.write(message, written, message.length - written);
+        if (written < message.length) {
+          socket.writeEventsEnabled = true;
+        } else {
+          socket.shutdown(SocketDirection.SEND);
+        }
+        break;
+      case RawSocketEvent.READ_CLOSED:
+        Expect.isTrue(body.length > 100, "$body\n${body.length}");
+        Expect.equals(72, body[0]);
+        Expect.equals(9, body[body.length - 1]);
+        server.close();
+        break;
+      default: throw "Unexpected event $event";
+    }
+  }, onError: (e, trace) {
+    String msg = "onError handler of RawSecureSocket stream hit $e";
+    if (trace != null) msg += "\nStackTrace: $trace";
+    Expect.fail(msg);
   });
 }
diff --git a/tests/standalone/io/regress_21160_test.dart b/tests/standalone/io/regress_21160_test.dart
index 69cbcf1..95ccfca 100644
--- a/tests/standalone/io/regress_21160_test.dart
+++ b/tests/standalone/io/regress_21160_test.dart
@@ -10,6 +10,16 @@
 import "dart:io";
 import "dart:typed_data";
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 // 10 KiB of i%256 data.
 Uint8List DATA = new Uint8List.fromList(
     new List.generate(10 * 1024, (i) => i % 256));
@@ -17,63 +27,54 @@
 Future<SecureServerSocket> startServer() {
   return SecureServerSocket.bind("localhost",
                                  0,
-                                 'localhost_cert').then((server) {
-    server.listen((SecureSocket request) {
-      request.drain().then((_) {
-        request
-            ..add(DATA)
-            ..close();
-      });
+                                 serverContext).then((server) {
+    server.listen((SecureSocket request) async {
+      await request.drain();
+      request..add(DATA)..close();
     });
     return server;
   });
 }
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
-void main() {
-  InitializeSSL();
-
+main() async {
   asyncStart();
-  startServer().then((SecureServerSocket server) {
-    RawSecureSocket.connect("localhost", server.port).then((socket) {
-      List<int> body = <int>[];
+  var server = await SecureServerSocket.bind("localhost", 0, serverContext);
+  server.listen((SecureSocket request) async {
+    await request.drain();
+    request..add(DATA)..close();
+  });
 
-      // Close our end, since we're not sending data.
-      socket.shutdown(SocketDirection.SEND);
+  var socket = await RawSecureSocket.connect("localhost",
+                                             server.port,
+                                             context: clientContext);
+  List<int> body = <int>[];
+  // Close our end, since we're not sending data.
+  socket.shutdown(SocketDirection.SEND);
 
-      socket.listen((RawSocketEvent event) {
-            switch (event) {
-              case RawSocketEvent.READ:
-                // NOTE: We have a very low prime number here. The internal
-                // ring buffers will not have a size of 3. This means that
-                // we'll reach the point where we would like to read 1/2 bytes
-                // at the end and then wrap around and read the next 2/1 bytes.
-                // [This will ensure we trigger the bug.]
-                body.addAll(socket.read(3));
-                break;
-              case RawSocketEvent.WRITE:
-                break;
-              case RawSocketEvent.READ_CLOSED:
-                break;
-              default: throw "Unexpected event $event";
-            }
-          },
-          onError: (e, _) {
-            Expect.fail('Unexpected error: $e');
-          },
-          onDone: () {
-            Expect.equals(body.length, DATA.length);
-            for (int i = 0; i < body.length; i++) {
-              Expect.equals(body[i], DATA[i]);
-            }
-            server.close();
-            asyncEnd();
-          });
-    });
+  socket.listen((RawSocketEvent event) {
+    switch (event) {
+      case RawSocketEvent.READ:
+        // NOTE: We have a very low prime number here. The internal
+        // ring buffers will not have a size of 3. This means that
+        // we'll reach the point where we would like to read 1/2 bytes
+        // at the end and then wrap around and read the next 2/1 bytes.
+        // [This will ensure we trigger the bug.]
+        body.addAll(socket.read(3));
+        break;
+      case RawSocketEvent.WRITE:
+        break;
+      case RawSocketEvent.READ_CLOSED:
+        break;
+      default: throw "Unexpected event $event";
+    }
+  }, onError: (e, _) {
+    Expect.fail('Unexpected error: $e');
+  }, onDone: () {
+    Expect.equals(body.length, DATA.length);
+    for (int i = 0; i < body.length; i++) {
+      Expect.equals(body[i], DATA[i]);
+    }
+    server.close();
+    asyncEnd();
   });
 }
diff --git a/tests/standalone/io/secure_bad_certificate_client.dart b/tests/standalone/io/secure_bad_certificate_client.dart
deleted file mode 100644
index c3922ae..0000000
--- a/tests/standalone/io/secure_bad_certificate_client.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Client for secure_bad_certificate_test, that runs in a subprocess.
-// The test verifies that the client bad certificate callback works.
-
-import "dart:async";
-import "dart:io";
-
-class ExpectException implements Exception {
-  ExpectException(this.message);
-  String toString() => "ExpectException: $message";
-  String message;
-}
-
-void expect(condition) {
-  if (!condition) {
-    throw new ExpectException('');
-  }
-}
-
-const HOST_NAME = "localhost";
-
-void runClient(int port, result) {
-  bool badCertificateCallback(X509Certificate certificate) {
-    expect('CN=localhost' == certificate.subject);
-    expect('CN=myauthority' == certificate.issuer);
-    expect(result != 'exception');  // Throw exception if one is requested.
-    if (result == 'true') result = true;
-    if (result == 'false') result = false;
-    return result;
-  }
-
-  SecureSocket.connect(HOST_NAME,
-                       port,
-                       onBadCertificate: badCertificateCallback)
-      .then((SecureSocket socket) {
-        expect(result);
-        socket.close();
-      },
-      onError: (error) {
-        expect(result != true);
-        if (result == false) {
-          expect(error is HandshakeException);
-        } else if (result == 'exception') {
-          expect(error is ExpectException);
-        } else {
-          expect(error is ArgumentError);
-        }
-      });
-}
-
-
-void main(List<String> args) {
-  SecureSocket.initialize();
-  runClient(int.parse(args[0]), args[1]);
-}
diff --git a/tests/standalone/io/secure_bad_certificate_test.dart b/tests/standalone/io/secure_bad_certificate_test.dart
index 3388a8d..6a7e93a 100644
--- a/tests/standalone/io/secure_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_bad_certificate_test.dart
@@ -4,59 +4,81 @@
 
 // This test verifies that the bad certificate callback works.
 
-import "package:expect/expect.dart";
-import "package:path/path.dart";
 import "dart:async";
 import "dart:io";
 
-const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+import "package:expect/expect.dart";
 
+final HOST_NAME = 'localhost';
 
-String certificateDatabase() => Platform.script.resolve('pkcert').toFilePath();
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
-Future<SecureServerSocket> runServer() {
-  SecureSocket.initialize(database: certificateDatabase(),
-                          password: 'dartdart');
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+      password: 'dartdart');
 
-  return SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE)
-      .then((SecureServerSocket server) {
-    server.listen((SecureSocket socket) {
-      socket.listen((_) { },
-                    onDone: () {
-                      socket.close();
-                    });
-    }, onError: (e) => Expect.isTrue(e is HandshakeException));
-    return server;
-  });
+class CustomException {}
+
+main() async {
+  var HOST = (await InternetAddress.lookup(HOST_NAME)).first;
+  var server = await SecureServerSocket.bind(HOST_NAME, 0, serverContext);
+  server.listen((SecureSocket socket) {
+      socket.listen((_) {}, onDone: () {
+        socket.close();
+      });
+    }, onError: (e) { if (e is! HandshakeException) throw e; });
+
+  SecurityContext goodContext = new SecurityContext()
+    ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+  SecurityContext badContext = new SecurityContext();
+  SecurityContext defaultContext = SecurityContext.defaultContext;
+
+  await runClient(server.port, goodContext, true, 'pass');
+  await runClient(server.port, goodContext, false, 'pass');
+  await runClient(server.port, goodContext, 'fisk', 'pass');
+  await runClient(server.port, goodContext, 'exception', 'pass');
+  await runClient(server.port, badContext, true, 'pass');
+  await runClient(server.port, badContext, false, 'fail');
+  await runClient(server.port, badContext, 'fisk', 'fail');
+  await runClient(server.port, badContext, 'exception', 'throw');
+  await runClient(server.port, defaultContext, true, 'pass');
+  await runClient(server.port, defaultContext, false, 'fail');
+  await runClient(server.port, defaultContext, 'fisk', 'fail');
+  await runClient(server.port, defaultContext, 'exception', 'throw');
+  server.close();
 }
 
 
-void main() {
-  var clientScript = Platform.script
-                             .resolve('secure_bad_certificate_client.dart')
-                             .toFilePath();
-
-  Future clientProcess(int port, String acceptCertificate) {
-    return Process.run(Platform.executable,
-        [clientScript, port.toString(), acceptCertificate])
-        .then((ProcessResult result) {
-      if (result.exitCode != 0) {
-        print("Client failed, stdout:");
-        print(result.stdout);
-        print("  stderr:");
-        print(result.stderr);
-        Expect.fail('Client subprocess exit code: ${result.exitCode}');
-      }
-    });
+Future runClient(int port,
+                 SecurityContext context,
+                 callbackReturns,
+                 result) async {
+  badCertificateCallback(X509Certificate certificate) {
+    Expect.equals('/CN=rootauthority', certificate.subject);
+    Expect.equals('/CN=rootauthority', certificate.issuer);
+    // Throw exception if one is requested.
+    if (callbackReturns == 'exception') throw new CustomException();
+    return callbackReturns;
   }
 
-  runServer().then((server) {
-    Future.wait([clientProcess(server.port, 'true'),
-                 clientProcess(server.port, 'false'),
-                 clientProcess(server.port, 'fisk'),
-                 clientProcess(server.port, 'exception')]).then((_) {
-      server.close();
-    });
-  });
-}
+  try {
+    var socket = await SecureSocket.connect(
+        HOST_NAME,
+        port,
+        context: context,
+        onBadCertificate: badCertificateCallback);
+    Expect.equals('pass', result);  // Is rethrown below
+    await socket.close();
+  } catch (error)  {
+    if (error is ExpectException) rethrow;
+    Expect.notEquals(result, 'pass');
+    if (result == 'fail') {
+      Expect.isTrue(error is HandshakeException || error is ArgumentError);
+    } else if (result == 'throw') {
+      Expect.isTrue(error is CustomException);
+    } else {
+      Expect.fail('Unknown expectation $result');
+    }
+  }
+}
\ No newline at end of file
diff --git a/tests/standalone/io/secure_builtin_roots_test.dart b/tests/standalone/io/secure_builtin_roots_test.dart
index 875ea09..6cb85d6 100644
--- a/tests/standalone/io/secure_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_builtin_roots_test.dart
@@ -7,86 +7,33 @@
 
 import "package:async_helper/async_helper.dart";
 import "package:expect/expect.dart";
-import "package:path/path.dart";
 
-void main(List<String> args) {
-  if (!args.contains('--child')) {
-    runAllTestsInChildProcesses();
-  } else {
-    InitializeSSL(useDatabase: args.contains('--database'),
-                  useBuiltinRoots: args.contains('--builtin-roots'));
-    testGoogleUrl(args.contains('--builtin-roots'));
-  }
-}
-
-void InitializeSSL({bool useDatabase, bool useBuiltinRoots}) {
-  // If the built-in root certificates aren't loaded, the connection
-  // should signal an error.  Even when an external database is loaded,
-  // they should not be loaded.
-  if (useDatabase) {
-    var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-    SecureSocket.initialize(database: certificateDatabase,
-                            password: 'dartdart',
-                            useBuiltinRoots: useBuiltinRoots);
-  } else {
-    SecureSocket.initialize(useBuiltinRoots: useBuiltinRoots);
-  }
-}
-
-void testGoogleUrl(bool expectSuccess) {
+Future testGoogleUrl(SecurityContext context, String outcome) async {
+  var client = new HttpClient(context: context);
   // We need to use an external server that is backed by a
   // built-in root certificate authority.
-
-  // First, check if the lookup fails.  If not then run the test.
-  InternetAddress.lookup('www.google.com').then((_) {
-    HttpClient client = new HttpClient();
-    client.getUrl(Uri.parse('https://www.google.com'))
-      .then((request) {
-        request.followRedirects = false;
-        return request.close();
-      })
-      .then((response) {
-        Expect.isTrue(expectSuccess, "Unexpected successful connection");
-        print('SUCCESS');
-        return response.drain().catchError((_) {});
-      })
-      .catchError((error) {
-        // Allow SocketExceptions if www.google.com is unreachable or down.
-        Expect.isTrue((!expectSuccess && error is HandshakeException) ||
-                      error is SocketException);
-        print('SUCCESS');
-      })
-      .whenComplete(client.close);
-  },
-  onError: (e) {
-    // Lookup failed.
-    Expect.isTrue(e is SocketException);
-    print('SUCCESS');
-  });
+  try {
+  // First, check if the lookup works.
+    await InternetAddress.lookup('www.google.com');
+    var request = await client.getUrl(Uri.parse('https://www.google.com'));
+    request.followRedirects = false;
+    var response = await request.close();
+    Expect.equals('pass', outcome, 'Unexpected successful connection');
+    try { await response.drain(); } catch (e) { }
+  } on HandshakeException {
+    Expect.equals('fail', outcome, 'Unexpected failed connection');
+  } on SocketException {
+    // Lookup failed or connection failed.  Don't report a failure.
+  } finally {
+    client.close();
+  }
 }
 
-void runAllTestsInChildProcesses() {
-  Future runChild(List<String> scriptArguments) {
-    return Process.run(Platform.executable,
-                       []..addAll(Platform.executableArguments)
-                         ..add(Platform.script.toFilePath())
-                         ..addAll(scriptArguments))
-    .then((ProcessResult result) {
-      if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
-        print("Client failed");
-        print("  stdout:");
-        print(result.stdout);
-        print("  stderr:");
-        print(result.stderr);
-        Expect.fail('Client subprocess exit code: ${result.exitCode}');
-      }
-    });
-  }
 
+main() async {
   asyncStart();
-  Future.wait([runChild(['--child']),
-               runChild(['--child', '--database']),
-               runChild(['--child', '--builtin-roots']),
-               runChild(['--child', '--builtin-roots', '--database'])])
-      .then((_) => asyncEnd());
-  }
+  await testGoogleUrl(null, "pass");
+  await testGoogleUrl(SecurityContext.defaultContext, "pass");
+  await testGoogleUrl(new SecurityContext(), "fail");
+  asyncEnd();
+}
diff --git a/tests/standalone/io/secure_client_raw_server_test.dart b/tests/standalone/io/secure_client_raw_server_test.dart
index e380f75..318edeb 100644
--- a/tests/standalone/io/secure_client_raw_server_test.dart
+++ b/tests/standalone/io/secure_client_raw_server_test.dart
@@ -13,12 +13,21 @@
 import "package:async_helper/async_helper.dart";
 import "package:expect/expect.dart";
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
 Future<RawSecureServerSocket> startEchoServer() {
   return RawSecureServerSocket.bind(HOST,
                                     0,
-                                    CERTIFICATE).then((server) {
+                                    serverContext).then((server) {
     server.listen((RawSecureSocket client) {
       List<List<int>> readChunks = <List<int>>[];
       List<int> dataToWrite = null;
@@ -60,7 +69,8 @@
 Future testClient(server) {
   Completer success = new Completer();
   List<String> chunks = <String>[];
-  SecureSocket.connect(HOST, server.port).then((socket) {
+  SecureSocket.connect(HOST, server.port, context: clientContext)
+  .then((socket) {
     socket.write("Hello server.");
     socket.close();
     socket.listen(
@@ -79,9 +89,6 @@
 
 void main() {
   asyncStart();
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart');
   InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first)
       .then((_) => startEchoServer())
       .then(testClient)
diff --git a/tests/standalone/io/secure_client_server_test.dart b/tests/standalone/io/secure_client_server_test.dart
index 3c41266..b4f3db14 100644
--- a/tests/standalone/io/secure_client_server_test.dart
+++ b/tests/standalone/io/secure_client_server_test.dart
@@ -14,11 +14,22 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
+
 Future<SecureServerSocket> startEchoServer() {
   return SecureServerSocket.bind(HOST,
                                  0,
-                                 CERTIFICATE).then((server) {
+                                 serverContext).then((server) {
     server.listen((SecureSocket client) {
       client.fold(<int>[], (message, data) => message..addAll(data))
           .then((message) {
@@ -31,7 +42,8 @@
 }
 
 Future testClient(server) {
-  return SecureSocket.connect(HOST, server.port).then((socket) {
+  return SecureSocket.connect(HOST, server.port, context: clientContext)
+  .then((socket) {
     socket.write("Hello server.");
     socket.close();
     return socket.fold(<int>[], (message, data) => message..addAll(data))
@@ -44,9 +56,6 @@
 
 void main() {
   asyncStart();
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart');
   InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first )
       .then((_) => startEchoServer())
       .then(testClient)
diff --git a/tests/standalone/io/secure_multiple_client_server_test.dart b/tests/standalone/io/secure_multiple_client_server_test.dart
index 2eeeed2..586105d 100644
--- a/tests/standalone/io/secure_multiple_client_server_test.dart
+++ b/tests/standalone/io/secure_multiple_client_server_test.dart
@@ -15,10 +15,19 @@
 
 InternetAddress HOST;
 SecureServerSocket SERVER;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 Future startServer() {
-  return SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  return SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     SERVER = server;
     SERVER.listen((SecureSocket client) {
       client.fold(<int>[], (message, data) => message..addAll(data))
@@ -34,7 +43,8 @@
 }
 
 Future testClient(name) {
-  return SecureSocket.connect(HOST, SERVER.port).then((socket) {
+  return SecureSocket.connect(HOST, SERVER.port, context: clientContext)
+  .then((socket) {
     socket.add("Hello from client $name".codeUnits);
     socket.close();
     return socket.fold(<int>[], (message, data) => message..addAll(data))
@@ -46,9 +56,6 @@
 
 void main() {
   asyncStart();
-  var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart');
   InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first)
       .then((_) => startServer())
       .then((_) => ['ale', 'bar', 'che', 'den', 'els'].map(testClient))
diff --git a/tests/standalone/io/secure_server_client_certificate_test.dart b/tests/standalone/io/secure_server_client_certificate_test.dart
index 34de17d..3f34d93 100644
--- a/tests/standalone/io/secure_server_client_certificate_test.dart
+++ b/tests/standalone/io/secure_server_client_certificate_test.dart
@@ -9,16 +9,26 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 Future testClientCertificate() {
   var completer = new Completer();
   SecureServerSocket.bind(HOST,
                           0,
-                          CERTIFICATE,
+                          serverContext,
                           requestClientCertificate: true).then((server) {
     var clientEndFuture = SecureSocket.connect(HOST,
                                                server.port,
+                                               context: clientContext,
                                                sendClientCertificate: true);
     server.listen((serverEnd) {
       X509Certificate certificate = serverEnd.peerCertificate;
@@ -44,10 +54,11 @@
   var completer = new Completer();
   SecureServerSocket.bind(HOST,
                           0,
-                          CERTIFICATE,
+                          serverContext,
                           requireClientCertificate: true).then((server) {
     var clientEndFuture = SecureSocket.connect(HOST,
                                                server.port,
+                                               context: clientContext,
                                                sendClientCertificate: true);
     server.listen((serverEnd) {
       X509Certificate certificate = serverEnd.peerCertificate;
@@ -70,11 +81,6 @@
 }
 
 void main() {
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
-
   asyncStart();
   InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first)
     .then((_) => testClientCertificate())
diff --git a/tests/standalone/io/secure_server_client_no_certificate_test.dart b/tests/standalone/io/secure_server_client_no_certificate_test.dart
index 888f988..97a422b 100644
--- a/tests/standalone/io/secure_server_client_no_certificate_test.dart
+++ b/tests/standalone/io/secure_server_client_no_certificate_test.dart
@@ -9,16 +9,25 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 Future testNoClientCertificate() {
   var completer = new Completer();
   SecureServerSocket.bind(HOST,
                           0,
-                          CERTIFICATE,
+                          serverContext,
                           requestClientCertificate: true).then((server) {
     var clientEndFuture = SecureSocket.connect(HOST,
-                                               server.port);
+                                               server.port,
+                                               context: clientContext);
     server.listen((serverEnd) {
       X509Certificate certificate = serverEnd.peerCertificate;
       Expect.isNull(certificate);
@@ -38,10 +47,11 @@
   bool clientError = false;
   SecureServerSocket.bind(HOST,
                           0,
-                          CERTIFICATE,
+                          serverContext,
                           requireClientCertificate: true).then((server) {
-    Future clientDone = SecureSocket.connect(HOST, server.port)
-      .catchError((e) { clientError = true; });
+    Future clientDone =
+        SecureSocket.connect(HOST, server.port, context: clientContext)
+        .catchError((e) { clientError = true; });
     server.listen((serverEnd) {
       Expect.fail("Got a unverifiable connection");
     },
@@ -57,11 +67,6 @@
 }
 
 void main() {
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
-
   asyncStart();
   InternetAddress.lookup("localhost").then((hosts) => HOST = hosts.first)
     .then((_) => testNoRequiredClientCertificate())
diff --git a/tests/standalone/io/secure_server_closing_test.dart b/tests/standalone/io/secure_server_closing_test.dart
index a45877b..0677a41 100644
--- a/tests/standalone/io/secure_server_closing_test.dart
+++ b/tests/standalone/io/secure_server_closing_test.dart
@@ -14,7 +14,16 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 void testCloseOneEnd(String toClose) {
   asyncStart();
@@ -25,7 +34,7 @@
       .then((_) {
         asyncEnd();
       });
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     server.listen((serverConnection) {
       serverConnection.listen(
         (data) {
@@ -43,7 +52,8 @@
     onDone: () {
       serverDone.complete(null);
     });
-    SecureSocket.connect(HOST, server.port).then((clientConnection) {
+    SecureSocket.connect(HOST, server.port, context: clientContext)
+                .then((clientConnection) {
       clientConnection.listen(
         (data) {
           Expect.fail("No data should be received by client");
@@ -61,8 +71,9 @@
 
 void testCloseBothEnds() {
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
-    var clientEndFuture = SecureSocket.connect(HOST, server.port);
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
+    var clientEndFuture =
+        SecureSocket.connect(HOST, server.port, context: clientContext);
     server.listen((serverEnd) {
       clientEndFuture.then((clientEnd) {
         clientEnd.destroy();
@@ -83,7 +94,7 @@
 
   SecureServerSocket.bind(HOST,
                           0,
-                          CERTIFICATE,
+                          serverContext,
                           backlog: 2 * socketCount).then((server) {
     Expect.isTrue(server.port > 0);
     var subscription;
@@ -97,12 +108,12 @@
     });
 
     // Pause the server socket subscription and resume it after having
-    // connected a number client sockets. Then connect more client
-    // sockets.
+    // connected a number client sockets. Then connect more client sockets.
     subscription.pause();
     var connectCount = 0;
     for (int i = 0; i < socketCount; i++) {
-      SecureSocket.connect(HOST, server.port).then((connection) {
+      SecureSocket.connect(HOST, server.port, context: clientContext)
+      .then((connection) {
         connection.close();
       });
     }
@@ -110,7 +121,8 @@
       subscription.resume();
       resumed = true;
       for (int i = 0; i < socketCount; i++) {
-        SecureSocket.connect(HOST, server.port).then((connection) {
+        SecureSocket.connect(HOST, server.port, context: clientContext)
+        .then((connection) {
           connection.close();
         });
       }
@@ -125,7 +137,7 @@
   asyncStart();
   List ends = [];
 
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     Expect.isTrue(server.port > 0);
     void checkDone() {
       if (ends.length < 2 * socketCount) return;
@@ -142,7 +154,8 @@
     });
 
     for (int i = 0; i < socketCount; i++) {
-      SecureSocket.connect(HOST, server.port).then((connection) {
+      SecureSocket.connect(HOST, server.port, context: clientContext)
+      .then((connection) {
         ends.add(connection);
         checkDone();
       });
@@ -153,10 +166,6 @@
 
 main() {
   asyncStart();
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     runTests();
diff --git a/tests/standalone/io/secure_server_socket_test.dart b/tests/standalone/io/secure_server_socket_test.dart
index a6a1087..6ef7f27 100644
--- a/tests/standalone/io/secure_server_socket_test.dart
+++ b/tests/standalone/io/secure_server_socket_test.dart
@@ -14,11 +14,20 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 void testSimpleBind() {
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((s) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((s) {
     Expect.isTrue(s.port > 0);
     s.close();
     asyncEnd();
@@ -30,7 +39,7 @@
 
   // Bind to a unknown DNS name.
   asyncStart();
-  SecureServerSocket.bind("ko.faar.__hest__", 0, CERTIFICATE).then((_) {
+  SecureServerSocket.bind("ko.faar.__hest__", 0, serverContext).then((_) {
     Expect.fail("Failure expected");
   }).catchError((error) {
     Expect.isTrue(error is SocketException);
@@ -39,7 +48,7 @@
 
   // Bind to an unavaliable IP-address.
   asyncStart();
-  SecureServerSocket.bind("8.8.8.8", 0, CERTIFICATE).then((_) {
+  SecureServerSocket.bind("8.8.8.8", 0, serverContext).then((_) {
     Expect.fail("Failure expected");
   }).catchError((error) {
     Expect.isTrue(error is SocketException);
@@ -48,10 +57,10 @@
 
   // Bind to a port already in use.
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((s) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((s) {
     SecureServerSocket.bind(HOST,
                             s.port,
-                            CERTIFICATE).then((t) {
+                            serverContext).then((t) {
       Expect.fail("Multiple listens on same port");
     }).catchError((error) {
       Expect.isTrue(error is SocketException);
@@ -61,12 +70,18 @@
   });
 }
 
-void testSimpleConnect(String certificate) {
+void testSimpleConnect() {
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, certificate).then((server) {
-    var clientEndFuture = SecureSocket.connect(HOST, server.port);
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
+    var clientEndFuture =
+        SecureSocket.connect(HOST, server.port, context: clientContext);
     server.listen((serverEnd) {
       clientEndFuture.then((clientEnd) {
+        var x5 = clientEnd.peerCertificate;
+        print(x5.subject);
+        print(x5.issuer);
+        print(x5.startValidity);
+        print(x5.endValidity);
         clientEnd.close();
         serverEnd.close();
         server.close();
@@ -76,22 +91,32 @@
   });
 }
 
-void testSimpleConnectFail(String certificate, bool cancelOnError) {
+void testSimpleConnectFail(SecurityContext serverContext,
+                           SecurityContext clientContext,
+                           bool cancelOnError) {
+  print('$serverContext $clientContext $cancelOnError');
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, certificate).then((server) {
-    var clientEndFuture = SecureSocket.connect(HOST, server.port)
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
+    var clientEndFuture =
+        SecureSocket.connect(HOST, server.port, context: clientContext)
       .then((clientEnd) {
         Expect.fail("No client connection expected.");
       })
       .catchError((error) {
-        Expect.isTrue(error is HandshakeException ||
+        // TODO(whesse): When null context is supported, disallow
+        // the ArgumentError type here.
+        Expect.isTrue(error is ArgumentError ||
+                      error is HandshakeException ||
                       error is SocketException);
       });
     server.listen((serverEnd) {
       Expect.fail("No server connection expected.");
     },
     onError: (error) {
-      Expect.isTrue(error is CertificateException);
+      // TODO(whesse): When null context is supported, disallow
+      // the ArgumentError type here.
+      Expect.isTrue(error is ArgumentError ||
+                    error is HandshakeException);
       clientEndFuture.then((_) {
         if (!cancelOnError) server.close();
         asyncEnd();
@@ -103,9 +128,10 @@
 
 void testServerListenAfterConnect() {
   asyncStart();
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     Expect.isTrue(server.port > 0);
-    var clientEndFuture = SecureSocket.connect(HOST, server.port);
+    var clientEndFuture =
+        SecureSocket.connect(HOST, server.port, context: clientContext);
     new Timer(const Duration(milliseconds: 500), () {
       server.listen((serverEnd) {
         clientEndFuture.then((clientEnd) {
@@ -144,7 +170,7 @@
     }
   }
 
-  SecureServerSocket.bind(HOST, 0, CERTIFICATE).then((server) {
+  SecureServerSocket.bind(HOST, 0, serverContext).then((server) {
     server.listen((client) {
       int bytesRead = 0;
       int bytesWritten = 0;
@@ -166,7 +192,8 @@
         });
     });
 
-    SecureSocket.connect(HOST, server.port).then((socket) {
+    SecureSocket.connect(HOST, server.port, context: clientContext)
+    .then((socket) {
       int bytesRead = 0;
       int bytesWritten = 0;
       List<int> dataSent = createTestData();
@@ -189,10 +216,6 @@
 
 main() {
   asyncStart();
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     runTests();
@@ -203,12 +226,16 @@
 runTests() {
   testSimpleBind();
   testInvalidBind();
-  testSimpleConnect(CERTIFICATE);
-  testSimpleConnect("CN=localhost");
-  testSimpleConnectFail("not_a_nickname", false);
-  testSimpleConnectFail("CN=notARealDistinguishedName", false);
-  testSimpleConnectFail("not_a_nickname", true);
-  testSimpleConnectFail("CN=notARealDistinguishedName", true);
+  testSimpleConnect();
+  for (var server in [serverContext, null]) {
+    for (var client in [clientContext, null]) {
+      for (bool cancelOnError in [true, false]) {
+        if (server == null || client == null) {
+          testSimpleConnectFail(server, client, cancelOnError);
+        }
+      }
+    }
+  }
   testServerListenAfterConnect();
   testSimpleReadWrite();
 }
diff --git a/tests/standalone/io/secure_session_resume_test.dart b/tests/standalone/io/secure_session_resume_test.dart
index 5b8a3a3..8ec99a4 100644
--- a/tests/standalone/io/secure_session_resume_test.dart
+++ b/tests/standalone/io/secure_session_resume_test.dart
@@ -24,11 +24,21 @@
 import "package:async_helper/async_helper.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 Future<SecureServerSocket> startServer() {
   return SecureServerSocket.bind(HOST,
                                  0,
-                                 CERTIFICATE).then((server) {
+                                 serverContext).then((server) {
     server.listen((SecureSocket client) {
       client.fold(<int>[], (message, data) => message..addAll(data))
           .then((message) {
@@ -44,7 +54,8 @@
 }
 
 Future testClient(server, name) {
-  return SecureSocket.connect(HOST, server.port).then((socket) {
+  return SecureSocket.connect(HOST, server.port, context: clientContext)
+  .then((socket) {
     socket.write("Hello from client $name");
     socket.close();
     return socket.fold(<int>[], (message, data) => message..addAll(data))
@@ -57,9 +68,6 @@
 
 void main() {
   asyncStart();
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart');
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     runTests().then((_) => asyncEnd());
diff --git a/tests/standalone/io/secure_socket_alpn_test.dart b/tests/standalone/io/secure_socket_alpn_test.dart
index 963fb74..3ad9112 100644
--- a/tests/standalone/io/secure_socket_alpn_test.dart
+++ b/tests/standalone/io/secure_socket_alpn_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -8,26 +8,31 @@
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 
-const String MAX_LEN_ERROR =
+const String NAME_LENGTH_ERROR =
     'Length of protocol must be between 1 and 255';
 
-const String MAX_MSG_LEN_ERROR =
-    'The maximum message length supported is 2^15-1';
+const String MESSAGE_LENGTH_ERROR =
+    'The maximum message length supported is 2^13-1';
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
-// Tests that client/server with same protocol can securly establish a
-// connection, negogiate the protocol and can send data to each other.
-void testSuccessfulAlpnNegogiationConnection(List<String> clientProtocols,
+SecurityContext clientContext() => new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
+SecurityContext serverContext() => new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                    password: 'dartdart');
+
+// Tests that client/server with same protocol can securely establish a
+// connection, negotiate the protocol and can send data to each other.
+void testSuccessfulAlpnNegotiationConnection(List<String> clientProtocols,
                                              List<String> serverProtocols,
                                              String selectedProtocol) {
   asyncStart();
-  SecureServerSocket.bind('localhost', 0, 'localhost_cert',
-     supportedProtocols: serverProtocols).then((SecureServerSocket server) {
+  var sContext = serverContext()..setAlpnProtocols(serverProtocols, true);
+  SecureServerSocket.bind('localhost', 0, sContext)
+     .then((SecureServerSocket server) {
 
     asyncStart();
     server.first.then((SecureSocket socket) {
@@ -40,7 +45,7 @@
     });
 
     asyncStart();
-    SecureSocket.connect('localhost', server.port,
+    SecureSocket.connect('localhost', server.port, context: clientContext(),
         supportedProtocols: clientProtocols).then((socket) {
       Expect.equals(selectedProtocol, socket.selectedProtocol);
       socket..write('client message')..close();
@@ -55,160 +60,145 @@
   });
 }
 
-void testFailedAlpnNegogiationConnection(List<String> clientProtocols,
-                                         List<String> serverProtocols) {
-  asyncStart();
-  SecureServerSocket.bind('localhost', 0, 'localhost_cert',
-     supportedProtocols: serverProtocols).then((SecureServerSocket server) {
+void testInvalidArgument(List<String> protocols, String errorIncludes) {
+  testInvalidArgumentServerContext(protocols, errorIncludes);
+  testInvalidArgumentClientContext(protocols, errorIncludes);
+  testInvalidArgumentClientConnect(protocols, errorIncludes);
+}
 
-    asyncStart();
-    server.first.catchError((error, stack) {
-      Expect.isTrue(error is HandshakeException);
-      asyncEnd();
-    });
-
-    asyncStart();
-    SecureSocket.connect('localhost',
-                         server.port,
-                         supportedProtocols: clientProtocols)
-        .catchError((error, stack) {
-      Expect.isTrue(error is HandshakeException);
-      asyncEnd();
-    });
-
-    asyncEnd();
+void testInvalidArgumentServerContext(List<String> protocols,
+                                      String errorIncludes) { 
+  Expect.throws(() => serverContext().setAlpnProtocols(protocols, true), (e) {
+    Expect.isTrue(e is ArgumentError);
+    Expect.isTrue(e.toString().contains(errorIncludes));
+    return true;
   });
 }
 
-void testInvalidArgumentsLongName(List<String> protocols,
-                                  bool isLenError,
-                                  bool isMsgLenError) {
+void testInvalidArgumentClientContext(List<String> protocols,
+                                      String errorIncludes) { 
+  Expect.throws(() => clientContext().setAlpnProtocols(protocols, false), (e) {
+    Expect.isTrue(e is ArgumentError);
+    Expect.isTrue(e.toString().contains(errorIncludes));
+    return true;
+  });
+}
+
+void testInvalidArgumentClientConnect(List<String> protocols,
+                                      String errorIncludes) {
   asyncStart();
-  SecureServerSocket.bind('localhost', 0, 'localhost_cert',
-     supportedProtocols: protocols).then((SecureServerSocket server) {
+  var sContext = serverContext()..setAlpnProtocols(['abc'], true);
+  SecureServerSocket.bind('localhost', 0, sContext).then((server) async {
+    asyncStart();
+    server.listen((SecureSocket socket) {
+      Expect.fail(
+          "Unexpected connection made to server, with bad client argument");
+    }, onError: (e) {
+      Expect.fail("Unexpected error on server stream: $e");
+    }, onDone: () { asyncEnd();});
 
     asyncStart();
-    server.first.catchError((error, stack) {
-      String errorString = '${(error as ArgumentError)}';
-      if (isLenError) {
-        Expect.isTrue(errorString.contains(MAX_LEN_ERROR));
-      } else if (isMsgLenError) {
-        Expect.isTrue(errorString.contains(MAX_MSG_LEN_ERROR));
-      } else {
-        throw 'unreachable';
-      }
+    SecureSocket.connect('localhost', server.port, context: clientContext(),
+          supportedProtocols: protocols).then((socket) {
+      Expect.fail(
+          "Unexpected connection made from client, with bad client argument");
+    }, onError: (e) {
+      Expect.isTrue(e is ArgumentError);
+      Expect.isTrue(e.toString().contains(errorIncludes));
+      server.close();
       asyncEnd();
     });
-
-    asyncStart();
-    SecureSocket.connect('localhost',
-                         server.port,
-                         supportedProtocols: protocols)
-        .catchError((error, stack) {
-      String errorString = '${(error as ArgumentError)}';
-      if (isLenError) {
-        Expect.isTrue(errorString.contains(MAX_LEN_ERROR));
-      } else if (isMsgLenError) {
-        Expect.isTrue(errorString.contains(MAX_MSG_LEN_ERROR));
-      } else {
-        throw 'unreachable';
-      }
-      asyncEnd();
-    });
-
     asyncEnd();
   });
 }
 
 main() {
-  InitializeSSL();
   final longname256 = 'p' * 256;
   final String longname255 = 'p' * 255;
   final String strangelongname255 = 'ø' + 'p' * 253;
   final String strangelongname256 = 'ø' + 'p' * 254;
 
-  // This produces a message of (1 << 15)-2 bytes (1 length and 1 ascii byte).
-  final List<String> allProtocols = new Iterable.generate(
-      (1 << 14) - 1, (i) => '0').toList();
+  // This produces a message of (1 << 13) - 2 bytes. 2^12 -1 strings are each
+  // encoded by 1 length byte and 1 ascii byte.
+  final List<String> manyProtocols = new Iterable.generate(
+      (1 << 12) - 1, (i) => '0').toList();
 
-  // This produces a message of (1 << 15) bytes (1 length and 1 ascii byte).
-  final List<String> allProtocolsPlusOne = new Iterable.generate(
-      (1 << 14), (i) => '0').toList();
+  // This produces a message of (1 << 13) bytes. 2^12 strings are each
+  // encoded by 1 length byte and 1 ascii byte.
+  final List<String> tooManyProtocols = new Iterable.generate(
+      (1 << 12), (i) => '0').toList();
 
-  // Protocols are in order of decreasing priority. First matching protocol
-  // will be taken.
-
-  // Test successfull negotiation, including priority.
-  testSuccessfulAlpnNegogiationConnection(['a'],
+  // Protocols are in order of decreasing priority. The server will select
+  // the first protocol from its list that has a match in the client list.
+  // Test successful negotiation, including priority.
+  testSuccessfulAlpnNegotiationConnection(['a'],
                                           ['a'],
                                           'a');
 
-  testSuccessfulAlpnNegogiationConnection([longname255],
+  testSuccessfulAlpnNegotiationConnection([longname255],
                                           [longname255],
                                           longname255);
 
-  testSuccessfulAlpnNegogiationConnection([strangelongname255],
+  testSuccessfulAlpnNegotiationConnection([strangelongname255],
                                           [strangelongname255],
                                           strangelongname255);
-
-  testSuccessfulAlpnNegogiationConnection(allProtocols,
-                                          allProtocols,
+  testSuccessfulAlpnNegotiationConnection(manyProtocols,
+                                          manyProtocols,
                                           '0');
-
-  testSuccessfulAlpnNegogiationConnection(['a', 'b', 'c'],
+  testSuccessfulAlpnNegotiationConnection(['a', 'b', 'c'],
                                           ['a', 'b', 'c'],
                                           'a');
 
-  testSuccessfulAlpnNegogiationConnection(['a', 'b', 'c'],
+  testSuccessfulAlpnNegotiationConnection(['a', 'b', 'c'],
                                           ['c'],
                                           'c');
 
   // Server precedence.
-  testSuccessfulAlpnNegogiationConnection(['a', 'b', 'c'],
+  testSuccessfulAlpnNegotiationConnection(['a', 'b', 'c'],
                                           ['c', 'b', 'a'],
-                                          'a');
+                                          'c');
 
-  testSuccessfulAlpnNegogiationConnection(['c'],
+  testSuccessfulAlpnNegotiationConnection(['c'],
                                           ['a', 'b', 'c'],
                                           'c');
 
-  testSuccessfulAlpnNegogiationConnection(['s1', 'b', 'e1'],
+  testSuccessfulAlpnNegotiationConnection(['s1', 'b', 'e1'],
                                           ['s2', 'b', 'e2'],
                                           'b');
-
   // Test no protocol negotiation support
-  testSuccessfulAlpnNegogiationConnection(null,
+  testSuccessfulAlpnNegotiationConnection(null,
                                           null,
                                           null);
 
-  testSuccessfulAlpnNegogiationConnection(['a', 'b', 'c'],
+  testSuccessfulAlpnNegotiationConnection(['a', 'b', 'c'],
                                           null,
                                           null);
 
-  testSuccessfulAlpnNegogiationConnection(null,
+  testSuccessfulAlpnNegotiationConnection(null,
                                           ['a', 'b', 'c'],
                                           null);
 
-  testSuccessfulAlpnNegogiationConnection([],
+  testSuccessfulAlpnNegotiationConnection([],
                                           [],
                                           null);
 
-  testSuccessfulAlpnNegogiationConnection(['a', 'b', 'c'],
+  testSuccessfulAlpnNegotiationConnection(['a', 'b', 'c'],
                                           [],
                                           null);
 
-  testSuccessfulAlpnNegogiationConnection([],
+  testSuccessfulAlpnNegotiationConnection([],
                                           ['a', 'b', 'c'],
                                           null);
 
-  // Test non-overlapping protocols.
-  testFailedAlpnNegogiationConnection(['a'], ['b']);
-
+  // Test non-overlapping protocols.  The ALPN RFC says the connection
+  // should be terminated, but OpenSSL continues as if no ALPN is present.
+  // Issue  https://github.com/dart-lang/sdk/issues/23580
+  // Chromium issue https://code.google.com/p/chromium/issues/detail?id=497770
+  testSuccessfulAlpnNegotiationConnection(['a'], ['b'], null);
 
   // Test too short / too long protocol names.
-  testInvalidArgumentsLongName([longname256], true, false);
-  testInvalidArgumentsLongName([strangelongname256], true, false);
-  testInvalidArgumentsLongName([''], true, false);
-  testInvalidArgumentsLongName(allProtocolsPlusOne, false, true);
-  testInvalidArgumentsLongName(allProtocolsPlusOne, false, true);
+  testInvalidArgument([longname256], NAME_LENGTH_ERROR);
+  testInvalidArgument([strangelongname256], NAME_LENGTH_ERROR);
+  testInvalidArgument([''], NAME_LENGTH_ERROR);
+  testInvalidArgument(tooManyProtocols, MESSAGE_LENGTH_ERROR);
 }
diff --git a/tests/standalone/io/secure_socket_argument_test.dart b/tests/standalone/io/secure_socket_argument_test.dart
index 6caf84e..1fb3456 100644
--- a/tests/standalone/io/secure_socket_argument_test.dart
+++ b/tests/standalone/io/secure_socket_argument_test.dart
@@ -5,23 +5,15 @@
 import "package:expect/expect.dart";
 import "dart:io";
 
-void testInitialzeArguments() {
-  Expect.throws(() => SecureSocket.initialize(database: "foo.txt"));
-  Expect.throws(() => SecureSocket.initialize(password: false));
-  Expect.throws(() => SecureSocket.initialize(useBuiltinRoots: 7));
-}
-
 void testServerSocketArguments() {
   Expect.throws(() =>
-      SecureServerSocket.bind(SERVER_ADDRESS, 65536, 5, CERTIFICATE));
+      SecureServerSocket.bind(SERVER_ADDRESS, 65536, null));
   Expect.throws(() =>
-      SecureServerSocket.bind(SERVER_ADDRESS, -1, CERTIFICATE));
+      SecureServerSocket.bind(SERVER_ADDRESS, -1, null));
   Expect.throws(() =>
-      SecureServerSocket.bind(SERVER_ADDRESS, 0, -1, CERTIFICATE));
+      SecureServerSocket.bind(SERVER_ADDRESS, 0, "not a context"));
 }
 
 void main() {
-  testInitialzeArguments();
-  SecureSocket.initialize();
   testServerSocketArguments();
 }
diff --git a/tests/standalone/io/secure_socket_bad_data_test.dart b/tests/standalone/io/secure_socket_bad_data_test.dart
index f0c3fa5..2826107 100644
--- a/tests/standalone/io/secure_socket_bad_data_test.dart
+++ b/tests/standalone/io/secure_socket_bad_data_test.dart
@@ -158,10 +158,6 @@
 
 
 main() {
-  String certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   asyncStart();
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
diff --git a/tests/standalone/io/secure_socket_renegotiate_client.dart b/tests/standalone/io/secure_socket_renegotiate_client.dart
index cc3905a..8c41458 100644
--- a/tests/standalone/io/secure_socket_renegotiate_client.dart
+++ b/tests/standalone/io/secure_socket_renegotiate_client.dart
@@ -12,8 +12,10 @@
 import "dart:io";
 
 const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 class ExpectException implements Exception {
   ExpectException(this.message);
@@ -37,7 +39,10 @@
 
 
 void runClient(int port) {
-  SecureSocket.connect(HOST_NAME, port, sendClientCertificate: true)
+  SecureSocket.connect(HOST_NAME,
+                       port,
+                       context: clientContext,
+                       sendClientCertificate: true)
     .then((SecureSocket socket) {
       X509Certificate certificate = socket.peerCertificate;
       expect(certificate != null);
@@ -74,6 +79,5 @@
 
 
 void main(List<String> args) {
-  SecureSocket.initialize(database: args[1], password: 'dartdart');
   runClient(int.parse(args[0]));
 }
diff --git a/tests/standalone/io/secure_socket_renegotiate_test.dart b/tests/standalone/io/secure_socket_renegotiate_test.dart
index 595dd0d..457cee6 100644
--- a/tests/standalone/io/secure_socket_renegotiate_test.dart
+++ b/tests/standalone/io/secure_socket_renegotiate_test.dart
@@ -14,17 +14,15 @@
 import "package:path/path.dart";
 
 const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
 
-
-String certificateDatabase() => Platform.script.resolve('pkcert').toFilePath();
-
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
 
 Future<SecureServerSocket> runServer() {
-  SecureSocket.initialize(database: certificateDatabase(),
-                          password: 'dartdart');
-
-  return SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE)
+  return SecureServerSocket.bind(HOST_NAME, 0, serverContext)
     .then((SecureServerSocket server) {
       server.listen((SecureSocket socket) {
         Expect.isNull(socket.peerCertificate);
@@ -71,8 +69,7 @@
       Expect.isTrue(clientScript.endsWith("_client.dart"));
       Process.run(Platform.executable,
                   [clientScript,
-                   server.port.toString(),
-                   certificateDatabase()])
+                   server.port.toString()])
         .then((ProcessResult result) {
           if (result.exitCode != 0) {
             print("Client failed, stdout:");
diff --git a/tests/standalone/io/secure_socket_test.dart b/tests/standalone/io/secure_socket_test.dart
index 143b73d..897bd84 100644
--- a/tests/standalone/io/secure_socket_test.dart
+++ b/tests/standalone/io/secure_socket_test.dart
@@ -12,12 +12,22 @@
 import "dart:async";
 import "dart:io";
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 Future<HttpServer> startServer() {
   return HttpServer.bindSecure(
       "localhost",
       0,
-      backlog: 5,
-      certificateName: 'localhost_cert').then((server) {
+      serverContext,
+      backlog: 5).then((server) {
     server.listen((HttpRequest request) {
       request.listen(
         (_) { },
@@ -33,17 +43,11 @@
   });
 }
 
-void InitializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: 'dartdart');
-}
-
 void main() {
-  InitializeSSL();
   List<int> body = <int>[];
   startServer().then((server) {
-    SecureSocket.connect("localhost", server.port).then((socket) {
+    SecureSocket.connect("localhost", server.port, context: clientContext)
+    .then((socket) {
       socket.write("GET / HTTP/1.0\r\nHost: localhost\r\n\r\n");
       socket.close();
       socket.listen(
diff --git a/tests/standalone/io/secure_unauthorized_client.dart b/tests/standalone/io/secure_unauthorized_client.dart
index 043577f..8677bec 100644
--- a/tests/standalone/io/secure_unauthorized_client.dart
+++ b/tests/standalone/io/secure_unauthorized_client.dart
@@ -8,6 +8,11 @@
 import "dart:async";
 import "dart:io";
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 class ExpectException implements Exception {
   ExpectException(this.message);
   String toString() => "ExpectException: $message";
@@ -26,7 +31,7 @@
   var testFutures = [];
   for (int i = 0; i < 20; ++i) {
     testFutures.add(
-        SecureSocket.connect(HOST_NAME, port)
+        SecureSocket.connect(HOST_NAME, port, context: clientContext)
           .then((SecureSocket socket) {
             expect(false);
           }, onError: (e) {
@@ -38,7 +43,6 @@
 
 
 void main(List<String> args) {
-  SecureSocket.initialize();
   runClients(int.parse(args[0]))
     .then((_) => print('SUCCESS'));
 }
diff --git a/tests/standalone/io/secure_unauthorized_test.dart b/tests/standalone/io/secure_unauthorized_test.dart
index 453b8b1..a600d74 100644
--- a/tests/standalone/io/secure_unauthorized_test.dart
+++ b/tests/standalone/io/secure_unauthorized_test.dart
@@ -11,14 +11,15 @@
 import "dart:io";
 
 const HOST_NAME = "localhost";
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/untrusted_server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/untrusted_server_key.pem'),
+                  password: 'dartdart');
 
 Future<SecureServerSocket> runServer() {
-  SecureSocket.initialize(
-      database: Platform.script.resolve('pkcert').toFilePath(),
-      password: 'dartdart');
-
-  return SecureServerSocket.bind(HOST_NAME, 0, CERTIFICATE)
+  return SecureServerSocket.bind(HOST_NAME, 0, serverContext)
       .then((SecureServerSocket server) {
     server.listen((SecureSocket socket) {
       socket.listen((_) { },
diff --git a/tests/standalone/io/socket_upgrade_to_secure_test.dart b/tests/standalone/io/socket_upgrade_to_secure_test.dart
index d973a78..5873d00 100644
--- a/tests/standalone/io/socket_upgrade_to_secure_test.dart
+++ b/tests/standalone/io/socket_upgrade_to_secure_test.dart
@@ -14,7 +14,15 @@
 import "package:expect/expect.dart";
 
 InternetAddress HOST;
-const CERTIFICATE = "localhost_cert";
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
 
 // This test creates a server and a client connects. After connecting
 // and an optional initial handshake the connection is secured by
@@ -156,9 +164,11 @@
       return Socket.connect(HOST, port).then((socket) {
         var future;
         if (hostnameInConnect) {
-          future = SecureSocket.secure(socket);
+          future = SecureSocket.secure(socket, context: clientContext);
         } else {
-          future = SecureSocket.secure(socket, host: HOST);
+          future = SecureSocket.secure(socket,
+                                       host: HOST,
+                                       context: clientContext);
         }
         return future.then((secureSocket) {
           socket.add([0]);
@@ -170,9 +180,11 @@
         return runClientHandshake(socket).then((_) {
             var future;
             if (hostnameInConnect) {
-              future = SecureSocket.secure(socket);
+              future = SecureSocket.secure(socket, context: clientContext);
             } else {
-              future = SecureSocket.secure(socket, host: HOST.host);
+              future = SecureSocket.secure(socket,
+                                           host: HOST,
+                                           context: clientContext);
             }
             return future.then((secureSocket) {
               socket.add([0]);
@@ -186,7 +198,7 @@
   serverReady(server) {
     server.listen((client) {
       if (!handshakeBeforeSecure) {
-        SecureSocket.secureServer(client, CERTIFICATE).then((secureClient) {
+        SecureSocket.secureServer(client, serverContext).then((secureClient) {
           client.add([0]);
           runServer(secureClient).then((_) => server.close());
         });
@@ -194,7 +206,7 @@
         runServerHandshake(client).then((carryOverData) {
           SecureSocket.secureServer(
               client,
-              CERTIFICATE,
+              serverContext,
               bufferedData: carryOverData).then((secureClient) {
             client.add([0]);
             runServer(secureClient).then((_) => server.close());
@@ -213,18 +225,15 @@
 
 main() {
   asyncStart();
-  var certificateDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: certificateDatabase,
-                          password: 'dartdart',
-                          useBuiltinRoots: false);
   InternetAddress.lookup("localhost").then((hosts) {
     HOST = hosts.first;
     test(false, false);
-    test(true, false);
-    test(false, true);
-    test(true, true);
-    test(false, true, true);
-    test(true, true, true);
+    // TODO(whesse): Enable the test with all argument combinations:
+    //  test(true, false);
+    //  test(false, true);
+    //  test(true, true);
+    //  test(false, true, true);
+    //  test(true, true, true);
     asyncEnd();
   });
 }
diff --git a/tests/standalone/io/web_socket_error_test.dart b/tests/standalone/io/web_socket_error_test.dart
index 7081dca7..cc16bde 100644
--- a/tests/standalone/io/web_socket_error_test.dart
+++ b/tests/standalone/io/web_socket_error_test.dart
@@ -25,6 +25,16 @@
 const String CERT_NAME = 'localhost_cert';
 const String HOST_NAME = 'localhost';
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 /**
  * A SecurityConfiguration lets us run the tests over HTTP or HTTPS.
  */
@@ -36,13 +46,14 @@
   Future<HttpServer> createServer({int backlog: 0}) =>
       secure ? HttpServer.bindSecure(HOST_NAME,
                                      0,
-                                     backlog: backlog,
-                                     certificateName: CERT_NAME)
+                                     serverContext,
+                                     backlog: backlog)
              : HttpServer.bind(HOST_NAME,
                                0,
                                backlog: backlog);
 
   Future<WebSocket> createClient(int port) =>
+    // TODO(whesse): Add a client context argument to WebSocket.connect.
     WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/');
 
 
@@ -89,18 +100,11 @@
 }
 
 
-void initializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: "dartdart");
-}
-
-
 main() {
   asyncStart();
   new SecurityConfiguration(secure: false).runTests();
-  initializeSSL();
-  new SecurityConfiguration(secure: true).runTests();
+  // TODO(whesse): WebSocket.connect needs an optional context: parameter
+  // new SecurityConfiguration(secure: true).runTests();
   asyncEnd();
 }
 
diff --git a/tests/standalone/io/web_socket_protocol_processor_test.dart b/tests/standalone/io/web_socket_protocol_processor_test.dart
index 179fe0b..ba75622 100644
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart
@@ -36,6 +36,7 @@
 part "../../../sdk/lib/io/service_object.dart";
 part "../../../sdk/lib/io/secure_socket.dart";
 part "../../../sdk/lib/io/secure_server_socket.dart";
+part "../../../sdk/lib/io/security_context.dart";
 part "../../../sdk/lib/io/socket.dart";
 part "../../../sdk/lib/io/websocket.dart";
 part "../../../sdk/lib/io/websocket_impl.dart";
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index ae38307..695b2cd 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -19,9 +19,18 @@
 
 const WEB_SOCKET_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
 
-const String CERT_NAME = 'localhost_cert';
 const String HOST_NAME = 'localhost';
 
+String localFile(path) => Platform.script.resolve(path).toFilePath();
+
+SecurityContext serverContext = new SecurityContext()
+  ..useCertificateChain(localFile('certificates/server_chain.pem'))
+  ..usePrivateKey(localFile('certificates/server_key.pem'),
+                  password: 'dartdart');
+
+SecurityContext clientContext = new SecurityContext()
+  ..setTrustedCertificates(file: localFile('certificates/trusted_certs.pem'));
+
 /**
  * A SecurityConfiguration lets us run the tests over HTTP or HTTPS.
  */
@@ -33,13 +42,14 @@
   Future<HttpServer> createServer({int backlog: 0}) =>
       secure ? HttpServer.bindSecure(HOST_NAME,
                                      0,
-                                     backlog: backlog,
-                                     certificateName: CERT_NAME)
+                                     serverContext,
+                                     backlog: backlog)
              : HttpServer.bind(HOST_NAME,
                                0,
                                backlog: backlog);
 
   Future<WebSocket> createClient(int port) =>
+    // TODO(whesse): Add client context argument to WebSocket.connect
     WebSocket.connect('${secure ? "wss" : "ws"}://$HOST_NAME:$port/');
 
   checkCloseStatus(webSocket, closeStatus, closeReason) {
@@ -581,15 +591,8 @@
 }
 
 
-void initializeSSL() {
-  var testPkcertDatabase = Platform.script.resolve('pkcert').toFilePath();
-  SecureSocket.initialize(database: testPkcertDatabase,
-                          password: "dartdart");
-}
-
-
 main() {
   new SecurityConfiguration(secure: false).runTests();
-  initializeSSL();
-  new SecurityConfiguration(secure: true).runTests();
+  // TODO(whesse): Make WebSocket.connect() take an optional context: parameter.
+  // new SecurityConfiguration(secure: true).runTests();
 }
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/.packages b/tests/standalone/package/scenarios/both_dir_and_file/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart b/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart
new file mode 100644
index 0000000..962f916
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library both_dir_and_file_noimports_test;
+
+main() {
+}
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart b/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart
new file mode 100644
index 0000000..d9d42ab
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'good';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/packages/foo/foo.dart b/tests/standalone/package/scenarios/both_dir_and_file/packages/foo/foo.dart
new file mode 100644
index 0000000..f438ca7
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/packages/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'bad';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart b/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart
new file mode 100644
index 0000000..32251bc
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library prefers_packages_file_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'good') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/empty_packages_file/.packages b/tests/standalone/package/scenarios/empty_packages_file/.packages
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/.packages
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
new file mode 100644
index 0000000..929bd55
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library empty_packages_file_discovery_test;
+
+import 'package:foo/foo.dart';
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart
new file mode 100644
index 0000000..580bb01
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=.packages
+
+// We expect this to not cause any errors. An empty packages file is valid,
+// you should only run into problems if you try to resolve a package import.
+library empty_packages_file_noimports_test;
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
new file mode 100644
index 0000000..38fff19
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=.packages
+
+library empty_packages_file_option_test;
+
+import 'package:foo/foo.dart';
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/invalid/foo/foo.dart b/tests/standalone/package/scenarios/invalid/foo/foo.dart
new file mode 100644
index 0000000..3e2fa50
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String foo = 'foo';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/invalid/invalid_package_name.packages b/tests/standalone/package/scenarios/invalid/invalid_package_name.packages
new file mode 100644
index 0000000..d74d280
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_package_name.packages
@@ -0,0 +1,2 @@
+..:nonexistent/
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart b/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart
new file mode 100644
index 0000000..ef37f27
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=invalid_package_name.packages
+
+library invalid_package_name_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/invalid/invalid_utf8.packages b/tests/standalone/package/scenarios/invalid/invalid_utf8.packages
new file mode 100644
index 0000000..b0c09d0
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_utf8.packages
@@ -0,0 +1 @@
+þ:foo/
diff --git a/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart b/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart
new file mode 100644
index 0000000..0d93b35
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=invalid_utf8.packages
+
+library invalid_utf8_test;
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart b/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart
new file mode 100644
index 0000000..7c333f7
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=non_existent.packages
+
+library non_existent_packages_file_test;
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/invalid/same_package_twice.packages b/tests/standalone/package/scenarios/invalid/same_package_twice.packages
new file mode 100644
index 0000000..bdd57b6
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/same_package_twice.packages
@@ -0,0 +1,3 @@
+foo:nonexistentdir/
+# This overrides the previous entry
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart b/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart
new file mode 100644
index 0000000..e539e71
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=same_package_twice.packages
+
+library same_package_twice_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/packages_dir_only/packages/foo/foo.dart b/tests/standalone/package/scenarios/packages_dir_only/packages/foo/foo.dart
new file mode 100644
index 0000000..87b2fe1
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_dir_only/packages/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'hello';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_noimports_test.dart b/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_noimports_test.dart
new file mode 100644
index 0000000..3f72d32
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_noimports_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_dir_only_noimports_test;
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_test.dart b/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_test.dart
new file mode 100644
index 0000000..afec5b5
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_dir_only_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/.packages b/tests/standalone/package/scenarios/packages_file_in_parent/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart
new file mode 100644
index 0000000..87b2fe1
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'hello';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart
new file mode 100644
index 0000000..d47d8b0
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_file_in_parent_noimports_test;
+
+main() {
+}
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart
new file mode 100644
index 0000000..106b1af
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_file_in_parent_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_only/.packages b/tests/standalone/package/scenarios/packages_file_only/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart
new file mode 100644
index 0000000..87b2fe1
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'hello';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart
new file mode 100644
index 0000000..aa8e85f
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_file_only_noimports_test;
+
+main() {
+}
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart
new file mode 100644
index 0000000..5339533
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+
+library packages_file_only_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart
new file mode 100644
index 0000000..6eed31b
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library bar;
+
+String bar = 'bar';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart
new file mode 100644
index 0000000..1502af0
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library baz;
+
+String baz = 'baz';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages
new file mode 100644
index 0000000..e81099e
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages
@@ -0,0 +1,20 @@
+
+
+
+
+foo:foo/
+
+
+bar:bar/
+
+
+
+
+
+
+
+
+baz:baz/
+
+
+
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart
new file mode 100644
index 0000000..a5ec547
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=empty_lines.packages
+
+library empty_lines_test;
+
+import 'package:foo/foo.dart' as foo;
+import 'package:bar/bar.dart' as bar;
+import 'package:baz/baz.dart' as baz;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+  if (bar.bar != 'bar') {
+    throw new Exception('package "bar" was not resolved correctly');
+  }
+  if (baz.baz != 'baz') {
+    throw new Exception('package "baz" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages
new file mode 100644
index 0000000..0152a79
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages
@@ -0,0 +1 @@
+foo:
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
new file mode 100644
index 0000000..5c7eb39
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=empty_package_dir.packages
+
+// In this test, we give a packages file that associates the package 'foo' with
+// the empty string. This causes both the VM and dart2js to resolve
+// 'package:foo' imports relative to the root directory. So the import statement
+// `import 'package:foo/foo.dart'` is equivalent to `import '/foo.dart'`.
+library empty_package_dir_test;
+
+import 'package:foo/foo.dart';
+
+main() {
+}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart
new file mode 100644
index 0000000..3e2fa50
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String foo = 'foo';
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages
new file mode 100644
index 0000000..c3d3e75
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages
@@ -0,0 +1,3 @@
+foo:foo/
+bar:bar/

+baz:baz/
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart
new file mode 100644
index 0000000..8f4b629
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=mixed_line_ends.packages
+
+library mixed_line_ends_test;
+
+import 'package:foo/foo.dart' as foo;
+import 'package:bar/bar.dart' as bar;
+import 'package:baz/baz.dart' as baz;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+  if (bar.bar != 'bar') {
+    throw new Exception('package "bar" was not resolved correctly');
+  }
+  if (baz.baz != 'baz') {
+    throw new Exception('package "baz" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart
new file mode 100644
index 0000000..a6a8273
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=sub/.packages
+
+library packages_option_only_noimports_test;
+
+main() {
+}
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart
new file mode 100644
index 0000000..e873350
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// PackageRoot=none
+// Packages=sub/.packages
+
+library packages_option_only_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_option_only/sub/.packages b/tests/standalone/package/scenarios/packages_option_only/sub/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/sub/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart b/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart
new file mode 100644
index 0000000..87b2fe1
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library foo;
+
+String bar = 'hello';
\ No newline at end of file
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 2819827e..9bb7ec3 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -8,6 +8,10 @@
 # prefix.
 
 package/invalid_uri_test: Fail, OK # CompileTimeErrors intentionally
+package/scenarios/packages_file_strange_formatting/empty_package_dir_test: Fail, OK # CompileTimeErrors intentionally
+package/scenarios/empty_packages_file/empty_packages_file_discovery_test: Fail, OK # CompileTimeErrors intentionally
+package/scenarios/empty_packages_file/empty_packages_file_option_test: Fail, OK # CompileTimeErrors intentionally
+package/scenarios/invalid/*: Fail, OK # CompileTimeErrors intentionally
 
 issue14236_test: Pass # Do not remove this line. It serves as a marker for Issue 14516 comment #4.
 
@@ -16,6 +20,7 @@
 [ $runtime == vm ]
 package/package_isolate_test: Fail # Issue 12474
 io/observatory_test: Fail
+package/scenarios/invalid/same_package_twice_test: Pass # Issue 24119
 
 [ $runtime == vm && $checked ]
 # These tests have type errors on purpose.
@@ -146,6 +151,10 @@
 io/stdout_bad_argument_test: StaticWarning
 package/package1_test: StaticWarning
 package/package_test: StaticWarning
+package/scenarios/packages_dir_only/packages_dir_only_test: StaticWarning
+package/scenarios/packages_file_only/packages_file_only_test: StaticWarning
+package/scenarios/both_dir_and_file/prefers_packages_file_test: StaticWarning
+package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test: StaticWarning
 typed_data_test: StaticWarning
 typed_data_view_test: StaticWarning
 javascript_compatibility_errors_test: Skip
@@ -154,6 +163,14 @@
 [ $compiler == dart2analyzer ]
 package/package1_test: CompileTimeError
 package/package_test: CompileTimeError
+package/scenarios/packages_dir_only/packages_dir_only_test: CompileTimeError
+package/scenarios/packages_file_only/packages_file_only_test: CompileTimeError
+package/scenarios/both_dir_and_file/prefers_packages_file_test: CompileTimeError
+package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test: CompileTimeError
+package/scenarios/invalid/non_existent_packages_file_test: Crash, OK # Analyzer exits on invalid package config
+package/scenarios/invalid/invalid_utf8_test: Crash, OK # Analyzer exits on invalid package config
+package/scenarios/invalid/invalid_package_name_test: Crash, OK # Analyzer exits on invalid package config
+package/scenarios/invalid/same_package_twice_test: Crash, OK # Analyzer exits on invalid package config
 
 [ $system == windows ]
 io/skipping_dart2js_compilations_test: Fail # Issue 19551.
@@ -170,19 +187,20 @@
 io/http_client_stays_alive_test: Skip  # Timeout.
 
 [ $compiler == dart2js && $cps_ir ]
-coverage_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/addlatexhash_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/file_error_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/file_read_encoded_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/file_test: Crash # (static testWriteFro...  cannot handle async/sync*/async* functions
-io/file_write_only_test: Crash # (main()async{asyncSt...  cannot handle async/sync*/async* functions
-io/http_bind_test: Crash # (testBindShared(Stri...  cannot handle async/sync*/async* functions
-io/http_client_connect_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/https_bad_certificate_test: Crash # (main()async{var cli...  cannot handle async/sync*/async* functions
-io/issue_22636_test: Crash # (test()async{server=...  cannot handle async/sync*/async* functions
-io/issue_22637_test: Crash # (test()async{server=...  cannot handle async/sync*/async* functions
-io/observatory_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/skipping_dart2js_compilations_test: Crash # (static Iterable<Str...  cannot handle async/sync*/async* functions
-io/socket_bind_test: Crash # (testListenCloseList...  cannot handle async/sync*/async* functions
-io/socket_source_address_test: Crash # (Future testConnect(...  cannot handle async/sync*/async* functions
-priority_queue_stress_test: RuntimeError # Cannot read property 'any$1' of undefined
+coverage_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/addlatexhash_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/file_error_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/file_read_encoded_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/file_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/http_client_connect_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/observatory_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+io/skipping_dart2js_compilations_test: Crash # (static Iterable<Str...  cannot handle sync*/async* functions
+priority_queue_stress_test: RuntimeError # Cannot read property 'length' of undefined
+
+[ $runtime == vm ]
+# Failures in secure networking while NSS is replaced with BoringSSL
+io/https_client_certificate_test: RuntimeError # Issue 24070
+io/secure_server_client_certificate_test: RuntimeError # Issue 24069
+io/secure_server_client_no_certificate_test: RuntimeError # Issue 24069
+io/secure_socket_renegotiate_test: RuntimeError
+io/secure_socket_bad_data_test: RuntimeError  # An error in a secure connection just puts a READ_CLOSED on the stream, rather than signaling an error on the stream.
diff --git a/tests/try/poi/apply_updates_test.dart b/tests/try/poi/apply_updates_test.dart
index c26d283..6fc3428 100644
--- a/tests/try/poi/apply_updates_test.dart
+++ b/tests/try/poi/apply_updates_test.dart
@@ -14,7 +14,7 @@
 import 'package:compiler/src/scanner/scannerlib.dart' show
     PartialFunctionElement;
 
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/script.dart' show
     Script;
 
 import 'package:compiler/src/io/source_file.dart' show
diff --git a/tests/try/poi/diff_test.dart b/tests/try/poi/diff_test.dart
index 33cffb5..17890ac 100644
--- a/tests/try/poi/diff_test.dart
+++ b/tests/try/poi/diff_test.dart
@@ -14,9 +14,8 @@
 import 'package:async_helper/async_helper.dart' show
     asyncTest;
 
-import 'package:compiler/src/dart2jslib.dart' show
-    Compiler,
-    Script;
+import 'package:compiler/src/compiler.dart' show
+    Compiler;
 
 import 'package:compiler/src/io/source_file.dart' show
     StringSourceFile;
@@ -25,6 +24,9 @@
     Element,
     LibraryElement;
 
+import 'package:compiler/src/script.dart' show
+    Script;
+
 import 'package:dart2js_incremental/diff.dart' show
     Difference,
     computeDifference;
diff --git a/tests/try/poi/library_updater_test.dart b/tests/try/poi/library_updater_test.dart
index 8513442..b37fac5 100644
--- a/tests/try/poi/library_updater_test.dart
+++ b/tests/try/poi/library_updater_test.dart
@@ -10,7 +10,7 @@
     LibraryUpdater,
     Update;
 
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/script.dart' show
     Script;
 
 import 'package:compiler/src/io/source_file.dart' show
diff --git a/tests/try/web/incremental_compilation_update_test.dart b/tests/try/web/incremental_compilation_update_test.dart
index 63ca651..d434b47 100644
--- a/tests/try/web/incremental_compilation_update_test.dart
+++ b/tests/try/web/incremental_compilation_update_test.dart
@@ -37,7 +37,7 @@
     Element,
     LibraryElement;
 
-import 'package:compiler/src/dart2jslib.dart' show
+import 'package:compiler/src/compiler.dart' show
     Compiler;
 
 import 'package:dart2js_incremental/dart2js_incremental.dart' show
diff --git a/third_party/.gitignore b/third_party/.gitignore
index cbe3480..a55ad28 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -1,7 +1,9 @@
 # ignore everything
 *
-# except for items in the pkg directory and self
+# except for items in the pkg directory and self.
+# except for our files in boringssl.  The checkout is in boringssl/src.
 !.gitignore
 !pkg
 !pkg_tested
+!boringssl
 !d8
diff --git a/third_party/boringssl/.gitignore b/third_party/boringssl/.gitignore
new file mode 100644
index 0000000..6eda124
--- /dev/null
+++ b/third_party/boringssl/.gitignore
@@ -0,0 +1,2 @@
+# ignore the checkout of boringssl.
+src/
diff --git a/third_party/boringssl/README b/third_party/boringssl/README
new file mode 100644
index 0000000..f151cb2
--- /dev/null
+++ b/third_party/boringssl/README
@@ -0,0 +1,17 @@
+The files in this directory, except for src/, boringssl_dart.gyp, and
+boringssl_configurations.gypi, are generated from the checkout of
+boringssl in src/, by running the script
+src/util/generate_build_files.py chromium.
+
+That script is maintained by the chromium team, to make a gyp build
+of boringssl that does not require go or perl.  We modify the main
+gyp file of this build, boringssl.gyp, to add configurations for
+the target architectures, creating boringssl_dart.gyp.
+
+When updating boringssl in Dart, delete this directory,
+and check out the new boringssl to src.  Then run the script, check out
+our two files boringssl_dart.gyp and boringssl_configurations.gypi and commit
+the changes and any added or deleted files, as well as a change to the
+boringssl revision in DEPS.  If there are changes in boringssl.gyp,
+consider making  similar changes to boringssl_dart.gyp
+Test the changes on all platforms before committing, of course.
diff --git a/third_party/boringssl/boringssl.gypi b/third_party/boringssl/boringssl.gypi
new file mode 100644
index 0000000..fb8e643
--- /dev/null
+++ b/third_party/boringssl/boringssl.gypi
@@ -0,0 +1,431 @@
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file is created by generate_build_files.py. Do not edit manually.
+
+{
+  'variables': {
+    'boringssl_ssl_sources': [
+      'src/ssl/d1_both.c',
+      'src/ssl/d1_clnt.c',
+      'src/ssl/d1_lib.c',
+      'src/ssl/d1_meth.c',
+      'src/ssl/d1_pkt.c',
+      'src/ssl/d1_srtp.c',
+      'src/ssl/d1_srvr.c',
+      'src/ssl/pqueue/pqueue.c',
+      'src/ssl/s3_both.c',
+      'src/ssl/s3_clnt.c',
+      'src/ssl/s3_enc.c',
+      'src/ssl/s3_lib.c',
+      'src/ssl/s3_meth.c',
+      'src/ssl/s3_pkt.c',
+      'src/ssl/s3_srvr.c',
+      'src/ssl/ssl_aead_ctx.c',
+      'src/ssl/ssl_algs.c',
+      'src/ssl/ssl_asn1.c',
+      'src/ssl/ssl_cert.c',
+      'src/ssl/ssl_cipher.c',
+      'src/ssl/ssl_lib.c',
+      'src/ssl/ssl_rsa.c',
+      'src/ssl/ssl_sess.c',
+      'src/ssl/ssl_stat.c',
+      'src/ssl/ssl_txt.c',
+      'src/ssl/t1_enc.c',
+      'src/ssl/t1_lib.c',
+      'src/ssl/t1_reneg.c',
+    ],
+    'boringssl_crypto_sources': [
+      'err_data.c',
+      'src/crypto/aes/aes.c',
+      'src/crypto/aes/mode_wrappers.c',
+      'src/crypto/asn1/a_bitstr.c',
+      'src/crypto/asn1/a_bool.c',
+      'src/crypto/asn1/a_bytes.c',
+      'src/crypto/asn1/a_d2i_fp.c',
+      'src/crypto/asn1/a_dup.c',
+      'src/crypto/asn1/a_enum.c',
+      'src/crypto/asn1/a_gentm.c',
+      'src/crypto/asn1/a_i2d_fp.c',
+      'src/crypto/asn1/a_int.c',
+      'src/crypto/asn1/a_mbstr.c',
+      'src/crypto/asn1/a_object.c',
+      'src/crypto/asn1/a_octet.c',
+      'src/crypto/asn1/a_print.c',
+      'src/crypto/asn1/a_strnid.c',
+      'src/crypto/asn1/a_time.c',
+      'src/crypto/asn1/a_type.c',
+      'src/crypto/asn1/a_utctm.c',
+      'src/crypto/asn1/a_utf8.c',
+      'src/crypto/asn1/asn1_lib.c',
+      'src/crypto/asn1/asn1_par.c',
+      'src/crypto/asn1/asn_pack.c',
+      'src/crypto/asn1/bio_asn1.c',
+      'src/crypto/asn1/bio_ndef.c',
+      'src/crypto/asn1/f_enum.c',
+      'src/crypto/asn1/f_int.c',
+      'src/crypto/asn1/f_string.c',
+      'src/crypto/asn1/t_bitst.c',
+      'src/crypto/asn1/t_pkey.c',
+      'src/crypto/asn1/tasn_dec.c',
+      'src/crypto/asn1/tasn_enc.c',
+      'src/crypto/asn1/tasn_fre.c',
+      'src/crypto/asn1/tasn_new.c',
+      'src/crypto/asn1/tasn_prn.c',
+      'src/crypto/asn1/tasn_typ.c',
+      'src/crypto/asn1/tasn_utl.c',
+      'src/crypto/asn1/x_bignum.c',
+      'src/crypto/asn1/x_long.c',
+      'src/crypto/base64/base64.c',
+      'src/crypto/bio/bio.c',
+      'src/crypto/bio/bio_mem.c',
+      'src/crypto/bio/buffer.c',
+      'src/crypto/bio/connect.c',
+      'src/crypto/bio/fd.c',
+      'src/crypto/bio/file.c',
+      'src/crypto/bio/hexdump.c',
+      'src/crypto/bio/pair.c',
+      'src/crypto/bio/printf.c',
+      'src/crypto/bio/socket.c',
+      'src/crypto/bio/socket_helper.c',
+      'src/crypto/bn/add.c',
+      'src/crypto/bn/asm/x86_64-gcc.c',
+      'src/crypto/bn/bn.c',
+      'src/crypto/bn/cmp.c',
+      'src/crypto/bn/convert.c',
+      'src/crypto/bn/ctx.c',
+      'src/crypto/bn/div.c',
+      'src/crypto/bn/exponentiation.c',
+      'src/crypto/bn/gcd.c',
+      'src/crypto/bn/generic.c',
+      'src/crypto/bn/kronecker.c',
+      'src/crypto/bn/montgomery.c',
+      'src/crypto/bn/mul.c',
+      'src/crypto/bn/prime.c',
+      'src/crypto/bn/random.c',
+      'src/crypto/bn/rsaz_exp.c',
+      'src/crypto/bn/shift.c',
+      'src/crypto/bn/sqrt.c',
+      'src/crypto/buf/buf.c',
+      'src/crypto/bytestring/ber.c',
+      'src/crypto/bytestring/cbb.c',
+      'src/crypto/bytestring/cbs.c',
+      'src/crypto/chacha/chacha_generic.c',
+      'src/crypto/chacha/chacha_vec.c',
+      'src/crypto/cipher/aead.c',
+      'src/crypto/cipher/cipher.c',
+      'src/crypto/cipher/derive_key.c',
+      'src/crypto/cipher/e_aes.c',
+      'src/crypto/cipher/e_chacha20poly1305.c',
+      'src/crypto/cipher/e_des.c',
+      'src/crypto/cipher/e_null.c',
+      'src/crypto/cipher/e_rc2.c',
+      'src/crypto/cipher/e_rc4.c',
+      'src/crypto/cipher/e_ssl3.c',
+      'src/crypto/cipher/e_tls.c',
+      'src/crypto/cipher/tls_cbc.c',
+      'src/crypto/cmac/cmac.c',
+      'src/crypto/conf/conf.c',
+      'src/crypto/cpu-arm.c',
+      'src/crypto/cpu-intel.c',
+      'src/crypto/crypto.c',
+      'src/crypto/des/des.c',
+      'src/crypto/dh/check.c',
+      'src/crypto/dh/dh.c',
+      'src/crypto/dh/dh_asn1.c',
+      'src/crypto/dh/dh_impl.c',
+      'src/crypto/dh/params.c',
+      'src/crypto/digest/digest.c',
+      'src/crypto/digest/digests.c',
+      'src/crypto/directory_posix.c',
+      'src/crypto/directory_win.c',
+      'src/crypto/dsa/dsa.c',
+      'src/crypto/dsa/dsa_asn1.c',
+      'src/crypto/dsa/dsa_impl.c',
+      'src/crypto/ec/ec.c',
+      'src/crypto/ec/ec_asn1.c',
+      'src/crypto/ec/ec_key.c',
+      'src/crypto/ec/ec_montgomery.c',
+      'src/crypto/ec/oct.c',
+      'src/crypto/ec/p256-64.c',
+      'src/crypto/ec/simple.c',
+      'src/crypto/ec/util-64.c',
+      'src/crypto/ec/wnaf.c',
+      'src/crypto/ecdh/ecdh.c',
+      'src/crypto/ecdsa/ecdsa.c',
+      'src/crypto/ecdsa/ecdsa_asn1.c',
+      'src/crypto/engine/engine.c',
+      'src/crypto/err/err.c',
+      'src/crypto/evp/algorithm.c',
+      'src/crypto/evp/asn1.c',
+      'src/crypto/evp/digestsign.c',
+      'src/crypto/evp/evp.c',
+      'src/crypto/evp/evp_ctx.c',
+      'src/crypto/evp/p_dsa_asn1.c',
+      'src/crypto/evp/p_ec.c',
+      'src/crypto/evp/p_ec_asn1.c',
+      'src/crypto/evp/p_rsa.c',
+      'src/crypto/evp/p_rsa_asn1.c',
+      'src/crypto/evp/pbkdf.c',
+      'src/crypto/evp/sign.c',
+      'src/crypto/ex_data.c',
+      'src/crypto/hkdf/hkdf.c',
+      'src/crypto/hmac/hmac.c',
+      'src/crypto/lhash/lhash.c',
+      'src/crypto/md4/md4.c',
+      'src/crypto/md5/md5.c',
+      'src/crypto/mem.c',
+      'src/crypto/modes/cbc.c',
+      'src/crypto/modes/cfb.c',
+      'src/crypto/modes/ctr.c',
+      'src/crypto/modes/gcm.c',
+      'src/crypto/modes/ofb.c',
+      'src/crypto/obj/obj.c',
+      'src/crypto/obj/obj_xref.c',
+      'src/crypto/pem/pem_all.c',
+      'src/crypto/pem/pem_info.c',
+      'src/crypto/pem/pem_lib.c',
+      'src/crypto/pem/pem_oth.c',
+      'src/crypto/pem/pem_pk8.c',
+      'src/crypto/pem/pem_pkey.c',
+      'src/crypto/pem/pem_x509.c',
+      'src/crypto/pem/pem_xaux.c',
+      'src/crypto/pkcs8/p5_pbe.c',
+      'src/crypto/pkcs8/p5_pbev2.c',
+      'src/crypto/pkcs8/p8_pkey.c',
+      'src/crypto/pkcs8/pkcs8.c',
+      'src/crypto/poly1305/poly1305.c',
+      'src/crypto/poly1305/poly1305_arm.c',
+      'src/crypto/poly1305/poly1305_vec.c',
+      'src/crypto/rand/hwrand.c',
+      'src/crypto/rand/rand.c',
+      'src/crypto/rand/urandom.c',
+      'src/crypto/rand/windows.c',
+      'src/crypto/rc4/rc4.c',
+      'src/crypto/refcount_c11.c',
+      'src/crypto/refcount_lock.c',
+      'src/crypto/rsa/blinding.c',
+      'src/crypto/rsa/padding.c',
+      'src/crypto/rsa/rsa.c',
+      'src/crypto/rsa/rsa_asn1.c',
+      'src/crypto/rsa/rsa_impl.c',
+      'src/crypto/sha/sha1.c',
+      'src/crypto/sha/sha256.c',
+      'src/crypto/sha/sha512.c',
+      'src/crypto/stack/stack.c',
+      'src/crypto/thread.c',
+      'src/crypto/thread_none.c',
+      'src/crypto/thread_pthread.c',
+      'src/crypto/thread_win.c',
+      'src/crypto/time_support.c',
+      'src/crypto/x509/a_digest.c',
+      'src/crypto/x509/a_sign.c',
+      'src/crypto/x509/a_strex.c',
+      'src/crypto/x509/a_verify.c',
+      'src/crypto/x509/asn1_gen.c',
+      'src/crypto/x509/by_dir.c',
+      'src/crypto/x509/by_file.c',
+      'src/crypto/x509/i2d_pr.c',
+      'src/crypto/x509/pkcs7.c',
+      'src/crypto/x509/t_crl.c',
+      'src/crypto/x509/t_req.c',
+      'src/crypto/x509/t_x509.c',
+      'src/crypto/x509/t_x509a.c',
+      'src/crypto/x509/x509.c',
+      'src/crypto/x509/x509_att.c',
+      'src/crypto/x509/x509_cmp.c',
+      'src/crypto/x509/x509_d2.c',
+      'src/crypto/x509/x509_def.c',
+      'src/crypto/x509/x509_ext.c',
+      'src/crypto/x509/x509_lu.c',
+      'src/crypto/x509/x509_obj.c',
+      'src/crypto/x509/x509_r2x.c',
+      'src/crypto/x509/x509_req.c',
+      'src/crypto/x509/x509_set.c',
+      'src/crypto/x509/x509_trs.c',
+      'src/crypto/x509/x509_txt.c',
+      'src/crypto/x509/x509_v3.c',
+      'src/crypto/x509/x509_vfy.c',
+      'src/crypto/x509/x509_vpm.c',
+      'src/crypto/x509/x509cset.c',
+      'src/crypto/x509/x509name.c',
+      'src/crypto/x509/x509rset.c',
+      'src/crypto/x509/x509spki.c',
+      'src/crypto/x509/x509type.c',
+      'src/crypto/x509/x_algor.c',
+      'src/crypto/x509/x_all.c',
+      'src/crypto/x509/x_attrib.c',
+      'src/crypto/x509/x_crl.c',
+      'src/crypto/x509/x_exten.c',
+      'src/crypto/x509/x_info.c',
+      'src/crypto/x509/x_name.c',
+      'src/crypto/x509/x_pkey.c',
+      'src/crypto/x509/x_pubkey.c',
+      'src/crypto/x509/x_req.c',
+      'src/crypto/x509/x_sig.c',
+      'src/crypto/x509/x_spki.c',
+      'src/crypto/x509/x_val.c',
+      'src/crypto/x509/x_x509.c',
+      'src/crypto/x509/x_x509a.c',
+      'src/crypto/x509v3/pcy_cache.c',
+      'src/crypto/x509v3/pcy_data.c',
+      'src/crypto/x509v3/pcy_lib.c',
+      'src/crypto/x509v3/pcy_map.c',
+      'src/crypto/x509v3/pcy_node.c',
+      'src/crypto/x509v3/pcy_tree.c',
+      'src/crypto/x509v3/v3_akey.c',
+      'src/crypto/x509v3/v3_akeya.c',
+      'src/crypto/x509v3/v3_alt.c',
+      'src/crypto/x509v3/v3_bcons.c',
+      'src/crypto/x509v3/v3_bitst.c',
+      'src/crypto/x509v3/v3_conf.c',
+      'src/crypto/x509v3/v3_cpols.c',
+      'src/crypto/x509v3/v3_crld.c',
+      'src/crypto/x509v3/v3_enum.c',
+      'src/crypto/x509v3/v3_extku.c',
+      'src/crypto/x509v3/v3_genn.c',
+      'src/crypto/x509v3/v3_ia5.c',
+      'src/crypto/x509v3/v3_info.c',
+      'src/crypto/x509v3/v3_int.c',
+      'src/crypto/x509v3/v3_lib.c',
+      'src/crypto/x509v3/v3_ncons.c',
+      'src/crypto/x509v3/v3_pci.c',
+      'src/crypto/x509v3/v3_pcia.c',
+      'src/crypto/x509v3/v3_pcons.c',
+      'src/crypto/x509v3/v3_pku.c',
+      'src/crypto/x509v3/v3_pmaps.c',
+      'src/crypto/x509v3/v3_prn.c',
+      'src/crypto/x509v3/v3_purp.c',
+      'src/crypto/x509v3/v3_skey.c',
+      'src/crypto/x509v3/v3_sxnet.c',
+      'src/crypto/x509v3/v3_utl.c',
+    ],
+    'boringssl_linux_aarch64_sources': [
+      'linux-aarch64/crypto/aes/aesv8-armx64.S',
+      'linux-aarch64/crypto/modes/ghashv8-armx64.S',
+      'linux-aarch64/crypto/sha/sha1-armv8.S',
+      'linux-aarch64/crypto/sha/sha256-armv8.S',
+      'linux-aarch64/crypto/sha/sha512-armv8.S',
+    ],
+    'boringssl_linux_arm_sources': [
+      'linux-arm/crypto/aes/aes-armv4.S',
+      'linux-arm/crypto/aes/aesv8-armx32.S',
+      'linux-arm/crypto/aes/bsaes-armv7.S',
+      'linux-arm/crypto/bn/armv4-mont.S',
+      'linux-arm/crypto/modes/ghash-armv4.S',
+      'linux-arm/crypto/modes/ghashv8-armx32.S',
+      'linux-arm/crypto/sha/sha1-armv4-large.S',
+      'linux-arm/crypto/sha/sha256-armv4.S',
+      'linux-arm/crypto/sha/sha512-armv4.S',
+      'src/crypto/chacha/chacha_vec_arm.S',
+      'src/crypto/cpu-arm-asm.S',
+      'src/crypto/poly1305/poly1305_arm_asm.S',
+    ],
+    'boringssl_linux_x86_sources': [
+      'linux-x86/crypto/aes/aes-586.S',
+      'linux-x86/crypto/aes/aesni-x86.S',
+      'linux-x86/crypto/aes/vpaes-x86.S',
+      'linux-x86/crypto/bn/bn-586.S',
+      'linux-x86/crypto/bn/co-586.S',
+      'linux-x86/crypto/bn/x86-mont.S',
+      'linux-x86/crypto/cpu-x86-asm.S',
+      'linux-x86/crypto/md5/md5-586.S',
+      'linux-x86/crypto/modes/ghash-x86.S',
+      'linux-x86/crypto/rc4/rc4-586.S',
+      'linux-x86/crypto/sha/sha1-586.S',
+      'linux-x86/crypto/sha/sha256-586.S',
+      'linux-x86/crypto/sha/sha512-586.S',
+    ],
+    'boringssl_linux_x86_64_sources': [
+      'linux-x86_64/crypto/aes/aes-x86_64.S',
+      'linux-x86_64/crypto/aes/aesni-x86_64.S',
+      'linux-x86_64/crypto/aes/bsaes-x86_64.S',
+      'linux-x86_64/crypto/aes/vpaes-x86_64.S',
+      'linux-x86_64/crypto/bn/rsaz-avx2.S',
+      'linux-x86_64/crypto/bn/rsaz-x86_64.S',
+      'linux-x86_64/crypto/bn/x86_64-mont.S',
+      'linux-x86_64/crypto/bn/x86_64-mont5.S',
+      'linux-x86_64/crypto/cpu-x86_64-asm.S',
+      'linux-x86_64/crypto/md5/md5-x86_64.S',
+      'linux-x86_64/crypto/modes/aesni-gcm-x86_64.S',
+      'linux-x86_64/crypto/modes/ghash-x86_64.S',
+      'linux-x86_64/crypto/rand/rdrand-x86_64.S',
+      'linux-x86_64/crypto/rc4/rc4-md5-x86_64.S',
+      'linux-x86_64/crypto/rc4/rc4-x86_64.S',
+      'linux-x86_64/crypto/sha/sha1-x86_64.S',
+      'linux-x86_64/crypto/sha/sha256-x86_64.S',
+      'linux-x86_64/crypto/sha/sha512-x86_64.S',
+    ],
+    'boringssl_mac_x86_sources': [
+      'mac-x86/crypto/aes/aes-586.S',
+      'mac-x86/crypto/aes/aesni-x86.S',
+      'mac-x86/crypto/aes/vpaes-x86.S',
+      'mac-x86/crypto/bn/bn-586.S',
+      'mac-x86/crypto/bn/co-586.S',
+      'mac-x86/crypto/bn/x86-mont.S',
+      'mac-x86/crypto/cpu-x86-asm.S',
+      'mac-x86/crypto/md5/md5-586.S',
+      'mac-x86/crypto/modes/ghash-x86.S',
+      'mac-x86/crypto/rc4/rc4-586.S',
+      'mac-x86/crypto/sha/sha1-586.S',
+      'mac-x86/crypto/sha/sha256-586.S',
+      'mac-x86/crypto/sha/sha512-586.S',
+    ],
+    'boringssl_mac_x86_64_sources': [
+      'mac-x86_64/crypto/aes/aes-x86_64.S',
+      'mac-x86_64/crypto/aes/aesni-x86_64.S',
+      'mac-x86_64/crypto/aes/bsaes-x86_64.S',
+      'mac-x86_64/crypto/aes/vpaes-x86_64.S',
+      'mac-x86_64/crypto/bn/rsaz-avx2.S',
+      'mac-x86_64/crypto/bn/rsaz-x86_64.S',
+      'mac-x86_64/crypto/bn/x86_64-mont.S',
+      'mac-x86_64/crypto/bn/x86_64-mont5.S',
+      'mac-x86_64/crypto/cpu-x86_64-asm.S',
+      'mac-x86_64/crypto/md5/md5-x86_64.S',
+      'mac-x86_64/crypto/modes/aesni-gcm-x86_64.S',
+      'mac-x86_64/crypto/modes/ghash-x86_64.S',
+      'mac-x86_64/crypto/rand/rdrand-x86_64.S',
+      'mac-x86_64/crypto/rc4/rc4-md5-x86_64.S',
+      'mac-x86_64/crypto/rc4/rc4-x86_64.S',
+      'mac-x86_64/crypto/sha/sha1-x86_64.S',
+      'mac-x86_64/crypto/sha/sha256-x86_64.S',
+      'mac-x86_64/crypto/sha/sha512-x86_64.S',
+    ],
+    'boringssl_win_x86_sources': [
+      'win-x86/crypto/aes/aes-586.asm',
+      'win-x86/crypto/aes/aesni-x86.asm',
+      'win-x86/crypto/aes/vpaes-x86.asm',
+      'win-x86/crypto/bn/bn-586.asm',
+      'win-x86/crypto/bn/co-586.asm',
+      'win-x86/crypto/bn/x86-mont.asm',
+      'win-x86/crypto/cpu-x86-asm.asm',
+      'win-x86/crypto/md5/md5-586.asm',
+      'win-x86/crypto/modes/ghash-x86.asm',
+      'win-x86/crypto/rc4/rc4-586.asm',
+      'win-x86/crypto/sha/sha1-586.asm',
+      'win-x86/crypto/sha/sha256-586.asm',
+      'win-x86/crypto/sha/sha512-586.asm',
+    ],
+    'boringssl_win_x86_64_sources': [
+      'win-x86_64/crypto/aes/aes-x86_64.asm',
+      'win-x86_64/crypto/aes/aesni-x86_64.asm',
+      'win-x86_64/crypto/aes/bsaes-x86_64.asm',
+      'win-x86_64/crypto/aes/vpaes-x86_64.asm',
+      'win-x86_64/crypto/bn/rsaz-avx2.asm',
+      'win-x86_64/crypto/bn/rsaz-x86_64.asm',
+      'win-x86_64/crypto/bn/x86_64-mont.asm',
+      'win-x86_64/crypto/bn/x86_64-mont5.asm',
+      'win-x86_64/crypto/cpu-x86_64-asm.asm',
+      'win-x86_64/crypto/md5/md5-x86_64.asm',
+      'win-x86_64/crypto/modes/aesni-gcm-x86_64.asm',
+      'win-x86_64/crypto/modes/ghash-x86_64.asm',
+      'win-x86_64/crypto/rand/rdrand-x86_64.asm',
+      'win-x86_64/crypto/rc4/rc4-md5-x86_64.asm',
+      'win-x86_64/crypto/rc4/rc4-x86_64.asm',
+      'win-x86_64/crypto/sha/sha1-x86_64.asm',
+      'win-x86_64/crypto/sha/sha256-x86_64.asm',
+      'win-x86_64/crypto/sha/sha512-x86_64.asm',
+    ],
+  }
+}
diff --git a/third_party/boringssl/boringssl_configurations.gypi b/third_party/boringssl/boringssl_configurations.gypi
new file mode 100644
index 0000000..91c76c1
--- /dev/null
+++ b/third_party/boringssl/boringssl_configurations.gypi
@@ -0,0 +1,99 @@
+# Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# This file is included to modify the configurations to build third-party
+# code from BoringSSL.
+# This code is C code, not C++, and is not warning-free, so we need to remove
+# C++-specific flags, and add flags to supress the warnings in the code.
+{
+  'variables': {
+    # Used by third_party/nss, which is from Chromium.
+    # Include the built-in set of root certificate authorities.
+    'exclude_nss_root_certs': 0,
+    'os_posix%': 1,
+    'os_bsd%': 0,
+    'chromeos%': 0,
+    'clang%': 0,
+  },
+  'target_defaults': {
+    'cflags': [
+      '-w',
+      '-UHAVE_CVAR_BUILT_ON_SEM',
+    ],
+    # Removes these flags from the list cflags.
+    'cflags!': [
+      # NSS code from upstream mozilla builds with warnings,
+      # so we must allow warnings without failing.
+      '-Werror',
+      '-Wall',
+      '-ansi',
+      # Not supported for C, only for C++.
+      '-Wnon-virtual-dtor',
+      '-Wno-conversion-null',
+      '-fno-rtti',
+      '-fvisibility-inlines-hidden',
+      '-Woverloaded-virtual',
+    ],
+    'configurations': {
+      'Dart_Base': {
+        'xcode_settings': {
+          'WARNING_CFLAGS': [
+            '-w',
+          ],
+          'WARNING_CFLAGS!': [
+            '-Wall',
+            '-Wextra',
+          ],
+        },
+      },
+      # Dart_Macos_Debug and Dart_Macos_Release are merged after
+      # Dart_Macos_Base, so we can override the 'ansi' and '-Werror' flags set
+      # at the global level in tools/gyp/configurations_xcode.gypi.
+      'Dart_Macos_Debug': {
+        'abstract': 1,
+        'xcode_settings': {
+          # Remove 'ansi' setting.
+          'GCC_C_LANGUAGE_STANDARD': 'c99',
+          'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
+        },
+      },
+      'Dart_Macos_Release': {
+        'abstract': 1,
+        'xcode_settings': {
+          # Remove 'ansi' setting.
+          'GCC_C_LANGUAGE_STANDARD': 'c99',
+          'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror off
+        },
+      },
+      # When being built for Android nss expects __linux__ to be defined.
+      'Dart_Android_Base': {
+        'target_conditions': [
+          ['_toolset=="host"', {
+            'defines!': [
+              'ANDROID',
+            ],
+            # Define __linux__ on Android build for NSS.
+            'defines': [
+              '__linux__',
+            ],
+            'cflags!': [
+              '-U__linux__',
+            ],
+          }],
+          ['_toolset=="target"', {
+            'defines': [
+              '__linux__',
+              'CHECK_FORK_GETPID',  # Android does not provide pthread_atfork.
+              '__USE_LARGEFILE64',
+            ],
+            # Define __linux__ on Android build for NSS.
+            'cflags!': [
+              '-U__linux__',
+            ],
+          }]
+        ],
+      },
+    },
+  },
+}
\ No newline at end of file
diff --git a/third_party/boringssl/boringssl_dart.gyp b/third_party/boringssl/boringssl_dart.gyp
new file mode 100644
index 0000000..30270fa
--- /dev/null
+++ b/third_party/boringssl/boringssl_dart.gyp
@@ -0,0 +1,62 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+  'includes': [
+    '../../runtime/tools/gyp/runtime-configurations.gypi',
+    'boringssl_configurations.gypi',
+  ],
+  'targets': [
+    {
+      'target_name': 'boringssl',
+      'type': '<(component)',
+      'toolsets': ['host', 'target'],
+      'includes': [
+        'boringssl.gypi',
+      ],
+      'sources': [
+        '<@(boringssl_crypto_sources)',
+        '<@(boringssl_ssl_sources)',
+      ],
+      'defines': [
+        'BORINGSSL_IMPLEMENTATION',
+        'BORINGSSL_NO_STATIC_INITIALIZER',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+      'conditions': [
+        ['OS == "mac"', {
+          'sources': [
+            '<@(boringssl_mac_x86_sources)',
+            '<@(boringssl_mac_x86_64_sources)'
+          ],
+        }],
+        ['OS == "linux" or OS == "android"', {
+          'sources': [
+            '<@(boringssl_linux_x86_64_sources)',
+            '<@(boringssl_linux_x86_sources)',
+            '<@(boringssl_linux_arm_sources)',
+            '<@(boringssl_linux_aarch64_sources)',
+          ],
+        }],
+        ['OS == "win"', {
+          'defines': [ 'OPENSSL_NO_ASM', 'WIN32_LEAN_AND_MEAN' ],
+        }],
+      ],
+      'include_dirs': [
+        'src/include',
+        # This is for arm_arch.h, which is needed by some asm files. Since the
+        # asm files are generated and kept in a different directory, they
+        # cannot use relative paths to find this file.
+        'src/crypto',
+      ],
+      'direct_dependent_settings': {
+        'include_dirs': [
+          'src/include',
+        ],
+      },
+    },
+  ],
+}
diff --git a/third_party/boringssl/boringssl_tests.gypi b/third_party/boringssl/boringssl_tests.gypi
new file mode 100644
index 0000000..9413d8c
--- /dev/null
+++ b/third_party/boringssl/boringssl_tests.gypi
@@ -0,0 +1,483 @@
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file is created by generate_build_files.py. Do not edit manually.
+
+{
+  'targets': [
+    {
+      'target_name': 'boringssl_base64_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/base64/base64_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_bio_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/bio/bio_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_bn_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/bn/bn_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_bytestring_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/bytestring/bytestring_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_aead_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/cipher/aead_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_cipher_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/cipher/cipher_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_cmac_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/cmac/cmac_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_constant_time_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/constant_time_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_dh_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/dh/dh_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_digest_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/digest/digest_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_dsa_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/dsa/dsa_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_ec_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/ec/ec_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_example_mul',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/ec/example_mul.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_ecdsa_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/ecdsa/ecdsa_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_err_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/err/err_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_evp_extra_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/evp/evp_extra_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_evp_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/evp/evp_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_pbkdf_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/evp/pbkdf_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_hkdf_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/hkdf/hkdf_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_hmac_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/hmac/hmac_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_lhash_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/lhash/lhash_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_gcm_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/modes/gcm_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_pkcs12_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/pkcs8/pkcs12_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_refcount_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/refcount_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_rsa_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/rsa/rsa_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_thread_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/thread_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_pkcs7_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/x509/pkcs7_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_tab_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/x509v3/tab_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_v3name_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/crypto/x509v3/v3name_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_pqueue_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/ssl/pqueue/pqueue_test.c',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+    {
+      'target_name': 'boringssl_ssl_test',
+      'type': 'executable',
+      'dependencies': [
+        'boringssl.gyp:boringssl',
+      ],
+      'sources': [
+        'src/ssl/ssl_test.cc',
+        '<@(boringssl_test_support_sources)',
+      ],
+      # TODO(davidben): Fix size_t truncations in BoringSSL.
+      # https://crbug.com/429039
+      'msvs_disabled_warnings': [ 4267, ],
+    },
+  ],
+  'variables': {
+    'boringssl_test_support_sources': [
+      'src/crypto/test/file_test.cc',
+      'src/crypto/test/malloc.cc',
+    ],
+    'boringssl_test_targets': [
+      'boringssl_aead_test',
+      'boringssl_base64_test',
+      'boringssl_bio_test',
+      'boringssl_bn_test',
+      'boringssl_bytestring_test',
+      'boringssl_cipher_test',
+      'boringssl_cmac_test',
+      'boringssl_constant_time_test',
+      'boringssl_dh_test',
+      'boringssl_digest_test',
+      'boringssl_dsa_test',
+      'boringssl_ec_test',
+      'boringssl_ecdsa_test',
+      'boringssl_err_test',
+      'boringssl_evp_extra_test',
+      'boringssl_evp_test',
+      'boringssl_example_mul',
+      'boringssl_gcm_test',
+      'boringssl_hkdf_test',
+      'boringssl_hmac_test',
+      'boringssl_lhash_test',
+      'boringssl_pbkdf_test',
+      'boringssl_pkcs12_test',
+      'boringssl_pkcs7_test',
+      'boringssl_pqueue_test',
+      'boringssl_refcount_test',
+      'boringssl_rsa_test',
+      'boringssl_ssl_test',
+      'boringssl_tab_test',
+      'boringssl_thread_test',
+      'boringssl_v3name_test',
+    ],
+  }
+}
diff --git a/third_party/boringssl/err_data.c b/third_party/boringssl/err_data.c
new file mode 100644
index 0000000..27acc89
--- /dev/null
+++ b/third_party/boringssl/err_data.c
@@ -0,0 +1,2678 @@
+/* Copyright (c) 2015, Google Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+ /* This file was generated by err_data_generate.go. */
+
+#include <openssl/base.h>
+#include <openssl/err.h>
+#include <openssl/type_check.h>
+
+
+OPENSSL_COMPILE_ASSERT(ERR_LIB_NONE == 1, library_values_changed_1);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_SYS == 2, library_values_changed_2);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_BN == 3, library_values_changed_3);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_RSA == 4, library_values_changed_4);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_DH == 5, library_values_changed_5);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_EVP == 6, library_values_changed_6);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_BUF == 7, library_values_changed_7);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_OBJ == 8, library_values_changed_8);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_PEM == 9, library_values_changed_9);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_DSA == 10, library_values_changed_10);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_X509 == 11, library_values_changed_11);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_ASN1 == 12, library_values_changed_12);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_CONF == 13, library_values_changed_13);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_CRYPTO == 14, library_values_changed_14);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_EC == 15, library_values_changed_15);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_SSL == 16, library_values_changed_16);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_BIO == 17, library_values_changed_17);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_PKCS7 == 18, library_values_changed_18);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_PKCS8 == 19, library_values_changed_19);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_X509V3 == 20, library_values_changed_20);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_RAND == 21, library_values_changed_21);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_ENGINE == 22, library_values_changed_22);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_OCSP == 23, library_values_changed_23);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_UI == 24, library_values_changed_24);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_COMP == 25, library_values_changed_25);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_ECDSA == 26, library_values_changed_26);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_ECDH == 27, library_values_changed_27);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_HMAC == 28, library_values_changed_28);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_DIGEST == 29, library_values_changed_29);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_CIPHER == 30, library_values_changed_30);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_USER == 31, library_values_changed_31);
+OPENSSL_COMPILE_ASSERT(ERR_LIB_HKDF == 32, library_values_changed_32);
+OPENSSL_COMPILE_ASSERT(ERR_NUM_LIBS == 33, library_values_changed_num);
+
+const uint32_t kOpenSSLFunctionValues[] = {
+    0xc32054b,
+    0xc328556,
+    0xc330561,
+    0xc33856e,
+    0xc340578,
+    0xc348582,
+    0xc350589,
+    0xc358595,
+    0xc36059c,
+    0xc3685b2,
+    0xc3705d1,
+    0xc3785e2,
+    0xc3805f2,
+    0xc38860c,
+    0xc390621,
+    0xc398630,
+    0xc3a0649,
+    0xc3a865d,
+    0xc3b0669,
+    0xc3b8670,
+    0xc3c0678,
+    0xc3c8690,
+    0xc3d0698,
+    0xc3d86a0,
+    0xc3e06ab,
+    0xc3e85c7,
+    0xc3f0686,
+    0x1032193d,
+    0x10329954,
+    0x1033196d,
+    0x10339983,
+    0x10341993,
+    0x103499bb,
+    0x103519c9,
+    0x103599d8,
+    0x103619f8,
+    0x10369a17,
+    0x10371a34,
+    0x10379a51,
+    0x10381a66,
+    0x10389a88,
+    0x10391aa7,
+    0x10399ac6,
+    0x103a1add,
+    0x103a9af4,
+    0x103b1afd,
+    0x103b9b08,
+    0x103c1b22,
+    0x103c9b2a,
+    0x103d1b32,
+    0x103d99a6,
+    0x103e1b4b,
+    0x103e9b5d,
+    0x103f1b70,
+    0x103f9b79,
+    0x10401b39,
+    0x14320a4e,
+    0x14328a5c,
+    0x14330a68,
+    0x14338a75,
+    0x18361224,
+    0x18371252,
+    0x18379263,
+    0x18381279,
+    0x1839129c,
+    0x183992b1,
+    0x183a12c3,
+    0x183c1307,
+    0x183c9315,
+    0x183d1328,
+    0x183d9338,
+    0x183e935e,
+    0x183f1371,
+    0x183f9380,
+    0x184093aa,
+    0x18411416,
+    0x18419427,
+    0x1842143a,
+    0x1842944c,
+    0x1843145e,
+    0x1843946f,
+    0x18441480,
+    0x18449491,
+    0x184514a2,
+    0x184594af,
+    0x184614d1,
+    0x184694e4,
+    0x184714f8,
+    0x18479505,
+    0x18481514,
+    0x18489523,
+    0x18491534,
+    0x18499550,
+    0x184a155e,
+    0x184a956f,
+    0x184b1580,
+    0x184b958e,
+    0x184c159e,
+    0x184c95c4,
+    0x184d15d3,
+    0x184d95e3,
+    0x184e15f3,
+    0x184e9602,
+    0x184f1541,
+    0x184f91b3,
+    0x18501156,
+    0x1850916e,
+    0x18511190,
+    0x185191a2,
+    0x185211d4,
+    0x185291ed,
+    0x185311fe,
+    0x18539214,
+    0x18541239,
+    0x1854928a,
+    0x185512d3,
+    0x185592e8,
+    0x185612f5,
+    0x1856934d,
+    0x18571390,
+    0x1857939d,
+    0x185813b9,
+    0x185893ca,
+    0x185913da,
+    0x185993ea,
+    0x185a13f9,
+    0x185a9408,
+    0x185b14bd,
+    0x1c3206b8,
+    0x1c3286c4,
+    0x1c3306cf,
+    0x1c3386db,
+    0x20321616,
+    0x20329621,
+    0x20331629,
+    0x20339635,
+    0x24321641,
+    0x2432964f,
+    0x24331661,
+    0x24339670,
+    0x24341683,
+    0x24349696,
+    0x243516ad,
+    0x243596c5,
+    0x243616d3,
+    0x243696eb,
+    0x243716f4,
+    0x24379706,
+    0x2438171a,
+    0x24389727,
+    0x2439173d,
+    0x24399755,
+    0x243a176d,
+    0x243a9777,
+    0x243b178c,
+    0x243b979a,
+    0x243c17b2,
+    0x243c97c9,
+    0x243d17d4,
+    0x243d97e2,
+    0x28320aae,
+    0x28328abd,
+    0x28330ac8,
+    0x28338acd,
+    0x28340ad8,
+    0x2c322b99,
+    0x2c32aba5,
+    0x2c332bb8,
+    0x2c33abc9,
+    0x2c342be2,
+    0x2c34ac0a,
+    0x2c352c21,
+    0x2c35ac3e,
+    0x2c362c5b,
+    0x2c36ac78,
+    0x2c372c91,
+    0x2c37acaa,
+    0x2c382cc0,
+    0x2c38acce,
+    0x2c392ce0,
+    0x2c39acfd,
+    0x2c3a2d1a,
+    0x2c3aad28,
+    0x2c3b2d46,
+    0x2c3bad64,
+    0x2c3c2d7f,
+    0x2c3cad93,
+    0x2c3d2da5,
+    0x2c3dadb5,
+    0x2c3e2dc3,
+    0x2c3eadd3,
+    0x2c3f2de3,
+    0x2c3fae22,
+    0x2c402e33,
+    0x2c40ae4e,
+    0x2c412e62,
+    0x2c41ae75,
+    0x2c422e94,
+    0x2c42aea8,
+    0x2c432ebb,
+    0x2c43aeca,
+    0x2c442ed9,
+    0x2c44aef0,
+    0x2c452f0b,
+    0x2c45af23,
+    0x2c462f37,
+    0x2c46af4a,
+    0x2c472f5b,
+    0x2c47af6c,
+    0x2c482f7d,
+    0x2c48af8e,
+    0x2c492f9d,
+    0x2c49afaa,
+    0x2c4a2fb7,
+    0x2c4aafc4,
+    0x2c4b2fcd,
+    0x2c4bafe1,
+    0x2c4c2ff0,
+    0x2c4caffe,
+    0x2c4d3020,
+    0x2c4db031,
+    0x2c4e3042,
+    0x2c4eb00d,
+    0x2c4f2bfb,
+    0x2c4fadfe,
+    0x2c502e10,
+    0x30320000,
+    0x30328018,
+    0x3033002c,
+    0x30338042,
+    0x3034005b,
+    0x3034806c,
+    0x3035007f,
+    0x3035808f,
+    0x3036009d,
+    0x303680b3,
+    0x303700c3,
+    0x303780d8,
+    0x303800e6,
+    0x303880f7,
+    0x30390103,
+    0x3039810c,
+    0x303a011d,
+    0x303a812d,
+    0x303b013a,
+    0x303b8146,
+    0x303c0157,
+    0x303c8165,
+    0x303d0176,
+    0x303d8188,
+    0x303e0199,
+    0x303e81a8,
+    0x303f01b9,
+    0x303f81cd,
+    0x304001df,
+    0x304081ec,
+    0x30410202,
+    0x30418215,
+    0x30420225,
+    0x30428239,
+    0x3043024a,
+    0x3043825a,
+    0x30440265,
+    0x3044826d,
+    0x3045027d,
+    0x30458294,
+    0x304602a1,
+    0x304682b7,
+    0x304702c9,
+    0x304782d5,
+    0x304802e1,
+    0x304882ef,
+    0x30490308,
+    0x30498316,
+    0x304a032b,
+    0x304a8343,
+    0x304b034d,
+    0x304b8361,
+    0x304c0372,
+    0x304c8382,
+    0x304d038f,
+    0x304d83a0,
+    0x304e03b0,
+    0x304e83c2,
+    0x304f03d3,
+    0x304f83e2,
+    0x305003f6,
+    0x30508404,
+    0x30510413,
+    0x3051841c,
+    0x343209d6,
+    0x343289e6,
+    0x343309f1,
+    0x343389fe,
+    0x38320a07,
+    0x38328a1f,
+    0x38330a32,
+    0x38338a3c,
+    0x3c320aeb,
+    0x3c328af9,
+    0x3c330b10,
+    0x3c338b24,
+    0x3c340b56,
+    0x3c348b67,
+    0x3c350b73,
+    0x3c358ba0,
+    0x3c360bb2,
+    0x3c368bdb,
+    0x3c370be8,
+    0x3c378bf5,
+    0x3c380c03,
+    0x3c388c10,
+    0x3c390c1d,
+    0x3c398c41,
+    0x3c3a0c51,
+    0x3c3a8c69,
+    0x3c3b0c7e,
+    0x3c3b8c93,
+    0x3c3c0ca0,
+    0x3c3c8cb3,
+    0x3c3d0cc6,
+    0x3c3d8cea,
+    0x3c3e0d12,
+    0x3c3e8d2b,
+    0x3c3f0d41,
+    0x3c3f8d4e,
+    0x3c400d61,
+    0x3c408d72,
+    0x3c410d83,
+    0x3c418d9c,
+    0x3c420db5,
+    0x3c428dcb,
+    0x3c430de8,
+    0x3c438dfe,
+    0x3c440e82,
+    0x3c448ea9,
+    0x3c450ec7,
+    0x3c458ee1,
+    0x3c460ef9,
+    0x3c468f11,
+    0x3c470f3c,
+    0x3c478f67,
+    0x3c480f88,
+    0x3c488fb1,
+    0x3c490fcc,
+    0x3c498ff5,
+    0x3c4a1002,
+    0x3c4a9019,
+    0x3c4b1030,
+    0x3c4b9059,
+    0x3c4c1069,
+    0x3c4c9075,
+    0x3c4d108d,
+    0x3c4d90a0,
+    0x3c4e10b1,
+    0x3c4e90c2,
+    0x3c4f10e8,
+    0x3c4f8adf,
+    0x3c500e1a,
+    0x3c508e3a,
+    0x3c510e67,
+    0x3c518fe7,
+    0x3c5210d2,
+    0x3c528b87,
+    0x3c530b3f,
+    0x40321bb9,
+    0x40329bf2,
+    0x40331c1a,
+    0x40339c32,
+    0x40341c50,
+    0x40349cb6,
+    0x40351ccd,
+    0x40359ce9,
+    0x40361d05,
+    0x40369d1f,
+    0x40371d3e,
+    0x40379d5d,
+    0x40381d75,
+    0x40389d92,
+    0x40391db5,
+    0x40399dd2,
+    0x403a1e07,
+    0x403a9e61,
+    0x403b1e76,
+    0x403b9e92,
+    0x403c1eac,
+    0x403c9eb7,
+    0x403d1eda,
+    0x403d9efe,
+    0x403e1f14,
+    0x403e9f1e,
+    0x403f1f2a,
+    0x403f9f3b,
+    0x40401f53,
+    0x40409f5b,
+    0x40411f64,
+    0x40419f6d,
+    0x40421f95,
+    0x40429fa9,
+    0x40431fb4,
+    0x40439fc0,
+    0x40442014,
+    0x4044a020,
+    0x4045202d,
+    0x4045a040,
+    0x40462058,
+    0x4046a070,
+    0x40472086,
+    0x4047a0a1,
+    0x404820bc,
+    0x4048a0d0,
+    0x404920e9,
+    0x4049a102,
+    0x404a211c,
+    0x404aa126,
+    0x404b1e29,
+    0x404b9e48,
+    0x404c2136,
+    0x404ca144,
+    0x404d2151,
+    0x404da165,
+    0x404e217d,
+    0x404ea18b,
+    0x404f21b5,
+    0x404fa1cc,
+    0x405021de,
+    0x4050a20f,
+    0x40512240,
+    0x4051a255,
+    0x40522278,
+    0x4052a298,
+    0x405322ad,
+    0x4053a2bd,
+    0x4054a2c9,
+    0x405522df,
+    0x4055a31f,
+    0x4056232c,
+    0x4056a336,
+    0x40572344,
+    0x4057a35f,
+    0x4058237a,
+    0x4058a399,
+    0x405923ae,
+    0x4059a3c3,
+    0x405a23e0,
+    0x405aa3f4,
+    0x405b2410,
+    0x405ba426,
+    0x405c2443,
+    0x405ca455,
+    0x405d246c,
+    0x405da47d,
+    0x405e2499,
+    0x405ea4ad,
+    0x405f24bd,
+    0x405fa4d9,
+    0x406024ee,
+    0x4060a504,
+    0x40612521,
+    0x4061a53a,
+    0x40622564,
+    0x4062a56d,
+    0x4063257d,
+    0x4063a5b6,
+    0x406425cc,
+    0x4064a5ea,
+    0x406525ff,
+    0x4065a61c,
+    0x40662633,
+    0x4066a651,
+    0x4067266e,
+    0x4067a685,
+    0x406826a3,
+    0x4068a6ba,
+    0x406926d2,
+    0x4069a6e3,
+    0x406a26f6,
+    0x406aa709,
+    0x406b271d,
+    0x406ba741,
+    0x406c275c,
+    0x406ca77d,
+    0x406d27a1,
+    0x406da7bc,
+    0x406e27dd,
+    0x406ea7f2,
+    0x406f280b,
+    0x406fa818,
+    0x40702826,
+    0x4070a833,
+    0x40712850,
+    0x4071a870,
+    0x4072288b,
+    0x4072a8a4,
+    0x407328bb,
+    0x4073a8d5,
+    0x407428f9,
+    0x4074a90f,
+    0x40752923,
+    0x4075a938,
+    0x40762952,
+    0x4076a964,
+    0x40772979,
+    0x4077a99f,
+    0x407829bc,
+    0x4078a9df,
+    0x40792a05,
+    0x4079aa22,
+    0x407a2a45,
+    0x407aaa61,
+    0x407b2a7d,
+    0x407baa8f,
+    0x407c2a9c,
+    0x407e2aa9,
+    0x407eaabf,
+    0x407f2ad7,
+    0x407faaea,
+    0x40802aff,
+    0x4080ab18,
+    0x40812b36,
+    0x4081ab56,
+    0x40822b5f,
+    0x4082ab7b,
+    0x40832b84,
+    0x4083a19a,
+    0x40842229,
+    0x4084a1f9,
+    0x408525a5,
+    0x4085a589,
+    0x40861c8e,
+    0x40869ca1,
+    0x40871ff4,
+    0x4087a003,
+    0x40881bfe,
+    0x40889f7d,
+    0x40891fdb,
+    0x4089a54d,
+    0x408a1b84,
+    0x408a9b95,
+    0x408b1ba7,
+    0x408ba266,
+    0x408c1df0,
+    0x408c9e17,
+    0x408d22fd,
+    0x408d9bd3,
+    0x408e1c6f,
+    0x4432042a,
+    0x4432843c,
+    0x44330445,
+    0x4433844d,
+    0x4434045a,
+    0x44348475,
+    0x44350490,
+    0x443584b0,
+    0x443604cc,
+    0x443684ed,
+    0x443704f4,
+    0x44378502,
+    0x4438050c,
+    0x44388518,
+    0x44390522,
+    0x4439852d,
+    0x443a0537,
+    0x443a8541,
+    0x443b046a,
+    0x4c3217ea,
+    0x4c3297f9,
+    0x4c331808,
+    0x4c339821,
+    0x4c34183c,
+    0x4c349858,
+    0x4c35186a,
+    0x4c359878,
+    0x4c36188d,
+    0x4c36989e,
+    0x4c3718ac,
+    0x4c3798ba,
+    0x4c3818cc,
+    0x4c3898dc,
+    0x4c3918e6,
+    0x4c3998fe,
+    0x4c3a1916,
+    0x4c3a9929,
+    0x50323053,
+    0x5032b068,
+    0x50333079,
+    0x5033b08c,
+    0x5034309d,
+    0x5034b0b0,
+    0x503530bf,
+    0x5035b0d4,
+    0x503630e4,
+    0x5036b0f3,
+    0x50373104,
+    0x5037b114,
+    0x50383125,
+    0x5038b138,
+    0x5039314a,
+    0x5039b160,
+    0x503a3172,
+    0x503ab183,
+    0x503b3194,
+    0x503bb1a5,
+    0x503c31b0,
+    0x503cb1bc,
+    0x503d31c7,
+    0x503db1d2,
+    0x503e31df,
+    0x503eb1f4,
+    0x503f3202,
+    0x503fb216,
+    0x50403229,
+    0x5040b23a,
+    0x50413254,
+    0x5041b263,
+    0x5042326c,
+    0x5042b27b,
+    0x5043328d,
+    0x5043b299,
+    0x504432a1,
+    0x5044b2b4,
+    0x504532c5,
+    0x5045b2db,
+    0x504632e7,
+    0x5046b2fb,
+    0x50473309,
+    0x5047b31d,
+    0x50483337,
+    0x5048b34b,
+    0x50493361,
+    0x5049b378,
+    0x504a338a,
+    0x504ab39e,
+    0x504b33b3,
+    0x504bb3ca,
+    0x504c33de,
+    0x504cb3e7,
+    0x504d33ef,
+    0x504db3fe,
+    0x504e340e,
+    0x68321109,
+    0x6832911a,
+    0x6833112a,
+    0x68339138,
+    0x68341145,
+    0x6c3210f8,
+    0x74320a89,
+    0x74328a9b,
+    0x783206e8,
+    0x7832871b,
+    0x7833072d,
+    0x7833873f,
+    0x78340753,
+    0x78348767,
+    0x78350785,
+    0x78358797,
+    0x783607ab,
+    0x78368819,
+    0x7837082b,
+    0x7837883d,
+    0x7838084f,
+    0x78388866,
+    0x7839087d,
+    0x78398894,
+    0x783a08b0,
+    0x783a88cc,
+    0x783b08e8,
+    0x783b88fe,
+    0x783c0914,
+    0x783c892a,
+    0x783d0947,
+    0x783d8956,
+    0x783e0965,
+    0x783e8974,
+    0x783f0990,
+    0x783f899e,
+    0x784009ac,
+    0x784089ba,
+    0x784109c7,
+    0x784186fa,
+    0x784207bf,
+    0x784287dd,
+    0x784307fb,
+    0x80321611,
+};
+
+const size_t kOpenSSLFunctionValuesLen = sizeof(kOpenSSLFunctionValues) / sizeof(kOpenSSLFunctionValues[0]);
+
+const char kOpenSSLFunctionStringData[] =
+    "ASN1_BIT_STRING_set_bit\0"
+    "ASN1_ENUMERATED_set\0"
+    "ASN1_ENUMERATED_to_BN\0"
+    "ASN1_GENERALIZEDTIME_adj\0"
+    "ASN1_INTEGER_set\0"
+    "ASN1_INTEGER_to_BN\0"
+    "ASN1_OBJECT_new\0"
+    "ASN1_PCTX_new\0"
+    "ASN1_STRING_TABLE_add\0"
+    "ASN1_STRING_set\0"
+    "ASN1_STRING_type_new\0"
+    "ASN1_TIME_adj\0"
+    "ASN1_UTCTIME_adj\0"
+    "ASN1_d2i_fp\0"
+    "ASN1_dup\0"
+    "ASN1_generate_v3\0"
+    "ASN1_get_object\0"
+    "ASN1_i2d_bio\0"
+    "ASN1_i2d_fp\0"
+    "ASN1_item_d2i_fp\0"
+    "ASN1_item_dup\0"
+    "ASN1_item_ex_d2i\0"
+    "ASN1_item_i2d_bio\0"
+    "ASN1_item_i2d_fp\0"
+    "ASN1_item_pack\0"
+    "ASN1_item_unpack\0"
+    "ASN1_mbstring_ncopy\0"
+    "ASN1_template_new\0"
+    "BIO_new_NDEF\0"
+    "BN_to_ASN1_ENUMERATED\0"
+    "BN_to_ASN1_INTEGER\0"
+    "a2d_ASN1_OBJECT\0"
+    "a2i_ASN1_ENUMERATED\0"
+    "a2i_ASN1_INTEGER\0"
+    "a2i_ASN1_STRING\0"
+    "append_exp\0"
+    "asn1_cb\0"
+    "asn1_check_tlen\0"
+    "asn1_collate_primitive\0"
+    "asn1_collect\0"
+    "asn1_d2i_ex_primitive\0"
+    "asn1_d2i_read_bio\0"
+    "asn1_do_adb\0"
+    "asn1_ex_c2i\0"
+    "asn1_find_end\0"
+    "asn1_item_ex_combine_new\0"
+    "asn1_str2type\0"
+    "asn1_template_ex_d2i\0"
+    "asn1_template_noexp_d2i\0"
+    "bitstr_cb\0"
+    "c2i_ASN1_BIT_STRING\0"
+    "c2i_ASN1_INTEGER\0"
+    "c2i_ASN1_OBJECT\0"
+    "collect_data\0"
+    "d2i_ASN1_BOOLEAN\0"
+    "d2i_ASN1_OBJECT\0"
+    "d2i_ASN1_UINTEGER\0"
+    "d2i_ASN1_UTCTIME\0"
+    "d2i_ASN1_bytes\0"
+    "d2i_ASN1_type_bytes\0"
+    "i2d_ASN1_TIME\0"
+    "i2d_PrivateKey\0"
+    "long_c2i\0"
+    "parse_tagging\0"
+    "BIO_callback_ctrl\0"
+    "BIO_ctrl\0"
+    "BIO_new\0"
+    "BIO_new_file\0"
+    "BIO_new_mem_buf\0"
+    "BIO_printf\0"
+    "BIO_zero_copy_get_read_buf\0"
+    "BIO_zero_copy_get_read_buf_done\0"
+    "BIO_zero_copy_get_write_buf\0"
+    "BIO_zero_copy_get_write_buf_done\0"
+    "bio_io\0"
+    "bio_make_pair\0"
+    "bio_write\0"
+    "buffer_ctrl\0"
+    "conn_ctrl\0"
+    "conn_state\0"
+    "file_ctrl\0"
+    "file_read\0"
+    "mem_write\0"
+    "BN_CTX_get\0"
+    "BN_CTX_new\0"
+    "BN_CTX_start\0"
+    "BN_bn2dec\0"
+    "BN_bn2hex\0"
+    "BN_div\0"
+    "BN_div_recp\0"
+    "BN_exp\0"
+    "BN_generate_dsa_nonce\0"
+    "BN_generate_prime_ex\0"
+    "BN_lshift\0"
+    "BN_mod_exp2_mont\0"
+    "BN_mod_exp_mont\0"
+    "BN_mod_exp_mont_consttime\0"
+    "BN_mod_exp_mont_word\0"
+    "BN_mod_inverse\0"
+    "BN_mod_inverse_no_branch\0"
+    "BN_mod_lshift_quick\0"
+    "BN_mod_sqrt\0"
+    "BN_new\0"
+    "BN_rand\0"
+    "BN_rand_range\0"
+    "BN_rshift\0"
+    "BN_sqrt\0"
+    "BN_usub\0"
+    "bn_wexpand\0"
+    "mod_exp_recp\0"
+    "BUF_MEM_new\0"
+    "BUF_memdup\0"
+    "BUF_strndup\0"
+    "buf_mem_grow\0"
+    "EVP_AEAD_CTX_init\0"
+    "EVP_AEAD_CTX_init_with_direction\0"
+    "EVP_AEAD_CTX_open\0"
+    "EVP_AEAD_CTX_seal\0"
+    "EVP_CIPHER_CTX_copy\0"
+    "EVP_CIPHER_CTX_ctrl\0"
+    "EVP_CIPHER_CTX_set_key_length\0"
+    "EVP_CipherInit_ex\0"
+    "EVP_DecryptFinal_ex\0"
+    "EVP_EncryptFinal_ex\0"
+    "aead_aes_ctr_hmac_sha256_init\0"
+    "aead_aes_ctr_hmac_sha256_open\0"
+    "aead_aes_ctr_hmac_sha256_seal\0"
+    "aead_aes_gcm_init\0"
+    "aead_aes_gcm_open\0"
+    "aead_aes_gcm_seal\0"
+    "aead_aes_key_wrap_init\0"
+    "aead_aes_key_wrap_open\0"
+    "aead_aes_key_wrap_seal\0"
+    "aead_chacha20_poly1305_init\0"
+    "aead_chacha20_poly1305_open\0"
+    "aead_chacha20_poly1305_seal\0"
+    "aead_rc4_md5_tls_init\0"
+    "aead_rc4_md5_tls_open\0"
+    "aead_rc4_md5_tls_seal\0"
+    "aead_ssl3_ensure_cipher_init\0"
+    "aead_ssl3_init\0"
+    "aead_ssl3_open\0"
+    "aead_ssl3_seal\0"
+    "aead_tls_ensure_cipher_init\0"
+    "aead_tls_init\0"
+    "aead_tls_open\0"
+    "aead_tls_seal\0"
+    "aes_init_key\0"
+    "aesni_init_key\0"
+    "CONF_parse_list\0"
+    "NCONF_load\0"
+    "def_load_bio\0"
+    "str_copy\0"
+    "CRYPTO_get_ex_new_index\0"
+    "CRYPTO_set_ex_data\0"
+    "get_class\0"
+    "get_func_pointers\0"
+    "DH_new_method\0"
+    "compute_key\0"
+    "generate_key\0"
+    "generate_parameters\0"
+    "EVP_DigestInit_ex\0"
+    "EVP_MD_CTX_copy_ex\0"
+    "DSA_new_method\0"
+    "dsa_sig_cb\0"
+    "sign\0"
+    "sign_setup\0"
+    "verify\0"
+    "BN_to_felem\0"
+    "EC_GROUP_copy\0"
+    "EC_GROUP_get_curve_GFp\0"
+    "EC_GROUP_get_degree\0"
+    "EC_GROUP_new_by_curve_name\0"
+    "EC_GROUP_new_curve_GFp\0"
+    "EC_KEY_check_key\0"
+    "EC_KEY_copy\0"
+    "EC_KEY_generate_key\0"
+    "EC_KEY_new_by_curve_name\0"
+    "EC_KEY_new_method\0"
+    "EC_KEY_set_public_key_affine_coordinates\0"
+    "EC_POINT_add\0"
+    "EC_POINT_cmp\0"
+    "EC_POINT_copy\0"
+    "EC_POINT_dbl\0"
+    "EC_POINT_dup\0"
+    "EC_POINT_get_affine_coordinates_GFp\0"
+    "EC_POINT_invert\0"
+    "EC_POINT_is_at_infinity\0"
+    "EC_POINT_is_on_curve\0"
+    "EC_POINT_make_affine\0"
+    "EC_POINT_new\0"
+    "EC_POINT_oct2point\0"
+    "EC_POINT_point2oct\0"
+    "EC_POINT_set_affine_coordinates_GFp\0"
+    "EC_POINT_set_compressed_coordinates_GFp\0"
+    "EC_POINT_set_to_infinity\0"
+    "EC_POINTs_make_affine\0"
+    "compute_wNAF\0"
+    "d2i_ECPKParameters\0"
+    "d2i_ECParameters\0"
+    "d2i_ECPrivateKey\0"
+    "ec_GFp_mont_field_decode\0"
+    "ec_GFp_mont_field_encode\0"
+    "ec_GFp_mont_field_mul\0"
+    "ec_GFp_mont_field_set_to_one\0"
+    "ec_GFp_mont_field_sqr\0"
+    "ec_GFp_mont_group_set_curve\0"
+    "ec_GFp_nistp256_group_set_curve\0"
+    "ec_GFp_nistp256_point_get_affine_coordinates\0"
+    "ec_GFp_nistp256_points_mul\0"
+    "ec_GFp_simple_group_check_discriminant\0"
+    "ec_GFp_simple_group_set_curve\0"
+    "ec_GFp_simple_make_affine\0"
+    "ec_GFp_simple_oct2point\0"
+    "ec_GFp_simple_point2oct\0"
+    "ec_GFp_simple_point_get_affine_coordinates\0"
+    "ec_GFp_simple_point_set_affine_coordinates\0"
+    "ec_GFp_simple_points_make_affine\0"
+    "ec_GFp_simple_set_compressed_coordinates\0"
+    "ec_asn1_group2pkparameters\0"
+    "ec_asn1_pkparameters2group\0"
+    "ec_group_copy\0"
+    "ec_group_new\0"
+    "ec_group_new_curve_GFp\0"
+    "ec_group_new_from_data\0"
+    "ec_point_set_Jprojective_coordinates_GFp\0"
+    "ec_pre_comp_new\0"
+    "ec_wNAF_mul\0"
+    "ec_wNAF_precompute_mult\0"
+    "i2d_ECPKParameters\0"
+    "i2d_ECParameters\0"
+    "i2d_ECPrivateKey\0"
+    "i2o_ECPublicKey\0"
+    "nistp256_pre_comp_new\0"
+    "o2i_ECPublicKey\0"
+    "ECDH_compute_key\0"
+    "ECDSA_do_sign_ex\0"
+    "ECDSA_do_verify\0"
+    "ECDSA_sign_ex\0"
+    "digest_to_bn\0"
+    "ecdsa_sign_setup\0"
+    "EVP_DigestSignAlgorithm\0"
+    "EVP_DigestVerifyInitFromAlgorithm\0"
+    "EVP_PKEY_CTX_ctrl\0"
+    "EVP_PKEY_CTX_dup\0"
+    "EVP_PKEY_CTX_get0_rsa_oaep_label\0"
+    "EVP_PKEY_copy_parameters\0"
+    "EVP_PKEY_decrypt\0"
+    "EVP_PKEY_decrypt_init\0"
+    "EVP_PKEY_derive\0"
+    "EVP_PKEY_derive_init\0"
+    "EVP_PKEY_derive_set_peer\0"
+    "EVP_PKEY_encrypt\0"
+    "EVP_PKEY_encrypt_init\0"
+    "EVP_PKEY_get1_DH\0"
+    "EVP_PKEY_get1_DSA\0"
+    "EVP_PKEY_get1_EC_KEY\0"
+    "EVP_PKEY_get1_RSA\0"
+    "EVP_PKEY_keygen\0"
+    "EVP_PKEY_keygen_init\0"
+    "EVP_PKEY_new\0"
+    "EVP_PKEY_set_type\0"
+    "EVP_PKEY_sign\0"
+    "EVP_PKEY_sign_init\0"
+    "EVP_PKEY_verify\0"
+    "EVP_PKEY_verify_init\0"
+    "check_padding_md\0"
+    "d2i_AutoPrivateKey\0"
+    "d2i_PrivateKey\0"
+    "do_EC_KEY_print\0"
+    "do_dsa_print\0"
+    "do_rsa_print\0"
+    "do_sigver_init\0"
+    "dsa_param_decode\0"
+    "dsa_priv_decode\0"
+    "dsa_priv_encode\0"
+    "dsa_pub_decode\0"
+    "dsa_pub_encode\0"
+    "dsa_sig_print\0"
+    "eckey_param2type\0"
+    "eckey_param_decode\0"
+    "eckey_priv_decode\0"
+    "eckey_priv_encode\0"
+    "eckey_pub_decode\0"
+    "eckey_pub_encode\0"
+    "eckey_type2param\0"
+    "evp_pkey_ctx_new\0"
+    "hmac_signctx\0"
+    "i2d_PublicKey\0"
+    "old_dsa_priv_decode\0"
+    "old_ec_priv_decode\0"
+    "old_rsa_priv_decode\0"
+    "pkey_ec_ctrl\0"
+    "pkey_ec_derive\0"
+    "pkey_ec_keygen\0"
+    "pkey_ec_paramgen\0"
+    "pkey_ec_sign\0"
+    "pkey_hmac_ctrl\0"
+    "pkey_rsa_ctrl\0"
+    "pkey_rsa_decrypt\0"
+    "pkey_rsa_encrypt\0"
+    "pkey_rsa_sign\0"
+    "rsa_algor_to_md\0"
+    "rsa_digest_verify_init_from_algorithm\0"
+    "rsa_mgf1_to_md\0"
+    "rsa_priv_decode\0"
+    "rsa_priv_encode\0"
+    "rsa_pss_to_ctx\0"
+    "rsa_pub_decode\0"
+    "HKDF\0"
+    "OBJ_create\0"
+    "OBJ_dup\0"
+    "OBJ_nid2obj\0"
+    "OBJ_txt2obj\0"
+    "PEM_ASN1_read\0"
+    "PEM_ASN1_read_bio\0"
+    "PEM_ASN1_write\0"
+    "PEM_ASN1_write_bio\0"
+    "PEM_X509_INFO_read\0"
+    "PEM_X509_INFO_read_bio\0"
+    "PEM_X509_INFO_write_bio\0"
+    "PEM_do_header\0"
+    "PEM_get_EVP_CIPHER_INFO\0"
+    "PEM_read\0"
+    "PEM_read_DHparams\0"
+    "PEM_read_PrivateKey\0"
+    "PEM_read_bio\0"
+    "PEM_read_bio_DHparams\0"
+    "PEM_read_bio_Parameters\0"
+    "PEM_read_bio_PrivateKey\0"
+    "PEM_write\0"
+    "PEM_write_PrivateKey\0"
+    "PEM_write_bio\0"
+    "d2i_PKCS8PrivateKey_bio\0"
+    "d2i_PKCS8PrivateKey_fp\0"
+    "do_pk8pkey\0"
+    "do_pk8pkey_fp\0"
+    "load_iv\0"
+    "EVP_PKCS82PKEY\0"
+    "EVP_PKEY2PKCS8\0"
+    "PKCS12_get_key_and_certs\0"
+    "PKCS12_handle_content_info\0"
+    "PKCS12_handle_content_infos\0"
+    "PKCS5_pbe2_set_iv\0"
+    "PKCS5_pbe_set\0"
+    "PKCS5_pbe_set0_algor\0"
+    "PKCS5_pbkdf2_set\0"
+    "PKCS8_decrypt\0"
+    "PKCS8_encrypt\0"
+    "PKCS8_encrypt_pbe\0"
+    "pbe_cipher_init\0"
+    "pbe_crypt\0"
+    "pkcs12_item_decrypt_d2i\0"
+    "pkcs12_item_i2d_encrypt\0"
+    "pkcs12_key_gen_raw\0"
+    "pkcs12_pbe_keyivgen\0"
+    "BN_BLINDING_convert_ex\0"
+    "BN_BLINDING_create_param\0"
+    "BN_BLINDING_invert_ex\0"
+    "BN_BLINDING_new\0"
+    "BN_BLINDING_update\0"
+    "RSA_add_pkcs1_prefix\0"
+    "RSA_check_key\0"
+    "RSA_new_method\0"
+    "RSA_padding_add_PKCS1_OAEP_mgf1\0"
+    "RSA_padding_add_PKCS1_PSS_mgf1\0"
+    "RSA_padding_add_PKCS1_type_1\0"
+    "RSA_padding_add_PKCS1_type_2\0"
+    "RSA_padding_add_none\0"
+    "RSA_padding_check_PKCS1_OAEP_mgf1\0"
+    "RSA_padding_check_PKCS1_type_1\0"
+    "RSA_padding_check_PKCS1_type_2\0"
+    "RSA_padding_check_none\0"
+    "RSA_recover_crt_params\0"
+    "RSA_sign\0"
+    "RSA_verify\0"
+    "RSA_verify_PKCS1_PSS_mgf1\0"
+    "decrypt\0"
+    "encrypt\0"
+    "keygen\0"
+    "keygen_multiprime\0"
+    "private_transform\0"
+    "rsa_setup_blinding\0"
+    "sign_raw\0"
+    "verify_raw\0"
+    "SSL_AEAD_CTX_new\0"
+    "SSL_AEAD_CTX_open\0"
+    "SSL_AEAD_CTX_seal\0"
+    "SSL_CTX_check_private_key\0"
+    "SSL_CTX_get_tlsext_ticket_keys\0"
+    "SSL_CTX_new\0"
+    "SSL_CTX_set1_tls_channel_id\0"
+    "SSL_CTX_set_cipher_list\0"
+    "SSL_CTX_set_cipher_list_tls11\0"
+    "SSL_CTX_set_session_id_context\0"
+    "SSL_CTX_set_tlsext_ticket_keys\0"
+    "SSL_CTX_set_tmp_dh\0"
+    "SSL_CTX_set_tmp_ecdh\0"
+    "SSL_CTX_use_PrivateKey\0"
+    "SSL_CTX_use_PrivateKey_ASN1\0"
+    "SSL_CTX_use_PrivateKey_file\0"
+    "SSL_CTX_use_RSAPrivateKey\0"
+    "SSL_CTX_use_RSAPrivateKey_ASN1\0"
+    "SSL_CTX_use_RSAPrivateKey_file\0"
+    "SSL_CTX_use_certificate\0"
+    "SSL_CTX_use_certificate_ASN1\0"
+    "SSL_CTX_use_certificate_chain_file\0"
+    "SSL_CTX_use_certificate_file\0"
+    "SSL_CTX_use_psk_identity_hint\0"
+    "SSL_SESSION_from_bytes\0"
+    "SSL_SESSION_new\0"
+    "SSL_SESSION_parse\0"
+    "SSL_SESSION_parse_octet_string\0"
+    "SSL_SESSION_parse_string\0"
+    "SSL_SESSION_print_fp\0"
+    "SSL_SESSION_set1_id_context\0"
+    "SSL_SESSION_to_bytes_full\0"
+    "SSL_accept\0"
+    "SSL_add_dir_cert_subjects_to_stack\0"
+    "SSL_add_file_cert_subjects_to_stack\0"
+    "SSL_check_private_key\0"
+    "SSL_clear\0"
+    "SSL_connect\0"
+    "SSL_do_handshake\0"
+    "SSL_load_client_CA_file\0"
+    "SSL_new\0"
+    "SSL_peek\0"
+    "SSL_read\0"
+    "SSL_renegotiate\0"
+    "SSL_set1_tls_channel_id\0"
+    "SSL_set_cipher_list\0"
+    "SSL_set_fd\0"
+    "SSL_set_rfd\0"
+    "SSL_set_session_id_context\0"
+    "SSL_set_tlsext_host_name\0"
+    "SSL_set_tmp_dh\0"
+    "SSL_set_tmp_ecdh\0"
+    "SSL_set_wfd\0"
+    "SSL_shutdown\0"
+    "SSL_use_PrivateKey\0"
+    "SSL_use_PrivateKey_ASN1\0"
+    "SSL_use_PrivateKey_file\0"
+    "SSL_use_RSAPrivateKey\0"
+    "SSL_use_RSAPrivateKey_ASN1\0"
+    "SSL_use_RSAPrivateKey_file\0"
+    "SSL_use_certificate\0"
+    "SSL_use_certificate_ASN1\0"
+    "SSL_use_certificate_file\0"
+    "SSL_use_psk_identity_hint\0"
+    "SSL_write\0"
+    "d2i_SSL_SESSION\0"
+    "do_ssl3_write\0"
+    "dtls1_accept\0"
+    "dtls1_buffer_record\0"
+    "dtls1_check_timeout_num\0"
+    "dtls1_connect\0"
+    "dtls1_do_write\0"
+    "dtls1_get_buffered_message\0"
+    "dtls1_get_hello_verify\0"
+    "dtls1_get_message\0"
+    "dtls1_get_message_fragment\0"
+    "dtls1_hm_fragment_new\0"
+    "dtls1_preprocess_fragment\0"
+    "dtls1_process_fragment\0"
+    "dtls1_process_record\0"
+    "dtls1_read_bytes\0"
+    "dtls1_seal_record\0"
+    "dtls1_send_hello_verify_request\0"
+    "dtls1_write_app_data\0"
+    "i2d_SSL_SESSION\0"
+    "ssl3_accept\0"
+    "ssl3_cert_verify_hash\0"
+    "ssl3_check_cert_and_algorithm\0"
+    "ssl3_check_certificate_for_cipher\0"
+    "ssl3_connect\0"
+    "ssl3_ctrl\0"
+    "ssl3_ctx_ctrl\0"
+    "ssl3_digest_cached_records\0"
+    "ssl3_do_change_cipher_spec\0"
+    "ssl3_expect_change_cipher_spec\0"
+    "ssl3_get_cert_status\0"
+    "ssl3_get_cert_verify\0"
+    "ssl3_get_certificate_request\0"
+    "ssl3_get_channel_id\0"
+    "ssl3_get_client_certificate\0"
+    "ssl3_get_client_hello\0"
+    "ssl3_get_client_key_exchange\0"
+    "ssl3_get_finished\0"
+    "ssl3_get_initial_bytes\0"
+    "ssl3_get_message\0"
+    "ssl3_get_new_session_ticket\0"
+    "ssl3_get_next_proto\0"
+    "ssl3_get_record\0"
+    "ssl3_get_server_certificate\0"
+    "ssl3_get_server_done\0"
+    "ssl3_get_server_hello\0"
+    "ssl3_get_server_key_exchange\0"
+    "ssl3_get_v2_client_hello\0"
+    "ssl3_handshake_mac\0"
+    "ssl3_output_cert_chain\0"
+    "ssl3_prf\0"
+    "ssl3_read_bytes\0"
+    "ssl3_read_n\0"
+    "ssl3_record_sequence_update\0"
+    "ssl3_seal_record\0"
+    "ssl3_send_cert_verify\0"
+    "ssl3_send_certificate_request\0"
+    "ssl3_send_channel_id\0"
+    "ssl3_send_client_certificate\0"
+    "ssl3_send_client_hello\0"
+    "ssl3_send_client_key_exchange\0"
+    "ssl3_send_server_certificate\0"
+    "ssl3_send_server_hello\0"
+    "ssl3_send_server_key_exchange\0"
+    "ssl3_setup_read_buffer\0"
+    "ssl3_setup_write_buffer\0"
+    "ssl3_write_bytes\0"
+    "ssl3_write_pending\0"
+    "ssl_add_cert_chain\0"
+    "ssl_add_cert_to_buf\0"
+    "ssl_add_clienthello_renegotiate_ext\0"
+    "ssl_add_clienthello_tlsext\0"
+    "ssl_add_clienthello_use_srtp_ext\0"
+    "ssl_add_serverhello_renegotiate_ext\0"
+    "ssl_add_serverhello_tlsext\0"
+    "ssl_add_serverhello_use_srtp_ext\0"
+    "ssl_build_cert_chain\0"
+    "ssl_bytes_to_cipher_list\0"
+    "ssl_cert_dup\0"
+    "ssl_cert_inst\0"
+    "ssl_cert_new\0"
+    "ssl_check_serverhello_tlsext\0"
+    "ssl_check_srvr_ecc_cert_and_alg\0"
+    "ssl_cipher_process_rulestr\0"
+    "ssl_cipher_strength_sort\0"
+    "ssl_create_cipher_list\0"
+    "ssl_ctx_log_master_secret\0"
+    "ssl_ctx_log_rsa_client_key_exchange\0"
+    "ssl_ctx_make_profiles\0"
+    "ssl_get_new_session\0"
+    "ssl_get_prev_session\0"
+    "ssl_get_server_cert_index\0"
+    "ssl_get_sign_pkey\0"
+    "ssl_init_wbio_buffer\0"
+    "ssl_parse_clienthello_renegotiate_ext\0"
+    "ssl_parse_clienthello_tlsext\0"
+    "ssl_parse_clienthello_use_srtp_ext\0"
+    "ssl_parse_serverhello_renegotiate_ext\0"
+    "ssl_parse_serverhello_tlsext\0"
+    "ssl_parse_serverhello_use_srtp_ext\0"
+    "ssl_scan_clienthello_tlsext\0"
+    "ssl_scan_serverhello_tlsext\0"
+    "ssl_sess_cert_new\0"
+    "ssl_set_cert\0"
+    "ssl_set_pkey\0"
+    "ssl_verify_cert_chain\0"
+    "tls12_check_peer_sigalg\0"
+    "tls1_aead_ctx_init\0"
+    "tls1_cert_verify_mac\0"
+    "tls1_change_cipher_state\0"
+    "tls1_change_cipher_state_aead\0"
+    "tls1_check_duplicate_extensions\0"
+    "tls1_enc\0"
+    "tls1_export_keying_material\0"
+    "tls1_prf\0"
+    "tls1_setup_key_block\0"
+    "ASN1_digest\0"
+    "ASN1_item_sign_ctx\0"
+    "ASN1_item_verify\0"
+    "NETSCAPE_SPKI_b64_decode\0"
+    "NETSCAPE_SPKI_b64_encode\0"
+    "PKCS7_get_CRLs\0"
+    "PKCS7_get_certificates\0"
+    "X509_ATTRIBUTE_create_by_NID\0"
+    "X509_ATTRIBUTE_create_by_OBJ\0"
+    "X509_ATTRIBUTE_create_by_txt\0"
+    "X509_ATTRIBUTE_get0_data\0"
+    "X509_ATTRIBUTE_set1_data\0"
+    "X509_CRL_add0_revoked\0"
+    "X509_CRL_diff\0"
+    "X509_CRL_print_fp\0"
+    "X509_EXTENSION_create_by_NID\0"
+    "X509_EXTENSION_create_by_OBJ\0"
+    "X509_INFO_new\0"
+    "X509_NAME_ENTRY_create_by_NID\0"
+    "X509_NAME_ENTRY_create_by_txt\0"
+    "X509_NAME_ENTRY_set_object\0"
+    "X509_NAME_add_entry\0"
+    "X509_NAME_oneline\0"
+    "X509_NAME_print\0"
+    "X509_PKEY_new\0"
+    "X509_PUBKEY_get\0"
+    "X509_PUBKEY_set\0"
+    "X509_REQ_check_private_key\0"
+    "X509_REQ_print_ex\0"
+    "X509_REQ_print_fp\0"
+    "X509_REQ_to_X509\0"
+    "X509_STORE_CTX_get1_issuer\0"
+    "X509_STORE_CTX_init\0"
+    "X509_STORE_CTX_new\0"
+    "X509_STORE_CTX_purpose_inherit\0"
+    "X509_STORE_add_cert\0"
+    "X509_STORE_add_crl\0"
+    "X509_TRUST_add\0"
+    "X509_TRUST_set\0"
+    "X509_check_private_key\0"
+    "X509_get_pubkey_parameters\0"
+    "X509_load_cert_crl_file\0"
+    "X509_load_cert_file\0"
+    "X509_load_crl_file\0"
+    "X509_print_ex_fp\0"
+    "X509_to_X509_REQ\0"
+    "X509_verify_cert\0"
+    "X509at_add1_attr\0"
+    "X509v3_add_ext\0"
+    "add_cert_dir\0"
+    "by_file_ctrl\0"
+    "check_policy\0"
+    "dir_ctrl\0"
+    "get_cert_by_subject\0"
+    "i2d_DSA_PUBKEY\0"
+    "i2d_EC_PUBKEY\0"
+    "i2d_RSA_PUBKEY\0"
+    "pkcs7_parse_header\0"
+    "x509_name_encode\0"
+    "x509_name_ex_d2i\0"
+    "x509_name_ex_new\0"
+    "SXNET_add_id_INTEGER\0"
+    "SXNET_add_id_asc\0"
+    "SXNET_add_id_ulong\0"
+    "SXNET_get_id_asc\0"
+    "SXNET_get_id_ulong\0"
+    "X509V3_EXT_add\0"
+    "X509V3_EXT_add_alias\0"
+    "X509V3_EXT_free\0"
+    "X509V3_EXT_i2d\0"
+    "X509V3_EXT_nconf\0"
+    "X509V3_add1_i2d\0"
+    "X509V3_add_value\0"
+    "X509V3_get_section\0"
+    "X509V3_get_string\0"
+    "X509V3_get_value_bool\0"
+    "X509V3_parse_list\0"
+    "X509_PURPOSE_add\0"
+    "X509_PURPOSE_set\0"
+    "a2i_GENERAL_NAME\0"
+    "copy_email\0"
+    "copy_issuer\0"
+    "do_dirname\0"
+    "do_ext_i2d\0"
+    "do_ext_nconf\0"
+    "gnames_from_sectname\0"
+    "hex_to_string\0"
+    "i2s_ASN1_ENUMERATED\0"
+    "i2s_ASN1_IA5STRING\0"
+    "i2s_ASN1_INTEGER\0"
+    "i2v_AUTHORITY_INFO_ACCESS\0"
+    "notice_section\0"
+    "nref_nos\0"
+    "policy_section\0"
+    "process_pci_value\0"
+    "r2i_certpol\0"
+    "r2i_pci\0"
+    "s2i_ASN1_IA5STRING\0"
+    "s2i_ASN1_INTEGER\0"
+    "s2i_ASN1_OCTET_STRING\0"
+    "s2i_skey_id\0"
+    "set_dist_point_name\0"
+    "string_to_hex\0"
+    "v2i_ASN1_BIT_STRING\0"
+    "v2i_AUTHORITY_INFO_ACCESS\0"
+    "v2i_AUTHORITY_KEYID\0"
+    "v2i_BASIC_CONSTRAINTS\0"
+    "v2i_EXTENDED_KEY_USAGE\0"
+    "v2i_GENERAL_NAMES\0"
+    "v2i_GENERAL_NAME_ex\0"
+    "v2i_NAME_CONSTRAINTS\0"
+    "v2i_POLICY_CONSTRAINTS\0"
+    "v2i_POLICY_MAPPINGS\0"
+    "v2i_crld\0"
+    "v2i_idp\0"
+    "v2i_issuer_alt\0"
+    "v2i_subject_alt\0"
+    "v3_generic_extension\0"
+    "";
+
+const uint32_t kOpenSSLReasonValues[] = {
+    0xc3207ba,
+    0xc3287c7,
+    0xc3307d6,
+    0xc3387e6,
+    0xc3407f5,
+    0xc34880e,
+    0xc35081a,
+    0xc358837,
+    0xc360849,
+    0xc368857,
+    0xc370867,
+    0xc378874,
+    0xc380884,
+    0xc38888f,
+    0xc3908a5,
+    0xc3988b4,
+    0xc3a08c8,
+    0x1032146b,
+    0x10329477,
+    0x10331490,
+    0x103394a3,
+    0x10340dd4,
+    0x103494b6,
+    0x103514cb,
+    0x103594fd,
+    0x10361516,
+    0x1036952b,
+    0x10371549,
+    0x10379558,
+    0x10381574,
+    0x1038958f,
+    0x1039159e,
+    0x103995ba,
+    0x103a15d5,
+    0x103a95ec,
+    0x103b15fd,
+    0x103b9611,
+    0x103c1630,
+    0x103c963f,
+    0x103d1656,
+    0x103d9669,
+    0x103e0b5f,
+    0x103e969a,
+    0x103f16ad,
+    0x103f96c7,
+    0x104016d7,
+    0x104096eb,
+    0x10411701,
+    0x10419719,
+    0x1042172e,
+    0x10429742,
+    0x10431754,
+    0x104385d0,
+    0x104408b4,
+    0x10449769,
+    0x10451780,
+    0x10459795,
+    0x104617a3,
+    0x1046967c,
+    0x104714de,
+    0x14320b42,
+    0x14328b50,
+    0x14330b5f,
+    0x14338b71,
+    0x18320083,
+    0x18328e3a,
+    0x18340e68,
+    0x18348e7c,
+    0x18358eb3,
+    0x18368ee0,
+    0x18370ef3,
+    0x18378f07,
+    0x18380f2b,
+    0x18388f39,
+    0x18390f4f,
+    0x18398f63,
+    0x183a0f73,
+    0x183b0f83,
+    0x183b8f98,
+    0x183c8fc3,
+    0x183d0fd7,
+    0x183d8fe7,
+    0x183e0b8e,
+    0x183e8ff4,
+    0x183f1006,
+    0x183f9011,
+    0x18401021,
+    0x18409032,
+    0x18411043,
+    0x18419055,
+    0x1842107e,
+    0x184290b0,
+    0x184310bf,
+    0x18451128,
+    0x1845913e,
+    0x18461159,
+    0x18468ecb,
+    0x184709cc,
+    0x18478094,
+    0x18480faf,
+    0x184890f4,
+    0x18490e50,
+    0x18498e91,
+    0x184a118f,
+    0x184a910c,
+    0x184b10d3,
+    0x184b8e2a,
+    0x184c1097,
+    0x184c866b,
+    0x184d1174,
+    0x203211b6,
+    0x243211c2,
+    0x243288fa,
+    0x243311d4,
+    0x243391e1,
+    0x243411ee,
+    0x24349200,
+    0x2435120f,
+    0x2435922c,
+    0x24361239,
+    0x24369247,
+    0x24371255,
+    0x24379263,
+    0x2438126c,
+    0x24389279,
+    0x2439128c,
+    0x28320b82,
+    0x28328b8e,
+    0x28330b5f,
+    0x28338ba1,
+    0x2c322b08,
+    0x2c32ab16,
+    0x2c332b28,
+    0x2c33ab3a,
+    0x2c342b4e,
+    0x2c34ab60,
+    0x2c352b7b,
+    0x2c35ab8d,
+    0x2c362ba0,
+    0x2c3682f3,
+    0x2c372bad,
+    0x2c37abbf,
+    0x2c382bd2,
+    0x2c38abe0,
+    0x2c392bf0,
+    0x2c39ac02,
+    0x2c3a2c16,
+    0x2c3aac27,
+    0x2c3b134c,
+    0x2c3bac38,
+    0x2c3c2c4c,
+    0x2c3cac62,
+    0x2c3d2c7b,
+    0x2c3daca9,
+    0x2c3e2cb7,
+    0x2c3eaccf,
+    0x2c3f2ce7,
+    0x2c3facf4,
+    0x2c402d17,
+    0x2c40ad36,
+    0x2c4111b6,
+    0x2c41ad47,
+    0x2c422d5a,
+    0x2c429128,
+    0x2c432d6b,
+    0x2c4386a2,
+    0x2c442c98,
+    0x30320000,
+    0x30328015,
+    0x3033001f,
+    0x30338038,
+    0x3034004a,
+    0x30348064,
+    0x3035006b,
+    0x30358083,
+    0x30360094,
+    0x303680a1,
+    0x303700b0,
+    0x303780bd,
+    0x303800d0,
+    0x303880eb,
+    0x30390100,
+    0x30398114,
+    0x303a0128,
+    0x303a8139,
+    0x303b0152,
+    0x303b816f,
+    0x303c017d,
+    0x303c8191,
+    0x303d01a1,
+    0x303d81ba,
+    0x303e01ca,
+    0x303e81dd,
+    0x303f01ec,
+    0x303f81f8,
+    0x3040020d,
+    0x3040821d,
+    0x30410234,
+    0x30418241,
+    0x30420254,
+    0x30428263,
+    0x30430278,
+    0x30438299,
+    0x304402ac,
+    0x304482bf,
+    0x304502d8,
+    0x304582f3,
+    0x30460310,
+    0x30468329,
+    0x30470337,
+    0x30478348,
+    0x30480357,
+    0x3048836f,
+    0x30490381,
+    0x30498395,
+    0x304a03b4,
+    0x304a83c7,
+    0x304b03d2,
+    0x304b83e1,
+    0x304c03f2,
+    0x304c83fe,
+    0x304d0414,
+    0x304d8422,
+    0x304e0438,
+    0x304e844a,
+    0x304f045c,
+    0x304f846f,
+    0x30500482,
+    0x30508493,
+    0x305104a3,
+    0x305184bb,
+    0x305204d0,
+    0x305284e8,
+    0x305304fc,
+    0x30538514,
+    0x3054052d,
+    0x30548546,
+    0x30550563,
+    0x3055856e,
+    0x30560586,
+    0x30568596,
+    0x305705a7,
+    0x305785ba,
+    0x305805d0,
+    0x305885d9,
+    0x305905ee,
+    0x30598601,
+    0x305a0610,
+    0x305a8630,
+    0x305b063f,
+    0x305b864b,
+    0x305c066b,
+    0x305c8687,
+    0x305d0698,
+    0x305d86a2,
+    0x34320abc,
+    0x34328ad0,
+    0x34330aed,
+    0x34338b00,
+    0x34340b0f,
+    0x34348b2c,
+    0x3c320083,
+    0x3c328bcb,
+    0x3c330be4,
+    0x3c338bff,
+    0x3c340c1c,
+    0x3c348c37,
+    0x3c350c52,
+    0x3c358c67,
+    0x3c360c80,
+    0x3c368c98,
+    0x3c370ca9,
+    0x3c378cb7,
+    0x3c380cc4,
+    0x3c388cd8,
+    0x3c390b8e,
+    0x3c398cec,
+    0x3c3a0d00,
+    0x3c3a8874,
+    0x3c3b0d10,
+    0x3c3b8d2b,
+    0x3c3c0d3d,
+    0x3c3c8d53,
+    0x3c3d0d5d,
+    0x3c3d8d71,
+    0x3c3e0d7f,
+    0x3c3e8da4,
+    0x3c3f0bb7,
+    0x3c3f8d8d,
+    0x403217ba,
+    0x403297d0,
+    0x403317fe,
+    0x40339808,
+    0x4034181f,
+    0x4034983d,
+    0x4035184d,
+    0x4035985f,
+    0x4036186c,
+    0x40369878,
+    0x4037188d,
+    0x403798a2,
+    0x403818b4,
+    0x403898bf,
+    0x403918d1,
+    0x40398dd4,
+    0x403a18e1,
+    0x403a98f4,
+    0x403b1915,
+    0x403b9926,
+    0x403c1936,
+    0x403c8064,
+    0x403d1942,
+    0x403d995e,
+    0x403e1974,
+    0x403e9983,
+    0x403f1996,
+    0x403f99b0,
+    0x404019be,
+    0x404099d3,
+    0x404119e7,
+    0x40419a04,
+    0x40421a1d,
+    0x40429a38,
+    0x40431a51,
+    0x40439a64,
+    0x40441a78,
+    0x40449a90,
+    0x40451aa0,
+    0x40459aae,
+    0x40461acc,
+    0x40468094,
+    0x40471ae1,
+    0x40479af3,
+    0x40481b17,
+    0x40489b37,
+    0x40491b4b,
+    0x40499b60,
+    0x404a1b79,
+    0x404a9bb3,
+    0x404b1bcd,
+    0x404b9beb,
+    0x404c1c06,
+    0x404c9c20,
+    0x404d1c37,
+    0x404d9c5f,
+    0x404e1c76,
+    0x404e9c92,
+    0x404f1cae,
+    0x404f9ccf,
+    0x40501cf1,
+    0x40509d0d,
+    0x40511d21,
+    0x40519d2e,
+    0x40521d45,
+    0x40529d55,
+    0x40531d65,
+    0x40539d79,
+    0x40541d94,
+    0x40549da4,
+    0x40551dbb,
+    0x40559dca,
+    0x40561de5,
+    0x40569dfd,
+    0x40571e19,
+    0x40579e32,
+    0x40581e45,
+    0x40589e5a,
+    0x40591e7d,
+    0x40599e8b,
+    0x405a1e98,
+    0x405a9eb1,
+    0x405b1ec9,
+    0x405b9edc,
+    0x405c1ef1,
+    0x405c9f03,
+    0x405d1f18,
+    0x405d9f28,
+    0x405e1f41,
+    0x405e9f55,
+    0x405f1f65,
+    0x405f9f7d,
+    0x40601f8e,
+    0x40609fa1,
+    0x40611fb2,
+    0x40619fd0,
+    0x40621fe1,
+    0x40629fee,
+    0x40632005,
+    0x4063a046,
+    0x4064205d,
+    0x4064a06a,
+    0x40652078,
+    0x4065a09a,
+    0x406620c2,
+    0x4066a0d7,
+    0x406720ee,
+    0x4067a0ff,
+    0x40682110,
+    0x4068a121,
+    0x40692136,
+    0x4069a14d,
+    0x406a215e,
+    0x406aa177,
+    0x406b2192,
+    0x406ba1a9,
+    0x406c2216,
+    0x406ca237,
+    0x406d224a,
+    0x406da26b,
+    0x406e2286,
+    0x406ea2a1,
+    0x406f22c2,
+    0x406fa2e8,
+    0x40702308,
+    0x4070a324,
+    0x407124b1,
+    0x4071a4d4,
+    0x407224ea,
+    0x4072a509,
+    0x40732521,
+    0x4073a541,
+    0x4074276b,
+    0x4074a790,
+    0x407527ab,
+    0x4075a7ca,
+    0x407627f9,
+    0x4076a821,
+    0x40772852,
+    0x4077a871,
+    0x40782896,
+    0x4078a8ad,
+    0x407928c0,
+    0x4079a8dd,
+    0x407a0782,
+    0x407aa8ef,
+    0x407b2902,
+    0x407ba91b,
+    0x407c2933,
+    0x407c90b0,
+    0x407d2947,
+    0x407da961,
+    0x407e2972,
+    0x407ea986,
+    0x407f2994,
+    0x407fa9af,
+    0x40801279,
+    0x4080a9d4,
+    0x408129f6,
+    0x4081aa11,
+    0x40822a26,
+    0x4082aa3e,
+    0x40832a56,
+    0x4083aa6d,
+    0x40842a83,
+    0x4084aa8f,
+    0x40852aa2,
+    0x4085aab7,
+    0x40862ac9,
+    0x4086aade,
+    0x40872ae7,
+    0x40879c4d,
+    0x40880083,
+    0x4088a025,
+    0x40890a0a,
+    0x4089a1c1,
+    0x408a1b9c,
+    0x408aa1eb,
+    0x408b283a,
+    0x41f423dc,
+    0x41f9246e,
+    0x41fe2361,
+    0x41fea592,
+    0x41ff2683,
+    0x420323f5,
+    0x42082417,
+    0x4208a453,
+    0x42092345,
+    0x4209a48d,
+    0x420a239c,
+    0x420aa37c,
+    0x420b23bc,
+    0x420ba435,
+    0x420c269f,
+    0x420ca55f,
+    0x420d2579,
+    0x420da5b0,
+    0x421225ca,
+    0x42172666,
+    0x4217a60c,
+    0x421c262e,
+    0x421f25e9,
+    0x422126b6,
+    0x42262649,
+    0x422b274f,
+    0x422ba718,
+    0x422c2737,
+    0x422ca6f2,
+    0x422d26d1,
+    0x443206ad,
+    0x443286bc,
+    0x443306c8,
+    0x443386d6,
+    0x443406e9,
+    0x443486fa,
+    0x44350701,
+    0x4435870b,
+    0x4436071e,
+    0x44368734,
+    0x44370746,
+    0x44378753,
+    0x44380762,
+    0x4438876a,
+    0x44390782,
+    0x44398790,
+    0x443a07a3,
+    0x4c3212a3,
+    0x4c3292b3,
+    0x4c3312c6,
+    0x4c3392e6,
+    0x4c340094,
+    0x4c3480b0,
+    0x4c3512f2,
+    0x4c359300,
+    0x4c36131c,
+    0x4c36932f,
+    0x4c37133e,
+    0x4c37934c,
+    0x4c381361,
+    0x4c38936d,
+    0x4c39138d,
+    0x4c3993b7,
+    0x4c3a13d0,
+    0x4c3a93e9,
+    0x4c3b05d0,
+    0x4c3b9402,
+    0x4c3c1414,
+    0x4c3c9423,
+    0x4c3d10b0,
+    0x4c3d943c,
+    0x4c3e1449,
+    0x50322d7d,
+    0x5032ad8c,
+    0x50332d97,
+    0x5033ada7,
+    0x50342dc0,
+    0x5034adda,
+    0x50352de8,
+    0x5035adfe,
+    0x50362e10,
+    0x5036ae26,
+    0x50372e3f,
+    0x5037ae52,
+    0x50382e6a,
+    0x5038ae7b,
+    0x50392e90,
+    0x5039aea4,
+    0x503a2ec4,
+    0x503aaeda,
+    0x503b2ef2,
+    0x503baf04,
+    0x503c2f20,
+    0x503caf37,
+    0x503d2f50,
+    0x503daf66,
+    0x503e2f73,
+    0x503eaf89,
+    0x503f2f9b,
+    0x503f8348,
+    0x50402fae,
+    0x5040afbe,
+    0x50412fd8,
+    0x5041afe7,
+    0x50423001,
+    0x5042b01e,
+    0x5043302e,
+    0x5043b03e,
+    0x5044304d,
+    0x50448414,
+    0x50453061,
+    0x5045b07f,
+    0x50463092,
+    0x5046b0a8,
+    0x504730ba,
+    0x5047b0cf,
+    0x504830f5,
+    0x5048b103,
+    0x50493116,
+    0x5049b12b,
+    0x504a3141,
+    0x504ab151,
+    0x504b3171,
+    0x504bb184,
+    0x504c31a7,
+    0x504cb1d5,
+    0x504d31e7,
+    0x504db204,
+    0x504e321f,
+    0x504eb23b,
+    0x504f324d,
+    0x504fb264,
+    0x50503273,
+    0x50508687,
+    0x50513286,
+    0x58320e12,
+    0x68320dd4,
+    0x68328b8e,
+    0x68330ba1,
+    0x68338de2,
+    0x68340df2,
+    0x6c320db0,
+    0x6c328b71,
+    0x6c330dbb,
+    0x74320980,
+    0x783208e5,
+    0x783288fa,
+    0x78330906,
+    0x78338083,
+    0x78340915,
+    0x7834892a,
+    0x78350949,
+    0x7835896b,
+    0x78360980,
+    0x78368996,
+    0x783709a6,
+    0x783789b9,
+    0x783809cc,
+    0x783889de,
+    0x783909eb,
+    0x78398a0a,
+    0x783a0a1f,
+    0x783a8a2d,
+    0x783b0a37,
+    0x783b8a4b,
+    0x783c0a62,
+    0x783c8a77,
+    0x783d0a8e,
+    0x783d8aa3,
+    0x783e09f9,
+    0x803211a5,
+};
+
+const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]);
+
+const char kOpenSSLReasonStringData[] =
+    "ASN1_LENGTH_MISMATCH\0"
+    "AUX_ERROR\0"
+    "BAD_GET_ASN1_OBJECT_CALL\0"
+    "BAD_OBJECT_HEADER\0"
+    "BMPSTRING_IS_WRONG_LENGTH\0"
+    "BN_LIB\0"
+    "BOOLEAN_IS_WRONG_LENGTH\0"
+    "BUFFER_TOO_SMALL\0"
+    "DECODE_ERROR\0"
+    "DEPTH_EXCEEDED\0"
+    "ENCODE_ERROR\0"
+    "ERROR_GETTING_TIME\0"
+    "EXPECTING_AN_ASN1_SEQUENCE\0"
+    "EXPECTING_AN_INTEGER\0"
+    "EXPECTING_AN_OBJECT\0"
+    "EXPECTING_A_BOOLEAN\0"
+    "EXPECTING_A_TIME\0"
+    "EXPLICIT_LENGTH_MISMATCH\0"
+    "EXPLICIT_TAG_NOT_CONSTRUCTED\0"
+    "FIELD_MISSING\0"
+    "FIRST_NUM_TOO_LARGE\0"
+    "HEADER_TOO_LONG\0"
+    "ILLEGAL_BITSTRING_FORMAT\0"
+    "ILLEGAL_BOOLEAN\0"
+    "ILLEGAL_CHARACTERS\0"
+    "ILLEGAL_FORMAT\0"
+    "ILLEGAL_HEX\0"
+    "ILLEGAL_IMPLICIT_TAG\0"
+    "ILLEGAL_INTEGER\0"
+    "ILLEGAL_NESTED_TAGGING\0"
+    "ILLEGAL_NULL\0"
+    "ILLEGAL_NULL_VALUE\0"
+    "ILLEGAL_OBJECT\0"
+    "ILLEGAL_OPTIONAL_ANY\0"
+    "ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE\0"
+    "ILLEGAL_TAGGED_ANY\0"
+    "ILLEGAL_TIME_VALUE\0"
+    "INTEGER_NOT_ASCII_FORMAT\0"
+    "INTEGER_TOO_LARGE_FOR_LONG\0"
+    "INVALID_BIT_STRING_BITS_LEFT\0"
+    "INVALID_BMPSTRING_LENGTH\0"
+    "INVALID_DIGIT\0"
+    "INVALID_MODIFIER\0"
+    "INVALID_NUMBER\0"
+    "INVALID_OBJECT_ENCODING\0"
+    "INVALID_SEPARATOR\0"
+    "INVALID_TIME_FORMAT\0"
+    "INVALID_UNIVERSALSTRING_LENGTH\0"
+    "INVALID_UTF8STRING\0"
+    "LIST_ERROR\0"
+    "MALLOC_FAILURE\0"
+    "MISSING_ASN1_EOS\0"
+    "MISSING_EOC\0"
+    "MISSING_SECOND_NUMBER\0"
+    "MISSING_VALUE\0"
+    "MSTRING_NOT_UNIVERSAL\0"
+    "MSTRING_WRONG_TAG\0"
+    "NESTED_ASN1_ERROR\0"
+    "NESTED_ASN1_STRING\0"
+    "NON_HEX_CHARACTERS\0"
+    "NOT_ASCII_FORMAT\0"
+    "NOT_ENOUGH_DATA\0"
+    "NO_MATCHING_CHOICE_TYPE\0"
+    "NULL_IS_WRONG_LENGTH\0"
+    "OBJECT_NOT_ASCII_FORMAT\0"
+    "ODD_NUMBER_OF_CHARS\0"
+    "SECOND_NUMBER_TOO_LARGE\0"
+    "SEQUENCE_LENGTH_MISMATCH\0"
+    "SEQUENCE_NOT_CONSTRUCTED\0"
+    "SEQUENCE_OR_SET_NEEDS_CONFIG\0"
+    "SHORT_LINE\0"
+    "STREAMING_NOT_SUPPORTED\0"
+    "STRING_TOO_LONG\0"
+    "STRING_TOO_SHORT\0"
+    "TAG_VALUE_TOO_HIGH\0"
+    "TIME_NOT_ASCII_FORMAT\0"
+    "TOO_LONG\0"
+    "TYPE_NOT_CONSTRUCTED\0"
+    "TYPE_NOT_PRIMITIVE\0"
+    "UNEXPECTED_EOC\0"
+    "UNIVERSALSTRING_IS_WRONG_LENGTH\0"
+    "UNKNOWN_FORMAT\0"
+    "UNKNOWN_TAG\0"
+    "UNSUPPORTED_ANY_DEFINED_BY_TYPE\0"
+    "UNSUPPORTED_PUBLIC_KEY_TYPE\0"
+    "UNSUPPORTED_TYPE\0"
+    "WRONG_TAG\0"
+    "WRONG_TYPE\0"
+    "BAD_FOPEN_MODE\0"
+    "BROKEN_PIPE\0"
+    "CONNECT_ERROR\0"
+    "ERROR_SETTING_NBIO\0"
+    "INVALID_ARGUMENT\0"
+    "IN_USE\0"
+    "KEEPALIVE\0"
+    "NBIO_CONNECT_ERROR\0"
+    "NO_HOSTNAME_SPECIFIED\0"
+    "NO_PORT_SPECIFIED\0"
+    "NO_SUCH_FILE\0"
+    "NULL_PARAMETER\0"
+    "SYS_LIB\0"
+    "UNABLE_TO_CREATE_SOCKET\0"
+    "UNINITIALIZED\0"
+    "UNSUPPORTED_METHOD\0"
+    "WRITE_TO_READ_ONLY_BIO\0"
+    "ARG2_LT_ARG3\0"
+    "BAD_RECIPROCAL\0"
+    "BIGNUM_TOO_LONG\0"
+    "BITS_TOO_SMALL\0"
+    "CALLED_WITH_EVEN_MODULUS\0"
+    "DIV_BY_ZERO\0"
+    "EXPAND_ON_STATIC_BIGNUM_DATA\0"
+    "INPUT_NOT_REDUCED\0"
+    "INVALID_RANGE\0"
+    "NEGATIVE_NUMBER\0"
+    "NOT_A_SQUARE\0"
+    "NOT_INITIALIZED\0"
+    "NO_INVERSE\0"
+    "PRIVATE_KEY_TOO_LARGE\0"
+    "P_IS_NOT_PRIME\0"
+    "TOO_MANY_ITERATIONS\0"
+    "TOO_MANY_TEMPORARY_VARIABLES\0"
+    "AES_KEY_SETUP_FAILED\0"
+    "BAD_DECRYPT\0"
+    "BAD_KEY_LENGTH\0"
+    "CTRL_NOT_IMPLEMENTED\0"
+    "CTRL_OPERATION_NOT_IMPLEMENTED\0"
+    "DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH\0"
+    "INITIALIZATION_ERROR\0"
+    "INPUT_NOT_INITIALIZED\0"
+    "INVALID_AD_SIZE\0"
+    "INVALID_KEY_LENGTH\0"
+    "INVALID_NONCE_SIZE\0"
+    "INVALID_OPERATION\0"
+    "IV_TOO_LARGE\0"
+    "NO_CIPHER_SET\0"
+    "NO_DIRECTION_SET\0"
+    "OUTPUT_ALIASES_INPUT\0"
+    "TAG_TOO_LARGE\0"
+    "TOO_LARGE\0"
+    "UNSUPPORTED_AD_SIZE\0"
+    "UNSUPPORTED_INPUT_SIZE\0"
+    "UNSUPPORTED_KEY_SIZE\0"
+    "UNSUPPORTED_NONCE_SIZE\0"
+    "UNSUPPORTED_TAG_SIZE\0"
+    "WRONG_FINAL_BLOCK_LENGTH\0"
+    "LIST_CANNOT_BE_NULL\0"
+    "MISSING_CLOSE_SQUARE_BRACKET\0"
+    "MISSING_EQUAL_SIGN\0"
+    "NO_CLOSE_BRACE\0"
+    "UNABLE_TO_CREATE_NEW_SECTION\0"
+    "VARIABLE_HAS_NO_VALUE\0"
+    "BAD_GENERATOR\0"
+    "INVALID_PUBKEY\0"
+    "MODULUS_TOO_LARGE\0"
+    "NO_PRIVATE_VALUE\0"
+    "BAD_Q_VALUE\0"
+    "MISSING_PARAMETERS\0"
+    "NEED_NEW_SETUP_VALUES\0"
+    "BIGNUM_OUT_OF_RANGE\0"
+    "COORDINATES_OUT_OF_RANGE\0"
+    "D2I_ECPKPARAMETERS_FAILURE\0"
+    "EC_GROUP_NEW_BY_NAME_FAILURE\0"
+    "GROUP2PKPARAMETERS_FAILURE\0"
+    "I2D_ECPKPARAMETERS_FAILURE\0"
+    "INCOMPATIBLE_OBJECTS\0"
+    "INVALID_COMPRESSED_POINT\0"
+    "INVALID_COMPRESSION_BIT\0"
+    "INVALID_ENCODING\0"
+    "INVALID_FIELD\0"
+    "INVALID_FORM\0"
+    "INVALID_GROUP_ORDER\0"
+    "INVALID_PRIVATE_KEY\0"
+    "MISSING_PRIVATE_KEY\0"
+    "NON_NAMED_CURVE\0"
+    "PKPARAMETERS2GROUP_FAILURE\0"
+    "POINT_AT_INFINITY\0"
+    "POINT_IS_NOT_ON_CURVE\0"
+    "SLOT_FULL\0"
+    "UNDEFINED_GENERATOR\0"
+    "UNKNOWN_GROUP\0"
+    "UNKNOWN_ORDER\0"
+    "WRONG_CURVE_PARAMETERS\0"
+    "WRONG_ORDER\0"
+    "KDF_FAILED\0"
+    "POINT_ARITHMETIC_FAILURE\0"
+    "BAD_SIGNATURE\0"
+    "NOT_IMPLEMENTED\0"
+    "RANDOM_NUMBER_GENERATION_FAILED\0"
+    "OPERATION_NOT_SUPPORTED\0"
+    "BN_DECODE_ERROR\0"
+    "COMMAND_NOT_SUPPORTED\0"
+    "CONTEXT_NOT_INITIALISED\0"
+    "DIFFERENT_KEY_TYPES\0"
+    "DIFFERENT_PARAMETERS\0"
+    "DIGEST_AND_KEY_TYPE_NOT_SUPPORTED\0"
+    "EXPECTING_AN_EC_KEY_KEY\0"
+    "EXPECTING_AN_RSA_KEY\0"
+    "EXPECTING_A_DH_KEY\0"
+    "EXPECTING_A_DSA_KEY\0"
+    "ILLEGAL_OR_UNSUPPORTED_PADDING_MODE\0"
+    "INVALID_CURVE\0"
+    "INVALID_DIGEST_LENGTH\0"
+    "INVALID_DIGEST_TYPE\0"
+    "INVALID_KEYBITS\0"
+    "INVALID_MGF1_MD\0"
+    "INVALID_PADDING_MODE\0"
+    "INVALID_PSS_PARAMETERS\0"
+    "INVALID_PSS_SALTLEN\0"
+    "INVALID_SALT_LENGTH\0"
+    "INVALID_TRAILER\0"
+    "KEYS_NOT_SET\0"
+    "NO_DEFAULT_DIGEST\0"
+    "NO_KEY_SET\0"
+    "NO_MDC2_SUPPORT\0"
+    "NO_NID_FOR_CURVE\0"
+    "NO_OPERATION_SET\0"
+    "NO_PARAMETERS_SET\0"
+    "OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\0"
+    "OPERATON_NOT_INITIALIZED\0"
+    "PARAMETER_ENCODING_ERROR\0"
+    "UNKNOWN_DIGEST\0"
+    "UNKNOWN_MASK_DIGEST\0"
+    "UNKNOWN_MESSAGE_DIGEST_ALGORITHM\0"
+    "UNKNOWN_PUBLIC_KEY_TYPE\0"
+    "UNKNOWN_SIGNATURE_ALGORITHM\0"
+    "UNSUPPORTED_ALGORITHM\0"
+    "UNSUPPORTED_MASK_ALGORITHM\0"
+    "UNSUPPORTED_MASK_PARAMETER\0"
+    "UNSUPPORTED_SIGNATURE_TYPE\0"
+    "WRONG_PUBLIC_KEY_TYPE\0"
+    "OUTPUT_TOO_LARGE\0"
+    "UNKNOWN_NID\0"
+    "BAD_BASE64_DECODE\0"
+    "BAD_END_LINE\0"
+    "BAD_IV_CHARS\0"
+    "BAD_PASSWORD_READ\0"
+    "CIPHER_IS_NULL\0"
+    "ERROR_CONVERTING_PRIVATE_KEY\0"
+    "NOT_DEK_INFO\0"
+    "NOT_ENCRYPTED\0"
+    "NOT_PROC_TYPE\0"
+    "NO_START_LINE\0"
+    "READ_KEY\0"
+    "SHORT_HEADER\0"
+    "UNSUPPORTED_CIPHER\0"
+    "UNSUPPORTED_ENCRYPTION\0"
+    "BAD_PKCS12_DATA\0"
+    "BAD_PKCS12_VERSION\0"
+    "CIPHER_HAS_NO_OBJECT_IDENTIFIER\0"
+    "CRYPT_ERROR\0"
+    "ENCRYPT_ERROR\0"
+    "ERROR_SETTING_CIPHER_PARAMS\0"
+    "INCORRECT_PASSWORD\0"
+    "KEYGEN_FAILURE\0"
+    "KEY_GEN_ERROR\0"
+    "METHOD_NOT_SUPPORTED\0"
+    "MISSING_MAC\0"
+    "MULTIPLE_PRIVATE_KEYS_IN_PKCS12\0"
+    "PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED\0"
+    "PKCS12_TOO_DEEPLY_NESTED\0"
+    "PRIVATE_KEY_DECODE_ERROR\0"
+    "PRIVATE_KEY_ENCODE_ERROR\0"
+    "UNKNOWN_ALGORITHM\0"
+    "UNKNOWN_CIPHER\0"
+    "UNKNOWN_CIPHER_ALGORITHM\0"
+    "UNKNOWN_HASH\0"
+    "UNSUPPORTED_PRIVATE_KEY_ALGORITHM\0"
+    "BAD_E_VALUE\0"
+    "BAD_FIXED_HEADER_DECRYPT\0"
+    "BAD_PAD_BYTE_COUNT\0"
+    "BAD_RSA_PARAMETERS\0"
+    "BLOCK_TYPE_IS_NOT_01\0"
+    "BN_NOT_INITIALIZED\0"
+    "CANNOT_RECOVER_MULTI_PRIME_KEY\0"
+    "CRT_PARAMS_ALREADY_GIVEN\0"
+    "CRT_VALUES_INCORRECT\0"
+    "DATA_LEN_NOT_EQUAL_TO_MOD_LEN\0"
+    "DATA_TOO_LARGE\0"
+    "DATA_TOO_LARGE_FOR_KEY_SIZE\0"
+    "DATA_TOO_LARGE_FOR_MODULUS\0"
+    "DATA_TOO_SMALL\0"
+    "DATA_TOO_SMALL_FOR_KEY_SIZE\0"
+    "DIGEST_TOO_BIG_FOR_RSA_KEY\0"
+    "D_E_NOT_CONGRUENT_TO_1\0"
+    "EMPTY_PUBLIC_KEY\0"
+    "FIRST_OCTET_INVALID\0"
+    "INCONSISTENT_SET_OF_CRT_VALUES\0"
+    "INTERNAL_ERROR\0"
+    "INVALID_MESSAGE_LENGTH\0"
+    "KEY_SIZE_TOO_SMALL\0"
+    "LAST_OCTET_INVALID\0"
+    "MUST_HAVE_AT_LEAST_TWO_PRIMES\0"
+    "NO_PUBLIC_EXPONENT\0"
+    "NULL_BEFORE_BLOCK_MISSING\0"
+    "N_NOT_EQUAL_P_Q\0"
+    "OAEP_DECODING_ERROR\0"
+    "ONLY_ONE_OF_P_Q_GIVEN\0"
+    "OUTPUT_BUFFER_TOO_SMALL\0"
+    "PADDING_CHECK_FAILED\0"
+    "PKCS_DECODING_ERROR\0"
+    "SLEN_CHECK_FAILED\0"
+    "SLEN_RECOVERY_FAILED\0"
+    "UNKNOWN_ALGORITHM_TYPE\0"
+    "UNKNOWN_PADDING_TYPE\0"
+    "VALUE_MISSING\0"
+    "WRONG_SIGNATURE_LENGTH\0"
+    "APP_DATA_IN_HANDSHAKE\0"
+    "ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT\0"
+    "BAD_ALERT\0"
+    "BAD_CHANGE_CIPHER_SPEC\0"
+    "BAD_DATA_RETURNED_BY_CALLBACK\0"
+    "BAD_DH_P_LENGTH\0"
+    "BAD_DIGEST_LENGTH\0"
+    "BAD_ECC_CERT\0"
+    "BAD_ECPOINT\0"
+    "BAD_HANDSHAKE_LENGTH\0"
+    "BAD_HANDSHAKE_RECORD\0"
+    "BAD_HELLO_REQUEST\0"
+    "BAD_LENGTH\0"
+    "BAD_PACKET_LENGTH\0"
+    "BAD_RSA_ENCRYPT\0"
+    "BAD_SRTP_MKI_VALUE\0"
+    "BAD_SRTP_PROTECTION_PROFILE_LIST\0"
+    "BAD_SSL_FILETYPE\0"
+    "BAD_WRITE_RETRY\0"
+    "BIO_NOT_SET\0"
+    "CANNOT_SERIALIZE_PUBLIC_KEY\0"
+    "CA_DN_LENGTH_MISMATCH\0"
+    "CA_DN_TOO_LONG\0"
+    "CCS_RECEIVED_EARLY\0"
+    "CERTIFICATE_VERIFY_FAILED\0"
+    "CERT_CB_ERROR\0"
+    "CERT_LENGTH_MISMATCH\0"
+    "CHANNEL_ID_NOT_P256\0"
+    "CHANNEL_ID_SIGNATURE_INVALID\0"
+    "CIPHER_CODE_WRONG_LENGTH\0"
+    "CIPHER_OR_HASH_UNAVAILABLE\0"
+    "CLIENTHELLO_PARSE_FAILED\0"
+    "CLIENTHELLO_TLSEXT\0"
+    "CONNECTION_REJECTED\0"
+    "CONNECTION_TYPE_NOT_SET\0"
+    "COOKIE_MISMATCH\0"
+    "D2I_ECDSA_SIG\0"
+    "DATA_BETWEEN_CCS_AND_FINISHED\0"
+    "DATA_LENGTH_TOO_LONG\0"
+    "DECRYPTION_FAILED\0"
+    "DECRYPTION_FAILED_OR_BAD_RECORD_MAC\0"
+    "DH_PUBLIC_VALUE_LENGTH_IS_WRONG\0"
+    "DIGEST_CHECK_FAILED\0"
+    "DTLS_MESSAGE_TOO_BIG\0"
+    "ECC_CERT_NOT_FOR_SIGNING\0"
+    "EMPTY_SRTP_PROTECTION_PROFILE_LIST\0"
+    "EMS_STATE_INCONSISTENT\0"
+    "ENCRYPTED_LENGTH_TOO_LONG\0"
+    "ERROR_IN_RECEIVED_CIPHER_LIST\0"
+    "EVP_DIGESTSIGNFINAL_FAILED\0"
+    "EVP_DIGESTSIGNINIT_FAILED\0"
+    "EXCESSIVE_MESSAGE_SIZE\0"
+    "EXTRA_DATA_IN_MESSAGE\0"
+    "FRAGMENT_MISMATCH\0"
+    "GOT_A_FIN_BEFORE_A_CCS\0"
+    "GOT_CHANNEL_ID_BEFORE_A_CCS\0"
+    "GOT_NEXT_PROTO_BEFORE_A_CCS\0"
+    "GOT_NEXT_PROTO_WITHOUT_EXTENSION\0"
+    "HANDSHAKE_FAILURE_ON_CLIENT_HELLO\0"
+    "HANDSHAKE_RECORD_BEFORE_CCS\0"
+    "HTTPS_PROXY_REQUEST\0"
+    "HTTP_REQUEST\0"
+    "INAPPROPRIATE_FALLBACK\0"
+    "INVALID_COMMAND\0"
+    "INVALID_MESSAGE\0"
+    "INVALID_SSL_SESSION\0"
+    "INVALID_TICKET_KEYS_LENGTH\0"
+    "LENGTH_MISMATCH\0"
+    "LIBRARY_HAS_NO_CIPHERS\0"
+    "MISSING_DH_KEY\0"
+    "MISSING_ECDSA_SIGNING_CERT\0"
+    "MISSING_RSA_CERTIFICATE\0"
+    "MISSING_RSA_ENCRYPTING_CERT\0"
+    "MISSING_RSA_SIGNING_CERT\0"
+    "MISSING_TMP_DH_KEY\0"
+    "MISSING_TMP_ECDH_KEY\0"
+    "MIXED_SPECIAL_OPERATOR_WITH_GROUPS\0"
+    "MTU_TOO_SMALL\0"
+    "NESTED_GROUP\0"
+    "NO_CERTIFICATES_RETURNED\0"
+    "NO_CERTIFICATE_ASSIGNED\0"
+    "NO_CERTIFICATE_SET\0"
+    "NO_CIPHERS_AVAILABLE\0"
+    "NO_CIPHERS_PASSED\0"
+    "NO_CIPHERS_SPECIFIED\0"
+    "NO_CIPHER_MATCH\0"
+    "NO_COMPRESSION_SPECIFIED\0"
+    "NO_METHOD_SPECIFIED\0"
+    "NO_P256_SUPPORT\0"
+    "NO_PRIVATE_KEY_ASSIGNED\0"
+    "NO_RENEGOTIATION\0"
+    "NO_REQUIRED_DIGEST\0"
+    "NO_SHARED_CIPHER\0"
+    "NO_SHARED_SIGATURE_ALGORITHMS\0"
+    "NO_SRTP_PROFILES\0"
+    "NULL_SSL_CTX\0"
+    "NULL_SSL_METHOD_PASSED\0"
+    "OLD_SESSION_CIPHER_NOT_RETURNED\0"
+    "OLD_SESSION_VERSION_NOT_RETURNED\0"
+    "PACKET_LENGTH_TOO_LONG\0"
+    "PARSE_TLSEXT\0"
+    "PATH_TOO_LONG\0"
+    "PEER_DID_NOT_RETURN_A_CERTIFICATE\0"
+    "PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE\0"
+    "PROTOCOL_IS_SHUTDOWN\0"
+    "PSK_IDENTITY_NOT_FOUND\0"
+    "PSK_NO_CLIENT_CB\0"
+    "PSK_NO_SERVER_CB\0"
+    "READ_BIO_NOT_SET\0"
+    "READ_TIMEOUT_EXPIRED\0"
+    "RECORD_LENGTH_MISMATCH\0"
+    "RECORD_TOO_LARGE\0"
+    "RENEGOTIATE_EXT_TOO_LONG\0"
+    "RENEGOTIATION_ENCODING_ERR\0"
+    "RENEGOTIATION_MISMATCH\0"
+    "REQUIRED_CIPHER_MISSING\0"
+    "RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION\0"
+    "RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION\0"
+    "SCSV_RECEIVED_WHEN_RENEGOTIATING\0"
+    "SERVERHELLO_TLSEXT\0"
+    "SESSION_ID_CONTEXT_UNINITIALIZED\0"
+    "SESSION_MAY_NOT_BE_CREATED\0"
+    "SIGNATURE_ALGORITHMS_ERROR\0"
+    "SRTP_COULD_NOT_ALLOCATE_PROFILES\0"
+    "SRTP_PROTECTION_PROFILE_LIST_TOO_LONG\0"
+    "SRTP_UNKNOWN_PROTECTION_PROFILE\0"
+    "SSL3_EXT_INVALID_SERVERNAME\0"
+    "SSL3_EXT_INVALID_SERVERNAME_TYPE\0"
+    "SSLV3_ALERT_BAD_CERTIFICATE\0"
+    "SSLV3_ALERT_BAD_RECORD_MAC\0"
+    "SSLV3_ALERT_CERTIFICATE_EXPIRED\0"
+    "SSLV3_ALERT_CERTIFICATE_REVOKED\0"
+    "SSLV3_ALERT_CERTIFICATE_UNKNOWN\0"
+    "SSLV3_ALERT_CLOSE_NOTIFY\0"
+    "SSLV3_ALERT_DECOMPRESSION_FAILURE\0"
+    "SSLV3_ALERT_HANDSHAKE_FAILURE\0"
+    "SSLV3_ALERT_ILLEGAL_PARAMETER\0"
+    "SSLV3_ALERT_NO_CERTIFICATE\0"
+    "SSLV3_ALERT_UNEXPECTED_MESSAGE\0"
+    "SSLV3_ALERT_UNSUPPORTED_CERTIFICATE\0"
+    "SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION\0"
+    "SSL_HANDSHAKE_FAILURE\0"
+    "SSL_SESSION_ID_CALLBACK_FAILED\0"
+    "SSL_SESSION_ID_CONFLICT\0"
+    "SSL_SESSION_ID_CONTEXT_TOO_LONG\0"
+    "SSL_SESSION_ID_HAS_BAD_LENGTH\0"
+    "TLSV1_ALERT_ACCESS_DENIED\0"
+    "TLSV1_ALERT_DECODE_ERROR\0"
+    "TLSV1_ALERT_DECRYPTION_FAILED\0"
+    "TLSV1_ALERT_DECRYPT_ERROR\0"
+    "TLSV1_ALERT_EXPORT_RESTRICTION\0"
+    "TLSV1_ALERT_INAPPROPRIATE_FALLBACK\0"
+    "TLSV1_ALERT_INSUFFICIENT_SECURITY\0"
+    "TLSV1_ALERT_INTERNAL_ERROR\0"
+    "TLSV1_ALERT_NO_RENEGOTIATION\0"
+    "TLSV1_ALERT_PROTOCOL_VERSION\0"
+    "TLSV1_ALERT_RECORD_OVERFLOW\0"
+    "TLSV1_ALERT_UNKNOWN_CA\0"
+    "TLSV1_ALERT_USER_CANCELLED\0"
+    "TLSV1_BAD_CERTIFICATE_HASH_VALUE\0"
+    "TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE\0"
+    "TLSV1_CERTIFICATE_UNOBTAINABLE\0"
+    "TLSV1_UNRECOGNIZED_NAME\0"
+    "TLSV1_UNSUPPORTED_EXTENSION\0"
+    "TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER\0"
+    "TLS_ILLEGAL_EXPORTER_LABEL\0"
+    "TLS_INVALID_ECPOINTFORMAT_LIST\0"
+    "TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST\0"
+    "TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG\0"
+    "TOO_MANY_EMPTY_FRAGMENTS\0"
+    "TOO_MANY_WARNING_ALERTS\0"
+    "UNABLE_TO_FIND_ECDH_PARAMETERS\0"
+    "UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS\0"
+    "UNEXPECTED_GROUP_CLOSE\0"
+    "UNEXPECTED_MESSAGE\0"
+    "UNEXPECTED_OPERATOR_IN_GROUP\0"
+    "UNEXPECTED_RECORD\0"
+    "UNKNOWN_ALERT_TYPE\0"
+    "UNKNOWN_CERTIFICATE_TYPE\0"
+    "UNKNOWN_CIPHER_RETURNED\0"
+    "UNKNOWN_CIPHER_TYPE\0"
+    "UNKNOWN_KEY_EXCHANGE_TYPE\0"
+    "UNKNOWN_PROTOCOL\0"
+    "UNKNOWN_SSL_VERSION\0"
+    "UNKNOWN_STATE\0"
+    "UNPROCESSED_HANDSHAKE_DATA\0"
+    "UNSAFE_LEGACY_RENEGOTIATION_DISABLED\0"
+    "UNSUPPORTED_COMPRESSION_ALGORITHM\0"
+    "UNSUPPORTED_ELLIPTIC_CURVE\0"
+    "UNSUPPORTED_PROTOCOL\0"
+    "UNSUPPORTED_SSL_VERSION\0"
+    "USE_SRTP_NOT_NEGOTIATED\0"
+    "WRONG_CERTIFICATE_TYPE\0"
+    "WRONG_CIPHER_RETURNED\0"
+    "WRONG_CURVE\0"
+    "WRONG_MESSAGE_TYPE\0"
+    "WRONG_SIGNATURE_TYPE\0"
+    "WRONG_SSL_VERSION\0"
+    "WRONG_VERSION_NUMBER\0"
+    "X509_LIB\0"
+    "X509_VERIFICATION_SETUP_PROBLEMS\0"
+    "AKID_MISMATCH\0"
+    "BAD_PKCS7_VERSION\0"
+    "BAD_X509_FILETYPE\0"
+    "BASE64_DECODE_ERROR\0"
+    "CANT_CHECK_DH_KEY\0"
+    "CERT_ALREADY_IN_HASH_TABLE\0"
+    "CRL_ALREADY_DELTA\0"
+    "CRL_VERIFY_FAILURE\0"
+    "IDP_MISMATCH\0"
+    "INVALID_DIRECTORY\0"
+    "INVALID_FIELD_NAME\0"
+    "INVALID_TRUST\0"
+    "ISSUER_MISMATCH\0"
+    "KEY_TYPE_MISMATCH\0"
+    "KEY_VALUES_MISMATCH\0"
+    "LOADING_CERT_DIR\0"
+    "LOADING_DEFAULTS\0"
+    "NEWER_CRL_NOT_NEWER\0"
+    "NOT_PKCS7_SIGNED_DATA\0"
+    "NO_CERTIFICATES_INCLUDED\0"
+    "NO_CERT_SET_FOR_US_TO_VERIFY\0"
+    "NO_CRLS_INCLUDED\0"
+    "NO_CRL_NUMBER\0"
+    "PUBLIC_KEY_DECODE_ERROR\0"
+    "PUBLIC_KEY_ENCODE_ERROR\0"
+    "SHOULD_RETRY\0"
+    "UNABLE_TO_FIND_PARAMETERS_IN_CHAIN\0"
+    "UNABLE_TO_GET_CERTS_PUBLIC_KEY\0"
+    "UNKNOWN_KEY_TYPE\0"
+    "UNKNOWN_PURPOSE_ID\0"
+    "UNKNOWN_TRUST_ID\0"
+    "WRONG_LOOKUP_TYPE\0"
+    "BAD_IP_ADDRESS\0"
+    "BAD_OBJECT\0"
+    "BN_DEC2BN_ERROR\0"
+    "BN_TO_ASN1_INTEGER_ERROR\0"
+    "CANNOT_FIND_FREE_FUNCTION\0"
+    "DIRNAME_ERROR\0"
+    "DISTPOINT_ALREADY_SET\0"
+    "DUPLICATE_ZONE_ID\0"
+    "ERROR_CONVERTING_ZONE\0"
+    "ERROR_CREATING_EXTENSION\0"
+    "ERROR_IN_EXTENSION\0"
+    "EXPECTED_A_SECTION_NAME\0"
+    "EXTENSION_EXISTS\0"
+    "EXTENSION_NAME_ERROR\0"
+    "EXTENSION_NOT_FOUND\0"
+    "EXTENSION_SETTING_NOT_SUPPORTED\0"
+    "EXTENSION_VALUE_ERROR\0"
+    "ILLEGAL_EMPTY_EXTENSION\0"
+    "ILLEGAL_HEX_DIGIT\0"
+    "INCORRECT_POLICY_SYNTAX_TAG\0"
+    "INVALID_BOOLEAN_STRING\0"
+    "INVALID_EXTENSION_STRING\0"
+    "INVALID_MULTIPLE_RDNS\0"
+    "INVALID_NAME\0"
+    "INVALID_NULL_ARGUMENT\0"
+    "INVALID_NULL_NAME\0"
+    "INVALID_NULL_VALUE\0"
+    "INVALID_NUMBERS\0"
+    "INVALID_OBJECT_IDENTIFIER\0"
+    "INVALID_OPTION\0"
+    "INVALID_POLICY_IDENTIFIER\0"
+    "INVALID_PROXY_POLICY_SETTING\0"
+    "INVALID_PURPOSE\0"
+    "INVALID_SECTION\0"
+    "INVALID_SYNTAX\0"
+    "ISSUER_DECODE_ERROR\0"
+    "NEED_ORGANIZATION_AND_NUMBERS\0"
+    "NO_CONFIG_DATABASE\0"
+    "NO_ISSUER_CERTIFICATE\0"
+    "NO_ISSUER_DETAILS\0"
+    "NO_POLICY_IDENTIFIER\0"
+    "NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED\0"
+    "NO_PUBLIC_KEY\0"
+    "NO_SUBJECT_DETAILS\0"
+    "ODD_NUMBER_OF_DIGITS\0"
+    "OPERATION_NOT_DEFINED\0"
+    "OTHERNAME_ERROR\0"
+    "POLICY_LANGUAGE_ALREADY_DEFINED\0"
+    "POLICY_PATH_LENGTH\0"
+    "POLICY_PATH_LENGTH_ALREADY_DEFINED\0"
+    "POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY\0"
+    "SECTION_NOT_FOUND\0"
+    "UNABLE_TO_GET_ISSUER_DETAILS\0"
+    "UNABLE_TO_GET_ISSUER_KEYID\0"
+    "UNKNOWN_BIT_STRING_ARGUMENT\0"
+    "UNKNOWN_EXTENSION\0"
+    "UNKNOWN_EXTENSION_NAME\0"
+    "UNKNOWN_OPTION\0"
+    "UNSUPPORTED_OPTION\0"
+    "USER_TOO_LONG\0"
+    "";
+
diff --git a/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S
new file mode 100644
index 0000000..c414476
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/aes/aesv8-armx64.S
@@ -0,0 +1,751 @@
+#if defined(__aarch64__)
+#include "arm_arch.h"
+
+#if __ARM_MAX_ARCH__>=7
+.text
+#if !defined(__clang__)
+.arch	armv8-a+crypto
+#endif
+.align	5
+.Lrcon:
+.long	0x01,0x01,0x01,0x01
+.long	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d	// rotate-n-splat
+.long	0x1b,0x1b,0x1b,0x1b
+
+.globl	aes_v8_set_encrypt_key
+.type	aes_v8_set_encrypt_key,%function
+.align	5
+aes_v8_set_encrypt_key:
+.Lenc_key:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+	mov	x3,#-1
+	cmp	x0,#0
+	b.eq	.Lenc_key_abort
+	cmp	x2,#0
+	b.eq	.Lenc_key_abort
+	mov	x3,#-2
+	cmp	w1,#128
+	b.lt	.Lenc_key_abort
+	cmp	w1,#256
+	b.gt	.Lenc_key_abort
+	tst	w1,#0x3f
+	b.ne	.Lenc_key_abort
+
+	adr	x3,.Lrcon
+	cmp	w1,#192
+
+	eor	v0.16b,v0.16b,v0.16b
+	ld1	{v3.16b},[x0],#16
+	mov	w1,#8		// reuse w1
+	ld1	{v1.4s,v2.4s},[x3],#32
+
+	b.lt	.Loop128
+	b.eq	.L192
+	b	.L256
+
+.align	4
+.Loop128:
+	tbl	v6.16b,{v3.16b},v2.16b
+	ext	v5.16b,v0.16b,v3.16b,#12
+	st1	{v3.4s},[x2],#16
+	aese	v6.16b,v0.16b
+	subs	w1,w1,#1
+
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v6.16b,v6.16b,v1.16b
+	eor	v3.16b,v3.16b,v5.16b
+	shl	v1.16b,v1.16b,#1
+	eor	v3.16b,v3.16b,v6.16b
+	b.ne	.Loop128
+
+	ld1	{v1.4s},[x3]
+
+	tbl	v6.16b,{v3.16b},v2.16b
+	ext	v5.16b,v0.16b,v3.16b,#12
+	st1	{v3.4s},[x2],#16
+	aese	v6.16b,v0.16b
+
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v6.16b,v6.16b,v1.16b
+	eor	v3.16b,v3.16b,v5.16b
+	shl	v1.16b,v1.16b,#1
+	eor	v3.16b,v3.16b,v6.16b
+
+	tbl	v6.16b,{v3.16b},v2.16b
+	ext	v5.16b,v0.16b,v3.16b,#12
+	st1	{v3.4s},[x2],#16
+	aese	v6.16b,v0.16b
+
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v6.16b,v6.16b,v1.16b
+	eor	v3.16b,v3.16b,v5.16b
+	eor	v3.16b,v3.16b,v6.16b
+	st1	{v3.4s},[x2]
+	add	x2,x2,#0x50
+
+	mov	w12,#10
+	b	.Ldone
+
+.align	4
+.L192:
+	ld1	{v4.8b},[x0],#8
+	movi	v6.16b,#8			// borrow v6.16b
+	st1	{v3.4s},[x2],#16
+	sub	v2.16b,v2.16b,v6.16b	// adjust the mask
+
+.Loop192:
+	tbl	v6.16b,{v4.16b},v2.16b
+	ext	v5.16b,v0.16b,v3.16b,#12
+	st1	{v4.8b},[x2],#8
+	aese	v6.16b,v0.16b
+	subs	w1,w1,#1
+
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+
+	dup	v5.4s,v3.s[3]
+	eor	v5.16b,v5.16b,v4.16b
+	eor	v6.16b,v6.16b,v1.16b
+	ext	v4.16b,v0.16b,v4.16b,#12
+	shl	v1.16b,v1.16b,#1
+	eor	v4.16b,v4.16b,v5.16b
+	eor	v3.16b,v3.16b,v6.16b
+	eor	v4.16b,v4.16b,v6.16b
+	st1	{v3.4s},[x2],#16
+	b.ne	.Loop192
+
+	mov	w12,#12
+	add	x2,x2,#0x20
+	b	.Ldone
+
+.align	4
+.L256:
+	ld1	{v4.16b},[x0]
+	mov	w1,#7
+	mov	w12,#14
+	st1	{v3.4s},[x2],#16
+
+.Loop256:
+	tbl	v6.16b,{v4.16b},v2.16b
+	ext	v5.16b,v0.16b,v3.16b,#12
+	st1	{v4.4s},[x2],#16
+	aese	v6.16b,v0.16b
+	subs	w1,w1,#1
+
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v3.16b,v3.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v6.16b,v6.16b,v1.16b
+	eor	v3.16b,v3.16b,v5.16b
+	shl	v1.16b,v1.16b,#1
+	eor	v3.16b,v3.16b,v6.16b
+	st1	{v3.4s},[x2],#16
+	b.eq	.Ldone
+
+	dup	v6.4s,v3.s[3]		// just splat
+	ext	v5.16b,v0.16b,v4.16b,#12
+	aese	v6.16b,v0.16b
+
+	eor	v4.16b,v4.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v4.16b,v4.16b,v5.16b
+	ext	v5.16b,v0.16b,v5.16b,#12
+	eor	v4.16b,v4.16b,v5.16b
+
+	eor	v4.16b,v4.16b,v6.16b
+	b	.Loop256
+
+.Ldone:
+	str	w12,[x2]
+	mov	x3,#0
+
+.Lenc_key_abort:
+	mov	x0,x3			// return value
+	ldr	x29,[sp],#16
+	ret
+.size	aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
+
+.globl	aes_v8_set_decrypt_key
+.type	aes_v8_set_decrypt_key,%function
+.align	5
+aes_v8_set_decrypt_key:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+	bl	.Lenc_key
+
+	cmp	x0,#0
+	b.ne	.Ldec_key_abort
+
+	sub	x2,x2,#240		// restore original x2
+	mov	x4,#-16
+	add	x0,x2,x12,lsl#4	// end of key schedule
+
+	ld1	{v0.4s},[x2]
+	ld1	{v1.4s},[x0]
+	st1	{v0.4s},[x0],x4
+	st1	{v1.4s},[x2],#16
+
+.Loop_imc:
+	ld1	{v0.4s},[x2]
+	ld1	{v1.4s},[x0]
+	aesimc	v0.16b,v0.16b
+	aesimc	v1.16b,v1.16b
+	st1	{v0.4s},[x0],x4
+	st1	{v1.4s},[x2],#16
+	cmp	x0,x2
+	b.hi	.Loop_imc
+
+	ld1	{v0.4s},[x2]
+	aesimc	v0.16b,v0.16b
+	st1	{v0.4s},[x0]
+
+	eor	x0,x0,x0		// return value
+.Ldec_key_abort:
+	ldp	x29,x30,[sp],#16
+	ret
+.size	aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
+.globl	aes_v8_encrypt
+.type	aes_v8_encrypt,%function
+.align	5
+aes_v8_encrypt:
+	ldr	w3,[x2,#240]
+	ld1	{v0.4s},[x2],#16
+	ld1	{v2.16b},[x0]
+	sub	w3,w3,#2
+	ld1	{v1.4s},[x2],#16
+
+.Loop_enc:
+	aese	v2.16b,v0.16b
+	aesmc	v2.16b,v2.16b
+	ld1	{v0.4s},[x2],#16
+	subs	w3,w3,#2
+	aese	v2.16b,v1.16b
+	aesmc	v2.16b,v2.16b
+	ld1	{v1.4s},[x2],#16
+	b.gt	.Loop_enc
+
+	aese	v2.16b,v0.16b
+	aesmc	v2.16b,v2.16b
+	ld1	{v0.4s},[x2]
+	aese	v2.16b,v1.16b
+	eor	v2.16b,v2.16b,v0.16b
+
+	st1	{v2.16b},[x1]
+	ret
+.size	aes_v8_encrypt,.-aes_v8_encrypt
+.globl	aes_v8_decrypt
+.type	aes_v8_decrypt,%function
+.align	5
+aes_v8_decrypt:
+	ldr	w3,[x2,#240]
+	ld1	{v0.4s},[x2],#16
+	ld1	{v2.16b},[x0]
+	sub	w3,w3,#2
+	ld1	{v1.4s},[x2],#16
+
+.Loop_dec:
+	aesd	v2.16b,v0.16b
+	aesimc	v2.16b,v2.16b
+	ld1	{v0.4s},[x2],#16
+	subs	w3,w3,#2
+	aesd	v2.16b,v1.16b
+	aesimc	v2.16b,v2.16b
+	ld1	{v1.4s},[x2],#16
+	b.gt	.Loop_dec
+
+	aesd	v2.16b,v0.16b
+	aesimc	v2.16b,v2.16b
+	ld1	{v0.4s},[x2]
+	aesd	v2.16b,v1.16b
+	eor	v2.16b,v2.16b,v0.16b
+
+	st1	{v2.16b},[x1]
+	ret
+.size	aes_v8_decrypt,.-aes_v8_decrypt
+.globl	aes_v8_cbc_encrypt
+.type	aes_v8_cbc_encrypt,%function
+.align	5
+aes_v8_cbc_encrypt:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+	subs	x2,x2,#16
+	mov	x8,#16
+	b.lo	.Lcbc_abort
+	csel	x8,xzr,x8,eq
+
+	cmp	w5,#0			// en- or decrypting?
+	ldr	w5,[x3,#240]
+	and	x2,x2,#-16
+	ld1	{v6.16b},[x4]
+	ld1	{v0.16b},[x0],x8
+
+	ld1	{v16.4s,v17.4s},[x3]		// load key schedule...
+	sub	w5,w5,#6
+	add	x7,x3,x5,lsl#4	// pointer to last 7 round keys
+	sub	w5,w5,#2
+	ld1	{v18.4s,v19.4s},[x7],#32
+	ld1	{v20.4s,v21.4s},[x7],#32
+	ld1	{v22.4s,v23.4s},[x7],#32
+	ld1	{v7.4s},[x7]
+
+	add	x7,x3,#32
+	mov	w6,w5
+	b.eq	.Lcbc_dec
+
+	cmp	w5,#2
+	eor	v0.16b,v0.16b,v6.16b
+	eor	v5.16b,v16.16b,v7.16b
+	b.eq	.Lcbc_enc128
+
+	ld1	{v2.4s,v3.4s},[x7]
+	add	x7,x3,#16
+	add	x6,x3,#16*4
+	add	x12,x3,#16*5
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	add	x14,x3,#16*6
+	add	x3,x3,#16*7
+	b	.Lenter_cbc_enc
+
+.align	4
+.Loop_cbc_enc:
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	st1	{v6.16b},[x1],#16
+.Lenter_cbc_enc:
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v2.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v16.4s},[x6]
+	cmp	w5,#4
+	aese	v0.16b,v3.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v17.4s},[x12]
+	b.eq	.Lcbc_enc192
+
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v16.4s},[x14]
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v17.4s},[x3]
+	nop
+
+.Lcbc_enc192:
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	subs	x2,x2,#16
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	csel	x8,xzr,x8,eq
+	aese	v0.16b,v18.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v19.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v16.16b},[x0],x8
+	aese	v0.16b,v20.16b
+	aesmc	v0.16b,v0.16b
+	eor	v16.16b,v16.16b,v5.16b
+	aese	v0.16b,v21.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v17.4s},[x7]		// re-pre-load rndkey[1]
+	aese	v0.16b,v22.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v23.16b
+	eor	v6.16b,v0.16b,v7.16b
+	b.hs	.Loop_cbc_enc
+
+	st1	{v6.16b},[x1],#16
+	b	.Lcbc_done
+
+.align	5
+.Lcbc_enc128:
+	ld1	{v2.4s,v3.4s},[x7]
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	b	.Lenter_cbc_enc128
+.Loop_cbc_enc128:
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	st1	{v6.16b},[x1],#16
+.Lenter_cbc_enc128:
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	subs	x2,x2,#16
+	aese	v0.16b,v2.16b
+	aesmc	v0.16b,v0.16b
+	csel	x8,xzr,x8,eq
+	aese	v0.16b,v3.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v18.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v19.16b
+	aesmc	v0.16b,v0.16b
+	ld1	{v16.16b},[x0],x8
+	aese	v0.16b,v20.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v21.16b
+	aesmc	v0.16b,v0.16b
+	aese	v0.16b,v22.16b
+	aesmc	v0.16b,v0.16b
+	eor	v16.16b,v16.16b,v5.16b
+	aese	v0.16b,v23.16b
+	eor	v6.16b,v0.16b,v7.16b
+	b.hs	.Loop_cbc_enc128
+
+	st1	{v6.16b},[x1],#16
+	b	.Lcbc_done
+.align	5
+.Lcbc_dec:
+	ld1	{v18.16b},[x0],#16
+	subs	x2,x2,#32		// bias
+	add	w6,w5,#2
+	orr	v3.16b,v0.16b,v0.16b
+	orr	v1.16b,v0.16b,v0.16b
+	orr	v19.16b,v18.16b,v18.16b
+	b.lo	.Lcbc_dec_tail
+
+	orr	v1.16b,v18.16b,v18.16b
+	ld1	{v18.16b},[x0],#16
+	orr	v2.16b,v0.16b,v0.16b
+	orr	v3.16b,v1.16b,v1.16b
+	orr	v19.16b,v18.16b,v18.16b
+
+.Loop3x_cbc_dec:
+	aesd	v0.16b,v16.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v16.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v16.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v16.4s},[x7],#16
+	subs	w6,w6,#2
+	aesd	v0.16b,v17.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v17.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v17.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v17.4s},[x7],#16
+	b.gt	.Loop3x_cbc_dec
+
+	aesd	v0.16b,v16.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v16.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v16.16b
+	aesimc	v18.16b,v18.16b
+	eor	v4.16b,v6.16b,v7.16b
+	subs	x2,x2,#0x30
+	eor	v5.16b,v2.16b,v7.16b
+	csel	x6,x2,x6,lo			// x6, w6, is zero at this point
+	aesd	v0.16b,v17.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v17.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v17.16b
+	aesimc	v18.16b,v18.16b
+	eor	v17.16b,v3.16b,v7.16b
+	add	x0,x0,x6		// x0 is adjusted in such way that
+					// at exit from the loop v1.16b-v18.16b
+					// are loaded with last "words"
+	orr	v6.16b,v19.16b,v19.16b
+	mov	x7,x3
+	aesd	v0.16b,v20.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v20.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v20.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v2.16b},[x0],#16
+	aesd	v0.16b,v21.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v21.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v21.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v3.16b},[x0],#16
+	aesd	v0.16b,v22.16b
+	aesimc	v0.16b,v0.16b
+	aesd	v1.16b,v22.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v22.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v19.16b},[x0],#16
+	aesd	v0.16b,v23.16b
+	aesd	v1.16b,v23.16b
+	aesd	v18.16b,v23.16b
+	ld1	{v16.4s},[x7],#16	// re-pre-load rndkey[0]
+	add	w6,w5,#2
+	eor	v4.16b,v4.16b,v0.16b
+	eor	v5.16b,v5.16b,v1.16b
+	eor	v18.16b,v18.16b,v17.16b
+	ld1	{v17.4s},[x7],#16	// re-pre-load rndkey[1]
+	st1	{v4.16b},[x1],#16
+	orr	v0.16b,v2.16b,v2.16b
+	st1	{v5.16b},[x1],#16
+	orr	v1.16b,v3.16b,v3.16b
+	st1	{v18.16b},[x1],#16
+	orr	v18.16b,v19.16b,v19.16b
+	b.hs	.Loop3x_cbc_dec
+
+	cmn	x2,#0x30
+	b.eq	.Lcbc_done
+	nop
+
+.Lcbc_dec_tail:
+	aesd	v1.16b,v16.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v16.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v16.4s},[x7],#16
+	subs	w6,w6,#2
+	aesd	v1.16b,v17.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v17.16b
+	aesimc	v18.16b,v18.16b
+	ld1	{v17.4s},[x7],#16
+	b.gt	.Lcbc_dec_tail
+
+	aesd	v1.16b,v16.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v16.16b
+	aesimc	v18.16b,v18.16b
+	aesd	v1.16b,v17.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v17.16b
+	aesimc	v18.16b,v18.16b
+	aesd	v1.16b,v20.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v20.16b
+	aesimc	v18.16b,v18.16b
+	cmn	x2,#0x20
+	aesd	v1.16b,v21.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v21.16b
+	aesimc	v18.16b,v18.16b
+	eor	v5.16b,v6.16b,v7.16b
+	aesd	v1.16b,v22.16b
+	aesimc	v1.16b,v1.16b
+	aesd	v18.16b,v22.16b
+	aesimc	v18.16b,v18.16b
+	eor	v17.16b,v3.16b,v7.16b
+	aesd	v1.16b,v23.16b
+	aesd	v18.16b,v23.16b
+	b.eq	.Lcbc_dec_one
+	eor	v5.16b,v5.16b,v1.16b
+	eor	v17.16b,v17.16b,v18.16b
+	orr	v6.16b,v19.16b,v19.16b
+	st1	{v5.16b},[x1],#16
+	st1	{v17.16b},[x1],#16
+	b	.Lcbc_done
+
+.Lcbc_dec_one:
+	eor	v5.16b,v5.16b,v18.16b
+	orr	v6.16b,v19.16b,v19.16b
+	st1	{v5.16b},[x1],#16
+
+.Lcbc_done:
+	st1	{v6.16b},[x4]
+.Lcbc_abort:
+	ldr	x29,[sp],#16
+	ret
+.size	aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
+.globl	aes_v8_ctr32_encrypt_blocks
+.type	aes_v8_ctr32_encrypt_blocks,%function
+.align	5
+aes_v8_ctr32_encrypt_blocks:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+	ldr	w5,[x3,#240]
+
+	ldr	w8, [x4, #12]
+	ld1	{v0.4s},[x4]
+
+	ld1	{v16.4s,v17.4s},[x3]		// load key schedule...
+	sub	w5,w5,#4
+	mov	x12,#16
+	cmp	x2,#2
+	add	x7,x3,x5,lsl#4	// pointer to last 5 round keys
+	sub	w5,w5,#2
+	ld1	{v20.4s,v21.4s},[x7],#32
+	ld1	{v22.4s,v23.4s},[x7],#32
+	ld1	{v7.4s},[x7]
+	add	x7,x3,#32
+	mov	w6,w5
+	csel	x12,xzr,x12,lo
+#ifndef __ARMEB__
+	rev	w8, w8
+#endif
+	orr	v1.16b,v0.16b,v0.16b
+	add	w10, w8, #1
+	orr	v18.16b,v0.16b,v0.16b
+	add	w8, w8, #2
+	orr	v6.16b,v0.16b,v0.16b
+	rev	w10, w10
+	mov	v1.s[3],w10
+	b.ls	.Lctr32_tail
+	rev	w12, w8
+	sub	x2,x2,#3		// bias
+	mov	v18.s[3],w12
+	b	.Loop3x_ctr32
+
+.align	4
+.Loop3x_ctr32:
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v16.16b
+	aesmc	v1.16b,v1.16b
+	aese	v18.16b,v16.16b
+	aesmc	v18.16b,v18.16b
+	ld1	{v16.4s},[x7],#16
+	subs	w6,w6,#2
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v17.16b
+	aesmc	v1.16b,v1.16b
+	aese	v18.16b,v17.16b
+	aesmc	v18.16b,v18.16b
+	ld1	{v17.4s},[x7],#16
+	b.gt	.Loop3x_ctr32
+
+	aese	v0.16b,v16.16b
+	aesmc	v4.16b,v0.16b
+	aese	v1.16b,v16.16b
+	aesmc	v5.16b,v1.16b
+	ld1	{v2.16b},[x0],#16
+	orr	v0.16b,v6.16b,v6.16b
+	aese	v18.16b,v16.16b
+	aesmc	v18.16b,v18.16b
+	ld1	{v3.16b},[x0],#16
+	orr	v1.16b,v6.16b,v6.16b
+	aese	v4.16b,v17.16b
+	aesmc	v4.16b,v4.16b
+	aese	v5.16b,v17.16b
+	aesmc	v5.16b,v5.16b
+	ld1	{v19.16b},[x0],#16
+	mov	x7,x3
+	aese	v18.16b,v17.16b
+	aesmc	v17.16b,v18.16b
+	orr	v18.16b,v6.16b,v6.16b
+	add	w9,w8,#1
+	aese	v4.16b,v20.16b
+	aesmc	v4.16b,v4.16b
+	aese	v5.16b,v20.16b
+	aesmc	v5.16b,v5.16b
+	eor	v2.16b,v2.16b,v7.16b
+	add	w10,w8,#2
+	aese	v17.16b,v20.16b
+	aesmc	v17.16b,v17.16b
+	eor	v3.16b,v3.16b,v7.16b
+	add	w8,w8,#3
+	aese	v4.16b,v21.16b
+	aesmc	v4.16b,v4.16b
+	aese	v5.16b,v21.16b
+	aesmc	v5.16b,v5.16b
+	eor	v19.16b,v19.16b,v7.16b
+	rev	w9,w9
+	aese	v17.16b,v21.16b
+	aesmc	v17.16b,v17.16b
+	mov	v0.s[3], w9
+	rev	w10,w10
+	aese	v4.16b,v22.16b
+	aesmc	v4.16b,v4.16b
+	aese	v5.16b,v22.16b
+	aesmc	v5.16b,v5.16b
+	mov	v1.s[3], w10
+	rev	w12,w8
+	aese	v17.16b,v22.16b
+	aesmc	v17.16b,v17.16b
+	mov	v18.s[3], w12
+	subs	x2,x2,#3
+	aese	v4.16b,v23.16b
+	aese	v5.16b,v23.16b
+	aese	v17.16b,v23.16b
+
+	eor	v2.16b,v2.16b,v4.16b
+	ld1	{v16.4s},[x7],#16	// re-pre-load rndkey[0]
+	st1	{v2.16b},[x1],#16
+	eor	v3.16b,v3.16b,v5.16b
+	mov	w6,w5
+	st1	{v3.16b},[x1],#16
+	eor	v19.16b,v19.16b,v17.16b
+	ld1	{v17.4s},[x7],#16	// re-pre-load rndkey[1]
+	st1	{v19.16b},[x1],#16
+	b.hs	.Loop3x_ctr32
+
+	adds	x2,x2,#3
+	b.eq	.Lctr32_done
+	cmp	x2,#1
+	mov	x12,#16
+	csel	x12,xzr,x12,eq
+
+.Lctr32_tail:
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v16.16b
+	aesmc	v1.16b,v1.16b
+	ld1	{v16.4s},[x7],#16
+	subs	w6,w6,#2
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v17.16b
+	aesmc	v1.16b,v1.16b
+	ld1	{v17.4s},[x7],#16
+	b.gt	.Lctr32_tail
+
+	aese	v0.16b,v16.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v16.16b
+	aesmc	v1.16b,v1.16b
+	aese	v0.16b,v17.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v17.16b
+	aesmc	v1.16b,v1.16b
+	ld1	{v2.16b},[x0],x12
+	aese	v0.16b,v20.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v20.16b
+	aesmc	v1.16b,v1.16b
+	ld1	{v3.16b},[x0]
+	aese	v0.16b,v21.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v21.16b
+	aesmc	v1.16b,v1.16b
+	eor	v2.16b,v2.16b,v7.16b
+	aese	v0.16b,v22.16b
+	aesmc	v0.16b,v0.16b
+	aese	v1.16b,v22.16b
+	aesmc	v1.16b,v1.16b
+	eor	v3.16b,v3.16b,v7.16b
+	aese	v0.16b,v23.16b
+	aese	v1.16b,v23.16b
+
+	cmp	x2,#1
+	eor	v2.16b,v2.16b,v0.16b
+	eor	v3.16b,v3.16b,v1.16b
+	st1	{v2.16b},[x1],#16
+	b.eq	.Lctr32_done
+	st1	{v3.16b},[x1]
+
+.Lctr32_done:
+	ldr	x29,[sp],#16
+	ret
+.size	aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S
new file mode 100644
index 0000000..a0a9b680
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/modes/ghashv8-armx64.S
@@ -0,0 +1,232 @@
+#if defined(__aarch64__)
+#include "arm_arch.h"
+
+.text
+#if !defined(__clang__)
+.arch	armv8-a+crypto
+#endif
+.globl	gcm_init_v8
+.type	gcm_init_v8,%function
+.align	4
+gcm_init_v8:
+	ld1	{v17.2d},[x1]		//load input H
+	movi	v19.16b,#0xe1
+	shl	v19.2d,v19.2d,#57		//0xc2.0
+	ext	v3.16b,v17.16b,v17.16b,#8
+	ushr	v18.2d,v19.2d,#63
+	dup	v17.4s,v17.s[1]
+	ext	v16.16b,v18.16b,v19.16b,#8		//t0=0xc2....01
+	ushr	v18.2d,v3.2d,#63
+	sshr	v17.4s,v17.4s,#31		//broadcast carry bit
+	and	v18.16b,v18.16b,v16.16b
+	shl	v3.2d,v3.2d,#1
+	ext	v18.16b,v18.16b,v18.16b,#8
+	and	v16.16b,v16.16b,v17.16b
+	orr	v3.16b,v3.16b,v18.16b		//H<<<=1
+	eor	v20.16b,v3.16b,v16.16b		//twisted H
+	st1	{v20.2d},[x0],#16		//store Htable[0]
+
+	//calculate H^2
+	ext	v16.16b,v20.16b,v20.16b,#8		//Karatsuba pre-processing
+	pmull	v0.1q,v20.1d,v20.1d
+	eor	v16.16b,v16.16b,v20.16b
+	pmull2	v2.1q,v20.2d,v20.2d
+	pmull	v1.1q,v16.1d,v16.1d
+
+	ext	v17.16b,v0.16b,v2.16b,#8		//Karatsuba post-processing
+	eor	v18.16b,v0.16b,v2.16b
+	eor	v1.16b,v1.16b,v17.16b
+	eor	v1.16b,v1.16b,v18.16b
+	pmull	v18.1q,v0.1d,v19.1d		//1st phase
+
+	ins	v2.d[0],v1.d[1]
+	ins	v1.d[1],v0.d[0]
+	eor	v0.16b,v1.16b,v18.16b
+
+	ext	v18.16b,v0.16b,v0.16b,#8		//2nd phase
+	pmull	v0.1q,v0.1d,v19.1d
+	eor	v18.16b,v18.16b,v2.16b
+	eor	v22.16b,v0.16b,v18.16b
+
+	ext	v17.16b,v22.16b,v22.16b,#8		//Karatsuba pre-processing
+	eor	v17.16b,v17.16b,v22.16b
+	ext	v21.16b,v16.16b,v17.16b,#8		//pack Karatsuba pre-processed
+	st1	{v21.2d,v22.2d},[x0]		//store Htable[1..2]
+
+	ret
+.size	gcm_init_v8,.-gcm_init_v8
+.globl	gcm_gmult_v8
+.type	gcm_gmult_v8,%function
+.align	4
+gcm_gmult_v8:
+	ld1	{v17.2d},[x0]		//load Xi
+	movi	v19.16b,#0xe1
+	ld1	{v20.2d,v21.2d},[x1]	//load twisted H, ...
+	shl	v19.2d,v19.2d,#57
+#ifndef __ARMEB__
+	rev64	v17.16b,v17.16b
+#endif
+	ext	v3.16b,v17.16b,v17.16b,#8
+
+	pmull	v0.1q,v20.1d,v3.1d		//H.lo·Xi.lo
+	eor	v17.16b,v17.16b,v3.16b		//Karatsuba pre-processing
+	pmull2	v2.1q,v20.2d,v3.2d		//H.hi·Xi.hi
+	pmull	v1.1q,v21.1d,v17.1d		//(H.lo+H.hi)·(Xi.lo+Xi.hi)
+
+	ext	v17.16b,v0.16b,v2.16b,#8		//Karatsuba post-processing
+	eor	v18.16b,v0.16b,v2.16b
+	eor	v1.16b,v1.16b,v17.16b
+	eor	v1.16b,v1.16b,v18.16b
+	pmull	v18.1q,v0.1d,v19.1d		//1st phase of reduction
+
+	ins	v2.d[0],v1.d[1]
+	ins	v1.d[1],v0.d[0]
+	eor	v0.16b,v1.16b,v18.16b
+
+	ext	v18.16b,v0.16b,v0.16b,#8		//2nd phase of reduction
+	pmull	v0.1q,v0.1d,v19.1d
+	eor	v18.16b,v18.16b,v2.16b
+	eor	v0.16b,v0.16b,v18.16b
+
+#ifndef __ARMEB__
+	rev64	v0.16b,v0.16b
+#endif
+	ext	v0.16b,v0.16b,v0.16b,#8
+	st1	{v0.2d},[x0]		//write out Xi
+
+	ret
+.size	gcm_gmult_v8,.-gcm_gmult_v8
+.globl	gcm_ghash_v8
+.type	gcm_ghash_v8,%function
+.align	4
+gcm_ghash_v8:
+	ld1	{v0.2d},[x0]		//load [rotated] Xi
+						//"[rotated]" means that
+						//loaded value would have
+						//to be rotated in order to
+						//make it appear as in
+						//alorithm specification
+	subs	x3,x3,#32		//see if x3 is 32 or larger
+	mov	x12,#16		//x12 is used as post-
+						//increment for input pointer;
+						//as loop is modulo-scheduled
+						//x12 is zeroed just in time
+						//to preclude oversteping
+						//inp[len], which means that
+						//last block[s] are actually
+						//loaded twice, but last
+						//copy is not processed
+	ld1	{v20.2d,v21.2d},[x1],#32	//load twisted H, ..., H^2
+	movi	v19.16b,#0xe1
+	ld1	{v22.2d},[x1]
+	csel	x12,xzr,x12,eq			//is it time to zero x12?
+	ext	v0.16b,v0.16b,v0.16b,#8		//rotate Xi
+	ld1	{v16.2d},[x2],#16	//load [rotated] I[0]
+	shl	v19.2d,v19.2d,#57		//compose 0xc2.0 constant
+#ifndef __ARMEB__
+	rev64	v16.16b,v16.16b
+	rev64	v0.16b,v0.16b
+#endif
+	ext	v3.16b,v16.16b,v16.16b,#8		//rotate I[0]
+	b.lo	.Lodd_tail_v8		//x3 was less than 32
+	ld1	{v17.2d},[x2],x12	//load [rotated] I[1]
+#ifndef __ARMEB__
+	rev64	v17.16b,v17.16b
+#endif
+	ext	v7.16b,v17.16b,v17.16b,#8
+	eor	v3.16b,v3.16b,v0.16b		//I[i]^=Xi
+	pmull	v4.1q,v20.1d,v7.1d		//H·Ii+1
+	eor	v17.16b,v17.16b,v7.16b		//Karatsuba pre-processing
+	pmull2	v6.1q,v20.2d,v7.2d
+	b	.Loop_mod2x_v8
+
+.align	4
+.Loop_mod2x_v8:
+	ext	v18.16b,v3.16b,v3.16b,#8
+	subs	x3,x3,#32		//is there more data?
+	pmull	v0.1q,v22.1d,v3.1d		//H^2.lo·Xi.lo
+	csel	x12,xzr,x12,lo			//is it time to zero x12?
+
+	pmull	v5.1q,v21.1d,v17.1d
+	eor	v18.16b,v18.16b,v3.16b		//Karatsuba pre-processing
+	pmull2	v2.1q,v22.2d,v3.2d		//H^2.hi·Xi.hi
+	eor	v0.16b,v0.16b,v4.16b		//accumulate
+	pmull2	v1.1q,v21.2d,v18.2d		//(H^2.lo+H^2.hi)·(Xi.lo+Xi.hi)
+	ld1	{v16.2d},[x2],x12	//load [rotated] I[i+2]
+
+	eor	v2.16b,v2.16b,v6.16b
+	csel	x12,xzr,x12,eq			//is it time to zero x12?
+	eor	v1.16b,v1.16b,v5.16b
+
+	ext	v17.16b,v0.16b,v2.16b,#8		//Karatsuba post-processing
+	eor	v18.16b,v0.16b,v2.16b
+	eor	v1.16b,v1.16b,v17.16b
+	ld1	{v17.2d},[x2],x12	//load [rotated] I[i+3]
+#ifndef __ARMEB__
+	rev64	v16.16b,v16.16b
+#endif
+	eor	v1.16b,v1.16b,v18.16b
+	pmull	v18.1q,v0.1d,v19.1d		//1st phase of reduction
+
+#ifndef __ARMEB__
+	rev64	v17.16b,v17.16b
+#endif
+	ins	v2.d[0],v1.d[1]
+	ins	v1.d[1],v0.d[0]
+	ext	v7.16b,v17.16b,v17.16b,#8
+	ext	v3.16b,v16.16b,v16.16b,#8
+	eor	v0.16b,v1.16b,v18.16b
+	pmull	v4.1q,v20.1d,v7.1d		//H·Ii+1
+	eor	v3.16b,v3.16b,v2.16b		//accumulate v3.16b early
+
+	ext	v18.16b,v0.16b,v0.16b,#8		//2nd phase of reduction
+	pmull	v0.1q,v0.1d,v19.1d
+	eor	v3.16b,v3.16b,v18.16b
+	eor	v17.16b,v17.16b,v7.16b		//Karatsuba pre-processing
+	eor	v3.16b,v3.16b,v0.16b
+	pmull2	v6.1q,v20.2d,v7.2d
+	b.hs	.Loop_mod2x_v8		//there was at least 32 more bytes
+
+	eor	v2.16b,v2.16b,v18.16b
+	ext	v3.16b,v16.16b,v16.16b,#8		//re-construct v3.16b
+	adds	x3,x3,#32		//re-construct x3
+	eor	v0.16b,v0.16b,v2.16b		//re-construct v0.16b
+	b.eq	.Ldone_v8		//is x3 zero?
+.Lodd_tail_v8:
+	ext	v18.16b,v0.16b,v0.16b,#8
+	eor	v3.16b,v3.16b,v0.16b		//inp^=Xi
+	eor	v17.16b,v16.16b,v18.16b		//v17.16b is rotated inp^Xi
+
+	pmull	v0.1q,v20.1d,v3.1d		//H.lo·Xi.lo
+	eor	v17.16b,v17.16b,v3.16b		//Karatsuba pre-processing
+	pmull2	v2.1q,v20.2d,v3.2d		//H.hi·Xi.hi
+	pmull	v1.1q,v21.1d,v17.1d		//(H.lo+H.hi)·(Xi.lo+Xi.hi)
+
+	ext	v17.16b,v0.16b,v2.16b,#8		//Karatsuba post-processing
+	eor	v18.16b,v0.16b,v2.16b
+	eor	v1.16b,v1.16b,v17.16b
+	eor	v1.16b,v1.16b,v18.16b
+	pmull	v18.1q,v0.1d,v19.1d		//1st phase of reduction
+
+	ins	v2.d[0],v1.d[1]
+	ins	v1.d[1],v0.d[0]
+	eor	v0.16b,v1.16b,v18.16b
+
+	ext	v18.16b,v0.16b,v0.16b,#8		//2nd phase of reduction
+	pmull	v0.1q,v0.1d,v19.1d
+	eor	v18.16b,v18.16b,v2.16b
+	eor	v0.16b,v0.16b,v18.16b
+
+.Ldone_v8:
+#ifndef __ARMEB__
+	rev64	v0.16b,v0.16b
+#endif
+	ext	v0.16b,v0.16b,v0.16b,#8
+	st1	{v0.2d},[x0]		//write out Xi
+
+	ret
+.size	gcm_ghash_v8,.-gcm_ghash_v8
+.byte	71,72,65,83,72,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
new file mode 100644
index 0000000..487a497
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha1-armv8.S
@@ -0,0 +1,1215 @@
+#if defined(__aarch64__)
+#include "arm_arch.h"
+
+.text
+
+
+.globl	sha1_block_data_order
+.type	sha1_block_data_order,%function
+.align	6
+sha1_block_data_order:
+	ldr	x16,.LOPENSSL_armcap_P
+	adr	x17,.LOPENSSL_armcap_P
+	add	x16,x16,x17
+	ldr	w16,[x16]
+	tst	w16,#ARMV8_SHA1
+	b.ne	.Lv8_entry
+
+	stp	x29,x30,[sp,#-96]!
+	add	x29,sp,#0
+	stp	x19,x20,[sp,#16]
+	stp	x21,x22,[sp,#32]
+	stp	x23,x24,[sp,#48]
+	stp	x25,x26,[sp,#64]
+	stp	x27,x28,[sp,#80]
+
+	ldp	w20,w21,[x0]
+	ldp	w22,w23,[x0,#8]
+	ldr	w24,[x0,#16]
+
+.Loop:
+	ldr	x3,[x1],#64
+	movz	w28,#0x7999
+	sub	x2,x2,#1
+	movk	w28,#0x5a82,lsl#16
+#ifdef	__ARMEB__
+	ror	x3,x3,#32
+#else
+	rev32	x3,x3
+#endif
+	add	w24,w24,w28		// warm it up
+	add	w24,w24,w3
+	lsr	x4,x3,#32
+	ldr	x5,[x1,#-56]
+	bic	w25,w23,w21
+	and	w26,w22,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	add	w23,w23,w4	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x5,x5,#32
+#else
+	rev32	x5,x5
+#endif
+	bic	w25,w22,w20
+	and	w26,w21,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	add	w22,w22,w5	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	lsr	x6,x5,#32
+	ldr	x7,[x1,#-48]
+	bic	w25,w21,w24
+	and	w26,w20,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	add	w21,w21,w6	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x7,x7,#32
+#else
+	rev32	x7,x7
+#endif
+	bic	w25,w20,w23
+	and	w26,w24,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	add	w20,w20,w7	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	lsr	x8,x7,#32
+	ldr	x9,[x1,#-40]
+	bic	w25,w24,w22
+	and	w26,w23,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	add	w24,w24,w8	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x9,x9,#32
+#else
+	rev32	x9,x9
+#endif
+	bic	w25,w23,w21
+	and	w26,w22,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	add	w23,w23,w9	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	lsr	x10,x9,#32
+	ldr	x11,[x1,#-32]
+	bic	w25,w22,w20
+	and	w26,w21,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	add	w22,w22,w10	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x11,x11,#32
+#else
+	rev32	x11,x11
+#endif
+	bic	w25,w21,w24
+	and	w26,w20,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	add	w21,w21,w11	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	lsr	x12,x11,#32
+	ldr	x13,[x1,#-24]
+	bic	w25,w20,w23
+	and	w26,w24,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	add	w20,w20,w12	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x13,x13,#32
+#else
+	rev32	x13,x13
+#endif
+	bic	w25,w24,w22
+	and	w26,w23,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	add	w24,w24,w13	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	lsr	x14,x13,#32
+	ldr	x15,[x1,#-16]
+	bic	w25,w23,w21
+	and	w26,w22,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	add	w23,w23,w14	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x15,x15,#32
+#else
+	rev32	x15,x15
+#endif
+	bic	w25,w22,w20
+	and	w26,w21,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	add	w22,w22,w15	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	lsr	x16,x15,#32
+	ldr	x17,[x1,#-8]
+	bic	w25,w21,w24
+	and	w26,w20,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	add	w21,w21,w16	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+#ifdef	__ARMEB__
+	ror	x17,x17,#32
+#else
+	rev32	x17,x17
+#endif
+	bic	w25,w20,w23
+	and	w26,w24,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	add	w20,w20,w17	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	lsr	x19,x17,#32
+	eor	w3,w3,w5
+	bic	w25,w24,w22
+	and	w26,w23,w22
+	ror	w27,w21,#27
+	eor	w3,w3,w11
+	add	w24,w24,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w20,w20,w27		// e+=rot(a,5)
+	eor	w3,w3,w16
+	ror	w22,w22,#2
+	add	w24,w24,w19	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w3,w3,#31
+	eor	w4,w4,w6
+	bic	w25,w23,w21
+	and	w26,w22,w21
+	ror	w27,w20,#27
+	eor	w4,w4,w12
+	add	w23,w23,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w24,w24,w27		// e+=rot(a,5)
+	eor	w4,w4,w17
+	ror	w21,w21,#2
+	add	w23,w23,w3	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w4,w4,#31
+	eor	w5,w5,w7
+	bic	w25,w22,w20
+	and	w26,w21,w20
+	ror	w27,w24,#27
+	eor	w5,w5,w13
+	add	w22,w22,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w23,w23,w27		// e+=rot(a,5)
+	eor	w5,w5,w19
+	ror	w20,w20,#2
+	add	w22,w22,w4	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w5,w5,#31
+	eor	w6,w6,w8
+	bic	w25,w21,w24
+	and	w26,w20,w24
+	ror	w27,w23,#27
+	eor	w6,w6,w14
+	add	w21,w21,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w22,w22,w27		// e+=rot(a,5)
+	eor	w6,w6,w3
+	ror	w24,w24,#2
+	add	w21,w21,w5	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w6,w6,#31
+	eor	w7,w7,w9
+	bic	w25,w20,w23
+	and	w26,w24,w23
+	ror	w27,w22,#27
+	eor	w7,w7,w15
+	add	w20,w20,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w21,w21,w27		// e+=rot(a,5)
+	eor	w7,w7,w4
+	ror	w23,w23,#2
+	add	w20,w20,w6	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w7,w7,#31
+	movz	w28,#0xeba1
+	movk	w28,#0x6ed9,lsl#16
+	eor	w8,w8,w10
+	bic	w25,w24,w22
+	and	w26,w23,w22
+	ror	w27,w21,#27
+	eor	w8,w8,w16
+	add	w24,w24,w28		// future e+=K
+	orr	w25,w25,w26
+	add	w20,w20,w27		// e+=rot(a,5)
+	eor	w8,w8,w5
+	ror	w22,w22,#2
+	add	w24,w24,w7	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w8,w8,#31
+	eor	w9,w9,w11
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w9,w9,w17
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w9,w9,w6
+	add	w23,w23,w8	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w9,w9,#31
+	eor	w10,w10,w12
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w10,w10,w19
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w10,w10,w7
+	add	w22,w22,w9	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w10,w10,#31
+	eor	w11,w11,w13
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w11,w11,w3
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w11,w11,w8
+	add	w21,w21,w10	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w11,w11,#31
+	eor	w12,w12,w14
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w12,w12,w4
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w12,w12,w9
+	add	w20,w20,w11	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w12,w12,#31
+	eor	w13,w13,w15
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w13,w13,w5
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w13,w13,w10
+	add	w24,w24,w12	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w13,w13,#31
+	eor	w14,w14,w16
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w14,w14,w6
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w14,w14,w11
+	add	w23,w23,w13	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w14,w14,#31
+	eor	w15,w15,w17
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w15,w15,w7
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w15,w15,w12
+	add	w22,w22,w14	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w15,w15,#31
+	eor	w16,w16,w19
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w16,w16,w8
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w16,w16,w13
+	add	w21,w21,w15	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w16,w16,#31
+	eor	w17,w17,w3
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w17,w17,w9
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w17,w17,w14
+	add	w20,w20,w16	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w17,w17,#31
+	eor	w19,w19,w4
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w19,w19,w10
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w19,w19,w15
+	add	w24,w24,w17	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w19,w19,#31
+	eor	w3,w3,w5
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w3,w3,w11
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w3,w3,w16
+	add	w23,w23,w19	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w3,w3,#31
+	eor	w4,w4,w6
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w4,w4,w12
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w4,w4,w17
+	add	w22,w22,w3	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w4,w4,#31
+	eor	w5,w5,w7
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w5,w5,w13
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w5,w5,w19
+	add	w21,w21,w4	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w5,w5,#31
+	eor	w6,w6,w8
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w6,w6,w14
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w6,w6,w3
+	add	w20,w20,w5	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w6,w6,#31
+	eor	w7,w7,w9
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w7,w7,w15
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w7,w7,w4
+	add	w24,w24,w6	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w7,w7,#31
+	eor	w8,w8,w10
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w8,w8,w16
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w8,w8,w5
+	add	w23,w23,w7	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w8,w8,#31
+	eor	w9,w9,w11
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w9,w9,w17
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w9,w9,w6
+	add	w22,w22,w8	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w9,w9,#31
+	eor	w10,w10,w12
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w10,w10,w19
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w10,w10,w7
+	add	w21,w21,w9	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w10,w10,#31
+	eor	w11,w11,w13
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w11,w11,w3
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w11,w11,w8
+	add	w20,w20,w10	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w11,w11,#31
+	movz	w28,#0xbcdc
+	movk	w28,#0x8f1b,lsl#16
+	eor	w12,w12,w14
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w12,w12,w4
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w12,w12,w9
+	add	w24,w24,w11	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w12,w12,#31
+	orr	w25,w21,w22
+	and	w26,w21,w22
+	eor	w13,w13,w15
+	ror	w27,w20,#27
+	and	w25,w25,w23
+	add	w23,w23,w28		// future e+=K
+	eor	w13,w13,w5
+	add	w24,w24,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w21,w21,#2
+	eor	w13,w13,w10
+	add	w23,w23,w12	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w13,w13,#31
+	orr	w25,w20,w21
+	and	w26,w20,w21
+	eor	w14,w14,w16
+	ror	w27,w24,#27
+	and	w25,w25,w22
+	add	w22,w22,w28		// future e+=K
+	eor	w14,w14,w6
+	add	w23,w23,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w20,w20,#2
+	eor	w14,w14,w11
+	add	w22,w22,w13	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w14,w14,#31
+	orr	w25,w24,w20
+	and	w26,w24,w20
+	eor	w15,w15,w17
+	ror	w27,w23,#27
+	and	w25,w25,w21
+	add	w21,w21,w28		// future e+=K
+	eor	w15,w15,w7
+	add	w22,w22,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w24,w24,#2
+	eor	w15,w15,w12
+	add	w21,w21,w14	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w15,w15,#31
+	orr	w25,w23,w24
+	and	w26,w23,w24
+	eor	w16,w16,w19
+	ror	w27,w22,#27
+	and	w25,w25,w20
+	add	w20,w20,w28		// future e+=K
+	eor	w16,w16,w8
+	add	w21,w21,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w23,w23,#2
+	eor	w16,w16,w13
+	add	w20,w20,w15	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w16,w16,#31
+	orr	w25,w22,w23
+	and	w26,w22,w23
+	eor	w17,w17,w3
+	ror	w27,w21,#27
+	and	w25,w25,w24
+	add	w24,w24,w28		// future e+=K
+	eor	w17,w17,w9
+	add	w20,w20,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w22,w22,#2
+	eor	w17,w17,w14
+	add	w24,w24,w16	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w17,w17,#31
+	orr	w25,w21,w22
+	and	w26,w21,w22
+	eor	w19,w19,w4
+	ror	w27,w20,#27
+	and	w25,w25,w23
+	add	w23,w23,w28		// future e+=K
+	eor	w19,w19,w10
+	add	w24,w24,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w21,w21,#2
+	eor	w19,w19,w15
+	add	w23,w23,w17	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w19,w19,#31
+	orr	w25,w20,w21
+	and	w26,w20,w21
+	eor	w3,w3,w5
+	ror	w27,w24,#27
+	and	w25,w25,w22
+	add	w22,w22,w28		// future e+=K
+	eor	w3,w3,w11
+	add	w23,w23,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w20,w20,#2
+	eor	w3,w3,w16
+	add	w22,w22,w19	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w3,w3,#31
+	orr	w25,w24,w20
+	and	w26,w24,w20
+	eor	w4,w4,w6
+	ror	w27,w23,#27
+	and	w25,w25,w21
+	add	w21,w21,w28		// future e+=K
+	eor	w4,w4,w12
+	add	w22,w22,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w24,w24,#2
+	eor	w4,w4,w17
+	add	w21,w21,w3	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w4,w4,#31
+	orr	w25,w23,w24
+	and	w26,w23,w24
+	eor	w5,w5,w7
+	ror	w27,w22,#27
+	and	w25,w25,w20
+	add	w20,w20,w28		// future e+=K
+	eor	w5,w5,w13
+	add	w21,w21,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w23,w23,#2
+	eor	w5,w5,w19
+	add	w20,w20,w4	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w5,w5,#31
+	orr	w25,w22,w23
+	and	w26,w22,w23
+	eor	w6,w6,w8
+	ror	w27,w21,#27
+	and	w25,w25,w24
+	add	w24,w24,w28		// future e+=K
+	eor	w6,w6,w14
+	add	w20,w20,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w22,w22,#2
+	eor	w6,w6,w3
+	add	w24,w24,w5	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w6,w6,#31
+	orr	w25,w21,w22
+	and	w26,w21,w22
+	eor	w7,w7,w9
+	ror	w27,w20,#27
+	and	w25,w25,w23
+	add	w23,w23,w28		// future e+=K
+	eor	w7,w7,w15
+	add	w24,w24,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w21,w21,#2
+	eor	w7,w7,w4
+	add	w23,w23,w6	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w7,w7,#31
+	orr	w25,w20,w21
+	and	w26,w20,w21
+	eor	w8,w8,w10
+	ror	w27,w24,#27
+	and	w25,w25,w22
+	add	w22,w22,w28		// future e+=K
+	eor	w8,w8,w16
+	add	w23,w23,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w20,w20,#2
+	eor	w8,w8,w5
+	add	w22,w22,w7	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w8,w8,#31
+	orr	w25,w24,w20
+	and	w26,w24,w20
+	eor	w9,w9,w11
+	ror	w27,w23,#27
+	and	w25,w25,w21
+	add	w21,w21,w28		// future e+=K
+	eor	w9,w9,w17
+	add	w22,w22,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w24,w24,#2
+	eor	w9,w9,w6
+	add	w21,w21,w8	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w9,w9,#31
+	orr	w25,w23,w24
+	and	w26,w23,w24
+	eor	w10,w10,w12
+	ror	w27,w22,#27
+	and	w25,w25,w20
+	add	w20,w20,w28		// future e+=K
+	eor	w10,w10,w19
+	add	w21,w21,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w23,w23,#2
+	eor	w10,w10,w7
+	add	w20,w20,w9	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w10,w10,#31
+	orr	w25,w22,w23
+	and	w26,w22,w23
+	eor	w11,w11,w13
+	ror	w27,w21,#27
+	and	w25,w25,w24
+	add	w24,w24,w28		// future e+=K
+	eor	w11,w11,w3
+	add	w20,w20,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w22,w22,#2
+	eor	w11,w11,w8
+	add	w24,w24,w10	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w11,w11,#31
+	orr	w25,w21,w22
+	and	w26,w21,w22
+	eor	w12,w12,w14
+	ror	w27,w20,#27
+	and	w25,w25,w23
+	add	w23,w23,w28		// future e+=K
+	eor	w12,w12,w4
+	add	w24,w24,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w21,w21,#2
+	eor	w12,w12,w9
+	add	w23,w23,w11	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w12,w12,#31
+	orr	w25,w20,w21
+	and	w26,w20,w21
+	eor	w13,w13,w15
+	ror	w27,w24,#27
+	and	w25,w25,w22
+	add	w22,w22,w28		// future e+=K
+	eor	w13,w13,w5
+	add	w23,w23,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w20,w20,#2
+	eor	w13,w13,w10
+	add	w22,w22,w12	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w13,w13,#31
+	orr	w25,w24,w20
+	and	w26,w24,w20
+	eor	w14,w14,w16
+	ror	w27,w23,#27
+	and	w25,w25,w21
+	add	w21,w21,w28		// future e+=K
+	eor	w14,w14,w6
+	add	w22,w22,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w24,w24,#2
+	eor	w14,w14,w11
+	add	w21,w21,w13	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w14,w14,#31
+	orr	w25,w23,w24
+	and	w26,w23,w24
+	eor	w15,w15,w17
+	ror	w27,w22,#27
+	and	w25,w25,w20
+	add	w20,w20,w28		// future e+=K
+	eor	w15,w15,w7
+	add	w21,w21,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w23,w23,#2
+	eor	w15,w15,w12
+	add	w20,w20,w14	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w15,w15,#31
+	movz	w28,#0xc1d6
+	movk	w28,#0xca62,lsl#16
+	orr	w25,w22,w23
+	and	w26,w22,w23
+	eor	w16,w16,w19
+	ror	w27,w21,#27
+	and	w25,w25,w24
+	add	w24,w24,w28		// future e+=K
+	eor	w16,w16,w8
+	add	w20,w20,w27		// e+=rot(a,5)
+	orr	w25,w25,w26
+	ror	w22,w22,#2
+	eor	w16,w16,w13
+	add	w24,w24,w15	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w16,w16,#31
+	eor	w17,w17,w3
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w17,w17,w9
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w17,w17,w14
+	add	w23,w23,w16	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w17,w17,#31
+	eor	w19,w19,w4
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w19,w19,w10
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w19,w19,w15
+	add	w22,w22,w17	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w19,w19,#31
+	eor	w3,w3,w5
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w3,w3,w11
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w3,w3,w16
+	add	w21,w21,w19	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w3,w3,#31
+	eor	w4,w4,w6
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w4,w4,w12
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w4,w4,w17
+	add	w20,w20,w3	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w4,w4,#31
+	eor	w5,w5,w7
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w5,w5,w13
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w5,w5,w19
+	add	w24,w24,w4	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w5,w5,#31
+	eor	w6,w6,w8
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w6,w6,w14
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w6,w6,w3
+	add	w23,w23,w5	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w6,w6,#31
+	eor	w7,w7,w9
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w7,w7,w15
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w7,w7,w4
+	add	w22,w22,w6	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w7,w7,#31
+	eor	w8,w8,w10
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w8,w8,w16
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w8,w8,w5
+	add	w21,w21,w7	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w8,w8,#31
+	eor	w9,w9,w11
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w9,w9,w17
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w9,w9,w6
+	add	w20,w20,w8	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w9,w9,#31
+	eor	w10,w10,w12
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w10,w10,w19
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w10,w10,w7
+	add	w24,w24,w9	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w10,w10,#31
+	eor	w11,w11,w13
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w11,w11,w3
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w11,w11,w8
+	add	w23,w23,w10	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w11,w11,#31
+	eor	w12,w12,w14
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w12,w12,w4
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w12,w12,w9
+	add	w22,w22,w11	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w12,w12,#31
+	eor	w13,w13,w15
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w13,w13,w5
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w13,w13,w10
+	add	w21,w21,w12	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w13,w13,#31
+	eor	w14,w14,w16
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w14,w14,w6
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	eor	w14,w14,w11
+	add	w20,w20,w13	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ror	w14,w14,#31
+	eor	w15,w15,w17
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	add	w24,w24,w28		// future e+=K
+	eor	w15,w15,w7
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	eor	w15,w15,w12
+	add	w24,w24,w14	// future e+=X[i]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	ror	w15,w15,#31
+	eor	w16,w16,w19
+	eor	w25,w23,w21
+	ror	w27,w20,#27
+	add	w23,w23,w28		// future e+=K
+	eor	w16,w16,w8
+	eor	w25,w25,w22
+	add	w24,w24,w27		// e+=rot(a,5)
+	ror	w21,w21,#2
+	eor	w16,w16,w13
+	add	w23,w23,w15	// future e+=X[i]
+	add	w24,w24,w25		// e+=F(b,c,d)
+	ror	w16,w16,#31
+	eor	w17,w17,w3
+	eor	w25,w22,w20
+	ror	w27,w24,#27
+	add	w22,w22,w28		// future e+=K
+	eor	w17,w17,w9
+	eor	w25,w25,w21
+	add	w23,w23,w27		// e+=rot(a,5)
+	ror	w20,w20,#2
+	eor	w17,w17,w14
+	add	w22,w22,w16	// future e+=X[i]
+	add	w23,w23,w25		// e+=F(b,c,d)
+	ror	w17,w17,#31
+	eor	w19,w19,w4
+	eor	w25,w21,w24
+	ror	w27,w23,#27
+	add	w21,w21,w28		// future e+=K
+	eor	w19,w19,w10
+	eor	w25,w25,w20
+	add	w22,w22,w27		// e+=rot(a,5)
+	ror	w24,w24,#2
+	eor	w19,w19,w15
+	add	w21,w21,w17	// future e+=X[i]
+	add	w22,w22,w25		// e+=F(b,c,d)
+	ror	w19,w19,#31
+	ldp	w4,w5,[x0]
+	eor	w25,w20,w23
+	ror	w27,w22,#27
+	add	w20,w20,w28		// future e+=K
+	eor	w25,w25,w24
+	add	w21,w21,w27		// e+=rot(a,5)
+	ror	w23,w23,#2
+	add	w20,w20,w19	// future e+=X[i]
+	add	w21,w21,w25		// e+=F(b,c,d)
+	ldp	w6,w7,[x0,#8]
+	eor	w25,w24,w22
+	ror	w27,w21,#27
+	eor	w25,w25,w23
+	add	w20,w20,w27		// e+=rot(a,5)
+	ror	w22,w22,#2
+	ldr	w8,[x0,#16]
+	add	w20,w20,w25		// e+=F(b,c,d)
+	add	w21,w21,w5
+	add	w22,w22,w6
+	add	w20,w20,w4
+	add	w23,w23,w7
+	add	w24,w24,w8
+	stp	w20,w21,[x0]
+	stp	w22,w23,[x0,#8]
+	str	w24,[x0,#16]
+	cbnz	x2,.Loop
+
+	ldp	x19,x20,[sp,#16]
+	ldp	x21,x22,[sp,#32]
+	ldp	x23,x24,[sp,#48]
+	ldp	x25,x26,[sp,#64]
+	ldp	x27,x28,[sp,#80]
+	ldr	x29,[sp],#96
+	ret
+.size	sha1_block_data_order,.-sha1_block_data_order
+.type	sha1_block_armv8,%function
+.align	6
+sha1_block_armv8:
+.Lv8_entry:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+
+	adr	x4,.Lconst
+	eor	v1.16b,v1.16b,v1.16b
+	ld1	{v0.4s},[x0],#16
+	ld1	{v1.s}[0],[x0]
+	sub	x0,x0,#16
+	ld1	{v16.4s,v17.4s,v18.4s,v19.4s},[x4]
+
+.Loop_hw:
+	ld1	{v4.16b,v5.16b,v6.16b,v7.16b},[x1],#64
+	sub	x2,x2,#1
+	rev32	v4.16b,v4.16b
+	rev32	v5.16b,v5.16b
+
+	add	v20.4s,v16.4s,v4.4s
+	rev32	v6.16b,v6.16b
+	orr	v22.16b,v0.16b,v0.16b	// offload
+
+	add	v21.4s,v16.4s,v5.4s
+	rev32	v7.16b,v7.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b
+.inst	0x5e140020	//sha1c v0.16b,v1.16b,v20.4s		// 0
+	add	v20.4s,v16.4s,v6.4s
+.inst	0x5e0630a4	//sha1su0 v4.16b,v5.16b,v6.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 1
+.inst	0x5e150060	//sha1c v0.16b,v3.16b,v21.4s
+	add	v21.4s,v16.4s,v7.4s
+.inst	0x5e2818e4	//sha1su1 v4.16b,v7.16b
+.inst	0x5e0730c5	//sha1su0 v5.16b,v6.16b,v7.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 2
+.inst	0x5e140040	//sha1c v0.16b,v2.16b,v20.4s
+	add	v20.4s,v16.4s,v4.4s
+.inst	0x5e281885	//sha1su1 v5.16b,v4.16b
+.inst	0x5e0430e6	//sha1su0 v6.16b,v7.16b,v4.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 3
+.inst	0x5e150060	//sha1c v0.16b,v3.16b,v21.4s
+	add	v21.4s,v17.4s,v5.4s
+.inst	0x5e2818a6	//sha1su1 v6.16b,v5.16b
+.inst	0x5e053087	//sha1su0 v7.16b,v4.16b,v5.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 4
+.inst	0x5e140040	//sha1c v0.16b,v2.16b,v20.4s
+	add	v20.4s,v17.4s,v6.4s
+.inst	0x5e2818c7	//sha1su1 v7.16b,v6.16b
+.inst	0x5e0630a4	//sha1su0 v4.16b,v5.16b,v6.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 5
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+	add	v21.4s,v17.4s,v7.4s
+.inst	0x5e2818e4	//sha1su1 v4.16b,v7.16b
+.inst	0x5e0730c5	//sha1su0 v5.16b,v6.16b,v7.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 6
+.inst	0x5e141040	//sha1p v0.16b,v2.16b,v20.4s
+	add	v20.4s,v17.4s,v4.4s
+.inst	0x5e281885	//sha1su1 v5.16b,v4.16b
+.inst	0x5e0430e6	//sha1su0 v6.16b,v7.16b,v4.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 7
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+	add	v21.4s,v17.4s,v5.4s
+.inst	0x5e2818a6	//sha1su1 v6.16b,v5.16b
+.inst	0x5e053087	//sha1su0 v7.16b,v4.16b,v5.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 8
+.inst	0x5e141040	//sha1p v0.16b,v2.16b,v20.4s
+	add	v20.4s,v18.4s,v6.4s
+.inst	0x5e2818c7	//sha1su1 v7.16b,v6.16b
+.inst	0x5e0630a4	//sha1su0 v4.16b,v5.16b,v6.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 9
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+	add	v21.4s,v18.4s,v7.4s
+.inst	0x5e2818e4	//sha1su1 v4.16b,v7.16b
+.inst	0x5e0730c5	//sha1su0 v5.16b,v6.16b,v7.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 10
+.inst	0x5e142040	//sha1m v0.16b,v2.16b,v20.4s
+	add	v20.4s,v18.4s,v4.4s
+.inst	0x5e281885	//sha1su1 v5.16b,v4.16b
+.inst	0x5e0430e6	//sha1su0 v6.16b,v7.16b,v4.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 11
+.inst	0x5e152060	//sha1m v0.16b,v3.16b,v21.4s
+	add	v21.4s,v18.4s,v5.4s
+.inst	0x5e2818a6	//sha1su1 v6.16b,v5.16b
+.inst	0x5e053087	//sha1su0 v7.16b,v4.16b,v5.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 12
+.inst	0x5e142040	//sha1m v0.16b,v2.16b,v20.4s
+	add	v20.4s,v18.4s,v6.4s
+.inst	0x5e2818c7	//sha1su1 v7.16b,v6.16b
+.inst	0x5e0630a4	//sha1su0 v4.16b,v5.16b,v6.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 13
+.inst	0x5e152060	//sha1m v0.16b,v3.16b,v21.4s
+	add	v21.4s,v19.4s,v7.4s
+.inst	0x5e2818e4	//sha1su1 v4.16b,v7.16b
+.inst	0x5e0730c5	//sha1su0 v5.16b,v6.16b,v7.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 14
+.inst	0x5e142040	//sha1m v0.16b,v2.16b,v20.4s
+	add	v20.4s,v19.4s,v4.4s
+.inst	0x5e281885	//sha1su1 v5.16b,v4.16b
+.inst	0x5e0430e6	//sha1su0 v6.16b,v7.16b,v4.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 15
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+	add	v21.4s,v19.4s,v5.4s
+.inst	0x5e2818a6	//sha1su1 v6.16b,v5.16b
+.inst	0x5e053087	//sha1su0 v7.16b,v4.16b,v5.16b
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 16
+.inst	0x5e141040	//sha1p v0.16b,v2.16b,v20.4s
+	add	v20.4s,v19.4s,v6.4s
+.inst	0x5e2818c7	//sha1su1 v7.16b,v6.16b
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 17
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+	add	v21.4s,v19.4s,v7.4s
+
+.inst	0x5e280803	//sha1h v3.16b,v0.16b		// 18
+.inst	0x5e141040	//sha1p v0.16b,v2.16b,v20.4s
+
+.inst	0x5e280802	//sha1h v2.16b,v0.16b		// 19
+.inst	0x5e151060	//sha1p v0.16b,v3.16b,v21.4s
+
+	add	v1.4s,v1.4s,v2.4s
+	add	v0.4s,v0.4s,v22.4s
+
+	cbnz	x2,.Loop_hw
+
+	st1	{v0.4s},[x0],#16
+	st1	{v1.s}[0],[x0]
+
+	ldr	x29,[sp],#16
+	ret
+.size	sha1_block_armv8,.-sha1_block_armv8
+.align	6
+.Lconst:
+.long	0x5a827999,0x5a827999,0x5a827999,0x5a827999	//K_00_19
+.long	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1	//K_20_39
+.long	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc	//K_40_59
+.long	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6	//K_60_79
+.LOPENSSL_armcap_P:
+.quad	OPENSSL_armcap_P-.
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+.comm	OPENSSL_armcap_P,4,4
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
new file mode 100644
index 0000000..4834553
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha256-armv8.S
@@ -0,0 +1,1145 @@
+#if defined(__aarch64__)
+#include "arm_arch.h"
+
+.text
+
+
+.globl	sha256_block_data_order
+.type	sha256_block_data_order,%function
+.align	6
+sha256_block_data_order:
+	ldr	x16,.LOPENSSL_armcap_P
+	adr	x17,.LOPENSSL_armcap_P
+	add	x16,x16,x17
+	ldr	w16,[x16]
+	tst	w16,#ARMV8_SHA256
+	b.ne	.Lv8_entry
+	stp	x29,x30,[sp,#-128]!
+	add	x29,sp,#0
+
+	stp	x19,x20,[sp,#16]
+	stp	x21,x22,[sp,#32]
+	stp	x23,x24,[sp,#48]
+	stp	x25,x26,[sp,#64]
+	stp	x27,x28,[sp,#80]
+	sub	sp,sp,#4*4
+
+	ldp	w20,w21,[x0]				// load context
+	ldp	w22,w23,[x0,#2*4]
+	ldp	w24,w25,[x0,#4*4]
+	add	x2,x1,x2,lsl#6	// end of input
+	ldp	w26,w27,[x0,#6*4]
+	adr	x30,.LK256
+	stp	x0,x2,[x29,#96]
+
+.Loop:
+	ldp	w3,w4,[x1],#2*4
+	ldr	w19,[x30],#4			// *K++
+	eor	w28,w21,w22				// magic seed
+	str	x1,[x29,#112]
+#ifndef	__ARMEB__
+	rev	w3,w3			// 0
+#endif
+	ror	w16,w24,#6
+	add	w27,w27,w19			// h+=K[i]
+	eor	w6,w24,w24,ror#14
+	and	w17,w25,w24
+	bic	w19,w26,w24
+	add	w27,w27,w3			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w20,w21			// a^b, b^c in next round
+	eor	w16,w16,w6,ror#11	// Sigma1(e)
+	ror	w6,w20,#2
+	add	w27,w27,w17			// h+=Ch(e,f,g)
+	eor	w17,w20,w20,ror#9
+	add	w27,w27,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w23,w23,w27			// d+=h
+	eor	w28,w28,w21			// Maj(a,b,c)
+	eor	w17,w6,w17,ror#13	// Sigma0(a)
+	add	w27,w27,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w27,w27,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w4,w4			// 1
+#endif
+	ldp	w5,w6,[x1],#2*4
+	add	w27,w27,w17			// h+=Sigma0(a)
+	ror	w16,w23,#6
+	add	w26,w26,w28			// h+=K[i]
+	eor	w7,w23,w23,ror#14
+	and	w17,w24,w23
+	bic	w28,w25,w23
+	add	w26,w26,w4			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w27,w20			// a^b, b^c in next round
+	eor	w16,w16,w7,ror#11	// Sigma1(e)
+	ror	w7,w27,#2
+	add	w26,w26,w17			// h+=Ch(e,f,g)
+	eor	w17,w27,w27,ror#9
+	add	w26,w26,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w22,w22,w26			// d+=h
+	eor	w19,w19,w20			// Maj(a,b,c)
+	eor	w17,w7,w17,ror#13	// Sigma0(a)
+	add	w26,w26,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w26,w26,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w5,w5			// 2
+#endif
+	add	w26,w26,w17			// h+=Sigma0(a)
+	ror	w16,w22,#6
+	add	w25,w25,w19			// h+=K[i]
+	eor	w8,w22,w22,ror#14
+	and	w17,w23,w22
+	bic	w19,w24,w22
+	add	w25,w25,w5			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w26,w27			// a^b, b^c in next round
+	eor	w16,w16,w8,ror#11	// Sigma1(e)
+	ror	w8,w26,#2
+	add	w25,w25,w17			// h+=Ch(e,f,g)
+	eor	w17,w26,w26,ror#9
+	add	w25,w25,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w21,w21,w25			// d+=h
+	eor	w28,w28,w27			// Maj(a,b,c)
+	eor	w17,w8,w17,ror#13	// Sigma0(a)
+	add	w25,w25,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w25,w25,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w6,w6			// 3
+#endif
+	ldp	w7,w8,[x1],#2*4
+	add	w25,w25,w17			// h+=Sigma0(a)
+	ror	w16,w21,#6
+	add	w24,w24,w28			// h+=K[i]
+	eor	w9,w21,w21,ror#14
+	and	w17,w22,w21
+	bic	w28,w23,w21
+	add	w24,w24,w6			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w25,w26			// a^b, b^c in next round
+	eor	w16,w16,w9,ror#11	// Sigma1(e)
+	ror	w9,w25,#2
+	add	w24,w24,w17			// h+=Ch(e,f,g)
+	eor	w17,w25,w25,ror#9
+	add	w24,w24,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w20,w20,w24			// d+=h
+	eor	w19,w19,w26			// Maj(a,b,c)
+	eor	w17,w9,w17,ror#13	// Sigma0(a)
+	add	w24,w24,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w24,w24,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w7,w7			// 4
+#endif
+	add	w24,w24,w17			// h+=Sigma0(a)
+	ror	w16,w20,#6
+	add	w23,w23,w19			// h+=K[i]
+	eor	w10,w20,w20,ror#14
+	and	w17,w21,w20
+	bic	w19,w22,w20
+	add	w23,w23,w7			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w24,w25			// a^b, b^c in next round
+	eor	w16,w16,w10,ror#11	// Sigma1(e)
+	ror	w10,w24,#2
+	add	w23,w23,w17			// h+=Ch(e,f,g)
+	eor	w17,w24,w24,ror#9
+	add	w23,w23,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w27,w27,w23			// d+=h
+	eor	w28,w28,w25			// Maj(a,b,c)
+	eor	w17,w10,w17,ror#13	// Sigma0(a)
+	add	w23,w23,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w23,w23,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w8,w8			// 5
+#endif
+	ldp	w9,w10,[x1],#2*4
+	add	w23,w23,w17			// h+=Sigma0(a)
+	ror	w16,w27,#6
+	add	w22,w22,w28			// h+=K[i]
+	eor	w11,w27,w27,ror#14
+	and	w17,w20,w27
+	bic	w28,w21,w27
+	add	w22,w22,w8			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w23,w24			// a^b, b^c in next round
+	eor	w16,w16,w11,ror#11	// Sigma1(e)
+	ror	w11,w23,#2
+	add	w22,w22,w17			// h+=Ch(e,f,g)
+	eor	w17,w23,w23,ror#9
+	add	w22,w22,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w26,w26,w22			// d+=h
+	eor	w19,w19,w24			// Maj(a,b,c)
+	eor	w17,w11,w17,ror#13	// Sigma0(a)
+	add	w22,w22,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w22,w22,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w9,w9			// 6
+#endif
+	add	w22,w22,w17			// h+=Sigma0(a)
+	ror	w16,w26,#6
+	add	w21,w21,w19			// h+=K[i]
+	eor	w12,w26,w26,ror#14
+	and	w17,w27,w26
+	bic	w19,w20,w26
+	add	w21,w21,w9			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w22,w23			// a^b, b^c in next round
+	eor	w16,w16,w12,ror#11	// Sigma1(e)
+	ror	w12,w22,#2
+	add	w21,w21,w17			// h+=Ch(e,f,g)
+	eor	w17,w22,w22,ror#9
+	add	w21,w21,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w25,w25,w21			// d+=h
+	eor	w28,w28,w23			// Maj(a,b,c)
+	eor	w17,w12,w17,ror#13	// Sigma0(a)
+	add	w21,w21,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w21,w21,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w10,w10			// 7
+#endif
+	ldp	w11,w12,[x1],#2*4
+	add	w21,w21,w17			// h+=Sigma0(a)
+	ror	w16,w25,#6
+	add	w20,w20,w28			// h+=K[i]
+	eor	w13,w25,w25,ror#14
+	and	w17,w26,w25
+	bic	w28,w27,w25
+	add	w20,w20,w10			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w21,w22			// a^b, b^c in next round
+	eor	w16,w16,w13,ror#11	// Sigma1(e)
+	ror	w13,w21,#2
+	add	w20,w20,w17			// h+=Ch(e,f,g)
+	eor	w17,w21,w21,ror#9
+	add	w20,w20,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w24,w24,w20			// d+=h
+	eor	w19,w19,w22			// Maj(a,b,c)
+	eor	w17,w13,w17,ror#13	// Sigma0(a)
+	add	w20,w20,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w20,w20,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w11,w11			// 8
+#endif
+	add	w20,w20,w17			// h+=Sigma0(a)
+	ror	w16,w24,#6
+	add	w27,w27,w19			// h+=K[i]
+	eor	w14,w24,w24,ror#14
+	and	w17,w25,w24
+	bic	w19,w26,w24
+	add	w27,w27,w11			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w20,w21			// a^b, b^c in next round
+	eor	w16,w16,w14,ror#11	// Sigma1(e)
+	ror	w14,w20,#2
+	add	w27,w27,w17			// h+=Ch(e,f,g)
+	eor	w17,w20,w20,ror#9
+	add	w27,w27,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w23,w23,w27			// d+=h
+	eor	w28,w28,w21			// Maj(a,b,c)
+	eor	w17,w14,w17,ror#13	// Sigma0(a)
+	add	w27,w27,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w27,w27,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w12,w12			// 9
+#endif
+	ldp	w13,w14,[x1],#2*4
+	add	w27,w27,w17			// h+=Sigma0(a)
+	ror	w16,w23,#6
+	add	w26,w26,w28			// h+=K[i]
+	eor	w15,w23,w23,ror#14
+	and	w17,w24,w23
+	bic	w28,w25,w23
+	add	w26,w26,w12			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w27,w20			// a^b, b^c in next round
+	eor	w16,w16,w15,ror#11	// Sigma1(e)
+	ror	w15,w27,#2
+	add	w26,w26,w17			// h+=Ch(e,f,g)
+	eor	w17,w27,w27,ror#9
+	add	w26,w26,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w22,w22,w26			// d+=h
+	eor	w19,w19,w20			// Maj(a,b,c)
+	eor	w17,w15,w17,ror#13	// Sigma0(a)
+	add	w26,w26,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w26,w26,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w13,w13			// 10
+#endif
+	add	w26,w26,w17			// h+=Sigma0(a)
+	ror	w16,w22,#6
+	add	w25,w25,w19			// h+=K[i]
+	eor	w0,w22,w22,ror#14
+	and	w17,w23,w22
+	bic	w19,w24,w22
+	add	w25,w25,w13			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w26,w27			// a^b, b^c in next round
+	eor	w16,w16,w0,ror#11	// Sigma1(e)
+	ror	w0,w26,#2
+	add	w25,w25,w17			// h+=Ch(e,f,g)
+	eor	w17,w26,w26,ror#9
+	add	w25,w25,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w21,w21,w25			// d+=h
+	eor	w28,w28,w27			// Maj(a,b,c)
+	eor	w17,w0,w17,ror#13	// Sigma0(a)
+	add	w25,w25,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w25,w25,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w14,w14			// 11
+#endif
+	ldp	w15,w0,[x1],#2*4
+	add	w25,w25,w17			// h+=Sigma0(a)
+	str	w6,[sp,#12]
+	ror	w16,w21,#6
+	add	w24,w24,w28			// h+=K[i]
+	eor	w6,w21,w21,ror#14
+	and	w17,w22,w21
+	bic	w28,w23,w21
+	add	w24,w24,w14			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w25,w26			// a^b, b^c in next round
+	eor	w16,w16,w6,ror#11	// Sigma1(e)
+	ror	w6,w25,#2
+	add	w24,w24,w17			// h+=Ch(e,f,g)
+	eor	w17,w25,w25,ror#9
+	add	w24,w24,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w20,w20,w24			// d+=h
+	eor	w19,w19,w26			// Maj(a,b,c)
+	eor	w17,w6,w17,ror#13	// Sigma0(a)
+	add	w24,w24,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w24,w24,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w15,w15			// 12
+#endif
+	add	w24,w24,w17			// h+=Sigma0(a)
+	str	w7,[sp,#0]
+	ror	w16,w20,#6
+	add	w23,w23,w19			// h+=K[i]
+	eor	w7,w20,w20,ror#14
+	and	w17,w21,w20
+	bic	w19,w22,w20
+	add	w23,w23,w15			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w24,w25			// a^b, b^c in next round
+	eor	w16,w16,w7,ror#11	// Sigma1(e)
+	ror	w7,w24,#2
+	add	w23,w23,w17			// h+=Ch(e,f,g)
+	eor	w17,w24,w24,ror#9
+	add	w23,w23,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w27,w27,w23			// d+=h
+	eor	w28,w28,w25			// Maj(a,b,c)
+	eor	w17,w7,w17,ror#13	// Sigma0(a)
+	add	w23,w23,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w23,w23,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w0,w0			// 13
+#endif
+	ldp	w1,w2,[x1]
+	add	w23,w23,w17			// h+=Sigma0(a)
+	str	w8,[sp,#4]
+	ror	w16,w27,#6
+	add	w22,w22,w28			// h+=K[i]
+	eor	w8,w27,w27,ror#14
+	and	w17,w20,w27
+	bic	w28,w21,w27
+	add	w22,w22,w0			// h+=X[i]
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w23,w24			// a^b, b^c in next round
+	eor	w16,w16,w8,ror#11	// Sigma1(e)
+	ror	w8,w23,#2
+	add	w22,w22,w17			// h+=Ch(e,f,g)
+	eor	w17,w23,w23,ror#9
+	add	w22,w22,w16			// h+=Sigma1(e)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	add	w26,w26,w22			// d+=h
+	eor	w19,w19,w24			// Maj(a,b,c)
+	eor	w17,w8,w17,ror#13	// Sigma0(a)
+	add	w22,w22,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	//add	w22,w22,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w1,w1			// 14
+#endif
+	ldr	w6,[sp,#12]
+	add	w22,w22,w17			// h+=Sigma0(a)
+	str	w9,[sp,#8]
+	ror	w16,w26,#6
+	add	w21,w21,w19			// h+=K[i]
+	eor	w9,w26,w26,ror#14
+	and	w17,w27,w26
+	bic	w19,w20,w26
+	add	w21,w21,w1			// h+=X[i]
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w22,w23			// a^b, b^c in next round
+	eor	w16,w16,w9,ror#11	// Sigma1(e)
+	ror	w9,w22,#2
+	add	w21,w21,w17			// h+=Ch(e,f,g)
+	eor	w17,w22,w22,ror#9
+	add	w21,w21,w16			// h+=Sigma1(e)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	add	w25,w25,w21			// d+=h
+	eor	w28,w28,w23			// Maj(a,b,c)
+	eor	w17,w9,w17,ror#13	// Sigma0(a)
+	add	w21,w21,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	//add	w21,w21,w17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	w2,w2			// 15
+#endif
+	ldr	w7,[sp,#0]
+	add	w21,w21,w17			// h+=Sigma0(a)
+	str	w10,[sp,#12]
+	ror	w16,w25,#6
+	add	w20,w20,w28			// h+=K[i]
+	ror	w9,w4,#7
+	and	w17,w26,w25
+	ror	w8,w1,#17
+	bic	w28,w27,w25
+	ror	w10,w21,#2
+	add	w20,w20,w2			// h+=X[i]
+	eor	w16,w16,w25,ror#11
+	eor	w9,w9,w4,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w21,w22			// a^b, b^c in next round
+	eor	w16,w16,w25,ror#25	// Sigma1(e)
+	eor	w10,w10,w21,ror#13
+	add	w20,w20,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w8,w8,w1,ror#19
+	eor	w9,w9,w4,lsr#3	// sigma0(X[i+1])
+	add	w20,w20,w16			// h+=Sigma1(e)
+	eor	w19,w19,w22			// Maj(a,b,c)
+	eor	w17,w10,w21,ror#22	// Sigma0(a)
+	eor	w8,w8,w1,lsr#10	// sigma1(X[i+14])
+	add	w3,w3,w12
+	add	w24,w24,w20			// d+=h
+	add	w20,w20,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w3,w3,w9
+	add	w20,w20,w17			// h+=Sigma0(a)
+	add	w3,w3,w8
+.Loop_16_xx:
+	ldr	w8,[sp,#4]
+	str	w11,[sp,#0]
+	ror	w16,w24,#6
+	add	w27,w27,w19			// h+=K[i]
+	ror	w10,w5,#7
+	and	w17,w25,w24
+	ror	w9,w2,#17
+	bic	w19,w26,w24
+	ror	w11,w20,#2
+	add	w27,w27,w3			// h+=X[i]
+	eor	w16,w16,w24,ror#11
+	eor	w10,w10,w5,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w20,w21			// a^b, b^c in next round
+	eor	w16,w16,w24,ror#25	// Sigma1(e)
+	eor	w11,w11,w20,ror#13
+	add	w27,w27,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w9,w9,w2,ror#19
+	eor	w10,w10,w5,lsr#3	// sigma0(X[i+1])
+	add	w27,w27,w16			// h+=Sigma1(e)
+	eor	w28,w28,w21			// Maj(a,b,c)
+	eor	w17,w11,w20,ror#22	// Sigma0(a)
+	eor	w9,w9,w2,lsr#10	// sigma1(X[i+14])
+	add	w4,w4,w13
+	add	w23,w23,w27			// d+=h
+	add	w27,w27,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w4,w4,w10
+	add	w27,w27,w17			// h+=Sigma0(a)
+	add	w4,w4,w9
+	ldr	w9,[sp,#8]
+	str	w12,[sp,#4]
+	ror	w16,w23,#6
+	add	w26,w26,w28			// h+=K[i]
+	ror	w11,w6,#7
+	and	w17,w24,w23
+	ror	w10,w3,#17
+	bic	w28,w25,w23
+	ror	w12,w27,#2
+	add	w26,w26,w4			// h+=X[i]
+	eor	w16,w16,w23,ror#11
+	eor	w11,w11,w6,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w27,w20			// a^b, b^c in next round
+	eor	w16,w16,w23,ror#25	// Sigma1(e)
+	eor	w12,w12,w27,ror#13
+	add	w26,w26,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w10,w10,w3,ror#19
+	eor	w11,w11,w6,lsr#3	// sigma0(X[i+1])
+	add	w26,w26,w16			// h+=Sigma1(e)
+	eor	w19,w19,w20			// Maj(a,b,c)
+	eor	w17,w12,w27,ror#22	// Sigma0(a)
+	eor	w10,w10,w3,lsr#10	// sigma1(X[i+14])
+	add	w5,w5,w14
+	add	w22,w22,w26			// d+=h
+	add	w26,w26,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w5,w5,w11
+	add	w26,w26,w17			// h+=Sigma0(a)
+	add	w5,w5,w10
+	ldr	w10,[sp,#12]
+	str	w13,[sp,#8]
+	ror	w16,w22,#6
+	add	w25,w25,w19			// h+=K[i]
+	ror	w12,w7,#7
+	and	w17,w23,w22
+	ror	w11,w4,#17
+	bic	w19,w24,w22
+	ror	w13,w26,#2
+	add	w25,w25,w5			// h+=X[i]
+	eor	w16,w16,w22,ror#11
+	eor	w12,w12,w7,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w26,w27			// a^b, b^c in next round
+	eor	w16,w16,w22,ror#25	// Sigma1(e)
+	eor	w13,w13,w26,ror#13
+	add	w25,w25,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w11,w11,w4,ror#19
+	eor	w12,w12,w7,lsr#3	// sigma0(X[i+1])
+	add	w25,w25,w16			// h+=Sigma1(e)
+	eor	w28,w28,w27			// Maj(a,b,c)
+	eor	w17,w13,w26,ror#22	// Sigma0(a)
+	eor	w11,w11,w4,lsr#10	// sigma1(X[i+14])
+	add	w6,w6,w15
+	add	w21,w21,w25			// d+=h
+	add	w25,w25,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w6,w6,w12
+	add	w25,w25,w17			// h+=Sigma0(a)
+	add	w6,w6,w11
+	ldr	w11,[sp,#0]
+	str	w14,[sp,#12]
+	ror	w16,w21,#6
+	add	w24,w24,w28			// h+=K[i]
+	ror	w13,w8,#7
+	and	w17,w22,w21
+	ror	w12,w5,#17
+	bic	w28,w23,w21
+	ror	w14,w25,#2
+	add	w24,w24,w6			// h+=X[i]
+	eor	w16,w16,w21,ror#11
+	eor	w13,w13,w8,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w25,w26			// a^b, b^c in next round
+	eor	w16,w16,w21,ror#25	// Sigma1(e)
+	eor	w14,w14,w25,ror#13
+	add	w24,w24,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w12,w12,w5,ror#19
+	eor	w13,w13,w8,lsr#3	// sigma0(X[i+1])
+	add	w24,w24,w16			// h+=Sigma1(e)
+	eor	w19,w19,w26			// Maj(a,b,c)
+	eor	w17,w14,w25,ror#22	// Sigma0(a)
+	eor	w12,w12,w5,lsr#10	// sigma1(X[i+14])
+	add	w7,w7,w0
+	add	w20,w20,w24			// d+=h
+	add	w24,w24,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w7,w7,w13
+	add	w24,w24,w17			// h+=Sigma0(a)
+	add	w7,w7,w12
+	ldr	w12,[sp,#4]
+	str	w15,[sp,#0]
+	ror	w16,w20,#6
+	add	w23,w23,w19			// h+=K[i]
+	ror	w14,w9,#7
+	and	w17,w21,w20
+	ror	w13,w6,#17
+	bic	w19,w22,w20
+	ror	w15,w24,#2
+	add	w23,w23,w7			// h+=X[i]
+	eor	w16,w16,w20,ror#11
+	eor	w14,w14,w9,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w24,w25			// a^b, b^c in next round
+	eor	w16,w16,w20,ror#25	// Sigma1(e)
+	eor	w15,w15,w24,ror#13
+	add	w23,w23,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w13,w13,w6,ror#19
+	eor	w14,w14,w9,lsr#3	// sigma0(X[i+1])
+	add	w23,w23,w16			// h+=Sigma1(e)
+	eor	w28,w28,w25			// Maj(a,b,c)
+	eor	w17,w15,w24,ror#22	// Sigma0(a)
+	eor	w13,w13,w6,lsr#10	// sigma1(X[i+14])
+	add	w8,w8,w1
+	add	w27,w27,w23			// d+=h
+	add	w23,w23,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w8,w8,w14
+	add	w23,w23,w17			// h+=Sigma0(a)
+	add	w8,w8,w13
+	ldr	w13,[sp,#8]
+	str	w0,[sp,#4]
+	ror	w16,w27,#6
+	add	w22,w22,w28			// h+=K[i]
+	ror	w15,w10,#7
+	and	w17,w20,w27
+	ror	w14,w7,#17
+	bic	w28,w21,w27
+	ror	w0,w23,#2
+	add	w22,w22,w8			// h+=X[i]
+	eor	w16,w16,w27,ror#11
+	eor	w15,w15,w10,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w23,w24			// a^b, b^c in next round
+	eor	w16,w16,w27,ror#25	// Sigma1(e)
+	eor	w0,w0,w23,ror#13
+	add	w22,w22,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w14,w14,w7,ror#19
+	eor	w15,w15,w10,lsr#3	// sigma0(X[i+1])
+	add	w22,w22,w16			// h+=Sigma1(e)
+	eor	w19,w19,w24			// Maj(a,b,c)
+	eor	w17,w0,w23,ror#22	// Sigma0(a)
+	eor	w14,w14,w7,lsr#10	// sigma1(X[i+14])
+	add	w9,w9,w2
+	add	w26,w26,w22			// d+=h
+	add	w22,w22,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w9,w9,w15
+	add	w22,w22,w17			// h+=Sigma0(a)
+	add	w9,w9,w14
+	ldr	w14,[sp,#12]
+	str	w1,[sp,#8]
+	ror	w16,w26,#6
+	add	w21,w21,w19			// h+=K[i]
+	ror	w0,w11,#7
+	and	w17,w27,w26
+	ror	w15,w8,#17
+	bic	w19,w20,w26
+	ror	w1,w22,#2
+	add	w21,w21,w9			// h+=X[i]
+	eor	w16,w16,w26,ror#11
+	eor	w0,w0,w11,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w22,w23			// a^b, b^c in next round
+	eor	w16,w16,w26,ror#25	// Sigma1(e)
+	eor	w1,w1,w22,ror#13
+	add	w21,w21,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w15,w15,w8,ror#19
+	eor	w0,w0,w11,lsr#3	// sigma0(X[i+1])
+	add	w21,w21,w16			// h+=Sigma1(e)
+	eor	w28,w28,w23			// Maj(a,b,c)
+	eor	w17,w1,w22,ror#22	// Sigma0(a)
+	eor	w15,w15,w8,lsr#10	// sigma1(X[i+14])
+	add	w10,w10,w3
+	add	w25,w25,w21			// d+=h
+	add	w21,w21,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w10,w10,w0
+	add	w21,w21,w17			// h+=Sigma0(a)
+	add	w10,w10,w15
+	ldr	w15,[sp,#0]
+	str	w2,[sp,#12]
+	ror	w16,w25,#6
+	add	w20,w20,w28			// h+=K[i]
+	ror	w1,w12,#7
+	and	w17,w26,w25
+	ror	w0,w9,#17
+	bic	w28,w27,w25
+	ror	w2,w21,#2
+	add	w20,w20,w10			// h+=X[i]
+	eor	w16,w16,w25,ror#11
+	eor	w1,w1,w12,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w21,w22			// a^b, b^c in next round
+	eor	w16,w16,w25,ror#25	// Sigma1(e)
+	eor	w2,w2,w21,ror#13
+	add	w20,w20,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w0,w0,w9,ror#19
+	eor	w1,w1,w12,lsr#3	// sigma0(X[i+1])
+	add	w20,w20,w16			// h+=Sigma1(e)
+	eor	w19,w19,w22			// Maj(a,b,c)
+	eor	w17,w2,w21,ror#22	// Sigma0(a)
+	eor	w0,w0,w9,lsr#10	// sigma1(X[i+14])
+	add	w11,w11,w4
+	add	w24,w24,w20			// d+=h
+	add	w20,w20,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w11,w11,w1
+	add	w20,w20,w17			// h+=Sigma0(a)
+	add	w11,w11,w0
+	ldr	w0,[sp,#4]
+	str	w3,[sp,#0]
+	ror	w16,w24,#6
+	add	w27,w27,w19			// h+=K[i]
+	ror	w2,w13,#7
+	and	w17,w25,w24
+	ror	w1,w10,#17
+	bic	w19,w26,w24
+	ror	w3,w20,#2
+	add	w27,w27,w11			// h+=X[i]
+	eor	w16,w16,w24,ror#11
+	eor	w2,w2,w13,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w20,w21			// a^b, b^c in next round
+	eor	w16,w16,w24,ror#25	// Sigma1(e)
+	eor	w3,w3,w20,ror#13
+	add	w27,w27,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w1,w1,w10,ror#19
+	eor	w2,w2,w13,lsr#3	// sigma0(X[i+1])
+	add	w27,w27,w16			// h+=Sigma1(e)
+	eor	w28,w28,w21			// Maj(a,b,c)
+	eor	w17,w3,w20,ror#22	// Sigma0(a)
+	eor	w1,w1,w10,lsr#10	// sigma1(X[i+14])
+	add	w12,w12,w5
+	add	w23,w23,w27			// d+=h
+	add	w27,w27,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w12,w12,w2
+	add	w27,w27,w17			// h+=Sigma0(a)
+	add	w12,w12,w1
+	ldr	w1,[sp,#8]
+	str	w4,[sp,#4]
+	ror	w16,w23,#6
+	add	w26,w26,w28			// h+=K[i]
+	ror	w3,w14,#7
+	and	w17,w24,w23
+	ror	w2,w11,#17
+	bic	w28,w25,w23
+	ror	w4,w27,#2
+	add	w26,w26,w12			// h+=X[i]
+	eor	w16,w16,w23,ror#11
+	eor	w3,w3,w14,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w27,w20			// a^b, b^c in next round
+	eor	w16,w16,w23,ror#25	// Sigma1(e)
+	eor	w4,w4,w27,ror#13
+	add	w26,w26,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w2,w2,w11,ror#19
+	eor	w3,w3,w14,lsr#3	// sigma0(X[i+1])
+	add	w26,w26,w16			// h+=Sigma1(e)
+	eor	w19,w19,w20			// Maj(a,b,c)
+	eor	w17,w4,w27,ror#22	// Sigma0(a)
+	eor	w2,w2,w11,lsr#10	// sigma1(X[i+14])
+	add	w13,w13,w6
+	add	w22,w22,w26			// d+=h
+	add	w26,w26,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w13,w13,w3
+	add	w26,w26,w17			// h+=Sigma0(a)
+	add	w13,w13,w2
+	ldr	w2,[sp,#12]
+	str	w5,[sp,#8]
+	ror	w16,w22,#6
+	add	w25,w25,w19			// h+=K[i]
+	ror	w4,w15,#7
+	and	w17,w23,w22
+	ror	w3,w12,#17
+	bic	w19,w24,w22
+	ror	w5,w26,#2
+	add	w25,w25,w13			// h+=X[i]
+	eor	w16,w16,w22,ror#11
+	eor	w4,w4,w15,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w26,w27			// a^b, b^c in next round
+	eor	w16,w16,w22,ror#25	// Sigma1(e)
+	eor	w5,w5,w26,ror#13
+	add	w25,w25,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w3,w3,w12,ror#19
+	eor	w4,w4,w15,lsr#3	// sigma0(X[i+1])
+	add	w25,w25,w16			// h+=Sigma1(e)
+	eor	w28,w28,w27			// Maj(a,b,c)
+	eor	w17,w5,w26,ror#22	// Sigma0(a)
+	eor	w3,w3,w12,lsr#10	// sigma1(X[i+14])
+	add	w14,w14,w7
+	add	w21,w21,w25			// d+=h
+	add	w25,w25,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w14,w14,w4
+	add	w25,w25,w17			// h+=Sigma0(a)
+	add	w14,w14,w3
+	ldr	w3,[sp,#0]
+	str	w6,[sp,#12]
+	ror	w16,w21,#6
+	add	w24,w24,w28			// h+=K[i]
+	ror	w5,w0,#7
+	and	w17,w22,w21
+	ror	w4,w13,#17
+	bic	w28,w23,w21
+	ror	w6,w25,#2
+	add	w24,w24,w14			// h+=X[i]
+	eor	w16,w16,w21,ror#11
+	eor	w5,w5,w0,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w25,w26			// a^b, b^c in next round
+	eor	w16,w16,w21,ror#25	// Sigma1(e)
+	eor	w6,w6,w25,ror#13
+	add	w24,w24,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w4,w4,w13,ror#19
+	eor	w5,w5,w0,lsr#3	// sigma0(X[i+1])
+	add	w24,w24,w16			// h+=Sigma1(e)
+	eor	w19,w19,w26			// Maj(a,b,c)
+	eor	w17,w6,w25,ror#22	// Sigma0(a)
+	eor	w4,w4,w13,lsr#10	// sigma1(X[i+14])
+	add	w15,w15,w8
+	add	w20,w20,w24			// d+=h
+	add	w24,w24,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w15,w15,w5
+	add	w24,w24,w17			// h+=Sigma0(a)
+	add	w15,w15,w4
+	ldr	w4,[sp,#4]
+	str	w7,[sp,#0]
+	ror	w16,w20,#6
+	add	w23,w23,w19			// h+=K[i]
+	ror	w6,w1,#7
+	and	w17,w21,w20
+	ror	w5,w14,#17
+	bic	w19,w22,w20
+	ror	w7,w24,#2
+	add	w23,w23,w15			// h+=X[i]
+	eor	w16,w16,w20,ror#11
+	eor	w6,w6,w1,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w24,w25			// a^b, b^c in next round
+	eor	w16,w16,w20,ror#25	// Sigma1(e)
+	eor	w7,w7,w24,ror#13
+	add	w23,w23,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w5,w5,w14,ror#19
+	eor	w6,w6,w1,lsr#3	// sigma0(X[i+1])
+	add	w23,w23,w16			// h+=Sigma1(e)
+	eor	w28,w28,w25			// Maj(a,b,c)
+	eor	w17,w7,w24,ror#22	// Sigma0(a)
+	eor	w5,w5,w14,lsr#10	// sigma1(X[i+14])
+	add	w0,w0,w9
+	add	w27,w27,w23			// d+=h
+	add	w23,w23,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w0,w0,w6
+	add	w23,w23,w17			// h+=Sigma0(a)
+	add	w0,w0,w5
+	ldr	w5,[sp,#8]
+	str	w8,[sp,#4]
+	ror	w16,w27,#6
+	add	w22,w22,w28			// h+=K[i]
+	ror	w7,w2,#7
+	and	w17,w20,w27
+	ror	w6,w15,#17
+	bic	w28,w21,w27
+	ror	w8,w23,#2
+	add	w22,w22,w0			// h+=X[i]
+	eor	w16,w16,w27,ror#11
+	eor	w7,w7,w2,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w23,w24			// a^b, b^c in next round
+	eor	w16,w16,w27,ror#25	// Sigma1(e)
+	eor	w8,w8,w23,ror#13
+	add	w22,w22,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w6,w6,w15,ror#19
+	eor	w7,w7,w2,lsr#3	// sigma0(X[i+1])
+	add	w22,w22,w16			// h+=Sigma1(e)
+	eor	w19,w19,w24			// Maj(a,b,c)
+	eor	w17,w8,w23,ror#22	// Sigma0(a)
+	eor	w6,w6,w15,lsr#10	// sigma1(X[i+14])
+	add	w1,w1,w10
+	add	w26,w26,w22			// d+=h
+	add	w22,w22,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w1,w1,w7
+	add	w22,w22,w17			// h+=Sigma0(a)
+	add	w1,w1,w6
+	ldr	w6,[sp,#12]
+	str	w9,[sp,#8]
+	ror	w16,w26,#6
+	add	w21,w21,w19			// h+=K[i]
+	ror	w8,w3,#7
+	and	w17,w27,w26
+	ror	w7,w0,#17
+	bic	w19,w20,w26
+	ror	w9,w22,#2
+	add	w21,w21,w1			// h+=X[i]
+	eor	w16,w16,w26,ror#11
+	eor	w8,w8,w3,ror#18
+	orr	w17,w17,w19			// Ch(e,f,g)
+	eor	w19,w22,w23			// a^b, b^c in next round
+	eor	w16,w16,w26,ror#25	// Sigma1(e)
+	eor	w9,w9,w22,ror#13
+	add	w21,w21,w17			// h+=Ch(e,f,g)
+	and	w28,w28,w19			// (b^c)&=(a^b)
+	eor	w7,w7,w0,ror#19
+	eor	w8,w8,w3,lsr#3	// sigma0(X[i+1])
+	add	w21,w21,w16			// h+=Sigma1(e)
+	eor	w28,w28,w23			// Maj(a,b,c)
+	eor	w17,w9,w22,ror#22	// Sigma0(a)
+	eor	w7,w7,w0,lsr#10	// sigma1(X[i+14])
+	add	w2,w2,w11
+	add	w25,w25,w21			// d+=h
+	add	w21,w21,w28			// h+=Maj(a,b,c)
+	ldr	w28,[x30],#4		// *K++, w19 in next round
+	add	w2,w2,w8
+	add	w21,w21,w17			// h+=Sigma0(a)
+	add	w2,w2,w7
+	ldr	w7,[sp,#0]
+	str	w10,[sp,#12]
+	ror	w16,w25,#6
+	add	w20,w20,w28			// h+=K[i]
+	ror	w9,w4,#7
+	and	w17,w26,w25
+	ror	w8,w1,#17
+	bic	w28,w27,w25
+	ror	w10,w21,#2
+	add	w20,w20,w2			// h+=X[i]
+	eor	w16,w16,w25,ror#11
+	eor	w9,w9,w4,ror#18
+	orr	w17,w17,w28			// Ch(e,f,g)
+	eor	w28,w21,w22			// a^b, b^c in next round
+	eor	w16,w16,w25,ror#25	// Sigma1(e)
+	eor	w10,w10,w21,ror#13
+	add	w20,w20,w17			// h+=Ch(e,f,g)
+	and	w19,w19,w28			// (b^c)&=(a^b)
+	eor	w8,w8,w1,ror#19
+	eor	w9,w9,w4,lsr#3	// sigma0(X[i+1])
+	add	w20,w20,w16			// h+=Sigma1(e)
+	eor	w19,w19,w22			// Maj(a,b,c)
+	eor	w17,w10,w21,ror#22	// Sigma0(a)
+	eor	w8,w8,w1,lsr#10	// sigma1(X[i+14])
+	add	w3,w3,w12
+	add	w24,w24,w20			// d+=h
+	add	w20,w20,w19			// h+=Maj(a,b,c)
+	ldr	w19,[x30],#4		// *K++, w28 in next round
+	add	w3,w3,w9
+	add	w20,w20,w17			// h+=Sigma0(a)
+	add	w3,w3,w8
+	cbnz	w19,.Loop_16_xx
+
+	ldp	x0,x2,[x29,#96]
+	ldr	x1,[x29,#112]
+	sub	x30,x30,#260		// rewind
+
+	ldp	w3,w4,[x0]
+	ldp	w5,w6,[x0,#2*4]
+	add	x1,x1,#14*4			// advance input pointer
+	ldp	w7,w8,[x0,#4*4]
+	add	w20,w20,w3
+	ldp	w9,w10,[x0,#6*4]
+	add	w21,w21,w4
+	add	w22,w22,w5
+	add	w23,w23,w6
+	stp	w20,w21,[x0]
+	add	w24,w24,w7
+	add	w25,w25,w8
+	stp	w22,w23,[x0,#2*4]
+	add	w26,w26,w9
+	add	w27,w27,w10
+	cmp	x1,x2
+	stp	w24,w25,[x0,#4*4]
+	stp	w26,w27,[x0,#6*4]
+	b.ne	.Loop
+
+	ldp	x19,x20,[x29,#16]
+	add	sp,sp,#4*4
+	ldp	x21,x22,[x29,#32]
+	ldp	x23,x24,[x29,#48]
+	ldp	x25,x26,[x29,#64]
+	ldp	x27,x28,[x29,#80]
+	ldp	x29,x30,[sp],#128
+	ret
+.size	sha256_block_data_order,.-sha256_block_data_order
+
+.align	6
+.type	.LK256,%object
+.LK256:
+.long	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.long	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.long	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+.long	0	//terminator
+.size	.LK256,.-.LK256
+.align	3
+.LOPENSSL_armcap_P:
+.quad	OPENSSL_armcap_P-.
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+.type	sha256_block_armv8,%function
+.align	6
+sha256_block_armv8:
+.Lv8_entry:
+	stp	x29,x30,[sp,#-16]!
+	add	x29,sp,#0
+
+	ld1	{v0.4s,v1.4s},[x0]
+	adr	x3,.LK256
+
+.Loop_hw:
+	ld1	{v4.16b,v5.16b,v6.16b,v7.16b},[x1],#64
+	sub	x2,x2,#1
+	ld1	{v16.4s},[x3],#16
+	rev32	v4.16b,v4.16b
+	rev32	v5.16b,v5.16b
+	rev32	v6.16b,v6.16b
+	rev32	v7.16b,v7.16b
+	orr	v18.16b,v0.16b,v0.16b		// offload
+	orr	v19.16b,v1.16b,v1.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v4.4s
+.inst	0x5e2828a4	//sha256su0 v4.16b,v5.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e0760c4	//sha256su1 v4.16b,v6.16b,v7.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v5.4s
+.inst	0x5e2828c5	//sha256su0 v5.16b,v6.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0460e5	//sha256su1 v5.16b,v7.16b,v4.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v6.4s
+.inst	0x5e2828e6	//sha256su0 v6.16b,v7.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e056086	//sha256su1 v6.16b,v4.16b,v5.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v7.4s
+.inst	0x5e282887	//sha256su0 v7.16b,v4.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0660a7	//sha256su1 v7.16b,v5.16b,v6.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v4.4s
+.inst	0x5e2828a4	//sha256su0 v4.16b,v5.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e0760c4	//sha256su1 v4.16b,v6.16b,v7.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v5.4s
+.inst	0x5e2828c5	//sha256su0 v5.16b,v6.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0460e5	//sha256su1 v5.16b,v7.16b,v4.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v6.4s
+.inst	0x5e2828e6	//sha256su0 v6.16b,v7.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e056086	//sha256su1 v6.16b,v4.16b,v5.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v7.4s
+.inst	0x5e282887	//sha256su0 v7.16b,v4.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0660a7	//sha256su1 v7.16b,v5.16b,v6.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v4.4s
+.inst	0x5e2828a4	//sha256su0 v4.16b,v5.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e0760c4	//sha256su1 v4.16b,v6.16b,v7.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v5.4s
+.inst	0x5e2828c5	//sha256su0 v5.16b,v6.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0460e5	//sha256su1 v5.16b,v7.16b,v4.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v6.4s
+.inst	0x5e2828e6	//sha256su0 v6.16b,v7.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+.inst	0x5e056086	//sha256su1 v6.16b,v4.16b,v5.16b
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v7.4s
+.inst	0x5e282887	//sha256su0 v7.16b,v4.16b
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+.inst	0x5e0660a7	//sha256su1 v7.16b,v5.16b,v6.16b
+	ld1	{v17.4s},[x3],#16
+	add	v16.4s,v16.4s,v4.4s
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+
+	ld1	{v16.4s},[x3],#16
+	add	v17.4s,v17.4s,v5.4s
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+
+	ld1	{v17.4s},[x3]
+	add	v16.4s,v16.4s,v6.4s
+	sub	x3,x3,#64*4-16	// rewind
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e104020	//sha256h v0.16b,v1.16b,v16.4s
+.inst	0x5e105041	//sha256h2 v1.16b,v2.16b,v16.4s
+
+	add	v17.4s,v17.4s,v7.4s
+	orr	v2.16b,v0.16b,v0.16b
+.inst	0x5e114020	//sha256h v0.16b,v1.16b,v17.4s
+.inst	0x5e115041	//sha256h2 v1.16b,v2.16b,v17.4s
+
+	add	v0.4s,v0.4s,v18.4s
+	add	v1.4s,v1.4s,v19.4s
+
+	cbnz	x2,.Loop_hw
+
+	st1	{v0.4s,v1.4s},[x0]
+
+	ldr	x29,[sp],#16
+	ret
+.size	sha256_block_armv8,.-sha256_block_armv8
+.comm	OPENSSL_armcap_P,4,4
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
new file mode 100644
index 0000000..654c473
--- /dev/null
+++ b/third_party/boringssl/linux-aarch64/crypto/sha/sha512-armv8.S
@@ -0,0 +1,1025 @@
+#if defined(__aarch64__)
+#include "arm_arch.h"
+
+.text
+
+
+.globl	sha512_block_data_order
+.type	sha512_block_data_order,%function
+.align	6
+sha512_block_data_order:
+	stp	x29,x30,[sp,#-128]!
+	add	x29,sp,#0
+
+	stp	x19,x20,[sp,#16]
+	stp	x21,x22,[sp,#32]
+	stp	x23,x24,[sp,#48]
+	stp	x25,x26,[sp,#64]
+	stp	x27,x28,[sp,#80]
+	sub	sp,sp,#4*8
+
+	ldp	x20,x21,[x0]				// load context
+	ldp	x22,x23,[x0,#2*8]
+	ldp	x24,x25,[x0,#4*8]
+	add	x2,x1,x2,lsl#7	// end of input
+	ldp	x26,x27,[x0,#6*8]
+	adr	x30,.LK512
+	stp	x0,x2,[x29,#96]
+
+.Loop:
+	ldp	x3,x4,[x1],#2*8
+	ldr	x19,[x30],#8			// *K++
+	eor	x28,x21,x22				// magic seed
+	str	x1,[x29,#112]
+#ifndef	__ARMEB__
+	rev	x3,x3			// 0
+#endif
+	ror	x16,x24,#14
+	add	x27,x27,x19			// h+=K[i]
+	eor	x6,x24,x24,ror#23
+	and	x17,x25,x24
+	bic	x19,x26,x24
+	add	x27,x27,x3			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x20,x21			// a^b, b^c in next round
+	eor	x16,x16,x6,ror#18	// Sigma1(e)
+	ror	x6,x20,#28
+	add	x27,x27,x17			// h+=Ch(e,f,g)
+	eor	x17,x20,x20,ror#5
+	add	x27,x27,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x23,x23,x27			// d+=h
+	eor	x28,x28,x21			// Maj(a,b,c)
+	eor	x17,x6,x17,ror#34	// Sigma0(a)
+	add	x27,x27,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x27,x27,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x4,x4			// 1
+#endif
+	ldp	x5,x6,[x1],#2*8
+	add	x27,x27,x17			// h+=Sigma0(a)
+	ror	x16,x23,#14
+	add	x26,x26,x28			// h+=K[i]
+	eor	x7,x23,x23,ror#23
+	and	x17,x24,x23
+	bic	x28,x25,x23
+	add	x26,x26,x4			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x27,x20			// a^b, b^c in next round
+	eor	x16,x16,x7,ror#18	// Sigma1(e)
+	ror	x7,x27,#28
+	add	x26,x26,x17			// h+=Ch(e,f,g)
+	eor	x17,x27,x27,ror#5
+	add	x26,x26,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x22,x22,x26			// d+=h
+	eor	x19,x19,x20			// Maj(a,b,c)
+	eor	x17,x7,x17,ror#34	// Sigma0(a)
+	add	x26,x26,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x26,x26,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x5,x5			// 2
+#endif
+	add	x26,x26,x17			// h+=Sigma0(a)
+	ror	x16,x22,#14
+	add	x25,x25,x19			// h+=K[i]
+	eor	x8,x22,x22,ror#23
+	and	x17,x23,x22
+	bic	x19,x24,x22
+	add	x25,x25,x5			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x26,x27			// a^b, b^c in next round
+	eor	x16,x16,x8,ror#18	// Sigma1(e)
+	ror	x8,x26,#28
+	add	x25,x25,x17			// h+=Ch(e,f,g)
+	eor	x17,x26,x26,ror#5
+	add	x25,x25,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x21,x21,x25			// d+=h
+	eor	x28,x28,x27			// Maj(a,b,c)
+	eor	x17,x8,x17,ror#34	// Sigma0(a)
+	add	x25,x25,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x25,x25,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x6,x6			// 3
+#endif
+	ldp	x7,x8,[x1],#2*8
+	add	x25,x25,x17			// h+=Sigma0(a)
+	ror	x16,x21,#14
+	add	x24,x24,x28			// h+=K[i]
+	eor	x9,x21,x21,ror#23
+	and	x17,x22,x21
+	bic	x28,x23,x21
+	add	x24,x24,x6			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x25,x26			// a^b, b^c in next round
+	eor	x16,x16,x9,ror#18	// Sigma1(e)
+	ror	x9,x25,#28
+	add	x24,x24,x17			// h+=Ch(e,f,g)
+	eor	x17,x25,x25,ror#5
+	add	x24,x24,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x20,x20,x24			// d+=h
+	eor	x19,x19,x26			// Maj(a,b,c)
+	eor	x17,x9,x17,ror#34	// Sigma0(a)
+	add	x24,x24,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x24,x24,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x7,x7			// 4
+#endif
+	add	x24,x24,x17			// h+=Sigma0(a)
+	ror	x16,x20,#14
+	add	x23,x23,x19			// h+=K[i]
+	eor	x10,x20,x20,ror#23
+	and	x17,x21,x20
+	bic	x19,x22,x20
+	add	x23,x23,x7			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x24,x25			// a^b, b^c in next round
+	eor	x16,x16,x10,ror#18	// Sigma1(e)
+	ror	x10,x24,#28
+	add	x23,x23,x17			// h+=Ch(e,f,g)
+	eor	x17,x24,x24,ror#5
+	add	x23,x23,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x27,x27,x23			// d+=h
+	eor	x28,x28,x25			// Maj(a,b,c)
+	eor	x17,x10,x17,ror#34	// Sigma0(a)
+	add	x23,x23,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x23,x23,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x8,x8			// 5
+#endif
+	ldp	x9,x10,[x1],#2*8
+	add	x23,x23,x17			// h+=Sigma0(a)
+	ror	x16,x27,#14
+	add	x22,x22,x28			// h+=K[i]
+	eor	x11,x27,x27,ror#23
+	and	x17,x20,x27
+	bic	x28,x21,x27
+	add	x22,x22,x8			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x23,x24			// a^b, b^c in next round
+	eor	x16,x16,x11,ror#18	// Sigma1(e)
+	ror	x11,x23,#28
+	add	x22,x22,x17			// h+=Ch(e,f,g)
+	eor	x17,x23,x23,ror#5
+	add	x22,x22,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x26,x26,x22			// d+=h
+	eor	x19,x19,x24			// Maj(a,b,c)
+	eor	x17,x11,x17,ror#34	// Sigma0(a)
+	add	x22,x22,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x22,x22,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x9,x9			// 6
+#endif
+	add	x22,x22,x17			// h+=Sigma0(a)
+	ror	x16,x26,#14
+	add	x21,x21,x19			// h+=K[i]
+	eor	x12,x26,x26,ror#23
+	and	x17,x27,x26
+	bic	x19,x20,x26
+	add	x21,x21,x9			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x22,x23			// a^b, b^c in next round
+	eor	x16,x16,x12,ror#18	// Sigma1(e)
+	ror	x12,x22,#28
+	add	x21,x21,x17			// h+=Ch(e,f,g)
+	eor	x17,x22,x22,ror#5
+	add	x21,x21,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x25,x25,x21			// d+=h
+	eor	x28,x28,x23			// Maj(a,b,c)
+	eor	x17,x12,x17,ror#34	// Sigma0(a)
+	add	x21,x21,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x21,x21,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x10,x10			// 7
+#endif
+	ldp	x11,x12,[x1],#2*8
+	add	x21,x21,x17			// h+=Sigma0(a)
+	ror	x16,x25,#14
+	add	x20,x20,x28			// h+=K[i]
+	eor	x13,x25,x25,ror#23
+	and	x17,x26,x25
+	bic	x28,x27,x25
+	add	x20,x20,x10			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x21,x22			// a^b, b^c in next round
+	eor	x16,x16,x13,ror#18	// Sigma1(e)
+	ror	x13,x21,#28
+	add	x20,x20,x17			// h+=Ch(e,f,g)
+	eor	x17,x21,x21,ror#5
+	add	x20,x20,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x24,x24,x20			// d+=h
+	eor	x19,x19,x22			// Maj(a,b,c)
+	eor	x17,x13,x17,ror#34	// Sigma0(a)
+	add	x20,x20,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x20,x20,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x11,x11			// 8
+#endif
+	add	x20,x20,x17			// h+=Sigma0(a)
+	ror	x16,x24,#14
+	add	x27,x27,x19			// h+=K[i]
+	eor	x14,x24,x24,ror#23
+	and	x17,x25,x24
+	bic	x19,x26,x24
+	add	x27,x27,x11			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x20,x21			// a^b, b^c in next round
+	eor	x16,x16,x14,ror#18	// Sigma1(e)
+	ror	x14,x20,#28
+	add	x27,x27,x17			// h+=Ch(e,f,g)
+	eor	x17,x20,x20,ror#5
+	add	x27,x27,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x23,x23,x27			// d+=h
+	eor	x28,x28,x21			// Maj(a,b,c)
+	eor	x17,x14,x17,ror#34	// Sigma0(a)
+	add	x27,x27,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x27,x27,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x12,x12			// 9
+#endif
+	ldp	x13,x14,[x1],#2*8
+	add	x27,x27,x17			// h+=Sigma0(a)
+	ror	x16,x23,#14
+	add	x26,x26,x28			// h+=K[i]
+	eor	x15,x23,x23,ror#23
+	and	x17,x24,x23
+	bic	x28,x25,x23
+	add	x26,x26,x12			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x27,x20			// a^b, b^c in next round
+	eor	x16,x16,x15,ror#18	// Sigma1(e)
+	ror	x15,x27,#28
+	add	x26,x26,x17			// h+=Ch(e,f,g)
+	eor	x17,x27,x27,ror#5
+	add	x26,x26,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x22,x22,x26			// d+=h
+	eor	x19,x19,x20			// Maj(a,b,c)
+	eor	x17,x15,x17,ror#34	// Sigma0(a)
+	add	x26,x26,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x26,x26,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x13,x13			// 10
+#endif
+	add	x26,x26,x17			// h+=Sigma0(a)
+	ror	x16,x22,#14
+	add	x25,x25,x19			// h+=K[i]
+	eor	x0,x22,x22,ror#23
+	and	x17,x23,x22
+	bic	x19,x24,x22
+	add	x25,x25,x13			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x26,x27			// a^b, b^c in next round
+	eor	x16,x16,x0,ror#18	// Sigma1(e)
+	ror	x0,x26,#28
+	add	x25,x25,x17			// h+=Ch(e,f,g)
+	eor	x17,x26,x26,ror#5
+	add	x25,x25,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x21,x21,x25			// d+=h
+	eor	x28,x28,x27			// Maj(a,b,c)
+	eor	x17,x0,x17,ror#34	// Sigma0(a)
+	add	x25,x25,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x25,x25,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x14,x14			// 11
+#endif
+	ldp	x15,x0,[x1],#2*8
+	add	x25,x25,x17			// h+=Sigma0(a)
+	str	x6,[sp,#24]
+	ror	x16,x21,#14
+	add	x24,x24,x28			// h+=K[i]
+	eor	x6,x21,x21,ror#23
+	and	x17,x22,x21
+	bic	x28,x23,x21
+	add	x24,x24,x14			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x25,x26			// a^b, b^c in next round
+	eor	x16,x16,x6,ror#18	// Sigma1(e)
+	ror	x6,x25,#28
+	add	x24,x24,x17			// h+=Ch(e,f,g)
+	eor	x17,x25,x25,ror#5
+	add	x24,x24,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x20,x20,x24			// d+=h
+	eor	x19,x19,x26			// Maj(a,b,c)
+	eor	x17,x6,x17,ror#34	// Sigma0(a)
+	add	x24,x24,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x24,x24,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x15,x15			// 12
+#endif
+	add	x24,x24,x17			// h+=Sigma0(a)
+	str	x7,[sp,#0]
+	ror	x16,x20,#14
+	add	x23,x23,x19			// h+=K[i]
+	eor	x7,x20,x20,ror#23
+	and	x17,x21,x20
+	bic	x19,x22,x20
+	add	x23,x23,x15			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x24,x25			// a^b, b^c in next round
+	eor	x16,x16,x7,ror#18	// Sigma1(e)
+	ror	x7,x24,#28
+	add	x23,x23,x17			// h+=Ch(e,f,g)
+	eor	x17,x24,x24,ror#5
+	add	x23,x23,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x27,x27,x23			// d+=h
+	eor	x28,x28,x25			// Maj(a,b,c)
+	eor	x17,x7,x17,ror#34	// Sigma0(a)
+	add	x23,x23,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x23,x23,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x0,x0			// 13
+#endif
+	ldp	x1,x2,[x1]
+	add	x23,x23,x17			// h+=Sigma0(a)
+	str	x8,[sp,#8]
+	ror	x16,x27,#14
+	add	x22,x22,x28			// h+=K[i]
+	eor	x8,x27,x27,ror#23
+	and	x17,x20,x27
+	bic	x28,x21,x27
+	add	x22,x22,x0			// h+=X[i]
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x23,x24			// a^b, b^c in next round
+	eor	x16,x16,x8,ror#18	// Sigma1(e)
+	ror	x8,x23,#28
+	add	x22,x22,x17			// h+=Ch(e,f,g)
+	eor	x17,x23,x23,ror#5
+	add	x22,x22,x16			// h+=Sigma1(e)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	add	x26,x26,x22			// d+=h
+	eor	x19,x19,x24			// Maj(a,b,c)
+	eor	x17,x8,x17,ror#34	// Sigma0(a)
+	add	x22,x22,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	//add	x22,x22,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x1,x1			// 14
+#endif
+	ldr	x6,[sp,#24]
+	add	x22,x22,x17			// h+=Sigma0(a)
+	str	x9,[sp,#16]
+	ror	x16,x26,#14
+	add	x21,x21,x19			// h+=K[i]
+	eor	x9,x26,x26,ror#23
+	and	x17,x27,x26
+	bic	x19,x20,x26
+	add	x21,x21,x1			// h+=X[i]
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x22,x23			// a^b, b^c in next round
+	eor	x16,x16,x9,ror#18	// Sigma1(e)
+	ror	x9,x22,#28
+	add	x21,x21,x17			// h+=Ch(e,f,g)
+	eor	x17,x22,x22,ror#5
+	add	x21,x21,x16			// h+=Sigma1(e)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	add	x25,x25,x21			// d+=h
+	eor	x28,x28,x23			// Maj(a,b,c)
+	eor	x17,x9,x17,ror#34	// Sigma0(a)
+	add	x21,x21,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	//add	x21,x21,x17			// h+=Sigma0(a)
+#ifndef	__ARMEB__
+	rev	x2,x2			// 15
+#endif
+	ldr	x7,[sp,#0]
+	add	x21,x21,x17			// h+=Sigma0(a)
+	str	x10,[sp,#24]
+	ror	x16,x25,#14
+	add	x20,x20,x28			// h+=K[i]
+	ror	x9,x4,#1
+	and	x17,x26,x25
+	ror	x8,x1,#19
+	bic	x28,x27,x25
+	ror	x10,x21,#28
+	add	x20,x20,x2			// h+=X[i]
+	eor	x16,x16,x25,ror#18
+	eor	x9,x9,x4,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x21,x22			// a^b, b^c in next round
+	eor	x16,x16,x25,ror#41	// Sigma1(e)
+	eor	x10,x10,x21,ror#34
+	add	x20,x20,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x8,x8,x1,ror#61
+	eor	x9,x9,x4,lsr#7	// sigma0(X[i+1])
+	add	x20,x20,x16			// h+=Sigma1(e)
+	eor	x19,x19,x22			// Maj(a,b,c)
+	eor	x17,x10,x21,ror#39	// Sigma0(a)
+	eor	x8,x8,x1,lsr#6	// sigma1(X[i+14])
+	add	x3,x3,x12
+	add	x24,x24,x20			// d+=h
+	add	x20,x20,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x3,x3,x9
+	add	x20,x20,x17			// h+=Sigma0(a)
+	add	x3,x3,x8
+.Loop_16_xx:
+	ldr	x8,[sp,#8]
+	str	x11,[sp,#0]
+	ror	x16,x24,#14
+	add	x27,x27,x19			// h+=K[i]
+	ror	x10,x5,#1
+	and	x17,x25,x24
+	ror	x9,x2,#19
+	bic	x19,x26,x24
+	ror	x11,x20,#28
+	add	x27,x27,x3			// h+=X[i]
+	eor	x16,x16,x24,ror#18
+	eor	x10,x10,x5,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x20,x21			// a^b, b^c in next round
+	eor	x16,x16,x24,ror#41	// Sigma1(e)
+	eor	x11,x11,x20,ror#34
+	add	x27,x27,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x9,x9,x2,ror#61
+	eor	x10,x10,x5,lsr#7	// sigma0(X[i+1])
+	add	x27,x27,x16			// h+=Sigma1(e)
+	eor	x28,x28,x21			// Maj(a,b,c)
+	eor	x17,x11,x20,ror#39	// Sigma0(a)
+	eor	x9,x9,x2,lsr#6	// sigma1(X[i+14])
+	add	x4,x4,x13
+	add	x23,x23,x27			// d+=h
+	add	x27,x27,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x4,x4,x10
+	add	x27,x27,x17			// h+=Sigma0(a)
+	add	x4,x4,x9
+	ldr	x9,[sp,#16]
+	str	x12,[sp,#8]
+	ror	x16,x23,#14
+	add	x26,x26,x28			// h+=K[i]
+	ror	x11,x6,#1
+	and	x17,x24,x23
+	ror	x10,x3,#19
+	bic	x28,x25,x23
+	ror	x12,x27,#28
+	add	x26,x26,x4			// h+=X[i]
+	eor	x16,x16,x23,ror#18
+	eor	x11,x11,x6,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x27,x20			// a^b, b^c in next round
+	eor	x16,x16,x23,ror#41	// Sigma1(e)
+	eor	x12,x12,x27,ror#34
+	add	x26,x26,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x10,x10,x3,ror#61
+	eor	x11,x11,x6,lsr#7	// sigma0(X[i+1])
+	add	x26,x26,x16			// h+=Sigma1(e)
+	eor	x19,x19,x20			// Maj(a,b,c)
+	eor	x17,x12,x27,ror#39	// Sigma0(a)
+	eor	x10,x10,x3,lsr#6	// sigma1(X[i+14])
+	add	x5,x5,x14
+	add	x22,x22,x26			// d+=h
+	add	x26,x26,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x5,x5,x11
+	add	x26,x26,x17			// h+=Sigma0(a)
+	add	x5,x5,x10
+	ldr	x10,[sp,#24]
+	str	x13,[sp,#16]
+	ror	x16,x22,#14
+	add	x25,x25,x19			// h+=K[i]
+	ror	x12,x7,#1
+	and	x17,x23,x22
+	ror	x11,x4,#19
+	bic	x19,x24,x22
+	ror	x13,x26,#28
+	add	x25,x25,x5			// h+=X[i]
+	eor	x16,x16,x22,ror#18
+	eor	x12,x12,x7,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x26,x27			// a^b, b^c in next round
+	eor	x16,x16,x22,ror#41	// Sigma1(e)
+	eor	x13,x13,x26,ror#34
+	add	x25,x25,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x11,x11,x4,ror#61
+	eor	x12,x12,x7,lsr#7	// sigma0(X[i+1])
+	add	x25,x25,x16			// h+=Sigma1(e)
+	eor	x28,x28,x27			// Maj(a,b,c)
+	eor	x17,x13,x26,ror#39	// Sigma0(a)
+	eor	x11,x11,x4,lsr#6	// sigma1(X[i+14])
+	add	x6,x6,x15
+	add	x21,x21,x25			// d+=h
+	add	x25,x25,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x6,x6,x12
+	add	x25,x25,x17			// h+=Sigma0(a)
+	add	x6,x6,x11
+	ldr	x11,[sp,#0]
+	str	x14,[sp,#24]
+	ror	x16,x21,#14
+	add	x24,x24,x28			// h+=K[i]
+	ror	x13,x8,#1
+	and	x17,x22,x21
+	ror	x12,x5,#19
+	bic	x28,x23,x21
+	ror	x14,x25,#28
+	add	x24,x24,x6			// h+=X[i]
+	eor	x16,x16,x21,ror#18
+	eor	x13,x13,x8,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x25,x26			// a^b, b^c in next round
+	eor	x16,x16,x21,ror#41	// Sigma1(e)
+	eor	x14,x14,x25,ror#34
+	add	x24,x24,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x12,x12,x5,ror#61
+	eor	x13,x13,x8,lsr#7	// sigma0(X[i+1])
+	add	x24,x24,x16			// h+=Sigma1(e)
+	eor	x19,x19,x26			// Maj(a,b,c)
+	eor	x17,x14,x25,ror#39	// Sigma0(a)
+	eor	x12,x12,x5,lsr#6	// sigma1(X[i+14])
+	add	x7,x7,x0
+	add	x20,x20,x24			// d+=h
+	add	x24,x24,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x7,x7,x13
+	add	x24,x24,x17			// h+=Sigma0(a)
+	add	x7,x7,x12
+	ldr	x12,[sp,#8]
+	str	x15,[sp,#0]
+	ror	x16,x20,#14
+	add	x23,x23,x19			// h+=K[i]
+	ror	x14,x9,#1
+	and	x17,x21,x20
+	ror	x13,x6,#19
+	bic	x19,x22,x20
+	ror	x15,x24,#28
+	add	x23,x23,x7			// h+=X[i]
+	eor	x16,x16,x20,ror#18
+	eor	x14,x14,x9,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x24,x25			// a^b, b^c in next round
+	eor	x16,x16,x20,ror#41	// Sigma1(e)
+	eor	x15,x15,x24,ror#34
+	add	x23,x23,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x13,x13,x6,ror#61
+	eor	x14,x14,x9,lsr#7	// sigma0(X[i+1])
+	add	x23,x23,x16			// h+=Sigma1(e)
+	eor	x28,x28,x25			// Maj(a,b,c)
+	eor	x17,x15,x24,ror#39	// Sigma0(a)
+	eor	x13,x13,x6,lsr#6	// sigma1(X[i+14])
+	add	x8,x8,x1
+	add	x27,x27,x23			// d+=h
+	add	x23,x23,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x8,x8,x14
+	add	x23,x23,x17			// h+=Sigma0(a)
+	add	x8,x8,x13
+	ldr	x13,[sp,#16]
+	str	x0,[sp,#8]
+	ror	x16,x27,#14
+	add	x22,x22,x28			// h+=K[i]
+	ror	x15,x10,#1
+	and	x17,x20,x27
+	ror	x14,x7,#19
+	bic	x28,x21,x27
+	ror	x0,x23,#28
+	add	x22,x22,x8			// h+=X[i]
+	eor	x16,x16,x27,ror#18
+	eor	x15,x15,x10,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x23,x24			// a^b, b^c in next round
+	eor	x16,x16,x27,ror#41	// Sigma1(e)
+	eor	x0,x0,x23,ror#34
+	add	x22,x22,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x14,x14,x7,ror#61
+	eor	x15,x15,x10,lsr#7	// sigma0(X[i+1])
+	add	x22,x22,x16			// h+=Sigma1(e)
+	eor	x19,x19,x24			// Maj(a,b,c)
+	eor	x17,x0,x23,ror#39	// Sigma0(a)
+	eor	x14,x14,x7,lsr#6	// sigma1(X[i+14])
+	add	x9,x9,x2
+	add	x26,x26,x22			// d+=h
+	add	x22,x22,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x9,x9,x15
+	add	x22,x22,x17			// h+=Sigma0(a)
+	add	x9,x9,x14
+	ldr	x14,[sp,#24]
+	str	x1,[sp,#16]
+	ror	x16,x26,#14
+	add	x21,x21,x19			// h+=K[i]
+	ror	x0,x11,#1
+	and	x17,x27,x26
+	ror	x15,x8,#19
+	bic	x19,x20,x26
+	ror	x1,x22,#28
+	add	x21,x21,x9			// h+=X[i]
+	eor	x16,x16,x26,ror#18
+	eor	x0,x0,x11,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x22,x23			// a^b, b^c in next round
+	eor	x16,x16,x26,ror#41	// Sigma1(e)
+	eor	x1,x1,x22,ror#34
+	add	x21,x21,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x15,x15,x8,ror#61
+	eor	x0,x0,x11,lsr#7	// sigma0(X[i+1])
+	add	x21,x21,x16			// h+=Sigma1(e)
+	eor	x28,x28,x23			// Maj(a,b,c)
+	eor	x17,x1,x22,ror#39	// Sigma0(a)
+	eor	x15,x15,x8,lsr#6	// sigma1(X[i+14])
+	add	x10,x10,x3
+	add	x25,x25,x21			// d+=h
+	add	x21,x21,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x10,x10,x0
+	add	x21,x21,x17			// h+=Sigma0(a)
+	add	x10,x10,x15
+	ldr	x15,[sp,#0]
+	str	x2,[sp,#24]
+	ror	x16,x25,#14
+	add	x20,x20,x28			// h+=K[i]
+	ror	x1,x12,#1
+	and	x17,x26,x25
+	ror	x0,x9,#19
+	bic	x28,x27,x25
+	ror	x2,x21,#28
+	add	x20,x20,x10			// h+=X[i]
+	eor	x16,x16,x25,ror#18
+	eor	x1,x1,x12,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x21,x22			// a^b, b^c in next round
+	eor	x16,x16,x25,ror#41	// Sigma1(e)
+	eor	x2,x2,x21,ror#34
+	add	x20,x20,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x0,x0,x9,ror#61
+	eor	x1,x1,x12,lsr#7	// sigma0(X[i+1])
+	add	x20,x20,x16			// h+=Sigma1(e)
+	eor	x19,x19,x22			// Maj(a,b,c)
+	eor	x17,x2,x21,ror#39	// Sigma0(a)
+	eor	x0,x0,x9,lsr#6	// sigma1(X[i+14])
+	add	x11,x11,x4
+	add	x24,x24,x20			// d+=h
+	add	x20,x20,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x11,x11,x1
+	add	x20,x20,x17			// h+=Sigma0(a)
+	add	x11,x11,x0
+	ldr	x0,[sp,#8]
+	str	x3,[sp,#0]
+	ror	x16,x24,#14
+	add	x27,x27,x19			// h+=K[i]
+	ror	x2,x13,#1
+	and	x17,x25,x24
+	ror	x1,x10,#19
+	bic	x19,x26,x24
+	ror	x3,x20,#28
+	add	x27,x27,x11			// h+=X[i]
+	eor	x16,x16,x24,ror#18
+	eor	x2,x2,x13,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x20,x21			// a^b, b^c in next round
+	eor	x16,x16,x24,ror#41	// Sigma1(e)
+	eor	x3,x3,x20,ror#34
+	add	x27,x27,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x1,x1,x10,ror#61
+	eor	x2,x2,x13,lsr#7	// sigma0(X[i+1])
+	add	x27,x27,x16			// h+=Sigma1(e)
+	eor	x28,x28,x21			// Maj(a,b,c)
+	eor	x17,x3,x20,ror#39	// Sigma0(a)
+	eor	x1,x1,x10,lsr#6	// sigma1(X[i+14])
+	add	x12,x12,x5
+	add	x23,x23,x27			// d+=h
+	add	x27,x27,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x12,x12,x2
+	add	x27,x27,x17			// h+=Sigma0(a)
+	add	x12,x12,x1
+	ldr	x1,[sp,#16]
+	str	x4,[sp,#8]
+	ror	x16,x23,#14
+	add	x26,x26,x28			// h+=K[i]
+	ror	x3,x14,#1
+	and	x17,x24,x23
+	ror	x2,x11,#19
+	bic	x28,x25,x23
+	ror	x4,x27,#28
+	add	x26,x26,x12			// h+=X[i]
+	eor	x16,x16,x23,ror#18
+	eor	x3,x3,x14,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x27,x20			// a^b, b^c in next round
+	eor	x16,x16,x23,ror#41	// Sigma1(e)
+	eor	x4,x4,x27,ror#34
+	add	x26,x26,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x2,x2,x11,ror#61
+	eor	x3,x3,x14,lsr#7	// sigma0(X[i+1])
+	add	x26,x26,x16			// h+=Sigma1(e)
+	eor	x19,x19,x20			// Maj(a,b,c)
+	eor	x17,x4,x27,ror#39	// Sigma0(a)
+	eor	x2,x2,x11,lsr#6	// sigma1(X[i+14])
+	add	x13,x13,x6
+	add	x22,x22,x26			// d+=h
+	add	x26,x26,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x13,x13,x3
+	add	x26,x26,x17			// h+=Sigma0(a)
+	add	x13,x13,x2
+	ldr	x2,[sp,#24]
+	str	x5,[sp,#16]
+	ror	x16,x22,#14
+	add	x25,x25,x19			// h+=K[i]
+	ror	x4,x15,#1
+	and	x17,x23,x22
+	ror	x3,x12,#19
+	bic	x19,x24,x22
+	ror	x5,x26,#28
+	add	x25,x25,x13			// h+=X[i]
+	eor	x16,x16,x22,ror#18
+	eor	x4,x4,x15,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x26,x27			// a^b, b^c in next round
+	eor	x16,x16,x22,ror#41	// Sigma1(e)
+	eor	x5,x5,x26,ror#34
+	add	x25,x25,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x3,x3,x12,ror#61
+	eor	x4,x4,x15,lsr#7	// sigma0(X[i+1])
+	add	x25,x25,x16			// h+=Sigma1(e)
+	eor	x28,x28,x27			// Maj(a,b,c)
+	eor	x17,x5,x26,ror#39	// Sigma0(a)
+	eor	x3,x3,x12,lsr#6	// sigma1(X[i+14])
+	add	x14,x14,x7
+	add	x21,x21,x25			// d+=h
+	add	x25,x25,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x14,x14,x4
+	add	x25,x25,x17			// h+=Sigma0(a)
+	add	x14,x14,x3
+	ldr	x3,[sp,#0]
+	str	x6,[sp,#24]
+	ror	x16,x21,#14
+	add	x24,x24,x28			// h+=K[i]
+	ror	x5,x0,#1
+	and	x17,x22,x21
+	ror	x4,x13,#19
+	bic	x28,x23,x21
+	ror	x6,x25,#28
+	add	x24,x24,x14			// h+=X[i]
+	eor	x16,x16,x21,ror#18
+	eor	x5,x5,x0,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x25,x26			// a^b, b^c in next round
+	eor	x16,x16,x21,ror#41	// Sigma1(e)
+	eor	x6,x6,x25,ror#34
+	add	x24,x24,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x4,x4,x13,ror#61
+	eor	x5,x5,x0,lsr#7	// sigma0(X[i+1])
+	add	x24,x24,x16			// h+=Sigma1(e)
+	eor	x19,x19,x26			// Maj(a,b,c)
+	eor	x17,x6,x25,ror#39	// Sigma0(a)
+	eor	x4,x4,x13,lsr#6	// sigma1(X[i+14])
+	add	x15,x15,x8
+	add	x20,x20,x24			// d+=h
+	add	x24,x24,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x15,x15,x5
+	add	x24,x24,x17			// h+=Sigma0(a)
+	add	x15,x15,x4
+	ldr	x4,[sp,#8]
+	str	x7,[sp,#0]
+	ror	x16,x20,#14
+	add	x23,x23,x19			// h+=K[i]
+	ror	x6,x1,#1
+	and	x17,x21,x20
+	ror	x5,x14,#19
+	bic	x19,x22,x20
+	ror	x7,x24,#28
+	add	x23,x23,x15			// h+=X[i]
+	eor	x16,x16,x20,ror#18
+	eor	x6,x6,x1,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x24,x25			// a^b, b^c in next round
+	eor	x16,x16,x20,ror#41	// Sigma1(e)
+	eor	x7,x7,x24,ror#34
+	add	x23,x23,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x5,x5,x14,ror#61
+	eor	x6,x6,x1,lsr#7	// sigma0(X[i+1])
+	add	x23,x23,x16			// h+=Sigma1(e)
+	eor	x28,x28,x25			// Maj(a,b,c)
+	eor	x17,x7,x24,ror#39	// Sigma0(a)
+	eor	x5,x5,x14,lsr#6	// sigma1(X[i+14])
+	add	x0,x0,x9
+	add	x27,x27,x23			// d+=h
+	add	x23,x23,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x0,x0,x6
+	add	x23,x23,x17			// h+=Sigma0(a)
+	add	x0,x0,x5
+	ldr	x5,[sp,#16]
+	str	x8,[sp,#8]
+	ror	x16,x27,#14
+	add	x22,x22,x28			// h+=K[i]
+	ror	x7,x2,#1
+	and	x17,x20,x27
+	ror	x6,x15,#19
+	bic	x28,x21,x27
+	ror	x8,x23,#28
+	add	x22,x22,x0			// h+=X[i]
+	eor	x16,x16,x27,ror#18
+	eor	x7,x7,x2,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x23,x24			// a^b, b^c in next round
+	eor	x16,x16,x27,ror#41	// Sigma1(e)
+	eor	x8,x8,x23,ror#34
+	add	x22,x22,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x6,x6,x15,ror#61
+	eor	x7,x7,x2,lsr#7	// sigma0(X[i+1])
+	add	x22,x22,x16			// h+=Sigma1(e)
+	eor	x19,x19,x24			// Maj(a,b,c)
+	eor	x17,x8,x23,ror#39	// Sigma0(a)
+	eor	x6,x6,x15,lsr#6	// sigma1(X[i+14])
+	add	x1,x1,x10
+	add	x26,x26,x22			// d+=h
+	add	x22,x22,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x1,x1,x7
+	add	x22,x22,x17			// h+=Sigma0(a)
+	add	x1,x1,x6
+	ldr	x6,[sp,#24]
+	str	x9,[sp,#16]
+	ror	x16,x26,#14
+	add	x21,x21,x19			// h+=K[i]
+	ror	x8,x3,#1
+	and	x17,x27,x26
+	ror	x7,x0,#19
+	bic	x19,x20,x26
+	ror	x9,x22,#28
+	add	x21,x21,x1			// h+=X[i]
+	eor	x16,x16,x26,ror#18
+	eor	x8,x8,x3,ror#8
+	orr	x17,x17,x19			// Ch(e,f,g)
+	eor	x19,x22,x23			// a^b, b^c in next round
+	eor	x16,x16,x26,ror#41	// Sigma1(e)
+	eor	x9,x9,x22,ror#34
+	add	x21,x21,x17			// h+=Ch(e,f,g)
+	and	x28,x28,x19			// (b^c)&=(a^b)
+	eor	x7,x7,x0,ror#61
+	eor	x8,x8,x3,lsr#7	// sigma0(X[i+1])
+	add	x21,x21,x16			// h+=Sigma1(e)
+	eor	x28,x28,x23			// Maj(a,b,c)
+	eor	x17,x9,x22,ror#39	// Sigma0(a)
+	eor	x7,x7,x0,lsr#6	// sigma1(X[i+14])
+	add	x2,x2,x11
+	add	x25,x25,x21			// d+=h
+	add	x21,x21,x28			// h+=Maj(a,b,c)
+	ldr	x28,[x30],#8		// *K++, x19 in next round
+	add	x2,x2,x8
+	add	x21,x21,x17			// h+=Sigma0(a)
+	add	x2,x2,x7
+	ldr	x7,[sp,#0]
+	str	x10,[sp,#24]
+	ror	x16,x25,#14
+	add	x20,x20,x28			// h+=K[i]
+	ror	x9,x4,#1
+	and	x17,x26,x25
+	ror	x8,x1,#19
+	bic	x28,x27,x25
+	ror	x10,x21,#28
+	add	x20,x20,x2			// h+=X[i]
+	eor	x16,x16,x25,ror#18
+	eor	x9,x9,x4,ror#8
+	orr	x17,x17,x28			// Ch(e,f,g)
+	eor	x28,x21,x22			// a^b, b^c in next round
+	eor	x16,x16,x25,ror#41	// Sigma1(e)
+	eor	x10,x10,x21,ror#34
+	add	x20,x20,x17			// h+=Ch(e,f,g)
+	and	x19,x19,x28			// (b^c)&=(a^b)
+	eor	x8,x8,x1,ror#61
+	eor	x9,x9,x4,lsr#7	// sigma0(X[i+1])
+	add	x20,x20,x16			// h+=Sigma1(e)
+	eor	x19,x19,x22			// Maj(a,b,c)
+	eor	x17,x10,x21,ror#39	// Sigma0(a)
+	eor	x8,x8,x1,lsr#6	// sigma1(X[i+14])
+	add	x3,x3,x12
+	add	x24,x24,x20			// d+=h
+	add	x20,x20,x19			// h+=Maj(a,b,c)
+	ldr	x19,[x30],#8		// *K++, x28 in next round
+	add	x3,x3,x9
+	add	x20,x20,x17			// h+=Sigma0(a)
+	add	x3,x3,x8
+	cbnz	x19,.Loop_16_xx
+
+	ldp	x0,x2,[x29,#96]
+	ldr	x1,[x29,#112]
+	sub	x30,x30,#648		// rewind
+
+	ldp	x3,x4,[x0]
+	ldp	x5,x6,[x0,#2*8]
+	add	x1,x1,#14*8			// advance input pointer
+	ldp	x7,x8,[x0,#4*8]
+	add	x20,x20,x3
+	ldp	x9,x10,[x0,#6*8]
+	add	x21,x21,x4
+	add	x22,x22,x5
+	add	x23,x23,x6
+	stp	x20,x21,[x0]
+	add	x24,x24,x7
+	add	x25,x25,x8
+	stp	x22,x23,[x0,#2*8]
+	add	x26,x26,x9
+	add	x27,x27,x10
+	cmp	x1,x2
+	stp	x24,x25,[x0,#4*8]
+	stp	x26,x27,[x0,#6*8]
+	b.ne	.Loop
+
+	ldp	x19,x20,[x29,#16]
+	add	sp,sp,#4*8
+	ldp	x21,x22,[x29,#32]
+	ldp	x23,x24,[x29,#48]
+	ldp	x25,x26,[x29,#64]
+	ldp	x27,x28,[x29,#80]
+	ldp	x29,x30,[sp],#128
+	ret
+.size	sha512_block_data_order,.-sha512_block_data_order
+
+.align	6
+.type	.LK512,%object
+.LK512:
+.quad	0x428a2f98d728ae22,0x7137449123ef65cd
+.quad	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+.quad	0x3956c25bf348b538,0x59f111f1b605d019
+.quad	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+.quad	0xd807aa98a3030242,0x12835b0145706fbe
+.quad	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+.quad	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+.quad	0x9bdc06a725c71235,0xc19bf174cf692694
+.quad	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+.quad	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+.quad	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+.quad	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+.quad	0x983e5152ee66dfab,0xa831c66d2db43210
+.quad	0xb00327c898fb213f,0xbf597fc7beef0ee4
+.quad	0xc6e00bf33da88fc2,0xd5a79147930aa725
+.quad	0x06ca6351e003826f,0x142929670a0e6e70
+.quad	0x27b70a8546d22ffc,0x2e1b21385c26c926
+.quad	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+.quad	0x650a73548baf63de,0x766a0abb3c77b2a8
+.quad	0x81c2c92e47edaee6,0x92722c851482353b
+.quad	0xa2bfe8a14cf10364,0xa81a664bbc423001
+.quad	0xc24b8b70d0f89791,0xc76c51a30654be30
+.quad	0xd192e819d6ef5218,0xd69906245565a910
+.quad	0xf40e35855771202a,0x106aa07032bbd1b8
+.quad	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+.quad	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+.quad	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+.quad	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+.quad	0x748f82ee5defb2fc,0x78a5636f43172f60
+.quad	0x84c87814a1f0ab72,0x8cc702081a6439ec
+.quad	0x90befffa23631e28,0xa4506cebde82bde9
+.quad	0xbef9a3f7b2c67915,0xc67178f2e372532b
+.quad	0xca273eceea26619c,0xd186b8c721c0c207
+.quad	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+.quad	0x06f067aa72176fba,0x0a637dc5a2c898a6
+.quad	0x113f9804bef90dae,0x1b710b35131c471b
+.quad	0x28db77f523047d84,0x32caab7b40c72493
+.quad	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+.quad	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+.quad	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+.quad	0	// terminator
+.size	.LK512,.-.LK512
+.align	3
+.LOPENSSL_armcap_P:
+.quad	OPENSSL_armcap_P-.
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+.comm	OPENSSL_armcap_P,4,4
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S b/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S
new file mode 100644
index 0000000..cb94841
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/aes/aes-armv4.S
@@ -0,0 +1,1200 @@
+#if defined(__arm__)
+
+@ ====================================================================
+@ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
+@ project. 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/.
+@ ====================================================================
+
+@ AES for ARMv4
+
+@ January 2007.
+@
+@ Code uses single 1K S-box and is >2 times faster than code generated
+@ by gcc-3.4.1. This is thanks to unique feature of ARMv4 ISA, which
+@ allows to merge logical or arithmetic operation with shift or rotate
+@ in one instruction and emit combined result every cycle. The module
+@ is endian-neutral. The performance is ~42 cycles/byte for 128-bit
+@ key [on single-issue Xscale PXA250 core].
+
+@ May 2007.
+@
+@ AES_set_[en|de]crypt_key is added.
+
+@ July 2010.
+@
+@ Rescheduling for dual-issue pipeline resulted in 12% improvement on
+@ Cortex A8 core and ~25 cycles per byte processed with 128-bit key.
+
+@ February 2011.
+@
+@ Profiler-assisted and platform-specific optimization resulted in 16%
+@ improvement on Cortex A8 core and ~21.5 cycles per byte.
+
+#if defined(__arm__)
+#ifndef __KERNEL__
+# include "arm_arch.h"
+#else
+# define __ARM_ARCH__ __LINUX_ARM_ARCH__
+#endif
+
+.text
+#if __ARM_ARCH__<7
+.code	32
+#else
+.syntax	unified
+# if defined(__thumb2__) && !defined(__APPLE__)
+.thumb
+# else
+.code	32
+# endif
+#endif
+
+.type	AES_Te,%object
+.align	5
+AES_Te:
+.word	0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d
+.word	0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554
+.word	0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d
+.word	0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a
+.word	0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87
+.word	0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b
+.word	0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea
+.word	0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b
+.word	0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a
+.word	0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f
+.word	0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108
+.word	0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f
+.word	0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e
+.word	0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5
+.word	0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d
+.word	0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f
+.word	0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e
+.word	0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb
+.word	0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce
+.word	0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497
+.word	0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c
+.word	0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed
+.word	0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b
+.word	0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a
+.word	0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16
+.word	0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594
+.word	0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81
+.word	0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3
+.word	0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a
+.word	0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504
+.word	0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163
+.word	0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d
+.word	0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f
+.word	0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739
+.word	0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47
+.word	0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395
+.word	0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f
+.word	0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883
+.word	0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c
+.word	0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76
+.word	0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e
+.word	0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4
+.word	0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6
+.word	0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b
+.word	0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7
+.word	0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0
+.word	0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25
+.word	0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818
+.word	0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72
+.word	0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651
+.word	0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21
+.word	0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85
+.word	0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa
+.word	0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12
+.word	0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0
+.word	0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9
+.word	0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133
+.word	0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7
+.word	0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920
+.word	0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a
+.word	0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17
+.word	0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8
+.word	0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11
+.word	0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a
+@ Te4[256]
+.byte	0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5
+.byte	0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76
+.byte	0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0
+.byte	0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0
+.byte	0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc
+.byte	0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15
+.byte	0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a
+.byte	0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75
+.byte	0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0
+.byte	0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84
+.byte	0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b
+.byte	0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf
+.byte	0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85
+.byte	0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8
+.byte	0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5
+.byte	0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2
+.byte	0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17
+.byte	0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73
+.byte	0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88
+.byte	0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb
+.byte	0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c
+.byte	0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79
+.byte	0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9
+.byte	0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08
+.byte	0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6
+.byte	0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a
+.byte	0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e
+.byte	0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e
+.byte	0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94
+.byte	0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf
+.byte	0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68
+.byte	0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16
+@ rcon[]
+.word	0x01000000, 0x02000000, 0x04000000, 0x08000000
+.word	0x10000000, 0x20000000, 0x40000000, 0x80000000
+.word	0x1B000000, 0x36000000, 0, 0, 0, 0, 0, 0
+.size	AES_Te,.-AES_Te
+
+@ void asm_AES_encrypt(const unsigned char *in, unsigned char *out,
+@ 		       const AES_KEY *key) {
+.globl	asm_AES_encrypt
+.hidden	asm_AES_encrypt
+.type	asm_AES_encrypt,%function
+.align	5
+asm_AES_encrypt:
+#if __ARM_ARCH__<7
+	sub	r3,pc,#8		@ asm_AES_encrypt
+#else
+	adr	r3,asm_AES_encrypt
+#endif
+	stmdb	sp!,{r1,r4-r12,lr}
+#ifdef	__APPLE__
+	adr	r10,AES_Te
+#else
+	sub	r10,r3,#asm_AES_encrypt-AES_Te	@ Te
+#endif
+	mov	r12,r0		@ inp
+	mov	r11,r2
+#if __ARM_ARCH__<7
+	ldrb	r0,[r12,#3]	@ load input data in endian-neutral
+	ldrb	r4,[r12,#2]	@ manner...
+	ldrb	r5,[r12,#1]
+	ldrb	r6,[r12,#0]
+	orr	r0,r0,r4,lsl#8
+	ldrb	r1,[r12,#7]
+	orr	r0,r0,r5,lsl#16
+	ldrb	r4,[r12,#6]
+	orr	r0,r0,r6,lsl#24
+	ldrb	r5,[r12,#5]
+	ldrb	r6,[r12,#4]
+	orr	r1,r1,r4,lsl#8
+	ldrb	r2,[r12,#11]
+	orr	r1,r1,r5,lsl#16
+	ldrb	r4,[r12,#10]
+	orr	r1,r1,r6,lsl#24
+	ldrb	r5,[r12,#9]
+	ldrb	r6,[r12,#8]
+	orr	r2,r2,r4,lsl#8
+	ldrb	r3,[r12,#15]
+	orr	r2,r2,r5,lsl#16
+	ldrb	r4,[r12,#14]
+	orr	r2,r2,r6,lsl#24
+	ldrb	r5,[r12,#13]
+	ldrb	r6,[r12,#12]
+	orr	r3,r3,r4,lsl#8
+	orr	r3,r3,r5,lsl#16
+	orr	r3,r3,r6,lsl#24
+#else
+	ldr	r0,[r12,#0]
+	ldr	r1,[r12,#4]
+	ldr	r2,[r12,#8]
+	ldr	r3,[r12,#12]
+#ifdef __ARMEL__
+	rev	r0,r0
+	rev	r1,r1
+	rev	r2,r2
+	rev	r3,r3
+#endif
+#endif
+	bl	_armv4_AES_encrypt
+
+	ldr	r12,[sp],#4		@ pop out
+#if __ARM_ARCH__>=7
+#ifdef __ARMEL__
+	rev	r0,r0
+	rev	r1,r1
+	rev	r2,r2
+	rev	r3,r3
+#endif
+	str	r0,[r12,#0]
+	str	r1,[r12,#4]
+	str	r2,[r12,#8]
+	str	r3,[r12,#12]
+#else
+	mov	r4,r0,lsr#24		@ write output in endian-neutral
+	mov	r5,r0,lsr#16		@ manner...
+	mov	r6,r0,lsr#8
+	strb	r4,[r12,#0]
+	strb	r5,[r12,#1]
+	mov	r4,r1,lsr#24
+	strb	r6,[r12,#2]
+	mov	r5,r1,lsr#16
+	strb	r0,[r12,#3]
+	mov	r6,r1,lsr#8
+	strb	r4,[r12,#4]
+	strb	r5,[r12,#5]
+	mov	r4,r2,lsr#24
+	strb	r6,[r12,#6]
+	mov	r5,r2,lsr#16
+	strb	r1,[r12,#7]
+	mov	r6,r2,lsr#8
+	strb	r4,[r12,#8]
+	strb	r5,[r12,#9]
+	mov	r4,r3,lsr#24
+	strb	r6,[r12,#10]
+	mov	r5,r3,lsr#16
+	strb	r2,[r12,#11]
+	mov	r6,r3,lsr#8
+	strb	r4,[r12,#12]
+	strb	r5,[r12,#13]
+	strb	r6,[r12,#14]
+	strb	r3,[r12,#15]
+#endif
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	asm_AES_encrypt,.-asm_AES_encrypt
+
+.type	_armv4_AES_encrypt,%function
+.align	2
+_armv4_AES_encrypt:
+	str	lr,[sp,#-4]!		@ push lr
+	ldmia	r11!,{r4,r5,r6,r7}
+	eor	r0,r0,r4
+	ldr	r12,[r11,#240-16]
+	eor	r1,r1,r5
+	eor	r2,r2,r6
+	eor	r3,r3,r7
+	sub	r12,r12,#1
+	mov	lr,#255
+
+	and	r7,lr,r0
+	and	r8,lr,r0,lsr#8
+	and	r9,lr,r0,lsr#16
+	mov	r0,r0,lsr#24
+.Lenc_loop:
+	ldr	r4,[r10,r7,lsl#2]	@ Te3[s0>>0]
+	and	r7,lr,r1,lsr#16	@ i0
+	ldr	r5,[r10,r8,lsl#2]	@ Te2[s0>>8]
+	and	r8,lr,r1
+	ldr	r6,[r10,r9,lsl#2]	@ Te1[s0>>16]
+	and	r9,lr,r1,lsr#8
+	ldr	r0,[r10,r0,lsl#2]	@ Te0[s0>>24]
+	mov	r1,r1,lsr#24
+
+	ldr	r7,[r10,r7,lsl#2]	@ Te1[s1>>16]
+	ldr	r8,[r10,r8,lsl#2]	@ Te3[s1>>0]
+	ldr	r9,[r10,r9,lsl#2]	@ Te2[s1>>8]
+	eor	r0,r0,r7,ror#8
+	ldr	r1,[r10,r1,lsl#2]	@ Te0[s1>>24]
+	and	r7,lr,r2,lsr#8	@ i0
+	eor	r5,r5,r8,ror#8
+	and	r8,lr,r2,lsr#16	@ i1
+	eor	r6,r6,r9,ror#8
+	and	r9,lr,r2
+	ldr	r7,[r10,r7,lsl#2]	@ Te2[s2>>8]
+	eor	r1,r1,r4,ror#24
+	ldr	r8,[r10,r8,lsl#2]	@ Te1[s2>>16]
+	mov	r2,r2,lsr#24
+
+	ldr	r9,[r10,r9,lsl#2]	@ Te3[s2>>0]
+	eor	r0,r0,r7,ror#16
+	ldr	r2,[r10,r2,lsl#2]	@ Te0[s2>>24]
+	and	r7,lr,r3		@ i0
+	eor	r1,r1,r8,ror#8
+	and	r8,lr,r3,lsr#8	@ i1
+	eor	r6,r6,r9,ror#16
+	and	r9,lr,r3,lsr#16	@ i2
+	ldr	r7,[r10,r7,lsl#2]	@ Te3[s3>>0]
+	eor	r2,r2,r5,ror#16
+	ldr	r8,[r10,r8,lsl#2]	@ Te2[s3>>8]
+	mov	r3,r3,lsr#24
+
+	ldr	r9,[r10,r9,lsl#2]	@ Te1[s3>>16]
+	eor	r0,r0,r7,ror#24
+	ldr	r7,[r11],#16
+	eor	r1,r1,r8,ror#16
+	ldr	r3,[r10,r3,lsl#2]	@ Te0[s3>>24]
+	eor	r2,r2,r9,ror#8
+	ldr	r4,[r11,#-12]
+	eor	r3,r3,r6,ror#8
+
+	ldr	r5,[r11,#-8]
+	eor	r0,r0,r7
+	ldr	r6,[r11,#-4]
+	and	r7,lr,r0
+	eor	r1,r1,r4
+	and	r8,lr,r0,lsr#8
+	eor	r2,r2,r5
+	and	r9,lr,r0,lsr#16
+	eor	r3,r3,r6
+	mov	r0,r0,lsr#24
+
+	subs	r12,r12,#1
+	bne	.Lenc_loop
+
+	add	r10,r10,#2
+
+	ldrb	r4,[r10,r7,lsl#2]	@ Te4[s0>>0]
+	and	r7,lr,r1,lsr#16	@ i0
+	ldrb	r5,[r10,r8,lsl#2]	@ Te4[s0>>8]
+	and	r8,lr,r1
+	ldrb	r6,[r10,r9,lsl#2]	@ Te4[s0>>16]
+	and	r9,lr,r1,lsr#8
+	ldrb	r0,[r10,r0,lsl#2]	@ Te4[s0>>24]
+	mov	r1,r1,lsr#24
+
+	ldrb	r7,[r10,r7,lsl#2]	@ Te4[s1>>16]
+	ldrb	r8,[r10,r8,lsl#2]	@ Te4[s1>>0]
+	ldrb	r9,[r10,r9,lsl#2]	@ Te4[s1>>8]
+	eor	r0,r7,r0,lsl#8
+	ldrb	r1,[r10,r1,lsl#2]	@ Te4[s1>>24]
+	and	r7,lr,r2,lsr#8	@ i0
+	eor	r5,r8,r5,lsl#8
+	and	r8,lr,r2,lsr#16	@ i1
+	eor	r6,r9,r6,lsl#8
+	and	r9,lr,r2
+	ldrb	r7,[r10,r7,lsl#2]	@ Te4[s2>>8]
+	eor	r1,r4,r1,lsl#24
+	ldrb	r8,[r10,r8,lsl#2]	@ Te4[s2>>16]
+	mov	r2,r2,lsr#24
+
+	ldrb	r9,[r10,r9,lsl#2]	@ Te4[s2>>0]
+	eor	r0,r7,r0,lsl#8
+	ldrb	r2,[r10,r2,lsl#2]	@ Te4[s2>>24]
+	and	r7,lr,r3		@ i0
+	eor	r1,r1,r8,lsl#16
+	and	r8,lr,r3,lsr#8	@ i1
+	eor	r6,r9,r6,lsl#8
+	and	r9,lr,r3,lsr#16	@ i2
+	ldrb	r7,[r10,r7,lsl#2]	@ Te4[s3>>0]
+	eor	r2,r5,r2,lsl#24
+	ldrb	r8,[r10,r8,lsl#2]	@ Te4[s3>>8]
+	mov	r3,r3,lsr#24
+
+	ldrb	r9,[r10,r9,lsl#2]	@ Te4[s3>>16]
+	eor	r0,r7,r0,lsl#8
+	ldr	r7,[r11,#0]
+	ldrb	r3,[r10,r3,lsl#2]	@ Te4[s3>>24]
+	eor	r1,r1,r8,lsl#8
+	ldr	r4,[r11,#4]
+	eor	r2,r2,r9,lsl#16
+	ldr	r5,[r11,#8]
+	eor	r3,r6,r3,lsl#24
+	ldr	r6,[r11,#12]
+
+	eor	r0,r0,r7
+	eor	r1,r1,r4
+	eor	r2,r2,r5
+	eor	r3,r3,r6
+
+	sub	r10,r10,#2
+	ldr	pc,[sp],#4		@ pop and return
+.size	_armv4_AES_encrypt,.-_armv4_AES_encrypt
+
+.globl	asm_AES_set_encrypt_key
+.hidden	asm_AES_set_encrypt_key
+.type	asm_AES_set_encrypt_key,%function
+.align	5
+asm_AES_set_encrypt_key:
+_armv4_AES_set_encrypt_key:
+#if __ARM_ARCH__<7
+	sub	r3,pc,#8		@ asm_AES_set_encrypt_key
+#else
+	adr	r3,asm_AES_set_encrypt_key
+#endif
+	teq	r0,#0
+#if __ARM_ARCH__>=7
+	itt	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	moveq	r0,#-1
+	beq	.Labrt
+	teq	r2,#0
+#if __ARM_ARCH__>=7
+	itt	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	moveq	r0,#-1
+	beq	.Labrt
+
+	teq	r1,#128
+	beq	.Lok
+	teq	r1,#192
+	beq	.Lok
+	teq	r1,#256
+#if __ARM_ARCH__>=7
+	itt	ne			@ Thumb2 thing, sanity check in ARM
+#endif
+	movne	r0,#-1
+	bne	.Labrt
+
+.Lok:	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	mov	r12,r0		@ inp
+	mov	lr,r1			@ bits
+	mov	r11,r2			@ key
+
+#ifdef	__APPLE__
+	adr	r10,AES_Te+1024				@ Te4
+#else
+	sub	r10,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024	@ Te4
+#endif
+
+#if __ARM_ARCH__<7
+	ldrb	r0,[r12,#3]	@ load input data in endian-neutral
+	ldrb	r4,[r12,#2]	@ manner...
+	ldrb	r5,[r12,#1]
+	ldrb	r6,[r12,#0]
+	orr	r0,r0,r4,lsl#8
+	ldrb	r1,[r12,#7]
+	orr	r0,r0,r5,lsl#16
+	ldrb	r4,[r12,#6]
+	orr	r0,r0,r6,lsl#24
+	ldrb	r5,[r12,#5]
+	ldrb	r6,[r12,#4]
+	orr	r1,r1,r4,lsl#8
+	ldrb	r2,[r12,#11]
+	orr	r1,r1,r5,lsl#16
+	ldrb	r4,[r12,#10]
+	orr	r1,r1,r6,lsl#24
+	ldrb	r5,[r12,#9]
+	ldrb	r6,[r12,#8]
+	orr	r2,r2,r4,lsl#8
+	ldrb	r3,[r12,#15]
+	orr	r2,r2,r5,lsl#16
+	ldrb	r4,[r12,#14]
+	orr	r2,r2,r6,lsl#24
+	ldrb	r5,[r12,#13]
+	ldrb	r6,[r12,#12]
+	orr	r3,r3,r4,lsl#8
+	str	r0,[r11],#16
+	orr	r3,r3,r5,lsl#16
+	str	r1,[r11,#-12]
+	orr	r3,r3,r6,lsl#24
+	str	r2,[r11,#-8]
+	str	r3,[r11,#-4]
+#else
+	ldr	r0,[r12,#0]
+	ldr	r1,[r12,#4]
+	ldr	r2,[r12,#8]
+	ldr	r3,[r12,#12]
+#ifdef __ARMEL__
+	rev	r0,r0
+	rev	r1,r1
+	rev	r2,r2
+	rev	r3,r3
+#endif
+	str	r0,[r11],#16
+	str	r1,[r11,#-12]
+	str	r2,[r11,#-8]
+	str	r3,[r11,#-4]
+#endif
+
+	teq	lr,#128
+	bne	.Lnot128
+	mov	r12,#10
+	str	r12,[r11,#240-16]
+	add	r6,r10,#256			@ rcon
+	mov	lr,#255
+
+.L128_loop:
+	and	r5,lr,r3,lsr#24
+	and	r7,lr,r3,lsr#16
+	ldrb	r5,[r10,r5]
+	and	r8,lr,r3,lsr#8
+	ldrb	r7,[r10,r7]
+	and	r9,lr,r3
+	ldrb	r8,[r10,r8]
+	orr	r5,r5,r7,lsl#24
+	ldrb	r9,[r10,r9]
+	orr	r5,r5,r8,lsl#16
+	ldr	r4,[r6],#4			@ rcon[i++]
+	orr	r5,r5,r9,lsl#8
+	eor	r5,r5,r4
+	eor	r0,r0,r5			@ rk[4]=rk[0]^...
+	eor	r1,r1,r0			@ rk[5]=rk[1]^rk[4]
+	str	r0,[r11],#16
+	eor	r2,r2,r1			@ rk[6]=rk[2]^rk[5]
+	str	r1,[r11,#-12]
+	eor	r3,r3,r2			@ rk[7]=rk[3]^rk[6]
+	str	r2,[r11,#-8]
+	subs	r12,r12,#1
+	str	r3,[r11,#-4]
+	bne	.L128_loop
+	sub	r2,r11,#176
+	b	.Ldone
+
+.Lnot128:
+#if __ARM_ARCH__<7
+	ldrb	r8,[r12,#19]
+	ldrb	r4,[r12,#18]
+	ldrb	r5,[r12,#17]
+	ldrb	r6,[r12,#16]
+	orr	r8,r8,r4,lsl#8
+	ldrb	r9,[r12,#23]
+	orr	r8,r8,r5,lsl#16
+	ldrb	r4,[r12,#22]
+	orr	r8,r8,r6,lsl#24
+	ldrb	r5,[r12,#21]
+	ldrb	r6,[r12,#20]
+	orr	r9,r9,r4,lsl#8
+	orr	r9,r9,r5,lsl#16
+	str	r8,[r11],#8
+	orr	r9,r9,r6,lsl#24
+	str	r9,[r11,#-4]
+#else
+	ldr	r8,[r12,#16]
+	ldr	r9,[r12,#20]
+#ifdef __ARMEL__
+	rev	r8,r8
+	rev	r9,r9
+#endif
+	str	r8,[r11],#8
+	str	r9,[r11,#-4]
+#endif
+
+	teq	lr,#192
+	bne	.Lnot192
+	mov	r12,#12
+	str	r12,[r11,#240-24]
+	add	r6,r10,#256			@ rcon
+	mov	lr,#255
+	mov	r12,#8
+
+.L192_loop:
+	and	r5,lr,r9,lsr#24
+	and	r7,lr,r9,lsr#16
+	ldrb	r5,[r10,r5]
+	and	r8,lr,r9,lsr#8
+	ldrb	r7,[r10,r7]
+	and	r9,lr,r9
+	ldrb	r8,[r10,r8]
+	orr	r5,r5,r7,lsl#24
+	ldrb	r9,[r10,r9]
+	orr	r5,r5,r8,lsl#16
+	ldr	r4,[r6],#4			@ rcon[i++]
+	orr	r5,r5,r9,lsl#8
+	eor	r9,r5,r4
+	eor	r0,r0,r9			@ rk[6]=rk[0]^...
+	eor	r1,r1,r0			@ rk[7]=rk[1]^rk[6]
+	str	r0,[r11],#24
+	eor	r2,r2,r1			@ rk[8]=rk[2]^rk[7]
+	str	r1,[r11,#-20]
+	eor	r3,r3,r2			@ rk[9]=rk[3]^rk[8]
+	str	r2,[r11,#-16]
+	subs	r12,r12,#1
+	str	r3,[r11,#-12]
+#if __ARM_ARCH__>=7
+	itt	eq				@ Thumb2 thing, sanity check in ARM
+#endif
+	subeq	r2,r11,#216
+	beq	.Ldone
+
+	ldr	r7,[r11,#-32]
+	ldr	r8,[r11,#-28]
+	eor	r7,r7,r3			@ rk[10]=rk[4]^rk[9]
+	eor	r9,r8,r7			@ rk[11]=rk[5]^rk[10]
+	str	r7,[r11,#-8]
+	str	r9,[r11,#-4]
+	b	.L192_loop
+
+.Lnot192:
+#if __ARM_ARCH__<7
+	ldrb	r8,[r12,#27]
+	ldrb	r4,[r12,#26]
+	ldrb	r5,[r12,#25]
+	ldrb	r6,[r12,#24]
+	orr	r8,r8,r4,lsl#8
+	ldrb	r9,[r12,#31]
+	orr	r8,r8,r5,lsl#16
+	ldrb	r4,[r12,#30]
+	orr	r8,r8,r6,lsl#24
+	ldrb	r5,[r12,#29]
+	ldrb	r6,[r12,#28]
+	orr	r9,r9,r4,lsl#8
+	orr	r9,r9,r5,lsl#16
+	str	r8,[r11],#8
+	orr	r9,r9,r6,lsl#24
+	str	r9,[r11,#-4]
+#else
+	ldr	r8,[r12,#24]
+	ldr	r9,[r12,#28]
+#ifdef __ARMEL__
+	rev	r8,r8
+	rev	r9,r9
+#endif
+	str	r8,[r11],#8
+	str	r9,[r11,#-4]
+#endif
+
+	mov	r12,#14
+	str	r12,[r11,#240-32]
+	add	r6,r10,#256			@ rcon
+	mov	lr,#255
+	mov	r12,#7
+
+.L256_loop:
+	and	r5,lr,r9,lsr#24
+	and	r7,lr,r9,lsr#16
+	ldrb	r5,[r10,r5]
+	and	r8,lr,r9,lsr#8
+	ldrb	r7,[r10,r7]
+	and	r9,lr,r9
+	ldrb	r8,[r10,r8]
+	orr	r5,r5,r7,lsl#24
+	ldrb	r9,[r10,r9]
+	orr	r5,r5,r8,lsl#16
+	ldr	r4,[r6],#4			@ rcon[i++]
+	orr	r5,r5,r9,lsl#8
+	eor	r9,r5,r4
+	eor	r0,r0,r9			@ rk[8]=rk[0]^...
+	eor	r1,r1,r0			@ rk[9]=rk[1]^rk[8]
+	str	r0,[r11],#32
+	eor	r2,r2,r1			@ rk[10]=rk[2]^rk[9]
+	str	r1,[r11,#-28]
+	eor	r3,r3,r2			@ rk[11]=rk[3]^rk[10]
+	str	r2,[r11,#-24]
+	subs	r12,r12,#1
+	str	r3,[r11,#-20]
+#if __ARM_ARCH__>=7
+	itt	eq				@ Thumb2 thing, sanity check in ARM
+#endif
+	subeq	r2,r11,#256
+	beq	.Ldone
+
+	and	r5,lr,r3
+	and	r7,lr,r3,lsr#8
+	ldrb	r5,[r10,r5]
+	and	r8,lr,r3,lsr#16
+	ldrb	r7,[r10,r7]
+	and	r9,lr,r3,lsr#24
+	ldrb	r8,[r10,r8]
+	orr	r5,r5,r7,lsl#8
+	ldrb	r9,[r10,r9]
+	orr	r5,r5,r8,lsl#16
+	ldr	r4,[r11,#-48]
+	orr	r5,r5,r9,lsl#24
+
+	ldr	r7,[r11,#-44]
+	ldr	r8,[r11,#-40]
+	eor	r4,r4,r5			@ rk[12]=rk[4]^...
+	ldr	r9,[r11,#-36]
+	eor	r7,r7,r4			@ rk[13]=rk[5]^rk[12]
+	str	r4,[r11,#-16]
+	eor	r8,r8,r7			@ rk[14]=rk[6]^rk[13]
+	str	r7,[r11,#-12]
+	eor	r9,r9,r8			@ rk[15]=rk[7]^rk[14]
+	str	r8,[r11,#-8]
+	str	r9,[r11,#-4]
+	b	.L256_loop
+
+.align	2
+.Ldone:	mov	r0,#0
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+.Labrt:
+#if __ARM_ARCH__>=5
+	bx	lr				@ .word	0xe12fff1e
+#else
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	asm_AES_set_encrypt_key,.-asm_AES_set_encrypt_key
+
+.globl	asm_AES_set_decrypt_key
+.hidden	asm_AES_set_decrypt_key
+.type	asm_AES_set_decrypt_key,%function
+.align	5
+asm_AES_set_decrypt_key:
+	str	lr,[sp,#-4]!            @ push lr
+	bl	_armv4_AES_set_encrypt_key
+	teq	r0,#0
+	ldr	lr,[sp],#4              @ pop lr
+	bne	.Labrt
+
+	mov	r0,r2			@ asm_AES_set_encrypt_key preserves r2,
+	mov	r1,r2			@ which is AES_KEY *key
+	b	_armv4_AES_set_enc2dec_key
+.size	asm_AES_set_decrypt_key,.-asm_AES_set_decrypt_key
+
+@ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out)
+.globl	AES_set_enc2dec_key
+.hidden	AES_set_enc2dec_key
+.type	AES_set_enc2dec_key,%function
+.align	5
+AES_set_enc2dec_key:
+_armv4_AES_set_enc2dec_key:
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+
+	ldr	r12,[r0,#240]
+	mov	r7,r0			@ input
+	add	r8,r0,r12,lsl#4
+	mov	r11,r1			@ ouput
+	add	r10,r1,r12,lsl#4
+	str	r12,[r1,#240]
+
+.Linv:	ldr	r0,[r7],#16
+	ldr	r1,[r7,#-12]
+	ldr	r2,[r7,#-8]
+	ldr	r3,[r7,#-4]
+	ldr	r4,[r8],#-16
+	ldr	r5,[r8,#16+4]
+	ldr	r6,[r8,#16+8]
+	ldr	r9,[r8,#16+12]
+	str	r0,[r10],#-16
+	str	r1,[r10,#16+4]
+	str	r2,[r10,#16+8]
+	str	r3,[r10,#16+12]
+	str	r4,[r11],#16
+	str	r5,[r11,#-12]
+	str	r6,[r11,#-8]
+	str	r9,[r11,#-4]
+	teq	r7,r8
+	bne	.Linv
+
+	ldr	r0,[r7]
+	ldr	r1,[r7,#4]
+	ldr	r2,[r7,#8]
+	ldr	r3,[r7,#12]
+	str	r0,[r11]
+	str	r1,[r11,#4]
+	str	r2,[r11,#8]
+	str	r3,[r11,#12]
+	sub	r11,r11,r12,lsl#3
+	ldr	r0,[r11,#16]!		@ prefetch tp1
+	mov	r7,#0x80
+	mov	r8,#0x1b
+	orr	r7,r7,#0x8000
+	orr	r8,r8,#0x1b00
+	orr	r7,r7,r7,lsl#16
+	orr	r8,r8,r8,lsl#16
+	sub	r12,r12,#1
+	mvn	r9,r7
+	mov	r12,r12,lsl#2	@ (rounds-1)*4
+
+.Lmix:	and	r4,r0,r7
+	and	r1,r0,r9
+	sub	r4,r4,r4,lsr#7
+	and	r4,r4,r8
+	eor	r1,r4,r1,lsl#1	@ tp2
+
+	and	r4,r1,r7
+	and	r2,r1,r9
+	sub	r4,r4,r4,lsr#7
+	and	r4,r4,r8
+	eor	r2,r4,r2,lsl#1	@ tp4
+
+	and	r4,r2,r7
+	and	r3,r2,r9
+	sub	r4,r4,r4,lsr#7
+	and	r4,r4,r8
+	eor	r3,r4,r3,lsl#1	@ tp8
+
+	eor	r4,r1,r2
+	eor	r5,r0,r3		@ tp9
+	eor	r4,r4,r3		@ tpe
+	eor	r4,r4,r1,ror#24
+	eor	r4,r4,r5,ror#24	@ ^= ROTATE(tpb=tp9^tp2,8)
+	eor	r4,r4,r2,ror#16
+	eor	r4,r4,r5,ror#16	@ ^= ROTATE(tpd=tp9^tp4,16)
+	eor	r4,r4,r5,ror#8	@ ^= ROTATE(tp9,24)
+
+	ldr	r0,[r11,#4]		@ prefetch tp1
+	str	r4,[r11],#4
+	subs	r12,r12,#1
+	bne	.Lmix
+
+	mov	r0,#0
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	AES_set_enc2dec_key,.-AES_set_enc2dec_key
+
+.type	AES_Td,%object
+.align	5
+AES_Td:
+.word	0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96
+.word	0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393
+.word	0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25
+.word	0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f
+.word	0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1
+.word	0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6
+.word	0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da
+.word	0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844
+.word	0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd
+.word	0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4
+.word	0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45
+.word	0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94
+.word	0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7
+.word	0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a
+.word	0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5
+.word	0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c
+.word	0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1
+.word	0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a
+.word	0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75
+.word	0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051
+.word	0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46
+.word	0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff
+.word	0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77
+.word	0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb
+.word	0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000
+.word	0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e
+.word	0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927
+.word	0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a
+.word	0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e
+.word	0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16
+.word	0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d
+.word	0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8
+.word	0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd
+.word	0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34
+.word	0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163
+.word	0xd731dcca, 0x42638510, 0x13972240, 0x84c61120
+.word	0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d
+.word	0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0
+.word	0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422
+.word	0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef
+.word	0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36
+.word	0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4
+.word	0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662
+.word	0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5
+.word	0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3
+.word	0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b
+.word	0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8
+.word	0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6
+.word	0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6
+.word	0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0
+.word	0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815
+.word	0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f
+.word	0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df
+.word	0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f
+.word	0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e
+.word	0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713
+.word	0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89
+.word	0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c
+.word	0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf
+.word	0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86
+.word	0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f
+.word	0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541
+.word	0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190
+.word	0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742
+@ Td4[256]
+.byte	0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38
+.byte	0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb
+.byte	0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87
+.byte	0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb
+.byte	0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d
+.byte	0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e
+.byte	0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2
+.byte	0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25
+.byte	0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16
+.byte	0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92
+.byte	0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda
+.byte	0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84
+.byte	0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a
+.byte	0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06
+.byte	0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02
+.byte	0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b
+.byte	0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea
+.byte	0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73
+.byte	0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85
+.byte	0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e
+.byte	0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89
+.byte	0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b
+.byte	0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20
+.byte	0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4
+.byte	0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31
+.byte	0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f
+.byte	0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d
+.byte	0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef
+.byte	0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0
+.byte	0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61
+.byte	0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26
+.byte	0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d
+.size	AES_Td,.-AES_Td
+
+@ void asm_AES_decrypt(const unsigned char *in, unsigned char *out,
+@ 		       const AES_KEY *key) {
+.globl	asm_AES_decrypt
+.hidden	asm_AES_decrypt
+.type	asm_AES_decrypt,%function
+.align	5
+asm_AES_decrypt:
+#if __ARM_ARCH__<7
+	sub	r3,pc,#8		@ asm_AES_decrypt
+#else
+	adr	r3,asm_AES_decrypt
+#endif
+	stmdb	sp!,{r1,r4-r12,lr}
+#ifdef	__APPLE__
+	adr	r10,AES_Td
+#else
+	sub	r10,r3,#asm_AES_decrypt-AES_Td	@ Td
+#endif
+	mov	r12,r0		@ inp
+	mov	r11,r2
+#if __ARM_ARCH__<7
+	ldrb	r0,[r12,#3]	@ load input data in endian-neutral
+	ldrb	r4,[r12,#2]	@ manner...
+	ldrb	r5,[r12,#1]
+	ldrb	r6,[r12,#0]
+	orr	r0,r0,r4,lsl#8
+	ldrb	r1,[r12,#7]
+	orr	r0,r0,r5,lsl#16
+	ldrb	r4,[r12,#6]
+	orr	r0,r0,r6,lsl#24
+	ldrb	r5,[r12,#5]
+	ldrb	r6,[r12,#4]
+	orr	r1,r1,r4,lsl#8
+	ldrb	r2,[r12,#11]
+	orr	r1,r1,r5,lsl#16
+	ldrb	r4,[r12,#10]
+	orr	r1,r1,r6,lsl#24
+	ldrb	r5,[r12,#9]
+	ldrb	r6,[r12,#8]
+	orr	r2,r2,r4,lsl#8
+	ldrb	r3,[r12,#15]
+	orr	r2,r2,r5,lsl#16
+	ldrb	r4,[r12,#14]
+	orr	r2,r2,r6,lsl#24
+	ldrb	r5,[r12,#13]
+	ldrb	r6,[r12,#12]
+	orr	r3,r3,r4,lsl#8
+	orr	r3,r3,r5,lsl#16
+	orr	r3,r3,r6,lsl#24
+#else
+	ldr	r0,[r12,#0]
+	ldr	r1,[r12,#4]
+	ldr	r2,[r12,#8]
+	ldr	r3,[r12,#12]
+#ifdef __ARMEL__
+	rev	r0,r0
+	rev	r1,r1
+	rev	r2,r2
+	rev	r3,r3
+#endif
+#endif
+	bl	_armv4_AES_decrypt
+
+	ldr	r12,[sp],#4		@ pop out
+#if __ARM_ARCH__>=7
+#ifdef __ARMEL__
+	rev	r0,r0
+	rev	r1,r1
+	rev	r2,r2
+	rev	r3,r3
+#endif
+	str	r0,[r12,#0]
+	str	r1,[r12,#4]
+	str	r2,[r12,#8]
+	str	r3,[r12,#12]
+#else
+	mov	r4,r0,lsr#24		@ write output in endian-neutral
+	mov	r5,r0,lsr#16		@ manner...
+	mov	r6,r0,lsr#8
+	strb	r4,[r12,#0]
+	strb	r5,[r12,#1]
+	mov	r4,r1,lsr#24
+	strb	r6,[r12,#2]
+	mov	r5,r1,lsr#16
+	strb	r0,[r12,#3]
+	mov	r6,r1,lsr#8
+	strb	r4,[r12,#4]
+	strb	r5,[r12,#5]
+	mov	r4,r2,lsr#24
+	strb	r6,[r12,#6]
+	mov	r5,r2,lsr#16
+	strb	r1,[r12,#7]
+	mov	r6,r2,lsr#8
+	strb	r4,[r12,#8]
+	strb	r5,[r12,#9]
+	mov	r4,r3,lsr#24
+	strb	r6,[r12,#10]
+	mov	r5,r3,lsr#16
+	strb	r2,[r12,#11]
+	mov	r6,r3,lsr#8
+	strb	r4,[r12,#12]
+	strb	r5,[r12,#13]
+	strb	r6,[r12,#14]
+	strb	r3,[r12,#15]
+#endif
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	asm_AES_decrypt,.-asm_AES_decrypt
+
+.type	_armv4_AES_decrypt,%function
+.align	2
+_armv4_AES_decrypt:
+	str	lr,[sp,#-4]!		@ push lr
+	ldmia	r11!,{r4,r5,r6,r7}
+	eor	r0,r0,r4
+	ldr	r12,[r11,#240-16]
+	eor	r1,r1,r5
+	eor	r2,r2,r6
+	eor	r3,r3,r7
+	sub	r12,r12,#1
+	mov	lr,#255
+
+	and	r7,lr,r0,lsr#16
+	and	r8,lr,r0,lsr#8
+	and	r9,lr,r0
+	mov	r0,r0,lsr#24
+.Ldec_loop:
+	ldr	r4,[r10,r7,lsl#2]	@ Td1[s0>>16]
+	and	r7,lr,r1		@ i0
+	ldr	r5,[r10,r8,lsl#2]	@ Td2[s0>>8]
+	and	r8,lr,r1,lsr#16
+	ldr	r6,[r10,r9,lsl#2]	@ Td3[s0>>0]
+	and	r9,lr,r1,lsr#8
+	ldr	r0,[r10,r0,lsl#2]	@ Td0[s0>>24]
+	mov	r1,r1,lsr#24
+
+	ldr	r7,[r10,r7,lsl#2]	@ Td3[s1>>0]
+	ldr	r8,[r10,r8,lsl#2]	@ Td1[s1>>16]
+	ldr	r9,[r10,r9,lsl#2]	@ Td2[s1>>8]
+	eor	r0,r0,r7,ror#24
+	ldr	r1,[r10,r1,lsl#2]	@ Td0[s1>>24]
+	and	r7,lr,r2,lsr#8	@ i0
+	eor	r5,r8,r5,ror#8
+	and	r8,lr,r2		@ i1
+	eor	r6,r9,r6,ror#8
+	and	r9,lr,r2,lsr#16
+	ldr	r7,[r10,r7,lsl#2]	@ Td2[s2>>8]
+	eor	r1,r1,r4,ror#8
+	ldr	r8,[r10,r8,lsl#2]	@ Td3[s2>>0]
+	mov	r2,r2,lsr#24
+
+	ldr	r9,[r10,r9,lsl#2]	@ Td1[s2>>16]
+	eor	r0,r0,r7,ror#16
+	ldr	r2,[r10,r2,lsl#2]	@ Td0[s2>>24]
+	and	r7,lr,r3,lsr#16	@ i0
+	eor	r1,r1,r8,ror#24
+	and	r8,lr,r3,lsr#8	@ i1
+	eor	r6,r9,r6,ror#8
+	and	r9,lr,r3		@ i2
+	ldr	r7,[r10,r7,lsl#2]	@ Td1[s3>>16]
+	eor	r2,r2,r5,ror#8
+	ldr	r8,[r10,r8,lsl#2]	@ Td2[s3>>8]
+	mov	r3,r3,lsr#24
+
+	ldr	r9,[r10,r9,lsl#2]	@ Td3[s3>>0]
+	eor	r0,r0,r7,ror#8
+	ldr	r7,[r11],#16
+	eor	r1,r1,r8,ror#16
+	ldr	r3,[r10,r3,lsl#2]	@ Td0[s3>>24]
+	eor	r2,r2,r9,ror#24
+
+	ldr	r4,[r11,#-12]
+	eor	r0,r0,r7
+	ldr	r5,[r11,#-8]
+	eor	r3,r3,r6,ror#8
+	ldr	r6,[r11,#-4]
+	and	r7,lr,r0,lsr#16
+	eor	r1,r1,r4
+	and	r8,lr,r0,lsr#8
+	eor	r2,r2,r5
+	and	r9,lr,r0
+	eor	r3,r3,r6
+	mov	r0,r0,lsr#24
+
+	subs	r12,r12,#1
+	bne	.Ldec_loop
+
+	add	r10,r10,#1024
+
+	ldr	r5,[r10,#0]		@ prefetch Td4
+	ldr	r6,[r10,#32]
+	ldr	r4,[r10,#64]
+	ldr	r5,[r10,#96]
+	ldr	r6,[r10,#128]
+	ldr	r4,[r10,#160]
+	ldr	r5,[r10,#192]
+	ldr	r6,[r10,#224]
+
+	ldrb	r0,[r10,r0]		@ Td4[s0>>24]
+	ldrb	r4,[r10,r7]		@ Td4[s0>>16]
+	and	r7,lr,r1		@ i0
+	ldrb	r5,[r10,r8]		@ Td4[s0>>8]
+	and	r8,lr,r1,lsr#16
+	ldrb	r6,[r10,r9]		@ Td4[s0>>0]
+	and	r9,lr,r1,lsr#8
+
+	add	r1,r10,r1,lsr#24
+	ldrb	r7,[r10,r7]		@ Td4[s1>>0]
+	ldrb	r1,[r1]		@ Td4[s1>>24]
+	ldrb	r8,[r10,r8]		@ Td4[s1>>16]
+	eor	r0,r7,r0,lsl#24
+	ldrb	r9,[r10,r9]		@ Td4[s1>>8]
+	eor	r1,r4,r1,lsl#8
+	and	r7,lr,r2,lsr#8	@ i0
+	eor	r5,r5,r8,lsl#8
+	and	r8,lr,r2		@ i1
+	ldrb	r7,[r10,r7]		@ Td4[s2>>8]
+	eor	r6,r6,r9,lsl#8
+	ldrb	r8,[r10,r8]		@ Td4[s2>>0]
+	and	r9,lr,r2,lsr#16
+
+	add	r2,r10,r2,lsr#24
+	ldrb	r2,[r2]		@ Td4[s2>>24]
+	eor	r0,r0,r7,lsl#8
+	ldrb	r9,[r10,r9]		@ Td4[s2>>16]
+	eor	r1,r8,r1,lsl#16
+	and	r7,lr,r3,lsr#16	@ i0
+	eor	r2,r5,r2,lsl#16
+	and	r8,lr,r3,lsr#8	@ i1
+	ldrb	r7,[r10,r7]		@ Td4[s3>>16]
+	eor	r6,r6,r9,lsl#16
+	ldrb	r8,[r10,r8]		@ Td4[s3>>8]
+	and	r9,lr,r3		@ i2
+
+	add	r3,r10,r3,lsr#24
+	ldrb	r9,[r10,r9]		@ Td4[s3>>0]
+	ldrb	r3,[r3]		@ Td4[s3>>24]
+	eor	r0,r0,r7,lsl#16
+	ldr	r7,[r11,#0]
+	eor	r1,r1,r8,lsl#8
+	ldr	r4,[r11,#4]
+	eor	r2,r9,r2,lsl#8
+	ldr	r5,[r11,#8]
+	eor	r3,r6,r3,lsl#24
+	ldr	r6,[r11,#12]
+
+	eor	r0,r0,r7
+	eor	r1,r1,r4
+	eor	r2,r2,r5
+	eor	r3,r3,r6
+
+	sub	r10,r10,#1024
+	ldr	pc,[sp],#4		@ pop and return
+.size	_armv4_AES_decrypt,.-_armv4_AES_decrypt
+.byte	65,69,83,32,102,111,114,32,65,82,77,118,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S
new file mode 100644
index 0000000..6f0ee7d
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/aes/aesv8-armx32.S
@@ -0,0 +1,756 @@
+#if defined(__arm__)
+#include "arm_arch.h"
+
+#if __ARM_MAX_ARCH__>=7
+.text
+.arch	armv7-a
+.fpu	neon
+.code	32
+.align	5
+.Lrcon:
+.long	0x01,0x01,0x01,0x01
+.long	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d	@ rotate-n-splat
+.long	0x1b,0x1b,0x1b,0x1b
+
+.globl	aes_v8_set_encrypt_key
+.type	aes_v8_set_encrypt_key,%function
+.align	5
+aes_v8_set_encrypt_key:
+.Lenc_key:
+	mov	r3,#-1
+	cmp	r0,#0
+	beq	.Lenc_key_abort
+	cmp	r2,#0
+	beq	.Lenc_key_abort
+	mov	r3,#-2
+	cmp	r1,#128
+	blt	.Lenc_key_abort
+	cmp	r1,#256
+	bgt	.Lenc_key_abort
+	tst	r1,#0x3f
+	bne	.Lenc_key_abort
+
+	adr	r3,.Lrcon
+	cmp	r1,#192
+
+	veor	q0,q0,q0
+	vld1.8	{q3},[r0]!
+	mov	r1,#8		@ reuse r1
+	vld1.32	{q1,q2},[r3]!
+
+	blt	.Loop128
+	beq	.L192
+	b	.L256
+
+.align	4
+.Loop128:
+	vtbl.8	d20,{q3},d4
+	vtbl.8	d21,{q3},d5
+	vext.8	q9,q0,q3,#12
+	vst1.32	{q3},[r2]!
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+	subs	r1,r1,#1
+
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q10,q10,q1
+	veor	q3,q3,q9
+	vshl.u8	q1,q1,#1
+	veor	q3,q3,q10
+	bne	.Loop128
+
+	vld1.32	{q1},[r3]
+
+	vtbl.8	d20,{q3},d4
+	vtbl.8	d21,{q3},d5
+	vext.8	q9,q0,q3,#12
+	vst1.32	{q3},[r2]!
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q10,q10,q1
+	veor	q3,q3,q9
+	vshl.u8	q1,q1,#1
+	veor	q3,q3,q10
+
+	vtbl.8	d20,{q3},d4
+	vtbl.8	d21,{q3},d5
+	vext.8	q9,q0,q3,#12
+	vst1.32	{q3},[r2]!
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q10,q10,q1
+	veor	q3,q3,q9
+	veor	q3,q3,q10
+	vst1.32	{q3},[r2]
+	add	r2,r2,#0x50
+
+	mov	r12,#10
+	b	.Ldone
+
+.align	4
+.L192:
+	vld1.8	{d16},[r0]!
+	vmov.i8	q10,#8			@ borrow q10
+	vst1.32	{q3},[r2]!
+	vsub.i8	q2,q2,q10	@ adjust the mask
+
+.Loop192:
+	vtbl.8	d20,{q8},d4
+	vtbl.8	d21,{q8},d5
+	vext.8	q9,q0,q3,#12
+	vst1.32	{d16},[r2]!
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+	subs	r1,r1,#1
+
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+
+	vdup.32	q9,d7[1]
+	veor	q9,q9,q8
+	veor	q10,q10,q1
+	vext.8	q8,q0,q8,#12
+	vshl.u8	q1,q1,#1
+	veor	q8,q8,q9
+	veor	q3,q3,q10
+	veor	q8,q8,q10
+	vst1.32	{q3},[r2]!
+	bne	.Loop192
+
+	mov	r12,#12
+	add	r2,r2,#0x20
+	b	.Ldone
+
+.align	4
+.L256:
+	vld1.8	{q8},[r0]
+	mov	r1,#7
+	mov	r12,#14
+	vst1.32	{q3},[r2]!
+
+.Loop256:
+	vtbl.8	d20,{q8},d4
+	vtbl.8	d21,{q8},d5
+	vext.8	q9,q0,q3,#12
+	vst1.32	{q8},[r2]!
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+	subs	r1,r1,#1
+
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q3,q3,q9
+	vext.8	q9,q0,q9,#12
+	veor	q10,q10,q1
+	veor	q3,q3,q9
+	vshl.u8	q1,q1,#1
+	veor	q3,q3,q10
+	vst1.32	{q3},[r2]!
+	beq	.Ldone
+
+	vdup.32	q10,d7[1]
+	vext.8	q9,q0,q8,#12
+.byte	0x00,0x43,0xf0,0xf3	@ aese q10,q0
+
+	veor	q8,q8,q9
+	vext.8	q9,q0,q9,#12
+	veor	q8,q8,q9
+	vext.8	q9,q0,q9,#12
+	veor	q8,q8,q9
+
+	veor	q8,q8,q10
+	b	.Loop256
+
+.Ldone:
+	str	r12,[r2]
+	mov	r3,#0
+
+.Lenc_key_abort:
+	mov	r0,r3			@ return value
+
+	bx	lr
+.size	aes_v8_set_encrypt_key,.-aes_v8_set_encrypt_key
+
+.globl	aes_v8_set_decrypt_key
+.type	aes_v8_set_decrypt_key,%function
+.align	5
+aes_v8_set_decrypt_key:
+	stmdb	sp!,{r4,lr}
+	bl	.Lenc_key
+
+	cmp	r0,#0
+	bne	.Ldec_key_abort
+
+	sub	r2,r2,#240		@ restore original r2
+	mov	r4,#-16
+	add	r0,r2,r12,lsl#4	@ end of key schedule
+
+	vld1.32	{q0},[r2]
+	vld1.32	{q1},[r0]
+	vst1.32	{q0},[r0],r4
+	vst1.32	{q1},[r2]!
+
+.Loop_imc:
+	vld1.32	{q0},[r2]
+	vld1.32	{q1},[r0]
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+	vst1.32	{q0},[r0],r4
+	vst1.32	{q1},[r2]!
+	cmp	r0,r2
+	bhi	.Loop_imc
+
+	vld1.32	{q0},[r2]
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+	vst1.32	{q0},[r0]
+
+	eor	r0,r0,r0		@ return value
+.Ldec_key_abort:
+	ldmia	sp!,{r4,pc}
+.size	aes_v8_set_decrypt_key,.-aes_v8_set_decrypt_key
+.globl	aes_v8_encrypt
+.type	aes_v8_encrypt,%function
+.align	5
+aes_v8_encrypt:
+	ldr	r3,[r2,#240]
+	vld1.32	{q0},[r2]!
+	vld1.8	{q2},[r0]
+	sub	r3,r3,#2
+	vld1.32	{q1},[r2]!
+
+.Loop_enc:
+.byte	0x00,0x43,0xb0,0xf3	@ aese q2,q0
+.byte	0x84,0x43,0xb0,0xf3	@ aesmc q2,q2
+	vld1.32	{q0},[r2]!
+	subs	r3,r3,#2
+.byte	0x02,0x43,0xb0,0xf3	@ aese q2,q1
+.byte	0x84,0x43,0xb0,0xf3	@ aesmc q2,q2
+	vld1.32	{q1},[r2]!
+	bgt	.Loop_enc
+
+.byte	0x00,0x43,0xb0,0xf3	@ aese q2,q0
+.byte	0x84,0x43,0xb0,0xf3	@ aesmc q2,q2
+	vld1.32	{q0},[r2]
+.byte	0x02,0x43,0xb0,0xf3	@ aese q2,q1
+	veor	q2,q2,q0
+
+	vst1.8	{q2},[r1]
+	bx	lr
+.size	aes_v8_encrypt,.-aes_v8_encrypt
+.globl	aes_v8_decrypt
+.type	aes_v8_decrypt,%function
+.align	5
+aes_v8_decrypt:
+	ldr	r3,[r2,#240]
+	vld1.32	{q0},[r2]!
+	vld1.8	{q2},[r0]
+	sub	r3,r3,#2
+	vld1.32	{q1},[r2]!
+
+.Loop_dec:
+.byte	0x40,0x43,0xb0,0xf3	@ aesd q2,q0
+.byte	0xc4,0x43,0xb0,0xf3	@ aesimc q2,q2
+	vld1.32	{q0},[r2]!
+	subs	r3,r3,#2
+.byte	0x42,0x43,0xb0,0xf3	@ aesd q2,q1
+.byte	0xc4,0x43,0xb0,0xf3	@ aesimc q2,q2
+	vld1.32	{q1},[r2]!
+	bgt	.Loop_dec
+
+.byte	0x40,0x43,0xb0,0xf3	@ aesd q2,q0
+.byte	0xc4,0x43,0xb0,0xf3	@ aesimc q2,q2
+	vld1.32	{q0},[r2]
+.byte	0x42,0x43,0xb0,0xf3	@ aesd q2,q1
+	veor	q2,q2,q0
+
+	vst1.8	{q2},[r1]
+	bx	lr
+.size	aes_v8_decrypt,.-aes_v8_decrypt
+.globl	aes_v8_cbc_encrypt
+.type	aes_v8_cbc_encrypt,%function
+.align	5
+aes_v8_cbc_encrypt:
+	mov	ip,sp
+	stmdb	sp!,{r4,r5,r6,r7,r8,lr}
+	vstmdb	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}            @ ABI specification says so
+	ldmia	ip,{r4,r5}		@ load remaining args
+	subs	r2,r2,#16
+	mov	r8,#16
+	blo	.Lcbc_abort
+	moveq	r8,#0
+
+	cmp	r5,#0			@ en- or decrypting?
+	ldr	r5,[r3,#240]
+	and	r2,r2,#-16
+	vld1.8	{q6},[r4]
+	vld1.8	{q0},[r0],r8
+
+	vld1.32	{q8,q9},[r3]		@ load key schedule...
+	sub	r5,r5,#6
+	add	r7,r3,r5,lsl#4	@ pointer to last 7 round keys
+	sub	r5,r5,#2
+	vld1.32	{q10,q11},[r7]!
+	vld1.32	{q12,q13},[r7]!
+	vld1.32	{q14,q15},[r7]!
+	vld1.32	{q7},[r7]
+
+	add	r7,r3,#32
+	mov	r6,r5
+	beq	.Lcbc_dec
+
+	cmp	r5,#2
+	veor	q0,q0,q6
+	veor	q5,q8,q7
+	beq	.Lcbc_enc128
+
+	vld1.32	{q2,q3},[r7]
+	add	r7,r3,#16
+	add	r6,r3,#16*4
+	add	r12,r3,#16*5
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	add	r14,r3,#16*6
+	add	r3,r3,#16*7
+	b	.Lenter_cbc_enc
+
+.align	4
+.Loop_cbc_enc:
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vst1.8	{q6},[r1]!
+.Lenter_cbc_enc:
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x04,0x03,0xb0,0xf3	@ aese q0,q2
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.32	{q8},[r6]
+	cmp	r5,#4
+.byte	0x06,0x03,0xb0,0xf3	@ aese q0,q3
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.32	{q9},[r12]
+	beq	.Lcbc_enc192
+
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.32	{q8},[r14]
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.32	{q9},[r3]
+	nop
+
+.Lcbc_enc192:
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	subs	r2,r2,#16
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	moveq	r8,#0
+.byte	0x24,0x03,0xb0,0xf3	@ aese q0,q10
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x26,0x03,0xb0,0xf3	@ aese q0,q11
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.8	{q8},[r0],r8
+.byte	0x28,0x03,0xb0,0xf3	@ aese q0,q12
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	veor	q8,q8,q5
+.byte	0x2a,0x03,0xb0,0xf3	@ aese q0,q13
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.32	{q9},[r7]		@ re-pre-load rndkey[1]
+.byte	0x2c,0x03,0xb0,0xf3	@ aese q0,q14
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x2e,0x03,0xb0,0xf3	@ aese q0,q15
+	veor	q6,q0,q7
+	bhs	.Loop_cbc_enc
+
+	vst1.8	{q6},[r1]!
+	b	.Lcbc_done
+
+.align	5
+.Lcbc_enc128:
+	vld1.32	{q2,q3},[r7]
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	b	.Lenter_cbc_enc128
+.Loop_cbc_enc128:
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vst1.8	{q6},[r1]!
+.Lenter_cbc_enc128:
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	subs	r2,r2,#16
+.byte	0x04,0x03,0xb0,0xf3	@ aese q0,q2
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	moveq	r8,#0
+.byte	0x06,0x03,0xb0,0xf3	@ aese q0,q3
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x24,0x03,0xb0,0xf3	@ aese q0,q10
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x26,0x03,0xb0,0xf3	@ aese q0,q11
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	vld1.8	{q8},[r0],r8
+.byte	0x28,0x03,0xb0,0xf3	@ aese q0,q12
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x2a,0x03,0xb0,0xf3	@ aese q0,q13
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x2c,0x03,0xb0,0xf3	@ aese q0,q14
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+	veor	q8,q8,q5
+.byte	0x2e,0x03,0xb0,0xf3	@ aese q0,q15
+	veor	q6,q0,q7
+	bhs	.Loop_cbc_enc128
+
+	vst1.8	{q6},[r1]!
+	b	.Lcbc_done
+.align	5
+.Lcbc_dec:
+	vld1.8	{q10},[r0]!
+	subs	r2,r2,#32		@ bias
+	add	r6,r5,#2
+	vorr	q3,q0,q0
+	vorr	q1,q0,q0
+	vorr	q11,q10,q10
+	blo	.Lcbc_dec_tail
+
+	vorr	q1,q10,q10
+	vld1.8	{q10},[r0]!
+	vorr	q2,q0,q0
+	vorr	q3,q1,q1
+	vorr	q11,q10,q10
+
+.Loop3x_cbc_dec:
+.byte	0x60,0x03,0xb0,0xf3	@ aesd q0,q8
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x60,0x23,0xb0,0xf3	@ aesd q1,q8
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x60,0x43,0xf0,0xf3	@ aesd q10,q8
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.32	{q8},[r7]!
+	subs	r6,r6,#2
+.byte	0x62,0x03,0xb0,0xf3	@ aesd q0,q9
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x62,0x23,0xb0,0xf3	@ aesd q1,q9
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x62,0x43,0xf0,0xf3	@ aesd q10,q9
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.32	{q9},[r7]!
+	bgt	.Loop3x_cbc_dec
+
+.byte	0x60,0x03,0xb0,0xf3	@ aesd q0,q8
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x60,0x23,0xb0,0xf3	@ aesd q1,q8
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x60,0x43,0xf0,0xf3	@ aesd q10,q8
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	veor	q4,q6,q7
+	subs	r2,r2,#0x30
+	veor	q5,q2,q7
+	movlo	r6,r2			@ r6, r6, is zero at this point
+.byte	0x62,0x03,0xb0,0xf3	@ aesd q0,q9
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x62,0x23,0xb0,0xf3	@ aesd q1,q9
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x62,0x43,0xf0,0xf3	@ aesd q10,q9
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	veor	q9,q3,q7
+	add	r0,r0,r6		@ r0 is adjusted in such way that
+					@ at exit from the loop q1-q10
+					@ are loaded with last "words"
+	vorr	q6,q11,q11
+	mov	r7,r3
+.byte	0x68,0x03,0xb0,0xf3	@ aesd q0,q12
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x68,0x23,0xb0,0xf3	@ aesd q1,q12
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x68,0x43,0xf0,0xf3	@ aesd q10,q12
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.8	{q2},[r0]!
+.byte	0x6a,0x03,0xb0,0xf3	@ aesd q0,q13
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x6a,0x23,0xb0,0xf3	@ aesd q1,q13
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x6a,0x43,0xf0,0xf3	@ aesd q10,q13
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.8	{q3},[r0]!
+.byte	0x6c,0x03,0xb0,0xf3	@ aesd q0,q14
+.byte	0xc0,0x03,0xb0,0xf3	@ aesimc q0,q0
+.byte	0x6c,0x23,0xb0,0xf3	@ aesd q1,q14
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x6c,0x43,0xf0,0xf3	@ aesd q10,q14
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.8	{q11},[r0]!
+.byte	0x6e,0x03,0xb0,0xf3	@ aesd q0,q15
+.byte	0x6e,0x23,0xb0,0xf3	@ aesd q1,q15
+.byte	0x6e,0x43,0xf0,0xf3	@ aesd q10,q15
+	vld1.32	{q8},[r7]!	@ re-pre-load rndkey[0]
+	add	r6,r5,#2
+	veor	q4,q4,q0
+	veor	q5,q5,q1
+	veor	q10,q10,q9
+	vld1.32	{q9},[r7]!	@ re-pre-load rndkey[1]
+	vst1.8	{q4},[r1]!
+	vorr	q0,q2,q2
+	vst1.8	{q5},[r1]!
+	vorr	q1,q3,q3
+	vst1.8	{q10},[r1]!
+	vorr	q10,q11,q11
+	bhs	.Loop3x_cbc_dec
+
+	cmn	r2,#0x30
+	beq	.Lcbc_done
+	nop
+
+.Lcbc_dec_tail:
+.byte	0x60,0x23,0xb0,0xf3	@ aesd q1,q8
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x60,0x43,0xf0,0xf3	@ aesd q10,q8
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.32	{q8},[r7]!
+	subs	r6,r6,#2
+.byte	0x62,0x23,0xb0,0xf3	@ aesd q1,q9
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x62,0x43,0xf0,0xf3	@ aesd q10,q9
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	vld1.32	{q9},[r7]!
+	bgt	.Lcbc_dec_tail
+
+.byte	0x60,0x23,0xb0,0xf3	@ aesd q1,q8
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x60,0x43,0xf0,0xf3	@ aesd q10,q8
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+.byte	0x62,0x23,0xb0,0xf3	@ aesd q1,q9
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x62,0x43,0xf0,0xf3	@ aesd q10,q9
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+.byte	0x68,0x23,0xb0,0xf3	@ aesd q1,q12
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x68,0x43,0xf0,0xf3	@ aesd q10,q12
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	cmn	r2,#0x20
+.byte	0x6a,0x23,0xb0,0xf3	@ aesd q1,q13
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x6a,0x43,0xf0,0xf3	@ aesd q10,q13
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	veor	q5,q6,q7
+.byte	0x6c,0x23,0xb0,0xf3	@ aesd q1,q14
+.byte	0xc2,0x23,0xb0,0xf3	@ aesimc q1,q1
+.byte	0x6c,0x43,0xf0,0xf3	@ aesd q10,q14
+.byte	0xe4,0x43,0xf0,0xf3	@ aesimc q10,q10
+	veor	q9,q3,q7
+.byte	0x6e,0x23,0xb0,0xf3	@ aesd q1,q15
+.byte	0x6e,0x43,0xf0,0xf3	@ aesd q10,q15
+	beq	.Lcbc_dec_one
+	veor	q5,q5,q1
+	veor	q9,q9,q10
+	vorr	q6,q11,q11
+	vst1.8	{q5},[r1]!
+	vst1.8	{q9},[r1]!
+	b	.Lcbc_done
+
+.Lcbc_dec_one:
+	veor	q5,q5,q10
+	vorr	q6,q11,q11
+	vst1.8	{q5},[r1]!
+
+.Lcbc_done:
+	vst1.8	{q6},[r4]
+.Lcbc_abort:
+	vldmia	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
+	ldmia	sp!,{r4,r5,r6,r7,r8,pc}
+.size	aes_v8_cbc_encrypt,.-aes_v8_cbc_encrypt
+.globl	aes_v8_ctr32_encrypt_blocks
+.type	aes_v8_ctr32_encrypt_blocks,%function
+.align	5
+aes_v8_ctr32_encrypt_blocks:
+	mov	ip,sp
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,lr}
+	vstmdb	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}            @ ABI specification says so
+	ldr	r4, [ip]		@ load remaining arg
+	ldr	r5,[r3,#240]
+
+	ldr	r8, [r4, #12]
+	vld1.32	{q0},[r4]
+
+	vld1.32	{q8,q9},[r3]		@ load key schedule...
+	sub	r5,r5,#4
+	mov	r12,#16
+	cmp	r2,#2
+	add	r7,r3,r5,lsl#4	@ pointer to last 5 round keys
+	sub	r5,r5,#2
+	vld1.32	{q12,q13},[r7]!
+	vld1.32	{q14,q15},[r7]!
+	vld1.32	{q7},[r7]
+	add	r7,r3,#32
+	mov	r6,r5
+	movlo	r12,#0
+#ifndef __ARMEB__
+	rev	r8, r8
+#endif
+	vorr	q1,q0,q0
+	add	r10, r8, #1
+	vorr	q10,q0,q0
+	add	r8, r8, #2
+	vorr	q6,q0,q0
+	rev	r10, r10
+	vmov.32	d3[1],r10
+	bls	.Lctr32_tail
+	rev	r12, r8
+	sub	r2,r2,#3		@ bias
+	vmov.32	d21[1],r12
+	b	.Loop3x_ctr32
+
+.align	4
+.Loop3x_ctr32:
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x20,0x23,0xb0,0xf3	@ aese q1,q8
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+.byte	0x20,0x43,0xf0,0xf3	@ aese q10,q8
+.byte	0xa4,0x43,0xf0,0xf3	@ aesmc q10,q10
+	vld1.32	{q8},[r7]!
+	subs	r6,r6,#2
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x22,0x23,0xb0,0xf3	@ aese q1,q9
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+.byte	0x22,0x43,0xf0,0xf3	@ aese q10,q9
+.byte	0xa4,0x43,0xf0,0xf3	@ aesmc q10,q10
+	vld1.32	{q9},[r7]!
+	bgt	.Loop3x_ctr32
+
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x83,0xb0,0xf3	@ aesmc q4,q0
+.byte	0x20,0x23,0xb0,0xf3	@ aese q1,q8
+.byte	0x82,0xa3,0xb0,0xf3	@ aesmc q5,q1
+	vld1.8	{q2},[r0]!
+	vorr	q0,q6,q6
+.byte	0x20,0x43,0xf0,0xf3	@ aese q10,q8
+.byte	0xa4,0x43,0xf0,0xf3	@ aesmc q10,q10
+	vld1.8	{q3},[r0]!
+	vorr	q1,q6,q6
+.byte	0x22,0x83,0xb0,0xf3	@ aese q4,q9
+.byte	0x88,0x83,0xb0,0xf3	@ aesmc q4,q4
+.byte	0x22,0xa3,0xb0,0xf3	@ aese q5,q9
+.byte	0x8a,0xa3,0xb0,0xf3	@ aesmc q5,q5
+	vld1.8	{q11},[r0]!
+	mov	r7,r3
+.byte	0x22,0x43,0xf0,0xf3	@ aese q10,q9
+.byte	0xa4,0x23,0xf0,0xf3	@ aesmc q9,q10
+	vorr	q10,q6,q6
+	add	r9,r8,#1
+.byte	0x28,0x83,0xb0,0xf3	@ aese q4,q12
+.byte	0x88,0x83,0xb0,0xf3	@ aesmc q4,q4
+.byte	0x28,0xa3,0xb0,0xf3	@ aese q5,q12
+.byte	0x8a,0xa3,0xb0,0xf3	@ aesmc q5,q5
+	veor	q2,q2,q7
+	add	r10,r8,#2
+.byte	0x28,0x23,0xf0,0xf3	@ aese q9,q12
+.byte	0xa2,0x23,0xf0,0xf3	@ aesmc q9,q9
+	veor	q3,q3,q7
+	add	r8,r8,#3
+.byte	0x2a,0x83,0xb0,0xf3	@ aese q4,q13
+.byte	0x88,0x83,0xb0,0xf3	@ aesmc q4,q4
+.byte	0x2a,0xa3,0xb0,0xf3	@ aese q5,q13
+.byte	0x8a,0xa3,0xb0,0xf3	@ aesmc q5,q5
+	veor	q11,q11,q7
+	rev	r9,r9
+.byte	0x2a,0x23,0xf0,0xf3	@ aese q9,q13
+.byte	0xa2,0x23,0xf0,0xf3	@ aesmc q9,q9
+	vmov.32	d1[1], r9
+	rev	r10,r10
+.byte	0x2c,0x83,0xb0,0xf3	@ aese q4,q14
+.byte	0x88,0x83,0xb0,0xf3	@ aesmc q4,q4
+.byte	0x2c,0xa3,0xb0,0xf3	@ aese q5,q14
+.byte	0x8a,0xa3,0xb0,0xf3	@ aesmc q5,q5
+	vmov.32	d3[1], r10
+	rev	r12,r8
+.byte	0x2c,0x23,0xf0,0xf3	@ aese q9,q14
+.byte	0xa2,0x23,0xf0,0xf3	@ aesmc q9,q9
+	vmov.32	d21[1], r12
+	subs	r2,r2,#3
+.byte	0x2e,0x83,0xb0,0xf3	@ aese q4,q15
+.byte	0x2e,0xa3,0xb0,0xf3	@ aese q5,q15
+.byte	0x2e,0x23,0xf0,0xf3	@ aese q9,q15
+
+	veor	q2,q2,q4
+	vld1.32	{q8},[r7]!	@ re-pre-load rndkey[0]
+	vst1.8	{q2},[r1]!
+	veor	q3,q3,q5
+	mov	r6,r5
+	vst1.8	{q3},[r1]!
+	veor	q11,q11,q9
+	vld1.32	{q9},[r7]!	@ re-pre-load rndkey[1]
+	vst1.8	{q11},[r1]!
+	bhs	.Loop3x_ctr32
+
+	adds	r2,r2,#3
+	beq	.Lctr32_done
+	cmp	r2,#1
+	mov	r12,#16
+	moveq	r12,#0
+
+.Lctr32_tail:
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x20,0x23,0xb0,0xf3	@ aese q1,q8
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	vld1.32	{q8},[r7]!
+	subs	r6,r6,#2
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x22,0x23,0xb0,0xf3	@ aese q1,q9
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	vld1.32	{q9},[r7]!
+	bgt	.Lctr32_tail
+
+.byte	0x20,0x03,0xb0,0xf3	@ aese q0,q8
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x20,0x23,0xb0,0xf3	@ aese q1,q8
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+.byte	0x22,0x03,0xb0,0xf3	@ aese q0,q9
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x22,0x23,0xb0,0xf3	@ aese q1,q9
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	vld1.8	{q2},[r0],r12
+.byte	0x28,0x03,0xb0,0xf3	@ aese q0,q12
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x28,0x23,0xb0,0xf3	@ aese q1,q12
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	vld1.8	{q3},[r0]
+.byte	0x2a,0x03,0xb0,0xf3	@ aese q0,q13
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x2a,0x23,0xb0,0xf3	@ aese q1,q13
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	veor	q2,q2,q7
+.byte	0x2c,0x03,0xb0,0xf3	@ aese q0,q14
+.byte	0x80,0x03,0xb0,0xf3	@ aesmc q0,q0
+.byte	0x2c,0x23,0xb0,0xf3	@ aese q1,q14
+.byte	0x82,0x23,0xb0,0xf3	@ aesmc q1,q1
+	veor	q3,q3,q7
+.byte	0x2e,0x03,0xb0,0xf3	@ aese q0,q15
+.byte	0x2e,0x23,0xb0,0xf3	@ aese q1,q15
+
+	cmp	r2,#1
+	veor	q2,q2,q0
+	veor	q3,q3,q1
+	vst1.8	{q2},[r1]!
+	beq	.Lctr32_done
+	vst1.8	{q3},[r1]
+
+.Lctr32_done:
+	vldmia	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,pc}
+.size	aes_v8_ctr32_encrypt_blocks,.-aes_v8_ctr32_encrypt_blocks
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S b/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S
new file mode 100644
index 0000000..dd84f35
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/aes/bsaes-armv7.S
@@ -0,0 +1,2579 @@
+#if defined(__arm__)
+
+@ ====================================================================
+@ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
+@ project. 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/.
+@
+@ Specific modes and adaptation for Linux kernel by Ard Biesheuvel
+@ <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is
+@ granted.
+@ ====================================================================
+
+@ Bit-sliced AES for ARM NEON
+@
+@ February 2012.
+@
+@ This implementation is direct adaptation of bsaes-x86_64 module for
+@ ARM NEON. Except that this module is endian-neutral [in sense that
+@ it can be compiled for either endianness] by courtesy of vld1.8's
+@ neutrality. Initial version doesn't implement interface to OpenSSL,
+@ only low-level primitives and unsupported entry points, just enough
+@ to collect performance results, which for Cortex-A8 core are:
+@
+@ encrypt	19.5 cycles per byte processed with 128-bit key
+@ decrypt	22.1 cycles per byte processed with 128-bit key
+@ key conv.	440  cycles per 128-bit key/0.18 of 8x block
+@
+@ Snapdragon S4 encrypts byte in 17.6 cycles and decrypts in 19.7,
+@ which is [much] worse than anticipated (for further details see
+@ http://www.openssl.org/~appro/Snapdragon-S4.html).
+@
+@ Cortex-A15 manages in 14.2/16.1 cycles [when integer-only code
+@ manages in 20.0 cycles].
+@
+@ When comparing to x86_64 results keep in mind that NEON unit is
+@ [mostly] single-issue and thus can't [fully] benefit from
+@ instruction-level parallelism. And when comparing to aes-armv4
+@ results keep in mind key schedule conversion overhead (see
+@ bsaes-x86_64.pl for further details)...
+@
+@						<appro@openssl.org>
+
+@ April-August 2013
+@
+@ Add CBC, CTR and XTS subroutines, adapt for kernel use.
+@
+@					<ard.biesheuvel@linaro.org>
+
+#if defined(__arm__)
+#ifndef __KERNEL__
+# include "arm_arch.h"
+
+# define VFP_ABI_PUSH	vstmdb	sp!,{d8-d15}
+# define VFP_ABI_POP	vldmia	sp!,{d8-d15}
+# define VFP_ABI_FRAME	0x40
+#else
+# define VFP_ABI_PUSH
+# define VFP_ABI_POP
+# define VFP_ABI_FRAME	0
+# define BSAES_ASM_EXTENDED_KEY
+# define XTS_CHAIN_TWEAK
+# define __ARM_ARCH__ __LINUX_ARM_ARCH__
+# define __ARM_MAX_ARCH__ 7
+#endif
+
+#ifdef __thumb__
+# define adrl adr
+#endif
+
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.text
+.syntax	unified 	@ ARMv7-capable assembler is expected to handle this
+#if defined(__thumb2__) && !defined(__APPLE__)
+.thumb
+#else
+.code	32
+#endif
+
+.type	_bsaes_decrypt8,%function
+.align	4
+_bsaes_decrypt8:
+	adr	r6,_bsaes_decrypt8
+	vldmia	r4!, {q9}		@ round 0 key
+#ifdef	__APPLE__
+	adr	r6,.LM0ISR
+#else
+	add	r6,r6,#.LM0ISR-_bsaes_decrypt8
+#endif
+
+	vldmia	r6!, {q8}		@ .LM0ISR
+	veor	q10, q0, q9	@ xor with round0 key
+	veor	q11, q1, q9
+	vtbl.8	d0, {q10}, d16
+	vtbl.8	d1, {q10}, d17
+	veor	q12, q2, q9
+	vtbl.8	d2, {q11}, d16
+	vtbl.8	d3, {q11}, d17
+	veor	q13, q3, q9
+	vtbl.8	d4, {q12}, d16
+	vtbl.8	d5, {q12}, d17
+	veor	q14, q4, q9
+	vtbl.8	d6, {q13}, d16
+	vtbl.8	d7, {q13}, d17
+	veor	q15, q5, q9
+	vtbl.8	d8, {q14}, d16
+	vtbl.8	d9, {q14}, d17
+	veor	q10, q6, q9
+	vtbl.8	d10, {q15}, d16
+	vtbl.8	d11, {q15}, d17
+	veor	q11, q7, q9
+	vtbl.8	d12, {q10}, d16
+	vtbl.8	d13, {q10}, d17
+	vtbl.8	d14, {q11}, d16
+	vtbl.8	d15, {q11}, d17
+	vmov.i8	q8,#0x55			@ compose .LBS0
+	vmov.i8	q9,#0x33			@ compose .LBS1
+	vshr.u64	q10, q6, #1
+	vshr.u64	q11, q4, #1
+	veor	q10, q10, q7
+	veor	q11, q11, q5
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #1
+	veor	q5, q5, q11
+	vshl.u64	q11, q11, #1
+	veor	q6, q6, q10
+	veor	q4, q4, q11
+	vshr.u64	q10, q2, #1
+	vshr.u64	q11, q0, #1
+	veor	q10, q10, q3
+	veor	q11, q11, q1
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q3, q3, q10
+	vshl.u64	q10, q10, #1
+	veor	q1, q1, q11
+	vshl.u64	q11, q11, #1
+	veor	q2, q2, q10
+	veor	q0, q0, q11
+	vmov.i8	q8,#0x0f			@ compose .LBS2
+	vshr.u64	q10, q5, #2
+	vshr.u64	q11, q4, #2
+	veor	q10, q10, q7
+	veor	q11, q11, q6
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #2
+	veor	q6, q6, q11
+	vshl.u64	q11, q11, #2
+	veor	q5, q5, q10
+	veor	q4, q4, q11
+	vshr.u64	q10, q1, #2
+	vshr.u64	q11, q0, #2
+	veor	q10, q10, q3
+	veor	q11, q11, q2
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q3, q3, q10
+	vshl.u64	q10, q10, #2
+	veor	q2, q2, q11
+	vshl.u64	q11, q11, #2
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vshr.u64	q10, q3, #4
+	vshr.u64	q11, q2, #4
+	veor	q10, q10, q7
+	veor	q11, q11, q6
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #4
+	veor	q6, q6, q11
+	vshl.u64	q11, q11, #4
+	veor	q3, q3, q10
+	veor	q2, q2, q11
+	vshr.u64	q10, q1, #4
+	vshr.u64	q11, q0, #4
+	veor	q10, q10, q5
+	veor	q11, q11, q4
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #4
+	veor	q4, q4, q11
+	vshl.u64	q11, q11, #4
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	sub	r5,r5,#1
+	b	.Ldec_sbox
+.align	4
+.Ldec_loop:
+	vldmia	r4!, {q8,q9,q10,q11}
+	veor	q8, q8, q0
+	veor	q9, q9, q1
+	vtbl.8	d0, {q8}, d24
+	vtbl.8	d1, {q8}, d25
+	vldmia	r4!, {q8}
+	veor	q10, q10, q2
+	vtbl.8	d2, {q9}, d24
+	vtbl.8	d3, {q9}, d25
+	vldmia	r4!, {q9}
+	veor	q11, q11, q3
+	vtbl.8	d4, {q10}, d24
+	vtbl.8	d5, {q10}, d25
+	vldmia	r4!, {q10}
+	vtbl.8	d6, {q11}, d24
+	vtbl.8	d7, {q11}, d25
+	vldmia	r4!, {q11}
+	veor	q8, q8, q4
+	veor	q9, q9, q5
+	vtbl.8	d8, {q8}, d24
+	vtbl.8	d9, {q8}, d25
+	veor	q10, q10, q6
+	vtbl.8	d10, {q9}, d24
+	vtbl.8	d11, {q9}, d25
+	veor	q11, q11, q7
+	vtbl.8	d12, {q10}, d24
+	vtbl.8	d13, {q10}, d25
+	vtbl.8	d14, {q11}, d24
+	vtbl.8	d15, {q11}, d25
+.Ldec_sbox:
+	veor	q1, q1, q4
+	veor	q3, q3, q4
+
+	veor	q4, q4, q7
+	veor	q1, q1, q6
+	veor	q2, q2, q7
+	veor	q6, q6, q4
+
+	veor	q0, q0, q1
+	veor	q2, q2, q5
+	veor	q7, q7, q6
+	veor	q3, q3, q0
+	veor	q5, q5, q0
+	veor	q1, q1, q3
+	veor	q11, q3, q0
+	veor	q10, q7, q4
+	veor	q9, q1, q6
+	veor	q13, q4, q0
+	vmov	q8, q10
+	veor	q12, q5, q2
+
+	vorr	q10, q10, q9
+	veor	q15, q11, q8
+	vand	q14, q11, q12
+	vorr	q11, q11, q12
+	veor	q12, q12, q9
+	vand	q8, q8, q9
+	veor	q9, q6, q2
+	vand	q15, q15, q12
+	vand	q13, q13, q9
+	veor	q9, q3, q7
+	veor	q12, q1, q5
+	veor	q11, q11, q13
+	veor	q10, q10, q13
+	vand	q13, q9, q12
+	vorr	q9, q9, q12
+	veor	q11, q11, q15
+	veor	q8, q8, q13
+	veor	q10, q10, q14
+	veor	q9, q9, q15
+	veor	q8, q8, q14
+	vand	q12, q4, q6
+	veor	q9, q9, q14
+	vand	q13, q0, q2
+	vand	q14, q7, q1
+	vorr	q15, q3, q5
+	veor	q11, q11, q12
+	veor	q9, q9, q14
+	veor	q8, q8, q15
+	veor	q10, q10, q13
+
+	@ Inv_GF16 	0, 	1, 	2, 	3, s0, s1, s2, s3
+
+	@ new smaller inversion
+
+	vand	q14, q11, q9
+	vmov	q12, q8
+
+	veor	q13, q10, q14
+	veor	q15, q8, q14
+	veor	q14, q8, q14	@ q14=q15
+
+	vbsl	q13, q9, q8
+	vbsl	q15, q11, q10
+	veor	q11, q11, q10
+
+	vbsl	q12, q13, q14
+	vbsl	q8, q14, q13
+
+	vand	q14, q12, q15
+	veor	q9, q9, q8
+
+	veor	q14, q14, q11
+	veor	q12, q5, q2
+	veor	q8, q1, q6
+	veor	q10, q15, q14
+	vand	q10, q10, q5
+	veor	q5, q5, q1
+	vand	q11, q1, q15
+	vand	q5, q5, q14
+	veor	q1, q11, q10
+	veor	q5, q5, q11
+	veor	q15, q15, q13
+	veor	q14, q14, q9
+	veor	q11, q15, q14
+	veor	q10, q13, q9
+	vand	q11, q11, q12
+	vand	q10, q10, q2
+	veor	q12, q12, q8
+	veor	q2, q2, q6
+	vand	q8, q8, q15
+	vand	q6, q6, q13
+	vand	q12, q12, q14
+	vand	q2, q2, q9
+	veor	q8, q8, q12
+	veor	q2, q2, q6
+	veor	q12, q12, q11
+	veor	q6, q6, q10
+	veor	q5, q5, q12
+	veor	q2, q2, q12
+	veor	q1, q1, q8
+	veor	q6, q6, q8
+
+	veor	q12, q3, q0
+	veor	q8, q7, q4
+	veor	q11, q15, q14
+	veor	q10, q13, q9
+	vand	q11, q11, q12
+	vand	q10, q10, q0
+	veor	q12, q12, q8
+	veor	q0, q0, q4
+	vand	q8, q8, q15
+	vand	q4, q4, q13
+	vand	q12, q12, q14
+	vand	q0, q0, q9
+	veor	q8, q8, q12
+	veor	q0, q0, q4
+	veor	q12, q12, q11
+	veor	q4, q4, q10
+	veor	q15, q15, q13
+	veor	q14, q14, q9
+	veor	q10, q15, q14
+	vand	q10, q10, q3
+	veor	q3, q3, q7
+	vand	q11, q7, q15
+	vand	q3, q3, q14
+	veor	q7, q11, q10
+	veor	q3, q3, q11
+	veor	q3, q3, q12
+	veor	q0, q0, q12
+	veor	q7, q7, q8
+	veor	q4, q4, q8
+	veor	q1, q1, q7
+	veor	q6, q6, q5
+
+	veor	q4, q4, q1
+	veor	q2, q2, q7
+	veor	q5, q5, q7
+	veor	q4, q4, q2
+	veor	q7, q7, q0
+	veor	q4, q4, q5
+	veor	q3, q3, q6
+	veor	q6, q6, q1
+	veor	q3, q3, q4
+
+	veor	q4, q4, q0
+	veor	q7, q7, q3
+	subs	r5,r5,#1
+	bcc	.Ldec_done
+	@ multiplication by 0x05-0x00-0x04-0x00
+	vext.8	q8, q0, q0, #8
+	vext.8	q14, q3, q3, #8
+	vext.8	q15, q5, q5, #8
+	veor	q8, q8, q0
+	vext.8	q9, q1, q1, #8
+	veor	q14, q14, q3
+	vext.8	q10, q6, q6, #8
+	veor	q15, q15, q5
+	vext.8	q11, q4, q4, #8
+	veor	q9, q9, q1
+	vext.8	q12, q2, q2, #8
+	veor	q10, q10, q6
+	vext.8	q13, q7, q7, #8
+	veor	q11, q11, q4
+	veor	q12, q12, q2
+	veor	q13, q13, q7
+
+	veor	q0, q0, q14
+	veor	q1, q1, q14
+	veor	q6, q6, q8
+	veor	q2, q2, q10
+	veor	q4, q4, q9
+	veor	q1, q1, q15
+	veor	q6, q6, q15
+	veor	q2, q2, q14
+	veor	q7, q7, q11
+	veor	q4, q4, q14
+	veor	q3, q3, q12
+	veor	q2, q2, q15
+	veor	q7, q7, q15
+	veor	q5, q5, q13
+	vext.8	q8, q0, q0, #12	@ x0 <<< 32
+	vext.8	q9, q1, q1, #12
+	veor	q0, q0, q8		@ x0 ^ (x0 <<< 32)
+	vext.8	q10, q6, q6, #12
+	veor	q1, q1, q9
+	vext.8	q11, q4, q4, #12
+	veor	q6, q6, q10
+	vext.8	q12, q2, q2, #12
+	veor	q4, q4, q11
+	vext.8	q13, q7, q7, #12
+	veor	q2, q2, q12
+	vext.8	q14, q3, q3, #12
+	veor	q7, q7, q13
+	vext.8	q15, q5, q5, #12
+	veor	q3, q3, q14
+
+	veor	q9, q9, q0
+	veor	q5, q5, q15
+	vext.8	q0, q0, q0, #8		@ (x0 ^ (x0 <<< 32)) <<< 64)
+	veor	q10, q10, q1
+	veor	q8, q8, q5
+	veor	q9, q9, q5
+	vext.8	q1, q1, q1, #8
+	veor	q13, q13, q2
+	veor	q0, q0, q8
+	veor	q14, q14, q7
+	veor	q1, q1, q9
+	vext.8	q8, q2, q2, #8
+	veor	q12, q12, q4
+	vext.8	q9, q7, q7, #8
+	veor	q15, q15, q3
+	vext.8	q2, q4, q4, #8
+	veor	q11, q11, q6
+	vext.8	q7, q5, q5, #8
+	veor	q12, q12, q5
+	vext.8	q4, q3, q3, #8
+	veor	q11, q11, q5
+	vext.8	q3, q6, q6, #8
+	veor	q5, q9, q13
+	veor	q11, q11, q2
+	veor	q7, q7, q15
+	veor	q6, q4, q14
+	veor	q4, q8, q12
+	veor	q2, q3, q10
+	vmov	q3, q11
+	 @ vmov	q5, q9
+	vldmia	r6, {q12}		@ .LISR
+	ite	eq				@ Thumb2 thing, sanity check in ARM
+	addeq	r6,r6,#0x10
+	bne	.Ldec_loop
+	vldmia	r6, {q12}		@ .LISRM0
+	b	.Ldec_loop
+.align	4
+.Ldec_done:
+	vmov.i8	q8,#0x55			@ compose .LBS0
+	vmov.i8	q9,#0x33			@ compose .LBS1
+	vshr.u64	q10, q3, #1
+	vshr.u64	q11, q2, #1
+	veor	q10, q10, q5
+	veor	q11, q11, q7
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #1
+	veor	q7, q7, q11
+	vshl.u64	q11, q11, #1
+	veor	q3, q3, q10
+	veor	q2, q2, q11
+	vshr.u64	q10, q6, #1
+	vshr.u64	q11, q0, #1
+	veor	q10, q10, q4
+	veor	q11, q11, q1
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q4, q4, q10
+	vshl.u64	q10, q10, #1
+	veor	q1, q1, q11
+	vshl.u64	q11, q11, #1
+	veor	q6, q6, q10
+	veor	q0, q0, q11
+	vmov.i8	q8,#0x0f			@ compose .LBS2
+	vshr.u64	q10, q7, #2
+	vshr.u64	q11, q2, #2
+	veor	q10, q10, q5
+	veor	q11, q11, q3
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #2
+	veor	q3, q3, q11
+	vshl.u64	q11, q11, #2
+	veor	q7, q7, q10
+	veor	q2, q2, q11
+	vshr.u64	q10, q1, #2
+	vshr.u64	q11, q0, #2
+	veor	q10, q10, q4
+	veor	q11, q11, q6
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q4, q4, q10
+	vshl.u64	q10, q10, #2
+	veor	q6, q6, q11
+	vshl.u64	q11, q11, #2
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vshr.u64	q10, q4, #4
+	vshr.u64	q11, q6, #4
+	veor	q10, q10, q5
+	veor	q11, q11, q3
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #4
+	veor	q3, q3, q11
+	vshl.u64	q11, q11, #4
+	veor	q4, q4, q10
+	veor	q6, q6, q11
+	vshr.u64	q10, q1, #4
+	vshr.u64	q11, q0, #4
+	veor	q10, q10, q7
+	veor	q11, q11, q2
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #4
+	veor	q2, q2, q11
+	vshl.u64	q11, q11, #4
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vldmia	r4, {q8}			@ last round key
+	veor	q6, q6, q8
+	veor	q4, q4, q8
+	veor	q2, q2, q8
+	veor	q7, q7, q8
+	veor	q3, q3, q8
+	veor	q5, q5, q8
+	veor	q0, q0, q8
+	veor	q1, q1, q8
+	bx	lr
+.size	_bsaes_decrypt8,.-_bsaes_decrypt8
+
+.type	_bsaes_const,%object
+.align	6
+_bsaes_const:
+.LM0ISR:@ InvShiftRows constants
+.quad	0x0a0e0206070b0f03, 0x0004080c0d010509
+.LISR:
+.quad	0x0504070602010003, 0x0f0e0d0c080b0a09
+.LISRM0:
+.quad	0x01040b0e0205080f, 0x0306090c00070a0d
+.LM0SR:@ ShiftRows constants
+.quad	0x0a0e02060f03070b, 0x0004080c05090d01
+.LSR:
+.quad	0x0504070600030201, 0x0f0e0d0c0a09080b
+.LSRM0:
+.quad	0x0304090e00050a0f, 0x01060b0c0207080d
+.LM0:
+.quad	0x02060a0e03070b0f, 0x0004080c0105090d
+.LREVM0SR:
+.quad	0x090d01050c000408, 0x03070b0f060a0e02
+.byte	66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	6
+.size	_bsaes_const,.-_bsaes_const
+
+.type	_bsaes_encrypt8,%function
+.align	4
+_bsaes_encrypt8:
+	adr	r6,_bsaes_encrypt8
+	vldmia	r4!, {q9}		@ round 0 key
+#ifdef	__APPLE__
+	adr	r6,.LM0SR
+#else
+	sub	r6,r6,#_bsaes_encrypt8-.LM0SR
+#endif
+
+	vldmia	r6!, {q8}		@ .LM0SR
+_bsaes_encrypt8_alt:
+	veor	q10, q0, q9	@ xor with round0 key
+	veor	q11, q1, q9
+	vtbl.8	d0, {q10}, d16
+	vtbl.8	d1, {q10}, d17
+	veor	q12, q2, q9
+	vtbl.8	d2, {q11}, d16
+	vtbl.8	d3, {q11}, d17
+	veor	q13, q3, q9
+	vtbl.8	d4, {q12}, d16
+	vtbl.8	d5, {q12}, d17
+	veor	q14, q4, q9
+	vtbl.8	d6, {q13}, d16
+	vtbl.8	d7, {q13}, d17
+	veor	q15, q5, q9
+	vtbl.8	d8, {q14}, d16
+	vtbl.8	d9, {q14}, d17
+	veor	q10, q6, q9
+	vtbl.8	d10, {q15}, d16
+	vtbl.8	d11, {q15}, d17
+	veor	q11, q7, q9
+	vtbl.8	d12, {q10}, d16
+	vtbl.8	d13, {q10}, d17
+	vtbl.8	d14, {q11}, d16
+	vtbl.8	d15, {q11}, d17
+_bsaes_encrypt8_bitslice:
+	vmov.i8	q8,#0x55			@ compose .LBS0
+	vmov.i8	q9,#0x33			@ compose .LBS1
+	vshr.u64	q10, q6, #1
+	vshr.u64	q11, q4, #1
+	veor	q10, q10, q7
+	veor	q11, q11, q5
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #1
+	veor	q5, q5, q11
+	vshl.u64	q11, q11, #1
+	veor	q6, q6, q10
+	veor	q4, q4, q11
+	vshr.u64	q10, q2, #1
+	vshr.u64	q11, q0, #1
+	veor	q10, q10, q3
+	veor	q11, q11, q1
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q3, q3, q10
+	vshl.u64	q10, q10, #1
+	veor	q1, q1, q11
+	vshl.u64	q11, q11, #1
+	veor	q2, q2, q10
+	veor	q0, q0, q11
+	vmov.i8	q8,#0x0f			@ compose .LBS2
+	vshr.u64	q10, q5, #2
+	vshr.u64	q11, q4, #2
+	veor	q10, q10, q7
+	veor	q11, q11, q6
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #2
+	veor	q6, q6, q11
+	vshl.u64	q11, q11, #2
+	veor	q5, q5, q10
+	veor	q4, q4, q11
+	vshr.u64	q10, q1, #2
+	vshr.u64	q11, q0, #2
+	veor	q10, q10, q3
+	veor	q11, q11, q2
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q3, q3, q10
+	vshl.u64	q10, q10, #2
+	veor	q2, q2, q11
+	vshl.u64	q11, q11, #2
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vshr.u64	q10, q3, #4
+	vshr.u64	q11, q2, #4
+	veor	q10, q10, q7
+	veor	q11, q11, q6
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #4
+	veor	q6, q6, q11
+	vshl.u64	q11, q11, #4
+	veor	q3, q3, q10
+	veor	q2, q2, q11
+	vshr.u64	q10, q1, #4
+	vshr.u64	q11, q0, #4
+	veor	q10, q10, q5
+	veor	q11, q11, q4
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #4
+	veor	q4, q4, q11
+	vshl.u64	q11, q11, #4
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	sub	r5,r5,#1
+	b	.Lenc_sbox
+.align	4
+.Lenc_loop:
+	vldmia	r4!, {q8,q9,q10,q11}
+	veor	q8, q8, q0
+	veor	q9, q9, q1
+	vtbl.8	d0, {q8}, d24
+	vtbl.8	d1, {q8}, d25
+	vldmia	r4!, {q8}
+	veor	q10, q10, q2
+	vtbl.8	d2, {q9}, d24
+	vtbl.8	d3, {q9}, d25
+	vldmia	r4!, {q9}
+	veor	q11, q11, q3
+	vtbl.8	d4, {q10}, d24
+	vtbl.8	d5, {q10}, d25
+	vldmia	r4!, {q10}
+	vtbl.8	d6, {q11}, d24
+	vtbl.8	d7, {q11}, d25
+	vldmia	r4!, {q11}
+	veor	q8, q8, q4
+	veor	q9, q9, q5
+	vtbl.8	d8, {q8}, d24
+	vtbl.8	d9, {q8}, d25
+	veor	q10, q10, q6
+	vtbl.8	d10, {q9}, d24
+	vtbl.8	d11, {q9}, d25
+	veor	q11, q11, q7
+	vtbl.8	d12, {q10}, d24
+	vtbl.8	d13, {q10}, d25
+	vtbl.8	d14, {q11}, d24
+	vtbl.8	d15, {q11}, d25
+.Lenc_sbox:
+	veor	q2, q2, q1
+	veor	q5, q5, q6
+	veor	q3, q3, q0
+	veor	q6, q6, q2
+	veor	q5, q5, q0
+
+	veor	q6, q6, q3
+	veor	q3, q3, q7
+	veor	q7, q7, q5
+	veor	q3, q3, q4
+	veor	q4, q4, q5
+
+	veor	q2, q2, q7
+	veor	q3, q3, q1
+	veor	q1, q1, q5
+	veor	q11, q7, q4
+	veor	q10, q1, q2
+	veor	q9, q5, q3
+	veor	q13, q2, q4
+	vmov	q8, q10
+	veor	q12, q6, q0
+
+	vorr	q10, q10, q9
+	veor	q15, q11, q8
+	vand	q14, q11, q12
+	vorr	q11, q11, q12
+	veor	q12, q12, q9
+	vand	q8, q8, q9
+	veor	q9, q3, q0
+	vand	q15, q15, q12
+	vand	q13, q13, q9
+	veor	q9, q7, q1
+	veor	q12, q5, q6
+	veor	q11, q11, q13
+	veor	q10, q10, q13
+	vand	q13, q9, q12
+	vorr	q9, q9, q12
+	veor	q11, q11, q15
+	veor	q8, q8, q13
+	veor	q10, q10, q14
+	veor	q9, q9, q15
+	veor	q8, q8, q14
+	vand	q12, q2, q3
+	veor	q9, q9, q14
+	vand	q13, q4, q0
+	vand	q14, q1, q5
+	vorr	q15, q7, q6
+	veor	q11, q11, q12
+	veor	q9, q9, q14
+	veor	q8, q8, q15
+	veor	q10, q10, q13
+
+	@ Inv_GF16 	0, 	1, 	2, 	3, s0, s1, s2, s3
+
+	@ new smaller inversion
+
+	vand	q14, q11, q9
+	vmov	q12, q8
+
+	veor	q13, q10, q14
+	veor	q15, q8, q14
+	veor	q14, q8, q14	@ q14=q15
+
+	vbsl	q13, q9, q8
+	vbsl	q15, q11, q10
+	veor	q11, q11, q10
+
+	vbsl	q12, q13, q14
+	vbsl	q8, q14, q13
+
+	vand	q14, q12, q15
+	veor	q9, q9, q8
+
+	veor	q14, q14, q11
+	veor	q12, q6, q0
+	veor	q8, q5, q3
+	veor	q10, q15, q14
+	vand	q10, q10, q6
+	veor	q6, q6, q5
+	vand	q11, q5, q15
+	vand	q6, q6, q14
+	veor	q5, q11, q10
+	veor	q6, q6, q11
+	veor	q15, q15, q13
+	veor	q14, q14, q9
+	veor	q11, q15, q14
+	veor	q10, q13, q9
+	vand	q11, q11, q12
+	vand	q10, q10, q0
+	veor	q12, q12, q8
+	veor	q0, q0, q3
+	vand	q8, q8, q15
+	vand	q3, q3, q13
+	vand	q12, q12, q14
+	vand	q0, q0, q9
+	veor	q8, q8, q12
+	veor	q0, q0, q3
+	veor	q12, q12, q11
+	veor	q3, q3, q10
+	veor	q6, q6, q12
+	veor	q0, q0, q12
+	veor	q5, q5, q8
+	veor	q3, q3, q8
+
+	veor	q12, q7, q4
+	veor	q8, q1, q2
+	veor	q11, q15, q14
+	veor	q10, q13, q9
+	vand	q11, q11, q12
+	vand	q10, q10, q4
+	veor	q12, q12, q8
+	veor	q4, q4, q2
+	vand	q8, q8, q15
+	vand	q2, q2, q13
+	vand	q12, q12, q14
+	vand	q4, q4, q9
+	veor	q8, q8, q12
+	veor	q4, q4, q2
+	veor	q12, q12, q11
+	veor	q2, q2, q10
+	veor	q15, q15, q13
+	veor	q14, q14, q9
+	veor	q10, q15, q14
+	vand	q10, q10, q7
+	veor	q7, q7, q1
+	vand	q11, q1, q15
+	vand	q7, q7, q14
+	veor	q1, q11, q10
+	veor	q7, q7, q11
+	veor	q7, q7, q12
+	veor	q4, q4, q12
+	veor	q1, q1, q8
+	veor	q2, q2, q8
+	veor	q7, q7, q0
+	veor	q1, q1, q6
+	veor	q6, q6, q0
+	veor	q4, q4, q7
+	veor	q0, q0, q1
+
+	veor	q1, q1, q5
+	veor	q5, q5, q2
+	veor	q2, q2, q3
+	veor	q3, q3, q5
+	veor	q4, q4, q5
+
+	veor	q6, q6, q3
+	subs	r5,r5,#1
+	bcc	.Lenc_done
+	vext.8	q8, q0, q0, #12	@ x0 <<< 32
+	vext.8	q9, q1, q1, #12
+	veor	q0, q0, q8		@ x0 ^ (x0 <<< 32)
+	vext.8	q10, q4, q4, #12
+	veor	q1, q1, q9
+	vext.8	q11, q6, q6, #12
+	veor	q4, q4, q10
+	vext.8	q12, q3, q3, #12
+	veor	q6, q6, q11
+	vext.8	q13, q7, q7, #12
+	veor	q3, q3, q12
+	vext.8	q14, q2, q2, #12
+	veor	q7, q7, q13
+	vext.8	q15, q5, q5, #12
+	veor	q2, q2, q14
+
+	veor	q9, q9, q0
+	veor	q5, q5, q15
+	vext.8	q0, q0, q0, #8		@ (x0 ^ (x0 <<< 32)) <<< 64)
+	veor	q10, q10, q1
+	veor	q8, q8, q5
+	veor	q9, q9, q5
+	vext.8	q1, q1, q1, #8
+	veor	q13, q13, q3
+	veor	q0, q0, q8
+	veor	q14, q14, q7
+	veor	q1, q1, q9
+	vext.8	q8, q3, q3, #8
+	veor	q12, q12, q6
+	vext.8	q9, q7, q7, #8
+	veor	q15, q15, q2
+	vext.8	q3, q6, q6, #8
+	veor	q11, q11, q4
+	vext.8	q7, q5, q5, #8
+	veor	q12, q12, q5
+	vext.8	q6, q2, q2, #8
+	veor	q11, q11, q5
+	vext.8	q2, q4, q4, #8
+	veor	q5, q9, q13
+	veor	q4, q8, q12
+	veor	q3, q3, q11
+	veor	q7, q7, q15
+	veor	q6, q6, q14
+	 @ vmov	q4, q8
+	veor	q2, q2, q10
+	 @ vmov	q5, q9
+	vldmia	r6, {q12}		@ .LSR
+	ite	eq				@ Thumb2 thing, samity check in ARM
+	addeq	r6,r6,#0x10
+	bne	.Lenc_loop
+	vldmia	r6, {q12}		@ .LSRM0
+	b	.Lenc_loop
+.align	4
+.Lenc_done:
+	vmov.i8	q8,#0x55			@ compose .LBS0
+	vmov.i8	q9,#0x33			@ compose .LBS1
+	vshr.u64	q10, q2, #1
+	vshr.u64	q11, q3, #1
+	veor	q10, q10, q5
+	veor	q11, q11, q7
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #1
+	veor	q7, q7, q11
+	vshl.u64	q11, q11, #1
+	veor	q2, q2, q10
+	veor	q3, q3, q11
+	vshr.u64	q10, q4, #1
+	vshr.u64	q11, q0, #1
+	veor	q10, q10, q6
+	veor	q11, q11, q1
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q6, q6, q10
+	vshl.u64	q10, q10, #1
+	veor	q1, q1, q11
+	vshl.u64	q11, q11, #1
+	veor	q4, q4, q10
+	veor	q0, q0, q11
+	vmov.i8	q8,#0x0f			@ compose .LBS2
+	vshr.u64	q10, q7, #2
+	vshr.u64	q11, q3, #2
+	veor	q10, q10, q5
+	veor	q11, q11, q2
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #2
+	veor	q2, q2, q11
+	vshl.u64	q11, q11, #2
+	veor	q7, q7, q10
+	veor	q3, q3, q11
+	vshr.u64	q10, q1, #2
+	vshr.u64	q11, q0, #2
+	veor	q10, q10, q6
+	veor	q11, q11, q4
+	vand	q10, q10, q9
+	vand	q11, q11, q9
+	veor	q6, q6, q10
+	vshl.u64	q10, q10, #2
+	veor	q4, q4, q11
+	vshl.u64	q11, q11, #2
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vshr.u64	q10, q6, #4
+	vshr.u64	q11, q4, #4
+	veor	q10, q10, q5
+	veor	q11, q11, q2
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q5, q5, q10
+	vshl.u64	q10, q10, #4
+	veor	q2, q2, q11
+	vshl.u64	q11, q11, #4
+	veor	q6, q6, q10
+	veor	q4, q4, q11
+	vshr.u64	q10, q1, #4
+	vshr.u64	q11, q0, #4
+	veor	q10, q10, q7
+	veor	q11, q11, q3
+	vand	q10, q10, q8
+	vand	q11, q11, q8
+	veor	q7, q7, q10
+	vshl.u64	q10, q10, #4
+	veor	q3, q3, q11
+	vshl.u64	q11, q11, #4
+	veor	q1, q1, q10
+	veor	q0, q0, q11
+	vldmia	r4, {q8}			@ last round key
+	veor	q4, q4, q8
+	veor	q6, q6, q8
+	veor	q3, q3, q8
+	veor	q7, q7, q8
+	veor	q2, q2, q8
+	veor	q5, q5, q8
+	veor	q0, q0, q8
+	veor	q1, q1, q8
+	bx	lr
+.size	_bsaes_encrypt8,.-_bsaes_encrypt8
+.type	_bsaes_key_convert,%function
+.align	4
+_bsaes_key_convert:
+	adr	r6,_bsaes_key_convert
+	vld1.8	{q7},  [r4]!		@ load round 0 key
+#ifdef	__APPLE__
+	adr	r6,.LM0
+#else
+	sub	r6,r6,#_bsaes_key_convert-.LM0
+#endif
+	vld1.8	{q15}, [r4]!		@ load round 1 key
+
+	vmov.i8	q8,  #0x01			@ bit masks
+	vmov.i8	q9,  #0x02
+	vmov.i8	q10, #0x04
+	vmov.i8	q11, #0x08
+	vmov.i8	q12, #0x10
+	vmov.i8	q13, #0x20
+	vldmia	r6, {q14}		@ .LM0
+
+#ifdef __ARMEL__
+	vrev32.8	q7,  q7
+	vrev32.8	q15, q15
+#endif
+	sub	r5,r5,#1
+	vstmia	r12!, {q7}		@ save round 0 key
+	b	.Lkey_loop
+
+.align	4
+.Lkey_loop:
+	vtbl.8	d14,{q15},d28
+	vtbl.8	d15,{q15},d29
+	vmov.i8	q6,  #0x40
+	vmov.i8	q15, #0x80
+
+	vtst.8	q0, q7, q8
+	vtst.8	q1, q7, q9
+	vtst.8	q2, q7, q10
+	vtst.8	q3, q7, q11
+	vtst.8	q4, q7, q12
+	vtst.8	q5, q7, q13
+	vtst.8	q6, q7, q6
+	vtst.8	q7, q7, q15
+	vld1.8	{q15}, [r4]!		@ load next round key
+	vmvn	q0, q0		@ "pnot"
+	vmvn	q1, q1
+	vmvn	q5, q5
+	vmvn	q6, q6
+#ifdef __ARMEL__
+	vrev32.8	q15, q15
+#endif
+	subs	r5,r5,#1
+	vstmia	r12!,{q0,q1,q2,q3,q4,q5,q6,q7}		@ write bit-sliced round key
+	bne	.Lkey_loop
+
+	vmov.i8	q7,#0x63			@ compose .L63
+	@ don't save last round key
+	bx	lr
+.size	_bsaes_key_convert,.-_bsaes_key_convert
+
+
+
+.globl	bsaes_cbc_encrypt
+.hidden	bsaes_cbc_encrypt
+.type	bsaes_cbc_encrypt,%function
+.align	5
+bsaes_cbc_encrypt:
+#ifndef	__KERNEL__
+	cmp	r2, #128
+#ifndef	__thumb__
+	blo	AES_cbc_encrypt
+#else
+	bhs	1f
+	b	AES_cbc_encrypt
+1:
+#endif
+#endif
+
+	@ it is up to the caller to make sure we are called with enc == 0
+
+	mov	ip, sp
+	stmdb	sp!, {r4,r5,r6,r7,r8,r9,r10, lr}
+	VFP_ABI_PUSH
+	ldr	r8, [ip]			@ IV is 1st arg on the stack
+	mov	r2, r2, lsr#4		@ len in 16 byte blocks
+	sub	sp, #0x10			@ scratch space to carry over the IV
+	mov	r9, sp				@ save sp
+
+	ldr	r10, [r3, #240]		@ get # of rounds
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	@ allocate the key schedule on the stack
+	sub	r12, sp, r10, lsl#7		@ 128 bytes per inner round key
+	add	r12, #96			@ sifze of bit-slices key schedule
+
+	@ populate the key schedule
+	mov	r4, r3			@ pass key
+	mov	r5, r10			@ pass # of rounds
+	mov	sp, r12				@ sp is sp
+	bl	_bsaes_key_convert
+	vldmia	sp, {q6}
+	vstmia	r12,  {q15}		@ save last round key
+	veor	q7, q7, q6	@ fix up round 0 key
+	vstmia	sp, {q7}
+#else
+	ldr	r12, [r3, #244]
+	eors	r12, #1
+	beq	0f
+
+	@ populate the key schedule
+	str	r12, [r3, #244]
+	mov	r4, r3			@ pass key
+	mov	r5, r10			@ pass # of rounds
+	add	r12, r3, #248			@ pass key schedule
+	bl	_bsaes_key_convert
+	add	r4, r3, #248
+	vldmia	r4, {q6}
+	vstmia	r12, {q15}			@ save last round key
+	veor	q7, q7, q6	@ fix up round 0 key
+	vstmia	r4, {q7}
+
+.align	2
+
+#endif
+
+	vld1.8	{q15}, [r8]		@ load IV
+	b	.Lcbc_dec_loop
+
+.align	4
+.Lcbc_dec_loop:
+	subs	r2, r2, #0x8
+	bmi	.Lcbc_dec_loop_finish
+
+	vld1.8	{q0,q1}, [r0]!	@ load input
+	vld1.8	{q2,q3}, [r0]!
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	mov	r4, sp			@ pass the key
+#else
+	add	r4, r3, #248
+#endif
+	vld1.8	{q4,q5}, [r0]!
+	mov	r5, r10
+	vld1.8	{q6,q7}, [r0]
+	sub	r0, r0, #0x60
+	vstmia	r9, {q15}			@ put aside IV
+
+	bl	_bsaes_decrypt8
+
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q10,q11}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vld1.8	{q12,q13}, [r0]!
+	veor	q4, q4, q10
+	veor	q2, q2, q11
+	vld1.8	{q14,q15}, [r0]!
+	veor	q7, q7, q12
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	veor	q3, q3, q13
+	vst1.8	{q6}, [r1]!
+	veor	q5, q5, q14
+	vst1.8	{q4}, [r1]!
+	vst1.8	{q2}, [r1]!
+	vst1.8	{q7}, [r1]!
+	vst1.8	{q3}, [r1]!
+	vst1.8	{q5}, [r1]!
+
+	b	.Lcbc_dec_loop
+
+.Lcbc_dec_loop_finish:
+	adds	r2, r2, #8
+	beq	.Lcbc_dec_done
+
+	vld1.8	{q0}, [r0]!		@ load input
+	cmp	r2, #2
+	blo	.Lcbc_dec_one
+	vld1.8	{q1}, [r0]!
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	mov	r4, sp			@ pass the key
+#else
+	add	r4, r3, #248
+#endif
+	mov	r5, r10
+	vstmia	r9, {q15}			@ put aside IV
+	beq	.Lcbc_dec_two
+	vld1.8	{q2}, [r0]!
+	cmp	r2, #4
+	blo	.Lcbc_dec_three
+	vld1.8	{q3}, [r0]!
+	beq	.Lcbc_dec_four
+	vld1.8	{q4}, [r0]!
+	cmp	r2, #6
+	blo	.Lcbc_dec_five
+	vld1.8	{q5}, [r0]!
+	beq	.Lcbc_dec_six
+	vld1.8	{q6}, [r0]!
+	sub	r0, r0, #0x70
+
+	bl	_bsaes_decrypt8
+
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q10,q11}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vld1.8	{q12,q13}, [r0]!
+	veor	q4, q4, q10
+	veor	q2, q2, q11
+	vld1.8	{q15}, [r0]!
+	veor	q7, q7, q12
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	veor	q3, q3, q13
+	vst1.8	{q6}, [r1]!
+	vst1.8	{q4}, [r1]!
+	vst1.8	{q2}, [r1]!
+	vst1.8	{q7}, [r1]!
+	vst1.8	{q3}, [r1]!
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_six:
+	sub	r0, r0, #0x60
+	bl	_bsaes_decrypt8
+	vldmia	r9,{q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q10,q11}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vld1.8	{q12}, [r0]!
+	veor	q4, q4, q10
+	veor	q2, q2, q11
+	vld1.8	{q15}, [r0]!
+	veor	q7, q7, q12
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	vst1.8	{q6}, [r1]!
+	vst1.8	{q4}, [r1]!
+	vst1.8	{q2}, [r1]!
+	vst1.8	{q7}, [r1]!
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_five:
+	sub	r0, r0, #0x50
+	bl	_bsaes_decrypt8
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q10,q11}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vld1.8	{q15}, [r0]!
+	veor	q4, q4, q10
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	veor	q2, q2, q11
+	vst1.8	{q6}, [r1]!
+	vst1.8	{q4}, [r1]!
+	vst1.8	{q2}, [r1]!
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_four:
+	sub	r0, r0, #0x40
+	bl	_bsaes_decrypt8
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q10}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vld1.8	{q15}, [r0]!
+	veor	q4, q4, q10
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	vst1.8	{q6}, [r1]!
+	vst1.8	{q4}, [r1]!
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_three:
+	sub	r0, r0, #0x30
+	bl	_bsaes_decrypt8
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8,q9}, [r0]!	@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q15}, [r0]!
+	veor	q1, q1, q8
+	veor	q6, q6, q9
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	vst1.8	{q6}, [r1]!
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_two:
+	sub	r0, r0, #0x20
+	bl	_bsaes_decrypt8
+	vldmia	r9, {q14}			@ reload IV
+	vld1.8	{q8}, [r0]!		@ reload input
+	veor	q0, q0, q14	@ ^= IV
+	vld1.8	{q15}, [r0]!		@ reload input
+	veor	q1, q1, q8
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	b	.Lcbc_dec_done
+.align	4
+.Lcbc_dec_one:
+	sub	r0, r0, #0x10
+	mov	r10, r1			@ save original out pointer
+	mov	r1, r9			@ use the iv scratch space as out buffer
+	mov	r2, r3
+	vmov	q4,q15		@ just in case ensure that IV
+	vmov	q5,q0			@ and input are preserved
+	bl	AES_decrypt
+	vld1.8	{q0}, [r9,:64]		@ load result
+	veor	q0, q0, q4	@ ^= IV
+	vmov	q15, q5		@ q5 holds input
+	vst1.8	{q0}, [r10]		@ write output
+
+.Lcbc_dec_done:
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	vmov.i32	q0, #0
+	vmov.i32	q1, #0
+.Lcbc_dec_bzero:@ wipe key schedule [if any]
+	vstmia	sp!, {q0,q1}
+	cmp	sp, r9
+	bne	.Lcbc_dec_bzero
+#endif
+
+	mov	sp, r9
+	add	sp, #0x10			@ add sp,r9,#0x10 is no good for thumb
+	vst1.8	{q15}, [r8]		@ return IV
+	VFP_ABI_POP
+	ldmia	sp!, {r4,r5,r6,r7,r8,r9,r10, pc}
+.size	bsaes_cbc_encrypt,.-bsaes_cbc_encrypt
+
+.globl	bsaes_ctr32_encrypt_blocks
+.hidden	bsaes_ctr32_encrypt_blocks
+.type	bsaes_ctr32_encrypt_blocks,%function
+.align	5
+bsaes_ctr32_encrypt_blocks:
+	cmp	r2, #8			@ use plain AES for
+	blo	.Lctr_enc_short			@ small sizes
+
+	mov	ip, sp
+	stmdb	sp!, {r4,r5,r6,r7,r8,r9,r10, lr}
+	VFP_ABI_PUSH
+	ldr	r8, [ip]			@ ctr is 1st arg on the stack
+	sub	sp, sp, #0x10			@ scratch space to carry over the ctr
+	mov	r9, sp				@ save sp
+
+	ldr	r10, [r3, #240]		@ get # of rounds
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	@ allocate the key schedule on the stack
+	sub	r12, sp, r10, lsl#7		@ 128 bytes per inner round key
+	add	r12, #96			@ size of bit-sliced key schedule
+
+	@ populate the key schedule
+	mov	r4, r3			@ pass key
+	mov	r5, r10			@ pass # of rounds
+	mov	sp, r12				@ sp is sp
+	bl	_bsaes_key_convert
+	veor	q7,q7,q15	@ fix up last round key
+	vstmia	r12, {q7}			@ save last round key
+
+	vld1.8	{q0}, [r8]		@ load counter
+#ifdef	__APPLE__
+	mov	r8, #:lower16:(.LREVM0SR-.LM0)
+	add	r8, r6, r8
+#else
+	add	r8, r6, #.LREVM0SR-.LM0	@ borrow r8
+#endif
+	vldmia	sp, {q4}		@ load round0 key
+#else
+	ldr	r12, [r3, #244]
+	eors	r12, #1
+	beq	0f
+
+	@ populate the key schedule
+	str	r12, [r3, #244]
+	mov	r4, r3			@ pass key
+	mov	r5, r10			@ pass # of rounds
+	add	r12, r3, #248			@ pass key schedule
+	bl	_bsaes_key_convert
+	veor	q7,q7,q15	@ fix up last round key
+	vstmia	r12, {q7}			@ save last round key
+
+.align	2
+	add	r12, r3, #248
+	vld1.8	{q0}, [r8]		@ load counter
+	adrl	r8, .LREVM0SR			@ borrow r8
+	vldmia	r12, {q4}			@ load round0 key
+	sub	sp, #0x10			@ place for adjusted round0 key
+#endif
+
+	vmov.i32	q8,#1		@ compose 1<<96
+	veor	q9,q9,q9
+	vrev32.8	q0,q0
+	vext.8	q8,q9,q8,#4
+	vrev32.8	q4,q4
+	vadd.u32	q9,q8,q8	@ compose 2<<96
+	vstmia	sp, {q4}		@ save adjusted round0 key
+	b	.Lctr_enc_loop
+
+.align	4
+.Lctr_enc_loop:
+	vadd.u32	q10, q8, q9	@ compose 3<<96
+	vadd.u32	q1, q0, q8	@ +1
+	vadd.u32	q2, q0, q9	@ +2
+	vadd.u32	q3, q0, q10	@ +3
+	vadd.u32	q4, q1, q10
+	vadd.u32	q5, q2, q10
+	vadd.u32	q6, q3, q10
+	vadd.u32	q7, q4, q10
+	vadd.u32	q10, q5, q10	@ next counter
+
+	@ Borrow prologue from _bsaes_encrypt8 to use the opportunity
+	@ to flip byte order in 32-bit counter
+
+	vldmia	sp, {q9}		@ load round0 key
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x10		@ pass next round key
+#else
+	add	r4, r3, #264
+#endif
+	vldmia	r8, {q8}			@ .LREVM0SR
+	mov	r5, r10			@ pass rounds
+	vstmia	r9, {q10}			@ save next counter
+#ifdef	__APPLE__
+	mov	r6, #:lower16:(.LREVM0SR-.LSR)
+	sub	r6, r8, r6
+#else
+	sub	r6, r8, #.LREVM0SR-.LSR	@ pass constants
+#endif
+
+	bl	_bsaes_encrypt8_alt
+
+	subs	r2, r2, #8
+	blo	.Lctr_enc_loop_done
+
+	vld1.8	{q8,q9}, [r0]!	@ load input
+	vld1.8	{q10,q11}, [r0]!
+	veor	q0, q8
+	veor	q1, q9
+	vld1.8	{q12,q13}, [r0]!
+	veor	q4, q10
+	veor	q6, q11
+	vld1.8	{q14,q15}, [r0]!
+	veor	q3, q12
+	vst1.8	{q0,q1}, [r1]!	@ write output
+	veor	q7, q13
+	veor	q2, q14
+	vst1.8	{q4}, [r1]!
+	veor	q5, q15
+	vst1.8	{q6}, [r1]!
+	vmov.i32	q8, #1			@ compose 1<<96
+	vst1.8	{q3}, [r1]!
+	veor	q9, q9, q9
+	vst1.8	{q7}, [r1]!
+	vext.8	q8, q9, q8, #4
+	vst1.8	{q2}, [r1]!
+	vadd.u32	q9,q8,q8		@ compose 2<<96
+	vst1.8	{q5}, [r1]!
+	vldmia	r9, {q0}			@ load counter
+
+	bne	.Lctr_enc_loop
+	b	.Lctr_enc_done
+
+.align	4
+.Lctr_enc_loop_done:
+	add	r2, r2, #8
+	vld1.8	{q8}, [r0]!	@ load input
+	veor	q0, q8
+	vst1.8	{q0}, [r1]!	@ write output
+	cmp	r2, #2
+	blo	.Lctr_enc_done
+	vld1.8	{q9}, [r0]!
+	veor	q1, q9
+	vst1.8	{q1}, [r1]!
+	beq	.Lctr_enc_done
+	vld1.8	{q10}, [r0]!
+	veor	q4, q10
+	vst1.8	{q4}, [r1]!
+	cmp	r2, #4
+	blo	.Lctr_enc_done
+	vld1.8	{q11}, [r0]!
+	veor	q6, q11
+	vst1.8	{q6}, [r1]!
+	beq	.Lctr_enc_done
+	vld1.8	{q12}, [r0]!
+	veor	q3, q12
+	vst1.8	{q3}, [r1]!
+	cmp	r2, #6
+	blo	.Lctr_enc_done
+	vld1.8	{q13}, [r0]!
+	veor	q7, q13
+	vst1.8	{q7}, [r1]!
+	beq	.Lctr_enc_done
+	vld1.8	{q14}, [r0]
+	veor	q2, q14
+	vst1.8	{q2}, [r1]!
+
+.Lctr_enc_done:
+	vmov.i32	q0, #0
+	vmov.i32	q1, #0
+#ifndef	BSAES_ASM_EXTENDED_KEY
+.Lctr_enc_bzero:@ wipe key schedule [if any]
+	vstmia	sp!, {q0,q1}
+	cmp	sp, r9
+	bne	.Lctr_enc_bzero
+#else
+	vstmia	sp, {q0,q1}
+#endif
+
+	mov	sp, r9
+	add	sp, #0x10		@ add sp,r9,#0x10 is no good for thumb
+	VFP_ABI_POP
+	ldmia	sp!, {r4,r5,r6,r7,r8,r9,r10, pc}	@ return
+
+.align	4
+.Lctr_enc_short:
+	ldr	ip, [sp]		@ ctr pointer is passed on stack
+	stmdb	sp!, {r4,r5,r6,r7,r8, lr}
+
+	mov	r4, r0		@ copy arguments
+	mov	r5, r1
+	mov	r6, r2
+	mov	r7, r3
+	ldr	r8, [ip, #12]		@ load counter .LSW
+	vld1.8	{q1}, [ip]		@ load whole counter value
+#ifdef __ARMEL__
+	rev	r8, r8
+#endif
+	sub	sp, sp, #0x10
+	vst1.8	{q1}, [sp]		@ copy counter value
+	sub	sp, sp, #0x10
+
+.Lctr_enc_short_loop:
+	add	r0, sp, #0x10		@ input counter value
+	mov	r1, sp			@ output on the stack
+	mov	r2, r7			@ key
+
+	bl	AES_encrypt
+
+	vld1.8	{q0}, [r4]!	@ load input
+	vld1.8	{q1}, [sp]		@ load encrypted counter
+	add	r8, r8, #1
+#ifdef __ARMEL__
+	rev	r0, r8
+	str	r0, [sp, #0x1c]		@ next counter value
+#else
+	str	r8, [sp, #0x1c]		@ next counter value
+#endif
+	veor	q0,q0,q1
+	vst1.8	{q0}, [r5]!	@ store output
+	subs	r6, r6, #1
+	bne	.Lctr_enc_short_loop
+
+	vmov.i32	q0, #0
+	vmov.i32	q1, #0
+	vstmia	sp!, {q0,q1}
+
+	ldmia	sp!, {r4,r5,r6,r7,r8, pc}
+.size	bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks
+.globl	bsaes_xts_encrypt
+.hidden	bsaes_xts_encrypt
+.type	bsaes_xts_encrypt,%function
+.align	4
+bsaes_xts_encrypt:
+	mov	ip, sp
+	stmdb	sp!, {r4,r5,r6,r7,r8,r9,r10, lr}		@ 0x20
+	VFP_ABI_PUSH
+	mov	r6, sp				@ future r3
+
+	mov	r7, r0
+	mov	r8, r1
+	mov	r9, r2
+	mov	r10, r3
+
+	sub	r0, sp, #0x10			@ 0x10
+	bic	r0, #0xf			@ align at 16 bytes
+	mov	sp, r0
+
+#ifdef	XTS_CHAIN_TWEAK
+	ldr	r0, [ip]			@ pointer to input tweak
+#else
+	@ generate initial tweak
+	ldr	r0, [ip, #4]			@ iv[]
+	mov	r1, sp
+	ldr	r2, [ip, #0]			@ key2
+	bl	AES_encrypt
+	mov	r0,sp				@ pointer to initial tweak
+#endif
+
+	ldr	r1, [r10, #240]		@ get # of rounds
+	mov	r3, r6
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	@ allocate the key schedule on the stack
+	sub	r12, sp, r1, lsl#7		@ 128 bytes per inner round key
+	@ add	r12, #96			@ size of bit-sliced key schedule
+	sub	r12, #48			@ place for tweak[9]
+
+	@ populate the key schedule
+	mov	r4, r10			@ pass key
+	mov	r5, r1			@ pass # of rounds
+	mov	sp, r12
+	add	r12, #0x90			@ pass key schedule
+	bl	_bsaes_key_convert
+	veor	q7, q7, q15	@ fix up last round key
+	vstmia	r12, {q7}			@ save last round key
+#else
+	ldr	r12, [r10, #244]
+	eors	r12, #1
+	beq	0f
+
+	str	r12, [r10, #244]
+	mov	r4, r10			@ pass key
+	mov	r5, r1			@ pass # of rounds
+	add	r12, r10, #248			@ pass key schedule
+	bl	_bsaes_key_convert
+	veor	q7, q7, q15	@ fix up last round key
+	vstmia	r12, {q7}
+
+.align	2
+	sub	sp, #0x90			@ place for tweak[9]
+#endif
+
+	vld1.8	{q8}, [r0]			@ initial tweak
+	adr	r2, .Lxts_magic
+
+	subs	r9, #0x80
+	blo	.Lxts_enc_short
+	b	.Lxts_enc_loop
+
+.align	4
+.Lxts_enc_loop:
+	vldmia	r2, {q5}	@ load XTS magic
+	vshr.s64	q6, q8, #63
+	mov	r0, sp
+	vand	q6, q6, q5
+	vadd.u64	q9, q8, q8
+	vst1.64	{q8}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q9, #63
+	veor	q9, q9, q6
+	vand	q7, q7, q5
+	vadd.u64	q10, q9, q9
+	vst1.64	{q9}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q10, #63
+	veor	q10, q10, q7
+	vand	q6, q6, q5
+	vld1.8	{q0}, [r7]!
+	vadd.u64	q11, q10, q10
+	vst1.64	{q10}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q11, #63
+	veor	q11, q11, q6
+	vand	q7, q7, q5
+	vld1.8	{q1}, [r7]!
+	veor	q0, q0, q8
+	vadd.u64	q12, q11, q11
+	vst1.64	{q11}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q12, #63
+	veor	q12, q12, q7
+	vand	q6, q6, q5
+	vld1.8	{q2}, [r7]!
+	veor	q1, q1, q9
+	vadd.u64	q13, q12, q12
+	vst1.64	{q12}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q13, #63
+	veor	q13, q13, q6
+	vand	q7, q7, q5
+	vld1.8	{q3}, [r7]!
+	veor	q2, q2, q10
+	vadd.u64	q14, q13, q13
+	vst1.64	{q13}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q14, #63
+	veor	q14, q14, q7
+	vand	q6, q6, q5
+	vld1.8	{q4}, [r7]!
+	veor	q3, q3, q11
+	vadd.u64	q15, q14, q14
+	vst1.64	{q14}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q15, #63
+	veor	q15, q15, q6
+	vand	q7, q7, q5
+	vld1.8	{q5}, [r7]!
+	veor	q4, q4, q12
+	vadd.u64	q8, q15, q15
+	vst1.64	{q15}, [r0,:128]!
+	vswp	d15,d14
+	veor	q8, q8, q7
+	vst1.64	{q8}, [r0,:128]		@ next round tweak
+
+	vld1.8	{q6,q7}, [r7]!
+	veor	q5, q5, q13
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q6, q6, q14
+	mov	r5, r1			@ pass rounds
+	veor	q7, q7, q15
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q6, q11
+	vld1.64	{q14,q15}, [r0,:128]!
+	veor	q10, q3, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	veor	q12, q2, q14
+	vst1.8	{q10,q11}, [r8]!
+	veor	q13, q5, q15
+	vst1.8	{q12,q13}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+
+	subs	r9, #0x80
+	bpl	.Lxts_enc_loop
+
+.Lxts_enc_short:
+	adds	r9, #0x70
+	bmi	.Lxts_enc_done
+
+	vldmia	r2, {q5}	@ load XTS magic
+	vshr.s64	q7, q8, #63
+	mov	r0, sp
+	vand	q7, q7, q5
+	vadd.u64	q9, q8, q8
+	vst1.64	{q8}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q9, #63
+	veor	q9, q9, q7
+	vand	q6, q6, q5
+	vadd.u64	q10, q9, q9
+	vst1.64	{q9}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q10, #63
+	veor	q10, q10, q6
+	vand	q7, q7, q5
+	vld1.8	{q0}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_1
+	vadd.u64	q11, q10, q10
+	vst1.64	{q10}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q11, #63
+	veor	q11, q11, q7
+	vand	q6, q6, q5
+	vld1.8	{q1}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_2
+	veor	q0, q0, q8
+	vadd.u64	q12, q11, q11
+	vst1.64	{q11}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q12, #63
+	veor	q12, q12, q6
+	vand	q7, q7, q5
+	vld1.8	{q2}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_3
+	veor	q1, q1, q9
+	vadd.u64	q13, q12, q12
+	vst1.64	{q12}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q13, #63
+	veor	q13, q13, q7
+	vand	q6, q6, q5
+	vld1.8	{q3}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_4
+	veor	q2, q2, q10
+	vadd.u64	q14, q13, q13
+	vst1.64	{q13}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q14, #63
+	veor	q14, q14, q6
+	vand	q7, q7, q5
+	vld1.8	{q4}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_5
+	veor	q3, q3, q11
+	vadd.u64	q15, q14, q14
+	vst1.64	{q14}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q15, #63
+	veor	q15, q15, q7
+	vand	q6, q6, q5
+	vld1.8	{q5}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_enc_6
+	veor	q4, q4, q12
+	sub	r9, #0x10
+	vst1.64	{q15}, [r0,:128]		@ next round tweak
+
+	vld1.8	{q6}, [r7]!
+	veor	q5, q5, q13
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q6, q6, q14
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q6, q11
+	vld1.64	{q14}, [r0,:128]!
+	veor	q10, q3, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	veor	q12, q2, q14
+	vst1.8	{q10,q11}, [r8]!
+	vst1.8	{q12}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+.align	4
+.Lxts_enc_6:
+	vst1.64	{q14}, [r0,:128]		@ next round tweak
+
+	veor	q4, q4, q12
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q5, q5, q13
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q6, q11
+	veor	q10, q3, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	vst1.8	{q10,q11}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+
+@ put this in range for both ARM and Thumb mode adr instructions
+.align	5
+.Lxts_magic:
+.quad	1, 0x87
+
+.align	5
+.Lxts_enc_5:
+	vst1.64	{q13}, [r0,:128]		@ next round tweak
+
+	veor	q3, q3, q11
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q4, q4, q12
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q6, q11
+	veor	q10, q3, q12
+	vst1.8	{q8,q9}, [r8]!
+	vst1.8	{q10}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+.align	4
+.Lxts_enc_4:
+	vst1.64	{q12}, [r0,:128]		@ next round tweak
+
+	veor	q2, q2, q10
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q3, q3, q11
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q6, q11
+	vst1.8	{q8,q9}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+.align	4
+.Lxts_enc_3:
+	vst1.64	{q11}, [r0,:128]		@ next round tweak
+
+	veor	q1, q1, q9
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q2, q2, q10
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	veor	q8, q4, q10
+	vst1.8	{q0,q1}, [r8]!
+	vst1.8	{q8}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+.align	4
+.Lxts_enc_2:
+	vst1.64	{q10}, [r0,:128]		@ next round tweak
+
+	veor	q0, q0, q8
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q1, q1, q9
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_encrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	vst1.8	{q0,q1}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_enc_done
+.align	4
+.Lxts_enc_1:
+	mov	r0, sp
+	veor	q0, q8
+	mov	r1, sp
+	vst1.8	{q0}, [sp,:128]
+	mov	r2, r10
+	mov	r4, r3				@ preserve fp
+
+	bl	AES_encrypt
+
+	vld1.8	{q0}, [sp,:128]
+	veor	q0, q0, q8
+	vst1.8	{q0}, [r8]!
+	mov	r3, r4
+
+	vmov	q8, q9		@ next round tweak
+
+.Lxts_enc_done:
+#ifndef	XTS_CHAIN_TWEAK
+	adds	r9, #0x10
+	beq	.Lxts_enc_ret
+	sub	r6, r8, #0x10
+
+.Lxts_enc_steal:
+	ldrb	r0, [r7], #1
+	ldrb	r1, [r8, #-0x10]
+	strb	r0, [r8, #-0x10]
+	strb	r1, [r8], #1
+
+	subs	r9, #1
+	bhi	.Lxts_enc_steal
+
+	vld1.8	{q0}, [r6]
+	mov	r0, sp
+	veor	q0, q0, q8
+	mov	r1, sp
+	vst1.8	{q0}, [sp,:128]
+	mov	r2, r10
+	mov	r4, r3			@ preserve fp
+
+	bl	AES_encrypt
+
+	vld1.8	{q0}, [sp,:128]
+	veor	q0, q0, q8
+	vst1.8	{q0}, [r6]
+	mov	r3, r4
+#endif
+
+.Lxts_enc_ret:
+	bic	r0, r3, #0xf
+	vmov.i32	q0, #0
+	vmov.i32	q1, #0
+#ifdef	XTS_CHAIN_TWEAK
+	ldr	r1, [r3, #0x20+VFP_ABI_FRAME]	@ chain tweak
+#endif
+.Lxts_enc_bzero:@ wipe key schedule [if any]
+	vstmia	sp!, {q0,q1}
+	cmp	sp, r0
+	bne	.Lxts_enc_bzero
+
+	mov	sp, r3
+#ifdef	XTS_CHAIN_TWEAK
+	vst1.8	{q8}, [r1]
+#endif
+	VFP_ABI_POP
+	ldmia	sp!, {r4,r5,r6,r7,r8,r9,r10, pc}	@ return
+
+.size	bsaes_xts_encrypt,.-bsaes_xts_encrypt
+
+.globl	bsaes_xts_decrypt
+.hidden	bsaes_xts_decrypt
+.type	bsaes_xts_decrypt,%function
+.align	4
+bsaes_xts_decrypt:
+	mov	ip, sp
+	stmdb	sp!, {r4,r5,r6,r7,r8,r9,r10, lr}		@ 0x20
+	VFP_ABI_PUSH
+	mov	r6, sp				@ future r3
+
+	mov	r7, r0
+	mov	r8, r1
+	mov	r9, r2
+	mov	r10, r3
+
+	sub	r0, sp, #0x10			@ 0x10
+	bic	r0, #0xf			@ align at 16 bytes
+	mov	sp, r0
+
+#ifdef	XTS_CHAIN_TWEAK
+	ldr	r0, [ip]			@ pointer to input tweak
+#else
+	@ generate initial tweak
+	ldr	r0, [ip, #4]			@ iv[]
+	mov	r1, sp
+	ldr	r2, [ip, #0]			@ key2
+	bl	AES_encrypt
+	mov	r0, sp				@ pointer to initial tweak
+#endif
+
+	ldr	r1, [r10, #240]		@ get # of rounds
+	mov	r3, r6
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	@ allocate the key schedule on the stack
+	sub	r12, sp, r1, lsl#7		@ 128 bytes per inner round key
+	@ add	r12, #96			@ size of bit-sliced key schedule
+	sub	r12, #48			@ place for tweak[9]
+
+	@ populate the key schedule
+	mov	r4, r10			@ pass key
+	mov	r5, r1			@ pass # of rounds
+	mov	sp, r12
+	add	r12, #0x90			@ pass key schedule
+	bl	_bsaes_key_convert
+	add	r4, sp, #0x90
+	vldmia	r4, {q6}
+	vstmia	r12,  {q15}		@ save last round key
+	veor	q7, q7, q6	@ fix up round 0 key
+	vstmia	r4, {q7}
+#else
+	ldr	r12, [r10, #244]
+	eors	r12, #1
+	beq	0f
+
+	str	r12, [r10, #244]
+	mov	r4, r10			@ pass key
+	mov	r5, r1			@ pass # of rounds
+	add	r12, r10, #248			@ pass key schedule
+	bl	_bsaes_key_convert
+	add	r4, r10, #248
+	vldmia	r4, {q6}
+	vstmia	r12,  {q15}		@ save last round key
+	veor	q7, q7, q6	@ fix up round 0 key
+	vstmia	r4, {q7}
+
+.align	2
+	sub	sp, #0x90			@ place for tweak[9]
+#endif
+	vld1.8	{q8}, [r0]			@ initial tweak
+	adr	r2, .Lxts_magic
+
+#ifndef	XTS_CHAIN_TWEAK
+	tst	r9, #0xf			@ if not multiple of 16
+	it	ne				@ Thumb2 thing, sanity check in ARM
+	subne	r9, #0x10			@ subtract another 16 bytes
+#endif
+	subs	r9, #0x80
+
+	blo	.Lxts_dec_short
+	b	.Lxts_dec_loop
+
+.align	4
+.Lxts_dec_loop:
+	vldmia	r2, {q5}	@ load XTS magic
+	vshr.s64	q6, q8, #63
+	mov	r0, sp
+	vand	q6, q6, q5
+	vadd.u64	q9, q8, q8
+	vst1.64	{q8}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q9, #63
+	veor	q9, q9, q6
+	vand	q7, q7, q5
+	vadd.u64	q10, q9, q9
+	vst1.64	{q9}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q10, #63
+	veor	q10, q10, q7
+	vand	q6, q6, q5
+	vld1.8	{q0}, [r7]!
+	vadd.u64	q11, q10, q10
+	vst1.64	{q10}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q11, #63
+	veor	q11, q11, q6
+	vand	q7, q7, q5
+	vld1.8	{q1}, [r7]!
+	veor	q0, q0, q8
+	vadd.u64	q12, q11, q11
+	vst1.64	{q11}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q12, #63
+	veor	q12, q12, q7
+	vand	q6, q6, q5
+	vld1.8	{q2}, [r7]!
+	veor	q1, q1, q9
+	vadd.u64	q13, q12, q12
+	vst1.64	{q12}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q13, #63
+	veor	q13, q13, q6
+	vand	q7, q7, q5
+	vld1.8	{q3}, [r7]!
+	veor	q2, q2, q10
+	vadd.u64	q14, q13, q13
+	vst1.64	{q13}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q14, #63
+	veor	q14, q14, q7
+	vand	q6, q6, q5
+	vld1.8	{q4}, [r7]!
+	veor	q3, q3, q11
+	vadd.u64	q15, q14, q14
+	vst1.64	{q14}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q15, #63
+	veor	q15, q15, q6
+	vand	q7, q7, q5
+	vld1.8	{q5}, [r7]!
+	veor	q4, q4, q12
+	vadd.u64	q8, q15, q15
+	vst1.64	{q15}, [r0,:128]!
+	vswp	d15,d14
+	veor	q8, q8, q7
+	vst1.64	{q8}, [r0,:128]		@ next round tweak
+
+	vld1.8	{q6,q7}, [r7]!
+	veor	q5, q5, q13
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q6, q6, q14
+	mov	r5, r1			@ pass rounds
+	veor	q7, q7, q15
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q4, q11
+	vld1.64	{q14,q15}, [r0,:128]!
+	veor	q10, q2, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	veor	q12, q3, q14
+	vst1.8	{q10,q11}, [r8]!
+	veor	q13, q5, q15
+	vst1.8	{q12,q13}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+
+	subs	r9, #0x80
+	bpl	.Lxts_dec_loop
+
+.Lxts_dec_short:
+	adds	r9, #0x70
+	bmi	.Lxts_dec_done
+
+	vldmia	r2, {q5}	@ load XTS magic
+	vshr.s64	q7, q8, #63
+	mov	r0, sp
+	vand	q7, q7, q5
+	vadd.u64	q9, q8, q8
+	vst1.64	{q8}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q9, #63
+	veor	q9, q9, q7
+	vand	q6, q6, q5
+	vadd.u64	q10, q9, q9
+	vst1.64	{q9}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q10, #63
+	veor	q10, q10, q6
+	vand	q7, q7, q5
+	vld1.8	{q0}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_1
+	vadd.u64	q11, q10, q10
+	vst1.64	{q10}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q11, #63
+	veor	q11, q11, q7
+	vand	q6, q6, q5
+	vld1.8	{q1}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_2
+	veor	q0, q0, q8
+	vadd.u64	q12, q11, q11
+	vst1.64	{q11}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q12, #63
+	veor	q12, q12, q6
+	vand	q7, q7, q5
+	vld1.8	{q2}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_3
+	veor	q1, q1, q9
+	vadd.u64	q13, q12, q12
+	vst1.64	{q12}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q13, #63
+	veor	q13, q13, q7
+	vand	q6, q6, q5
+	vld1.8	{q3}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_4
+	veor	q2, q2, q10
+	vadd.u64	q14, q13, q13
+	vst1.64	{q13}, [r0,:128]!
+	vswp	d13,d12
+	vshr.s64	q7, q14, #63
+	veor	q14, q14, q6
+	vand	q7, q7, q5
+	vld1.8	{q4}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_5
+	veor	q3, q3, q11
+	vadd.u64	q15, q14, q14
+	vst1.64	{q14}, [r0,:128]!
+	vswp	d15,d14
+	vshr.s64	q6, q15, #63
+	veor	q15, q15, q7
+	vand	q6, q6, q5
+	vld1.8	{q5}, [r7]!
+	subs	r9, #0x10
+	bmi	.Lxts_dec_6
+	veor	q4, q4, q12
+	sub	r9, #0x10
+	vst1.64	{q15}, [r0,:128]		@ next round tweak
+
+	vld1.8	{q6}, [r7]!
+	veor	q5, q5, q13
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q6, q6, q14
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q4, q11
+	vld1.64	{q14}, [r0,:128]!
+	veor	q10, q2, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	veor	q12, q3, q14
+	vst1.8	{q10,q11}, [r8]!
+	vst1.8	{q12}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_6:
+	vst1.64	{q14}, [r0,:128]		@ next round tweak
+
+	veor	q4, q4, q12
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q5, q5, q13
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12,q13}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q4, q11
+	veor	q10, q2, q12
+	vst1.8	{q8,q9}, [r8]!
+	veor	q11, q7, q13
+	vst1.8	{q10,q11}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_5:
+	vst1.64	{q13}, [r0,:128]		@ next round tweak
+
+	veor	q3, q3, q11
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q4, q4, q12
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	vld1.64	{q12}, [r0,:128]!
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q4, q11
+	veor	q10, q2, q12
+	vst1.8	{q8,q9}, [r8]!
+	vst1.8	{q10}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_4:
+	vst1.64	{q12}, [r0,:128]		@ next round tweak
+
+	veor	q2, q2, q10
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q3, q3, q11
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10,q11}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	veor	q9, q4, q11
+	vst1.8	{q8,q9}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_3:
+	vst1.64	{q11}, [r0,:128]		@ next round tweak
+
+	veor	q1, q1, q9
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q2, q2, q10
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	vld1.64	{q10}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	veor	q8, q6, q10
+	vst1.8	{q0,q1}, [r8]!
+	vst1.8	{q8}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_2:
+	vst1.64	{q10}, [r0,:128]		@ next round tweak
+
+	veor	q0, q0, q8
+#ifndef	BSAES_ASM_EXTENDED_KEY
+	add	r4, sp, #0x90			@ pass key schedule
+#else
+	add	r4, r10, #248			@ pass key schedule
+#endif
+	veor	q1, q1, q9
+	mov	r5, r1			@ pass rounds
+	mov	r0, sp
+
+	bl	_bsaes_decrypt8
+
+	vld1.64	{q8,q9}, [r0,:128]!
+	veor	q0, q0, q8
+	veor	q1, q1, q9
+	vst1.8	{q0,q1}, [r8]!
+
+	vld1.64	{q8}, [r0,:128]		@ next round tweak
+	b	.Lxts_dec_done
+.align	4
+.Lxts_dec_1:
+	mov	r0, sp
+	veor	q0, q8
+	mov	r1, sp
+	vst1.8	{q0}, [sp,:128]
+	mov	r2, r10
+	mov	r4, r3				@ preserve fp
+	mov	r5, r2			@ preserve magic
+
+	bl	AES_decrypt
+
+	vld1.8	{q0}, [sp,:128]
+	veor	q0, q0, q8
+	vst1.8	{q0}, [r8]!
+	mov	r3, r4
+	mov	r2, r5
+
+	vmov	q8, q9		@ next round tweak
+
+.Lxts_dec_done:
+#ifndef	XTS_CHAIN_TWEAK
+	adds	r9, #0x10
+	beq	.Lxts_dec_ret
+
+	@ calculate one round of extra tweak for the stolen ciphertext
+	vldmia	r2, {q5}
+	vshr.s64	q6, q8, #63
+	vand	q6, q6, q5
+	vadd.u64	q9, q8, q8
+	vswp	d13,d12
+	veor	q9, q9, q6
+
+	@ perform the final decryption with the last tweak value
+	vld1.8	{q0}, [r7]!
+	mov	r0, sp
+	veor	q0, q0, q9
+	mov	r1, sp
+	vst1.8	{q0}, [sp,:128]
+	mov	r2, r10
+	mov	r4, r3			@ preserve fp
+
+	bl	AES_decrypt
+
+	vld1.8	{q0}, [sp,:128]
+	veor	q0, q0, q9
+	vst1.8	{q0}, [r8]
+
+	mov	r6, r8
+.Lxts_dec_steal:
+	ldrb	r1, [r8]
+	ldrb	r0, [r7], #1
+	strb	r1, [r8, #0x10]
+	strb	r0, [r8], #1
+
+	subs	r9, #1
+	bhi	.Lxts_dec_steal
+
+	vld1.8	{q0}, [r6]
+	mov	r0, sp
+	veor	q0, q8
+	mov	r1, sp
+	vst1.8	{q0}, [sp,:128]
+	mov	r2, r10
+
+	bl	AES_decrypt
+
+	vld1.8	{q0}, [sp,:128]
+	veor	q0, q0, q8
+	vst1.8	{q0}, [r6]
+	mov	r3, r4
+#endif
+
+.Lxts_dec_ret:
+	bic	r0, r3, #0xf
+	vmov.i32	q0, #0
+	vmov.i32	q1, #0
+#ifdef	XTS_CHAIN_TWEAK
+	ldr	r1, [r3, #0x20+VFP_ABI_FRAME]	@ chain tweak
+#endif
+.Lxts_dec_bzero:@ wipe key schedule [if any]
+	vstmia	sp!, {q0,q1}
+	cmp	sp, r0
+	bne	.Lxts_dec_bzero
+
+	mov	sp, r3
+#ifdef	XTS_CHAIN_TWEAK
+	vst1.8	{q8}, [r1]
+#endif
+	VFP_ABI_POP
+	ldmia	sp!, {r4,r5,r6,r7,r8,r9,r10, pc}	@ return
+
+.size	bsaes_xts_decrypt,.-bsaes_xts_decrypt
+#endif
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S b/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S
new file mode 100644
index 0000000..68dfb2c
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S
@@ -0,0 +1,589 @@
+#if defined(__arm__)
+#include "arm_arch.h"
+
+.text
+.code	32
+
+#if __ARM_MAX_ARCH__>=7
+.align	5
+.LOPENSSL_armcap:
+.word	OPENSSL_armcap_P-.Lbn_mul_mont
+#endif
+
+.globl	bn_mul_mont
+.hidden	bn_mul_mont
+.type	bn_mul_mont,%function
+
+.align	5
+bn_mul_mont:
+.Lbn_mul_mont:
+	ldr	ip,[sp,#4]		@ load num
+	stmdb	sp!,{r0,r2}		@ sp points at argument block
+#if __ARM_MAX_ARCH__>=7
+	tst	ip,#7
+	bne	.Lialu
+	adr	r0,bn_mul_mont
+	ldr	r2,.LOPENSSL_armcap
+	ldr	r0,[r0,r2]
+#ifdef	__APPLE__
+	ldr	r0,[r0]
+#endif
+	tst	r0,#1			@ NEON available?
+	ldmia	sp, {r0,r2}
+	beq	.Lialu
+	add	sp,sp,#8
+	b	bn_mul8x_mont_neon
+.align	4
+.Lialu:
+#endif
+	cmp	ip,#2
+	mov	r0,ip			@ load num
+	movlt	r0,#0
+	addlt	sp,sp,#2*4
+	blt	.Labrt
+
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}		@ save 10 registers
+
+	mov	r0,r0,lsl#2		@ rescale r0 for byte count
+	sub	sp,sp,r0		@ alloca(4*num)
+	sub	sp,sp,#4		@ +extra dword
+	sub	r0,r0,#4		@ "num=num-1"
+	add	r4,r2,r0		@ &bp[num-1]
+
+	add	r0,sp,r0		@ r0 to point at &tp[num-1]
+	ldr	r8,[r0,#14*4]		@ &n0
+	ldr	r2,[r2]		@ bp[0]
+	ldr	r5,[r1],#4		@ ap[0],ap++
+	ldr	r6,[r3],#4		@ np[0],np++
+	ldr	r8,[r8]		@ *n0
+	str	r4,[r0,#15*4]		@ save &bp[num]
+
+	umull	r10,r11,r5,r2	@ ap[0]*bp[0]
+	str	r8,[r0,#14*4]		@ save n0 value
+	mul	r8,r10,r8		@ "tp[0]"*n0
+	mov	r12,#0
+	umlal	r10,r12,r6,r8	@ np[0]*n0+"t[0]"
+	mov	r4,sp
+
+.L1st:
+	ldr	r5,[r1],#4		@ ap[j],ap++
+	mov	r10,r11
+	ldr	r6,[r3],#4		@ np[j],np++
+	mov	r11,#0
+	umlal	r10,r11,r5,r2	@ ap[j]*bp[0]
+	mov	r14,#0
+	umlal	r12,r14,r6,r8	@ np[j]*n0
+	adds	r12,r12,r10
+	str	r12,[r4],#4		@ tp[j-1]=,tp++
+	adc	r12,r14,#0
+	cmp	r4,r0
+	bne	.L1st
+
+	adds	r12,r12,r11
+	ldr	r4,[r0,#13*4]		@ restore bp
+	mov	r14,#0
+	ldr	r8,[r0,#14*4]		@ restore n0
+	adc	r14,r14,#0
+	str	r12,[r0]		@ tp[num-1]=
+	str	r14,[r0,#4]		@ tp[num]=
+
+.Louter:
+	sub	r7,r0,sp		@ "original" r0-1 value
+	sub	r1,r1,r7		@ "rewind" ap to &ap[1]
+	ldr	r2,[r4,#4]!		@ *(++bp)
+	sub	r3,r3,r7		@ "rewind" np to &np[1]
+	ldr	r5,[r1,#-4]		@ ap[0]
+	ldr	r10,[sp]		@ tp[0]
+	ldr	r6,[r3,#-4]		@ np[0]
+	ldr	r7,[sp,#4]		@ tp[1]
+
+	mov	r11,#0
+	umlal	r10,r11,r5,r2	@ ap[0]*bp[i]+tp[0]
+	str	r4,[r0,#13*4]		@ save bp
+	mul	r8,r10,r8
+	mov	r12,#0
+	umlal	r10,r12,r6,r8	@ np[0]*n0+"tp[0]"
+	mov	r4,sp
+
+.Linner:
+	ldr	r5,[r1],#4		@ ap[j],ap++
+	adds	r10,r11,r7		@ +=tp[j]
+	ldr	r6,[r3],#4		@ np[j],np++
+	mov	r11,#0
+	umlal	r10,r11,r5,r2	@ ap[j]*bp[i]
+	mov	r14,#0
+	umlal	r12,r14,r6,r8	@ np[j]*n0
+	adc	r11,r11,#0
+	ldr	r7,[r4,#8]		@ tp[j+1]
+	adds	r12,r12,r10
+	str	r12,[r4],#4		@ tp[j-1]=,tp++
+	adc	r12,r14,#0
+	cmp	r4,r0
+	bne	.Linner
+
+	adds	r12,r12,r11
+	mov	r14,#0
+	ldr	r4,[r0,#13*4]		@ restore bp
+	adc	r14,r14,#0
+	ldr	r8,[r0,#14*4]		@ restore n0
+	adds	r12,r12,r7
+	ldr	r7,[r0,#15*4]		@ restore &bp[num]
+	adc	r14,r14,#0
+	str	r12,[r0]		@ tp[num-1]=
+	str	r14,[r0,#4]		@ tp[num]=
+
+	cmp	r4,r7
+	bne	.Louter
+
+	ldr	r2,[r0,#12*4]		@ pull rp
+	add	r0,r0,#4		@ r0 to point at &tp[num]
+	sub	r5,r0,sp		@ "original" num value
+	mov	r4,sp			@ "rewind" r4
+	mov	r1,r4			@ "borrow" r1
+	sub	r3,r3,r5		@ "rewind" r3 to &np[0]
+
+	subs	r7,r7,r7		@ "clear" carry flag
+.Lsub:	ldr	r7,[r4],#4
+	ldr	r6,[r3],#4
+	sbcs	r7,r7,r6		@ tp[j]-np[j]
+	str	r7,[r2],#4		@ rp[j]=
+	teq	r4,r0		@ preserve carry
+	bne	.Lsub
+	sbcs	r14,r14,#0		@ upmost carry
+	mov	r4,sp			@ "rewind" r4
+	sub	r2,r2,r5		@ "rewind" r2
+
+	and	r1,r4,r14
+	bic	r3,r2,r14
+	orr	r1,r1,r3		@ ap=borrow?tp:rp
+
+.Lcopy:	ldr	r7,[r1],#4		@ copy or in-place refresh
+	str	sp,[r4],#4		@ zap tp
+	str	r7,[r2],#4
+	cmp	r4,r0
+	bne	.Lcopy
+
+	add	sp,r0,#4		@ skip over tp[num+1]
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}		@ restore registers
+	add	sp,sp,#2*4		@ skip over {r0,r2}
+	mov	r0,#1
+.Labrt:
+#if __ARM_ARCH__>=5
+	bx	lr				@ .word	0xe12fff1e
+#else
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	bn_mul_mont,.-bn_mul_mont
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.type	bn_mul8x_mont_neon,%function
+.align	5
+bn_mul8x_mont_neon:
+	mov	ip,sp
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11}
+	vstmdb	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}		@ ABI specification says so
+	ldmia	ip,{r4,r5}		@ load rest of parameter block
+
+	sub	r7,sp,#16
+	vld1.32	{d28[0]}, [r2,:32]!
+	sub	r7,r7,r5,lsl#4
+	vld1.32	{d0,d1,d2,d3},  [r1]!		@ can't specify :32 :-(
+	and	r7,r7,#-64
+	vld1.32	{d30[0]}, [r4,:32]
+	mov	sp,r7			@ alloca
+	veor	d8,d8,d8
+	subs	r8,r5,#8
+	vzip.16	d28,d8
+
+	vmull.u32	q6,d28,d0[0]
+	vmull.u32	q7,d28,d0[1]
+	vmull.u32	q8,d28,d1[0]
+	vshl.i64	d10,d13,#16
+	vmull.u32	q9,d28,d1[1]
+
+	vadd.u64	d10,d10,d12
+	veor	d8,d8,d8
+	vmul.u32	d29,d10,d30
+
+	vmull.u32	q10,d28,d2[0]
+	vld1.32	{d4,d5,d6,d7}, [r3]!
+	vmull.u32	q11,d28,d2[1]
+	vmull.u32	q12,d28,d3[0]
+	vzip.16	d29,d8
+	vmull.u32	q13,d28,d3[1]
+
+	bne	.LNEON_1st
+
+	@ special case for num=8, everything is in register bank...
+
+	vmlal.u32	q6,d29,d4[0]
+	sub	r9,r5,#1
+	vmlal.u32	q7,d29,d4[1]
+	vmlal.u32	q8,d29,d5[0]
+	vmlal.u32	q9,d29,d5[1]
+
+	vmlal.u32	q10,d29,d6[0]
+	vmov	q5,q6
+	vmlal.u32	q11,d29,d6[1]
+	vmov	q6,q7
+	vmlal.u32	q12,d29,d7[0]
+	vmov	q7,q8
+	vmlal.u32	q13,d29,d7[1]
+	vmov	q8,q9
+	vmov	q9,q10
+	vshr.u64	d10,d10,#16
+	vmov	q10,q11
+	vmov	q11,q12
+	vadd.u64	d10,d10,d11
+	vmov	q12,q13
+	veor	q13,q13
+	vshr.u64	d10,d10,#16
+
+	b	.LNEON_outer8
+
+.align	4
+.LNEON_outer8:
+	vld1.32	{d28[0]}, [r2,:32]!
+	veor	d8,d8,d8
+	vzip.16	d28,d8
+	vadd.u64	d12,d12,d10
+
+	vmlal.u32	q6,d28,d0[0]
+	vmlal.u32	q7,d28,d0[1]
+	vmlal.u32	q8,d28,d1[0]
+	vshl.i64	d10,d13,#16
+	vmlal.u32	q9,d28,d1[1]
+
+	vadd.u64	d10,d10,d12
+	veor	d8,d8,d8
+	subs	r9,r9,#1
+	vmul.u32	d29,d10,d30
+
+	vmlal.u32	q10,d28,d2[0]
+	vmlal.u32	q11,d28,d2[1]
+	vmlal.u32	q12,d28,d3[0]
+	vzip.16	d29,d8
+	vmlal.u32	q13,d28,d3[1]
+
+	vmlal.u32	q6,d29,d4[0]
+	vmlal.u32	q7,d29,d4[1]
+	vmlal.u32	q8,d29,d5[0]
+	vmlal.u32	q9,d29,d5[1]
+
+	vmlal.u32	q10,d29,d6[0]
+	vmov	q5,q6
+	vmlal.u32	q11,d29,d6[1]
+	vmov	q6,q7
+	vmlal.u32	q12,d29,d7[0]
+	vmov	q7,q8
+	vmlal.u32	q13,d29,d7[1]
+	vmov	q8,q9
+	vmov	q9,q10
+	vshr.u64	d10,d10,#16
+	vmov	q10,q11
+	vmov	q11,q12
+	vadd.u64	d10,d10,d11
+	vmov	q12,q13
+	veor	q13,q13
+	vshr.u64	d10,d10,#16
+
+	bne	.LNEON_outer8
+
+	vadd.u64	d12,d12,d10
+	mov	r7,sp
+	vshr.u64	d10,d12,#16
+	mov	r8,r5
+	vadd.u64	d13,d13,d10
+	add	r6,sp,#16
+	vshr.u64	d10,d13,#16
+	vzip.16	d12,d13
+
+	b	.LNEON_tail2
+
+.align	4
+.LNEON_1st:
+	vmlal.u32	q6,d29,d4[0]
+	vld1.32	{d0,d1,d2,d3}, [r1]!
+	vmlal.u32	q7,d29,d4[1]
+	subs	r8,r8,#8
+	vmlal.u32	q8,d29,d5[0]
+	vmlal.u32	q9,d29,d5[1]
+
+	vmlal.u32	q10,d29,d6[0]
+	vld1.32	{d4,d5}, [r3]!
+	vmlal.u32	q11,d29,d6[1]
+	vst1.64	{q6,q7}, [r7,:256]!
+	vmlal.u32	q12,d29,d7[0]
+	vmlal.u32	q13,d29,d7[1]
+	vst1.64	{q8,q9}, [r7,:256]!
+
+	vmull.u32	q6,d28,d0[0]
+	vld1.32	{d6,d7}, [r3]!
+	vmull.u32	q7,d28,d0[1]
+	vst1.64	{q10,q11}, [r7,:256]!
+	vmull.u32	q8,d28,d1[0]
+	vmull.u32	q9,d28,d1[1]
+	vst1.64	{q12,q13}, [r7,:256]!
+
+	vmull.u32	q10,d28,d2[0]
+	vmull.u32	q11,d28,d2[1]
+	vmull.u32	q12,d28,d3[0]
+	vmull.u32	q13,d28,d3[1]
+
+	bne	.LNEON_1st
+
+	vmlal.u32	q6,d29,d4[0]
+	add	r6,sp,#16
+	vmlal.u32	q7,d29,d4[1]
+	sub	r1,r1,r5,lsl#2		@ rewind r1
+	vmlal.u32	q8,d29,d5[0]
+	vld1.64	{q5}, [sp,:128]
+	vmlal.u32	q9,d29,d5[1]
+	sub	r9,r5,#1
+
+	vmlal.u32	q10,d29,d6[0]
+	vst1.64	{q6,q7}, [r7,:256]!
+	vmlal.u32	q11,d29,d6[1]
+	vshr.u64	d10,d10,#16
+	vld1.64	{q6},       [r6, :128]!
+	vmlal.u32	q12,d29,d7[0]
+	vst1.64	{q8,q9}, [r7,:256]!
+	vmlal.u32	q13,d29,d7[1]
+
+	vst1.64	{q10,q11}, [r7,:256]!
+	vadd.u64	d10,d10,d11
+	veor	q4,q4,q4
+	vst1.64	{q12,q13}, [r7,:256]!
+	vld1.64	{q7,q8}, [r6, :256]!
+	vst1.64	{q4},          [r7,:128]
+	vshr.u64	d10,d10,#16
+
+	b	.LNEON_outer
+
+.align	4
+.LNEON_outer:
+	vld1.32	{d28[0]}, [r2,:32]!
+	sub	r3,r3,r5,lsl#2		@ rewind r3
+	vld1.32	{d0,d1,d2,d3},  [r1]!
+	veor	d8,d8,d8
+	mov	r7,sp
+	vzip.16	d28,d8
+	sub	r8,r5,#8
+	vadd.u64	d12,d12,d10
+
+	vmlal.u32	q6,d28,d0[0]
+	vld1.64	{q9,q10},[r6,:256]!
+	vmlal.u32	q7,d28,d0[1]
+	vmlal.u32	q8,d28,d1[0]
+	vld1.64	{q11,q12},[r6,:256]!
+	vmlal.u32	q9,d28,d1[1]
+
+	vshl.i64	d10,d13,#16
+	veor	d8,d8,d8
+	vadd.u64	d10,d10,d12
+	vld1.64	{q13},[r6,:128]!
+	vmul.u32	d29,d10,d30
+
+	vmlal.u32	q10,d28,d2[0]
+	vld1.32	{d4,d5,d6,d7}, [r3]!
+	vmlal.u32	q11,d28,d2[1]
+	vmlal.u32	q12,d28,d3[0]
+	vzip.16	d29,d8
+	vmlal.u32	q13,d28,d3[1]
+
+.LNEON_inner:
+	vmlal.u32	q6,d29,d4[0]
+	vld1.32	{d0,d1,d2,d3}, [r1]!
+	vmlal.u32	q7,d29,d4[1]
+	subs	r8,r8,#8
+	vmlal.u32	q8,d29,d5[0]
+	vmlal.u32	q9,d29,d5[1]
+	vst1.64	{q6,q7}, [r7,:256]!
+
+	vmlal.u32	q10,d29,d6[0]
+	vld1.64	{q6},       [r6, :128]!
+	vmlal.u32	q11,d29,d6[1]
+	vst1.64	{q8,q9}, [r7,:256]!
+	vmlal.u32	q12,d29,d7[0]
+	vld1.64	{q7,q8}, [r6, :256]!
+	vmlal.u32	q13,d29,d7[1]
+	vst1.64	{q10,q11}, [r7,:256]!
+
+	vmlal.u32	q6,d28,d0[0]
+	vld1.64	{q9,q10}, [r6, :256]!
+	vmlal.u32	q7,d28,d0[1]
+	vst1.64	{q12,q13}, [r7,:256]!
+	vmlal.u32	q8,d28,d1[0]
+	vld1.64	{q11,q12}, [r6, :256]!
+	vmlal.u32	q9,d28,d1[1]
+	vld1.32	{d4,d5,d6,d7}, [r3]!
+
+	vmlal.u32	q10,d28,d2[0]
+	vld1.64	{q13},       [r6, :128]!
+	vmlal.u32	q11,d28,d2[1]
+	vmlal.u32	q12,d28,d3[0]
+	vmlal.u32	q13,d28,d3[1]
+
+	bne	.LNEON_inner
+
+	vmlal.u32	q6,d29,d4[0]
+	add	r6,sp,#16
+	vmlal.u32	q7,d29,d4[1]
+	sub	r1,r1,r5,lsl#2		@ rewind r1
+	vmlal.u32	q8,d29,d5[0]
+	vld1.64	{q5}, [sp,:128]
+	vmlal.u32	q9,d29,d5[1]
+	subs	r9,r9,#1
+
+	vmlal.u32	q10,d29,d6[0]
+	vst1.64	{q6,q7}, [r7,:256]!
+	vmlal.u32	q11,d29,d6[1]
+	vld1.64	{q6},       [r6, :128]!
+	vshr.u64	d10,d10,#16
+	vst1.64	{q8,q9}, [r7,:256]!
+	vmlal.u32	q12,d29,d7[0]
+	vld1.64	{q7,q8}, [r6, :256]!
+	vmlal.u32	q13,d29,d7[1]
+
+	vst1.64	{q10,q11}, [r7,:256]!
+	vadd.u64	d10,d10,d11
+	vst1.64	{q12,q13}, [r7,:256]!
+	vshr.u64	d10,d10,#16
+
+	bne	.LNEON_outer
+
+	mov	r7,sp
+	mov	r8,r5
+
+.LNEON_tail:
+	vadd.u64	d12,d12,d10
+	vld1.64	{q9,q10}, [r6, :256]!
+	vshr.u64	d10,d12,#16
+	vadd.u64	d13,d13,d10
+	vld1.64	{q11,q12}, [r6, :256]!
+	vshr.u64	d10,d13,#16
+	vld1.64	{q13},       [r6, :128]!
+	vzip.16	d12,d13
+
+.LNEON_tail2:
+	vadd.u64	d14,d14,d10
+	vst1.32	{d12[0]}, [r7, :32]!
+	vshr.u64	d10,d14,#16
+	vadd.u64	d15,d15,d10
+	vshr.u64	d10,d15,#16
+	vzip.16	d14,d15
+
+	vadd.u64	d16,d16,d10
+	vst1.32	{d14[0]}, [r7, :32]!
+	vshr.u64	d10,d16,#16
+	vadd.u64	d17,d17,d10
+	vshr.u64	d10,d17,#16
+	vzip.16	d16,d17
+
+	vadd.u64	d18,d18,d10
+	vst1.32	{d16[0]}, [r7, :32]!
+	vshr.u64	d10,d18,#16
+	vadd.u64	d19,d19,d10
+	vshr.u64	d10,d19,#16
+	vzip.16	d18,d19
+
+	vadd.u64	d20,d20,d10
+	vst1.32	{d18[0]}, [r7, :32]!
+	vshr.u64	d10,d20,#16
+	vadd.u64	d21,d21,d10
+	vshr.u64	d10,d21,#16
+	vzip.16	d20,d21
+
+	vadd.u64	d22,d22,d10
+	vst1.32	{d20[0]}, [r7, :32]!
+	vshr.u64	d10,d22,#16
+	vadd.u64	d23,d23,d10
+	vshr.u64	d10,d23,#16
+	vzip.16	d22,d23
+
+	vadd.u64	d24,d24,d10
+	vst1.32	{d22[0]}, [r7, :32]!
+	vshr.u64	d10,d24,#16
+	vadd.u64	d25,d25,d10
+	vld1.64	{q6}, [r6, :128]!
+	vshr.u64	d10,d25,#16
+	vzip.16	d24,d25
+
+	vadd.u64	d26,d26,d10
+	vst1.32	{d24[0]}, [r7, :32]!
+	vshr.u64	d10,d26,#16
+	vadd.u64	d27,d27,d10
+	vld1.64	{q7,q8},	[r6, :256]!
+	vshr.u64	d10,d27,#16
+	vzip.16	d26,d27
+	subs	r8,r8,#8
+	vst1.32	{d26[0]}, [r7, :32]!
+
+	bne	.LNEON_tail
+
+	vst1.32	{d10[0]}, [r7, :32]		@ top-most bit
+	sub	r3,r3,r5,lsl#2			@ rewind r3
+	subs	r1,sp,#0				@ clear carry flag
+	add	r2,sp,r5,lsl#2
+
+.LNEON_sub:
+	ldmia	r1!, {r4,r5,r6,r7}
+	ldmia	r3!, {r8,r9,r10,r11}
+	sbcs	r8, r4,r8
+	sbcs	r9, r5,r9
+	sbcs	r10,r6,r10
+	sbcs	r11,r7,r11
+	teq	r1,r2				@ preserves carry
+	stmia	r0!, {r8,r9,r10,r11}
+	bne	.LNEON_sub
+
+	ldr	r10, [r1]				@ load top-most bit
+	veor	q0,q0,q0
+	sub	r11,r2,sp				@ this is num*4
+	veor	q1,q1,q1
+	mov	r1,sp
+	sub	r0,r0,r11				@ rewind r0
+	mov	r3,r2				@ second 3/4th of frame
+	sbcs	r10,r10,#0				@ result is carry flag
+
+.LNEON_copy_n_zap:
+	ldmia	r1!, {r4,r5,r6,r7}
+	ldmia	r0,  {r8,r9,r10,r11}
+	movcc	r8, r4
+	vst1.64	{q0,q1}, [r3,:256]!			@ wipe
+	movcc	r9, r5
+	movcc	r10,r6
+	vst1.64	{q0,q1}, [r3,:256]!			@ wipe
+	movcc	r11,r7
+	ldmia	r1, {r4,r5,r6,r7}
+	stmia	r0!, {r8,r9,r10,r11}
+	sub	r1,r1,#16
+	ldmia	r0, {r8,r9,r10,r11}
+	movcc	r8, r4
+	vst1.64	{q0,q1}, [r1,:256]!			@ wipe
+	movcc	r9, r5
+	movcc	r10,r6
+	vst1.64	{q0,q1}, [r3,:256]!			@ wipe
+	movcc	r11,r7
+	teq	r1,r2				@ preserves carry
+	stmia	r0!, {r8,r9,r10,r11}
+	bne	.LNEON_copy_n_zap
+
+	sub	sp,ip,#96
+	vldmia	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11}
+	bx	lr						@ .word	0xe12fff1e
+.size	bn_mul8x_mont_neon,.-bn_mul8x_mont_neon
+#endif
+.byte	77,111,110,116,103,111,109,101,114,121,32,109,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+#if __ARM_MAX_ARCH__>=7
+.comm	OPENSSL_armcap_P,4,4
+.hidden	OPENSSL_armcap_P
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S b/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S
new file mode 100644
index 0000000..c6f025d
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/modes/ghash-armv4.S
@@ -0,0 +1,541 @@
+#if defined(__arm__)
+#if defined(__arm__)
+#include "arm_arch.h"
+
+.syntax	unified
+
+.text
+.code	32
+
+#ifdef  __APPLE__
+#define ldrplb  ldrbpl
+#define ldrneb  ldrbne
+#endif
+
+.type	rem_4bit,%object
+.align	5
+rem_4bit:
+.short	0x0000,0x1C20,0x3840,0x2460
+.short	0x7080,0x6CA0,0x48C0,0x54E0
+.short	0xE100,0xFD20,0xD940,0xC560
+.short	0x9180,0x8DA0,0xA9C0,0xB5E0
+.size	rem_4bit,.-rem_4bit
+
+.type	rem_4bit_get,%function
+rem_4bit_get:
+	sub	r2,pc,#8
+	sub	r2,r2,#32	@ &rem_4bit
+	b	.Lrem_4bit_got
+	nop
+.size	rem_4bit_get,.-rem_4bit_get
+
+.globl	gcm_ghash_4bit
+.hidden	gcm_ghash_4bit
+.type	gcm_ghash_4bit,%function
+gcm_ghash_4bit:
+	sub	r12,pc,#8
+	add	r3,r2,r3		@ r3 to point at the end
+	stmdb	sp!,{r3,r4,r5,r6,r7,r8,r9,r10,r11,lr}		@ save r3/end too
+	sub	r12,r12,#48		@ &rem_4bit
+
+	ldmia	r12,{r4,r5,r6,r7,r8,r9,r10,r11}		@ copy rem_4bit ...
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11}		@ ... to stack
+
+	ldrb	r12,[r2,#15]
+	ldrb	r14,[r0,#15]
+.Louter:
+	eor	r12,r12,r14
+	and	r14,r12,#0xf0
+	and	r12,r12,#0x0f
+	mov	r3,#14
+
+	add	r7,r1,r12,lsl#4
+	ldmia	r7,{r4,r5,r6,r7}	@ load Htbl[nlo]
+	add	r11,r1,r14
+	ldrb	r12,[r2,#14]
+
+	and	r14,r4,#0xf		@ rem
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nhi]
+	add	r14,r14,r14
+	eor	r4,r8,r4,lsr#4
+	ldrh	r8,[sp,r14]		@ rem_4bit[rem]
+	eor	r4,r4,r5,lsl#28
+	ldrb	r14,[r0,#14]
+	eor	r5,r9,r5,lsr#4
+	eor	r5,r5,r6,lsl#28
+	eor	r6,r10,r6,lsr#4
+	eor	r6,r6,r7,lsl#28
+	eor	r7,r11,r7,lsr#4
+	eor	r12,r12,r14
+	and	r14,r12,#0xf0
+	and	r12,r12,#0x0f
+	eor	r7,r7,r8,lsl#16
+
+.Linner:
+	add	r11,r1,r12,lsl#4
+	and	r12,r4,#0xf		@ rem
+	subs	r3,r3,#1
+	add	r12,r12,r12
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nlo]
+	eor	r4,r8,r4,lsr#4
+	eor	r4,r4,r5,lsl#28
+	eor	r5,r9,r5,lsr#4
+	eor	r5,r5,r6,lsl#28
+	ldrh	r8,[sp,r12]		@ rem_4bit[rem]
+	eor	r6,r10,r6,lsr#4
+	ldrbpl	r12,[r2,r3]
+	eor	r6,r6,r7,lsl#28
+	eor	r7,r11,r7,lsr#4
+
+	add	r11,r1,r14
+	and	r14,r4,#0xf		@ rem
+	eor	r7,r7,r8,lsl#16	@ ^= rem_4bit[rem]
+	add	r14,r14,r14
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nhi]
+	eor	r4,r8,r4,lsr#4
+	ldrbpl	r8,[r0,r3]
+	eor	r4,r4,r5,lsl#28
+	eor	r5,r9,r5,lsr#4
+	ldrh	r9,[sp,r14]
+	eor	r5,r5,r6,lsl#28
+	eor	r6,r10,r6,lsr#4
+	eor	r6,r6,r7,lsl#28
+	eorpl	r12,r12,r8
+	eor	r7,r11,r7,lsr#4
+	andpl	r14,r12,#0xf0
+	andpl	r12,r12,#0x0f
+	eor	r7,r7,r9,lsl#16	@ ^= rem_4bit[rem]
+	bpl	.Linner
+
+	ldr	r3,[sp,#32]		@ re-load r3/end
+	add	r2,r2,#16
+	mov	r14,r4
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r4,r4
+	str	r4,[r0,#12]
+#elif defined(__ARMEB__)
+	str	r4,[r0,#12]
+#else
+	mov	r9,r4,lsr#8
+	strb	r4,[r0,#12+3]
+	mov	r10,r4,lsr#16
+	strb	r9,[r0,#12+2]
+	mov	r11,r4,lsr#24
+	strb	r10,[r0,#12+1]
+	strb	r11,[r0,#12]
+#endif
+	cmp	r2,r3
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r5,r5
+	str	r5,[r0,#8]
+#elif defined(__ARMEB__)
+	str	r5,[r0,#8]
+#else
+	mov	r9,r5,lsr#8
+	strb	r5,[r0,#8+3]
+	mov	r10,r5,lsr#16
+	strb	r9,[r0,#8+2]
+	mov	r11,r5,lsr#24
+	strb	r10,[r0,#8+1]
+	strb	r11,[r0,#8]
+#endif
+	ldrbne	r12,[r2,#15]
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r6,r6
+	str	r6,[r0,#4]
+#elif defined(__ARMEB__)
+	str	r6,[r0,#4]
+#else
+	mov	r9,r6,lsr#8
+	strb	r6,[r0,#4+3]
+	mov	r10,r6,lsr#16
+	strb	r9,[r0,#4+2]
+	mov	r11,r6,lsr#24
+	strb	r10,[r0,#4+1]
+	strb	r11,[r0,#4]
+#endif
+
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r7,r7
+	str	r7,[r0,#0]
+#elif defined(__ARMEB__)
+	str	r7,[r0,#0]
+#else
+	mov	r9,r7,lsr#8
+	strb	r7,[r0,#0+3]
+	mov	r10,r7,lsr#16
+	strb	r9,[r0,#0+2]
+	mov	r11,r7,lsr#24
+	strb	r10,[r0,#0+1]
+	strb	r11,[r0,#0]
+#endif
+
+	bne	.Louter
+
+	add	sp,sp,#36
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	gcm_ghash_4bit,.-gcm_ghash_4bit
+
+.globl	gcm_gmult_4bit
+.hidden	gcm_gmult_4bit
+.type	gcm_gmult_4bit,%function
+gcm_gmult_4bit:
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}
+	ldrb	r12,[r0,#15]
+	b	rem_4bit_get
+.Lrem_4bit_got:
+	and	r14,r12,#0xf0
+	and	r12,r12,#0x0f
+	mov	r3,#14
+
+	add	r7,r1,r12,lsl#4
+	ldmia	r7,{r4,r5,r6,r7}	@ load Htbl[nlo]
+	ldrb	r12,[r0,#14]
+
+	add	r11,r1,r14
+	and	r14,r4,#0xf		@ rem
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nhi]
+	add	r14,r14,r14
+	eor	r4,r8,r4,lsr#4
+	ldrh	r8,[r2,r14]	@ rem_4bit[rem]
+	eor	r4,r4,r5,lsl#28
+	eor	r5,r9,r5,lsr#4
+	eor	r5,r5,r6,lsl#28
+	eor	r6,r10,r6,lsr#4
+	eor	r6,r6,r7,lsl#28
+	eor	r7,r11,r7,lsr#4
+	and	r14,r12,#0xf0
+	eor	r7,r7,r8,lsl#16
+	and	r12,r12,#0x0f
+
+.Loop:
+	add	r11,r1,r12,lsl#4
+	and	r12,r4,#0xf		@ rem
+	subs	r3,r3,#1
+	add	r12,r12,r12
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nlo]
+	eor	r4,r8,r4,lsr#4
+	eor	r4,r4,r5,lsl#28
+	eor	r5,r9,r5,lsr#4
+	eor	r5,r5,r6,lsl#28
+	ldrh	r8,[r2,r12]	@ rem_4bit[rem]
+	eor	r6,r10,r6,lsr#4
+	ldrbpl	r12,[r0,r3]
+	eor	r6,r6,r7,lsl#28
+	eor	r7,r11,r7,lsr#4
+
+	add	r11,r1,r14
+	and	r14,r4,#0xf		@ rem
+	eor	r7,r7,r8,lsl#16	@ ^= rem_4bit[rem]
+	add	r14,r14,r14
+	ldmia	r11,{r8,r9,r10,r11}	@ load Htbl[nhi]
+	eor	r4,r8,r4,lsr#4
+	eor	r4,r4,r5,lsl#28
+	eor	r5,r9,r5,lsr#4
+	ldrh	r8,[r2,r14]	@ rem_4bit[rem]
+	eor	r5,r5,r6,lsl#28
+	eor	r6,r10,r6,lsr#4
+	eor	r6,r6,r7,lsl#28
+	eor	r7,r11,r7,lsr#4
+	andpl	r14,r12,#0xf0
+	andpl	r12,r12,#0x0f
+	eor	r7,r7,r8,lsl#16	@ ^= rem_4bit[rem]
+	bpl	.Loop
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r4,r4
+	str	r4,[r0,#12]
+#elif defined(__ARMEB__)
+	str	r4,[r0,#12]
+#else
+	mov	r9,r4,lsr#8
+	strb	r4,[r0,#12+3]
+	mov	r10,r4,lsr#16
+	strb	r9,[r0,#12+2]
+	mov	r11,r4,lsr#24
+	strb	r10,[r0,#12+1]
+	strb	r11,[r0,#12]
+#endif
+
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r5,r5
+	str	r5,[r0,#8]
+#elif defined(__ARMEB__)
+	str	r5,[r0,#8]
+#else
+	mov	r9,r5,lsr#8
+	strb	r5,[r0,#8+3]
+	mov	r10,r5,lsr#16
+	strb	r9,[r0,#8+2]
+	mov	r11,r5,lsr#24
+	strb	r10,[r0,#8+1]
+	strb	r11,[r0,#8]
+#endif
+
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r6,r6
+	str	r6,[r0,#4]
+#elif defined(__ARMEB__)
+	str	r6,[r0,#4]
+#else
+	mov	r9,r6,lsr#8
+	strb	r6,[r0,#4+3]
+	mov	r10,r6,lsr#16
+	strb	r9,[r0,#4+2]
+	mov	r11,r6,lsr#24
+	strb	r10,[r0,#4+1]
+	strb	r11,[r0,#4]
+#endif
+
+#if __ARM_ARCH__>=7 && defined(__ARMEL__)
+	rev	r7,r7
+	str	r7,[r0,#0]
+#elif defined(__ARMEB__)
+	str	r7,[r0,#0]
+#else
+	mov	r9,r7,lsr#8
+	strb	r7,[r0,#0+3]
+	mov	r10,r7,lsr#16
+	strb	r9,[r0,#0+2]
+	mov	r11,r7,lsr#24
+	strb	r10,[r0,#0+1]
+	strb	r11,[r0,#0]
+#endif
+
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	gcm_gmult_4bit,.-gcm_gmult_4bit
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.globl	gcm_init_neon
+.hidden	gcm_init_neon
+.type	gcm_init_neon,%function
+.align	4
+gcm_init_neon:
+	vld1.64	d7,[r1]!		@ load H
+	vmov.i8	q8,#0xe1
+	vld1.64	d6,[r1]
+	vshl.i64	d17,#57
+	vshr.u64	d16,#63		@ t0=0xc2....01
+	vdup.8	q9,d7[7]
+	vshr.u64	d26,d6,#63
+	vshr.s8	q9,#7			@ broadcast carry bit
+	vshl.i64	q3,q3,#1
+	vand	q8,q8,q9
+	vorr	d7,d26		@ H<<<=1
+	veor	q3,q3,q8		@ twisted H
+	vstmia	r0,{q3}
+
+	bx	lr					@ bx lr
+.size	gcm_init_neon,.-gcm_init_neon
+
+.globl	gcm_gmult_neon
+.hidden	gcm_gmult_neon
+.type	gcm_gmult_neon,%function
+.align	4
+gcm_gmult_neon:
+	vld1.64	d7,[r0]!		@ load Xi
+	vld1.64	d6,[r0]!
+	vmov.i64	d29,#0x0000ffffffffffff
+	vldmia	r1,{d26,d27}	@ load twisted H
+	vmov.i64	d30,#0x00000000ffffffff
+#ifdef __ARMEL__
+	vrev64.8	q3,q3
+#endif
+	vmov.i64	d31,#0x000000000000ffff
+	veor	d28,d26,d27		@ Karatsuba pre-processing
+	mov	r3,#16
+	b	.Lgmult_neon
+.size	gcm_gmult_neon,.-gcm_gmult_neon
+
+.globl	gcm_ghash_neon
+.hidden	gcm_ghash_neon
+.type	gcm_ghash_neon,%function
+.align	4
+gcm_ghash_neon:
+	vld1.64	d1,[r0]!		@ load Xi
+	vld1.64	d0,[r0]!
+	vmov.i64	d29,#0x0000ffffffffffff
+	vldmia	r1,{d26,d27}	@ load twisted H
+	vmov.i64	d30,#0x00000000ffffffff
+#ifdef __ARMEL__
+	vrev64.8	q0,q0
+#endif
+	vmov.i64	d31,#0x000000000000ffff
+	veor	d28,d26,d27		@ Karatsuba pre-processing
+
+.Loop_neon:
+	vld1.64	d7,[r2]!		@ load inp
+	vld1.64	d6,[r2]!
+#ifdef __ARMEL__
+	vrev64.8	q3,q3
+#endif
+	veor	q3,q0			@ inp^=Xi
+.Lgmult_neon:
+	vext.8	d16, d26, d26, #1	@ A1
+	vmull.p8	q8, d16, d6		@ F = A1*B
+	vext.8	d0, d6, d6, #1	@ B1
+	vmull.p8	q0, d26, d0		@ E = A*B1
+	vext.8	d18, d26, d26, #2	@ A2
+	vmull.p8	q9, d18, d6		@ H = A2*B
+	vext.8	d22, d6, d6, #2	@ B2
+	vmull.p8	q11, d26, d22		@ G = A*B2
+	vext.8	d20, d26, d26, #3	@ A3
+	veor	q8, q8, q0		@ L = E + F
+	vmull.p8	q10, d20, d6		@ J = A3*B
+	vext.8	d0, d6, d6, #3	@ B3
+	veor	q9, q9, q11		@ M = G + H
+	vmull.p8	q0, d26, d0		@ I = A*B3
+	veor	d16, d16, d17	@ t0 = (L) (P0 + P1) << 8
+	vand	d17, d17, d29
+	vext.8	d22, d6, d6, #4	@ B4
+	veor	d18, d18, d19	@ t1 = (M) (P2 + P3) << 16
+	vand	d19, d19, d30
+	vmull.p8	q11, d26, d22		@ K = A*B4
+	veor	q10, q10, q0		@ N = I + J
+	veor	d16, d16, d17
+	veor	d18, d18, d19
+	veor	d20, d20, d21	@ t2 = (N) (P4 + P5) << 24
+	vand	d21, d21, d31
+	vext.8	q8, q8, q8, #15
+	veor	d22, d22, d23	@ t3 = (K) (P6 + P7) << 32
+	vmov.i64	d23, #0
+	vext.8	q9, q9, q9, #14
+	veor	d20, d20, d21
+	vmull.p8	q0, d26, d6		@ D = A*B
+	vext.8	q11, q11, q11, #12
+	vext.8	q10, q10, q10, #13
+	veor	q8, q8, q9
+	veor	q10, q10, q11
+	veor	q0, q0, q8
+	veor	q0, q0, q10
+	veor	d6,d6,d7	@ Karatsuba pre-processing
+	vext.8	d16, d28, d28, #1	@ A1
+	vmull.p8	q8, d16, d6		@ F = A1*B
+	vext.8	d2, d6, d6, #1	@ B1
+	vmull.p8	q1, d28, d2		@ E = A*B1
+	vext.8	d18, d28, d28, #2	@ A2
+	vmull.p8	q9, d18, d6		@ H = A2*B
+	vext.8	d22, d6, d6, #2	@ B2
+	vmull.p8	q11, d28, d22		@ G = A*B2
+	vext.8	d20, d28, d28, #3	@ A3
+	veor	q8, q8, q1		@ L = E + F
+	vmull.p8	q10, d20, d6		@ J = A3*B
+	vext.8	d2, d6, d6, #3	@ B3
+	veor	q9, q9, q11		@ M = G + H
+	vmull.p8	q1, d28, d2		@ I = A*B3
+	veor	d16, d16, d17	@ t0 = (L) (P0 + P1) << 8
+	vand	d17, d17, d29
+	vext.8	d22, d6, d6, #4	@ B4
+	veor	d18, d18, d19	@ t1 = (M) (P2 + P3) << 16
+	vand	d19, d19, d30
+	vmull.p8	q11, d28, d22		@ K = A*B4
+	veor	q10, q10, q1		@ N = I + J
+	veor	d16, d16, d17
+	veor	d18, d18, d19
+	veor	d20, d20, d21	@ t2 = (N) (P4 + P5) << 24
+	vand	d21, d21, d31
+	vext.8	q8, q8, q8, #15
+	veor	d22, d22, d23	@ t3 = (K) (P6 + P7) << 32
+	vmov.i64	d23, #0
+	vext.8	q9, q9, q9, #14
+	veor	d20, d20, d21
+	vmull.p8	q1, d28, d6		@ D = A*B
+	vext.8	q11, q11, q11, #12
+	vext.8	q10, q10, q10, #13
+	veor	q8, q8, q9
+	veor	q10, q10, q11
+	veor	q1, q1, q8
+	veor	q1, q1, q10
+	vext.8	d16, d27, d27, #1	@ A1
+	vmull.p8	q8, d16, d7		@ F = A1*B
+	vext.8	d4, d7, d7, #1	@ B1
+	vmull.p8	q2, d27, d4		@ E = A*B1
+	vext.8	d18, d27, d27, #2	@ A2
+	vmull.p8	q9, d18, d7		@ H = A2*B
+	vext.8	d22, d7, d7, #2	@ B2
+	vmull.p8	q11, d27, d22		@ G = A*B2
+	vext.8	d20, d27, d27, #3	@ A3
+	veor	q8, q8, q2		@ L = E + F
+	vmull.p8	q10, d20, d7		@ J = A3*B
+	vext.8	d4, d7, d7, #3	@ B3
+	veor	q9, q9, q11		@ M = G + H
+	vmull.p8	q2, d27, d4		@ I = A*B3
+	veor	d16, d16, d17	@ t0 = (L) (P0 + P1) << 8
+	vand	d17, d17, d29
+	vext.8	d22, d7, d7, #4	@ B4
+	veor	d18, d18, d19	@ t1 = (M) (P2 + P3) << 16
+	vand	d19, d19, d30
+	vmull.p8	q11, d27, d22		@ K = A*B4
+	veor	q10, q10, q2		@ N = I + J
+	veor	d16, d16, d17
+	veor	d18, d18, d19
+	veor	d20, d20, d21	@ t2 = (N) (P4 + P5) << 24
+	vand	d21, d21, d31
+	vext.8	q8, q8, q8, #15
+	veor	d22, d22, d23	@ t3 = (K) (P6 + P7) << 32
+	vmov.i64	d23, #0
+	vext.8	q9, q9, q9, #14
+	veor	d20, d20, d21
+	vmull.p8	q2, d27, d7		@ D = A*B
+	vext.8	q11, q11, q11, #12
+	vext.8	q10, q10, q10, #13
+	veor	q8, q8, q9
+	veor	q10, q10, q11
+	veor	q2, q2, q8
+	veor	q2, q2, q10
+	veor	q1,q1,q0		@ Karatsuba post-processing
+	veor	q1,q1,q2
+	veor	d1,d1,d2
+	veor	d4,d4,d3	@ Xh|Xl - 256-bit result
+
+	@ equivalent of reduction_avx from ghash-x86_64.pl
+	vshl.i64	q9,q0,#57		@ 1st phase
+	vshl.i64	q10,q0,#62
+	veor	q10,q10,q9		@
+	vshl.i64	q9,q0,#63
+	veor	q10, q10, q9		@
+	veor	d1,d1,d20	@
+	veor	d4,d4,d21
+
+	vshr.u64	q10,q0,#1		@ 2nd phase
+	veor	q2,q2,q0
+	veor	q0,q0,q10		@
+	vshr.u64	q10,q10,#6
+	vshr.u64	q0,q0,#1		@
+	veor	q0,q0,q2		@
+	veor	q0,q0,q10		@
+
+	subs	r3,#16
+	bne	.Loop_neon
+
+#ifdef __ARMEL__
+	vrev64.8	q0,q0
+#endif
+	sub	r0,#16
+	vst1.64	d1,[r0]!		@ write out Xi
+	vst1.64	d0,[r0]
+
+	bx	lr					@ bx lr
+.size	gcm_ghash_neon,.-gcm_ghash_neon
+#endif
+.byte	71,72,65,83,72,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S
new file mode 100644
index 0000000..bdbbae9
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/modes/ghashv8-armx32.S
@@ -0,0 +1,233 @@
+#if defined(__arm__)
+#include "arm_arch.h"
+
+.text
+.fpu	neon
+.code	32
+.globl	gcm_init_v8
+.type	gcm_init_v8,%function
+.align	4
+gcm_init_v8:
+	vld1.64	{q9},[r1]		@ load input H
+	vmov.i8	q11,#0xe1
+	vshl.i64	q11,q11,#57		@ 0xc2.0
+	vext.8	q3,q9,q9,#8
+	vshr.u64	q10,q11,#63
+	vdup.32	q9,d18[1]
+	vext.8	q8,q10,q11,#8		@ t0=0xc2....01
+	vshr.u64	q10,q3,#63
+	vshr.s32	q9,q9,#31		@ broadcast carry bit
+	vand	q10,q10,q8
+	vshl.i64	q3,q3,#1
+	vext.8	q10,q10,q10,#8
+	vand	q8,q8,q9
+	vorr	q3,q3,q10		@ H<<<=1
+	veor	q12,q3,q8		@ twisted H
+	vst1.64	{q12},[r0]!		@ store Htable[0]
+
+	@ calculate H^2
+	vext.8	q8,q12,q12,#8		@ Karatsuba pre-processing
+.byte	0xa8,0x0e,0xa8,0xf2	@ pmull q0,q12,q12
+	veor	q8,q8,q12
+.byte	0xa9,0x4e,0xa9,0xf2	@ pmull2 q2,q12,q12
+.byte	0xa0,0x2e,0xa0,0xf2	@ pmull q1,q8,q8
+
+	vext.8	q9,q0,q2,#8		@ Karatsuba post-processing
+	veor	q10,q0,q2
+	veor	q1,q1,q9
+	veor	q1,q1,q10
+.byte	0x26,0x4e,0xe0,0xf2	@ pmull q10,q0,q11		@ 1st phase
+
+	vmov	d4,d3		@ Xh|Xm - 256-bit result
+	vmov	d3,d0		@ Xm is rotated Xl
+	veor	q0,q1,q10
+
+	vext.8	q10,q0,q0,#8		@ 2nd phase
+.byte	0x26,0x0e,0xa0,0xf2	@ pmull q0,q0,q11
+	veor	q10,q10,q2
+	veor	q14,q0,q10
+
+	vext.8	q9,q14,q14,#8		@ Karatsuba pre-processing
+	veor	q9,q9,q14
+	vext.8	q13,q8,q9,#8		@ pack Karatsuba pre-processed
+	vst1.64	{q13,q14},[r0]		@ store Htable[1..2]
+
+	bx	lr
+.size	gcm_init_v8,.-gcm_init_v8
+.globl	gcm_gmult_v8
+.type	gcm_gmult_v8,%function
+.align	4
+gcm_gmult_v8:
+	vld1.64	{q9},[r0]		@ load Xi
+	vmov.i8	q11,#0xe1
+	vld1.64	{q12,q13},[r1]	@ load twisted H, ...
+	vshl.u64	q11,q11,#57
+#ifndef __ARMEB__
+	vrev64.8	q9,q9
+#endif
+	vext.8	q3,q9,q9,#8
+
+.byte	0x86,0x0e,0xa8,0xf2	@ pmull q0,q12,q3		@ H.lo·Xi.lo
+	veor	q9,q9,q3		@ Karatsuba pre-processing
+.byte	0x87,0x4e,0xa9,0xf2	@ pmull2 q2,q12,q3		@ H.hi·Xi.hi
+.byte	0xa2,0x2e,0xaa,0xf2	@ pmull q1,q13,q9		@ (H.lo+H.hi)·(Xi.lo+Xi.hi)
+
+	vext.8	q9,q0,q2,#8		@ Karatsuba post-processing
+	veor	q10,q0,q2
+	veor	q1,q1,q9
+	veor	q1,q1,q10
+.byte	0x26,0x4e,0xe0,0xf2	@ pmull q10,q0,q11		@ 1st phase of reduction
+
+	vmov	d4,d3		@ Xh|Xm - 256-bit result
+	vmov	d3,d0		@ Xm is rotated Xl
+	veor	q0,q1,q10
+
+	vext.8	q10,q0,q0,#8		@ 2nd phase of reduction
+.byte	0x26,0x0e,0xa0,0xf2	@ pmull q0,q0,q11
+	veor	q10,q10,q2
+	veor	q0,q0,q10
+
+#ifndef __ARMEB__
+	vrev64.8	q0,q0
+#endif
+	vext.8	q0,q0,q0,#8
+	vst1.64	{q0},[r0]		@ write out Xi
+
+	bx	lr
+.size	gcm_gmult_v8,.-gcm_gmult_v8
+.globl	gcm_ghash_v8
+.type	gcm_ghash_v8,%function
+.align	4
+gcm_ghash_v8:
+	vstmdb	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}		@ 32-bit ABI says so
+	vld1.64	{q0},[r0]		@ load [rotated] Xi
+						@ "[rotated]" means that
+						@ loaded value would have
+						@ to be rotated in order to
+						@ make it appear as in
+						@ alorithm specification
+	subs	r3,r3,#32		@ see if r3 is 32 or larger
+	mov	r12,#16		@ r12 is used as post-
+						@ increment for input pointer;
+						@ as loop is modulo-scheduled
+						@ r12 is zeroed just in time
+						@ to preclude oversteping
+						@ inp[len], which means that
+						@ last block[s] are actually
+						@ loaded twice, but last
+						@ copy is not processed
+	vld1.64	{q12,q13},[r1]!	@ load twisted H, ..., H^2
+	vmov.i8	q11,#0xe1
+	vld1.64	{q14},[r1]
+	moveq	r12,#0			@ is it time to zero r12?
+	vext.8	q0,q0,q0,#8		@ rotate Xi
+	vld1.64	{q8},[r2]!	@ load [rotated] I[0]
+	vshl.u64	q11,q11,#57		@ compose 0xc2.0 constant
+#ifndef __ARMEB__
+	vrev64.8	q8,q8
+	vrev64.8	q0,q0
+#endif
+	vext.8	q3,q8,q8,#8		@ rotate I[0]
+	blo	.Lodd_tail_v8		@ r3 was less than 32
+	vld1.64	{q9},[r2],r12	@ load [rotated] I[1]
+#ifndef __ARMEB__
+	vrev64.8	q9,q9
+#endif
+	vext.8	q7,q9,q9,#8
+	veor	q3,q3,q0		@ I[i]^=Xi
+.byte	0x8e,0x8e,0xa8,0xf2	@ pmull q4,q12,q7		@ H·Ii+1
+	veor	q9,q9,q7		@ Karatsuba pre-processing
+.byte	0x8f,0xce,0xa9,0xf2	@ pmull2 q6,q12,q7
+	b	.Loop_mod2x_v8
+
+.align	4
+.Loop_mod2x_v8:
+	vext.8	q10,q3,q3,#8
+	subs	r3,r3,#32		@ is there more data?
+.byte	0x86,0x0e,0xac,0xf2	@ pmull q0,q14,q3		@ H^2.lo·Xi.lo
+	movlo	r12,#0			@ is it time to zero r12?
+
+.byte	0xa2,0xae,0xaa,0xf2	@ pmull q5,q13,q9
+	veor	q10,q10,q3		@ Karatsuba pre-processing
+.byte	0x87,0x4e,0xad,0xf2	@ pmull2 q2,q14,q3		@ H^2.hi·Xi.hi
+	veor	q0,q0,q4		@ accumulate
+.byte	0xa5,0x2e,0xab,0xf2	@ pmull2 q1,q13,q10		@ (H^2.lo+H^2.hi)·(Xi.lo+Xi.hi)
+	vld1.64	{q8},[r2],r12	@ load [rotated] I[i+2]
+
+	veor	q2,q2,q6
+	moveq	r12,#0			@ is it time to zero r12?
+	veor	q1,q1,q5
+
+	vext.8	q9,q0,q2,#8		@ Karatsuba post-processing
+	veor	q10,q0,q2
+	veor	q1,q1,q9
+	vld1.64	{q9},[r2],r12	@ load [rotated] I[i+3]
+#ifndef __ARMEB__
+	vrev64.8	q8,q8
+#endif
+	veor	q1,q1,q10
+.byte	0x26,0x4e,0xe0,0xf2	@ pmull q10,q0,q11		@ 1st phase of reduction
+
+#ifndef __ARMEB__
+	vrev64.8	q9,q9
+#endif
+	vmov	d4,d3		@ Xh|Xm - 256-bit result
+	vmov	d3,d0		@ Xm is rotated Xl
+	vext.8	q7,q9,q9,#8
+	vext.8	q3,q8,q8,#8
+	veor	q0,q1,q10
+.byte	0x8e,0x8e,0xa8,0xf2	@ pmull q4,q12,q7		@ H·Ii+1
+	veor	q3,q3,q2		@ accumulate q3 early
+
+	vext.8	q10,q0,q0,#8		@ 2nd phase of reduction
+.byte	0x26,0x0e,0xa0,0xf2	@ pmull q0,q0,q11
+	veor	q3,q3,q10
+	veor	q9,q9,q7		@ Karatsuba pre-processing
+	veor	q3,q3,q0
+.byte	0x8f,0xce,0xa9,0xf2	@ pmull2 q6,q12,q7
+	bhs	.Loop_mod2x_v8		@ there was at least 32 more bytes
+
+	veor	q2,q2,q10
+	vext.8	q3,q8,q8,#8		@ re-construct q3
+	adds	r3,r3,#32		@ re-construct r3
+	veor	q0,q0,q2		@ re-construct q0
+	beq	.Ldone_v8		@ is r3 zero?
+.Lodd_tail_v8:
+	vext.8	q10,q0,q0,#8
+	veor	q3,q3,q0		@ inp^=Xi
+	veor	q9,q8,q10		@ q9 is rotated inp^Xi
+
+.byte	0x86,0x0e,0xa8,0xf2	@ pmull q0,q12,q3		@ H.lo·Xi.lo
+	veor	q9,q9,q3		@ Karatsuba pre-processing
+.byte	0x87,0x4e,0xa9,0xf2	@ pmull2 q2,q12,q3		@ H.hi·Xi.hi
+.byte	0xa2,0x2e,0xaa,0xf2	@ pmull q1,q13,q9		@ (H.lo+H.hi)·(Xi.lo+Xi.hi)
+
+	vext.8	q9,q0,q2,#8		@ Karatsuba post-processing
+	veor	q10,q0,q2
+	veor	q1,q1,q9
+	veor	q1,q1,q10
+.byte	0x26,0x4e,0xe0,0xf2	@ pmull q10,q0,q11		@ 1st phase of reduction
+
+	vmov	d4,d3		@ Xh|Xm - 256-bit result
+	vmov	d3,d0		@ Xm is rotated Xl
+	veor	q0,q1,q10
+
+	vext.8	q10,q0,q0,#8		@ 2nd phase of reduction
+.byte	0x26,0x0e,0xa0,0xf2	@ pmull q0,q0,q11
+	veor	q10,q10,q2
+	veor	q0,q0,q10
+
+.Ldone_v8:
+#ifndef __ARMEB__
+	vrev64.8	q0,q0
+#endif
+	vext.8	q0,q0,q0,#8
+	vst1.64	{q0},[r0]		@ write out Xi
+
+	vldmia	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}		@ 32-bit ABI says so
+	bx	lr
+.size	gcm_ghash_v8,.-gcm_ghash_v8
+.byte	71,72,65,83,72,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
new file mode 100644
index 0000000..4911458
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha1-armv4-large.S
@@ -0,0 +1,1462 @@
+#if defined(__arm__)
+#include "arm_arch.h"
+
+.text
+.code	32
+
+.globl	sha1_block_data_order
+.type	sha1_block_data_order,%function
+
+.align	5
+sha1_block_data_order:
+#if __ARM_MAX_ARCH__>=7
+	sub	r3,pc,#8		@ sha1_block_data_order
+	ldr	r12,.LOPENSSL_armcap
+	ldr	r12,[r3,r12]		@ OPENSSL_armcap_P
+#ifdef	__APPLE__
+	ldr	r12,[r12]
+#endif
+	tst	r12,#ARMV8_SHA1
+	bne	.LARMv8
+	tst	r12,#ARMV7_NEON
+	bne	.LNEON
+#endif
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	add	r2,r1,r2,lsl#6	@ r2 to point at the end of r1
+	ldmia	r0,{r3,r4,r5,r6,r7}
+.Lloop:
+	ldr	r8,.LK_00_19
+	mov	r14,sp
+	sub	sp,sp,#15*4
+	mov	r5,r5,ror#30
+	mov	r6,r6,ror#30
+	mov	r7,r7,ror#30		@ [6]
+.L_00_15:
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r7,r8,r7,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r5,r6			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r7,r8,r7,ror#2			@ E+=K_00_19
+	eor	r10,r5,r6			@ F_xx_xx
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r4,r10,ror#2
+	add	r7,r7,r9			@ E+=X[i]
+	eor	r10,r10,r6,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r7,r7,r10			@ E+=F_00_19(B,C,D)
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r6,r8,r6,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r4,r5			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r6,r6,r7,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r6,r8,r6,ror#2			@ E+=K_00_19
+	eor	r10,r4,r5			@ F_xx_xx
+	add	r6,r6,r7,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r3,r10,ror#2
+	add	r6,r6,r9			@ E+=X[i]
+	eor	r10,r10,r5,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r6,r6,r10			@ E+=F_00_19(B,C,D)
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r5,r8,r5,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r3,r4			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r5,r5,r6,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r5,r8,r5,ror#2			@ E+=K_00_19
+	eor	r10,r3,r4			@ F_xx_xx
+	add	r5,r5,r6,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r7,r10,ror#2
+	add	r5,r5,r9			@ E+=X[i]
+	eor	r10,r10,r4,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r5,r5,r10			@ E+=F_00_19(B,C,D)
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r4,r8,r4,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r7,r3			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r4,r4,r5,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r4,r8,r4,ror#2			@ E+=K_00_19
+	eor	r10,r7,r3			@ F_xx_xx
+	add	r4,r4,r5,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r6,r10,ror#2
+	add	r4,r4,r9			@ E+=X[i]
+	eor	r10,r10,r3,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r4,r4,r10			@ E+=F_00_19(B,C,D)
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r3,r8,r3,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r6,r7			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r3,r3,r4,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r3,r8,r3,ror#2			@ E+=K_00_19
+	eor	r10,r6,r7			@ F_xx_xx
+	add	r3,r3,r4,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r5,r10,ror#2
+	add	r3,r3,r9			@ E+=X[i]
+	eor	r10,r10,r7,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r3,r3,r10			@ E+=F_00_19(B,C,D)
+	teq	r14,sp
+	bne	.L_00_15		@ [((11+4)*5+2)*3]
+	sub	sp,sp,#25*4
+#if __ARM_ARCH__<7
+	ldrb	r10,[r1,#2]
+	ldrb	r9,[r1,#3]
+	ldrb	r11,[r1,#1]
+	add	r7,r8,r7,ror#2			@ E+=K_00_19
+	ldrb	r12,[r1],#4
+	orr	r9,r9,r10,lsl#8
+	eor	r10,r5,r6			@ F_xx_xx
+	orr	r9,r9,r11,lsl#16
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+	orr	r9,r9,r12,lsl#24
+#else
+	ldr	r9,[r1],#4			@ handles unaligned
+	add	r7,r8,r7,ror#2			@ E+=K_00_19
+	eor	r10,r5,r6			@ F_xx_xx
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+#ifdef __ARMEL__
+	rev	r9,r9				@ byte swap
+#endif
+#endif
+	and	r10,r4,r10,ror#2
+	add	r7,r7,r9			@ E+=X[i]
+	eor	r10,r10,r6,ror#2		@ F_00_19(B,C,D)
+	str	r9,[r14,#-4]!
+	add	r7,r7,r10			@ E+=F_00_19(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r6,r8,r6,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r4,r5			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r6,r6,r7,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r3,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r6,r6,r9			@ E+=X[i]
+	eor	r10,r10,r5,ror#2		@ F_00_19(B,C,D)
+	add	r6,r6,r10			@ E+=F_00_19(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r5,r8,r5,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r3,r4			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r5,r5,r6,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r7,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r5,r5,r9			@ E+=X[i]
+	eor	r10,r10,r4,ror#2		@ F_00_19(B,C,D)
+	add	r5,r5,r10			@ E+=F_00_19(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r4,r8,r4,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r7,r3			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r4,r4,r5,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r6,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r4,r4,r9			@ E+=X[i]
+	eor	r10,r10,r3,ror#2		@ F_00_19(B,C,D)
+	add	r4,r4,r10			@ E+=F_00_19(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r3,r8,r3,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r6,r7			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r3,r3,r4,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r5,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r3,r3,r9			@ E+=X[i]
+	eor	r10,r10,r7,ror#2		@ F_00_19(B,C,D)
+	add	r3,r3,r10			@ E+=F_00_19(B,C,D)
+
+	ldr	r8,.LK_20_39		@ [+15+16*4]
+	cmn	sp,#0			@ [+3], clear carry to denote 20_39
+.L_20_39_or_60_79:
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r7,r8,r7,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r5,r6			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	eor	r10,r4,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r7,r7,r9			@ E+=X[i]
+	add	r7,r7,r10			@ E+=F_20_39(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r6,r8,r6,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r4,r5			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r6,r6,r7,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	eor	r10,r3,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r6,r6,r9			@ E+=X[i]
+	add	r6,r6,r10			@ E+=F_20_39(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r5,r8,r5,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r3,r4			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r5,r5,r6,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	eor	r10,r7,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r5,r5,r9			@ E+=X[i]
+	add	r5,r5,r10			@ E+=F_20_39(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r4,r8,r4,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r7,r3			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r4,r4,r5,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	eor	r10,r6,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r4,r4,r9			@ E+=X[i]
+	add	r4,r4,r10			@ E+=F_20_39(B,C,D)
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r3,r8,r3,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r6,r7			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r3,r3,r4,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	eor	r10,r5,r10,ror#2					@ F_xx_xx
+						@ F_xx_xx
+	add	r3,r3,r9			@ E+=X[i]
+	add	r3,r3,r10			@ E+=F_20_39(B,C,D)
+	teq	r14,sp			@ preserve carry
+	bne	.L_20_39_or_60_79	@ [+((12+3)*5+2)*4]
+	bcs	.L_done			@ [+((12+3)*5+2)*4], spare 300 bytes
+
+	ldr	r8,.LK_40_59
+	sub	sp,sp,#20*4		@ [+2]
+.L_40_59:
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r7,r8,r7,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r5,r6			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r7,r7,r3,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r4,r10,ror#2					@ F_xx_xx
+	and	r11,r5,r6					@ F_xx_xx
+	add	r7,r7,r9			@ E+=X[i]
+	add	r7,r7,r10			@ E+=F_40_59(B,C,D)
+	add	r7,r7,r11,ror#2
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r6,r8,r6,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r4,r5			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r6,r6,r7,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r3,r10,ror#2					@ F_xx_xx
+	and	r11,r4,r5					@ F_xx_xx
+	add	r6,r6,r9			@ E+=X[i]
+	add	r6,r6,r10			@ E+=F_40_59(B,C,D)
+	add	r6,r6,r11,ror#2
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r5,r8,r5,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r3,r4			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r5,r5,r6,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r7,r10,ror#2					@ F_xx_xx
+	and	r11,r3,r4					@ F_xx_xx
+	add	r5,r5,r9			@ E+=X[i]
+	add	r5,r5,r10			@ E+=F_40_59(B,C,D)
+	add	r5,r5,r11,ror#2
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r4,r8,r4,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r7,r3			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r4,r4,r5,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r6,r10,ror#2					@ F_xx_xx
+	and	r11,r7,r3					@ F_xx_xx
+	add	r4,r4,r9			@ E+=X[i]
+	add	r4,r4,r10			@ E+=F_40_59(B,C,D)
+	add	r4,r4,r11,ror#2
+	ldr	r9,[r14,#15*4]
+	ldr	r10,[r14,#13*4]
+	ldr	r11,[r14,#7*4]
+	add	r3,r8,r3,ror#2			@ E+=K_xx_xx
+	ldr	r12,[r14,#2*4]
+	eor	r9,r9,r10
+	eor	r11,r11,r12			@ 1 cycle stall
+	eor	r10,r6,r7			@ F_xx_xx
+	mov	r9,r9,ror#31
+	add	r3,r3,r4,ror#27			@ E+=ROR(A,27)
+	eor	r9,r9,r11,ror#31
+	str	r9,[r14,#-4]!
+	and	r10,r5,r10,ror#2					@ F_xx_xx
+	and	r11,r6,r7					@ F_xx_xx
+	add	r3,r3,r9			@ E+=X[i]
+	add	r3,r3,r10			@ E+=F_40_59(B,C,D)
+	add	r3,r3,r11,ror#2
+	teq	r14,sp
+	bne	.L_40_59		@ [+((12+5)*5+2)*4]
+
+	ldr	r8,.LK_60_79
+	sub	sp,sp,#20*4
+	cmp	sp,#0			@ set carry to denote 60_79
+	b	.L_20_39_or_60_79	@ [+4], spare 300 bytes
+.L_done:
+	add	sp,sp,#80*4		@ "deallocate" stack frame
+	ldmia	r0,{r8,r9,r10,r11,r12}
+	add	r3,r8,r3
+	add	r4,r9,r4
+	add	r5,r10,r5,ror#2
+	add	r6,r11,r6,ror#2
+	add	r7,r12,r7,ror#2
+	stmia	r0,{r3,r4,r5,r6,r7}
+	teq	r1,r2
+	bne	.Lloop			@ [+18], total 1307
+
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	sha1_block_data_order,.-sha1_block_data_order
+
+.align	5
+.LK_00_19:.word	0x5a827999
+.LK_20_39:.word	0x6ed9eba1
+.LK_40_59:.word	0x8f1bbcdc
+.LK_60_79:.word	0xca62c1d6
+#if __ARM_MAX_ARCH__>=7
+.LOPENSSL_armcap:
+.word	OPENSSL_armcap_P-sha1_block_data_order
+#endif
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	5
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.type	sha1_block_data_order_neon,%function
+.align	4
+sha1_block_data_order_neon:
+.LNEON:
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	add	r2,r1,r2,lsl#6	@ r2 to point at the end of r1
+	@ dmb				@ errata #451034 on early Cortex A8
+	@ vstmdb	sp!,{d8-d15}	@ ABI specification says so
+	mov	r14,sp
+	sub	sp,sp,#64		@ alloca
+	adr	r8,.LK_00_19
+	bic	sp,sp,#15		@ align for 128-bit stores
+
+	ldmia	r0,{r3,r4,r5,r6,r7}	@ load context
+	mov	r12,sp
+
+	vld1.8	{q0,q1},[r1]!	@ handles unaligned
+	veor	q15,q15,q15
+	vld1.8	{q2,q3},[r1]!
+	vld1.32	{d28[],d29[]},[r8,:32]!	@ load K_00_19
+	vrev32.8	q0,q0		@ yes, even on
+	vrev32.8	q1,q1		@ big-endian...
+	vrev32.8	q2,q2
+	vadd.i32	q8,q0,q14
+	vrev32.8	q3,q3
+	vadd.i32	q9,q1,q14
+	vst1.32	{q8},[r12,:128]!
+	vadd.i32	q10,q2,q14
+	vst1.32	{q9},[r12,:128]!
+	vst1.32	{q10},[r12,:128]!
+	ldr	r9,[sp]			@ big RAW stall
+
+.Loop_neon:
+	vext.8	q8,q0,q1,#8
+	bic	r10,r6,r4
+	add	r7,r7,r9
+	and	r11,r5,r4
+	vadd.i32	q13,q3,q14
+	ldr	r9,[sp,#4]
+	add	r7,r7,r3,ror#27
+	vext.8	q12,q3,q15,#4
+	eor	r11,r11,r10
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	veor	q8,q8,q0
+	bic	r10,r5,r3
+	add	r6,r6,r9
+	veor	q12,q12,q2
+	and	r11,r4,r3
+	ldr	r9,[sp,#8]
+	veor	q12,q12,q8
+	add	r6,r6,r7,ror#27
+	eor	r11,r11,r10
+	vst1.32	{q13},[r12,:128]!
+	sub	r12,r12,#64
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vext.8	q13,q15,q12,#4
+	bic	r10,r4,r7
+	add	r5,r5,r9
+	vadd.i32	q8,q12,q12
+	and	r11,r3,r7
+	ldr	r9,[sp,#12]
+	vsri.32	q8,q12,#31
+	add	r5,r5,r6,ror#27
+	eor	r11,r11,r10
+	mov	r7,r7,ror#2
+	vshr.u32	q12,q13,#30
+	add	r5,r5,r11
+	bic	r10,r3,r6
+	vshl.u32	q13,q13,#2
+	add	r4,r4,r9
+	and	r11,r7,r6
+	veor	q8,q8,q12
+	ldr	r9,[sp,#16]
+	add	r4,r4,r5,ror#27
+	veor	q8,q8,q13
+	eor	r11,r11,r10
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vext.8	q9,q1,q2,#8
+	bic	r10,r7,r5
+	add	r3,r3,r9
+	and	r11,r6,r5
+	vadd.i32	q13,q8,q14
+	ldr	r9,[sp,#20]
+	vld1.32	{d28[],d29[]},[r8,:32]!
+	add	r3,r3,r4,ror#27
+	vext.8	q12,q8,q15,#4
+	eor	r11,r11,r10
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	veor	q9,q9,q1
+	bic	r10,r6,r4
+	add	r7,r7,r9
+	veor	q12,q12,q3
+	and	r11,r5,r4
+	ldr	r9,[sp,#24]
+	veor	q12,q12,q9
+	add	r7,r7,r3,ror#27
+	eor	r11,r11,r10
+	vst1.32	{q13},[r12,:128]!
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vext.8	q13,q15,q12,#4
+	bic	r10,r5,r3
+	add	r6,r6,r9
+	vadd.i32	q9,q12,q12
+	and	r11,r4,r3
+	ldr	r9,[sp,#28]
+	vsri.32	q9,q12,#31
+	add	r6,r6,r7,ror#27
+	eor	r11,r11,r10
+	mov	r3,r3,ror#2
+	vshr.u32	q12,q13,#30
+	add	r6,r6,r11
+	bic	r10,r4,r7
+	vshl.u32	q13,q13,#2
+	add	r5,r5,r9
+	and	r11,r3,r7
+	veor	q9,q9,q12
+	ldr	r9,[sp,#32]
+	add	r5,r5,r6,ror#27
+	veor	q9,q9,q13
+	eor	r11,r11,r10
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	vext.8	q10,q2,q3,#8
+	bic	r10,r3,r6
+	add	r4,r4,r9
+	and	r11,r7,r6
+	vadd.i32	q13,q9,q14
+	ldr	r9,[sp,#36]
+	add	r4,r4,r5,ror#27
+	vext.8	q12,q9,q15,#4
+	eor	r11,r11,r10
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	veor	q10,q10,q2
+	bic	r10,r7,r5
+	add	r3,r3,r9
+	veor	q12,q12,q8
+	and	r11,r6,r5
+	ldr	r9,[sp,#40]
+	veor	q12,q12,q10
+	add	r3,r3,r4,ror#27
+	eor	r11,r11,r10
+	vst1.32	{q13},[r12,:128]!
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	vext.8	q13,q15,q12,#4
+	bic	r10,r6,r4
+	add	r7,r7,r9
+	vadd.i32	q10,q12,q12
+	and	r11,r5,r4
+	ldr	r9,[sp,#44]
+	vsri.32	q10,q12,#31
+	add	r7,r7,r3,ror#27
+	eor	r11,r11,r10
+	mov	r4,r4,ror#2
+	vshr.u32	q12,q13,#30
+	add	r7,r7,r11
+	bic	r10,r5,r3
+	vshl.u32	q13,q13,#2
+	add	r6,r6,r9
+	and	r11,r4,r3
+	veor	q10,q10,q12
+	ldr	r9,[sp,#48]
+	add	r6,r6,r7,ror#27
+	veor	q10,q10,q13
+	eor	r11,r11,r10
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vext.8	q11,q3,q8,#8
+	bic	r10,r4,r7
+	add	r5,r5,r9
+	and	r11,r3,r7
+	vadd.i32	q13,q10,q14
+	ldr	r9,[sp,#52]
+	add	r5,r5,r6,ror#27
+	vext.8	q12,q10,q15,#4
+	eor	r11,r11,r10
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	veor	q11,q11,q3
+	bic	r10,r3,r6
+	add	r4,r4,r9
+	veor	q12,q12,q9
+	and	r11,r7,r6
+	ldr	r9,[sp,#56]
+	veor	q12,q12,q11
+	add	r4,r4,r5,ror#27
+	eor	r11,r11,r10
+	vst1.32	{q13},[r12,:128]!
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vext.8	q13,q15,q12,#4
+	bic	r10,r7,r5
+	add	r3,r3,r9
+	vadd.i32	q11,q12,q12
+	and	r11,r6,r5
+	ldr	r9,[sp,#60]
+	vsri.32	q11,q12,#31
+	add	r3,r3,r4,ror#27
+	eor	r11,r11,r10
+	mov	r5,r5,ror#2
+	vshr.u32	q12,q13,#30
+	add	r3,r3,r11
+	bic	r10,r6,r4
+	vshl.u32	q13,q13,#2
+	add	r7,r7,r9
+	and	r11,r5,r4
+	veor	q11,q11,q12
+	ldr	r9,[sp,#0]
+	add	r7,r7,r3,ror#27
+	veor	q11,q11,q13
+	eor	r11,r11,r10
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vext.8	q12,q10,q11,#8
+	bic	r10,r5,r3
+	add	r6,r6,r9
+	and	r11,r4,r3
+	veor	q0,q0,q8
+	ldr	r9,[sp,#4]
+	add	r6,r6,r7,ror#27
+	veor	q0,q0,q1
+	eor	r11,r11,r10
+	mov	r3,r3,ror#2
+	vadd.i32	q13,q11,q14
+	add	r6,r6,r11
+	bic	r10,r4,r7
+	veor	q12,q12,q0
+	add	r5,r5,r9
+	and	r11,r3,r7
+	vshr.u32	q0,q12,#30
+	ldr	r9,[sp,#8]
+	add	r5,r5,r6,ror#27
+	vst1.32	{q13},[r12,:128]!
+	sub	r12,r12,#64
+	eor	r11,r11,r10
+	mov	r7,r7,ror#2
+	vsli.32	q0,q12,#2
+	add	r5,r5,r11
+	bic	r10,r3,r6
+	add	r4,r4,r9
+	and	r11,r7,r6
+	ldr	r9,[sp,#12]
+	add	r4,r4,r5,ror#27
+	eor	r11,r11,r10
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	bic	r10,r7,r5
+	add	r3,r3,r9
+	and	r11,r6,r5
+	ldr	r9,[sp,#16]
+	add	r3,r3,r4,ror#27
+	eor	r11,r11,r10
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	vext.8	q12,q11,q0,#8
+	eor	r10,r4,r6
+	add	r7,r7,r9
+	ldr	r9,[sp,#20]
+	veor	q1,q1,q9
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	veor	q1,q1,q2
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vadd.i32	q13,q0,q14
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	veor	q12,q12,q1
+	ldr	r9,[sp,#24]
+	eor	r11,r10,r4
+	vshr.u32	q1,q12,#30
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	vst1.32	{q13},[r12,:128]!
+	add	r6,r6,r11
+	eor	r10,r7,r4
+	vsli.32	q1,q12,#2
+	add	r5,r5,r9
+	ldr	r9,[sp,#28]
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	ldr	r9,[sp,#32]
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vext.8	q12,q0,q1,#8
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	ldr	r9,[sp,#36]
+	veor	q2,q2,q10
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	veor	q2,q2,q3
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	vadd.i32	q13,q1,q14
+	eor	r10,r4,r6
+	vld1.32	{d28[],d29[]},[r8,:32]!
+	add	r7,r7,r9
+	veor	q12,q12,q2
+	ldr	r9,[sp,#40]
+	eor	r11,r10,r5
+	vshr.u32	q2,q12,#30
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	vst1.32	{q13},[r12,:128]!
+	add	r7,r7,r11
+	eor	r10,r3,r5
+	vsli.32	q2,q12,#2
+	add	r6,r6,r9
+	ldr	r9,[sp,#44]
+	eor	r11,r10,r4
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	ldr	r9,[sp,#48]
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	vext.8	q12,q1,q2,#8
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	ldr	r9,[sp,#52]
+	veor	q3,q3,q11
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	veor	q3,q3,q8
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vadd.i32	q13,q2,q14
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	veor	q12,q12,q3
+	ldr	r9,[sp,#56]
+	eor	r11,r10,r6
+	vshr.u32	q3,q12,#30
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	vst1.32	{q13},[r12,:128]!
+	add	r3,r3,r11
+	eor	r10,r4,r6
+	vsli.32	q3,q12,#2
+	add	r7,r7,r9
+	ldr	r9,[sp,#60]
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	ldr	r9,[sp,#0]
+	eor	r11,r10,r4
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vext.8	q12,q2,q3,#8
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	ldr	r9,[sp,#4]
+	veor	q8,q8,q0
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	veor	q8,q8,q9
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	vadd.i32	q13,q3,q14
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	veor	q12,q12,q8
+	ldr	r9,[sp,#8]
+	eor	r11,r10,r7
+	vshr.u32	q8,q12,#30
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	vst1.32	{q13},[r12,:128]!
+	sub	r12,r12,#64
+	add	r4,r4,r11
+	eor	r10,r5,r7
+	vsli.32	q8,q12,#2
+	add	r3,r3,r9
+	ldr	r9,[sp,#12]
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	eor	r10,r4,r6
+	add	r7,r7,r9
+	ldr	r9,[sp,#16]
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vext.8	q12,q3,q8,#8
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	ldr	r9,[sp,#20]
+	veor	q9,q9,q1
+	eor	r11,r10,r4
+	add	r6,r6,r7,ror#27
+	veor	q9,q9,q10
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vadd.i32	q13,q8,q14
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	veor	q12,q12,q9
+	ldr	r9,[sp,#24]
+	eor	r11,r10,r3
+	vshr.u32	q9,q12,#30
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	vst1.32	{q13},[r12,:128]!
+	add	r5,r5,r11
+	eor	r10,r6,r3
+	vsli.32	q9,q12,#2
+	add	r4,r4,r9
+	ldr	r9,[sp,#28]
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	ldr	r9,[sp,#32]
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	vext.8	q12,q8,q9,#8
+	add	r7,r7,r9
+	and	r10,r5,r6
+	ldr	r9,[sp,#36]
+	veor	q10,q10,q2
+	add	r7,r7,r3,ror#27
+	eor	r11,r5,r6
+	veor	q10,q10,q11
+	add	r7,r7,r10
+	and	r11,r11,r4
+	vadd.i32	q13,q9,q14
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	veor	q12,q12,q10
+	add	r6,r6,r9
+	and	r10,r4,r5
+	vshr.u32	q10,q12,#30
+	ldr	r9,[sp,#40]
+	add	r6,r6,r7,ror#27
+	vst1.32	{q13},[r12,:128]!
+	eor	r11,r4,r5
+	add	r6,r6,r10
+	vsli.32	q10,q12,#2
+	and	r11,r11,r3
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	add	r5,r5,r9
+	and	r10,r3,r4
+	ldr	r9,[sp,#44]
+	add	r5,r5,r6,ror#27
+	eor	r11,r3,r4
+	add	r5,r5,r10
+	and	r11,r11,r7
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	add	r4,r4,r9
+	and	r10,r7,r3
+	ldr	r9,[sp,#48]
+	add	r4,r4,r5,ror#27
+	eor	r11,r7,r3
+	add	r4,r4,r10
+	and	r11,r11,r6
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vext.8	q12,q9,q10,#8
+	add	r3,r3,r9
+	and	r10,r6,r7
+	ldr	r9,[sp,#52]
+	veor	q11,q11,q3
+	add	r3,r3,r4,ror#27
+	eor	r11,r6,r7
+	veor	q11,q11,q0
+	add	r3,r3,r10
+	and	r11,r11,r5
+	vadd.i32	q13,q10,q14
+	mov	r5,r5,ror#2
+	vld1.32	{d28[],d29[]},[r8,:32]!
+	add	r3,r3,r11
+	veor	q12,q12,q11
+	add	r7,r7,r9
+	and	r10,r5,r6
+	vshr.u32	q11,q12,#30
+	ldr	r9,[sp,#56]
+	add	r7,r7,r3,ror#27
+	vst1.32	{q13},[r12,:128]!
+	eor	r11,r5,r6
+	add	r7,r7,r10
+	vsli.32	q11,q12,#2
+	and	r11,r11,r4
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	add	r6,r6,r9
+	and	r10,r4,r5
+	ldr	r9,[sp,#60]
+	add	r6,r6,r7,ror#27
+	eor	r11,r4,r5
+	add	r6,r6,r10
+	and	r11,r11,r3
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	add	r5,r5,r9
+	and	r10,r3,r4
+	ldr	r9,[sp,#0]
+	add	r5,r5,r6,ror#27
+	eor	r11,r3,r4
+	add	r5,r5,r10
+	and	r11,r11,r7
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	vext.8	q12,q10,q11,#8
+	add	r4,r4,r9
+	and	r10,r7,r3
+	ldr	r9,[sp,#4]
+	veor	q0,q0,q8
+	add	r4,r4,r5,ror#27
+	eor	r11,r7,r3
+	veor	q0,q0,q1
+	add	r4,r4,r10
+	and	r11,r11,r6
+	vadd.i32	q13,q11,q14
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	veor	q12,q12,q0
+	add	r3,r3,r9
+	and	r10,r6,r7
+	vshr.u32	q0,q12,#30
+	ldr	r9,[sp,#8]
+	add	r3,r3,r4,ror#27
+	vst1.32	{q13},[r12,:128]!
+	sub	r12,r12,#64
+	eor	r11,r6,r7
+	add	r3,r3,r10
+	vsli.32	q0,q12,#2
+	and	r11,r11,r5
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	add	r7,r7,r9
+	and	r10,r5,r6
+	ldr	r9,[sp,#12]
+	add	r7,r7,r3,ror#27
+	eor	r11,r5,r6
+	add	r7,r7,r10
+	and	r11,r11,r4
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	add	r6,r6,r9
+	and	r10,r4,r5
+	ldr	r9,[sp,#16]
+	add	r6,r6,r7,ror#27
+	eor	r11,r4,r5
+	add	r6,r6,r10
+	and	r11,r11,r3
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vext.8	q12,q11,q0,#8
+	add	r5,r5,r9
+	and	r10,r3,r4
+	ldr	r9,[sp,#20]
+	veor	q1,q1,q9
+	add	r5,r5,r6,ror#27
+	eor	r11,r3,r4
+	veor	q1,q1,q2
+	add	r5,r5,r10
+	and	r11,r11,r7
+	vadd.i32	q13,q0,q14
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	veor	q12,q12,q1
+	add	r4,r4,r9
+	and	r10,r7,r3
+	vshr.u32	q1,q12,#30
+	ldr	r9,[sp,#24]
+	add	r4,r4,r5,ror#27
+	vst1.32	{q13},[r12,:128]!
+	eor	r11,r7,r3
+	add	r4,r4,r10
+	vsli.32	q1,q12,#2
+	and	r11,r11,r6
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	add	r3,r3,r9
+	and	r10,r6,r7
+	ldr	r9,[sp,#28]
+	add	r3,r3,r4,ror#27
+	eor	r11,r6,r7
+	add	r3,r3,r10
+	and	r11,r11,r5
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	add	r7,r7,r9
+	and	r10,r5,r6
+	ldr	r9,[sp,#32]
+	add	r7,r7,r3,ror#27
+	eor	r11,r5,r6
+	add	r7,r7,r10
+	and	r11,r11,r4
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vext.8	q12,q0,q1,#8
+	add	r6,r6,r9
+	and	r10,r4,r5
+	ldr	r9,[sp,#36]
+	veor	q2,q2,q10
+	add	r6,r6,r7,ror#27
+	eor	r11,r4,r5
+	veor	q2,q2,q3
+	add	r6,r6,r10
+	and	r11,r11,r3
+	vadd.i32	q13,q1,q14
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	veor	q12,q12,q2
+	add	r5,r5,r9
+	and	r10,r3,r4
+	vshr.u32	q2,q12,#30
+	ldr	r9,[sp,#40]
+	add	r5,r5,r6,ror#27
+	vst1.32	{q13},[r12,:128]!
+	eor	r11,r3,r4
+	add	r5,r5,r10
+	vsli.32	q2,q12,#2
+	and	r11,r11,r7
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	add	r4,r4,r9
+	and	r10,r7,r3
+	ldr	r9,[sp,#44]
+	add	r4,r4,r5,ror#27
+	eor	r11,r7,r3
+	add	r4,r4,r10
+	and	r11,r11,r6
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	add	r3,r3,r9
+	and	r10,r6,r7
+	ldr	r9,[sp,#48]
+	add	r3,r3,r4,ror#27
+	eor	r11,r6,r7
+	add	r3,r3,r10
+	and	r11,r11,r5
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	vext.8	q12,q1,q2,#8
+	eor	r10,r4,r6
+	add	r7,r7,r9
+	ldr	r9,[sp,#52]
+	veor	q3,q3,q11
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	veor	q3,q3,q8
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vadd.i32	q13,q2,q14
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	veor	q12,q12,q3
+	ldr	r9,[sp,#56]
+	eor	r11,r10,r4
+	vshr.u32	q3,q12,#30
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	vst1.32	{q13},[r12,:128]!
+	add	r6,r6,r11
+	eor	r10,r7,r4
+	vsli.32	q3,q12,#2
+	add	r5,r5,r9
+	ldr	r9,[sp,#60]
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	ldr	r9,[sp,#0]
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	vadd.i32	q13,q3,q14
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	vst1.32	{q13},[r12,:128]!
+	sub	r12,r12,#64
+	teq	r1,r2
+	sub	r8,r8,#16
+	subeq	r1,r1,#64
+	vld1.8	{q0,q1},[r1]!
+	ldr	r9,[sp,#4]
+	eor	r11,r10,r6
+	vld1.8	{q2,q3},[r1]!
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	vld1.32	{d28[],d29[]},[r8,:32]!
+	add	r3,r3,r11
+	eor	r10,r4,r6
+	vrev32.8	q0,q0
+	add	r7,r7,r9
+	ldr	r9,[sp,#8]
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	ldr	r9,[sp,#12]
+	eor	r11,r10,r4
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	ldr	r9,[sp,#16]
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	vrev32.8	q1,q1
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	vadd.i32	q8,q0,q14
+	ldr	r9,[sp,#20]
+	eor	r11,r10,r7
+	vst1.32	{q8},[r12,:128]!
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	ldr	r9,[sp,#24]
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	eor	r10,r4,r6
+	add	r7,r7,r9
+	ldr	r9,[sp,#28]
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	ldr	r9,[sp,#32]
+	eor	r11,r10,r4
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	vrev32.8	q2,q2
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	vadd.i32	q9,q1,q14
+	ldr	r9,[sp,#36]
+	eor	r11,r10,r3
+	vst1.32	{q9},[r12,:128]!
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	ldr	r9,[sp,#40]
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	ldr	r9,[sp,#44]
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	eor	r10,r4,r6
+	add	r7,r7,r9
+	ldr	r9,[sp,#48]
+	eor	r11,r10,r5
+	add	r7,r7,r3,ror#27
+	mov	r4,r4,ror#2
+	add	r7,r7,r11
+	vrev32.8	q3,q3
+	eor	r10,r3,r5
+	add	r6,r6,r9
+	vadd.i32	q10,q2,q14
+	ldr	r9,[sp,#52]
+	eor	r11,r10,r4
+	vst1.32	{q10},[r12,:128]!
+	add	r6,r6,r7,ror#27
+	mov	r3,r3,ror#2
+	add	r6,r6,r11
+	eor	r10,r7,r4
+	add	r5,r5,r9
+	ldr	r9,[sp,#56]
+	eor	r11,r10,r3
+	add	r5,r5,r6,ror#27
+	mov	r7,r7,ror#2
+	add	r5,r5,r11
+	eor	r10,r6,r3
+	add	r4,r4,r9
+	ldr	r9,[sp,#60]
+	eor	r11,r10,r7
+	add	r4,r4,r5,ror#27
+	mov	r6,r6,ror#2
+	add	r4,r4,r11
+	eor	r10,r5,r7
+	add	r3,r3,r9
+	eor	r11,r10,r6
+	add	r3,r3,r4,ror#27
+	mov	r5,r5,ror#2
+	add	r3,r3,r11
+	ldmia	r0,{r9,r10,r11,r12}	@ accumulate context
+	add	r3,r3,r9
+	ldr	r9,[r0,#16]
+	add	r4,r4,r10
+	add	r5,r5,r11
+	add	r6,r6,r12
+	moveq	sp,r14
+	add	r7,r7,r9
+	ldrne	r9,[sp]
+	stmia	r0,{r3,r4,r5,r6,r7}
+	addne	r12,sp,#3*16
+	bne	.Loop_neon
+
+	@ vldmia	sp!,{d8-d15}
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+.size	sha1_block_data_order_neon,.-sha1_block_data_order_neon
+#endif
+#if __ARM_MAX_ARCH__>=7
+.type	sha1_block_data_order_armv8,%function
+.align	5
+sha1_block_data_order_armv8:
+.LARMv8:
+	vstmdb	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}		@ ABI specification says so
+
+	veor	q1,q1,q1
+	adr	r3,.LK_00_19
+	vld1.32	{q0},[r0]!
+	vld1.32	{d2[0]},[r0]
+	sub	r0,r0,#16
+	vld1.32	{d16[],d17[]},[r3,:32]!
+	vld1.32	{d18[],d19[]},[r3,:32]!
+	vld1.32	{d20[],d21[]},[r3,:32]!
+	vld1.32	{d22[],d23[]},[r3,:32]
+
+.Loop_v8:
+	vld1.8	{q4,q5},[r1]!
+	vld1.8	{q6,q7},[r1]!
+	vrev32.8	q4,q4
+	vrev32.8	q5,q5
+
+	vadd.i32	q12,q8,q4
+	vrev32.8	q6,q6
+	vmov	q14,q0	@ offload
+	subs	r2,r2,#1
+
+	vadd.i32	q13,q8,q5
+	vrev32.8	q7,q7
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 0
+.byte	0x68,0x0c,0x02,0xf2	@ sha1c q0,q1,q12
+	vadd.i32	q12,q8,q6
+.byte	0x4c,0x8c,0x3a,0xf2	@ sha1su0 q4,q5,q6
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 1
+.byte	0x6a,0x0c,0x06,0xf2	@ sha1c q0,q3,q13
+	vadd.i32	q13,q8,q7
+.byte	0x8e,0x83,0xba,0xf3	@ sha1su1 q4,q7
+.byte	0x4e,0xac,0x3c,0xf2	@ sha1su0 q5,q6,q7
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 2
+.byte	0x68,0x0c,0x04,0xf2	@ sha1c q0,q2,q12
+	vadd.i32	q12,q8,q4
+.byte	0x88,0xa3,0xba,0xf3	@ sha1su1 q5,q4
+.byte	0x48,0xcc,0x3e,0xf2	@ sha1su0 q6,q7,q4
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 3
+.byte	0x6a,0x0c,0x06,0xf2	@ sha1c q0,q3,q13
+	vadd.i32	q13,q9,q5
+.byte	0x8a,0xc3,0xba,0xf3	@ sha1su1 q6,q5
+.byte	0x4a,0xec,0x38,0xf2	@ sha1su0 q7,q4,q5
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 4
+.byte	0x68,0x0c,0x04,0xf2	@ sha1c q0,q2,q12
+	vadd.i32	q12,q9,q6
+.byte	0x8c,0xe3,0xba,0xf3	@ sha1su1 q7,q6
+.byte	0x4c,0x8c,0x3a,0xf2	@ sha1su0 q4,q5,q6
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 5
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+	vadd.i32	q13,q9,q7
+.byte	0x8e,0x83,0xba,0xf3	@ sha1su1 q4,q7
+.byte	0x4e,0xac,0x3c,0xf2	@ sha1su0 q5,q6,q7
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 6
+.byte	0x68,0x0c,0x14,0xf2	@ sha1p q0,q2,q12
+	vadd.i32	q12,q9,q4
+.byte	0x88,0xa3,0xba,0xf3	@ sha1su1 q5,q4
+.byte	0x48,0xcc,0x3e,0xf2	@ sha1su0 q6,q7,q4
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 7
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+	vadd.i32	q13,q9,q5
+.byte	0x8a,0xc3,0xba,0xf3	@ sha1su1 q6,q5
+.byte	0x4a,0xec,0x38,0xf2	@ sha1su0 q7,q4,q5
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 8
+.byte	0x68,0x0c,0x14,0xf2	@ sha1p q0,q2,q12
+	vadd.i32	q12,q10,q6
+.byte	0x8c,0xe3,0xba,0xf3	@ sha1su1 q7,q6
+.byte	0x4c,0x8c,0x3a,0xf2	@ sha1su0 q4,q5,q6
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 9
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+	vadd.i32	q13,q10,q7
+.byte	0x8e,0x83,0xba,0xf3	@ sha1su1 q4,q7
+.byte	0x4e,0xac,0x3c,0xf2	@ sha1su0 q5,q6,q7
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 10
+.byte	0x68,0x0c,0x24,0xf2	@ sha1m q0,q2,q12
+	vadd.i32	q12,q10,q4
+.byte	0x88,0xa3,0xba,0xf3	@ sha1su1 q5,q4
+.byte	0x48,0xcc,0x3e,0xf2	@ sha1su0 q6,q7,q4
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 11
+.byte	0x6a,0x0c,0x26,0xf2	@ sha1m q0,q3,q13
+	vadd.i32	q13,q10,q5
+.byte	0x8a,0xc3,0xba,0xf3	@ sha1su1 q6,q5
+.byte	0x4a,0xec,0x38,0xf2	@ sha1su0 q7,q4,q5
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 12
+.byte	0x68,0x0c,0x24,0xf2	@ sha1m q0,q2,q12
+	vadd.i32	q12,q10,q6
+.byte	0x8c,0xe3,0xba,0xf3	@ sha1su1 q7,q6
+.byte	0x4c,0x8c,0x3a,0xf2	@ sha1su0 q4,q5,q6
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 13
+.byte	0x6a,0x0c,0x26,0xf2	@ sha1m q0,q3,q13
+	vadd.i32	q13,q11,q7
+.byte	0x8e,0x83,0xba,0xf3	@ sha1su1 q4,q7
+.byte	0x4e,0xac,0x3c,0xf2	@ sha1su0 q5,q6,q7
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 14
+.byte	0x68,0x0c,0x24,0xf2	@ sha1m q0,q2,q12
+	vadd.i32	q12,q11,q4
+.byte	0x88,0xa3,0xba,0xf3	@ sha1su1 q5,q4
+.byte	0x48,0xcc,0x3e,0xf2	@ sha1su0 q6,q7,q4
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 15
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+	vadd.i32	q13,q11,q5
+.byte	0x8a,0xc3,0xba,0xf3	@ sha1su1 q6,q5
+.byte	0x4a,0xec,0x38,0xf2	@ sha1su0 q7,q4,q5
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 16
+.byte	0x68,0x0c,0x14,0xf2	@ sha1p q0,q2,q12
+	vadd.i32	q12,q11,q6
+.byte	0x8c,0xe3,0xba,0xf3	@ sha1su1 q7,q6
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 17
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+	vadd.i32	q13,q11,q7
+
+.byte	0xc0,0x62,0xb9,0xf3	@ sha1h q3,q0		@ 18
+.byte	0x68,0x0c,0x14,0xf2	@ sha1p q0,q2,q12
+
+.byte	0xc0,0x42,0xb9,0xf3	@ sha1h q2,q0		@ 19
+.byte	0x6a,0x0c,0x16,0xf2	@ sha1p q0,q3,q13
+
+	vadd.i32	q1,q1,q2
+	vadd.i32	q0,q0,q14
+	bne	.Loop_v8
+
+	vst1.32	{q0},[r0]!
+	vst1.32	{d2[0]},[r0]
+
+	vldmia	sp!,{d8,d9,d10,d11,d12,d13,d14,d15}
+	bx	lr					@ bx lr
+.size	sha1_block_data_order_armv8,.-sha1_block_data_order_armv8
+#endif
+#if __ARM_MAX_ARCH__>=7
+.comm	OPENSSL_armcap_P,4,4
+.hidden	OPENSSL_armcap_P
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
new file mode 100644
index 0000000..ac9f2f1
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha256-armv4.S
@@ -0,0 +1,2818 @@
+#if defined(__arm__)
+
+@ ====================================================================
+@ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
+@ project. 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/.
+@
+@ Permission to use under GPL terms is granted.
+@ ====================================================================
+
+@ SHA256 block procedure for ARMv4. May 2007.
+
+@ Performance is ~2x better than gcc 3.4 generated code and in "abso-
+@ lute" terms is ~2250 cycles per 64-byte block or ~35 cycles per
+@ byte [on single-issue Xscale PXA250 core].
+
+@ July 2010.
+@
+@ Rescheduling for dual-issue pipeline resulted in 22% improvement on
+@ Cortex A8 core and ~20 cycles per processed byte.
+
+@ February 2011.
+@
+@ Profiler-assisted and platform-specific optimization resulted in 16%
+@ improvement on Cortex A8 core and ~15.4 cycles per processed byte.
+
+@ September 2013.
+@
+@ Add NEON implementation. On Cortex A8 it was measured to process one
+@ byte in 12.5 cycles or 23% faster than integer-only code. Snapdragon
+@ S4 does it in 12.5 cycles too, but it's 50% faster than integer-only
+@ code (meaning that latter performs sub-optimally, nothing was done
+@ about it).
+
+@ May 2014.
+@
+@ Add ARMv8 code path performing at 2.0 cpb on Apple A7.
+
+#ifndef __KERNEL__
+# include "arm_arch.h"
+#else
+# define __ARM_ARCH__ __LINUX_ARM_ARCH__
+# define __ARM_MAX_ARCH__ 7
+#endif
+
+.text
+#if __ARM_ARCH__<7
+.code	32
+#else
+.syntax	unified
+# if defined(__thumb2__) && !defined(__APPLE__)
+#  define adrl adr
+.thumb
+# else
+.code	32
+# endif
+#endif
+
+.type	K256,%object
+.align	5
+K256:
+.word	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.word	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.word	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.word	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.word	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.word	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.word	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.word	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.word	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.word	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.word	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.word	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.word	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.word	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.word	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.word	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+.size	K256,.-K256
+.word	0				@ terminator
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+.LOPENSSL_armcap:
+.word	OPENSSL_armcap_P-.Lsha256_block_data_order
+#endif
+.align	5
+
+.globl	sha256_block_data_order
+.type	sha256_block_data_order,%function
+sha256_block_data_order:
+.Lsha256_block_data_order:
+#if __ARM_ARCH__<7
+	sub	r3,pc,#8		@ sha256_block_data_order
+#else
+	adr	r3,sha256_block_data_order
+#endif
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+	ldr	r12,.LOPENSSL_armcap
+	ldr	r12,[r3,r12]		@ OPENSSL_armcap_P
+#ifdef	__APPLE__
+	ldr	r12,[r12]
+#endif
+	tst	r12,#ARMV8_SHA256
+	bne	.LARMv8
+	tst	r12,#ARMV7_NEON
+	bne	.LNEON
+#endif
+	add	r2,r1,r2,lsl#6	@ len to point at the end of inp
+	stmdb	sp!,{r0,r1,r2,r4-r11,lr}
+	ldmia	r0,{r4,r5,r6,r7,r8,r9,r10,r11}
+	sub	r14,r3,#256+32	@ K256
+	sub	sp,sp,#16*4		@ alloca(X[16])
+.Loop:
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r5,r6		@ magic
+	eor	r12,r12,r12
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 0
+# if 0==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r8,r8,ror#5
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 0
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 0==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r8,r8,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r11,r11,r2			@ h+=X[i]
+	str	r2,[sp,#0*4]
+	eor	r2,r9,r10
+	add	r11,r11,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r8
+	add	r11,r11,r12			@ h+=K256[i]
+	eor	r2,r2,r10			@ Ch(e,f,g)
+	eor	r0,r4,r4,ror#11
+	add	r11,r11,r2			@ h+=Ch(e,f,g)
+#if 0==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 0<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r4,r5			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#2*4]		@ from future BODY_16_xx
+	eor	r12,r4,r5			@ a^b, b^c in next round
+	ldr	r1,[sp,#15*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r4,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r7,r7,r11			@ d+=h
+	eor	r3,r3,r5			@ Maj(a,b,c)
+	add	r11,r11,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r11,r11,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 1
+# if 1==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r7,r7,ror#5
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 1
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 1==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r7,r7,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r10,r10,r2			@ h+=X[i]
+	str	r2,[sp,#1*4]
+	eor	r2,r8,r9
+	add	r10,r10,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r7
+	add	r10,r10,r3			@ h+=K256[i]
+	eor	r2,r2,r9			@ Ch(e,f,g)
+	eor	r0,r11,r11,ror#11
+	add	r10,r10,r2			@ h+=Ch(e,f,g)
+#if 1==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 1<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r11,r4			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#3*4]		@ from future BODY_16_xx
+	eor	r3,r11,r4			@ a^b, b^c in next round
+	ldr	r1,[sp,#0*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r11,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r6,r6,r10			@ d+=h
+	eor	r12,r12,r4			@ Maj(a,b,c)
+	add	r10,r10,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r10,r10,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 2
+# if 2==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 2
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 2==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r6,r6,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r9,r9,r2			@ h+=X[i]
+	str	r2,[sp,#2*4]
+	eor	r2,r7,r8
+	add	r9,r9,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r6
+	add	r9,r9,r12			@ h+=K256[i]
+	eor	r2,r2,r8			@ Ch(e,f,g)
+	eor	r0,r10,r10,ror#11
+	add	r9,r9,r2			@ h+=Ch(e,f,g)
+#if 2==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 2<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r10,r11			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#4*4]		@ from future BODY_16_xx
+	eor	r12,r10,r11			@ a^b, b^c in next round
+	ldr	r1,[sp,#1*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r10,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r5,r5,r9			@ d+=h
+	eor	r3,r3,r11			@ Maj(a,b,c)
+	add	r9,r9,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r9,r9,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 3
+# if 3==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r5,r5,ror#5
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 3
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 3==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r5,r5,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r8,r8,r2			@ h+=X[i]
+	str	r2,[sp,#3*4]
+	eor	r2,r6,r7
+	add	r8,r8,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r5
+	add	r8,r8,r3			@ h+=K256[i]
+	eor	r2,r2,r7			@ Ch(e,f,g)
+	eor	r0,r9,r9,ror#11
+	add	r8,r8,r2			@ h+=Ch(e,f,g)
+#if 3==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 3<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r9,r10			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#5*4]		@ from future BODY_16_xx
+	eor	r3,r9,r10			@ a^b, b^c in next round
+	ldr	r1,[sp,#2*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r9,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r4,r4,r8			@ d+=h
+	eor	r12,r12,r10			@ Maj(a,b,c)
+	add	r8,r8,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r8,r8,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 4
+# if 4==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r4,r4,ror#5
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 4
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 4==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r4,r4,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r7,r7,r2			@ h+=X[i]
+	str	r2,[sp,#4*4]
+	eor	r2,r5,r6
+	add	r7,r7,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r4
+	add	r7,r7,r12			@ h+=K256[i]
+	eor	r2,r2,r6			@ Ch(e,f,g)
+	eor	r0,r8,r8,ror#11
+	add	r7,r7,r2			@ h+=Ch(e,f,g)
+#if 4==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 4<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r8,r9			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#6*4]		@ from future BODY_16_xx
+	eor	r12,r8,r9			@ a^b, b^c in next round
+	ldr	r1,[sp,#3*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r8,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r11,r11,r7			@ d+=h
+	eor	r3,r3,r9			@ Maj(a,b,c)
+	add	r7,r7,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r7,r7,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 5
+# if 5==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r11,r11,ror#5
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 5
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 5==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r11,r11,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r6,r6,r2			@ h+=X[i]
+	str	r2,[sp,#5*4]
+	eor	r2,r4,r5
+	add	r6,r6,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r11
+	add	r6,r6,r3			@ h+=K256[i]
+	eor	r2,r2,r5			@ Ch(e,f,g)
+	eor	r0,r7,r7,ror#11
+	add	r6,r6,r2			@ h+=Ch(e,f,g)
+#if 5==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 5<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r7,r8			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#7*4]		@ from future BODY_16_xx
+	eor	r3,r7,r8			@ a^b, b^c in next round
+	ldr	r1,[sp,#4*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r7,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r10,r10,r6			@ d+=h
+	eor	r12,r12,r8			@ Maj(a,b,c)
+	add	r6,r6,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r6,r6,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 6
+# if 6==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 6
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 6==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r10,r10,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r5,r5,r2			@ h+=X[i]
+	str	r2,[sp,#6*4]
+	eor	r2,r11,r4
+	add	r5,r5,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r10
+	add	r5,r5,r12			@ h+=K256[i]
+	eor	r2,r2,r4			@ Ch(e,f,g)
+	eor	r0,r6,r6,ror#11
+	add	r5,r5,r2			@ h+=Ch(e,f,g)
+#if 6==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 6<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r6,r7			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#8*4]		@ from future BODY_16_xx
+	eor	r12,r6,r7			@ a^b, b^c in next round
+	ldr	r1,[sp,#5*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r6,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r9,r9,r5			@ d+=h
+	eor	r3,r3,r7			@ Maj(a,b,c)
+	add	r5,r5,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r5,r5,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 7
+# if 7==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r9,r9,ror#5
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 7
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 7==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r9,r9,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r4,r4,r2			@ h+=X[i]
+	str	r2,[sp,#7*4]
+	eor	r2,r10,r11
+	add	r4,r4,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r9
+	add	r4,r4,r3			@ h+=K256[i]
+	eor	r2,r2,r11			@ Ch(e,f,g)
+	eor	r0,r5,r5,ror#11
+	add	r4,r4,r2			@ h+=Ch(e,f,g)
+#if 7==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 7<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r5,r6			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#9*4]		@ from future BODY_16_xx
+	eor	r3,r5,r6			@ a^b, b^c in next round
+	ldr	r1,[sp,#6*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r5,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r8,r8,r4			@ d+=h
+	eor	r12,r12,r6			@ Maj(a,b,c)
+	add	r4,r4,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r4,r4,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 8
+# if 8==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r8,r8,ror#5
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 8
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 8==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r8,r8,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r11,r11,r2			@ h+=X[i]
+	str	r2,[sp,#8*4]
+	eor	r2,r9,r10
+	add	r11,r11,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r8
+	add	r11,r11,r12			@ h+=K256[i]
+	eor	r2,r2,r10			@ Ch(e,f,g)
+	eor	r0,r4,r4,ror#11
+	add	r11,r11,r2			@ h+=Ch(e,f,g)
+#if 8==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 8<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r4,r5			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#10*4]		@ from future BODY_16_xx
+	eor	r12,r4,r5			@ a^b, b^c in next round
+	ldr	r1,[sp,#7*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r4,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r7,r7,r11			@ d+=h
+	eor	r3,r3,r5			@ Maj(a,b,c)
+	add	r11,r11,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r11,r11,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 9
+# if 9==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r7,r7,ror#5
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 9
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 9==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r7,r7,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r10,r10,r2			@ h+=X[i]
+	str	r2,[sp,#9*4]
+	eor	r2,r8,r9
+	add	r10,r10,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r7
+	add	r10,r10,r3			@ h+=K256[i]
+	eor	r2,r2,r9			@ Ch(e,f,g)
+	eor	r0,r11,r11,ror#11
+	add	r10,r10,r2			@ h+=Ch(e,f,g)
+#if 9==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 9<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r11,r4			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#11*4]		@ from future BODY_16_xx
+	eor	r3,r11,r4			@ a^b, b^c in next round
+	ldr	r1,[sp,#8*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r11,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r6,r6,r10			@ d+=h
+	eor	r12,r12,r4			@ Maj(a,b,c)
+	add	r10,r10,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r10,r10,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 10
+# if 10==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 10
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 10==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r6,r6,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r9,r9,r2			@ h+=X[i]
+	str	r2,[sp,#10*4]
+	eor	r2,r7,r8
+	add	r9,r9,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r6
+	add	r9,r9,r12			@ h+=K256[i]
+	eor	r2,r2,r8			@ Ch(e,f,g)
+	eor	r0,r10,r10,ror#11
+	add	r9,r9,r2			@ h+=Ch(e,f,g)
+#if 10==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 10<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r10,r11			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#12*4]		@ from future BODY_16_xx
+	eor	r12,r10,r11			@ a^b, b^c in next round
+	ldr	r1,[sp,#9*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r10,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r5,r5,r9			@ d+=h
+	eor	r3,r3,r11			@ Maj(a,b,c)
+	add	r9,r9,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r9,r9,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 11
+# if 11==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r5,r5,ror#5
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 11
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 11==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r5,r5,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r8,r8,r2			@ h+=X[i]
+	str	r2,[sp,#11*4]
+	eor	r2,r6,r7
+	add	r8,r8,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r5
+	add	r8,r8,r3			@ h+=K256[i]
+	eor	r2,r2,r7			@ Ch(e,f,g)
+	eor	r0,r9,r9,ror#11
+	add	r8,r8,r2			@ h+=Ch(e,f,g)
+#if 11==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 11<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r9,r10			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#13*4]		@ from future BODY_16_xx
+	eor	r3,r9,r10			@ a^b, b^c in next round
+	ldr	r1,[sp,#10*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r9,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r4,r4,r8			@ d+=h
+	eor	r12,r12,r10			@ Maj(a,b,c)
+	add	r8,r8,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r8,r8,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 12
+# if 12==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r4,r4,ror#5
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 12
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 12==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r4,r4,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r7,r7,r2			@ h+=X[i]
+	str	r2,[sp,#12*4]
+	eor	r2,r5,r6
+	add	r7,r7,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r4
+	add	r7,r7,r12			@ h+=K256[i]
+	eor	r2,r2,r6			@ Ch(e,f,g)
+	eor	r0,r8,r8,ror#11
+	add	r7,r7,r2			@ h+=Ch(e,f,g)
+#if 12==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 12<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r8,r9			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#14*4]		@ from future BODY_16_xx
+	eor	r12,r8,r9			@ a^b, b^c in next round
+	ldr	r1,[sp,#11*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r8,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r11,r11,r7			@ d+=h
+	eor	r3,r3,r9			@ Maj(a,b,c)
+	add	r7,r7,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r7,r7,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 13
+# if 13==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r11,r11,ror#5
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 13
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 13==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r11,r11,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r6,r6,r2			@ h+=X[i]
+	str	r2,[sp,#13*4]
+	eor	r2,r4,r5
+	add	r6,r6,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r11
+	add	r6,r6,r3			@ h+=K256[i]
+	eor	r2,r2,r5			@ Ch(e,f,g)
+	eor	r0,r7,r7,ror#11
+	add	r6,r6,r2			@ h+=Ch(e,f,g)
+#if 13==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 13<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r7,r8			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#15*4]		@ from future BODY_16_xx
+	eor	r3,r7,r8			@ a^b, b^c in next round
+	ldr	r1,[sp,#12*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r7,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r10,r10,r6			@ d+=h
+	eor	r12,r12,r8			@ Maj(a,b,c)
+	add	r6,r6,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r6,r6,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 14
+# if 14==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 14
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	ldrb	r12,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r12,lsl#8
+	ldrb	r12,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 14==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r10,r10,ror#5
+	orr	r2,r2,r12,lsl#24
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+#endif
+	ldr	r12,[r14],#4			@ *K256++
+	add	r5,r5,r2			@ h+=X[i]
+	str	r2,[sp,#14*4]
+	eor	r2,r11,r4
+	add	r5,r5,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r10
+	add	r5,r5,r12			@ h+=K256[i]
+	eor	r2,r2,r4			@ Ch(e,f,g)
+	eor	r0,r6,r6,ror#11
+	add	r5,r5,r2			@ h+=Ch(e,f,g)
+#if 14==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 14<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r6,r7			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#0*4]		@ from future BODY_16_xx
+	eor	r12,r6,r7			@ a^b, b^c in next round
+	ldr	r1,[sp,#13*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r6,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r9,r9,r5			@ d+=h
+	eor	r3,r3,r7			@ Maj(a,b,c)
+	add	r5,r5,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r5,r5,r3			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	@ ldr	r2,[r1],#4			@ 15
+# if 15==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r9,r9,ror#5
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+# ifndef __ARMEB__
+	rev	r2,r2
+# endif
+#else
+	@ ldrb	r2,[r1,#3]			@ 15
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	ldrb	r3,[r1,#2]
+	ldrb	r0,[r1,#1]
+	orr	r2,r2,r3,lsl#8
+	ldrb	r3,[r1],#4
+	orr	r2,r2,r0,lsl#16
+# if 15==15
+	str	r1,[sp,#17*4]			@ make room for r1
+# endif
+	eor	r0,r9,r9,ror#5
+	orr	r2,r2,r3,lsl#24
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+#endif
+	ldr	r3,[r14],#4			@ *K256++
+	add	r4,r4,r2			@ h+=X[i]
+	str	r2,[sp,#15*4]
+	eor	r2,r10,r11
+	add	r4,r4,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r9
+	add	r4,r4,r3			@ h+=K256[i]
+	eor	r2,r2,r11			@ Ch(e,f,g)
+	eor	r0,r5,r5,ror#11
+	add	r4,r4,r2			@ h+=Ch(e,f,g)
+#if 15==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 15<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r5,r6			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#1*4]		@ from future BODY_16_xx
+	eor	r3,r5,r6			@ a^b, b^c in next round
+	ldr	r1,[sp,#14*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r5,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r8,r8,r4			@ d+=h
+	eor	r12,r12,r6			@ Maj(a,b,c)
+	add	r4,r4,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r4,r4,r12			@ h+=Maj(a,b,c)
+.Lrounds_16_xx:
+	@ ldr	r2,[sp,#1*4]		@ 16
+	@ ldr	r1,[sp,#14*4]
+	mov	r0,r2,ror#7
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#0*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#9*4]
+
+	add	r12,r12,r0
+	eor	r0,r8,r8,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r11,r11,r2			@ h+=X[i]
+	str	r2,[sp,#0*4]
+	eor	r2,r9,r10
+	add	r11,r11,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r8
+	add	r11,r11,r12			@ h+=K256[i]
+	eor	r2,r2,r10			@ Ch(e,f,g)
+	eor	r0,r4,r4,ror#11
+	add	r11,r11,r2			@ h+=Ch(e,f,g)
+#if 16==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 16<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r4,r5			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#2*4]		@ from future BODY_16_xx
+	eor	r12,r4,r5			@ a^b, b^c in next round
+	ldr	r1,[sp,#15*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r4,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r7,r7,r11			@ d+=h
+	eor	r3,r3,r5			@ Maj(a,b,c)
+	add	r11,r11,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r11,r11,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#2*4]		@ 17
+	@ ldr	r1,[sp,#15*4]
+	mov	r0,r2,ror#7
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#1*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#10*4]
+
+	add	r3,r3,r0
+	eor	r0,r7,r7,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r10,r10,r2			@ h+=X[i]
+	str	r2,[sp,#1*4]
+	eor	r2,r8,r9
+	add	r10,r10,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r7
+	add	r10,r10,r3			@ h+=K256[i]
+	eor	r2,r2,r9			@ Ch(e,f,g)
+	eor	r0,r11,r11,ror#11
+	add	r10,r10,r2			@ h+=Ch(e,f,g)
+#if 17==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 17<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r11,r4			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#3*4]		@ from future BODY_16_xx
+	eor	r3,r11,r4			@ a^b, b^c in next round
+	ldr	r1,[sp,#0*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r11,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r6,r6,r10			@ d+=h
+	eor	r12,r12,r4			@ Maj(a,b,c)
+	add	r10,r10,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r10,r10,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#3*4]		@ 18
+	@ ldr	r1,[sp,#0*4]
+	mov	r0,r2,ror#7
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#2*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#11*4]
+
+	add	r12,r12,r0
+	eor	r0,r6,r6,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r9,r9,r2			@ h+=X[i]
+	str	r2,[sp,#2*4]
+	eor	r2,r7,r8
+	add	r9,r9,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r6
+	add	r9,r9,r12			@ h+=K256[i]
+	eor	r2,r2,r8			@ Ch(e,f,g)
+	eor	r0,r10,r10,ror#11
+	add	r9,r9,r2			@ h+=Ch(e,f,g)
+#if 18==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 18<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r10,r11			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#4*4]		@ from future BODY_16_xx
+	eor	r12,r10,r11			@ a^b, b^c in next round
+	ldr	r1,[sp,#1*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r10,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r5,r5,r9			@ d+=h
+	eor	r3,r3,r11			@ Maj(a,b,c)
+	add	r9,r9,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r9,r9,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#4*4]		@ 19
+	@ ldr	r1,[sp,#1*4]
+	mov	r0,r2,ror#7
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#3*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#12*4]
+
+	add	r3,r3,r0
+	eor	r0,r5,r5,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r8,r8,r2			@ h+=X[i]
+	str	r2,[sp,#3*4]
+	eor	r2,r6,r7
+	add	r8,r8,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r5
+	add	r8,r8,r3			@ h+=K256[i]
+	eor	r2,r2,r7			@ Ch(e,f,g)
+	eor	r0,r9,r9,ror#11
+	add	r8,r8,r2			@ h+=Ch(e,f,g)
+#if 19==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 19<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r9,r10			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#5*4]		@ from future BODY_16_xx
+	eor	r3,r9,r10			@ a^b, b^c in next round
+	ldr	r1,[sp,#2*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r9,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r4,r4,r8			@ d+=h
+	eor	r12,r12,r10			@ Maj(a,b,c)
+	add	r8,r8,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r8,r8,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#5*4]		@ 20
+	@ ldr	r1,[sp,#2*4]
+	mov	r0,r2,ror#7
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#4*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#13*4]
+
+	add	r12,r12,r0
+	eor	r0,r4,r4,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r7,r7,r2			@ h+=X[i]
+	str	r2,[sp,#4*4]
+	eor	r2,r5,r6
+	add	r7,r7,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r4
+	add	r7,r7,r12			@ h+=K256[i]
+	eor	r2,r2,r6			@ Ch(e,f,g)
+	eor	r0,r8,r8,ror#11
+	add	r7,r7,r2			@ h+=Ch(e,f,g)
+#if 20==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 20<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r8,r9			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#6*4]		@ from future BODY_16_xx
+	eor	r12,r8,r9			@ a^b, b^c in next round
+	ldr	r1,[sp,#3*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r8,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r11,r11,r7			@ d+=h
+	eor	r3,r3,r9			@ Maj(a,b,c)
+	add	r7,r7,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r7,r7,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#6*4]		@ 21
+	@ ldr	r1,[sp,#3*4]
+	mov	r0,r2,ror#7
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#5*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#14*4]
+
+	add	r3,r3,r0
+	eor	r0,r11,r11,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r6,r6,r2			@ h+=X[i]
+	str	r2,[sp,#5*4]
+	eor	r2,r4,r5
+	add	r6,r6,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r11
+	add	r6,r6,r3			@ h+=K256[i]
+	eor	r2,r2,r5			@ Ch(e,f,g)
+	eor	r0,r7,r7,ror#11
+	add	r6,r6,r2			@ h+=Ch(e,f,g)
+#if 21==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 21<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r7,r8			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#7*4]		@ from future BODY_16_xx
+	eor	r3,r7,r8			@ a^b, b^c in next round
+	ldr	r1,[sp,#4*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r7,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r10,r10,r6			@ d+=h
+	eor	r12,r12,r8			@ Maj(a,b,c)
+	add	r6,r6,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r6,r6,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#7*4]		@ 22
+	@ ldr	r1,[sp,#4*4]
+	mov	r0,r2,ror#7
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#6*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#15*4]
+
+	add	r12,r12,r0
+	eor	r0,r10,r10,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r5,r5,r2			@ h+=X[i]
+	str	r2,[sp,#6*4]
+	eor	r2,r11,r4
+	add	r5,r5,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r10
+	add	r5,r5,r12			@ h+=K256[i]
+	eor	r2,r2,r4			@ Ch(e,f,g)
+	eor	r0,r6,r6,ror#11
+	add	r5,r5,r2			@ h+=Ch(e,f,g)
+#if 22==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 22<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r6,r7			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#8*4]		@ from future BODY_16_xx
+	eor	r12,r6,r7			@ a^b, b^c in next round
+	ldr	r1,[sp,#5*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r6,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r9,r9,r5			@ d+=h
+	eor	r3,r3,r7			@ Maj(a,b,c)
+	add	r5,r5,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r5,r5,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#8*4]		@ 23
+	@ ldr	r1,[sp,#5*4]
+	mov	r0,r2,ror#7
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#7*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#0*4]
+
+	add	r3,r3,r0
+	eor	r0,r9,r9,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r4,r4,r2			@ h+=X[i]
+	str	r2,[sp,#7*4]
+	eor	r2,r10,r11
+	add	r4,r4,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r9
+	add	r4,r4,r3			@ h+=K256[i]
+	eor	r2,r2,r11			@ Ch(e,f,g)
+	eor	r0,r5,r5,ror#11
+	add	r4,r4,r2			@ h+=Ch(e,f,g)
+#if 23==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 23<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r5,r6			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#9*4]		@ from future BODY_16_xx
+	eor	r3,r5,r6			@ a^b, b^c in next round
+	ldr	r1,[sp,#6*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r5,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r8,r8,r4			@ d+=h
+	eor	r12,r12,r6			@ Maj(a,b,c)
+	add	r4,r4,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r4,r4,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#9*4]		@ 24
+	@ ldr	r1,[sp,#6*4]
+	mov	r0,r2,ror#7
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#8*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#1*4]
+
+	add	r12,r12,r0
+	eor	r0,r8,r8,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r8,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r11,r11,r2			@ h+=X[i]
+	str	r2,[sp,#8*4]
+	eor	r2,r9,r10
+	add	r11,r11,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r8
+	add	r11,r11,r12			@ h+=K256[i]
+	eor	r2,r2,r10			@ Ch(e,f,g)
+	eor	r0,r4,r4,ror#11
+	add	r11,r11,r2			@ h+=Ch(e,f,g)
+#if 24==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 24<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r4,r5			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#10*4]		@ from future BODY_16_xx
+	eor	r12,r4,r5			@ a^b, b^c in next round
+	ldr	r1,[sp,#7*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r4,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r7,r7,r11			@ d+=h
+	eor	r3,r3,r5			@ Maj(a,b,c)
+	add	r11,r11,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r11,r11,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#10*4]		@ 25
+	@ ldr	r1,[sp,#7*4]
+	mov	r0,r2,ror#7
+	add	r11,r11,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#9*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#2*4]
+
+	add	r3,r3,r0
+	eor	r0,r7,r7,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r7,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r10,r10,r2			@ h+=X[i]
+	str	r2,[sp,#9*4]
+	eor	r2,r8,r9
+	add	r10,r10,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r7
+	add	r10,r10,r3			@ h+=K256[i]
+	eor	r2,r2,r9			@ Ch(e,f,g)
+	eor	r0,r11,r11,ror#11
+	add	r10,r10,r2			@ h+=Ch(e,f,g)
+#if 25==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 25<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r11,r4			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#11*4]		@ from future BODY_16_xx
+	eor	r3,r11,r4			@ a^b, b^c in next round
+	ldr	r1,[sp,#8*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r11,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r6,r6,r10			@ d+=h
+	eor	r12,r12,r4			@ Maj(a,b,c)
+	add	r10,r10,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r10,r10,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#11*4]		@ 26
+	@ ldr	r1,[sp,#8*4]
+	mov	r0,r2,ror#7
+	add	r10,r10,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#10*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#3*4]
+
+	add	r12,r12,r0
+	eor	r0,r6,r6,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r6,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r9,r9,r2			@ h+=X[i]
+	str	r2,[sp,#10*4]
+	eor	r2,r7,r8
+	add	r9,r9,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r6
+	add	r9,r9,r12			@ h+=K256[i]
+	eor	r2,r2,r8			@ Ch(e,f,g)
+	eor	r0,r10,r10,ror#11
+	add	r9,r9,r2			@ h+=Ch(e,f,g)
+#if 26==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 26<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r10,r11			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#12*4]		@ from future BODY_16_xx
+	eor	r12,r10,r11			@ a^b, b^c in next round
+	ldr	r1,[sp,#9*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r10,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r5,r5,r9			@ d+=h
+	eor	r3,r3,r11			@ Maj(a,b,c)
+	add	r9,r9,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r9,r9,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#12*4]		@ 27
+	@ ldr	r1,[sp,#9*4]
+	mov	r0,r2,ror#7
+	add	r9,r9,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#11*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#4*4]
+
+	add	r3,r3,r0
+	eor	r0,r5,r5,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r5,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r8,r8,r2			@ h+=X[i]
+	str	r2,[sp,#11*4]
+	eor	r2,r6,r7
+	add	r8,r8,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r5
+	add	r8,r8,r3			@ h+=K256[i]
+	eor	r2,r2,r7			@ Ch(e,f,g)
+	eor	r0,r9,r9,ror#11
+	add	r8,r8,r2			@ h+=Ch(e,f,g)
+#if 27==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 27<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r9,r10			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#13*4]		@ from future BODY_16_xx
+	eor	r3,r9,r10			@ a^b, b^c in next round
+	ldr	r1,[sp,#10*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r9,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r4,r4,r8			@ d+=h
+	eor	r12,r12,r10			@ Maj(a,b,c)
+	add	r8,r8,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r8,r8,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#13*4]		@ 28
+	@ ldr	r1,[sp,#10*4]
+	mov	r0,r2,ror#7
+	add	r8,r8,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#12*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#5*4]
+
+	add	r12,r12,r0
+	eor	r0,r4,r4,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r4,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r7,r7,r2			@ h+=X[i]
+	str	r2,[sp,#12*4]
+	eor	r2,r5,r6
+	add	r7,r7,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r4
+	add	r7,r7,r12			@ h+=K256[i]
+	eor	r2,r2,r6			@ Ch(e,f,g)
+	eor	r0,r8,r8,ror#11
+	add	r7,r7,r2			@ h+=Ch(e,f,g)
+#if 28==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 28<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r8,r9			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#14*4]		@ from future BODY_16_xx
+	eor	r12,r8,r9			@ a^b, b^c in next round
+	ldr	r1,[sp,#11*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r8,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r11,r11,r7			@ d+=h
+	eor	r3,r3,r9			@ Maj(a,b,c)
+	add	r7,r7,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r7,r7,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#14*4]		@ 29
+	@ ldr	r1,[sp,#11*4]
+	mov	r0,r2,ror#7
+	add	r7,r7,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#13*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#6*4]
+
+	add	r3,r3,r0
+	eor	r0,r11,r11,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r11,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r6,r6,r2			@ h+=X[i]
+	str	r2,[sp,#13*4]
+	eor	r2,r4,r5
+	add	r6,r6,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r11
+	add	r6,r6,r3			@ h+=K256[i]
+	eor	r2,r2,r5			@ Ch(e,f,g)
+	eor	r0,r7,r7,ror#11
+	add	r6,r6,r2			@ h+=Ch(e,f,g)
+#if 29==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 29<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r7,r8			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#15*4]		@ from future BODY_16_xx
+	eor	r3,r7,r8			@ a^b, b^c in next round
+	ldr	r1,[sp,#12*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r7,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r10,r10,r6			@ d+=h
+	eor	r12,r12,r8			@ Maj(a,b,c)
+	add	r6,r6,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r6,r6,r12			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#15*4]		@ 30
+	@ ldr	r1,[sp,#12*4]
+	mov	r0,r2,ror#7
+	add	r6,r6,r12			@ h+=Maj(a,b,c) from the past
+	mov	r12,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r12,r12,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#14*4]
+	eor	r12,r12,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#7*4]
+
+	add	r12,r12,r0
+	eor	r0,r10,r10,ror#5	@ from BODY_00_15
+	add	r2,r2,r12
+	eor	r0,r0,r10,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r12,[r14],#4			@ *K256++
+	add	r5,r5,r2			@ h+=X[i]
+	str	r2,[sp,#14*4]
+	eor	r2,r11,r4
+	add	r5,r5,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r10
+	add	r5,r5,r12			@ h+=K256[i]
+	eor	r2,r2,r4			@ Ch(e,f,g)
+	eor	r0,r6,r6,ror#11
+	add	r5,r5,r2			@ h+=Ch(e,f,g)
+#if 30==31
+	and	r12,r12,#0xff
+	cmp	r12,#0xf2			@ done?
+#endif
+#if 30<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r12,r6,r7			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#0*4]		@ from future BODY_16_xx
+	eor	r12,r6,r7			@ a^b, b^c in next round
+	ldr	r1,[sp,#13*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r6,ror#20	@ Sigma0(a)
+	and	r3,r3,r12			@ (b^c)&=(a^b)
+	add	r9,r9,r5			@ d+=h
+	eor	r3,r3,r7			@ Maj(a,b,c)
+	add	r5,r5,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r5,r5,r3			@ h+=Maj(a,b,c)
+	@ ldr	r2,[sp,#0*4]		@ 31
+	@ ldr	r1,[sp,#13*4]
+	mov	r0,r2,ror#7
+	add	r5,r5,r3			@ h+=Maj(a,b,c) from the past
+	mov	r3,r1,ror#17
+	eor	r0,r0,r2,ror#18
+	eor	r3,r3,r1,ror#19
+	eor	r0,r0,r2,lsr#3	@ sigma0(X[i+1])
+	ldr	r2,[sp,#15*4]
+	eor	r3,r3,r1,lsr#10	@ sigma1(X[i+14])
+	ldr	r1,[sp,#8*4]
+
+	add	r3,r3,r0
+	eor	r0,r9,r9,ror#5	@ from BODY_00_15
+	add	r2,r2,r3
+	eor	r0,r0,r9,ror#19	@ Sigma1(e)
+	add	r2,r2,r1			@ X[i]
+	ldr	r3,[r14],#4			@ *K256++
+	add	r4,r4,r2			@ h+=X[i]
+	str	r2,[sp,#15*4]
+	eor	r2,r10,r11
+	add	r4,r4,r0,ror#6	@ h+=Sigma1(e)
+	and	r2,r2,r9
+	add	r4,r4,r3			@ h+=K256[i]
+	eor	r2,r2,r11			@ Ch(e,f,g)
+	eor	r0,r5,r5,ror#11
+	add	r4,r4,r2			@ h+=Ch(e,f,g)
+#if 31==31
+	and	r3,r3,#0xff
+	cmp	r3,#0xf2			@ done?
+#endif
+#if 31<15
+# if __ARM_ARCH__>=7
+	ldr	r2,[r1],#4			@ prefetch
+# else
+	ldrb	r2,[r1,#3]
+# endif
+	eor	r3,r5,r6			@ a^b, b^c in next round
+#else
+	ldr	r2,[sp,#1*4]		@ from future BODY_16_xx
+	eor	r3,r5,r6			@ a^b, b^c in next round
+	ldr	r1,[sp,#14*4]	@ from future BODY_16_xx
+#endif
+	eor	r0,r0,r5,ror#20	@ Sigma0(a)
+	and	r12,r12,r3			@ (b^c)&=(a^b)
+	add	r8,r8,r4			@ d+=h
+	eor	r12,r12,r6			@ Maj(a,b,c)
+	add	r4,r4,r0,ror#2	@ h+=Sigma0(a)
+	@ add	r4,r4,r12			@ h+=Maj(a,b,c)
+#if __ARM_ARCH__>=7
+	ite	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	ldreq	r3,[sp,#16*4]		@ pull ctx
+	bne	.Lrounds_16_xx
+
+	add	r4,r4,r12		@ h+=Maj(a,b,c) from the past
+	ldr	r0,[r3,#0]
+	ldr	r2,[r3,#4]
+	ldr	r12,[r3,#8]
+	add	r4,r4,r0
+	ldr	r0,[r3,#12]
+	add	r5,r5,r2
+	ldr	r2,[r3,#16]
+	add	r6,r6,r12
+	ldr	r12,[r3,#20]
+	add	r7,r7,r0
+	ldr	r0,[r3,#24]
+	add	r8,r8,r2
+	ldr	r2,[r3,#28]
+	add	r9,r9,r12
+	ldr	r1,[sp,#17*4]		@ pull inp
+	ldr	r12,[sp,#18*4]		@ pull inp+len
+	add	r10,r10,r0
+	add	r11,r11,r2
+	stmia	r3,{r4,r5,r6,r7,r8,r9,r10,r11}
+	cmp	r1,r12
+	sub	r14,r14,#256	@ rewind Ktbl
+	bne	.Loop
+
+	add	sp,sp,#19*4	@ destroy frame
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	sha256_block_data_order,.-sha256_block_data_order
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.globl	sha256_block_data_order_neon
+.type	sha256_block_data_order_neon,%function
+.align	4
+sha256_block_data_order_neon:
+.LNEON:
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+
+	sub	r11,sp,#16*4+16
+	adrl	r14,K256
+	bic	r11,r11,#15		@ align for 128-bit stores
+	mov	r12,sp
+	mov	sp,r11			@ alloca
+	add	r2,r1,r2,lsl#6	@ len to point at the end of inp
+
+	vld1.8	{q0},[r1]!
+	vld1.8	{q1},[r1]!
+	vld1.8	{q2},[r1]!
+	vld1.8	{q3},[r1]!
+	vld1.32	{q8},[r14,:128]!
+	vld1.32	{q9},[r14,:128]!
+	vld1.32	{q10},[r14,:128]!
+	vld1.32	{q11},[r14,:128]!
+	vrev32.8	q0,q0		@ yes, even on
+	str	r0,[sp,#64]
+	vrev32.8	q1,q1		@ big-endian
+	str	r1,[sp,#68]
+	mov	r1,sp
+	vrev32.8	q2,q2
+	str	r2,[sp,#72]
+	vrev32.8	q3,q3
+	str	r12,[sp,#76]		@ save original sp
+	vadd.i32	q8,q8,q0
+	vadd.i32	q9,q9,q1
+	vst1.32	{q8},[r1,:128]!
+	vadd.i32	q10,q10,q2
+	vst1.32	{q9},[r1,:128]!
+	vadd.i32	q11,q11,q3
+	vst1.32	{q10},[r1,:128]!
+	vst1.32	{q11},[r1,:128]!
+
+	ldmia	r0,{r4,r5,r6,r7,r8,r9,r10,r11}
+	sub	r1,r1,#64
+	ldr	r2,[sp,#0]
+	eor	r12,r12,r12
+	eor	r3,r5,r6
+	b	.L_00_48
+
+.align	4
+.L_00_48:
+	vext.8	q8,q0,q1,#4
+	add	r11,r11,r2
+	eor	r2,r9,r10
+	eor	r0,r8,r8,ror#5
+	vext.8	q9,q2,q3,#4
+	add	r4,r4,r12
+	and	r2,r2,r8
+	eor	r12,r0,r8,ror#19
+	vshr.u32	q10,q8,#7
+	eor	r0,r4,r4,ror#11
+	eor	r2,r2,r10
+	vadd.i32	q0,q0,q9
+	add	r11,r11,r12,ror#6
+	eor	r12,r4,r5
+	vshr.u32	q9,q8,#3
+	eor	r0,r0,r4,ror#20
+	add	r11,r11,r2
+	vsli.32	q10,q8,#25
+	ldr	r2,[sp,#4]
+	and	r3,r3,r12
+	vshr.u32	q11,q8,#18
+	add	r7,r7,r11
+	add	r11,r11,r0,ror#2
+	eor	r3,r3,r5
+	veor	q9,q9,q10
+	add	r10,r10,r2
+	vsli.32	q11,q8,#14
+	eor	r2,r8,r9
+	eor	r0,r7,r7,ror#5
+	vshr.u32	d24,d7,#17
+	add	r11,r11,r3
+	and	r2,r2,r7
+	veor	q9,q9,q11
+	eor	r3,r0,r7,ror#19
+	eor	r0,r11,r11,ror#11
+	vsli.32	d24,d7,#15
+	eor	r2,r2,r9
+	add	r10,r10,r3,ror#6
+	vshr.u32	d25,d7,#10
+	eor	r3,r11,r4
+	eor	r0,r0,r11,ror#20
+	vadd.i32	q0,q0,q9
+	add	r10,r10,r2
+	ldr	r2,[sp,#8]
+	veor	d25,d25,d24
+	and	r12,r12,r3
+	add	r6,r6,r10
+	vshr.u32	d24,d7,#19
+	add	r10,r10,r0,ror#2
+	eor	r12,r12,r4
+	vsli.32	d24,d7,#13
+	add	r9,r9,r2
+	eor	r2,r7,r8
+	veor	d25,d25,d24
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12
+	vadd.i32	d0,d0,d25
+	and	r2,r2,r6
+	eor	r12,r0,r6,ror#19
+	vshr.u32	d24,d0,#17
+	eor	r0,r10,r10,ror#11
+	eor	r2,r2,r8
+	vsli.32	d24,d0,#15
+	add	r9,r9,r12,ror#6
+	eor	r12,r10,r11
+	vshr.u32	d25,d0,#10
+	eor	r0,r0,r10,ror#20
+	add	r9,r9,r2
+	veor	d25,d25,d24
+	ldr	r2,[sp,#12]
+	and	r3,r3,r12
+	vshr.u32	d24,d0,#19
+	add	r5,r5,r9
+	add	r9,r9,r0,ror#2
+	eor	r3,r3,r11
+	vld1.32	{q8},[r14,:128]!
+	add	r8,r8,r2
+	vsli.32	d24,d0,#13
+	eor	r2,r6,r7
+	eor	r0,r5,r5,ror#5
+	veor	d25,d25,d24
+	add	r9,r9,r3
+	and	r2,r2,r5
+	vadd.i32	d1,d1,d25
+	eor	r3,r0,r5,ror#19
+	eor	r0,r9,r9,ror#11
+	vadd.i32	q8,q8,q0
+	eor	r2,r2,r7
+	add	r8,r8,r3,ror#6
+	eor	r3,r9,r10
+	eor	r0,r0,r9,ror#20
+	add	r8,r8,r2
+	ldr	r2,[sp,#16]
+	and	r12,r12,r3
+	add	r4,r4,r8
+	vst1.32	{q8},[r1,:128]!
+	add	r8,r8,r0,ror#2
+	eor	r12,r12,r10
+	vext.8	q8,q1,q2,#4
+	add	r7,r7,r2
+	eor	r2,r5,r6
+	eor	r0,r4,r4,ror#5
+	vext.8	q9,q3,q0,#4
+	add	r8,r8,r12
+	and	r2,r2,r4
+	eor	r12,r0,r4,ror#19
+	vshr.u32	q10,q8,#7
+	eor	r0,r8,r8,ror#11
+	eor	r2,r2,r6
+	vadd.i32	q1,q1,q9
+	add	r7,r7,r12,ror#6
+	eor	r12,r8,r9
+	vshr.u32	q9,q8,#3
+	eor	r0,r0,r8,ror#20
+	add	r7,r7,r2
+	vsli.32	q10,q8,#25
+	ldr	r2,[sp,#20]
+	and	r3,r3,r12
+	vshr.u32	q11,q8,#18
+	add	r11,r11,r7
+	add	r7,r7,r0,ror#2
+	eor	r3,r3,r9
+	veor	q9,q9,q10
+	add	r6,r6,r2
+	vsli.32	q11,q8,#14
+	eor	r2,r4,r5
+	eor	r0,r11,r11,ror#5
+	vshr.u32	d24,d1,#17
+	add	r7,r7,r3
+	and	r2,r2,r11
+	veor	q9,q9,q11
+	eor	r3,r0,r11,ror#19
+	eor	r0,r7,r7,ror#11
+	vsli.32	d24,d1,#15
+	eor	r2,r2,r5
+	add	r6,r6,r3,ror#6
+	vshr.u32	d25,d1,#10
+	eor	r3,r7,r8
+	eor	r0,r0,r7,ror#20
+	vadd.i32	q1,q1,q9
+	add	r6,r6,r2
+	ldr	r2,[sp,#24]
+	veor	d25,d25,d24
+	and	r12,r12,r3
+	add	r10,r10,r6
+	vshr.u32	d24,d1,#19
+	add	r6,r6,r0,ror#2
+	eor	r12,r12,r8
+	vsli.32	d24,d1,#13
+	add	r5,r5,r2
+	eor	r2,r11,r4
+	veor	d25,d25,d24
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12
+	vadd.i32	d2,d2,d25
+	and	r2,r2,r10
+	eor	r12,r0,r10,ror#19
+	vshr.u32	d24,d2,#17
+	eor	r0,r6,r6,ror#11
+	eor	r2,r2,r4
+	vsli.32	d24,d2,#15
+	add	r5,r5,r12,ror#6
+	eor	r12,r6,r7
+	vshr.u32	d25,d2,#10
+	eor	r0,r0,r6,ror#20
+	add	r5,r5,r2
+	veor	d25,d25,d24
+	ldr	r2,[sp,#28]
+	and	r3,r3,r12
+	vshr.u32	d24,d2,#19
+	add	r9,r9,r5
+	add	r5,r5,r0,ror#2
+	eor	r3,r3,r7
+	vld1.32	{q8},[r14,:128]!
+	add	r4,r4,r2
+	vsli.32	d24,d2,#13
+	eor	r2,r10,r11
+	eor	r0,r9,r9,ror#5
+	veor	d25,d25,d24
+	add	r5,r5,r3
+	and	r2,r2,r9
+	vadd.i32	d3,d3,d25
+	eor	r3,r0,r9,ror#19
+	eor	r0,r5,r5,ror#11
+	vadd.i32	q8,q8,q1
+	eor	r2,r2,r11
+	add	r4,r4,r3,ror#6
+	eor	r3,r5,r6
+	eor	r0,r0,r5,ror#20
+	add	r4,r4,r2
+	ldr	r2,[sp,#32]
+	and	r12,r12,r3
+	add	r8,r8,r4
+	vst1.32	{q8},[r1,:128]!
+	add	r4,r4,r0,ror#2
+	eor	r12,r12,r6
+	vext.8	q8,q2,q3,#4
+	add	r11,r11,r2
+	eor	r2,r9,r10
+	eor	r0,r8,r8,ror#5
+	vext.8	q9,q0,q1,#4
+	add	r4,r4,r12
+	and	r2,r2,r8
+	eor	r12,r0,r8,ror#19
+	vshr.u32	q10,q8,#7
+	eor	r0,r4,r4,ror#11
+	eor	r2,r2,r10
+	vadd.i32	q2,q2,q9
+	add	r11,r11,r12,ror#6
+	eor	r12,r4,r5
+	vshr.u32	q9,q8,#3
+	eor	r0,r0,r4,ror#20
+	add	r11,r11,r2
+	vsli.32	q10,q8,#25
+	ldr	r2,[sp,#36]
+	and	r3,r3,r12
+	vshr.u32	q11,q8,#18
+	add	r7,r7,r11
+	add	r11,r11,r0,ror#2
+	eor	r3,r3,r5
+	veor	q9,q9,q10
+	add	r10,r10,r2
+	vsli.32	q11,q8,#14
+	eor	r2,r8,r9
+	eor	r0,r7,r7,ror#5
+	vshr.u32	d24,d3,#17
+	add	r11,r11,r3
+	and	r2,r2,r7
+	veor	q9,q9,q11
+	eor	r3,r0,r7,ror#19
+	eor	r0,r11,r11,ror#11
+	vsli.32	d24,d3,#15
+	eor	r2,r2,r9
+	add	r10,r10,r3,ror#6
+	vshr.u32	d25,d3,#10
+	eor	r3,r11,r4
+	eor	r0,r0,r11,ror#20
+	vadd.i32	q2,q2,q9
+	add	r10,r10,r2
+	ldr	r2,[sp,#40]
+	veor	d25,d25,d24
+	and	r12,r12,r3
+	add	r6,r6,r10
+	vshr.u32	d24,d3,#19
+	add	r10,r10,r0,ror#2
+	eor	r12,r12,r4
+	vsli.32	d24,d3,#13
+	add	r9,r9,r2
+	eor	r2,r7,r8
+	veor	d25,d25,d24
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12
+	vadd.i32	d4,d4,d25
+	and	r2,r2,r6
+	eor	r12,r0,r6,ror#19
+	vshr.u32	d24,d4,#17
+	eor	r0,r10,r10,ror#11
+	eor	r2,r2,r8
+	vsli.32	d24,d4,#15
+	add	r9,r9,r12,ror#6
+	eor	r12,r10,r11
+	vshr.u32	d25,d4,#10
+	eor	r0,r0,r10,ror#20
+	add	r9,r9,r2
+	veor	d25,d25,d24
+	ldr	r2,[sp,#44]
+	and	r3,r3,r12
+	vshr.u32	d24,d4,#19
+	add	r5,r5,r9
+	add	r9,r9,r0,ror#2
+	eor	r3,r3,r11
+	vld1.32	{q8},[r14,:128]!
+	add	r8,r8,r2
+	vsli.32	d24,d4,#13
+	eor	r2,r6,r7
+	eor	r0,r5,r5,ror#5
+	veor	d25,d25,d24
+	add	r9,r9,r3
+	and	r2,r2,r5
+	vadd.i32	d5,d5,d25
+	eor	r3,r0,r5,ror#19
+	eor	r0,r9,r9,ror#11
+	vadd.i32	q8,q8,q2
+	eor	r2,r2,r7
+	add	r8,r8,r3,ror#6
+	eor	r3,r9,r10
+	eor	r0,r0,r9,ror#20
+	add	r8,r8,r2
+	ldr	r2,[sp,#48]
+	and	r12,r12,r3
+	add	r4,r4,r8
+	vst1.32	{q8},[r1,:128]!
+	add	r8,r8,r0,ror#2
+	eor	r12,r12,r10
+	vext.8	q8,q3,q0,#4
+	add	r7,r7,r2
+	eor	r2,r5,r6
+	eor	r0,r4,r4,ror#5
+	vext.8	q9,q1,q2,#4
+	add	r8,r8,r12
+	and	r2,r2,r4
+	eor	r12,r0,r4,ror#19
+	vshr.u32	q10,q8,#7
+	eor	r0,r8,r8,ror#11
+	eor	r2,r2,r6
+	vadd.i32	q3,q3,q9
+	add	r7,r7,r12,ror#6
+	eor	r12,r8,r9
+	vshr.u32	q9,q8,#3
+	eor	r0,r0,r8,ror#20
+	add	r7,r7,r2
+	vsli.32	q10,q8,#25
+	ldr	r2,[sp,#52]
+	and	r3,r3,r12
+	vshr.u32	q11,q8,#18
+	add	r11,r11,r7
+	add	r7,r7,r0,ror#2
+	eor	r3,r3,r9
+	veor	q9,q9,q10
+	add	r6,r6,r2
+	vsli.32	q11,q8,#14
+	eor	r2,r4,r5
+	eor	r0,r11,r11,ror#5
+	vshr.u32	d24,d5,#17
+	add	r7,r7,r3
+	and	r2,r2,r11
+	veor	q9,q9,q11
+	eor	r3,r0,r11,ror#19
+	eor	r0,r7,r7,ror#11
+	vsli.32	d24,d5,#15
+	eor	r2,r2,r5
+	add	r6,r6,r3,ror#6
+	vshr.u32	d25,d5,#10
+	eor	r3,r7,r8
+	eor	r0,r0,r7,ror#20
+	vadd.i32	q3,q3,q9
+	add	r6,r6,r2
+	ldr	r2,[sp,#56]
+	veor	d25,d25,d24
+	and	r12,r12,r3
+	add	r10,r10,r6
+	vshr.u32	d24,d5,#19
+	add	r6,r6,r0,ror#2
+	eor	r12,r12,r8
+	vsli.32	d24,d5,#13
+	add	r5,r5,r2
+	eor	r2,r11,r4
+	veor	d25,d25,d24
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12
+	vadd.i32	d6,d6,d25
+	and	r2,r2,r10
+	eor	r12,r0,r10,ror#19
+	vshr.u32	d24,d6,#17
+	eor	r0,r6,r6,ror#11
+	eor	r2,r2,r4
+	vsli.32	d24,d6,#15
+	add	r5,r5,r12,ror#6
+	eor	r12,r6,r7
+	vshr.u32	d25,d6,#10
+	eor	r0,r0,r6,ror#20
+	add	r5,r5,r2
+	veor	d25,d25,d24
+	ldr	r2,[sp,#60]
+	and	r3,r3,r12
+	vshr.u32	d24,d6,#19
+	add	r9,r9,r5
+	add	r5,r5,r0,ror#2
+	eor	r3,r3,r7
+	vld1.32	{q8},[r14,:128]!
+	add	r4,r4,r2
+	vsli.32	d24,d6,#13
+	eor	r2,r10,r11
+	eor	r0,r9,r9,ror#5
+	veor	d25,d25,d24
+	add	r5,r5,r3
+	and	r2,r2,r9
+	vadd.i32	d7,d7,d25
+	eor	r3,r0,r9,ror#19
+	eor	r0,r5,r5,ror#11
+	vadd.i32	q8,q8,q3
+	eor	r2,r2,r11
+	add	r4,r4,r3,ror#6
+	eor	r3,r5,r6
+	eor	r0,r0,r5,ror#20
+	add	r4,r4,r2
+	ldr	r2,[r14]
+	and	r12,r12,r3
+	add	r8,r8,r4
+	vst1.32	{q8},[r1,:128]!
+	add	r4,r4,r0,ror#2
+	eor	r12,r12,r6
+	teq	r2,#0				@ check for K256 terminator
+	ldr	r2,[sp,#0]
+	sub	r1,r1,#64
+	bne	.L_00_48
+
+	ldr	r1,[sp,#68]
+	ldr	r0,[sp,#72]
+	sub	r14,r14,#256	@ rewind r14
+	teq	r1,r0
+	it	eq
+	subeq	r1,r1,#64		@ avoid SEGV
+	vld1.8	{q0},[r1]!		@ load next input block
+	vld1.8	{q1},[r1]!
+	vld1.8	{q2},[r1]!
+	vld1.8	{q3},[r1]!
+	it	ne
+	strne	r1,[sp,#68]
+	mov	r1,sp
+	add	r11,r11,r2
+	eor	r2,r9,r10
+	eor	r0,r8,r8,ror#5
+	add	r4,r4,r12
+	vld1.32	{q8},[r14,:128]!
+	and	r2,r2,r8
+	eor	r12,r0,r8,ror#19
+	eor	r0,r4,r4,ror#11
+	eor	r2,r2,r10
+	vrev32.8	q0,q0
+	add	r11,r11,r12,ror#6
+	eor	r12,r4,r5
+	eor	r0,r0,r4,ror#20
+	add	r11,r11,r2
+	vadd.i32	q8,q8,q0
+	ldr	r2,[sp,#4]
+	and	r3,r3,r12
+	add	r7,r7,r11
+	add	r11,r11,r0,ror#2
+	eor	r3,r3,r5
+	add	r10,r10,r2
+	eor	r2,r8,r9
+	eor	r0,r7,r7,ror#5
+	add	r11,r11,r3
+	and	r2,r2,r7
+	eor	r3,r0,r7,ror#19
+	eor	r0,r11,r11,ror#11
+	eor	r2,r2,r9
+	add	r10,r10,r3,ror#6
+	eor	r3,r11,r4
+	eor	r0,r0,r11,ror#20
+	add	r10,r10,r2
+	ldr	r2,[sp,#8]
+	and	r12,r12,r3
+	add	r6,r6,r10
+	add	r10,r10,r0,ror#2
+	eor	r12,r12,r4
+	add	r9,r9,r2
+	eor	r2,r7,r8
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12
+	and	r2,r2,r6
+	eor	r12,r0,r6,ror#19
+	eor	r0,r10,r10,ror#11
+	eor	r2,r2,r8
+	add	r9,r9,r12,ror#6
+	eor	r12,r10,r11
+	eor	r0,r0,r10,ror#20
+	add	r9,r9,r2
+	ldr	r2,[sp,#12]
+	and	r3,r3,r12
+	add	r5,r5,r9
+	add	r9,r9,r0,ror#2
+	eor	r3,r3,r11
+	add	r8,r8,r2
+	eor	r2,r6,r7
+	eor	r0,r5,r5,ror#5
+	add	r9,r9,r3
+	and	r2,r2,r5
+	eor	r3,r0,r5,ror#19
+	eor	r0,r9,r9,ror#11
+	eor	r2,r2,r7
+	add	r8,r8,r3,ror#6
+	eor	r3,r9,r10
+	eor	r0,r0,r9,ror#20
+	add	r8,r8,r2
+	ldr	r2,[sp,#16]
+	and	r12,r12,r3
+	add	r4,r4,r8
+	add	r8,r8,r0,ror#2
+	eor	r12,r12,r10
+	vst1.32	{q8},[r1,:128]!
+	add	r7,r7,r2
+	eor	r2,r5,r6
+	eor	r0,r4,r4,ror#5
+	add	r8,r8,r12
+	vld1.32	{q8},[r14,:128]!
+	and	r2,r2,r4
+	eor	r12,r0,r4,ror#19
+	eor	r0,r8,r8,ror#11
+	eor	r2,r2,r6
+	vrev32.8	q1,q1
+	add	r7,r7,r12,ror#6
+	eor	r12,r8,r9
+	eor	r0,r0,r8,ror#20
+	add	r7,r7,r2
+	vadd.i32	q8,q8,q1
+	ldr	r2,[sp,#20]
+	and	r3,r3,r12
+	add	r11,r11,r7
+	add	r7,r7,r0,ror#2
+	eor	r3,r3,r9
+	add	r6,r6,r2
+	eor	r2,r4,r5
+	eor	r0,r11,r11,ror#5
+	add	r7,r7,r3
+	and	r2,r2,r11
+	eor	r3,r0,r11,ror#19
+	eor	r0,r7,r7,ror#11
+	eor	r2,r2,r5
+	add	r6,r6,r3,ror#6
+	eor	r3,r7,r8
+	eor	r0,r0,r7,ror#20
+	add	r6,r6,r2
+	ldr	r2,[sp,#24]
+	and	r12,r12,r3
+	add	r10,r10,r6
+	add	r6,r6,r0,ror#2
+	eor	r12,r12,r8
+	add	r5,r5,r2
+	eor	r2,r11,r4
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12
+	and	r2,r2,r10
+	eor	r12,r0,r10,ror#19
+	eor	r0,r6,r6,ror#11
+	eor	r2,r2,r4
+	add	r5,r5,r12,ror#6
+	eor	r12,r6,r7
+	eor	r0,r0,r6,ror#20
+	add	r5,r5,r2
+	ldr	r2,[sp,#28]
+	and	r3,r3,r12
+	add	r9,r9,r5
+	add	r5,r5,r0,ror#2
+	eor	r3,r3,r7
+	add	r4,r4,r2
+	eor	r2,r10,r11
+	eor	r0,r9,r9,ror#5
+	add	r5,r5,r3
+	and	r2,r2,r9
+	eor	r3,r0,r9,ror#19
+	eor	r0,r5,r5,ror#11
+	eor	r2,r2,r11
+	add	r4,r4,r3,ror#6
+	eor	r3,r5,r6
+	eor	r0,r0,r5,ror#20
+	add	r4,r4,r2
+	ldr	r2,[sp,#32]
+	and	r12,r12,r3
+	add	r8,r8,r4
+	add	r4,r4,r0,ror#2
+	eor	r12,r12,r6
+	vst1.32	{q8},[r1,:128]!
+	add	r11,r11,r2
+	eor	r2,r9,r10
+	eor	r0,r8,r8,ror#5
+	add	r4,r4,r12
+	vld1.32	{q8},[r14,:128]!
+	and	r2,r2,r8
+	eor	r12,r0,r8,ror#19
+	eor	r0,r4,r4,ror#11
+	eor	r2,r2,r10
+	vrev32.8	q2,q2
+	add	r11,r11,r12,ror#6
+	eor	r12,r4,r5
+	eor	r0,r0,r4,ror#20
+	add	r11,r11,r2
+	vadd.i32	q8,q8,q2
+	ldr	r2,[sp,#36]
+	and	r3,r3,r12
+	add	r7,r7,r11
+	add	r11,r11,r0,ror#2
+	eor	r3,r3,r5
+	add	r10,r10,r2
+	eor	r2,r8,r9
+	eor	r0,r7,r7,ror#5
+	add	r11,r11,r3
+	and	r2,r2,r7
+	eor	r3,r0,r7,ror#19
+	eor	r0,r11,r11,ror#11
+	eor	r2,r2,r9
+	add	r10,r10,r3,ror#6
+	eor	r3,r11,r4
+	eor	r0,r0,r11,ror#20
+	add	r10,r10,r2
+	ldr	r2,[sp,#40]
+	and	r12,r12,r3
+	add	r6,r6,r10
+	add	r10,r10,r0,ror#2
+	eor	r12,r12,r4
+	add	r9,r9,r2
+	eor	r2,r7,r8
+	eor	r0,r6,r6,ror#5
+	add	r10,r10,r12
+	and	r2,r2,r6
+	eor	r12,r0,r6,ror#19
+	eor	r0,r10,r10,ror#11
+	eor	r2,r2,r8
+	add	r9,r9,r12,ror#6
+	eor	r12,r10,r11
+	eor	r0,r0,r10,ror#20
+	add	r9,r9,r2
+	ldr	r2,[sp,#44]
+	and	r3,r3,r12
+	add	r5,r5,r9
+	add	r9,r9,r0,ror#2
+	eor	r3,r3,r11
+	add	r8,r8,r2
+	eor	r2,r6,r7
+	eor	r0,r5,r5,ror#5
+	add	r9,r9,r3
+	and	r2,r2,r5
+	eor	r3,r0,r5,ror#19
+	eor	r0,r9,r9,ror#11
+	eor	r2,r2,r7
+	add	r8,r8,r3,ror#6
+	eor	r3,r9,r10
+	eor	r0,r0,r9,ror#20
+	add	r8,r8,r2
+	ldr	r2,[sp,#48]
+	and	r12,r12,r3
+	add	r4,r4,r8
+	add	r8,r8,r0,ror#2
+	eor	r12,r12,r10
+	vst1.32	{q8},[r1,:128]!
+	add	r7,r7,r2
+	eor	r2,r5,r6
+	eor	r0,r4,r4,ror#5
+	add	r8,r8,r12
+	vld1.32	{q8},[r14,:128]!
+	and	r2,r2,r4
+	eor	r12,r0,r4,ror#19
+	eor	r0,r8,r8,ror#11
+	eor	r2,r2,r6
+	vrev32.8	q3,q3
+	add	r7,r7,r12,ror#6
+	eor	r12,r8,r9
+	eor	r0,r0,r8,ror#20
+	add	r7,r7,r2
+	vadd.i32	q8,q8,q3
+	ldr	r2,[sp,#52]
+	and	r3,r3,r12
+	add	r11,r11,r7
+	add	r7,r7,r0,ror#2
+	eor	r3,r3,r9
+	add	r6,r6,r2
+	eor	r2,r4,r5
+	eor	r0,r11,r11,ror#5
+	add	r7,r7,r3
+	and	r2,r2,r11
+	eor	r3,r0,r11,ror#19
+	eor	r0,r7,r7,ror#11
+	eor	r2,r2,r5
+	add	r6,r6,r3,ror#6
+	eor	r3,r7,r8
+	eor	r0,r0,r7,ror#20
+	add	r6,r6,r2
+	ldr	r2,[sp,#56]
+	and	r12,r12,r3
+	add	r10,r10,r6
+	add	r6,r6,r0,ror#2
+	eor	r12,r12,r8
+	add	r5,r5,r2
+	eor	r2,r11,r4
+	eor	r0,r10,r10,ror#5
+	add	r6,r6,r12
+	and	r2,r2,r10
+	eor	r12,r0,r10,ror#19
+	eor	r0,r6,r6,ror#11
+	eor	r2,r2,r4
+	add	r5,r5,r12,ror#6
+	eor	r12,r6,r7
+	eor	r0,r0,r6,ror#20
+	add	r5,r5,r2
+	ldr	r2,[sp,#60]
+	and	r3,r3,r12
+	add	r9,r9,r5
+	add	r5,r5,r0,ror#2
+	eor	r3,r3,r7
+	add	r4,r4,r2
+	eor	r2,r10,r11
+	eor	r0,r9,r9,ror#5
+	add	r5,r5,r3
+	and	r2,r2,r9
+	eor	r3,r0,r9,ror#19
+	eor	r0,r5,r5,ror#11
+	eor	r2,r2,r11
+	add	r4,r4,r3,ror#6
+	eor	r3,r5,r6
+	eor	r0,r0,r5,ror#20
+	add	r4,r4,r2
+	ldr	r2,[sp,#64]
+	and	r12,r12,r3
+	add	r8,r8,r4
+	add	r4,r4,r0,ror#2
+	eor	r12,r12,r6
+	vst1.32	{q8},[r1,:128]!
+	ldr	r0,[r2,#0]
+	add	r4,r4,r12			@ h+=Maj(a,b,c) from the past
+	ldr	r12,[r2,#4]
+	ldr	r3,[r2,#8]
+	ldr	r1,[r2,#12]
+	add	r4,r4,r0			@ accumulate
+	ldr	r0,[r2,#16]
+	add	r5,r5,r12
+	ldr	r12,[r2,#20]
+	add	r6,r6,r3
+	ldr	r3,[r2,#24]
+	add	r7,r7,r1
+	ldr	r1,[r2,#28]
+	add	r8,r8,r0
+	str	r4,[r2],#4
+	add	r9,r9,r12
+	str	r5,[r2],#4
+	add	r10,r10,r3
+	str	r6,[r2],#4
+	add	r11,r11,r1
+	str	r7,[r2],#4
+	stmia	r2,{r8,r9,r10,r11}
+
+	ittte	ne
+	movne	r1,sp
+	ldrne	r2,[sp,#0]
+	eorne	r12,r12,r12
+	ldreq	sp,[sp,#76]			@ restore original sp
+	itt	ne
+	eorne	r3,r5,r6
+	bne	.L_00_48
+
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+.size	sha256_block_data_order_neon,.-sha256_block_data_order_neon
+#endif
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+
+# if defined(__thumb2__) && !defined(__APPLE__)
+#  define INST(a,b,c,d)	.byte	c,d|0xc,a,b
+# else
+#  define INST(a,b,c,d)	.byte	a,b,c,d
+# endif
+
+.type	sha256_block_data_order_armv8,%function
+.align	5
+sha256_block_data_order_armv8:
+.LARMv8:
+	vld1.32	{q0,q1},[r0]
+# ifdef	__APPLE__
+	sub	r3,r3,#256+32
+# elif	defined(__thumb2__)
+	adr	r3,.LARMv8
+	sub	r3,r3,#.LARMv8-K256
+# else
+	adrl	r3,K256
+# endif
+	add	r2,r1,r2,lsl#6	@ len to point at the end of inp
+
+.Loop_v8:
+	vld1.8	{q8,q9},[r1]!
+	vld1.8	{q10,q11},[r1]!
+	vld1.32	{q12},[r3]!
+	vrev32.8	q8,q8
+	vrev32.8	q9,q9
+	vrev32.8	q10,q10
+	vrev32.8	q11,q11
+	vmov	q14,q0	@ offload
+	vmov	q15,q1
+	teq	r1,r2
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q8
+	INST(0xe2,0x03,0xfa,0xf3)	@ sha256su0 q8,q9
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe6,0x0c,0x64,0xf3)	@ sha256su1 q8,q10,q11
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q9
+	INST(0xe4,0x23,0xfa,0xf3)	@ sha256su0 q9,q10
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe0,0x2c,0x66,0xf3)	@ sha256su1 q9,q11,q8
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q10
+	INST(0xe6,0x43,0xfa,0xf3)	@ sha256su0 q10,q11
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe2,0x4c,0x60,0xf3)	@ sha256su1 q10,q8,q9
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q11
+	INST(0xe0,0x63,0xfa,0xf3)	@ sha256su0 q11,q8
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe4,0x6c,0x62,0xf3)	@ sha256su1 q11,q9,q10
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q8
+	INST(0xe2,0x03,0xfa,0xf3)	@ sha256su0 q8,q9
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe6,0x0c,0x64,0xf3)	@ sha256su1 q8,q10,q11
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q9
+	INST(0xe4,0x23,0xfa,0xf3)	@ sha256su0 q9,q10
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe0,0x2c,0x66,0xf3)	@ sha256su1 q9,q11,q8
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q10
+	INST(0xe6,0x43,0xfa,0xf3)	@ sha256su0 q10,q11
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe2,0x4c,0x60,0xf3)	@ sha256su1 q10,q8,q9
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q11
+	INST(0xe0,0x63,0xfa,0xf3)	@ sha256su0 q11,q8
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe4,0x6c,0x62,0xf3)	@ sha256su1 q11,q9,q10
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q8
+	INST(0xe2,0x03,0xfa,0xf3)	@ sha256su0 q8,q9
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe6,0x0c,0x64,0xf3)	@ sha256su1 q8,q10,q11
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q9
+	INST(0xe4,0x23,0xfa,0xf3)	@ sha256su0 q9,q10
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe0,0x2c,0x66,0xf3)	@ sha256su1 q9,q11,q8
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q10
+	INST(0xe6,0x43,0xfa,0xf3)	@ sha256su0 q10,q11
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+	INST(0xe2,0x4c,0x60,0xf3)	@ sha256su1 q10,q8,q9
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q11
+	INST(0xe0,0x63,0xfa,0xf3)	@ sha256su0 q11,q8
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+	INST(0xe4,0x6c,0x62,0xf3)	@ sha256su1 q11,q9,q10
+	vld1.32	{q13},[r3]!
+	vadd.i32	q12,q12,q8
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+
+	vld1.32	{q12},[r3]!
+	vadd.i32	q13,q13,q9
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+
+	vld1.32	{q13},[r3]
+	vadd.i32	q12,q12,q10
+	sub	r3,r3,#256-16	@ rewind
+	vmov	q2,q0
+	INST(0x68,0x0c,0x02,0xf3)	@ sha256h q0,q1,q12
+	INST(0x68,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q12
+
+	vadd.i32	q13,q13,q11
+	vmov	q2,q0
+	INST(0x6a,0x0c,0x02,0xf3)	@ sha256h q0,q1,q13
+	INST(0x6a,0x2c,0x14,0xf3)	@ sha256h2 q1,q2,q13
+
+	vadd.i32	q0,q0,q14
+	vadd.i32	q1,q1,q15
+	it	ne
+	bne	.Loop_v8
+
+	vst1.32	{q0,q1},[r0]
+
+	bx	lr		@ bx lr
+.size	sha256_block_data_order_armv8,.-sha256_block_data_order_armv8
+#endif
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,47,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+.comm	OPENSSL_armcap_P,4,4
+.hidden	OPENSSL_armcap_P
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
new file mode 100644
index 0000000..c794f87
--- /dev/null
+++ b/third_party/boringssl/linux-arm/crypto/sha/sha512-armv4.S
@@ -0,0 +1,1869 @@
+#if defined(__arm__)
+
+@ ====================================================================
+@ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL
+@ project. 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/.
+@
+@ Permission to use under GPL terms is granted.
+@ ====================================================================
+
+@ SHA512 block procedure for ARMv4. September 2007.
+
+@ This code is ~4.5 (four and a half) times faster than code generated
+@ by gcc 3.4 and it spends ~72 clock cycles per byte [on single-issue
+@ Xscale PXA250 core].
+@
+@ July 2010.
+@
+@ Rescheduling for dual-issue pipeline resulted in 6% improvement on
+@ Cortex A8 core and ~40 cycles per processed byte.
+
+@ February 2011.
+@
+@ Profiler-assisted and platform-specific optimization resulted in 7%
+@ improvement on Coxtex A8 core and ~38 cycles per byte.
+
+@ March 2011.
+@
+@ Add NEON implementation. On Cortex A8 it was measured to process
+@ one byte in 23.3 cycles or ~60% faster than integer-only code.
+
+@ August 2012.
+@
+@ Improve NEON performance by 12% on Snapdragon S4. In absolute
+@ terms it's 22.6 cycles per byte, which is disappointing result.
+@ Technical writers asserted that 3-way S4 pipeline can sustain
+@ multiple NEON instructions per cycle, but dual NEON issue could
+@ not be observed, see http://www.openssl.org/~appro/Snapdragon-S4.html
+@ for further details. On side note Cortex-A15 processes one byte in
+@ 16 cycles.
+
+@ Byte order [in]dependence. =========================================
+@
+@ Originally caller was expected to maintain specific *dword* order in
+@ h[0-7], namely with most significant dword at *lower* address, which
+@ was reflected in below two parameters as 0 and 4. Now caller is
+@ expected to maintain native byte order for whole 64-bit values.
+#ifndef __KERNEL__
+# include "arm_arch.h"
+# define VFP_ABI_PUSH	vstmdb	sp!,{d8-d15}
+# define VFP_ABI_POP	vldmia	sp!,{d8-d15}
+#else
+# define __ARM_ARCH__ __LINUX_ARM_ARCH__
+# define __ARM_MAX_ARCH__ 7
+# define VFP_ABI_PUSH
+# define VFP_ABI_POP
+#endif
+
+#ifdef __ARMEL__
+# define LO 0
+# define HI 4
+# define WORD64(hi0,lo0,hi1,lo1)	.word	lo0,hi0, lo1,hi1
+#else
+# define HI 0
+# define LO 4
+# define WORD64(hi0,lo0,hi1,lo1)	.word	hi0,lo0, hi1,lo1
+#endif
+
+.text
+#if __ARM_ARCH__<7 || defined(__APPLE__)
+.code	32
+#else
+.syntax	unified
+# ifdef __thumb2__
+#  define adrl adr
+.thumb
+# else
+.code	32
+# endif
+#endif
+
+.type	K512,%object
+.align	5
+K512:
+	WORD64(0x428a2f98,0xd728ae22,	0x71374491,0x23ef65cd)
+	WORD64(0xb5c0fbcf,0xec4d3b2f,	0xe9b5dba5,0x8189dbbc)
+	WORD64(0x3956c25b,0xf348b538,	0x59f111f1,0xb605d019)
+	WORD64(0x923f82a4,0xaf194f9b,	0xab1c5ed5,0xda6d8118)
+	WORD64(0xd807aa98,0xa3030242,	0x12835b01,0x45706fbe)
+	WORD64(0x243185be,0x4ee4b28c,	0x550c7dc3,0xd5ffb4e2)
+	WORD64(0x72be5d74,0xf27b896f,	0x80deb1fe,0x3b1696b1)
+	WORD64(0x9bdc06a7,0x25c71235,	0xc19bf174,0xcf692694)
+	WORD64(0xe49b69c1,0x9ef14ad2,	0xefbe4786,0x384f25e3)
+	WORD64(0x0fc19dc6,0x8b8cd5b5,	0x240ca1cc,0x77ac9c65)
+	WORD64(0x2de92c6f,0x592b0275,	0x4a7484aa,0x6ea6e483)
+	WORD64(0x5cb0a9dc,0xbd41fbd4,	0x76f988da,0x831153b5)
+	WORD64(0x983e5152,0xee66dfab,	0xa831c66d,0x2db43210)
+	WORD64(0xb00327c8,0x98fb213f,	0xbf597fc7,0xbeef0ee4)
+	WORD64(0xc6e00bf3,0x3da88fc2,	0xd5a79147,0x930aa725)
+	WORD64(0x06ca6351,0xe003826f,	0x14292967,0x0a0e6e70)
+	WORD64(0x27b70a85,0x46d22ffc,	0x2e1b2138,0x5c26c926)
+	WORD64(0x4d2c6dfc,0x5ac42aed,	0x53380d13,0x9d95b3df)
+	WORD64(0x650a7354,0x8baf63de,	0x766a0abb,0x3c77b2a8)
+	WORD64(0x81c2c92e,0x47edaee6,	0x92722c85,0x1482353b)
+	WORD64(0xa2bfe8a1,0x4cf10364,	0xa81a664b,0xbc423001)
+	WORD64(0xc24b8b70,0xd0f89791,	0xc76c51a3,0x0654be30)
+	WORD64(0xd192e819,0xd6ef5218,	0xd6990624,0x5565a910)
+	WORD64(0xf40e3585,0x5771202a,	0x106aa070,0x32bbd1b8)
+	WORD64(0x19a4c116,0xb8d2d0c8,	0x1e376c08,0x5141ab53)
+	WORD64(0x2748774c,0xdf8eeb99,	0x34b0bcb5,0xe19b48a8)
+	WORD64(0x391c0cb3,0xc5c95a63,	0x4ed8aa4a,0xe3418acb)
+	WORD64(0x5b9cca4f,0x7763e373,	0x682e6ff3,0xd6b2b8a3)
+	WORD64(0x748f82ee,0x5defb2fc,	0x78a5636f,0x43172f60)
+	WORD64(0x84c87814,0xa1f0ab72,	0x8cc70208,0x1a6439ec)
+	WORD64(0x90befffa,0x23631e28,	0xa4506ceb,0xde82bde9)
+	WORD64(0xbef9a3f7,0xb2c67915,	0xc67178f2,0xe372532b)
+	WORD64(0xca273ece,0xea26619c,	0xd186b8c7,0x21c0c207)
+	WORD64(0xeada7dd6,0xcde0eb1e,	0xf57d4f7f,0xee6ed178)
+	WORD64(0x06f067aa,0x72176fba,	0x0a637dc5,0xa2c898a6)
+	WORD64(0x113f9804,0xbef90dae,	0x1b710b35,0x131c471b)
+	WORD64(0x28db77f5,0x23047d84,	0x32caab7b,0x40c72493)
+	WORD64(0x3c9ebe0a,0x15c9bebc,	0x431d67c4,0x9c100d4c)
+	WORD64(0x4cc5d4be,0xcb3e42b6,	0x597f299c,0xfc657e2a)
+	WORD64(0x5fcb6fab,0x3ad6faec,	0x6c44198c,0x4a475817)
+.size	K512,.-K512
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+.LOPENSSL_armcap:
+.word	OPENSSL_armcap_P-.Lsha512_block_data_order
+.skip	32-4
+#else
+.skip	32
+#endif
+
+.globl	sha512_block_data_order
+.type	sha512_block_data_order,%function
+sha512_block_data_order:
+.Lsha512_block_data_order:
+#if __ARM_ARCH__<7
+	sub	r3,pc,#8		@ sha512_block_data_order
+#else
+	adr	r3,sha512_block_data_order
+#endif
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+	ldr	r12,.LOPENSSL_armcap
+	ldr	r12,[r3,r12]		@ OPENSSL_armcap_P
+#ifdef	__APPLE__
+	ldr	r12,[r12]
+#endif
+	tst	r12,#1
+	bne	.LNEON
+#endif
+	add	r2,r1,r2,lsl#7	@ len to point at the end of inp
+	stmdb	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	sub	r14,r3,#672		@ K512
+	sub	sp,sp,#9*8
+
+	ldr	r7,[r0,#32+LO]
+	ldr	r8,[r0,#32+HI]
+	ldr	r9, [r0,#48+LO]
+	ldr	r10, [r0,#48+HI]
+	ldr	r11, [r0,#56+LO]
+	ldr	r12, [r0,#56+HI]
+.Loop:
+	str	r9, [sp,#48+0]
+	str	r10, [sp,#48+4]
+	str	r11, [sp,#56+0]
+	str	r12, [sp,#56+4]
+	ldr	r5,[r0,#0+LO]
+	ldr	r6,[r0,#0+HI]
+	ldr	r3,[r0,#8+LO]
+	ldr	r4,[r0,#8+HI]
+	ldr	r9, [r0,#16+LO]
+	ldr	r10, [r0,#16+HI]
+	ldr	r11, [r0,#24+LO]
+	ldr	r12, [r0,#24+HI]
+	str	r3,[sp,#8+0]
+	str	r4,[sp,#8+4]
+	str	r9, [sp,#16+0]
+	str	r10, [sp,#16+4]
+	str	r11, [sp,#24+0]
+	str	r12, [sp,#24+4]
+	ldr	r3,[r0,#40+LO]
+	ldr	r4,[r0,#40+HI]
+	str	r3,[sp,#40+0]
+	str	r4,[sp,#40+4]
+
+.L00_15:
+#if __ARM_ARCH__<7
+	ldrb	r3,[r1,#7]
+	ldrb	r9, [r1,#6]
+	ldrb	r10, [r1,#5]
+	ldrb	r11, [r1,#4]
+	ldrb	r4,[r1,#3]
+	ldrb	r12, [r1,#2]
+	orr	r3,r3,r9,lsl#8
+	ldrb	r9, [r1,#1]
+	orr	r3,r3,r10,lsl#16
+	ldrb	r10, [r1],#8
+	orr	r3,r3,r11,lsl#24
+	orr	r4,r4,r12,lsl#8
+	orr	r4,r4,r9,lsl#16
+	orr	r4,r4,r10,lsl#24
+#else
+	ldr	r3,[r1,#4]
+	ldr	r4,[r1],#8
+#ifdef __ARMEL__
+	rev	r3,r3
+	rev	r4,r4
+#endif
+#endif
+	@ Sigma1(x)	(ROTR((x),14) ^ ROTR((x),18)  ^ ROTR((x),41))
+	@ LO		lo>>14^hi<<18 ^ lo>>18^hi<<14 ^ hi>>9^lo<<23
+	@ HI		hi>>14^lo<<18 ^ hi>>18^lo<<14 ^ lo>>9^hi<<23
+	mov	r9,r7,lsr#14
+	str	r3,[sp,#64+0]
+	mov	r10,r8,lsr#14
+	str	r4,[sp,#64+4]
+	eor	r9,r9,r8,lsl#18
+	ldr	r11,[sp,#56+0]	@ h.lo
+	eor	r10,r10,r7,lsl#18
+	ldr	r12,[sp,#56+4]	@ h.hi
+	eor	r9,r9,r7,lsr#18
+	eor	r10,r10,r8,lsr#18
+	eor	r9,r9,r8,lsl#14
+	eor	r10,r10,r7,lsl#14
+	eor	r9,r9,r8,lsr#9
+	eor	r10,r10,r7,lsr#9
+	eor	r9,r9,r7,lsl#23
+	eor	r10,r10,r8,lsl#23	@ Sigma1(e)
+	adds	r3,r3,r9
+	ldr	r9,[sp,#40+0]	@ f.lo
+	adc	r4,r4,r10		@ T += Sigma1(e)
+	ldr	r10,[sp,#40+4]	@ f.hi
+	adds	r3,r3,r11
+	ldr	r11,[sp,#48+0]	@ g.lo
+	adc	r4,r4,r12		@ T += h
+	ldr	r12,[sp,#48+4]	@ g.hi
+
+	eor	r9,r9,r11
+	str	r7,[sp,#32+0]
+	eor	r10,r10,r12
+	str	r8,[sp,#32+4]
+	and	r9,r9,r7
+	str	r5,[sp,#0+0]
+	and	r10,r10,r8
+	str	r6,[sp,#0+4]
+	eor	r9,r9,r11
+	ldr	r11,[r14,#LO]	@ K[i].lo
+	eor	r10,r10,r12		@ Ch(e,f,g)
+	ldr	r12,[r14,#HI]	@ K[i].hi
+
+	adds	r3,r3,r9
+	ldr	r7,[sp,#24+0]	@ d.lo
+	adc	r4,r4,r10		@ T += Ch(e,f,g)
+	ldr	r8,[sp,#24+4]	@ d.hi
+	adds	r3,r3,r11
+	and	r9,r11,#0xff
+	adc	r4,r4,r12		@ T += K[i]
+	adds	r7,r7,r3
+	ldr	r11,[sp,#8+0]	@ b.lo
+	adc	r8,r8,r4		@ d += T
+	teq	r9,#148
+
+	ldr	r12,[sp,#16+0]	@ c.lo
+#if __ARM_ARCH__>=7
+	it	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	orreq	r14,r14,#1
+	@ Sigma0(x)	(ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
+	@ LO		lo>>28^hi<<4  ^ hi>>2^lo<<30 ^ hi>>7^lo<<25
+	@ HI		hi>>28^lo<<4  ^ lo>>2^hi<<30 ^ lo>>7^hi<<25
+	mov	r9,r5,lsr#28
+	mov	r10,r6,lsr#28
+	eor	r9,r9,r6,lsl#4
+	eor	r10,r10,r5,lsl#4
+	eor	r9,r9,r6,lsr#2
+	eor	r10,r10,r5,lsr#2
+	eor	r9,r9,r5,lsl#30
+	eor	r10,r10,r6,lsl#30
+	eor	r9,r9,r6,lsr#7
+	eor	r10,r10,r5,lsr#7
+	eor	r9,r9,r5,lsl#25
+	eor	r10,r10,r6,lsl#25	@ Sigma0(a)
+	adds	r3,r3,r9
+	and	r9,r5,r11
+	adc	r4,r4,r10		@ T += Sigma0(a)
+
+	ldr	r10,[sp,#8+4]	@ b.hi
+	orr	r5,r5,r11
+	ldr	r11,[sp,#16+4]	@ c.hi
+	and	r5,r5,r12
+	and	r12,r6,r10
+	orr	r6,r6,r10
+	orr	r5,r5,r9		@ Maj(a,b,c).lo
+	and	r6,r6,r11
+	adds	r5,r5,r3
+	orr	r6,r6,r12		@ Maj(a,b,c).hi
+	sub	sp,sp,#8
+	adc	r6,r6,r4		@ h += T
+	tst	r14,#1
+	add	r14,r14,#8
+	tst	r14,#1
+	beq	.L00_15
+	ldr	r9,[sp,#184+0]
+	ldr	r10,[sp,#184+4]
+	bic	r14,r14,#1
+.L16_79:
+	@ sigma0(x)	(ROTR((x),1)  ^ ROTR((x),8)  ^ ((x)>>7))
+	@ LO		lo>>1^hi<<31  ^ lo>>8^hi<<24 ^ lo>>7^hi<<25
+	@ HI		hi>>1^lo<<31  ^ hi>>8^lo<<24 ^ hi>>7
+	mov	r3,r9,lsr#1
+	ldr	r11,[sp,#80+0]
+	mov	r4,r10,lsr#1
+	ldr	r12,[sp,#80+4]
+	eor	r3,r3,r10,lsl#31
+	eor	r4,r4,r9,lsl#31
+	eor	r3,r3,r9,lsr#8
+	eor	r4,r4,r10,lsr#8
+	eor	r3,r3,r10,lsl#24
+	eor	r4,r4,r9,lsl#24
+	eor	r3,r3,r9,lsr#7
+	eor	r4,r4,r10,lsr#7
+	eor	r3,r3,r10,lsl#25
+
+	@ sigma1(x)	(ROTR((x),19) ^ ROTR((x),61) ^ ((x)>>6))
+	@ LO		lo>>19^hi<<13 ^ hi>>29^lo<<3 ^ lo>>6^hi<<26
+	@ HI		hi>>19^lo<<13 ^ lo>>29^hi<<3 ^ hi>>6
+	mov	r9,r11,lsr#19
+	mov	r10,r12,lsr#19
+	eor	r9,r9,r12,lsl#13
+	eor	r10,r10,r11,lsl#13
+	eor	r9,r9,r12,lsr#29
+	eor	r10,r10,r11,lsr#29
+	eor	r9,r9,r11,lsl#3
+	eor	r10,r10,r12,lsl#3
+	eor	r9,r9,r11,lsr#6
+	eor	r10,r10,r12,lsr#6
+	ldr	r11,[sp,#120+0]
+	eor	r9,r9,r12,lsl#26
+
+	ldr	r12,[sp,#120+4]
+	adds	r3,r3,r9
+	ldr	r9,[sp,#192+0]
+	adc	r4,r4,r10
+
+	ldr	r10,[sp,#192+4]
+	adds	r3,r3,r11
+	adc	r4,r4,r12
+	adds	r3,r3,r9
+	adc	r4,r4,r10
+	@ Sigma1(x)	(ROTR((x),14) ^ ROTR((x),18)  ^ ROTR((x),41))
+	@ LO		lo>>14^hi<<18 ^ lo>>18^hi<<14 ^ hi>>9^lo<<23
+	@ HI		hi>>14^lo<<18 ^ hi>>18^lo<<14 ^ lo>>9^hi<<23
+	mov	r9,r7,lsr#14
+	str	r3,[sp,#64+0]
+	mov	r10,r8,lsr#14
+	str	r4,[sp,#64+4]
+	eor	r9,r9,r8,lsl#18
+	ldr	r11,[sp,#56+0]	@ h.lo
+	eor	r10,r10,r7,lsl#18
+	ldr	r12,[sp,#56+4]	@ h.hi
+	eor	r9,r9,r7,lsr#18
+	eor	r10,r10,r8,lsr#18
+	eor	r9,r9,r8,lsl#14
+	eor	r10,r10,r7,lsl#14
+	eor	r9,r9,r8,lsr#9
+	eor	r10,r10,r7,lsr#9
+	eor	r9,r9,r7,lsl#23
+	eor	r10,r10,r8,lsl#23	@ Sigma1(e)
+	adds	r3,r3,r9
+	ldr	r9,[sp,#40+0]	@ f.lo
+	adc	r4,r4,r10		@ T += Sigma1(e)
+	ldr	r10,[sp,#40+4]	@ f.hi
+	adds	r3,r3,r11
+	ldr	r11,[sp,#48+0]	@ g.lo
+	adc	r4,r4,r12		@ T += h
+	ldr	r12,[sp,#48+4]	@ g.hi
+
+	eor	r9,r9,r11
+	str	r7,[sp,#32+0]
+	eor	r10,r10,r12
+	str	r8,[sp,#32+4]
+	and	r9,r9,r7
+	str	r5,[sp,#0+0]
+	and	r10,r10,r8
+	str	r6,[sp,#0+4]
+	eor	r9,r9,r11
+	ldr	r11,[r14,#LO]	@ K[i].lo
+	eor	r10,r10,r12		@ Ch(e,f,g)
+	ldr	r12,[r14,#HI]	@ K[i].hi
+
+	adds	r3,r3,r9
+	ldr	r7,[sp,#24+0]	@ d.lo
+	adc	r4,r4,r10		@ T += Ch(e,f,g)
+	ldr	r8,[sp,#24+4]	@ d.hi
+	adds	r3,r3,r11
+	and	r9,r11,#0xff
+	adc	r4,r4,r12		@ T += K[i]
+	adds	r7,r7,r3
+	ldr	r11,[sp,#8+0]	@ b.lo
+	adc	r8,r8,r4		@ d += T
+	teq	r9,#23
+
+	ldr	r12,[sp,#16+0]	@ c.lo
+#if __ARM_ARCH__>=7
+	it	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	orreq	r14,r14,#1
+	@ Sigma0(x)	(ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
+	@ LO		lo>>28^hi<<4  ^ hi>>2^lo<<30 ^ hi>>7^lo<<25
+	@ HI		hi>>28^lo<<4  ^ lo>>2^hi<<30 ^ lo>>7^hi<<25
+	mov	r9,r5,lsr#28
+	mov	r10,r6,lsr#28
+	eor	r9,r9,r6,lsl#4
+	eor	r10,r10,r5,lsl#4
+	eor	r9,r9,r6,lsr#2
+	eor	r10,r10,r5,lsr#2
+	eor	r9,r9,r5,lsl#30
+	eor	r10,r10,r6,lsl#30
+	eor	r9,r9,r6,lsr#7
+	eor	r10,r10,r5,lsr#7
+	eor	r9,r9,r5,lsl#25
+	eor	r10,r10,r6,lsl#25	@ Sigma0(a)
+	adds	r3,r3,r9
+	and	r9,r5,r11
+	adc	r4,r4,r10		@ T += Sigma0(a)
+
+	ldr	r10,[sp,#8+4]	@ b.hi
+	orr	r5,r5,r11
+	ldr	r11,[sp,#16+4]	@ c.hi
+	and	r5,r5,r12
+	and	r12,r6,r10
+	orr	r6,r6,r10
+	orr	r5,r5,r9		@ Maj(a,b,c).lo
+	and	r6,r6,r11
+	adds	r5,r5,r3
+	orr	r6,r6,r12		@ Maj(a,b,c).hi
+	sub	sp,sp,#8
+	adc	r6,r6,r4		@ h += T
+	tst	r14,#1
+	add	r14,r14,#8
+#if __ARM_ARCH__>=7
+	ittt	eq			@ Thumb2 thing, sanity check in ARM
+#endif
+	ldreq	r9,[sp,#184+0]
+	ldreq	r10,[sp,#184+4]
+	beq	.L16_79
+	bic	r14,r14,#1
+
+	ldr	r3,[sp,#8+0]
+	ldr	r4,[sp,#8+4]
+	ldr	r9, [r0,#0+LO]
+	ldr	r10, [r0,#0+HI]
+	ldr	r11, [r0,#8+LO]
+	ldr	r12, [r0,#8+HI]
+	adds	r9,r5,r9
+	str	r9, [r0,#0+LO]
+	adc	r10,r6,r10
+	str	r10, [r0,#0+HI]
+	adds	r11,r3,r11
+	str	r11, [r0,#8+LO]
+	adc	r12,r4,r12
+	str	r12, [r0,#8+HI]
+
+	ldr	r5,[sp,#16+0]
+	ldr	r6,[sp,#16+4]
+	ldr	r3,[sp,#24+0]
+	ldr	r4,[sp,#24+4]
+	ldr	r9, [r0,#16+LO]
+	ldr	r10, [r0,#16+HI]
+	ldr	r11, [r0,#24+LO]
+	ldr	r12, [r0,#24+HI]
+	adds	r9,r5,r9
+	str	r9, [r0,#16+LO]
+	adc	r10,r6,r10
+	str	r10, [r0,#16+HI]
+	adds	r11,r3,r11
+	str	r11, [r0,#24+LO]
+	adc	r12,r4,r12
+	str	r12, [r0,#24+HI]
+
+	ldr	r3,[sp,#40+0]
+	ldr	r4,[sp,#40+4]
+	ldr	r9, [r0,#32+LO]
+	ldr	r10, [r0,#32+HI]
+	ldr	r11, [r0,#40+LO]
+	ldr	r12, [r0,#40+HI]
+	adds	r7,r7,r9
+	str	r7,[r0,#32+LO]
+	adc	r8,r8,r10
+	str	r8,[r0,#32+HI]
+	adds	r11,r3,r11
+	str	r11, [r0,#40+LO]
+	adc	r12,r4,r12
+	str	r12, [r0,#40+HI]
+
+	ldr	r5,[sp,#48+0]
+	ldr	r6,[sp,#48+4]
+	ldr	r3,[sp,#56+0]
+	ldr	r4,[sp,#56+4]
+	ldr	r9, [r0,#48+LO]
+	ldr	r10, [r0,#48+HI]
+	ldr	r11, [r0,#56+LO]
+	ldr	r12, [r0,#56+HI]
+	adds	r9,r5,r9
+	str	r9, [r0,#48+LO]
+	adc	r10,r6,r10
+	str	r10, [r0,#48+HI]
+	adds	r11,r3,r11
+	str	r11, [r0,#56+LO]
+	adc	r12,r4,r12
+	str	r12, [r0,#56+HI]
+
+	add	sp,sp,#640
+	sub	r14,r14,#640
+
+	teq	r1,r2
+	bne	.Loop
+
+	add	sp,sp,#8*9		@ destroy frame
+#if __ARM_ARCH__>=5
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,pc}
+#else
+	ldmia	sp!,{r4,r5,r6,r7,r8,r9,r10,r11,r12,lr}
+	tst	lr,#1
+	moveq	pc,lr			@ be binary compatible with V4, yet
+.word	0xe12fff1e			@ interoperable with Thumb ISA:-)
+#endif
+.size	sha512_block_data_order,.-sha512_block_data_order
+#if __ARM_MAX_ARCH__>=7
+.arch	armv7-a
+.fpu	neon
+
+.globl	sha512_block_data_order_neon
+.type	sha512_block_data_order_neon,%function
+.align	4
+sha512_block_data_order_neon:
+.LNEON:
+	dmb	@ errata #451034 on early Cortex A8
+	add	r2,r1,r2,lsl#7	@ len to point at the end of inp
+	adr	r3,K512
+	VFP_ABI_PUSH
+	vldmia	r0,{d16,d17,d18,d19,d20,d21,d22,d23}		@ load context
+.Loop_neon:
+	vshr.u64	d24,d20,#14	@ 0
+#if 0<16
+	vld1.64	{d0},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d20,#18
+#if 0>0
+	vadd.i64	d16,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d20,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d20,#50
+	vsli.64	d25,d20,#46
+	vmov	d29,d20
+	vsli.64	d26,d20,#23
+#if 0<16 && defined(__ARMEL__)
+	vrev64.8	d0,d0
+#endif
+	veor	d25,d24
+	vbsl	d29,d21,d22		@ Ch(e,f,g)
+	vshr.u64	d24,d16,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d23
+	vshr.u64	d25,d16,#34
+	vsli.64	d24,d16,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d16,#39
+	vadd.i64	d28,d0
+	vsli.64	d25,d16,#30
+	veor	d30,d16,d17
+	vsli.64	d26,d16,#25
+	veor	d23,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d18,d17		@ Maj(a,b,c)
+	veor	d23,d26			@ Sigma0(a)
+	vadd.i64	d19,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d23,d30
+	vshr.u64	d24,d19,#14	@ 1
+#if 1<16
+	vld1.64	{d1},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d19,#18
+#if 1>0
+	vadd.i64	d23,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d19,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d19,#50
+	vsli.64	d25,d19,#46
+	vmov	d29,d19
+	vsli.64	d26,d19,#23
+#if 1<16 && defined(__ARMEL__)
+	vrev64.8	d1,d1
+#endif
+	veor	d25,d24
+	vbsl	d29,d20,d21		@ Ch(e,f,g)
+	vshr.u64	d24,d23,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d22
+	vshr.u64	d25,d23,#34
+	vsli.64	d24,d23,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d23,#39
+	vadd.i64	d28,d1
+	vsli.64	d25,d23,#30
+	veor	d30,d23,d16
+	vsli.64	d26,d23,#25
+	veor	d22,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d17,d16		@ Maj(a,b,c)
+	veor	d22,d26			@ Sigma0(a)
+	vadd.i64	d18,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d22,d30
+	vshr.u64	d24,d18,#14	@ 2
+#if 2<16
+	vld1.64	{d2},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d18,#18
+#if 2>0
+	vadd.i64	d22,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d18,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d18,#50
+	vsli.64	d25,d18,#46
+	vmov	d29,d18
+	vsli.64	d26,d18,#23
+#if 2<16 && defined(__ARMEL__)
+	vrev64.8	d2,d2
+#endif
+	veor	d25,d24
+	vbsl	d29,d19,d20		@ Ch(e,f,g)
+	vshr.u64	d24,d22,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d21
+	vshr.u64	d25,d22,#34
+	vsli.64	d24,d22,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d22,#39
+	vadd.i64	d28,d2
+	vsli.64	d25,d22,#30
+	veor	d30,d22,d23
+	vsli.64	d26,d22,#25
+	veor	d21,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d16,d23		@ Maj(a,b,c)
+	veor	d21,d26			@ Sigma0(a)
+	vadd.i64	d17,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d21,d30
+	vshr.u64	d24,d17,#14	@ 3
+#if 3<16
+	vld1.64	{d3},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d17,#18
+#if 3>0
+	vadd.i64	d21,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d17,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d17,#50
+	vsli.64	d25,d17,#46
+	vmov	d29,d17
+	vsli.64	d26,d17,#23
+#if 3<16 && defined(__ARMEL__)
+	vrev64.8	d3,d3
+#endif
+	veor	d25,d24
+	vbsl	d29,d18,d19		@ Ch(e,f,g)
+	vshr.u64	d24,d21,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d20
+	vshr.u64	d25,d21,#34
+	vsli.64	d24,d21,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d21,#39
+	vadd.i64	d28,d3
+	vsli.64	d25,d21,#30
+	veor	d30,d21,d22
+	vsli.64	d26,d21,#25
+	veor	d20,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d23,d22		@ Maj(a,b,c)
+	veor	d20,d26			@ Sigma0(a)
+	vadd.i64	d16,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d20,d30
+	vshr.u64	d24,d16,#14	@ 4
+#if 4<16
+	vld1.64	{d4},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d16,#18
+#if 4>0
+	vadd.i64	d20,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d16,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d16,#50
+	vsli.64	d25,d16,#46
+	vmov	d29,d16
+	vsli.64	d26,d16,#23
+#if 4<16 && defined(__ARMEL__)
+	vrev64.8	d4,d4
+#endif
+	veor	d25,d24
+	vbsl	d29,d17,d18		@ Ch(e,f,g)
+	vshr.u64	d24,d20,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d19
+	vshr.u64	d25,d20,#34
+	vsli.64	d24,d20,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d20,#39
+	vadd.i64	d28,d4
+	vsli.64	d25,d20,#30
+	veor	d30,d20,d21
+	vsli.64	d26,d20,#25
+	veor	d19,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d22,d21		@ Maj(a,b,c)
+	veor	d19,d26			@ Sigma0(a)
+	vadd.i64	d23,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d19,d30
+	vshr.u64	d24,d23,#14	@ 5
+#if 5<16
+	vld1.64	{d5},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d23,#18
+#if 5>0
+	vadd.i64	d19,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d23,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d23,#50
+	vsli.64	d25,d23,#46
+	vmov	d29,d23
+	vsli.64	d26,d23,#23
+#if 5<16 && defined(__ARMEL__)
+	vrev64.8	d5,d5
+#endif
+	veor	d25,d24
+	vbsl	d29,d16,d17		@ Ch(e,f,g)
+	vshr.u64	d24,d19,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d18
+	vshr.u64	d25,d19,#34
+	vsli.64	d24,d19,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d19,#39
+	vadd.i64	d28,d5
+	vsli.64	d25,d19,#30
+	veor	d30,d19,d20
+	vsli.64	d26,d19,#25
+	veor	d18,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d21,d20		@ Maj(a,b,c)
+	veor	d18,d26			@ Sigma0(a)
+	vadd.i64	d22,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d18,d30
+	vshr.u64	d24,d22,#14	@ 6
+#if 6<16
+	vld1.64	{d6},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d22,#18
+#if 6>0
+	vadd.i64	d18,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d22,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d22,#50
+	vsli.64	d25,d22,#46
+	vmov	d29,d22
+	vsli.64	d26,d22,#23
+#if 6<16 && defined(__ARMEL__)
+	vrev64.8	d6,d6
+#endif
+	veor	d25,d24
+	vbsl	d29,d23,d16		@ Ch(e,f,g)
+	vshr.u64	d24,d18,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d17
+	vshr.u64	d25,d18,#34
+	vsli.64	d24,d18,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d18,#39
+	vadd.i64	d28,d6
+	vsli.64	d25,d18,#30
+	veor	d30,d18,d19
+	vsli.64	d26,d18,#25
+	veor	d17,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d20,d19		@ Maj(a,b,c)
+	veor	d17,d26			@ Sigma0(a)
+	vadd.i64	d21,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d17,d30
+	vshr.u64	d24,d21,#14	@ 7
+#if 7<16
+	vld1.64	{d7},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d21,#18
+#if 7>0
+	vadd.i64	d17,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d21,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d21,#50
+	vsli.64	d25,d21,#46
+	vmov	d29,d21
+	vsli.64	d26,d21,#23
+#if 7<16 && defined(__ARMEL__)
+	vrev64.8	d7,d7
+#endif
+	veor	d25,d24
+	vbsl	d29,d22,d23		@ Ch(e,f,g)
+	vshr.u64	d24,d17,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d16
+	vshr.u64	d25,d17,#34
+	vsli.64	d24,d17,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d17,#39
+	vadd.i64	d28,d7
+	vsli.64	d25,d17,#30
+	veor	d30,d17,d18
+	vsli.64	d26,d17,#25
+	veor	d16,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d19,d18		@ Maj(a,b,c)
+	veor	d16,d26			@ Sigma0(a)
+	vadd.i64	d20,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d16,d30
+	vshr.u64	d24,d20,#14	@ 8
+#if 8<16
+	vld1.64	{d8},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d20,#18
+#if 8>0
+	vadd.i64	d16,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d20,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d20,#50
+	vsli.64	d25,d20,#46
+	vmov	d29,d20
+	vsli.64	d26,d20,#23
+#if 8<16 && defined(__ARMEL__)
+	vrev64.8	d8,d8
+#endif
+	veor	d25,d24
+	vbsl	d29,d21,d22		@ Ch(e,f,g)
+	vshr.u64	d24,d16,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d23
+	vshr.u64	d25,d16,#34
+	vsli.64	d24,d16,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d16,#39
+	vadd.i64	d28,d8
+	vsli.64	d25,d16,#30
+	veor	d30,d16,d17
+	vsli.64	d26,d16,#25
+	veor	d23,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d18,d17		@ Maj(a,b,c)
+	veor	d23,d26			@ Sigma0(a)
+	vadd.i64	d19,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d23,d30
+	vshr.u64	d24,d19,#14	@ 9
+#if 9<16
+	vld1.64	{d9},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d19,#18
+#if 9>0
+	vadd.i64	d23,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d19,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d19,#50
+	vsli.64	d25,d19,#46
+	vmov	d29,d19
+	vsli.64	d26,d19,#23
+#if 9<16 && defined(__ARMEL__)
+	vrev64.8	d9,d9
+#endif
+	veor	d25,d24
+	vbsl	d29,d20,d21		@ Ch(e,f,g)
+	vshr.u64	d24,d23,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d22
+	vshr.u64	d25,d23,#34
+	vsli.64	d24,d23,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d23,#39
+	vadd.i64	d28,d9
+	vsli.64	d25,d23,#30
+	veor	d30,d23,d16
+	vsli.64	d26,d23,#25
+	veor	d22,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d17,d16		@ Maj(a,b,c)
+	veor	d22,d26			@ Sigma0(a)
+	vadd.i64	d18,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d22,d30
+	vshr.u64	d24,d18,#14	@ 10
+#if 10<16
+	vld1.64	{d10},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d18,#18
+#if 10>0
+	vadd.i64	d22,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d18,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d18,#50
+	vsli.64	d25,d18,#46
+	vmov	d29,d18
+	vsli.64	d26,d18,#23
+#if 10<16 && defined(__ARMEL__)
+	vrev64.8	d10,d10
+#endif
+	veor	d25,d24
+	vbsl	d29,d19,d20		@ Ch(e,f,g)
+	vshr.u64	d24,d22,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d21
+	vshr.u64	d25,d22,#34
+	vsli.64	d24,d22,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d22,#39
+	vadd.i64	d28,d10
+	vsli.64	d25,d22,#30
+	veor	d30,d22,d23
+	vsli.64	d26,d22,#25
+	veor	d21,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d16,d23		@ Maj(a,b,c)
+	veor	d21,d26			@ Sigma0(a)
+	vadd.i64	d17,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d21,d30
+	vshr.u64	d24,d17,#14	@ 11
+#if 11<16
+	vld1.64	{d11},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d17,#18
+#if 11>0
+	vadd.i64	d21,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d17,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d17,#50
+	vsli.64	d25,d17,#46
+	vmov	d29,d17
+	vsli.64	d26,d17,#23
+#if 11<16 && defined(__ARMEL__)
+	vrev64.8	d11,d11
+#endif
+	veor	d25,d24
+	vbsl	d29,d18,d19		@ Ch(e,f,g)
+	vshr.u64	d24,d21,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d20
+	vshr.u64	d25,d21,#34
+	vsli.64	d24,d21,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d21,#39
+	vadd.i64	d28,d11
+	vsli.64	d25,d21,#30
+	veor	d30,d21,d22
+	vsli.64	d26,d21,#25
+	veor	d20,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d23,d22		@ Maj(a,b,c)
+	veor	d20,d26			@ Sigma0(a)
+	vadd.i64	d16,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d20,d30
+	vshr.u64	d24,d16,#14	@ 12
+#if 12<16
+	vld1.64	{d12},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d16,#18
+#if 12>0
+	vadd.i64	d20,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d16,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d16,#50
+	vsli.64	d25,d16,#46
+	vmov	d29,d16
+	vsli.64	d26,d16,#23
+#if 12<16 && defined(__ARMEL__)
+	vrev64.8	d12,d12
+#endif
+	veor	d25,d24
+	vbsl	d29,d17,d18		@ Ch(e,f,g)
+	vshr.u64	d24,d20,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d19
+	vshr.u64	d25,d20,#34
+	vsli.64	d24,d20,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d20,#39
+	vadd.i64	d28,d12
+	vsli.64	d25,d20,#30
+	veor	d30,d20,d21
+	vsli.64	d26,d20,#25
+	veor	d19,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d22,d21		@ Maj(a,b,c)
+	veor	d19,d26			@ Sigma0(a)
+	vadd.i64	d23,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d19,d30
+	vshr.u64	d24,d23,#14	@ 13
+#if 13<16
+	vld1.64	{d13},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d23,#18
+#if 13>0
+	vadd.i64	d19,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d23,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d23,#50
+	vsli.64	d25,d23,#46
+	vmov	d29,d23
+	vsli.64	d26,d23,#23
+#if 13<16 && defined(__ARMEL__)
+	vrev64.8	d13,d13
+#endif
+	veor	d25,d24
+	vbsl	d29,d16,d17		@ Ch(e,f,g)
+	vshr.u64	d24,d19,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d18
+	vshr.u64	d25,d19,#34
+	vsli.64	d24,d19,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d19,#39
+	vadd.i64	d28,d13
+	vsli.64	d25,d19,#30
+	veor	d30,d19,d20
+	vsli.64	d26,d19,#25
+	veor	d18,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d21,d20		@ Maj(a,b,c)
+	veor	d18,d26			@ Sigma0(a)
+	vadd.i64	d22,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d18,d30
+	vshr.u64	d24,d22,#14	@ 14
+#if 14<16
+	vld1.64	{d14},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d22,#18
+#if 14>0
+	vadd.i64	d18,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d22,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d22,#50
+	vsli.64	d25,d22,#46
+	vmov	d29,d22
+	vsli.64	d26,d22,#23
+#if 14<16 && defined(__ARMEL__)
+	vrev64.8	d14,d14
+#endif
+	veor	d25,d24
+	vbsl	d29,d23,d16		@ Ch(e,f,g)
+	vshr.u64	d24,d18,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d17
+	vshr.u64	d25,d18,#34
+	vsli.64	d24,d18,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d18,#39
+	vadd.i64	d28,d14
+	vsli.64	d25,d18,#30
+	veor	d30,d18,d19
+	vsli.64	d26,d18,#25
+	veor	d17,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d20,d19		@ Maj(a,b,c)
+	veor	d17,d26			@ Sigma0(a)
+	vadd.i64	d21,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d17,d30
+	vshr.u64	d24,d21,#14	@ 15
+#if 15<16
+	vld1.64	{d15},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d21,#18
+#if 15>0
+	vadd.i64	d17,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d21,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d21,#50
+	vsli.64	d25,d21,#46
+	vmov	d29,d21
+	vsli.64	d26,d21,#23
+#if 15<16 && defined(__ARMEL__)
+	vrev64.8	d15,d15
+#endif
+	veor	d25,d24
+	vbsl	d29,d22,d23		@ Ch(e,f,g)
+	vshr.u64	d24,d17,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d16
+	vshr.u64	d25,d17,#34
+	vsli.64	d24,d17,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d17,#39
+	vadd.i64	d28,d15
+	vsli.64	d25,d17,#30
+	veor	d30,d17,d18
+	vsli.64	d26,d17,#25
+	veor	d16,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d19,d18		@ Maj(a,b,c)
+	veor	d16,d26			@ Sigma0(a)
+	vadd.i64	d20,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d16,d30
+	mov	r12,#4
+.L16_79_neon:
+	subs	r12,#1
+	vshr.u64	q12,q7,#19
+	vshr.u64	q13,q7,#61
+	vadd.i64	d16,d30			@ h+=Maj from the past
+	vshr.u64	q15,q7,#6
+	vsli.64	q12,q7,#45
+	vext.8	q14,q0,q1,#8	@ X[i+1]
+	vsli.64	q13,q7,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q0,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q4,q5,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d20,#14		@ from NEON_00_15
+	vadd.i64	q0,q14
+	vshr.u64	d25,d20,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d20,#41		@ from NEON_00_15
+	vadd.i64	q0,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d20,#50
+	vsli.64	d25,d20,#46
+	vmov	d29,d20
+	vsli.64	d26,d20,#23
+#if 16<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d21,d22		@ Ch(e,f,g)
+	vshr.u64	d24,d16,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d23
+	vshr.u64	d25,d16,#34
+	vsli.64	d24,d16,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d16,#39
+	vadd.i64	d28,d0
+	vsli.64	d25,d16,#30
+	veor	d30,d16,d17
+	vsli.64	d26,d16,#25
+	veor	d23,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d18,d17		@ Maj(a,b,c)
+	veor	d23,d26			@ Sigma0(a)
+	vadd.i64	d19,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d23,d30
+	vshr.u64	d24,d19,#14	@ 17
+#if 17<16
+	vld1.64	{d1},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d19,#18
+#if 17>0
+	vadd.i64	d23,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d19,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d19,#50
+	vsli.64	d25,d19,#46
+	vmov	d29,d19
+	vsli.64	d26,d19,#23
+#if 17<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d20,d21		@ Ch(e,f,g)
+	vshr.u64	d24,d23,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d22
+	vshr.u64	d25,d23,#34
+	vsli.64	d24,d23,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d23,#39
+	vadd.i64	d28,d1
+	vsli.64	d25,d23,#30
+	veor	d30,d23,d16
+	vsli.64	d26,d23,#25
+	veor	d22,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d17,d16		@ Maj(a,b,c)
+	veor	d22,d26			@ Sigma0(a)
+	vadd.i64	d18,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d22,d30
+	vshr.u64	q12,q0,#19
+	vshr.u64	q13,q0,#61
+	vadd.i64	d22,d30			@ h+=Maj from the past
+	vshr.u64	q15,q0,#6
+	vsli.64	q12,q0,#45
+	vext.8	q14,q1,q2,#8	@ X[i+1]
+	vsli.64	q13,q0,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q1,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q5,q6,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d18,#14		@ from NEON_00_15
+	vadd.i64	q1,q14
+	vshr.u64	d25,d18,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d18,#41		@ from NEON_00_15
+	vadd.i64	q1,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d18,#50
+	vsli.64	d25,d18,#46
+	vmov	d29,d18
+	vsli.64	d26,d18,#23
+#if 18<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d19,d20		@ Ch(e,f,g)
+	vshr.u64	d24,d22,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d21
+	vshr.u64	d25,d22,#34
+	vsli.64	d24,d22,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d22,#39
+	vadd.i64	d28,d2
+	vsli.64	d25,d22,#30
+	veor	d30,d22,d23
+	vsli.64	d26,d22,#25
+	veor	d21,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d16,d23		@ Maj(a,b,c)
+	veor	d21,d26			@ Sigma0(a)
+	vadd.i64	d17,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d21,d30
+	vshr.u64	d24,d17,#14	@ 19
+#if 19<16
+	vld1.64	{d3},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d17,#18
+#if 19>0
+	vadd.i64	d21,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d17,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d17,#50
+	vsli.64	d25,d17,#46
+	vmov	d29,d17
+	vsli.64	d26,d17,#23
+#if 19<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d18,d19		@ Ch(e,f,g)
+	vshr.u64	d24,d21,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d20
+	vshr.u64	d25,d21,#34
+	vsli.64	d24,d21,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d21,#39
+	vadd.i64	d28,d3
+	vsli.64	d25,d21,#30
+	veor	d30,d21,d22
+	vsli.64	d26,d21,#25
+	veor	d20,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d23,d22		@ Maj(a,b,c)
+	veor	d20,d26			@ Sigma0(a)
+	vadd.i64	d16,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d20,d30
+	vshr.u64	q12,q1,#19
+	vshr.u64	q13,q1,#61
+	vadd.i64	d20,d30			@ h+=Maj from the past
+	vshr.u64	q15,q1,#6
+	vsli.64	q12,q1,#45
+	vext.8	q14,q2,q3,#8	@ X[i+1]
+	vsli.64	q13,q1,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q2,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q6,q7,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d16,#14		@ from NEON_00_15
+	vadd.i64	q2,q14
+	vshr.u64	d25,d16,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d16,#41		@ from NEON_00_15
+	vadd.i64	q2,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d16,#50
+	vsli.64	d25,d16,#46
+	vmov	d29,d16
+	vsli.64	d26,d16,#23
+#if 20<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d17,d18		@ Ch(e,f,g)
+	vshr.u64	d24,d20,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d19
+	vshr.u64	d25,d20,#34
+	vsli.64	d24,d20,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d20,#39
+	vadd.i64	d28,d4
+	vsli.64	d25,d20,#30
+	veor	d30,d20,d21
+	vsli.64	d26,d20,#25
+	veor	d19,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d22,d21		@ Maj(a,b,c)
+	veor	d19,d26			@ Sigma0(a)
+	vadd.i64	d23,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d19,d30
+	vshr.u64	d24,d23,#14	@ 21
+#if 21<16
+	vld1.64	{d5},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d23,#18
+#if 21>0
+	vadd.i64	d19,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d23,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d23,#50
+	vsli.64	d25,d23,#46
+	vmov	d29,d23
+	vsli.64	d26,d23,#23
+#if 21<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d16,d17		@ Ch(e,f,g)
+	vshr.u64	d24,d19,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d18
+	vshr.u64	d25,d19,#34
+	vsli.64	d24,d19,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d19,#39
+	vadd.i64	d28,d5
+	vsli.64	d25,d19,#30
+	veor	d30,d19,d20
+	vsli.64	d26,d19,#25
+	veor	d18,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d21,d20		@ Maj(a,b,c)
+	veor	d18,d26			@ Sigma0(a)
+	vadd.i64	d22,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d18,d30
+	vshr.u64	q12,q2,#19
+	vshr.u64	q13,q2,#61
+	vadd.i64	d18,d30			@ h+=Maj from the past
+	vshr.u64	q15,q2,#6
+	vsli.64	q12,q2,#45
+	vext.8	q14,q3,q4,#8	@ X[i+1]
+	vsli.64	q13,q2,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q3,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q7,q0,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d22,#14		@ from NEON_00_15
+	vadd.i64	q3,q14
+	vshr.u64	d25,d22,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d22,#41		@ from NEON_00_15
+	vadd.i64	q3,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d22,#50
+	vsli.64	d25,d22,#46
+	vmov	d29,d22
+	vsli.64	d26,d22,#23
+#if 22<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d23,d16		@ Ch(e,f,g)
+	vshr.u64	d24,d18,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d17
+	vshr.u64	d25,d18,#34
+	vsli.64	d24,d18,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d18,#39
+	vadd.i64	d28,d6
+	vsli.64	d25,d18,#30
+	veor	d30,d18,d19
+	vsli.64	d26,d18,#25
+	veor	d17,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d20,d19		@ Maj(a,b,c)
+	veor	d17,d26			@ Sigma0(a)
+	vadd.i64	d21,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d17,d30
+	vshr.u64	d24,d21,#14	@ 23
+#if 23<16
+	vld1.64	{d7},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d21,#18
+#if 23>0
+	vadd.i64	d17,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d21,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d21,#50
+	vsli.64	d25,d21,#46
+	vmov	d29,d21
+	vsli.64	d26,d21,#23
+#if 23<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d22,d23		@ Ch(e,f,g)
+	vshr.u64	d24,d17,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d16
+	vshr.u64	d25,d17,#34
+	vsli.64	d24,d17,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d17,#39
+	vadd.i64	d28,d7
+	vsli.64	d25,d17,#30
+	veor	d30,d17,d18
+	vsli.64	d26,d17,#25
+	veor	d16,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d19,d18		@ Maj(a,b,c)
+	veor	d16,d26			@ Sigma0(a)
+	vadd.i64	d20,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d16,d30
+	vshr.u64	q12,q3,#19
+	vshr.u64	q13,q3,#61
+	vadd.i64	d16,d30			@ h+=Maj from the past
+	vshr.u64	q15,q3,#6
+	vsli.64	q12,q3,#45
+	vext.8	q14,q4,q5,#8	@ X[i+1]
+	vsli.64	q13,q3,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q4,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q0,q1,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d20,#14		@ from NEON_00_15
+	vadd.i64	q4,q14
+	vshr.u64	d25,d20,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d20,#41		@ from NEON_00_15
+	vadd.i64	q4,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d20,#50
+	vsli.64	d25,d20,#46
+	vmov	d29,d20
+	vsli.64	d26,d20,#23
+#if 24<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d21,d22		@ Ch(e,f,g)
+	vshr.u64	d24,d16,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d23
+	vshr.u64	d25,d16,#34
+	vsli.64	d24,d16,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d16,#39
+	vadd.i64	d28,d8
+	vsli.64	d25,d16,#30
+	veor	d30,d16,d17
+	vsli.64	d26,d16,#25
+	veor	d23,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d18,d17		@ Maj(a,b,c)
+	veor	d23,d26			@ Sigma0(a)
+	vadd.i64	d19,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d23,d30
+	vshr.u64	d24,d19,#14	@ 25
+#if 25<16
+	vld1.64	{d9},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d19,#18
+#if 25>0
+	vadd.i64	d23,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d19,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d19,#50
+	vsli.64	d25,d19,#46
+	vmov	d29,d19
+	vsli.64	d26,d19,#23
+#if 25<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d20,d21		@ Ch(e,f,g)
+	vshr.u64	d24,d23,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d22
+	vshr.u64	d25,d23,#34
+	vsli.64	d24,d23,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d23,#39
+	vadd.i64	d28,d9
+	vsli.64	d25,d23,#30
+	veor	d30,d23,d16
+	vsli.64	d26,d23,#25
+	veor	d22,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d17,d16		@ Maj(a,b,c)
+	veor	d22,d26			@ Sigma0(a)
+	vadd.i64	d18,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d22,d30
+	vshr.u64	q12,q4,#19
+	vshr.u64	q13,q4,#61
+	vadd.i64	d22,d30			@ h+=Maj from the past
+	vshr.u64	q15,q4,#6
+	vsli.64	q12,q4,#45
+	vext.8	q14,q5,q6,#8	@ X[i+1]
+	vsli.64	q13,q4,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q5,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q1,q2,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d18,#14		@ from NEON_00_15
+	vadd.i64	q5,q14
+	vshr.u64	d25,d18,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d18,#41		@ from NEON_00_15
+	vadd.i64	q5,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d18,#50
+	vsli.64	d25,d18,#46
+	vmov	d29,d18
+	vsli.64	d26,d18,#23
+#if 26<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d19,d20		@ Ch(e,f,g)
+	vshr.u64	d24,d22,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d21
+	vshr.u64	d25,d22,#34
+	vsli.64	d24,d22,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d22,#39
+	vadd.i64	d28,d10
+	vsli.64	d25,d22,#30
+	veor	d30,d22,d23
+	vsli.64	d26,d22,#25
+	veor	d21,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d16,d23		@ Maj(a,b,c)
+	veor	d21,d26			@ Sigma0(a)
+	vadd.i64	d17,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d21,d30
+	vshr.u64	d24,d17,#14	@ 27
+#if 27<16
+	vld1.64	{d11},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d17,#18
+#if 27>0
+	vadd.i64	d21,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d17,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d17,#50
+	vsli.64	d25,d17,#46
+	vmov	d29,d17
+	vsli.64	d26,d17,#23
+#if 27<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d18,d19		@ Ch(e,f,g)
+	vshr.u64	d24,d21,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d20
+	vshr.u64	d25,d21,#34
+	vsli.64	d24,d21,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d21,#39
+	vadd.i64	d28,d11
+	vsli.64	d25,d21,#30
+	veor	d30,d21,d22
+	vsli.64	d26,d21,#25
+	veor	d20,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d23,d22		@ Maj(a,b,c)
+	veor	d20,d26			@ Sigma0(a)
+	vadd.i64	d16,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d20,d30
+	vshr.u64	q12,q5,#19
+	vshr.u64	q13,q5,#61
+	vadd.i64	d20,d30			@ h+=Maj from the past
+	vshr.u64	q15,q5,#6
+	vsli.64	q12,q5,#45
+	vext.8	q14,q6,q7,#8	@ X[i+1]
+	vsli.64	q13,q5,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q6,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q2,q3,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d16,#14		@ from NEON_00_15
+	vadd.i64	q6,q14
+	vshr.u64	d25,d16,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d16,#41		@ from NEON_00_15
+	vadd.i64	q6,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d16,#50
+	vsli.64	d25,d16,#46
+	vmov	d29,d16
+	vsli.64	d26,d16,#23
+#if 28<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d17,d18		@ Ch(e,f,g)
+	vshr.u64	d24,d20,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d19
+	vshr.u64	d25,d20,#34
+	vsli.64	d24,d20,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d20,#39
+	vadd.i64	d28,d12
+	vsli.64	d25,d20,#30
+	veor	d30,d20,d21
+	vsli.64	d26,d20,#25
+	veor	d19,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d22,d21		@ Maj(a,b,c)
+	veor	d19,d26			@ Sigma0(a)
+	vadd.i64	d23,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d19,d30
+	vshr.u64	d24,d23,#14	@ 29
+#if 29<16
+	vld1.64	{d13},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d23,#18
+#if 29>0
+	vadd.i64	d19,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d23,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d23,#50
+	vsli.64	d25,d23,#46
+	vmov	d29,d23
+	vsli.64	d26,d23,#23
+#if 29<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d16,d17		@ Ch(e,f,g)
+	vshr.u64	d24,d19,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d18
+	vshr.u64	d25,d19,#34
+	vsli.64	d24,d19,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d19,#39
+	vadd.i64	d28,d13
+	vsli.64	d25,d19,#30
+	veor	d30,d19,d20
+	vsli.64	d26,d19,#25
+	veor	d18,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d21,d20		@ Maj(a,b,c)
+	veor	d18,d26			@ Sigma0(a)
+	vadd.i64	d22,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d18,d30
+	vshr.u64	q12,q6,#19
+	vshr.u64	q13,q6,#61
+	vadd.i64	d18,d30			@ h+=Maj from the past
+	vshr.u64	q15,q6,#6
+	vsli.64	q12,q6,#45
+	vext.8	q14,q7,q0,#8	@ X[i+1]
+	vsli.64	q13,q6,#3
+	veor	q15,q12
+	vshr.u64	q12,q14,#1
+	veor	q15,q13				@ sigma1(X[i+14])
+	vshr.u64	q13,q14,#8
+	vadd.i64	q7,q15
+	vshr.u64	q15,q14,#7
+	vsli.64	q12,q14,#63
+	vsli.64	q13,q14,#56
+	vext.8	q14,q3,q4,#8	@ X[i+9]
+	veor	q15,q12
+	vshr.u64	d24,d22,#14		@ from NEON_00_15
+	vadd.i64	q7,q14
+	vshr.u64	d25,d22,#18		@ from NEON_00_15
+	veor	q15,q13				@ sigma0(X[i+1])
+	vshr.u64	d26,d22,#41		@ from NEON_00_15
+	vadd.i64	q7,q15
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d22,#50
+	vsli.64	d25,d22,#46
+	vmov	d29,d22
+	vsli.64	d26,d22,#23
+#if 30<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d23,d16		@ Ch(e,f,g)
+	vshr.u64	d24,d18,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d17
+	vshr.u64	d25,d18,#34
+	vsli.64	d24,d18,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d18,#39
+	vadd.i64	d28,d14
+	vsli.64	d25,d18,#30
+	veor	d30,d18,d19
+	vsli.64	d26,d18,#25
+	veor	d17,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d20,d19		@ Maj(a,b,c)
+	veor	d17,d26			@ Sigma0(a)
+	vadd.i64	d21,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d17,d30
+	vshr.u64	d24,d21,#14	@ 31
+#if 31<16
+	vld1.64	{d15},[r1]!	@ handles unaligned
+#endif
+	vshr.u64	d25,d21,#18
+#if 31>0
+	vadd.i64	d17,d30			@ h+=Maj from the past
+#endif
+	vshr.u64	d26,d21,#41
+	vld1.64	{d28},[r3,:64]!	@ K[i++]
+	vsli.64	d24,d21,#50
+	vsli.64	d25,d21,#46
+	vmov	d29,d21
+	vsli.64	d26,d21,#23
+#if 31<16 && defined(__ARMEL__)
+	vrev64.8	,
+#endif
+	veor	d25,d24
+	vbsl	d29,d22,d23		@ Ch(e,f,g)
+	vshr.u64	d24,d17,#28
+	veor	d26,d25			@ Sigma1(e)
+	vadd.i64	d27,d29,d16
+	vshr.u64	d25,d17,#34
+	vsli.64	d24,d17,#36
+	vadd.i64	d27,d26
+	vshr.u64	d26,d17,#39
+	vadd.i64	d28,d15
+	vsli.64	d25,d17,#30
+	veor	d30,d17,d18
+	vsli.64	d26,d17,#25
+	veor	d16,d24,d25
+	vadd.i64	d27,d28
+	vbsl	d30,d19,d18		@ Maj(a,b,c)
+	veor	d16,d26			@ Sigma0(a)
+	vadd.i64	d20,d27
+	vadd.i64	d30,d27
+	@ vadd.i64	d16,d30
+	bne	.L16_79_neon
+
+	vadd.i64	d16,d30		@ h+=Maj from the past
+	vldmia	r0,{d24,d25,d26,d27,d28,d29,d30,d31}	@ load context to temp
+	vadd.i64	q8,q12		@ vectorized accumulate
+	vadd.i64	q9,q13
+	vadd.i64	q10,q14
+	vadd.i64	q11,q15
+	vstmia	r0,{d16,d17,d18,d19,d20,d21,d22,d23}	@ save context
+	teq	r1,r2
+	sub	r3,#640	@ rewind K512
+	bne	.Loop_neon
+
+	VFP_ABI_POP
+	bx	lr				@ .word	0xe12fff1e
+.size	sha512_block_data_order_neon,.-sha512_block_data_order_neon
+#endif
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,52,47,78,69,79,78,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	2
+.align	2
+#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
+.comm	OPENSSL_armcap_P,4,4
+.hidden	OPENSSL_armcap_P
+#endif
+#endif
\ No newline at end of file
diff --git a/third_party/boringssl/linux-x86/crypto/aes/aes-586.S b/third_party/boringssl/linux-x86/crypto/aes/aes-586.S
new file mode 100644
index 0000000..7428274
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/aes/aes-586.S
@@ -0,0 +1,3257 @@
+#if defined(__i386__)
+.file	"aes-586.S"
+.text
+.hidden	_x86_AES_encrypt_compact
+.type	_x86_AES_encrypt_compact,@function
+.align	16
+_x86_AES_encrypt_compact:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+.align	16
+.L000loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ch,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$8,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$24,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%ecx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	xorl	%esi,%ecx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%ecx
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%ecx
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%edx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	xorl	%esi,%edx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%edx
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%edx
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%eax,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	xorl	%esi,%eax
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%eax
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%eax
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%ebx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	xorl	%esi,%ebx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%ebx
+	xorl	%edi,%esi
+	xorl	%esi,%ebx
+	movl	20(%esp),%edi
+	movl	28(%esp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	.L000loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ch,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$8,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$24,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+
+	xorl	16(%edi),%eax
+	xorl	20(%edi),%ebx
+	xorl	24(%edi),%ecx
+	xorl	28(%edi),%edx
+	ret
+.size	_x86_AES_encrypt_compact,.-_x86_AES_encrypt_compact
+.hidden	_sse_AES_encrypt_compact
+.type	_sse_AES_encrypt_compact,@function
+.align	16
+_sse_AES_encrypt_compact:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	$454761243,%eax
+	movl	%eax,8(%esp)
+	movl	%eax,12(%esp)
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+.align	16
+.L001loop:
+	pshufw	$8,%mm0,%mm1
+	pshufw	$13,%mm4,%mm5
+	movd	%mm1,%eax
+	movd	%mm5,%ebx
+	movl	%edi,20(%esp)
+	movzbl	%al,%esi
+	movzbl	%ah,%edx
+	pshufw	$13,%mm0,%mm2
+	movzbl	-128(%ebp,%esi,1),%ecx
+	movzbl	%bl,%edi
+	movzbl	-128(%ebp,%edx,1),%edx
+	shrl	$16,%eax
+	shll	$8,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$16,%esi
+	pshufw	$8,%mm4,%mm6
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$24,%esi
+	shrl	$16,%ebx
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$8,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	movd	%mm2,%eax
+	movd	%ecx,%mm0
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%ah,%edi
+	shll	$16,%ecx
+	movd	%mm6,%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	shll	$8,%esi
+	shrl	$16,%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shrl	$16,%eax
+	movd	%ecx,%mm1
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%ah,%edi
+	shll	$16,%ecx
+	andl	$255,%eax
+	orl	%esi,%ecx
+	punpckldq	%mm1,%mm0
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%eax,1),%eax
+	orl	%esi,%ecx
+	shll	$16,%eax
+	movzbl	-128(%ebp,%edi,1),%esi
+	orl	%eax,%edx
+	shll	$8,%esi
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	orl	%esi,%ecx
+	orl	%ebx,%edx
+	movl	20(%esp),%edi
+	movd	%ecx,%mm4
+	movd	%edx,%mm5
+	punpckldq	%mm5,%mm4
+	addl	$16,%edi
+	cmpl	24(%esp),%edi
+	ja	.L002out
+	movq	8(%esp),%mm2
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	movq	%mm0,%mm1
+	movq	%mm4,%mm5
+	pcmpgtb	%mm0,%mm3
+	pcmpgtb	%mm4,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	pshufw	$177,%mm0,%mm2
+	pshufw	$177,%mm4,%mm6
+	paddb	%mm0,%mm0
+	paddb	%mm4,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pshufw	$177,%mm2,%mm3
+	pshufw	$177,%mm6,%mm7
+	pxor	%mm0,%mm1
+	pxor	%mm4,%mm5
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	%mm3,%mm2
+	movq	%mm7,%mm6
+	pslld	$8,%mm3
+	pslld	$8,%mm7
+	psrld	$24,%mm2
+	psrld	$24,%mm6
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	movq	(%edi),%mm2
+	movq	8(%edi),%mm6
+	psrld	$8,%mm1
+	psrld	$8,%mm5
+	movl	-128(%ebp),%eax
+	pslld	$24,%mm3
+	pslld	$24,%mm7
+	movl	-64(%ebp),%ebx
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movl	(%ebp),%ecx
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movl	64(%ebp),%edx
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	jmp	.L001loop
+.align	16
+.L002out:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	ret
+.size	_sse_AES_encrypt_compact,.-_sse_AES_encrypt_compact
+.hidden	_x86_AES_encrypt
+.type	_x86_AES_encrypt,@function
+.align	16
+_x86_AES_encrypt:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+.align	16
+.L003loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%bh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,4(%esp)
+
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%ch,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,8(%esp)
+
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%dh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movzbl	%bh,%edi
+	xorl	1(%ebp,%edi,8),%esi
+
+	movl	20(%esp),%edi
+	movl	(%ebp,%edx,8),%edx
+	movzbl	%ah,%eax
+	xorl	3(%ebp,%eax,8),%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	xorl	2(%ebp,%ebx,8),%edx
+	movl	8(%esp),%ebx
+	xorl	1(%ebp,%ecx,8),%edx
+	movl	%esi,%ecx
+
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	.L003loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%bh,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%ch,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%dh,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movl	2(%ebp,%edx,8),%edx
+	andl	$255,%edx
+	movzbl	%ah,%eax
+	movl	(%ebp,%eax,8),%eax
+	andl	$65280,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movl	(%ebp,%ebx,8),%ebx
+	andl	$16711680,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movl	2(%ebp,%ecx,8),%ecx
+	andl	$4278190080,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	ret
+.align	64
+.LAES_Te:
+.long	2774754246,2774754246
+.long	2222750968,2222750968
+.long	2574743534,2574743534
+.long	2373680118,2373680118
+.long	234025727,234025727
+.long	3177933782,3177933782
+.long	2976870366,2976870366
+.long	1422247313,1422247313
+.long	1345335392,1345335392
+.long	50397442,50397442
+.long	2842126286,2842126286
+.long	2099981142,2099981142
+.long	436141799,436141799
+.long	1658312629,1658312629
+.long	3870010189,3870010189
+.long	2591454956,2591454956
+.long	1170918031,1170918031
+.long	2642575903,2642575903
+.long	1086966153,1086966153
+.long	2273148410,2273148410
+.long	368769775,368769775
+.long	3948501426,3948501426
+.long	3376891790,3376891790
+.long	200339707,200339707
+.long	3970805057,3970805057
+.long	1742001331,1742001331
+.long	4255294047,4255294047
+.long	3937382213,3937382213
+.long	3214711843,3214711843
+.long	4154762323,4154762323
+.long	2524082916,2524082916
+.long	1539358875,1539358875
+.long	3266819957,3266819957
+.long	486407649,486407649
+.long	2928907069,2928907069
+.long	1780885068,1780885068
+.long	1513502316,1513502316
+.long	1094664062,1094664062
+.long	49805301,49805301
+.long	1338821763,1338821763
+.long	1546925160,1546925160
+.long	4104496465,4104496465
+.long	887481809,887481809
+.long	150073849,150073849
+.long	2473685474,2473685474
+.long	1943591083,1943591083
+.long	1395732834,1395732834
+.long	1058346282,1058346282
+.long	201589768,201589768
+.long	1388824469,1388824469
+.long	1696801606,1696801606
+.long	1589887901,1589887901
+.long	672667696,672667696
+.long	2711000631,2711000631
+.long	251987210,251987210
+.long	3046808111,3046808111
+.long	151455502,151455502
+.long	907153956,907153956
+.long	2608889883,2608889883
+.long	1038279391,1038279391
+.long	652995533,652995533
+.long	1764173646,1764173646
+.long	3451040383,3451040383
+.long	2675275242,2675275242
+.long	453576978,453576978
+.long	2659418909,2659418909
+.long	1949051992,1949051992
+.long	773462580,773462580
+.long	756751158,756751158
+.long	2993581788,2993581788
+.long	3998898868,3998898868
+.long	4221608027,4221608027
+.long	4132590244,4132590244
+.long	1295727478,1295727478
+.long	1641469623,1641469623
+.long	3467883389,3467883389
+.long	2066295122,2066295122
+.long	1055122397,1055122397
+.long	1898917726,1898917726
+.long	2542044179,2542044179
+.long	4115878822,4115878822
+.long	1758581177,1758581177
+.long	0,0
+.long	753790401,753790401
+.long	1612718144,1612718144
+.long	536673507,536673507
+.long	3367088505,3367088505
+.long	3982187446,3982187446
+.long	3194645204,3194645204
+.long	1187761037,1187761037
+.long	3653156455,3653156455
+.long	1262041458,1262041458
+.long	3729410708,3729410708
+.long	3561770136,3561770136
+.long	3898103984,3898103984
+.long	1255133061,1255133061
+.long	1808847035,1808847035
+.long	720367557,720367557
+.long	3853167183,3853167183
+.long	385612781,385612781
+.long	3309519750,3309519750
+.long	3612167578,3612167578
+.long	1429418854,1429418854
+.long	2491778321,2491778321
+.long	3477423498,3477423498
+.long	284817897,284817897
+.long	100794884,100794884
+.long	2172616702,2172616702
+.long	4031795360,4031795360
+.long	1144798328,1144798328
+.long	3131023141,3131023141
+.long	3819481163,3819481163
+.long	4082192802,4082192802
+.long	4272137053,4272137053
+.long	3225436288,3225436288
+.long	2324664069,2324664069
+.long	2912064063,2912064063
+.long	3164445985,3164445985
+.long	1211644016,1211644016
+.long	83228145,83228145
+.long	3753688163,3753688163
+.long	3249976951,3249976951
+.long	1977277103,1977277103
+.long	1663115586,1663115586
+.long	806359072,806359072
+.long	452984805,452984805
+.long	250868733,250868733
+.long	1842533055,1842533055
+.long	1288555905,1288555905
+.long	336333848,336333848
+.long	890442534,890442534
+.long	804056259,804056259
+.long	3781124030,3781124030
+.long	2727843637,2727843637
+.long	3427026056,3427026056
+.long	957814574,957814574
+.long	1472513171,1472513171
+.long	4071073621,4071073621
+.long	2189328124,2189328124
+.long	1195195770,1195195770
+.long	2892260552,2892260552
+.long	3881655738,3881655738
+.long	723065138,723065138
+.long	2507371494,2507371494
+.long	2690670784,2690670784
+.long	2558624025,2558624025
+.long	3511635870,3511635870
+.long	2145180835,2145180835
+.long	1713513028,1713513028
+.long	2116692564,2116692564
+.long	2878378043,2878378043
+.long	2206763019,2206763019
+.long	3393603212,3393603212
+.long	703524551,703524551
+.long	3552098411,3552098411
+.long	1007948840,1007948840
+.long	2044649127,2044649127
+.long	3797835452,3797835452
+.long	487262998,487262998
+.long	1994120109,1994120109
+.long	1004593371,1004593371
+.long	1446130276,1446130276
+.long	1312438900,1312438900
+.long	503974420,503974420
+.long	3679013266,3679013266
+.long	168166924,168166924
+.long	1814307912,1814307912
+.long	3831258296,3831258296
+.long	1573044895,1573044895
+.long	1859376061,1859376061
+.long	4021070915,4021070915
+.long	2791465668,2791465668
+.long	2828112185,2828112185
+.long	2761266481,2761266481
+.long	937747667,937747667
+.long	2339994098,2339994098
+.long	854058965,854058965
+.long	1137232011,1137232011
+.long	1496790894,1496790894
+.long	3077402074,3077402074
+.long	2358086913,2358086913
+.long	1691735473,1691735473
+.long	3528347292,3528347292
+.long	3769215305,3769215305
+.long	3027004632,3027004632
+.long	4199962284,4199962284
+.long	133494003,133494003
+.long	636152527,636152527
+.long	2942657994,2942657994
+.long	2390391540,2390391540
+.long	3920539207,3920539207
+.long	403179536,403179536
+.long	3585784431,3585784431
+.long	2289596656,2289596656
+.long	1864705354,1864705354
+.long	1915629148,1915629148
+.long	605822008,605822008
+.long	4054230615,4054230615
+.long	3350508659,3350508659
+.long	1371981463,1371981463
+.long	602466507,602466507
+.long	2094914977,2094914977
+.long	2624877800,2624877800
+.long	555687742,555687742
+.long	3712699286,3712699286
+.long	3703422305,3703422305
+.long	2257292045,2257292045
+.long	2240449039,2240449039
+.long	2423288032,2423288032
+.long	1111375484,1111375484
+.long	3300242801,3300242801
+.long	2858837708,2858837708
+.long	3628615824,3628615824
+.long	84083462,84083462
+.long	32962295,32962295
+.long	302911004,302911004
+.long	2741068226,2741068226
+.long	1597322602,1597322602
+.long	4183250862,4183250862
+.long	3501832553,3501832553
+.long	2441512471,2441512471
+.long	1489093017,1489093017
+.long	656219450,656219450
+.long	3114180135,3114180135
+.long	954327513,954327513
+.long	335083755,335083755
+.long	3013122091,3013122091
+.long	856756514,856756514
+.long	3144247762,3144247762
+.long	1893325225,1893325225
+.long	2307821063,2307821063
+.long	2811532339,2811532339
+.long	3063651117,3063651117
+.long	572399164,572399164
+.long	2458355477,2458355477
+.long	552200649,552200649
+.long	1238290055,1238290055
+.long	4283782570,4283782570
+.long	2015897680,2015897680
+.long	2061492133,2061492133
+.long	2408352771,2408352771
+.long	4171342169,4171342169
+.long	2156497161,2156497161
+.long	386731290,386731290
+.long	3669999461,3669999461
+.long	837215959,837215959
+.long	3326231172,3326231172
+.long	3093850320,3093850320
+.long	3275833730,3275833730
+.long	2962856233,2962856233
+.long	1999449434,1999449434
+.long	286199582,286199582
+.long	3417354363,3417354363
+.long	4233385128,4233385128
+.long	3602627437,3602627437
+.long	974525996,974525996
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.long	1,2,4,8
+.long	16,32,64,128
+.long	27,54,0,0
+.long	0,0,0,0
+.size	_x86_AES_encrypt,.-_x86_AES_encrypt
+.globl	asm_AES_encrypt
+.hidden	asm_AES_encrypt
+.type	asm_AES_encrypt,@function
+.align	16
+asm_AES_encrypt:
+.L_asm_AES_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	28(%esp),%edi
+	movl	%esp,%eax
+	subl	$36,%esp
+	andl	$-64,%esp
+	leal	-127(%edi),%ebx
+	subl	%esp,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esp
+	addl	$4,%esp
+	movl	%eax,28(%esp)
+	call	.L004pic_point
+.L004pic_point:
+	popl	%ebp
+	leal	OPENSSL_ia32cap_P-.L004pic_point(%ebp),%eax
+	leal	.LAES_Te-.L004pic_point(%ebp),%ebp
+	leal	764(%esp),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	btl	$25,(%eax)
+	jnc	.L005x86
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	call	_sse_AES_encrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	16
+.L005x86:
+	movl	%ebp,24(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	call	_x86_AES_encrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_AES_encrypt,.-.L_asm_AES_encrypt_begin
+.hidden	_x86_AES_decrypt_compact
+.type	_x86_AES_decrypt_compact,@function
+.align	16
+_x86_AES_decrypt_compact:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+.align	16
+.L006loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	shrl	$24,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%eax
+	subl	%edi,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%esi,%eax
+	movl	$2155905152,%edi
+	andl	%eax,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%eax,%eax,1),%ebx
+	subl	%edi,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%ecx,%eax
+	xorl	%esi,%ebx
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%ecx,%ebx
+	roll	$8,%ecx
+	xorl	%esi,%ebp
+	xorl	%eax,%ecx
+	xorl	%ebp,%eax
+	xorl	%ebx,%ecx
+	xorl	%ebp,%ebx
+	roll	$24,%eax
+	xorl	%ebp,%ecx
+	roll	$16,%ebx
+	xorl	%eax,%ecx
+	roll	$8,%ebp
+	xorl	%ebx,%ecx
+	movl	4(%esp),%eax
+	xorl	%ebp,%ecx
+	movl	%ecx,12(%esp)
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebx
+	subl	%edi,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%esi,%ebx
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%edx,%ebx
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%edx,%ecx
+	roll	$8,%edx
+	xorl	%esi,%ebp
+	xorl	%ebx,%edx
+	xorl	%ebp,%ebx
+	xorl	%ecx,%edx
+	xorl	%ebp,%ecx
+	roll	$24,%ebx
+	xorl	%ebp,%edx
+	roll	$16,%ecx
+	xorl	%ebx,%edx
+	roll	$8,%ebp
+	xorl	%ecx,%edx
+	movl	8(%esp),%ebx
+	xorl	%ebp,%edx
+	movl	%edx,16(%esp)
+	movl	$2155905152,%edi
+	andl	%eax,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%eax,%eax,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%edx
+	subl	%edi,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%eax,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%eax,%edx
+	roll	$8,%eax
+	xorl	%esi,%ebp
+	xorl	%ecx,%eax
+	xorl	%ebp,%ecx
+	xorl	%edx,%eax
+	xorl	%ebp,%edx
+	roll	$24,%ecx
+	xorl	%ebp,%eax
+	roll	$16,%edx
+	xorl	%ecx,%eax
+	roll	$8,%ebp
+	xorl	%edx,%eax
+	xorl	%ebp,%eax
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%edx
+	subl	%edi,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%ebx,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%ebx,%edx
+	roll	$8,%ebx
+	xorl	%esi,%ebp
+	xorl	%ecx,%ebx
+	xorl	%ebp,%ecx
+	xorl	%edx,%ebx
+	xorl	%ebp,%edx
+	roll	$24,%ecx
+	xorl	%ebp,%ebx
+	roll	$16,%edx
+	xorl	%ecx,%ebx
+	roll	$8,%ebp
+	xorl	%edx,%ebx
+	movl	12(%esp),%ecx
+	xorl	%ebp,%ebx
+	movl	16(%esp),%edx
+	movl	20(%esp),%edi
+	movl	28(%esp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	.L006loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	xorl	16(%edi),%eax
+	xorl	20(%edi),%ebx
+	xorl	24(%edi),%ecx
+	xorl	28(%edi),%edx
+	ret
+.size	_x86_AES_decrypt_compact,.-_x86_AES_decrypt_compact
+.hidden	_sse_AES_decrypt_compact
+.type	_sse_AES_decrypt_compact,@function
+.align	16
+_sse_AES_decrypt_compact:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	$454761243,%eax
+	movl	%eax,8(%esp)
+	movl	%eax,12(%esp)
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+.align	16
+.L007loop:
+	pshufw	$12,%mm0,%mm1
+	pshufw	$9,%mm4,%mm5
+	movd	%mm1,%eax
+	movd	%mm5,%ebx
+	movl	%edi,20(%esp)
+	movzbl	%al,%esi
+	movzbl	%ah,%edx
+	pshufw	$6,%mm0,%mm2
+	movzbl	-128(%ebp,%esi,1),%ecx
+	movzbl	%bl,%edi
+	movzbl	-128(%ebp,%edx,1),%edx
+	shrl	$16,%eax
+	shll	$8,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$16,%esi
+	pshufw	$3,%mm4,%mm6
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$24,%esi
+	shrl	$16,%ebx
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$8,%esi
+	movd	%mm2,%eax
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	shll	$16,%esi
+	movd	%mm6,%ebx
+	movd	%ecx,%mm0
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%al,%edi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$16,%esi
+	shrl	$16,%eax
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shrl	$16,%ebx
+	shll	$8,%esi
+	movd	%edx,%mm1
+	movzbl	-128(%ebp,%edi,1),%edx
+	movzbl	%bh,%edi
+	shll	$24,%edx
+	andl	$255,%ebx
+	orl	%esi,%edx
+	punpckldq	%mm1,%mm0
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$8,%esi
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	orl	%ebx,%edx
+	shll	$16,%esi
+	movzbl	-128(%ebp,%eax,1),%eax
+	orl	%esi,%edx
+	shll	$24,%eax
+	orl	%eax,%ecx
+	movl	20(%esp),%edi
+	movd	%edx,%mm4
+	movd	%ecx,%mm5
+	punpckldq	%mm5,%mm4
+	addl	$16,%edi
+	cmpl	24(%esp),%edi
+	ja	.L008out
+	movq	%mm0,%mm3
+	movq	%mm4,%mm7
+	pshufw	$228,%mm0,%mm2
+	pshufw	$228,%mm4,%mm6
+	movq	%mm0,%mm1
+	movq	%mm4,%mm5
+	pshufw	$177,%mm0,%mm0
+	pshufw	$177,%mm4,%mm4
+	pslld	$8,%mm2
+	pslld	$8,%mm6
+	psrld	$8,%mm3
+	psrld	$8,%mm7
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pslld	$16,%mm2
+	pslld	$16,%mm6
+	psrld	$16,%mm3
+	psrld	$16,%mm7
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movq	8(%esp),%mm3
+	pxor	%mm2,%mm2
+	pxor	%mm6,%mm6
+	pcmpgtb	%mm1,%mm2
+	pcmpgtb	%mm5,%mm6
+	pand	%mm3,%mm2
+	pand	%mm3,%mm6
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm2,%mm1
+	pxor	%mm6,%mm5
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	movq	%mm1,%mm2
+	movq	%mm5,%mm6
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pslld	$24,%mm3
+	pslld	$24,%mm7
+	psrld	$8,%mm2
+	psrld	$8,%mm6
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	8(%esp),%mm2
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	pcmpgtb	%mm1,%mm3
+	pcmpgtb	%mm5,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm3,%mm1
+	pxor	%mm7,%mm5
+	pshufw	$177,%mm1,%mm3
+	pshufw	$177,%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	pcmpgtb	%mm1,%mm3
+	pcmpgtb	%mm5,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm3,%mm1
+	pxor	%mm7,%mm5
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	pshufw	$177,%mm1,%mm2
+	pshufw	$177,%mm5,%mm6
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pslld	$8,%mm1
+	pslld	$8,%mm5
+	psrld	$8,%mm3
+	psrld	$8,%mm7
+	movq	(%edi),%mm2
+	movq	8(%edi),%mm6
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movl	-128(%ebp),%eax
+	pslld	$16,%mm1
+	pslld	$16,%mm5
+	movl	-64(%ebp),%ebx
+	psrld	$16,%mm3
+	psrld	$16,%mm7
+	movl	(%ebp),%ecx
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movl	64(%ebp),%edx
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	jmp	.L007loop
+.align	16
+.L008out:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	ret
+.size	_sse_AES_decrypt_compact,.-_sse_AES_decrypt_compact
+.hidden	_x86_AES_decrypt
+.type	_x86_AES_decrypt,@function
+.align	16
+_x86_AES_decrypt:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+.align	16
+.L009loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%dh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,4(%esp)
+
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%ah,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,8(%esp)
+
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%bh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movl	(%ebp,%edx,8),%edx
+	movzbl	%ch,%ecx
+	xorl	3(%ebp,%ecx,8),%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	xorl	2(%ebp,%ebx,8),%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	xorl	1(%ebp,%eax,8),%edx
+	movl	4(%esp),%eax
+
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	.L009loop
+	leal	2176(%ebp),%ebp
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+	leal	-128(%ebp),%ebp
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	movzbl	(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	leal	-2048(%ebp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	ret
+.align	64
+.LAES_Td:
+.long	1353184337,1353184337
+.long	1399144830,1399144830
+.long	3282310938,3282310938
+.long	2522752826,2522752826
+.long	3412831035,3412831035
+.long	4047871263,4047871263
+.long	2874735276,2874735276
+.long	2466505547,2466505547
+.long	1442459680,1442459680
+.long	4134368941,4134368941
+.long	2440481928,2440481928
+.long	625738485,625738485
+.long	4242007375,4242007375
+.long	3620416197,3620416197
+.long	2151953702,2151953702
+.long	2409849525,2409849525
+.long	1230680542,1230680542
+.long	1729870373,1729870373
+.long	2551114309,2551114309
+.long	3787521629,3787521629
+.long	41234371,41234371
+.long	317738113,317738113
+.long	2744600205,2744600205
+.long	3338261355,3338261355
+.long	3881799427,3881799427
+.long	2510066197,2510066197
+.long	3950669247,3950669247
+.long	3663286933,3663286933
+.long	763608788,763608788
+.long	3542185048,3542185048
+.long	694804553,694804553
+.long	1154009486,1154009486
+.long	1787413109,1787413109
+.long	2021232372,2021232372
+.long	1799248025,1799248025
+.long	3715217703,3715217703
+.long	3058688446,3058688446
+.long	397248752,397248752
+.long	1722556617,1722556617
+.long	3023752829,3023752829
+.long	407560035,407560035
+.long	2184256229,2184256229
+.long	1613975959,1613975959
+.long	1165972322,1165972322
+.long	3765920945,3765920945
+.long	2226023355,2226023355
+.long	480281086,480281086
+.long	2485848313,2485848313
+.long	1483229296,1483229296
+.long	436028815,436028815
+.long	2272059028,2272059028
+.long	3086515026,3086515026
+.long	601060267,601060267
+.long	3791801202,3791801202
+.long	1468997603,1468997603
+.long	715871590,715871590
+.long	120122290,120122290
+.long	63092015,63092015
+.long	2591802758,2591802758
+.long	2768779219,2768779219
+.long	4068943920,4068943920
+.long	2997206819,2997206819
+.long	3127509762,3127509762
+.long	1552029421,1552029421
+.long	723308426,723308426
+.long	2461301159,2461301159
+.long	4042393587,4042393587
+.long	2715969870,2715969870
+.long	3455375973,3455375973
+.long	3586000134,3586000134
+.long	526529745,526529745
+.long	2331944644,2331944644
+.long	2639474228,2639474228
+.long	2689987490,2689987490
+.long	853641733,853641733
+.long	1978398372,1978398372
+.long	971801355,971801355
+.long	2867814464,2867814464
+.long	111112542,111112542
+.long	1360031421,1360031421
+.long	4186579262,4186579262
+.long	1023860118,1023860118
+.long	2919579357,2919579357
+.long	1186850381,1186850381
+.long	3045938321,3045938321
+.long	90031217,90031217
+.long	1876166148,1876166148
+.long	4279586912,4279586912
+.long	620468249,620468249
+.long	2548678102,2548678102
+.long	3426959497,3426959497
+.long	2006899047,2006899047
+.long	3175278768,3175278768
+.long	2290845959,2290845959
+.long	945494503,945494503
+.long	3689859193,3689859193
+.long	1191869601,1191869601
+.long	3910091388,3910091388
+.long	3374220536,3374220536
+.long	0,0
+.long	2206629897,2206629897
+.long	1223502642,1223502642
+.long	2893025566,2893025566
+.long	1316117100,1316117100
+.long	4227796733,4227796733
+.long	1446544655,1446544655
+.long	517320253,517320253
+.long	658058550,658058550
+.long	1691946762,1691946762
+.long	564550760,564550760
+.long	3511966619,3511966619
+.long	976107044,976107044
+.long	2976320012,2976320012
+.long	266819475,266819475
+.long	3533106868,3533106868
+.long	2660342555,2660342555
+.long	1338359936,1338359936
+.long	2720062561,2720062561
+.long	1766553434,1766553434
+.long	370807324,370807324
+.long	179999714,179999714
+.long	3844776128,3844776128
+.long	1138762300,1138762300
+.long	488053522,488053522
+.long	185403662,185403662
+.long	2915535858,2915535858
+.long	3114841645,3114841645
+.long	3366526484,3366526484
+.long	2233069911,2233069911
+.long	1275557295,1275557295
+.long	3151862254,3151862254
+.long	4250959779,4250959779
+.long	2670068215,2670068215
+.long	3170202204,3170202204
+.long	3309004356,3309004356
+.long	880737115,880737115
+.long	1982415755,1982415755
+.long	3703972811,3703972811
+.long	1761406390,1761406390
+.long	1676797112,1676797112
+.long	3403428311,3403428311
+.long	277177154,277177154
+.long	1076008723,1076008723
+.long	538035844,538035844
+.long	2099530373,2099530373
+.long	4164795346,4164795346
+.long	288553390,288553390
+.long	1839278535,1839278535
+.long	1261411869,1261411869
+.long	4080055004,4080055004
+.long	3964831245,3964831245
+.long	3504587127,3504587127
+.long	1813426987,1813426987
+.long	2579067049,2579067049
+.long	4199060497,4199060497
+.long	577038663,577038663
+.long	3297574056,3297574056
+.long	440397984,440397984
+.long	3626794326,3626794326
+.long	4019204898,4019204898
+.long	3343796615,3343796615
+.long	3251714265,3251714265
+.long	4272081548,4272081548
+.long	906744984,906744984
+.long	3481400742,3481400742
+.long	685669029,685669029
+.long	646887386,646887386
+.long	2764025151,2764025151
+.long	3835509292,3835509292
+.long	227702864,227702864
+.long	2613862250,2613862250
+.long	1648787028,1648787028
+.long	3256061430,3256061430
+.long	3904428176,3904428176
+.long	1593260334,1593260334
+.long	4121936770,4121936770
+.long	3196083615,3196083615
+.long	2090061929,2090061929
+.long	2838353263,2838353263
+.long	3004310991,3004310991
+.long	999926984,999926984
+.long	2809993232,2809993232
+.long	1852021992,1852021992
+.long	2075868123,2075868123
+.long	158869197,158869197
+.long	4095236462,4095236462
+.long	28809964,28809964
+.long	2828685187,2828685187
+.long	1701746150,1701746150
+.long	2129067946,2129067946
+.long	147831841,147831841
+.long	3873969647,3873969647
+.long	3650873274,3650873274
+.long	3459673930,3459673930
+.long	3557400554,3557400554
+.long	3598495785,3598495785
+.long	2947720241,2947720241
+.long	824393514,824393514
+.long	815048134,815048134
+.long	3227951669,3227951669
+.long	935087732,935087732
+.long	2798289660,2798289660
+.long	2966458592,2966458592
+.long	366520115,366520115
+.long	1251476721,1251476721
+.long	4158319681,4158319681
+.long	240176511,240176511
+.long	804688151,804688151
+.long	2379631990,2379631990
+.long	1303441219,1303441219
+.long	1414376140,1414376140
+.long	3741619940,3741619940
+.long	3820343710,3820343710
+.long	461924940,461924940
+.long	3089050817,3089050817
+.long	2136040774,2136040774
+.long	82468509,82468509
+.long	1563790337,1563790337
+.long	1937016826,1937016826
+.long	776014843,776014843
+.long	1511876531,1511876531
+.long	1389550482,1389550482
+.long	861278441,861278441
+.long	323475053,323475053
+.long	2355222426,2355222426
+.long	2047648055,2047648055
+.long	2383738969,2383738969
+.long	2302415851,2302415851
+.long	3995576782,3995576782
+.long	902390199,902390199
+.long	3991215329,3991215329
+.long	1018251130,1018251130
+.long	1507840668,1507840668
+.long	1064563285,1064563285
+.long	2043548696,2043548696
+.long	3208103795,3208103795
+.long	3939366739,3939366739
+.long	1537932639,1537932639
+.long	342834655,342834655
+.long	2262516856,2262516856
+.long	2180231114,2180231114
+.long	1053059257,1053059257
+.long	741614648,741614648
+.long	1598071746,1598071746
+.long	1925389590,1925389590
+.long	203809468,203809468
+.long	2336832552,2336832552
+.long	1100287487,1100287487
+.long	1895934009,1895934009
+.long	3736275976,3736275976
+.long	2632234200,2632234200
+.long	2428589668,2428589668
+.long	1636092795,1636092795
+.long	1890988757,1890988757
+.long	1952214088,1952214088
+.long	1113045200,1113045200
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.size	_x86_AES_decrypt,.-_x86_AES_decrypt
+.globl	asm_AES_decrypt
+.hidden	asm_AES_decrypt
+.type	asm_AES_decrypt,@function
+.align	16
+asm_AES_decrypt:
+.L_asm_AES_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	28(%esp),%edi
+	movl	%esp,%eax
+	subl	$36,%esp
+	andl	$-64,%esp
+	leal	-127(%edi),%ebx
+	subl	%esp,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esp
+	addl	$4,%esp
+	movl	%eax,28(%esp)
+	call	.L010pic_point
+.L010pic_point:
+	popl	%ebp
+	leal	OPENSSL_ia32cap_P-.L010pic_point(%ebp),%eax
+	leal	.LAES_Td-.L010pic_point(%ebp),%ebp
+	leal	764(%esp),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	btl	$25,(%eax)
+	jnc	.L011x86
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	call	_sse_AES_decrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	16
+.L011x86:
+	movl	%ebp,24(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	call	_x86_AES_decrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_AES_decrypt,.-.L_asm_AES_decrypt_begin
+.globl	asm_AES_cbc_encrypt
+.hidden	asm_AES_cbc_encrypt
+.type	asm_AES_cbc_encrypt,@function
+.align	16
+asm_AES_cbc_encrypt:
+.L_asm_AES_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	28(%esp),%ecx
+	cmpl	$0,%ecx
+	je	.L012drop_out
+	call	.L013pic_point
+.L013pic_point:
+	popl	%ebp
+	leal	OPENSSL_ia32cap_P-.L013pic_point(%ebp),%eax
+	cmpl	$0,40(%esp)
+	leal	.LAES_Te-.L013pic_point(%ebp),%ebp
+	jne	.L014picked_te
+	leal	.LAES_Td-.LAES_Te(%ebp),%ebp
+.L014picked_te:
+	pushfl
+	cld
+	cmpl	$512,%ecx
+	jb	.L015slow_way
+	testl	$15,%ecx
+	jnz	.L015slow_way
+	btl	$28,(%eax)
+	jc	.L015slow_way
+	leal	-324(%esp),%esi
+	andl	$-64,%esi
+	movl	%ebp,%eax
+	leal	2304(%ebp),%ebx
+	movl	%esi,%edx
+	andl	$4095,%eax
+	andl	$4095,%ebx
+	andl	$4095,%edx
+	cmpl	%ebx,%edx
+	jb	.L016tbl_break_out
+	subl	%ebx,%edx
+	subl	%edx,%esi
+	jmp	.L017tbl_ok
+.align	4
+.L016tbl_break_out:
+	subl	%eax,%edx
+	andl	$4095,%edx
+	addl	$384,%edx
+	subl	%edx,%esi
+.align	4
+.L017tbl_ok:
+	leal	24(%esp),%edx
+	xchgl	%esi,%esp
+	addl	$4,%esp
+	movl	%ebp,24(%esp)
+	movl	%esi,28(%esp)
+	movl	(%edx),%eax
+	movl	4(%edx),%ebx
+	movl	12(%edx),%edi
+	movl	16(%edx),%esi
+	movl	20(%edx),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edi,44(%esp)
+	movl	%esi,48(%esp)
+	movl	$0,316(%esp)
+	movl	%edi,%ebx
+	movl	$61,%ecx
+	subl	%ebp,%ebx
+	movl	%edi,%esi
+	andl	$4095,%ebx
+	leal	76(%esp),%edi
+	cmpl	$2304,%ebx
+	jb	.L018do_copy
+	cmpl	$3852,%ebx
+	jb	.L019skip_copy
+.align	4
+.L018do_copy:
+	movl	%edi,44(%esp)
+.long	2784229001
+.L019skip_copy:
+	movl	$16,%edi
+.align	4
+.L020prefetch_tbl:
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%esi
+	leal	128(%ebp),%ebp
+	subl	$1,%edi
+	jnz	.L020prefetch_tbl
+	subl	$2048,%ebp
+	movl	32(%esp),%esi
+	movl	48(%esp),%edi
+	cmpl	$0,%edx
+	je	.L021fast_decrypt
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+.align	16
+.L022fast_enc_loop:
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	xorl	(%esi),%eax
+	xorl	4(%esi),%ebx
+	xorl	8(%esi),%ecx
+	xorl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	_x86_AES_encrypt
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	leal	16(%esi),%esi
+	movl	40(%esp),%ecx
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	.L022fast_enc_loop
+	movl	48(%esp),%esi
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	cmpl	$0,316(%esp)
+	movl	44(%esp),%edi
+	je	.L023skip_ezero
+	movl	$60,%ecx
+	xorl	%eax,%eax
+.align	4
+.long	2884892297
+.L023skip_ezero:
+	movl	28(%esp),%esp
+	popfl
+.L012drop_out:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L021fast_decrypt:
+	cmpl	36(%esp),%esi
+	je	.L024fast_dec_in_place
+	movl	%edi,52(%esp)
+.align	4
+.align	16
+.L025fast_dec_loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	_x86_AES_decrypt
+	movl	52(%esp),%edi
+	movl	40(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	36(%esp),%edi
+	movl	32(%esp),%esi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	movl	%esi,52(%esp)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edi
+	movl	%edi,36(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	.L025fast_dec_loop
+	movl	52(%esp),%edi
+	movl	48(%esp),%esi
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	jmp	.L026fast_dec_out
+.align	16
+.L024fast_dec_in_place:
+.L027fast_dec_in_place_loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	leal	60(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	44(%esp),%edi
+	call	_x86_AES_decrypt
+	movl	48(%esp),%edi
+	movl	36(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	leal	16(%esi),%esi
+	movl	%esi,36(%esp)
+	leal	60(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	32(%esp),%esi
+	movl	40(%esp),%ecx
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	.L027fast_dec_in_place_loop
+.align	4
+.L026fast_dec_out:
+	cmpl	$0,316(%esp)
+	movl	44(%esp),%edi
+	je	.L028skip_dzero
+	movl	$60,%ecx
+	xorl	%eax,%eax
+.align	4
+.long	2884892297
+.L028skip_dzero:
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L015slow_way:
+	movl	(%eax),%eax
+	movl	36(%esp),%edi
+	leal	-80(%esp),%esi
+	andl	$-64,%esi
+	leal	-143(%edi),%ebx
+	subl	%esi,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esi
+	leal	768(%esi),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	leal	24(%esp),%edx
+	xchgl	%esi,%esp
+	addl	$4,%esp
+	movl	%ebp,24(%esp)
+	movl	%esi,28(%esp)
+	movl	%eax,52(%esp)
+	movl	(%edx),%eax
+	movl	4(%edx),%ebx
+	movl	16(%edx),%esi
+	movl	20(%edx),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edi,44(%esp)
+	movl	%esi,48(%esp)
+	movl	%esi,%edi
+	movl	%eax,%esi
+	cmpl	$0,%edx
+	je	.L029slow_decrypt
+	cmpl	$16,%ecx
+	movl	%ebx,%edx
+	jb	.L030slow_enc_tail
+	btl	$25,52(%esp)
+	jnc	.L031slow_enc_x86
+	movq	(%edi),%mm0
+	movq	8(%edi),%mm4
+.align	16
+.L032slow_enc_loop_sse:
+	pxor	(%esi),%mm0
+	pxor	8(%esi),%mm4
+	movl	44(%esp),%edi
+	call	_sse_AES_encrypt_compact
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	40(%esp),%ecx
+	movq	%mm0,(%edi)
+	movq	%mm4,8(%edi)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	cmpl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jae	.L032slow_enc_loop_sse
+	testl	$15,%ecx
+	jnz	.L030slow_enc_tail
+	movl	48(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L031slow_enc_x86:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+.align	4
+.L033slow_enc_loop_x86:
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	xorl	(%esi),%eax
+	xorl	4(%esi),%ebx
+	xorl	8(%esi),%ecx
+	xorl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	_x86_AES_encrypt_compact
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	cmpl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jae	.L033slow_enc_loop_x86
+	testl	$15,%ecx
+	jnz	.L030slow_enc_tail
+	movl	48(%esp),%esi
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L030slow_enc_tail:
+	emms
+	movl	%edx,%edi
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	cmpl	%esi,%edi
+	je	.L034enc_in_place
+.align	4
+.long	2767451785
+	jmp	.L035enc_skip_in_place
+.L034enc_in_place:
+	leal	(%edi,%ecx,1),%edi
+.L035enc_skip_in_place:
+	movl	%ebx,%ecx
+	xorl	%eax,%eax
+.align	4
+.long	2868115081
+	movl	48(%esp),%edi
+	movl	%edx,%esi
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	$16,40(%esp)
+	jmp	.L033slow_enc_loop_x86
+.align	16
+.L029slow_decrypt:
+	btl	$25,52(%esp)
+	jnc	.L036slow_dec_loop_x86
+.align	4
+.L037slow_dec_loop_sse:
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	movl	44(%esp),%edi
+	call	_sse_AES_decrypt_compact
+	movl	32(%esp),%esi
+	leal	60(%esp),%eax
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	48(%esp),%edi
+	movq	(%esi),%mm1
+	movq	8(%esi),%mm5
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movq	%mm1,(%edi)
+	movq	%mm5,8(%edi)
+	subl	$16,%ecx
+	jc	.L038slow_dec_partial_sse
+	movq	%mm0,(%ebx)
+	movq	%mm4,8(%ebx)
+	leal	16(%ebx),%ebx
+	movl	%ebx,36(%esp)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	movl	%ecx,40(%esp)
+	jnz	.L037slow_dec_loop_sse
+	emms
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L038slow_dec_partial_sse:
+	movq	%mm0,(%eax)
+	movq	%mm4,8(%eax)
+	emms
+	addl	$16,%ecx
+	movl	%ebx,%edi
+	movl	%eax,%esi
+.align	4
+.long	2767451785
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L036slow_dec_loop_x86:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	leal	60(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	44(%esp),%edi
+	call	_x86_AES_decrypt_compact
+	movl	48(%esp),%edi
+	movl	40(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	subl	$16,%esi
+	jc	.L039slow_dec_partial_x86
+	movl	%esi,40(%esp)
+	movl	36(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	leal	16(%esi),%esi
+	movl	%esi,36(%esp)
+	leal	60(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	32(%esp),%esi
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	jnz	.L036slow_dec_loop_x86
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	16
+.L039slow_dec_partial_x86:
+	leal	60(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	32(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	movl	36(%esp),%edi
+	leal	60(%esp),%esi
+.align	4
+.long	2767451785
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_AES_cbc_encrypt,.-.L_asm_AES_cbc_encrypt_begin
+.hidden	_x86_AES_set_encrypt_key
+.type	_x86_AES_set_encrypt_key,@function
+.align	16
+_x86_AES_set_encrypt_key:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	24(%esp),%esi
+	movl	32(%esp),%edi
+	testl	$-1,%esi
+	jz	.L040badpointer
+	testl	$-1,%edi
+	jz	.L040badpointer
+	call	.L041pic_point
+.L041pic_point:
+	popl	%ebp
+	leal	.LAES_Te-.L041pic_point(%ebp),%ebp
+	leal	2176(%ebp),%ebp
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+	movl	28(%esp),%ecx
+	cmpl	$128,%ecx
+	je	.L04210rounds
+	cmpl	$192,%ecx
+	je	.L04312rounds
+	cmpl	$256,%ecx
+	je	.L04414rounds
+	movl	$-2,%eax
+	jmp	.L045exit
+.L04210rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	xorl	%ecx,%ecx
+	jmp	.L04610shortcut
+.align	4
+.L04710loop:
+	movl	(%edi),%eax
+	movl	12(%edi),%edx
+.L04610shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,16(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,20(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,24(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,28(%edi)
+	incl	%ecx
+	addl	$16,%edi
+	cmpl	$10,%ecx
+	jl	.L04710loop
+	movl	$10,80(%edi)
+	xorl	%eax,%eax
+	jmp	.L045exit
+.L04312rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	16(%esi),%ecx
+	movl	20(%esi),%edx
+	movl	%ecx,16(%edi)
+	movl	%edx,20(%edi)
+	xorl	%ecx,%ecx
+	jmp	.L04812shortcut
+.align	4
+.L04912loop:
+	movl	(%edi),%eax
+	movl	20(%edi),%edx
+.L04812shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,24(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,28(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,32(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,36(%edi)
+	cmpl	$7,%ecx
+	je	.L05012break
+	incl	%ecx
+	xorl	16(%edi),%eax
+	movl	%eax,40(%edi)
+	xorl	20(%edi),%eax
+	movl	%eax,44(%edi)
+	addl	$24,%edi
+	jmp	.L04912loop
+.L05012break:
+	movl	$12,72(%edi)
+	xorl	%eax,%eax
+	jmp	.L045exit
+.L04414rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	movl	%eax,16(%edi)
+	movl	%ebx,20(%edi)
+	movl	%ecx,24(%edi)
+	movl	%edx,28(%edi)
+	xorl	%ecx,%ecx
+	jmp	.L05114shortcut
+.align	4
+.L05214loop:
+	movl	28(%edi),%edx
+.L05114shortcut:
+	movl	(%edi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,32(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,36(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,40(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,44(%edi)
+	cmpl	$6,%ecx
+	je	.L05314break
+	incl	%ecx
+	movl	%eax,%edx
+	movl	16(%edi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	shll	$8,%ebx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movl	%eax,48(%edi)
+	xorl	20(%edi),%eax
+	movl	%eax,52(%edi)
+	xorl	24(%edi),%eax
+	movl	%eax,56(%edi)
+	xorl	28(%edi),%eax
+	movl	%eax,60(%edi)
+	addl	$32,%edi
+	jmp	.L05214loop
+.L05314break:
+	movl	$14,48(%edi)
+	xorl	%eax,%eax
+	jmp	.L045exit
+.L040badpointer:
+	movl	$-1,%eax
+.L045exit:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	_x86_AES_set_encrypt_key,.-_x86_AES_set_encrypt_key
+.globl	asm_AES_set_encrypt_key
+.hidden	asm_AES_set_encrypt_key
+.type	asm_AES_set_encrypt_key,@function
+.align	16
+asm_AES_set_encrypt_key:
+.L_asm_AES_set_encrypt_key_begin:
+	call	_x86_AES_set_encrypt_key
+	ret
+.size	asm_AES_set_encrypt_key,.-.L_asm_AES_set_encrypt_key_begin
+.globl	asm_AES_set_decrypt_key
+.hidden	asm_AES_set_decrypt_key
+.type	asm_AES_set_decrypt_key,@function
+.align	16
+asm_AES_set_decrypt_key:
+.L_asm_AES_set_decrypt_key_begin:
+	call	_x86_AES_set_encrypt_key
+	cmpl	$0,%eax
+	je	.L054proceed
+	ret
+.L054proceed:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	28(%esp),%esi
+	movl	240(%esi),%ecx
+	leal	(,%ecx,4),%ecx
+	leal	(%esi,%ecx,4),%edi
+.align	4
+.L055invert:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	(%edi),%ecx
+	movl	4(%edi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,(%esi)
+	movl	%edx,4(%esi)
+	movl	8(%esi),%eax
+	movl	12(%esi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,8(%edi)
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	addl	$16,%esi
+	subl	$16,%edi
+	cmpl	%edi,%esi
+	jne	.L055invert
+	movl	28(%esp),%edi
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,28(%esp)
+	movl	16(%edi),%eax
+.align	4
+.L056permute:
+	addl	$16,%edi
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%esi,%ebx
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%eax,%ebx
+	xorl	%esi,%ecx
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%eax,%ecx
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	roll	$8,%eax
+	xorl	%esi,%edx
+	movl	4(%edi),%ebp
+	xorl	%ebx,%eax
+	xorl	%edx,%ebx
+	xorl	%ecx,%eax
+	roll	$24,%ebx
+	xorl	%edx,%ecx
+	xorl	%edx,%eax
+	roll	$16,%ecx
+	xorl	%ebx,%eax
+	roll	$8,%edx
+	xorl	%ecx,%eax
+	movl	%ebp,%ebx
+	xorl	%edx,%eax
+	movl	%eax,(%edi)
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%ebx,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%ebx,%edx
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	roll	$8,%ebx
+	xorl	%esi,%eax
+	movl	8(%edi),%ebp
+	xorl	%ecx,%ebx
+	xorl	%eax,%ecx
+	xorl	%edx,%ebx
+	roll	$24,%ecx
+	xorl	%eax,%edx
+	xorl	%eax,%ebx
+	roll	$16,%edx
+	xorl	%ecx,%ebx
+	roll	$8,%eax
+	xorl	%edx,%ebx
+	movl	%ebp,%ecx
+	xorl	%eax,%ebx
+	movl	%ebx,4(%edi)
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%esi,%edx
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%ecx,%edx
+	xorl	%esi,%eax
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%ecx,%eax
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	roll	$8,%ecx
+	xorl	%esi,%ebx
+	movl	12(%edi),%ebp
+	xorl	%edx,%ecx
+	xorl	%ebx,%edx
+	xorl	%eax,%ecx
+	roll	$24,%edx
+	xorl	%ebx,%eax
+	xorl	%ebx,%ecx
+	roll	$16,%eax
+	xorl	%edx,%ecx
+	roll	$8,%ebx
+	xorl	%eax,%ecx
+	movl	%ebp,%edx
+	xorl	%ebx,%ecx
+	movl	%ecx,8(%edi)
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%esi,%eax
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%edx,%eax
+	xorl	%esi,%ebx
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%edx,%ebx
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	roll	$8,%edx
+	xorl	%esi,%ecx
+	movl	16(%edi),%ebp
+	xorl	%eax,%edx
+	xorl	%ecx,%eax
+	xorl	%ebx,%edx
+	roll	$24,%eax
+	xorl	%ecx,%ebx
+	xorl	%ecx,%edx
+	roll	$16,%ebx
+	xorl	%eax,%edx
+	roll	$8,%ecx
+	xorl	%ebx,%edx
+	movl	%ebp,%eax
+	xorl	%ecx,%edx
+	movl	%edx,12(%edi)
+	cmpl	28(%esp),%edi
+	jb	.L056permute
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_AES_set_decrypt_key,.-.L_asm_AES_set_decrypt_key_begin
+.byte	65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89
+.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S b/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S
new file mode 100644
index 0000000..aec110d
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/aes/aesni-x86.S
@@ -0,0 +1,2469 @@
+#if defined(__i386__)
+.file	"src/crypto/aes/asm/aesni-x86.S"
+.text
+.globl	aesni_encrypt
+.hidden	aesni_encrypt
+.type	aesni_encrypt,@function
+.align	16
+aesni_encrypt:
+.L_aesni_encrypt_begin:
+	movl	4(%esp),%eax
+	movl	12(%esp),%edx
+	movups	(%eax),%xmm2
+	movl	240(%edx),%ecx
+	movl	8(%esp),%eax
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L000enc1_loop_1:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L000enc1_loop_1
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%eax)
+	pxor	%xmm2,%xmm2
+	ret
+.size	aesni_encrypt,.-.L_aesni_encrypt_begin
+.globl	aesni_decrypt
+.hidden	aesni_decrypt
+.type	aesni_decrypt,@function
+.align	16
+aesni_decrypt:
+.L_aesni_decrypt_begin:
+	movl	4(%esp),%eax
+	movl	12(%esp),%edx
+	movups	(%eax),%xmm2
+	movl	240(%edx),%ecx
+	movl	8(%esp),%eax
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L001dec1_loop_2:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L001dec1_loop_2
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%eax)
+	pxor	%xmm2,%xmm2
+	ret
+.size	aesni_decrypt,.-.L_aesni_decrypt_begin
+.hidden	_aesni_encrypt2
+.type	_aesni_encrypt2,@function
+.align	16
+_aesni_encrypt2:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+.L002enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L002enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	ret
+.size	_aesni_encrypt2,.-_aesni_encrypt2
+.hidden	_aesni_decrypt2
+.type	_aesni_decrypt2,@function
+.align	16
+_aesni_decrypt2:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+.L003dec2_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L003dec2_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+	ret
+.size	_aesni_decrypt2,.-_aesni_decrypt2
+.hidden	_aesni_encrypt3
+.type	_aesni_encrypt3,@function
+.align	16
+_aesni_encrypt3:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+.L004enc3_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L004enc3_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+	ret
+.size	_aesni_encrypt3,.-_aesni_encrypt3
+.hidden	_aesni_decrypt3
+.type	_aesni_decrypt3,@function
+.align	16
+_aesni_decrypt3:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+.L005dec3_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L005dec3_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+	ret
+.size	_aesni_decrypt3,.-_aesni_decrypt3
+.hidden	_aesni_encrypt4
+.type	_aesni_encrypt4,@function
+.align	16
+_aesni_encrypt4:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	shll	$4,%ecx
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	15,31,64,0
+	addl	$16,%ecx
+.L006enc4_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L006enc4_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+	ret
+.size	_aesni_encrypt4,.-_aesni_encrypt4
+.hidden	_aesni_decrypt4
+.type	_aesni_decrypt4,@function
+.align	16
+_aesni_decrypt4:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	shll	$4,%ecx
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	15,31,64,0
+	addl	$16,%ecx
+.L007dec4_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L007dec4_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+	ret
+.size	_aesni_decrypt4,.-_aesni_decrypt4
+.hidden	_aesni_encrypt6
+.type	_aesni_encrypt6,@function
+.align	16
+_aesni_encrypt6:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,220,217
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	102,15,56,220,225
+	pxor	%xmm0,%xmm7
+	movups	(%edx,%ecx,1),%xmm0
+	addl	$16,%ecx
+	jmp	.L008_aesni_encrypt6_inner
+.align	16
+.L009enc6_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.L008_aesni_encrypt6_inner:
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.L_aesni_encrypt6_enter:
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L009enc6_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+	ret
+.size	_aesni_encrypt6,.-_aesni_encrypt6
+.hidden	_aesni_decrypt6
+.type	_aesni_decrypt6,@function
+.align	16
+_aesni_decrypt6:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,222,217
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	102,15,56,222,225
+	pxor	%xmm0,%xmm7
+	movups	(%edx,%ecx,1),%xmm0
+	addl	$16,%ecx
+	jmp	.L010_aesni_decrypt6_inner
+.align	16
+.L011dec6_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.L010_aesni_decrypt6_inner:
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.L_aesni_decrypt6_enter:
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L011dec6_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+	ret
+.size	_aesni_decrypt6,.-_aesni_decrypt6
+.globl	aesni_ecb_encrypt
+.hidden	aesni_ecb_encrypt
+.type	aesni_ecb_encrypt,@function
+.align	16
+aesni_ecb_encrypt:
+.L_aesni_ecb_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	andl	$-16,%eax
+	jz	.L012ecb_ret
+	movl	240(%edx),%ecx
+	testl	%ebx,%ebx
+	jz	.L013ecb_decrypt
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	cmpl	$96,%eax
+	jb	.L014ecb_enc_tail
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+	subl	$96,%eax
+	jmp	.L015ecb_enc_loop6_enter
+.align	16
+.L016ecb_enc_loop6:
+	movups	%xmm2,(%edi)
+	movdqu	(%esi),%xmm2
+	movups	%xmm3,16(%edi)
+	movdqu	16(%esi),%xmm3
+	movups	%xmm4,32(%edi)
+	movdqu	32(%esi),%xmm4
+	movups	%xmm5,48(%edi)
+	movdqu	48(%esi),%xmm5
+	movups	%xmm6,64(%edi)
+	movdqu	64(%esi),%xmm6
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+.L015ecb_enc_loop6_enter:
+	call	_aesni_encrypt6
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	subl	$96,%eax
+	jnc	.L016ecb_enc_loop6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	addl	$96,%eax
+	jz	.L012ecb_ret
+.L014ecb_enc_tail:
+	movups	(%esi),%xmm2
+	cmpl	$32,%eax
+	jb	.L017ecb_enc_one
+	movups	16(%esi),%xmm3
+	je	.L018ecb_enc_two
+	movups	32(%esi),%xmm4
+	cmpl	$64,%eax
+	jb	.L019ecb_enc_three
+	movups	48(%esi),%xmm5
+	je	.L020ecb_enc_four
+	movups	64(%esi),%xmm6
+	xorps	%xmm7,%xmm7
+	call	_aesni_encrypt6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L017ecb_enc_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L021enc1_loop_3:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L021enc1_loop_3
+.byte	102,15,56,221,209
+	movups	%xmm2,(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L018ecb_enc_two:
+	call	_aesni_encrypt2
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L019ecb_enc_three:
+	call	_aesni_encrypt3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L020ecb_enc_four:
+	call	_aesni_encrypt4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L013ecb_decrypt:
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	cmpl	$96,%eax
+	jb	.L022ecb_dec_tail
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+	subl	$96,%eax
+	jmp	.L023ecb_dec_loop6_enter
+.align	16
+.L024ecb_dec_loop6:
+	movups	%xmm2,(%edi)
+	movdqu	(%esi),%xmm2
+	movups	%xmm3,16(%edi)
+	movdqu	16(%esi),%xmm3
+	movups	%xmm4,32(%edi)
+	movdqu	32(%esi),%xmm4
+	movups	%xmm5,48(%edi)
+	movdqu	48(%esi),%xmm5
+	movups	%xmm6,64(%edi)
+	movdqu	64(%esi),%xmm6
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+.L023ecb_dec_loop6_enter:
+	call	_aesni_decrypt6
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	subl	$96,%eax
+	jnc	.L024ecb_dec_loop6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	addl	$96,%eax
+	jz	.L012ecb_ret
+.L022ecb_dec_tail:
+	movups	(%esi),%xmm2
+	cmpl	$32,%eax
+	jb	.L025ecb_dec_one
+	movups	16(%esi),%xmm3
+	je	.L026ecb_dec_two
+	movups	32(%esi),%xmm4
+	cmpl	$64,%eax
+	jb	.L027ecb_dec_three
+	movups	48(%esi),%xmm5
+	je	.L028ecb_dec_four
+	movups	64(%esi),%xmm6
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L025ecb_dec_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L029dec1_loop_4:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L029dec1_loop_4
+.byte	102,15,56,223,209
+	movups	%xmm2,(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L026ecb_dec_two:
+	call	_aesni_decrypt2
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L027ecb_dec_three:
+	call	_aesni_decrypt3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	.L012ecb_ret
+.align	16
+.L028ecb_dec_four:
+	call	_aesni_decrypt4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+.L012ecb_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin
+.globl	aesni_ccm64_encrypt_blocks
+.hidden	aesni_ccm64_encrypt_blocks
+.type	aesni_ccm64_encrypt_blocks,@function
+.align	16
+aesni_ccm64_encrypt_blocks:
+.L_aesni_ccm64_encrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	%esp,%ebp
+	subl	$60,%esp
+	andl	$-16,%esp
+	movl	%ebp,48(%esp)
+	movdqu	(%ebx),%xmm7
+	movdqu	(%ecx),%xmm3
+	movl	240(%edx),%ecx
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$1,%ebx
+	xorl	%ebp,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ebp,20(%esp)
+	movl	%ebp,24(%esp)
+	movl	%ebp,28(%esp)
+	shll	$4,%ecx
+	movl	$16,%ebx
+	leal	(%edx),%ebp
+	movdqa	(%esp),%xmm5
+	movdqa	%xmm7,%xmm2
+	leal	32(%edx,%ecx,1),%edx
+	subl	%ecx,%ebx
+.byte	102,15,56,0,253
+.L030ccm64_enc_outer:
+	movups	(%ebp),%xmm0
+	movl	%ebx,%ecx
+	movups	(%esi),%xmm6
+	xorps	%xmm0,%xmm2
+	movups	16(%ebp),%xmm1
+	xorps	%xmm6,%xmm0
+	xorps	%xmm0,%xmm3
+	movups	32(%ebp),%xmm0
+.L031ccm64_enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L031ccm64_enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	paddq	16(%esp),%xmm7
+	decl	%eax
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leal	16(%esi),%esi
+	xorps	%xmm2,%xmm6
+	movdqa	%xmm7,%xmm2
+	movups	%xmm6,(%edi)
+.byte	102,15,56,0,213
+	leal	16(%edi),%edi
+	jnz	.L030ccm64_enc_outer
+	movl	48(%esp),%esp
+	movl	40(%esp),%edi
+	movups	%xmm3,(%edi)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin
+.globl	aesni_ccm64_decrypt_blocks
+.hidden	aesni_ccm64_decrypt_blocks
+.type	aesni_ccm64_decrypt_blocks,@function
+.align	16
+aesni_ccm64_decrypt_blocks:
+.L_aesni_ccm64_decrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	%esp,%ebp
+	subl	$60,%esp
+	andl	$-16,%esp
+	movl	%ebp,48(%esp)
+	movdqu	(%ebx),%xmm7
+	movdqu	(%ecx),%xmm3
+	movl	240(%edx),%ecx
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$1,%ebx
+	xorl	%ebp,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ebp,20(%esp)
+	movl	%ebp,24(%esp)
+	movl	%ebp,28(%esp)
+	movdqa	(%esp),%xmm5
+	movdqa	%xmm7,%xmm2
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+.byte	102,15,56,0,253
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L032enc1_loop_5:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L032enc1_loop_5
+.byte	102,15,56,221,209
+	shll	$4,%ebx
+	movl	$16,%ecx
+	movups	(%esi),%xmm6
+	paddq	16(%esp),%xmm7
+	leal	16(%esi),%esi
+	subl	%ebx,%ecx
+	leal	32(%ebp,%ebx,1),%edx
+	movl	%ecx,%ebx
+	jmp	.L033ccm64_dec_outer
+.align	16
+.L033ccm64_dec_outer:
+	xorps	%xmm2,%xmm6
+	movdqa	%xmm7,%xmm2
+	movups	%xmm6,(%edi)
+	leal	16(%edi),%edi
+.byte	102,15,56,0,213
+	subl	$1,%eax
+	jz	.L034ccm64_dec_break
+	movups	(%ebp),%xmm0
+	movl	%ebx,%ecx
+	movups	16(%ebp),%xmm1
+	xorps	%xmm0,%xmm6
+	xorps	%xmm0,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	32(%ebp),%xmm0
+.L035ccm64_dec2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	.L035ccm64_dec2_loop
+	movups	(%esi),%xmm6
+	paddq	16(%esp),%xmm7
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leal	16(%esi),%esi
+	jmp	.L033ccm64_dec_outer
+.align	16
+.L034ccm64_dec_break:
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm6
+	leal	32(%edx),%edx
+	xorps	%xmm6,%xmm3
+.L036enc1_loop_6:
+.byte	102,15,56,220,217
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L036enc1_loop_6
+.byte	102,15,56,221,217
+	movl	48(%esp),%esp
+	movl	40(%esp),%edi
+	movups	%xmm3,(%edi)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin
+.globl	aesni_ctr32_encrypt_blocks
+.hidden	aesni_ctr32_encrypt_blocks
+.type	aesni_ctr32_encrypt_blocks,@function
+.align	16
+aesni_ctr32_encrypt_blocks:
+.L_aesni_ctr32_encrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	%esp,%ebp
+	subl	$88,%esp
+	andl	$-16,%esp
+	movl	%ebp,80(%esp)
+	cmpl	$1,%eax
+	je	.L037ctr32_one_shortcut
+	movdqu	(%ebx),%xmm7
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$6,%ecx
+	xorl	%ebp,%ebp
+	movl	%ecx,16(%esp)
+	movl	%ecx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%ebp,28(%esp)
+.byte	102,15,58,22,251,3
+.byte	102,15,58,34,253,3
+	movl	240(%edx),%ecx
+	bswap	%ebx
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movdqa	(%esp),%xmm2
+.byte	102,15,58,34,195,0
+	leal	3(%ebx),%ebp
+.byte	102,15,58,34,205,0
+	incl	%ebx
+.byte	102,15,58,34,195,1
+	incl	%ebp
+.byte	102,15,58,34,205,1
+	incl	%ebx
+.byte	102,15,58,34,195,2
+	incl	%ebp
+.byte	102,15,58,34,205,2
+	movdqa	%xmm0,48(%esp)
+.byte	102,15,56,0,194
+	movdqu	(%edx),%xmm6
+	movdqa	%xmm1,64(%esp)
+.byte	102,15,56,0,202
+	pshufd	$192,%xmm0,%xmm2
+	pshufd	$128,%xmm0,%xmm3
+	cmpl	$6,%eax
+	jb	.L038ctr32_tail
+	pxor	%xmm6,%xmm7
+	shll	$4,%ecx
+	movl	$16,%ebx
+	movdqa	%xmm7,32(%esp)
+	movl	%edx,%ebp
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	subl	$6,%eax
+	jmp	.L039ctr32_loop6
+.align	16
+.L039ctr32_loop6:
+	pshufd	$64,%xmm0,%xmm4
+	movdqa	32(%esp),%xmm0
+	pshufd	$192,%xmm1,%xmm5
+	pxor	%xmm0,%xmm2
+	pshufd	$128,%xmm1,%xmm6
+	pxor	%xmm0,%xmm3
+	pshufd	$64,%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm6
+	pxor	%xmm0,%xmm7
+.byte	102,15,56,220,217
+	movups	32(%ebp),%xmm0
+	movl	%ebx,%ecx
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	call	.L_aesni_encrypt6_enter
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	%xmm1,%xmm2
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm3
+	movups	%xmm2,(%edi)
+	movdqa	16(%esp),%xmm0
+	xorps	%xmm1,%xmm4
+	movdqa	64(%esp),%xmm1
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	paddd	%xmm0,%xmm1
+	paddd	48(%esp),%xmm0
+	movdqa	(%esp),%xmm2
+	movups	48(%esi),%xmm3
+	movups	64(%esi),%xmm4
+	xorps	%xmm3,%xmm5
+	movups	80(%esi),%xmm3
+	leal	96(%esi),%esi
+	movdqa	%xmm0,48(%esp)
+.byte	102,15,56,0,194
+	xorps	%xmm4,%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm3,%xmm7
+	movdqa	%xmm1,64(%esp)
+.byte	102,15,56,0,202
+	movups	%xmm6,64(%edi)
+	pshufd	$192,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	pshufd	$128,%xmm0,%xmm3
+	subl	$6,%eax
+	jnc	.L039ctr32_loop6
+	addl	$6,%eax
+	jz	.L040ctr32_ret
+	movdqu	(%ebp),%xmm7
+	movl	%ebp,%edx
+	pxor	32(%esp),%xmm7
+	movl	240(%ebp),%ecx
+.L038ctr32_tail:
+	por	%xmm7,%xmm2
+	cmpl	$2,%eax
+	jb	.L041ctr32_one
+	pshufd	$64,%xmm0,%xmm4
+	por	%xmm7,%xmm3
+	je	.L042ctr32_two
+	pshufd	$192,%xmm1,%xmm5
+	por	%xmm7,%xmm4
+	cmpl	$4,%eax
+	jb	.L043ctr32_three
+	pshufd	$128,%xmm1,%xmm6
+	por	%xmm7,%xmm5
+	je	.L044ctr32_four
+	por	%xmm7,%xmm6
+	call	_aesni_encrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	%xmm1,%xmm2
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm3
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm4
+	movups	64(%esi),%xmm1
+	xorps	%xmm0,%xmm5
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	.L040ctr32_ret
+.align	16
+.L037ctr32_one_shortcut:
+	movups	(%ebx),%xmm2
+	movl	240(%edx),%ecx
+.L041ctr32_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L045enc1_loop_7:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L045enc1_loop_7
+.byte	102,15,56,221,209
+	movups	(%esi),%xmm6
+	xorps	%xmm2,%xmm6
+	movups	%xmm6,(%edi)
+	jmp	.L040ctr32_ret
+.align	16
+.L042ctr32_two:
+	call	_aesni_encrypt2
+	movups	(%esi),%xmm5
+	movups	16(%esi),%xmm6
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	.L040ctr32_ret
+.align	16
+.L043ctr32_three:
+	call	_aesni_encrypt3
+	movups	(%esi),%xmm5
+	movups	16(%esi),%xmm6
+	xorps	%xmm5,%xmm2
+	movups	32(%esi),%xmm7
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm7,%xmm4
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	.L040ctr32_ret
+.align	16
+.L044ctr32_four:
+	call	_aesni_encrypt4
+	movups	(%esi),%xmm6
+	movups	16(%esi),%xmm7
+	movups	32(%esi),%xmm1
+	xorps	%xmm6,%xmm2
+	movups	48(%esi),%xmm0
+	xorps	%xmm7,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	%xmm0,%xmm5
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+.L040ctr32_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movl	80(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin
+.globl	aesni_xts_encrypt
+.hidden	aesni_xts_encrypt
+.type	aesni_xts_encrypt,@function
+.align	16
+aesni_xts_encrypt:
+.L_aesni_xts_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	36(%esp),%edx
+	movl	40(%esp),%esi
+	movl	240(%edx),%ecx
+	movups	(%esi),%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L046enc1_loop_8:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L046enc1_loop_8
+.byte	102,15,56,221,209
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	subl	$120,%esp
+	movl	240(%edx),%ecx
+	andl	$-16,%esp
+	movl	$135,96(%esp)
+	movl	$0,100(%esp)
+	movl	$1,104(%esp)
+	movl	$0,108(%esp)
+	movl	%eax,112(%esp)
+	movl	%ebp,116(%esp)
+	movdqa	%xmm2,%xmm1
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	pcmpgtd	%xmm1,%xmm0
+	andl	$-16,%eax
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	subl	$96,%eax
+	jc	.L047xts_enc_short
+	shll	$4,%ecx
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	jmp	.L048xts_enc_loop6
+.align	16
+.L048xts_enc_loop6:
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,16(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,32(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,64(%esp)
+	paddq	%xmm1,%xmm1
+	movups	(%ebp),%xmm0
+	pand	%xmm3,%xmm7
+	movups	(%esi),%xmm2
+	pxor	%xmm1,%xmm7
+	movl	%ebx,%ecx
+	movdqu	16(%esi),%xmm3
+	xorps	%xmm0,%xmm2
+	movdqu	32(%esi),%xmm4
+	pxor	%xmm0,%xmm3
+	movdqu	48(%esi),%xmm5
+	pxor	%xmm0,%xmm4
+	movdqu	64(%esi),%xmm6
+	pxor	%xmm0,%xmm5
+	movdqu	80(%esi),%xmm1
+	pxor	%xmm0,%xmm6
+	leal	96(%esi),%esi
+	pxor	(%esp),%xmm2
+	movdqa	%xmm7,80(%esp)
+	pxor	%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	16(%esp),%xmm3
+	pxor	32(%esp),%xmm4
+.byte	102,15,56,220,209
+	pxor	48(%esp),%xmm5
+	pxor	64(%esp),%xmm6
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm7
+	movups	32(%ebp),%xmm0
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	call	.L_aesni_encrypt6_enter
+	movdqa	80(%esp),%xmm1
+	pxor	%xmm0,%xmm0
+	xorps	(%esp),%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	xorps	16(%esp),%xmm3
+	movups	%xmm2,(%edi)
+	xorps	32(%esp),%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm4,32(%edi)
+	xorps	64(%esp),%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm1,%xmm7
+	movups	%xmm6,64(%edi)
+	pshufd	$19,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqa	96(%esp),%xmm3
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	subl	$96,%eax
+	jnc	.L048xts_enc_loop6
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movl	%ecx,%ebx
+.L047xts_enc_short:
+	addl	$96,%eax
+	jz	.L049xts_enc_done6x
+	movdqa	%xmm1,%xmm5
+	cmpl	$32,%eax
+	jb	.L050xts_enc_one
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	je	.L051xts_enc_two
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	cmpl	$64,%eax
+	jb	.L052xts_enc_three
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm7
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,(%esp)
+	movdqa	%xmm6,16(%esp)
+	je	.L053xts_enc_four
+	movdqa	%xmm7,32(%esp)
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	pxor	(%esp),%xmm2
+	movdqu	48(%esi),%xmm5
+	pxor	16(%esp),%xmm3
+	movdqu	64(%esi),%xmm6
+	pxor	32(%esp),%xmm4
+	leal	80(%esi),%esi
+	pxor	48(%esp),%xmm5
+	movdqa	%xmm7,64(%esp)
+	pxor	%xmm7,%xmm6
+	call	_aesni_encrypt6
+	movaps	64(%esp),%xmm1
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	32(%esp),%xmm4
+	movups	%xmm2,(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm3,16(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	jmp	.L054xts_enc_done
+.align	16
+.L050xts_enc_one:
+	movups	(%esi),%xmm2
+	leal	16(%esi),%esi
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L055enc1_loop_9:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L055enc1_loop_9
+.byte	102,15,56,221,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	movdqa	%xmm5,%xmm1
+	jmp	.L054xts_enc_done
+.align	16
+.L051xts_enc_two:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	leal	32(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	call	_aesni_encrypt2
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	32(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	.L054xts_enc_done
+.align	16
+.L052xts_enc_three:
+	movaps	%xmm1,%xmm7
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	leal	48(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	call	_aesni_encrypt3
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	leal	48(%edi),%edi
+	movdqa	%xmm7,%xmm1
+	jmp	.L054xts_enc_done
+.align	16
+.L053xts_enc_four:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	xorps	(%esp),%xmm2
+	movups	48(%esi),%xmm5
+	leal	64(%esi),%esi
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	xorps	%xmm6,%xmm5
+	call	_aesni_encrypt4
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	xorps	%xmm6,%xmm5
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	leal	64(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	.L054xts_enc_done
+.align	16
+.L049xts_enc_done6x:
+	movl	112(%esp),%eax
+	andl	$15,%eax
+	jz	.L056xts_enc_ret
+	movdqa	%xmm1,%xmm5
+	movl	%eax,112(%esp)
+	jmp	.L057xts_enc_steal
+.align	16
+.L054xts_enc_done:
+	movl	112(%esp),%eax
+	pxor	%xmm0,%xmm0
+	andl	$15,%eax
+	jz	.L056xts_enc_ret
+	pcmpgtd	%xmm1,%xmm0
+	movl	%eax,112(%esp)
+	pshufd	$19,%xmm0,%xmm5
+	paddq	%xmm1,%xmm1
+	pand	96(%esp),%xmm5
+	pxor	%xmm1,%xmm5
+.L057xts_enc_steal:
+	movzbl	(%esi),%ecx
+	movzbl	-16(%edi),%edx
+	leal	1(%esi),%esi
+	movb	%cl,-16(%edi)
+	movb	%dl,(%edi)
+	leal	1(%edi),%edi
+	subl	$1,%eax
+	jnz	.L057xts_enc_steal
+	subl	112(%esp),%edi
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	-16(%edi),%xmm2
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L058enc1_loop_10:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L058enc1_loop_10
+.byte	102,15,56,221,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,-16(%edi)
+.L056xts_enc_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movdqa	%xmm0,(%esp)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm0,16(%esp)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movdqa	%xmm0,80(%esp)
+	movl	116(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin
+.globl	aesni_xts_decrypt
+.hidden	aesni_xts_decrypt
+.type	aesni_xts_decrypt,@function
+.align	16
+aesni_xts_decrypt:
+.L_aesni_xts_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	36(%esp),%edx
+	movl	40(%esp),%esi
+	movl	240(%edx),%ecx
+	movups	(%esi),%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L059enc1_loop_11:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L059enc1_loop_11
+.byte	102,15,56,221,209
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	subl	$120,%esp
+	andl	$-16,%esp
+	xorl	%ebx,%ebx
+	testl	$15,%eax
+	setnz	%bl
+	shll	$4,%ebx
+	subl	%ebx,%eax
+	movl	$135,96(%esp)
+	movl	$0,100(%esp)
+	movl	$1,104(%esp)
+	movl	$0,108(%esp)
+	movl	%eax,112(%esp)
+	movl	%ebp,116(%esp)
+	movl	240(%edx),%ecx
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	movdqa	%xmm2,%xmm1
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	pcmpgtd	%xmm1,%xmm0
+	andl	$-16,%eax
+	subl	$96,%eax
+	jc	.L060xts_dec_short
+	shll	$4,%ecx
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	jmp	.L061xts_dec_loop6
+.align	16
+.L061xts_dec_loop6:
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,16(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,32(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,64(%esp)
+	paddq	%xmm1,%xmm1
+	movups	(%ebp),%xmm0
+	pand	%xmm3,%xmm7
+	movups	(%esi),%xmm2
+	pxor	%xmm1,%xmm7
+	movl	%ebx,%ecx
+	movdqu	16(%esi),%xmm3
+	xorps	%xmm0,%xmm2
+	movdqu	32(%esi),%xmm4
+	pxor	%xmm0,%xmm3
+	movdqu	48(%esi),%xmm5
+	pxor	%xmm0,%xmm4
+	movdqu	64(%esi),%xmm6
+	pxor	%xmm0,%xmm5
+	movdqu	80(%esi),%xmm1
+	pxor	%xmm0,%xmm6
+	leal	96(%esi),%esi
+	pxor	(%esp),%xmm2
+	movdqa	%xmm7,80(%esp)
+	pxor	%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	16(%esp),%xmm3
+	pxor	32(%esp),%xmm4
+.byte	102,15,56,222,209
+	pxor	48(%esp),%xmm5
+	pxor	64(%esp),%xmm6
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm7
+	movups	32(%ebp),%xmm0
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	call	.L_aesni_decrypt6_enter
+	movdqa	80(%esp),%xmm1
+	pxor	%xmm0,%xmm0
+	xorps	(%esp),%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	xorps	16(%esp),%xmm3
+	movups	%xmm2,(%edi)
+	xorps	32(%esp),%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm4,32(%edi)
+	xorps	64(%esp),%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm1,%xmm7
+	movups	%xmm6,64(%edi)
+	pshufd	$19,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqa	96(%esp),%xmm3
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	subl	$96,%eax
+	jnc	.L061xts_dec_loop6
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movl	%ecx,%ebx
+.L060xts_dec_short:
+	addl	$96,%eax
+	jz	.L062xts_dec_done6x
+	movdqa	%xmm1,%xmm5
+	cmpl	$32,%eax
+	jb	.L063xts_dec_one
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	je	.L064xts_dec_two
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	cmpl	$64,%eax
+	jb	.L065xts_dec_three
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm7
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,(%esp)
+	movdqa	%xmm6,16(%esp)
+	je	.L066xts_dec_four
+	movdqa	%xmm7,32(%esp)
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	pxor	(%esp),%xmm2
+	movdqu	48(%esi),%xmm5
+	pxor	16(%esp),%xmm3
+	movdqu	64(%esi),%xmm6
+	pxor	32(%esp),%xmm4
+	leal	80(%esi),%esi
+	pxor	48(%esp),%xmm5
+	movdqa	%xmm7,64(%esp)
+	pxor	%xmm7,%xmm6
+	call	_aesni_decrypt6
+	movaps	64(%esp),%xmm1
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	32(%esp),%xmm4
+	movups	%xmm2,(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm3,16(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	jmp	.L067xts_dec_done
+.align	16
+.L063xts_dec_one:
+	movups	(%esi),%xmm2
+	leal	16(%esi),%esi
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L068dec1_loop_12:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L068dec1_loop_12
+.byte	102,15,56,223,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	movdqa	%xmm5,%xmm1
+	jmp	.L067xts_dec_done
+.align	16
+.L064xts_dec_two:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	leal	32(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	call	_aesni_decrypt2
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	32(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	.L067xts_dec_done
+.align	16
+.L065xts_dec_three:
+	movaps	%xmm1,%xmm7
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	leal	48(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	call	_aesni_decrypt3
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	leal	48(%edi),%edi
+	movdqa	%xmm7,%xmm1
+	jmp	.L067xts_dec_done
+.align	16
+.L066xts_dec_four:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	xorps	(%esp),%xmm2
+	movups	48(%esi),%xmm5
+	leal	64(%esi),%esi
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	xorps	%xmm6,%xmm5
+	call	_aesni_decrypt4
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	xorps	%xmm6,%xmm5
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	leal	64(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	.L067xts_dec_done
+.align	16
+.L062xts_dec_done6x:
+	movl	112(%esp),%eax
+	andl	$15,%eax
+	jz	.L069xts_dec_ret
+	movl	%eax,112(%esp)
+	jmp	.L070xts_dec_only_one_more
+.align	16
+.L067xts_dec_done:
+	movl	112(%esp),%eax
+	pxor	%xmm0,%xmm0
+	andl	$15,%eax
+	jz	.L069xts_dec_ret
+	pcmpgtd	%xmm1,%xmm0
+	movl	%eax,112(%esp)
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+.L070xts_dec_only_one_more:
+	pshufd	$19,%xmm0,%xmm5
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm5
+	pxor	%xmm1,%xmm5
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	(%esi),%xmm2
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L071dec1_loop_13:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L071dec1_loop_13
+.byte	102,15,56,223,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+.L072xts_dec_steal:
+	movzbl	16(%esi),%ecx
+	movzbl	(%edi),%edx
+	leal	1(%esi),%esi
+	movb	%cl,(%edi)
+	movb	%dl,16(%edi)
+	leal	1(%edi),%edi
+	subl	$1,%eax
+	jnz	.L072xts_dec_steal
+	subl	112(%esp),%edi
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	(%edi),%xmm2
+	xorps	%xmm6,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L073dec1_loop_14:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L073dec1_loop_14
+.byte	102,15,56,223,209
+	xorps	%xmm6,%xmm2
+	movups	%xmm2,(%edi)
+.L069xts_dec_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movdqa	%xmm0,(%esp)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm0,16(%esp)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movdqa	%xmm0,80(%esp)
+	movl	116(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin
+.globl	aesni_cbc_encrypt
+.hidden	aesni_cbc_encrypt
+.type	aesni_cbc_encrypt,@function
+.align	16
+aesni_cbc_encrypt:
+.L_aesni_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	%esp,%ebx
+	movl	24(%esp),%edi
+	subl	$24,%ebx
+	movl	28(%esp),%eax
+	andl	$-16,%ebx
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebp
+	testl	%eax,%eax
+	jz	.L074cbc_abort
+	cmpl	$0,40(%esp)
+	xchgl	%esp,%ebx
+	movups	(%ebp),%xmm7
+	movl	240(%edx),%ecx
+	movl	%edx,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ecx,%ebx
+	je	.L075cbc_decrypt
+	movaps	%xmm7,%xmm2
+	cmpl	$16,%eax
+	jb	.L076cbc_enc_tail
+	subl	$16,%eax
+	jmp	.L077cbc_enc_loop
+.align	16
+.L077cbc_enc_loop:
+	movups	(%esi),%xmm7
+	leal	16(%esi),%esi
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm7
+	leal	32(%edx),%edx
+	xorps	%xmm7,%xmm2
+.L078enc1_loop_15:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L078enc1_loop_15
+.byte	102,15,56,221,209
+	movl	%ebx,%ecx
+	movl	%ebp,%edx
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	subl	$16,%eax
+	jnc	.L077cbc_enc_loop
+	addl	$16,%eax
+	jnz	.L076cbc_enc_tail
+	movaps	%xmm2,%xmm7
+	pxor	%xmm2,%xmm2
+	jmp	.L079cbc_ret
+.L076cbc_enc_tail:
+	movl	%eax,%ecx
+.long	2767451785
+	movl	$16,%ecx
+	subl	%eax,%ecx
+	xorl	%eax,%eax
+.long	2868115081
+	leal	-16(%edi),%edi
+	movl	%ebx,%ecx
+	movl	%edi,%esi
+	movl	%ebp,%edx
+	jmp	.L077cbc_enc_loop
+.align	16
+.L075cbc_decrypt:
+	cmpl	$80,%eax
+	jbe	.L080cbc_dec_tail
+	movaps	%xmm7,(%esp)
+	subl	$80,%eax
+	jmp	.L081cbc_dec_loop6_enter
+.align	16
+.L082cbc_dec_loop6:
+	movaps	%xmm0,(%esp)
+	movups	%xmm7,(%edi)
+	leal	16(%edi),%edi
+.L081cbc_dec_loop6_enter:
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	call	_aesni_decrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	(%esp),%xmm2
+	xorps	%xmm1,%xmm3
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm4
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm5
+	movups	64(%esi),%xmm1
+	xorps	%xmm0,%xmm6
+	movups	80(%esi),%xmm0
+	xorps	%xmm1,%xmm7
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	96(%esi),%esi
+	movups	%xmm4,32(%edi)
+	movl	%ebx,%ecx
+	movups	%xmm5,48(%edi)
+	movl	%ebp,%edx
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	subl	$96,%eax
+	ja	.L082cbc_dec_loop6
+	movaps	%xmm7,%xmm2
+	movaps	%xmm0,%xmm7
+	addl	$80,%eax
+	jle	.L083cbc_dec_clear_tail_collected
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+.L080cbc_dec_tail:
+	movups	(%esi),%xmm2
+	movaps	%xmm2,%xmm6
+	cmpl	$16,%eax
+	jbe	.L084cbc_dec_one
+	movups	16(%esi),%xmm3
+	movaps	%xmm3,%xmm5
+	cmpl	$32,%eax
+	jbe	.L085cbc_dec_two
+	movups	32(%esi),%xmm4
+	cmpl	$48,%eax
+	jbe	.L086cbc_dec_three
+	movups	48(%esi),%xmm5
+	cmpl	$64,%eax
+	jbe	.L087cbc_dec_four
+	movups	64(%esi),%xmm6
+	movaps	%xmm7,(%esp)
+	movups	(%esi),%xmm2
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	(%esp),%xmm2
+	xorps	%xmm1,%xmm3
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm4
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm5
+	movups	64(%esi),%xmm7
+	xorps	%xmm0,%xmm6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%edi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%edi)
+	pxor	%xmm5,%xmm5
+	leal	64(%edi),%edi
+	movaps	%xmm6,%xmm2
+	pxor	%xmm6,%xmm6
+	subl	$80,%eax
+	jmp	.L088cbc_dec_tail_collected
+.align	16
+.L084cbc_dec_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+.L089dec1_loop_16:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	.L089dec1_loop_16
+.byte	102,15,56,223,209
+	xorps	%xmm7,%xmm2
+	movaps	%xmm6,%xmm7
+	subl	$16,%eax
+	jmp	.L088cbc_dec_tail_collected
+.align	16
+.L085cbc_dec_two:
+	call	_aesni_decrypt2
+	xorps	%xmm7,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movaps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	leal	16(%edi),%edi
+	movaps	%xmm5,%xmm7
+	subl	$32,%eax
+	jmp	.L088cbc_dec_tail_collected
+.align	16
+.L086cbc_dec_three:
+	call	_aesni_decrypt3
+	xorps	%xmm7,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm5,%xmm4
+	movups	%xmm2,(%edi)
+	movaps	%xmm4,%xmm2
+	pxor	%xmm4,%xmm4
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	leal	32(%edi),%edi
+	movups	32(%esi),%xmm7
+	subl	$48,%eax
+	jmp	.L088cbc_dec_tail_collected
+.align	16
+.L087cbc_dec_four:
+	call	_aesni_decrypt4
+	movups	16(%esi),%xmm1
+	movups	32(%esi),%xmm0
+	xorps	%xmm7,%xmm2
+	movups	48(%esi),%xmm7
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm4
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	xorps	%xmm0,%xmm5
+	movups	%xmm4,32(%edi)
+	pxor	%xmm4,%xmm4
+	leal	48(%edi),%edi
+	movaps	%xmm5,%xmm2
+	pxor	%xmm5,%xmm5
+	subl	$64,%eax
+	jmp	.L088cbc_dec_tail_collected
+.align	16
+.L083cbc_dec_clear_tail_collected:
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+.L088cbc_dec_tail_collected:
+	andl	$15,%eax
+	jnz	.L090cbc_dec_tail_partial
+	movups	%xmm2,(%edi)
+	pxor	%xmm0,%xmm0
+	jmp	.L079cbc_ret
+.align	16
+.L090cbc_dec_tail_partial:
+	movaps	%xmm2,(%esp)
+	pxor	%xmm0,%xmm0
+	movl	$16,%ecx
+	movl	%esp,%esi
+	subl	%eax,%ecx
+.long	2767451785
+	movdqa	%xmm2,(%esp)
+.L079cbc_ret:
+	movl	16(%esp),%esp
+	movl	36(%esp),%ebp
+	pxor	%xmm2,%xmm2
+	pxor	%xmm1,%xmm1
+	movups	%xmm7,(%ebp)
+	pxor	%xmm7,%xmm7
+.L074cbc_abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin
+.hidden	_aesni_set_encrypt_key
+.type	_aesni_set_encrypt_key,@function
+.align	16
+_aesni_set_encrypt_key:
+	pushl	%ebp
+	pushl	%ebx
+	testl	%eax,%eax
+	jz	.L091bad_pointer
+	testl	%edx,%edx
+	jz	.L091bad_pointer
+	call	.L092pic
+.L092pic:
+	popl	%ebx
+	leal	.Lkey_const-.L092pic(%ebx),%ebx
+	leal	OPENSSL_ia32cap_P-.Lkey_const(%ebx),%ebp
+	movups	(%eax),%xmm0
+	xorps	%xmm4,%xmm4
+	movl	4(%ebp),%ebp
+	leal	16(%edx),%edx
+	andl	$268437504,%ebp
+	cmpl	$256,%ecx
+	je	.L09314rounds
+	cmpl	$192,%ecx
+	je	.L09412rounds
+	cmpl	$128,%ecx
+	jne	.L095bad_keybits
+.align	16
+.L09610rounds:
+	cmpl	$268435456,%ebp
+	je	.L09710rounds_alt
+	movl	$9,%ecx
+	movups	%xmm0,-16(%edx)
+.byte	102,15,58,223,200,1
+	call	.L098key_128_cold
+.byte	102,15,58,223,200,2
+	call	.L099key_128
+.byte	102,15,58,223,200,4
+	call	.L099key_128
+.byte	102,15,58,223,200,8
+	call	.L099key_128
+.byte	102,15,58,223,200,16
+	call	.L099key_128
+.byte	102,15,58,223,200,32
+	call	.L099key_128
+.byte	102,15,58,223,200,64
+	call	.L099key_128
+.byte	102,15,58,223,200,128
+	call	.L099key_128
+.byte	102,15,58,223,200,27
+	call	.L099key_128
+.byte	102,15,58,223,200,54
+	call	.L099key_128
+	movups	%xmm0,(%edx)
+	movl	%ecx,80(%edx)
+	jmp	.L100good_key
+.align	16
+.L099key_128:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+.L098key_128_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	ret
+.align	16
+.L09710rounds_alt:
+	movdqa	(%ebx),%xmm5
+	movl	$8,%ecx
+	movdqa	32(%ebx),%xmm4
+	movdqa	%xmm0,%xmm2
+	movdqu	%xmm0,-16(%edx)
+.L101loop_key128:
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	leal	16(%edx),%edx
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,-16(%edx)
+	movdqa	%xmm0,%xmm2
+	decl	%ecx
+	jnz	.L101loop_key128
+	movdqa	48(%ebx),%xmm4
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%edx)
+	movdqa	%xmm0,%xmm2
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,16(%edx)
+	movl	$9,%ecx
+	movl	%ecx,96(%edx)
+	jmp	.L100good_key
+.align	16
+.L09412rounds:
+	movq	16(%eax),%xmm2
+	cmpl	$268435456,%ebp
+	je	.L10212rounds_alt
+	movl	$11,%ecx
+	movups	%xmm0,-16(%edx)
+.byte	102,15,58,223,202,1
+	call	.L103key_192a_cold
+.byte	102,15,58,223,202,2
+	call	.L104key_192b
+.byte	102,15,58,223,202,4
+	call	.L105key_192a
+.byte	102,15,58,223,202,8
+	call	.L104key_192b
+.byte	102,15,58,223,202,16
+	call	.L105key_192a
+.byte	102,15,58,223,202,32
+	call	.L104key_192b
+.byte	102,15,58,223,202,64
+	call	.L105key_192a
+.byte	102,15,58,223,202,128
+	call	.L104key_192b
+	movups	%xmm0,(%edx)
+	movl	%ecx,48(%edx)
+	jmp	.L100good_key
+.align	16
+.L105key_192a:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+.align	16
+.L103key_192a_cold:
+	movaps	%xmm2,%xmm5
+.L106key_192b_warm:
+	shufps	$16,%xmm0,%xmm4
+	movdqa	%xmm2,%xmm3
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	pslldq	$4,%xmm3
+	xorps	%xmm4,%xmm0
+	pshufd	$85,%xmm1,%xmm1
+	pxor	%xmm3,%xmm2
+	pxor	%xmm1,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm3,%xmm2
+	ret
+.align	16
+.L104key_192b:
+	movaps	%xmm0,%xmm3
+	shufps	$68,%xmm0,%xmm5
+	movups	%xmm5,(%edx)
+	shufps	$78,%xmm2,%xmm3
+	movups	%xmm3,16(%edx)
+	leal	32(%edx),%edx
+	jmp	.L106key_192b_warm
+.align	16
+.L10212rounds_alt:
+	movdqa	16(%ebx),%xmm5
+	movdqa	32(%ebx),%xmm4
+	movl	$8,%ecx
+	movdqu	%xmm0,-16(%edx)
+.L107loop_key192:
+	movq	%xmm2,(%edx)
+	movdqa	%xmm2,%xmm1
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	pslld	$1,%xmm4
+	leal	24(%edx),%edx
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pxor	%xmm2,%xmm0
+	pxor	%xmm3,%xmm2
+	movdqu	%xmm0,-16(%edx)
+	decl	%ecx
+	jnz	.L107loop_key192
+	movl	$11,%ecx
+	movl	%ecx,32(%edx)
+	jmp	.L100good_key
+.align	16
+.L09314rounds:
+	movups	16(%eax),%xmm2
+	leal	16(%edx),%edx
+	cmpl	$268435456,%ebp
+	je	.L10814rounds_alt
+	movl	$13,%ecx
+	movups	%xmm0,-32(%edx)
+	movups	%xmm2,-16(%edx)
+.byte	102,15,58,223,202,1
+	call	.L109key_256a_cold
+.byte	102,15,58,223,200,1
+	call	.L110key_256b
+.byte	102,15,58,223,202,2
+	call	.L111key_256a
+.byte	102,15,58,223,200,2
+	call	.L110key_256b
+.byte	102,15,58,223,202,4
+	call	.L111key_256a
+.byte	102,15,58,223,200,4
+	call	.L110key_256b
+.byte	102,15,58,223,202,8
+	call	.L111key_256a
+.byte	102,15,58,223,200,8
+	call	.L110key_256b
+.byte	102,15,58,223,202,16
+	call	.L111key_256a
+.byte	102,15,58,223,200,16
+	call	.L110key_256b
+.byte	102,15,58,223,202,32
+	call	.L111key_256a
+.byte	102,15,58,223,200,32
+	call	.L110key_256b
+.byte	102,15,58,223,202,64
+	call	.L111key_256a
+	movups	%xmm0,(%edx)
+	movl	%ecx,16(%edx)
+	xorl	%eax,%eax
+	jmp	.L100good_key
+.align	16
+.L111key_256a:
+	movups	%xmm2,(%edx)
+	leal	16(%edx),%edx
+.L109key_256a_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	ret
+.align	16
+.L110key_256b:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+	shufps	$16,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$140,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$170,%xmm1,%xmm1
+	xorps	%xmm1,%xmm2
+	ret
+.align	16
+.L10814rounds_alt:
+	movdqa	(%ebx),%xmm5
+	movdqa	32(%ebx),%xmm4
+	movl	$7,%ecx
+	movdqu	%xmm0,-32(%edx)
+	movdqa	%xmm2,%xmm1
+	movdqu	%xmm2,-16(%edx)
+.L112loop_key256:
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pslld	$1,%xmm4
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%edx)
+	decl	%ecx
+	jz	.L113done_key256
+	pshufd	$255,%xmm0,%xmm2
+	pxor	%xmm3,%xmm3
+.byte	102,15,56,221,211
+	movdqa	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm3,%xmm1
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,16(%edx)
+	leal	32(%edx),%edx
+	movdqa	%xmm2,%xmm1
+	jmp	.L112loop_key256
+.L113done_key256:
+	movl	$13,%ecx
+	movl	%ecx,16(%edx)
+.L100good_key:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	xorl	%eax,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	4
+.L091bad_pointer:
+	movl	$-1,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	4
+.L095bad_keybits:
+	pxor	%xmm0,%xmm0
+	movl	$-2,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	_aesni_set_encrypt_key,.-_aesni_set_encrypt_key
+.globl	aesni_set_encrypt_key
+.hidden	aesni_set_encrypt_key
+.type	aesni_set_encrypt_key,@function
+.align	16
+aesni_set_encrypt_key:
+.L_aesni_set_encrypt_key_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	call	_aesni_set_encrypt_key
+	ret
+.size	aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin
+.globl	aesni_set_decrypt_key
+.hidden	aesni_set_decrypt_key
+.type	aesni_set_decrypt_key,@function
+.align	16
+aesni_set_decrypt_key:
+.L_aesni_set_decrypt_key_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	call	_aesni_set_encrypt_key
+	movl	12(%esp),%edx
+	shll	$4,%ecx
+	testl	%eax,%eax
+	jnz	.L114dec_key_ret
+	leal	16(%edx,%ecx,1),%eax
+	movups	(%edx),%xmm0
+	movups	(%eax),%xmm1
+	movups	%xmm0,(%eax)
+	movups	%xmm1,(%edx)
+	leal	16(%edx),%edx
+	leal	-16(%eax),%eax
+.L115dec_key_inverse:
+	movups	(%edx),%xmm0
+	movups	(%eax),%xmm1
+.byte	102,15,56,219,192
+.byte	102,15,56,219,201
+	leal	16(%edx),%edx
+	leal	-16(%eax),%eax
+	movups	%xmm0,16(%eax)
+	movups	%xmm1,-16(%edx)
+	cmpl	%edx,%eax
+	ja	.L115dec_key_inverse
+	movups	(%edx),%xmm0
+.byte	102,15,56,219,192
+	movups	%xmm0,(%edx)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	xorl	%eax,%eax
+.L114dec_key_ret:
+	ret
+.size	aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin
+.align	64
+.Lkey_const:
+.long	202313229,202313229,202313229,202313229
+.long	67569157,67569157,67569157,67569157
+.long	1,1,1,1
+.long	27,27,27,27
+.byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
+.byte	83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
+.byte	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+.byte	115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S b/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S
new file mode 100644
index 0000000..9aede39
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/aes/vpaes-x86.S
@@ -0,0 +1,676 @@
+#if defined(__i386__)
+.file	"vpaes-x86.S"
+.text
+.align	64
+.L_vpaes_consts:
+.long	218628480,235210255,168496130,67568393
+.long	252381056,17041926,33884169,51187212
+.long	252645135,252645135,252645135,252645135
+.long	1512730624,3266504856,1377990664,3401244816
+.long	830229760,1275146365,2969422977,3447763452
+.long	3411033600,2979783055,338359620,2782886510
+.long	4209124096,907596821,221174255,1006095553
+.long	191964160,3799684038,3164090317,1589111125
+.long	182528256,1777043520,2877432650,3265356744
+.long	1874708224,3503451415,3305285752,363511674
+.long	1606117888,3487855781,1093350906,2384367825
+.long	197121,67569157,134941193,202313229
+.long	67569157,134941193,202313229,197121
+.long	134941193,202313229,197121,67569157
+.long	202313229,197121,67569157,134941193
+.long	33619971,100992007,168364043,235736079
+.long	235736079,33619971,100992007,168364043
+.long	168364043,235736079,33619971,100992007
+.long	100992007,168364043,235736079,33619971
+.long	50462976,117835012,185207048,252579084
+.long	252314880,51251460,117574920,184942860
+.long	184682752,252054788,50987272,118359308
+.long	118099200,185467140,251790600,50727180
+.long	2946363062,528716217,1300004225,1881839624
+.long	1532713819,1532713819,1532713819,1532713819
+.long	3602276352,4288629033,3737020424,4153884961
+.long	1354558464,32357713,2958822624,3775749553
+.long	1201988352,132424512,1572796698,503232858
+.long	2213177600,1597421020,4103937655,675398315
+.long	2749646592,4273543773,1511898873,121693092
+.long	3040248576,1103263732,2871565598,1608280554
+.long	2236667136,2588920351,482954393,64377734
+.long	3069987328,291237287,2117370568,3650299247
+.long	533321216,3573750986,2572112006,1401264716
+.long	1339849704,2721158661,548607111,3445553514
+.long	2128193280,3054596040,2183486460,1257083700
+.long	655635200,1165381986,3923443150,2344132524
+.long	190078720,256924420,290342170,357187870
+.long	1610966272,2263057382,4103205268,309794674
+.long	2592527872,2233205587,1335446729,3402964816
+.long	3973531904,3225098121,3002836325,1918774430
+.long	3870401024,2102906079,2284471353,4117666579
+.long	617007872,1021508343,366931923,691083277
+.long	2528395776,3491914898,2968704004,1613121270
+.long	3445188352,3247741094,844474987,4093578302
+.long	651481088,1190302358,1689581232,574775300
+.long	4289380608,206939853,2555985458,2489840491
+.long	2130264064,327674451,3566485037,3349835193
+.long	2470714624,316102159,3636825756,3393945945
+.byte	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
+.byte	111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83
+.byte	83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117
+.byte	114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105
+.byte	118,101,114,115,105,116,121,41,0
+.align	64
+.hidden	_vpaes_preheat
+.type	_vpaes_preheat,@function
+.align	16
+_vpaes_preheat:
+	addl	(%esp),%ebp
+	movdqa	-48(%ebp),%xmm7
+	movdqa	-16(%ebp),%xmm6
+	ret
+.size	_vpaes_preheat,.-_vpaes_preheat
+.hidden	_vpaes_encrypt_core
+.type	_vpaes_encrypt_core,@function
+.align	16
+_vpaes_encrypt_core:
+	movl	$16,%ecx
+	movl	240(%edx),%eax
+	movdqa	%xmm6,%xmm1
+	movdqa	(%ebp),%xmm2
+	pandn	%xmm0,%xmm1
+	pand	%xmm6,%xmm0
+	movdqu	(%edx),%xmm5
+.byte	102,15,56,0,208
+	movdqa	16(%ebp),%xmm0
+	pxor	%xmm5,%xmm2
+	psrld	$4,%xmm1
+	addl	$16,%edx
+.byte	102,15,56,0,193
+	leal	192(%ebp),%ebx
+	pxor	%xmm2,%xmm0
+	jmp	.L000enc_entry
+.align	16
+.L001enc_loop:
+	movdqa	32(%ebp),%xmm4
+	movdqa	48(%ebp),%xmm0
+.byte	102,15,56,0,226
+.byte	102,15,56,0,195
+	pxor	%xmm5,%xmm4
+	movdqa	64(%ebp),%xmm5
+	pxor	%xmm4,%xmm0
+	movdqa	-64(%ebx,%ecx,1),%xmm1
+.byte	102,15,56,0,234
+	movdqa	80(%ebp),%xmm2
+	movdqa	(%ebx,%ecx,1),%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm0,%xmm3
+	pxor	%xmm5,%xmm2
+.byte	102,15,56,0,193
+	addl	$16,%edx
+	pxor	%xmm2,%xmm0
+.byte	102,15,56,0,220
+	addl	$16,%ecx
+	pxor	%xmm0,%xmm3
+.byte	102,15,56,0,193
+	andl	$48,%ecx
+	subl	$1,%eax
+	pxor	%xmm3,%xmm0
+.L000enc_entry:
+	movdqa	%xmm6,%xmm1
+	movdqa	-32(%ebp),%xmm5
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm6,%xmm0
+.byte	102,15,56,0,232
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm5,%xmm3
+.byte	102,15,56,0,224
+	movdqa	%xmm7,%xmm2
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%edx),%xmm5
+	pxor	%xmm1,%xmm3
+	jnz	.L001enc_loop
+	movdqa	96(%ebp),%xmm4
+	movdqa	112(%ebp),%xmm0
+.byte	102,15,56,0,226
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,195
+	movdqa	64(%ebx,%ecx,1),%xmm1
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,193
+	ret
+.size	_vpaes_encrypt_core,.-_vpaes_encrypt_core
+.hidden	_vpaes_decrypt_core
+.type	_vpaes_decrypt_core,@function
+.align	16
+_vpaes_decrypt_core:
+	leal	608(%ebp),%ebx
+	movl	240(%edx),%eax
+	movdqa	%xmm6,%xmm1
+	movdqa	-64(%ebx),%xmm2
+	pandn	%xmm0,%xmm1
+	movl	%eax,%ecx
+	psrld	$4,%xmm1
+	movdqu	(%edx),%xmm5
+	shll	$4,%ecx
+	pand	%xmm6,%xmm0
+.byte	102,15,56,0,208
+	movdqa	-48(%ebx),%xmm0
+	xorl	$48,%ecx
+.byte	102,15,56,0,193
+	andl	$48,%ecx
+	pxor	%xmm5,%xmm2
+	movdqa	176(%ebp),%xmm5
+	pxor	%xmm2,%xmm0
+	addl	$16,%edx
+	leal	-352(%ebx,%ecx,1),%ecx
+	jmp	.L002dec_entry
+.align	16
+.L003dec_loop:
+	movdqa	-32(%ebx),%xmm4
+	movdqa	-16(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	16(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	32(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	48(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	64(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	80(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	addl	$16,%edx
+.byte	102,15,58,15,237,12
+	pxor	%xmm1,%xmm0
+	subl	$1,%eax
+.L002dec_entry:
+	movdqa	%xmm6,%xmm1
+	movdqa	-32(%ebp),%xmm2
+	pandn	%xmm0,%xmm1
+	pand	%xmm6,%xmm0
+	psrld	$4,%xmm1
+.byte	102,15,56,0,208
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm7,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%edx),%xmm0
+	pxor	%xmm1,%xmm3
+	jnz	.L003dec_loop
+	movdqa	96(%ebx),%xmm4
+.byte	102,15,56,0,226
+	pxor	%xmm0,%xmm4
+	movdqa	112(%ebx),%xmm0
+	movdqa	(%ecx),%xmm2
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,194
+	ret
+.size	_vpaes_decrypt_core,.-_vpaes_decrypt_core
+.hidden	_vpaes_schedule_core
+.type	_vpaes_schedule_core,@function
+.align	16
+_vpaes_schedule_core:
+	addl	(%esp),%ebp
+	movdqu	(%esi),%xmm0
+	movdqa	320(%ebp),%xmm2
+	movdqa	%xmm0,%xmm3
+	leal	(%ebp),%ebx
+	movdqa	%xmm2,4(%esp)
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm7
+	testl	%edi,%edi
+	jnz	.L004schedule_am_decrypting
+	movdqu	%xmm0,(%edx)
+	jmp	.L005schedule_go
+.L004schedule_am_decrypting:
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,217
+	movdqu	%xmm3,(%edx)
+	xorl	$48,%ecx
+.L005schedule_go:
+	cmpl	$192,%eax
+	ja	.L006schedule_256
+	je	.L007schedule_192
+.L008schedule_128:
+	movl	$10,%eax
+.L009loop_schedule_128:
+	call	_vpaes_schedule_round
+	decl	%eax
+	jz	.L010schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	jmp	.L009loop_schedule_128
+.align	16
+.L007schedule_192:
+	movdqu	8(%esi),%xmm0
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm6
+	pxor	%xmm4,%xmm4
+	movhlps	%xmm4,%xmm6
+	movl	$4,%eax
+.L011loop_schedule_192:
+	call	_vpaes_schedule_round
+.byte	102,15,58,15,198,8
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_round
+	decl	%eax
+	jz	.L010schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	jmp	.L011loop_schedule_192
+.align	16
+.L006schedule_256:
+	movdqu	16(%esi),%xmm0
+	call	_vpaes_schedule_transform
+	movl	$7,%eax
+.L012loop_schedule_256:
+	call	_vpaes_schedule_mangle
+	movdqa	%xmm0,%xmm6
+	call	_vpaes_schedule_round
+	decl	%eax
+	jz	.L010schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	pshufd	$255,%xmm0,%xmm0
+	movdqa	%xmm7,20(%esp)
+	movdqa	%xmm6,%xmm7
+	call	.L_vpaes_schedule_low_round
+	movdqa	20(%esp),%xmm7
+	jmp	.L012loop_schedule_256
+.align	16
+.L010schedule_mangle_last:
+	leal	384(%ebp),%ebx
+	testl	%edi,%edi
+	jnz	.L013schedule_mangle_last_dec
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,193
+	leal	352(%ebp),%ebx
+	addl	$32,%edx
+.L013schedule_mangle_last_dec:
+	addl	$-16,%edx
+	pxor	336(%ebp),%xmm0
+	call	_vpaes_schedule_transform
+	movdqu	%xmm0,(%edx)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	ret
+.size	_vpaes_schedule_core,.-_vpaes_schedule_core
+.hidden	_vpaes_schedule_192_smear
+.type	_vpaes_schedule_192_smear,@function
+.align	16
+_vpaes_schedule_192_smear:
+	pshufd	$128,%xmm6,%xmm1
+	pshufd	$254,%xmm7,%xmm0
+	pxor	%xmm1,%xmm6
+	pxor	%xmm1,%xmm1
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm6,%xmm0
+	movhlps	%xmm1,%xmm6
+	ret
+.size	_vpaes_schedule_192_smear,.-_vpaes_schedule_192_smear
+.hidden	_vpaes_schedule_round
+.type	_vpaes_schedule_round,@function
+.align	16
+_vpaes_schedule_round:
+	movdqa	8(%esp),%xmm2
+	pxor	%xmm1,%xmm1
+.byte	102,15,58,15,202,15
+.byte	102,15,58,15,210,15
+	pxor	%xmm1,%xmm7
+	pshufd	$255,%xmm0,%xmm0
+.byte	102,15,58,15,192,1
+	movdqa	%xmm2,8(%esp)
+.L_vpaes_schedule_low_round:
+	movdqa	%xmm7,%xmm1
+	pslldq	$4,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm7,%xmm1
+	pslldq	$8,%xmm7
+	pxor	%xmm1,%xmm7
+	pxor	336(%ebp),%xmm7
+	movdqa	-16(%ebp),%xmm4
+	movdqa	-48(%ebp),%xmm5
+	movdqa	%xmm4,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm4,%xmm0
+	movdqa	-32(%ebp),%xmm2
+.byte	102,15,56,0,208
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm5,%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	movdqa	%xmm5,%xmm4
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm5,%xmm2
+.byte	102,15,56,0,211
+	pxor	%xmm0,%xmm2
+	movdqa	%xmm5,%xmm3
+.byte	102,15,56,0,220
+	pxor	%xmm1,%xmm3
+	movdqa	32(%ebp),%xmm4
+.byte	102,15,56,0,226
+	movdqa	48(%ebp),%xmm0
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+	pxor	%xmm7,%xmm0
+	movdqa	%xmm0,%xmm7
+	ret
+.size	_vpaes_schedule_round,.-_vpaes_schedule_round
+.hidden	_vpaes_schedule_transform
+.type	_vpaes_schedule_transform,@function
+.align	16
+_vpaes_schedule_transform:
+	movdqa	-16(%ebp),%xmm2
+	movdqa	%xmm2,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm2,%xmm0
+	movdqa	(%ebx),%xmm2
+.byte	102,15,56,0,208
+	movdqa	16(%ebx),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm2,%xmm0
+	ret
+.size	_vpaes_schedule_transform,.-_vpaes_schedule_transform
+.hidden	_vpaes_schedule_mangle
+.type	_vpaes_schedule_mangle,@function
+.align	16
+_vpaes_schedule_mangle:
+	movdqa	%xmm0,%xmm4
+	movdqa	128(%ebp),%xmm5
+	testl	%edi,%edi
+	jnz	.L014schedule_mangle_dec
+	addl	$16,%edx
+	pxor	336(%ebp),%xmm4
+.byte	102,15,56,0,229
+	movdqa	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+	jmp	.L015schedule_mangle_both
+.align	16
+.L014schedule_mangle_dec:
+	movdqa	-16(%ebp),%xmm2
+	leal	416(%ebp),%esi
+	movdqa	%xmm2,%xmm1
+	pandn	%xmm4,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm2,%xmm4
+	movdqa	(%esi),%xmm2
+.byte	102,15,56,0,212
+	movdqa	16(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	32(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	48(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	64(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	80(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	96(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	112(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	addl	$-16,%edx
+.L015schedule_mangle_both:
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,217
+	addl	$-16,%ecx
+	andl	$48,%ecx
+	movdqu	%xmm3,(%edx)
+	ret
+.size	_vpaes_schedule_mangle,.-_vpaes_schedule_mangle
+.globl	vpaes_set_encrypt_key
+.hidden	vpaes_set_encrypt_key
+.type	vpaes_set_encrypt_key,@function
+.align	16
+vpaes_set_encrypt_key:
+.L_vpaes_set_encrypt_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%eax
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movl	%eax,%ebx
+	shrl	$5,%ebx
+	addl	$5,%ebx
+	movl	%ebx,240(%edx)
+	movl	$48,%ecx
+	movl	$0,%edi
+	leal	.L_vpaes_consts+0x30-.L016pic_point,%ebp
+	call	_vpaes_schedule_core
+.L016pic_point:
+	movl	48(%esp),%esp
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	vpaes_set_encrypt_key,.-.L_vpaes_set_encrypt_key_begin
+.globl	vpaes_set_decrypt_key
+.hidden	vpaes_set_decrypt_key
+.type	vpaes_set_decrypt_key,@function
+.align	16
+vpaes_set_decrypt_key:
+.L_vpaes_set_decrypt_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%eax
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movl	%eax,%ebx
+	shrl	$5,%ebx
+	addl	$5,%ebx
+	movl	%ebx,240(%edx)
+	shll	$4,%ebx
+	leal	16(%edx,%ebx,1),%edx
+	movl	$1,%edi
+	movl	%eax,%ecx
+	shrl	$1,%ecx
+	andl	$32,%ecx
+	xorl	$32,%ecx
+	leal	.L_vpaes_consts+0x30-.L017pic_point,%ebp
+	call	_vpaes_schedule_core
+.L017pic_point:
+	movl	48(%esp),%esp
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	vpaes_set_decrypt_key,.-.L_vpaes_set_decrypt_key_begin
+.globl	vpaes_encrypt
+.hidden	vpaes_encrypt
+.type	vpaes_encrypt,@function
+.align	16
+vpaes_encrypt:
+.L_vpaes_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	leal	.L_vpaes_consts+0x30-.L018pic_point,%ebp
+	call	_vpaes_preheat
+.L018pic_point:
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%edi
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movdqu	(%esi),%xmm0
+	call	_vpaes_encrypt_core
+	movdqu	%xmm0,(%edi)
+	movl	48(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	vpaes_encrypt,.-.L_vpaes_encrypt_begin
+.globl	vpaes_decrypt
+.hidden	vpaes_decrypt
+.type	vpaes_decrypt,@function
+.align	16
+vpaes_decrypt:
+.L_vpaes_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	leal	.L_vpaes_consts+0x30-.L019pic_point,%ebp
+	call	_vpaes_preheat
+.L019pic_point:
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%edi
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movdqu	(%esi),%xmm0
+	call	_vpaes_decrypt_core
+	movdqu	%xmm0,(%edi)
+	movl	48(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	vpaes_decrypt,.-.L_vpaes_decrypt_begin
+.globl	vpaes_cbc_encrypt
+.hidden	vpaes_cbc_encrypt
+.type	vpaes_cbc_encrypt,@function
+.align	16
+vpaes_cbc_encrypt:
+.L_vpaes_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	subl	$16,%eax
+	jc	.L020cbc_abort
+	leal	-56(%esp),%ebx
+	movl	36(%esp),%ebp
+	andl	$-16,%ebx
+	movl	40(%esp),%ecx
+	xchgl	%esp,%ebx
+	movdqu	(%ebp),%xmm1
+	subl	%esi,%edi
+	movl	%ebx,48(%esp)
+	movl	%edi,(%esp)
+	movl	%edx,4(%esp)
+	movl	%ebp,8(%esp)
+	movl	%eax,%edi
+	leal	.L_vpaes_consts+0x30-.L021pic_point,%ebp
+	call	_vpaes_preheat
+.L021pic_point:
+	cmpl	$0,%ecx
+	je	.L022cbc_dec_loop
+	jmp	.L023cbc_enc_loop
+.align	16
+.L023cbc_enc_loop:
+	movdqu	(%esi),%xmm0
+	pxor	%xmm1,%xmm0
+	call	_vpaes_encrypt_core
+	movl	(%esp),%ebx
+	movl	4(%esp),%edx
+	movdqa	%xmm0,%xmm1
+	movdqu	%xmm0,(%ebx,%esi,1)
+	leal	16(%esi),%esi
+	subl	$16,%edi
+	jnc	.L023cbc_enc_loop
+	jmp	.L024cbc_done
+.align	16
+.L022cbc_dec_loop:
+	movdqu	(%esi),%xmm0
+	movdqa	%xmm1,16(%esp)
+	movdqa	%xmm0,32(%esp)
+	call	_vpaes_decrypt_core
+	movl	(%esp),%ebx
+	movl	4(%esp),%edx
+	pxor	16(%esp),%xmm0
+	movdqa	32(%esp),%xmm1
+	movdqu	%xmm0,(%ebx,%esi,1)
+	leal	16(%esi),%esi
+	subl	$16,%edi
+	jnc	.L022cbc_dec_loop
+.L024cbc_done:
+	movl	8(%esp),%ebx
+	movl	48(%esp),%esp
+	movdqu	%xmm1,(%ebx)
+.L020cbc_abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	vpaes_cbc_encrypt,.-.L_vpaes_cbc_encrypt_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/bn/bn-586.S b/third_party/boringssl/linux-x86/crypto/bn/bn-586.S
new file mode 100644
index 0000000..773beff
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/bn/bn-586.S
@@ -0,0 +1,1538 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/bn-586.S"
+.text
+.globl	bn_mul_add_words
+.hidden	bn_mul_add_words
+.type	bn_mul_add_words,@function
+.align	16
+bn_mul_add_words:
+.L_bn_mul_add_words_begin:
+	call	.L000PIC_me_up
+.L000PIC_me_up:
+	popl	%eax
+	leal	OPENSSL_ia32cap_P-.L000PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	.L001maw_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+	movd	16(%esp),%mm0
+	pxor	%mm1,%mm1
+	jmp	.L002maw_sse2_entry
+.align	16
+.L003maw_sse2_unrolled:
+	movd	(%eax),%mm3
+	paddq	%mm3,%mm1
+	movd	(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	movd	4(%edx),%mm4
+	pmuludq	%mm0,%mm4
+	movd	8(%edx),%mm6
+	pmuludq	%mm0,%mm6
+	movd	12(%edx),%mm7
+	pmuludq	%mm0,%mm7
+	paddq	%mm2,%mm1
+	movd	4(%eax),%mm3
+	paddq	%mm4,%mm3
+	movd	8(%eax),%mm5
+	paddq	%mm6,%mm5
+	movd	12(%eax),%mm4
+	paddq	%mm4,%mm7
+	movd	%mm1,(%eax)
+	movd	16(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	psrlq	$32,%mm1
+	movd	20(%edx),%mm4
+	pmuludq	%mm0,%mm4
+	paddq	%mm3,%mm1
+	movd	24(%edx),%mm6
+	pmuludq	%mm0,%mm6
+	movd	%mm1,4(%eax)
+	psrlq	$32,%mm1
+	movd	28(%edx),%mm3
+	addl	$32,%edx
+	pmuludq	%mm0,%mm3
+	paddq	%mm5,%mm1
+	movd	16(%eax),%mm5
+	paddq	%mm5,%mm2
+	movd	%mm1,8(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm7,%mm1
+	movd	20(%eax),%mm5
+	paddq	%mm5,%mm4
+	movd	%mm1,12(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm2,%mm1
+	movd	24(%eax),%mm5
+	paddq	%mm5,%mm6
+	movd	%mm1,16(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm4,%mm1
+	movd	28(%eax),%mm5
+	paddq	%mm5,%mm3
+	movd	%mm1,20(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm6,%mm1
+	movd	%mm1,24(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm3,%mm1
+	movd	%mm1,28(%eax)
+	leal	32(%eax),%eax
+	psrlq	$32,%mm1
+	subl	$8,%ecx
+	jz	.L004maw_sse2_exit
+.L002maw_sse2_entry:
+	testl	$4294967288,%ecx
+	jnz	.L003maw_sse2_unrolled
+.align	4
+.L005maw_sse2_loop:
+	movd	(%edx),%mm2
+	movd	(%eax),%mm3
+	pmuludq	%mm0,%mm2
+	leal	4(%edx),%edx
+	paddq	%mm3,%mm1
+	paddq	%mm2,%mm1
+	movd	%mm1,(%eax)
+	subl	$1,%ecx
+	psrlq	$32,%mm1
+	leal	4(%eax),%eax
+	jnz	.L005maw_sse2_loop
+.L004maw_sse2_exit:
+	movd	%mm1,%eax
+	emms
+	ret
+.align	16
+.L001maw_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	xorl	%esi,%esi
+	movl	20(%esp),%edi
+	movl	28(%esp),%ecx
+	movl	24(%esp),%ebx
+	andl	$4294967288,%ecx
+	movl	32(%esp),%ebp
+	pushl	%ecx
+	jz	.L006maw_finish
+.align	16
+.L007maw_loop:
+
+	movl	(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+
+	movl	4(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	4(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+
+	movl	8(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	8(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+
+	movl	12(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	12(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+
+	movl	16(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	16(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+
+	movl	20(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	20(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+
+	movl	24(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	24(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+
+	movl	28(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	28(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,28(%edi)
+	movl	%edx,%esi
+
+	subl	$8,%ecx
+	leal	32(%ebx),%ebx
+	leal	32(%edi),%edi
+	jnz	.L007maw_loop
+.L006maw_finish:
+	movl	32(%esp),%ecx
+	andl	$7,%ecx
+	jnz	.L008maw_finish2
+	jmp	.L009maw_end
+.L008maw_finish2:
+
+	movl	(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	4(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	4(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	8(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	8(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	12(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	12(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	16(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	16(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	20(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	20(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	jz	.L009maw_end
+
+	movl	24(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	24(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+.L009maw_end:
+	movl	%esi,%eax
+	popl	%ecx
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_mul_add_words,.-.L_bn_mul_add_words_begin
+.globl	bn_mul_words
+.hidden	bn_mul_words
+.type	bn_mul_words,@function
+.align	16
+bn_mul_words:
+.L_bn_mul_words_begin:
+	call	.L010PIC_me_up
+.L010PIC_me_up:
+	popl	%eax
+	leal	OPENSSL_ia32cap_P-.L010PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	.L011mw_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+	movd	16(%esp),%mm0
+	pxor	%mm1,%mm1
+.align	16
+.L012mw_sse2_loop:
+	movd	(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	leal	4(%edx),%edx
+	paddq	%mm2,%mm1
+	movd	%mm1,(%eax)
+	subl	$1,%ecx
+	psrlq	$32,%mm1
+	leal	4(%eax),%eax
+	jnz	.L012mw_sse2_loop
+	movd	%mm1,%eax
+	emms
+	ret
+.align	16
+.L011mw_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	xorl	%esi,%esi
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ebp
+	movl	32(%esp),%ecx
+	andl	$4294967288,%ebp
+	jz	.L013mw_finish
+.L014mw_loop:
+
+	movl	(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+
+	movl	4(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+
+	movl	8(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+
+	movl	12(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+
+	movl	16(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+
+	movl	20(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+
+	movl	24(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+
+	movl	28(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,28(%edi)
+	movl	%edx,%esi
+
+	addl	$32,%ebx
+	addl	$32,%edi
+	subl	$8,%ebp
+	jz	.L013mw_finish
+	jmp	.L014mw_loop
+.L013mw_finish:
+	movl	28(%esp),%ebp
+	andl	$7,%ebp
+	jnz	.L015mw_finish2
+	jmp	.L016mw_end
+.L015mw_finish2:
+
+	movl	(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	4(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	8(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	12(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	16(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	20(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	.L016mw_end
+
+	movl	24(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+.L016mw_end:
+	movl	%esi,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_mul_words,.-.L_bn_mul_words_begin
+.globl	bn_sqr_words
+.hidden	bn_sqr_words
+.type	bn_sqr_words,@function
+.align	16
+bn_sqr_words:
+.L_bn_sqr_words_begin:
+	call	.L017PIC_me_up
+.L017PIC_me_up:
+	popl	%eax
+	leal	OPENSSL_ia32cap_P-.L017PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	.L018sqr_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+.align	16
+.L019sqr_sse2_loop:
+	movd	(%edx),%mm0
+	pmuludq	%mm0,%mm0
+	leal	4(%edx),%edx
+	movq	%mm0,(%eax)
+	subl	$1,%ecx
+	leal	8(%eax),%eax
+	jnz	.L019sqr_sse2_loop
+	emms
+	ret
+.align	16
+.L018sqr_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%ebx
+	andl	$4294967288,%ebx
+	jz	.L020sw_finish
+.L021sw_loop:
+
+	movl	(%edi),%eax
+	mull	%eax
+	movl	%eax,(%esi)
+	movl	%edx,4(%esi)
+
+	movl	4(%edi),%eax
+	mull	%eax
+	movl	%eax,8(%esi)
+	movl	%edx,12(%esi)
+
+	movl	8(%edi),%eax
+	mull	%eax
+	movl	%eax,16(%esi)
+	movl	%edx,20(%esi)
+
+	movl	12(%edi),%eax
+	mull	%eax
+	movl	%eax,24(%esi)
+	movl	%edx,28(%esi)
+
+	movl	16(%edi),%eax
+	mull	%eax
+	movl	%eax,32(%esi)
+	movl	%edx,36(%esi)
+
+	movl	20(%edi),%eax
+	mull	%eax
+	movl	%eax,40(%esi)
+	movl	%edx,44(%esi)
+
+	movl	24(%edi),%eax
+	mull	%eax
+	movl	%eax,48(%esi)
+	movl	%edx,52(%esi)
+
+	movl	28(%edi),%eax
+	mull	%eax
+	movl	%eax,56(%esi)
+	movl	%edx,60(%esi)
+
+	addl	$32,%edi
+	addl	$64,%esi
+	subl	$8,%ebx
+	jnz	.L021sw_loop
+.L020sw_finish:
+	movl	28(%esp),%ebx
+	andl	$7,%ebx
+	jz	.L022sw_end
+
+	movl	(%edi),%eax
+	mull	%eax
+	movl	%eax,(%esi)
+	decl	%ebx
+	movl	%edx,4(%esi)
+	jz	.L022sw_end
+
+	movl	4(%edi),%eax
+	mull	%eax
+	movl	%eax,8(%esi)
+	decl	%ebx
+	movl	%edx,12(%esi)
+	jz	.L022sw_end
+
+	movl	8(%edi),%eax
+	mull	%eax
+	movl	%eax,16(%esi)
+	decl	%ebx
+	movl	%edx,20(%esi)
+	jz	.L022sw_end
+
+	movl	12(%edi),%eax
+	mull	%eax
+	movl	%eax,24(%esi)
+	decl	%ebx
+	movl	%edx,28(%esi)
+	jz	.L022sw_end
+
+	movl	16(%edi),%eax
+	mull	%eax
+	movl	%eax,32(%esi)
+	decl	%ebx
+	movl	%edx,36(%esi)
+	jz	.L022sw_end
+
+	movl	20(%edi),%eax
+	mull	%eax
+	movl	%eax,40(%esi)
+	decl	%ebx
+	movl	%edx,44(%esi)
+	jz	.L022sw_end
+
+	movl	24(%edi),%eax
+	mull	%eax
+	movl	%eax,48(%esi)
+	movl	%edx,52(%esi)
+.L022sw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_sqr_words,.-.L_bn_sqr_words_begin
+.globl	bn_div_words
+.hidden	bn_div_words
+.type	bn_div_words,@function
+.align	16
+bn_div_words:
+.L_bn_div_words_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%eax
+	movl	12(%esp),%ecx
+	divl	%ecx
+	ret
+.size	bn_div_words,.-.L_bn_div_words_begin
+.globl	bn_add_words
+.hidden	bn_add_words
+.type	bn_add_words,@function
+.align	16
+bn_add_words:
+.L_bn_add_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	.L023aw_finish
+.L024aw_loop:
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L024aw_loop
+.L023aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	.L025aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	.L025aw_end
+
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	.L025aw_end
+
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	.L025aw_end
+
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	.L025aw_end
+
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	.L025aw_end
+
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	.L025aw_end
+
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+.L025aw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_add_words,.-.L_bn_add_words_begin
+.globl	bn_sub_words
+.hidden	bn_sub_words
+.type	bn_sub_words,@function
+.align	16
+bn_sub_words:
+.L_bn_sub_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	.L026aw_finish
+.L027aw_loop:
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L027aw_loop
+.L026aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	.L028aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	.L028aw_end
+
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	.L028aw_end
+
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	.L028aw_end
+
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	.L028aw_end
+
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	.L028aw_end
+
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	.L028aw_end
+
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+.L028aw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_sub_words,.-.L_bn_sub_words_begin
+.globl	bn_sub_part_words
+.hidden	bn_sub_part_words
+.type	bn_sub_part_words,@function
+.align	16
+bn_sub_part_words:
+.L_bn_sub_part_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	.L029aw_finish
+.L030aw_loop:
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L030aw_loop
+.L029aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	.L031aw_end
+
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+.L031aw_end:
+	cmpl	$0,36(%esp)
+	je	.L032pw_end
+	movl	36(%esp),%ebp
+	cmpl	$0,%ebp
+	je	.L032pw_end
+	jge	.L033pw_pos
+
+	movl	$0,%edx
+	subl	%ebp,%edx
+	movl	%edx,%ebp
+	andl	$4294967288,%ebp
+	jz	.L034pw_neg_finish
+.L035pw_neg_loop:
+
+	movl	$0,%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+
+	movl	$0,%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+
+	movl	$0,%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+
+	movl	$0,%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+
+	movl	$0,%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+
+	movl	$0,%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+
+	movl	$0,%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+
+	movl	$0,%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L035pw_neg_loop
+.L034pw_neg_finish:
+	movl	36(%esp),%edx
+	movl	$0,%ebp
+	subl	%edx,%ebp
+	andl	$7,%ebp
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	.L032pw_end
+
+	movl	$0,%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	jmp	.L032pw_end
+.L033pw_pos:
+	andl	$4294967288,%ebp
+	jz	.L036pw_pos_finish
+.L037pw_pos_loop:
+
+	movl	(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,(%ebx)
+	jnc	.L038pw_nc0
+
+	movl	4(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,4(%ebx)
+	jnc	.L039pw_nc1
+
+	movl	8(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,8(%ebx)
+	jnc	.L040pw_nc2
+
+	movl	12(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,12(%ebx)
+	jnc	.L041pw_nc3
+
+	movl	16(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,16(%ebx)
+	jnc	.L042pw_nc4
+
+	movl	20(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,20(%ebx)
+	jnc	.L043pw_nc5
+
+	movl	24(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,24(%ebx)
+	jnc	.L044pw_nc6
+
+	movl	28(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,28(%ebx)
+	jnc	.L045pw_nc7
+
+	addl	$32,%esi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L037pw_pos_loop
+.L036pw_pos_finish:
+	movl	36(%esp),%ebp
+	andl	$7,%ebp
+	jz	.L032pw_end
+
+	movl	(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,(%ebx)
+	jnc	.L046pw_tail_nc0
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	4(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,4(%ebx)
+	jnc	.L047pw_tail_nc1
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	8(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,8(%ebx)
+	jnc	.L048pw_tail_nc2
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	12(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,12(%ebx)
+	jnc	.L049pw_tail_nc3
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	16(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,16(%ebx)
+	jnc	.L050pw_tail_nc4
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	20(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,20(%ebx)
+	jnc	.L051pw_tail_nc5
+	decl	%ebp
+	jz	.L032pw_end
+
+	movl	24(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,24(%ebx)
+	jnc	.L052pw_tail_nc6
+	movl	$1,%eax
+	jmp	.L032pw_end
+.L053pw_nc_loop:
+	movl	(%esi),%ecx
+	movl	%ecx,(%ebx)
+.L038pw_nc0:
+	movl	4(%esi),%ecx
+	movl	%ecx,4(%ebx)
+.L039pw_nc1:
+	movl	8(%esi),%ecx
+	movl	%ecx,8(%ebx)
+.L040pw_nc2:
+	movl	12(%esi),%ecx
+	movl	%ecx,12(%ebx)
+.L041pw_nc3:
+	movl	16(%esi),%ecx
+	movl	%ecx,16(%ebx)
+.L042pw_nc4:
+	movl	20(%esi),%ecx
+	movl	%ecx,20(%ebx)
+.L043pw_nc5:
+	movl	24(%esi),%ecx
+	movl	%ecx,24(%ebx)
+.L044pw_nc6:
+	movl	28(%esi),%ecx
+	movl	%ecx,28(%ebx)
+.L045pw_nc7:
+
+	addl	$32,%esi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	.L053pw_nc_loop
+	movl	36(%esp),%ebp
+	andl	$7,%ebp
+	jz	.L054pw_nc_end
+	movl	(%esi),%ecx
+	movl	%ecx,(%ebx)
+.L046pw_tail_nc0:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	4(%esi),%ecx
+	movl	%ecx,4(%ebx)
+.L047pw_tail_nc1:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	8(%esi),%ecx
+	movl	%ecx,8(%ebx)
+.L048pw_tail_nc2:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	12(%esi),%ecx
+	movl	%ecx,12(%ebx)
+.L049pw_tail_nc3:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	16(%esi),%ecx
+	movl	%ecx,16(%ebx)
+.L050pw_tail_nc4:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	20(%esi),%ecx
+	movl	%ecx,20(%ebx)
+.L051pw_tail_nc5:
+	decl	%ebp
+	jz	.L054pw_nc_end
+	movl	24(%esi),%ecx
+	movl	%ecx,24(%ebx)
+.L052pw_tail_nc6:
+.L054pw_nc_end:
+	movl	$0,%eax
+.L032pw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_sub_part_words,.-.L_bn_sub_part_words_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/bn/co-586.S b/third_party/boringssl/linux-x86/crypto/bn/co-586.S
new file mode 100644
index 0000000..e41c3a1
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/bn/co-586.S
@@ -0,0 +1,1260 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/co-586.S"
+.text
+.globl	bn_mul_comba8
+.hidden	bn_mul_comba8
+.type	bn_mul_comba8,@function
+.align	16
+bn_mul_comba8:
+.L_bn_mul_comba8_begin:
+	pushl	%esi
+	movl	12(%esp),%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	pushl	%ebp
+	pushl	%ebx
+	xorl	%ebx,%ebx
+	movl	(%esi),%eax
+	xorl	%ecx,%ecx
+	movl	(%edi),%edx
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%eax)
+	movl	4(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,4(%eax)
+	movl	8(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%eax)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,12(%eax)
+	movl	16(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%eax)
+	movl	20(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	12(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	16(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,20(%eax)
+	movl	24(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	16(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	12(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	16(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	20(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,24(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	16(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	20(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	24(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,28(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	24(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	16(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	12(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	24(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	28(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,32(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	24(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	16(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	16(%esi),%eax
+	adcl	%edx,%ecx
+	movl	20(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	12(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	28(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,36(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esi),%eax
+	adcl	%edx,%ebp
+	movl	20(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	16(%esi),%eax
+	adcl	%edx,%ebp
+	movl	24(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,40(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	24(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esi),%eax
+	adcl	%edx,%ebx
+	movl	24(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	28(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,44(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	24(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	28(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,48(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,52(%eax)
+	movl	28(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	adcl	$0,%ecx
+	movl	%ebp,56(%eax)
+
+
+	movl	%ebx,60(%eax)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.size	bn_mul_comba8,.-.L_bn_mul_comba8_begin
+.globl	bn_mul_comba4
+.hidden	bn_mul_comba4
+.type	bn_mul_comba4,@function
+.align	16
+bn_mul_comba4:
+.L_bn_mul_comba4_begin:
+	pushl	%esi
+	movl	12(%esp),%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	pushl	%ebp
+	pushl	%ebx
+	xorl	%ebx,%ebx
+	movl	(%esi),%eax
+	xorl	%ecx,%ecx
+	movl	(%edi),%edx
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%eax)
+	movl	4(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,4(%eax)
+	movl	8(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%eax)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,12(%eax)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%eax)
+	movl	12(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,20(%eax)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	adcl	$0,%ebp
+	movl	%ebx,24(%eax)
+
+
+	movl	%ecx,28(%eax)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.size	bn_mul_comba4,.-.L_bn_mul_comba4_begin
+.globl	bn_sqr_comba8
+.hidden	bn_sqr_comba8
+.type	bn_sqr_comba8,@function
+.align	16
+bn_sqr_comba8:
+.L_bn_sqr_comba8_begin:
+	pushl	%esi
+	pushl	%edi
+	pushl	%ebp
+	pushl	%ebx
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	xorl	%ebx,%ebx
+	xorl	%ecx,%ecx
+	movl	(%esi),%eax
+
+	xorl	%ebp,%ebp
+
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%edi)
+	movl	4(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,4(%edi)
+	movl	(%esi),%edx
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	4(%esi),%eax
+	adcl	$0,%ecx
+
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%edi)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	8(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	16(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,12(%edi)
+	movl	(%esi),%edx
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	12(%esi),%eax
+	adcl	$0,%ebx
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%edi)
+	movl	20(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	16(%esi),%eax
+	adcl	$0,%ecx
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	12(%esi),%eax
+	adcl	$0,%ecx
+	movl	8(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,20(%edi)
+	movl	(%esi),%edx
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	20(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	16(%esi),%eax
+	adcl	$0,%ebp
+	movl	8(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	12(%esi),%eax
+	adcl	$0,%ebp
+
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,24(%edi)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	24(%esi),%eax
+	adcl	$0,%ebx
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	20(%esi),%eax
+	adcl	$0,%ebx
+	movl	8(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	16(%esi),%eax
+	adcl	$0,%ebx
+	movl	12(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	28(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,28(%edi)
+	movl	4(%esi),%edx
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	8(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	20(%esi),%eax
+	adcl	$0,%ecx
+	movl	12(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	16(%esi),%eax
+	adcl	$0,%ecx
+
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	8(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,32(%edi)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%eax
+	adcl	$0,%ebp
+	movl	12(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	20(%esi),%eax
+	adcl	$0,%ebp
+	movl	16(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	28(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,36(%edi)
+	movl	12(%esi),%edx
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	24(%esi),%eax
+	adcl	$0,%ebx
+	movl	16(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	20(%esi),%eax
+	adcl	$0,%ebx
+
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	16(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,40(%edi)
+	movl	28(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	20(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	28(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,44(%edi)
+	movl	20(%esi),%edx
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%eax
+	adcl	$0,%ebp
+
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,48(%edi)
+	movl	28(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	28(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,52(%edi)
+
+
+	xorl	%ecx,%ecx
+
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	adcl	$0,%ecx
+	movl	%ebp,56(%edi)
+
+	movl	%ebx,60(%edi)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.size	bn_sqr_comba8,.-.L_bn_sqr_comba8_begin
+.globl	bn_sqr_comba4
+.hidden	bn_sqr_comba4
+.type	bn_sqr_comba4,@function
+.align	16
+bn_sqr_comba4:
+.L_bn_sqr_comba4_begin:
+	pushl	%esi
+	pushl	%edi
+	pushl	%ebp
+	pushl	%ebx
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	xorl	%ebx,%ebx
+	xorl	%ecx,%ecx
+	movl	(%esi),%eax
+
+	xorl	%ebp,%ebp
+
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%edi)
+	movl	4(%esi),%eax
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,4(%edi)
+	movl	(%esi),%edx
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	4(%esi),%eax
+	adcl	$0,%ecx
+
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%edi)
+	movl	12(%esi),%eax
+
+
+	xorl	%ebp,%ebp
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	8(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	12(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,12(%edi)
+	movl	4(%esi),%edx
+
+
+	xorl	%ebx,%ebx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%edi)
+	movl	12(%esi),%eax
+
+
+	xorl	%ecx,%ecx
+
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	12(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,20(%edi)
+
+
+	xorl	%ebp,%ebp
+
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	adcl	$0,%ebp
+	movl	%ebx,24(%edi)
+
+	movl	%ecx,28(%edi)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.size	bn_sqr_comba4,.-.L_bn_sqr_comba4_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S b/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S
new file mode 100644
index 0000000..1569b2c
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/bn/x86-mont.S
@@ -0,0 +1,460 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/x86-mont.S"
+.text
+.globl	bn_mul_mont
+.hidden	bn_mul_mont
+.type	bn_mul_mont,@function
+.align	16
+bn_mul_mont:
+.L_bn_mul_mont_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	xorl	%eax,%eax
+	movl	40(%esp),%edi
+	cmpl	$4,%edi
+	jl	.L000just_leave
+	leal	20(%esp),%esi
+	leal	24(%esp),%edx
+	movl	%esp,%ebp
+	addl	$2,%edi
+	negl	%edi
+	leal	-32(%esp,%edi,4),%esp
+	negl	%edi
+	movl	%esp,%eax
+	subl	%edx,%eax
+	andl	$2047,%eax
+	subl	%eax,%esp
+	xorl	%esp,%edx
+	andl	$2048,%edx
+	xorl	$2048,%edx
+	subl	%edx,%esp
+	andl	$-64,%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	16(%esi),%esi
+	movl	(%esi),%esi
+	movl	%eax,4(%esp)
+	movl	%ebx,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	%edx,16(%esp)
+	movl	%esi,20(%esp)
+	leal	-3(%edi),%ebx
+	movl	%ebp,24(%esp)
+	call	.L001PIC_me_up
+.L001PIC_me_up:
+	popl	%eax
+	leal	OPENSSL_ia32cap_P-.L001PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	.L002non_sse2
+	movl	$-1,%eax
+	movd	%eax,%mm7
+	movl	8(%esp),%esi
+	movl	12(%esp),%edi
+	movl	16(%esp),%ebp
+	xorl	%edx,%edx
+	xorl	%ecx,%ecx
+	movd	(%edi),%mm4
+	movd	(%esi),%mm5
+	movd	(%ebp),%mm3
+	pmuludq	%mm4,%mm5
+	movq	%mm5,%mm2
+	movq	%mm5,%mm0
+	pand	%mm7,%mm0
+	pmuludq	20(%esp),%mm5
+	pmuludq	%mm5,%mm3
+	paddq	%mm0,%mm3
+	movd	4(%ebp),%mm1
+	movd	4(%esi),%mm0
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	incl	%ecx
+.align	16
+.L0031st:
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	movd	4(%ebp,%ecx,4),%mm1
+	paddq	%mm0,%mm3
+	movd	4(%esi,%ecx,4),%mm0
+	psrlq	$32,%mm2
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm3
+	leal	1(%ecx),%ecx
+	cmpl	%ebx,%ecx
+	jl	.L0031st
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	paddq	%mm0,%mm3
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	paddq	%mm2,%mm3
+	movq	%mm3,32(%esp,%ebx,4)
+	incl	%edx
+.L004outer:
+	xorl	%ecx,%ecx
+	movd	(%edi,%edx,4),%mm4
+	movd	(%esi),%mm5
+	movd	32(%esp),%mm6
+	movd	(%ebp),%mm3
+	pmuludq	%mm4,%mm5
+	paddq	%mm6,%mm5
+	movq	%mm5,%mm0
+	movq	%mm5,%mm2
+	pand	%mm7,%mm0
+	pmuludq	20(%esp),%mm5
+	pmuludq	%mm5,%mm3
+	paddq	%mm0,%mm3
+	movd	36(%esp),%mm6
+	movd	4(%ebp),%mm1
+	movd	4(%esi),%mm0
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	paddq	%mm6,%mm2
+	incl	%ecx
+	decl	%ebx
+.L005inner:
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	movd	36(%esp,%ecx,4),%mm6
+	pand	%mm7,%mm0
+	movd	4(%ebp,%ecx,4),%mm1
+	paddq	%mm0,%mm3
+	movd	4(%esi,%ecx,4),%mm0
+	psrlq	$32,%mm2
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm3
+	paddq	%mm6,%mm2
+	decl	%ebx
+	leal	1(%ecx),%ecx
+	jnz	.L005inner
+	movl	%ecx,%ebx
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	paddq	%mm0,%mm3
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	movd	36(%esp,%ebx,4),%mm6
+	paddq	%mm2,%mm3
+	paddq	%mm6,%mm3
+	movq	%mm3,32(%esp,%ebx,4)
+	leal	1(%edx),%edx
+	cmpl	%ebx,%edx
+	jle	.L004outer
+	emms
+	jmp	.L006common_tail
+.align	16
+.L002non_sse2:
+	movl	8(%esp),%esi
+	leal	1(%ebx),%ebp
+	movl	12(%esp),%edi
+	xorl	%ecx,%ecx
+	movl	%esi,%edx
+	andl	$1,%ebp
+	subl	%edi,%edx
+	leal	4(%edi,%ebx,4),%eax
+	orl	%edx,%ebp
+	movl	(%edi),%edi
+	jz	.L007bn_sqr_mont
+	movl	%eax,28(%esp)
+	movl	(%esi),%eax
+	xorl	%edx,%edx
+.align	16
+.L008mull:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%eax,%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	movl	(%esi,%ecx,4),%eax
+	cmpl	%ebx,%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	.L008mull
+	movl	%edx,%ebp
+	mull	%edi
+	movl	20(%esp),%edi
+	addl	%ebp,%eax
+	movl	16(%esp),%esi
+	adcl	$0,%edx
+	imull	32(%esp),%edi
+	movl	%eax,32(%esp,%ebx,4)
+	xorl	%ecx,%ecx
+	movl	%edx,36(%esp,%ebx,4)
+	movl	%ecx,40(%esp,%ebx,4)
+	movl	(%esi),%eax
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	4(%esi),%eax
+	adcl	$0,%edx
+	incl	%ecx
+	jmp	.L0092ndmadd
+.align	16
+.L0101stmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	.L0101stmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%eax
+	movl	20(%esp),%edi
+	adcl	$0,%edx
+	movl	16(%esp),%esi
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	imull	32(%esp),%edi
+	xorl	%ecx,%ecx
+	addl	36(%esp,%ebx,4),%edx
+	movl	%ebp,32(%esp,%ebx,4)
+	adcl	$0,%ecx
+	movl	(%esi),%eax
+	movl	%edx,36(%esp,%ebx,4)
+	movl	%ecx,40(%esp,%ebx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	4(%esi),%eax
+	adcl	$0,%edx
+	movl	$1,%ecx
+.align	16
+.L0092ndmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,24(%esp,%ecx,4)
+	jl	.L0092ndmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ebx,4)
+	xorl	%eax,%eax
+	movl	12(%esp),%ecx
+	addl	36(%esp,%ebx,4),%edx
+	adcl	40(%esp,%ebx,4),%eax
+	leal	4(%ecx),%ecx
+	movl	%edx,32(%esp,%ebx,4)
+	cmpl	28(%esp),%ecx
+	movl	%eax,36(%esp,%ebx,4)
+	je	.L006common_tail
+	movl	(%ecx),%edi
+	movl	8(%esp),%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+	movl	(%esi),%eax
+	jmp	.L0101stmadd
+.align	16
+.L007bn_sqr_mont:
+	movl	%ebx,(%esp)
+	movl	%ecx,12(%esp)
+	movl	%edi,%eax
+	mull	%edi
+	movl	%eax,32(%esp)
+	movl	%edx,%ebx
+	shrl	$1,%edx
+	andl	$1,%ebx
+	incl	%ecx
+.align	16
+.L011sqr:
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	leal	(%ebx,%eax,2),%ebp
+	shrl	$31,%eax
+	cmpl	(%esp),%ecx
+	movl	%eax,%ebx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	.L011sqr
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	movl	20(%esp),%edi
+	adcl	$0,%edx
+	movl	16(%esp),%esi
+	leal	(%ebx,%eax,2),%ebp
+	imull	32(%esp),%edi
+	shrl	$31,%eax
+	movl	%ebp,32(%esp,%ecx,4)
+	leal	(%eax,%edx,2),%ebp
+	movl	(%esi),%eax
+	shrl	$31,%edx
+	movl	%ebp,36(%esp,%ecx,4)
+	movl	%edx,40(%esp,%ecx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	%ecx,%ebx
+	adcl	$0,%edx
+	movl	4(%esi),%eax
+	movl	$1,%ecx
+.align	16
+.L0123rdmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	4(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ecx,4)
+	movl	%edx,%ebp
+	mull	%edi
+	addl	36(%esp,%ecx,4),%ebp
+	leal	2(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,24(%esp,%ecx,4)
+	jl	.L0123rdmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ebx,4)
+	movl	12(%esp),%ecx
+	xorl	%eax,%eax
+	movl	8(%esp),%esi
+	addl	36(%esp,%ebx,4),%edx
+	adcl	40(%esp,%ebx,4),%eax
+	movl	%edx,32(%esp,%ebx,4)
+	cmpl	%ebx,%ecx
+	movl	%eax,36(%esp,%ebx,4)
+	je	.L006common_tail
+	movl	4(%esi,%ecx,4),%edi
+	leal	1(%ecx),%ecx
+	movl	%edi,%eax
+	movl	%ecx,12(%esp)
+	mull	%edi
+	addl	32(%esp,%ecx,4),%eax
+	adcl	$0,%edx
+	movl	%eax,32(%esp,%ecx,4)
+	xorl	%ebp,%ebp
+	cmpl	%ebx,%ecx
+	leal	1(%ecx),%ecx
+	je	.L013sqrlast
+	movl	%edx,%ebx
+	shrl	$1,%edx
+	andl	$1,%ebx
+.align	16
+.L014sqradd:
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	leal	(%eax,%eax,1),%ebp
+	adcl	$0,%edx
+	shrl	$31,%eax
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%eax
+	addl	%ebx,%ebp
+	adcl	$0,%eax
+	cmpl	(%esp),%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	movl	%eax,%ebx
+	jle	.L014sqradd
+	movl	%edx,%ebp
+	addl	%edx,%edx
+	shrl	$31,%ebp
+	addl	%ebx,%edx
+	adcl	$0,%ebp
+.L013sqrlast:
+	movl	20(%esp),%edi
+	movl	16(%esp),%esi
+	imull	32(%esp),%edi
+	addl	32(%esp,%ecx,4),%edx
+	movl	(%esi),%eax
+	adcl	$0,%ebp
+	movl	%edx,32(%esp,%ecx,4)
+	movl	%ebp,36(%esp,%ecx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	leal	-1(%ecx),%ebx
+	adcl	$0,%edx
+	movl	$1,%ecx
+	movl	4(%esi),%eax
+	jmp	.L0123rdmadd
+.align	16
+.L006common_tail:
+	movl	16(%esp),%ebp
+	movl	4(%esp),%edi
+	leal	32(%esp),%esi
+	movl	(%esi),%eax
+	movl	%ebx,%ecx
+	xorl	%edx,%edx
+.align	16
+.L015sub:
+	sbbl	(%ebp,%edx,4),%eax
+	movl	%eax,(%edi,%edx,4)
+	decl	%ecx
+	movl	4(%esi,%edx,4),%eax
+	leal	1(%edx),%edx
+	jge	.L015sub
+	sbbl	$0,%eax
+.align	16
+.L016copy:
+	movl	(%esi,%ebx,4),%edx
+	movl	(%edi,%ebx,4),%ebp
+	xorl	%ebp,%edx
+	andl	%eax,%edx
+	xorl	%ebp,%edx
+	movl	%ecx,(%esi,%ebx,4)
+	movl	%edx,(%edi,%ebx,4)
+	decl	%ebx
+	jge	.L016copy
+	movl	24(%esp),%esp
+	movl	$1,%eax
+.L000just_leave:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	bn_mul_mont,.-.L_bn_mul_mont_begin
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
+.byte	112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
+.byte	54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+.byte	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+.byte	111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S b/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S
new file mode 100644
index 0000000..24a8dd4
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/cpu-x86-asm.S
@@ -0,0 +1,322 @@
+#if defined(__i386__)
+.file	"crypto/cpu-x86-asm.S"
+.text
+.globl	OPENSSL_ia32_cpuid
+.hidden	OPENSSL_ia32_cpuid
+.type	OPENSSL_ia32_cpuid,@function
+.align	16
+OPENSSL_ia32_cpuid:
+.L_OPENSSL_ia32_cpuid_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	xorl	%edx,%edx
+	pushfl
+	popl	%eax
+	movl	%eax,%ecx
+	xorl	$2097152,%eax
+	pushl	%eax
+	popfl
+	pushfl
+	popl	%eax
+	xorl	%eax,%ecx
+	xorl	%eax,%eax
+	btl	$21,%ecx
+	jnc	.L000nocpuid
+	movl	20(%esp),%esi
+	movl	%eax,8(%esi)
+	.byte	0x0f,0xa2
+	movl	%eax,%edi
+	xorl	%eax,%eax
+	cmpl	$1970169159,%ebx
+	setne	%al
+	movl	%eax,%ebp
+	cmpl	$1231384169,%edx
+	setne	%al
+	orl	%eax,%ebp
+	cmpl	$1818588270,%ecx
+	setne	%al
+	orl	%eax,%ebp
+	jz	.L001intel
+	cmpl	$1752462657,%ebx
+	setne	%al
+	movl	%eax,%esi
+	cmpl	$1769238117,%edx
+	setne	%al
+	orl	%eax,%esi
+	cmpl	$1145913699,%ecx
+	setne	%al
+	orl	%eax,%esi
+	jnz	.L001intel
+	movl	$2147483648,%eax
+	.byte	0x0f,0xa2
+	cmpl	$2147483649,%eax
+	jb	.L001intel
+	movl	%eax,%esi
+	movl	$2147483649,%eax
+	.byte	0x0f,0xa2
+	orl	%ecx,%ebp
+	andl	$2049,%ebp
+	cmpl	$2147483656,%esi
+	jb	.L001intel
+	movl	$2147483656,%eax
+	.byte	0x0f,0xa2
+	movzbl	%cl,%esi
+	incl	%esi
+	movl	$1,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	btl	$28,%edx
+	jnc	.L002generic
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	cmpl	%esi,%ebx
+	ja	.L002generic
+	andl	$4026531839,%edx
+	jmp	.L002generic
+.L001intel:
+	cmpl	$7,%edi
+	jb	.L003cacheinfo
+	movl	20(%esp),%esi
+	movl	$7,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	movl	%ebx,8(%esi)
+.L003cacheinfo:
+	cmpl	$4,%edi
+	movl	$-1,%edi
+	jb	.L004nocacheinfo
+	movl	$4,%eax
+	movl	$0,%ecx
+	.byte	0x0f,0xa2
+	movl	%eax,%edi
+	shrl	$14,%edi
+	andl	$4095,%edi
+.L004nocacheinfo:
+	movl	$1,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	andl	$3220176895,%edx
+	cmpl	$0,%ebp
+	jne	.L005notintel
+	orl	$1073741824,%edx
+.L005notintel:
+	btl	$28,%edx
+	jnc	.L002generic
+	andl	$4026531839,%edx
+	cmpl	$0,%edi
+	je	.L002generic
+	orl	$268435456,%edx
+	shrl	$16,%ebx
+	cmpb	$1,%bl
+	ja	.L002generic
+	andl	$4026531839,%edx
+.L002generic:
+	andl	$2048,%ebp
+	andl	$4294965247,%ecx
+	movl	%edx,%esi
+	orl	%ecx,%ebp
+	btl	$27,%ecx
+	jnc	.L006clear_avx
+	xorl	%ecx,%ecx
+.byte	15,1,208
+	andl	$6,%eax
+	cmpl	$6,%eax
+	je	.L007done
+	cmpl	$2,%eax
+	je	.L006clear_avx
+.L008clear_xmm:
+	andl	$4261412861,%ebp
+	andl	$4278190079,%esi
+.L006clear_avx:
+	andl	$4026525695,%ebp
+	movl	20(%esp),%edi
+	andl	$4294967263,8(%edi)
+.L007done:
+	movl	%esi,%eax
+	movl	%ebp,%edx
+.L000nocpuid:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	OPENSSL_ia32_cpuid,.-.L_OPENSSL_ia32_cpuid_begin
+.globl	OPENSSL_rdtsc
+.hidden	OPENSSL_rdtsc
+.type	OPENSSL_rdtsc,@function
+.align	16
+OPENSSL_rdtsc:
+.L_OPENSSL_rdtsc_begin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	call	.L009PIC_me_up
+.L009PIC_me_up:
+	popl	%ecx
+	leal	OPENSSL_ia32cap_P-.L009PIC_me_up(%ecx),%ecx
+	btl	$4,(%ecx)
+	jnc	.L010notsc
+	.byte	0x0f,0x31
+.L010notsc:
+	ret
+.size	OPENSSL_rdtsc,.-.L_OPENSSL_rdtsc_begin
+.globl	OPENSSL_instrument_halt
+.hidden	OPENSSL_instrument_halt
+.type	OPENSSL_instrument_halt,@function
+.align	16
+OPENSSL_instrument_halt:
+.L_OPENSSL_instrument_halt_begin:
+	call	.L011PIC_me_up
+.L011PIC_me_up:
+	popl	%ecx
+	leal	OPENSSL_ia32cap_P-.L011PIC_me_up(%ecx),%ecx
+	btl	$4,(%ecx)
+	jnc	.L012nohalt
+.long	2421723150
+	andl	$3,%eax
+	jnz	.L012nohalt
+	pushfl
+	popl	%eax
+	btl	$9,%eax
+	jnc	.L012nohalt
+	.byte	0x0f,0x31
+	pushl	%edx
+	pushl	%eax
+	hlt
+	.byte	0x0f,0x31
+	subl	(%esp),%eax
+	sbbl	4(%esp),%edx
+	addl	$8,%esp
+	ret
+.L012nohalt:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	ret
+.size	OPENSSL_instrument_halt,.-.L_OPENSSL_instrument_halt_begin
+.globl	OPENSSL_far_spin
+.hidden	OPENSSL_far_spin
+.type	OPENSSL_far_spin,@function
+.align	16
+OPENSSL_far_spin:
+.L_OPENSSL_far_spin_begin:
+	pushfl
+	popl	%eax
+	btl	$9,%eax
+	jnc	.L013nospin
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+.long	2430111262
+	xorl	%eax,%eax
+	movl	(%ecx),%edx
+	jmp	.L014spin
+.align	16
+.L014spin:
+	incl	%eax
+	cmpl	(%ecx),%edx
+	je	.L014spin
+.long	529567888
+	ret
+.L013nospin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	ret
+.size	OPENSSL_far_spin,.-.L_OPENSSL_far_spin_begin
+.globl	OPENSSL_wipe_cpu
+.hidden	OPENSSL_wipe_cpu
+.type	OPENSSL_wipe_cpu,@function
+.align	16
+OPENSSL_wipe_cpu:
+.L_OPENSSL_wipe_cpu_begin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	call	.L015PIC_me_up
+.L015PIC_me_up:
+	popl	%ecx
+	leal	OPENSSL_ia32cap_P-.L015PIC_me_up(%ecx),%ecx
+	movl	(%ecx),%ecx
+	btl	$1,(%ecx)
+	jnc	.L016no_x87
+	andl	$83886080,%ecx
+	cmpl	$83886080,%ecx
+	jne	.L017no_sse2
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+.L017no_sse2:
+.long	4007259865,4007259865,4007259865,4007259865,2430851995
+.L016no_x87:
+	leal	4(%esp),%eax
+	ret
+.size	OPENSSL_wipe_cpu,.-.L_OPENSSL_wipe_cpu_begin
+.globl	OPENSSL_atomic_add
+.hidden	OPENSSL_atomic_add
+.type	OPENSSL_atomic_add,@function
+.align	16
+OPENSSL_atomic_add:
+.L_OPENSSL_atomic_add_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%ecx
+	pushl	%ebx
+	nop
+	movl	(%edx),%eax
+.L018spin:
+	leal	(%eax,%ecx,1),%ebx
+	nop
+.long	447811568
+	jne	.L018spin
+	movl	%ebx,%eax
+	popl	%ebx
+	ret
+.size	OPENSSL_atomic_add,.-.L_OPENSSL_atomic_add_begin
+.globl	OPENSSL_indirect_call
+.hidden	OPENSSL_indirect_call
+.type	OPENSSL_indirect_call,@function
+.align	16
+OPENSSL_indirect_call:
+.L_OPENSSL_indirect_call_begin:
+	pushl	%ebp
+	movl	%esp,%ebp
+	subl	$28,%esp
+	movl	12(%ebp),%ecx
+	movl	%ecx,(%esp)
+	movl	16(%ebp),%edx
+	movl	%edx,4(%esp)
+	movl	20(%ebp),%eax
+	movl	%eax,8(%esp)
+	movl	24(%ebp),%eax
+	movl	%eax,12(%esp)
+	movl	28(%ebp),%eax
+	movl	%eax,16(%esp)
+	movl	32(%ebp),%eax
+	movl	%eax,20(%esp)
+	movl	36(%ebp),%eax
+	movl	%eax,24(%esp)
+	call	*8(%ebp)
+	movl	%ebp,%esp
+	popl	%ebp
+	ret
+.size	OPENSSL_indirect_call,.-.L_OPENSSL_indirect_call_begin
+.globl	OPENSSL_ia32_rdrand
+.hidden	OPENSSL_ia32_rdrand
+.type	OPENSSL_ia32_rdrand,@function
+.align	16
+OPENSSL_ia32_rdrand:
+.L_OPENSSL_ia32_rdrand_begin:
+	movl	$8,%ecx
+.L019loop:
+.byte	15,199,240
+	jc	.L020break
+	loop	.L019loop
+.L020break:
+	cmpl	$0,%eax
+	cmovel	%ecx,%eax
+	ret
+.size	OPENSSL_ia32_rdrand,.-.L_OPENSSL_ia32_rdrand_begin
+.hidden	OPENSSL_ia32cap_P
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/md5/md5-586.S b/third_party/boringssl/linux-x86/crypto/md5/md5-586.S
new file mode 100644
index 0000000..734b941
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/md5/md5-586.S
@@ -0,0 +1,682 @@
+#if defined(__i386__)
+.file	"src/crypto/md5/asm/md5-586.S"
+.text
+.globl	md5_block_asm_data_order
+.hidden	md5_block_asm_data_order
+.type	md5_block_asm_data_order,@function
+.align	16
+md5_block_asm_data_order:
+.L_md5_block_asm_data_order_begin:
+	pushl	%esi
+	pushl	%edi
+	movl	12(%esp),%edi
+	movl	16(%esp),%esi
+	movl	20(%esp),%ecx
+	pushl	%ebp
+	shll	$6,%ecx
+	pushl	%ebx
+	addl	%esi,%ecx
+	subl	$64,%ecx
+	movl	(%edi),%eax
+	pushl	%ecx
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+.L000start:
+
+
+	movl	%ecx,%edi
+	movl	(%esi),%ebp
+
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	3614090360(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	4(%esi),%ebp
+	addl	%ebx,%eax
+
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	3905402710(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	8(%esi),%ebp
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	606105819(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	12(%esi),%ebp
+	addl	%edx,%ecx
+
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	3250441966(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	16(%esi),%ebp
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	4118548399(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	20(%esi),%ebp
+	addl	%ebx,%eax
+
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	1200080426(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	24(%esi),%ebp
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	2821735955(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	28(%esi),%ebp
+	addl	%edx,%ecx
+
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	4249261313(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	32(%esi),%ebp
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	1770035416(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	36(%esi),%ebp
+	addl	%ebx,%eax
+
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	2336552879(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	40(%esi),%ebp
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	4294925233(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	44(%esi),%ebp
+	addl	%edx,%ecx
+
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	2304563134(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	48(%esi),%ebp
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	1804603682(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	52(%esi),%ebp
+	addl	%ebx,%eax
+
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	4254626195(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	56(%esi),%ebp
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	2792965006(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	60(%esi),%ebp
+	addl	%edx,%ecx
+
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	1236535329(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	4(%esi),%ebp
+	addl	%ecx,%ebx
+
+
+
+	leal	4129170786(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	24(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+
+	leal	3225465664(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	44(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+
+	leal	643717713(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+
+	leal	3921069994(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	20(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+
+	leal	3593408605(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	40(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+
+	leal	38016083(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	60(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+
+	leal	3634488961(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	16(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+
+	leal	3889429448(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	36(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+
+	leal	568446438(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	56(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+
+	leal	3275163606(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	12(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+
+	leal	4107603335(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	32(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+
+	leal	1163531501(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	52(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+
+	leal	2850285829(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	8(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+
+	leal	4243563512(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	28(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+
+	leal	1735328473(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	48(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+
+	leal	2368359562(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	20(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+
+
+
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	4294588738(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	32(%esi),%ebp
+	movl	%ebx,%edi
+
+	leal	2272392833(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	44(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	1839030562(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	56(%esi),%ebp
+	movl	%edx,%edi
+
+	leal	4259657740(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	4(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	2763975236(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	16(%esi),%ebp
+	movl	%ebx,%edi
+
+	leal	1272893353(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	28(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	4139469664(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	40(%esi),%ebp
+	movl	%edx,%edi
+
+	leal	3200236656(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	52(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	681279174(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	(%esi),%ebp
+	movl	%ebx,%edi
+
+	leal	3936430074(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	12(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	3572445317(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	24(%esi),%ebp
+	movl	%edx,%edi
+
+	leal	76029189(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	36(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	3654602809(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	48(%esi),%ebp
+	movl	%ebx,%edi
+
+	leal	3873151461(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	60(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	530742520(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	8(%esi),%ebp
+	movl	%edx,%edi
+
+	leal	3299628645(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+
+
+
+	xorl	%edx,%edi
+	orl	%ebx,%edi
+	leal	4096336452(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	28(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+
+	orl	%eax,%edi
+	leal	1126891415(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	56(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+
+	orl	%edx,%edi
+	leal	2878612391(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	20(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+
+	orl	%ecx,%edi
+	leal	4237533241(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	48(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+
+	orl	%ebx,%edi
+	leal	1700485571(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	12(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+
+	orl	%eax,%edi
+	leal	2399980690(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	40(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+
+	orl	%edx,%edi
+	leal	4293915773(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	4(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+
+	orl	%ecx,%edi
+	leal	2240044497(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	32(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+
+	orl	%ebx,%edi
+	leal	1873313359(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	60(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+
+	orl	%eax,%edi
+	leal	4264355552(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	24(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+
+	orl	%edx,%edi
+	leal	2734768916(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	52(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+
+	orl	%ecx,%edi
+	leal	1309151649(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	16(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+
+	orl	%ebx,%edi
+	leal	4149444226(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	44(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+
+	orl	%eax,%edi
+	leal	3174756917(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	8(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+
+	orl	%edx,%edi
+	leal	718787259(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	36(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+
+	orl	%ecx,%edi
+	leal	3951481745(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	24(%esp),%ebp
+	addl	%edi,%ebx
+	addl	$64,%esi
+	roll	$21,%ebx
+	movl	(%ebp),%edi
+	addl	%ecx,%ebx
+	addl	%edi,%eax
+	movl	4(%ebp),%edi
+	addl	%edi,%ebx
+	movl	8(%ebp),%edi
+	addl	%edi,%ecx
+	movl	12(%ebp),%edi
+	addl	%edi,%edx
+	movl	%eax,(%ebp)
+	movl	%ebx,4(%ebp)
+	movl	(%esp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%edx,12(%ebp)
+	cmpl	%esi,%edi
+	jae	.L000start
+	popl	%eax
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.size	md5_block_asm_data_order,.-.L_md5_block_asm_data_order_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S b/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S
new file mode 100644
index 0000000..2872088
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/modes/ghash-x86.S
@@ -0,0 +1,1274 @@
+#if defined(__i386__)
+.file	"ghash-x86.S"
+.text
+.globl	gcm_gmult_4bit_x86
+.hidden	gcm_gmult_4bit_x86
+.type	gcm_gmult_4bit_x86,@function
+.align	16
+gcm_gmult_4bit_x86:
+.L_gcm_gmult_4bit_x86_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	subl	$84,%esp
+	movl	104(%esp),%edi
+	movl	108(%esp),%esi
+	movl	(%edi),%ebp
+	movl	4(%edi),%edx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%ebx
+	movl	$0,16(%esp)
+	movl	$471859200,20(%esp)
+	movl	$943718400,24(%esp)
+	movl	$610271232,28(%esp)
+	movl	$1887436800,32(%esp)
+	movl	$1822425088,36(%esp)
+	movl	$1220542464,40(%esp)
+	movl	$1423966208,44(%esp)
+	movl	$3774873600,48(%esp)
+	movl	$4246732800,52(%esp)
+	movl	$3644850176,56(%esp)
+	movl	$3311403008,60(%esp)
+	movl	$2441084928,64(%esp)
+	movl	$2376073216,68(%esp)
+	movl	$2847932416,72(%esp)
+	movl	$3051356160,76(%esp)
+	movl	%ebp,(%esp)
+	movl	%edx,4(%esp)
+	movl	%ecx,8(%esp)
+	movl	%ebx,12(%esp)
+	shrl	$20,%ebx
+	andl	$240,%ebx
+	movl	4(%esi,%ebx,1),%ebp
+	movl	(%esi,%ebx,1),%edx
+	movl	12(%esi,%ebx,1),%ecx
+	movl	8(%esi,%ebx,1),%ebx
+	xorl	%eax,%eax
+	movl	$15,%edi
+	jmp	.L000x86_loop
+.align	16
+.L000x86_loop:
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	andb	$240,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	decl	%edi
+	js	.L001x86_break
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	shlb	$4,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	jmp	.L000x86_loop
+.align	16
+.L001x86_break:
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	bswap	%ebp
+	movl	104(%esp),%edi
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,4(%edi)
+	movl	%ebp,(%edi)
+	addl	$84,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	gcm_gmult_4bit_x86,.-.L_gcm_gmult_4bit_x86_begin
+.globl	gcm_ghash_4bit_x86
+.hidden	gcm_ghash_4bit_x86
+.type	gcm_ghash_4bit_x86,@function
+.align	16
+gcm_ghash_4bit_x86:
+.L_gcm_ghash_4bit_x86_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	subl	$84,%esp
+	movl	104(%esp),%ebx
+	movl	108(%esp),%esi
+	movl	112(%esp),%edi
+	movl	116(%esp),%ecx
+	addl	%edi,%ecx
+	movl	%ecx,116(%esp)
+	movl	(%ebx),%ebp
+	movl	4(%ebx),%edx
+	movl	8(%ebx),%ecx
+	movl	12(%ebx),%ebx
+	movl	$0,16(%esp)
+	movl	$471859200,20(%esp)
+	movl	$943718400,24(%esp)
+	movl	$610271232,28(%esp)
+	movl	$1887436800,32(%esp)
+	movl	$1822425088,36(%esp)
+	movl	$1220542464,40(%esp)
+	movl	$1423966208,44(%esp)
+	movl	$3774873600,48(%esp)
+	movl	$4246732800,52(%esp)
+	movl	$3644850176,56(%esp)
+	movl	$3311403008,60(%esp)
+	movl	$2441084928,64(%esp)
+	movl	$2376073216,68(%esp)
+	movl	$2847932416,72(%esp)
+	movl	$3051356160,76(%esp)
+.align	16
+.L002x86_outer_loop:
+	xorl	12(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	4(%edi),%edx
+	xorl	(%edi),%ebp
+	movl	%ebx,12(%esp)
+	movl	%ecx,8(%esp)
+	movl	%edx,4(%esp)
+	movl	%ebp,(%esp)
+	shrl	$20,%ebx
+	andl	$240,%ebx
+	movl	4(%esi,%ebx,1),%ebp
+	movl	(%esi,%ebx,1),%edx
+	movl	12(%esi,%ebx,1),%ecx
+	movl	8(%esi,%ebx,1),%ebx
+	xorl	%eax,%eax
+	movl	$15,%edi
+	jmp	.L003x86_loop
+.align	16
+.L003x86_loop:
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	andb	$240,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	decl	%edi
+	js	.L004x86_break
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	shlb	$4,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	jmp	.L003x86_loop
+.align	16
+.L004x86_break:
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	bswap	%ebp
+	movl	112(%esp),%edi
+	leal	16(%edi),%edi
+	cmpl	116(%esp),%edi
+	movl	%edi,112(%esp)
+	jb	.L002x86_outer_loop
+	movl	104(%esp),%edi
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,4(%edi)
+	movl	%ebp,(%edi)
+	addl	$84,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	gcm_ghash_4bit_x86,.-.L_gcm_ghash_4bit_x86_begin
+.globl	gcm_gmult_4bit_mmx
+.hidden	gcm_gmult_4bit_mmx
+.type	gcm_gmult_4bit_mmx,@function
+.align	16
+gcm_gmult_4bit_mmx:
+.L_gcm_gmult_4bit_mmx_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	call	.L005pic_point
+.L005pic_point:
+	popl	%eax
+	leal	.Lrem_4bit-.L005pic_point(%eax),%eax
+	movzbl	15(%edi),%ebx
+	xorl	%ecx,%ecx
+	movl	%ebx,%edx
+	movb	%dl,%cl
+	movl	$14,%ebp
+	shlb	$4,%cl
+	andl	$240,%edx
+	movq	8(%esi,%ecx,1),%mm0
+	movq	(%esi,%ecx,1),%mm1
+	movd	%mm0,%ebx
+	jmp	.L006mmx_loop
+.align	16
+.L006mmx_loop:
+	psrlq	$4,%mm0
+	andl	$15,%ebx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%edx,1),%mm0
+	movb	(%edi,%ebp,1),%cl
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	decl	%ebp
+	movd	%mm0,%ebx
+	pxor	(%esi,%edx,1),%mm1
+	movl	%ecx,%edx
+	pxor	%mm2,%mm0
+	js	.L007mmx_break
+	shlb	$4,%cl
+	andl	$15,%ebx
+	psrlq	$4,%mm0
+	andl	$240,%edx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%ecx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%ecx,1),%mm1
+	pxor	%mm2,%mm0
+	jmp	.L006mmx_loop
+.align	16
+.L007mmx_break:
+	shlb	$4,%cl
+	andl	$15,%ebx
+	psrlq	$4,%mm0
+	andl	$240,%edx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%ecx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%ecx,1),%mm1
+	pxor	%mm2,%mm0
+	psrlq	$4,%mm0
+	andl	$15,%ebx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%edx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%edx,1),%mm1
+	pxor	%mm2,%mm0
+	psrlq	$32,%mm0
+	movd	%mm1,%edx
+	psrlq	$32,%mm1
+	movd	%mm0,%ecx
+	movd	%mm1,%ebp
+	bswap	%ebx
+	bswap	%edx
+	bswap	%ecx
+	bswap	%ebp
+	emms
+	movl	%ebx,12(%edi)
+	movl	%edx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%ebp,(%edi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	gcm_gmult_4bit_mmx,.-.L_gcm_gmult_4bit_mmx_begin
+.globl	gcm_ghash_4bit_mmx
+.hidden	gcm_ghash_4bit_mmx
+.type	gcm_ghash_4bit_mmx,@function
+.align	16
+gcm_ghash_4bit_mmx:
+.L_gcm_ghash_4bit_mmx_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%eax
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ecx
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	call	.L008pic_point
+.L008pic_point:
+	popl	%esi
+	leal	.Lrem_8bit-.L008pic_point(%esi),%esi
+	subl	$544,%esp
+	andl	$-64,%esp
+	subl	$16,%esp
+	addl	%ecx,%edx
+	movl	%eax,544(%esp)
+	movl	%edx,552(%esp)
+	movl	%ebp,556(%esp)
+	addl	$128,%ebx
+	leal	144(%esp),%edi
+	leal	400(%esp),%ebp
+	movl	-120(%ebx),%edx
+	movq	-120(%ebx),%mm0
+	movq	-128(%ebx),%mm3
+	shll	$4,%edx
+	movb	%dl,(%esp)
+	movl	-104(%ebx),%edx
+	movq	-104(%ebx),%mm2
+	movq	-112(%ebx),%mm5
+	movq	%mm0,-128(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,(%edi)
+	movq	%mm3,%mm7
+	psrlq	$4,%mm3
+	shll	$4,%edx
+	movb	%dl,1(%esp)
+	movl	-88(%ebx),%edx
+	movq	-88(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	-96(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-120(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,8(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-128(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,(%ebp)
+	shll	$4,%edx
+	movb	%dl,2(%esp)
+	movl	-72(%ebx),%edx
+	movq	-72(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	-80(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-112(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,16(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-120(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,8(%ebp)
+	shll	$4,%edx
+	movb	%dl,3(%esp)
+	movl	-56(%ebx),%edx
+	movq	-56(%ebx),%mm2
+	psllq	$60,%mm7
+	movq	-64(%ebx),%mm5
+	por	%mm7,%mm1
+	movq	%mm0,-104(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,24(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-112(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,16(%ebp)
+	shll	$4,%edx
+	movb	%dl,4(%esp)
+	movl	-40(%ebx),%edx
+	movq	-40(%ebx),%mm1
+	psllq	$60,%mm6
+	movq	-48(%ebx),%mm4
+	por	%mm6,%mm0
+	movq	%mm2,-96(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,32(%edi)
+	movq	%mm5,%mm7
+	movq	%mm0,-104(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,24(%ebp)
+	shll	$4,%edx
+	movb	%dl,5(%esp)
+	movl	-24(%ebx),%edx
+	movq	-24(%ebx),%mm0
+	psllq	$60,%mm7
+	movq	-32(%ebx),%mm3
+	por	%mm7,%mm2
+	movq	%mm1,-88(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,40(%edi)
+	movq	%mm4,%mm6
+	movq	%mm2,-96(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,32(%ebp)
+	shll	$4,%edx
+	movb	%dl,6(%esp)
+	movl	-8(%ebx),%edx
+	movq	-8(%ebx),%mm2
+	psllq	$60,%mm6
+	movq	-16(%ebx),%mm5
+	por	%mm6,%mm1
+	movq	%mm0,-80(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,48(%edi)
+	movq	%mm3,%mm7
+	movq	%mm1,-88(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,40(%ebp)
+	shll	$4,%edx
+	movb	%dl,7(%esp)
+	movl	8(%ebx),%edx
+	movq	8(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-72(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,56(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-80(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,48(%ebp)
+	shll	$4,%edx
+	movb	%dl,8(%esp)
+	movl	24(%ebx),%edx
+	movq	24(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	16(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-64(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,64(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-72(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,56(%ebp)
+	shll	$4,%edx
+	movb	%dl,9(%esp)
+	movl	40(%ebx),%edx
+	movq	40(%ebx),%mm2
+	psllq	$60,%mm7
+	movq	32(%ebx),%mm5
+	por	%mm7,%mm1
+	movq	%mm0,-56(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,72(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-64(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,64(%ebp)
+	shll	$4,%edx
+	movb	%dl,10(%esp)
+	movl	56(%ebx),%edx
+	movq	56(%ebx),%mm1
+	psllq	$60,%mm6
+	movq	48(%ebx),%mm4
+	por	%mm6,%mm0
+	movq	%mm2,-48(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,80(%edi)
+	movq	%mm5,%mm7
+	movq	%mm0,-56(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,72(%ebp)
+	shll	$4,%edx
+	movb	%dl,11(%esp)
+	movl	72(%ebx),%edx
+	movq	72(%ebx),%mm0
+	psllq	$60,%mm7
+	movq	64(%ebx),%mm3
+	por	%mm7,%mm2
+	movq	%mm1,-40(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,88(%edi)
+	movq	%mm4,%mm6
+	movq	%mm2,-48(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,80(%ebp)
+	shll	$4,%edx
+	movb	%dl,12(%esp)
+	movl	88(%ebx),%edx
+	movq	88(%ebx),%mm2
+	psllq	$60,%mm6
+	movq	80(%ebx),%mm5
+	por	%mm6,%mm1
+	movq	%mm0,-32(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,96(%edi)
+	movq	%mm3,%mm7
+	movq	%mm1,-40(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,88(%ebp)
+	shll	$4,%edx
+	movb	%dl,13(%esp)
+	movl	104(%ebx),%edx
+	movq	104(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	96(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-24(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,104(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-32(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,96(%ebp)
+	shll	$4,%edx
+	movb	%dl,14(%esp)
+	movl	120(%ebx),%edx
+	movq	120(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	112(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-16(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,112(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-24(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,104(%ebp)
+	shll	$4,%edx
+	movb	%dl,15(%esp)
+	psllq	$60,%mm7
+	por	%mm7,%mm1
+	movq	%mm0,-8(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,120(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-16(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,112(%ebp)
+	psllq	$60,%mm6
+	por	%mm6,%mm0
+	movq	%mm0,-8(%ebp)
+	movq	%mm3,120(%ebp)
+	movq	(%eax),%mm6
+	movl	8(%eax),%ebx
+	movl	12(%eax),%edx
+.align	16
+.L009outer:
+	xorl	12(%ecx),%edx
+	xorl	8(%ecx),%ebx
+	pxor	(%ecx),%mm6
+	leal	16(%ecx),%ecx
+	movl	%ebx,536(%esp)
+	movq	%mm6,528(%esp)
+	movl	%ecx,548(%esp)
+	xorl	%eax,%eax
+	roll	$8,%edx
+	movb	%dl,%al
+	movl	%eax,%ebp
+	andb	$15,%al
+	shrl	$4,%ebp
+	pxor	%mm0,%mm0
+	roll	$8,%edx
+	pxor	%mm1,%mm1
+	pxor	%mm2,%mm2
+	movq	16(%esp,%eax,8),%mm7
+	movq	144(%esp,%eax,8),%mm6
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	shrl	$4,%edi
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	536(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	532(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	528(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	524(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	pxor	144(%esp,%eax,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	movzbl	%bl,%ebx
+	pxor	%mm2,%mm2
+	psllq	$4,%mm1
+	movd	%mm7,%ecx
+	psrlq	$4,%mm7
+	movq	%mm6,%mm3
+	psrlq	$4,%mm6
+	shll	$4,%ecx
+	pxor	16(%esp,%edi,8),%mm7
+	psllq	$60,%mm3
+	movzbl	%cl,%ecx
+	pxor	%mm3,%mm7
+	pxor	144(%esp,%edi,8),%mm6
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	%mm1,%mm6
+	movd	%mm7,%edx
+	pinsrw	$3,(%esi,%ecx,2),%mm2
+	psllq	$12,%mm0
+	pxor	%mm0,%mm6
+	psrlq	$32,%mm7
+	pxor	%mm2,%mm6
+	movl	548(%esp),%ecx
+	movd	%mm7,%ebx
+	movq	%mm6,%mm3
+	psllw	$8,%mm6
+	psrlw	$8,%mm3
+	por	%mm3,%mm6
+	bswap	%edx
+	pshufw	$27,%mm6,%mm6
+	bswap	%ebx
+	cmpl	552(%esp),%ecx
+	jne	.L009outer
+	movl	544(%esp),%eax
+	movl	%edx,12(%eax)
+	movl	%ebx,8(%eax)
+	movq	%mm6,(%eax)
+	movl	556(%esp),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	gcm_ghash_4bit_mmx,.-.L_gcm_ghash_4bit_mmx_begin
+.globl	gcm_init_clmul
+.hidden	gcm_init_clmul
+.type	gcm_init_clmul,@function
+.align	16
+gcm_init_clmul:
+.L_gcm_init_clmul_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%eax
+	call	.L010pic
+.L010pic:
+	popl	%ecx
+	leal	.Lbswap-.L010pic(%ecx),%ecx
+	movdqu	(%eax),%xmm2
+	pshufd	$78,%xmm2,%xmm2
+	pshufd	$255,%xmm2,%xmm4
+	movdqa	%xmm2,%xmm3
+	psllq	$1,%xmm2
+	pxor	%xmm5,%xmm5
+	psrlq	$63,%xmm3
+	pcmpgtd	%xmm4,%xmm5
+	pslldq	$8,%xmm3
+	por	%xmm3,%xmm2
+	pand	16(%ecx),%xmm5
+	pxor	%xmm5,%xmm2
+	movdqa	%xmm2,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pshufd	$78,%xmm2,%xmm4
+	pxor	%xmm0,%xmm3
+	pxor	%xmm2,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm2,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm2,%xmm3
+	movdqu	%xmm2,(%edx)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,16(%edx)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,32(%edx)
+	ret
+.size	gcm_init_clmul,.-.L_gcm_init_clmul_begin
+.globl	gcm_gmult_clmul
+.hidden	gcm_gmult_clmul
+.type	gcm_gmult_clmul,@function
+.align	16
+gcm_gmult_clmul:
+.L_gcm_gmult_clmul_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	call	.L011pic
+.L011pic:
+	popl	%ecx
+	leal	.Lbswap-.L011pic(%ecx),%ecx
+	movdqu	(%eax),%xmm0
+	movdqa	(%ecx),%xmm5
+	movups	(%edx),%xmm2
+.byte	102,15,56,0,197
+	movups	32(%edx),%xmm4
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%eax)
+	ret
+.size	gcm_gmult_clmul,.-.L_gcm_gmult_clmul_begin
+.globl	gcm_ghash_clmul
+.hidden	gcm_ghash_clmul
+.type	gcm_ghash_clmul,@function
+.align	16
+gcm_ghash_clmul:
+.L_gcm_ghash_clmul_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%eax
+	movl	24(%esp),%edx
+	movl	28(%esp),%esi
+	movl	32(%esp),%ebx
+	call	.L012pic
+.L012pic:
+	popl	%ecx
+	leal	.Lbswap-.L012pic(%ecx),%ecx
+	movdqu	(%eax),%xmm0
+	movdqa	(%ecx),%xmm5
+	movdqu	(%edx),%xmm2
+.byte	102,15,56,0,197
+	subl	$16,%ebx
+	jz	.L013odd_tail
+	movdqu	(%esi),%xmm3
+	movdqu	16(%esi),%xmm6
+.byte	102,15,56,0,221
+.byte	102,15,56,0,245
+	movdqu	32(%edx),%xmm5
+	pxor	%xmm3,%xmm0
+	pshufd	$78,%xmm6,%xmm3
+	movdqa	%xmm6,%xmm7
+	pxor	%xmm6,%xmm3
+	leal	32(%esi),%esi
+.byte	102,15,58,68,242,0
+.byte	102,15,58,68,250,17
+.byte	102,15,58,68,221,0
+	movups	16(%edx),%xmm2
+	nop
+	subl	$32,%ebx
+	jbe	.L014even_tail
+	jmp	.L015mod_loop
+.align	32
+.L015mod_loop:
+	pshufd	$78,%xmm0,%xmm4
+	movdqa	%xmm0,%xmm1
+	pxor	%xmm0,%xmm4
+	nop
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,229,16
+	movups	(%edx),%xmm2
+	xorps	%xmm6,%xmm0
+	movdqa	(%ecx),%xmm5
+	xorps	%xmm7,%xmm1
+	movdqu	(%esi),%xmm7
+	pxor	%xmm0,%xmm3
+	movdqu	16(%esi),%xmm6
+	pxor	%xmm1,%xmm3
+.byte	102,15,56,0,253
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm4,%xmm3
+	psrldq	$8,%xmm4
+	pslldq	$8,%xmm3
+	pxor	%xmm4,%xmm1
+	pxor	%xmm3,%xmm0
+.byte	102,15,56,0,245
+	pxor	%xmm7,%xmm1
+	movdqa	%xmm6,%xmm7
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+.byte	102,15,58,68,242,0
+	movups	32(%edx),%xmm5
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	pshufd	$78,%xmm7,%xmm3
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm7,%xmm3
+	pxor	%xmm4,%xmm1
+.byte	102,15,58,68,250,17
+	movups	16(%edx),%xmm2
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,58,68,221,0
+	leal	32(%esi),%esi
+	subl	$32,%ebx
+	ja	.L015mod_loop
+.L014even_tail:
+	pshufd	$78,%xmm0,%xmm4
+	movdqa	%xmm0,%xmm1
+	pxor	%xmm0,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,229,16
+	movdqa	(%ecx),%xmm5
+	xorps	%xmm6,%xmm0
+	xorps	%xmm7,%xmm1
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm4,%xmm3
+	psrldq	$8,%xmm4
+	pslldq	$8,%xmm3
+	pxor	%xmm4,%xmm1
+	pxor	%xmm3,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	testl	%ebx,%ebx
+	jnz	.L016done
+	movups	(%edx),%xmm2
+.L013odd_tail:
+	movdqu	(%esi),%xmm3
+.byte	102,15,56,0,221
+	pxor	%xmm3,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pshufd	$78,%xmm2,%xmm4
+	pxor	%xmm0,%xmm3
+	pxor	%xmm2,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.L016done:
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%eax)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	gcm_ghash_clmul,.-.L_gcm_ghash_clmul_begin
+.align	64
+.Lbswap:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.byte	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194
+.align	64
+.Lrem_8bit:
+.value	0,450,900,582,1800,1738,1164,1358
+.value	3600,4050,3476,3158,2328,2266,2716,2910
+.value	7200,7650,8100,7782,6952,6890,6316,6510
+.value	4656,5106,4532,4214,5432,5370,5820,6014
+.value	14400,14722,15300,14854,16200,16010,15564,15630
+.value	13904,14226,13780,13334,12632,12442,13020,13086
+.value	9312,9634,10212,9766,9064,8874,8428,8494
+.value	10864,11186,10740,10294,11640,11450,12028,12094
+.value	28800,28994,29444,29382,30600,30282,29708,30158
+.value	32400,32594,32020,31958,31128,30810,31260,31710
+.value	27808,28002,28452,28390,27560,27242,26668,27118
+.value	25264,25458,24884,24822,26040,25722,26172,26622
+.value	18624,18690,19268,19078,20424,19978,19532,19854
+.value	18128,18194,17748,17558,16856,16410,16988,17310
+.value	21728,21794,22372,22182,21480,21034,20588,20910
+.value	23280,23346,22900,22710,24056,23610,24188,24510
+.value	57600,57538,57988,58182,58888,59338,58764,58446
+.value	61200,61138,60564,60758,59416,59866,60316,59998
+.value	64800,64738,65188,65382,64040,64490,63916,63598
+.value	62256,62194,61620,61814,62520,62970,63420,63102
+.value	55616,55426,56004,56070,56904,57226,56780,56334
+.value	55120,54930,54484,54550,53336,53658,54236,53790
+.value	50528,50338,50916,50982,49768,50090,49644,49198
+.value	52080,51890,51444,51510,52344,52666,53244,52798
+.value	37248,36930,37380,37830,38536,38730,38156,38094
+.value	40848,40530,39956,40406,39064,39258,39708,39646
+.value	36256,35938,36388,36838,35496,35690,35116,35054
+.value	33712,33394,32820,33270,33976,34170,34620,34558
+.value	43456,43010,43588,43910,44744,44810,44364,44174
+.value	42960,42514,42068,42390,41176,41242,41820,41630
+.value	46560,46114,46692,47014,45800,45866,45420,45230
+.value	48112,47666,47220,47542,48376,48442,49020,48830
+.align	64
+.Lrem_4bit:
+.long	0,0,0,471859200,0,943718400,0,610271232
+.long	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+.long	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+.long	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+.byte	71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67
+.byte	82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112
+.byte	112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62
+.byte	0
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S b/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S
new file mode 100644
index 0000000..a5cce47
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/rc4/rc4-586.S
@@ -0,0 +1,385 @@
+#if defined(__i386__)
+.file	"rc4-586.S"
+.text
+.globl	asm_RC4
+.hidden	asm_RC4
+.type	asm_RC4,@function
+.align	16
+asm_RC4:
+.L_asm_RC4_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%edx
+	movl	28(%esp),%esi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	xorl	%ebx,%ebx
+	cmpl	$0,%edx
+	je	.L000abort
+	movb	(%edi),%al
+	movb	4(%edi),%bl
+	addl	$8,%edi
+	leal	(%esi,%edx,1),%ecx
+	subl	%esi,%ebp
+	movl	%ecx,24(%esp)
+	incb	%al
+	cmpl	$-1,256(%edi)
+	je	.L001RC4_CHAR
+	movl	(%edi,%eax,4),%ecx
+	andl	$-4,%edx
+	jz	.L002loop1
+	movl	%ebp,32(%esp)
+	testl	$-8,%edx
+	jz	.L003go4loop4
+	call	.L004PIC_me_up
+.L004PIC_me_up:
+	popl	%ebp
+	leal	OPENSSL_ia32cap_P-.L004PIC_me_up(%ebp),%ebp
+	btl	$26,(%ebp)
+	jnc	.L003go4loop4
+	movl	32(%esp),%ebp
+	andl	$-8,%edx
+	leal	-8(%esi,%edx,1),%edx
+	movl	%edx,-4(%edi)
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	movq	(%esi),%mm0
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm2
+	jmp	.L005loop_mmx_enter
+.align	16
+.L006loop_mmx:
+	addb	%cl,%bl
+	psllq	$56,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movq	(%esi),%mm0
+	movq	%mm2,-8(%ebp,%esi,1)
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm2
+.L005loop_mmx_enter:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm0,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$8,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$16,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$24,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$32,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$40,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$48,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	movl	%ebx,%edx
+	xorl	%ebx,%ebx
+	movb	%dl,%bl
+	cmpl	-4(%edi),%esi
+	leal	8(%esi),%esi
+	jb	.L006loop_mmx
+	psllq	$56,%mm1
+	pxor	%mm1,%mm2
+	movq	%mm2,-8(%ebp,%esi,1)
+	emms
+	cmpl	24(%esp),%esi
+	je	.L007done
+	jmp	.L002loop1
+.align	16
+.L003go4loop4:
+	leal	-4(%esi,%edx,1),%edx
+	movl	%edx,28(%esp)
+.L008loop4:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	movl	(%edi,%eax,4),%ecx
+	movl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	(%edi,%eax,4),%ecx
+	orl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	(%edi,%eax,4),%ecx
+	orl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	32(%esp),%ecx
+	orl	(%edi,%edx,4),%ebp
+	rorl	$8,%ebp
+	xorl	(%esi),%ebp
+	cmpl	28(%esp),%esi
+	movl	%ebp,(%ecx,%esi,1)
+	leal	4(%esi),%esi
+	movl	(%edi,%eax,4),%ecx
+	jb	.L008loop4
+	cmpl	24(%esp),%esi
+	je	.L007done
+	movl	32(%esp),%ebp
+.align	16
+.L002loop1:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	movl	(%edi,%edx,4),%edx
+	xorb	(%esi),%dl
+	leal	1(%esi),%esi
+	movl	(%edi,%eax,4),%ecx
+	cmpl	24(%esp),%esi
+	movb	%dl,-1(%ebp,%esi,1)
+	jb	.L002loop1
+	jmp	.L007done
+.align	16
+.L001RC4_CHAR:
+	movzbl	(%edi,%eax,1),%ecx
+.L009cloop1:
+	addb	%cl,%bl
+	movzbl	(%edi,%ebx,1),%edx
+	movb	%cl,(%edi,%ebx,1)
+	movb	%dl,(%edi,%eax,1)
+	addb	%cl,%dl
+	movzbl	(%edi,%edx,1),%edx
+	addb	$1,%al
+	xorb	(%esi),%dl
+	leal	1(%esi),%esi
+	movzbl	(%edi,%eax,1),%ecx
+	cmpl	24(%esp),%esi
+	movb	%dl,-1(%ebp,%esi,1)
+	jb	.L009cloop1
+.L007done:
+	decb	%al
+	movl	%ebx,-4(%edi)
+	movb	%al,-8(%edi)
+.L000abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_RC4,.-.L_asm_RC4_begin
+.globl	asm_RC4_set_key
+.hidden	asm_RC4_set_key
+.type	asm_RC4_set_key,@function
+.align	16
+asm_RC4_set_key:
+.L_asm_RC4_set_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebp
+	movl	28(%esp),%esi
+	call	.L010PIC_me_up
+.L010PIC_me_up:
+	popl	%edx
+	leal	OPENSSL_ia32cap_P-.L010PIC_me_up(%edx),%edx
+	leal	8(%edi),%edi
+	leal	(%esi,%ebp,1),%esi
+	negl	%ebp
+	xorl	%eax,%eax
+	movl	%ebp,-4(%edi)
+	btl	$20,(%edx)
+	jc	.L011c1stloop
+.align	16
+.L012w1stloop:
+	movl	%eax,(%edi,%eax,4)
+	addb	$1,%al
+	jnc	.L012w1stloop
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+.align	16
+.L013w2ndloop:
+	movl	(%edi,%ecx,4),%eax
+	addb	(%esi,%ebp,1),%dl
+	addb	%al,%dl
+	addl	$1,%ebp
+	movl	(%edi,%edx,4),%ebx
+	jnz	.L014wnowrap
+	movl	-4(%edi),%ebp
+.L014wnowrap:
+	movl	%eax,(%edi,%edx,4)
+	movl	%ebx,(%edi,%ecx,4)
+	addb	$1,%cl
+	jnc	.L013w2ndloop
+	jmp	.L015exit
+.align	16
+.L011c1stloop:
+	movb	%al,(%edi,%eax,1)
+	addb	$1,%al
+	jnc	.L011c1stloop
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+	xorl	%ebx,%ebx
+.align	16
+.L016c2ndloop:
+	movb	(%edi,%ecx,1),%al
+	addb	(%esi,%ebp,1),%dl
+	addb	%al,%dl
+	addl	$1,%ebp
+	movb	(%edi,%edx,1),%bl
+	jnz	.L017cnowrap
+	movl	-4(%edi),%ebp
+.L017cnowrap:
+	movb	%al,(%edi,%edx,1)
+	movb	%bl,(%edi,%ecx,1)
+	addb	$1,%cl
+	jnc	.L016c2ndloop
+	movl	$-1,256(%edi)
+.L015exit:
+	xorl	%eax,%eax
+	movl	%eax,-8(%edi)
+	movl	%eax,-4(%edi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	asm_RC4_set_key,.-.L_asm_RC4_set_key_begin
+.globl	RC4_options
+.hidden	RC4_options
+.type	RC4_options,@function
+.align	16
+RC4_options:
+.L_RC4_options_begin:
+	call	.L018pic_point
+.L018pic_point:
+	popl	%eax
+	leal	.L019opts-.L018pic_point(%eax),%eax
+	call	.L020PIC_me_up
+.L020PIC_me_up:
+	popl	%edx
+	leal	OPENSSL_ia32cap_P-.L020PIC_me_up(%edx),%edx
+	movl	(%edx),%edx
+	btl	$20,%edx
+	jc	.L0211xchar
+	btl	$26,%edx
+	jnc	.L022ret
+	addl	$25,%eax
+	ret
+.L0211xchar:
+	addl	$12,%eax
+.L022ret:
+	ret
+.align	64
+.L019opts:
+.byte	114,99,52,40,52,120,44,105,110,116,41,0
+.byte	114,99,52,40,49,120,44,99,104,97,114,41,0
+.byte	114,99,52,40,56,120,44,109,109,120,41,0
+.byte	82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
+.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	64
+.size	RC4_options,.-.L_RC4_options_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S
new file mode 100644
index 0000000..808ccac
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/sha/sha1-586.S
@@ -0,0 +1,2799 @@
+#if defined(__i386__)
+.file	"sha1-586.S"
+.text
+.globl	sha1_block_data_order
+.hidden	sha1_block_data_order
+.type	sha1_block_data_order,@function
+.align	16
+sha1_block_data_order:
+.L_sha1_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	.L000pic_point
+.L000pic_point:
+	popl	%ebp
+	leal	OPENSSL_ia32cap_P-.L000pic_point(%ebp),%esi
+	leal	.LK_XX_XX-.L000pic_point(%ebp),%ebp
+	movl	(%esi),%eax
+	movl	4(%esi),%edx
+	testl	$512,%edx
+	jz	.L001x86
+	movl	8(%esi),%ecx
+	testl	$16777216,%eax
+	jz	.L001x86
+	testl	$536870912,%ecx
+	jnz	.Lshaext_shortcut
+	jmp	.Lssse3_shortcut
+.align	16
+.L001x86:
+	movl	20(%esp),%ebp
+	movl	24(%esp),%esi
+	movl	28(%esp),%eax
+	subl	$76,%esp
+	shll	$6,%eax
+	addl	%esi,%eax
+	movl	%eax,104(%esp)
+	movl	16(%ebp),%edi
+	jmp	.L002loop
+.align	16
+.L002loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movl	%ecx,8(%esp)
+	movl	%edx,12(%esp)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,16(%esp)
+	movl	%ebx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%edx,28(%esp)
+	movl	32(%esi),%eax
+	movl	36(%esi),%ebx
+	movl	40(%esi),%ecx
+	movl	44(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edx,44(%esp)
+	movl	48(%esi),%eax
+	movl	52(%esi),%ebx
+	movl	56(%esi),%ecx
+	movl	60(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,48(%esp)
+	movl	%ebx,52(%esp)
+	movl	%ecx,56(%esp)
+	movl	%edx,60(%esp)
+	movl	%esi,100(%esp)
+	movl	(%ebp),%eax
+	movl	4(%ebp),%ebx
+	movl	8(%ebp),%ecx
+	movl	12(%ebp),%edx
+
+	movl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	4(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	8(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	12(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	addl	%ecx,%ebp
+
+	movl	%edi,%ebx
+	movl	%ebp,%ecx
+	roll	$5,%ebp
+	xorl	%esi,%ebx
+	addl	%eax,%ebp
+	movl	16(%esp),%eax
+	andl	%edx,%ebx
+	rorl	$2,%edx
+	xorl	%esi,%ebx
+	leal	1518500249(%ebp,%eax,1),%ebp
+	addl	%ebx,%ebp
+
+	movl	%edx,%eax
+	movl	%ebp,%ebx
+	roll	$5,%ebp
+	xorl	%edi,%eax
+	addl	%esi,%ebp
+	movl	20(%esp),%esi
+	andl	%ecx,%eax
+	rorl	$2,%ecx
+	xorl	%edi,%eax
+	leal	1518500249(%ebp,%esi,1),%ebp
+	addl	%eax,%ebp
+
+	movl	%ecx,%esi
+	movl	%ebp,%eax
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	24(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	28(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	32(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	36(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	addl	%ecx,%ebp
+
+	movl	%edi,%ebx
+	movl	%ebp,%ecx
+	roll	$5,%ebp
+	xorl	%esi,%ebx
+	addl	%eax,%ebp
+	movl	40(%esp),%eax
+	andl	%edx,%ebx
+	rorl	$2,%edx
+	xorl	%esi,%ebx
+	leal	1518500249(%ebp,%eax,1),%ebp
+	addl	%ebx,%ebp
+
+	movl	%edx,%eax
+	movl	%ebp,%ebx
+	roll	$5,%ebp
+	xorl	%edi,%eax
+	addl	%esi,%ebp
+	movl	44(%esp),%esi
+	andl	%ecx,%eax
+	rorl	$2,%ecx
+	xorl	%edi,%eax
+	leal	1518500249(%ebp,%esi,1),%ebp
+	addl	%eax,%ebp
+
+	movl	%ecx,%esi
+	movl	%ebp,%eax
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	48(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	52(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	56(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	60(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	movl	(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edi,%ebp
+	xorl	8(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	32(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	52(%esp),%ebx
+	roll	$1,%ebx
+	xorl	%esi,%ebp
+	addl	%ebp,%eax
+	movl	%ecx,%ebp
+	rorl	$2,%edx
+	movl	%ebx,(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%ebx,%eax,1),%ebx
+	movl	4(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%edx,%ebp
+	xorl	12(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	36(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	56(%esp),%eax
+	roll	$1,%eax
+	xorl	%edi,%ebp
+	addl	%ebp,%esi
+	movl	%ebx,%ebp
+	rorl	$2,%ecx
+	movl	%eax,4(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%eax,%esi,1),%eax
+	movl	8(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ecx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	40(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	60(%esp),%esi
+	roll	$1,%esi
+	xorl	%edx,%ebp
+	addl	%ebp,%edi
+	movl	%eax,%ebp
+	rorl	$2,%ebx
+	movl	%esi,8(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%esi,%edi,1),%esi
+	movl	12(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%ebx,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	44(%esp),%edi
+	andl	%eax,%ebp
+	xorl	(%esp),%edi
+	roll	$1,%edi
+	xorl	%ecx,%ebp
+	addl	%ebp,%edx
+	movl	%esi,%ebp
+	rorl	$2,%eax
+	movl	%edi,12(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%edi,%edx,1),%edi
+	movl	16(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	24(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,16(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	20(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,20(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	24(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,24(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	28(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	16(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,28(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	32(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	20(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,32(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	36(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,36(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	40(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	48(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,40(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	44(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,44(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	48(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,48(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	52(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	40(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,52(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	56(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	44(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,56(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	60(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,60(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	8(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	52(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	4(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	56(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,4(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	8(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	40(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	60(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,8(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	12(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	44(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,12(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	16(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	4(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,16(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	20(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	52(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	8(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,20(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	24(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	32(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	56(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	12(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,24(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	28(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	36(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	60(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	16(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,28(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	32(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edi,%ebp
+	xorl	40(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	20(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,32(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	36(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%edx,%ebp
+	xorl	44(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	4(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	24(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,36(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	40(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ecx,%ebp
+	xorl	48(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	8(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	28(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,40(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	44(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%ebx,%ebp
+	xorl	52(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	12(%esp),%edi
+	andl	%eax,%ebp
+	xorl	32(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,44(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	48(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%eax,%ebp
+	xorl	56(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	16(%esp),%edx
+	andl	%esi,%ebp
+	xorl	36(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,48(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	52(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%esi,%ebp
+	xorl	60(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	20(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	40(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,52(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	56(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edi,%ebp
+	xorl	(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	24(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	44(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,56(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	60(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%edx,%ebp
+	xorl	4(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	28(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	48(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,60(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ecx,%ebp
+	xorl	8(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	32(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	52(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	4(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%ebx,%ebp
+	xorl	12(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	36(%esp),%edi
+	andl	%eax,%ebp
+	xorl	56(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,4(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	8(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%eax,%ebp
+	xorl	16(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	40(%esp),%edx
+	andl	%esi,%ebp
+	xorl	60(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,8(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	12(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%esi,%ebp
+	xorl	20(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	44(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,12(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	16(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edi,%ebp
+	xorl	24(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	48(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	4(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,16(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	20(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%edx,%ebp
+	xorl	28(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	52(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	8(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,20(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	24(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ecx,%ebp
+	xorl	32(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	56(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	12(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,24(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	28(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%ebx,%ebp
+	xorl	36(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	60(%esp),%edi
+	andl	%eax,%ebp
+	xorl	16(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,28(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	32(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%eax,%ebp
+	xorl	40(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	(%esp),%edx
+	andl	%esi,%ebp
+	xorl	20(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,32(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	36(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%esi,%ebp
+	xorl	44(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	4(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	24(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,36(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	40(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edi,%ebp
+	xorl	48(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	8(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	28(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,40(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	44(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%edx,%ebp
+	xorl	52(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	12(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	32(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,44(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	48(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	56(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	36(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,48(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	52(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	60(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	40(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,52(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	56(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	24(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	44(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,56(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	60(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	4(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,60(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	8(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	4(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	12(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	56(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,4(%esp)
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	8(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	60(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,8(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	12(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,12(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	16(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	24(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,16(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	20(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,20(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	24(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,24(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	28(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	16(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,28(%esp)
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	32(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	20(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,32(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	36(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,36(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	40(%esp),%edx
+	addl	%ebp,%edi
+
+	movl	%esi,%ebp
+	xorl	48(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,40(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	44(%esp),%ecx
+	addl	%ebp,%edx
+
+	movl	%edi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,44(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	48(%esp),%ebx
+	addl	%ebp,%ecx
+
+	movl	%edx,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,48(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	52(%esp),%eax
+	addl	%ebp,%ebx
+
+	movl	%ecx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	40(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	56(%esp),%esi
+	addl	%ebp,%eax
+
+	movl	%ebx,%ebp
+	xorl	(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	44(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	60(%esp),%edi
+	addl	%ebp,%esi
+
+	movl	%eax,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%edi,%edx,1),%edi
+	addl	%ebp,%edi
+	movl	96(%esp),%ebp
+	movl	100(%esp),%edx
+	addl	(%ebp),%edi
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%eax
+	addl	12(%ebp),%ebx
+	addl	16(%ebp),%ecx
+	movl	%edi,(%ebp)
+	addl	$64,%edx
+	movl	%esi,4(%ebp)
+	cmpl	104(%esp),%edx
+	movl	%eax,8(%ebp)
+	movl	%ecx,%edi
+	movl	%ebx,12(%ebp)
+	movl	%edx,%esi
+	movl	%ecx,16(%ebp)
+	jb	.L002loop
+	addl	$76,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	sha1_block_data_order,.-.L_sha1_block_data_order_begin
+.hidden	_sha1_block_data_order_shaext
+.type	_sha1_block_data_order_shaext,@function
+.align	16
+_sha1_block_data_order_shaext:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	.L003pic_point
+.L003pic_point:
+	popl	%ebp
+	leal	.LK_XX_XX-.L003pic_point(%ebp),%ebp
+.Lshaext_shortcut:
+	movl	20(%esp),%edi
+	movl	%esp,%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%ecx
+	subl	$32,%esp
+	movdqu	(%edi),%xmm0
+	movd	16(%edi),%xmm1
+	andl	$-32,%esp
+	movdqa	80(%ebp),%xmm3
+	movdqu	(%esi),%xmm4
+	pshufd	$27,%xmm0,%xmm0
+	movdqu	16(%esi),%xmm5
+	pshufd	$27,%xmm1,%xmm1
+	movdqu	32(%esi),%xmm6
+.byte	102,15,56,0,227
+	movdqu	48(%esi),%xmm7
+.byte	102,15,56,0,235
+.byte	102,15,56,0,243
+.byte	102,15,56,0,251
+	jmp	.L004loop_shaext
+.align	16
+.L004loop_shaext:
+	decl	%ecx
+	leal	64(%esi),%eax
+	movdqa	%xmm1,(%esp)
+	paddd	%xmm4,%xmm1
+	cmovnel	%eax,%esi
+	movdqa	%xmm0,16(%esp)
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,0
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,0
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,1
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,1
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,2
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,2
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+	movdqu	(%esi),%xmm4
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,3
+.byte	15,56,200,213
+	movdqu	16(%esi),%xmm5
+.byte	102,15,56,0,227
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+.byte	15,56,200,206
+	movdqu	32(%esi),%xmm6
+.byte	102,15,56,0,235
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,3
+.byte	15,56,200,215
+	movdqu	48(%esi),%xmm7
+.byte	102,15,56,0,243
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+	movdqa	(%esp),%xmm2
+.byte	102,15,56,0,251
+.byte	15,56,200,202
+	paddd	16(%esp),%xmm0
+	jnz	.L004loop_shaext
+	pshufd	$27,%xmm0,%xmm0
+	pshufd	$27,%xmm1,%xmm1
+	movdqu	%xmm0,(%edi)
+	movd	%xmm1,16(%edi)
+	movl	%ebx,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	_sha1_block_data_order_shaext,.-_sha1_block_data_order_shaext
+.hidden	_sha1_block_data_order_ssse3
+.type	_sha1_block_data_order_ssse3,@function
+.align	16
+_sha1_block_data_order_ssse3:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	.L005pic_point
+.L005pic_point:
+	popl	%ebp
+	leal	.LK_XX_XX-.L005pic_point(%ebp),%ebp
+.Lssse3_shortcut:
+	movdqa	(%ebp),%xmm7
+	movdqa	16(%ebp),%xmm0
+	movdqa	32(%ebp),%xmm1
+	movdqa	48(%ebp),%xmm2
+	movdqa	64(%ebp),%xmm6
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebp
+	movl	28(%esp),%edx
+	movl	%esp,%esi
+	subl	$208,%esp
+	andl	$-64,%esp
+	movdqa	%xmm0,112(%esp)
+	movdqa	%xmm1,128(%esp)
+	movdqa	%xmm2,144(%esp)
+	shll	$6,%edx
+	movdqa	%xmm7,160(%esp)
+	addl	%ebp,%edx
+	movdqa	%xmm6,176(%esp)
+	addl	$64,%ebp
+	movl	%edi,192(%esp)
+	movl	%ebp,196(%esp)
+	movl	%edx,200(%esp)
+	movl	%esi,204(%esp)
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	16(%edi),%edi
+	movl	%ebx,%esi
+	movdqu	-64(%ebp),%xmm0
+	movdqu	-48(%ebp),%xmm1
+	movdqu	-32(%ebp),%xmm2
+	movdqu	-16(%ebp),%xmm3
+.byte	102,15,56,0,198
+.byte	102,15,56,0,206
+.byte	102,15,56,0,214
+	movdqa	%xmm7,96(%esp)
+.byte	102,15,56,0,222
+	paddd	%xmm7,%xmm0
+	paddd	%xmm7,%xmm1
+	paddd	%xmm7,%xmm2
+	movdqa	%xmm0,(%esp)
+	psubd	%xmm7,%xmm0
+	movdqa	%xmm1,16(%esp)
+	psubd	%xmm7,%xmm1
+	movdqa	%xmm2,32(%esp)
+	movl	%ecx,%ebp
+	psubd	%xmm7,%xmm2
+	xorl	%edx,%ebp
+	pshufd	$238,%xmm0,%xmm4
+	andl	%ebp,%esi
+	jmp	.L006loop
+.align	16
+.L006loop:
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	movl	%eax,%ebp
+	punpcklqdq	%xmm1,%xmm4
+	movdqa	%xmm3,%xmm6
+	addl	(%esp),%edi
+	xorl	%ecx,%ebx
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm0,64(%esp)
+	roll	$5,%eax
+	addl	%esi,%edi
+	psrldq	$4,%xmm6
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	pxor	%xmm0,%xmm4
+	addl	%eax,%edi
+	rorl	$7,%eax
+	pxor	%xmm2,%xmm6
+	xorl	%ecx,%ebp
+	movl	%edi,%esi
+	addl	4(%esp),%edx
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm7,48(%esp)
+	addl	%ebp,%edx
+	andl	%eax,%esi
+	movdqa	%xmm4,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	movdqa	%xmm4,%xmm6
+	xorl	%ebx,%esi
+	pslldq	$12,%xmm0
+	paddd	%xmm4,%xmm4
+	movl	%edx,%ebp
+	addl	8(%esp),%ecx
+	psrld	$31,%xmm6
+	xorl	%eax,%edi
+	roll	$5,%edx
+	movdqa	%xmm0,%xmm7
+	addl	%esi,%ecx
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	psrld	$30,%xmm0
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	por	%xmm6,%xmm4
+	xorl	%eax,%ebp
+	movl	%ecx,%esi
+	addl	12(%esp),%ebx
+	pslld	$2,%xmm7
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	pxor	%xmm0,%xmm4
+	movdqa	96(%esp),%xmm0
+	addl	%ebp,%ebx
+	andl	%edx,%esi
+	pxor	%xmm7,%xmm4
+	pshufd	$238,%xmm1,%xmm5
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	movl	%ebx,%ebp
+	punpcklqdq	%xmm2,%xmm5
+	movdqa	%xmm4,%xmm7
+	addl	16(%esp),%eax
+	xorl	%edx,%ecx
+	paddd	%xmm4,%xmm0
+	movdqa	%xmm1,80(%esp)
+	roll	$5,%ebx
+	addl	%esi,%eax
+	psrldq	$4,%xmm7
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	pxor	%xmm1,%xmm5
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	pxor	%xmm3,%xmm7
+	xorl	%edx,%ebp
+	movl	%eax,%esi
+	addl	20(%esp),%edi
+	pxor	%xmm7,%xmm5
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm0,(%esp)
+	addl	%ebp,%edi
+	andl	%ebx,%esi
+	movdqa	%xmm5,%xmm1
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	rorl	$7,%eax
+	movdqa	%xmm5,%xmm7
+	xorl	%ecx,%esi
+	pslldq	$12,%xmm1
+	paddd	%xmm5,%xmm5
+	movl	%edi,%ebp
+	addl	24(%esp),%edx
+	psrld	$31,%xmm7
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm1,%xmm0
+	addl	%esi,%edx
+	andl	%eax,%ebp
+	xorl	%ebx,%eax
+	psrld	$30,%xmm1
+	addl	%edi,%edx
+	rorl	$7,%edi
+	por	%xmm7,%xmm5
+	xorl	%ebx,%ebp
+	movl	%edx,%esi
+	addl	28(%esp),%ecx
+	pslld	$2,%xmm0
+	xorl	%eax,%edi
+	roll	$5,%edx
+	pxor	%xmm1,%xmm5
+	movdqa	112(%esp),%xmm1
+	addl	%ebp,%ecx
+	andl	%edi,%esi
+	pxor	%xmm0,%xmm5
+	pshufd	$238,%xmm2,%xmm6
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	xorl	%eax,%esi
+	movl	%ecx,%ebp
+	punpcklqdq	%xmm3,%xmm6
+	movdqa	%xmm5,%xmm0
+	addl	32(%esp),%ebx
+	xorl	%edi,%edx
+	paddd	%xmm5,%xmm1
+	movdqa	%xmm2,96(%esp)
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	psrldq	$4,%xmm0
+	andl	%edx,%ebp
+	xorl	%edi,%edx
+	pxor	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pxor	%xmm4,%xmm0
+	xorl	%edi,%ebp
+	movl	%ebx,%esi
+	addl	36(%esp),%eax
+	pxor	%xmm0,%xmm6
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm1,16(%esp)
+	addl	%ebp,%eax
+	andl	%ecx,%esi
+	movdqa	%xmm6,%xmm2
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	movdqa	%xmm6,%xmm0
+	xorl	%edx,%esi
+	pslldq	$12,%xmm2
+	paddd	%xmm6,%xmm6
+	movl	%eax,%ebp
+	addl	40(%esp),%edi
+	psrld	$31,%xmm0
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm1
+	addl	%esi,%edi
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	psrld	$30,%xmm2
+	addl	%eax,%edi
+	rorl	$7,%eax
+	por	%xmm0,%xmm6
+	xorl	%ecx,%ebp
+	movdqa	64(%esp),%xmm0
+	movl	%edi,%esi
+	addl	44(%esp),%edx
+	pslld	$2,%xmm1
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	pxor	%xmm2,%xmm6
+	movdqa	112(%esp),%xmm2
+	addl	%ebp,%edx
+	andl	%eax,%esi
+	pxor	%xmm1,%xmm6
+	pshufd	$238,%xmm3,%xmm7
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	xorl	%ebx,%esi
+	movl	%edx,%ebp
+	punpcklqdq	%xmm4,%xmm7
+	movdqa	%xmm6,%xmm1
+	addl	48(%esp),%ecx
+	xorl	%eax,%edi
+	paddd	%xmm6,%xmm2
+	movdqa	%xmm3,64(%esp)
+	roll	$5,%edx
+	addl	%esi,%ecx
+	psrldq	$4,%xmm1
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	pxor	%xmm3,%xmm7
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pxor	%xmm5,%xmm1
+	xorl	%eax,%ebp
+	movl	%ecx,%esi
+	addl	52(%esp),%ebx
+	pxor	%xmm1,%xmm7
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	movdqa	%xmm2,32(%esp)
+	addl	%ebp,%ebx
+	andl	%edx,%esi
+	movdqa	%xmm7,%xmm3
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	movdqa	%xmm7,%xmm1
+	xorl	%edi,%esi
+	pslldq	$12,%xmm3
+	paddd	%xmm7,%xmm7
+	movl	%ebx,%ebp
+	addl	56(%esp),%eax
+	psrld	$31,%xmm1
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm2
+	addl	%esi,%eax
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	psrld	$30,%xmm3
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	por	%xmm1,%xmm7
+	xorl	%edx,%ebp
+	movdqa	80(%esp),%xmm1
+	movl	%eax,%esi
+	addl	60(%esp),%edi
+	pslld	$2,%xmm2
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	pxor	%xmm3,%xmm7
+	movdqa	112(%esp),%xmm3
+	addl	%ebp,%edi
+	andl	%ebx,%esi
+	pxor	%xmm2,%xmm7
+	pshufd	$238,%xmm6,%xmm2
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	rorl	$7,%eax
+	pxor	%xmm4,%xmm0
+	punpcklqdq	%xmm7,%xmm2
+	xorl	%ecx,%esi
+	movl	%edi,%ebp
+	addl	(%esp),%edx
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm4,80(%esp)
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm3,%xmm4
+	addl	%esi,%edx
+	paddd	%xmm7,%xmm3
+	andl	%eax,%ebp
+	pxor	%xmm2,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	xorl	%ebx,%ebp
+	movdqa	%xmm0,%xmm2
+	movdqa	%xmm3,48(%esp)
+	movl	%edx,%esi
+	addl	4(%esp),%ecx
+	xorl	%eax,%edi
+	roll	$5,%edx
+	pslld	$2,%xmm0
+	addl	%ebp,%ecx
+	andl	%edi,%esi
+	psrld	$30,%xmm2
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	xorl	%eax,%esi
+	movl	%ecx,%ebp
+	addl	8(%esp),%ebx
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	por	%xmm2,%xmm0
+	addl	%esi,%ebx
+	andl	%edx,%ebp
+	movdqa	96(%esp),%xmm2
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	12(%esp),%eax
+	xorl	%edi,%ebp
+	movl	%ebx,%esi
+	pshufd	$238,%xmm7,%xmm3
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	16(%esp),%edi
+	pxor	%xmm5,%xmm1
+	punpcklqdq	%xmm0,%xmm3
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,96(%esp)
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	movdqa	%xmm4,%xmm5
+	rorl	$7,%ebx
+	paddd	%xmm0,%xmm4
+	addl	%eax,%edi
+	pxor	%xmm3,%xmm1
+	addl	20(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	movdqa	%xmm1,%xmm3
+	movdqa	%xmm4,(%esp)
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	pslld	$2,%xmm1
+	addl	24(%esp),%ecx
+	xorl	%eax,%esi
+	psrld	$30,%xmm3
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	por	%xmm3,%xmm1
+	addl	28(%esp),%ebx
+	xorl	%edi,%ebp
+	movdqa	64(%esp),%xmm3
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	pshufd	$238,%xmm0,%xmm4
+	addl	%ecx,%ebx
+	addl	32(%esp),%eax
+	pxor	%xmm6,%xmm2
+	punpcklqdq	%xmm1,%xmm4
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm6,64(%esp)
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	movdqa	128(%esp),%xmm6
+	rorl	$7,%ecx
+	paddd	%xmm1,%xmm5
+	addl	%ebx,%eax
+	pxor	%xmm4,%xmm2
+	addl	36(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm5,16(%esp)
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	pslld	$2,%xmm2
+	addl	40(%esp),%edx
+	xorl	%ebx,%esi
+	psrld	$30,%xmm4
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	por	%xmm4,%xmm2
+	addl	44(%esp),%ecx
+	xorl	%eax,%ebp
+	movdqa	80(%esp),%xmm4
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	pshufd	$238,%xmm1,%xmm5
+	addl	%edx,%ecx
+	addl	48(%esp),%ebx
+	pxor	%xmm7,%xmm3
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm7,80(%esp)
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	movdqa	%xmm6,%xmm7
+	rorl	$7,%edx
+	paddd	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	pxor	%xmm5,%xmm3
+	addl	52(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm5
+	movdqa	%xmm6,32(%esp)
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	pslld	$2,%xmm3
+	addl	56(%esp),%edi
+	xorl	%ecx,%esi
+	psrld	$30,%xmm5
+	movl	%eax,%ebp
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	por	%xmm5,%xmm3
+	addl	60(%esp),%edx
+	xorl	%ebx,%ebp
+	movdqa	96(%esp),%xmm5
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	pshufd	$238,%xmm2,%xmm6
+	addl	%edi,%edx
+	addl	(%esp),%ecx
+	pxor	%xmm0,%xmm4
+	punpcklqdq	%xmm3,%xmm6
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm0,96(%esp)
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	movdqa	%xmm7,%xmm0
+	rorl	$7,%edi
+	paddd	%xmm3,%xmm7
+	addl	%edx,%ecx
+	pxor	%xmm6,%xmm4
+	addl	4(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	movdqa	%xmm4,%xmm6
+	movdqa	%xmm7,48(%esp)
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	pslld	$2,%xmm4
+	addl	8(%esp),%eax
+	xorl	%edx,%esi
+	psrld	$30,%xmm6
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	por	%xmm6,%xmm4
+	addl	12(%esp),%edi
+	xorl	%ecx,%ebp
+	movdqa	64(%esp),%xmm6
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	pshufd	$238,%xmm3,%xmm7
+	addl	%eax,%edi
+	addl	16(%esp),%edx
+	pxor	%xmm1,%xmm5
+	punpcklqdq	%xmm4,%xmm7
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	pxor	%xmm6,%xmm5
+	movdqa	%xmm1,64(%esp)
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	movdqa	%xmm0,%xmm1
+	rorl	$7,%eax
+	paddd	%xmm4,%xmm0
+	addl	%edi,%edx
+	pxor	%xmm7,%xmm5
+	addl	20(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	movdqa	%xmm5,%xmm7
+	movdqa	%xmm0,(%esp)
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	pslld	$2,%xmm5
+	addl	24(%esp),%ebx
+	xorl	%edi,%esi
+	psrld	$30,%xmm7
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	por	%xmm7,%xmm5
+	addl	28(%esp),%eax
+	movdqa	80(%esp),%xmm7
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	pshufd	$238,%xmm4,%xmm0
+	addl	%ebp,%eax
+	xorl	%ecx,%esi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	32(%esp),%edi
+	pxor	%xmm2,%xmm6
+	punpcklqdq	%xmm5,%xmm0
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	pxor	%xmm7,%xmm6
+	movdqa	%xmm2,80(%esp)
+	movl	%eax,%ebp
+	xorl	%ecx,%esi
+	roll	$5,%eax
+	movdqa	%xmm1,%xmm2
+	addl	%esi,%edi
+	paddd	%xmm5,%xmm1
+	xorl	%ebx,%ebp
+	pxor	%xmm0,%xmm6
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	36(%esp),%edx
+	andl	%ebx,%ebp
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm1,16(%esp)
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%edi,%esi
+	xorl	%ebx,%ebp
+	roll	$5,%edi
+	pslld	$2,%xmm6
+	addl	%ebp,%edx
+	xorl	%eax,%esi
+	psrld	$30,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	40(%esp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	por	%xmm0,%xmm6
+	movl	%edx,%ebp
+	xorl	%eax,%esi
+	movdqa	96(%esp),%xmm0
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%edi,%ebp
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	pshufd	$238,%xmm5,%xmm1
+	addl	44(%esp),%ebx
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%edi,%ebp
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edx,%esi
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	48(%esp),%eax
+	pxor	%xmm3,%xmm7
+	punpcklqdq	%xmm6,%xmm1
+	andl	%edx,%esi
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	pxor	%xmm0,%xmm7
+	movdqa	%xmm3,96(%esp)
+	movl	%ebx,%ebp
+	xorl	%edx,%esi
+	roll	$5,%ebx
+	movdqa	144(%esp),%xmm3
+	addl	%esi,%eax
+	paddd	%xmm6,%xmm2
+	xorl	%ecx,%ebp
+	pxor	%xmm1,%xmm7
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	52(%esp),%edi
+	andl	%ecx,%ebp
+	movdqa	%xmm7,%xmm1
+	movdqa	%xmm2,32(%esp)
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%ebp
+	roll	$5,%eax
+	pslld	$2,%xmm7
+	addl	%ebp,%edi
+	xorl	%ebx,%esi
+	psrld	$30,%xmm1
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	56(%esp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	por	%xmm1,%xmm7
+	movl	%edi,%ebp
+	xorl	%ebx,%esi
+	movdqa	64(%esp),%xmm1
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%eax,%ebp
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	pshufd	$238,%xmm6,%xmm2
+	addl	60(%esp),%ecx
+	andl	%eax,%ebp
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	movl	%edx,%esi
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%edi,%esi
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	(%esp),%ebx
+	pxor	%xmm4,%xmm0
+	punpcklqdq	%xmm7,%xmm2
+	andl	%edi,%esi
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm4,64(%esp)
+	movl	%ecx,%ebp
+	xorl	%edi,%esi
+	roll	$5,%ecx
+	movdqa	%xmm3,%xmm4
+	addl	%esi,%ebx
+	paddd	%xmm7,%xmm3
+	xorl	%edx,%ebp
+	pxor	%xmm2,%xmm0
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	4(%esp),%eax
+	andl	%edx,%ebp
+	movdqa	%xmm0,%xmm2
+	movdqa	%xmm3,48(%esp)
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	pslld	$2,%xmm0
+	addl	%ebp,%eax
+	xorl	%ecx,%esi
+	psrld	$30,%xmm2
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	8(%esp),%edi
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	por	%xmm2,%xmm0
+	movl	%eax,%ebp
+	xorl	%ecx,%esi
+	movdqa	80(%esp),%xmm2
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	pshufd	$238,%xmm7,%xmm3
+	addl	12(%esp),%edx
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%edi,%esi
+	xorl	%ebx,%ebp
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%eax,%esi
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	16(%esp),%ecx
+	pxor	%xmm5,%xmm1
+	punpcklqdq	%xmm0,%xmm3
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,80(%esp)
+	movl	%edx,%ebp
+	xorl	%eax,%esi
+	roll	$5,%edx
+	movdqa	%xmm4,%xmm5
+	addl	%esi,%ecx
+	paddd	%xmm0,%xmm4
+	xorl	%edi,%ebp
+	pxor	%xmm3,%xmm1
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	20(%esp),%ebx
+	andl	%edi,%ebp
+	movdqa	%xmm1,%xmm3
+	movdqa	%xmm4,(%esp)
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%edi,%ebp
+	roll	$5,%ecx
+	pslld	$2,%xmm1
+	addl	%ebp,%ebx
+	xorl	%edx,%esi
+	psrld	$30,%xmm3
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	24(%esp),%eax
+	andl	%edx,%esi
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	por	%xmm3,%xmm1
+	movl	%ebx,%ebp
+	xorl	%edx,%esi
+	movdqa	96(%esp),%xmm3
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%ecx,%ebp
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	pshufd	$238,%xmm0,%xmm4
+	addl	28(%esp),%edi
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%ebp
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ebx,%esi
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	32(%esp),%edx
+	pxor	%xmm6,%xmm2
+	punpcklqdq	%xmm1,%xmm4
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm6,96(%esp)
+	movl	%edi,%ebp
+	xorl	%ebx,%esi
+	roll	$5,%edi
+	movdqa	%xmm5,%xmm6
+	addl	%esi,%edx
+	paddd	%xmm1,%xmm5
+	xorl	%eax,%ebp
+	pxor	%xmm4,%xmm2
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	36(%esp),%ecx
+	andl	%eax,%ebp
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm5,16(%esp)
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	movl	%edx,%esi
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	pslld	$2,%xmm2
+	addl	%ebp,%ecx
+	xorl	%edi,%esi
+	psrld	$30,%xmm4
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	40(%esp),%ebx
+	andl	%edi,%esi
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	por	%xmm4,%xmm2
+	movl	%ecx,%ebp
+	xorl	%edi,%esi
+	movdqa	64(%esp),%xmm4
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edx,%ebp
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	pshufd	$238,%xmm1,%xmm5
+	addl	44(%esp),%eax
+	andl	%edx,%ebp
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	addl	%ebx,%eax
+	addl	48(%esp),%edi
+	pxor	%xmm7,%xmm3
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm7,64(%esp)
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	movdqa	%xmm6,%xmm7
+	rorl	$7,%ebx
+	paddd	%xmm2,%xmm6
+	addl	%eax,%edi
+	pxor	%xmm5,%xmm3
+	addl	52(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	movdqa	%xmm3,%xmm5
+	movdqa	%xmm6,32(%esp)
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	pslld	$2,%xmm3
+	addl	56(%esp),%ecx
+	xorl	%eax,%esi
+	psrld	$30,%xmm5
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	por	%xmm5,%xmm3
+	addl	60(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	paddd	%xmm3,%xmm7
+	addl	%ebx,%eax
+	addl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	movdqa	%xmm7,48(%esp)
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	8(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	movl	196(%esp),%ebp
+	cmpl	200(%esp),%ebp
+	je	.L007done
+	movdqa	160(%esp),%xmm7
+	movdqa	176(%esp),%xmm6
+	movdqu	(%ebp),%xmm0
+	movdqu	16(%ebp),%xmm1
+	movdqu	32(%ebp),%xmm2
+	movdqu	48(%ebp),%xmm3
+	addl	$64,%ebp
+.byte	102,15,56,0,198
+	movl	%ebp,196(%esp)
+	movdqa	%xmm7,96(%esp)
+	addl	16(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+.byte	102,15,56,0,206
+	addl	%ecx,%ebx
+	addl	20(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	paddd	%xmm7,%xmm0
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	movdqa	%xmm0,(%esp)
+	addl	%ebx,%eax
+	addl	24(%esp),%edi
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	psubd	%xmm7,%xmm0
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	28(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	32(%esp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+.byte	102,15,56,0,214
+	addl	%edx,%ecx
+	addl	36(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	paddd	%xmm7,%xmm1
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	movdqa	%xmm1,16(%esp)
+	addl	%ecx,%ebx
+	addl	40(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	psubd	%xmm7,%xmm1
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	48(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+.byte	102,15,56,0,222
+	addl	%edi,%edx
+	addl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	paddd	%xmm7,%xmm2
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	movdqa	%xmm2,32(%esp)
+	addl	%edx,%ecx
+	addl	56(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	psubd	%xmm7,%xmm2
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	movl	192(%esp),%ebp
+	addl	(%ebp),%eax
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%ecx
+	movl	%eax,(%ebp)
+	addl	12(%ebp),%edx
+	movl	%esi,4(%ebp)
+	addl	16(%ebp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%ecx,%ebx
+	movl	%edx,12(%ebp)
+	xorl	%edx,%ebx
+	movl	%edi,16(%ebp)
+	movl	%esi,%ebp
+	pshufd	$238,%xmm0,%xmm4
+	andl	%ebx,%esi
+	movl	%ebp,%ebx
+	jmp	.L006loop
+.align	16
+.L007done:
+	addl	16(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	20(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	24(%esp),%edi
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	28(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	32(%esp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	addl	36(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	40(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	48(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	addl	56(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	movl	192(%esp),%ebp
+	addl	(%ebp),%eax
+	movl	204(%esp),%esp
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%ecx
+	movl	%eax,(%ebp)
+	addl	12(%ebp),%edx
+	movl	%esi,4(%ebp)
+	addl	16(%ebp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%edx,12(%ebp)
+	movl	%edi,16(%ebp)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	_sha1_block_data_order_ssse3,.-_sha1_block_data_order_ssse3
+.align	64
+.LK_XX_XX:
+.long	1518500249,1518500249,1518500249,1518500249
+.long	1859775393,1859775393,1859775393,1859775393
+.long	2400959708,2400959708,2400959708,2400959708
+.long	3395469782,3395469782,3395469782,3395469782
+.long	66051,67438087,134810123,202182159
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
+.byte	102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82
+.byte	89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112
+.byte	114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S
new file mode 100644
index 0000000..08d9484
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/sha/sha256-586.S
@@ -0,0 +1,4579 @@
+#if defined(__i386__)
+.file	"sha512-586.S"
+.text
+.globl	sha256_block_data_order
+.hidden	sha256_block_data_order
+.type	sha256_block_data_order,@function
+.align	16
+sha256_block_data_order:
+.L_sha256_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	%esp,%ebx
+	call	.L000pic_point
+.L000pic_point:
+	popl	%ebp
+	leal	.L001K256-.L000pic_point(%ebp),%ebp
+	subl	$16,%esp
+	andl	$-64,%esp
+	shll	$6,%eax
+	addl	%edi,%eax
+	movl	%esi,(%esp)
+	movl	%edi,4(%esp)
+	movl	%eax,8(%esp)
+	movl	%ebx,12(%esp)
+	leal	OPENSSL_ia32cap_P-.L001K256(%ebp),%edx
+	movl	(%edx),%ecx
+	movl	4(%edx),%ebx
+	testl	$1048576,%ecx
+	jnz	.L002loop
+	movl	8(%edx),%edx
+	testl	$16777216,%ecx
+	jz	.L003no_xmm
+	andl	$1073741824,%ecx
+	andl	$268435968,%ebx
+	testl	$536870912,%edx
+	jnz	.L004shaext
+	orl	%ebx,%ecx
+	andl	$1342177280,%ecx
+	cmpl	$1342177280,%ecx
+	testl	$512,%ebx
+	jnz	.L005SSSE3
+.L003no_xmm:
+	subl	%edi,%eax
+	cmpl	$256,%eax
+	jae	.L006unrolled
+	jmp	.L002loop
+.align	16
+.L002loop:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	bswap	%eax
+	movl	12(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	16(%edi),%eax
+	movl	20(%edi),%ebx
+	movl	24(%edi),%ecx
+	bswap	%eax
+	movl	28(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	32(%edi),%eax
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	bswap	%eax
+	movl	44(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	48(%edi),%eax
+	movl	52(%edi),%ebx
+	movl	56(%edi),%ecx
+	bswap	%eax
+	movl	60(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	addl	$64,%edi
+	leal	-36(%esp),%esp
+	movl	%edi,104(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edi
+	movl	%ebx,8(%esp)
+	xorl	%ecx,%ebx
+	movl	%ecx,12(%esp)
+	movl	%edi,16(%esp)
+	movl	%ebx,(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edi
+	movl	%ebx,24(%esp)
+	movl	%ecx,28(%esp)
+	movl	%edi,32(%esp)
+.align	16
+.L00700_15:
+	movl	%edx,%ecx
+	movl	24(%esp),%esi
+	rorl	$14,%ecx
+	movl	28(%esp),%edi
+	xorl	%edx,%ecx
+	xorl	%edi,%esi
+	movl	96(%esp),%ebx
+	rorl	$5,%ecx
+	andl	%edx,%esi
+	movl	%edx,20(%esp)
+	xorl	%ecx,%edx
+	addl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%esi,%ebx
+	rorl	$9,%ecx
+	addl	%edx,%ebx
+	movl	8(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,4(%esp)
+	leal	-4(%esp),%esp
+	rorl	$11,%ecx
+	movl	(%ebp),%esi
+	xorl	%eax,%ecx
+	movl	20(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%esi,%ebx
+	movl	%eax,(%esp)
+	addl	%ebx,%edx
+	andl	4(%esp),%eax
+	addl	%ecx,%ebx
+	xorl	%edi,%eax
+	addl	$4,%ebp
+	addl	%ebx,%eax
+	cmpl	$3248222580,%esi
+	jne	.L00700_15
+	movl	156(%esp),%ecx
+	jmp	.L00816_63
+.align	16
+.L00816_63:
+	movl	%ecx,%ebx
+	movl	104(%esp),%esi
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	160(%esp),%ebx
+	shrl	$10,%edi
+	addl	124(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	24(%esp),%esi
+	rorl	$14,%ecx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%edx,%ecx
+	xorl	%edi,%esi
+	movl	%ebx,96(%esp)
+	rorl	$5,%ecx
+	andl	%edx,%esi
+	movl	%edx,20(%esp)
+	xorl	%ecx,%edx
+	addl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%esi,%ebx
+	rorl	$9,%ecx
+	addl	%edx,%ebx
+	movl	8(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,4(%esp)
+	leal	-4(%esp),%esp
+	rorl	$11,%ecx
+	movl	(%ebp),%esi
+	xorl	%eax,%ecx
+	movl	20(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%esi,%ebx
+	movl	%eax,(%esp)
+	addl	%ebx,%edx
+	andl	4(%esp),%eax
+	addl	%ecx,%ebx
+	xorl	%edi,%eax
+	movl	156(%esp),%ecx
+	addl	$4,%ebp
+	addl	%ebx,%eax
+	cmpl	$3329325298,%esi
+	jne	.L00816_63
+	movl	356(%esp),%esi
+	movl	8(%esp),%ebx
+	movl	16(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebx
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	24(%esp),%eax
+	movl	28(%esp),%ebx
+	movl	32(%esp),%ecx
+	movl	360(%esp),%edi
+	addl	16(%esi),%edx
+	addl	20(%esi),%eax
+	addl	24(%esi),%ebx
+	addl	28(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%eax,20(%esi)
+	movl	%ebx,24(%esi)
+	movl	%ecx,28(%esi)
+	leal	356(%esp),%esp
+	subl	$256,%ebp
+	cmpl	8(%esp),%edi
+	jb	.L002loop
+	movl	12(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	64
+.L001K256:
+.long	1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298
+.long	66051,67438087,134810123,202182159
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
+.byte	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+.byte	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+.byte	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+.byte	62,0
+.align	16
+.L006unrolled:
+	leal	-96(%esp),%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebp
+	movl	8(%esi),%ecx
+	movl	12(%esi),%ebx
+	movl	%ebp,4(%esp)
+	xorl	%ecx,%ebp
+	movl	%ecx,8(%esp)
+	movl	%ebx,12(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%esi
+	movl	%ebx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%esi,28(%esp)
+	jmp	.L009grand_loop
+.align	16
+.L009grand_loop:
+	movl	(%edi),%ebx
+	movl	4(%edi),%ecx
+	bswap	%ebx
+	movl	8(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,32(%esp)
+	bswap	%esi
+	movl	%ecx,36(%esp)
+	movl	%esi,40(%esp)
+	movl	12(%edi),%ebx
+	movl	16(%edi),%ecx
+	bswap	%ebx
+	movl	20(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,44(%esp)
+	bswap	%esi
+	movl	%ecx,48(%esp)
+	movl	%esi,52(%esp)
+	movl	24(%edi),%ebx
+	movl	28(%edi),%ecx
+	bswap	%ebx
+	movl	32(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,56(%esp)
+	bswap	%esi
+	movl	%ecx,60(%esp)
+	movl	%esi,64(%esp)
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	bswap	%ebx
+	movl	44(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,68(%esp)
+	bswap	%esi
+	movl	%ecx,72(%esp)
+	movl	%esi,76(%esp)
+	movl	48(%edi),%ebx
+	movl	52(%edi),%ecx
+	bswap	%ebx
+	movl	56(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,80(%esp)
+	bswap	%esi
+	movl	%ecx,84(%esp)
+	movl	%esi,88(%esp)
+	movl	60(%edi),%ebx
+	addl	$64,%edi
+	bswap	%ebx
+	movl	%edi,100(%esp)
+	movl	%ebx,92(%esp)
+	movl	%edx,%ecx
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1116352408(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	36(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1899447441(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	40(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3049323471(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	44(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3921009573(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	48(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	961987163(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	52(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1508970993(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	56(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2453635748(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	60(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2870763221(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	64(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3624381080(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	68(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	310598401(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	72(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	607225278(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	76(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1426881987(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	80(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1925078388(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	84(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2162078206(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	88(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2614888103(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	92(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3248222580(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3835390401(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	4022224774(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	264347078(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	604807628(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	770255983(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1249150122(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1555081692(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1996064986(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2554220882(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2821834349(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2952996808(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3210313671(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3336571891(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3584528711(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,88(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	113926993(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,92(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	338241895(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	666307205(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	773529912(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1294757372(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1396182291(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1695183700(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1986661051(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2177026350(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2456956037(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2730485921(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2820302411(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3259730800(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3345764771(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3516065817(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3600352804(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,88(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	4094571909(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,92(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	275423344(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	430227734(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	506948616(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	659060556(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	883997877(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	958139571(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1322822218(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1537002063(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1747873779(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1955562222(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2024104815(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2227730452(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2361852424(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2428436474(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2756734187(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3204031479(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3329325298(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	96(%esp),%esi
+	xorl	%edi,%ebp
+	movl	12(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebp
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebp,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	movl	%edi,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ecx
+	addl	16(%esi),%edx
+	addl	20(%esi),%edi
+	addl	24(%esi),%ebx
+	addl	28(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%edi,20(%esi)
+	movl	%ebx,24(%esi)
+	movl	%ecx,28(%esi)
+	movl	%edi,20(%esp)
+	movl	100(%esp),%edi
+	movl	%ebx,24(%esp)
+	movl	%ecx,28(%esp)
+	cmpl	104(%esp),%edi
+	jb	.L009grand_loop
+	movl	108(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	32
+.L004shaext:
+	subl	$32,%esp
+	movdqu	(%esi),%xmm1
+	leal	128(%ebp),%ebp
+	movdqu	16(%esi),%xmm2
+	movdqa	128(%ebp),%xmm7
+	pshufd	$27,%xmm1,%xmm0
+	pshufd	$177,%xmm1,%xmm1
+	pshufd	$27,%xmm2,%xmm2
+.byte	102,15,58,15,202,8
+	punpcklqdq	%xmm0,%xmm2
+	jmp	.L010loop_shaext
+.align	16
+.L010loop_shaext:
+	movdqu	(%edi),%xmm3
+	movdqu	16(%edi),%xmm4
+	movdqu	32(%edi),%xmm5
+.byte	102,15,56,0,223
+	movdqu	48(%edi),%xmm6
+	movdqa	%xmm2,16(%esp)
+	movdqa	-128(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	102,15,56,0,231
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	nop
+	movdqa	%xmm1,(%esp)
+.byte	15,56,203,202
+	movdqa	-112(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	102,15,56,0,239
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	leal	64(%edi),%edi
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	-96(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	102,15,56,0,247
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	-80(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	-64(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	-48(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+	nop
+	paddd	%xmm7,%xmm6
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	-32(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,205,245
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	-16(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	16(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+	nop
+	paddd	%xmm7,%xmm6
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	32(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,205,245
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	48(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	64(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	80(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+.byte	15,56,203,202
+	paddd	%xmm7,%xmm6
+	movdqa	96(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+.byte	15,56,205,245
+	movdqa	128(%ebp),%xmm7
+.byte	15,56,203,202
+	movdqa	112(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+	nop
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	cmpl	%edi,%eax
+	nop
+.byte	15,56,203,202
+	paddd	16(%esp),%xmm2
+	paddd	(%esp),%xmm1
+	jnz	.L010loop_shaext
+	pshufd	$177,%xmm2,%xmm2
+	pshufd	$27,%xmm1,%xmm7
+	pshufd	$177,%xmm1,%xmm1
+	punpckhqdq	%xmm2,%xmm1
+.byte	102,15,58,15,215,8
+	movl	44(%esp),%esp
+	movdqu	%xmm1,(%esi)
+	movdqu	%xmm2,16(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	32
+.L005SSSE3:
+	leal	-96(%esp),%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edi
+	movl	%ebx,4(%esp)
+	xorl	%ecx,%ebx
+	movl	%ecx,8(%esp)
+	movl	%edi,12(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%edi
+	movl	24(%esi),%ecx
+	movl	28(%esi),%esi
+	movl	%edi,20(%esp)
+	movl	100(%esp),%edi
+	movl	%ecx,24(%esp)
+	movl	%esi,28(%esp)
+	movdqa	256(%ebp),%xmm7
+	jmp	.L011grand_ssse3
+.align	16
+.L011grand_ssse3:
+	movdqu	(%edi),%xmm0
+	movdqu	16(%edi),%xmm1
+	movdqu	32(%edi),%xmm2
+	movdqu	48(%edi),%xmm3
+	addl	$64,%edi
+.byte	102,15,56,0,199
+	movl	%edi,100(%esp)
+.byte	102,15,56,0,207
+	movdqa	(%ebp),%xmm4
+.byte	102,15,56,0,215
+	movdqa	16(%ebp),%xmm5
+	paddd	%xmm0,%xmm4
+.byte	102,15,56,0,223
+	movdqa	32(%ebp),%xmm6
+	paddd	%xmm1,%xmm5
+	movdqa	48(%ebp),%xmm7
+	movdqa	%xmm4,32(%esp)
+	paddd	%xmm2,%xmm6
+	movdqa	%xmm5,48(%esp)
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm6,64(%esp)
+	movdqa	%xmm7,80(%esp)
+	jmp	.L012ssse3_00_47
+.align	16
+.L012ssse3_00_47:
+	addl	$64,%ebp
+	movl	%edx,%ecx
+	movdqa	%xmm1,%xmm4
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	movdqa	%xmm3,%xmm7
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+.byte	102,15,58,15,224,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,250,4
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm0
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm3,%xmm7
+	xorl	%esi,%ecx
+	addl	32(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm0
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	36(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm0
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	pshufd	$80,%xmm0,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	40(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm0
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	paddd	%xmm0,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	44(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,32(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm2,%xmm4
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	movdqa	%xmm0,%xmm7
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+.byte	102,15,58,15,225,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,251,4
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm1
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm0,%xmm7
+	xorl	%esi,%ecx
+	addl	48(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm1
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	52(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm1
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	pshufd	$80,%xmm1,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	56(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	16(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm1
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	paddd	%xmm1,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	60(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,48(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm3,%xmm4
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	movdqa	%xmm1,%xmm7
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+.byte	102,15,58,15,226,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,248,4
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm2
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm1,%xmm7
+	xorl	%esi,%ecx
+	addl	64(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm2
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	68(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm2
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	pshufd	$80,%xmm2,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	72(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	32(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm2
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	paddd	%xmm2,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	76(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,64(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm0,%xmm4
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	movdqa	%xmm2,%xmm7
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+.byte	102,15,58,15,227,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,249,4
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm3
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm2,%xmm7
+	xorl	%esi,%ecx
+	addl	80(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm3
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	84(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm3
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	pshufd	$80,%xmm3,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	88(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	48(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm3
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	paddd	%xmm3,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	92(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,80(%esp)
+	cmpl	$66051,64(%ebp)
+	jne	.L012ssse3_00_47
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	32(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	36(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	40(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	44(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	48(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	52(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	56(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	60(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	64(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	68(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	72(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	76(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	80(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	84(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	88(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	92(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movl	96(%esp),%esi
+	xorl	%edi,%ebx
+	movl	12(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebx
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	%ebx,4(%esp)
+	xorl	%edi,%ebx
+	movl	%edi,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	20(%esp),%edi
+	movl	24(%esp),%ecx
+	addl	16(%esi),%edx
+	addl	20(%esi),%edi
+	addl	24(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%edi,20(%esi)
+	movl	%edi,20(%esp)
+	movl	28(%esp),%edi
+	movl	%ecx,24(%esi)
+	addl	28(%esi),%edi
+	movl	%ecx,24(%esp)
+	movl	%edi,28(%esi)
+	movl	%edi,28(%esp)
+	movl	100(%esp),%edi
+	movdqa	64(%ebp),%xmm7
+	subl	$192,%ebp
+	cmpl	104(%esp),%edi
+	jb	.L011grand_ssse3
+	movl	108(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.size	sha256_block_data_order,.-.L_sha256_block_data_order_begin
+#endif
diff --git a/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S b/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S
new file mode 100644
index 0000000..a928400
--- /dev/null
+++ b/third_party/boringssl/linux-x86/crypto/sha/sha512-586.S
@@ -0,0 +1,2831 @@
+#if defined(__i386__)
+.file	"sha512-586.S"
+.text
+.globl	sha512_block_data_order
+.hidden	sha512_block_data_order
+.type	sha512_block_data_order,@function
+.align	16
+sha512_block_data_order:
+.L_sha512_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	%esp,%ebx
+	call	.L000pic_point
+.L000pic_point:
+	popl	%ebp
+	leal	.L001K512-.L000pic_point(%ebp),%ebp
+	subl	$16,%esp
+	andl	$-64,%esp
+	shll	$7,%eax
+	addl	%edi,%eax
+	movl	%esi,(%esp)
+	movl	%edi,4(%esp)
+	movl	%eax,8(%esp)
+	movl	%ebx,12(%esp)
+	leal	OPENSSL_ia32cap_P-.L001K512(%ebp),%edx
+	movl	(%edx),%ecx
+	testl	$67108864,%ecx
+	jz	.L002loop_x86
+	movl	4(%edx),%edx
+	movq	(%esi),%mm0
+	andl	$16777216,%ecx
+	movq	8(%esi),%mm1
+	andl	$512,%edx
+	movq	16(%esi),%mm2
+	orl	%edx,%ecx
+	movq	24(%esi),%mm3
+	movq	32(%esi),%mm4
+	movq	40(%esi),%mm5
+	movq	48(%esi),%mm6
+	movq	56(%esi),%mm7
+	cmpl	$16777728,%ecx
+	je	.L003SSSE3
+	subl	$80,%esp
+	jmp	.L004loop_sse2
+.align	16
+.L004loop_sse2:
+	movq	%mm1,8(%esp)
+	movq	%mm2,16(%esp)
+	movq	%mm3,24(%esp)
+	movq	%mm5,40(%esp)
+	movq	%mm6,48(%esp)
+	pxor	%mm1,%mm2
+	movq	%mm7,56(%esp)
+	movq	%mm0,%mm3
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	addl	$8,%edi
+	movl	$15,%edx
+	bswap	%eax
+	bswap	%ebx
+	jmp	.L00500_14_sse2
+.align	16
+.L00500_14_sse2:
+	movd	%eax,%mm1
+	movl	(%edi),%eax
+	movd	%ebx,%mm7
+	movl	4(%edi),%ebx
+	addl	$8,%edi
+	bswap	%eax
+	bswap	%ebx
+	punpckldq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm3,%mm0
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm2,%mm3
+	movq	%mm0,%mm2
+	addl	$8,%ebp
+	paddq	%mm6,%mm3
+	movq	48(%esp),%mm6
+	decl	%edx
+	jnz	.L00500_14_sse2
+	movd	%eax,%mm1
+	movd	%ebx,%mm7
+	punpckldq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm3,%mm0
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm2,%mm3
+	movq	%mm0,%mm2
+	addl	$8,%ebp
+	paddq	%mm6,%mm3
+	pxor	%mm0,%mm0
+	movl	$32,%edx
+	jmp	.L00616_79_sse2
+.align	16
+.L00616_79_sse2:
+	movq	88(%esp),%mm5
+	movq	%mm7,%mm1
+	psrlq	$1,%mm7
+	movq	%mm5,%mm6
+	psrlq	$6,%mm5
+	psllq	$56,%mm1
+	paddq	%mm3,%mm0
+	movq	%mm7,%mm3
+	psrlq	$6,%mm7
+	pxor	%mm1,%mm3
+	psllq	$7,%mm1
+	pxor	%mm7,%mm3
+	psrlq	$1,%mm7
+	pxor	%mm1,%mm3
+	movq	%mm5,%mm1
+	psrlq	$13,%mm5
+	pxor	%mm3,%mm7
+	psllq	$3,%mm6
+	pxor	%mm5,%mm1
+	paddq	200(%esp),%mm7
+	pxor	%mm6,%mm1
+	psrlq	$42,%mm5
+	paddq	128(%esp),%mm7
+	pxor	%mm5,%mm1
+	psllq	$42,%mm6
+	movq	40(%esp),%mm5
+	pxor	%mm6,%mm1
+	movq	48(%esp),%mm6
+	paddq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm6,%mm2
+	addl	$8,%ebp
+	movq	88(%esp),%mm5
+	movq	%mm7,%mm1
+	psrlq	$1,%mm7
+	movq	%mm5,%mm6
+	psrlq	$6,%mm5
+	psllq	$56,%mm1
+	paddq	%mm3,%mm2
+	movq	%mm7,%mm3
+	psrlq	$6,%mm7
+	pxor	%mm1,%mm3
+	psllq	$7,%mm1
+	pxor	%mm7,%mm3
+	psrlq	$1,%mm7
+	pxor	%mm1,%mm3
+	movq	%mm5,%mm1
+	psrlq	$13,%mm5
+	pxor	%mm3,%mm7
+	psllq	$3,%mm6
+	pxor	%mm5,%mm1
+	paddq	200(%esp),%mm7
+	pxor	%mm6,%mm1
+	psrlq	$42,%mm5
+	paddq	128(%esp),%mm7
+	pxor	%mm5,%mm1
+	psllq	$42,%mm6
+	movq	40(%esp),%mm5
+	pxor	%mm6,%mm1
+	movq	48(%esp),%mm6
+	paddq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm6,%mm0
+	addl	$8,%ebp
+	decl	%edx
+	jnz	.L00616_79_sse2
+	paddq	%mm3,%mm0
+	movq	8(%esp),%mm1
+	movq	24(%esp),%mm3
+	movq	40(%esp),%mm5
+	movq	48(%esp),%mm6
+	movq	56(%esp),%mm7
+	pxor	%mm1,%mm2
+	paddq	(%esi),%mm0
+	paddq	8(%esi),%mm1
+	paddq	16(%esi),%mm2
+	paddq	24(%esi),%mm3
+	paddq	32(%esi),%mm4
+	paddq	40(%esi),%mm5
+	paddq	48(%esi),%mm6
+	paddq	56(%esi),%mm7
+	movl	$640,%eax
+	movq	%mm0,(%esi)
+	movq	%mm1,8(%esi)
+	movq	%mm2,16(%esi)
+	movq	%mm3,24(%esi)
+	movq	%mm4,32(%esi)
+	movq	%mm5,40(%esi)
+	movq	%mm6,48(%esi)
+	movq	%mm7,56(%esi)
+	leal	(%esp,%eax,1),%esp
+	subl	%eax,%ebp
+	cmpl	88(%esp),%edi
+	jb	.L004loop_sse2
+	movl	92(%esp),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	32
+.L003SSSE3:
+	leal	-64(%esp),%edx
+	subl	$256,%esp
+	movdqa	640(%ebp),%xmm1
+	movdqu	(%edi),%xmm0
+.byte	102,15,56,0,193
+	movdqa	(%ebp),%xmm3
+	movdqa	%xmm1,%xmm2
+	movdqu	16(%edi),%xmm1
+	paddq	%xmm0,%xmm3
+.byte	102,15,56,0,202
+	movdqa	%xmm3,-128(%edx)
+	movdqa	16(%ebp),%xmm4
+	movdqa	%xmm2,%xmm3
+	movdqu	32(%edi),%xmm2
+	paddq	%xmm1,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm4,-112(%edx)
+	movdqa	32(%ebp),%xmm5
+	movdqa	%xmm3,%xmm4
+	movdqu	48(%edi),%xmm3
+	paddq	%xmm2,%xmm5
+.byte	102,15,56,0,220
+	movdqa	%xmm5,-96(%edx)
+	movdqa	48(%ebp),%xmm6
+	movdqa	%xmm4,%xmm5
+	movdqu	64(%edi),%xmm4
+	paddq	%xmm3,%xmm6
+.byte	102,15,56,0,229
+	movdqa	%xmm6,-80(%edx)
+	movdqa	64(%ebp),%xmm7
+	movdqa	%xmm5,%xmm6
+	movdqu	80(%edi),%xmm5
+	paddq	%xmm4,%xmm7
+.byte	102,15,56,0,238
+	movdqa	%xmm7,-64(%edx)
+	movdqa	%xmm0,(%edx)
+	movdqa	80(%ebp),%xmm0
+	movdqa	%xmm6,%xmm7
+	movdqu	96(%edi),%xmm6
+	paddq	%xmm5,%xmm0
+.byte	102,15,56,0,247
+	movdqa	%xmm0,-48(%edx)
+	movdqa	%xmm1,16(%edx)
+	movdqa	96(%ebp),%xmm1
+	movdqa	%xmm7,%xmm0
+	movdqu	112(%edi),%xmm7
+	paddq	%xmm6,%xmm1
+.byte	102,15,56,0,248
+	movdqa	%xmm1,-32(%edx)
+	movdqa	%xmm2,32(%edx)
+	movdqa	112(%ebp),%xmm2
+	movdqa	(%edx),%xmm0
+	paddq	%xmm7,%xmm2
+	movdqa	%xmm2,-16(%edx)
+	nop
+.align	32
+.L007loop_ssse3:
+	movdqa	16(%edx),%xmm2
+	movdqa	%xmm3,48(%edx)
+	leal	128(%ebp),%ebp
+	movq	%mm1,8(%esp)
+	movl	%edi,%ebx
+	movq	%mm2,16(%esp)
+	leal	128(%edi),%edi
+	movq	%mm3,24(%esp)
+	cmpl	%eax,%edi
+	movq	%mm5,40(%esp)
+	cmovbl	%edi,%ebx
+	movq	%mm6,48(%esp)
+	movl	$4,%ecx
+	pxor	%mm1,%mm2
+	movq	%mm7,56(%esp)
+	pxor	%mm3,%mm3
+	jmp	.L00800_47_ssse3
+.align	32
+.L00800_47_ssse3:
+	movdqa	%xmm5,%xmm3
+	movdqa	%xmm2,%xmm1
+.byte	102,15,58,15,208,8
+	movdqa	%xmm4,(%edx)
+.byte	102,15,58,15,220,8
+	movdqa	%xmm2,%xmm4
+	psrlq	$7,%xmm2
+	paddq	%xmm3,%xmm0
+	movdqa	%xmm4,%xmm3
+	psrlq	$1,%xmm4
+	psllq	$56,%xmm3
+	pxor	%xmm4,%xmm2
+	psrlq	$7,%xmm4
+	pxor	%xmm3,%xmm2
+	psllq	$7,%xmm3
+	pxor	%xmm4,%xmm2
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm7,%xmm3
+	psrlq	$6,%xmm4
+	paddq	%xmm2,%xmm0
+	movdqa	%xmm7,%xmm2
+	psrlq	$19,%xmm3
+	psllq	$3,%xmm2
+	pxor	%xmm3,%xmm4
+	psrlq	$42,%xmm3
+	pxor	%xmm2,%xmm4
+	psllq	$42,%xmm2
+	pxor	%xmm3,%xmm4
+	movdqa	32(%edx),%xmm3
+	pxor	%xmm2,%xmm4
+	movdqa	(%ebp),%xmm2
+	movq	%mm4,%mm1
+	paddq	%xmm4,%xmm0
+	movq	-128(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	paddq	%xmm0,%xmm2
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-120(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm2,-128(%edx)
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm3,%xmm2
+.byte	102,15,58,15,217,8
+	movdqa	%xmm5,16(%edx)
+.byte	102,15,58,15,229,8
+	movdqa	%xmm3,%xmm5
+	psrlq	$7,%xmm3
+	paddq	%xmm4,%xmm1
+	movdqa	%xmm5,%xmm4
+	psrlq	$1,%xmm5
+	psllq	$56,%xmm4
+	pxor	%xmm5,%xmm3
+	psrlq	$7,%xmm5
+	pxor	%xmm4,%xmm3
+	psllq	$7,%xmm4
+	pxor	%xmm5,%xmm3
+	movdqa	%xmm0,%xmm5
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm0,%xmm4
+	psrlq	$6,%xmm5
+	paddq	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm3
+	psrlq	$19,%xmm4
+	psllq	$3,%xmm3
+	pxor	%xmm4,%xmm5
+	psrlq	$42,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$42,%xmm3
+	pxor	%xmm4,%xmm5
+	movdqa	48(%edx),%xmm4
+	pxor	%xmm3,%xmm5
+	movdqa	16(%ebp),%xmm3
+	movq	%mm4,%mm1
+	paddq	%xmm5,%xmm1
+	movq	-112(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	paddq	%xmm1,%xmm3
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-104(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm3,-112(%edx)
+	movdqa	%xmm7,%xmm5
+	movdqa	%xmm4,%xmm3
+.byte	102,15,58,15,226,8
+	movdqa	%xmm6,32(%edx)
+.byte	102,15,58,15,238,8
+	movdqa	%xmm4,%xmm6
+	psrlq	$7,%xmm4
+	paddq	%xmm5,%xmm2
+	movdqa	%xmm6,%xmm5
+	psrlq	$1,%xmm6
+	psllq	$56,%xmm5
+	pxor	%xmm6,%xmm4
+	psrlq	$7,%xmm6
+	pxor	%xmm5,%xmm4
+	psllq	$7,%xmm5
+	pxor	%xmm6,%xmm4
+	movdqa	%xmm1,%xmm6
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm1,%xmm5
+	psrlq	$6,%xmm6
+	paddq	%xmm4,%xmm2
+	movdqa	%xmm1,%xmm4
+	psrlq	$19,%xmm5
+	psllq	$3,%xmm4
+	pxor	%xmm5,%xmm6
+	psrlq	$42,%xmm5
+	pxor	%xmm4,%xmm6
+	psllq	$42,%xmm4
+	pxor	%xmm5,%xmm6
+	movdqa	(%edx),%xmm5
+	pxor	%xmm4,%xmm6
+	movdqa	32(%ebp),%xmm4
+	movq	%mm4,%mm1
+	paddq	%xmm6,%xmm2
+	movq	-96(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	paddq	%xmm2,%xmm4
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-88(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm4,-96(%edx)
+	movdqa	%xmm0,%xmm6
+	movdqa	%xmm5,%xmm4
+.byte	102,15,58,15,235,8
+	movdqa	%xmm7,48(%edx)
+.byte	102,15,58,15,247,8
+	movdqa	%xmm5,%xmm7
+	psrlq	$7,%xmm5
+	paddq	%xmm6,%xmm3
+	movdqa	%xmm7,%xmm6
+	psrlq	$1,%xmm7
+	psllq	$56,%xmm6
+	pxor	%xmm7,%xmm5
+	psrlq	$7,%xmm7
+	pxor	%xmm6,%xmm5
+	psllq	$7,%xmm6
+	pxor	%xmm7,%xmm5
+	movdqa	%xmm2,%xmm7
+	pxor	%xmm6,%xmm5
+	movdqa	%xmm2,%xmm6
+	psrlq	$6,%xmm7
+	paddq	%xmm5,%xmm3
+	movdqa	%xmm2,%xmm5
+	psrlq	$19,%xmm6
+	psllq	$3,%xmm5
+	pxor	%xmm6,%xmm7
+	psrlq	$42,%xmm6
+	pxor	%xmm5,%xmm7
+	psllq	$42,%xmm5
+	pxor	%xmm6,%xmm7
+	movdqa	16(%edx),%xmm6
+	pxor	%xmm5,%xmm7
+	movdqa	48(%ebp),%xmm5
+	movq	%mm4,%mm1
+	paddq	%xmm7,%xmm3
+	movq	-80(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	paddq	%xmm3,%xmm5
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-72(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm5,-80(%edx)
+	movdqa	%xmm1,%xmm7
+	movdqa	%xmm6,%xmm5
+.byte	102,15,58,15,244,8
+	movdqa	%xmm0,(%edx)
+.byte	102,15,58,15,248,8
+	movdqa	%xmm6,%xmm0
+	psrlq	$7,%xmm6
+	paddq	%xmm7,%xmm4
+	movdqa	%xmm0,%xmm7
+	psrlq	$1,%xmm0
+	psllq	$56,%xmm7
+	pxor	%xmm0,%xmm6
+	psrlq	$7,%xmm0
+	pxor	%xmm7,%xmm6
+	psllq	$7,%xmm7
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm3,%xmm0
+	pxor	%xmm7,%xmm6
+	movdqa	%xmm3,%xmm7
+	psrlq	$6,%xmm0
+	paddq	%xmm6,%xmm4
+	movdqa	%xmm3,%xmm6
+	psrlq	$19,%xmm7
+	psllq	$3,%xmm6
+	pxor	%xmm7,%xmm0
+	psrlq	$42,%xmm7
+	pxor	%xmm6,%xmm0
+	psllq	$42,%xmm6
+	pxor	%xmm7,%xmm0
+	movdqa	32(%edx),%xmm7
+	pxor	%xmm6,%xmm0
+	movdqa	64(%ebp),%xmm6
+	movq	%mm4,%mm1
+	paddq	%xmm0,%xmm4
+	movq	-64(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	paddq	%xmm4,%xmm6
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-56(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm6,-64(%edx)
+	movdqa	%xmm2,%xmm0
+	movdqa	%xmm7,%xmm6
+.byte	102,15,58,15,253,8
+	movdqa	%xmm1,16(%edx)
+.byte	102,15,58,15,193,8
+	movdqa	%xmm7,%xmm1
+	psrlq	$7,%xmm7
+	paddq	%xmm0,%xmm5
+	movdqa	%xmm1,%xmm0
+	psrlq	$1,%xmm1
+	psllq	$56,%xmm0
+	pxor	%xmm1,%xmm7
+	psrlq	$7,%xmm1
+	pxor	%xmm0,%xmm7
+	psllq	$7,%xmm0
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm4,%xmm1
+	pxor	%xmm0,%xmm7
+	movdqa	%xmm4,%xmm0
+	psrlq	$6,%xmm1
+	paddq	%xmm7,%xmm5
+	movdqa	%xmm4,%xmm7
+	psrlq	$19,%xmm0
+	psllq	$3,%xmm7
+	pxor	%xmm0,%xmm1
+	psrlq	$42,%xmm0
+	pxor	%xmm7,%xmm1
+	psllq	$42,%xmm7
+	pxor	%xmm0,%xmm1
+	movdqa	48(%edx),%xmm0
+	pxor	%xmm7,%xmm1
+	movdqa	80(%ebp),%xmm7
+	movq	%mm4,%mm1
+	paddq	%xmm1,%xmm5
+	movq	-48(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	paddq	%xmm5,%xmm7
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-40(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm7,-48(%edx)
+	movdqa	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm7
+.byte	102,15,58,15,198,8
+	movdqa	%xmm2,32(%edx)
+.byte	102,15,58,15,202,8
+	movdqa	%xmm0,%xmm2
+	psrlq	$7,%xmm0
+	paddq	%xmm1,%xmm6
+	movdqa	%xmm2,%xmm1
+	psrlq	$1,%xmm2
+	psllq	$56,%xmm1
+	pxor	%xmm2,%xmm0
+	psrlq	$7,%xmm2
+	pxor	%xmm1,%xmm0
+	psllq	$7,%xmm1
+	pxor	%xmm2,%xmm0
+	movdqa	%xmm5,%xmm2
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm5,%xmm1
+	psrlq	$6,%xmm2
+	paddq	%xmm0,%xmm6
+	movdqa	%xmm5,%xmm0
+	psrlq	$19,%xmm1
+	psllq	$3,%xmm0
+	pxor	%xmm1,%xmm2
+	psrlq	$42,%xmm1
+	pxor	%xmm0,%xmm2
+	psllq	$42,%xmm0
+	pxor	%xmm1,%xmm2
+	movdqa	(%edx),%xmm1
+	pxor	%xmm0,%xmm2
+	movdqa	96(%ebp),%xmm0
+	movq	%mm4,%mm1
+	paddq	%xmm2,%xmm6
+	movq	-32(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	paddq	%xmm6,%xmm0
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-24(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm0,-32(%edx)
+	movdqa	%xmm4,%xmm2
+	movdqa	%xmm1,%xmm0
+.byte	102,15,58,15,207,8
+	movdqa	%xmm3,48(%edx)
+.byte	102,15,58,15,211,8
+	movdqa	%xmm1,%xmm3
+	psrlq	$7,%xmm1
+	paddq	%xmm2,%xmm7
+	movdqa	%xmm3,%xmm2
+	psrlq	$1,%xmm3
+	psllq	$56,%xmm2
+	pxor	%xmm3,%xmm1
+	psrlq	$7,%xmm3
+	pxor	%xmm2,%xmm1
+	psllq	$7,%xmm2
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm6,%xmm3
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm6,%xmm2
+	psrlq	$6,%xmm3
+	paddq	%xmm1,%xmm7
+	movdqa	%xmm6,%xmm1
+	psrlq	$19,%xmm2
+	psllq	$3,%xmm1
+	pxor	%xmm2,%xmm3
+	psrlq	$42,%xmm2
+	pxor	%xmm1,%xmm3
+	psllq	$42,%xmm1
+	pxor	%xmm2,%xmm3
+	movdqa	16(%edx),%xmm2
+	pxor	%xmm1,%xmm3
+	movdqa	112(%ebp),%xmm1
+	movq	%mm4,%mm1
+	paddq	%xmm3,%xmm7
+	movq	-16(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	paddq	%xmm7,%xmm1
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-8(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm1,-16(%edx)
+	leal	128(%ebp),%ebp
+	decl	%ecx
+	jnz	.L00800_47_ssse3
+	movdqa	(%ebp),%xmm1
+	leal	-640(%ebp),%ebp
+	movdqu	(%ebx),%xmm0
+.byte	102,15,56,0,193
+	movdqa	(%ebp),%xmm3
+	movdqa	%xmm1,%xmm2
+	movdqu	16(%ebx),%xmm1
+	paddq	%xmm0,%xmm3
+.byte	102,15,56,0,202
+	movq	%mm4,%mm1
+	movq	-128(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-120(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm3,-128(%edx)
+	movdqa	16(%ebp),%xmm4
+	movdqa	%xmm2,%xmm3
+	movdqu	32(%ebx),%xmm2
+	paddq	%xmm1,%xmm4
+.byte	102,15,56,0,211
+	movq	%mm4,%mm1
+	movq	-112(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-104(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm4,-112(%edx)
+	movdqa	32(%ebp),%xmm5
+	movdqa	%xmm3,%xmm4
+	movdqu	48(%ebx),%xmm3
+	paddq	%xmm2,%xmm5
+.byte	102,15,56,0,220
+	movq	%mm4,%mm1
+	movq	-96(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-88(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm5,-96(%edx)
+	movdqa	48(%ebp),%xmm6
+	movdqa	%xmm4,%xmm5
+	movdqu	64(%ebx),%xmm4
+	paddq	%xmm3,%xmm6
+.byte	102,15,56,0,229
+	movq	%mm4,%mm1
+	movq	-80(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-72(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm6,-80(%edx)
+	movdqa	64(%ebp),%xmm7
+	movdqa	%xmm5,%xmm6
+	movdqu	80(%ebx),%xmm5
+	paddq	%xmm4,%xmm7
+.byte	102,15,56,0,238
+	movq	%mm4,%mm1
+	movq	-64(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-56(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm7,-64(%edx)
+	movdqa	%xmm0,(%edx)
+	movdqa	80(%ebp),%xmm0
+	movdqa	%xmm6,%xmm7
+	movdqu	96(%ebx),%xmm6
+	paddq	%xmm5,%xmm0
+.byte	102,15,56,0,247
+	movq	%mm4,%mm1
+	movq	-48(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-40(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm0,-48(%edx)
+	movdqa	%xmm1,16(%edx)
+	movdqa	96(%ebp),%xmm1
+	movdqa	%xmm7,%xmm0
+	movdqu	112(%ebx),%xmm7
+	paddq	%xmm6,%xmm1
+.byte	102,15,56,0,248
+	movq	%mm4,%mm1
+	movq	-32(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-24(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm1,-32(%edx)
+	movdqa	%xmm2,32(%edx)
+	movdqa	112(%ebp),%xmm2
+	movdqa	(%edx),%xmm0
+	paddq	%xmm7,%xmm2
+	movq	%mm4,%mm1
+	movq	-16(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-8(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm2,-16(%edx)
+	movq	8(%esp),%mm1
+	paddq	%mm3,%mm0
+	movq	24(%esp),%mm3
+	movq	56(%esp),%mm7
+	pxor	%mm1,%mm2
+	paddq	(%esi),%mm0
+	paddq	8(%esi),%mm1
+	paddq	16(%esi),%mm2
+	paddq	24(%esi),%mm3
+	paddq	32(%esi),%mm4
+	paddq	40(%esi),%mm5
+	paddq	48(%esi),%mm6
+	paddq	56(%esi),%mm7
+	movq	%mm0,(%esi)
+	movq	%mm1,8(%esi)
+	movq	%mm2,16(%esi)
+	movq	%mm3,24(%esi)
+	movq	%mm4,32(%esi)
+	movq	%mm5,40(%esi)
+	movq	%mm6,48(%esi)
+	movq	%mm7,56(%esi)
+	cmpl	%eax,%edi
+	jb	.L007loop_ssse3
+	movl	76(%edx),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	16
+.L002loop_x86:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	16(%edi),%eax
+	movl	20(%edi),%ebx
+	movl	24(%edi),%ecx
+	movl	28(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	32(%edi),%eax
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	movl	44(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	48(%edi),%eax
+	movl	52(%edi),%ebx
+	movl	56(%edi),%ecx
+	movl	60(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	64(%edi),%eax
+	movl	68(%edi),%ebx
+	movl	72(%edi),%ecx
+	movl	76(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	80(%edi),%eax
+	movl	84(%edi),%ebx
+	movl	88(%edi),%ecx
+	movl	92(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	96(%edi),%eax
+	movl	100(%edi),%ebx
+	movl	104(%edi),%ecx
+	movl	108(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	112(%edi),%eax
+	movl	116(%edi),%ebx
+	movl	120(%edi),%ecx
+	movl	124(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	addl	$128,%edi
+	subl	$72,%esp
+	movl	%edi,204(%esp)
+	leal	8(%esp),%edi
+	movl	$16,%ecx
+.long	2784229001
+.align	16
+.L00900_15_x86:
+	movl	40(%esp),%ecx
+	movl	44(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$9,%ecx
+	movl	%edx,%edi
+	shrl	$9,%edx
+	movl	%ecx,%ebx
+	shll	$14,%esi
+	movl	%edx,%eax
+	shll	$14,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%eax
+	shll	$4,%esi
+	xorl	%edx,%ebx
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$4,%ecx
+	xorl	%edi,%eax
+	shrl	$4,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	48(%esp),%ecx
+	movl	52(%esp),%edx
+	movl	56(%esp),%esi
+	movl	60(%esp),%edi
+	addl	64(%esp),%eax
+	adcl	68(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	andl	40(%esp),%ecx
+	andl	44(%esp),%edx
+	addl	192(%esp),%eax
+	adcl	196(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	movl	(%ebp),%esi
+	movl	4(%ebp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	32(%esp),%ecx
+	movl	36(%esp),%edx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,%esi
+	shrl	$2,%ecx
+	movl	%edx,%edi
+	shrl	$2,%edx
+	movl	%ecx,%ebx
+	shll	$4,%esi
+	movl	%edx,%eax
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%ebx
+	shll	$21,%esi
+	xorl	%edx,%eax
+	shll	$21,%edi
+	xorl	%esi,%eax
+	shrl	$21,%ecx
+	xorl	%edi,%ebx
+	shrl	$21,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	16(%esp),%esi
+	movl	20(%esp),%edi
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	andl	24(%esp),%ecx
+	andl	28(%esp),%edx
+	andl	8(%esp),%esi
+	andl	12(%esp),%edi
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movb	(%ebp),%dl
+	subl	$8,%esp
+	leal	8(%ebp),%ebp
+	cmpb	$148,%dl
+	jne	.L00900_15_x86
+.align	16
+.L01016_79_x86:
+	movl	312(%esp),%ecx
+	movl	316(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$1,%ecx
+	movl	%edx,%edi
+	shrl	$1,%edx
+	movl	%ecx,%eax
+	shll	$24,%esi
+	movl	%edx,%ebx
+	shll	$24,%edi
+	xorl	%esi,%ebx
+	shrl	$6,%ecx
+	xorl	%edi,%eax
+	shrl	$6,%edx
+	xorl	%ecx,%eax
+	shll	$7,%esi
+	xorl	%edx,%ebx
+	shll	$1,%edi
+	xorl	%esi,%ebx
+	shrl	$1,%ecx
+	xorl	%edi,%eax
+	shrl	$1,%edx
+	xorl	%ecx,%eax
+	shll	$6,%edi
+	xorl	%edx,%ebx
+	xorl	%edi,%eax
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movl	208(%esp),%ecx
+	movl	212(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$6,%ecx
+	movl	%edx,%edi
+	shrl	$6,%edx
+	movl	%ecx,%eax
+	shll	$3,%esi
+	movl	%edx,%ebx
+	shll	$3,%edi
+	xorl	%esi,%eax
+	shrl	$13,%ecx
+	xorl	%edi,%ebx
+	shrl	$13,%edx
+	xorl	%ecx,%eax
+	shll	$10,%esi
+	xorl	%edx,%ebx
+	shll	$10,%edi
+	xorl	%esi,%ebx
+	shrl	$10,%ecx
+	xorl	%edi,%eax
+	shrl	$10,%edx
+	xorl	%ecx,%ebx
+	shll	$13,%edi
+	xorl	%edx,%eax
+	xorl	%edi,%eax
+	movl	320(%esp),%ecx
+	movl	324(%esp),%edx
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	movl	248(%esp),%esi
+	movl	252(%esp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,192(%esp)
+	movl	%ebx,196(%esp)
+	movl	40(%esp),%ecx
+	movl	44(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$9,%ecx
+	movl	%edx,%edi
+	shrl	$9,%edx
+	movl	%ecx,%ebx
+	shll	$14,%esi
+	movl	%edx,%eax
+	shll	$14,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%eax
+	shll	$4,%esi
+	xorl	%edx,%ebx
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$4,%ecx
+	xorl	%edi,%eax
+	shrl	$4,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	48(%esp),%ecx
+	movl	52(%esp),%edx
+	movl	56(%esp),%esi
+	movl	60(%esp),%edi
+	addl	64(%esp),%eax
+	adcl	68(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	andl	40(%esp),%ecx
+	andl	44(%esp),%edx
+	addl	192(%esp),%eax
+	adcl	196(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	movl	(%ebp),%esi
+	movl	4(%ebp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	32(%esp),%ecx
+	movl	36(%esp),%edx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,%esi
+	shrl	$2,%ecx
+	movl	%edx,%edi
+	shrl	$2,%edx
+	movl	%ecx,%ebx
+	shll	$4,%esi
+	movl	%edx,%eax
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%ebx
+	shll	$21,%esi
+	xorl	%edx,%eax
+	shll	$21,%edi
+	xorl	%esi,%eax
+	shrl	$21,%ecx
+	xorl	%edi,%ebx
+	shrl	$21,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	16(%esp),%esi
+	movl	20(%esp),%edi
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	andl	24(%esp),%ecx
+	andl	28(%esp),%edx
+	andl	8(%esp),%esi
+	andl	12(%esp),%edi
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movb	(%ebp),%dl
+	subl	$8,%esp
+	leal	8(%ebp),%ebp
+	cmpb	$23,%dl
+	jne	.L01016_79_x86
+	movl	840(%esp),%esi
+	movl	844(%esp),%edi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	addl	8(%esp),%eax
+	adcl	12(%esp),%ebx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	addl	16(%esp),%ecx
+	adcl	20(%esp),%edx
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	addl	24(%esp),%eax
+	adcl	28(%esp),%ebx
+	movl	%eax,16(%esi)
+	movl	%ebx,20(%esi)
+	addl	32(%esp),%ecx
+	adcl	36(%esp),%edx
+	movl	%ecx,24(%esi)
+	movl	%edx,28(%esi)
+	movl	32(%esi),%eax
+	movl	36(%esi),%ebx
+	movl	40(%esi),%ecx
+	movl	44(%esi),%edx
+	addl	40(%esp),%eax
+	adcl	44(%esp),%ebx
+	movl	%eax,32(%esi)
+	movl	%ebx,36(%esi)
+	addl	48(%esp),%ecx
+	adcl	52(%esp),%edx
+	movl	%ecx,40(%esi)
+	movl	%edx,44(%esi)
+	movl	48(%esi),%eax
+	movl	52(%esi),%ebx
+	movl	56(%esi),%ecx
+	movl	60(%esi),%edx
+	addl	56(%esp),%eax
+	adcl	60(%esp),%ebx
+	movl	%eax,48(%esi)
+	movl	%ebx,52(%esi)
+	addl	64(%esp),%ecx
+	adcl	68(%esp),%edx
+	movl	%ecx,56(%esi)
+	movl	%edx,60(%esi)
+	addl	$840,%esp
+	subl	$640,%ebp
+	cmpl	8(%esp),%edi
+	jb	.L002loop_x86
+	movl	12(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	64
+.L001K512:
+.long	3609767458,1116352408
+.long	602891725,1899447441
+.long	3964484399,3049323471
+.long	2173295548,3921009573
+.long	4081628472,961987163
+.long	3053834265,1508970993
+.long	2937671579,2453635748
+.long	3664609560,2870763221
+.long	2734883394,3624381080
+.long	1164996542,310598401
+.long	1323610764,607225278
+.long	3590304994,1426881987
+.long	4068182383,1925078388
+.long	991336113,2162078206
+.long	633803317,2614888103
+.long	3479774868,3248222580
+.long	2666613458,3835390401
+.long	944711139,4022224774
+.long	2341262773,264347078
+.long	2007800933,604807628
+.long	1495990901,770255983
+.long	1856431235,1249150122
+.long	3175218132,1555081692
+.long	2198950837,1996064986
+.long	3999719339,2554220882
+.long	766784016,2821834349
+.long	2566594879,2952996808
+.long	3203337956,3210313671
+.long	1034457026,3336571891
+.long	2466948901,3584528711
+.long	3758326383,113926993
+.long	168717936,338241895
+.long	1188179964,666307205
+.long	1546045734,773529912
+.long	1522805485,1294757372
+.long	2643833823,1396182291
+.long	2343527390,1695183700
+.long	1014477480,1986661051
+.long	1206759142,2177026350
+.long	344077627,2456956037
+.long	1290863460,2730485921
+.long	3158454273,2820302411
+.long	3505952657,3259730800
+.long	106217008,3345764771
+.long	3606008344,3516065817
+.long	1432725776,3600352804
+.long	1467031594,4094571909
+.long	851169720,275423344
+.long	3100823752,430227734
+.long	1363258195,506948616
+.long	3750685593,659060556
+.long	3785050280,883997877
+.long	3318307427,958139571
+.long	3812723403,1322822218
+.long	2003034995,1537002063
+.long	3602036899,1747873779
+.long	1575990012,1955562222
+.long	1125592928,2024104815
+.long	2716904306,2227730452
+.long	442776044,2361852424
+.long	593698344,2428436474
+.long	3733110249,2756734187
+.long	2999351573,3204031479
+.long	3815920427,3329325298
+.long	3928383900,3391569614
+.long	566280711,3515267271
+.long	3454069534,3940187606
+.long	4000239992,4118630271
+.long	1914138554,116418474
+.long	2731055270,174292421
+.long	3203993006,289380356
+.long	320620315,460393269
+.long	587496836,685471733
+.long	1086792851,852142971
+.long	365543100,1017036298
+.long	2618297676,1126000580
+.long	3409855158,1288033470
+.long	4234509866,1501505948
+.long	987167468,1607167915
+.long	1246189591,1816402316
+.long	67438087,66051
+.long	202182159,134810123
+.size	sha512_block_data_order,.-.L_sha512_block_data_order_begin
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
+.byte	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+.byte	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+.byte	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+.byte	62,0
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S
new file mode 100644
index 0000000..5f4b057
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/aes/aes-x86_64.S
@@ -0,0 +1,2536 @@
+#if defined(__x86_64__)
+.text	
+.type	_x86_64_AES_encrypt,@function
+.align	16
+_x86_64_AES_encrypt:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+
+	movl	240(%r15),%r13d
+	subl	$1,%r13d
+	jmp	.Lenc_loop
+.align	16
+.Lenc_loop:
+
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movl	0(%r14,%rsi,8),%r10d
+	movl	0(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r12d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movzbl	%dl,%ebp
+	xorl	3(%r14,%rsi,8),%r10d
+	xorl	3(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r8d
+
+	movzbl	%dh,%esi
+	shrl	$16,%ecx
+	movzbl	%ah,%ebp
+	xorl	3(%r14,%rsi,8),%r12d
+	shrl	$16,%edx
+	xorl	3(%r14,%rbp,8),%r8d
+
+	shrl	$16,%ebx
+	leaq	16(%r15),%r15
+	shrl	$16,%eax
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	xorl	2(%r14,%rsi,8),%r10d
+	xorl	2(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movzbl	%bl,%ebp
+	xorl	1(%r14,%rsi,8),%r10d
+	xorl	1(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r8d
+
+	movl	12(%r15),%edx
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movl	0(%r15),%eax
+	xorl	1(%r14,%rdi,8),%r12d
+	xorl	1(%r14,%rbp,8),%r8d
+
+	movl	4(%r15),%ebx
+	movl	8(%r15),%ecx
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	subl	$1,%r13d
+	jnz	.Lenc_loop
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movzbl	2(%r14,%rsi,8),%r10d
+	movzbl	2(%r14,%rdi,8),%r11d
+	movzbl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%dl,%esi
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movzbl	2(%r14,%rsi,8),%r8d
+	movl	0(%r14,%rdi,8),%edi
+	movl	0(%r14,%rbp,8),%ebp
+
+	andl	$65280,%edi
+	andl	$65280,%ebp
+
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+	shrl	$16,%ecx
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	shrl	$16,%edx
+	movl	0(%r14,%rsi,8),%esi
+	movl	0(%r14,%rdi,8),%edi
+
+	andl	$65280,%esi
+	andl	$65280,%edi
+	shrl	$16,%ebx
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+	shrl	$16,%eax
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	movl	0(%r14,%rsi,8),%esi
+	movl	0(%r14,%rdi,8),%edi
+	movl	0(%r14,%rbp,8),%ebp
+
+	andl	$16711680,%esi
+	andl	$16711680,%edi
+	andl	$16711680,%ebp
+
+	xorl	%esi,%r10d
+	xorl	%edi,%r11d
+	xorl	%ebp,%r12d
+
+	movzbl	%bl,%esi
+	movzbl	%dh,%edi
+	movzbl	%ah,%ebp
+	movl	0(%r14,%rsi,8),%esi
+	movl	2(%r14,%rdi,8),%edi
+	movl	2(%r14,%rbp,8),%ebp
+
+	andl	$16711680,%esi
+	andl	$4278190080,%edi
+	andl	$4278190080,%ebp
+
+	xorl	%esi,%r8d
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movl	16+12(%r15),%edx
+	movl	2(%r14,%rsi,8),%esi
+	movl	2(%r14,%rdi,8),%edi
+	movl	16+0(%r15),%eax
+
+	andl	$4278190080,%esi
+	andl	$4278190080,%edi
+
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+
+	movl	16+4(%r15),%ebx
+	movl	16+8(%r15),%ecx
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+.byte	0xf3,0xc3
+.size	_x86_64_AES_encrypt,.-_x86_64_AES_encrypt
+.type	_x86_64_AES_encrypt_compact,@function
+.align	16
+_x86_64_AES_encrypt_compact:
+	leaq	128(%r14),%r8
+	movl	0-128(%r8),%edi
+	movl	32-128(%r8),%ebp
+	movl	64-128(%r8),%r10d
+	movl	96-128(%r8),%r11d
+	movl	128-128(%r8),%edi
+	movl	160-128(%r8),%ebp
+	movl	192-128(%r8),%r10d
+	movl	224-128(%r8),%r11d
+	jmp	.Lenc_loop_compact
+.align	16
+.Lenc_loop_compact:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+	leaq	16(%r15),%r15
+	movzbl	%al,%r10d
+	movzbl	%bl,%r11d
+	movzbl	%cl,%r12d
+	movzbl	%dl,%r8d
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	shrl	$16,%ecx
+	movzbl	%dh,%ebp
+	movzbl	(%r14,%r10,1),%r10d
+	movzbl	(%r14,%r11,1),%r11d
+	movzbl	(%r14,%r12,1),%r12d
+	movzbl	(%r14,%r8,1),%r8d
+
+	movzbl	(%r14,%rsi,1),%r9d
+	movzbl	%ah,%esi
+	movzbl	(%r14,%rdi,1),%r13d
+	movzbl	%cl,%edi
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+
+	shll	$8,%r9d
+	shrl	$16,%edx
+	shll	$8,%r13d
+	xorl	%r9d,%r10d
+	shrl	$16,%eax
+	movzbl	%dl,%r9d
+	shrl	$16,%ebx
+	xorl	%r13d,%r11d
+	shll	$8,%ebp
+	movzbl	%al,%r13d
+	movzbl	(%r14,%rdi,1),%edi
+	xorl	%ebp,%r12d
+
+	shll	$8,%esi
+	movzbl	%bl,%ebp
+	shll	$16,%edi
+	xorl	%esi,%r8d
+	movzbl	(%r14,%r9,1),%r9d
+	movzbl	%dh,%esi
+	movzbl	(%r14,%r13,1),%r13d
+	xorl	%edi,%r10d
+
+	shrl	$8,%ecx
+	movzbl	%ah,%edi
+	shll	$16,%r9d
+	shrl	$8,%ebx
+	shll	$16,%r13d
+	xorl	%r9d,%r11d
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rcx,1),%edx
+	movzbl	(%r14,%rbx,1),%ecx
+
+	shll	$16,%ebp
+	xorl	%r13d,%r12d
+	shll	$24,%esi
+	xorl	%ebp,%r8d
+	shll	$24,%edi
+	xorl	%esi,%r10d
+	shll	$24,%edx
+	xorl	%edi,%r11d
+	shll	$24,%ecx
+	movl	%r10d,%eax
+	movl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	cmpq	16(%rsp),%r15
+	je	.Lenc_compact_done
+	movl	$2155905152,%r10d
+	movl	$2155905152,%r11d
+	andl	%eax,%r10d
+	andl	%ebx,%r11d
+	movl	%r10d,%esi
+	movl	%r11d,%edi
+	shrl	$7,%r10d
+	leal	(%rax,%rax,1),%r8d
+	shrl	$7,%r11d
+	leal	(%rbx,%rbx,1),%r9d
+	subl	%r10d,%esi
+	subl	%r11d,%edi
+	andl	$4278124286,%r8d
+	andl	$4278124286,%r9d
+	andl	$454761243,%esi
+	andl	$454761243,%edi
+	movl	%eax,%r10d
+	movl	%ebx,%r11d
+	xorl	%esi,%r8d
+	xorl	%edi,%r9d
+
+	xorl	%r8d,%eax
+	xorl	%r9d,%ebx
+	movl	$2155905152,%r12d
+	roll	$24,%eax
+	movl	$2155905152,%ebp
+	roll	$24,%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%ebp
+	xorl	%r8d,%eax
+	xorl	%r9d,%ebx
+	movl	%r12d,%esi
+	rorl	$16,%r10d
+	movl	%ebp,%edi
+	rorl	$16,%r11d
+	leal	(%rcx,%rcx,1),%r8d
+	shrl	$7,%r12d
+	xorl	%r10d,%eax
+	shrl	$7,%ebp
+	xorl	%r11d,%ebx
+	rorl	$8,%r10d
+	leal	(%rdx,%rdx,1),%r9d
+	rorl	$8,%r11d
+	subl	%r12d,%esi
+	subl	%ebp,%edi
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+
+	andl	$4278124286,%r8d
+	andl	$4278124286,%r9d
+	andl	$454761243,%esi
+	andl	$454761243,%edi
+	movl	%ecx,%r12d
+	movl	%edx,%ebp
+	xorl	%esi,%r8d
+	xorl	%edi,%r9d
+
+	rorl	$16,%r12d
+	xorl	%r8d,%ecx
+	rorl	$16,%ebp
+	xorl	%r9d,%edx
+	roll	$24,%ecx
+	movl	0(%r14),%esi
+	roll	$24,%edx
+	xorl	%r8d,%ecx
+	movl	64(%r14),%edi
+	xorl	%r9d,%edx
+	movl	128(%r14),%r8d
+	xorl	%r12d,%ecx
+	rorl	$8,%r12d
+	xorl	%ebp,%edx
+	rorl	$8,%ebp
+	xorl	%r12d,%ecx
+	movl	192(%r14),%r9d
+	xorl	%ebp,%edx
+	jmp	.Lenc_loop_compact
+.align	16
+.Lenc_compact_done:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+.byte	0xf3,0xc3
+.size	_x86_64_AES_encrypt_compact,.-_x86_64_AES_encrypt_compact
+.align	16
+.globl	asm_AES_encrypt
+.hidden asm_AES_encrypt
+.type	asm_AES_encrypt,@function
+.hidden	asm_AES_encrypt
+asm_AES_encrypt:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+
+	movq	%rsp,%r10
+	leaq	-63(%rdx),%rcx
+	andq	$-64,%rsp
+	subq	%rsp,%rcx
+	negq	%rcx
+	andq	$960,%rcx
+	subq	%rcx,%rsp
+	subq	$32,%rsp
+
+	movq	%rsi,16(%rsp)
+	movq	%r10,24(%rsp)
+.Lenc_prologue:
+
+	movq	%rdx,%r15
+	movl	240(%r15),%r13d
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+
+	shll	$4,%r13d
+	leaq	(%r15,%r13,1),%rbp
+	movq	%r15,(%rsp)
+	movq	%rbp,8(%rsp)
+
+
+	leaq	.LAES_Te+2048(%rip),%r14
+	leaq	768(%rsp),%rbp
+	subq	%r14,%rbp
+	andq	$768,%rbp
+	leaq	(%r14,%rbp,1),%r14
+
+	call	_x86_64_AES_encrypt_compact
+
+	movq	16(%rsp),%r9
+	movq	24(%rsp),%rsi
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lenc_epilogue:
+	.byte	0xf3,0xc3
+.size	asm_AES_encrypt,.-asm_AES_encrypt
+.type	_x86_64_AES_decrypt,@function
+.align	16
+_x86_64_AES_decrypt:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+
+	movl	240(%r15),%r13d
+	subl	$1,%r13d
+	jmp	.Ldec_loop
+.align	16
+.Ldec_loop:
+
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movl	0(%r14,%rsi,8),%r10d
+	movl	0(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r12d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movzbl	%dl,%ebp
+	xorl	3(%r14,%rsi,8),%r10d
+	xorl	3(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r8d
+
+	movzbl	%bh,%esi
+	shrl	$16,%eax
+	movzbl	%ch,%ebp
+	xorl	3(%r14,%rsi,8),%r12d
+	shrl	$16,%edx
+	xorl	3(%r14,%rbp,8),%r8d
+
+	shrl	$16,%ebx
+	leaq	16(%r15),%r15
+	shrl	$16,%ecx
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	xorl	2(%r14,%rsi,8),%r10d
+	xorl	2(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movzbl	%bl,%ebp
+	xorl	1(%r14,%rsi,8),%r10d
+	xorl	1(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r8d
+
+	movzbl	%dh,%esi
+	movl	12(%r15),%edx
+	movzbl	%ah,%ebp
+	xorl	1(%r14,%rsi,8),%r12d
+	movl	0(%r15),%eax
+	xorl	1(%r14,%rbp,8),%r8d
+
+	xorl	%r10d,%eax
+	movl	4(%r15),%ebx
+	movl	8(%r15),%ecx
+	xorl	%r12d,%ecx
+	xorl	%r11d,%ebx
+	xorl	%r8d,%edx
+	subl	$1,%r13d
+	jnz	.Ldec_loop
+	leaq	2048(%r14),%r14
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movzbl	(%r14,%rsi,1),%r10d
+	movzbl	(%r14,%rdi,1),%r11d
+	movzbl	(%r14,%rbp,1),%r12d
+
+	movzbl	%dl,%esi
+	movzbl	%dh,%edi
+	movzbl	%ah,%ebp
+	movzbl	(%r14,%rsi,1),%r8d
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$8,%edi
+	shll	$8,%ebp
+
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+	shrl	$16,%edx
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	shrl	$16,%eax
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+
+	shll	$8,%esi
+	shll	$8,%edi
+	shrl	$16,%ebx
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+	shrl	$16,%ecx
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$16,%esi
+	shll	$16,%edi
+	shll	$16,%ebp
+
+	xorl	%esi,%r10d
+	xorl	%edi,%r11d
+	xorl	%ebp,%r12d
+
+	movzbl	%bl,%esi
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$16,%esi
+	shll	$24,%edi
+	shll	$24,%ebp
+
+	xorl	%esi,%r8d
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movl	16+12(%r15),%edx
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movl	16+0(%r15),%eax
+
+	shll	$24,%esi
+	shll	$24,%edi
+
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+
+	movl	16+4(%r15),%ebx
+	movl	16+8(%r15),%ecx
+	leaq	-2048(%r14),%r14
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+.byte	0xf3,0xc3
+.size	_x86_64_AES_decrypt,.-_x86_64_AES_decrypt
+.type	_x86_64_AES_decrypt_compact,@function
+.align	16
+_x86_64_AES_decrypt_compact:
+	leaq	128(%r14),%r8
+	movl	0-128(%r8),%edi
+	movl	32-128(%r8),%ebp
+	movl	64-128(%r8),%r10d
+	movl	96-128(%r8),%r11d
+	movl	128-128(%r8),%edi
+	movl	160-128(%r8),%ebp
+	movl	192-128(%r8),%r10d
+	movl	224-128(%r8),%r11d
+	jmp	.Ldec_loop_compact
+
+.align	16
+.Ldec_loop_compact:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+	leaq	16(%r15),%r15
+	movzbl	%al,%r10d
+	movzbl	%bl,%r11d
+	movzbl	%cl,%r12d
+	movzbl	%dl,%r8d
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	shrl	$16,%edx
+	movzbl	%bh,%ebp
+	movzbl	(%r14,%r10,1),%r10d
+	movzbl	(%r14,%r11,1),%r11d
+	movzbl	(%r14,%r12,1),%r12d
+	movzbl	(%r14,%r8,1),%r8d
+
+	movzbl	(%r14,%rsi,1),%r9d
+	movzbl	%ch,%esi
+	movzbl	(%r14,%rdi,1),%r13d
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+
+	shrl	$16,%ecx
+	shll	$8,%r13d
+	shll	$8,%r9d
+	movzbl	%cl,%edi
+	shrl	$16,%eax
+	xorl	%r9d,%r10d
+	shrl	$16,%ebx
+	movzbl	%dl,%r9d
+
+	shll	$8,%ebp
+	xorl	%r13d,%r11d
+	shll	$8,%esi
+	movzbl	%al,%r13d
+	movzbl	(%r14,%rdi,1),%edi
+	xorl	%ebp,%r12d
+	movzbl	%bl,%ebp
+
+	shll	$16,%edi
+	xorl	%esi,%r8d
+	movzbl	(%r14,%r9,1),%r9d
+	movzbl	%bh,%esi
+	movzbl	(%r14,%rbp,1),%ebp
+	xorl	%edi,%r10d
+	movzbl	(%r14,%r13,1),%r13d
+	movzbl	%ch,%edi
+
+	shll	$16,%ebp
+	shll	$16,%r9d
+	shll	$16,%r13d
+	xorl	%ebp,%r8d
+	movzbl	%dh,%ebp
+	xorl	%r9d,%r11d
+	shrl	$8,%eax
+	xorl	%r13d,%r12d
+
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%ebx
+	movzbl	(%r14,%rbp,1),%ecx
+	movzbl	(%r14,%rax,1),%edx
+
+	movl	%r10d,%eax
+	shll	$24,%esi
+	shll	$24,%ebx
+	shll	$24,%ecx
+	xorl	%esi,%eax
+	shll	$24,%edx
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	cmpq	16(%rsp),%r15
+	je	.Ldec_compact_done
+
+	movq	256+0(%r14),%rsi
+	shlq	$32,%rbx
+	shlq	$32,%rdx
+	movq	256+8(%r14),%rdi
+	orq	%rbx,%rax
+	orq	%rdx,%rcx
+	movq	256+16(%r14),%rbp
+	movq	%rsi,%r9
+	movq	%rsi,%r12
+	andq	%rax,%r9
+	andq	%rcx,%r12
+	movq	%r9,%rbx
+	movq	%r12,%rdx
+	shrq	$7,%r9
+	leaq	(%rax,%rax,1),%r8
+	shrq	$7,%r12
+	leaq	(%rcx,%rcx,1),%r11
+	subq	%r9,%rbx
+	subq	%r12,%rdx
+	andq	%rdi,%r8
+	andq	%rdi,%r11
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r8
+	xorq	%rdx,%r11
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r8,%r10
+	andq	%r11,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	leaq	(%r8,%r8,1),%r9
+	shrq	$7,%r13
+	leaq	(%r11,%r11,1),%r12
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	andq	%rdi,%r9
+	andq	%rdi,%r12
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r9
+	xorq	%rdx,%r12
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r9,%r10
+	andq	%r12,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	xorq	%rax,%r8
+	shrq	$7,%r13
+	xorq	%rcx,%r11
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	leaq	(%r9,%r9,1),%r10
+	leaq	(%r12,%r12,1),%r13
+	xorq	%rax,%r9
+	xorq	%rcx,%r12
+	andq	%rdi,%r10
+	andq	%rdi,%r13
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r10
+	xorq	%rdx,%r13
+
+	xorq	%r10,%rax
+	xorq	%r13,%rcx
+	xorq	%r10,%r8
+	xorq	%r13,%r11
+	movq	%rax,%rbx
+	movq	%rcx,%rdx
+	xorq	%r10,%r9
+	shrq	$32,%rbx
+	xorq	%r13,%r12
+	shrq	$32,%rdx
+	xorq	%r8,%r10
+	roll	$8,%eax
+	xorq	%r11,%r13
+	roll	$8,%ecx
+	xorq	%r9,%r10
+	roll	$8,%ebx
+	xorq	%r12,%r13
+
+	roll	$8,%edx
+	xorl	%r10d,%eax
+	shrq	$32,%r10
+	xorl	%r13d,%ecx
+	shrq	$32,%r13
+	xorl	%r10d,%ebx
+	xorl	%r13d,%edx
+
+	movq	%r8,%r10
+	roll	$24,%r8d
+	movq	%r11,%r13
+	roll	$24,%r11d
+	shrq	$32,%r10
+	xorl	%r8d,%eax
+	shrq	$32,%r13
+	xorl	%r11d,%ecx
+	roll	$24,%r10d
+	movq	%r9,%r8
+	roll	$24,%r13d
+	movq	%r12,%r11
+	shrq	$32,%r8
+	xorl	%r10d,%ebx
+	shrq	$32,%r11
+	xorl	%r13d,%edx
+
+	movq	0(%r14),%rsi
+	roll	$16,%r9d
+	movq	64(%r14),%rdi
+	roll	$16,%r12d
+	movq	128(%r14),%rbp
+	roll	$16,%r8d
+	movq	192(%r14),%r10
+	xorl	%r9d,%eax
+	roll	$16,%r11d
+	xorl	%r12d,%ecx
+	movq	256(%r14),%r13
+	xorl	%r8d,%ebx
+	xorl	%r11d,%edx
+	jmp	.Ldec_loop_compact
+.align	16
+.Ldec_compact_done:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+.byte	0xf3,0xc3
+.size	_x86_64_AES_decrypt_compact,.-_x86_64_AES_decrypt_compact
+.align	16
+.globl	asm_AES_decrypt
+.hidden asm_AES_decrypt
+.type	asm_AES_decrypt,@function
+.hidden	asm_AES_decrypt
+asm_AES_decrypt:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+
+	movq	%rsp,%r10
+	leaq	-63(%rdx),%rcx
+	andq	$-64,%rsp
+	subq	%rsp,%rcx
+	negq	%rcx
+	andq	$960,%rcx
+	subq	%rcx,%rsp
+	subq	$32,%rsp
+
+	movq	%rsi,16(%rsp)
+	movq	%r10,24(%rsp)
+.Ldec_prologue:
+
+	movq	%rdx,%r15
+	movl	240(%r15),%r13d
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+
+	shll	$4,%r13d
+	leaq	(%r15,%r13,1),%rbp
+	movq	%r15,(%rsp)
+	movq	%rbp,8(%rsp)
+
+
+	leaq	.LAES_Td+2048(%rip),%r14
+	leaq	768(%rsp),%rbp
+	subq	%r14,%rbp
+	andq	$768,%rbp
+	leaq	(%r14,%rbp,1),%r14
+	shrq	$3,%rbp
+	addq	%rbp,%r14
+
+	call	_x86_64_AES_decrypt_compact
+
+	movq	16(%rsp),%r9
+	movq	24(%rsp),%rsi
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Ldec_epilogue:
+	.byte	0xf3,0xc3
+.size	asm_AES_decrypt,.-asm_AES_decrypt
+.align	16
+.globl	asm_AES_set_encrypt_key
+.hidden asm_AES_set_encrypt_key
+.type	asm_AES_set_encrypt_key,@function
+asm_AES_set_encrypt_key:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$8,%rsp
+.Lenc_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+
+	movq	40(%rsp),%rbp
+	movq	48(%rsp),%rbx
+	addq	$56,%rsp
+.Lenc_key_epilogue:
+	.byte	0xf3,0xc3
+.size	asm_AES_set_encrypt_key,.-asm_AES_set_encrypt_key
+
+.type	_x86_64_AES_set_encrypt_key,@function
+.align	16
+_x86_64_AES_set_encrypt_key:
+	movl	%esi,%ecx
+	movq	%rdi,%rsi
+	movq	%rdx,%rdi
+
+	testq	$-1,%rsi
+	jz	.Lbadpointer
+	testq	$-1,%rdi
+	jz	.Lbadpointer
+
+	leaq	.LAES_Te(%rip),%rbp
+	leaq	2048+128(%rbp),%rbp
+
+
+	movl	0-128(%rbp),%eax
+	movl	32-128(%rbp),%ebx
+	movl	64-128(%rbp),%r8d
+	movl	96-128(%rbp),%edx
+	movl	128-128(%rbp),%eax
+	movl	160-128(%rbp),%ebx
+	movl	192-128(%rbp),%r8d
+	movl	224-128(%rbp),%edx
+
+	cmpl	$128,%ecx
+	je	.L10rounds
+	cmpl	$192,%ecx
+	je	.L12rounds
+	cmpl	$256,%ecx
+	je	.L14rounds
+	movq	$-2,%rax
+	jmp	.Lexit
+
+.L10rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rdx,8(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	.L10shortcut
+.align	4
+.L10loop:
+	movl	0(%rdi),%eax
+	movl	12(%rdi),%edx
+.L10shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,16(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,20(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,24(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,28(%rdi)
+	addl	$1,%ecx
+	leaq	16(%rdi),%rdi
+	cmpl	$10,%ecx
+	jl	.L10loop
+
+	movl	$10,80(%rdi)
+	xorq	%rax,%rax
+	jmp	.Lexit
+
+.L12rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	16(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rdx,16(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	.L12shortcut
+.align	4
+.L12loop:
+	movl	0(%rdi),%eax
+	movl	20(%rdi),%edx
+.L12shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,24(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,28(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,32(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,36(%rdi)
+
+	cmpl	$7,%ecx
+	je	.L12break
+	addl	$1,%ecx
+
+	xorl	16(%rdi),%eax
+	movl	%eax,40(%rdi)
+	xorl	20(%rdi),%eax
+	movl	%eax,44(%rdi)
+
+	leaq	24(%rdi),%rdi
+	jmp	.L12loop
+.L12break:
+	movl	$12,72(%rdi)
+	xorq	%rax,%rax
+	jmp	.Lexit
+
+.L14rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	16(%rsi),%rcx
+	movq	24(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,16(%rdi)
+	movq	%rdx,24(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	.L14shortcut
+.align	4
+.L14loop:
+	movl	0(%rdi),%eax
+	movl	28(%rdi),%edx
+.L14shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,32(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,36(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,40(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,44(%rdi)
+
+	cmpl	$6,%ecx
+	je	.L14break
+	addl	$1,%ecx
+
+	movl	%eax,%edx
+	movl	16(%rdi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	shll	$8,%ebx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movl	%eax,48(%rdi)
+	xorl	20(%rdi),%eax
+	movl	%eax,52(%rdi)
+	xorl	24(%rdi),%eax
+	movl	%eax,56(%rdi)
+	xorl	28(%rdi),%eax
+	movl	%eax,60(%rdi)
+
+	leaq	32(%rdi),%rdi
+	jmp	.L14loop
+.L14break:
+	movl	$14,48(%rdi)
+	xorq	%rax,%rax
+	jmp	.Lexit
+
+.Lbadpointer:
+	movq	$-1,%rax
+.Lexit:
+.byte	0xf3,0xc3
+.size	_x86_64_AES_set_encrypt_key,.-_x86_64_AES_set_encrypt_key
+.align	16
+.globl	asm_AES_set_decrypt_key
+.hidden asm_AES_set_decrypt_key
+.type	asm_AES_set_decrypt_key,@function
+asm_AES_set_decrypt_key:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	pushq	%rdx
+.Ldec_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+	movq	(%rsp),%r8
+	cmpl	$0,%eax
+	jne	.Labort
+
+	movl	240(%r8),%r14d
+	xorq	%rdi,%rdi
+	leaq	(%rdi,%r14,4),%rcx
+	movq	%r8,%rsi
+	leaq	(%r8,%rcx,4),%rdi
+.align	4
+.Linvert:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	0(%rdi),%rcx
+	movq	8(%rdi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,0(%rsi)
+	movq	%rdx,8(%rsi)
+	leaq	16(%rsi),%rsi
+	leaq	-16(%rdi),%rdi
+	cmpq	%rsi,%rdi
+	jne	.Linvert
+
+	leaq	.LAES_Te+2048+1024(%rip),%rax
+
+	movq	40(%rax),%rsi
+	movq	48(%rax),%rdi
+	movq	56(%rax),%rbp
+
+	movq	%r8,%r15
+	subl	$1,%r14d
+.align	4
+.Lpermute:
+	leaq	16(%r15),%r15
+	movq	0(%r15),%rax
+	movq	8(%r15),%rcx
+	movq	%rsi,%r9
+	movq	%rsi,%r12
+	andq	%rax,%r9
+	andq	%rcx,%r12
+	movq	%r9,%rbx
+	movq	%r12,%rdx
+	shrq	$7,%r9
+	leaq	(%rax,%rax,1),%r8
+	shrq	$7,%r12
+	leaq	(%rcx,%rcx,1),%r11
+	subq	%r9,%rbx
+	subq	%r12,%rdx
+	andq	%rdi,%r8
+	andq	%rdi,%r11
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r8
+	xorq	%rdx,%r11
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r8,%r10
+	andq	%r11,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	leaq	(%r8,%r8,1),%r9
+	shrq	$7,%r13
+	leaq	(%r11,%r11,1),%r12
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	andq	%rdi,%r9
+	andq	%rdi,%r12
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r9
+	xorq	%rdx,%r12
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r9,%r10
+	andq	%r12,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	xorq	%rax,%r8
+	shrq	$7,%r13
+	xorq	%rcx,%r11
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	leaq	(%r9,%r9,1),%r10
+	leaq	(%r12,%r12,1),%r13
+	xorq	%rax,%r9
+	xorq	%rcx,%r12
+	andq	%rdi,%r10
+	andq	%rdi,%r13
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r10
+	xorq	%rdx,%r13
+
+	xorq	%r10,%rax
+	xorq	%r13,%rcx
+	xorq	%r10,%r8
+	xorq	%r13,%r11
+	movq	%rax,%rbx
+	movq	%rcx,%rdx
+	xorq	%r10,%r9
+	shrq	$32,%rbx
+	xorq	%r13,%r12
+	shrq	$32,%rdx
+	xorq	%r8,%r10
+	roll	$8,%eax
+	xorq	%r11,%r13
+	roll	$8,%ecx
+	xorq	%r9,%r10
+	roll	$8,%ebx
+	xorq	%r12,%r13
+
+	roll	$8,%edx
+	xorl	%r10d,%eax
+	shrq	$32,%r10
+	xorl	%r13d,%ecx
+	shrq	$32,%r13
+	xorl	%r10d,%ebx
+	xorl	%r13d,%edx
+
+	movq	%r8,%r10
+	roll	$24,%r8d
+	movq	%r11,%r13
+	roll	$24,%r11d
+	shrq	$32,%r10
+	xorl	%r8d,%eax
+	shrq	$32,%r13
+	xorl	%r11d,%ecx
+	roll	$24,%r10d
+	movq	%r9,%r8
+	roll	$24,%r13d
+	movq	%r12,%r11
+	shrq	$32,%r8
+	xorl	%r10d,%ebx
+	shrq	$32,%r11
+	xorl	%r13d,%edx
+
+
+	roll	$16,%r9d
+
+	roll	$16,%r12d
+
+	roll	$16,%r8d
+
+	xorl	%r9d,%eax
+	roll	$16,%r11d
+	xorl	%r12d,%ecx
+
+	xorl	%r8d,%ebx
+	xorl	%r11d,%edx
+	movl	%eax,0(%r15)
+	movl	%ebx,4(%r15)
+	movl	%ecx,8(%r15)
+	movl	%edx,12(%r15)
+	subl	$1,%r14d
+	jnz	.Lpermute
+
+	xorq	%rax,%rax
+.Labort:
+	movq	8(%rsp),%r15
+	movq	16(%rsp),%r14
+	movq	24(%rsp),%r13
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%rbp
+	movq	48(%rsp),%rbx
+	addq	$56,%rsp
+.Ldec_key_epilogue:
+	.byte	0xf3,0xc3
+.size	asm_AES_set_decrypt_key,.-asm_AES_set_decrypt_key
+.align	16
+.globl	asm_AES_cbc_encrypt
+.hidden asm_AES_cbc_encrypt
+.type	asm_AES_cbc_encrypt,@function
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+.hidden	asm_AES_cbc_encrypt
+asm_AES_cbc_encrypt:
+	cmpq	$0,%rdx
+	je	.Lcbc_epilogue
+	pushfq
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+.Lcbc_prologue:
+
+	cld
+	movl	%r9d,%r9d
+
+	leaq	.LAES_Te(%rip),%r14
+	cmpq	$0,%r9
+	jne	.Lcbc_picked_te
+	leaq	.LAES_Td(%rip),%r14
+.Lcbc_picked_te:
+
+	movl	OPENSSL_ia32cap_P(%rip),%r10d
+	cmpq	$512,%rdx
+	jb	.Lcbc_slow_prologue
+	testq	$15,%rdx
+	jnz	.Lcbc_slow_prologue
+	btl	$28,%r10d
+	jc	.Lcbc_slow_prologue
+
+
+	leaq	-88-248(%rsp),%r15
+	andq	$-64,%r15
+
+
+	movq	%r14,%r10
+	leaq	2304(%r14),%r11
+	movq	%r15,%r12
+	andq	$4095,%r10
+	andq	$4095,%r11
+	andq	$4095,%r12
+
+	cmpq	%r11,%r12
+	jb	.Lcbc_te_break_out
+	subq	%r11,%r12
+	subq	%r12,%r15
+	jmp	.Lcbc_te_ok
+.Lcbc_te_break_out:
+	subq	%r10,%r12
+	andq	$4095,%r12
+	addq	$320,%r12
+	subq	%r12,%r15
+.align	4
+.Lcbc_te_ok:
+
+	xchgq	%rsp,%r15
+
+	movq	%r15,16(%rsp)
+.Lcbc_fast_body:
+	movq	%rdi,24(%rsp)
+	movq	%rsi,32(%rsp)
+	movq	%rdx,40(%rsp)
+	movq	%rcx,48(%rsp)
+	movq	%r8,56(%rsp)
+	movl	$0,80+240(%rsp)
+	movq	%r8,%rbp
+	movq	%r9,%rbx
+	movq	%rsi,%r9
+	movq	%rdi,%r8
+	movq	%rcx,%r15
+
+	movl	240(%r15),%eax
+
+	movq	%r15,%r10
+	subq	%r14,%r10
+	andq	$4095,%r10
+	cmpq	$2304,%r10
+	jb	.Lcbc_do_ecopy
+	cmpq	$4096-248,%r10
+	jb	.Lcbc_skip_ecopy
+.align	4
+.Lcbc_do_ecopy:
+	movq	%r15,%rsi
+	leaq	80(%rsp),%rdi
+	leaq	80(%rsp),%r15
+	movl	$30,%ecx
+.long	0x90A548F3
+	movl	%eax,(%rdi)
+.Lcbc_skip_ecopy:
+	movq	%r15,0(%rsp)
+
+	movl	$18,%ecx
+.align	4
+.Lcbc_prefetch_te:
+	movq	0(%r14),%r10
+	movq	32(%r14),%r11
+	movq	64(%r14),%r12
+	movq	96(%r14),%r13
+	leaq	128(%r14),%r14
+	subl	$1,%ecx
+	jnz	.Lcbc_prefetch_te
+	leaq	-2304(%r14),%r14
+
+	cmpq	$0,%rbx
+	je	.LFAST_DECRYPT
+
+
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+
+.align	4
+.Lcbc_fast_enc_loop:
+	xorl	0(%r8),%eax
+	xorl	4(%r8),%ebx
+	xorl	8(%r8),%ecx
+	xorl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_encrypt
+
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	subq	$16,%r10
+	testq	$-16,%r10
+	movq	%r10,40(%rsp)
+	jnz	.Lcbc_fast_enc_loop
+	movq	56(%rsp),%rbp
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	jmp	.Lcbc_fast_cleanup
+
+
+.align	16
+.LFAST_DECRYPT:
+	cmpq	%r8,%r9
+	je	.Lcbc_fast_dec_in_place
+
+	movq	%rbp,64(%rsp)
+.align	4
+.Lcbc_fast_dec_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_decrypt
+
+	movq	64(%rsp),%rbp
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	xorl	0(%rbp),%eax
+	xorl	4(%rbp),%ebx
+	xorl	8(%rbp),%ecx
+	xorl	12(%rbp),%edx
+	movq	%r8,%rbp
+
+	subq	$16,%r10
+	movq	%r10,40(%rsp)
+	movq	%rbp,64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	jnz	.Lcbc_fast_dec_loop
+	movq	56(%rsp),%r12
+	movq	0(%rbp),%r10
+	movq	8(%rbp),%r11
+	movq	%r10,0(%r12)
+	movq	%r11,8(%r12)
+	jmp	.Lcbc_fast_cleanup
+
+.align	16
+.Lcbc_fast_dec_in_place:
+	movq	0(%rbp),%r10
+	movq	8(%rbp),%r11
+	movq	%r10,0+64(%rsp)
+	movq	%r11,8+64(%rsp)
+.align	4
+.Lcbc_fast_dec_in_place_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_decrypt
+
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	xorl	0+64(%rsp),%eax
+	xorl	4+64(%rsp),%ebx
+	xorl	8+64(%rsp),%ecx
+	xorl	12+64(%rsp),%edx
+
+	movq	0(%r8),%r11
+	movq	8(%r8),%r12
+	subq	$16,%r10
+	jz	.Lcbc_fast_dec_in_place_done
+
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	movq	%r10,40(%rsp)
+	jmp	.Lcbc_fast_dec_in_place_loop
+.Lcbc_fast_dec_in_place_done:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+.align	4
+.Lcbc_fast_cleanup:
+	cmpl	$0,80+240(%rsp)
+	leaq	80(%rsp),%rdi
+	je	.Lcbc_exit
+	movl	$30,%ecx
+	xorq	%rax,%rax
+.long	0x90AB48F3
+
+	jmp	.Lcbc_exit
+
+
+.align	16
+.Lcbc_slow_prologue:
+
+	leaq	-88(%rsp),%rbp
+	andq	$-64,%rbp
+
+	leaq	-88-63(%rcx),%r10
+	subq	%rbp,%r10
+	negq	%r10
+	andq	$960,%r10
+	subq	%r10,%rbp
+
+	xchgq	%rsp,%rbp
+
+	movq	%rbp,16(%rsp)
+.Lcbc_slow_body:
+
+
+
+
+	movq	%r8,56(%rsp)
+	movq	%r8,%rbp
+	movq	%r9,%rbx
+	movq	%rsi,%r9
+	movq	%rdi,%r8
+	movq	%rcx,%r15
+	movq	%rdx,%r10
+
+	movl	240(%r15),%eax
+	movq	%r15,0(%rsp)
+	shll	$4,%eax
+	leaq	(%r15,%rax,1),%rax
+	movq	%rax,8(%rsp)
+
+
+	leaq	2048(%r14),%r14
+	leaq	768-8(%rsp),%rax
+	subq	%r14,%rax
+	andq	$768,%rax
+	leaq	(%r14,%rax,1),%r14
+
+	cmpq	$0,%rbx
+	je	.LSLOW_DECRYPT
+
+
+	testq	$-16,%r10
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+	jz	.Lcbc_slow_enc_tail
+
+.align	4
+.Lcbc_slow_enc_loop:
+	xorl	0(%r8),%eax
+	xorl	4(%r8),%ebx
+	xorl	8(%r8),%ecx
+	xorl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+	movq	%r9,32(%rsp)
+	movq	%r10,40(%rsp)
+
+	call	_x86_64_AES_encrypt_compact
+
+	movq	24(%rsp),%r8
+	movq	32(%rsp),%r9
+	movq	40(%rsp),%r10
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	subq	$16,%r10
+	testq	$-16,%r10
+	jnz	.Lcbc_slow_enc_loop
+	testq	$15,%r10
+	jnz	.Lcbc_slow_enc_tail
+	movq	56(%rsp),%rbp
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	jmp	.Lcbc_exit
+
+.align	4
+.Lcbc_slow_enc_tail:
+	movq	%rax,%r11
+	movq	%rcx,%r12
+	movq	%r10,%rcx
+	movq	%r8,%rsi
+	movq	%r9,%rdi
+.long	0x9066A4F3
+	movq	$16,%rcx
+	subq	%r10,%rcx
+	xorq	%rax,%rax
+.long	0x9066AAF3
+	movq	%r9,%r8
+	movq	$16,%r10
+	movq	%r11,%rax
+	movq	%r12,%rcx
+	jmp	.Lcbc_slow_enc_loop
+
+.align	16
+.LSLOW_DECRYPT:
+	shrq	$3,%rax
+	addq	%rax,%r14
+
+	movq	0(%rbp),%r11
+	movq	8(%rbp),%r12
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+.align	4
+.Lcbc_slow_dec_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+	movq	%r9,32(%rsp)
+	movq	%r10,40(%rsp)
+
+	call	_x86_64_AES_decrypt_compact
+
+	movq	24(%rsp),%r8
+	movq	32(%rsp),%r9
+	movq	40(%rsp),%r10
+	xorl	0+64(%rsp),%eax
+	xorl	4+64(%rsp),%ebx
+	xorl	8+64(%rsp),%ecx
+	xorl	12+64(%rsp),%edx
+
+	movq	0(%r8),%r11
+	movq	8(%r8),%r12
+	subq	$16,%r10
+	jc	.Lcbc_slow_dec_partial
+	jz	.Lcbc_slow_dec_done
+
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	jmp	.Lcbc_slow_dec_loop
+.Lcbc_slow_dec_done:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	jmp	.Lcbc_exit
+
+.align	4
+.Lcbc_slow_dec_partial:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0+64(%rsp)
+	movl	%ebx,4+64(%rsp)
+	movl	%ecx,8+64(%rsp)
+	movl	%edx,12+64(%rsp)
+
+	movq	%r9,%rdi
+	leaq	64(%rsp),%rsi
+	leaq	16(%r10),%rcx
+.long	0x9066A4F3
+	jmp	.Lcbc_exit
+
+.align	16
+.Lcbc_exit:
+	movq	16(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lcbc_popfq:
+	popfq
+.Lcbc_epilogue:
+	.byte	0xf3,0xc3
+.size	asm_AES_cbc_encrypt,.-asm_AES_cbc_encrypt
+.align	64
+.LAES_Te:
+.long	0xa56363c6,0xa56363c6
+.long	0x847c7cf8,0x847c7cf8
+.long	0x997777ee,0x997777ee
+.long	0x8d7b7bf6,0x8d7b7bf6
+.long	0x0df2f2ff,0x0df2f2ff
+.long	0xbd6b6bd6,0xbd6b6bd6
+.long	0xb16f6fde,0xb16f6fde
+.long	0x54c5c591,0x54c5c591
+.long	0x50303060,0x50303060
+.long	0x03010102,0x03010102
+.long	0xa96767ce,0xa96767ce
+.long	0x7d2b2b56,0x7d2b2b56
+.long	0x19fefee7,0x19fefee7
+.long	0x62d7d7b5,0x62d7d7b5
+.long	0xe6abab4d,0xe6abab4d
+.long	0x9a7676ec,0x9a7676ec
+.long	0x45caca8f,0x45caca8f
+.long	0x9d82821f,0x9d82821f
+.long	0x40c9c989,0x40c9c989
+.long	0x877d7dfa,0x877d7dfa
+.long	0x15fafaef,0x15fafaef
+.long	0xeb5959b2,0xeb5959b2
+.long	0xc947478e,0xc947478e
+.long	0x0bf0f0fb,0x0bf0f0fb
+.long	0xecadad41,0xecadad41
+.long	0x67d4d4b3,0x67d4d4b3
+.long	0xfda2a25f,0xfda2a25f
+.long	0xeaafaf45,0xeaafaf45
+.long	0xbf9c9c23,0xbf9c9c23
+.long	0xf7a4a453,0xf7a4a453
+.long	0x967272e4,0x967272e4
+.long	0x5bc0c09b,0x5bc0c09b
+.long	0xc2b7b775,0xc2b7b775
+.long	0x1cfdfde1,0x1cfdfde1
+.long	0xae93933d,0xae93933d
+.long	0x6a26264c,0x6a26264c
+.long	0x5a36366c,0x5a36366c
+.long	0x413f3f7e,0x413f3f7e
+.long	0x02f7f7f5,0x02f7f7f5
+.long	0x4fcccc83,0x4fcccc83
+.long	0x5c343468,0x5c343468
+.long	0xf4a5a551,0xf4a5a551
+.long	0x34e5e5d1,0x34e5e5d1
+.long	0x08f1f1f9,0x08f1f1f9
+.long	0x937171e2,0x937171e2
+.long	0x73d8d8ab,0x73d8d8ab
+.long	0x53313162,0x53313162
+.long	0x3f15152a,0x3f15152a
+.long	0x0c040408,0x0c040408
+.long	0x52c7c795,0x52c7c795
+.long	0x65232346,0x65232346
+.long	0x5ec3c39d,0x5ec3c39d
+.long	0x28181830,0x28181830
+.long	0xa1969637,0xa1969637
+.long	0x0f05050a,0x0f05050a
+.long	0xb59a9a2f,0xb59a9a2f
+.long	0x0907070e,0x0907070e
+.long	0x36121224,0x36121224
+.long	0x9b80801b,0x9b80801b
+.long	0x3de2e2df,0x3de2e2df
+.long	0x26ebebcd,0x26ebebcd
+.long	0x6927274e,0x6927274e
+.long	0xcdb2b27f,0xcdb2b27f
+.long	0x9f7575ea,0x9f7575ea
+.long	0x1b090912,0x1b090912
+.long	0x9e83831d,0x9e83831d
+.long	0x742c2c58,0x742c2c58
+.long	0x2e1a1a34,0x2e1a1a34
+.long	0x2d1b1b36,0x2d1b1b36
+.long	0xb26e6edc,0xb26e6edc
+.long	0xee5a5ab4,0xee5a5ab4
+.long	0xfba0a05b,0xfba0a05b
+.long	0xf65252a4,0xf65252a4
+.long	0x4d3b3b76,0x4d3b3b76
+.long	0x61d6d6b7,0x61d6d6b7
+.long	0xceb3b37d,0xceb3b37d
+.long	0x7b292952,0x7b292952
+.long	0x3ee3e3dd,0x3ee3e3dd
+.long	0x712f2f5e,0x712f2f5e
+.long	0x97848413,0x97848413
+.long	0xf55353a6,0xf55353a6
+.long	0x68d1d1b9,0x68d1d1b9
+.long	0x00000000,0x00000000
+.long	0x2cededc1,0x2cededc1
+.long	0x60202040,0x60202040
+.long	0x1ffcfce3,0x1ffcfce3
+.long	0xc8b1b179,0xc8b1b179
+.long	0xed5b5bb6,0xed5b5bb6
+.long	0xbe6a6ad4,0xbe6a6ad4
+.long	0x46cbcb8d,0x46cbcb8d
+.long	0xd9bebe67,0xd9bebe67
+.long	0x4b393972,0x4b393972
+.long	0xde4a4a94,0xde4a4a94
+.long	0xd44c4c98,0xd44c4c98
+.long	0xe85858b0,0xe85858b0
+.long	0x4acfcf85,0x4acfcf85
+.long	0x6bd0d0bb,0x6bd0d0bb
+.long	0x2aefefc5,0x2aefefc5
+.long	0xe5aaaa4f,0xe5aaaa4f
+.long	0x16fbfbed,0x16fbfbed
+.long	0xc5434386,0xc5434386
+.long	0xd74d4d9a,0xd74d4d9a
+.long	0x55333366,0x55333366
+.long	0x94858511,0x94858511
+.long	0xcf45458a,0xcf45458a
+.long	0x10f9f9e9,0x10f9f9e9
+.long	0x06020204,0x06020204
+.long	0x817f7ffe,0x817f7ffe
+.long	0xf05050a0,0xf05050a0
+.long	0x443c3c78,0x443c3c78
+.long	0xba9f9f25,0xba9f9f25
+.long	0xe3a8a84b,0xe3a8a84b
+.long	0xf35151a2,0xf35151a2
+.long	0xfea3a35d,0xfea3a35d
+.long	0xc0404080,0xc0404080
+.long	0x8a8f8f05,0x8a8f8f05
+.long	0xad92923f,0xad92923f
+.long	0xbc9d9d21,0xbc9d9d21
+.long	0x48383870,0x48383870
+.long	0x04f5f5f1,0x04f5f5f1
+.long	0xdfbcbc63,0xdfbcbc63
+.long	0xc1b6b677,0xc1b6b677
+.long	0x75dadaaf,0x75dadaaf
+.long	0x63212142,0x63212142
+.long	0x30101020,0x30101020
+.long	0x1affffe5,0x1affffe5
+.long	0x0ef3f3fd,0x0ef3f3fd
+.long	0x6dd2d2bf,0x6dd2d2bf
+.long	0x4ccdcd81,0x4ccdcd81
+.long	0x140c0c18,0x140c0c18
+.long	0x35131326,0x35131326
+.long	0x2fececc3,0x2fececc3
+.long	0xe15f5fbe,0xe15f5fbe
+.long	0xa2979735,0xa2979735
+.long	0xcc444488,0xcc444488
+.long	0x3917172e,0x3917172e
+.long	0x57c4c493,0x57c4c493
+.long	0xf2a7a755,0xf2a7a755
+.long	0x827e7efc,0x827e7efc
+.long	0x473d3d7a,0x473d3d7a
+.long	0xac6464c8,0xac6464c8
+.long	0xe75d5dba,0xe75d5dba
+.long	0x2b191932,0x2b191932
+.long	0x957373e6,0x957373e6
+.long	0xa06060c0,0xa06060c0
+.long	0x98818119,0x98818119
+.long	0xd14f4f9e,0xd14f4f9e
+.long	0x7fdcdca3,0x7fdcdca3
+.long	0x66222244,0x66222244
+.long	0x7e2a2a54,0x7e2a2a54
+.long	0xab90903b,0xab90903b
+.long	0x8388880b,0x8388880b
+.long	0xca46468c,0xca46468c
+.long	0x29eeeec7,0x29eeeec7
+.long	0xd3b8b86b,0xd3b8b86b
+.long	0x3c141428,0x3c141428
+.long	0x79dedea7,0x79dedea7
+.long	0xe25e5ebc,0xe25e5ebc
+.long	0x1d0b0b16,0x1d0b0b16
+.long	0x76dbdbad,0x76dbdbad
+.long	0x3be0e0db,0x3be0e0db
+.long	0x56323264,0x56323264
+.long	0x4e3a3a74,0x4e3a3a74
+.long	0x1e0a0a14,0x1e0a0a14
+.long	0xdb494992,0xdb494992
+.long	0x0a06060c,0x0a06060c
+.long	0x6c242448,0x6c242448
+.long	0xe45c5cb8,0xe45c5cb8
+.long	0x5dc2c29f,0x5dc2c29f
+.long	0x6ed3d3bd,0x6ed3d3bd
+.long	0xefacac43,0xefacac43
+.long	0xa66262c4,0xa66262c4
+.long	0xa8919139,0xa8919139
+.long	0xa4959531,0xa4959531
+.long	0x37e4e4d3,0x37e4e4d3
+.long	0x8b7979f2,0x8b7979f2
+.long	0x32e7e7d5,0x32e7e7d5
+.long	0x43c8c88b,0x43c8c88b
+.long	0x5937376e,0x5937376e
+.long	0xb76d6dda,0xb76d6dda
+.long	0x8c8d8d01,0x8c8d8d01
+.long	0x64d5d5b1,0x64d5d5b1
+.long	0xd24e4e9c,0xd24e4e9c
+.long	0xe0a9a949,0xe0a9a949
+.long	0xb46c6cd8,0xb46c6cd8
+.long	0xfa5656ac,0xfa5656ac
+.long	0x07f4f4f3,0x07f4f4f3
+.long	0x25eaeacf,0x25eaeacf
+.long	0xaf6565ca,0xaf6565ca
+.long	0x8e7a7af4,0x8e7a7af4
+.long	0xe9aeae47,0xe9aeae47
+.long	0x18080810,0x18080810
+.long	0xd5baba6f,0xd5baba6f
+.long	0x887878f0,0x887878f0
+.long	0x6f25254a,0x6f25254a
+.long	0x722e2e5c,0x722e2e5c
+.long	0x241c1c38,0x241c1c38
+.long	0xf1a6a657,0xf1a6a657
+.long	0xc7b4b473,0xc7b4b473
+.long	0x51c6c697,0x51c6c697
+.long	0x23e8e8cb,0x23e8e8cb
+.long	0x7cdddda1,0x7cdddda1
+.long	0x9c7474e8,0x9c7474e8
+.long	0x211f1f3e,0x211f1f3e
+.long	0xdd4b4b96,0xdd4b4b96
+.long	0xdcbdbd61,0xdcbdbd61
+.long	0x868b8b0d,0x868b8b0d
+.long	0x858a8a0f,0x858a8a0f
+.long	0x907070e0,0x907070e0
+.long	0x423e3e7c,0x423e3e7c
+.long	0xc4b5b571,0xc4b5b571
+.long	0xaa6666cc,0xaa6666cc
+.long	0xd8484890,0xd8484890
+.long	0x05030306,0x05030306
+.long	0x01f6f6f7,0x01f6f6f7
+.long	0x120e0e1c,0x120e0e1c
+.long	0xa36161c2,0xa36161c2
+.long	0x5f35356a,0x5f35356a
+.long	0xf95757ae,0xf95757ae
+.long	0xd0b9b969,0xd0b9b969
+.long	0x91868617,0x91868617
+.long	0x58c1c199,0x58c1c199
+.long	0x271d1d3a,0x271d1d3a
+.long	0xb99e9e27,0xb99e9e27
+.long	0x38e1e1d9,0x38e1e1d9
+.long	0x13f8f8eb,0x13f8f8eb
+.long	0xb398982b,0xb398982b
+.long	0x33111122,0x33111122
+.long	0xbb6969d2,0xbb6969d2
+.long	0x70d9d9a9,0x70d9d9a9
+.long	0x898e8e07,0x898e8e07
+.long	0xa7949433,0xa7949433
+.long	0xb69b9b2d,0xb69b9b2d
+.long	0x221e1e3c,0x221e1e3c
+.long	0x92878715,0x92878715
+.long	0x20e9e9c9,0x20e9e9c9
+.long	0x49cece87,0x49cece87
+.long	0xff5555aa,0xff5555aa
+.long	0x78282850,0x78282850
+.long	0x7adfdfa5,0x7adfdfa5
+.long	0x8f8c8c03,0x8f8c8c03
+.long	0xf8a1a159,0xf8a1a159
+.long	0x80898909,0x80898909
+.long	0x170d0d1a,0x170d0d1a
+.long	0xdabfbf65,0xdabfbf65
+.long	0x31e6e6d7,0x31e6e6d7
+.long	0xc6424284,0xc6424284
+.long	0xb86868d0,0xb86868d0
+.long	0xc3414182,0xc3414182
+.long	0xb0999929,0xb0999929
+.long	0x772d2d5a,0x772d2d5a
+.long	0x110f0f1e,0x110f0f1e
+.long	0xcbb0b07b,0xcbb0b07b
+.long	0xfc5454a8,0xfc5454a8
+.long	0xd6bbbb6d,0xd6bbbb6d
+.long	0x3a16162c,0x3a16162c
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.long	0x00000001, 0x00000002, 0x00000004, 0x00000008
+.long	0x00000010, 0x00000020, 0x00000040, 0x00000080
+.long	0x0000001b, 0x00000036, 0x80808080, 0x80808080
+.long	0xfefefefe, 0xfefefefe, 0x1b1b1b1b, 0x1b1b1b1b
+.align	64
+.LAES_Td:
+.long	0x50a7f451,0x50a7f451
+.long	0x5365417e,0x5365417e
+.long	0xc3a4171a,0xc3a4171a
+.long	0x965e273a,0x965e273a
+.long	0xcb6bab3b,0xcb6bab3b
+.long	0xf1459d1f,0xf1459d1f
+.long	0xab58faac,0xab58faac
+.long	0x9303e34b,0x9303e34b
+.long	0x55fa3020,0x55fa3020
+.long	0xf66d76ad,0xf66d76ad
+.long	0x9176cc88,0x9176cc88
+.long	0x254c02f5,0x254c02f5
+.long	0xfcd7e54f,0xfcd7e54f
+.long	0xd7cb2ac5,0xd7cb2ac5
+.long	0x80443526,0x80443526
+.long	0x8fa362b5,0x8fa362b5
+.long	0x495ab1de,0x495ab1de
+.long	0x671bba25,0x671bba25
+.long	0x980eea45,0x980eea45
+.long	0xe1c0fe5d,0xe1c0fe5d
+.long	0x02752fc3,0x02752fc3
+.long	0x12f04c81,0x12f04c81
+.long	0xa397468d,0xa397468d
+.long	0xc6f9d36b,0xc6f9d36b
+.long	0xe75f8f03,0xe75f8f03
+.long	0x959c9215,0x959c9215
+.long	0xeb7a6dbf,0xeb7a6dbf
+.long	0xda595295,0xda595295
+.long	0x2d83bed4,0x2d83bed4
+.long	0xd3217458,0xd3217458
+.long	0x2969e049,0x2969e049
+.long	0x44c8c98e,0x44c8c98e
+.long	0x6a89c275,0x6a89c275
+.long	0x78798ef4,0x78798ef4
+.long	0x6b3e5899,0x6b3e5899
+.long	0xdd71b927,0xdd71b927
+.long	0xb64fe1be,0xb64fe1be
+.long	0x17ad88f0,0x17ad88f0
+.long	0x66ac20c9,0x66ac20c9
+.long	0xb43ace7d,0xb43ace7d
+.long	0x184adf63,0x184adf63
+.long	0x82311ae5,0x82311ae5
+.long	0x60335197,0x60335197
+.long	0x457f5362,0x457f5362
+.long	0xe07764b1,0xe07764b1
+.long	0x84ae6bbb,0x84ae6bbb
+.long	0x1ca081fe,0x1ca081fe
+.long	0x942b08f9,0x942b08f9
+.long	0x58684870,0x58684870
+.long	0x19fd458f,0x19fd458f
+.long	0x876cde94,0x876cde94
+.long	0xb7f87b52,0xb7f87b52
+.long	0x23d373ab,0x23d373ab
+.long	0xe2024b72,0xe2024b72
+.long	0x578f1fe3,0x578f1fe3
+.long	0x2aab5566,0x2aab5566
+.long	0x0728ebb2,0x0728ebb2
+.long	0x03c2b52f,0x03c2b52f
+.long	0x9a7bc586,0x9a7bc586
+.long	0xa50837d3,0xa50837d3
+.long	0xf2872830,0xf2872830
+.long	0xb2a5bf23,0xb2a5bf23
+.long	0xba6a0302,0xba6a0302
+.long	0x5c8216ed,0x5c8216ed
+.long	0x2b1ccf8a,0x2b1ccf8a
+.long	0x92b479a7,0x92b479a7
+.long	0xf0f207f3,0xf0f207f3
+.long	0xa1e2694e,0xa1e2694e
+.long	0xcdf4da65,0xcdf4da65
+.long	0xd5be0506,0xd5be0506
+.long	0x1f6234d1,0x1f6234d1
+.long	0x8afea6c4,0x8afea6c4
+.long	0x9d532e34,0x9d532e34
+.long	0xa055f3a2,0xa055f3a2
+.long	0x32e18a05,0x32e18a05
+.long	0x75ebf6a4,0x75ebf6a4
+.long	0x39ec830b,0x39ec830b
+.long	0xaaef6040,0xaaef6040
+.long	0x069f715e,0x069f715e
+.long	0x51106ebd,0x51106ebd
+.long	0xf98a213e,0xf98a213e
+.long	0x3d06dd96,0x3d06dd96
+.long	0xae053edd,0xae053edd
+.long	0x46bde64d,0x46bde64d
+.long	0xb58d5491,0xb58d5491
+.long	0x055dc471,0x055dc471
+.long	0x6fd40604,0x6fd40604
+.long	0xff155060,0xff155060
+.long	0x24fb9819,0x24fb9819
+.long	0x97e9bdd6,0x97e9bdd6
+.long	0xcc434089,0xcc434089
+.long	0x779ed967,0x779ed967
+.long	0xbd42e8b0,0xbd42e8b0
+.long	0x888b8907,0x888b8907
+.long	0x385b19e7,0x385b19e7
+.long	0xdbeec879,0xdbeec879
+.long	0x470a7ca1,0x470a7ca1
+.long	0xe90f427c,0xe90f427c
+.long	0xc91e84f8,0xc91e84f8
+.long	0x00000000,0x00000000
+.long	0x83868009,0x83868009
+.long	0x48ed2b32,0x48ed2b32
+.long	0xac70111e,0xac70111e
+.long	0x4e725a6c,0x4e725a6c
+.long	0xfbff0efd,0xfbff0efd
+.long	0x5638850f,0x5638850f
+.long	0x1ed5ae3d,0x1ed5ae3d
+.long	0x27392d36,0x27392d36
+.long	0x64d90f0a,0x64d90f0a
+.long	0x21a65c68,0x21a65c68
+.long	0xd1545b9b,0xd1545b9b
+.long	0x3a2e3624,0x3a2e3624
+.long	0xb1670a0c,0xb1670a0c
+.long	0x0fe75793,0x0fe75793
+.long	0xd296eeb4,0xd296eeb4
+.long	0x9e919b1b,0x9e919b1b
+.long	0x4fc5c080,0x4fc5c080
+.long	0xa220dc61,0xa220dc61
+.long	0x694b775a,0x694b775a
+.long	0x161a121c,0x161a121c
+.long	0x0aba93e2,0x0aba93e2
+.long	0xe52aa0c0,0xe52aa0c0
+.long	0x43e0223c,0x43e0223c
+.long	0x1d171b12,0x1d171b12
+.long	0x0b0d090e,0x0b0d090e
+.long	0xadc78bf2,0xadc78bf2
+.long	0xb9a8b62d,0xb9a8b62d
+.long	0xc8a91e14,0xc8a91e14
+.long	0x8519f157,0x8519f157
+.long	0x4c0775af,0x4c0775af
+.long	0xbbdd99ee,0xbbdd99ee
+.long	0xfd607fa3,0xfd607fa3
+.long	0x9f2601f7,0x9f2601f7
+.long	0xbcf5725c,0xbcf5725c
+.long	0xc53b6644,0xc53b6644
+.long	0x347efb5b,0x347efb5b
+.long	0x7629438b,0x7629438b
+.long	0xdcc623cb,0xdcc623cb
+.long	0x68fcedb6,0x68fcedb6
+.long	0x63f1e4b8,0x63f1e4b8
+.long	0xcadc31d7,0xcadc31d7
+.long	0x10856342,0x10856342
+.long	0x40229713,0x40229713
+.long	0x2011c684,0x2011c684
+.long	0x7d244a85,0x7d244a85
+.long	0xf83dbbd2,0xf83dbbd2
+.long	0x1132f9ae,0x1132f9ae
+.long	0x6da129c7,0x6da129c7
+.long	0x4b2f9e1d,0x4b2f9e1d
+.long	0xf330b2dc,0xf330b2dc
+.long	0xec52860d,0xec52860d
+.long	0xd0e3c177,0xd0e3c177
+.long	0x6c16b32b,0x6c16b32b
+.long	0x99b970a9,0x99b970a9
+.long	0xfa489411,0xfa489411
+.long	0x2264e947,0x2264e947
+.long	0xc48cfca8,0xc48cfca8
+.long	0x1a3ff0a0,0x1a3ff0a0
+.long	0xd82c7d56,0xd82c7d56
+.long	0xef903322,0xef903322
+.long	0xc74e4987,0xc74e4987
+.long	0xc1d138d9,0xc1d138d9
+.long	0xfea2ca8c,0xfea2ca8c
+.long	0x360bd498,0x360bd498
+.long	0xcf81f5a6,0xcf81f5a6
+.long	0x28de7aa5,0x28de7aa5
+.long	0x268eb7da,0x268eb7da
+.long	0xa4bfad3f,0xa4bfad3f
+.long	0xe49d3a2c,0xe49d3a2c
+.long	0x0d927850,0x0d927850
+.long	0x9bcc5f6a,0x9bcc5f6a
+.long	0x62467e54,0x62467e54
+.long	0xc2138df6,0xc2138df6
+.long	0xe8b8d890,0xe8b8d890
+.long	0x5ef7392e,0x5ef7392e
+.long	0xf5afc382,0xf5afc382
+.long	0xbe805d9f,0xbe805d9f
+.long	0x7c93d069,0x7c93d069
+.long	0xa92dd56f,0xa92dd56f
+.long	0xb31225cf,0xb31225cf
+.long	0x3b99acc8,0x3b99acc8
+.long	0xa77d1810,0xa77d1810
+.long	0x6e639ce8,0x6e639ce8
+.long	0x7bbb3bdb,0x7bbb3bdb
+.long	0x097826cd,0x097826cd
+.long	0xf418596e,0xf418596e
+.long	0x01b79aec,0x01b79aec
+.long	0xa89a4f83,0xa89a4f83
+.long	0x656e95e6,0x656e95e6
+.long	0x7ee6ffaa,0x7ee6ffaa
+.long	0x08cfbc21,0x08cfbc21
+.long	0xe6e815ef,0xe6e815ef
+.long	0xd99be7ba,0xd99be7ba
+.long	0xce366f4a,0xce366f4a
+.long	0xd4099fea,0xd4099fea
+.long	0xd67cb029,0xd67cb029
+.long	0xafb2a431,0xafb2a431
+.long	0x31233f2a,0x31233f2a
+.long	0x3094a5c6,0x3094a5c6
+.long	0xc066a235,0xc066a235
+.long	0x37bc4e74,0x37bc4e74
+.long	0xa6ca82fc,0xa6ca82fc
+.long	0xb0d090e0,0xb0d090e0
+.long	0x15d8a733,0x15d8a733
+.long	0x4a9804f1,0x4a9804f1
+.long	0xf7daec41,0xf7daec41
+.long	0x0e50cd7f,0x0e50cd7f
+.long	0x2ff69117,0x2ff69117
+.long	0x8dd64d76,0x8dd64d76
+.long	0x4db0ef43,0x4db0ef43
+.long	0x544daacc,0x544daacc
+.long	0xdf0496e4,0xdf0496e4
+.long	0xe3b5d19e,0xe3b5d19e
+.long	0x1b886a4c,0x1b886a4c
+.long	0xb81f2cc1,0xb81f2cc1
+.long	0x7f516546,0x7f516546
+.long	0x04ea5e9d,0x04ea5e9d
+.long	0x5d358c01,0x5d358c01
+.long	0x737487fa,0x737487fa
+.long	0x2e410bfb,0x2e410bfb
+.long	0x5a1d67b3,0x5a1d67b3
+.long	0x52d2db92,0x52d2db92
+.long	0x335610e9,0x335610e9
+.long	0x1347d66d,0x1347d66d
+.long	0x8c61d79a,0x8c61d79a
+.long	0x7a0ca137,0x7a0ca137
+.long	0x8e14f859,0x8e14f859
+.long	0x893c13eb,0x893c13eb
+.long	0xee27a9ce,0xee27a9ce
+.long	0x35c961b7,0x35c961b7
+.long	0xede51ce1,0xede51ce1
+.long	0x3cb1477a,0x3cb1477a
+.long	0x59dfd29c,0x59dfd29c
+.long	0x3f73f255,0x3f73f255
+.long	0x79ce1418,0x79ce1418
+.long	0xbf37c773,0xbf37c773
+.long	0xeacdf753,0xeacdf753
+.long	0x5baafd5f,0x5baafd5f
+.long	0x146f3ddf,0x146f3ddf
+.long	0x86db4478,0x86db4478
+.long	0x81f3afca,0x81f3afca
+.long	0x3ec468b9,0x3ec468b9
+.long	0x2c342438,0x2c342438
+.long	0x5f40a3c2,0x5f40a3c2
+.long	0x72c31d16,0x72c31d16
+.long	0x0c25e2bc,0x0c25e2bc
+.long	0x8b493c28,0x8b493c28
+.long	0x41950dff,0x41950dff
+.long	0x7101a839,0x7101a839
+.long	0xdeb30c08,0xdeb30c08
+.long	0x9ce4b4d8,0x9ce4b4d8
+.long	0x90c15664,0x90c15664
+.long	0x6184cb7b,0x6184cb7b
+.long	0x70b632d5,0x70b632d5
+.long	0x745c6c48,0x745c6c48
+.long	0x4257b8d0,0x4257b8d0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	64
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S
new file mode 100644
index 0000000..1d51d5b
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/aes/aesni-x86_64.S
@@ -0,0 +1,3565 @@
+#if defined(__x86_64__)
+.text	
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+.globl	aesni_encrypt
+.hidden aesni_encrypt
+.type	aesni_encrypt,@function
+.align	16
+aesni_encrypt:
+	movups	(%rdi),%xmm2
+	movl	240(%rdx),%eax
+	movups	(%rdx),%xmm0
+	movups	16(%rdx),%xmm1
+	leaq	32(%rdx),%rdx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_1:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rdx),%xmm1
+	leaq	16(%rdx),%rdx
+	jnz	.Loop_enc1_1
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	.byte	0xf3,0xc3
+.size	aesni_encrypt,.-aesni_encrypt
+
+.globl	aesni_decrypt
+.hidden aesni_decrypt
+.type	aesni_decrypt,@function
+.align	16
+aesni_decrypt:
+	movups	(%rdi),%xmm2
+	movl	240(%rdx),%eax
+	movups	(%rdx),%xmm0
+	movups	16(%rdx),%xmm1
+	leaq	32(%rdx),%rdx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_2:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rdx),%xmm1
+	leaq	16(%rdx),%rdx
+	jnz	.Loop_dec1_2
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	.byte	0xf3,0xc3
+.size	aesni_decrypt, .-aesni_decrypt
+.type	_aesni_encrypt2,@function
+.align	16
+_aesni_encrypt2:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+.Lenc_loop2:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lenc_loop2
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	.byte	0xf3,0xc3
+.size	_aesni_encrypt2,.-_aesni_encrypt2
+.type	_aesni_decrypt2,@function
+.align	16
+_aesni_decrypt2:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+.Ldec_loop2:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Ldec_loop2
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+	.byte	0xf3,0xc3
+.size	_aesni_decrypt2,.-_aesni_decrypt2
+.type	_aesni_encrypt3,@function
+.align	16
+_aesni_encrypt3:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+.Lenc_loop3:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lenc_loop3
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+	.byte	0xf3,0xc3
+.size	_aesni_encrypt3,.-_aesni_encrypt3
+.type	_aesni_decrypt3,@function
+.align	16
+_aesni_decrypt3:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+.Ldec_loop3:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Ldec_loop3
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+	.byte	0xf3,0xc3
+.size	_aesni_decrypt3,.-_aesni_decrypt3
+.type	_aesni_encrypt4,@function
+.align	16
+_aesni_encrypt4:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	xorps	%xmm0,%xmm5
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	0x0f,0x1f,0x00
+	addq	$16,%rax
+
+.Lenc_loop4:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lenc_loop4
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+	.byte	0xf3,0xc3
+.size	_aesni_encrypt4,.-_aesni_encrypt4
+.type	_aesni_decrypt4,@function
+.align	16
+_aesni_decrypt4:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	xorps	%xmm0,%xmm5
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	0x0f,0x1f,0x00
+	addq	$16,%rax
+
+.Ldec_loop4:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Ldec_loop4
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+	.byte	0xf3,0xc3
+.size	_aesni_decrypt4,.-_aesni_decrypt4
+.type	_aesni_encrypt6,@function
+.align	16
+_aesni_encrypt6:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,220,209
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,220,225
+	pxor	%xmm0,%xmm7
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	.Lenc_loop6_enter
+.align	16
+.Lenc_loop6:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.Lenc_loop6_enter:
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lenc_loop6
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+	.byte	0xf3,0xc3
+.size	_aesni_encrypt6,.-_aesni_encrypt6
+.type	_aesni_decrypt6,@function
+.align	16
+_aesni_decrypt6:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,222,209
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,222,225
+	pxor	%xmm0,%xmm7
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	.Ldec_loop6_enter
+.align	16
+.Ldec_loop6:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.Ldec_loop6_enter:
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Ldec_loop6
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+	.byte	0xf3,0xc3
+.size	_aesni_decrypt6,.-_aesni_decrypt6
+.type	_aesni_encrypt8,@function
+.align	16
+_aesni_encrypt8:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm9
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	.Lenc_loop8_inner
+.align	16
+.Lenc_loop8:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.Lenc_loop8_inner:
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+.Lenc_loop8_enter:
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lenc_loop8
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+.byte	102,68,15,56,221,192
+.byte	102,68,15,56,221,200
+	.byte	0xf3,0xc3
+.size	_aesni_encrypt8,.-_aesni_encrypt8
+.type	_aesni_decrypt8,@function
+.align	16
+_aesni_decrypt8:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm9
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	.Ldec_loop8_inner
+.align	16
+.Ldec_loop8:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.Ldec_loop8_inner:
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+.Ldec_loop8_enter:
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Ldec_loop8
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+.byte	102,68,15,56,223,192
+.byte	102,68,15,56,223,200
+	.byte	0xf3,0xc3
+.size	_aesni_decrypt8,.-_aesni_decrypt8
+.globl	aesni_ecb_encrypt
+.hidden aesni_ecb_encrypt
+.type	aesni_ecb_encrypt,@function
+.align	16
+aesni_ecb_encrypt:
+	andq	$-16,%rdx
+	jz	.Lecb_ret
+
+	movl	240(%rcx),%eax
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%eax,%r10d
+	testl	%r8d,%r8d
+	jz	.Lecb_decrypt
+
+	cmpq	$128,%rdx
+	jb	.Lecb_enc_tail
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	movdqu	48(%rdi),%xmm5
+	movdqu	64(%rdi),%xmm6
+	movdqu	80(%rdi),%xmm7
+	movdqu	96(%rdi),%xmm8
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+	subq	$128,%rdx
+	jmp	.Lecb_enc_loop8_enter
+.align	16
+.Lecb_enc_loop8:
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movdqu	(%rdi),%xmm2
+	movl	%r10d,%eax
+	movups	%xmm3,16(%rsi)
+	movdqu	16(%rdi),%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqu	32(%rdi),%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqu	48(%rdi),%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqu	64(%rdi),%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqu	80(%rdi),%xmm7
+	movups	%xmm8,96(%rsi)
+	movdqu	96(%rdi),%xmm8
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+.Lecb_enc_loop8_enter:
+
+	call	_aesni_encrypt8
+
+	subq	$128,%rdx
+	jnc	.Lecb_enc_loop8
+
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movups	%xmm3,16(%rsi)
+	movl	%r10d,%eax
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	movups	%xmm8,96(%rsi)
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	addq	$128,%rdx
+	jz	.Lecb_ret
+
+.Lecb_enc_tail:
+	movups	(%rdi),%xmm2
+	cmpq	$32,%rdx
+	jb	.Lecb_enc_one
+	movups	16(%rdi),%xmm3
+	je	.Lecb_enc_two
+	movups	32(%rdi),%xmm4
+	cmpq	$64,%rdx
+	jb	.Lecb_enc_three
+	movups	48(%rdi),%xmm5
+	je	.Lecb_enc_four
+	movups	64(%rdi),%xmm6
+	cmpq	$96,%rdx
+	jb	.Lecb_enc_five
+	movups	80(%rdi),%xmm7
+	je	.Lecb_enc_six
+	movdqu	96(%rdi),%xmm8
+	xorps	%xmm9,%xmm9
+	call	_aesni_encrypt8
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	movups	%xmm8,96(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_one:
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_3:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_3
+.byte	102,15,56,221,209
+	movups	%xmm2,(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_two:
+	call	_aesni_encrypt2
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_three:
+	call	_aesni_encrypt3
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_four:
+	call	_aesni_encrypt4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_five:
+	xorps	%xmm7,%xmm7
+	call	_aesni_encrypt6
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	jmp	.Lecb_ret
+.align	16
+.Lecb_enc_six:
+	call	_aesni_encrypt6
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	jmp	.Lecb_ret
+
+.align	16
+.Lecb_decrypt:
+	cmpq	$128,%rdx
+	jb	.Lecb_dec_tail
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	movdqu	48(%rdi),%xmm5
+	movdqu	64(%rdi),%xmm6
+	movdqu	80(%rdi),%xmm7
+	movdqu	96(%rdi),%xmm8
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+	subq	$128,%rdx
+	jmp	.Lecb_dec_loop8_enter
+.align	16
+.Lecb_dec_loop8:
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movdqu	(%rdi),%xmm2
+	movl	%r10d,%eax
+	movups	%xmm3,16(%rsi)
+	movdqu	16(%rdi),%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqu	32(%rdi),%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqu	48(%rdi),%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqu	64(%rdi),%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqu	80(%rdi),%xmm7
+	movups	%xmm8,96(%rsi)
+	movdqu	96(%rdi),%xmm8
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+.Lecb_dec_loop8_enter:
+
+	call	_aesni_decrypt8
+
+	movups	(%r11),%xmm0
+	subq	$128,%rdx
+	jnc	.Lecb_dec_loop8
+
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movq	%r11,%rcx
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movl	%r10d,%eax
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	movups	%xmm8,96(%rsi)
+	pxor	%xmm8,%xmm8
+	movups	%xmm9,112(%rsi)
+	pxor	%xmm9,%xmm9
+	leaq	128(%rsi),%rsi
+	addq	$128,%rdx
+	jz	.Lecb_ret
+
+.Lecb_dec_tail:
+	movups	(%rdi),%xmm2
+	cmpq	$32,%rdx
+	jb	.Lecb_dec_one
+	movups	16(%rdi),%xmm3
+	je	.Lecb_dec_two
+	movups	32(%rdi),%xmm4
+	cmpq	$64,%rdx
+	jb	.Lecb_dec_three
+	movups	48(%rdi),%xmm5
+	je	.Lecb_dec_four
+	movups	64(%rdi),%xmm6
+	cmpq	$96,%rdx
+	jb	.Lecb_dec_five
+	movups	80(%rdi),%xmm7
+	je	.Lecb_dec_six
+	movups	96(%rdi),%xmm8
+	movups	(%rcx),%xmm0
+	xorps	%xmm9,%xmm9
+	call	_aesni_decrypt8
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	movups	%xmm8,96(%rsi)
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_one:
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_4:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_4
+.byte	102,15,56,223,209
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_two:
+	call	_aesni_decrypt2
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_three:
+	call	_aesni_decrypt3
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_four:
+	call	_aesni_decrypt4
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_five:
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	jmp	.Lecb_ret
+.align	16
+.Lecb_dec_six:
+	call	_aesni_decrypt6
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+
+.Lecb_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	.byte	0xf3,0xc3
+.size	aesni_ecb_encrypt,.-aesni_ecb_encrypt
+.globl	aesni_ccm64_encrypt_blocks
+.hidden aesni_ccm64_encrypt_blocks
+.type	aesni_ccm64_encrypt_blocks,@function
+.align	16
+aesni_ccm64_encrypt_blocks:
+	movl	240(%rcx),%eax
+	movdqu	(%r8),%xmm6
+	movdqa	.Lincrement64(%rip),%xmm9
+	movdqa	.Lbswap_mask(%rip),%xmm7
+
+	shll	$4,%eax
+	movl	$16,%r10d
+	leaq	0(%rcx),%r11
+	movdqu	(%r9),%xmm3
+	movdqa	%xmm6,%xmm2
+	leaq	32(%rcx,%rax,1),%rcx
+.byte	102,15,56,0,247
+	subq	%rax,%r10
+	jmp	.Lccm64_enc_outer
+.align	16
+.Lccm64_enc_outer:
+	movups	(%r11),%xmm0
+	movq	%r10,%rax
+	movups	(%rdi),%xmm8
+
+	xorps	%xmm0,%xmm2
+	movups	16(%r11),%xmm1
+	xorps	%xmm8,%xmm0
+	xorps	%xmm0,%xmm3
+	movups	32(%r11),%xmm0
+
+.Lccm64_enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lccm64_enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	paddq	%xmm9,%xmm6
+	decq	%rdx
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+
+	leaq	16(%rdi),%rdi
+	xorps	%xmm2,%xmm8
+	movdqa	%xmm6,%xmm2
+	movups	%xmm8,(%rsi)
+.byte	102,15,56,0,215
+	leaq	16(%rsi),%rsi
+	jnz	.Lccm64_enc_outer
+
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,(%r9)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm8,%xmm8
+	pxor	%xmm6,%xmm6
+	.byte	0xf3,0xc3
+.size	aesni_ccm64_encrypt_blocks,.-aesni_ccm64_encrypt_blocks
+.globl	aesni_ccm64_decrypt_blocks
+.hidden aesni_ccm64_decrypt_blocks
+.type	aesni_ccm64_decrypt_blocks,@function
+.align	16
+aesni_ccm64_decrypt_blocks:
+	movl	240(%rcx),%eax
+	movups	(%r8),%xmm6
+	movdqu	(%r9),%xmm3
+	movdqa	.Lincrement64(%rip),%xmm9
+	movdqa	.Lbswap_mask(%rip),%xmm7
+
+	movaps	%xmm6,%xmm2
+	movl	%eax,%r10d
+	movq	%rcx,%r11
+.byte	102,15,56,0,247
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_5:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_5
+.byte	102,15,56,221,209
+	shll	$4,%r10d
+	movl	$16,%eax
+	movups	(%rdi),%xmm8
+	paddq	%xmm9,%xmm6
+	leaq	16(%rdi),%rdi
+	subq	%r10,%rax
+	leaq	32(%r11,%r10,1),%rcx
+	movq	%rax,%r10
+	jmp	.Lccm64_dec_outer
+.align	16
+.Lccm64_dec_outer:
+	xorps	%xmm2,%xmm8
+	movdqa	%xmm6,%xmm2
+	movups	%xmm8,(%rsi)
+	leaq	16(%rsi),%rsi
+.byte	102,15,56,0,215
+
+	subq	$1,%rdx
+	jz	.Lccm64_dec_break
+
+	movups	(%r11),%xmm0
+	movq	%r10,%rax
+	movups	16(%r11),%xmm1
+	xorps	%xmm0,%xmm8
+	xorps	%xmm0,%xmm2
+	xorps	%xmm8,%xmm3
+	movups	32(%r11),%xmm0
+	jmp	.Lccm64_dec2_loop
+.align	16
+.Lccm64_dec2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	.Lccm64_dec2_loop
+	movups	(%rdi),%xmm8
+	paddq	%xmm9,%xmm6
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leaq	16(%rdi),%rdi
+	jmp	.Lccm64_dec_outer
+
+.align	16
+.Lccm64_dec_break:
+
+	movl	240(%r11),%eax
+	movups	(%r11),%xmm0
+	movups	16(%r11),%xmm1
+	xorps	%xmm0,%xmm8
+	leaq	32(%r11),%r11
+	xorps	%xmm8,%xmm3
+.Loop_enc1_6:
+.byte	102,15,56,220,217
+	decl	%eax
+	movups	(%r11),%xmm1
+	leaq	16(%r11),%r11
+	jnz	.Loop_enc1_6
+.byte	102,15,56,221,217
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,(%r9)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm8,%xmm8
+	pxor	%xmm6,%xmm6
+	.byte	0xf3,0xc3
+.size	aesni_ccm64_decrypt_blocks,.-aesni_ccm64_decrypt_blocks
+.globl	aesni_ctr32_encrypt_blocks
+.hidden aesni_ctr32_encrypt_blocks
+.type	aesni_ctr32_encrypt_blocks,@function
+.align	16
+aesni_ctr32_encrypt_blocks:
+	cmpq	$1,%rdx
+	jne	.Lctr32_bulk
+
+
+
+	movups	(%r8),%xmm2
+	movups	(%rdi),%xmm3
+	movl	240(%rcx),%edx
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_7:
+.byte	102,15,56,220,209
+	decl	%edx
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_7
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	xorps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	movups	%xmm2,(%rsi)
+	xorps	%xmm2,%xmm2
+	jmp	.Lctr32_epilogue
+
+.align	16
+.Lctr32_bulk:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$128,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+
+
+
+
+	movdqu	(%r8),%xmm2
+	movdqu	(%rcx),%xmm0
+	movl	12(%r8),%r8d
+	pxor	%xmm0,%xmm2
+	movl	12(%rcx),%r11d
+	movdqa	%xmm2,0(%rsp)
+	bswapl	%r8d
+	movdqa	%xmm2,%xmm3
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm2,%xmm5
+	movdqa	%xmm2,64(%rsp)
+	movdqa	%xmm2,80(%rsp)
+	movdqa	%xmm2,96(%rsp)
+	movq	%rdx,%r10
+	movdqa	%xmm2,112(%rsp)
+
+	leaq	1(%r8),%rax
+	leaq	2(%r8),%rdx
+	bswapl	%eax
+	bswapl	%edx
+	xorl	%r11d,%eax
+	xorl	%r11d,%edx
+.byte	102,15,58,34,216,3
+	leaq	3(%r8),%rax
+	movdqa	%xmm3,16(%rsp)
+.byte	102,15,58,34,226,3
+	bswapl	%eax
+	movq	%r10,%rdx
+	leaq	4(%r8),%r10
+	movdqa	%xmm4,32(%rsp)
+	xorl	%r11d,%eax
+	bswapl	%r10d
+.byte	102,15,58,34,232,3
+	xorl	%r11d,%r10d
+	movdqa	%xmm5,48(%rsp)
+	leaq	5(%r8),%r9
+	movl	%r10d,64+12(%rsp)
+	bswapl	%r9d
+	leaq	6(%r8),%r10
+	movl	240(%rcx),%eax
+	xorl	%r11d,%r9d
+	bswapl	%r10d
+	movl	%r9d,80+12(%rsp)
+	xorl	%r11d,%r10d
+	leaq	7(%r8),%r9
+	movl	%r10d,96+12(%rsp)
+	bswapl	%r9d
+	movl	OPENSSL_ia32cap_P+4(%rip),%r10d
+	xorl	%r11d,%r9d
+	andl	$71303168,%r10d
+	movl	%r9d,112+12(%rsp)
+
+	movups	16(%rcx),%xmm1
+
+	movdqa	64(%rsp),%xmm6
+	movdqa	80(%rsp),%xmm7
+
+	cmpq	$8,%rdx
+	jb	.Lctr32_tail
+
+	subq	$6,%rdx
+	cmpl	$4194304,%r10d
+	je	.Lctr32_6x
+
+	leaq	128(%rcx),%rcx
+	subq	$2,%rdx
+	jmp	.Lctr32_loop8
+
+.align	16
+.Lctr32_6x:
+	shll	$4,%eax
+	movl	$48,%r10d
+	bswapl	%r11d
+	leaq	32(%rcx,%rax,1),%rcx
+	subq	%rax,%r10
+	jmp	.Lctr32_loop6
+
+.align	16
+.Lctr32_loop6:
+	addl	$6,%r8d
+	movups	-48(%rcx,%r10,1),%xmm0
+.byte	102,15,56,220,209
+	movl	%r8d,%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,217
+.byte	0x0f,0x38,0xf1,0x44,0x24,12
+	leal	1(%r8),%eax
+.byte	102,15,56,220,225
+	xorl	%r11d,%eax
+.byte	0x0f,0x38,0xf1,0x44,0x24,28
+.byte	102,15,56,220,233
+	leal	2(%r8),%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,241
+.byte	0x0f,0x38,0xf1,0x44,0x24,44
+	leal	3(%r8),%eax
+.byte	102,15,56,220,249
+	movups	-32(%rcx,%r10,1),%xmm1
+	xorl	%r11d,%eax
+
+.byte	102,15,56,220,208
+.byte	0x0f,0x38,0xf1,0x44,0x24,60
+	leal	4(%r8),%eax
+.byte	102,15,56,220,216
+	xorl	%r11d,%eax
+.byte	0x0f,0x38,0xf1,0x44,0x24,76
+.byte	102,15,56,220,224
+	leal	5(%r8),%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,232
+.byte	0x0f,0x38,0xf1,0x44,0x24,92
+	movq	%r10,%rax
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%rcx,%r10,1),%xmm0
+
+	call	.Lenc_loop6
+
+	movdqu	(%rdi),%xmm8
+	movdqu	16(%rdi),%xmm9
+	movdqu	32(%rdi),%xmm10
+	movdqu	48(%rdi),%xmm11
+	movdqu	64(%rdi),%xmm12
+	movdqu	80(%rdi),%xmm13
+	leaq	96(%rdi),%rdi
+	movups	-64(%rcx,%r10,1),%xmm1
+	pxor	%xmm2,%xmm8
+	movaps	0(%rsp),%xmm2
+	pxor	%xmm3,%xmm9
+	movaps	16(%rsp),%xmm3
+	pxor	%xmm4,%xmm10
+	movaps	32(%rsp),%xmm4
+	pxor	%xmm5,%xmm11
+	movaps	48(%rsp),%xmm5
+	pxor	%xmm6,%xmm12
+	movaps	64(%rsp),%xmm6
+	pxor	%xmm7,%xmm13
+	movaps	80(%rsp),%xmm7
+	movdqu	%xmm8,(%rsi)
+	movdqu	%xmm9,16(%rsi)
+	movdqu	%xmm10,32(%rsi)
+	movdqu	%xmm11,48(%rsi)
+	movdqu	%xmm12,64(%rsi)
+	movdqu	%xmm13,80(%rsi)
+	leaq	96(%rsi),%rsi
+
+	subq	$6,%rdx
+	jnc	.Lctr32_loop6
+
+	addq	$6,%rdx
+	jz	.Lctr32_done
+
+	leal	-48(%r10),%eax
+	leaq	-80(%rcx,%r10,1),%rcx
+	negl	%eax
+	shrl	$4,%eax
+	jmp	.Lctr32_tail
+
+.align	32
+.Lctr32_loop8:
+	addl	$8,%r8d
+	movdqa	96(%rsp),%xmm8
+.byte	102,15,56,220,209
+	movl	%r8d,%r9d
+	movdqa	112(%rsp),%xmm9
+.byte	102,15,56,220,217
+	bswapl	%r9d
+	movups	32-128(%rcx),%xmm0
+.byte	102,15,56,220,225
+	xorl	%r11d,%r9d
+	nop
+.byte	102,15,56,220,233
+	movl	%r9d,0+12(%rsp)
+	leaq	1(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	48-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,16+12(%rsp)
+	leaq	2(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	64-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,32+12(%rsp)
+	leaq	3(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	80-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,48+12(%rsp)
+	leaq	4(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	96-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,64+12(%rsp)
+	leaq	5(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	112-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,80+12(%rsp)
+	leaq	6(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	128-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,96+12(%rsp)
+	leaq	7(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	144-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	xorl	%r11d,%r9d
+	movdqu	0(%rdi),%xmm10
+.byte	102,15,56,220,232
+	movl	%r9d,112+12(%rsp)
+	cmpl	$11,%eax
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	160-128(%rcx),%xmm0
+
+	jb	.Lctr32_enc_done
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	176-128(%rcx),%xmm1
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	192-128(%rcx),%xmm0
+	je	.Lctr32_enc_done
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	208-128(%rcx),%xmm1
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	224-128(%rcx),%xmm0
+	jmp	.Lctr32_enc_done
+
+.align	16
+.Lctr32_enc_done:
+	movdqu	16(%rdi),%xmm11
+	pxor	%xmm0,%xmm10
+	movdqu	32(%rdi),%xmm12
+	pxor	%xmm0,%xmm11
+	movdqu	48(%rdi),%xmm13
+	pxor	%xmm0,%xmm12
+	movdqu	64(%rdi),%xmm14
+	pxor	%xmm0,%xmm13
+	movdqu	80(%rdi),%xmm15
+	pxor	%xmm0,%xmm14
+	pxor	%xmm0,%xmm15
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movdqu	96(%rdi),%xmm1
+	leaq	128(%rdi),%rdi
+
+.byte	102,65,15,56,221,210
+	pxor	%xmm0,%xmm1
+	movdqu	112-128(%rdi),%xmm10
+.byte	102,65,15,56,221,219
+	pxor	%xmm0,%xmm10
+	movdqa	0(%rsp),%xmm11
+.byte	102,65,15,56,221,228
+.byte	102,65,15,56,221,237
+	movdqa	16(%rsp),%xmm12
+	movdqa	32(%rsp),%xmm13
+.byte	102,65,15,56,221,246
+.byte	102,65,15,56,221,255
+	movdqa	48(%rsp),%xmm14
+	movdqa	64(%rsp),%xmm15
+.byte	102,68,15,56,221,193
+	movdqa	80(%rsp),%xmm0
+	movups	16-128(%rcx),%xmm1
+.byte	102,69,15,56,221,202
+
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm11,%xmm2
+	movups	%xmm3,16(%rsi)
+	movdqa	%xmm12,%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqa	%xmm13,%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqa	%xmm14,%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqa	%xmm15,%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqa	%xmm0,%xmm7
+	movups	%xmm8,96(%rsi)
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+
+	subq	$8,%rdx
+	jnc	.Lctr32_loop8
+
+	addq	$8,%rdx
+	jz	.Lctr32_done
+	leaq	-128(%rcx),%rcx
+
+.Lctr32_tail:
+
+
+	leaq	16(%rcx),%rcx
+	cmpq	$4,%rdx
+	jb	.Lctr32_loop3
+	je	.Lctr32_loop4
+
+
+	shll	$4,%eax
+	movdqa	96(%rsp),%xmm8
+	pxor	%xmm9,%xmm9
+
+	movups	16(%rcx),%xmm0
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	leaq	32-16(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,225
+	addq	$16,%rax
+	movups	(%rdi),%xmm10
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+	movups	16(%rdi),%xmm11
+	movups	32(%rdi),%xmm12
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+
+	call	.Lenc_loop8_enter
+
+	movdqu	48(%rdi),%xmm13
+	pxor	%xmm10,%xmm2
+	movdqu	64(%rdi),%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm10,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	movdqu	%xmm6,64(%rsi)
+	cmpq	$6,%rdx
+	jb	.Lctr32_done
+
+	movups	80(%rdi),%xmm11
+	xorps	%xmm11,%xmm7
+	movups	%xmm7,80(%rsi)
+	je	.Lctr32_done
+
+	movups	96(%rdi),%xmm12
+	xorps	%xmm12,%xmm8
+	movups	%xmm8,96(%rsi)
+	jmp	.Lctr32_done
+
+.align	32
+.Lctr32_loop4:
+.byte	102,15,56,220,209
+	leaq	16(%rcx),%rcx
+	decl	%eax
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%rcx),%xmm1
+	jnz	.Lctr32_loop4
+.byte	102,15,56,221,209
+.byte	102,15,56,221,217
+	movups	(%rdi),%xmm10
+	movups	16(%rdi),%xmm11
+.byte	102,15,56,221,225
+.byte	102,15,56,221,233
+	movups	32(%rdi),%xmm12
+	movups	48(%rdi),%xmm13
+
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+	xorps	%xmm11,%xmm3
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm5,48(%rsi)
+	jmp	.Lctr32_done
+
+.align	32
+.Lctr32_loop3:
+.byte	102,15,56,220,209
+	leaq	16(%rcx),%rcx
+	decl	%eax
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%rcx),%xmm1
+	jnz	.Lctr32_loop3
+.byte	102,15,56,221,209
+.byte	102,15,56,221,217
+.byte	102,15,56,221,225
+
+	movups	(%rdi),%xmm10
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+	cmpq	$2,%rdx
+	jb	.Lctr32_done
+
+	movups	16(%rdi),%xmm11
+	xorps	%xmm11,%xmm3
+	movups	%xmm3,16(%rsi)
+	je	.Lctr32_done
+
+	movups	32(%rdi),%xmm12
+	xorps	%xmm12,%xmm4
+	movups	%xmm4,32(%rsi)
+
+.Lctr32_done:
+	xorps	%xmm0,%xmm0
+	xorl	%r11d,%r11d
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	movaps	%xmm0,112(%rsp)
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+.Lctr32_epilogue:
+	.byte	0xf3,0xc3
+.size	aesni_ctr32_encrypt_blocks,.-aesni_ctr32_encrypt_blocks
+.globl	aesni_xts_encrypt
+.hidden aesni_xts_encrypt
+.type	aesni_xts_encrypt,@function
+.align	16
+aesni_xts_encrypt:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$112,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r9),%xmm2
+	movl	240(%r8),%eax
+	movl	240(%rcx),%r10d
+	movups	(%r8),%xmm0
+	movups	16(%r8),%xmm1
+	leaq	32(%r8),%r8
+	xorps	%xmm0,%xmm2
+.Loop_enc1_8:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%r8),%xmm1
+	leaq	16(%r8),%r8
+	jnz	.Loop_enc1_8
+.byte	102,15,56,221,209
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%r10d,%eax
+	shll	$4,%r10d
+	movq	%rdx,%r9
+	andq	$-16,%rdx
+
+	movups	16(%rcx,%r10,1),%xmm1
+
+	movdqa	.Lxts_magic(%rip),%xmm8
+	movdqa	%xmm2,%xmm15
+	pshufd	$95,%xmm2,%xmm9
+	pxor	%xmm0,%xmm1
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm10
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm10
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm11
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm11
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm12
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm12
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm13
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm13
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm15,%xmm14
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm9
+	pxor	%xmm0,%xmm14
+	pxor	%xmm9,%xmm15
+	movaps	%xmm1,96(%rsp)
+
+	subq	$96,%rdx
+	jc	.Lxts_enc_short
+
+	movl	$16+96,%eax
+	leaq	32(%r11,%r10,1),%rcx
+	subq	%r10,%rax
+	movups	16(%r11),%xmm1
+	movq	%rax,%r10
+	leaq	.Lxts_magic(%rip),%r8
+	jmp	.Lxts_enc_grandloop
+
+.align	32
+.Lxts_enc_grandloop:
+	movdqu	0(%rdi),%xmm2
+	movdqa	%xmm0,%xmm8
+	movdqu	16(%rdi),%xmm3
+	pxor	%xmm10,%xmm2
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm11,%xmm3
+.byte	102,15,56,220,209
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm12,%xmm4
+.byte	102,15,56,220,217
+	movdqu	64(%rdi),%xmm6
+	pxor	%xmm13,%xmm5
+.byte	102,15,56,220,225
+	movdqu	80(%rdi),%xmm7
+	pxor	%xmm15,%xmm8
+	movdqa	96(%rsp),%xmm9
+	pxor	%xmm14,%xmm6
+.byte	102,15,56,220,233
+	movups	32(%r11),%xmm0
+	leaq	96(%rdi),%rdi
+	pxor	%xmm8,%xmm7
+
+	pxor	%xmm9,%xmm10
+.byte	102,15,56,220,241
+	pxor	%xmm9,%xmm11
+	movdqa	%xmm10,0(%rsp)
+.byte	102,15,56,220,249
+	movups	48(%r11),%xmm1
+	pxor	%xmm9,%xmm12
+
+.byte	102,15,56,220,208
+	pxor	%xmm9,%xmm13
+	movdqa	%xmm11,16(%rsp)
+.byte	102,15,56,220,216
+	pxor	%xmm9,%xmm14
+	movdqa	%xmm12,32(%rsp)
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	pxor	%xmm9,%xmm8
+	movdqa	%xmm14,64(%rsp)
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	64(%r11),%xmm0
+	movdqa	%xmm8,80(%rsp)
+	pshufd	$95,%xmm15,%xmm9
+	jmp	.Lxts_enc_loop6
+.align	32
+.Lxts_enc_loop6:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	-64(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-80(%rcx,%rax,1),%xmm0
+	jnz	.Lxts_enc_loop6
+
+	movdqa	(%r8),%xmm8
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	paddq	%xmm15,%xmm15
+	psrad	$31,%xmm14
+.byte	102,15,56,220,217
+	pand	%xmm8,%xmm14
+	movups	(%r11),%xmm10
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+	pxor	%xmm14,%xmm15
+	movaps	%xmm10,%xmm11
+.byte	102,15,56,220,249
+	movups	-64(%rcx),%xmm1
+
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,208
+	paddd	%xmm9,%xmm9
+	pxor	%xmm15,%xmm10
+.byte	102,15,56,220,216
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	pand	%xmm8,%xmm14
+	movaps	%xmm11,%xmm12
+.byte	102,15,56,220,240
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,248
+	movups	-48(%rcx),%xmm0
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	pxor	%xmm15,%xmm11
+	psrad	$31,%xmm14
+.byte	102,15,56,220,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movdqa	%xmm13,48(%rsp)
+	pxor	%xmm14,%xmm15
+.byte	102,15,56,220,241
+	movaps	%xmm12,%xmm13
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,249
+	movups	-32(%rcx),%xmm1
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,208
+	pxor	%xmm15,%xmm12
+	psrad	$31,%xmm14
+.byte	102,15,56,220,216
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+	pxor	%xmm14,%xmm15
+	movaps	%xmm13,%xmm14
+.byte	102,15,56,220,248
+
+	movdqa	%xmm9,%xmm0
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	pxor	%xmm15,%xmm13
+	psrad	$31,%xmm0
+.byte	102,15,56,220,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm0
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	pxor	%xmm0,%xmm15
+	movups	(%r11),%xmm0
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	16(%r11),%xmm1
+
+	pxor	%xmm15,%xmm14
+.byte	102,15,56,221,84,36,0
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,221,92,36,16
+.byte	102,15,56,221,100,36,32
+	pand	%xmm8,%xmm9
+	movq	%r10,%rax
+.byte	102,15,56,221,108,36,48
+.byte	102,15,56,221,116,36,64
+.byte	102,15,56,221,124,36,80
+	pxor	%xmm9,%xmm15
+
+	leaq	96(%rsi),%rsi
+	movups	%xmm2,-96(%rsi)
+	movups	%xmm3,-80(%rsi)
+	movups	%xmm4,-64(%rsi)
+	movups	%xmm5,-48(%rsi)
+	movups	%xmm6,-32(%rsi)
+	movups	%xmm7,-16(%rsi)
+	subq	$96,%rdx
+	jnc	.Lxts_enc_grandloop
+
+	movl	$16+96,%eax
+	subl	%r10d,%eax
+	movq	%r11,%rcx
+	shrl	$4,%eax
+
+.Lxts_enc_short:
+
+	movl	%eax,%r10d
+	pxor	%xmm0,%xmm10
+	addq	$96,%rdx
+	jz	.Lxts_enc_done
+
+	pxor	%xmm0,%xmm11
+	cmpq	$32,%rdx
+	jb	.Lxts_enc_one
+	pxor	%xmm0,%xmm12
+	je	.Lxts_enc_two
+
+	pxor	%xmm0,%xmm13
+	cmpq	$64,%rdx
+	jb	.Lxts_enc_three
+	pxor	%xmm0,%xmm14
+	je	.Lxts_enc_four
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm10,%xmm2
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm11,%xmm3
+	movdqu	64(%rdi),%xmm6
+	leaq	80(%rdi),%rdi
+	pxor	%xmm12,%xmm4
+	pxor	%xmm13,%xmm5
+	pxor	%xmm14,%xmm6
+	pxor	%xmm7,%xmm7
+
+	call	_aesni_encrypt6
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm15,%xmm10
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	xorps	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	xorps	%xmm14,%xmm6
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	jmp	.Lxts_enc_done
+
+.align	16
+.Lxts_enc_one:
+	movups	(%rdi),%xmm2
+	leaq	16(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_9:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_9
+.byte	102,15,56,221,209
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm11,%xmm10
+	movups	%xmm2,(%rsi)
+	leaq	16(%rsi),%rsi
+	jmp	.Lxts_enc_done
+
+.align	16
+.Lxts_enc_two:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	leaq	32(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+
+	call	_aesni_encrypt2
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm12,%xmm10
+	xorps	%xmm11,%xmm3
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	leaq	32(%rsi),%rsi
+	jmp	.Lxts_enc_done
+
+.align	16
+.Lxts_enc_three:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	leaq	48(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+
+	call	_aesni_encrypt3
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm13,%xmm10
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	leaq	48(%rsi),%rsi
+	jmp	.Lxts_enc_done
+
+.align	16
+.Lxts_enc_four:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	xorps	%xmm10,%xmm2
+	movups	48(%rdi),%xmm5
+	leaq	64(%rdi),%rdi
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	xorps	%xmm13,%xmm5
+
+	call	_aesni_encrypt4
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	leaq	64(%rsi),%rsi
+	jmp	.Lxts_enc_done
+
+.align	16
+.Lxts_enc_done:
+	andq	$15,%r9
+	jz	.Lxts_enc_ret
+	movq	%r9,%rdx
+
+.Lxts_enc_steal:
+	movzbl	(%rdi),%eax
+	movzbl	-16(%rsi),%ecx
+	leaq	1(%rdi),%rdi
+	movb	%al,-16(%rsi)
+	movb	%cl,0(%rsi)
+	leaq	1(%rsi),%rsi
+	subq	$1,%rdx
+	jnz	.Lxts_enc_steal
+
+	subq	%r9,%rsi
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	-16(%rsi),%xmm2
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_enc1_10:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_10
+.byte	102,15,56,221,209
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,-16(%rsi)
+
+.Lxts_enc_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+.Lxts_enc_epilogue:
+	.byte	0xf3,0xc3
+.size	aesni_xts_encrypt,.-aesni_xts_encrypt
+.globl	aesni_xts_decrypt
+.hidden aesni_xts_decrypt
+.type	aesni_xts_decrypt,@function
+.align	16
+aesni_xts_decrypt:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$112,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r9),%xmm2
+	movl	240(%r8),%eax
+	movl	240(%rcx),%r10d
+	movups	(%r8),%xmm0
+	movups	16(%r8),%xmm1
+	leaq	32(%r8),%r8
+	xorps	%xmm0,%xmm2
+.Loop_enc1_11:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%r8),%xmm1
+	leaq	16(%r8),%r8
+	jnz	.Loop_enc1_11
+.byte	102,15,56,221,209
+	xorl	%eax,%eax
+	testq	$15,%rdx
+	setnz	%al
+	shlq	$4,%rax
+	subq	%rax,%rdx
+
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%r10d,%eax
+	shll	$4,%r10d
+	movq	%rdx,%r9
+	andq	$-16,%rdx
+
+	movups	16(%rcx,%r10,1),%xmm1
+
+	movdqa	.Lxts_magic(%rip),%xmm8
+	movdqa	%xmm2,%xmm15
+	pshufd	$95,%xmm2,%xmm9
+	pxor	%xmm0,%xmm1
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm10
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm10
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm11
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm11
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm12
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm12
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm13
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm13
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm15,%xmm14
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm9
+	pxor	%xmm0,%xmm14
+	pxor	%xmm9,%xmm15
+	movaps	%xmm1,96(%rsp)
+
+	subq	$96,%rdx
+	jc	.Lxts_dec_short
+
+	movl	$16+96,%eax
+	leaq	32(%r11,%r10,1),%rcx
+	subq	%r10,%rax
+	movups	16(%r11),%xmm1
+	movq	%rax,%r10
+	leaq	.Lxts_magic(%rip),%r8
+	jmp	.Lxts_dec_grandloop
+
+.align	32
+.Lxts_dec_grandloop:
+	movdqu	0(%rdi),%xmm2
+	movdqa	%xmm0,%xmm8
+	movdqu	16(%rdi),%xmm3
+	pxor	%xmm10,%xmm2
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm11,%xmm3
+.byte	102,15,56,222,209
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm12,%xmm4
+.byte	102,15,56,222,217
+	movdqu	64(%rdi),%xmm6
+	pxor	%xmm13,%xmm5
+.byte	102,15,56,222,225
+	movdqu	80(%rdi),%xmm7
+	pxor	%xmm15,%xmm8
+	movdqa	96(%rsp),%xmm9
+	pxor	%xmm14,%xmm6
+.byte	102,15,56,222,233
+	movups	32(%r11),%xmm0
+	leaq	96(%rdi),%rdi
+	pxor	%xmm8,%xmm7
+
+	pxor	%xmm9,%xmm10
+.byte	102,15,56,222,241
+	pxor	%xmm9,%xmm11
+	movdqa	%xmm10,0(%rsp)
+.byte	102,15,56,222,249
+	movups	48(%r11),%xmm1
+	pxor	%xmm9,%xmm12
+
+.byte	102,15,56,222,208
+	pxor	%xmm9,%xmm13
+	movdqa	%xmm11,16(%rsp)
+.byte	102,15,56,222,216
+	pxor	%xmm9,%xmm14
+	movdqa	%xmm12,32(%rsp)
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	pxor	%xmm9,%xmm8
+	movdqa	%xmm14,64(%rsp)
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	64(%r11),%xmm0
+	movdqa	%xmm8,80(%rsp)
+	pshufd	$95,%xmm15,%xmm9
+	jmp	.Lxts_dec_loop6
+.align	32
+.Lxts_dec_loop6:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	-64(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-80(%rcx,%rax,1),%xmm0
+	jnz	.Lxts_dec_loop6
+
+	movdqa	(%r8),%xmm8
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	paddq	%xmm15,%xmm15
+	psrad	$31,%xmm14
+.byte	102,15,56,222,217
+	pand	%xmm8,%xmm14
+	movups	(%r11),%xmm10
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+	pxor	%xmm14,%xmm15
+	movaps	%xmm10,%xmm11
+.byte	102,15,56,222,249
+	movups	-64(%rcx),%xmm1
+
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,208
+	paddd	%xmm9,%xmm9
+	pxor	%xmm15,%xmm10
+.byte	102,15,56,222,216
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	pand	%xmm8,%xmm14
+	movaps	%xmm11,%xmm12
+.byte	102,15,56,222,240
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,248
+	movups	-48(%rcx),%xmm0
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	pxor	%xmm15,%xmm11
+	psrad	$31,%xmm14
+.byte	102,15,56,222,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movdqa	%xmm13,48(%rsp)
+	pxor	%xmm14,%xmm15
+.byte	102,15,56,222,241
+	movaps	%xmm12,%xmm13
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,249
+	movups	-32(%rcx),%xmm1
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,208
+	pxor	%xmm15,%xmm12
+	psrad	$31,%xmm14
+.byte	102,15,56,222,216
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+	pxor	%xmm14,%xmm15
+	movaps	%xmm13,%xmm14
+.byte	102,15,56,222,248
+
+	movdqa	%xmm9,%xmm0
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	pxor	%xmm15,%xmm13
+	psrad	$31,%xmm0
+.byte	102,15,56,222,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm0
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	pxor	%xmm0,%xmm15
+	movups	(%r11),%xmm0
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	16(%r11),%xmm1
+
+	pxor	%xmm15,%xmm14
+.byte	102,15,56,223,84,36,0
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,223,92,36,16
+.byte	102,15,56,223,100,36,32
+	pand	%xmm8,%xmm9
+	movq	%r10,%rax
+.byte	102,15,56,223,108,36,48
+.byte	102,15,56,223,116,36,64
+.byte	102,15,56,223,124,36,80
+	pxor	%xmm9,%xmm15
+
+	leaq	96(%rsi),%rsi
+	movups	%xmm2,-96(%rsi)
+	movups	%xmm3,-80(%rsi)
+	movups	%xmm4,-64(%rsi)
+	movups	%xmm5,-48(%rsi)
+	movups	%xmm6,-32(%rsi)
+	movups	%xmm7,-16(%rsi)
+	subq	$96,%rdx
+	jnc	.Lxts_dec_grandloop
+
+	movl	$16+96,%eax
+	subl	%r10d,%eax
+	movq	%r11,%rcx
+	shrl	$4,%eax
+
+.Lxts_dec_short:
+
+	movl	%eax,%r10d
+	pxor	%xmm0,%xmm10
+	pxor	%xmm0,%xmm11
+	addq	$96,%rdx
+	jz	.Lxts_dec_done
+
+	pxor	%xmm0,%xmm12
+	cmpq	$32,%rdx
+	jb	.Lxts_dec_one
+	pxor	%xmm0,%xmm13
+	je	.Lxts_dec_two
+
+	pxor	%xmm0,%xmm14
+	cmpq	$64,%rdx
+	jb	.Lxts_dec_three
+	je	.Lxts_dec_four
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm10,%xmm2
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm11,%xmm3
+	movdqu	64(%rdi),%xmm6
+	leaq	80(%rdi),%rdi
+	pxor	%xmm12,%xmm4
+	pxor	%xmm13,%xmm5
+	pxor	%xmm14,%xmm6
+
+	call	_aesni_decrypt6
+
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	xorps	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	xorps	%xmm14,%xmm6
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm14,%xmm14
+	movdqu	%xmm5,48(%rsi)
+	pcmpgtd	%xmm15,%xmm14
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	pshufd	$19,%xmm14,%xmm11
+	andq	$15,%r9
+	jz	.Lxts_dec_ret
+
+	movdqa	%xmm15,%xmm10
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm11
+	pxor	%xmm15,%xmm11
+	jmp	.Lxts_dec_done2
+
+.align	16
+.Lxts_dec_one:
+	movups	(%rdi),%xmm2
+	leaq	16(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_12:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_12
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm11,%xmm10
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm12,%xmm11
+	leaq	16(%rsi),%rsi
+	jmp	.Lxts_dec_done
+
+.align	16
+.Lxts_dec_two:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	leaq	32(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+
+	call	_aesni_decrypt2
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm12,%xmm10
+	xorps	%xmm11,%xmm3
+	movdqa	%xmm13,%xmm11
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	leaq	32(%rsi),%rsi
+	jmp	.Lxts_dec_done
+
+.align	16
+.Lxts_dec_three:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	leaq	48(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+
+	call	_aesni_decrypt3
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm13,%xmm10
+	xorps	%xmm11,%xmm3
+	movdqa	%xmm14,%xmm11
+	xorps	%xmm12,%xmm4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	leaq	48(%rsi),%rsi
+	jmp	.Lxts_dec_done
+
+.align	16
+.Lxts_dec_four:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	xorps	%xmm10,%xmm2
+	movups	48(%rdi),%xmm5
+	leaq	64(%rdi),%rdi
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	xorps	%xmm13,%xmm5
+
+	call	_aesni_decrypt4
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqa	%xmm15,%xmm11
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	leaq	64(%rsi),%rsi
+	jmp	.Lxts_dec_done
+
+.align	16
+.Lxts_dec_done:
+	andq	$15,%r9
+	jz	.Lxts_dec_ret
+.Lxts_dec_done2:
+	movq	%r9,%rdx
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	(%rdi),%xmm2
+	xorps	%xmm11,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_13:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_13
+.byte	102,15,56,223,209
+	xorps	%xmm11,%xmm2
+	movups	%xmm2,(%rsi)
+
+.Lxts_dec_steal:
+	movzbl	16(%rdi),%eax
+	movzbl	(%rsi),%ecx
+	leaq	1(%rdi),%rdi
+	movb	%al,(%rsi)
+	movb	%cl,16(%rsi)
+	leaq	1(%rsi),%rsi
+	subq	$1,%rdx
+	jnz	.Lxts_dec_steal
+
+	subq	%r9,%rsi
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	(%rsi),%xmm2
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_14:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_14
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+
+.Lxts_dec_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+.Lxts_dec_epilogue:
+	.byte	0xf3,0xc3
+.size	aesni_xts_decrypt,.-aesni_xts_decrypt
+.globl	aesni_cbc_encrypt
+.hidden aesni_cbc_encrypt
+.type	aesni_cbc_encrypt,@function
+.align	16
+aesni_cbc_encrypt:
+	testq	%rdx,%rdx
+	jz	.Lcbc_ret
+
+	movl	240(%rcx),%r10d
+	movq	%rcx,%r11
+	testl	%r9d,%r9d
+	jz	.Lcbc_decrypt
+
+	movups	(%r8),%xmm2
+	movl	%r10d,%eax
+	cmpq	$16,%rdx
+	jb	.Lcbc_enc_tail
+	subq	$16,%rdx
+	jmp	.Lcbc_enc_loop
+.align	16
+.Lcbc_enc_loop:
+	movups	(%rdi),%xmm3
+	leaq	16(%rdi),%rdi
+
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm3
+	leaq	32(%rcx),%rcx
+	xorps	%xmm3,%xmm2
+.Loop_enc1_15:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_enc1_15
+.byte	102,15,56,221,209
+	movl	%r10d,%eax
+	movq	%r11,%rcx
+	movups	%xmm2,0(%rsi)
+	leaq	16(%rsi),%rsi
+	subq	$16,%rdx
+	jnc	.Lcbc_enc_loop
+	addq	$16,%rdx
+	jnz	.Lcbc_enc_tail
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%r8)
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	jmp	.Lcbc_ret
+
+.Lcbc_enc_tail:
+	movq	%rdx,%rcx
+	xchgq	%rdi,%rsi
+.long	0x9066A4F3
+	movl	$16,%ecx
+	subq	%rdx,%rcx
+	xorl	%eax,%eax
+.long	0x9066AAF3
+	leaq	-16(%rdi),%rdi
+	movl	%r10d,%eax
+	movq	%rdi,%rsi
+	movq	%r11,%rcx
+	xorq	%rdx,%rdx
+	jmp	.Lcbc_enc_loop
+
+.align	16
+.Lcbc_decrypt:
+	cmpq	$16,%rdx
+	jne	.Lcbc_decrypt_bulk
+
+
+
+	movdqu	(%rdi),%xmm2
+	movdqu	(%r8),%xmm3
+	movdqa	%xmm2,%xmm4
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_16:
+.byte	102,15,56,222,209
+	decl	%r10d
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_16
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movdqu	%xmm4,(%r8)
+	xorps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	.Lcbc_ret
+.align	16
+.Lcbc_decrypt_bulk:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$16,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r8),%xmm10
+	movl	%r10d,%eax
+	cmpq	$80,%rdx
+	jbe	.Lcbc_dec_tail
+
+	movups	(%rcx),%xmm0
+	movdqu	0(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqa	%xmm2,%xmm11
+	movdqu	32(%rdi),%xmm4
+	movdqa	%xmm3,%xmm12
+	movdqu	48(%rdi),%xmm5
+	movdqa	%xmm4,%xmm13
+	movdqu	64(%rdi),%xmm6
+	movdqa	%xmm5,%xmm14
+	movdqu	80(%rdi),%xmm7
+	movdqa	%xmm6,%xmm15
+	movl	OPENSSL_ia32cap_P+4(%rip),%r9d
+	cmpq	$112,%rdx
+	jbe	.Lcbc_dec_six_or_seven
+
+	andl	$71303168,%r9d
+	subq	$80,%rdx
+	cmpl	$4194304,%r9d
+	je	.Lcbc_dec_loop6_enter
+	subq	$32,%rdx
+	leaq	112(%rcx),%rcx
+	jmp	.Lcbc_dec_loop8_enter
+.align	16
+.Lcbc_dec_loop8:
+	movups	%xmm9,(%rsi)
+	leaq	16(%rsi),%rsi
+.Lcbc_dec_loop8_enter:
+	movdqu	96(%rdi),%xmm8
+	pxor	%xmm0,%xmm2
+	movdqu	112(%rdi),%xmm9
+	pxor	%xmm0,%xmm3
+	movups	16-112(%rcx),%xmm1
+	pxor	%xmm0,%xmm4
+	xorq	%r11,%r11
+	cmpq	$112,%rdx
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm9
+	movups	32-112(%rcx),%xmm0
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+	setnc	%r11b
+	shlq	$7,%r11
+.byte	102,68,15,56,222,201
+	addq	%rdi,%r11
+	movups	48-112(%rcx),%xmm1
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	64-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	80-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	96-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	112-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	128-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	144-112(%rcx),%xmm1
+	cmpl	$11,%eax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	160-112(%rcx),%xmm0
+	jb	.Lcbc_dec_done
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	176-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	192-112(%rcx),%xmm0
+	je	.Lcbc_dec_done
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	208-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	224-112(%rcx),%xmm0
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_done:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm10
+	pxor	%xmm0,%xmm11
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	pxor	%xmm0,%xmm12
+	pxor	%xmm0,%xmm13
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	pxor	%xmm0,%xmm14
+	pxor	%xmm0,%xmm15
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movdqu	80(%rdi),%xmm1
+
+.byte	102,65,15,56,223,210
+	movdqu	96(%rdi),%xmm10
+	pxor	%xmm0,%xmm1
+.byte	102,65,15,56,223,219
+	pxor	%xmm0,%xmm10
+	movdqu	112(%rdi),%xmm0
+.byte	102,65,15,56,223,228
+	leaq	128(%rdi),%rdi
+	movdqu	0(%r11),%xmm11
+.byte	102,65,15,56,223,237
+.byte	102,65,15,56,223,246
+	movdqu	16(%r11),%xmm12
+	movdqu	32(%r11),%xmm13
+.byte	102,65,15,56,223,255
+.byte	102,68,15,56,223,193
+	movdqu	48(%r11),%xmm14
+	movdqu	64(%r11),%xmm15
+.byte	102,69,15,56,223,202
+	movdqa	%xmm0,%xmm10
+	movdqu	80(%r11),%xmm1
+	movups	-112(%rcx),%xmm0
+
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm11,%xmm2
+	movups	%xmm3,16(%rsi)
+	movdqa	%xmm12,%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqa	%xmm13,%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqa	%xmm14,%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqa	%xmm15,%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqa	%xmm1,%xmm7
+	movups	%xmm8,96(%rsi)
+	leaq	112(%rsi),%rsi
+
+	subq	$128,%rdx
+	ja	.Lcbc_dec_loop8
+
+	movaps	%xmm9,%xmm2
+	leaq	-112(%rcx),%rcx
+	addq	$112,%rdx
+	jle	.Lcbc_dec_clear_tail_collected
+	movups	%xmm9,(%rsi)
+	leaq	16(%rsi),%rsi
+	cmpq	$80,%rdx
+	jbe	.Lcbc_dec_tail
+
+	movaps	%xmm11,%xmm2
+.Lcbc_dec_six_or_seven:
+	cmpq	$96,%rdx
+	ja	.Lcbc_dec_seven
+
+	movaps	%xmm7,%xmm8
+	call	_aesni_decrypt6
+	pxor	%xmm10,%xmm2
+	movaps	%xmm8,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	pxor	%xmm15,%xmm7
+	movdqu	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	leaq	80(%rsi),%rsi
+	movdqa	%xmm7,%xmm2
+	pxor	%xmm7,%xmm7
+	jmp	.Lcbc_dec_tail_collected
+
+.align	16
+.Lcbc_dec_seven:
+	movups	96(%rdi),%xmm8
+	xorps	%xmm9,%xmm9
+	call	_aesni_decrypt8
+	movups	80(%rdi),%xmm9
+	pxor	%xmm10,%xmm2
+	movups	96(%rdi),%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	pxor	%xmm15,%xmm7
+	movdqu	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	pxor	%xmm9,%xmm8
+	movdqu	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	leaq	96(%rsi),%rsi
+	movdqa	%xmm8,%xmm2
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+	jmp	.Lcbc_dec_tail_collected
+
+.align	16
+.Lcbc_dec_loop6:
+	movups	%xmm7,(%rsi)
+	leaq	16(%rsi),%rsi
+	movdqu	0(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqa	%xmm2,%xmm11
+	movdqu	32(%rdi),%xmm4
+	movdqa	%xmm3,%xmm12
+	movdqu	48(%rdi),%xmm5
+	movdqa	%xmm4,%xmm13
+	movdqu	64(%rdi),%xmm6
+	movdqa	%xmm5,%xmm14
+	movdqu	80(%rdi),%xmm7
+	movdqa	%xmm6,%xmm15
+.Lcbc_dec_loop6_enter:
+	leaq	96(%rdi),%rdi
+	movdqa	%xmm7,%xmm8
+
+	call	_aesni_decrypt6
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm8,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm14,%xmm6
+	movq	%r11,%rcx
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm15,%xmm7
+	movl	%r10d,%eax
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	subq	$96,%rdx
+	ja	.Lcbc_dec_loop6
+
+	movdqa	%xmm7,%xmm2
+	addq	$80,%rdx
+	jle	.Lcbc_dec_clear_tail_collected
+	movups	%xmm7,(%rsi)
+	leaq	16(%rsi),%rsi
+
+.Lcbc_dec_tail:
+	movups	(%rdi),%xmm2
+	subq	$16,%rdx
+	jbe	.Lcbc_dec_one
+
+	movups	16(%rdi),%xmm3
+	movaps	%xmm2,%xmm11
+	subq	$16,%rdx
+	jbe	.Lcbc_dec_two
+
+	movups	32(%rdi),%xmm4
+	movaps	%xmm3,%xmm12
+	subq	$16,%rdx
+	jbe	.Lcbc_dec_three
+
+	movups	48(%rdi),%xmm5
+	movaps	%xmm4,%xmm13
+	subq	$16,%rdx
+	jbe	.Lcbc_dec_four
+
+	movups	64(%rdi),%xmm6
+	movaps	%xmm5,%xmm14
+	movaps	%xmm6,%xmm15
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	pxor	%xmm10,%xmm2
+	movaps	%xmm15,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	leaq	64(%rsi),%rsi
+	movdqa	%xmm6,%xmm2
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	subq	$16,%rdx
+	jmp	.Lcbc_dec_tail_collected
+
+.align	16
+.Lcbc_dec_one:
+	movaps	%xmm2,%xmm11
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+.Loop_dec1_17:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	.Loop_dec1_17
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movaps	%xmm11,%xmm10
+	jmp	.Lcbc_dec_tail_collected
+.align	16
+.Lcbc_dec_two:
+	movaps	%xmm3,%xmm12
+	call	_aesni_decrypt2
+	pxor	%xmm10,%xmm2
+	movaps	%xmm12,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	movdqa	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	leaq	16(%rsi),%rsi
+	jmp	.Lcbc_dec_tail_collected
+.align	16
+.Lcbc_dec_three:
+	movaps	%xmm4,%xmm13
+	call	_aesni_decrypt3
+	pxor	%xmm10,%xmm2
+	movaps	%xmm13,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm4,%xmm2
+	pxor	%xmm4,%xmm4
+	leaq	32(%rsi),%rsi
+	jmp	.Lcbc_dec_tail_collected
+.align	16
+.Lcbc_dec_four:
+	movaps	%xmm5,%xmm14
+	call	_aesni_decrypt4
+	pxor	%xmm10,%xmm2
+	movaps	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm5,%xmm2
+	pxor	%xmm5,%xmm5
+	leaq	48(%rsi),%rsi
+	jmp	.Lcbc_dec_tail_collected
+
+.align	16
+.Lcbc_dec_clear_tail_collected:
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+.Lcbc_dec_tail_collected:
+	movups	%xmm10,(%r8)
+	andq	$15,%rdx
+	jnz	.Lcbc_dec_tail_partial
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	.Lcbc_dec_ret
+.align	16
+.Lcbc_dec_tail_partial:
+	movaps	%xmm2,(%rsp)
+	pxor	%xmm2,%xmm2
+	movq	$16,%rcx
+	movq	%rsi,%rdi
+	subq	%rdx,%rcx
+	leaq	(%rsp),%rsi
+.long	0x9066A4F3
+	movdqa	%xmm2,(%rsp)
+
+.Lcbc_dec_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	leaq	(%rbp),%rsp
+	popq	%rbp
+.Lcbc_ret:
+	.byte	0xf3,0xc3
+.size	aesni_cbc_encrypt,.-aesni_cbc_encrypt
+.globl	aesni_set_decrypt_key
+.hidden aesni_set_decrypt_key
+.type	aesni_set_decrypt_key,@function
+.align	16
+aesni_set_decrypt_key:
+.byte	0x48,0x83,0xEC,0x08
+	call	__aesni_set_encrypt_key
+	shll	$4,%esi
+	testl	%eax,%eax
+	jnz	.Ldec_key_ret
+	leaq	16(%rdx,%rsi,1),%rdi
+
+	movups	(%rdx),%xmm0
+	movups	(%rdi),%xmm1
+	movups	%xmm0,(%rdi)
+	movups	%xmm1,(%rdx)
+	leaq	16(%rdx),%rdx
+	leaq	-16(%rdi),%rdi
+
+.Ldec_key_inverse:
+	movups	(%rdx),%xmm0
+	movups	(%rdi),%xmm1
+.byte	102,15,56,219,192
+.byte	102,15,56,219,201
+	leaq	16(%rdx),%rdx
+	leaq	-16(%rdi),%rdi
+	movups	%xmm0,16(%rdi)
+	movups	%xmm1,-16(%rdx)
+	cmpq	%rdx,%rdi
+	ja	.Ldec_key_inverse
+
+	movups	(%rdx),%xmm0
+.byte	102,15,56,219,192
+	pxor	%xmm1,%xmm1
+	movups	%xmm0,(%rdi)
+	pxor	%xmm0,%xmm0
+.Ldec_key_ret:
+	addq	$8,%rsp
+	.byte	0xf3,0xc3
+.LSEH_end_set_decrypt_key:
+.size	aesni_set_decrypt_key,.-aesni_set_decrypt_key
+.globl	aesni_set_encrypt_key
+.hidden aesni_set_encrypt_key
+.type	aesni_set_encrypt_key,@function
+.align	16
+aesni_set_encrypt_key:
+__aesni_set_encrypt_key:
+.byte	0x48,0x83,0xEC,0x08
+	movq	$-1,%rax
+	testq	%rdi,%rdi
+	jz	.Lenc_key_ret
+	testq	%rdx,%rdx
+	jz	.Lenc_key_ret
+
+	movl	$268437504,%r10d
+	movups	(%rdi),%xmm0
+	xorps	%xmm4,%xmm4
+	andl	OPENSSL_ia32cap_P+4(%rip),%r10d
+	leaq	16(%rdx),%rax
+	cmpl	$256,%esi
+	je	.L14rounds
+	cmpl	$192,%esi
+	je	.L12rounds
+	cmpl	$128,%esi
+	jne	.Lbad_keybits
+
+.L10rounds:
+	movl	$9,%esi
+	cmpl	$268435456,%r10d
+	je	.L10rounds_alt
+
+	movups	%xmm0,(%rdx)
+.byte	102,15,58,223,200,1
+	call	.Lkey_expansion_128_cold
+.byte	102,15,58,223,200,2
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,4
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,8
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,16
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,32
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,64
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,128
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,27
+	call	.Lkey_expansion_128
+.byte	102,15,58,223,200,54
+	call	.Lkey_expansion_128
+	movups	%xmm0,(%rax)
+	movl	%esi,80(%rax)
+	xorl	%eax,%eax
+	jmp	.Lenc_key_ret
+
+.align	16
+.L10rounds_alt:
+	movdqa	.Lkey_rotate(%rip),%xmm5
+	movl	$8,%r10d
+	movdqa	.Lkey_rcon1(%rip),%xmm4
+	movdqa	%xmm0,%xmm2
+	movdqu	%xmm0,(%rdx)
+	jmp	.Loop_key128
+
+.align	16
+.Loop_key128:
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	leaq	16(%rax),%rax
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,-16(%rax)
+	movdqa	%xmm0,%xmm2
+
+	decl	%r10d
+	jnz	.Loop_key128
+
+	movdqa	.Lkey_rcon1b(%rip),%xmm4
+
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%rax)
+
+	movdqa	%xmm0,%xmm2
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,16(%rax)
+
+	movl	%esi,96(%rax)
+	xorl	%eax,%eax
+	jmp	.Lenc_key_ret
+
+.align	16
+.L12rounds:
+	movq	16(%rdi),%xmm2
+	movl	$11,%esi
+	cmpl	$268435456,%r10d
+	je	.L12rounds_alt
+
+	movups	%xmm0,(%rdx)
+.byte	102,15,58,223,202,1
+	call	.Lkey_expansion_192a_cold
+.byte	102,15,58,223,202,2
+	call	.Lkey_expansion_192b
+.byte	102,15,58,223,202,4
+	call	.Lkey_expansion_192a
+.byte	102,15,58,223,202,8
+	call	.Lkey_expansion_192b
+.byte	102,15,58,223,202,16
+	call	.Lkey_expansion_192a
+.byte	102,15,58,223,202,32
+	call	.Lkey_expansion_192b
+.byte	102,15,58,223,202,64
+	call	.Lkey_expansion_192a
+.byte	102,15,58,223,202,128
+	call	.Lkey_expansion_192b
+	movups	%xmm0,(%rax)
+	movl	%esi,48(%rax)
+	xorq	%rax,%rax
+	jmp	.Lenc_key_ret
+
+.align	16
+.L12rounds_alt:
+	movdqa	.Lkey_rotate192(%rip),%xmm5
+	movdqa	.Lkey_rcon1(%rip),%xmm4
+	movl	$8,%r10d
+	movdqu	%xmm0,(%rdx)
+	jmp	.Loop_key192
+
+.align	16
+.Loop_key192:
+	movq	%xmm2,0(%rax)
+	movdqa	%xmm2,%xmm1
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	pslld	$1,%xmm4
+	leaq	24(%rax),%rax
+
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+
+	pxor	%xmm2,%xmm0
+	pxor	%xmm3,%xmm2
+	movdqu	%xmm0,-16(%rax)
+
+	decl	%r10d
+	jnz	.Loop_key192
+
+	movl	%esi,32(%rax)
+	xorl	%eax,%eax
+	jmp	.Lenc_key_ret
+
+.align	16
+.L14rounds:
+	movups	16(%rdi),%xmm2
+	movl	$13,%esi
+	leaq	16(%rax),%rax
+	cmpl	$268435456,%r10d
+	je	.L14rounds_alt
+
+	movups	%xmm0,(%rdx)
+	movups	%xmm2,16(%rdx)
+.byte	102,15,58,223,202,1
+	call	.Lkey_expansion_256a_cold
+.byte	102,15,58,223,200,1
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,2
+	call	.Lkey_expansion_256a
+.byte	102,15,58,223,200,2
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,4
+	call	.Lkey_expansion_256a
+.byte	102,15,58,223,200,4
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,8
+	call	.Lkey_expansion_256a
+.byte	102,15,58,223,200,8
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,16
+	call	.Lkey_expansion_256a
+.byte	102,15,58,223,200,16
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,32
+	call	.Lkey_expansion_256a
+.byte	102,15,58,223,200,32
+	call	.Lkey_expansion_256b
+.byte	102,15,58,223,202,64
+	call	.Lkey_expansion_256a
+	movups	%xmm0,(%rax)
+	movl	%esi,16(%rax)
+	xorq	%rax,%rax
+	jmp	.Lenc_key_ret
+
+.align	16
+.L14rounds_alt:
+	movdqa	.Lkey_rotate(%rip),%xmm5
+	movdqa	.Lkey_rcon1(%rip),%xmm4
+	movl	$7,%r10d
+	movdqu	%xmm0,0(%rdx)
+	movdqa	%xmm2,%xmm1
+	movdqu	%xmm2,16(%rdx)
+	jmp	.Loop_key256
+
+.align	16
+.Loop_key256:
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pslld	$1,%xmm4
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%rax)
+
+	decl	%r10d
+	jz	.Ldone_key256
+
+	pshufd	$255,%xmm0,%xmm2
+	pxor	%xmm3,%xmm3
+.byte	102,15,56,221,211
+
+	movdqa	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm3,%xmm1
+
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,16(%rax)
+	leaq	32(%rax),%rax
+	movdqa	%xmm2,%xmm1
+
+	jmp	.Loop_key256
+
+.Ldone_key256:
+	movl	%esi,16(%rax)
+	xorl	%eax,%eax
+	jmp	.Lenc_key_ret
+
+.align	16
+.Lbad_keybits:
+	movq	$-2,%rax
+.Lenc_key_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	addq	$8,%rsp
+	.byte	0xf3,0xc3
+.LSEH_end_set_encrypt_key:
+
+.align	16
+.Lkey_expansion_128:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+.Lkey_expansion_128_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	.byte	0xf3,0xc3
+
+.align	16
+.Lkey_expansion_192a:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+.Lkey_expansion_192a_cold:
+	movaps	%xmm2,%xmm5
+.Lkey_expansion_192b_warm:
+	shufps	$16,%xmm0,%xmm4
+	movdqa	%xmm2,%xmm3
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	pslldq	$4,%xmm3
+	xorps	%xmm4,%xmm0
+	pshufd	$85,%xmm1,%xmm1
+	pxor	%xmm3,%xmm2
+	pxor	%xmm1,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm3,%xmm2
+	.byte	0xf3,0xc3
+
+.align	16
+.Lkey_expansion_192b:
+	movaps	%xmm0,%xmm3
+	shufps	$68,%xmm0,%xmm5
+	movups	%xmm5,(%rax)
+	shufps	$78,%xmm2,%xmm3
+	movups	%xmm3,16(%rax)
+	leaq	32(%rax),%rax
+	jmp	.Lkey_expansion_192b_warm
+
+.align	16
+.Lkey_expansion_256a:
+	movups	%xmm2,(%rax)
+	leaq	16(%rax),%rax
+.Lkey_expansion_256a_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	.byte	0xf3,0xc3
+
+.align	16
+.Lkey_expansion_256b:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+
+	shufps	$16,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$140,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$170,%xmm1,%xmm1
+	xorps	%xmm1,%xmm2
+	.byte	0xf3,0xc3
+.size	aesni_set_encrypt_key,.-aesni_set_encrypt_key
+.size	__aesni_set_encrypt_key,.-__aesni_set_encrypt_key
+.align	64
+.Lbswap_mask:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.Lincrement32:
+.long	6,6,6,0
+.Lincrement64:
+.long	1,0,0,0
+.Lxts_magic:
+.long	0x87,0,1,0
+.Lincrement1:
+.byte	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
+.Lkey_rotate:
+.long	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d
+.Lkey_rotate192:
+.long	0x04070605,0x04070605,0x04070605,0x04070605
+.Lkey_rcon1:
+.long	1,1,1,1
+.Lkey_rcon1b:
+.long	0x1b,0x1b,0x1b,0x1b
+
+.byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	64
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S
new file mode 100644
index 0000000..8cfa4df
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/aes/bsaes-x86_64.S
@@ -0,0 +1,2507 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	asm_AES_encrypt
+.hidden asm_AES_encrypt
+.extern	asm_AES_decrypt
+.hidden asm_AES_decrypt
+
+.type	_bsaes_encrypt8,@function
+.align	64
+_bsaes_encrypt8:
+	leaq	.LBS0(%rip),%r11
+
+	movdqa	(%rax),%xmm8
+	leaq	16(%rax),%rax
+	movdqa	80(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+_bsaes_encrypt8_bitslice:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$1,%xmm3
+	pxor	%xmm6,%xmm5
+	pxor	%xmm4,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm6
+	psllq	$1,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$1,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm2,%xmm1
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm15
+	pxor	%xmm1,%xmm2
+	psllq	$1,%xmm1
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm4,%xmm9
+	psrlq	$2,%xmm4
+	movdqa	%xmm3,%xmm10
+	psrlq	$2,%xmm3
+	pxor	%xmm6,%xmm4
+	pxor	%xmm5,%xmm3
+	pand	%xmm8,%xmm4
+	pand	%xmm8,%xmm3
+	pxor	%xmm4,%xmm6
+	psllq	$2,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$2,%xmm3
+	pxor	%xmm9,%xmm4
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm2,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm2
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm2,%xmm9
+	psrlq	$4,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$4,%xmm1
+	pxor	%xmm6,%xmm2
+	pxor	%xmm5,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$4,%xmm2
+	pxor	%xmm1,%xmm5
+	psllq	$4,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm4
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	decl	%r10d
+	jmp	.Lenc_sbox
+.align	16
+.Lenc_loop:
+	pxor	0(%rax),%xmm15
+	pxor	16(%rax),%xmm0
+	pxor	32(%rax),%xmm1
+	pxor	48(%rax),%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	64(%rax),%xmm3
+	pxor	80(%rax),%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	96(%rax),%xmm5
+	pxor	112(%rax),%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	128(%rax),%rax
+.Lenc_sbox:
+	pxor	%xmm5,%xmm4
+	pxor	%xmm0,%xmm1
+	pxor	%xmm15,%xmm2
+	pxor	%xmm1,%xmm5
+	pxor	%xmm15,%xmm4
+
+	pxor	%xmm2,%xmm5
+	pxor	%xmm6,%xmm2
+	pxor	%xmm4,%xmm6
+	pxor	%xmm3,%xmm2
+	pxor	%xmm4,%xmm3
+	pxor	%xmm0,%xmm2
+
+	pxor	%xmm6,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm6,%xmm10
+	movdqa	%xmm0,%xmm9
+	movdqa	%xmm4,%xmm8
+	movdqa	%xmm1,%xmm12
+	movdqa	%xmm5,%xmm11
+
+	pxor	%xmm3,%xmm10
+	pxor	%xmm1,%xmm9
+	pxor	%xmm2,%xmm8
+	movdqa	%xmm10,%xmm13
+	pxor	%xmm3,%xmm12
+	movdqa	%xmm9,%xmm7
+	pxor	%xmm15,%xmm11
+	movdqa	%xmm10,%xmm14
+
+	por	%xmm8,%xmm9
+	por	%xmm11,%xmm10
+	pxor	%xmm7,%xmm14
+	pand	%xmm11,%xmm13
+	pxor	%xmm8,%xmm11
+	pand	%xmm8,%xmm7
+	pand	%xmm11,%xmm14
+	movdqa	%xmm2,%xmm11
+	pxor	%xmm15,%xmm11
+	pand	%xmm11,%xmm12
+	pxor	%xmm12,%xmm10
+	pxor	%xmm12,%xmm9
+	movdqa	%xmm6,%xmm12
+	movdqa	%xmm4,%xmm11
+	pxor	%xmm0,%xmm12
+	pxor	%xmm5,%xmm11
+	movdqa	%xmm12,%xmm8
+	pand	%xmm11,%xmm12
+	por	%xmm11,%xmm8
+	pxor	%xmm12,%xmm7
+	pxor	%xmm14,%xmm10
+	pxor	%xmm13,%xmm9
+	pxor	%xmm14,%xmm8
+	movdqa	%xmm1,%xmm11
+	pxor	%xmm13,%xmm7
+	movdqa	%xmm3,%xmm12
+	pxor	%xmm13,%xmm8
+	movdqa	%xmm0,%xmm13
+	pand	%xmm2,%xmm11
+	movdqa	%xmm6,%xmm14
+	pand	%xmm15,%xmm12
+	pand	%xmm4,%xmm13
+	por	%xmm5,%xmm14
+	pxor	%xmm11,%xmm10
+	pxor	%xmm12,%xmm9
+	pxor	%xmm13,%xmm8
+	pxor	%xmm14,%xmm7
+
+
+
+
+
+	movdqa	%xmm10,%xmm11
+	pand	%xmm8,%xmm10
+	pxor	%xmm9,%xmm11
+
+	movdqa	%xmm7,%xmm13
+	movdqa	%xmm11,%xmm14
+	pxor	%xmm10,%xmm13
+	pand	%xmm13,%xmm14
+
+	movdqa	%xmm8,%xmm12
+	pxor	%xmm9,%xmm14
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm9,%xmm10
+
+	pand	%xmm10,%xmm12
+
+	movdqa	%xmm13,%xmm9
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm12,%xmm9
+	pxor	%xmm12,%xmm8
+
+	pand	%xmm7,%xmm9
+
+	pxor	%xmm9,%xmm13
+	pxor	%xmm9,%xmm8
+
+	pand	%xmm14,%xmm13
+
+	pxor	%xmm11,%xmm13
+	movdqa	%xmm5,%xmm11
+	movdqa	%xmm4,%xmm7
+	movdqa	%xmm14,%xmm9
+	pxor	%xmm13,%xmm9
+	pand	%xmm5,%xmm9
+	pxor	%xmm4,%xmm5
+	pand	%xmm14,%xmm4
+	pand	%xmm13,%xmm5
+	pxor	%xmm4,%xmm5
+	pxor	%xmm9,%xmm4
+	pxor	%xmm15,%xmm11
+	pxor	%xmm2,%xmm7
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm15,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm2,%xmm15
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm2
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm15
+	pxor	%xmm11,%xmm7
+	pxor	%xmm2,%xmm15
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm2
+	pxor	%xmm11,%xmm5
+	pxor	%xmm11,%xmm15
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm2
+
+	movdqa	%xmm6,%xmm11
+	movdqa	%xmm0,%xmm7
+	pxor	%xmm3,%xmm11
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm3,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm1,%xmm3
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm1
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm3
+	pxor	%xmm11,%xmm7
+	pxor	%xmm1,%xmm3
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm1
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm13,%xmm10
+	pand	%xmm6,%xmm10
+	pxor	%xmm0,%xmm6
+	pand	%xmm14,%xmm0
+	pand	%xmm13,%xmm6
+	pxor	%xmm0,%xmm6
+	pxor	%xmm10,%xmm0
+	pxor	%xmm11,%xmm6
+	pxor	%xmm11,%xmm3
+	pxor	%xmm7,%xmm0
+	pxor	%xmm7,%xmm1
+	pxor	%xmm15,%xmm6
+	pxor	%xmm5,%xmm0
+	pxor	%xmm6,%xmm3
+	pxor	%xmm15,%xmm5
+	pxor	%xmm0,%xmm15
+
+	pxor	%xmm4,%xmm0
+	pxor	%xmm1,%xmm4
+	pxor	%xmm2,%xmm1
+	pxor	%xmm4,%xmm2
+	pxor	%xmm4,%xmm3
+
+	pxor	%xmm2,%xmm5
+	decl	%r10d
+	jl	.Lenc_done
+	pshufd	$147,%xmm15,%xmm7
+	pshufd	$147,%xmm0,%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$147,%xmm3,%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$147,%xmm5,%xmm10
+	pxor	%xmm9,%xmm3
+	pshufd	$147,%xmm2,%xmm11
+	pxor	%xmm10,%xmm5
+	pshufd	$147,%xmm6,%xmm12
+	pxor	%xmm11,%xmm2
+	pshufd	$147,%xmm1,%xmm13
+	pxor	%xmm12,%xmm6
+	pshufd	$147,%xmm4,%xmm14
+	pxor	%xmm13,%xmm1
+	pxor	%xmm14,%xmm4
+
+	pxor	%xmm15,%xmm8
+	pxor	%xmm4,%xmm7
+	pxor	%xmm4,%xmm8
+	pshufd	$78,%xmm15,%xmm15
+	pxor	%xmm0,%xmm9
+	pshufd	$78,%xmm0,%xmm0
+	pxor	%xmm2,%xmm12
+	pxor	%xmm7,%xmm15
+	pxor	%xmm6,%xmm13
+	pxor	%xmm8,%xmm0
+	pxor	%xmm5,%xmm11
+	pshufd	$78,%xmm2,%xmm7
+	pxor	%xmm1,%xmm14
+	pshufd	$78,%xmm6,%xmm8
+	pxor	%xmm3,%xmm10
+	pshufd	$78,%xmm5,%xmm2
+	pxor	%xmm4,%xmm10
+	pshufd	$78,%xmm4,%xmm6
+	pxor	%xmm4,%xmm11
+	pshufd	$78,%xmm1,%xmm5
+	pxor	%xmm11,%xmm7
+	pshufd	$78,%xmm3,%xmm1
+	pxor	%xmm12,%xmm8
+	pxor	%xmm10,%xmm2
+	pxor	%xmm14,%xmm6
+	pxor	%xmm13,%xmm5
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm9,%xmm1
+	movdqa	%xmm8,%xmm4
+	movdqa	48(%r11),%xmm7
+	jnz	.Lenc_loop
+	movdqa	64(%r11),%xmm7
+	jmp	.Lenc_loop
+.align	16
+.Lenc_done:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm2,%xmm10
+	psrlq	$1,%xmm2
+	pxor	%xmm4,%xmm1
+	pxor	%xmm6,%xmm2
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm2
+	pxor	%xmm1,%xmm4
+	psllq	$1,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$1,%xmm2
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm3,%xmm9
+	psrlq	$1,%xmm3
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm5,%xmm3
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm3
+	pand	%xmm7,%xmm15
+	pxor	%xmm3,%xmm5
+	psllq	$1,%xmm3
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm3
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm6,%xmm9
+	psrlq	$2,%xmm6
+	movdqa	%xmm2,%xmm10
+	psrlq	$2,%xmm2
+	pxor	%xmm4,%xmm6
+	pxor	%xmm1,%xmm2
+	pand	%xmm8,%xmm6
+	pand	%xmm8,%xmm2
+	pxor	%xmm6,%xmm4
+	psllq	$2,%xmm6
+	pxor	%xmm2,%xmm1
+	psllq	$2,%xmm2
+	pxor	%xmm9,%xmm6
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm5,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm5
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm5,%xmm9
+	psrlq	$4,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$4,%xmm3
+	pxor	%xmm4,%xmm5
+	pxor	%xmm1,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm4
+	psllq	$4,%xmm5
+	pxor	%xmm3,%xmm1
+	psllq	$4,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm6,%xmm0
+	pxor	%xmm2,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm6
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm2
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	(%rax),%xmm7
+	pxor	%xmm7,%xmm3
+	pxor	%xmm7,%xmm5
+	pxor	%xmm7,%xmm2
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm1
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm15
+	pxor	%xmm7,%xmm0
+	.byte	0xf3,0xc3
+.size	_bsaes_encrypt8,.-_bsaes_encrypt8
+
+.type	_bsaes_decrypt8,@function
+.align	64
+_bsaes_decrypt8:
+	leaq	.LBS0(%rip),%r11
+
+	movdqa	(%rax),%xmm8
+	leaq	16(%rax),%rax
+	movdqa	-48(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$1,%xmm3
+	pxor	%xmm6,%xmm5
+	pxor	%xmm4,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm6
+	psllq	$1,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$1,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm2,%xmm1
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm15
+	pxor	%xmm1,%xmm2
+	psllq	$1,%xmm1
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm4,%xmm9
+	psrlq	$2,%xmm4
+	movdqa	%xmm3,%xmm10
+	psrlq	$2,%xmm3
+	pxor	%xmm6,%xmm4
+	pxor	%xmm5,%xmm3
+	pand	%xmm8,%xmm4
+	pand	%xmm8,%xmm3
+	pxor	%xmm4,%xmm6
+	psllq	$2,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$2,%xmm3
+	pxor	%xmm9,%xmm4
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm2,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm2
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm2,%xmm9
+	psrlq	$4,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$4,%xmm1
+	pxor	%xmm6,%xmm2
+	pxor	%xmm5,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$4,%xmm2
+	pxor	%xmm1,%xmm5
+	psllq	$4,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm4
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	decl	%r10d
+	jmp	.Ldec_sbox
+.align	16
+.Ldec_loop:
+	pxor	0(%rax),%xmm15
+	pxor	16(%rax),%xmm0
+	pxor	32(%rax),%xmm1
+	pxor	48(%rax),%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	64(%rax),%xmm3
+	pxor	80(%rax),%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	96(%rax),%xmm5
+	pxor	112(%rax),%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	128(%rax),%rax
+.Ldec_sbox:
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm6,%xmm3
+	pxor	%xmm6,%xmm1
+	pxor	%xmm3,%xmm5
+	pxor	%xmm5,%xmm6
+	pxor	%xmm6,%xmm0
+
+	pxor	%xmm0,%xmm15
+	pxor	%xmm4,%xmm1
+	pxor	%xmm15,%xmm2
+	pxor	%xmm15,%xmm4
+	pxor	%xmm2,%xmm0
+	movdqa	%xmm2,%xmm10
+	movdqa	%xmm6,%xmm9
+	movdqa	%xmm0,%xmm8
+	movdqa	%xmm3,%xmm12
+	movdqa	%xmm4,%xmm11
+
+	pxor	%xmm15,%xmm10
+	pxor	%xmm3,%xmm9
+	pxor	%xmm5,%xmm8
+	movdqa	%xmm10,%xmm13
+	pxor	%xmm15,%xmm12
+	movdqa	%xmm9,%xmm7
+	pxor	%xmm1,%xmm11
+	movdqa	%xmm10,%xmm14
+
+	por	%xmm8,%xmm9
+	por	%xmm11,%xmm10
+	pxor	%xmm7,%xmm14
+	pand	%xmm11,%xmm13
+	pxor	%xmm8,%xmm11
+	pand	%xmm8,%xmm7
+	pand	%xmm11,%xmm14
+	movdqa	%xmm5,%xmm11
+	pxor	%xmm1,%xmm11
+	pand	%xmm11,%xmm12
+	pxor	%xmm12,%xmm10
+	pxor	%xmm12,%xmm9
+	movdqa	%xmm2,%xmm12
+	movdqa	%xmm0,%xmm11
+	pxor	%xmm6,%xmm12
+	pxor	%xmm4,%xmm11
+	movdqa	%xmm12,%xmm8
+	pand	%xmm11,%xmm12
+	por	%xmm11,%xmm8
+	pxor	%xmm12,%xmm7
+	pxor	%xmm14,%xmm10
+	pxor	%xmm13,%xmm9
+	pxor	%xmm14,%xmm8
+	movdqa	%xmm3,%xmm11
+	pxor	%xmm13,%xmm7
+	movdqa	%xmm15,%xmm12
+	pxor	%xmm13,%xmm8
+	movdqa	%xmm6,%xmm13
+	pand	%xmm5,%xmm11
+	movdqa	%xmm2,%xmm14
+	pand	%xmm1,%xmm12
+	pand	%xmm0,%xmm13
+	por	%xmm4,%xmm14
+	pxor	%xmm11,%xmm10
+	pxor	%xmm12,%xmm9
+	pxor	%xmm13,%xmm8
+	pxor	%xmm14,%xmm7
+
+
+
+
+
+	movdqa	%xmm10,%xmm11
+	pand	%xmm8,%xmm10
+	pxor	%xmm9,%xmm11
+
+	movdqa	%xmm7,%xmm13
+	movdqa	%xmm11,%xmm14
+	pxor	%xmm10,%xmm13
+	pand	%xmm13,%xmm14
+
+	movdqa	%xmm8,%xmm12
+	pxor	%xmm9,%xmm14
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm9,%xmm10
+
+	pand	%xmm10,%xmm12
+
+	movdqa	%xmm13,%xmm9
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm12,%xmm9
+	pxor	%xmm12,%xmm8
+
+	pand	%xmm7,%xmm9
+
+	pxor	%xmm9,%xmm13
+	pxor	%xmm9,%xmm8
+
+	pand	%xmm14,%xmm13
+
+	pxor	%xmm11,%xmm13
+	movdqa	%xmm4,%xmm11
+	movdqa	%xmm0,%xmm7
+	movdqa	%xmm14,%xmm9
+	pxor	%xmm13,%xmm9
+	pand	%xmm4,%xmm9
+	pxor	%xmm0,%xmm4
+	pand	%xmm14,%xmm0
+	pand	%xmm13,%xmm4
+	pxor	%xmm0,%xmm4
+	pxor	%xmm9,%xmm0
+	pxor	%xmm1,%xmm11
+	pxor	%xmm5,%xmm7
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm1,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm5,%xmm1
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm5
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm1
+	pxor	%xmm11,%xmm7
+	pxor	%xmm5,%xmm1
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm5
+	pxor	%xmm11,%xmm4
+	pxor	%xmm11,%xmm1
+	pxor	%xmm7,%xmm0
+	pxor	%xmm7,%xmm5
+
+	movdqa	%xmm2,%xmm11
+	movdqa	%xmm6,%xmm7
+	pxor	%xmm15,%xmm11
+	pxor	%xmm3,%xmm7
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm15,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm3,%xmm15
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm3
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm15
+	pxor	%xmm11,%xmm7
+	pxor	%xmm3,%xmm15
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm3
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm13,%xmm10
+	pand	%xmm2,%xmm10
+	pxor	%xmm6,%xmm2
+	pand	%xmm14,%xmm6
+	pand	%xmm13,%xmm2
+	pxor	%xmm6,%xmm2
+	pxor	%xmm10,%xmm6
+	pxor	%xmm11,%xmm2
+	pxor	%xmm11,%xmm15
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm3
+	pxor	%xmm6,%xmm0
+	pxor	%xmm4,%xmm5
+
+	pxor	%xmm0,%xmm3
+	pxor	%xmm6,%xmm1
+	pxor	%xmm6,%xmm4
+	pxor	%xmm1,%xmm3
+	pxor	%xmm15,%xmm6
+	pxor	%xmm4,%xmm3
+	pxor	%xmm5,%xmm2
+	pxor	%xmm0,%xmm5
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm15,%xmm3
+	pxor	%xmm2,%xmm6
+	decl	%r10d
+	jl	.Ldec_done
+
+	pshufd	$78,%xmm15,%xmm7
+	pshufd	$78,%xmm2,%xmm13
+	pxor	%xmm15,%xmm7
+	pshufd	$78,%xmm4,%xmm14
+	pxor	%xmm2,%xmm13
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm4,%xmm14
+	pshufd	$78,%xmm5,%xmm9
+	pxor	%xmm0,%xmm8
+	pshufd	$78,%xmm3,%xmm10
+	pxor	%xmm5,%xmm9
+	pxor	%xmm13,%xmm15
+	pxor	%xmm13,%xmm0
+	pshufd	$78,%xmm1,%xmm11
+	pxor	%xmm3,%xmm10
+	pxor	%xmm7,%xmm5
+	pxor	%xmm8,%xmm3
+	pshufd	$78,%xmm6,%xmm12
+	pxor	%xmm1,%xmm11
+	pxor	%xmm14,%xmm0
+	pxor	%xmm9,%xmm1
+	pxor	%xmm6,%xmm12
+
+	pxor	%xmm14,%xmm5
+	pxor	%xmm13,%xmm3
+	pxor	%xmm13,%xmm1
+	pxor	%xmm10,%xmm6
+	pxor	%xmm11,%xmm2
+	pxor	%xmm14,%xmm1
+	pxor	%xmm14,%xmm6
+	pxor	%xmm12,%xmm4
+	pshufd	$147,%xmm15,%xmm7
+	pshufd	$147,%xmm0,%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$147,%xmm5,%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$147,%xmm3,%xmm10
+	pxor	%xmm9,%xmm5
+	pshufd	$147,%xmm1,%xmm11
+	pxor	%xmm10,%xmm3
+	pshufd	$147,%xmm6,%xmm12
+	pxor	%xmm11,%xmm1
+	pshufd	$147,%xmm2,%xmm13
+	pxor	%xmm12,%xmm6
+	pshufd	$147,%xmm4,%xmm14
+	pxor	%xmm13,%xmm2
+	pxor	%xmm14,%xmm4
+
+	pxor	%xmm15,%xmm8
+	pxor	%xmm4,%xmm7
+	pxor	%xmm4,%xmm8
+	pshufd	$78,%xmm15,%xmm15
+	pxor	%xmm0,%xmm9
+	pshufd	$78,%xmm0,%xmm0
+	pxor	%xmm1,%xmm12
+	pxor	%xmm7,%xmm15
+	pxor	%xmm6,%xmm13
+	pxor	%xmm8,%xmm0
+	pxor	%xmm3,%xmm11
+	pshufd	$78,%xmm1,%xmm7
+	pxor	%xmm2,%xmm14
+	pshufd	$78,%xmm6,%xmm8
+	pxor	%xmm5,%xmm10
+	pshufd	$78,%xmm3,%xmm1
+	pxor	%xmm4,%xmm10
+	pshufd	$78,%xmm4,%xmm6
+	pxor	%xmm4,%xmm11
+	pshufd	$78,%xmm2,%xmm3
+	pxor	%xmm11,%xmm7
+	pshufd	$78,%xmm5,%xmm2
+	pxor	%xmm12,%xmm8
+	pxor	%xmm1,%xmm10
+	pxor	%xmm14,%xmm6
+	pxor	%xmm3,%xmm13
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm9,%xmm2
+	movdqa	%xmm13,%xmm5
+	movdqa	%xmm8,%xmm4
+	movdqa	%xmm2,%xmm1
+	movdqa	%xmm10,%xmm2
+	movdqa	-16(%r11),%xmm7
+	jnz	.Ldec_loop
+	movdqa	-32(%r11),%xmm7
+	jmp	.Ldec_loop
+.align	16
+.Ldec_done:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm2,%xmm9
+	psrlq	$1,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$1,%xmm1
+	pxor	%xmm4,%xmm2
+	pxor	%xmm6,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm4
+	psllq	$1,%xmm2
+	pxor	%xmm1,%xmm6
+	psllq	$1,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm3,%xmm5
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm15
+	pxor	%xmm5,%xmm3
+	psllq	$1,%xmm5
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm6,%xmm9
+	psrlq	$2,%xmm6
+	movdqa	%xmm1,%xmm10
+	psrlq	$2,%xmm1
+	pxor	%xmm4,%xmm6
+	pxor	%xmm2,%xmm1
+	pand	%xmm8,%xmm6
+	pand	%xmm8,%xmm1
+	pxor	%xmm6,%xmm4
+	psllq	$2,%xmm6
+	pxor	%xmm1,%xmm2
+	psllq	$2,%xmm1
+	pxor	%xmm9,%xmm6
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm3
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm5
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm3,%xmm9
+	psrlq	$4,%xmm3
+	movdqa	%xmm5,%xmm10
+	psrlq	$4,%xmm5
+	pxor	%xmm4,%xmm3
+	pxor	%xmm2,%xmm5
+	pand	%xmm7,%xmm3
+	pand	%xmm7,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$4,%xmm3
+	pxor	%xmm5,%xmm2
+	psllq	$4,%xmm5
+	pxor	%xmm9,%xmm3
+	pxor	%xmm10,%xmm5
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm6,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm6
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	(%rax),%xmm7
+	pxor	%xmm7,%xmm5
+	pxor	%xmm7,%xmm3
+	pxor	%xmm7,%xmm1
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm2
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm15
+	pxor	%xmm7,%xmm0
+	.byte	0xf3,0xc3
+.size	_bsaes_decrypt8,.-_bsaes_decrypt8
+.type	_bsaes_key_convert,@function
+.align	16
+_bsaes_key_convert:
+	leaq	.Lmasks(%rip),%r11
+	movdqu	(%rcx),%xmm7
+	leaq	16(%rcx),%rcx
+	movdqa	0(%r11),%xmm0
+	movdqa	16(%r11),%xmm1
+	movdqa	32(%r11),%xmm2
+	movdqa	48(%r11),%xmm3
+	movdqa	64(%r11),%xmm4
+	pcmpeqd	%xmm5,%xmm5
+
+	movdqu	(%rcx),%xmm6
+	movdqa	%xmm7,(%rax)
+	leaq	16(%rax),%rax
+	decl	%r10d
+	jmp	.Lkey_loop
+.align	16
+.Lkey_loop:
+.byte	102,15,56,0,244
+
+	movdqa	%xmm0,%xmm8
+	movdqa	%xmm1,%xmm9
+
+	pand	%xmm6,%xmm8
+	pand	%xmm6,%xmm9
+	movdqa	%xmm2,%xmm10
+	pcmpeqb	%xmm0,%xmm8
+	psllq	$4,%xmm0
+	movdqa	%xmm3,%xmm11
+	pcmpeqb	%xmm1,%xmm9
+	psllq	$4,%xmm1
+
+	pand	%xmm6,%xmm10
+	pand	%xmm6,%xmm11
+	movdqa	%xmm0,%xmm12
+	pcmpeqb	%xmm2,%xmm10
+	psllq	$4,%xmm2
+	movdqa	%xmm1,%xmm13
+	pcmpeqb	%xmm3,%xmm11
+	psllq	$4,%xmm3
+
+	movdqa	%xmm2,%xmm14
+	movdqa	%xmm3,%xmm15
+	pxor	%xmm5,%xmm8
+	pxor	%xmm5,%xmm9
+
+	pand	%xmm6,%xmm12
+	pand	%xmm6,%xmm13
+	movdqa	%xmm8,0(%rax)
+	pcmpeqb	%xmm0,%xmm12
+	psrlq	$4,%xmm0
+	movdqa	%xmm9,16(%rax)
+	pcmpeqb	%xmm1,%xmm13
+	psrlq	$4,%xmm1
+	leaq	16(%rcx),%rcx
+
+	pand	%xmm6,%xmm14
+	pand	%xmm6,%xmm15
+	movdqa	%xmm10,32(%rax)
+	pcmpeqb	%xmm2,%xmm14
+	psrlq	$4,%xmm2
+	movdqa	%xmm11,48(%rax)
+	pcmpeqb	%xmm3,%xmm15
+	psrlq	$4,%xmm3
+	movdqu	(%rcx),%xmm6
+
+	pxor	%xmm5,%xmm13
+	pxor	%xmm5,%xmm14
+	movdqa	%xmm12,64(%rax)
+	movdqa	%xmm13,80(%rax)
+	movdqa	%xmm14,96(%rax)
+	movdqa	%xmm15,112(%rax)
+	leaq	128(%rax),%rax
+	decl	%r10d
+	jnz	.Lkey_loop
+
+	movdqa	80(%r11),%xmm7
+
+	.byte	0xf3,0xc3
+.size	_bsaes_key_convert,.-_bsaes_key_convert
+.extern	asm_AES_cbc_encrypt
+.hidden asm_AES_cbc_encrypt
+.globl	bsaes_cbc_encrypt
+.hidden bsaes_cbc_encrypt
+.type	bsaes_cbc_encrypt,@function
+.align	16
+bsaes_cbc_encrypt:
+	cmpl	$0,%r9d
+	jne	asm_AES_cbc_encrypt
+	cmpq	$128,%rdx
+	jb	asm_AES_cbc_encrypt
+
+	movq	%rsp,%rax
+.Lcbc_dec_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movl	240(%rcx),%eax
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	movq	%r8,%rbx
+	shrq	$4,%r14
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	(%rsp),%xmm7
+	movdqa	%xmm6,(%rax)
+	movdqa	%xmm7,(%rsp)
+
+	movdqu	(%rbx),%xmm14
+	subq	$8,%r14
+.Lcbc_dec_loop:
+	movdqu	0(%r12),%xmm15
+	movdqu	16(%r12),%xmm0
+	movdqu	32(%r12),%xmm1
+	movdqu	48(%r12),%xmm2
+	movdqu	64(%r12),%xmm3
+	movdqu	80(%r12),%xmm4
+	movq	%rsp,%rax
+	movdqu	96(%r12),%xmm5
+	movl	%edx,%r10d
+	movdqu	112(%r12),%xmm6
+	movdqa	%xmm14,32(%rbp)
+
+	call	_bsaes_decrypt8
+
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm6
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm2
+	movdqu	112(%r12),%xmm14
+	pxor	%xmm13,%xmm4
+	movdqu	%xmm15,0(%r13)
+	leaq	128(%r12),%r12
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+	subq	$8,%r14
+	jnc	.Lcbc_dec_loop
+
+	addq	$8,%r14
+	jz	.Lcbc_dec_done
+
+	movdqu	0(%r12),%xmm15
+	movq	%rsp,%rax
+	movl	%edx,%r10d
+	cmpq	$2,%r14
+	jb	.Lcbc_dec_one
+	movdqu	16(%r12),%xmm0
+	je	.Lcbc_dec_two
+	movdqu	32(%r12),%xmm1
+	cmpq	$4,%r14
+	jb	.Lcbc_dec_three
+	movdqu	48(%r12),%xmm2
+	je	.Lcbc_dec_four
+	movdqu	64(%r12),%xmm3
+	cmpq	$6,%r14
+	jb	.Lcbc_dec_five
+	movdqu	80(%r12),%xmm4
+	je	.Lcbc_dec_six
+	movdqu	96(%r12),%xmm5
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm6
+	movdqu	96(%r12),%xmm14
+	pxor	%xmm12,%xmm2
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_six:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm14
+	pxor	%xmm11,%xmm6
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_five:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm14
+	pxor	%xmm10,%xmm1
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_four:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm14
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_three:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm14
+	pxor	%xmm8,%xmm5
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_two:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm14
+	pxor	%xmm7,%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	jmp	.Lcbc_dec_done
+.align	16
+.Lcbc_dec_one:
+	leaq	(%r12),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	asm_AES_decrypt
+	pxor	32(%rbp),%xmm14
+	movdqu	%xmm14,(%r13)
+	movdqa	%xmm15,%xmm14
+
+.Lcbc_dec_done:
+	movdqu	%xmm14,(%rbx)
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+.Lcbc_dec_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	.Lcbc_dec_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+.Lcbc_dec_epilogue:
+	.byte	0xf3,0xc3
+.size	bsaes_cbc_encrypt,.-bsaes_cbc_encrypt
+
+.globl	bsaes_ctr32_encrypt_blocks
+.hidden bsaes_ctr32_encrypt_blocks
+.type	bsaes_ctr32_encrypt_blocks,@function
+.align	16
+bsaes_ctr32_encrypt_blocks:
+	movq	%rsp,%rax
+.Lctr_enc_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movdqu	(%r8),%xmm0
+	movl	240(%rcx),%eax
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	movdqa	%xmm0,32(%rbp)
+	cmpq	$8,%rdx
+	jb	.Lctr_enc_short
+
+	movl	%eax,%ebx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%ebx,%r10d
+	call	_bsaes_key_convert
+	pxor	%xmm6,%xmm7
+	movdqa	%xmm7,(%rax)
+
+	movdqa	(%rsp),%xmm8
+	leaq	.LADD1(%rip),%r11
+	movdqa	32(%rbp),%xmm15
+	movdqa	-32(%r11),%xmm7
+.byte	102,68,15,56,0,199
+.byte	102,68,15,56,0,255
+	movdqa	%xmm8,(%rsp)
+	jmp	.Lctr_enc_loop
+.align	16
+.Lctr_enc_loop:
+	movdqa	%xmm15,32(%rbp)
+	movdqa	%xmm15,%xmm0
+	movdqa	%xmm15,%xmm1
+	paddd	0(%r11),%xmm0
+	movdqa	%xmm15,%xmm2
+	paddd	16(%r11),%xmm1
+	movdqa	%xmm15,%xmm3
+	paddd	32(%r11),%xmm2
+	movdqa	%xmm15,%xmm4
+	paddd	48(%r11),%xmm3
+	movdqa	%xmm15,%xmm5
+	paddd	64(%r11),%xmm4
+	movdqa	%xmm15,%xmm6
+	paddd	80(%r11),%xmm5
+	paddd	96(%r11),%xmm6
+
+
+
+	movdqa	(%rsp),%xmm8
+	leaq	16(%rsp),%rax
+	movdqa	-16(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	.LBS0(%rip),%r11
+	movl	%ebx,%r10d
+
+	call	_bsaes_encrypt8_bitslice
+
+	subq	$8,%r14
+	jc	.Lctr_enc_loop_done
+
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	movdqu	32(%r12),%xmm9
+	movdqu	48(%r12),%xmm10
+	movdqu	64(%r12),%xmm11
+	movdqu	80(%r12),%xmm12
+	movdqu	96(%r12),%xmm13
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	pxor	%xmm15,%xmm7
+	movdqa	32(%rbp),%xmm15
+	pxor	%xmm8,%xmm0
+	movdqu	%xmm7,0(%r13)
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	%xmm10,%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	%xmm11,%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	%xmm12,%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	%xmm13,%xmm1
+	movdqu	%xmm6,80(%r13)
+	pxor	%xmm14,%xmm4
+	movdqu	%xmm1,96(%r13)
+	leaq	.LADD1(%rip),%r11
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+	paddd	112(%r11),%xmm15
+	jnz	.Lctr_enc_loop
+
+	jmp	.Lctr_enc_done
+.align	16
+.Lctr_enc_loop_done:
+	addq	$8,%r14
+	movdqu	0(%r12),%xmm7
+	pxor	%xmm7,%xmm15
+	movdqu	%xmm15,0(%r13)
+	cmpq	$2,%r14
+	jb	.Lctr_enc_done
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm8,%xmm0
+	movdqu	%xmm0,16(%r13)
+	je	.Lctr_enc_done
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm3,32(%r13)
+	cmpq	$4,%r14
+	jb	.Lctr_enc_done
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm10,%xmm5
+	movdqu	%xmm5,48(%r13)
+	je	.Lctr_enc_done
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm11,%xmm2
+	movdqu	%xmm2,64(%r13)
+	cmpq	$6,%r14
+	jb	.Lctr_enc_done
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm12,%xmm6
+	movdqu	%xmm6,80(%r13)
+	je	.Lctr_enc_done
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm13,%xmm1
+	movdqu	%xmm1,96(%r13)
+	jmp	.Lctr_enc_done
+
+.align	16
+.Lctr_enc_short:
+	leaq	32(%rbp),%rdi
+	leaq	48(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	asm_AES_encrypt
+	movdqu	(%r12),%xmm0
+	leaq	16(%r12),%r12
+	movl	44(%rbp),%eax
+	bswapl	%eax
+	pxor	48(%rbp),%xmm0
+	incl	%eax
+	movdqu	%xmm0,(%r13)
+	bswapl	%eax
+	leaq	16(%r13),%r13
+	movl	%eax,44(%rsp)
+	decq	%r14
+	jnz	.Lctr_enc_short
+
+.Lctr_enc_done:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+.Lctr_enc_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	.Lctr_enc_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+.Lctr_enc_epilogue:
+	.byte	0xf3,0xc3
+.size	bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks
+.globl	bsaes_xts_encrypt
+.hidden bsaes_xts_encrypt
+.type	bsaes_xts_encrypt,@function
+.align	16
+bsaes_xts_encrypt:
+	movq	%rsp,%rax
+.Lxts_enc_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+
+	leaq	(%r9),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r8),%rdx
+	call	asm_AES_encrypt
+
+	movl	240(%r15),%eax
+	movq	%r14,%rbx
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	%xmm6,%xmm7
+	movdqa	%xmm7,(%rax)
+
+	andq	$-16,%r14
+	subq	$128,%rsp
+	movdqa	32(%rbp),%xmm6
+
+	pxor	%xmm14,%xmm14
+	movdqa	.Lxts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+
+	subq	$128,%r14
+	jc	.Lxts_enc_short
+	jmp	.Lxts_enc_loop
+
+.align	16
+.Lxts_enc_loop:
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	movdqa	%xmm6,112(%rsp)
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	pxor	%xmm14,%xmm6
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	96(%rsp),%xmm1
+	movdqu	%xmm6,80(%r13)
+	pxor	112(%rsp),%xmm4
+	movdqu	%xmm1,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	pxor	%xmm14,%xmm14
+	movdqa	.Lxts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+
+	subq	$128,%r14
+	jnc	.Lxts_enc_loop
+
+.Lxts_enc_short:
+	addq	$128,%r14
+	jz	.Lxts_enc_done
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	cmpq	$16,%r14
+	je	.Lxts_enc_1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	cmpq	$32,%r14
+	je	.Lxts_enc_2
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	cmpq	$48,%r14
+	je	.Lxts_enc_3
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	cmpq	$64,%r14
+	je	.Lxts_enc_4
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	cmpq	$80,%r14
+	je	.Lxts_enc_5
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	cmpq	$96,%r14
+	je	.Lxts_enc_6
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqa	%xmm6,112(%rsp)
+	leaq	112(%r12),%r12
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	96(%rsp),%xmm1
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm1,96(%r13)
+	leaq	112(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_6:
+	pxor	%xmm11,%xmm3
+	leaq	96(%r12),%r12
+	pxor	%xmm12,%xmm4
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	leaq	96(%r13),%r13
+
+	movdqa	96(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_5:
+	pxor	%xmm10,%xmm2
+	leaq	80(%r12),%r12
+	pxor	%xmm11,%xmm3
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	movdqu	%xmm2,64(%r13)
+	leaq	80(%r13),%r13
+
+	movdqa	80(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_4:
+	pxor	%xmm9,%xmm1
+	leaq	64(%r12),%r12
+	pxor	%xmm10,%xmm2
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	movdqu	%xmm5,48(%r13)
+	leaq	64(%r13),%r13
+
+	movdqa	64(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_3:
+	pxor	%xmm8,%xmm0
+	leaq	48(%r12),%r12
+	pxor	%xmm9,%xmm1
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm3,32(%r13)
+	leaq	48(%r13),%r13
+
+	movdqa	48(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_2:
+	pxor	%xmm7,%xmm15
+	leaq	32(%r12),%r12
+	pxor	%xmm8,%xmm0
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	leaq	32(%r13),%r13
+
+	movdqa	32(%rsp),%xmm6
+	jmp	.Lxts_enc_done
+.align	16
+.Lxts_enc_1:
+	pxor	%xmm15,%xmm7
+	leaq	16(%r12),%r12
+	movdqa	%xmm7,32(%rbp)
+	leaq	32(%rbp),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	asm_AES_encrypt
+	pxor	32(%rbp),%xmm15
+
+
+
+
+
+	movdqu	%xmm15,0(%r13)
+	leaq	16(%r13),%r13
+
+	movdqa	16(%rsp),%xmm6
+
+.Lxts_enc_done:
+	andl	$15,%ebx
+	jz	.Lxts_enc_ret
+	movq	%r13,%rdx
+
+.Lxts_enc_steal:
+	movzbl	(%r12),%eax
+	movzbl	-16(%rdx),%ecx
+	leaq	1(%r12),%r12
+	movb	%al,-16(%rdx)
+	movb	%cl,0(%rdx)
+	leaq	1(%rdx),%rdx
+	subl	$1,%ebx
+	jnz	.Lxts_enc_steal
+
+	movdqu	-16(%r13),%xmm15
+	leaq	32(%rbp),%rdi
+	pxor	%xmm6,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	asm_AES_encrypt
+	pxor	32(%rbp),%xmm6
+	movdqu	%xmm6,-16(%r13)
+
+.Lxts_enc_ret:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+.Lxts_enc_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	.Lxts_enc_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+.Lxts_enc_epilogue:
+	.byte	0xf3,0xc3
+.size	bsaes_xts_encrypt,.-bsaes_xts_encrypt
+
+.globl	bsaes_xts_decrypt
+.hidden bsaes_xts_decrypt
+.type	bsaes_xts_decrypt,@function
+.align	16
+bsaes_xts_decrypt:
+	movq	%rsp,%rax
+.Lxts_dec_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+
+	leaq	(%r9),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r8),%rdx
+	call	asm_AES_encrypt
+
+	movl	240(%r15),%eax
+	movq	%r14,%rbx
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	(%rsp),%xmm7
+	movdqa	%xmm6,(%rax)
+	movdqa	%xmm7,(%rsp)
+
+	xorl	%eax,%eax
+	andq	$-16,%r14
+	testl	$15,%ebx
+	setnz	%al
+	shlq	$4,%rax
+	subq	%rax,%r14
+
+	subq	$128,%rsp
+	movdqa	32(%rbp),%xmm6
+
+	pxor	%xmm14,%xmm14
+	movdqa	.Lxts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+
+	subq	$128,%r14
+	jc	.Lxts_dec_short
+	jmp	.Lxts_dec_loop
+
+.align	16
+.Lxts_dec_loop:
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	movdqa	%xmm6,112(%rsp)
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	pxor	%xmm14,%xmm6
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	pxor	96(%rsp),%xmm2
+	movdqu	%xmm6,80(%r13)
+	pxor	112(%rsp),%xmm4
+	movdqu	%xmm2,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	pxor	%xmm14,%xmm14
+	movdqa	.Lxts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+
+	subq	$128,%r14
+	jnc	.Lxts_dec_loop
+
+.Lxts_dec_short:
+	addq	$128,%r14
+	jz	.Lxts_dec_done
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	cmpq	$16,%r14
+	je	.Lxts_dec_1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	cmpq	$32,%r14
+	je	.Lxts_dec_2
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	cmpq	$48,%r14
+	je	.Lxts_dec_3
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	cmpq	$64,%r14
+	je	.Lxts_dec_4
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	cmpq	$80,%r14
+	je	.Lxts_dec_5
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	cmpq	$96,%r14
+	je	.Lxts_dec_6
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqa	%xmm6,112(%rsp)
+	leaq	112(%r12),%r12
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	pxor	96(%rsp),%xmm2
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	leaq	112(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_6:
+	pxor	%xmm11,%xmm3
+	leaq	96(%r12),%r12
+	pxor	%xmm12,%xmm4
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	leaq	96(%r13),%r13
+
+	movdqa	96(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_5:
+	pxor	%xmm10,%xmm2
+	leaq	80(%r12),%r12
+	pxor	%xmm11,%xmm3
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	leaq	80(%r13),%r13
+
+	movdqa	80(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_4:
+	pxor	%xmm9,%xmm1
+	leaq	64(%r12),%r12
+	pxor	%xmm10,%xmm2
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	leaq	64(%r13),%r13
+
+	movdqa	64(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_3:
+	pxor	%xmm8,%xmm0
+	leaq	48(%r12),%r12
+	pxor	%xmm9,%xmm1
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	leaq	48(%r13),%r13
+
+	movdqa	48(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_2:
+	pxor	%xmm7,%xmm15
+	leaq	32(%r12),%r12
+	pxor	%xmm8,%xmm0
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	leaq	32(%r13),%r13
+
+	movdqa	32(%rsp),%xmm6
+	jmp	.Lxts_dec_done
+.align	16
+.Lxts_dec_1:
+	pxor	%xmm15,%xmm7
+	leaq	16(%r12),%r12
+	movdqa	%xmm7,32(%rbp)
+	leaq	32(%rbp),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	asm_AES_decrypt
+	pxor	32(%rbp),%xmm15
+
+
+
+
+
+	movdqu	%xmm15,0(%r13)
+	leaq	16(%r13),%r13
+
+	movdqa	16(%rsp),%xmm6
+
+.Lxts_dec_done:
+	andl	$15,%ebx
+	jz	.Lxts_dec_ret
+
+	pxor	%xmm14,%xmm14
+	movdqa	.Lxts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	movdqa	%xmm6,%xmm5
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	movdqu	(%r12),%xmm15
+	pxor	%xmm13,%xmm6
+
+	leaq	32(%rbp),%rdi
+	pxor	%xmm6,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	asm_AES_decrypt
+	pxor	32(%rbp),%xmm6
+	movq	%r13,%rdx
+	movdqu	%xmm6,(%r13)
+
+.Lxts_dec_steal:
+	movzbl	16(%r12),%eax
+	movzbl	(%rdx),%ecx
+	leaq	1(%r12),%r12
+	movb	%al,(%rdx)
+	movb	%cl,16(%rdx)
+	leaq	1(%rdx),%rdx
+	subl	$1,%ebx
+	jnz	.Lxts_dec_steal
+
+	movdqu	(%r13),%xmm15
+	leaq	32(%rbp),%rdi
+	pxor	%xmm5,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	asm_AES_decrypt
+	pxor	32(%rbp),%xmm5
+	movdqu	%xmm5,(%r13)
+
+.Lxts_dec_ret:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+.Lxts_dec_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	.Lxts_dec_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+.Lxts_dec_epilogue:
+	.byte	0xf3,0xc3
+.size	bsaes_xts_decrypt,.-bsaes_xts_decrypt
+.type	_bsaes_const,@object
+.align	64
+_bsaes_const:
+.LM0ISR:
+.quad	0x0a0e0206070b0f03, 0x0004080c0d010509
+.LISRM0:
+.quad	0x01040b0e0205080f, 0x0306090c00070a0d
+.LISR:
+.quad	0x0504070602010003, 0x0f0e0d0c080b0a09
+.LBS0:
+.quad	0x5555555555555555, 0x5555555555555555
+.LBS1:
+.quad	0x3333333333333333, 0x3333333333333333
+.LBS2:
+.quad	0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
+.LSR:
+.quad	0x0504070600030201, 0x0f0e0d0c0a09080b
+.LSRM0:
+.quad	0x0304090e00050a0f, 0x01060b0c0207080d
+.LM0SR:
+.quad	0x0a0e02060f03070b, 0x0004080c05090d01
+.LSWPUP:
+.quad	0x0706050403020100, 0x0c0d0e0f0b0a0908
+.LSWPUPM0SR:
+.quad	0x0a0d02060c03070b, 0x0004080f05090e01
+.LADD1:
+.quad	0x0000000000000000, 0x0000000100000000
+.LADD2:
+.quad	0x0000000000000000, 0x0000000200000000
+.LADD3:
+.quad	0x0000000000000000, 0x0000000300000000
+.LADD4:
+.quad	0x0000000000000000, 0x0000000400000000
+.LADD5:
+.quad	0x0000000000000000, 0x0000000500000000
+.LADD6:
+.quad	0x0000000000000000, 0x0000000600000000
+.LADD7:
+.quad	0x0000000000000000, 0x0000000700000000
+.LADD8:
+.quad	0x0000000000000000, 0x0000000800000000
+.Lxts_magic:
+.long	0x87,0,1,0
+.Lmasks:
+.quad	0x0101010101010101, 0x0101010101010101
+.quad	0x0202020202020202, 0x0202020202020202
+.quad	0x0404040404040404, 0x0404040404040404
+.quad	0x0808080808080808, 0x0808080808080808
+.LM0:
+.quad	0x02060a0e03070b0f, 0x0004080c0105090d
+.L63:
+.quad	0x6363636363636363, 0x6363636363636363
+.byte	66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44,32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32,65,110,100,121,32,80,111,108,121,97,107,111,118,0
+.align	64
+.size	_bsaes_const,.-_bsaes_const
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S
new file mode 100644
index 0000000..1d12424
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/aes/vpaes-x86_64.S
@@ -0,0 +1,834 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.type	_vpaes_encrypt_core,@function
+.align	16
+_vpaes_encrypt_core:
+	movq	%rdx,%r9
+	movq	$16,%r11
+	movl	240(%rdx),%eax
+	movdqa	%xmm9,%xmm1
+	movdqa	.Lk_ipt(%rip),%xmm2
+	pandn	%xmm0,%xmm1
+	movdqu	(%r9),%xmm5
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	.Lk_ipt+16(%rip),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm5,%xmm2
+	addq	$16,%r9
+	pxor	%xmm2,%xmm0
+	leaq	.Lk_mc_backward(%rip),%r10
+	jmp	.Lenc_entry
+
+.align	16
+.Lenc_loop:
+
+	movdqa	%xmm13,%xmm4
+	movdqa	%xmm12,%xmm0
+.byte	102,15,56,0,226
+.byte	102,15,56,0,195
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm15,%xmm5
+	pxor	%xmm4,%xmm0
+	movdqa	-64(%r11,%r10,1),%xmm1
+.byte	102,15,56,0,234
+	movdqa	(%r11,%r10,1),%xmm4
+	movdqa	%xmm14,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm0,%xmm3
+	pxor	%xmm5,%xmm2
+.byte	102,15,56,0,193
+	addq	$16,%r9
+	pxor	%xmm2,%xmm0
+.byte	102,15,56,0,220
+	addq	$16,%r11
+	pxor	%xmm0,%xmm3
+.byte	102,15,56,0,193
+	andq	$48,%r11
+	subq	$1,%rax
+	pxor	%xmm3,%xmm0
+
+.Lenc_entry:
+
+	movdqa	%xmm9,%xmm1
+	movdqa	%xmm11,%xmm5
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,232
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm10,%xmm4
+	pxor	%xmm5,%xmm3
+.byte	102,15,56,0,224
+	movdqa	%xmm10,%xmm2
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%r9),%xmm5
+	pxor	%xmm1,%xmm3
+	jnz	.Lenc_loop
+
+
+	movdqa	-96(%r10),%xmm4
+	movdqa	-80(%r10),%xmm0
+.byte	102,15,56,0,226
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,195
+	movdqa	64(%r11,%r10,1),%xmm1
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,193
+	.byte	0xf3,0xc3
+.size	_vpaes_encrypt_core,.-_vpaes_encrypt_core
+
+
+
+
+
+
+.type	_vpaes_decrypt_core,@function
+.align	16
+_vpaes_decrypt_core:
+	movq	%rdx,%r9
+	movl	240(%rdx),%eax
+	movdqa	%xmm9,%xmm1
+	movdqa	.Lk_dipt(%rip),%xmm2
+	pandn	%xmm0,%xmm1
+	movq	%rax,%r11
+	psrld	$4,%xmm1
+	movdqu	(%r9),%xmm5
+	shlq	$4,%r11
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	.Lk_dipt+16(%rip),%xmm0
+	xorq	$48,%r11
+	leaq	.Lk_dsbd(%rip),%r10
+.byte	102,15,56,0,193
+	andq	$48,%r11
+	pxor	%xmm5,%xmm2
+	movdqa	.Lk_mc_forward+48(%rip),%xmm5
+	pxor	%xmm2,%xmm0
+	addq	$16,%r9
+	addq	%r10,%r11
+	jmp	.Ldec_entry
+
+.align	16
+.Ldec_loop:
+
+
+
+	movdqa	-32(%r10),%xmm4
+	movdqa	-16(%r10),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	0(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	16(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	32(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	48(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	64(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	80(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	addq	$16,%r9
+.byte	102,15,58,15,237,12
+	pxor	%xmm1,%xmm0
+	subq	$1,%rax
+
+.Ldec_entry:
+
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	movdqa	%xmm11,%xmm2
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm10,%xmm4
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm10,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%r9),%xmm0
+	pxor	%xmm1,%xmm3
+	jnz	.Ldec_loop
+
+
+	movdqa	96(%r10),%xmm4
+.byte	102,15,56,0,226
+	pxor	%xmm0,%xmm4
+	movdqa	112(%r10),%xmm0
+	movdqa	-352(%r11),%xmm2
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,194
+	.byte	0xf3,0xc3
+.size	_vpaes_decrypt_core,.-_vpaes_decrypt_core
+
+
+
+
+
+
+.type	_vpaes_schedule_core,@function
+.align	16
+_vpaes_schedule_core:
+
+
+
+
+
+	call	_vpaes_preheat
+	movdqa	.Lk_rcon(%rip),%xmm8
+	movdqu	(%rdi),%xmm0
+
+
+	movdqa	%xmm0,%xmm3
+	leaq	.Lk_ipt(%rip),%r11
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm7
+
+	leaq	.Lk_sr(%rip),%r10
+	testq	%rcx,%rcx
+	jnz	.Lschedule_am_decrypting
+
+
+	movdqu	%xmm0,(%rdx)
+	jmp	.Lschedule_go
+
+.Lschedule_am_decrypting:
+
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,217
+	movdqu	%xmm3,(%rdx)
+	xorq	$48,%r8
+
+.Lschedule_go:
+	cmpl	$192,%esi
+	ja	.Lschedule_256
+	je	.Lschedule_192
+
+
+
+
+
+
+
+
+
+
+.Lschedule_128:
+	movl	$10,%esi
+
+.Loop_schedule_128:
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	.Lschedule_mangle_last
+	call	_vpaes_schedule_mangle
+	jmp	.Loop_schedule_128
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.align	16
+.Lschedule_192:
+	movdqu	8(%rdi),%xmm0
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm6
+	pxor	%xmm4,%xmm4
+	movhlps	%xmm4,%xmm6
+	movl	$4,%esi
+
+.Loop_schedule_192:
+	call	_vpaes_schedule_round
+.byte	102,15,58,15,198,8
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	.Lschedule_mangle_last
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	jmp	.Loop_schedule_192
+
+
+
+
+
+
+
+
+
+
+
+.align	16
+.Lschedule_256:
+	movdqu	16(%rdi),%xmm0
+	call	_vpaes_schedule_transform
+	movl	$7,%esi
+
+.Loop_schedule_256:
+	call	_vpaes_schedule_mangle
+	movdqa	%xmm0,%xmm6
+
+
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	.Lschedule_mangle_last
+	call	_vpaes_schedule_mangle
+
+
+	pshufd	$255,%xmm0,%xmm0
+	movdqa	%xmm7,%xmm5
+	movdqa	%xmm6,%xmm7
+	call	_vpaes_schedule_low_round
+	movdqa	%xmm5,%xmm7
+
+	jmp	.Loop_schedule_256
+
+
+
+
+
+
+
+
+
+
+
+
+.align	16
+.Lschedule_mangle_last:
+
+	leaq	.Lk_deskew(%rip),%r11
+	testq	%rcx,%rcx
+	jnz	.Lschedule_mangle_last_dec
+
+
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,193
+	leaq	.Lk_opt(%rip),%r11
+	addq	$32,%rdx
+
+.Lschedule_mangle_last_dec:
+	addq	$-16,%rdx
+	pxor	.Lk_s63(%rip),%xmm0
+	call	_vpaes_schedule_transform
+	movdqu	%xmm0,(%rdx)
+
+
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	.byte	0xf3,0xc3
+.size	_vpaes_schedule_core,.-_vpaes_schedule_core
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.type	_vpaes_schedule_192_smear,@function
+.align	16
+_vpaes_schedule_192_smear:
+	pshufd	$128,%xmm6,%xmm1
+	pshufd	$254,%xmm7,%xmm0
+	pxor	%xmm1,%xmm6
+	pxor	%xmm1,%xmm1
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm6,%xmm0
+	movhlps	%xmm1,%xmm6
+	.byte	0xf3,0xc3
+.size	_vpaes_schedule_192_smear,.-_vpaes_schedule_192_smear
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.type	_vpaes_schedule_round,@function
+.align	16
+_vpaes_schedule_round:
+
+	pxor	%xmm1,%xmm1
+.byte	102,65,15,58,15,200,15
+.byte	102,69,15,58,15,192,15
+	pxor	%xmm1,%xmm7
+
+
+	pshufd	$255,%xmm0,%xmm0
+.byte	102,15,58,15,192,1
+
+
+
+
+_vpaes_schedule_low_round:
+
+	movdqa	%xmm7,%xmm1
+	pslldq	$4,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm7,%xmm1
+	pslldq	$8,%xmm7
+	pxor	%xmm1,%xmm7
+	pxor	.Lk_s63(%rip),%xmm7
+
+
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+	movdqa	%xmm11,%xmm2
+.byte	102,15,56,0,208
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm10,%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	movdqa	%xmm10,%xmm4
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm10,%xmm2
+.byte	102,15,56,0,211
+	pxor	%xmm0,%xmm2
+	movdqa	%xmm10,%xmm3
+.byte	102,15,56,0,220
+	pxor	%xmm1,%xmm3
+	movdqa	%xmm13,%xmm4
+.byte	102,15,56,0,226
+	movdqa	%xmm12,%xmm0
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+
+
+	pxor	%xmm7,%xmm0
+	movdqa	%xmm0,%xmm7
+	.byte	0xf3,0xc3
+.size	_vpaes_schedule_round,.-_vpaes_schedule_round
+
+
+
+
+
+
+
+
+
+
+.type	_vpaes_schedule_transform,@function
+.align	16
+_vpaes_schedule_transform:
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+	movdqa	(%r11),%xmm2
+.byte	102,15,56,0,208
+	movdqa	16(%r11),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm2,%xmm0
+	.byte	0xf3,0xc3
+.size	_vpaes_schedule_transform,.-_vpaes_schedule_transform
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.type	_vpaes_schedule_mangle,@function
+.align	16
+_vpaes_schedule_mangle:
+	movdqa	%xmm0,%xmm4
+	movdqa	.Lk_mc_forward(%rip),%xmm5
+	testq	%rcx,%rcx
+	jnz	.Lschedule_mangle_dec
+
+
+	addq	$16,%rdx
+	pxor	.Lk_s63(%rip),%xmm4
+.byte	102,15,56,0,229
+	movdqa	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+
+	jmp	.Lschedule_mangle_both
+.align	16
+.Lschedule_mangle_dec:
+
+	leaq	.Lk_dksd(%rip),%r11
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm4,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm4
+
+	movdqa	0(%r11),%xmm2
+.byte	102,15,56,0,212
+	movdqa	16(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	32(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	48(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	64(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	80(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	96(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	112(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+
+	addq	$-16,%rdx
+
+.Lschedule_mangle_both:
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,217
+	addq	$-16,%r8
+	andq	$48,%r8
+	movdqu	%xmm3,(%rdx)
+	.byte	0xf3,0xc3
+.size	_vpaes_schedule_mangle,.-_vpaes_schedule_mangle
+
+
+
+
+.globl	vpaes_set_encrypt_key
+.hidden vpaes_set_encrypt_key
+.type	vpaes_set_encrypt_key,@function
+.align	16
+vpaes_set_encrypt_key:
+	movl	%esi,%eax
+	shrl	$5,%eax
+	addl	$5,%eax
+	movl	%eax,240(%rdx)
+
+	movl	$0,%ecx
+	movl	$48,%r8d
+	call	_vpaes_schedule_core
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	vpaes_set_encrypt_key,.-vpaes_set_encrypt_key
+
+.globl	vpaes_set_decrypt_key
+.hidden vpaes_set_decrypt_key
+.type	vpaes_set_decrypt_key,@function
+.align	16
+vpaes_set_decrypt_key:
+	movl	%esi,%eax
+	shrl	$5,%eax
+	addl	$5,%eax
+	movl	%eax,240(%rdx)
+	shll	$4,%eax
+	leaq	16(%rdx,%rax,1),%rdx
+
+	movl	$1,%ecx
+	movl	%esi,%r8d
+	shrl	$1,%r8d
+	andl	$32,%r8d
+	xorl	$32,%r8d
+	call	_vpaes_schedule_core
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	vpaes_set_decrypt_key,.-vpaes_set_decrypt_key
+
+.globl	vpaes_encrypt
+.hidden vpaes_encrypt
+.type	vpaes_encrypt,@function
+.align	16
+vpaes_encrypt:
+	movdqu	(%rdi),%xmm0
+	call	_vpaes_preheat
+	call	_vpaes_encrypt_core
+	movdqu	%xmm0,(%rsi)
+	.byte	0xf3,0xc3
+.size	vpaes_encrypt,.-vpaes_encrypt
+
+.globl	vpaes_decrypt
+.hidden vpaes_decrypt
+.type	vpaes_decrypt,@function
+.align	16
+vpaes_decrypt:
+	movdqu	(%rdi),%xmm0
+	call	_vpaes_preheat
+	call	_vpaes_decrypt_core
+	movdqu	%xmm0,(%rsi)
+	.byte	0xf3,0xc3
+.size	vpaes_decrypt,.-vpaes_decrypt
+.globl	vpaes_cbc_encrypt
+.hidden vpaes_cbc_encrypt
+.type	vpaes_cbc_encrypt,@function
+.align	16
+vpaes_cbc_encrypt:
+	xchgq	%rcx,%rdx
+	subq	$16,%rcx
+	jc	.Lcbc_abort
+	movdqu	(%r8),%xmm6
+	subq	%rdi,%rsi
+	call	_vpaes_preheat
+	cmpl	$0,%r9d
+	je	.Lcbc_dec_loop
+	jmp	.Lcbc_enc_loop
+.align	16
+.Lcbc_enc_loop:
+	movdqu	(%rdi),%xmm0
+	pxor	%xmm6,%xmm0
+	call	_vpaes_encrypt_core
+	movdqa	%xmm0,%xmm6
+	movdqu	%xmm0,(%rsi,%rdi,1)
+	leaq	16(%rdi),%rdi
+	subq	$16,%rcx
+	jnc	.Lcbc_enc_loop
+	jmp	.Lcbc_done
+.align	16
+.Lcbc_dec_loop:
+	movdqu	(%rdi),%xmm0
+	movdqa	%xmm0,%xmm7
+	call	_vpaes_decrypt_core
+	pxor	%xmm6,%xmm0
+	movdqa	%xmm7,%xmm6
+	movdqu	%xmm0,(%rsi,%rdi,1)
+	leaq	16(%rdi),%rdi
+	subq	$16,%rcx
+	jnc	.Lcbc_dec_loop
+.Lcbc_done:
+	movdqu	%xmm6,(%r8)
+.Lcbc_abort:
+	.byte	0xf3,0xc3
+.size	vpaes_cbc_encrypt,.-vpaes_cbc_encrypt
+
+
+
+
+
+
+.type	_vpaes_preheat,@function
+.align	16
+_vpaes_preheat:
+	leaq	.Lk_s0F(%rip),%r10
+	movdqa	-32(%r10),%xmm10
+	movdqa	-16(%r10),%xmm11
+	movdqa	0(%r10),%xmm9
+	movdqa	48(%r10),%xmm13
+	movdqa	64(%r10),%xmm12
+	movdqa	80(%r10),%xmm15
+	movdqa	96(%r10),%xmm14
+	.byte	0xf3,0xc3
+.size	_vpaes_preheat,.-_vpaes_preheat
+
+
+
+
+
+.type	_vpaes_consts,@object
+.align	64
+_vpaes_consts:
+.Lk_inv:
+.quad	0x0E05060F0D080180, 0x040703090A0B0C02
+.quad	0x01040A060F0B0780, 0x030D0E0C02050809
+
+.Lk_s0F:
+.quad	0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F
+
+.Lk_ipt:
+.quad	0xC2B2E8985A2A7000, 0xCABAE09052227808
+.quad	0x4C01307D317C4D00, 0xCD80B1FCB0FDCC81
+
+.Lk_sb1:
+.quad	0xB19BE18FCB503E00, 0xA5DF7A6E142AF544
+.quad	0x3618D415FAE22300, 0x3BF7CCC10D2ED9EF
+.Lk_sb2:
+.quad	0xE27A93C60B712400, 0x5EB7E955BC982FCD
+.quad	0x69EB88400AE12900, 0xC2A163C8AB82234A
+.Lk_sbo:
+.quad	0xD0D26D176FBDC700, 0x15AABF7AC502A878
+.quad	0xCFE474A55FBB6A00, 0x8E1E90D1412B35FA
+
+.Lk_mc_forward:
+.quad	0x0407060500030201, 0x0C0F0E0D080B0A09
+.quad	0x080B0A0904070605, 0x000302010C0F0E0D
+.quad	0x0C0F0E0D080B0A09, 0x0407060500030201
+.quad	0x000302010C0F0E0D, 0x080B0A0904070605
+
+.Lk_mc_backward:
+.quad	0x0605040702010003, 0x0E0D0C0F0A09080B
+.quad	0x020100030E0D0C0F, 0x0A09080B06050407
+.quad	0x0E0D0C0F0A09080B, 0x0605040702010003
+.quad	0x0A09080B06050407, 0x020100030E0D0C0F
+
+.Lk_sr:
+.quad	0x0706050403020100, 0x0F0E0D0C0B0A0908
+.quad	0x030E09040F0A0500, 0x0B06010C07020D08
+.quad	0x0F060D040B020900, 0x070E050C030A0108
+.quad	0x0B0E0104070A0D00, 0x0306090C0F020508
+
+.Lk_rcon:
+.quad	0x1F8391B9AF9DEEB6, 0x702A98084D7C7D81
+
+.Lk_s63:
+.quad	0x5B5B5B5B5B5B5B5B, 0x5B5B5B5B5B5B5B5B
+
+.Lk_opt:
+.quad	0xFF9F4929D6B66000, 0xF7974121DEBE6808
+.quad	0x01EDBD5150BCEC00, 0xE10D5DB1B05C0CE0
+
+.Lk_deskew:
+.quad	0x07E4A34047A4E300, 0x1DFEB95A5DBEF91A
+.quad	0x5F36B5DC83EA6900, 0x2841C2ABF49D1E77
+
+
+
+
+
+.Lk_dksd:
+.quad	0xFEB91A5DA3E44700, 0x0740E3A45A1DBEF9
+.quad	0x41C277F4B5368300, 0x5FDC69EAAB289D1E
+.Lk_dksb:
+.quad	0x9A4FCA1F8550D500, 0x03D653861CC94C99
+.quad	0x115BEDA7B6FC4A00, 0xD993256F7E3482C8
+.Lk_dkse:
+.quad	0xD5031CCA1FC9D600, 0x53859A4C994F5086
+.quad	0xA23196054FDC7BE8, 0xCD5EF96A20B31487
+.Lk_dks9:
+.quad	0xB6116FC87ED9A700, 0x4AED933482255BFC
+.quad	0x4576516227143300, 0x8BB89FACE9DAFDCE
+
+
+
+
+
+.Lk_dipt:
+.quad	0x0F505B040B545F00, 0x154A411E114E451A
+.quad	0x86E383E660056500, 0x12771772F491F194
+
+.Lk_dsb9:
+.quad	0x851C03539A86D600, 0xCAD51F504F994CC9
+.quad	0xC03B1789ECD74900, 0x725E2C9EB2FBA565
+.Lk_dsbd:
+.quad	0x7D57CCDFE6B1A200, 0xF56E9B13882A4439
+.quad	0x3CE2FAF724C6CB00, 0x2931180D15DEEFD3
+.Lk_dsbb:
+.quad	0xD022649296B44200, 0x602646F6B0F2D404
+.quad	0xC19498A6CD596700, 0xF3FF0C3E3255AA6B
+.Lk_dsbe:
+.quad	0x46F2929626D4D000, 0x2242600464B4F6B0
+.quad	0x0C55A6CDFFAAC100, 0x9467F36B98593E32
+.Lk_dsbo:
+.quad	0x1387EA537EF94000, 0xC7AA6DB9D4943E2D
+.quad	0x12D7560F93441D00, 0xCA4B8159D8C58E9C
+.byte	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105,111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105,118,101,114,115,105,116,121,41,0
+.align	64
+.size	_vpaes_consts,.-_vpaes_consts
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S
new file mode 100644
index 0000000..cd334d9
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-avx2.S
@@ -0,0 +1,34 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	rsaz_avx2_eligible
+.hidden rsaz_avx2_eligible
+.type	rsaz_avx2_eligible,@function
+rsaz_avx2_eligible:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	rsaz_avx2_eligible,.-rsaz_avx2_eligible
+
+.globl	rsaz_1024_sqr_avx2
+.hidden rsaz_1024_sqr_avx2
+.globl	rsaz_1024_mul_avx2
+.hidden rsaz_1024_mul_avx2
+.globl	rsaz_1024_norm2red_avx2
+.hidden rsaz_1024_norm2red_avx2
+.globl	rsaz_1024_red2norm_avx2
+.hidden rsaz_1024_red2norm_avx2
+.globl	rsaz_1024_scatter5_avx2
+.hidden rsaz_1024_scatter5_avx2
+.globl	rsaz_1024_gather5_avx2
+.hidden rsaz_1024_gather5_avx2
+.type	rsaz_1024_sqr_avx2,@function
+rsaz_1024_sqr_avx2:
+rsaz_1024_mul_avx2:
+rsaz_1024_norm2red_avx2:
+rsaz_1024_red2norm_avx2:
+rsaz_1024_scatter5_avx2:
+rsaz_1024_gather5_avx2:
+.byte	0x0f,0x0b
+	.byte	0xf3,0xc3
+.size	rsaz_1024_sqr_avx2,.-rsaz_1024_sqr_avx2
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S
new file mode 100644
index 0000000..dd3d310
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/bn/rsaz-x86_64.S
@@ -0,0 +1,1127 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	rsaz_512_sqr
+.hidden rsaz_512_sqr
+.type	rsaz_512_sqr,@function
+.align	32
+rsaz_512_sqr:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+.Lsqr_body:
+	movq	%rdx,%rbp
+	movq	(%rsi),%rdx
+	movq	8(%rsi),%rax
+	movq	%rcx,128(%rsp)
+	jmp	.Loop_sqr
+
+.align	32
+.Loop_sqr:
+	movl	%r8d,128+8(%rsp)
+
+	movq	%rdx,%rbx
+	mulq	%rdx
+	movq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	%rbx,%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	addq	%r8,%r8
+	movq	%r9,%rcx
+	adcq	%r9,%r9
+
+	mulq	%rax
+	movq	%rax,(%rsp)
+	addq	%rdx,%r8
+	adcq	$0,%r9
+
+	movq	%r8,8(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	8(%rsi),%r8
+	movq	16(%rsi),%rax
+	mulq	%r8
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r11
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r12
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r13
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r14
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r15
+	movq	%r8,%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r15
+	movq	%rdx,%r8
+	movq	%r10,%rdx
+	adcq	$0,%r8
+
+	addq	%rdx,%rdx
+	leaq	(%rcx,%r10,2),%r10
+	movq	%r11,%rbx
+	adcq	%r11,%r11
+
+	mulq	%rax
+	addq	%rax,%r9
+	adcq	%rdx,%r10
+	adcq	$0,%r11
+
+	movq	%r9,16(%rsp)
+	movq	%r10,24(%rsp)
+	shrq	$63,%rbx
+
+
+	movq	16(%rsi),%r9
+	movq	24(%rsi),%rax
+	mulq	%r9
+	addq	%rax,%r12
+	movq	32(%rsi),%rax
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	addq	%rax,%r13
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r13
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	addq	%rax,%r14
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r14
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	movq	%r12,%r10
+	leaq	(%rbx,%r12,2),%r12
+	addq	%rax,%r15
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r15
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	shrq	$63,%r10
+	addq	%rax,%r8
+	movq	%r9,%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	movq	%r13,%rcx
+	leaq	(%r10,%r13,2),%r13
+
+	mulq	%rax
+	addq	%rax,%r11
+	adcq	%rdx,%r12
+	adcq	$0,%r13
+
+	movq	%r11,32(%rsp)
+	movq	%r12,40(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	24(%rsi),%r10
+	movq	32(%rsi),%rax
+	mulq	%r10
+	addq	%rax,%r14
+	movq	40(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	addq	%rax,%r15
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r15
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	movq	%r14,%r12
+	leaq	(%rcx,%r14,2),%r14
+	addq	%rax,%r8
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r8
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	shrq	$63,%r12
+	addq	%rax,%r9
+	movq	%r10,%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	movq	%r15,%rbx
+	leaq	(%r12,%r15,2),%r15
+
+	mulq	%rax
+	addq	%rax,%r13
+	adcq	%rdx,%r14
+	adcq	$0,%r15
+
+	movq	%r13,48(%rsp)
+	movq	%r14,56(%rsp)
+	shrq	$63,%rbx
+
+
+	movq	32(%rsi),%r11
+	movq	40(%rsi),%rax
+	mulq	%r11
+	addq	%rax,%r8
+	movq	48(%rsi),%rax
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r11
+	addq	%rax,%r9
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%r8,%r12
+	leaq	(%rbx,%r8,2),%r8
+	addq	%rcx,%r9
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r11
+	shrq	$63,%r12
+	addq	%rax,%r10
+	movq	%r11,%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	movq	%r9,%rcx
+	leaq	(%r12,%r9,2),%r9
+
+	mulq	%rax
+	addq	%rax,%r15
+	adcq	%rdx,%r8
+	adcq	$0,%r9
+
+	movq	%r15,64(%rsp)
+	movq	%r8,72(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	40(%rsi),%r12
+	movq	48(%rsi),%rax
+	mulq	%r12
+	addq	%rax,%r10
+	movq	56(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r12
+	addq	%rax,%r11
+	movq	%r12,%rax
+	movq	%r10,%r15
+	leaq	(%rcx,%r10,2),%r10
+	adcq	$0,%rdx
+	shrq	$63,%r15
+	addq	%rbx,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	movq	%r11,%rbx
+	leaq	(%r15,%r11,2),%r11
+
+	mulq	%rax
+	addq	%rax,%r9
+	adcq	%rdx,%r10
+	adcq	$0,%r11
+
+	movq	%r9,80(%rsp)
+	movq	%r10,88(%rsp)
+
+
+	movq	48(%rsi),%r13
+	movq	56(%rsi),%rax
+	mulq	%r13
+	addq	%rax,%r12
+	movq	%r13,%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	xorq	%r14,%r14
+	shlq	$1,%rbx
+	adcq	%r12,%r12
+	adcq	%r13,%r13
+	adcq	%r14,%r14
+
+	mulq	%rax
+	addq	%rax,%r11
+	adcq	%rdx,%r12
+	adcq	$0,%r13
+
+	movq	%r11,96(%rsp)
+	movq	%r12,104(%rsp)
+
+
+	movq	56(%rsi),%rax
+	mulq	%rax
+	addq	%rax,%r13
+	adcq	$0,%rdx
+
+	addq	%rdx,%r14
+
+	movq	%r13,112(%rsp)
+	movq	%r14,120(%rsp)
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	movq	%r8,%rdx
+	movq	%r9,%rax
+	movl	128+8(%rsp),%r8d
+	movq	%rdi,%rsi
+
+	decl	%r8d
+	jnz	.Loop_sqr
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+.Lsqr_epilogue:
+	.byte	0xf3,0xc3
+.size	rsaz_512_sqr,.-rsaz_512_sqr
+.globl	rsaz_512_mul
+.hidden rsaz_512_mul
+.type	rsaz_512_mul,@function
+.align	32
+rsaz_512_mul:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+.Lmul_body:
+.byte	102,72,15,110,199
+.byte	102,72,15,110,201
+	movq	%r8,128(%rsp)
+	movq	(%rdx),%rbx
+	movq	%rdx,%rbp
+	call	__rsaz_512_mul
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+.Lmul_epilogue:
+	.byte	0xf3,0xc3
+.size	rsaz_512_mul,.-rsaz_512_mul
+.globl	rsaz_512_mul_gather4
+.hidden rsaz_512_mul_gather4
+.type	rsaz_512_mul_gather4,@function
+.align	32
+rsaz_512_mul_gather4:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	subq	$128+24,%rsp
+.Lmul_gather4_body:
+	movl	64(%rdx,%r9,4),%eax
+.byte	102,72,15,110,199
+	movl	(%rdx,%r9,4),%ebx
+.byte	102,72,15,110,201
+	movq	%r8,128(%rsp)
+
+	shlq	$32,%rax
+	orq	%rax,%rbx
+	movq	(%rsi),%rax
+	movq	8(%rsi),%rcx
+	leaq	128(%rdx,%r9,4),%rbp
+	mulq	%rbx
+	movq	%rax,(%rsp)
+	movq	%rcx,%rax
+	movq	%rdx,%r8
+
+	mulq	%rbx
+	movd	(%rbp),%xmm4
+	addq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	movd	64(%rbp),%xmm5
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	pslldq	$4,%xmm5
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	por	%xmm5,%xmm4
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	leaq	128(%rbp),%rbp
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+.byte	102,72,15,126,227
+	addq	%rax,%r14
+	movq	(%rsi),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rsp),%rdi
+	movl	$7,%ecx
+	jmp	.Loop_mul_gather
+
+.align	32
+.Loop_mul_gather:
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	8(%rsi),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	movd	(%rbp),%xmm4
+	addq	%rax,%r9
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	movd	64(%rbp),%xmm5
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	pslldq	$4,%xmm5
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	por	%xmm5,%xmm4
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+.byte	102,72,15,126,227
+	addq	%rax,%r15
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	128(%rbp),%rbp
+	leaq	8(%rdi),%rdi
+
+	decl	%ecx
+	jnz	.Loop_mul_gather
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+.Lmul_gather4_epilogue:
+	.byte	0xf3,0xc3
+.size	rsaz_512_mul_gather4,.-rsaz_512_mul_gather4
+.globl	rsaz_512_mul_scatter4
+.hidden rsaz_512_mul_scatter4
+.type	rsaz_512_mul_scatter4,@function
+.align	32
+rsaz_512_mul_scatter4:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	subq	$128+24,%rsp
+.Lmul_scatter4_body:
+	leaq	(%r8,%r9,4),%r8
+.byte	102,72,15,110,199
+.byte	102,72,15,110,202
+.byte	102,73,15,110,208
+	movq	%rcx,128(%rsp)
+
+	movq	%rdi,%rbp
+	movq	(%rdi),%rbx
+	call	__rsaz_512_mul
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+.byte	102,72,15,126,214
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	movl	%r8d,0(%rsi)
+	shrq	$32,%r8
+	movl	%r9d,128(%rsi)
+	shrq	$32,%r9
+	movl	%r10d,256(%rsi)
+	shrq	$32,%r10
+	movl	%r11d,384(%rsi)
+	shrq	$32,%r11
+	movl	%r12d,512(%rsi)
+	shrq	$32,%r12
+	movl	%r13d,640(%rsi)
+	shrq	$32,%r13
+	movl	%r14d,768(%rsi)
+	shrq	$32,%r14
+	movl	%r15d,896(%rsi)
+	shrq	$32,%r15
+	movl	%r8d,64(%rsi)
+	movl	%r9d,192(%rsi)
+	movl	%r10d,320(%rsi)
+	movl	%r11d,448(%rsi)
+	movl	%r12d,576(%rsi)
+	movl	%r13d,704(%rsi)
+	movl	%r14d,832(%rsi)
+	movl	%r15d,960(%rsi)
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+.Lmul_scatter4_epilogue:
+	.byte	0xf3,0xc3
+.size	rsaz_512_mul_scatter4,.-rsaz_512_mul_scatter4
+.globl	rsaz_512_mul_by_one
+.hidden rsaz_512_mul_by_one
+.type	rsaz_512_mul_by_one,@function
+.align	32
+rsaz_512_mul_by_one:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+.Lmul_by_one_body:
+	movq	%rdx,%rbp
+	movq	%rcx,128(%rsp)
+
+	movq	(%rsi),%r8
+	pxor	%xmm0,%xmm0
+	movq	8(%rsi),%r9
+	movq	16(%rsi),%r10
+	movq	24(%rsi),%r11
+	movq	32(%rsi),%r12
+	movq	40(%rsi),%r13
+	movq	48(%rsi),%r14
+	movq	56(%rsi),%r15
+
+	movdqa	%xmm0,(%rsp)
+	movdqa	%xmm0,16(%rsp)
+	movdqa	%xmm0,32(%rsp)
+	movdqa	%xmm0,48(%rsp)
+	movdqa	%xmm0,64(%rsp)
+	movdqa	%xmm0,80(%rsp)
+	movdqa	%xmm0,96(%rsp)
+	call	__rsaz_512_reduce
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+.Lmul_by_one_epilogue:
+	.byte	0xf3,0xc3
+.size	rsaz_512_mul_by_one,.-rsaz_512_mul_by_one
+.type	__rsaz_512_reduce,@function
+.align	32
+__rsaz_512_reduce:
+	movq	%r8,%rbx
+	imulq	128+8(%rsp),%rbx
+	movq	0(%rbp),%rax
+	movl	$8,%ecx
+	jmp	.Lreduction_loop
+
+.align	32
+.Lreduction_loop:
+	mulq	%rbx
+	movq	8(%rbp),%rax
+	negq	%r8
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	16(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	24(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	128+8(%rsp),%rsi
+
+
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	40(%rbp),%rax
+	adcq	$0,%rdx
+	imulq	%r8,%rsi
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	%rsi,%rbx
+	addq	%rax,%r15
+	movq	0(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jne	.Lreduction_loop
+
+	.byte	0xf3,0xc3
+.size	__rsaz_512_reduce,.-__rsaz_512_reduce
+.type	__rsaz_512_subtract,@function
+.align	32
+__rsaz_512_subtract:
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	movq	0(%rbp),%r8
+	movq	8(%rbp),%r9
+	negq	%r8
+	notq	%r9
+	andq	%rcx,%r8
+	movq	16(%rbp),%r10
+	andq	%rcx,%r9
+	notq	%r10
+	movq	24(%rbp),%r11
+	andq	%rcx,%r10
+	notq	%r11
+	movq	32(%rbp),%r12
+	andq	%rcx,%r11
+	notq	%r12
+	movq	40(%rbp),%r13
+	andq	%rcx,%r12
+	notq	%r13
+	movq	48(%rbp),%r14
+	andq	%rcx,%r13
+	notq	%r14
+	movq	56(%rbp),%r15
+	andq	%rcx,%r14
+	notq	%r15
+	andq	%rcx,%r15
+
+	addq	(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	.byte	0xf3,0xc3
+.size	__rsaz_512_subtract,.-__rsaz_512_subtract
+.type	__rsaz_512_mul,@function
+.align	32
+__rsaz_512_mul:
+	leaq	8(%rsp),%rdi
+
+	movq	(%rsi),%rax
+	mulq	%rbx
+	movq	%rax,(%rdi)
+	movq	8(%rsi),%rax
+	movq	%rdx,%r8
+
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	(%rsi),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rbp),%rbp
+	leaq	8(%rdi),%rdi
+
+	movl	$7,%ecx
+	jmp	.Loop_mul
+
+.align	32
+.Loop_mul:
+	movq	(%rbp),%rbx
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	8(%rsi),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	leaq	8(%rbp),%rbp
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r15
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rdi),%rdi
+
+	decl	%ecx
+	jnz	.Loop_mul
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	.byte	0xf3,0xc3
+.size	__rsaz_512_mul,.-__rsaz_512_mul
+.globl	rsaz_512_scatter4
+.hidden rsaz_512_scatter4
+.type	rsaz_512_scatter4,@function
+.align	16
+rsaz_512_scatter4:
+	leaq	(%rdi,%rdx,4),%rdi
+	movl	$8,%r9d
+	jmp	.Loop_scatter
+.align	16
+.Loop_scatter:
+	movq	(%rsi),%rax
+	leaq	8(%rsi),%rsi
+	movl	%eax,(%rdi)
+	shrq	$32,%rax
+	movl	%eax,64(%rdi)
+	leaq	128(%rdi),%rdi
+	decl	%r9d
+	jnz	.Loop_scatter
+	.byte	0xf3,0xc3
+.size	rsaz_512_scatter4,.-rsaz_512_scatter4
+
+.globl	rsaz_512_gather4
+.hidden rsaz_512_gather4
+.type	rsaz_512_gather4,@function
+.align	16
+rsaz_512_gather4:
+	leaq	(%rsi,%rdx,4),%rsi
+	movl	$8,%r9d
+	jmp	.Loop_gather
+.align	16
+.Loop_gather:
+	movl	(%rsi),%eax
+	movl	64(%rsi),%r8d
+	leaq	128(%rsi),%rsi
+	shlq	$32,%r8
+	orq	%r8,%rax
+	movq	%rax,(%rdi)
+	leaq	8(%rdi),%rdi
+	decl	%r9d
+	jnz	.Loop_gather
+	.byte	0xf3,0xc3
+.size	rsaz_512_gather4,.-rsaz_512_gather4
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S
new file mode 100644
index 0000000..4d401c6
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont.S
@@ -0,0 +1,728 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	bn_mul_mont
+.hidden bn_mul_mont
+.type	bn_mul_mont,@function
+.align	16
+bn_mul_mont:
+	testl	$3,%r9d
+	jnz	.Lmul_enter
+	cmpl	$8,%r9d
+	jb	.Lmul_enter
+	cmpq	%rsi,%rdx
+	jne	.Lmul4x_enter
+	testl	$7,%r9d
+	jz	.Lsqr8x_enter
+	jmp	.Lmul4x_enter
+
+.align	16
+.Lmul_enter:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	leaq	2(%r9),%r10
+	movq	%rsp,%r11
+	negq	%r10
+	leaq	(%rsp,%r10,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%r11,8(%rsp,%r9,8)
+.Lmul_body:
+	movq	%rdx,%r12
+	movq	(%r8),%r8
+	movq	(%r12),%rbx
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	.L1st_enter
+
+.align	16
+.L1st:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	movq	%r10,%r11
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+.L1st_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	1(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	.L1st
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+	movq	%r10,%r11
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	jmp	.Louter
+.align	16
+.Louter:
+	movq	(%r12,%r14,8),%rbx
+	xorq	%r15,%r15
+	movq	%r8,%rbp
+	movq	(%rsp),%r10
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	8(%rsp),%r10
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	.Linner_enter
+
+.align	16
+.Linner:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+.Linner_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	leaq	1(%r15),%r15
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	.Linner
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	cmpq	%r9,%r14
+	jb	.Louter
+
+	xorq	%r14,%r14
+	movq	(%rsp),%rax
+	leaq	(%rsp),%rsi
+	movq	%r9,%r15
+	jmp	.Lsub
+.align	16
+.Lsub:	sbbq	(%rcx,%r14,8),%rax
+	movq	%rax,(%rdi,%r14,8)
+	movq	8(%rsi,%r14,8),%rax
+	leaq	1(%r14),%r14
+	decq	%r15
+	jnz	.Lsub
+
+	sbbq	$0,%rax
+	xorq	%r14,%r14
+	movq	%r9,%r15
+.align	16
+.Lcopy:
+	movq	(%rsp,%r14,8),%rsi
+	movq	(%rdi,%r14,8),%rcx
+	xorq	%rcx,%rsi
+	andq	%rax,%rsi
+	xorq	%rcx,%rsi
+	movq	%r14,(%rsp,%r14,8)
+	movq	%rsi,(%rdi,%r14,8)
+	leaq	1(%r14),%r14
+	subq	$1,%r15
+	jnz	.Lcopy
+
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lmul_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_mul_mont,.-bn_mul_mont
+.type	bn_mul4x_mont,@function
+.align	16
+bn_mul4x_mont:
+.Lmul4x_enter:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	leaq	4(%r9),%r10
+	movq	%rsp,%r11
+	negq	%r10
+	leaq	(%rsp,%r10,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%r11,8(%rsp,%r9,8)
+.Lmul4x_body:
+	movq	%rdi,16(%rsp,%r9,8)
+	movq	%rdx,%r12
+	movq	(%r8),%r8
+	movq	(%r12),%rbx
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	4(%r15),%r15
+	adcq	$0,%rdx
+	movq	%rdi,(%rsp)
+	movq	%rdx,%r13
+	jmp	.L1st4x
+.align	16
+.L1st4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	4(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	-16(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-32(%rsp,%r15,8)
+	movq	%rdx,%r13
+	cmpq	%r9,%r15
+	jb	.L1st4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdi,(%rsp,%r15,8)
+
+	leaq	1(%r14),%r14
+.align	4
+.Louter4x:
+	movq	(%r12,%r14,8),%rbx
+	xorq	%r15,%r15
+	movq	(%rsp),%r10
+	movq	%r8,%rbp
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%rsp),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	4(%r15),%r15
+	adcq	$0,%rdx
+	movq	%rdi,(%rsp)
+	movq	%rdx,%r13
+	jmp	.Linner4x
+.align	16
+.Linner4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-16(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	leaq	4(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	-16(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-32(%rsp,%r15,8)
+	movq	%rdx,%r13
+	cmpq	%r9,%r15
+	jb	.Linner4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-16(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	leaq	1(%r14),%r14
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	addq	(%rsp,%r9,8),%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdi,(%rsp,%r15,8)
+
+	cmpq	%r9,%r14
+	jb	.Louter4x
+	movq	16(%rsp,%r9,8),%rdi
+	movq	0(%rsp),%rax
+	movq	8(%rsp),%rdx
+	shrq	$2,%r9
+	leaq	(%rsp),%rsi
+	xorq	%r14,%r14
+
+	subq	0(%rcx),%rax
+	movq	16(%rsi),%rbx
+	movq	24(%rsi),%rbp
+	sbbq	8(%rcx),%rdx
+	leaq	-1(%r9),%r15
+	jmp	.Lsub4x
+.align	16
+.Lsub4x:
+	movq	%rax,0(%rdi,%r14,8)
+	movq	%rdx,8(%rdi,%r14,8)
+	sbbq	16(%rcx,%r14,8),%rbx
+	movq	32(%rsi,%r14,8),%rax
+	movq	40(%rsi,%r14,8),%rdx
+	sbbq	24(%rcx,%r14,8),%rbp
+	movq	%rbx,16(%rdi,%r14,8)
+	movq	%rbp,24(%rdi,%r14,8)
+	sbbq	32(%rcx,%r14,8),%rax
+	movq	48(%rsi,%r14,8),%rbx
+	movq	56(%rsi,%r14,8),%rbp
+	sbbq	40(%rcx,%r14,8),%rdx
+	leaq	4(%r14),%r14
+	decq	%r15
+	jnz	.Lsub4x
+
+	movq	%rax,0(%rdi,%r14,8)
+	movq	32(%rsi,%r14,8),%rax
+	sbbq	16(%rcx,%r14,8),%rbx
+	movq	%rdx,8(%rdi,%r14,8)
+	sbbq	24(%rcx,%r14,8),%rbp
+	movq	%rbx,16(%rdi,%r14,8)
+
+	sbbq	$0,%rax
+	movq	%rax,%xmm0
+	punpcklqdq	%xmm0,%xmm0
+	movq	%rbp,24(%rdi,%r14,8)
+	xorq	%r14,%r14
+
+	movq	%r9,%r15
+	pxor	%xmm5,%xmm5
+	jmp	.Lcopy4x
+.align	16
+.Lcopy4x:
+	movdqu	(%rsp,%r14,1),%xmm2
+	movdqu	16(%rsp,%r14,1),%xmm4
+	movdqu	(%rdi,%r14,1),%xmm1
+	movdqu	16(%rdi,%r14,1),%xmm3
+	pxor	%xmm1,%xmm2
+	pxor	%xmm3,%xmm4
+	pand	%xmm0,%xmm2
+	pand	%xmm0,%xmm4
+	pxor	%xmm1,%xmm2
+	pxor	%xmm3,%xmm4
+	movdqu	%xmm2,(%rdi,%r14,1)
+	movdqu	%xmm4,16(%rdi,%r14,1)
+	movdqa	%xmm5,(%rsp,%r14,1)
+	movdqa	%xmm5,16(%rsp,%r14,1)
+
+	leaq	32(%r14),%r14
+	decq	%r15
+	jnz	.Lcopy4x
+
+	shlq	$2,%r9
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lmul4x_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_mul4x_mont,.-bn_mul4x_mont
+.extern	bn_sqr8x_internal
+.hidden bn_sqr8x_internal
+
+.type	bn_sqr8x_mont,@function
+.align	32
+bn_sqr8x_mont:
+.Lsqr8x_enter:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shlq	$3+2,%r10
+	negq	%r9
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,4),%r11
+	movq	(%r8),%r8
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	.Lsqr8x_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,4),%rsp
+	jmp	.Lsqr8x_sp_done
+
+.align	32
+.Lsqr8x_sp_alt:
+	leaq	4096-64(,%r9,4),%r10
+	leaq	-64(%rsp,%r9,4),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+.Lsqr8x_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+	leaq	64(%rsp,%r9,2),%r11
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+.Lsqr8x_body:
+
+	movq	%r9,%rbp
+.byte	102,73,15,110,211
+	shrq	$3+2,%rbp
+	movl	OPENSSL_ia32cap_P+8(%rip),%eax
+	jmp	.Lsqr8x_copy_n
+
+.align	32
+.Lsqr8x_copy_n:
+	movq	0(%rcx),%xmm0
+	movq	8(%rcx),%xmm1
+	movq	16(%rcx),%xmm3
+	movq	24(%rcx),%xmm4
+	leaq	32(%rcx),%rcx
+	movdqa	%xmm0,0(%r11)
+	movdqa	%xmm1,16(%r11)
+	movdqa	%xmm3,32(%r11)
+	movdqa	%xmm4,48(%r11)
+	leaq	64(%r11),%r11
+	decq	%rbp
+	jnz	.Lsqr8x_copy_n
+
+	pxor	%xmm0,%xmm0
+.byte	102,72,15,110,207
+.byte	102,73,15,110,218
+	call	bn_sqr8x_internal
+
+	pxor	%xmm0,%xmm0
+	leaq	48(%rsp),%rax
+	leaq	64(%rsp,%r9,2),%rdx
+	shrq	$3+2,%r9
+	movq	40(%rsp),%rsi
+	jmp	.Lsqr8x_zero
+
+.align	32
+.Lsqr8x_zero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	movdqa	%xmm0,32(%rax)
+	movdqa	%xmm0,48(%rax)
+	leaq	64(%rax),%rax
+	movdqa	%xmm0,0(%rdx)
+	movdqa	%xmm0,16(%rdx)
+	movdqa	%xmm0,32(%rdx)
+	movdqa	%xmm0,48(%rdx)
+	leaq	64(%rdx),%rdx
+	decq	%r9
+	jnz	.Lsqr8x_zero
+
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lsqr8x_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_sqr8x_mont,.-bn_sqr8x_mont
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	16
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S
new file mode 100644
index 0000000..02edc69
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/bn/x86_64-mont5.S
@@ -0,0 +1,1823 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	bn_mul_mont_gather5
+.hidden bn_mul_mont_gather5
+.type	bn_mul_mont_gather5,@function
+.align	64
+bn_mul_mont_gather5:
+	testl	$7,%r9d
+	jnz	.Lmul_enter
+	jmp	.Lmul4x_enter
+
+.align	16
+.Lmul_enter:
+	movl	%r9d,%r9d
+	movq	%rsp,%rax
+	movl	8(%rsp),%r10d
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	2(%r9),%r11
+	negq	%r11
+	leaq	(%rsp,%r11,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%rax,8(%rsp,%r9,8)
+.Lmul_body:
+	movq	%rdx,%r12
+	movq	%r10,%r11
+	shrq	$3,%r10
+	andq	$7,%r11
+	notq	%r10
+	leaq	.Lmagic_masks(%rip),%rax
+	andq	$3,%r10
+	leaq	96(%r12,%r11,8),%r12
+	movq	0(%rax,%r10,8),%xmm4
+	movq	8(%rax,%r10,8),%xmm5
+	movq	16(%rax,%r10,8),%xmm6
+	movq	24(%rax,%r10,8),%xmm7
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+.byte	102,72,15,126,195
+
+	movq	(%r8),%r8
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	.L1st_enter
+
+.align	16
+.L1st:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	movq	%r10,%r11
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+.L1st_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	1(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	.L1st
+
+.byte	102,72,15,126,195
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+	movq	%r10,%r11
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	jmp	.Louter
+.align	16
+.Louter:
+	xorq	%r15,%r15
+	movq	%r8,%rbp
+	movq	(%rsp),%r10
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	8(%rsp),%r10
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	.Linner_enter
+
+.align	16
+.Linner:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+.Linner_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	leaq	1(%r15),%r15
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	.Linner
+
+.byte	102,72,15,126,195
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	cmpq	%r9,%r14
+	jb	.Louter
+
+	xorq	%r14,%r14
+	movq	(%rsp),%rax
+	leaq	(%rsp),%rsi
+	movq	%r9,%r15
+	jmp	.Lsub
+.align	16
+.Lsub:	sbbq	(%rcx,%r14,8),%rax
+	movq	%rax,(%rdi,%r14,8)
+	movq	8(%rsi,%r14,8),%rax
+	leaq	1(%r14),%r14
+	decq	%r15
+	jnz	.Lsub
+
+	sbbq	$0,%rax
+	xorq	%r14,%r14
+	movq	%r9,%r15
+.align	16
+.Lcopy:
+	movq	(%rsp,%r14,8),%rsi
+	movq	(%rdi,%r14,8),%rcx
+	xorq	%rcx,%rsi
+	andq	%rax,%rsi
+	xorq	%rcx,%rsi
+	movq	%r14,(%rsp,%r14,8)
+	movq	%rsi,(%rdi,%r14,8)
+	leaq	1(%r14),%r14
+	subq	$1,%r15
+	jnz	.Lcopy
+
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lmul_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_mul_mont_gather5,.-bn_mul_mont_gather5
+.type	bn_mul4x_mont_gather5,@function
+.align	32
+bn_mul4x_mont_gather5:
+.Lmul4x_enter:
+.byte	0x67
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+.byte	0x67
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	.Lmul4xsp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	.Lmul4xsp_done
+
+.align	32
+.Lmul4xsp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+.Lmul4xsp_done:
+	andq	$-64,%rsp
+	negq	%r9
+
+	movq	%rax,40(%rsp)
+.Lmul4x_body:
+
+	call	mul4x_internal
+
+	movq	40(%rsp),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lmul4x_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_mul4x_mont_gather5,.-bn_mul4x_mont_gather5
+
+.type	mul4x_internal,@function
+.align	32
+mul4x_internal:
+	shlq	$5,%r9
+	movl	8(%rax),%r10d
+	leaq	256(%rdx,%r9,1),%r13
+	shrq	$5,%r9
+	movq	%r10,%r11
+	shrq	$3,%r10
+	andq	$7,%r11
+	notq	%r10
+	leaq	.Lmagic_masks(%rip),%rax
+	andq	$3,%r10
+	leaq	96(%rdx,%r11,8),%r12
+	movq	0(%rax,%r10,8),%xmm4
+	movq	8(%rax,%r10,8),%xmm5
+	addq	$7,%r11
+	movq	16(%rax,%r10,8),%xmm6
+	movq	24(%rax,%r10,8),%xmm7
+	andq	$7,%r11
+
+	movq	-96(%r12),%xmm0
+	leaq	256(%r12),%r14
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+.byte	0x67
+	por	%xmm1,%xmm0
+	movq	-96(%r14),%xmm1
+.byte	0x67
+	pand	%xmm7,%xmm3
+.byte	0x67
+	por	%xmm2,%xmm0
+	movq	-32(%r14),%xmm2
+.byte	0x67
+	pand	%xmm4,%xmm1
+.byte	0x67
+	por	%xmm3,%xmm0
+	movq	32(%r14),%xmm3
+
+.byte	102,72,15,126,195
+	movq	96(%r14),%xmm0
+	movq	%r13,16+8(%rsp)
+	movq	%rdi,56+8(%rsp)
+
+	movq	(%r8),%r8
+	movq	(%rsi),%rax
+	leaq	(%rsi,%r9,1),%rsi
+	negq	%r9
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	pand	%xmm5,%xmm2
+	pand	%xmm6,%xmm3
+	por	%xmm2,%xmm1
+
+	imulq	%r10,%rbp
+
+
+
+
+
+
+
+	leaq	64+8(%rsp,%r11,8),%r14
+	movq	%rdx,%r11
+
+	pand	%xmm7,%xmm0
+	por	%xmm3,%xmm1
+	leaq	512(%r12),%r12
+	por	%xmm1,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	32(%r9),%r15
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdi,(%r14)
+	movq	%rdx,%r13
+	jmp	.L1st4x
+
+.align	32
+.L1st4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	0(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdi,(%r14)
+	movq	%rdx,%r13
+
+	addq	$32,%r15
+	jnz	.L1st4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%r13
+
+.byte	102,72,15,126,195
+	leaq	(%rcx,%r9,2),%rcx
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%r14)
+
+	jmp	.Louter4x
+
+.align	32
+.Louter4x:
+	movq	(%r14,%r9,1),%r10
+	movq	%r8,%rbp
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+
+	imulq	%r10,%rbp
+.byte	0x67
+	movq	%rdx,%r11
+	movq	%rdi,(%r14)
+
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+	por	%xmm2,%xmm0
+	leaq	(%r14,%r9,1),%r14
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	32(%r9),%r15
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+	jmp	.Linner4x
+
+.align	32
+.Linner4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	adcq	$0,%rdx
+	addq	16(%r14),%r10
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-32(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	-8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	0(%rcx),%rax
+	adcq	$0,%rdx
+	addq	(%r14),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%r13,-8(%r14)
+	movq	%rdx,%r13
+
+	addq	$32,%r15
+	jnz	.Linner4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	adcq	$0,%rdx
+	addq	16(%r14),%r10
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-32(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	%rbp,%rax
+	movq	-16(%rcx),%rbp
+	adcq	$0,%rdx
+	addq	-8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%r13
+
+.byte	102,72,15,126,195
+	movq	%rdi,-16(%r14)
+	leaq	(%rcx,%r9,2),%rcx
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	addq	(%r14),%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%r14)
+
+	cmpq	16+8(%rsp),%r12
+	jb	.Louter4x
+	subq	%r13,%rbp
+	adcq	%r15,%r15
+	orq	%r15,%rdi
+	xorq	$1,%rdi
+	leaq	(%r14,%r9,1),%rbx
+	leaq	(%rcx,%rdi,8),%rbp
+	movq	%r9,%rcx
+	sarq	$3+2,%rcx
+	movq	56+8(%rsp),%rdi
+	jmp	.Lsqr4x_sub
+.size	mul4x_internal,.-mul4x_internal
+.globl	bn_power5
+.hidden bn_power5
+.type	bn_power5,@function
+.align	32
+bn_power5:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+	movq	(%r8),%r8
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	.Lpwr_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	.Lpwr_sp_done
+
+.align	32
+.Lpwr_sp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+.Lpwr_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+
+
+
+
+
+
+
+
+
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+.Lpower5_body:
+.byte	102,72,15,110,207
+.byte	102,72,15,110,209
+.byte	102,73,15,110,218
+.byte	102,72,15,110,226
+
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+
+.byte	102,72,15,126,209
+.byte	102,72,15,126,226
+	movq	%rsi,%rdi
+	movq	40(%rsp),%rax
+	leaq	32(%rsp),%r8
+
+	call	mul4x_internal
+
+	movq	40(%rsp),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lpower5_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_power5,.-bn_power5
+
+.globl	bn_sqr8x_internal
+.hidden bn_sqr8x_internal
+.hidden	bn_sqr8x_internal
+.type	bn_sqr8x_internal,@function
+.align	32
+bn_sqr8x_internal:
+__bn_sqr8x_internal:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	leaq	32(%r10),%rbp
+	leaq	(%rsi,%r9,1),%rsi
+
+	movq	%r9,%rcx
+
+
+	movq	-32(%rsi,%rbp,1),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi,%rbp,1),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi,%rbp,1),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	movq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	movq	%r10,-24(%rdi,%rbp,1)
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	movq	%r11,-16(%rdi,%rbp,1)
+	movq	%rdx,%r10
+
+
+	movq	-8(%rsi,%rbp,1),%rbx
+	mulq	%r15
+	movq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%rdx,%r13
+
+	leaq	(%rbp),%rcx
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+	jmp	.Lsqr4x_1st
+
+.align	32
+.Lsqr4x_1st:
+	movq	(%rsi,%rcx,1),%rbx
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	8(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,(%rdi,%rcx,1)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	16(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%r10,8(%rdi,%rcx,1)
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	24(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,16(%rdi,%rcx,1)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+	leaq	32(%rcx),%rcx
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+
+	cmpq	$0,%rcx
+	jne	.Lsqr4x_1st
+
+	mulq	%r15
+	addq	%rax,%r13
+	leaq	16(%rbp),%rbp
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+	jmp	.Lsqr4x_outer
+
+.align	32
+.Lsqr4x_outer:
+	movq	-32(%rsi,%rbp,1),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi,%rbp,1),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi,%rbp,1),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	movq	-24(%rdi,%rbp,1),%r10
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	movq	%r10,-24(%rdi,%rbp,1)
+	movq	%rdx,%r11
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	-16(%rdi,%rbp,1),%r11
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	movq	%r11,-16(%rdi,%rbp,1)
+
+	xorq	%r12,%r12
+
+	movq	-8(%rsi,%rbp,1),%rbx
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	-8(%rdi,%rbp,1),%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	%r12,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rbp,1)
+
+	leaq	(%rbp),%rcx
+	jmp	.Lsqr4x_inner
+
+.align	32
+.Lsqr4x_inner:
+	movq	(%rsi,%rcx,1),%rbx
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+	addq	(%rdi,%rcx,1),%r13
+	adcq	$0,%r12
+
+.byte	0x67
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	8(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%r11,(%rdi,%rcx,1)
+	movq	%rbx,%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+	addq	8(%rdi,%rcx,1),%r12
+	leaq	16(%rcx),%rcx
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	%r12,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+
+	cmpq	$0,%rcx
+	jne	.Lsqr4x_inner
+
+.byte	0x67
+	mulq	%r15
+	addq	%rax,%r13
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+
+	addq	$16,%rbp
+	jnz	.Lsqr4x_outer
+
+
+	movq	-32(%rsi),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	%r10,-24(%rdi)
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	movq	-8(%rsi),%rbx
+	adcq	$0,%r10
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,-16(%rdi)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi)
+
+	mulq	%r15
+	addq	%rax,%r13
+	movq	-16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+
+	mulq	%rbx
+	addq	$16,%rbp
+	xorq	%r14,%r14
+	subq	%r9,%rbp
+	xorq	%r15,%r15
+
+	addq	%r12,%rax
+	adcq	$0,%rdx
+	movq	%rax,8(%rdi)
+	movq	%rdx,16(%rdi)
+	movq	%r15,24(%rdi)
+
+	movq	-16(%rsi,%rbp,1),%rax
+	leaq	48+8(%rsp),%rdi
+	xorq	%r10,%r10
+	movq	8(%rdi),%r11
+
+	leaq	(%r14,%r10,2),%r12
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	24(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi,%rbp,1),%rax
+	movq	%r12,(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	32(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	40(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	0(%rsi,%rbp,1),%rax
+	movq	%rbx,16(%rdi)
+	adcq	%rdx,%r8
+	leaq	16(%rbp),%rbp
+	movq	%r8,24(%rdi)
+	sbbq	%r15,%r15
+	leaq	64(%rdi),%rdi
+	jmp	.Lsqr4x_shift_n_add
+
+.align	32
+.Lsqr4x_shift_n_add:
+	leaq	(%r14,%r10,2),%r12
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	-16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	-8(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi,%rbp,1),%rax
+	movq	%r12,-32(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,-24(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	0(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	8(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	0(%rsi,%rbp,1),%rax
+	movq	%rbx,-16(%rdi)
+	adcq	%rdx,%r8
+
+	leaq	(%r14,%r10,2),%r12
+	movq	%r8,-8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	24(%rdi),%r11
+	adcq	%rax,%r12
+	movq	8(%rsi,%rbp,1),%rax
+	movq	%r12,0(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	32(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	40(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	16(%rsi,%rbp,1),%rax
+	movq	%rbx,16(%rdi)
+	adcq	%rdx,%r8
+	movq	%r8,24(%rdi)
+	sbbq	%r15,%r15
+	leaq	64(%rdi),%rdi
+	addq	$32,%rbp
+	jnz	.Lsqr4x_shift_n_add
+
+	leaq	(%r14,%r10,2),%r12
+.byte	0x67
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	-16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	-8(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi),%rax
+	movq	%r12,-32(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,-24(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	mulq	%rax
+	negq	%r15
+	adcq	%rax,%rbx
+	adcq	%rdx,%r8
+	movq	%rbx,-16(%rdi)
+	movq	%r8,-8(%rdi)
+.byte	102,72,15,126,213
+sqr8x_reduction:
+	xorq	%rax,%rax
+	leaq	(%rbp,%r9,2),%rcx
+	leaq	48+8(%rsp,%r9,2),%rdx
+	movq	%rcx,0+8(%rsp)
+	leaq	48+8(%rsp,%r9,1),%rdi
+	movq	%rdx,8+8(%rsp)
+	negq	%r9
+	jmp	.L8x_reduction_loop
+
+.align	32
+.L8x_reduction_loop:
+	leaq	(%rdi,%r9,1),%rdi
+.byte	0x66
+	movq	0(%rdi),%rbx
+	movq	8(%rdi),%r9
+	movq	16(%rdi),%r10
+	movq	24(%rdi),%r11
+	movq	32(%rdi),%r12
+	movq	40(%rdi),%r13
+	movq	48(%rdi),%r14
+	movq	56(%rdi),%r15
+	movq	%rax,(%rdx)
+	leaq	64(%rdi),%rdi
+
+.byte	0x67
+	movq	%rbx,%r8
+	imulq	32+8(%rsp),%rbx
+	movq	0(%rbp),%rax
+	movl	$8,%ecx
+	jmp	.L8x_reduce
+
+.align	32
+.L8x_reduce:
+	mulq	%rbx
+	movq	16(%rbp),%rax
+	negq	%r8
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rbx,48-8+8(%rsp,%rcx,8)
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	32+8(%rsp),%rsi
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	64(%rbp),%rax
+	adcq	$0,%rdx
+	imulq	%r8,%rsi
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	80(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	96(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	112(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	%rsi,%rbx
+	addq	%rax,%r15
+	movq	0(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jnz	.L8x_reduce
+
+	leaq	128(%rbp),%rbp
+	xorq	%rax,%rax
+	movq	8+8(%rsp),%rdx
+	cmpq	0+8(%rsp),%rbp
+	jae	.L8x_no_tail
+
+.byte	0x66
+	addq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	sbbq	%rsi,%rsi
+
+	movq	48+56+8(%rsp),%rbx
+	movl	$8,%ecx
+	movq	0(%rbp),%rax
+	jmp	.L8x_tail
+
+.align	32
+.L8x_tail:
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	16(%rbp),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	leaq	8(%rdi),%rdi
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	64(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	80(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	96(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	112(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	48-16+8(%rsp,%rcx,8),%rbx
+	addq	%rax,%r15
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	0(%rbp),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jnz	.L8x_tail
+
+	leaq	128(%rbp),%rbp
+	movq	8+8(%rsp),%rdx
+	cmpq	0+8(%rsp),%rbp
+	jae	.L8x_tail_done
+
+	movq	48+56+8(%rsp),%rbx
+	negq	%rsi
+	movq	0(%rbp),%rax
+	adcq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	sbbq	%rsi,%rsi
+
+	movl	$8,%ecx
+	jmp	.L8x_tail
+
+.align	32
+.L8x_tail_done:
+	addq	(%rdx),%r8
+	xorq	%rax,%rax
+
+	negq	%rsi
+.L8x_no_tail:
+	adcq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	adcq	$0,%rax
+	movq	-16(%rbp),%rcx
+	xorq	%rsi,%rsi
+
+.byte	102,72,15,126,213
+
+	movq	%r8,0(%rdi)
+	movq	%r9,8(%rdi)
+.byte	102,73,15,126,217
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+	leaq	64(%rdi),%rdi
+
+	cmpq	%rdx,%rdi
+	jb	.L8x_reduction_loop
+
+	subq	%r15,%rcx
+	leaq	(%rdi,%r9,1),%rbx
+	adcq	%rsi,%rsi
+	movq	%r9,%rcx
+	orq	%rsi,%rax
+.byte	102,72,15,126,207
+	xorq	$1,%rax
+.byte	102,72,15,126,206
+	leaq	(%rbp,%rax,8),%rbp
+	sarq	$3+2,%rcx
+	jmp	.Lsqr4x_sub
+
+.align	32
+.Lsqr4x_sub:
+.byte	0x66
+	movq	0(%rbx),%r12
+	movq	8(%rbx),%r13
+	sbbq	0(%rbp),%r12
+	movq	16(%rbx),%r14
+	sbbq	16(%rbp),%r13
+	movq	24(%rbx),%r15
+	leaq	32(%rbx),%rbx
+	sbbq	32(%rbp),%r14
+	movq	%r12,0(%rdi)
+	sbbq	48(%rbp),%r15
+	leaq	64(%rbp),%rbp
+	movq	%r13,8(%rdi)
+	movq	%r14,16(%rdi)
+	movq	%r15,24(%rdi)
+	leaq	32(%rdi),%rdi
+
+	incq	%rcx
+	jnz	.Lsqr4x_sub
+	movq	%r9,%r10
+	negq	%r9
+	.byte	0xf3,0xc3
+.size	bn_sqr8x_internal,.-bn_sqr8x_internal
+.globl	bn_from_montgomery
+.hidden bn_from_montgomery
+.type	bn_from_montgomery,@function
+.align	32
+bn_from_montgomery:
+	testl	$7,%r9d
+	jz	bn_from_mont8x
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	bn_from_montgomery,.-bn_from_montgomery
+
+.type	bn_from_mont8x,@function
+.align	32
+bn_from_mont8x:
+.byte	0x67
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+.byte	0x67
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+	movq	(%r8),%r8
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	.Lfrom_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	.Lfrom_sp_done
+
+.align	32
+.Lfrom_sp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+.Lfrom_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+
+
+
+
+
+
+
+
+
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+.Lfrom_body:
+	movq	%r9,%r11
+	leaq	48(%rsp),%rax
+	pxor	%xmm0,%xmm0
+	jmp	.Lmul_by_1
+
+.align	32
+.Lmul_by_1:
+	movdqu	(%rsi),%xmm1
+	movdqu	16(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm3
+	movdqa	%xmm0,(%rax,%r9,1)
+	movdqu	48(%rsi),%xmm4
+	movdqa	%xmm0,16(%rax,%r9,1)
+.byte	0x48,0x8d,0xb6,0x40,0x00,0x00,0x00
+	movdqa	%xmm1,(%rax)
+	movdqa	%xmm0,32(%rax,%r9,1)
+	movdqa	%xmm2,16(%rax)
+	movdqa	%xmm0,48(%rax,%r9,1)
+	movdqa	%xmm3,32(%rax)
+	movdqa	%xmm4,48(%rax)
+	leaq	64(%rax),%rax
+	subq	$64,%r11
+	jnz	.Lmul_by_1
+
+.byte	102,72,15,110,207
+.byte	102,72,15,110,209
+.byte	0x67
+	movq	%rcx,%rbp
+.byte	102,73,15,110,218
+	call	sqr8x_reduction
+
+	pxor	%xmm0,%xmm0
+	leaq	48(%rsp),%rax
+	movq	40(%rsp),%rsi
+	jmp	.Lfrom_mont_zero
+
+.align	32
+.Lfrom_mont_zero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	movdqa	%xmm0,32(%rax)
+	movdqa	%xmm0,48(%rax)
+	leaq	64(%rax),%rax
+	subq	$32,%r9
+	jnz	.Lfrom_mont_zero
+
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lfrom_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_from_mont8x,.-bn_from_mont8x
+.globl	bn_scatter5
+.hidden bn_scatter5
+.type	bn_scatter5,@function
+.align	16
+bn_scatter5:
+	cmpl	$0,%esi
+	jz	.Lscatter_epilogue
+	leaq	(%rdx,%rcx,8),%rdx
+.Lscatter:
+	movq	(%rdi),%rax
+	leaq	8(%rdi),%rdi
+	movq	%rax,(%rdx)
+	leaq	256(%rdx),%rdx
+	subl	$1,%esi
+	jnz	.Lscatter
+.Lscatter_epilogue:
+	.byte	0xf3,0xc3
+.size	bn_scatter5,.-bn_scatter5
+
+.globl	bn_gather5
+.hidden bn_gather5
+.type	bn_gather5,@function
+.align	16
+bn_gather5:
+	movl	%ecx,%r11d
+	shrl	$3,%ecx
+	andq	$7,%r11
+	notl	%ecx
+	leaq	.Lmagic_masks(%rip),%rax
+	andl	$3,%ecx
+	leaq	128(%rdx,%r11,8),%rdx
+	movq	0(%rax,%rcx,8),%xmm4
+	movq	8(%rax,%rcx,8),%xmm5
+	movq	16(%rax,%rcx,8),%xmm6
+	movq	24(%rax,%rcx,8),%xmm7
+	jmp	.Lgather
+.align	16
+.Lgather:
+	movq	-128(%rdx),%xmm0
+	movq	-64(%rdx),%xmm1
+	pand	%xmm4,%xmm0
+	movq	0(%rdx),%xmm2
+	pand	%xmm5,%xmm1
+	movq	64(%rdx),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+.byte	0x67,0x67
+	por	%xmm2,%xmm0
+	leaq	256(%rdx),%rdx
+	por	%xmm3,%xmm0
+
+	movq	%xmm0,(%rdi)
+	leaq	8(%rdi),%rdi
+	subl	$1,%esi
+	jnz	.Lgather
+	.byte	0xf3,0xc3
+.LSEH_end_bn_gather5:
+.size	bn_gather5,.-bn_gather5
+.align	64
+.Lmagic_masks:
+.long	0,0, 0,0, 0,0, -1,-1
+.long	0,0, 0,0, 0,0,  0,0
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115,99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S b/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S
new file mode 100644
index 0000000..9eef154
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/cpu-x86_64-asm.S
@@ -0,0 +1,143 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	OPENSSL_ia32_cpuid
+.hidden OPENSSL_ia32_cpuid
+.type	OPENSSL_ia32_cpuid,@function
+.align	16
+OPENSSL_ia32_cpuid:
+
+
+	movq	%rdi,%rdi
+	movq	%rbx,%r8
+
+	xorl	%eax,%eax
+	movl	%eax,8(%rdi)
+	cpuid
+	movl	%eax,%r11d
+
+	xorl	%eax,%eax
+	cmpl	$1970169159,%ebx
+	setne	%al
+	movl	%eax,%r9d
+	cmpl	$1231384169,%edx
+	setne	%al
+	orl	%eax,%r9d
+	cmpl	$1818588270,%ecx
+	setne	%al
+	orl	%eax,%r9d
+	jz	.Lintel
+
+	cmpl	$1752462657,%ebx
+	setne	%al
+	movl	%eax,%r10d
+	cmpl	$1769238117,%edx
+	setne	%al
+	orl	%eax,%r10d
+	cmpl	$1145913699,%ecx
+	setne	%al
+	orl	%eax,%r10d
+	jnz	.Lintel
+
+
+
+
+	movl	$2147483648,%eax
+	cpuid
+
+
+	cmpl	$2147483649,%eax
+	jb	.Lintel
+	movl	%eax,%r10d
+	movl	$2147483649,%eax
+	cpuid
+
+
+	orl	%ecx,%r9d
+	andl	$2049,%r9d
+
+	cmpl	$2147483656,%r10d
+	jb	.Lintel
+
+	movl	$2147483656,%eax
+	cpuid
+
+	movzbq	%cl,%r10
+	incq	%r10
+
+	movl	$1,%eax
+	cpuid
+
+	btl	$28,%edx
+	jnc	.Lgeneric
+	shrl	$16,%ebx
+	cmpb	%r10b,%bl
+	ja	.Lgeneric
+	andl	$4026531839,%edx
+	jmp	.Lgeneric
+
+.Lintel:
+	cmpl	$4,%r11d
+	movl	$-1,%r10d
+	jb	.Lnocacheinfo
+
+	movl	$4,%eax
+	movl	$0,%ecx
+	cpuid
+	movl	%eax,%r10d
+	shrl	$14,%r10d
+	andl	$4095,%r10d
+
+	cmpl	$7,%r11d
+	jb	.Lnocacheinfo
+
+	movl	$7,%eax
+	xorl	%ecx,%ecx
+	cpuid
+	movl	%ebx,8(%rdi)
+
+.Lnocacheinfo:
+	movl	$1,%eax
+	cpuid
+
+	andl	$3220176895,%edx
+	cmpl	$0,%r9d
+	jne	.Lnotintel
+	orl	$1073741824,%edx
+.Lnotintel:
+	btl	$28,%edx
+	jnc	.Lgeneric
+	andl	$4026531839,%edx
+	cmpl	$0,%r10d
+	je	.Lgeneric
+
+	orl	$268435456,%edx
+	shrl	$16,%ebx
+	cmpb	$1,%bl
+	ja	.Lgeneric
+	andl	$4026531839,%edx
+.Lgeneric:
+	andl	$2048,%r9d
+	andl	$4294965247,%ecx
+	orl	%ecx,%r9d
+
+	movl	%edx,%r10d
+	btl	$27,%r9d
+	jnc	.Lclear_avx
+	xorl	%ecx,%ecx
+.byte	0x0f,0x01,0xd0
+	andl	$6,%eax
+	cmpl	$6,%eax
+	je	.Ldone
+.Lclear_avx:
+	movl	$4026525695,%eax
+	andl	%eax,%r9d
+	andl	$4294967263,8(%rdi)
+.Ldone:
+	movl	%r9d,4(%rdi)
+	movl	%r10d,0(%rdi)
+	movq	%r8,%rbx
+	.byte	0xf3,0xc3
+.size	OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
+
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S
new file mode 100644
index 0000000..7644689
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/md5/md5-x86_64.S
@@ -0,0 +1,671 @@
+#if defined(__x86_64__)
+.text	
+.align	16
+
+.globl	md5_block_asm_data_order
+.hidden md5_block_asm_data_order
+.type	md5_block_asm_data_order,@function
+md5_block_asm_data_order:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r14
+	pushq	%r15
+.Lprologue:
+
+
+
+
+	movq	%rdi,%rbp
+	shlq	$6,%rdx
+	leaq	(%rsi,%rdx,1),%rdi
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+
+
+
+
+
+
+
+	cmpq	%rdi,%rsi
+	je	.Lend
+
+
+.Lloop:
+	movl	%eax,%r8d
+	movl	%ebx,%r9d
+	movl	%ecx,%r14d
+	movl	%edx,%r15d
+	movl	0(%rsi),%r10d
+	movl	%edx,%r11d
+	xorl	%ecx,%r11d
+	leal	-680876936(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	4(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-389564586(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	8(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	606105819(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	12(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-1044525330(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	16(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	-176418897(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	20(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	1200080426(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	24(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-1473231341(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	28(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-45705983(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	32(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	1770035416(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	36(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-1958414417(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	40(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-42063(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	44(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-1990404162(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	48(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	1804603682(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	52(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-40341101(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	56(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-1502002290(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	60(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	1236535329(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	0(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	movl	4(%rsi),%r10d
+	movl	%edx,%r11d
+	movl	%edx,%r12d
+	notl	%r11d
+	leal	-165796510(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	24(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-1069501632(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	44(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	643717713(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	0(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-373897302(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	20(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	-701558691(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	40(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	38016083(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	60(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	-660478335(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	16(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-405537848(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	36(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	568446438(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	56(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-1019803690(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	12(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	-187363961(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	32(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	1163531501(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	52(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	-1444681467(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	8(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-51403784(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	28(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	1735328473(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	48(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-1926607734(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	0(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	movl	20(%rsi),%r10d
+	movl	%ecx,%r11d
+	leal	-378558(%rax,%r10,1),%eax
+	movl	32(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-2022574463(%rdx,%r10,1),%edx
+	movl	44(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	1839030562(%rcx,%r10,1),%ecx
+	movl	56(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-35309556(%rbx,%r10,1),%ebx
+	movl	4(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	-1530992060(%rax,%r10,1),%eax
+	movl	16(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	1272893353(%rdx,%r10,1),%edx
+	movl	28(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	-155497632(%rcx,%r10,1),%ecx
+	movl	40(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-1094730640(%rbx,%r10,1),%ebx
+	movl	52(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	681279174(%rax,%r10,1),%eax
+	movl	0(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-358537222(%rdx,%r10,1),%edx
+	movl	12(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	-722521979(%rcx,%r10,1),%ecx
+	movl	24(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	76029189(%rbx,%r10,1),%ebx
+	movl	36(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	-640364487(%rax,%r10,1),%eax
+	movl	48(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-421815835(%rdx,%r10,1),%edx
+	movl	60(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	530742520(%rcx,%r10,1),%ecx
+	movl	8(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-995338651(%rbx,%r10,1),%ebx
+	movl	0(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	movl	0(%rsi),%r10d
+	movl	$4294967295,%r11d
+	xorl	%edx,%r11d
+	leal	-198630844(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	28(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	1126891415(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	56(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1416354905(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	20(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-57434055(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	48(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	1700485571(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	12(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-1894986606(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	40(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1051523(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	4(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-2054922799(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	32(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	1873313359(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	60(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-30611744(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	24(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1560198380(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	52(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	1309151649(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	16(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	-145523070(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	44(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-1120210379(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	8(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	718787259(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	36(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-343485551(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	0(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+
+	addl	%r8d,%eax
+	addl	%r9d,%ebx
+	addl	%r14d,%ecx
+	addl	%r15d,%edx
+
+
+	addq	$64,%rsi
+	cmpq	%rdi,%rsi
+	jb	.Lloop
+
+
+.Lend:
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	movq	(%rsp),%r15
+	movq	8(%rsp),%r14
+	movq	16(%rsp),%r12
+	movq	24(%rsp),%rbx
+	movq	32(%rsp),%rbp
+	addq	$40,%rsp
+.Lepilogue:
+	.byte	0xf3,0xc3
+.size	md5_block_asm_data_order,.-md5_block_asm_data_order
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S
new file mode 100644
index 0000000..f01692e
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/modes/aesni-gcm-x86_64.S
@@ -0,0 +1,19 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	aesni_gcm_encrypt
+.hidden aesni_gcm_encrypt
+.type	aesni_gcm_encrypt,@function
+aesni_gcm_encrypt:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	aesni_gcm_encrypt,.-aesni_gcm_encrypt
+
+.globl	aesni_gcm_decrypt
+.hidden aesni_gcm_decrypt
+.type	aesni_gcm_decrypt,@function
+aesni_gcm_decrypt:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+.size	aesni_gcm_decrypt,.-aesni_gcm_decrypt
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S
new file mode 100644
index 0000000..1db7d69
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/modes/ghash-x86_64.S
@@ -0,0 +1,1329 @@
+#if defined(__x86_64__)
+.text	
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	gcm_gmult_4bit
+.hidden gcm_gmult_4bit
+.type	gcm_gmult_4bit,@function
+.align	16
+gcm_gmult_4bit:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+.Lgmult_prologue:
+
+	movzbq	15(%rdi),%r8
+	leaq	.Lrem_4bit(%rip),%r11
+	xorq	%rax,%rax
+	xorq	%rbx,%rbx
+	movb	%r8b,%al
+	movb	%r8b,%bl
+	shlb	$4,%al
+	movq	$14,%rcx
+	movq	8(%rsi,%rax,1),%r8
+	movq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	movq	%r8,%rdx
+	jmp	.Loop1
+
+.align	16
+.Loop1:
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	movb	(%rdi,%rcx,1),%al
+	shrq	$4,%r9
+	xorq	8(%rsi,%rbx,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rbx,1),%r9
+	movb	%al,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	shlb	$4,%al
+	xorq	%r10,%r8
+	decq	%rcx
+	js	.Lbreak1
+
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rax,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	xorq	%r10,%r8
+	jmp	.Loop1
+
+.align	16
+.Lbreak1:
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rax,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	xorq	%r10,%r8
+
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rbx,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rbx,1),%r9
+	xorq	%r10,%r8
+	xorq	(%r11,%rdx,8),%r9
+
+	bswapq	%r8
+	bswapq	%r9
+	movq	%r8,8(%rdi)
+	movq	%r9,(%rdi)
+
+	movq	16(%rsp),%rbx
+	leaq	24(%rsp),%rsp
+.Lgmult_epilogue:
+	.byte	0xf3,0xc3
+.size	gcm_gmult_4bit,.-gcm_gmult_4bit
+.globl	gcm_ghash_4bit
+.hidden gcm_ghash_4bit
+.type	gcm_ghash_4bit,@function
+.align	16
+gcm_ghash_4bit:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$280,%rsp
+.Lghash_prologue:
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	subq	$-128,%rsi
+	leaq	16+128(%rsp),%rbp
+	xorl	%edx,%edx
+	movq	0+0-128(%rsi),%r8
+	movq	0+8-128(%rsi),%rax
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	16+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	16+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,0(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,0(%rbp)
+	movq	32+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,0-128(%rbp)
+	movq	32+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,1(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,8(%rbp)
+	movq	48+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,8-128(%rbp)
+	movq	48+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,2(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,16(%rbp)
+	movq	64+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,16-128(%rbp)
+	movq	64+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,3(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,24(%rbp)
+	movq	80+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,24-128(%rbp)
+	movq	80+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,4(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,32(%rbp)
+	movq	96+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,32-128(%rbp)
+	movq	96+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,5(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,40(%rbp)
+	movq	112+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,40-128(%rbp)
+	movq	112+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,6(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,48(%rbp)
+	movq	128+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,48-128(%rbp)
+	movq	128+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,7(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,56(%rbp)
+	movq	144+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,56-128(%rbp)
+	movq	144+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,8(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,64(%rbp)
+	movq	160+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,64-128(%rbp)
+	movq	160+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,9(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,72(%rbp)
+	movq	176+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,72-128(%rbp)
+	movq	176+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,10(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,80(%rbp)
+	movq	192+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,80-128(%rbp)
+	movq	192+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,11(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,88(%rbp)
+	movq	208+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,88-128(%rbp)
+	movq	208+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,12(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,96(%rbp)
+	movq	224+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,96-128(%rbp)
+	movq	224+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,13(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,104(%rbp)
+	movq	240+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,104-128(%rbp)
+	movq	240+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,14(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,112(%rbp)
+	shlb	$4,%dl
+	movq	%rax,112-128(%rbp)
+	shlq	$60,%r10
+	movb	%dl,15(%rsp)
+	orq	%r10,%rbx
+	movq	%r9,120(%rbp)
+	movq	%rbx,120-128(%rbp)
+	addq	$-128,%rsi
+	movq	8(%rdi),%r8
+	movq	0(%rdi),%r9
+	addq	%r14,%r15
+	leaq	.Lrem_8bit(%rip),%r11
+	jmp	.Louter_loop
+.align	16
+.Louter_loop:
+	xorq	(%r14),%r9
+	movq	8(%r14),%rdx
+	leaq	16(%r14),%r14
+	xorq	%r8,%rdx
+	movq	%r9,(%rdi)
+	movq	%rdx,8(%rdi)
+	shrq	$32,%rdx
+	xorq	%rax,%rax
+	roll	$8,%edx
+	movb	%dl,%al
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	shrl	$4,%ebx
+	roll	$8,%edx
+	movq	8(%rsi,%rax,1),%r8
+	movq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	8(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	4(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	0(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	andl	$240,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	-4(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	movzwq	(%r11,%r12,2),%r12
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	shlq	$48,%r12
+	xorq	%r10,%r8
+	xorq	%r12,%r9
+	movzbq	%r8b,%r13
+	shrq	$4,%r8
+	movq	%r9,%r10
+	shlb	$4,%r13b
+	shrq	$4,%r9
+	xorq	8(%rsi,%rcx,1),%r8
+	movzwq	(%r11,%r13,2),%r13
+	shlq	$60,%r10
+	xorq	(%rsi,%rcx,1),%r9
+	xorq	%r10,%r8
+	shlq	$48,%r13
+	bswapq	%r8
+	xorq	%r13,%r9
+	bswapq	%r9
+	cmpq	%r15,%r14
+	jb	.Louter_loop
+	movq	%r8,8(%rdi)
+	movq	%r9,(%rdi)
+
+	leaq	280(%rsp),%rsi
+	movq	0(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lghash_epilogue:
+	.byte	0xf3,0xc3
+.size	gcm_ghash_4bit,.-gcm_ghash_4bit
+.globl	gcm_init_clmul
+.hidden gcm_init_clmul
+.type	gcm_init_clmul,@function
+.align	16
+gcm_init_clmul:
+.L_init_clmul:
+	movdqu	(%rsi),%xmm2
+	pshufd	$78,%xmm2,%xmm2
+
+
+	pshufd	$255,%xmm2,%xmm4
+	movdqa	%xmm2,%xmm3
+	psllq	$1,%xmm2
+	pxor	%xmm5,%xmm5
+	psrlq	$63,%xmm3
+	pcmpgtd	%xmm4,%xmm5
+	pslldq	$8,%xmm3
+	por	%xmm3,%xmm2
+
+
+	pand	.L0x1c2_polynomial(%rip),%xmm5
+	pxor	%xmm5,%xmm2
+
+
+	pshufd	$78,%xmm2,%xmm6
+	movdqa	%xmm2,%xmm0
+	pxor	%xmm2,%xmm6
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm2,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm2,%xmm3
+	movdqu	%xmm2,0(%rdi)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,16(%rdi)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,32(%rdi)
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm0,%xmm5
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm5,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm5,%xmm3
+	movdqu	%xmm5,48(%rdi)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,64(%rdi)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,80(%rdi)
+	.byte	0xf3,0xc3
+.size	gcm_init_clmul,.-gcm_init_clmul
+.globl	gcm_gmult_clmul
+.hidden gcm_gmult_clmul
+.type	gcm_gmult_clmul,@function
+.align	16
+gcm_gmult_clmul:
+.L_gmult_clmul:
+	movdqu	(%rdi),%xmm0
+	movdqa	.Lbswap_mask(%rip),%xmm5
+	movdqu	(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm4
+.byte	102,15,56,0,197
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%rdi)
+	.byte	0xf3,0xc3
+.size	gcm_gmult_clmul,.-gcm_gmult_clmul
+.globl	gcm_ghash_clmul
+.hidden gcm_ghash_clmul
+.type	gcm_ghash_clmul,@function
+.align	32
+gcm_ghash_clmul:
+.L_ghash_clmul:
+	movdqa	.Lbswap_mask(%rip),%xmm10
+
+	movdqu	(%rdi),%xmm0
+	movdqu	(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm7
+.byte	102,65,15,56,0,194
+
+	subq	$16,%rcx
+	jz	.Lodd_tail
+
+	movdqu	16(%rsi),%xmm6
+	movl	OPENSSL_ia32cap_P+4(%rip),%eax
+	cmpq	$48,%rcx
+	jb	.Lskip4x
+
+	andl	$71303168,%eax
+	cmpl	$4194304,%eax
+	je	.Lskip4x
+
+	subq	$48,%rcx
+	movq	$11547335547999543296,%rax
+	movdqu	48(%rsi),%xmm14
+	movdqu	64(%rsi),%xmm15
+
+
+
+
+	movdqu	48(%rdx),%xmm3
+	movdqu	32(%rdx),%xmm11
+.byte	102,65,15,56,0,218
+.byte	102,69,15,56,0,218
+	movdqa	%xmm3,%xmm5
+	pshufd	$78,%xmm3,%xmm4
+	pxor	%xmm3,%xmm4
+.byte	102,15,58,68,218,0
+.byte	102,15,58,68,234,17
+.byte	102,15,58,68,231,0
+
+	movdqa	%xmm11,%xmm13
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm11,%xmm12
+.byte	102,68,15,58,68,222,0
+.byte	102,68,15,58,68,238,17
+.byte	102,68,15,58,68,231,16
+	xorps	%xmm11,%xmm3
+	xorps	%xmm13,%xmm5
+	movups	80(%rsi),%xmm7
+	xorps	%xmm12,%xmm4
+
+	movdqu	16(%rdx),%xmm11
+	movdqu	0(%rdx),%xmm8
+.byte	102,69,15,56,0,218
+.byte	102,69,15,56,0,194
+	movdqa	%xmm11,%xmm13
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm8,%xmm0
+	pxor	%xmm11,%xmm12
+.byte	102,69,15,58,68,222,0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm0,%xmm8
+.byte	102,69,15,58,68,238,17
+.byte	102,68,15,58,68,231,0
+	xorps	%xmm11,%xmm3
+	xorps	%xmm13,%xmm5
+
+	leaq	64(%rdx),%rdx
+	subq	$64,%rcx
+	jc	.Ltail4x
+
+	jmp	.Lmod4_loop
+.align	32
+.Lmod4_loop:
+.byte	102,65,15,58,68,199,0
+	xorps	%xmm12,%xmm4
+	movdqu	48(%rdx),%xmm11
+.byte	102,69,15,56,0,218
+.byte	102,65,15,58,68,207,17
+	xorps	%xmm3,%xmm0
+	movdqu	32(%rdx),%xmm3
+	movdqa	%xmm11,%xmm13
+.byte	102,68,15,58,68,199,16
+	pshufd	$78,%xmm11,%xmm12
+	xorps	%xmm5,%xmm1
+	pxor	%xmm11,%xmm12
+.byte	102,65,15,56,0,218
+	movups	32(%rsi),%xmm7
+	xorps	%xmm4,%xmm8
+.byte	102,68,15,58,68,218,0
+	pshufd	$78,%xmm3,%xmm4
+
+	pxor	%xmm0,%xmm8
+	movdqa	%xmm3,%xmm5
+	pxor	%xmm1,%xmm8
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm8,%xmm9
+.byte	102,68,15,58,68,234,17
+	pslldq	$8,%xmm8
+	psrldq	$8,%xmm9
+	pxor	%xmm8,%xmm0
+	movdqa	.L7_mask(%rip),%xmm8
+	pxor	%xmm9,%xmm1
+.byte	102,76,15,110,200
+
+	pand	%xmm0,%xmm8
+.byte	102,69,15,56,0,200
+	pxor	%xmm0,%xmm9
+.byte	102,68,15,58,68,231,0
+	psllq	$57,%xmm9
+	movdqa	%xmm9,%xmm8
+	pslldq	$8,%xmm9
+.byte	102,15,58,68,222,0
+	psrldq	$8,%xmm8
+	pxor	%xmm9,%xmm0
+	pxor	%xmm8,%xmm1
+	movdqu	0(%rdx),%xmm8
+
+	movdqa	%xmm0,%xmm9
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,238,17
+	xorps	%xmm11,%xmm3
+	movdqu	16(%rdx),%xmm11
+.byte	102,69,15,56,0,218
+.byte	102,15,58,68,231,16
+	xorps	%xmm13,%xmm5
+	movups	80(%rsi),%xmm7
+.byte	102,69,15,56,0,194
+	pxor	%xmm9,%xmm1
+	pxor	%xmm0,%xmm9
+	psrlq	$5,%xmm0
+
+	movdqa	%xmm11,%xmm13
+	pxor	%xmm12,%xmm4
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm9,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm11,%xmm12
+.byte	102,69,15,58,68,222,0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm0,%xmm1
+.byte	102,69,15,58,68,238,17
+	xorps	%xmm11,%xmm3
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm0,%xmm8
+
+.byte	102,68,15,58,68,231,0
+	xorps	%xmm13,%xmm5
+
+	leaq	64(%rdx),%rdx
+	subq	$64,%rcx
+	jnc	.Lmod4_loop
+
+.Ltail4x:
+.byte	102,65,15,58,68,199,0
+.byte	102,65,15,58,68,207,17
+.byte	102,68,15,58,68,199,16
+	xorps	%xmm12,%xmm4
+	xorps	%xmm3,%xmm0
+	xorps	%xmm5,%xmm1
+	pxor	%xmm0,%xmm1
+	pxor	%xmm4,%xmm8
+
+	pxor	%xmm1,%xmm8
+	pxor	%xmm0,%xmm1
+
+	movdqa	%xmm8,%xmm9
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm9
+	pxor	%xmm8,%xmm1
+	pxor	%xmm9,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	addq	$64,%rcx
+	jz	.Ldone
+	movdqu	32(%rsi),%xmm7
+	subq	$16,%rcx
+	jz	.Lodd_tail
+.Lskip4x:
+
+
+
+
+
+	movdqu	(%rdx),%xmm8
+	movdqu	16(%rdx),%xmm3
+.byte	102,69,15,56,0,194
+.byte	102,65,15,56,0,218
+	pxor	%xmm8,%xmm0
+
+	movdqa	%xmm3,%xmm5
+	pshufd	$78,%xmm3,%xmm4
+	pxor	%xmm3,%xmm4
+.byte	102,15,58,68,218,0
+.byte	102,15,58,68,234,17
+.byte	102,15,58,68,231,0
+
+	leaq	32(%rdx),%rdx
+	nop
+	subq	$32,%rcx
+	jbe	.Leven_tail
+	nop
+	jmp	.Lmod_loop
+
+.align	32
+.Lmod_loop:
+	movdqa	%xmm0,%xmm1
+	movdqa	%xmm4,%xmm8
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm0,%xmm4
+
+.byte	102,15,58,68,198,0
+.byte	102,15,58,68,206,17
+.byte	102,15,58,68,231,16
+
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm1
+	movdqu	(%rdx),%xmm9
+	pxor	%xmm0,%xmm8
+.byte	102,69,15,56,0,202
+	movdqu	16(%rdx),%xmm3
+
+	pxor	%xmm1,%xmm8
+	pxor	%xmm9,%xmm1
+	pxor	%xmm8,%xmm4
+.byte	102,65,15,56,0,218
+	movdqa	%xmm4,%xmm8
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm3,%xmm5
+
+	movdqa	%xmm0,%xmm9
+	movdqa	%xmm0,%xmm8
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm8
+.byte	102,15,58,68,218,0
+	psllq	$1,%xmm0
+	pxor	%xmm8,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm8
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm8
+	pxor	%xmm9,%xmm0
+	pshufd	$78,%xmm5,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm5,%xmm4
+
+	movdqa	%xmm0,%xmm9
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,234,17
+	pxor	%xmm9,%xmm1
+	pxor	%xmm0,%xmm9
+	psrlq	$5,%xmm0
+	pxor	%xmm9,%xmm0
+	leaq	32(%rdx),%rdx
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,231,0
+	pxor	%xmm1,%xmm0
+
+	subq	$32,%rcx
+	ja	.Lmod_loop
+
+.Leven_tail:
+	movdqa	%xmm0,%xmm1
+	movdqa	%xmm4,%xmm8
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm0,%xmm4
+
+.byte	102,15,58,68,198,0
+.byte	102,15,58,68,206,17
+.byte	102,15,58,68,231,16
+
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm1
+	pxor	%xmm0,%xmm8
+	pxor	%xmm1,%xmm8
+	pxor	%xmm8,%xmm4
+	movdqa	%xmm4,%xmm8
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	testq	%rcx,%rcx
+	jnz	.Ldone
+
+.Lodd_tail:
+	movdqu	(%rdx),%xmm8
+.byte	102,69,15,56,0,194
+	pxor	%xmm8,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,223,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.Ldone:
+.byte	102,65,15,56,0,194
+	movdqu	%xmm0,(%rdi)
+	.byte	0xf3,0xc3
+.size	gcm_ghash_clmul,.-gcm_ghash_clmul
+.globl	gcm_init_avx
+.hidden gcm_init_avx
+.type	gcm_init_avx,@function
+.align	32
+gcm_init_avx:
+	jmp	.L_init_clmul
+.size	gcm_init_avx,.-gcm_init_avx
+.globl	gcm_gmult_avx
+.hidden gcm_gmult_avx
+.type	gcm_gmult_avx,@function
+.align	32
+gcm_gmult_avx:
+	jmp	.L_gmult_clmul
+.size	gcm_gmult_avx,.-gcm_gmult_avx
+.globl	gcm_ghash_avx
+.hidden gcm_ghash_avx
+.type	gcm_ghash_avx,@function
+.align	32
+gcm_ghash_avx:
+	jmp	.L_ghash_clmul
+.size	gcm_ghash_avx,.-gcm_ghash_avx
+.align	64
+.Lbswap_mask:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.L0x1c2_polynomial:
+.byte	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
+.L7_mask:
+.long	7,0,7,0
+.L7_mask_poly:
+.long	7,0,450,0
+.align	64
+.type	.Lrem_4bit,@object
+.Lrem_4bit:
+.long	0,0,0,471859200,0,943718400,0,610271232
+.long	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+.long	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+.long	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+.type	.Lrem_8bit,@object
+.Lrem_8bit:
+.value	0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
+.value	0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
+.value	0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E
+.value	0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E
+.value	0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E
+.value	0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E
+.value	0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E
+.value	0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E
+.value	0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE
+.value	0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE
+.value	0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE
+.value	0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE
+.value	0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E
+.value	0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E
+.value	0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE
+.value	0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE
+.value	0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E
+.value	0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E
+.value	0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E
+.value	0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E
+.value	0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E
+.value	0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E
+.value	0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E
+.value	0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E
+.value	0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE
+.value	0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE
+.value	0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE
+.value	0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE
+.value	0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E
+.value	0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E
+.value	0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE
+.value	0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
+
+.byte	71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	64
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S
new file mode 100644
index 0000000..94aab9c
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/rand/rdrand-x86_64.S
@@ -0,0 +1,48 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+
+.globl	CRYPTO_rdrand
+.hidden CRYPTO_rdrand
+.type	CRYPTO_rdrand,@function
+.align	16
+CRYPTO_rdrand:
+	xorq	%rax,%rax
+
+
+.byte	0x48, 0x0f, 0xc7, 0xf1
+
+	adcq	%rax,%rax
+	movq	%rcx,0(%rdi)
+	.byte	0xf3,0xc3
+
+
+
+
+
+.globl	CRYPTO_rdrand_multiple8_buf
+.hidden CRYPTO_rdrand_multiple8_buf
+.type	CRYPTO_rdrand_multiple8_buf,@function
+.align	16
+CRYPTO_rdrand_multiple8_buf:
+	testq	%rsi,%rsi
+	jz	.Lout
+	movq	$8,%rdx
+.Lloop:
+
+
+.byte	0x48, 0x0f, 0xc7, 0xf1
+	jnc	.Lerr
+	movq	%rcx,0(%rdi)
+	addq	%rdx,%rdi
+	subq	%rdx,%rsi
+	jnz	.Lloop
+.Lout:
+	movq	$1,%rax
+	.byte	0xf3,0xc3
+.Lerr:
+	xorq	%rax,%rax
+	.byte	0xf3,0xc3
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S
new file mode 100644
index 0000000..06c8d67
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-md5-x86_64.S
@@ -0,0 +1,1262 @@
+#if defined(__x86_64__)
+.text	
+.align	16
+
+.globl	rc4_md5_enc
+.hidden rc4_md5_enc
+.type	rc4_md5_enc,@function
+rc4_md5_enc:
+	cmpq	$0,%r9
+	je	.Labort
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$40,%rsp
+.Lbody:
+	movq	%rcx,%r11
+	movq	%r9,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%r8,%r15
+	xorq	%rbp,%rbp
+	xorq	%rcx,%rcx
+
+	leaq	8(%rdi),%rdi
+	movb	-8(%rdi),%bpl
+	movb	-4(%rdi),%cl
+
+	incb	%bpl
+	subq	%r13,%r14
+	movl	(%rdi,%rbp,4),%eax
+	addb	%al,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	shlq	$6,%r12
+	addq	%r15,%r12
+	movq	%r12,16(%rsp)
+
+	movq	%r11,24(%rsp)
+	movl	0(%r11),%r8d
+	movl	4(%r11),%r9d
+	movl	8(%r11),%r10d
+	movl	12(%r11),%r11d
+	jmp	.Loop
+
+.align	16
+.Loop:
+	movl	%r8d,0(%rsp)
+	movl	%r9d,4(%rsp)
+	movl	%r10d,8(%rsp)
+	movl	%r11d,%r12d
+	movl	%r11d,12(%rsp)
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	0(%r15),%r8d
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	addl	$3614090360,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	4(%r15),%r11d
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	addl	$3905402710,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,4(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	8(%r15),%r10d
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	addl	$606105819,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,8(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	12(%r15),%r9d
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	addl	$3250441966,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,12(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	16(%r15),%r8d
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	addl	$4118548399,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,16(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	20(%r15),%r11d
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	addl	$1200080426,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,20(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	24(%r15),%r10d
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	addl	$2821735955,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,24(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	28(%r15),%r9d
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	addl	$4249261313,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,28(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	32(%r15),%r8d
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	addl	$1770035416,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,32(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	36(%r15),%r11d
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	addl	$2336552879,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,36(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	40(%r15),%r10d
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	addl	$4294925233,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,40(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	44(%r15),%r9d
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	addl	$2304563134,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,44(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	48(%r15),%r8d
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	addl	$1804603682,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,48(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	52(%r15),%r11d
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	addl	$4254626195,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,52(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	56(%r15),%r10d
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	addl	$2792965006,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,56(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	(%r13),%xmm2
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	60(%r15),%r9d
+	addb	%dl,%bl
+	movl	64(%rsi),%eax
+	addl	$1236535329,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,60(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm2
+	pxor	%xmm1,%xmm2
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	4(%r15),%r8d
+	addb	%dl,%al
+	movl	68(%rsi),%ebx
+	addl	$4129170786,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,64(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	24(%r15),%r11d
+	addb	%dl,%bl
+	movl	72(%rsi),%eax
+	addl	$3225465664,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,68(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	44(%r15),%r10d
+	addb	%dl,%al
+	movl	76(%rsi),%ebx
+	addl	$643717713,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,72(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	0(%r15),%r9d
+	addb	%dl,%bl
+	movl	80(%rsi),%eax
+	addl	$3921069994,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,76(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	20(%r15),%r8d
+	addb	%dl,%al
+	movl	84(%rsi),%ebx
+	addl	$3593408605,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,80(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	40(%r15),%r11d
+	addb	%dl,%bl
+	movl	88(%rsi),%eax
+	addl	$38016083,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,84(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	60(%r15),%r10d
+	addb	%dl,%al
+	movl	92(%rsi),%ebx
+	addl	$3634488961,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,88(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	16(%r15),%r9d
+	addb	%dl,%bl
+	movl	96(%rsi),%eax
+	addl	$3889429448,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,92(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	36(%r15),%r8d
+	addb	%dl,%al
+	movl	100(%rsi),%ebx
+	addl	$568446438,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,96(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	56(%r15),%r11d
+	addb	%dl,%bl
+	movl	104(%rsi),%eax
+	addl	$3275163606,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,100(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	12(%r15),%r10d
+	addb	%dl,%al
+	movl	108(%rsi),%ebx
+	addl	$4107603335,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,104(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	32(%r15),%r9d
+	addb	%dl,%bl
+	movl	112(%rsi),%eax
+	addl	$1163531501,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,108(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	52(%r15),%r8d
+	addb	%dl,%al
+	movl	116(%rsi),%ebx
+	addl	$2850285829,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,112(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	8(%r15),%r11d
+	addb	%dl,%bl
+	movl	120(%rsi),%eax
+	addl	$4243563512,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,116(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	28(%r15),%r10d
+	addb	%dl,%al
+	movl	124(%rsi),%ebx
+	addl	$1735328473,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,120(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	16(%r13),%xmm3
+	addb	$32,%bpl
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	48(%r15),%r9d
+	addb	%dl,%bl
+	movl	0(%rdi,%rbp,4),%eax
+	addl	$2368359562,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,124(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movq	%rcx,%rsi
+	xorq	%rcx,%rcx
+	movb	%sil,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	20(%r15),%r8d
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	addl	$4294588738,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,0(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	32(%r15),%r11d
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	addl	$2272392833,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,4(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	44(%r15),%r10d
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	addl	$1839030562,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,8(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	56(%r15),%r9d
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	addl	$4259657740,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,12(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	4(%r15),%r8d
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	addl	$2763975236,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,16(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	16(%r15),%r11d
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	addl	$1272893353,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,20(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	28(%r15),%r10d
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	addl	$4139469664,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,24(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	40(%r15),%r9d
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	addl	$3200236656,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,28(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	52(%r15),%r8d
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	addl	$681279174,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,32(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	0(%r15),%r11d
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	addl	$3936430074,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,36(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	12(%r15),%r10d
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	addl	$3572445317,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,40(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	24(%r15),%r9d
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	addl	$76029189,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,44(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	36(%r15),%r8d
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	addl	$3654602809,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,48(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	48(%r15),%r11d
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	addl	$3873151461,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,52(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	60(%r15),%r10d
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	addl	$530742520,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,56(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	32(%r13),%xmm4
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	8(%r15),%r9d
+	addb	%dl,%bl
+	movl	64(%rsi),%eax
+	addl	$3299628645,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,60(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm4
+	pxor	%xmm1,%xmm4
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	0(%r15),%r8d
+	addb	%dl,%al
+	movl	68(%rsi),%ebx
+	addl	$4096336452,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,64(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	28(%r15),%r11d
+	addb	%dl,%bl
+	movl	72(%rsi),%eax
+	addl	$1126891415,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,68(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	56(%r15),%r10d
+	addb	%dl,%al
+	movl	76(%rsi),%ebx
+	addl	$2878612391,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,72(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	20(%r15),%r9d
+	addb	%dl,%bl
+	movl	80(%rsi),%eax
+	addl	$4237533241,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,76(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	48(%r15),%r8d
+	addb	%dl,%al
+	movl	84(%rsi),%ebx
+	addl	$1700485571,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,80(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	12(%r15),%r11d
+	addb	%dl,%bl
+	movl	88(%rsi),%eax
+	addl	$2399980690,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,84(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	40(%r15),%r10d
+	addb	%dl,%al
+	movl	92(%rsi),%ebx
+	addl	$4293915773,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,88(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	4(%r15),%r9d
+	addb	%dl,%bl
+	movl	96(%rsi),%eax
+	addl	$2240044497,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,92(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	32(%r15),%r8d
+	addb	%dl,%al
+	movl	100(%rsi),%ebx
+	addl	$1873313359,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,96(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	60(%r15),%r11d
+	addb	%dl,%bl
+	movl	104(%rsi),%eax
+	addl	$4264355552,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,100(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	24(%r15),%r10d
+	addb	%dl,%al
+	movl	108(%rsi),%ebx
+	addl	$2734768916,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,104(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	52(%r15),%r9d
+	addb	%dl,%bl
+	movl	112(%rsi),%eax
+	addl	$1309151649,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,108(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	16(%r15),%r8d
+	addb	%dl,%al
+	movl	116(%rsi),%ebx
+	addl	$4149444226,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,112(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	44(%r15),%r11d
+	addb	%dl,%bl
+	movl	120(%rsi),%eax
+	addl	$3174756917,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,116(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	8(%r15),%r10d
+	addb	%dl,%al
+	movl	124(%rsi),%ebx
+	addl	$718787259,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,120(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	48(%r13),%xmm5
+	addb	$32,%bpl
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	36(%r15),%r9d
+	addb	%dl,%bl
+	movl	0(%rdi,%rbp,4),%eax
+	addl	$3951481745,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,124(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movq	%rbp,%rsi
+	xorq	%rbp,%rbp
+	movb	%sil,%bpl
+	movq	%rcx,%rsi
+	xorq	%rcx,%rcx
+	movb	%sil,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm5
+	pxor	%xmm1,%xmm5
+	addl	0(%rsp),%r8d
+	addl	4(%rsp),%r9d
+	addl	8(%rsp),%r10d
+	addl	12(%rsp),%r11d
+
+	movdqu	%xmm2,(%r14,%r13,1)
+	movdqu	%xmm3,16(%r14,%r13,1)
+	movdqu	%xmm4,32(%r14,%r13,1)
+	movdqu	%xmm5,48(%r14,%r13,1)
+	leaq	64(%r15),%r15
+	leaq	64(%r13),%r13
+	cmpq	16(%rsp),%r15
+	jb	.Loop
+
+	movq	24(%rsp),%r12
+	subb	%al,%cl
+	movl	%r8d,0(%r12)
+	movl	%r9d,4(%r12)
+	movl	%r10d,8(%r12)
+	movl	%r11d,12(%r12)
+	subb	$1,%bpl
+	movl	%ebp,-8(%rdi)
+	movl	%ecx,-4(%rdi)
+
+	movq	40(%rsp),%r15
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r13
+	movq	64(%rsp),%r12
+	movq	72(%rsp),%rbp
+	movq	80(%rsp),%rbx
+	leaq	88(%rsp),%rsp
+.Lepilogue:
+.Labort:
+	.byte	0xf3,0xc3
+.size	rc4_md5_enc,.-rc4_md5_enc
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S
new file mode 100644
index 0000000..c4d1002
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/rc4/rc4-x86_64.S
@@ -0,0 +1,596 @@
+#if defined(__x86_64__)
+.text	
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	asm_RC4
+.hidden asm_RC4
+.type	asm_RC4,@function
+.align	16
+asm_RC4:
+	orq	%rsi,%rsi
+	jne	.Lentry
+	.byte	0xf3,0xc3
+.Lentry:
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+.Lprologue:
+	movq	%rsi,%r11
+	movq	%rdx,%r12
+	movq	%rcx,%r13
+	xorq	%r10,%r10
+	xorq	%rcx,%rcx
+
+	leaq	8(%rdi),%rdi
+	movb	-8(%rdi),%r10b
+	movb	-4(%rdi),%cl
+	cmpl	$-1,256(%rdi)
+	je	.LRC4_CHAR
+	movl	OPENSSL_ia32cap_P(%rip),%r8d
+	xorq	%rbx,%rbx
+	incb	%r10b
+	subq	%r10,%rbx
+	subq	%r12,%r13
+	movl	(%rdi,%r10,4),%eax
+	testq	$-16,%r11
+	jz	.Lloop1
+	btl	$30,%r8d
+	jc	.Lintel
+	andq	$7,%rbx
+	leaq	1(%r10),%rsi
+	jz	.Loop8
+	subq	%rbx,%r11
+.Loop8_warmup:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%rbx
+	jnz	.Loop8_warmup
+
+	leaq	1(%r10),%rsi
+	jmp	.Loop8
+.align	16
+.Loop8:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	0(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,0(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	4(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,4(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	8(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,8(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	12(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,12(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	16(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,16(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	20(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,20(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	24(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,24(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	$8,%sil
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	-4(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,28(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	$8,%r10b
+	rorq	$8,%r8
+	subq	$8,%r11
+
+	xorq	(%r12),%r8
+	movq	%r8,(%r12,%r13,1)
+	leaq	8(%r12),%r12
+
+	testq	$-8,%r11
+	jnz	.Loop8
+	cmpq	$0,%r11
+	jne	.Lloop1
+	jmp	.Lexit
+
+.align	16
+.Lintel:
+	testq	$-32,%r11
+	jz	.Lloop1
+	andq	$15,%rbx
+	jz	.Loop16_is_hot
+	subq	%rbx,%r11
+.Loop16_warmup:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%rbx
+	jnz	.Loop16_warmup
+
+	movq	%rcx,%rbx
+	xorq	%rcx,%rcx
+	movb	%bl,%cl
+
+.Loop16_is_hot:
+	leaq	(%rdi,%r10,4),%rsi
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm0,%xmm0
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	addb	%bl,%cl
+	pinsrw	$0,(%rdi,%rax,4),%xmm0
+	jmp	.Loop16_enter
+.align	16
+.Loop16:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm0,%xmm2
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm0
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	pxor	%xmm1,%xmm2
+	addb	%bl,%cl
+	pinsrw	$0,(%rdi,%rax,4),%xmm0
+	movdqu	%xmm2,(%r12,%r13,1)
+	leaq	16(%r12),%r12
+.Loop16_enter:
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm1,%xmm1
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,4(%rsi)
+	addb	%al,%cl
+	pinsrw	$0,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,8(%rsi)
+	addb	%bl,%cl
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,12(%rsi)
+	addb	%al,%cl
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,16(%rsi)
+	addb	%bl,%cl
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,20(%rsi)
+	addb	%al,%cl
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,24(%rsi)
+	addb	%bl,%cl
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,28(%rsi)
+	addb	%al,%cl
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,32(%rsi)
+	addb	%bl,%cl
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,36(%rsi)
+	addb	%al,%cl
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,40(%rsi)
+	addb	%bl,%cl
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,44(%rsi)
+	addb	%al,%cl
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,48(%rsi)
+	addb	%bl,%cl
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,52(%rsi)
+	addb	%al,%cl
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,56(%rsi)
+	addb	%bl,%cl
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+	addb	$16,%r10b
+	movdqu	(%r12),%xmm2
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movzbl	%bl,%ebx
+	movl	%edx,60(%rsi)
+	leaq	(%rdi,%r10,4),%rsi
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+	movl	(%rsi),%eax
+	movq	%rcx,%rbx
+	xorq	%rcx,%rcx
+	subq	$16,%r11
+	movb	%bl,%cl
+	testq	$-16,%r11
+	jnz	.Loop16
+
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm2
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,(%r12,%r13,1)
+	leaq	16(%r12),%r12
+
+	cmpq	$0,%r11
+	jne	.Lloop1
+	jmp	.Lexit
+
+.align	16
+.Lloop1:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%r11
+	jnz	.Lloop1
+	jmp	.Lexit
+
+.align	16
+.LRC4_CHAR:
+	addb	$1,%r10b
+	movzbl	(%rdi,%r10,1),%eax
+	testq	$-8,%r11
+	jz	.Lcloop1
+	jmp	.Lcloop8
+.align	16
+.Lcloop8:
+	movl	(%r12),%r8d
+	movl	4(%r12),%r9d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	.Lcmov0
+	movq	%rax,%rbx
+.Lcmov0:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	.Lcmov1
+	movq	%rbx,%rax
+.Lcmov1:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	.Lcmov2
+	movq	%rax,%rbx
+.Lcmov2:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	.Lcmov3
+	movq	%rbx,%rax
+.Lcmov3:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	.Lcmov4
+	movq	%rax,%rbx
+.Lcmov4:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	.Lcmov5
+	movq	%rbx,%rax
+.Lcmov5:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	.Lcmov6
+	movq	%rax,%rbx
+.Lcmov6:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	.Lcmov7
+	movq	%rbx,%rax
+.Lcmov7:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	leaq	-8(%r11),%r11
+	movl	%r8d,(%r13)
+	leaq	8(%r12),%r12
+	movl	%r9d,4(%r13)
+	leaq	8(%r13),%r13
+
+	testq	$-8,%r11
+	jnz	.Lcloop8
+	cmpq	$0,%r11
+	jne	.Lcloop1
+	jmp	.Lexit
+.align	16
+.Lcloop1:
+	addb	%al,%cl
+	movzbl	%cl,%ecx
+	movzbl	(%rdi,%rcx,1),%edx
+	movb	%al,(%rdi,%rcx,1)
+	movb	%dl,(%rdi,%r10,1)
+	addb	%al,%dl
+	addb	$1,%r10b
+	movzbl	%dl,%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%rdx,1),%edx
+	movzbl	(%rdi,%r10,1),%eax
+	xorb	(%r12),%dl
+	leaq	1(%r12),%r12
+	movb	%dl,(%r13)
+	leaq	1(%r13),%r13
+	subq	$1,%r11
+	jnz	.Lcloop1
+	jmp	.Lexit
+
+.align	16
+.Lexit:
+	subb	$1,%r10b
+	movl	%r10d,-8(%rdi)
+	movl	%ecx,-4(%rdi)
+
+	movq	(%rsp),%r13
+	movq	8(%rsp),%r12
+	movq	16(%rsp),%rbx
+	addq	$24,%rsp
+.Lepilogue:
+	.byte	0xf3,0xc3
+.size	asm_RC4,.-asm_RC4
+.globl	asm_RC4_set_key
+.hidden asm_RC4_set_key
+.type	asm_RC4_set_key,@function
+.align	16
+asm_RC4_set_key:
+	leaq	8(%rdi),%rdi
+	leaq	(%rdx,%rsi,1),%rdx
+	negq	%rsi
+	movq	%rsi,%rcx
+	xorl	%eax,%eax
+	xorq	%r9,%r9
+	xorq	%r10,%r10
+	xorq	%r11,%r11
+
+	movl	OPENSSL_ia32cap_P(%rip),%r8d
+	btl	$20,%r8d
+	jc	.Lc1stloop
+	jmp	.Lw1stloop
+
+.align	16
+.Lw1stloop:
+	movl	%eax,(%rdi,%rax,4)
+	addb	$1,%al
+	jnc	.Lw1stloop
+
+	xorq	%r9,%r9
+	xorq	%r8,%r8
+.align	16
+.Lw2ndloop:
+	movl	(%rdi,%r9,4),%r10d
+	addb	(%rdx,%rsi,1),%r8b
+	addb	%r10b,%r8b
+	addq	$1,%rsi
+	movl	(%rdi,%r8,4),%r11d
+	cmovzq	%rcx,%rsi
+	movl	%r10d,(%rdi,%r8,4)
+	movl	%r11d,(%rdi,%r9,4)
+	addb	$1,%r9b
+	jnc	.Lw2ndloop
+	jmp	.Lexit_key
+
+.align	16
+.Lc1stloop:
+	movb	%al,(%rdi,%rax,1)
+	addb	$1,%al
+	jnc	.Lc1stloop
+
+	xorq	%r9,%r9
+	xorq	%r8,%r8
+.align	16
+.Lc2ndloop:
+	movb	(%rdi,%r9,1),%r10b
+	addb	(%rdx,%rsi,1),%r8b
+	addb	%r10b,%r8b
+	addq	$1,%rsi
+	movb	(%rdi,%r8,1),%r11b
+	jnz	.Lcnowrap
+	movq	%rcx,%rsi
+.Lcnowrap:
+	movb	%r10b,(%rdi,%r8,1)
+	movb	%r11b,(%rdi,%r9,1)
+	addb	$1,%r9b
+	jnc	.Lc2ndloop
+	movl	$-1,256(%rdi)
+
+.align	16
+.Lexit_key:
+	xorl	%eax,%eax
+	movl	%eax,-8(%rdi)
+	movl	%eax,-4(%rdi)
+	.byte	0xf3,0xc3
+.size	asm_RC4_set_key,.-asm_RC4_set_key
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S
new file mode 100644
index 0000000..7668c2b
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/sha/sha1-x86_64.S
@@ -0,0 +1,2426 @@
+#if defined(__x86_64__)
+.text	
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+
+.globl	sha1_block_data_order
+.hidden sha1_block_data_order
+.type	sha1_block_data_order,@function
+.align	16
+sha1_block_data_order:
+	movl	OPENSSL_ia32cap_P+0(%rip),%r9d
+	movl	OPENSSL_ia32cap_P+4(%rip),%r8d
+	movl	OPENSSL_ia32cap_P+8(%rip),%r10d
+	testl	$512,%r8d
+	jz	.Lialu
+	jmp	_ssse3_shortcut
+
+.align	16
+.Lialu:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	movq	%rdi,%r8
+	subq	$72,%rsp
+	movq	%rsi,%r9
+	andq	$-64,%rsp
+	movq	%rdx,%r10
+	movq	%rax,64(%rsp)
+.Lprologue:
+
+	movl	0(%r8),%esi
+	movl	4(%r8),%edi
+	movl	8(%r8),%r11d
+	movl	12(%r8),%r12d
+	movl	16(%r8),%r13d
+	jmp	.Lloop
+
+.align	16
+.Lloop:
+	movl	0(%r9),%edx
+	bswapl	%edx
+	movl	4(%r9),%ebp
+	movl	%r12d,%eax
+	movl	%edx,0(%rsp)
+	movl	%esi,%ecx
+	bswapl	%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%rdx,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	8(%r9),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,4(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%rbp,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	12(%r9),%edx
+	movl	%edi,%eax
+	movl	%r14d,8(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%r14,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	16(%r9),%ebp
+	movl	%esi,%eax
+	movl	%edx,12(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%rdx,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	20(%r9),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,16(%rsp)
+	movl	%edi,%ecx
+	bswapl	%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%rbp,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	movl	24(%r9),%edx
+	movl	%r12d,%eax
+	movl	%r14d,20(%rsp)
+	movl	%esi,%ecx
+	bswapl	%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%r14,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	28(%r9),%ebp
+	movl	%r11d,%eax
+	movl	%edx,24(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%rdx,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	32(%r9),%r14d
+	movl	%edi,%eax
+	movl	%ebp,28(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%rbp,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	36(%r9),%edx
+	movl	%esi,%eax
+	movl	%r14d,32(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%r14,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	40(%r9),%ebp
+	movl	%r13d,%eax
+	movl	%edx,36(%rsp)
+	movl	%edi,%ecx
+	bswapl	%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%rdx,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	movl	44(%r9),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,40(%rsp)
+	movl	%esi,%ecx
+	bswapl	%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%rbp,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	48(%r9),%edx
+	movl	%r11d,%eax
+	movl	%r14d,44(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%r14,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	52(%r9),%ebp
+	movl	%edi,%eax
+	movl	%edx,48(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%rdx,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	56(%r9),%r14d
+	movl	%esi,%eax
+	movl	%ebp,52(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%rbp,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	60(%r9),%edx
+	movl	%r13d,%eax
+	movl	%r14d,56(%rsp)
+	movl	%edi,%ecx
+	bswapl	%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%r14,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	xorl	0(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,60(%rsp)
+	movl	%esi,%ecx
+	xorl	8(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%ebp
+	andl	%edi,%eax
+	leal	1518500249(%rdx,%r13,1),%r13d
+	roll	$30,%edi
+	xorl	%r12d,%eax
+	addl	%ecx,%r13d
+	roll	$1,%ebp
+	addl	%eax,%r13d
+	xorl	4(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,0(%rsp)
+	movl	%r13d,%ecx
+	xorl	12(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%r14d
+	andl	%esi,%eax
+	leal	1518500249(%rbp,%r12,1),%r12d
+	roll	$30,%esi
+	xorl	%r11d,%eax
+	addl	%ecx,%r12d
+	roll	$1,%r14d
+	addl	%eax,%r12d
+	xorl	8(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,4(%rsp)
+	movl	%r12d,%ecx
+	xorl	16(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%edx
+	andl	%r13d,%eax
+	leal	1518500249(%r14,%r11,1),%r11d
+	roll	$30,%r13d
+	xorl	%edi,%eax
+	addl	%ecx,%r11d
+	roll	$1,%edx
+	addl	%eax,%r11d
+	xorl	12(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,8(%rsp)
+	movl	%r11d,%ecx
+	xorl	20(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%ebp
+	andl	%r12d,%eax
+	leal	1518500249(%rdx,%rdi,1),%edi
+	roll	$30,%r12d
+	xorl	%esi,%eax
+	addl	%ecx,%edi
+	roll	$1,%ebp
+	addl	%eax,%edi
+	xorl	16(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,12(%rsp)
+	movl	%edi,%ecx
+	xorl	24(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%r14d
+	andl	%r11d,%eax
+	leal	1518500249(%rbp,%rsi,1),%esi
+	roll	$30,%r11d
+	xorl	%r13d,%eax
+	addl	%ecx,%esi
+	roll	$1,%r14d
+	addl	%eax,%esi
+	xorl	20(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,16(%rsp)
+	movl	%esi,%ecx
+	xorl	28(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%edx
+	leal	1859775393(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	24(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,20(%rsp)
+	movl	%r13d,%ecx
+	xorl	32(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%ebp
+	leal	1859775393(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	28(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,24(%rsp)
+	movl	%r12d,%ecx
+	xorl	36(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%r14d
+	leal	1859775393(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	32(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,28(%rsp)
+	movl	%r11d,%ecx
+	xorl	40(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%edx
+	leal	1859775393(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	36(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,32(%rsp)
+	movl	%edi,%ecx
+	xorl	44(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	4(%rsp),%ebp
+	leal	1859775393(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	40(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,36(%rsp)
+	movl	%esi,%ecx
+	xorl	48(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	8(%rsp),%r14d
+	leal	1859775393(%rbp,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	xorl	44(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,40(%rsp)
+	movl	%r13d,%ecx
+	xorl	52(%rsp),%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	12(%rsp),%edx
+	leal	1859775393(%r14,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%edx
+	xorl	48(%rsp),%ebp
+	movl	%r13d,%eax
+	movl	%edx,44(%rsp)
+	movl	%r12d,%ecx
+	xorl	56(%rsp),%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	16(%rsp),%ebp
+	leal	1859775393(%rdx,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	xorl	52(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,48(%rsp)
+	movl	%r11d,%ecx
+	xorl	60(%rsp),%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%r14d
+	leal	1859775393(%rbp,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%r14d
+	xorl	56(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,52(%rsp)
+	movl	%edi,%ecx
+	xorl	0(%rsp),%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%edx
+	leal	1859775393(%r14,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%edx
+	xorl	60(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,56(%rsp)
+	movl	%esi,%ecx
+	xorl	4(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%ebp
+	leal	1859775393(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	0(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,60(%rsp)
+	movl	%r13d,%ecx
+	xorl	8(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%r14d
+	leal	1859775393(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	4(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,0(%rsp)
+	movl	%r12d,%ecx
+	xorl	12(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%edx
+	leal	1859775393(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	8(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,4(%rsp)
+	movl	%r11d,%ecx
+	xorl	16(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%ebp
+	leal	1859775393(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	xorl	12(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,8(%rsp)
+	movl	%edi,%ecx
+	xorl	20(%rsp),%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%r14d
+	leal	1859775393(%rbp,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%r14d
+	xorl	16(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,12(%rsp)
+	movl	%esi,%ecx
+	xorl	24(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%edx
+	leal	1859775393(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	20(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,16(%rsp)
+	movl	%r13d,%ecx
+	xorl	28(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%ebp
+	leal	1859775393(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	24(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,20(%rsp)
+	movl	%r12d,%ecx
+	xorl	32(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%r14d
+	leal	1859775393(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	28(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,24(%rsp)
+	movl	%r11d,%ecx
+	xorl	36(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%edx
+	leal	1859775393(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	32(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,28(%rsp)
+	movl	%edi,%ecx
+	xorl	40(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%ebp
+	leal	1859775393(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	36(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,32(%rsp)
+	movl	%r12d,%ebx
+	xorl	44(%rsp),%r14d
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	4(%rsp),%r14d
+	leal	-1894007588(%rbp,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	40(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,36(%rsp)
+	movl	%r11d,%ebx
+	xorl	48(%rsp),%edx
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	8(%rsp),%edx
+	leal	-1894007588(%r14,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%edx
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	44(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,40(%rsp)
+	movl	%edi,%ebx
+	xorl	52(%rsp),%ebp
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	12(%rsp),%ebp
+	leal	-1894007588(%rdx,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	48(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,44(%rsp)
+	movl	%esi,%ebx
+	xorl	56(%rsp),%r14d
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	16(%rsp),%r14d
+	leal	-1894007588(%rbp,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%r14d
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	52(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,48(%rsp)
+	movl	%r13d,%ebx
+	xorl	60(%rsp),%edx
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	20(%rsp),%edx
+	leal	-1894007588(%r14,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%edx
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	56(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,52(%rsp)
+	movl	%r12d,%ebx
+	xorl	0(%rsp),%ebp
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	24(%rsp),%ebp
+	leal	-1894007588(%rdx,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	60(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,56(%rsp)
+	movl	%r11d,%ebx
+	xorl	4(%rsp),%r14d
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	28(%rsp),%r14d
+	leal	-1894007588(%rbp,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	0(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,60(%rsp)
+	movl	%edi,%ebx
+	xorl	8(%rsp),%edx
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	32(%rsp),%edx
+	leal	-1894007588(%r14,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%edx
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	4(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,0(%rsp)
+	movl	%esi,%ebx
+	xorl	12(%rsp),%ebp
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	36(%rsp),%ebp
+	leal	-1894007588(%rdx,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%ebp
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	8(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,4(%rsp)
+	movl	%r13d,%ebx
+	xorl	16(%rsp),%r14d
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	40(%rsp),%r14d
+	leal	-1894007588(%rbp,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%r14d
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	12(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,8(%rsp)
+	movl	%r12d,%ebx
+	xorl	20(%rsp),%edx
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	44(%rsp),%edx
+	leal	-1894007588(%r14,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%edx
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	16(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,12(%rsp)
+	movl	%r11d,%ebx
+	xorl	24(%rsp),%ebp
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	48(%rsp),%ebp
+	leal	-1894007588(%rdx,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	20(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,16(%rsp)
+	movl	%edi,%ebx
+	xorl	28(%rsp),%r14d
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	52(%rsp),%r14d
+	leal	-1894007588(%rbp,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	24(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,20(%rsp)
+	movl	%esi,%ebx
+	xorl	32(%rsp),%edx
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	56(%rsp),%edx
+	leal	-1894007588(%r14,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%edx
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	28(%rsp),%ebp
+	movl	%r13d,%eax
+	movl	%edx,24(%rsp)
+	movl	%r13d,%ebx
+	xorl	36(%rsp),%ebp
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	60(%rsp),%ebp
+	leal	-1894007588(%rdx,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%ebp
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	32(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,28(%rsp)
+	movl	%r12d,%ebx
+	xorl	40(%rsp),%r14d
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	0(%rsp),%r14d
+	leal	-1894007588(%rbp,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	36(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,32(%rsp)
+	movl	%r11d,%ebx
+	xorl	44(%rsp),%edx
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	4(%rsp),%edx
+	leal	-1894007588(%r14,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%edx
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	40(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,36(%rsp)
+	movl	%edi,%ebx
+	xorl	48(%rsp),%ebp
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	8(%rsp),%ebp
+	leal	-1894007588(%rdx,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	44(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,40(%rsp)
+	movl	%esi,%ebx
+	xorl	52(%rsp),%r14d
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	12(%rsp),%r14d
+	leal	-1894007588(%rbp,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%r14d
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	48(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,44(%rsp)
+	movl	%r13d,%ebx
+	xorl	56(%rsp),%edx
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	16(%rsp),%edx
+	leal	-1894007588(%r14,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%edx
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	52(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,48(%rsp)
+	movl	%esi,%ecx
+	xorl	60(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%ebp
+	leal	-899497514(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	56(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,52(%rsp)
+	movl	%r13d,%ecx
+	xorl	0(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%r14d
+	leal	-899497514(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	60(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,56(%rsp)
+	movl	%r12d,%ecx
+	xorl	4(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%edx
+	leal	-899497514(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	0(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,60(%rsp)
+	movl	%r11d,%ecx
+	xorl	8(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%ebp
+	leal	-899497514(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	xorl	4(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,0(%rsp)
+	movl	%edi,%ecx
+	xorl	12(%rsp),%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%r14d
+	leal	-899497514(%rbp,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%r14d
+	xorl	8(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,4(%rsp)
+	movl	%esi,%ecx
+	xorl	16(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%edx
+	leal	-899497514(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	12(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,8(%rsp)
+	movl	%r13d,%ecx
+	xorl	20(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%ebp
+	leal	-899497514(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	16(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,12(%rsp)
+	movl	%r12d,%ecx
+	xorl	24(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%r14d
+	leal	-899497514(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	20(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,16(%rsp)
+	movl	%r11d,%ecx
+	xorl	28(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%edx
+	leal	-899497514(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	24(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,20(%rsp)
+	movl	%edi,%ecx
+	xorl	32(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%ebp
+	leal	-899497514(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	28(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,24(%rsp)
+	movl	%esi,%ecx
+	xorl	36(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%r14d
+	leal	-899497514(%rbp,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	xorl	32(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,28(%rsp)
+	movl	%r13d,%ecx
+	xorl	40(%rsp),%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%edx
+	leal	-899497514(%r14,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%edx
+	xorl	36(%rsp),%ebp
+	movl	%r13d,%eax
+
+	movl	%r12d,%ecx
+	xorl	44(%rsp),%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	4(%rsp),%ebp
+	leal	-899497514(%rdx,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	xorl	40(%rsp),%r14d
+	movl	%r12d,%eax
+
+	movl	%r11d,%ecx
+	xorl	48(%rsp),%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	8(%rsp),%r14d
+	leal	-899497514(%rbp,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%r14d
+	xorl	44(%rsp),%edx
+	movl	%r11d,%eax
+
+	movl	%edi,%ecx
+	xorl	52(%rsp),%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	12(%rsp),%edx
+	leal	-899497514(%r14,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%edx
+	xorl	48(%rsp),%ebp
+	movl	%edi,%eax
+
+	movl	%esi,%ecx
+	xorl	56(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	16(%rsp),%ebp
+	leal	-899497514(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	52(%rsp),%r14d
+	movl	%esi,%eax
+
+	movl	%r13d,%ecx
+	xorl	60(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%r14d
+	leal	-899497514(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	56(%rsp),%edx
+	movl	%r13d,%eax
+
+	movl	%r12d,%ecx
+	xorl	0(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%edx
+	leal	-899497514(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	60(%rsp),%ebp
+	movl	%r12d,%eax
+
+	movl	%r11d,%ecx
+	xorl	4(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%ebp
+	leal	-899497514(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	movl	%r11d,%eax
+	movl	%edi,%ecx
+	xorl	%r13d,%eax
+	leal	-899497514(%rbp,%rsi,1),%esi
+	roll	$5,%ecx
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	addl	0(%r8),%esi
+	addl	4(%r8),%edi
+	addl	8(%r8),%r11d
+	addl	12(%r8),%r12d
+	addl	16(%r8),%r13d
+	movl	%esi,0(%r8)
+	movl	%edi,4(%r8)
+	movl	%r11d,8(%r8)
+	movl	%r12d,12(%r8)
+	movl	%r13d,16(%r8)
+
+	subq	$1,%r10
+	leaq	64(%r9),%r9
+	jnz	.Lloop
+
+	movq	64(%rsp),%rsi
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lepilogue:
+	.byte	0xf3,0xc3
+.size	sha1_block_data_order,.-sha1_block_data_order
+.type	sha1_block_data_order_ssse3,@function
+.align	16
+sha1_block_data_order_ssse3:
+_ssse3_shortcut:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	leaq	-64(%rsp),%rsp
+	movq	%rax,%r14
+	andq	$-64,%rsp
+	movq	%rdi,%r8
+	movq	%rsi,%r9
+	movq	%rdx,%r10
+
+	shlq	$6,%r10
+	addq	%r9,%r10
+	leaq	K_XX_XX+64(%rip),%r11
+
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movl	%ebx,%esi
+	movl	16(%r8),%ebp
+	movl	%ecx,%edi
+	xorl	%edx,%edi
+	andl	%edi,%esi
+
+	movdqa	64(%r11),%xmm6
+	movdqa	-64(%r11),%xmm9
+	movdqu	0(%r9),%xmm0
+	movdqu	16(%r9),%xmm1
+	movdqu	32(%r9),%xmm2
+	movdqu	48(%r9),%xmm3
+.byte	102,15,56,0,198
+.byte	102,15,56,0,206
+.byte	102,15,56,0,214
+	addq	$64,%r9
+	paddd	%xmm9,%xmm0
+.byte	102,15,56,0,222
+	paddd	%xmm9,%xmm1
+	paddd	%xmm9,%xmm2
+	movdqa	%xmm0,0(%rsp)
+	psubd	%xmm9,%xmm0
+	movdqa	%xmm1,16(%rsp)
+	psubd	%xmm9,%xmm1
+	movdqa	%xmm2,32(%rsp)
+	psubd	%xmm9,%xmm2
+	jmp	.Loop_ssse3
+.align	16
+.Loop_ssse3:
+	rorl	$2,%ebx
+	pshufd	$238,%xmm0,%xmm4
+	xorl	%edx,%esi
+	movdqa	%xmm3,%xmm8
+	paddd	%xmm3,%xmm9
+	movl	%eax,%edi
+	addl	0(%rsp),%ebp
+	punpcklqdq	%xmm1,%xmm4
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	addl	%esi,%ebp
+	psrldq	$4,%xmm8
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	pxor	%xmm0,%xmm4
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	pxor	%xmm2,%xmm8
+	xorl	%ecx,%edi
+	movl	%ebp,%esi
+	addl	4(%rsp),%edx
+	pxor	%xmm8,%xmm4
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	movdqa	%xmm9,48(%rsp)
+	addl	%edi,%edx
+	andl	%eax,%esi
+	movdqa	%xmm4,%xmm10
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	movdqa	%xmm4,%xmm8
+	xorl	%ebx,%esi
+	pslldq	$12,%xmm10
+	paddd	%xmm4,%xmm4
+	movl	%edx,%edi
+	addl	8(%rsp),%ecx
+	psrld	$31,%xmm8
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	movdqa	%xmm10,%xmm9
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	psrld	$30,%xmm10
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	por	%xmm8,%xmm4
+	xorl	%eax,%edi
+	movl	%ecx,%esi
+	addl	12(%rsp),%ebx
+	pslld	$2,%xmm9
+	pxor	%xmm10,%xmm4
+	xorl	%ebp,%edx
+	movdqa	-64(%r11),%xmm10
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	andl	%edx,%esi
+	pxor	%xmm9,%xmm4
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pshufd	$238,%xmm1,%xmm5
+	xorl	%ebp,%esi
+	movdqa	%xmm4,%xmm9
+	paddd	%xmm4,%xmm10
+	movl	%ebx,%edi
+	addl	16(%rsp),%eax
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	addl	%esi,%eax
+	psrldq	$4,%xmm9
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	pxor	%xmm1,%xmm5
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	pxor	%xmm3,%xmm9
+	xorl	%edx,%edi
+	movl	%eax,%esi
+	addl	20(%rsp),%ebp
+	pxor	%xmm9,%xmm5
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm10,0(%rsp)
+	addl	%edi,%ebp
+	andl	%ebx,%esi
+	movdqa	%xmm5,%xmm8
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	movdqa	%xmm5,%xmm9
+	xorl	%ecx,%esi
+	pslldq	$12,%xmm8
+	paddd	%xmm5,%xmm5
+	movl	%ebp,%edi
+	addl	24(%rsp),%edx
+	psrld	$31,%xmm9
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	addl	%esi,%edx
+	movdqa	%xmm8,%xmm10
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	psrld	$30,%xmm8
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	por	%xmm9,%xmm5
+	xorl	%ebx,%edi
+	movl	%edx,%esi
+	addl	28(%rsp),%ecx
+	pslld	$2,%xmm10
+	pxor	%xmm8,%xmm5
+	xorl	%eax,%ebp
+	movdqa	-32(%r11),%xmm8
+	roll	$5,%edx
+	addl	%edi,%ecx
+	andl	%ebp,%esi
+	pxor	%xmm10,%xmm5
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pshufd	$238,%xmm2,%xmm6
+	xorl	%eax,%esi
+	movdqa	%xmm5,%xmm10
+	paddd	%xmm5,%xmm8
+	movl	%ecx,%edi
+	addl	32(%rsp),%ebx
+	punpcklqdq	%xmm3,%xmm6
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	psrldq	$4,%xmm10
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	pxor	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pxor	%xmm4,%xmm10
+	xorl	%ebp,%edi
+	movl	%ebx,%esi
+	addl	36(%rsp),%eax
+	pxor	%xmm10,%xmm6
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm8,16(%rsp)
+	addl	%edi,%eax
+	andl	%ecx,%esi
+	movdqa	%xmm6,%xmm9
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	movdqa	%xmm6,%xmm10
+	xorl	%edx,%esi
+	pslldq	$12,%xmm9
+	paddd	%xmm6,%xmm6
+	movl	%eax,%edi
+	addl	40(%rsp),%ebp
+	psrld	$31,%xmm10
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	addl	%esi,%ebp
+	movdqa	%xmm9,%xmm8
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	psrld	$30,%xmm9
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	por	%xmm10,%xmm6
+	xorl	%ecx,%edi
+	movl	%ebp,%esi
+	addl	44(%rsp),%edx
+	pslld	$2,%xmm8
+	pxor	%xmm9,%xmm6
+	xorl	%ebx,%eax
+	movdqa	-32(%r11),%xmm9
+	roll	$5,%ebp
+	addl	%edi,%edx
+	andl	%eax,%esi
+	pxor	%xmm8,%xmm6
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	pshufd	$238,%xmm3,%xmm7
+	xorl	%ebx,%esi
+	movdqa	%xmm6,%xmm8
+	paddd	%xmm6,%xmm9
+	movl	%edx,%edi
+	addl	48(%rsp),%ecx
+	punpcklqdq	%xmm4,%xmm7
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	psrldq	$4,%xmm8
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	pxor	%xmm3,%xmm7
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pxor	%xmm5,%xmm8
+	xorl	%eax,%edi
+	movl	%ecx,%esi
+	addl	52(%rsp),%ebx
+	pxor	%xmm8,%xmm7
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	movdqa	%xmm9,32(%rsp)
+	addl	%edi,%ebx
+	andl	%edx,%esi
+	movdqa	%xmm7,%xmm10
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	movdqa	%xmm7,%xmm8
+	xorl	%ebp,%esi
+	pslldq	$12,%xmm10
+	paddd	%xmm7,%xmm7
+	movl	%ebx,%edi
+	addl	56(%rsp),%eax
+	psrld	$31,%xmm8
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	addl	%esi,%eax
+	movdqa	%xmm10,%xmm9
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	psrld	$30,%xmm10
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	por	%xmm8,%xmm7
+	xorl	%edx,%edi
+	movl	%eax,%esi
+	addl	60(%rsp),%ebp
+	pslld	$2,%xmm9
+	pxor	%xmm10,%xmm7
+	xorl	%ecx,%ebx
+	movdqa	-32(%r11),%xmm10
+	roll	$5,%eax
+	addl	%edi,%ebp
+	andl	%ebx,%esi
+	pxor	%xmm9,%xmm7
+	pshufd	$238,%xmm6,%xmm9
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	pxor	%xmm4,%xmm0
+	xorl	%ecx,%esi
+	movl	%ebp,%edi
+	addl	0(%rsp),%edx
+	punpcklqdq	%xmm7,%xmm9
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	pxor	%xmm1,%xmm0
+	addl	%esi,%edx
+	andl	%eax,%edi
+	movdqa	%xmm10,%xmm8
+	xorl	%ebx,%eax
+	paddd	%xmm7,%xmm10
+	addl	%ebp,%edx
+	pxor	%xmm9,%xmm0
+	rorl	$7,%ebp
+	xorl	%ebx,%edi
+	movl	%edx,%esi
+	addl	4(%rsp),%ecx
+	movdqa	%xmm0,%xmm9
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	movdqa	%xmm10,48(%rsp)
+	addl	%edi,%ecx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	pslld	$2,%xmm0
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	psrld	$30,%xmm9
+	xorl	%eax,%esi
+	movl	%ecx,%edi
+	addl	8(%rsp),%ebx
+	por	%xmm9,%xmm0
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	pshufd	$238,%xmm7,%xmm10
+	addl	%esi,%ebx
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	addl	12(%rsp),%eax
+	xorl	%ebp,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	pxor	%xmm5,%xmm1
+	addl	16(%rsp),%ebp
+	xorl	%ecx,%esi
+	punpcklqdq	%xmm0,%xmm10
+	movl	%eax,%edi
+	roll	$5,%eax
+	pxor	%xmm2,%xmm1
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	movdqa	%xmm8,%xmm9
+	rorl	$7,%ebx
+	paddd	%xmm0,%xmm8
+	addl	%eax,%ebp
+	pxor	%xmm10,%xmm1
+	addl	20(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	movdqa	%xmm1,%xmm10
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	movdqa	%xmm8,0(%rsp)
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	24(%rsp),%ecx
+	pslld	$2,%xmm1
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	psrld	$30,%xmm10
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	por	%xmm10,%xmm1
+	addl	%edx,%ecx
+	addl	28(%rsp),%ebx
+	pshufd	$238,%xmm0,%xmm8
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	pxor	%xmm6,%xmm2
+	addl	32(%rsp),%eax
+	xorl	%edx,%esi
+	punpcklqdq	%xmm1,%xmm8
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	pxor	%xmm3,%xmm2
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	movdqa	0(%r11),%xmm10
+	rorl	$7,%ecx
+	paddd	%xmm1,%xmm9
+	addl	%ebx,%eax
+	pxor	%xmm8,%xmm2
+	addl	36(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm8
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	movdqa	%xmm9,16(%rsp)
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	40(%rsp),%edx
+	pslld	$2,%xmm2
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	psrld	$30,%xmm8
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	por	%xmm8,%xmm2
+	addl	%ebp,%edx
+	addl	44(%rsp),%ecx
+	pshufd	$238,%xmm1,%xmm9
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	pxor	%xmm7,%xmm3
+	addl	48(%rsp),%ebx
+	xorl	%ebp,%esi
+	punpcklqdq	%xmm2,%xmm9
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	pxor	%xmm4,%xmm3
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	movdqa	%xmm10,%xmm8
+	rorl	$7,%edx
+	paddd	%xmm2,%xmm10
+	addl	%ecx,%ebx
+	pxor	%xmm9,%xmm3
+	addl	52(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm9
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	movdqa	%xmm10,32(%rsp)
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	56(%rsp),%ebp
+	pslld	$2,%xmm3
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	psrld	$30,%xmm9
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	por	%xmm9,%xmm3
+	addl	%eax,%ebp
+	addl	60(%rsp),%edx
+	pshufd	$238,%xmm2,%xmm10
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	pxor	%xmm0,%xmm4
+	addl	0(%rsp),%ecx
+	xorl	%eax,%esi
+	punpcklqdq	%xmm3,%xmm10
+	movl	%edx,%edi
+	roll	$5,%edx
+	pxor	%xmm5,%xmm4
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	movdqa	%xmm8,%xmm9
+	rorl	$7,%ebp
+	paddd	%xmm3,%xmm8
+	addl	%edx,%ecx
+	pxor	%xmm10,%xmm4
+	addl	4(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	movdqa	%xmm4,%xmm10
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	movdqa	%xmm8,48(%rsp)
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	8(%rsp),%eax
+	pslld	$2,%xmm4
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	psrld	$30,%xmm10
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	por	%xmm10,%xmm4
+	addl	%ebx,%eax
+	addl	12(%rsp),%ebp
+	pshufd	$238,%xmm3,%xmm8
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	pxor	%xmm1,%xmm5
+	addl	16(%rsp),%edx
+	xorl	%ebx,%esi
+	punpcklqdq	%xmm4,%xmm8
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	pxor	%xmm6,%xmm5
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	movdqa	%xmm9,%xmm10
+	rorl	$7,%eax
+	paddd	%xmm4,%xmm9
+	addl	%ebp,%edx
+	pxor	%xmm8,%xmm5
+	addl	20(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	movdqa	%xmm5,%xmm8
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	movdqa	%xmm9,0(%rsp)
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	24(%rsp),%ebx
+	pslld	$2,%xmm5
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	psrld	$30,%xmm8
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	por	%xmm8,%xmm5
+	addl	%ecx,%ebx
+	addl	28(%rsp),%eax
+	pshufd	$238,%xmm4,%xmm9
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%ecx,%esi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	pxor	%xmm2,%xmm6
+	addl	32(%rsp),%ebp
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	punpcklqdq	%xmm5,%xmm9
+	movl	%eax,%edi
+	xorl	%ecx,%esi
+	pxor	%xmm7,%xmm6
+	roll	$5,%eax
+	addl	%esi,%ebp
+	movdqa	%xmm10,%xmm8
+	xorl	%ebx,%edi
+	paddd	%xmm5,%xmm10
+	xorl	%ecx,%ebx
+	pxor	%xmm9,%xmm6
+	addl	%eax,%ebp
+	addl	36(%rsp),%edx
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movdqa	%xmm6,%xmm9
+	movl	%ebp,%esi
+	xorl	%ebx,%edi
+	movdqa	%xmm10,16(%rsp)
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%eax,%esi
+	pslld	$2,%xmm6
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	psrld	$30,%xmm9
+	addl	40(%rsp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	por	%xmm9,%xmm6
+	rorl	$7,%ebp
+	movl	%edx,%edi
+	xorl	%eax,%esi
+	roll	$5,%edx
+	pshufd	$238,%xmm5,%xmm10
+	addl	%esi,%ecx
+	xorl	%ebp,%edi
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	addl	44(%rsp),%ebx
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%ebp,%edi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%edx,%esi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	pxor	%xmm3,%xmm7
+	addl	48(%rsp),%eax
+	andl	%edx,%esi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	punpcklqdq	%xmm6,%xmm10
+	movl	%ebx,%edi
+	xorl	%edx,%esi
+	pxor	%xmm0,%xmm7
+	roll	$5,%ebx
+	addl	%esi,%eax
+	movdqa	32(%r11),%xmm9
+	xorl	%ecx,%edi
+	paddd	%xmm6,%xmm8
+	xorl	%edx,%ecx
+	pxor	%xmm10,%xmm7
+	addl	%ebx,%eax
+	addl	52(%rsp),%ebp
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movdqa	%xmm7,%xmm10
+	movl	%eax,%esi
+	xorl	%ecx,%edi
+	movdqa	%xmm8,32(%rsp)
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ebx,%esi
+	pslld	$2,%xmm7
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	psrld	$30,%xmm10
+	addl	56(%rsp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	por	%xmm10,%xmm7
+	rorl	$7,%eax
+	movl	%ebp,%edi
+	xorl	%ebx,%esi
+	roll	$5,%ebp
+	pshufd	$238,%xmm6,%xmm8
+	addl	%esi,%edx
+	xorl	%eax,%edi
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	addl	60(%rsp),%ecx
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	movl	%edx,%esi
+	xorl	%eax,%edi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%ebp,%esi
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	pxor	%xmm4,%xmm0
+	addl	0(%rsp),%ebx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	punpcklqdq	%xmm7,%xmm8
+	movl	%ecx,%edi
+	xorl	%ebp,%esi
+	pxor	%xmm1,%xmm0
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	movdqa	%xmm9,%xmm10
+	xorl	%edx,%edi
+	paddd	%xmm7,%xmm9
+	xorl	%ebp,%edx
+	pxor	%xmm8,%xmm0
+	addl	%ecx,%ebx
+	addl	4(%rsp),%eax
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	movdqa	%xmm0,%xmm8
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	movdqa	%xmm9,48(%rsp)
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%ecx,%esi
+	pslld	$2,%xmm0
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	psrld	$30,%xmm8
+	addl	8(%rsp),%ebp
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	por	%xmm8,%xmm0
+	rorl	$7,%ebx
+	movl	%eax,%edi
+	xorl	%ecx,%esi
+	roll	$5,%eax
+	pshufd	$238,%xmm7,%xmm9
+	addl	%esi,%ebp
+	xorl	%ebx,%edi
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	addl	12(%rsp),%edx
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%ebp,%esi
+	xorl	%ebx,%edi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%eax,%esi
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	pxor	%xmm5,%xmm1
+	addl	16(%rsp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	punpcklqdq	%xmm0,%xmm9
+	movl	%edx,%edi
+	xorl	%eax,%esi
+	pxor	%xmm2,%xmm1
+	roll	$5,%edx
+	addl	%esi,%ecx
+	movdqa	%xmm10,%xmm8
+	xorl	%ebp,%edi
+	paddd	%xmm0,%xmm10
+	xorl	%eax,%ebp
+	pxor	%xmm9,%xmm1
+	addl	%edx,%ecx
+	addl	20(%rsp),%ebx
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	movdqa	%xmm1,%xmm9
+	movl	%ecx,%esi
+	xorl	%ebp,%edi
+	movdqa	%xmm10,0(%rsp)
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%edx,%esi
+	pslld	$2,%xmm1
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	psrld	$30,%xmm9
+	addl	24(%rsp),%eax
+	andl	%edx,%esi
+	xorl	%ebp,%edx
+	por	%xmm9,%xmm1
+	rorl	$7,%ecx
+	movl	%ebx,%edi
+	xorl	%edx,%esi
+	roll	$5,%ebx
+	pshufd	$238,%xmm0,%xmm10
+	addl	%esi,%eax
+	xorl	%ecx,%edi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	28(%rsp),%ebp
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%edi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ebx,%esi
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	pxor	%xmm6,%xmm2
+	addl	32(%rsp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	punpcklqdq	%xmm1,%xmm10
+	movl	%ebp,%edi
+	xorl	%ebx,%esi
+	pxor	%xmm3,%xmm2
+	roll	$5,%ebp
+	addl	%esi,%edx
+	movdqa	%xmm8,%xmm9
+	xorl	%eax,%edi
+	paddd	%xmm1,%xmm8
+	xorl	%ebx,%eax
+	pxor	%xmm10,%xmm2
+	addl	%ebp,%edx
+	addl	36(%rsp),%ecx
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	movdqa	%xmm2,%xmm10
+	movl	%edx,%esi
+	xorl	%eax,%edi
+	movdqa	%xmm8,16(%rsp)
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%ebp,%esi
+	pslld	$2,%xmm2
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	psrld	$30,%xmm10
+	addl	40(%rsp),%ebx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	por	%xmm10,%xmm2
+	rorl	$7,%edx
+	movl	%ecx,%edi
+	xorl	%ebp,%esi
+	roll	$5,%ecx
+	pshufd	$238,%xmm1,%xmm8
+	addl	%esi,%ebx
+	xorl	%edx,%edi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	addl	44(%rsp),%eax
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	addl	%ebx,%eax
+	pxor	%xmm7,%xmm3
+	addl	48(%rsp),%ebp
+	xorl	%ecx,%esi
+	punpcklqdq	%xmm2,%xmm8
+	movl	%eax,%edi
+	roll	$5,%eax
+	pxor	%xmm4,%xmm3
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	movdqa	%xmm9,%xmm10
+	rorl	$7,%ebx
+	paddd	%xmm2,%xmm9
+	addl	%eax,%ebp
+	pxor	%xmm8,%xmm3
+	addl	52(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	movdqa	%xmm3,%xmm8
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	movdqa	%xmm9,32(%rsp)
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	56(%rsp),%ecx
+	pslld	$2,%xmm3
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	psrld	$30,%xmm8
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	por	%xmm8,%xmm3
+	addl	%edx,%ecx
+	addl	60(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	0(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	paddd	%xmm3,%xmm10
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	movdqa	%xmm10,48(%rsp)
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	4(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	8(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	12(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	cmpq	%r10,%r9
+	je	.Ldone_ssse3
+	movdqa	64(%r11),%xmm6
+	movdqa	-64(%r11),%xmm9
+	movdqu	0(%r9),%xmm0
+	movdqu	16(%r9),%xmm1
+	movdqu	32(%r9),%xmm2
+	movdqu	48(%r9),%xmm3
+.byte	102,15,56,0,198
+	addq	$64,%r9
+	addl	16(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+.byte	102,15,56,0,206
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	paddd	%xmm9,%xmm0
+	addl	%ecx,%ebx
+	addl	20(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	movdqa	%xmm0,0(%rsp)
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	psubd	%xmm9,%xmm0
+	addl	%ebx,%eax
+	addl	24(%rsp),%ebp
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	28(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	32(%rsp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%edi
+.byte	102,15,56,0,214
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	paddd	%xmm9,%xmm1
+	addl	%edx,%ecx
+	addl	36(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	movdqa	%xmm1,16(%rsp)
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	psubd	%xmm9,%xmm1
+	addl	%ecx,%ebx
+	addl	40(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	48(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+.byte	102,15,56,0,222
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	paddd	%xmm9,%xmm2
+	addl	%ebp,%edx
+	addl	52(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	movdqa	%xmm2,32(%rsp)
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	psubd	%xmm9,%xmm2
+	addl	%edx,%ecx
+	addl	56(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	0(%r8),%eax
+	addl	4(%r8),%esi
+	addl	8(%r8),%ecx
+	addl	12(%r8),%edx
+	movl	%eax,0(%r8)
+	addl	16(%r8),%ebp
+	movl	%esi,4(%r8)
+	movl	%esi,%ebx
+	movl	%ecx,8(%r8)
+	movl	%ecx,%edi
+	movl	%edx,12(%r8)
+	xorl	%edx,%edi
+	movl	%ebp,16(%r8)
+	andl	%edi,%esi
+	jmp	.Loop_ssse3
+
+.align	16
+.Ldone_ssse3:
+	addl	16(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	20(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	24(%rsp),%ebp
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	28(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	32(%rsp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	36(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	40(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	48(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	52(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	56(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	0(%r8),%eax
+	addl	4(%r8),%esi
+	addl	8(%r8),%ecx
+	movl	%eax,0(%r8)
+	addl	12(%r8),%edx
+	movl	%esi,4(%r8)
+	addl	16(%r8),%ebp
+	movl	%ecx,8(%r8)
+	movl	%edx,12(%r8)
+	movl	%ebp,16(%r8)
+	leaq	(%r14),%rsi
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+.Lepilogue_ssse3:
+	.byte	0xf3,0xc3
+.size	sha1_block_data_order_ssse3,.-sha1_block_data_order_ssse3
+.align	64
+K_XX_XX:
+.long	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+.long	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+.long	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+.long	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+.long	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+.long	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+.long	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+.long	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.byte	0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	64
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S
new file mode 100644
index 0000000..f526de5
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/sha/sha256-x86_64.S
@@ -0,0 +1,2844 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+.globl	sha256_block_data_order
+.hidden sha256_block_data_order
+.type	sha256_block_data_order,@function
+.align	16
+sha256_block_data_order:
+	leaq	OPENSSL_ia32cap_P(%rip),%r11
+	movl	0(%r11),%r9d
+	movl	4(%r11),%r10d
+	movl	8(%r11),%r11d
+	testl	$512,%r10d
+	jnz	.Lssse3_shortcut
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$64+32,%rsp
+	leaq	(%rsi,%rdx,4),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,64+0(%rsp)
+	movq	%rsi,64+8(%rsp)
+	movq	%rdx,64+16(%rsp)
+	movq	%r11,64+24(%rsp)
+.Lprologue:
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+	movl	16(%rdi),%r8d
+	movl	20(%rdi),%r9d
+	movl	24(%rdi),%r10d
+	movl	28(%rdi),%r11d
+	jmp	.Lloop
+
+.align	16
+.Lloop:
+	movl	%ebx,%edi
+	leaq	K256(%rip),%rbp
+	xorl	%ecx,%edi
+	movl	0(%rsi),%r12d
+	movl	%r8d,%r13d
+	movl	%eax,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,0(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r11d
+	movl	4(%rsi),%r12d
+	movl	%edx,%r13d
+	movl	%r11d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,4(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r10d
+	movl	8(%rsi),%r12d
+	movl	%ecx,%r13d
+	movl	%r10d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,8(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r9d
+	movl	12(%rsi),%r12d
+	movl	%ebx,%r13d
+	movl	%r9d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,12(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%r8d
+	movl	16(%rsi),%r12d
+	movl	%eax,%r13d
+	movl	%r8d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,16(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%edx
+	movl	20(%rsi),%r12d
+	movl	%r11d,%r13d
+	movl	%edx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,20(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ecx
+	movl	24(%rsi),%r12d
+	movl	%r10d,%r13d
+	movl	%ecx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,24(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ebx
+	movl	28(%rsi),%r12d
+	movl	%r9d,%r13d
+	movl	%ebx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,28(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%eax
+	movl	32(%rsi),%r12d
+	movl	%r8d,%r13d
+	movl	%eax,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,32(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r11d
+	movl	36(%rsi),%r12d
+	movl	%edx,%r13d
+	movl	%r11d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,36(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r10d
+	movl	40(%rsi),%r12d
+	movl	%ecx,%r13d
+	movl	%r10d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,40(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r9d
+	movl	44(%rsi),%r12d
+	movl	%ebx,%r13d
+	movl	%r9d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,44(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%r8d
+	movl	48(%rsi),%r12d
+	movl	%eax,%r13d
+	movl	%r8d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,48(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%edx
+	movl	52(%rsi),%r12d
+	movl	%r11d,%r13d
+	movl	%edx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,52(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ecx
+	movl	56(%rsi),%r12d
+	movl	%r10d,%r13d
+	movl	%ecx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,56(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ebx
+	movl	60(%rsi),%r12d
+	movl	%r9d,%r13d
+	movl	%ebx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,60(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	jmp	.Lrounds_16_xx
+.align	16
+.Lrounds_16_xx:
+	movl	4(%rsp),%r13d
+	movl	56(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%eax
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	36(%rsp),%r12d
+
+	addl	0(%rsp),%r12d
+	movl	%r8d,%r13d
+	addl	%r15d,%r12d
+	movl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,0(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	movl	8(%rsp),%r13d
+	movl	60(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r11d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	40(%rsp),%r12d
+
+	addl	4(%rsp),%r12d
+	movl	%edx,%r13d
+	addl	%edi,%r12d
+	movl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,4(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	movl	12(%rsp),%r13d
+	movl	0(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r10d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	44(%rsp),%r12d
+
+	addl	8(%rsp),%r12d
+	movl	%ecx,%r13d
+	addl	%r15d,%r12d
+	movl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,8(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	movl	16(%rsp),%r13d
+	movl	4(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r9d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	48(%rsp),%r12d
+
+	addl	12(%rsp),%r12d
+	movl	%ebx,%r13d
+	addl	%edi,%r12d
+	movl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,12(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	movl	20(%rsp),%r13d
+	movl	8(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r8d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	52(%rsp),%r12d
+
+	addl	16(%rsp),%r12d
+	movl	%eax,%r13d
+	addl	%r15d,%r12d
+	movl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,16(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	movl	24(%rsp),%r13d
+	movl	12(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%edx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	56(%rsp),%r12d
+
+	addl	20(%rsp),%r12d
+	movl	%r11d,%r13d
+	addl	%edi,%r12d
+	movl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,20(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	movl	28(%rsp),%r13d
+	movl	16(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ecx
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	60(%rsp),%r12d
+
+	addl	24(%rsp),%r12d
+	movl	%r10d,%r13d
+	addl	%r15d,%r12d
+	movl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,24(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	movl	32(%rsp),%r13d
+	movl	20(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ebx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	0(%rsp),%r12d
+
+	addl	28(%rsp),%r12d
+	movl	%r9d,%r13d
+	addl	%edi,%r12d
+	movl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,28(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	movl	36(%rsp),%r13d
+	movl	24(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%eax
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	4(%rsp),%r12d
+
+	addl	32(%rsp),%r12d
+	movl	%r8d,%r13d
+	addl	%r15d,%r12d
+	movl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,32(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	movl	40(%rsp),%r13d
+	movl	28(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r11d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	8(%rsp),%r12d
+
+	addl	36(%rsp),%r12d
+	movl	%edx,%r13d
+	addl	%edi,%r12d
+	movl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,36(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	movl	44(%rsp),%r13d
+	movl	32(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r10d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	12(%rsp),%r12d
+
+	addl	40(%rsp),%r12d
+	movl	%ecx,%r13d
+	addl	%r15d,%r12d
+	movl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,40(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	movl	48(%rsp),%r13d
+	movl	36(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r9d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	16(%rsp),%r12d
+
+	addl	44(%rsp),%r12d
+	movl	%ebx,%r13d
+	addl	%edi,%r12d
+	movl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,44(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	movl	52(%rsp),%r13d
+	movl	40(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r8d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	20(%rsp),%r12d
+
+	addl	48(%rsp),%r12d
+	movl	%eax,%r13d
+	addl	%r15d,%r12d
+	movl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,48(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	movl	56(%rsp),%r13d
+	movl	44(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%edx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	24(%rsp),%r12d
+
+	addl	52(%rsp),%r12d
+	movl	%r11d,%r13d
+	addl	%edi,%r12d
+	movl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,52(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	movl	60(%rsp),%r13d
+	movl	48(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ecx
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	28(%rsp),%r12d
+
+	addl	56(%rsp),%r12d
+	movl	%r10d,%r13d
+	addl	%r15d,%r12d
+	movl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,56(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	movl	0(%rsp),%r13d
+	movl	52(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ebx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	32(%rsp),%r12d
+
+	addl	60(%rsp),%r12d
+	movl	%r9d,%r13d
+	addl	%edi,%r12d
+	movl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,60(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	cmpb	$0,3(%rbp)
+	jnz	.Lrounds_16_xx
+
+	movq	64+0(%rsp),%rdi
+	addl	%r14d,%eax
+	leaq	64(%rsi),%rsi
+
+	addl	0(%rdi),%eax
+	addl	4(%rdi),%ebx
+	addl	8(%rdi),%ecx
+	addl	12(%rdi),%edx
+	addl	16(%rdi),%r8d
+	addl	20(%rdi),%r9d
+	addl	24(%rdi),%r10d
+	addl	28(%rdi),%r11d
+
+	cmpq	64+16(%rsp),%rsi
+
+	movl	%eax,0(%rdi)
+	movl	%ebx,4(%rdi)
+	movl	%ecx,8(%rdi)
+	movl	%edx,12(%rdi)
+	movl	%r8d,16(%rdi)
+	movl	%r9d,20(%rdi)
+	movl	%r10d,24(%rdi)
+	movl	%r11d,28(%rdi)
+	jb	.Lloop
+
+	movq	64+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lepilogue:
+	.byte	0xf3,0xc3
+.size	sha256_block_data_order,.-sha256_block_data_order
+.align	64
+.type	K256,@object
+K256:
+.long	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.long	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.long	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.long	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.long	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+.long	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+.long	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+.long	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+.long	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.type	sha256_block_data_order_ssse3,@function
+.align	64
+sha256_block_data_order_ssse3:
+.Lssse3_shortcut:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$96,%rsp
+	leaq	(%rsi,%rdx,4),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,64+0(%rsp)
+	movq	%rsi,64+8(%rsp)
+	movq	%rdx,64+16(%rsp)
+	movq	%r11,64+24(%rsp)
+.Lprologue_ssse3:
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+	movl	16(%rdi),%r8d
+	movl	20(%rdi),%r9d
+	movl	24(%rdi),%r10d
+	movl	28(%rdi),%r11d
+
+
+	jmp	.Lloop_ssse3
+.align	16
+.Lloop_ssse3:
+	movdqa	K256+512(%rip),%xmm7
+	movdqu	0(%rsi),%xmm0
+	movdqu	16(%rsi),%xmm1
+	movdqu	32(%rsi),%xmm2
+.byte	102,15,56,0,199
+	movdqu	48(%rsi),%xmm3
+	leaq	K256(%rip),%rbp
+.byte	102,15,56,0,207
+	movdqa	0(%rbp),%xmm4
+	movdqa	32(%rbp),%xmm5
+.byte	102,15,56,0,215
+	paddd	%xmm0,%xmm4
+	movdqa	64(%rbp),%xmm6
+.byte	102,15,56,0,223
+	movdqa	96(%rbp),%xmm7
+	paddd	%xmm1,%xmm5
+	paddd	%xmm2,%xmm6
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm4,0(%rsp)
+	movl	%eax,%r14d
+	movdqa	%xmm5,16(%rsp)
+	movl	%ebx,%edi
+	movdqa	%xmm6,32(%rsp)
+	xorl	%ecx,%edi
+	movdqa	%xmm7,48(%rsp)
+	movl	%r8d,%r13d
+	jmp	.Lssse3_00_47
+
+.align	16
+.Lssse3_00_47:
+	subq	$-128,%rbp
+	rorl	$14,%r13d
+	movdqa	%xmm1,%xmm4
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	movdqa	%xmm3,%xmm7
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+.byte	102,15,58,15,224,4
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+.byte	102,15,58,15,250,4
+	addl	0(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	paddd	%xmm7,%xmm0
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	psrld	$7,%xmm6
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	pshufd	$250,%xmm3,%xmm7
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%r11d,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	pslld	$11,%xmm5
+	addl	4(%rsp),%r10d
+	movl	%r11d,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	paddd	%xmm4,%xmm0
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	psrlq	$17,%xmm6
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%ecx,%r13d
+	addl	8(%rsp),%r9d
+	movl	%r10d,%r15d
+	psrldq	$8,%xmm7
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm0
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	pshufd	$80,%xmm0,%xmm7
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	psrld	$10,%xmm7
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	psrlq	$2,%xmm6
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	12(%rsp),%r8d
+	pxor	%xmm6,%xmm7
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	movdqa	0(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	paddd	%xmm7,%xmm0
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	paddd	%xmm0,%xmm6
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	movdqa	%xmm6,0(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm2,%xmm4
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	movdqa	%xmm0,%xmm7
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+.byte	102,15,58,15,225,4
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+.byte	102,15,58,15,251,4
+	addl	16(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	paddd	%xmm7,%xmm1
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	psrld	$7,%xmm6
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	pshufd	$250,%xmm0,%xmm7
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%edx,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	pslld	$11,%xmm5
+	addl	20(%rsp),%ecx
+	movl	%edx,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	paddd	%xmm4,%xmm1
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	psrlq	$17,%xmm6
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%r10d,%r13d
+	addl	24(%rsp),%ebx
+	movl	%ecx,%r15d
+	psrldq	$8,%xmm7
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm1
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	pshufd	$80,%xmm1,%xmm7
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	psrld	$10,%xmm7
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	psrlq	$2,%xmm6
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	28(%rsp),%eax
+	pxor	%xmm6,%xmm7
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	movdqa	32(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	paddd	%xmm7,%xmm1
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	paddd	%xmm1,%xmm6
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movdqa	%xmm6,16(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm3,%xmm4
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	movdqa	%xmm1,%xmm7
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+.byte	102,15,58,15,226,4
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+.byte	102,15,58,15,248,4
+	addl	32(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	paddd	%xmm7,%xmm2
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	psrld	$7,%xmm6
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	pshufd	$250,%xmm1,%xmm7
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%r11d,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	pslld	$11,%xmm5
+	addl	36(%rsp),%r10d
+	movl	%r11d,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	paddd	%xmm4,%xmm2
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	psrlq	$17,%xmm6
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%ecx,%r13d
+	addl	40(%rsp),%r9d
+	movl	%r10d,%r15d
+	psrldq	$8,%xmm7
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm2
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	pshufd	$80,%xmm2,%xmm7
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	psrld	$10,%xmm7
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	psrlq	$2,%xmm6
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	44(%rsp),%r8d
+	pxor	%xmm6,%xmm7
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	movdqa	64(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	paddd	%xmm7,%xmm2
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	paddd	%xmm2,%xmm6
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	movdqa	%xmm6,32(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm0,%xmm4
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	movdqa	%xmm2,%xmm7
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+.byte	102,15,58,15,227,4
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+.byte	102,15,58,15,249,4
+	addl	48(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	paddd	%xmm7,%xmm3
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	psrld	$7,%xmm6
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	pshufd	$250,%xmm2,%xmm7
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%edx,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	pslld	$11,%xmm5
+	addl	52(%rsp),%ecx
+	movl	%edx,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	paddd	%xmm4,%xmm3
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	psrlq	$17,%xmm6
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%r10d,%r13d
+	addl	56(%rsp),%ebx
+	movl	%ecx,%r15d
+	psrldq	$8,%xmm7
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm3
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	pshufd	$80,%xmm3,%xmm7
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	psrld	$10,%xmm7
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	psrlq	$2,%xmm6
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	60(%rsp),%eax
+	pxor	%xmm6,%xmm7
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	movdqa	96(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	paddd	%xmm7,%xmm3
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	paddd	%xmm3,%xmm6
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movdqa	%xmm6,48(%rsp)
+	cmpb	$0,131(%rbp)
+	jne	.Lssse3_00_47
+	rorl	$14,%r13d
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+	addl	0(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	xorl	%r11d,%r14d
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	addl	4(%rsp),%r10d
+	movl	%r11d,%edi
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	xorl	%ecx,%r13d
+	addl	8(%rsp),%r9d
+	movl	%r10d,%r15d
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	12(%rsp),%r8d
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+	addl	16(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	xorl	%edx,%r14d
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	addl	20(%rsp),%ecx
+	movl	%edx,%edi
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	xorl	%r10d,%r13d
+	addl	24(%rsp),%ebx
+	movl	%ecx,%r15d
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	28(%rsp),%eax
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+	addl	32(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	xorl	%r11d,%r14d
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	addl	36(%rsp),%r10d
+	movl	%r11d,%edi
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	xorl	%ecx,%r13d
+	addl	40(%rsp),%r9d
+	movl	%r10d,%r15d
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	44(%rsp),%r8d
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+	addl	48(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	xorl	%edx,%r14d
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	addl	52(%rsp),%ecx
+	movl	%edx,%edi
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	xorl	%r10d,%r13d
+	addl	56(%rsp),%ebx
+	movl	%ecx,%r15d
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	60(%rsp),%eax
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movq	64+0(%rsp),%rdi
+	movl	%r14d,%eax
+
+	addl	0(%rdi),%eax
+	leaq	64(%rsi),%rsi
+	addl	4(%rdi),%ebx
+	addl	8(%rdi),%ecx
+	addl	12(%rdi),%edx
+	addl	16(%rdi),%r8d
+	addl	20(%rdi),%r9d
+	addl	24(%rdi),%r10d
+	addl	28(%rdi),%r11d
+
+	cmpq	64+16(%rsp),%rsi
+
+	movl	%eax,0(%rdi)
+	movl	%ebx,4(%rdi)
+	movl	%ecx,8(%rdi)
+	movl	%edx,12(%rdi)
+	movl	%r8d,16(%rdi)
+	movl	%r9d,20(%rdi)
+	movl	%r10d,24(%rdi)
+	movl	%r11d,28(%rdi)
+	jb	.Lloop_ssse3
+
+	movq	64+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lepilogue_ssse3:
+	.byte	0xf3,0xc3
+.size	sha256_block_data_order_ssse3,.-sha256_block_data_order_ssse3
+#endif
diff --git a/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S b/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S
new file mode 100644
index 0000000..ca3a3a1
--- /dev/null
+++ b/third_party/boringssl/linux-x86_64/crypto/sha/sha512-x86_64.S
@@ -0,0 +1,1787 @@
+#if defined(__x86_64__)
+.text	
+
+.extern	OPENSSL_ia32cap_P
+.hidden OPENSSL_ia32cap_P
+.globl	sha512_block_data_order
+.hidden sha512_block_data_order
+.type	sha512_block_data_order,@function
+.align	16
+sha512_block_data_order:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$128+32,%rsp
+	leaq	(%rsi,%rdx,8),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,128+0(%rsp)
+	movq	%rsi,128+8(%rsp)
+	movq	%rdx,128+16(%rsp)
+	movq	%r11,128+24(%rsp)
+.Lprologue:
+
+	movq	0(%rdi),%rax
+	movq	8(%rdi),%rbx
+	movq	16(%rdi),%rcx
+	movq	24(%rdi),%rdx
+	movq	32(%rdi),%r8
+	movq	40(%rdi),%r9
+	movq	48(%rdi),%r10
+	movq	56(%rdi),%r11
+	jmp	.Lloop
+
+.align	16
+.Lloop:
+	movq	%rbx,%rdi
+	leaq	K512(%rip),%rbp
+	xorq	%rcx,%rdi
+	movq	0(%rsi),%r12
+	movq	%r8,%r13
+	movq	%rax,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,0(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r11
+	movq	8(%rsi),%r12
+	movq	%rdx,%r13
+	movq	%r11,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,8(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r10
+	movq	16(%rsi),%r12
+	movq	%rcx,%r13
+	movq	%r10,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,16(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r9
+	movq	24(%rsi),%r12
+	movq	%rbx,%r13
+	movq	%r9,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,24(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r8
+	movq	32(%rsi),%r12
+	movq	%rax,%r13
+	movq	%r8,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,32(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rdx
+	movq	40(%rsi),%r12
+	movq	%r11,%r13
+	movq	%rdx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,40(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rcx
+	movq	48(%rsi),%r12
+	movq	%r10,%r13
+	movq	%rcx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,48(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rbx
+	movq	56(%rsi),%r12
+	movq	%r9,%r13
+	movq	%rbx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,56(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rax
+	movq	64(%rsi),%r12
+	movq	%r8,%r13
+	movq	%rax,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,64(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r11
+	movq	72(%rsi),%r12
+	movq	%rdx,%r13
+	movq	%r11,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,72(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r10
+	movq	80(%rsi),%r12
+	movq	%rcx,%r13
+	movq	%r10,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,80(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r9
+	movq	88(%rsi),%r12
+	movq	%rbx,%r13
+	movq	%r9,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,88(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r8
+	movq	96(%rsi),%r12
+	movq	%rax,%r13
+	movq	%r8,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,96(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rdx
+	movq	104(%rsi),%r12
+	movq	%r11,%r13
+	movq	%rdx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,104(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rcx
+	movq	112(%rsi),%r12
+	movq	%r10,%r13
+	movq	%rcx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,112(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rbx
+	movq	120(%rsi),%r12
+	movq	%r9,%r13
+	movq	%rbx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,120(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	jmp	.Lrounds_16_xx
+.align	16
+.Lrounds_16_xx:
+	movq	8(%rsp),%r13
+	movq	112(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rax
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	72(%rsp),%r12
+
+	addq	0(%rsp),%r12
+	movq	%r8,%r13
+	addq	%r15,%r12
+	movq	%rax,%r14
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,0(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	movq	16(%rsp),%r13
+	movq	120(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r11
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	80(%rsp),%r12
+
+	addq	8(%rsp),%r12
+	movq	%rdx,%r13
+	addq	%rdi,%r12
+	movq	%r11,%r14
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,8(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	movq	24(%rsp),%r13
+	movq	0(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r10
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	88(%rsp),%r12
+
+	addq	16(%rsp),%r12
+	movq	%rcx,%r13
+	addq	%r15,%r12
+	movq	%r10,%r14
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,16(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	movq	32(%rsp),%r13
+	movq	8(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r9
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	96(%rsp),%r12
+
+	addq	24(%rsp),%r12
+	movq	%rbx,%r13
+	addq	%rdi,%r12
+	movq	%r9,%r14
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,24(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	movq	40(%rsp),%r13
+	movq	16(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r8
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	104(%rsp),%r12
+
+	addq	32(%rsp),%r12
+	movq	%rax,%r13
+	addq	%r15,%r12
+	movq	%r8,%r14
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,32(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	movq	48(%rsp),%r13
+	movq	24(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rdx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	112(%rsp),%r12
+
+	addq	40(%rsp),%r12
+	movq	%r11,%r13
+	addq	%rdi,%r12
+	movq	%rdx,%r14
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,40(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	movq	56(%rsp),%r13
+	movq	32(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rcx
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	120(%rsp),%r12
+
+	addq	48(%rsp),%r12
+	movq	%r10,%r13
+	addq	%r15,%r12
+	movq	%rcx,%r14
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,48(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	movq	64(%rsp),%r13
+	movq	40(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rbx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	0(%rsp),%r12
+
+	addq	56(%rsp),%r12
+	movq	%r9,%r13
+	addq	%rdi,%r12
+	movq	%rbx,%r14
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,56(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	movq	72(%rsp),%r13
+	movq	48(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rax
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	8(%rsp),%r12
+
+	addq	64(%rsp),%r12
+	movq	%r8,%r13
+	addq	%r15,%r12
+	movq	%rax,%r14
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,64(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	movq	80(%rsp),%r13
+	movq	56(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r11
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	16(%rsp),%r12
+
+	addq	72(%rsp),%r12
+	movq	%rdx,%r13
+	addq	%rdi,%r12
+	movq	%r11,%r14
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,72(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	movq	88(%rsp),%r13
+	movq	64(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r10
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	24(%rsp),%r12
+
+	addq	80(%rsp),%r12
+	movq	%rcx,%r13
+	addq	%r15,%r12
+	movq	%r10,%r14
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,80(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	movq	96(%rsp),%r13
+	movq	72(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r9
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	32(%rsp),%r12
+
+	addq	88(%rsp),%r12
+	movq	%rbx,%r13
+	addq	%rdi,%r12
+	movq	%r9,%r14
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,88(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	movq	104(%rsp),%r13
+	movq	80(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r8
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	40(%rsp),%r12
+
+	addq	96(%rsp),%r12
+	movq	%rax,%r13
+	addq	%r15,%r12
+	movq	%r8,%r14
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,96(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	movq	112(%rsp),%r13
+	movq	88(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rdx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	48(%rsp),%r12
+
+	addq	104(%rsp),%r12
+	movq	%r11,%r13
+	addq	%rdi,%r12
+	movq	%rdx,%r14
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,104(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	movq	120(%rsp),%r13
+	movq	96(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rcx
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	56(%rsp),%r12
+
+	addq	112(%rsp),%r12
+	movq	%r10,%r13
+	addq	%r15,%r12
+	movq	%rcx,%r14
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,112(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	movq	0(%rsp),%r13
+	movq	104(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rbx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	64(%rsp),%r12
+
+	addq	120(%rsp),%r12
+	movq	%r9,%r13
+	addq	%rdi,%r12
+	movq	%rbx,%r14
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,120(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	cmpb	$0,7(%rbp)
+	jnz	.Lrounds_16_xx
+
+	movq	128+0(%rsp),%rdi
+	addq	%r14,%rax
+	leaq	128(%rsi),%rsi
+
+	addq	0(%rdi),%rax
+	addq	8(%rdi),%rbx
+	addq	16(%rdi),%rcx
+	addq	24(%rdi),%rdx
+	addq	32(%rdi),%r8
+	addq	40(%rdi),%r9
+	addq	48(%rdi),%r10
+	addq	56(%rdi),%r11
+
+	cmpq	128+16(%rsp),%rsi
+
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,16(%rdi)
+	movq	%rdx,24(%rdi)
+	movq	%r8,32(%rdi)
+	movq	%r9,40(%rdi)
+	movq	%r10,48(%rdi)
+	movq	%r11,56(%rdi)
+	jb	.Lloop
+
+	movq	128+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+.Lepilogue:
+	.byte	0xf3,0xc3
+.size	sha512_block_data_order,.-sha512_block_data_order
+.align	64
+.type	K512,@object
+K512:
+.quad	0x428a2f98d728ae22,0x7137449123ef65cd
+.quad	0x428a2f98d728ae22,0x7137449123ef65cd
+.quad	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+.quad	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+.quad	0x3956c25bf348b538,0x59f111f1b605d019
+.quad	0x3956c25bf348b538,0x59f111f1b605d019
+.quad	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+.quad	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+.quad	0xd807aa98a3030242,0x12835b0145706fbe
+.quad	0xd807aa98a3030242,0x12835b0145706fbe
+.quad	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+.quad	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+.quad	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+.quad	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+.quad	0x9bdc06a725c71235,0xc19bf174cf692694
+.quad	0x9bdc06a725c71235,0xc19bf174cf692694
+.quad	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+.quad	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+.quad	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+.quad	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+.quad	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+.quad	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+.quad	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+.quad	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+.quad	0x983e5152ee66dfab,0xa831c66d2db43210
+.quad	0x983e5152ee66dfab,0xa831c66d2db43210
+.quad	0xb00327c898fb213f,0xbf597fc7beef0ee4
+.quad	0xb00327c898fb213f,0xbf597fc7beef0ee4
+.quad	0xc6e00bf33da88fc2,0xd5a79147930aa725
+.quad	0xc6e00bf33da88fc2,0xd5a79147930aa725
+.quad	0x06ca6351e003826f,0x142929670a0e6e70
+.quad	0x06ca6351e003826f,0x142929670a0e6e70
+.quad	0x27b70a8546d22ffc,0x2e1b21385c26c926
+.quad	0x27b70a8546d22ffc,0x2e1b21385c26c926
+.quad	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+.quad	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+.quad	0x650a73548baf63de,0x766a0abb3c77b2a8
+.quad	0x650a73548baf63de,0x766a0abb3c77b2a8
+.quad	0x81c2c92e47edaee6,0x92722c851482353b
+.quad	0x81c2c92e47edaee6,0x92722c851482353b
+.quad	0xa2bfe8a14cf10364,0xa81a664bbc423001
+.quad	0xa2bfe8a14cf10364,0xa81a664bbc423001
+.quad	0xc24b8b70d0f89791,0xc76c51a30654be30
+.quad	0xc24b8b70d0f89791,0xc76c51a30654be30
+.quad	0xd192e819d6ef5218,0xd69906245565a910
+.quad	0xd192e819d6ef5218,0xd69906245565a910
+.quad	0xf40e35855771202a,0x106aa07032bbd1b8
+.quad	0xf40e35855771202a,0x106aa07032bbd1b8
+.quad	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+.quad	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+.quad	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+.quad	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+.quad	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+.quad	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+.quad	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+.quad	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+.quad	0x748f82ee5defb2fc,0x78a5636f43172f60
+.quad	0x748f82ee5defb2fc,0x78a5636f43172f60
+.quad	0x84c87814a1f0ab72,0x8cc702081a6439ec
+.quad	0x84c87814a1f0ab72,0x8cc702081a6439ec
+.quad	0x90befffa23631e28,0xa4506cebde82bde9
+.quad	0x90befffa23631e28,0xa4506cebde82bde9
+.quad	0xbef9a3f7b2c67915,0xc67178f2e372532b
+.quad	0xbef9a3f7b2c67915,0xc67178f2e372532b
+.quad	0xca273eceea26619c,0xd186b8c721c0c207
+.quad	0xca273eceea26619c,0xd186b8c721c0c207
+.quad	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+.quad	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+.quad	0x06f067aa72176fba,0x0a637dc5a2c898a6
+.quad	0x06f067aa72176fba,0x0a637dc5a2c898a6
+.quad	0x113f9804bef90dae,0x1b710b35131c471b
+.quad	0x113f9804bef90dae,0x1b710b35131c471b
+.quad	0x28db77f523047d84,0x32caab7b40c72493
+.quad	0x28db77f523047d84,0x32caab7b40c72493
+.quad	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+.quad	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+.quad	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+.quad	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+.quad	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+.quad	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+
+.quad	0x0001020304050607,0x08090a0b0c0d0e0f
+.quad	0x0001020304050607,0x08090a0b0c0d0e0f
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/aes/aes-586.S b/third_party/boringssl/mac-x86/crypto/aes/aes-586.S
new file mode 100644
index 0000000..d3dc6be
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/aes/aes-586.S
@@ -0,0 +1,3221 @@
+#if defined(__i386__)
+.file	"aes-586.S"
+.text
+.private_extern	__x86_AES_encrypt_compact
+.align	4
+__x86_AES_encrypt_compact:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+.align	4,0x90
+L000loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ch,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$8,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$24,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%ecx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	xorl	%esi,%ecx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%ecx
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%ecx
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%edx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	xorl	%esi,%edx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%edx
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%edx
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%eax,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	xorl	%esi,%eax
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%eax
+	xorl	%edi,%esi
+	movl	$2155905152,%ebp
+	xorl	%esi,%eax
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%edi
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	andl	$4278124286,%edi
+	subl	%ebp,%esi
+	movl	%ebx,%ebp
+	andl	$454761243,%esi
+	rorl	$16,%ebp
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	xorl	%esi,%ebx
+	rorl	$24,%edi
+	xorl	%ebp,%esi
+	roll	$24,%ebx
+	xorl	%edi,%esi
+	xorl	%esi,%ebx
+	movl	20(%esp),%edi
+	movl	28(%esp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	L000loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ch,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$8,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$24,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	xorl	16(%edi),%eax
+	xorl	20(%edi),%ebx
+	xorl	24(%edi),%ecx
+	xorl	28(%edi),%edx
+	ret
+.private_extern	__sse_AES_encrypt_compact
+.align	4
+__sse_AES_encrypt_compact:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	$454761243,%eax
+	movl	%eax,8(%esp)
+	movl	%eax,12(%esp)
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+.align	4,0x90
+L001loop:
+	pshufw	$8,%mm0,%mm1
+	pshufw	$13,%mm4,%mm5
+	movd	%mm1,%eax
+	movd	%mm5,%ebx
+	movl	%edi,20(%esp)
+	movzbl	%al,%esi
+	movzbl	%ah,%edx
+	pshufw	$13,%mm0,%mm2
+	movzbl	-128(%ebp,%esi,1),%ecx
+	movzbl	%bl,%edi
+	movzbl	-128(%ebp,%edx,1),%edx
+	shrl	$16,%eax
+	shll	$8,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$16,%esi
+	pshufw	$8,%mm4,%mm6
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$24,%esi
+	shrl	$16,%ebx
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$8,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	movd	%mm2,%eax
+	movd	%ecx,%mm0
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%ah,%edi
+	shll	$16,%ecx
+	movd	%mm6,%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	shll	$8,%esi
+	shrl	$16,%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shrl	$16,%eax
+	movd	%ecx,%mm1
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%ah,%edi
+	shll	$16,%ecx
+	andl	$255,%eax
+	orl	%esi,%ecx
+	punpckldq	%mm1,%mm0
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%eax,1),%eax
+	orl	%esi,%ecx
+	shll	$16,%eax
+	movzbl	-128(%ebp,%edi,1),%esi
+	orl	%eax,%edx
+	shll	$8,%esi
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	orl	%esi,%ecx
+	orl	%ebx,%edx
+	movl	20(%esp),%edi
+	movd	%ecx,%mm4
+	movd	%edx,%mm5
+	punpckldq	%mm5,%mm4
+	addl	$16,%edi
+	cmpl	24(%esp),%edi
+	ja	L002out
+	movq	8(%esp),%mm2
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	movq	%mm0,%mm1
+	movq	%mm4,%mm5
+	pcmpgtb	%mm0,%mm3
+	pcmpgtb	%mm4,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	pshufw	$177,%mm0,%mm2
+	pshufw	$177,%mm4,%mm6
+	paddb	%mm0,%mm0
+	paddb	%mm4,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pshufw	$177,%mm2,%mm3
+	pshufw	$177,%mm6,%mm7
+	pxor	%mm0,%mm1
+	pxor	%mm4,%mm5
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	%mm3,%mm2
+	movq	%mm7,%mm6
+	pslld	$8,%mm3
+	pslld	$8,%mm7
+	psrld	$24,%mm2
+	psrld	$24,%mm6
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	movq	(%edi),%mm2
+	movq	8(%edi),%mm6
+	psrld	$8,%mm1
+	psrld	$8,%mm5
+	movl	-128(%ebp),%eax
+	pslld	$24,%mm3
+	pslld	$24,%mm7
+	movl	-64(%ebp),%ebx
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movl	(%ebp),%ecx
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movl	64(%ebp),%edx
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	jmp	L001loop
+.align	4,0x90
+L002out:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	ret
+.private_extern	__x86_AES_encrypt
+.align	4
+__x86_AES_encrypt:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+.align	4,0x90
+L003loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%bh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%ch,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%dh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movzbl	%bh,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	20(%esp),%edi
+	movl	(%ebp,%edx,8),%edx
+	movzbl	%ah,%eax
+	xorl	3(%ebp,%eax,8),%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	xorl	2(%ebp,%ebx,8),%edx
+	movl	8(%esp),%ebx
+	xorl	1(%ebp,%ecx,8),%edx
+	movl	%esi,%ecx
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	L003loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%bh,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	shrl	$16,%ebx
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%ch,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$24,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	shrl	$24,%ecx
+	movl	2(%ebp,%esi,8),%esi
+	andl	$255,%esi
+	movzbl	%dh,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$65280,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edx
+	andl	$255,%edi
+	movl	(%ebp,%edi,8),%edi
+	andl	$16711680,%edi
+	xorl	%edi,%esi
+	movzbl	%bh,%edi
+	movl	2(%ebp,%edi,8),%edi
+	andl	$4278190080,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movl	2(%ebp,%edx,8),%edx
+	andl	$255,%edx
+	movzbl	%ah,%eax
+	movl	(%ebp,%eax,8),%eax
+	andl	$65280,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	andl	$255,%ebx
+	movl	(%ebp,%ebx,8),%ebx
+	andl	$16711680,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	movl	2(%ebp,%ecx,8),%ecx
+	andl	$4278190080,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	ret
+.align	6,0x90
+LAES_Te:
+.long	2774754246,2774754246
+.long	2222750968,2222750968
+.long	2574743534,2574743534
+.long	2373680118,2373680118
+.long	234025727,234025727
+.long	3177933782,3177933782
+.long	2976870366,2976870366
+.long	1422247313,1422247313
+.long	1345335392,1345335392
+.long	50397442,50397442
+.long	2842126286,2842126286
+.long	2099981142,2099981142
+.long	436141799,436141799
+.long	1658312629,1658312629
+.long	3870010189,3870010189
+.long	2591454956,2591454956
+.long	1170918031,1170918031
+.long	2642575903,2642575903
+.long	1086966153,1086966153
+.long	2273148410,2273148410
+.long	368769775,368769775
+.long	3948501426,3948501426
+.long	3376891790,3376891790
+.long	200339707,200339707
+.long	3970805057,3970805057
+.long	1742001331,1742001331
+.long	4255294047,4255294047
+.long	3937382213,3937382213
+.long	3214711843,3214711843
+.long	4154762323,4154762323
+.long	2524082916,2524082916
+.long	1539358875,1539358875
+.long	3266819957,3266819957
+.long	486407649,486407649
+.long	2928907069,2928907069
+.long	1780885068,1780885068
+.long	1513502316,1513502316
+.long	1094664062,1094664062
+.long	49805301,49805301
+.long	1338821763,1338821763
+.long	1546925160,1546925160
+.long	4104496465,4104496465
+.long	887481809,887481809
+.long	150073849,150073849
+.long	2473685474,2473685474
+.long	1943591083,1943591083
+.long	1395732834,1395732834
+.long	1058346282,1058346282
+.long	201589768,201589768
+.long	1388824469,1388824469
+.long	1696801606,1696801606
+.long	1589887901,1589887901
+.long	672667696,672667696
+.long	2711000631,2711000631
+.long	251987210,251987210
+.long	3046808111,3046808111
+.long	151455502,151455502
+.long	907153956,907153956
+.long	2608889883,2608889883
+.long	1038279391,1038279391
+.long	652995533,652995533
+.long	1764173646,1764173646
+.long	3451040383,3451040383
+.long	2675275242,2675275242
+.long	453576978,453576978
+.long	2659418909,2659418909
+.long	1949051992,1949051992
+.long	773462580,773462580
+.long	756751158,756751158
+.long	2993581788,2993581788
+.long	3998898868,3998898868
+.long	4221608027,4221608027
+.long	4132590244,4132590244
+.long	1295727478,1295727478
+.long	1641469623,1641469623
+.long	3467883389,3467883389
+.long	2066295122,2066295122
+.long	1055122397,1055122397
+.long	1898917726,1898917726
+.long	2542044179,2542044179
+.long	4115878822,4115878822
+.long	1758581177,1758581177
+.long	0,0
+.long	753790401,753790401
+.long	1612718144,1612718144
+.long	536673507,536673507
+.long	3367088505,3367088505
+.long	3982187446,3982187446
+.long	3194645204,3194645204
+.long	1187761037,1187761037
+.long	3653156455,3653156455
+.long	1262041458,1262041458
+.long	3729410708,3729410708
+.long	3561770136,3561770136
+.long	3898103984,3898103984
+.long	1255133061,1255133061
+.long	1808847035,1808847035
+.long	720367557,720367557
+.long	3853167183,3853167183
+.long	385612781,385612781
+.long	3309519750,3309519750
+.long	3612167578,3612167578
+.long	1429418854,1429418854
+.long	2491778321,2491778321
+.long	3477423498,3477423498
+.long	284817897,284817897
+.long	100794884,100794884
+.long	2172616702,2172616702
+.long	4031795360,4031795360
+.long	1144798328,1144798328
+.long	3131023141,3131023141
+.long	3819481163,3819481163
+.long	4082192802,4082192802
+.long	4272137053,4272137053
+.long	3225436288,3225436288
+.long	2324664069,2324664069
+.long	2912064063,2912064063
+.long	3164445985,3164445985
+.long	1211644016,1211644016
+.long	83228145,83228145
+.long	3753688163,3753688163
+.long	3249976951,3249976951
+.long	1977277103,1977277103
+.long	1663115586,1663115586
+.long	806359072,806359072
+.long	452984805,452984805
+.long	250868733,250868733
+.long	1842533055,1842533055
+.long	1288555905,1288555905
+.long	336333848,336333848
+.long	890442534,890442534
+.long	804056259,804056259
+.long	3781124030,3781124030
+.long	2727843637,2727843637
+.long	3427026056,3427026056
+.long	957814574,957814574
+.long	1472513171,1472513171
+.long	4071073621,4071073621
+.long	2189328124,2189328124
+.long	1195195770,1195195770
+.long	2892260552,2892260552
+.long	3881655738,3881655738
+.long	723065138,723065138
+.long	2507371494,2507371494
+.long	2690670784,2690670784
+.long	2558624025,2558624025
+.long	3511635870,3511635870
+.long	2145180835,2145180835
+.long	1713513028,1713513028
+.long	2116692564,2116692564
+.long	2878378043,2878378043
+.long	2206763019,2206763019
+.long	3393603212,3393603212
+.long	703524551,703524551
+.long	3552098411,3552098411
+.long	1007948840,1007948840
+.long	2044649127,2044649127
+.long	3797835452,3797835452
+.long	487262998,487262998
+.long	1994120109,1994120109
+.long	1004593371,1004593371
+.long	1446130276,1446130276
+.long	1312438900,1312438900
+.long	503974420,503974420
+.long	3679013266,3679013266
+.long	168166924,168166924
+.long	1814307912,1814307912
+.long	3831258296,3831258296
+.long	1573044895,1573044895
+.long	1859376061,1859376061
+.long	4021070915,4021070915
+.long	2791465668,2791465668
+.long	2828112185,2828112185
+.long	2761266481,2761266481
+.long	937747667,937747667
+.long	2339994098,2339994098
+.long	854058965,854058965
+.long	1137232011,1137232011
+.long	1496790894,1496790894
+.long	3077402074,3077402074
+.long	2358086913,2358086913
+.long	1691735473,1691735473
+.long	3528347292,3528347292
+.long	3769215305,3769215305
+.long	3027004632,3027004632
+.long	4199962284,4199962284
+.long	133494003,133494003
+.long	636152527,636152527
+.long	2942657994,2942657994
+.long	2390391540,2390391540
+.long	3920539207,3920539207
+.long	403179536,403179536
+.long	3585784431,3585784431
+.long	2289596656,2289596656
+.long	1864705354,1864705354
+.long	1915629148,1915629148
+.long	605822008,605822008
+.long	4054230615,4054230615
+.long	3350508659,3350508659
+.long	1371981463,1371981463
+.long	602466507,602466507
+.long	2094914977,2094914977
+.long	2624877800,2624877800
+.long	555687742,555687742
+.long	3712699286,3712699286
+.long	3703422305,3703422305
+.long	2257292045,2257292045
+.long	2240449039,2240449039
+.long	2423288032,2423288032
+.long	1111375484,1111375484
+.long	3300242801,3300242801
+.long	2858837708,2858837708
+.long	3628615824,3628615824
+.long	84083462,84083462
+.long	32962295,32962295
+.long	302911004,302911004
+.long	2741068226,2741068226
+.long	1597322602,1597322602
+.long	4183250862,4183250862
+.long	3501832553,3501832553
+.long	2441512471,2441512471
+.long	1489093017,1489093017
+.long	656219450,656219450
+.long	3114180135,3114180135
+.long	954327513,954327513
+.long	335083755,335083755
+.long	3013122091,3013122091
+.long	856756514,856756514
+.long	3144247762,3144247762
+.long	1893325225,1893325225
+.long	2307821063,2307821063
+.long	2811532339,2811532339
+.long	3063651117,3063651117
+.long	572399164,572399164
+.long	2458355477,2458355477
+.long	552200649,552200649
+.long	1238290055,1238290055
+.long	4283782570,4283782570
+.long	2015897680,2015897680
+.long	2061492133,2061492133
+.long	2408352771,2408352771
+.long	4171342169,4171342169
+.long	2156497161,2156497161
+.long	386731290,386731290
+.long	3669999461,3669999461
+.long	837215959,837215959
+.long	3326231172,3326231172
+.long	3093850320,3093850320
+.long	3275833730,3275833730
+.long	2962856233,2962856233
+.long	1999449434,1999449434
+.long	286199582,286199582
+.long	3417354363,3417354363
+.long	4233385128,4233385128
+.long	3602627437,3602627437
+.long	974525996,974525996
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.byte	99,124,119,123,242,107,111,197
+.byte	48,1,103,43,254,215,171,118
+.byte	202,130,201,125,250,89,71,240
+.byte	173,212,162,175,156,164,114,192
+.byte	183,253,147,38,54,63,247,204
+.byte	52,165,229,241,113,216,49,21
+.byte	4,199,35,195,24,150,5,154
+.byte	7,18,128,226,235,39,178,117
+.byte	9,131,44,26,27,110,90,160
+.byte	82,59,214,179,41,227,47,132
+.byte	83,209,0,237,32,252,177,91
+.byte	106,203,190,57,74,76,88,207
+.byte	208,239,170,251,67,77,51,133
+.byte	69,249,2,127,80,60,159,168
+.byte	81,163,64,143,146,157,56,245
+.byte	188,182,218,33,16,255,243,210
+.byte	205,12,19,236,95,151,68,23
+.byte	196,167,126,61,100,93,25,115
+.byte	96,129,79,220,34,42,144,136
+.byte	70,238,184,20,222,94,11,219
+.byte	224,50,58,10,73,6,36,92
+.byte	194,211,172,98,145,149,228,121
+.byte	231,200,55,109,141,213,78,169
+.byte	108,86,244,234,101,122,174,8
+.byte	186,120,37,46,28,166,180,198
+.byte	232,221,116,31,75,189,139,138
+.byte	112,62,181,102,72,3,246,14
+.byte	97,53,87,185,134,193,29,158
+.byte	225,248,152,17,105,217,142,148
+.byte	155,30,135,233,206,85,40,223
+.byte	140,161,137,13,191,230,66,104
+.byte	65,153,45,15,176,84,187,22
+.long	1,2,4,8
+.long	16,32,64,128
+.long	27,54,0,0
+.long	0,0,0,0
+.globl	_asm_AES_encrypt
+.private_extern	_asm_AES_encrypt
+.align	4
+_asm_AES_encrypt:
+L_asm_AES_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	28(%esp),%edi
+	movl	%esp,%eax
+	subl	$36,%esp
+	andl	$-64,%esp
+	leal	-127(%edi),%ebx
+	subl	%esp,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esp
+	addl	$4,%esp
+	movl	%eax,28(%esp)
+	call	L004pic_point
+L004pic_point:
+	popl	%ebp
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L004pic_point(%ebp),%eax
+	leal	LAES_Te-L004pic_point(%ebp),%ebp
+	leal	764(%esp),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	btl	$25,(%eax)
+	jnc	L005x86
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	call	__sse_AES_encrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	4,0x90
+L005x86:
+	movl	%ebp,24(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	call	__x86_AES_encrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.private_extern	__x86_AES_decrypt_compact
+.align	4
+__x86_AES_decrypt_compact:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+.align	4,0x90
+L006loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	shrl	$24,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%eax
+	subl	%edi,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%esi,%eax
+	movl	$2155905152,%edi
+	andl	%eax,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%eax,%eax,1),%ebx
+	subl	%edi,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%ecx,%eax
+	xorl	%esi,%ebx
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%ecx,%ebx
+	roll	$8,%ecx
+	xorl	%esi,%ebp
+	xorl	%eax,%ecx
+	xorl	%ebp,%eax
+	xorl	%ebx,%ecx
+	xorl	%ebp,%ebx
+	roll	$24,%eax
+	xorl	%ebp,%ecx
+	roll	$16,%ebx
+	xorl	%eax,%ecx
+	roll	$8,%ebp
+	xorl	%ebx,%ecx
+	movl	4(%esp),%eax
+	xorl	%ebp,%ecx
+	movl	%ecx,12(%esp)
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebx
+	subl	%edi,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%esi,%ebx
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%edx,%ebx
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%edx,%ecx
+	roll	$8,%edx
+	xorl	%esi,%ebp
+	xorl	%ebx,%edx
+	xorl	%ebp,%ebx
+	xorl	%ecx,%edx
+	xorl	%ebp,%ecx
+	roll	$24,%ebx
+	xorl	%ebp,%edx
+	roll	$16,%ecx
+	xorl	%ebx,%edx
+	roll	$8,%ebp
+	xorl	%ecx,%edx
+	movl	8(%esp),%ebx
+	xorl	%ebp,%edx
+	movl	%edx,16(%esp)
+	movl	$2155905152,%edi
+	andl	%eax,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%eax,%eax,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%edx
+	subl	%edi,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%eax,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%eax,%edx
+	roll	$8,%eax
+	xorl	%esi,%ebp
+	xorl	%ecx,%eax
+	xorl	%ebp,%ecx
+	xorl	%edx,%eax
+	xorl	%ebp,%edx
+	roll	$24,%ecx
+	xorl	%ebp,%eax
+	roll	$16,%edx
+	xorl	%ecx,%eax
+	roll	$8,%ebp
+	xorl	%edx,%eax
+	xorl	%ebp,%eax
+	movl	$2155905152,%edi
+	andl	%ebx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ebx,%ebx,1),%ecx
+	subl	%edi,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%edi
+	andl	%ecx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%ecx,%ecx,1),%edx
+	subl	%edi,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%ebx,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%edi
+	andl	%edx,%edi
+	movl	%edi,%esi
+	shrl	$7,%edi
+	leal	(%edx,%edx,1),%ebp
+	subl	%edi,%esi
+	andl	$4278124286,%ebp
+	andl	$454761243,%esi
+	xorl	%ebx,%edx
+	roll	$8,%ebx
+	xorl	%esi,%ebp
+	xorl	%ecx,%ebx
+	xorl	%ebp,%ecx
+	xorl	%edx,%ebx
+	xorl	%ebp,%edx
+	roll	$24,%ecx
+	xorl	%ebp,%ebx
+	roll	$16,%edx
+	xorl	%ecx,%ebx
+	roll	$8,%ebp
+	xorl	%edx,%ebx
+	movl	12(%esp),%ecx
+	xorl	%ebp,%ebx
+	movl	16(%esp),%edx
+	movl	20(%esp),%edi
+	movl	28(%esp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	L006loop
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	-128(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	-128(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	-128(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	-128(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	movzbl	-128(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	xorl	16(%edi),%eax
+	xorl	20(%edi),%ebx
+	xorl	24(%edi),%ecx
+	xorl	28(%edi),%edx
+	ret
+.private_extern	__sse_AES_decrypt_compact
+.align	4
+__sse_AES_decrypt_compact:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+	movl	$454761243,%eax
+	movl	%eax,8(%esp)
+	movl	%eax,12(%esp)
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+.align	4,0x90
+L007loop:
+	pshufw	$12,%mm0,%mm1
+	pshufw	$9,%mm4,%mm5
+	movd	%mm1,%eax
+	movd	%mm5,%ebx
+	movl	%edi,20(%esp)
+	movzbl	%al,%esi
+	movzbl	%ah,%edx
+	pshufw	$6,%mm0,%mm2
+	movzbl	-128(%ebp,%esi,1),%ecx
+	movzbl	%bl,%edi
+	movzbl	-128(%ebp,%edx,1),%edx
+	shrl	$16,%eax
+	shll	$8,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$16,%esi
+	pshufw	$3,%mm4,%mm6
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$24,%esi
+	shrl	$16,%ebx
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shll	$24,%esi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$8,%esi
+	movd	%mm2,%eax
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	shll	$16,%esi
+	movd	%mm6,%ebx
+	movd	%ecx,%mm0
+	movzbl	-128(%ebp,%edi,1),%ecx
+	movzbl	%al,%edi
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bl,%edi
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%ah,%edi
+	shll	$16,%esi
+	shrl	$16,%eax
+	orl	%esi,%edx
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%bh,%edi
+	shrl	$16,%ebx
+	shll	$8,%esi
+	movd	%edx,%mm1
+	movzbl	-128(%ebp,%edi,1),%edx
+	movzbl	%bh,%edi
+	shll	$24,%edx
+	andl	$255,%ebx
+	orl	%esi,%edx
+	punpckldq	%mm1,%mm0
+	movzbl	-128(%ebp,%edi,1),%esi
+	movzbl	%al,%edi
+	shll	$8,%esi
+	movzbl	%ah,%eax
+	movzbl	-128(%ebp,%ebx,1),%ebx
+	orl	%esi,%ecx
+	movzbl	-128(%ebp,%edi,1),%esi
+	orl	%ebx,%edx
+	shll	$16,%esi
+	movzbl	-128(%ebp,%eax,1),%eax
+	orl	%esi,%edx
+	shll	$24,%eax
+	orl	%eax,%ecx
+	movl	20(%esp),%edi
+	movd	%edx,%mm4
+	movd	%ecx,%mm5
+	punpckldq	%mm5,%mm4
+	addl	$16,%edi
+	cmpl	24(%esp),%edi
+	ja	L008out
+	movq	%mm0,%mm3
+	movq	%mm4,%mm7
+	pshufw	$228,%mm0,%mm2
+	pshufw	$228,%mm4,%mm6
+	movq	%mm0,%mm1
+	movq	%mm4,%mm5
+	pshufw	$177,%mm0,%mm0
+	pshufw	$177,%mm4,%mm4
+	pslld	$8,%mm2
+	pslld	$8,%mm6
+	psrld	$8,%mm3
+	psrld	$8,%mm7
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pslld	$16,%mm2
+	pslld	$16,%mm6
+	psrld	$16,%mm3
+	psrld	$16,%mm7
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movq	8(%esp),%mm3
+	pxor	%mm2,%mm2
+	pxor	%mm6,%mm6
+	pcmpgtb	%mm1,%mm2
+	pcmpgtb	%mm5,%mm6
+	pand	%mm3,%mm2
+	pand	%mm3,%mm6
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm2,%mm1
+	pxor	%mm6,%mm5
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	movq	%mm1,%mm2
+	movq	%mm5,%mm6
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pslld	$24,%mm3
+	pslld	$24,%mm7
+	psrld	$8,%mm2
+	psrld	$8,%mm6
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	movq	8(%esp),%mm2
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	pcmpgtb	%mm1,%mm3
+	pcmpgtb	%mm5,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm3,%mm1
+	pxor	%mm7,%mm5
+	pshufw	$177,%mm1,%mm3
+	pshufw	$177,%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm3,%mm3
+	pxor	%mm7,%mm7
+	pcmpgtb	%mm1,%mm3
+	pcmpgtb	%mm5,%mm7
+	pand	%mm2,%mm3
+	pand	%mm2,%mm7
+	paddb	%mm1,%mm1
+	paddb	%mm5,%mm5
+	pxor	%mm3,%mm1
+	pxor	%mm7,%mm5
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movq	%mm1,%mm3
+	movq	%mm5,%mm7
+	pshufw	$177,%mm1,%mm2
+	pshufw	$177,%mm5,%mm6
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	pslld	$8,%mm1
+	pslld	$8,%mm5
+	psrld	$8,%mm3
+	psrld	$8,%mm7
+	movq	(%edi),%mm2
+	movq	8(%edi),%mm6
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	movl	-128(%ebp),%eax
+	pslld	$16,%mm1
+	pslld	$16,%mm5
+	movl	-64(%ebp),%ebx
+	psrld	$16,%mm3
+	psrld	$16,%mm7
+	movl	(%ebp),%ecx
+	pxor	%mm1,%mm0
+	pxor	%mm5,%mm4
+	movl	64(%ebp),%edx
+	pxor	%mm3,%mm0
+	pxor	%mm7,%mm4
+	pxor	%mm2,%mm0
+	pxor	%mm6,%mm4
+	jmp	L007loop
+.align	4,0x90
+L008out:
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	ret
+.private_extern	__x86_AES_decrypt
+.align	4
+__x86_AES_decrypt:
+	movl	%edi,20(%esp)
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,24(%esp)
+.align	4,0x90
+L009loop:
+	movl	%eax,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%dh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%ah,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movl	(%ebp,%esi,8),%esi
+	movzbl	%bh,%edi
+	xorl	3(%ebp,%edi,8),%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	xorl	2(%ebp,%edi,8),%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	xorl	1(%ebp,%edi,8),%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movl	(%ebp,%edx,8),%edx
+	movzbl	%ch,%ecx
+	xorl	3(%ebp,%ecx,8),%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	xorl	2(%ebp,%ebx,8),%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	xorl	1(%ebp,%eax,8),%edx
+	movl	4(%esp),%eax
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	cmpl	24(%esp),%edi
+	movl	%edi,20(%esp)
+	jb	L009loop
+	leal	2176(%ebp),%ebp
+	movl	-128(%ebp),%edi
+	movl	-96(%ebp),%esi
+	movl	-64(%ebp),%edi
+	movl	-32(%ebp),%esi
+	movl	(%ebp),%edi
+	movl	32(%ebp),%esi
+	movl	64(%ebp),%edi
+	movl	96(%ebp),%esi
+	leal	-128(%ebp),%ebp
+	movl	%eax,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%dh,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ebx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,4(%esp)
+	movl	%ebx,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%ah,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%ecx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	%esi,8(%esp)
+	movl	%ecx,%esi
+	andl	$255,%esi
+	movzbl	(%ebp,%esi,1),%esi
+	movzbl	%bh,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$8,%edi
+	xorl	%edi,%esi
+	movl	%eax,%edi
+	shrl	$16,%edi
+	andl	$255,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$16,%edi
+	xorl	%edi,%esi
+	movl	%edx,%edi
+	shrl	$24,%edi
+	movzbl	(%ebp,%edi,1),%edi
+	shll	$24,%edi
+	xorl	%edi,%esi
+	movl	20(%esp),%edi
+	andl	$255,%edx
+	movzbl	(%ebp,%edx,1),%edx
+	movzbl	%ch,%ecx
+	movzbl	(%ebp,%ecx,1),%ecx
+	shll	$8,%ecx
+	xorl	%ecx,%edx
+	movl	%esi,%ecx
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	movzbl	(%ebp,%ebx,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%edx
+	movl	8(%esp),%ebx
+	shrl	$24,%eax
+	movzbl	(%ebp,%eax,1),%eax
+	shll	$24,%eax
+	xorl	%eax,%edx
+	movl	4(%esp),%eax
+	leal	-2048(%ebp),%ebp
+	addl	$16,%edi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	ret
+.align	6,0x90
+LAES_Td:
+.long	1353184337,1353184337
+.long	1399144830,1399144830
+.long	3282310938,3282310938
+.long	2522752826,2522752826
+.long	3412831035,3412831035
+.long	4047871263,4047871263
+.long	2874735276,2874735276
+.long	2466505547,2466505547
+.long	1442459680,1442459680
+.long	4134368941,4134368941
+.long	2440481928,2440481928
+.long	625738485,625738485
+.long	4242007375,4242007375
+.long	3620416197,3620416197
+.long	2151953702,2151953702
+.long	2409849525,2409849525
+.long	1230680542,1230680542
+.long	1729870373,1729870373
+.long	2551114309,2551114309
+.long	3787521629,3787521629
+.long	41234371,41234371
+.long	317738113,317738113
+.long	2744600205,2744600205
+.long	3338261355,3338261355
+.long	3881799427,3881799427
+.long	2510066197,2510066197
+.long	3950669247,3950669247
+.long	3663286933,3663286933
+.long	763608788,763608788
+.long	3542185048,3542185048
+.long	694804553,694804553
+.long	1154009486,1154009486
+.long	1787413109,1787413109
+.long	2021232372,2021232372
+.long	1799248025,1799248025
+.long	3715217703,3715217703
+.long	3058688446,3058688446
+.long	397248752,397248752
+.long	1722556617,1722556617
+.long	3023752829,3023752829
+.long	407560035,407560035
+.long	2184256229,2184256229
+.long	1613975959,1613975959
+.long	1165972322,1165972322
+.long	3765920945,3765920945
+.long	2226023355,2226023355
+.long	480281086,480281086
+.long	2485848313,2485848313
+.long	1483229296,1483229296
+.long	436028815,436028815
+.long	2272059028,2272059028
+.long	3086515026,3086515026
+.long	601060267,601060267
+.long	3791801202,3791801202
+.long	1468997603,1468997603
+.long	715871590,715871590
+.long	120122290,120122290
+.long	63092015,63092015
+.long	2591802758,2591802758
+.long	2768779219,2768779219
+.long	4068943920,4068943920
+.long	2997206819,2997206819
+.long	3127509762,3127509762
+.long	1552029421,1552029421
+.long	723308426,723308426
+.long	2461301159,2461301159
+.long	4042393587,4042393587
+.long	2715969870,2715969870
+.long	3455375973,3455375973
+.long	3586000134,3586000134
+.long	526529745,526529745
+.long	2331944644,2331944644
+.long	2639474228,2639474228
+.long	2689987490,2689987490
+.long	853641733,853641733
+.long	1978398372,1978398372
+.long	971801355,971801355
+.long	2867814464,2867814464
+.long	111112542,111112542
+.long	1360031421,1360031421
+.long	4186579262,4186579262
+.long	1023860118,1023860118
+.long	2919579357,2919579357
+.long	1186850381,1186850381
+.long	3045938321,3045938321
+.long	90031217,90031217
+.long	1876166148,1876166148
+.long	4279586912,4279586912
+.long	620468249,620468249
+.long	2548678102,2548678102
+.long	3426959497,3426959497
+.long	2006899047,2006899047
+.long	3175278768,3175278768
+.long	2290845959,2290845959
+.long	945494503,945494503
+.long	3689859193,3689859193
+.long	1191869601,1191869601
+.long	3910091388,3910091388
+.long	3374220536,3374220536
+.long	0,0
+.long	2206629897,2206629897
+.long	1223502642,1223502642
+.long	2893025566,2893025566
+.long	1316117100,1316117100
+.long	4227796733,4227796733
+.long	1446544655,1446544655
+.long	517320253,517320253
+.long	658058550,658058550
+.long	1691946762,1691946762
+.long	564550760,564550760
+.long	3511966619,3511966619
+.long	976107044,976107044
+.long	2976320012,2976320012
+.long	266819475,266819475
+.long	3533106868,3533106868
+.long	2660342555,2660342555
+.long	1338359936,1338359936
+.long	2720062561,2720062561
+.long	1766553434,1766553434
+.long	370807324,370807324
+.long	179999714,179999714
+.long	3844776128,3844776128
+.long	1138762300,1138762300
+.long	488053522,488053522
+.long	185403662,185403662
+.long	2915535858,2915535858
+.long	3114841645,3114841645
+.long	3366526484,3366526484
+.long	2233069911,2233069911
+.long	1275557295,1275557295
+.long	3151862254,3151862254
+.long	4250959779,4250959779
+.long	2670068215,2670068215
+.long	3170202204,3170202204
+.long	3309004356,3309004356
+.long	880737115,880737115
+.long	1982415755,1982415755
+.long	3703972811,3703972811
+.long	1761406390,1761406390
+.long	1676797112,1676797112
+.long	3403428311,3403428311
+.long	277177154,277177154
+.long	1076008723,1076008723
+.long	538035844,538035844
+.long	2099530373,2099530373
+.long	4164795346,4164795346
+.long	288553390,288553390
+.long	1839278535,1839278535
+.long	1261411869,1261411869
+.long	4080055004,4080055004
+.long	3964831245,3964831245
+.long	3504587127,3504587127
+.long	1813426987,1813426987
+.long	2579067049,2579067049
+.long	4199060497,4199060497
+.long	577038663,577038663
+.long	3297574056,3297574056
+.long	440397984,440397984
+.long	3626794326,3626794326
+.long	4019204898,4019204898
+.long	3343796615,3343796615
+.long	3251714265,3251714265
+.long	4272081548,4272081548
+.long	906744984,906744984
+.long	3481400742,3481400742
+.long	685669029,685669029
+.long	646887386,646887386
+.long	2764025151,2764025151
+.long	3835509292,3835509292
+.long	227702864,227702864
+.long	2613862250,2613862250
+.long	1648787028,1648787028
+.long	3256061430,3256061430
+.long	3904428176,3904428176
+.long	1593260334,1593260334
+.long	4121936770,4121936770
+.long	3196083615,3196083615
+.long	2090061929,2090061929
+.long	2838353263,2838353263
+.long	3004310991,3004310991
+.long	999926984,999926984
+.long	2809993232,2809993232
+.long	1852021992,1852021992
+.long	2075868123,2075868123
+.long	158869197,158869197
+.long	4095236462,4095236462
+.long	28809964,28809964
+.long	2828685187,2828685187
+.long	1701746150,1701746150
+.long	2129067946,2129067946
+.long	147831841,147831841
+.long	3873969647,3873969647
+.long	3650873274,3650873274
+.long	3459673930,3459673930
+.long	3557400554,3557400554
+.long	3598495785,3598495785
+.long	2947720241,2947720241
+.long	824393514,824393514
+.long	815048134,815048134
+.long	3227951669,3227951669
+.long	935087732,935087732
+.long	2798289660,2798289660
+.long	2966458592,2966458592
+.long	366520115,366520115
+.long	1251476721,1251476721
+.long	4158319681,4158319681
+.long	240176511,240176511
+.long	804688151,804688151
+.long	2379631990,2379631990
+.long	1303441219,1303441219
+.long	1414376140,1414376140
+.long	3741619940,3741619940
+.long	3820343710,3820343710
+.long	461924940,461924940
+.long	3089050817,3089050817
+.long	2136040774,2136040774
+.long	82468509,82468509
+.long	1563790337,1563790337
+.long	1937016826,1937016826
+.long	776014843,776014843
+.long	1511876531,1511876531
+.long	1389550482,1389550482
+.long	861278441,861278441
+.long	323475053,323475053
+.long	2355222426,2355222426
+.long	2047648055,2047648055
+.long	2383738969,2383738969
+.long	2302415851,2302415851
+.long	3995576782,3995576782
+.long	902390199,902390199
+.long	3991215329,3991215329
+.long	1018251130,1018251130
+.long	1507840668,1507840668
+.long	1064563285,1064563285
+.long	2043548696,2043548696
+.long	3208103795,3208103795
+.long	3939366739,3939366739
+.long	1537932639,1537932639
+.long	342834655,342834655
+.long	2262516856,2262516856
+.long	2180231114,2180231114
+.long	1053059257,1053059257
+.long	741614648,741614648
+.long	1598071746,1598071746
+.long	1925389590,1925389590
+.long	203809468,203809468
+.long	2336832552,2336832552
+.long	1100287487,1100287487
+.long	1895934009,1895934009
+.long	3736275976,3736275976
+.long	2632234200,2632234200
+.long	2428589668,2428589668
+.long	1636092795,1636092795
+.long	1890988757,1890988757
+.long	1952214088,1952214088
+.long	1113045200,1113045200
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.byte	82,9,106,213,48,54,165,56
+.byte	191,64,163,158,129,243,215,251
+.byte	124,227,57,130,155,47,255,135
+.byte	52,142,67,68,196,222,233,203
+.byte	84,123,148,50,166,194,35,61
+.byte	238,76,149,11,66,250,195,78
+.byte	8,46,161,102,40,217,36,178
+.byte	118,91,162,73,109,139,209,37
+.byte	114,248,246,100,134,104,152,22
+.byte	212,164,92,204,93,101,182,146
+.byte	108,112,72,80,253,237,185,218
+.byte	94,21,70,87,167,141,157,132
+.byte	144,216,171,0,140,188,211,10
+.byte	247,228,88,5,184,179,69,6
+.byte	208,44,30,143,202,63,15,2
+.byte	193,175,189,3,1,19,138,107
+.byte	58,145,17,65,79,103,220,234
+.byte	151,242,207,206,240,180,230,115
+.byte	150,172,116,34,231,173,53,133
+.byte	226,249,55,232,28,117,223,110
+.byte	71,241,26,113,29,41,197,137
+.byte	111,183,98,14,170,24,190,27
+.byte	252,86,62,75,198,210,121,32
+.byte	154,219,192,254,120,205,90,244
+.byte	31,221,168,51,136,7,199,49
+.byte	177,18,16,89,39,128,236,95
+.byte	96,81,127,169,25,181,74,13
+.byte	45,229,122,159,147,201,156,239
+.byte	160,224,59,77,174,42,245,176
+.byte	200,235,187,60,131,83,153,97
+.byte	23,43,4,126,186,119,214,38
+.byte	225,105,20,99,85,33,12,125
+.globl	_asm_AES_decrypt
+.private_extern	_asm_AES_decrypt
+.align	4
+_asm_AES_decrypt:
+L_asm_AES_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	28(%esp),%edi
+	movl	%esp,%eax
+	subl	$36,%esp
+	andl	$-64,%esp
+	leal	-127(%edi),%ebx
+	subl	%esp,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esp
+	addl	$4,%esp
+	movl	%eax,28(%esp)
+	call	L010pic_point
+L010pic_point:
+	popl	%ebp
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L010pic_point(%ebp),%eax
+	leal	LAES_Td-L010pic_point(%ebp),%ebp
+	leal	764(%esp),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	btl	$25,(%eax)
+	jnc	L011x86
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	call	__sse_AES_decrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	4,0x90
+L011x86:
+	movl	%ebp,24(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	call	__x86_AES_decrypt_compact
+	movl	28(%esp),%esp
+	movl	24(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_asm_AES_cbc_encrypt
+.private_extern	_asm_AES_cbc_encrypt
+.align	4
+_asm_AES_cbc_encrypt:
+L_asm_AES_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	28(%esp),%ecx
+	cmpl	$0,%ecx
+	je	L012drop_out
+	call	L013pic_point
+L013pic_point:
+	popl	%ebp
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L013pic_point(%ebp),%eax
+	cmpl	$0,40(%esp)
+	leal	LAES_Te-L013pic_point(%ebp),%ebp
+	jne	L014picked_te
+	leal	LAES_Td-LAES_Te(%ebp),%ebp
+L014picked_te:
+	pushfl
+	cld
+	cmpl	$512,%ecx
+	jb	L015slow_way
+	testl	$15,%ecx
+	jnz	L015slow_way
+	btl	$28,(%eax)
+	jc	L015slow_way
+	leal	-324(%esp),%esi
+	andl	$-64,%esi
+	movl	%ebp,%eax
+	leal	2304(%ebp),%ebx
+	movl	%esi,%edx
+	andl	$4095,%eax
+	andl	$4095,%ebx
+	andl	$4095,%edx
+	cmpl	%ebx,%edx
+	jb	L016tbl_break_out
+	subl	%ebx,%edx
+	subl	%edx,%esi
+	jmp	L017tbl_ok
+.align	2,0x90
+L016tbl_break_out:
+	subl	%eax,%edx
+	andl	$4095,%edx
+	addl	$384,%edx
+	subl	%edx,%esi
+.align	2,0x90
+L017tbl_ok:
+	leal	24(%esp),%edx
+	xchgl	%esi,%esp
+	addl	$4,%esp
+	movl	%ebp,24(%esp)
+	movl	%esi,28(%esp)
+	movl	(%edx),%eax
+	movl	4(%edx),%ebx
+	movl	12(%edx),%edi
+	movl	16(%edx),%esi
+	movl	20(%edx),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edi,44(%esp)
+	movl	%esi,48(%esp)
+	movl	$0,316(%esp)
+	movl	%edi,%ebx
+	movl	$61,%ecx
+	subl	%ebp,%ebx
+	movl	%edi,%esi
+	andl	$4095,%ebx
+	leal	76(%esp),%edi
+	cmpl	$2304,%ebx
+	jb	L018do_copy
+	cmpl	$3852,%ebx
+	jb	L019skip_copy
+.align	2,0x90
+L018do_copy:
+	movl	%edi,44(%esp)
+.long	2784229001
+L019skip_copy:
+	movl	$16,%edi
+.align	2,0x90
+L020prefetch_tbl:
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%esi
+	leal	128(%ebp),%ebp
+	subl	$1,%edi
+	jnz	L020prefetch_tbl
+	subl	$2048,%ebp
+	movl	32(%esp),%esi
+	movl	48(%esp),%edi
+	cmpl	$0,%edx
+	je	L021fast_decrypt
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+.align	4,0x90
+L022fast_enc_loop:
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	xorl	(%esi),%eax
+	xorl	4(%esi),%ebx
+	xorl	8(%esi),%ecx
+	xorl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	__x86_AES_encrypt
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	leal	16(%esi),%esi
+	movl	40(%esp),%ecx
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	L022fast_enc_loop
+	movl	48(%esp),%esi
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	cmpl	$0,316(%esp)
+	movl	44(%esp),%edi
+	je	L023skip_ezero
+	movl	$60,%ecx
+	xorl	%eax,%eax
+.align	2,0x90
+.long	2884892297
+L023skip_ezero:
+	movl	28(%esp),%esp
+	popfl
+L012drop_out:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L021fast_decrypt:
+	cmpl	36(%esp),%esi
+	je	L024fast_dec_in_place
+	movl	%edi,52(%esp)
+.align	2,0x90
+.align	4,0x90
+L025fast_dec_loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	__x86_AES_decrypt
+	movl	52(%esp),%edi
+	movl	40(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	36(%esp),%edi
+	movl	32(%esp),%esi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	movl	%esi,52(%esp)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edi
+	movl	%edi,36(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	L025fast_dec_loop
+	movl	52(%esp),%edi
+	movl	48(%esp),%esi
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	jmp	L026fast_dec_out
+.align	4,0x90
+L024fast_dec_in_place:
+L027fast_dec_in_place_loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	leal	60(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	44(%esp),%edi
+	call	__x86_AES_decrypt
+	movl	48(%esp),%edi
+	movl	36(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	leal	16(%esi),%esi
+	movl	%esi,36(%esp)
+	leal	60(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	32(%esp),%esi
+	movl	40(%esp),%ecx
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	subl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jnz	L027fast_dec_in_place_loop
+.align	2,0x90
+L026fast_dec_out:
+	cmpl	$0,316(%esp)
+	movl	44(%esp),%edi
+	je	L028skip_dzero
+	movl	$60,%ecx
+	xorl	%eax,%eax
+.align	2,0x90
+.long	2884892297
+L028skip_dzero:
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L015slow_way:
+	movl	(%eax),%eax
+	movl	36(%esp),%edi
+	leal	-80(%esp),%esi
+	andl	$-64,%esi
+	leal	-143(%edi),%ebx
+	subl	%esi,%ebx
+	negl	%ebx
+	andl	$960,%ebx
+	subl	%ebx,%esi
+	leal	768(%esi),%ebx
+	subl	%ebp,%ebx
+	andl	$768,%ebx
+	leal	2176(%ebp,%ebx,1),%ebp
+	leal	24(%esp),%edx
+	xchgl	%esi,%esp
+	addl	$4,%esp
+	movl	%ebp,24(%esp)
+	movl	%esi,28(%esp)
+	movl	%eax,52(%esp)
+	movl	(%edx),%eax
+	movl	4(%edx),%ebx
+	movl	16(%edx),%esi
+	movl	20(%edx),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edi,44(%esp)
+	movl	%esi,48(%esp)
+	movl	%esi,%edi
+	movl	%eax,%esi
+	cmpl	$0,%edx
+	je	L029slow_decrypt
+	cmpl	$16,%ecx
+	movl	%ebx,%edx
+	jb	L030slow_enc_tail
+	btl	$25,52(%esp)
+	jnc	L031slow_enc_x86
+	movq	(%edi),%mm0
+	movq	8(%edi),%mm4
+.align	4,0x90
+L032slow_enc_loop_sse:
+	pxor	(%esi),%mm0
+	pxor	8(%esi),%mm4
+	movl	44(%esp),%edi
+	call	__sse_AES_encrypt_compact
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	40(%esp),%ecx
+	movq	%mm0,(%edi)
+	movq	%mm4,8(%edi)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	cmpl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jae	L032slow_enc_loop_sse
+	testl	$15,%ecx
+	jnz	L030slow_enc_tail
+	movl	48(%esp),%esi
+	movq	%mm0,(%esi)
+	movq	%mm4,8(%esi)
+	emms
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L031slow_enc_x86:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+.align	2,0x90
+L033slow_enc_loop_x86:
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	xorl	(%esi),%eax
+	xorl	4(%esi),%ebx
+	xorl	8(%esi),%ecx
+	xorl	12(%esi),%edx
+	movl	44(%esp),%edi
+	call	__x86_AES_encrypt_compact
+	movl	32(%esp),%esi
+	movl	36(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	leal	16(%edi),%edx
+	movl	%edx,36(%esp)
+	subl	$16,%ecx
+	cmpl	$16,%ecx
+	movl	%ecx,40(%esp)
+	jae	L033slow_enc_loop_x86
+	testl	$15,%ecx
+	jnz	L030slow_enc_tail
+	movl	48(%esp),%esi
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L030slow_enc_tail:
+	emms
+	movl	%edx,%edi
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	cmpl	%esi,%edi
+	je	L034enc_in_place
+.align	2,0x90
+.long	2767451785
+	jmp	L035enc_skip_in_place
+L034enc_in_place:
+	leal	(%edi,%ecx,1),%edi
+L035enc_skip_in_place:
+	movl	%ebx,%ecx
+	xorl	%eax,%eax
+.align	2,0x90
+.long	2868115081
+	movl	48(%esp),%edi
+	movl	%edx,%esi
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	$16,40(%esp)
+	jmp	L033slow_enc_loop_x86
+.align	4,0x90
+L029slow_decrypt:
+	btl	$25,52(%esp)
+	jnc	L036slow_dec_loop_x86
+.align	2,0x90
+L037slow_dec_loop_sse:
+	movq	(%esi),%mm0
+	movq	8(%esi),%mm4
+	movl	44(%esp),%edi
+	call	__sse_AES_decrypt_compact
+	movl	32(%esp),%esi
+	leal	60(%esp),%eax
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	48(%esp),%edi
+	movq	(%esi),%mm1
+	movq	8(%esi),%mm5
+	pxor	(%edi),%mm0
+	pxor	8(%edi),%mm4
+	movq	%mm1,(%edi)
+	movq	%mm5,8(%edi)
+	subl	$16,%ecx
+	jc	L038slow_dec_partial_sse
+	movq	%mm0,(%ebx)
+	movq	%mm4,8(%ebx)
+	leal	16(%ebx),%ebx
+	movl	%ebx,36(%esp)
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	movl	%ecx,40(%esp)
+	jnz	L037slow_dec_loop_sse
+	emms
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L038slow_dec_partial_sse:
+	movq	%mm0,(%eax)
+	movq	%mm4,8(%eax)
+	emms
+	addl	$16,%ecx
+	movl	%ebx,%edi
+	movl	%eax,%esi
+.align	2,0x90
+.long	2767451785
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L036slow_dec_loop_x86:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	leal	60(%esp),%edi
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	44(%esp),%edi
+	call	__x86_AES_decrypt_compact
+	movl	48(%esp),%edi
+	movl	40(%esp),%esi
+	xorl	(%edi),%eax
+	xorl	4(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	12(%edi),%edx
+	subl	$16,%esi
+	jc	L039slow_dec_partial_x86
+	movl	%esi,40(%esp)
+	movl	36(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	leal	16(%esi),%esi
+	movl	%esi,36(%esp)
+	leal	60(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	32(%esp),%esi
+	leal	16(%esi),%esi
+	movl	%esi,32(%esp)
+	jnz	L036slow_dec_loop_x86
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+	pushfl
+.align	4,0x90
+L039slow_dec_partial_x86:
+	leal	60(%esp),%esi
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	32(%esp),%esi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	40(%esp),%ecx
+	movl	36(%esp),%edi
+	leal	60(%esp),%esi
+.align	2,0x90
+.long	2767451785
+	movl	28(%esp),%esp
+	popfl
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.private_extern	__x86_AES_set_encrypt_key
+.align	4
+__x86_AES_set_encrypt_key:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	24(%esp),%esi
+	movl	32(%esp),%edi
+	testl	$-1,%esi
+	jz	L040badpointer
+	testl	$-1,%edi
+	jz	L040badpointer
+	call	L041pic_point
+L041pic_point:
+	popl	%ebp
+	leal	LAES_Te-L041pic_point(%ebp),%ebp
+	leal	2176(%ebp),%ebp
+	movl	-128(%ebp),%eax
+	movl	-96(%ebp),%ebx
+	movl	-64(%ebp),%ecx
+	movl	-32(%ebp),%edx
+	movl	(%ebp),%eax
+	movl	32(%ebp),%ebx
+	movl	64(%ebp),%ecx
+	movl	96(%ebp),%edx
+	movl	28(%esp),%ecx
+	cmpl	$128,%ecx
+	je	L04210rounds
+	cmpl	$192,%ecx
+	je	L04312rounds
+	cmpl	$256,%ecx
+	je	L04414rounds
+	movl	$-2,%eax
+	jmp	L045exit
+L04210rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	xorl	%ecx,%ecx
+	jmp	L04610shortcut
+.align	2,0x90
+L04710loop:
+	movl	(%edi),%eax
+	movl	12(%edi),%edx
+L04610shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,16(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,20(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,24(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,28(%edi)
+	incl	%ecx
+	addl	$16,%edi
+	cmpl	$10,%ecx
+	jl	L04710loop
+	movl	$10,80(%edi)
+	xorl	%eax,%eax
+	jmp	L045exit
+L04312rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	16(%esi),%ecx
+	movl	20(%esi),%edx
+	movl	%ecx,16(%edi)
+	movl	%edx,20(%edi)
+	xorl	%ecx,%ecx
+	jmp	L04812shortcut
+.align	2,0x90
+L04912loop:
+	movl	(%edi),%eax
+	movl	20(%edi),%edx
+L04812shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,24(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,28(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,32(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,36(%edi)
+	cmpl	$7,%ecx
+	je	L05012break
+	incl	%ecx
+	xorl	16(%edi),%eax
+	movl	%eax,40(%edi)
+	xorl	20(%edi),%eax
+	movl	%eax,44(%edi)
+	addl	$24,%edi
+	jmp	L04912loop
+L05012break:
+	movl	$12,72(%edi)
+	xorl	%eax,%eax
+	jmp	L045exit
+L04414rounds:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,12(%edi)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	movl	%eax,16(%edi)
+	movl	%ebx,20(%edi)
+	movl	%ecx,24(%edi)
+	movl	%edx,28(%edi)
+	xorl	%ecx,%ecx
+	jmp	L05114shortcut
+.align	2,0x90
+L05214loop:
+	movl	28(%edi),%edx
+L05114shortcut:
+	movl	(%edi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	xorl	896(%ebp,%ecx,4),%eax
+	movl	%eax,32(%edi)
+	xorl	4(%edi),%eax
+	movl	%eax,36(%edi)
+	xorl	8(%edi),%eax
+	movl	%eax,40(%edi)
+	xorl	12(%edi),%eax
+	movl	%eax,44(%edi)
+	cmpl	$6,%ecx
+	je	L05314break
+	incl	%ecx
+	movl	%eax,%edx
+	movl	16(%edi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shrl	$16,%edx
+	shll	$8,%ebx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+	movzbl	-128(%ebp,%esi,1),%ebx
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+	movl	%eax,48(%edi)
+	xorl	20(%edi),%eax
+	movl	%eax,52(%edi)
+	xorl	24(%edi),%eax
+	movl	%eax,56(%edi)
+	xorl	28(%edi),%eax
+	movl	%eax,60(%edi)
+	addl	$32,%edi
+	jmp	L05214loop
+L05314break:
+	movl	$14,48(%edi)
+	xorl	%eax,%eax
+	jmp	L045exit
+L040badpointer:
+	movl	$-1,%eax
+L045exit:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_asm_AES_set_encrypt_key
+.private_extern	_asm_AES_set_encrypt_key
+.align	4
+_asm_AES_set_encrypt_key:
+L_asm_AES_set_encrypt_key_begin:
+	call	__x86_AES_set_encrypt_key
+	ret
+.globl	_asm_AES_set_decrypt_key
+.private_extern	_asm_AES_set_decrypt_key
+.align	4
+_asm_AES_set_decrypt_key:
+L_asm_AES_set_decrypt_key_begin:
+	call	__x86_AES_set_encrypt_key
+	cmpl	$0,%eax
+	je	L054proceed
+	ret
+L054proceed:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	28(%esp),%esi
+	movl	240(%esi),%ecx
+	leal	(,%ecx,4),%ecx
+	leal	(%esi,%ecx,4),%edi
+.align	2,0x90
+L055invert:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	(%edi),%ecx
+	movl	4(%edi),%edx
+	movl	%eax,(%edi)
+	movl	%ebx,4(%edi)
+	movl	%ecx,(%esi)
+	movl	%edx,4(%esi)
+	movl	8(%esi),%eax
+	movl	12(%esi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	%eax,8(%edi)
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	addl	$16,%esi
+	subl	$16,%edi
+	cmpl	%edi,%esi
+	jne	L055invert
+	movl	28(%esp),%edi
+	movl	240(%edi),%esi
+	leal	-2(%esi,%esi,1),%esi
+	leal	(%edi,%esi,8),%esi
+	movl	%esi,28(%esp)
+	movl	16(%edi),%eax
+.align	2,0x90
+L056permute:
+	addl	$16,%edi
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%esi,%ebx
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%eax,%ebx
+	xorl	%esi,%ecx
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%eax,%ecx
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	roll	$8,%eax
+	xorl	%esi,%edx
+	movl	4(%edi),%ebp
+	xorl	%ebx,%eax
+	xorl	%edx,%ebx
+	xorl	%ecx,%eax
+	roll	$24,%ebx
+	xorl	%edx,%ecx
+	xorl	%edx,%eax
+	roll	$16,%ecx
+	xorl	%ebx,%eax
+	roll	$8,%edx
+	xorl	%ecx,%eax
+	movl	%ebp,%ebx
+	xorl	%edx,%eax
+	movl	%eax,(%edi)
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	xorl	%esi,%ecx
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%ebx,%ecx
+	xorl	%esi,%edx
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%ebx,%edx
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	roll	$8,%ebx
+	xorl	%esi,%eax
+	movl	8(%edi),%ebp
+	xorl	%ecx,%ebx
+	xorl	%eax,%ecx
+	xorl	%edx,%ebx
+	roll	$24,%ecx
+	xorl	%eax,%edx
+	xorl	%eax,%ebx
+	roll	$16,%edx
+	xorl	%ecx,%ebx
+	roll	$8,%eax
+	xorl	%edx,%ebx
+	movl	%ebp,%ecx
+	xorl	%eax,%ebx
+	movl	%ebx,4(%edi)
+	movl	$2155905152,%ebp
+	andl	%ecx,%ebp
+	leal	(%ecx,%ecx,1),%edx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%edx
+	andl	$454761243,%esi
+	xorl	%esi,%edx
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%ecx,%edx
+	xorl	%esi,%eax
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%ecx,%eax
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	roll	$8,%ecx
+	xorl	%esi,%ebx
+	movl	12(%edi),%ebp
+	xorl	%edx,%ecx
+	xorl	%ebx,%edx
+	xorl	%eax,%ecx
+	roll	$24,%edx
+	xorl	%ebx,%eax
+	xorl	%ebx,%ecx
+	roll	$16,%eax
+	xorl	%edx,%ecx
+	roll	$8,%ebx
+	xorl	%eax,%ecx
+	movl	%ebp,%edx
+	xorl	%ebx,%ecx
+	movl	%ecx,8(%edi)
+	movl	$2155905152,%ebp
+	andl	%edx,%ebp
+	leal	(%edx,%edx,1),%eax
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%eax
+	andl	$454761243,%esi
+	xorl	%esi,%eax
+	movl	$2155905152,%ebp
+	andl	%eax,%ebp
+	leal	(%eax,%eax,1),%ebx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	subl	%ebp,%esi
+	andl	$4278124286,%ebx
+	andl	$454761243,%esi
+	xorl	%edx,%eax
+	xorl	%esi,%ebx
+	movl	$2155905152,%ebp
+	andl	%ebx,%ebp
+	leal	(%ebx,%ebx,1),%ecx
+	movl	%ebp,%esi
+	shrl	$7,%ebp
+	xorl	%edx,%ebx
+	subl	%ebp,%esi
+	andl	$4278124286,%ecx
+	andl	$454761243,%esi
+	roll	$8,%edx
+	xorl	%esi,%ecx
+	movl	16(%edi),%ebp
+	xorl	%eax,%edx
+	xorl	%ecx,%eax
+	xorl	%ebx,%edx
+	roll	$24,%eax
+	xorl	%ecx,%ebx
+	xorl	%ecx,%edx
+	roll	$16,%ebx
+	xorl	%eax,%edx
+	roll	$8,%ecx
+	xorl	%ebx,%edx
+	movl	%ebp,%eax
+	xorl	%ecx,%edx
+	movl	%edx,12(%edi)
+	cmpl	28(%esp),%edi
+	jb	L056permute
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.byte	65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89
+.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S b/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S
new file mode 100644
index 0000000..07719ba
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/aes/aesni-x86.S
@@ -0,0 +1,2433 @@
+#if defined(__i386__)
+.file	"src/crypto/aes/asm/aesni-x86.S"
+.text
+.globl	_aesni_encrypt
+.private_extern	_aesni_encrypt
+.align	4
+_aesni_encrypt:
+L_aesni_encrypt_begin:
+	movl	4(%esp),%eax
+	movl	12(%esp),%edx
+	movups	(%eax),%xmm2
+	movl	240(%edx),%ecx
+	movl	8(%esp),%eax
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L000enc1_loop_1:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L000enc1_loop_1
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%eax)
+	pxor	%xmm2,%xmm2
+	ret
+.globl	_aesni_decrypt
+.private_extern	_aesni_decrypt
+.align	4
+_aesni_decrypt:
+L_aesni_decrypt_begin:
+	movl	4(%esp),%eax
+	movl	12(%esp),%edx
+	movups	(%eax),%xmm2
+	movl	240(%edx),%ecx
+	movl	8(%esp),%eax
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L001dec1_loop_2:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L001dec1_loop_2
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%eax)
+	pxor	%xmm2,%xmm2
+	ret
+.private_extern	__aesni_encrypt2
+.align	4
+__aesni_encrypt2:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+L002enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L002enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	ret
+.private_extern	__aesni_decrypt2
+.align	4
+__aesni_decrypt2:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+L003dec2_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L003dec2_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+	ret
+.private_extern	__aesni_encrypt3
+.align	4
+__aesni_encrypt3:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+L004enc3_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L004enc3_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+	ret
+.private_extern	__aesni_decrypt3
+.align	4
+__aesni_decrypt3:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+	addl	$16,%ecx
+L005dec3_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L005dec3_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+	ret
+.private_extern	__aesni_encrypt4
+.align	4
+__aesni_encrypt4:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	shll	$4,%ecx
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	15,31,64,0
+	addl	$16,%ecx
+L006enc4_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L006enc4_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+	ret
+.private_extern	__aesni_decrypt4
+.align	4
+__aesni_decrypt4:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	shll	$4,%ecx
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	movups	32(%edx),%xmm0
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	15,31,64,0
+	addl	$16,%ecx
+L007dec4_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L007dec4_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+	ret
+.private_extern	__aesni_encrypt6
+.align	4
+__aesni_encrypt6:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,220,217
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	102,15,56,220,225
+	pxor	%xmm0,%xmm7
+	movups	(%edx,%ecx,1),%xmm0
+	addl	$16,%ecx
+	jmp	L008_aesni_encrypt6_inner
+.align	4,0x90
+L009enc6_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+L008_aesni_encrypt6_inner:
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+L_aesni_encrypt6_enter:
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L009enc6_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+	ret
+.private_extern	__aesni_decrypt6
+.align	4
+__aesni_decrypt6:
+	movups	(%edx),%xmm0
+	shll	$4,%ecx
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,222,217
+	leal	32(%edx,%ecx,1),%edx
+	negl	%ecx
+.byte	102,15,56,222,225
+	pxor	%xmm0,%xmm7
+	movups	(%edx,%ecx,1),%xmm0
+	addl	$16,%ecx
+	jmp	L010_aesni_decrypt6_inner
+.align	4,0x90
+L011dec6_loop:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+L010_aesni_decrypt6_inner:
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+L_aesni_decrypt6_enter:
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L011dec6_loop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+	ret
+.globl	_aesni_ecb_encrypt
+.private_extern	_aesni_ecb_encrypt
+.align	4
+_aesni_ecb_encrypt:
+L_aesni_ecb_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	andl	$-16,%eax
+	jz	L012ecb_ret
+	movl	240(%edx),%ecx
+	testl	%ebx,%ebx
+	jz	L013ecb_decrypt
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	cmpl	$96,%eax
+	jb	L014ecb_enc_tail
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+	subl	$96,%eax
+	jmp	L015ecb_enc_loop6_enter
+.align	4,0x90
+L016ecb_enc_loop6:
+	movups	%xmm2,(%edi)
+	movdqu	(%esi),%xmm2
+	movups	%xmm3,16(%edi)
+	movdqu	16(%esi),%xmm3
+	movups	%xmm4,32(%edi)
+	movdqu	32(%esi),%xmm4
+	movups	%xmm5,48(%edi)
+	movdqu	48(%esi),%xmm5
+	movups	%xmm6,64(%edi)
+	movdqu	64(%esi),%xmm6
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+L015ecb_enc_loop6_enter:
+	call	__aesni_encrypt6
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	subl	$96,%eax
+	jnc	L016ecb_enc_loop6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	addl	$96,%eax
+	jz	L012ecb_ret
+L014ecb_enc_tail:
+	movups	(%esi),%xmm2
+	cmpl	$32,%eax
+	jb	L017ecb_enc_one
+	movups	16(%esi),%xmm3
+	je	L018ecb_enc_two
+	movups	32(%esi),%xmm4
+	cmpl	$64,%eax
+	jb	L019ecb_enc_three
+	movups	48(%esi),%xmm5
+	je	L020ecb_enc_four
+	movups	64(%esi),%xmm6
+	xorps	%xmm7,%xmm7
+	call	__aesni_encrypt6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L017ecb_enc_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L021enc1_loop_3:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L021enc1_loop_3
+.byte	102,15,56,221,209
+	movups	%xmm2,(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L018ecb_enc_two:
+	call	__aesni_encrypt2
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L019ecb_enc_three:
+	call	__aesni_encrypt3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L020ecb_enc_four:
+	call	__aesni_encrypt4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L013ecb_decrypt:
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	cmpl	$96,%eax
+	jb	L022ecb_dec_tail
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+	subl	$96,%eax
+	jmp	L023ecb_dec_loop6_enter
+.align	4,0x90
+L024ecb_dec_loop6:
+	movups	%xmm2,(%edi)
+	movdqu	(%esi),%xmm2
+	movups	%xmm3,16(%edi)
+	movdqu	16(%esi),%xmm3
+	movups	%xmm4,32(%edi)
+	movdqu	32(%esi),%xmm4
+	movups	%xmm5,48(%edi)
+	movdqu	48(%esi),%xmm5
+	movups	%xmm6,64(%edi)
+	movdqu	64(%esi),%xmm6
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqu	80(%esi),%xmm7
+	leal	96(%esi),%esi
+L023ecb_dec_loop6_enter:
+	call	__aesni_decrypt6
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	subl	$96,%eax
+	jnc	L024ecb_dec_loop6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	addl	$96,%eax
+	jz	L012ecb_ret
+L022ecb_dec_tail:
+	movups	(%esi),%xmm2
+	cmpl	$32,%eax
+	jb	L025ecb_dec_one
+	movups	16(%esi),%xmm3
+	je	L026ecb_dec_two
+	movups	32(%esi),%xmm4
+	cmpl	$64,%eax
+	jb	L027ecb_dec_three
+	movups	48(%esi),%xmm5
+	je	L028ecb_dec_four
+	movups	64(%esi),%xmm6
+	xorps	%xmm7,%xmm7
+	call	__aesni_decrypt6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L025ecb_dec_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L029dec1_loop_4:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L029dec1_loop_4
+.byte	102,15,56,223,209
+	movups	%xmm2,(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L026ecb_dec_two:
+	call	__aesni_decrypt2
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L027ecb_dec_three:
+	call	__aesni_decrypt3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	L012ecb_ret
+.align	4,0x90
+L028ecb_dec_four:
+	call	__aesni_decrypt4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+L012ecb_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_ccm64_encrypt_blocks
+.private_extern	_aesni_ccm64_encrypt_blocks
+.align	4
+_aesni_ccm64_encrypt_blocks:
+L_aesni_ccm64_encrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	%esp,%ebp
+	subl	$60,%esp
+	andl	$-16,%esp
+	movl	%ebp,48(%esp)
+	movdqu	(%ebx),%xmm7
+	movdqu	(%ecx),%xmm3
+	movl	240(%edx),%ecx
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$1,%ebx
+	xorl	%ebp,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ebp,20(%esp)
+	movl	%ebp,24(%esp)
+	movl	%ebp,28(%esp)
+	shll	$4,%ecx
+	movl	$16,%ebx
+	leal	(%edx),%ebp
+	movdqa	(%esp),%xmm5
+	movdqa	%xmm7,%xmm2
+	leal	32(%edx,%ecx,1),%edx
+	subl	%ecx,%ebx
+.byte	102,15,56,0,253
+L030ccm64_enc_outer:
+	movups	(%ebp),%xmm0
+	movl	%ebx,%ecx
+	movups	(%esi),%xmm6
+	xorps	%xmm0,%xmm2
+	movups	16(%ebp),%xmm1
+	xorps	%xmm6,%xmm0
+	xorps	%xmm0,%xmm3
+	movups	32(%ebp),%xmm0
+L031ccm64_enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L031ccm64_enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	paddq	16(%esp),%xmm7
+	decl	%eax
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leal	16(%esi),%esi
+	xorps	%xmm2,%xmm6
+	movdqa	%xmm7,%xmm2
+	movups	%xmm6,(%edi)
+.byte	102,15,56,0,213
+	leal	16(%edi),%edi
+	jnz	L030ccm64_enc_outer
+	movl	48(%esp),%esp
+	movl	40(%esp),%edi
+	movups	%xmm3,(%edi)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_ccm64_decrypt_blocks
+.private_extern	_aesni_ccm64_decrypt_blocks
+.align	4
+_aesni_ccm64_decrypt_blocks:
+L_aesni_ccm64_decrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	40(%esp),%ecx
+	movl	%esp,%ebp
+	subl	$60,%esp
+	andl	$-16,%esp
+	movl	%ebp,48(%esp)
+	movdqu	(%ebx),%xmm7
+	movdqu	(%ecx),%xmm3
+	movl	240(%edx),%ecx
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$1,%ebx
+	xorl	%ebp,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ebp,20(%esp)
+	movl	%ebp,24(%esp)
+	movl	%ebp,28(%esp)
+	movdqa	(%esp),%xmm5
+	movdqa	%xmm7,%xmm2
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+.byte	102,15,56,0,253
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L032enc1_loop_5:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L032enc1_loop_5
+.byte	102,15,56,221,209
+	shll	$4,%ebx
+	movl	$16,%ecx
+	movups	(%esi),%xmm6
+	paddq	16(%esp),%xmm7
+	leal	16(%esi),%esi
+	subl	%ebx,%ecx
+	leal	32(%ebp,%ebx,1),%edx
+	movl	%ecx,%ebx
+	jmp	L033ccm64_dec_outer
+.align	4,0x90
+L033ccm64_dec_outer:
+	xorps	%xmm2,%xmm6
+	movdqa	%xmm7,%xmm2
+	movups	%xmm6,(%edi)
+	leal	16(%edi),%edi
+.byte	102,15,56,0,213
+	subl	$1,%eax
+	jz	L034ccm64_dec_break
+	movups	(%ebp),%xmm0
+	movl	%ebx,%ecx
+	movups	16(%ebp),%xmm1
+	xorps	%xmm0,%xmm6
+	xorps	%xmm0,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	32(%ebp),%xmm0
+L035ccm64_dec2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%edx,%ecx,1),%xmm1
+	addl	$32,%ecx
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%edx,%ecx,1),%xmm0
+	jnz	L035ccm64_dec2_loop
+	movups	(%esi),%xmm6
+	paddq	16(%esp),%xmm7
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leal	16(%esi),%esi
+	jmp	L033ccm64_dec_outer
+.align	4,0x90
+L034ccm64_dec_break:
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm6
+	leal	32(%edx),%edx
+	xorps	%xmm6,%xmm3
+L036enc1_loop_6:
+.byte	102,15,56,220,217
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L036enc1_loop_6
+.byte	102,15,56,221,217
+	movl	48(%esp),%esp
+	movl	40(%esp),%edi
+	movups	%xmm3,(%edi)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_ctr32_encrypt_blocks
+.private_extern	_aesni_ctr32_encrypt_blocks
+.align	4
+_aesni_ctr32_encrypt_blocks:
+L_aesni_ctr32_encrypt_blocks_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebx
+	movl	%esp,%ebp
+	subl	$88,%esp
+	andl	$-16,%esp
+	movl	%ebp,80(%esp)
+	cmpl	$1,%eax
+	je	L037ctr32_one_shortcut
+	movdqu	(%ebx),%xmm7
+	movl	$202182159,(%esp)
+	movl	$134810123,4(%esp)
+	movl	$67438087,8(%esp)
+	movl	$66051,12(%esp)
+	movl	$6,%ecx
+	xorl	%ebp,%ebp
+	movl	%ecx,16(%esp)
+	movl	%ecx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%ebp,28(%esp)
+.byte	102,15,58,22,251,3
+.byte	102,15,58,34,253,3
+	movl	240(%edx),%ecx
+	bswap	%ebx
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movdqa	(%esp),%xmm2
+.byte	102,15,58,34,195,0
+	leal	3(%ebx),%ebp
+.byte	102,15,58,34,205,0
+	incl	%ebx
+.byte	102,15,58,34,195,1
+	incl	%ebp
+.byte	102,15,58,34,205,1
+	incl	%ebx
+.byte	102,15,58,34,195,2
+	incl	%ebp
+.byte	102,15,58,34,205,2
+	movdqa	%xmm0,48(%esp)
+.byte	102,15,56,0,194
+	movdqu	(%edx),%xmm6
+	movdqa	%xmm1,64(%esp)
+.byte	102,15,56,0,202
+	pshufd	$192,%xmm0,%xmm2
+	pshufd	$128,%xmm0,%xmm3
+	cmpl	$6,%eax
+	jb	L038ctr32_tail
+	pxor	%xmm6,%xmm7
+	shll	$4,%ecx
+	movl	$16,%ebx
+	movdqa	%xmm7,32(%esp)
+	movl	%edx,%ebp
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	subl	$6,%eax
+	jmp	L039ctr32_loop6
+.align	4,0x90
+L039ctr32_loop6:
+	pshufd	$64,%xmm0,%xmm4
+	movdqa	32(%esp),%xmm0
+	pshufd	$192,%xmm1,%xmm5
+	pxor	%xmm0,%xmm2
+	pshufd	$128,%xmm1,%xmm6
+	pxor	%xmm0,%xmm3
+	pshufd	$64,%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm6
+	pxor	%xmm0,%xmm7
+.byte	102,15,56,220,217
+	movups	32(%ebp),%xmm0
+	movl	%ebx,%ecx
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	call	L_aesni_encrypt6_enter
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	%xmm1,%xmm2
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm3
+	movups	%xmm2,(%edi)
+	movdqa	16(%esp),%xmm0
+	xorps	%xmm1,%xmm4
+	movdqa	64(%esp),%xmm1
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	paddd	%xmm0,%xmm1
+	paddd	48(%esp),%xmm0
+	movdqa	(%esp),%xmm2
+	movups	48(%esi),%xmm3
+	movups	64(%esi),%xmm4
+	xorps	%xmm3,%xmm5
+	movups	80(%esi),%xmm3
+	leal	96(%esi),%esi
+	movdqa	%xmm0,48(%esp)
+.byte	102,15,56,0,194
+	xorps	%xmm4,%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm3,%xmm7
+	movdqa	%xmm1,64(%esp)
+.byte	102,15,56,0,202
+	movups	%xmm6,64(%edi)
+	pshufd	$192,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	pshufd	$128,%xmm0,%xmm3
+	subl	$6,%eax
+	jnc	L039ctr32_loop6
+	addl	$6,%eax
+	jz	L040ctr32_ret
+	movdqu	(%ebp),%xmm7
+	movl	%ebp,%edx
+	pxor	32(%esp),%xmm7
+	movl	240(%ebp),%ecx
+L038ctr32_tail:
+	por	%xmm7,%xmm2
+	cmpl	$2,%eax
+	jb	L041ctr32_one
+	pshufd	$64,%xmm0,%xmm4
+	por	%xmm7,%xmm3
+	je	L042ctr32_two
+	pshufd	$192,%xmm1,%xmm5
+	por	%xmm7,%xmm4
+	cmpl	$4,%eax
+	jb	L043ctr32_three
+	pshufd	$128,%xmm1,%xmm6
+	por	%xmm7,%xmm5
+	je	L044ctr32_four
+	por	%xmm7,%xmm6
+	call	__aesni_encrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	%xmm1,%xmm2
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm3
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm4
+	movups	64(%esi),%xmm1
+	xorps	%xmm0,%xmm5
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	jmp	L040ctr32_ret
+.align	4,0x90
+L037ctr32_one_shortcut:
+	movups	(%ebx),%xmm2
+	movl	240(%edx),%ecx
+L041ctr32_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L045enc1_loop_7:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L045enc1_loop_7
+.byte	102,15,56,221,209
+	movups	(%esi),%xmm6
+	xorps	%xmm2,%xmm6
+	movups	%xmm6,(%edi)
+	jmp	L040ctr32_ret
+.align	4,0x90
+L042ctr32_two:
+	call	__aesni_encrypt2
+	movups	(%esi),%xmm5
+	movups	16(%esi),%xmm6
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	jmp	L040ctr32_ret
+.align	4,0x90
+L043ctr32_three:
+	call	__aesni_encrypt3
+	movups	(%esi),%xmm5
+	movups	16(%esi),%xmm6
+	xorps	%xmm5,%xmm2
+	movups	32(%esi),%xmm7
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm7,%xmm4
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	jmp	L040ctr32_ret
+.align	4,0x90
+L044ctr32_four:
+	call	__aesni_encrypt4
+	movups	(%esi),%xmm6
+	movups	16(%esi),%xmm7
+	movups	32(%esi),%xmm1
+	xorps	%xmm6,%xmm2
+	movups	48(%esi),%xmm0
+	xorps	%xmm7,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	%xmm0,%xmm5
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+L040ctr32_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movl	80(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_xts_encrypt
+.private_extern	_aesni_xts_encrypt
+.align	4
+_aesni_xts_encrypt:
+L_aesni_xts_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	36(%esp),%edx
+	movl	40(%esp),%esi
+	movl	240(%edx),%ecx
+	movups	(%esi),%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L046enc1_loop_8:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L046enc1_loop_8
+.byte	102,15,56,221,209
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	subl	$120,%esp
+	movl	240(%edx),%ecx
+	andl	$-16,%esp
+	movl	$135,96(%esp)
+	movl	$0,100(%esp)
+	movl	$1,104(%esp)
+	movl	$0,108(%esp)
+	movl	%eax,112(%esp)
+	movl	%ebp,116(%esp)
+	movdqa	%xmm2,%xmm1
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	pcmpgtd	%xmm1,%xmm0
+	andl	$-16,%eax
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	subl	$96,%eax
+	jc	L047xts_enc_short
+	shll	$4,%ecx
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	jmp	L048xts_enc_loop6
+.align	4,0x90
+L048xts_enc_loop6:
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,16(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,32(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,64(%esp)
+	paddq	%xmm1,%xmm1
+	movups	(%ebp),%xmm0
+	pand	%xmm3,%xmm7
+	movups	(%esi),%xmm2
+	pxor	%xmm1,%xmm7
+	movl	%ebx,%ecx
+	movdqu	16(%esi),%xmm3
+	xorps	%xmm0,%xmm2
+	movdqu	32(%esi),%xmm4
+	pxor	%xmm0,%xmm3
+	movdqu	48(%esi),%xmm5
+	pxor	%xmm0,%xmm4
+	movdqu	64(%esi),%xmm6
+	pxor	%xmm0,%xmm5
+	movdqu	80(%esi),%xmm1
+	pxor	%xmm0,%xmm6
+	leal	96(%esi),%esi
+	pxor	(%esp),%xmm2
+	movdqa	%xmm7,80(%esp)
+	pxor	%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	16(%esp),%xmm3
+	pxor	32(%esp),%xmm4
+.byte	102,15,56,220,209
+	pxor	48(%esp),%xmm5
+	pxor	64(%esp),%xmm6
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm7
+	movups	32(%ebp),%xmm0
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	call	L_aesni_encrypt6_enter
+	movdqa	80(%esp),%xmm1
+	pxor	%xmm0,%xmm0
+	xorps	(%esp),%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	xorps	16(%esp),%xmm3
+	movups	%xmm2,(%edi)
+	xorps	32(%esp),%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm4,32(%edi)
+	xorps	64(%esp),%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm1,%xmm7
+	movups	%xmm6,64(%edi)
+	pshufd	$19,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqa	96(%esp),%xmm3
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	subl	$96,%eax
+	jnc	L048xts_enc_loop6
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movl	%ecx,%ebx
+L047xts_enc_short:
+	addl	$96,%eax
+	jz	L049xts_enc_done6x
+	movdqa	%xmm1,%xmm5
+	cmpl	$32,%eax
+	jb	L050xts_enc_one
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	je	L051xts_enc_two
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	cmpl	$64,%eax
+	jb	L052xts_enc_three
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm7
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,(%esp)
+	movdqa	%xmm6,16(%esp)
+	je	L053xts_enc_four
+	movdqa	%xmm7,32(%esp)
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	pxor	(%esp),%xmm2
+	movdqu	48(%esi),%xmm5
+	pxor	16(%esp),%xmm3
+	movdqu	64(%esi),%xmm6
+	pxor	32(%esp),%xmm4
+	leal	80(%esi),%esi
+	pxor	48(%esp),%xmm5
+	movdqa	%xmm7,64(%esp)
+	pxor	%xmm7,%xmm6
+	call	__aesni_encrypt6
+	movaps	64(%esp),%xmm1
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	32(%esp),%xmm4
+	movups	%xmm2,(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm3,16(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	jmp	L054xts_enc_done
+.align	4,0x90
+L050xts_enc_one:
+	movups	(%esi),%xmm2
+	leal	16(%esi),%esi
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L055enc1_loop_9:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L055enc1_loop_9
+.byte	102,15,56,221,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	movdqa	%xmm5,%xmm1
+	jmp	L054xts_enc_done
+.align	4,0x90
+L051xts_enc_two:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	leal	32(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	call	__aesni_encrypt2
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	32(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	L054xts_enc_done
+.align	4,0x90
+L052xts_enc_three:
+	movaps	%xmm1,%xmm7
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	leal	48(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	call	__aesni_encrypt3
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	leal	48(%edi),%edi
+	movdqa	%xmm7,%xmm1
+	jmp	L054xts_enc_done
+.align	4,0x90
+L053xts_enc_four:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	xorps	(%esp),%xmm2
+	movups	48(%esi),%xmm5
+	leal	64(%esi),%esi
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	xorps	%xmm6,%xmm5
+	call	__aesni_encrypt4
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	xorps	%xmm6,%xmm5
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	leal	64(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	L054xts_enc_done
+.align	4,0x90
+L049xts_enc_done6x:
+	movl	112(%esp),%eax
+	andl	$15,%eax
+	jz	L056xts_enc_ret
+	movdqa	%xmm1,%xmm5
+	movl	%eax,112(%esp)
+	jmp	L057xts_enc_steal
+.align	4,0x90
+L054xts_enc_done:
+	movl	112(%esp),%eax
+	pxor	%xmm0,%xmm0
+	andl	$15,%eax
+	jz	L056xts_enc_ret
+	pcmpgtd	%xmm1,%xmm0
+	movl	%eax,112(%esp)
+	pshufd	$19,%xmm0,%xmm5
+	paddq	%xmm1,%xmm1
+	pand	96(%esp),%xmm5
+	pxor	%xmm1,%xmm5
+L057xts_enc_steal:
+	movzbl	(%esi),%ecx
+	movzbl	-16(%edi),%edx
+	leal	1(%esi),%esi
+	movb	%cl,-16(%edi)
+	movb	%dl,(%edi)
+	leal	1(%edi),%edi
+	subl	$1,%eax
+	jnz	L057xts_enc_steal
+	subl	112(%esp),%edi
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	-16(%edi),%xmm2
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L058enc1_loop_10:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L058enc1_loop_10
+.byte	102,15,56,221,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,-16(%edi)
+L056xts_enc_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movdqa	%xmm0,(%esp)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm0,16(%esp)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movdqa	%xmm0,80(%esp)
+	movl	116(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_xts_decrypt
+.private_extern	_aesni_xts_decrypt
+.align	4
+_aesni_xts_decrypt:
+L_aesni_xts_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	36(%esp),%edx
+	movl	40(%esp),%esi
+	movl	240(%edx),%ecx
+	movups	(%esi),%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L059enc1_loop_11:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L059enc1_loop_11
+.byte	102,15,56,221,209
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	subl	$120,%esp
+	andl	$-16,%esp
+	xorl	%ebx,%ebx
+	testl	$15,%eax
+	setnz	%bl
+	shll	$4,%ebx
+	subl	%ebx,%eax
+	movl	$135,96(%esp)
+	movl	$0,100(%esp)
+	movl	$1,104(%esp)
+	movl	$0,108(%esp)
+	movl	%eax,112(%esp)
+	movl	%ebp,116(%esp)
+	movl	240(%edx),%ecx
+	movl	%edx,%ebp
+	movl	%ecx,%ebx
+	movdqa	%xmm2,%xmm1
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	pcmpgtd	%xmm1,%xmm0
+	andl	$-16,%eax
+	subl	$96,%eax
+	jc	L060xts_dec_short
+	shll	$4,%ecx
+	movl	$16,%ebx
+	subl	%ecx,%ebx
+	leal	32(%edx,%ecx,1),%edx
+	jmp	L061xts_dec_loop6
+.align	4,0x90
+L061xts_dec_loop6:
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,16(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,32(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,64(%esp)
+	paddq	%xmm1,%xmm1
+	movups	(%ebp),%xmm0
+	pand	%xmm3,%xmm7
+	movups	(%esi),%xmm2
+	pxor	%xmm1,%xmm7
+	movl	%ebx,%ecx
+	movdqu	16(%esi),%xmm3
+	xorps	%xmm0,%xmm2
+	movdqu	32(%esi),%xmm4
+	pxor	%xmm0,%xmm3
+	movdqu	48(%esi),%xmm5
+	pxor	%xmm0,%xmm4
+	movdqu	64(%esi),%xmm6
+	pxor	%xmm0,%xmm5
+	movdqu	80(%esi),%xmm1
+	pxor	%xmm0,%xmm6
+	leal	96(%esi),%esi
+	pxor	(%esp),%xmm2
+	movdqa	%xmm7,80(%esp)
+	pxor	%xmm1,%xmm7
+	movups	16(%ebp),%xmm1
+	pxor	16(%esp),%xmm3
+	pxor	32(%esp),%xmm4
+.byte	102,15,56,222,209
+	pxor	48(%esp),%xmm5
+	pxor	64(%esp),%xmm6
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm7
+	movups	32(%ebp),%xmm0
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	call	L_aesni_decrypt6_enter
+	movdqa	80(%esp),%xmm1
+	pxor	%xmm0,%xmm0
+	xorps	(%esp),%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	xorps	16(%esp),%xmm3
+	movups	%xmm2,(%edi)
+	xorps	32(%esp),%xmm4
+	movups	%xmm3,16(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm4,32(%edi)
+	xorps	64(%esp),%xmm6
+	movups	%xmm5,48(%edi)
+	xorps	%xmm1,%xmm7
+	movups	%xmm6,64(%edi)
+	pshufd	$19,%xmm0,%xmm2
+	movups	%xmm7,80(%edi)
+	leal	96(%edi),%edi
+	movdqa	96(%esp),%xmm3
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	subl	$96,%eax
+	jnc	L061xts_dec_loop6
+	movl	240(%ebp),%ecx
+	movl	%ebp,%edx
+	movl	%ecx,%ebx
+L060xts_dec_short:
+	addl	$96,%eax
+	jz	L062xts_dec_done6x
+	movdqa	%xmm1,%xmm5
+	cmpl	$32,%eax
+	jb	L063xts_dec_one
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	je	L064xts_dec_two
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	cmpl	$64,%eax
+	jb	L065xts_dec_three
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	%xmm1,%xmm7
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,(%esp)
+	movdqa	%xmm6,16(%esp)
+	je	L066xts_dec_four
+	movdqa	%xmm7,32(%esp)
+	pshufd	$19,%xmm0,%xmm7
+	movdqa	%xmm1,48(%esp)
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	pxor	(%esp),%xmm2
+	movdqu	48(%esi),%xmm5
+	pxor	16(%esp),%xmm3
+	movdqu	64(%esi),%xmm6
+	pxor	32(%esp),%xmm4
+	leal	80(%esi),%esi
+	pxor	48(%esp),%xmm5
+	movdqa	%xmm7,64(%esp)
+	pxor	%xmm7,%xmm6
+	call	__aesni_decrypt6
+	movaps	64(%esp),%xmm1
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	32(%esp),%xmm4
+	movups	%xmm2,(%edi)
+	xorps	48(%esp),%xmm5
+	movups	%xmm3,16(%edi)
+	xorps	%xmm1,%xmm6
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	jmp	L067xts_dec_done
+.align	4,0x90
+L063xts_dec_one:
+	movups	(%esi),%xmm2
+	leal	16(%esi),%esi
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L068dec1_loop_12:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L068dec1_loop_12
+.byte	102,15,56,223,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	movdqa	%xmm5,%xmm1
+	jmp	L067xts_dec_done
+.align	4,0x90
+L064xts_dec_two:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	leal	32(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	call	__aesni_decrypt2
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	32(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	L067xts_dec_done
+.align	4,0x90
+L065xts_dec_three:
+	movaps	%xmm1,%xmm7
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	leal	48(%esi),%esi
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	call	__aesni_decrypt3
+	xorps	%xmm5,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	leal	48(%edi),%edi
+	movdqa	%xmm7,%xmm1
+	jmp	L067xts_dec_done
+.align	4,0x90
+L066xts_dec_four:
+	movaps	%xmm1,%xmm6
+	movups	(%esi),%xmm2
+	movups	16(%esi),%xmm3
+	movups	32(%esi),%xmm4
+	xorps	(%esp),%xmm2
+	movups	48(%esi),%xmm5
+	leal	64(%esi),%esi
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	xorps	%xmm6,%xmm5
+	call	__aesni_decrypt4
+	xorps	(%esp),%xmm2
+	xorps	16(%esp),%xmm3
+	xorps	%xmm7,%xmm4
+	movups	%xmm2,(%edi)
+	xorps	%xmm6,%xmm5
+	movups	%xmm3,16(%edi)
+	movups	%xmm4,32(%edi)
+	movups	%xmm5,48(%edi)
+	leal	64(%edi),%edi
+	movdqa	%xmm6,%xmm1
+	jmp	L067xts_dec_done
+.align	4,0x90
+L062xts_dec_done6x:
+	movl	112(%esp),%eax
+	andl	$15,%eax
+	jz	L069xts_dec_ret
+	movl	%eax,112(%esp)
+	jmp	L070xts_dec_only_one_more
+.align	4,0x90
+L067xts_dec_done:
+	movl	112(%esp),%eax
+	pxor	%xmm0,%xmm0
+	andl	$15,%eax
+	jz	L069xts_dec_ret
+	pcmpgtd	%xmm1,%xmm0
+	movl	%eax,112(%esp)
+	pshufd	$19,%xmm0,%xmm2
+	pxor	%xmm0,%xmm0
+	movdqa	96(%esp),%xmm3
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm2
+	pcmpgtd	%xmm1,%xmm0
+	pxor	%xmm2,%xmm1
+L070xts_dec_only_one_more:
+	pshufd	$19,%xmm0,%xmm5
+	movdqa	%xmm1,%xmm6
+	paddq	%xmm1,%xmm1
+	pand	%xmm3,%xmm5
+	pxor	%xmm1,%xmm5
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	(%esi),%xmm2
+	xorps	%xmm5,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L071dec1_loop_13:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L071dec1_loop_13
+.byte	102,15,56,223,209
+	xorps	%xmm5,%xmm2
+	movups	%xmm2,(%edi)
+L072xts_dec_steal:
+	movzbl	16(%esi),%ecx
+	movzbl	(%edi),%edx
+	leal	1(%esi),%esi
+	movb	%cl,(%edi)
+	movb	%dl,16(%edi)
+	leal	1(%edi),%edi
+	subl	$1,%eax
+	jnz	L072xts_dec_steal
+	subl	112(%esp),%edi
+	movl	%ebp,%edx
+	movl	%ebx,%ecx
+	movups	(%edi),%xmm2
+	xorps	%xmm6,%xmm2
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L073dec1_loop_14:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L073dec1_loop_14
+.byte	102,15,56,223,209
+	xorps	%xmm6,%xmm2
+	movups	%xmm2,(%edi)
+L069xts_dec_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movdqa	%xmm0,(%esp)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm0,16(%esp)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm0,32(%esp)
+	pxor	%xmm5,%xmm5
+	movdqa	%xmm0,48(%esp)
+	pxor	%xmm6,%xmm6
+	movdqa	%xmm0,64(%esp)
+	pxor	%xmm7,%xmm7
+	movdqa	%xmm0,80(%esp)
+	movl	116(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_cbc_encrypt
+.private_extern	_aesni_cbc_encrypt
+.align	4
+_aesni_cbc_encrypt:
+L_aesni_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	%esp,%ebx
+	movl	24(%esp),%edi
+	subl	$24,%ebx
+	movl	28(%esp),%eax
+	andl	$-16,%ebx
+	movl	32(%esp),%edx
+	movl	36(%esp),%ebp
+	testl	%eax,%eax
+	jz	L074cbc_abort
+	cmpl	$0,40(%esp)
+	xchgl	%esp,%ebx
+	movups	(%ebp),%xmm7
+	movl	240(%edx),%ecx
+	movl	%edx,%ebp
+	movl	%ebx,16(%esp)
+	movl	%ecx,%ebx
+	je	L075cbc_decrypt
+	movaps	%xmm7,%xmm2
+	cmpl	$16,%eax
+	jb	L076cbc_enc_tail
+	subl	$16,%eax
+	jmp	L077cbc_enc_loop
+.align	4,0x90
+L077cbc_enc_loop:
+	movups	(%esi),%xmm7
+	leal	16(%esi),%esi
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	xorps	%xmm0,%xmm7
+	leal	32(%edx),%edx
+	xorps	%xmm7,%xmm2
+L078enc1_loop_15:
+.byte	102,15,56,220,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L078enc1_loop_15
+.byte	102,15,56,221,209
+	movl	%ebx,%ecx
+	movl	%ebp,%edx
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+	subl	$16,%eax
+	jnc	L077cbc_enc_loop
+	addl	$16,%eax
+	jnz	L076cbc_enc_tail
+	movaps	%xmm2,%xmm7
+	pxor	%xmm2,%xmm2
+	jmp	L079cbc_ret
+L076cbc_enc_tail:
+	movl	%eax,%ecx
+.long	2767451785
+	movl	$16,%ecx
+	subl	%eax,%ecx
+	xorl	%eax,%eax
+.long	2868115081
+	leal	-16(%edi),%edi
+	movl	%ebx,%ecx
+	movl	%edi,%esi
+	movl	%ebp,%edx
+	jmp	L077cbc_enc_loop
+.align	4,0x90
+L075cbc_decrypt:
+	cmpl	$80,%eax
+	jbe	L080cbc_dec_tail
+	movaps	%xmm7,(%esp)
+	subl	$80,%eax
+	jmp	L081cbc_dec_loop6_enter
+.align	4,0x90
+L082cbc_dec_loop6:
+	movaps	%xmm0,(%esp)
+	movups	%xmm7,(%edi)
+	leal	16(%edi),%edi
+L081cbc_dec_loop6_enter:
+	movdqu	(%esi),%xmm2
+	movdqu	16(%esi),%xmm3
+	movdqu	32(%esi),%xmm4
+	movdqu	48(%esi),%xmm5
+	movdqu	64(%esi),%xmm6
+	movdqu	80(%esi),%xmm7
+	call	__aesni_decrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	(%esp),%xmm2
+	xorps	%xmm1,%xmm3
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm4
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm5
+	movups	64(%esi),%xmm1
+	xorps	%xmm0,%xmm6
+	movups	80(%esi),%xmm0
+	xorps	%xmm1,%xmm7
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	leal	96(%esi),%esi
+	movups	%xmm4,32(%edi)
+	movl	%ebx,%ecx
+	movups	%xmm5,48(%edi)
+	movl	%ebp,%edx
+	movups	%xmm6,64(%edi)
+	leal	80(%edi),%edi
+	subl	$96,%eax
+	ja	L082cbc_dec_loop6
+	movaps	%xmm7,%xmm2
+	movaps	%xmm0,%xmm7
+	addl	$80,%eax
+	jle	L083cbc_dec_clear_tail_collected
+	movups	%xmm2,(%edi)
+	leal	16(%edi),%edi
+L080cbc_dec_tail:
+	movups	(%esi),%xmm2
+	movaps	%xmm2,%xmm6
+	cmpl	$16,%eax
+	jbe	L084cbc_dec_one
+	movups	16(%esi),%xmm3
+	movaps	%xmm3,%xmm5
+	cmpl	$32,%eax
+	jbe	L085cbc_dec_two
+	movups	32(%esi),%xmm4
+	cmpl	$48,%eax
+	jbe	L086cbc_dec_three
+	movups	48(%esi),%xmm5
+	cmpl	$64,%eax
+	jbe	L087cbc_dec_four
+	movups	64(%esi),%xmm6
+	movaps	%xmm7,(%esp)
+	movups	(%esi),%xmm2
+	xorps	%xmm7,%xmm7
+	call	__aesni_decrypt6
+	movups	(%esi),%xmm1
+	movups	16(%esi),%xmm0
+	xorps	(%esp),%xmm2
+	xorps	%xmm1,%xmm3
+	movups	32(%esi),%xmm1
+	xorps	%xmm0,%xmm4
+	movups	48(%esi),%xmm0
+	xorps	%xmm1,%xmm5
+	movups	64(%esi),%xmm7
+	xorps	%xmm0,%xmm6
+	movups	%xmm2,(%edi)
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%edi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%edi)
+	pxor	%xmm5,%xmm5
+	leal	64(%edi),%edi
+	movaps	%xmm6,%xmm2
+	pxor	%xmm6,%xmm6
+	subl	$80,%eax
+	jmp	L088cbc_dec_tail_collected
+.align	4,0x90
+L084cbc_dec_one:
+	movups	(%edx),%xmm0
+	movups	16(%edx),%xmm1
+	leal	32(%edx),%edx
+	xorps	%xmm0,%xmm2
+L089dec1_loop_16:
+.byte	102,15,56,222,209
+	decl	%ecx
+	movups	(%edx),%xmm1
+	leal	16(%edx),%edx
+	jnz	L089dec1_loop_16
+.byte	102,15,56,223,209
+	xorps	%xmm7,%xmm2
+	movaps	%xmm6,%xmm7
+	subl	$16,%eax
+	jmp	L088cbc_dec_tail_collected
+.align	4,0x90
+L085cbc_dec_two:
+	call	__aesni_decrypt2
+	xorps	%xmm7,%xmm2
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	movaps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	leal	16(%edi),%edi
+	movaps	%xmm5,%xmm7
+	subl	$32,%eax
+	jmp	L088cbc_dec_tail_collected
+.align	4,0x90
+L086cbc_dec_three:
+	call	__aesni_decrypt3
+	xorps	%xmm7,%xmm2
+	xorps	%xmm6,%xmm3
+	xorps	%xmm5,%xmm4
+	movups	%xmm2,(%edi)
+	movaps	%xmm4,%xmm2
+	pxor	%xmm4,%xmm4
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	leal	32(%edi),%edi
+	movups	32(%esi),%xmm7
+	subl	$48,%eax
+	jmp	L088cbc_dec_tail_collected
+.align	4,0x90
+L087cbc_dec_four:
+	call	__aesni_decrypt4
+	movups	16(%esi),%xmm1
+	movups	32(%esi),%xmm0
+	xorps	%xmm7,%xmm2
+	movups	48(%esi),%xmm7
+	xorps	%xmm6,%xmm3
+	movups	%xmm2,(%edi)
+	xorps	%xmm1,%xmm4
+	movups	%xmm3,16(%edi)
+	pxor	%xmm3,%xmm3
+	xorps	%xmm0,%xmm5
+	movups	%xmm4,32(%edi)
+	pxor	%xmm4,%xmm4
+	leal	48(%edi),%edi
+	movaps	%xmm5,%xmm2
+	pxor	%xmm5,%xmm5
+	subl	$64,%eax
+	jmp	L088cbc_dec_tail_collected
+.align	4,0x90
+L083cbc_dec_clear_tail_collected:
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+L088cbc_dec_tail_collected:
+	andl	$15,%eax
+	jnz	L090cbc_dec_tail_partial
+	movups	%xmm2,(%edi)
+	pxor	%xmm0,%xmm0
+	jmp	L079cbc_ret
+.align	4,0x90
+L090cbc_dec_tail_partial:
+	movaps	%xmm2,(%esp)
+	pxor	%xmm0,%xmm0
+	movl	$16,%ecx
+	movl	%esp,%esi
+	subl	%eax,%ecx
+.long	2767451785
+	movdqa	%xmm2,(%esp)
+L079cbc_ret:
+	movl	16(%esp),%esp
+	movl	36(%esp),%ebp
+	pxor	%xmm2,%xmm2
+	pxor	%xmm1,%xmm1
+	movups	%xmm7,(%ebp)
+	pxor	%xmm7,%xmm7
+L074cbc_abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.private_extern	__aesni_set_encrypt_key
+.align	4
+__aesni_set_encrypt_key:
+	pushl	%ebp
+	pushl	%ebx
+	testl	%eax,%eax
+	jz	L091bad_pointer
+	testl	%edx,%edx
+	jz	L091bad_pointer
+	call	L092pic
+L092pic:
+	popl	%ebx
+	leal	Lkey_const-L092pic(%ebx),%ebx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-Lkey_const(%ebx),%ebp
+	movups	(%eax),%xmm0
+	xorps	%xmm4,%xmm4
+	movl	4(%ebp),%ebp
+	leal	16(%edx),%edx
+	andl	$268437504,%ebp
+	cmpl	$256,%ecx
+	je	L09314rounds
+	cmpl	$192,%ecx
+	je	L09412rounds
+	cmpl	$128,%ecx
+	jne	L095bad_keybits
+.align	4,0x90
+L09610rounds:
+	cmpl	$268435456,%ebp
+	je	L09710rounds_alt
+	movl	$9,%ecx
+	movups	%xmm0,-16(%edx)
+.byte	102,15,58,223,200,1
+	call	L098key_128_cold
+.byte	102,15,58,223,200,2
+	call	L099key_128
+.byte	102,15,58,223,200,4
+	call	L099key_128
+.byte	102,15,58,223,200,8
+	call	L099key_128
+.byte	102,15,58,223,200,16
+	call	L099key_128
+.byte	102,15,58,223,200,32
+	call	L099key_128
+.byte	102,15,58,223,200,64
+	call	L099key_128
+.byte	102,15,58,223,200,128
+	call	L099key_128
+.byte	102,15,58,223,200,27
+	call	L099key_128
+.byte	102,15,58,223,200,54
+	call	L099key_128
+	movups	%xmm0,(%edx)
+	movl	%ecx,80(%edx)
+	jmp	L100good_key
+.align	4,0x90
+L099key_128:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+L098key_128_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	ret
+.align	4,0x90
+L09710rounds_alt:
+	movdqa	(%ebx),%xmm5
+	movl	$8,%ecx
+	movdqa	32(%ebx),%xmm4
+	movdqa	%xmm0,%xmm2
+	movdqu	%xmm0,-16(%edx)
+L101loop_key128:
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	leal	16(%edx),%edx
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,-16(%edx)
+	movdqa	%xmm0,%xmm2
+	decl	%ecx
+	jnz	L101loop_key128
+	movdqa	48(%ebx),%xmm4
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%edx)
+	movdqa	%xmm0,%xmm2
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,16(%edx)
+	movl	$9,%ecx
+	movl	%ecx,96(%edx)
+	jmp	L100good_key
+.align	4,0x90
+L09412rounds:
+	movq	16(%eax),%xmm2
+	cmpl	$268435456,%ebp
+	je	L10212rounds_alt
+	movl	$11,%ecx
+	movups	%xmm0,-16(%edx)
+.byte	102,15,58,223,202,1
+	call	L103key_192a_cold
+.byte	102,15,58,223,202,2
+	call	L104key_192b
+.byte	102,15,58,223,202,4
+	call	L105key_192a
+.byte	102,15,58,223,202,8
+	call	L104key_192b
+.byte	102,15,58,223,202,16
+	call	L105key_192a
+.byte	102,15,58,223,202,32
+	call	L104key_192b
+.byte	102,15,58,223,202,64
+	call	L105key_192a
+.byte	102,15,58,223,202,128
+	call	L104key_192b
+	movups	%xmm0,(%edx)
+	movl	%ecx,48(%edx)
+	jmp	L100good_key
+.align	4,0x90
+L105key_192a:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+.align	4,0x90
+L103key_192a_cold:
+	movaps	%xmm2,%xmm5
+L106key_192b_warm:
+	shufps	$16,%xmm0,%xmm4
+	movdqa	%xmm2,%xmm3
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	pslldq	$4,%xmm3
+	xorps	%xmm4,%xmm0
+	pshufd	$85,%xmm1,%xmm1
+	pxor	%xmm3,%xmm2
+	pxor	%xmm1,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm3,%xmm2
+	ret
+.align	4,0x90
+L104key_192b:
+	movaps	%xmm0,%xmm3
+	shufps	$68,%xmm0,%xmm5
+	movups	%xmm5,(%edx)
+	shufps	$78,%xmm2,%xmm3
+	movups	%xmm3,16(%edx)
+	leal	32(%edx),%edx
+	jmp	L106key_192b_warm
+.align	4,0x90
+L10212rounds_alt:
+	movdqa	16(%ebx),%xmm5
+	movdqa	32(%ebx),%xmm4
+	movl	$8,%ecx
+	movdqu	%xmm0,-16(%edx)
+L107loop_key192:
+	movq	%xmm2,(%edx)
+	movdqa	%xmm2,%xmm1
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	pslld	$1,%xmm4
+	leal	24(%edx),%edx
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pxor	%xmm2,%xmm0
+	pxor	%xmm3,%xmm2
+	movdqu	%xmm0,-16(%edx)
+	decl	%ecx
+	jnz	L107loop_key192
+	movl	$11,%ecx
+	movl	%ecx,32(%edx)
+	jmp	L100good_key
+.align	4,0x90
+L09314rounds:
+	movups	16(%eax),%xmm2
+	leal	16(%edx),%edx
+	cmpl	$268435456,%ebp
+	je	L10814rounds_alt
+	movl	$13,%ecx
+	movups	%xmm0,-32(%edx)
+	movups	%xmm2,-16(%edx)
+.byte	102,15,58,223,202,1
+	call	L109key_256a_cold
+.byte	102,15,58,223,200,1
+	call	L110key_256b
+.byte	102,15,58,223,202,2
+	call	L111key_256a
+.byte	102,15,58,223,200,2
+	call	L110key_256b
+.byte	102,15,58,223,202,4
+	call	L111key_256a
+.byte	102,15,58,223,200,4
+	call	L110key_256b
+.byte	102,15,58,223,202,8
+	call	L111key_256a
+.byte	102,15,58,223,200,8
+	call	L110key_256b
+.byte	102,15,58,223,202,16
+	call	L111key_256a
+.byte	102,15,58,223,200,16
+	call	L110key_256b
+.byte	102,15,58,223,202,32
+	call	L111key_256a
+.byte	102,15,58,223,200,32
+	call	L110key_256b
+.byte	102,15,58,223,202,64
+	call	L111key_256a
+	movups	%xmm0,(%edx)
+	movl	%ecx,16(%edx)
+	xorl	%eax,%eax
+	jmp	L100good_key
+.align	4,0x90
+L111key_256a:
+	movups	%xmm2,(%edx)
+	leal	16(%edx),%edx
+L109key_256a_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	ret
+.align	4,0x90
+L110key_256b:
+	movups	%xmm0,(%edx)
+	leal	16(%edx),%edx
+	shufps	$16,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$140,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$170,%xmm1,%xmm1
+	xorps	%xmm1,%xmm2
+	ret
+.align	4,0x90
+L10814rounds_alt:
+	movdqa	(%ebx),%xmm5
+	movdqa	32(%ebx),%xmm4
+	movl	$7,%ecx
+	movdqu	%xmm0,-32(%edx)
+	movdqa	%xmm2,%xmm1
+	movdqu	%xmm2,-16(%edx)
+L112loop_key256:
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pslld	$1,%xmm4
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%edx)
+	decl	%ecx
+	jz	L113done_key256
+	pshufd	$255,%xmm0,%xmm2
+	pxor	%xmm3,%xmm3
+.byte	102,15,56,221,211
+	movdqa	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm3,%xmm1
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,16(%edx)
+	leal	32(%edx),%edx
+	movdqa	%xmm2,%xmm1
+	jmp	L112loop_key256
+L113done_key256:
+	movl	$13,%ecx
+	movl	%ecx,16(%edx)
+L100good_key:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	xorl	%eax,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	2,0x90
+L091bad_pointer:
+	movl	$-1,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	2,0x90
+L095bad_keybits:
+	pxor	%xmm0,%xmm0
+	movl	$-2,%eax
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_aesni_set_encrypt_key
+.private_extern	_aesni_set_encrypt_key
+.align	4
+_aesni_set_encrypt_key:
+L_aesni_set_encrypt_key_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	call	__aesni_set_encrypt_key
+	ret
+.globl	_aesni_set_decrypt_key
+.private_extern	_aesni_set_decrypt_key
+.align	4
+_aesni_set_decrypt_key:
+L_aesni_set_decrypt_key_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	call	__aesni_set_encrypt_key
+	movl	12(%esp),%edx
+	shll	$4,%ecx
+	testl	%eax,%eax
+	jnz	L114dec_key_ret
+	leal	16(%edx,%ecx,1),%eax
+	movups	(%edx),%xmm0
+	movups	(%eax),%xmm1
+	movups	%xmm0,(%eax)
+	movups	%xmm1,(%edx)
+	leal	16(%edx),%edx
+	leal	-16(%eax),%eax
+L115dec_key_inverse:
+	movups	(%edx),%xmm0
+	movups	(%eax),%xmm1
+.byte	102,15,56,219,192
+.byte	102,15,56,219,201
+	leal	16(%edx),%edx
+	leal	-16(%eax),%eax
+	movups	%xmm0,16(%eax)
+	movups	%xmm1,-16(%edx)
+	cmpl	%edx,%eax
+	ja	L115dec_key_inverse
+	movups	(%edx),%xmm0
+.byte	102,15,56,219,192
+	movups	%xmm0,(%edx)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	xorl	%eax,%eax
+L114dec_key_ret:
+	ret
+.align	6,0x90
+Lkey_const:
+.long	202313229,202313229,202313229,202313229
+.long	67569157,67569157,67569157,67569157
+.long	1,1,1,1
+.long	27,27,27,27
+.byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
+.byte	83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
+.byte	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+.byte	115,108,46,111,114,103,62,0
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S b/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S
new file mode 100644
index 0000000..8b85709
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/aes/vpaes-x86.S
@@ -0,0 +1,650 @@
+#if defined(__i386__)
+.file	"vpaes-x86.S"
+.text
+.align	6,0x90
+L_vpaes_consts:
+.long	218628480,235210255,168496130,67568393
+.long	252381056,17041926,33884169,51187212
+.long	252645135,252645135,252645135,252645135
+.long	1512730624,3266504856,1377990664,3401244816
+.long	830229760,1275146365,2969422977,3447763452
+.long	3411033600,2979783055,338359620,2782886510
+.long	4209124096,907596821,221174255,1006095553
+.long	191964160,3799684038,3164090317,1589111125
+.long	182528256,1777043520,2877432650,3265356744
+.long	1874708224,3503451415,3305285752,363511674
+.long	1606117888,3487855781,1093350906,2384367825
+.long	197121,67569157,134941193,202313229
+.long	67569157,134941193,202313229,197121
+.long	134941193,202313229,197121,67569157
+.long	202313229,197121,67569157,134941193
+.long	33619971,100992007,168364043,235736079
+.long	235736079,33619971,100992007,168364043
+.long	168364043,235736079,33619971,100992007
+.long	100992007,168364043,235736079,33619971
+.long	50462976,117835012,185207048,252579084
+.long	252314880,51251460,117574920,184942860
+.long	184682752,252054788,50987272,118359308
+.long	118099200,185467140,251790600,50727180
+.long	2946363062,528716217,1300004225,1881839624
+.long	1532713819,1532713819,1532713819,1532713819
+.long	3602276352,4288629033,3737020424,4153884961
+.long	1354558464,32357713,2958822624,3775749553
+.long	1201988352,132424512,1572796698,503232858
+.long	2213177600,1597421020,4103937655,675398315
+.long	2749646592,4273543773,1511898873,121693092
+.long	3040248576,1103263732,2871565598,1608280554
+.long	2236667136,2588920351,482954393,64377734
+.long	3069987328,291237287,2117370568,3650299247
+.long	533321216,3573750986,2572112006,1401264716
+.long	1339849704,2721158661,548607111,3445553514
+.long	2128193280,3054596040,2183486460,1257083700
+.long	655635200,1165381986,3923443150,2344132524
+.long	190078720,256924420,290342170,357187870
+.long	1610966272,2263057382,4103205268,309794674
+.long	2592527872,2233205587,1335446729,3402964816
+.long	3973531904,3225098121,3002836325,1918774430
+.long	3870401024,2102906079,2284471353,4117666579
+.long	617007872,1021508343,366931923,691083277
+.long	2528395776,3491914898,2968704004,1613121270
+.long	3445188352,3247741094,844474987,4093578302
+.long	651481088,1190302358,1689581232,574775300
+.long	4289380608,206939853,2555985458,2489840491
+.long	2130264064,327674451,3566485037,3349835193
+.long	2470714624,316102159,3636825756,3393945945
+.byte	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
+.byte	111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83
+.byte	83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117
+.byte	114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105
+.byte	118,101,114,115,105,116,121,41,0
+.align	6,0x90
+.private_extern	__vpaes_preheat
+.align	4
+__vpaes_preheat:
+	addl	(%esp),%ebp
+	movdqa	-48(%ebp),%xmm7
+	movdqa	-16(%ebp),%xmm6
+	ret
+.private_extern	__vpaes_encrypt_core
+.align	4
+__vpaes_encrypt_core:
+	movl	$16,%ecx
+	movl	240(%edx),%eax
+	movdqa	%xmm6,%xmm1
+	movdqa	(%ebp),%xmm2
+	pandn	%xmm0,%xmm1
+	pand	%xmm6,%xmm0
+	movdqu	(%edx),%xmm5
+.byte	102,15,56,0,208
+	movdqa	16(%ebp),%xmm0
+	pxor	%xmm5,%xmm2
+	psrld	$4,%xmm1
+	addl	$16,%edx
+.byte	102,15,56,0,193
+	leal	192(%ebp),%ebx
+	pxor	%xmm2,%xmm0
+	jmp	L000enc_entry
+.align	4,0x90
+L001enc_loop:
+	movdqa	32(%ebp),%xmm4
+	movdqa	48(%ebp),%xmm0
+.byte	102,15,56,0,226
+.byte	102,15,56,0,195
+	pxor	%xmm5,%xmm4
+	movdqa	64(%ebp),%xmm5
+	pxor	%xmm4,%xmm0
+	movdqa	-64(%ebx,%ecx,1),%xmm1
+.byte	102,15,56,0,234
+	movdqa	80(%ebp),%xmm2
+	movdqa	(%ebx,%ecx,1),%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm0,%xmm3
+	pxor	%xmm5,%xmm2
+.byte	102,15,56,0,193
+	addl	$16,%edx
+	pxor	%xmm2,%xmm0
+.byte	102,15,56,0,220
+	addl	$16,%ecx
+	pxor	%xmm0,%xmm3
+.byte	102,15,56,0,193
+	andl	$48,%ecx
+	subl	$1,%eax
+	pxor	%xmm3,%xmm0
+L000enc_entry:
+	movdqa	%xmm6,%xmm1
+	movdqa	-32(%ebp),%xmm5
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm6,%xmm0
+.byte	102,15,56,0,232
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm5,%xmm3
+.byte	102,15,56,0,224
+	movdqa	%xmm7,%xmm2
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%edx),%xmm5
+	pxor	%xmm1,%xmm3
+	jnz	L001enc_loop
+	movdqa	96(%ebp),%xmm4
+	movdqa	112(%ebp),%xmm0
+.byte	102,15,56,0,226
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,195
+	movdqa	64(%ebx,%ecx,1),%xmm1
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,193
+	ret
+.private_extern	__vpaes_decrypt_core
+.align	4
+__vpaes_decrypt_core:
+	leal	608(%ebp),%ebx
+	movl	240(%edx),%eax
+	movdqa	%xmm6,%xmm1
+	movdqa	-64(%ebx),%xmm2
+	pandn	%xmm0,%xmm1
+	movl	%eax,%ecx
+	psrld	$4,%xmm1
+	movdqu	(%edx),%xmm5
+	shll	$4,%ecx
+	pand	%xmm6,%xmm0
+.byte	102,15,56,0,208
+	movdqa	-48(%ebx),%xmm0
+	xorl	$48,%ecx
+.byte	102,15,56,0,193
+	andl	$48,%ecx
+	pxor	%xmm5,%xmm2
+	movdqa	176(%ebp),%xmm5
+	pxor	%xmm2,%xmm0
+	addl	$16,%edx
+	leal	-352(%ebx,%ecx,1),%ecx
+	jmp	L002dec_entry
+.align	4,0x90
+L003dec_loop:
+	movdqa	-32(%ebx),%xmm4
+	movdqa	-16(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	16(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	32(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	48(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	64(%ebx),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	80(%ebx),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	addl	$16,%edx
+.byte	102,15,58,15,237,12
+	pxor	%xmm1,%xmm0
+	subl	$1,%eax
+L002dec_entry:
+	movdqa	%xmm6,%xmm1
+	movdqa	-32(%ebp),%xmm2
+	pandn	%xmm0,%xmm1
+	pand	%xmm6,%xmm0
+	psrld	$4,%xmm1
+.byte	102,15,56,0,208
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm7,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%edx),%xmm0
+	pxor	%xmm1,%xmm3
+	jnz	L003dec_loop
+	movdqa	96(%ebx),%xmm4
+.byte	102,15,56,0,226
+	pxor	%xmm0,%xmm4
+	movdqa	112(%ebx),%xmm0
+	movdqa	(%ecx),%xmm2
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,194
+	ret
+.private_extern	__vpaes_schedule_core
+.align	4
+__vpaes_schedule_core:
+	addl	(%esp),%ebp
+	movdqu	(%esi),%xmm0
+	movdqa	320(%ebp),%xmm2
+	movdqa	%xmm0,%xmm3
+	leal	(%ebp),%ebx
+	movdqa	%xmm2,4(%esp)
+	call	__vpaes_schedule_transform
+	movdqa	%xmm0,%xmm7
+	testl	%edi,%edi
+	jnz	L004schedule_am_decrypting
+	movdqu	%xmm0,(%edx)
+	jmp	L005schedule_go
+L004schedule_am_decrypting:
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,217
+	movdqu	%xmm3,(%edx)
+	xorl	$48,%ecx
+L005schedule_go:
+	cmpl	$192,%eax
+	ja	L006schedule_256
+	je	L007schedule_192
+L008schedule_128:
+	movl	$10,%eax
+L009loop_schedule_128:
+	call	__vpaes_schedule_round
+	decl	%eax
+	jz	L010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	jmp	L009loop_schedule_128
+.align	4,0x90
+L007schedule_192:
+	movdqu	8(%esi),%xmm0
+	call	__vpaes_schedule_transform
+	movdqa	%xmm0,%xmm6
+	pxor	%xmm4,%xmm4
+	movhlps	%xmm4,%xmm6
+	movl	$4,%eax
+L011loop_schedule_192:
+	call	__vpaes_schedule_round
+.byte	102,15,58,15,198,8
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_192_smear
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_round
+	decl	%eax
+	jz	L010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_192_smear
+	jmp	L011loop_schedule_192
+.align	4,0x90
+L006schedule_256:
+	movdqu	16(%esi),%xmm0
+	call	__vpaes_schedule_transform
+	movl	$7,%eax
+L012loop_schedule_256:
+	call	__vpaes_schedule_mangle
+	movdqa	%xmm0,%xmm6
+	call	__vpaes_schedule_round
+	decl	%eax
+	jz	L010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	pshufd	$255,%xmm0,%xmm0
+	movdqa	%xmm7,20(%esp)
+	movdqa	%xmm6,%xmm7
+	call	L_vpaes_schedule_low_round
+	movdqa	20(%esp),%xmm7
+	jmp	L012loop_schedule_256
+.align	4,0x90
+L010schedule_mangle_last:
+	leal	384(%ebp),%ebx
+	testl	%edi,%edi
+	jnz	L013schedule_mangle_last_dec
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,193
+	leal	352(%ebp),%ebx
+	addl	$32,%edx
+L013schedule_mangle_last_dec:
+	addl	$-16,%edx
+	pxor	336(%ebp),%xmm0
+	call	__vpaes_schedule_transform
+	movdqu	%xmm0,(%edx)
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	ret
+.private_extern	__vpaes_schedule_192_smear
+.align	4
+__vpaes_schedule_192_smear:
+	pshufd	$128,%xmm6,%xmm1
+	pshufd	$254,%xmm7,%xmm0
+	pxor	%xmm1,%xmm6
+	pxor	%xmm1,%xmm1
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm6,%xmm0
+	movhlps	%xmm1,%xmm6
+	ret
+.private_extern	__vpaes_schedule_round
+.align	4
+__vpaes_schedule_round:
+	movdqa	8(%esp),%xmm2
+	pxor	%xmm1,%xmm1
+.byte	102,15,58,15,202,15
+.byte	102,15,58,15,210,15
+	pxor	%xmm1,%xmm7
+	pshufd	$255,%xmm0,%xmm0
+.byte	102,15,58,15,192,1
+	movdqa	%xmm2,8(%esp)
+L_vpaes_schedule_low_round:
+	movdqa	%xmm7,%xmm1
+	pslldq	$4,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm7,%xmm1
+	pslldq	$8,%xmm7
+	pxor	%xmm1,%xmm7
+	pxor	336(%ebp),%xmm7
+	movdqa	-16(%ebp),%xmm4
+	movdqa	-48(%ebp),%xmm5
+	movdqa	%xmm4,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm4,%xmm0
+	movdqa	-32(%ebp),%xmm2
+.byte	102,15,56,0,208
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm5,%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	movdqa	%xmm5,%xmm4
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm5,%xmm2
+.byte	102,15,56,0,211
+	pxor	%xmm0,%xmm2
+	movdqa	%xmm5,%xmm3
+.byte	102,15,56,0,220
+	pxor	%xmm1,%xmm3
+	movdqa	32(%ebp),%xmm4
+.byte	102,15,56,0,226
+	movdqa	48(%ebp),%xmm0
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+	pxor	%xmm7,%xmm0
+	movdqa	%xmm0,%xmm7
+	ret
+.private_extern	__vpaes_schedule_transform
+.align	4
+__vpaes_schedule_transform:
+	movdqa	-16(%ebp),%xmm2
+	movdqa	%xmm2,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm2,%xmm0
+	movdqa	(%ebx),%xmm2
+.byte	102,15,56,0,208
+	movdqa	16(%ebx),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm2,%xmm0
+	ret
+.private_extern	__vpaes_schedule_mangle
+.align	4
+__vpaes_schedule_mangle:
+	movdqa	%xmm0,%xmm4
+	movdqa	128(%ebp),%xmm5
+	testl	%edi,%edi
+	jnz	L014schedule_mangle_dec
+	addl	$16,%edx
+	pxor	336(%ebp),%xmm4
+.byte	102,15,56,0,229
+	movdqa	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+	jmp	L015schedule_mangle_both
+.align	4,0x90
+L014schedule_mangle_dec:
+	movdqa	-16(%ebp),%xmm2
+	leal	416(%ebp),%esi
+	movdqa	%xmm2,%xmm1
+	pandn	%xmm4,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm2,%xmm4
+	movdqa	(%esi),%xmm2
+.byte	102,15,56,0,212
+	movdqa	16(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	32(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	48(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	64(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	80(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+	movdqa	96(%esi),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	112(%esi),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	addl	$-16,%edx
+L015schedule_mangle_both:
+	movdqa	256(%ebp,%ecx,1),%xmm1
+.byte	102,15,56,0,217
+	addl	$-16,%ecx
+	andl	$48,%ecx
+	movdqu	%xmm3,(%edx)
+	ret
+.globl	_vpaes_set_encrypt_key
+.private_extern	_vpaes_set_encrypt_key
+.align	4
+_vpaes_set_encrypt_key:
+L_vpaes_set_encrypt_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%eax
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movl	%eax,%ebx
+	shrl	$5,%ebx
+	addl	$5,%ebx
+	movl	%ebx,240(%edx)
+	movl	$48,%ecx
+	movl	$0,%edi
+	leal	L_vpaes_consts+0x30-L016pic_point,%ebp
+	call	__vpaes_schedule_core
+L016pic_point:
+	movl	48(%esp),%esp
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_vpaes_set_decrypt_key
+.private_extern	_vpaes_set_decrypt_key
+.align	4
+_vpaes_set_decrypt_key:
+L_vpaes_set_decrypt_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%eax
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movl	%eax,%ebx
+	shrl	$5,%ebx
+	addl	$5,%ebx
+	movl	%ebx,240(%edx)
+	shll	$4,%ebx
+	leal	16(%edx,%ebx,1),%edx
+	movl	$1,%edi
+	movl	%eax,%ecx
+	shrl	$1,%ecx
+	andl	$32,%ecx
+	xorl	$32,%ecx
+	leal	L_vpaes_consts+0x30-L017pic_point,%ebp
+	call	__vpaes_schedule_core
+L017pic_point:
+	movl	48(%esp),%esp
+	xorl	%eax,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_vpaes_encrypt
+.private_extern	_vpaes_encrypt
+.align	4
+_vpaes_encrypt:
+L_vpaes_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	leal	L_vpaes_consts+0x30-L018pic_point,%ebp
+	call	__vpaes_preheat
+L018pic_point:
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%edi
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movdqu	(%esi),%xmm0
+	call	__vpaes_encrypt_core
+	movdqu	%xmm0,(%edi)
+	movl	48(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_vpaes_decrypt
+.private_extern	_vpaes_decrypt
+.align	4
+_vpaes_decrypt:
+L_vpaes_decrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	leal	L_vpaes_consts+0x30-L019pic_point,%ebp
+	call	__vpaes_preheat
+L019pic_point:
+	movl	20(%esp),%esi
+	leal	-56(%esp),%ebx
+	movl	24(%esp),%edi
+	andl	$-16,%ebx
+	movl	28(%esp),%edx
+	xchgl	%esp,%ebx
+	movl	%ebx,48(%esp)
+	movdqu	(%esi),%xmm0
+	call	__vpaes_decrypt_core
+	movdqu	%xmm0,(%edi)
+	movl	48(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_vpaes_cbc_encrypt
+.private_extern	_vpaes_cbc_encrypt
+.align	4
+_vpaes_cbc_encrypt:
+L_vpaes_cbc_encrypt_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	32(%esp),%edx
+	subl	$16,%eax
+	jc	L020cbc_abort
+	leal	-56(%esp),%ebx
+	movl	36(%esp),%ebp
+	andl	$-16,%ebx
+	movl	40(%esp),%ecx
+	xchgl	%esp,%ebx
+	movdqu	(%ebp),%xmm1
+	subl	%esi,%edi
+	movl	%ebx,48(%esp)
+	movl	%edi,(%esp)
+	movl	%edx,4(%esp)
+	movl	%ebp,8(%esp)
+	movl	%eax,%edi
+	leal	L_vpaes_consts+0x30-L021pic_point,%ebp
+	call	__vpaes_preheat
+L021pic_point:
+	cmpl	$0,%ecx
+	je	L022cbc_dec_loop
+	jmp	L023cbc_enc_loop
+.align	4,0x90
+L023cbc_enc_loop:
+	movdqu	(%esi),%xmm0
+	pxor	%xmm1,%xmm0
+	call	__vpaes_encrypt_core
+	movl	(%esp),%ebx
+	movl	4(%esp),%edx
+	movdqa	%xmm0,%xmm1
+	movdqu	%xmm0,(%ebx,%esi,1)
+	leal	16(%esi),%esi
+	subl	$16,%edi
+	jnc	L023cbc_enc_loop
+	jmp	L024cbc_done
+.align	4,0x90
+L022cbc_dec_loop:
+	movdqu	(%esi),%xmm0
+	movdqa	%xmm1,16(%esp)
+	movdqa	%xmm0,32(%esp)
+	call	__vpaes_decrypt_core
+	movl	(%esp),%ebx
+	movl	4(%esp),%edx
+	pxor	16(%esp),%xmm0
+	movdqa	32(%esp),%xmm1
+	movdqu	%xmm0,(%ebx,%esi,1)
+	leal	16(%esi),%esi
+	subl	$16,%edi
+	jnc	L022cbc_dec_loop
+L024cbc_done:
+	movl	8(%esp),%ebx
+	movl	48(%esp),%esp
+	movdqu	%xmm1,(%ebx)
+L020cbc_abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/bn/bn-586.S b/third_party/boringssl/mac-x86/crypto/bn/bn-586.S
new file mode 100644
index 0000000..0f0a94e
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/bn/bn-586.S
@@ -0,0 +1,1528 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/bn-586.S"
+.text
+.globl	_bn_mul_add_words
+.private_extern	_bn_mul_add_words
+.align	4
+_bn_mul_add_words:
+L_bn_mul_add_words_begin:
+	call	L000PIC_me_up
+L000PIC_me_up:
+	popl	%eax
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L000PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	L001maw_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+	movd	16(%esp),%mm0
+	pxor	%mm1,%mm1
+	jmp	L002maw_sse2_entry
+.align	4,0x90
+L003maw_sse2_unrolled:
+	movd	(%eax),%mm3
+	paddq	%mm3,%mm1
+	movd	(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	movd	4(%edx),%mm4
+	pmuludq	%mm0,%mm4
+	movd	8(%edx),%mm6
+	pmuludq	%mm0,%mm6
+	movd	12(%edx),%mm7
+	pmuludq	%mm0,%mm7
+	paddq	%mm2,%mm1
+	movd	4(%eax),%mm3
+	paddq	%mm4,%mm3
+	movd	8(%eax),%mm5
+	paddq	%mm6,%mm5
+	movd	12(%eax),%mm4
+	paddq	%mm4,%mm7
+	movd	%mm1,(%eax)
+	movd	16(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	psrlq	$32,%mm1
+	movd	20(%edx),%mm4
+	pmuludq	%mm0,%mm4
+	paddq	%mm3,%mm1
+	movd	24(%edx),%mm6
+	pmuludq	%mm0,%mm6
+	movd	%mm1,4(%eax)
+	psrlq	$32,%mm1
+	movd	28(%edx),%mm3
+	addl	$32,%edx
+	pmuludq	%mm0,%mm3
+	paddq	%mm5,%mm1
+	movd	16(%eax),%mm5
+	paddq	%mm5,%mm2
+	movd	%mm1,8(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm7,%mm1
+	movd	20(%eax),%mm5
+	paddq	%mm5,%mm4
+	movd	%mm1,12(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm2,%mm1
+	movd	24(%eax),%mm5
+	paddq	%mm5,%mm6
+	movd	%mm1,16(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm4,%mm1
+	movd	28(%eax),%mm5
+	paddq	%mm5,%mm3
+	movd	%mm1,20(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm6,%mm1
+	movd	%mm1,24(%eax)
+	psrlq	$32,%mm1
+	paddq	%mm3,%mm1
+	movd	%mm1,28(%eax)
+	leal	32(%eax),%eax
+	psrlq	$32,%mm1
+	subl	$8,%ecx
+	jz	L004maw_sse2_exit
+L002maw_sse2_entry:
+	testl	$4294967288,%ecx
+	jnz	L003maw_sse2_unrolled
+.align	2,0x90
+L005maw_sse2_loop:
+	movd	(%edx),%mm2
+	movd	(%eax),%mm3
+	pmuludq	%mm0,%mm2
+	leal	4(%edx),%edx
+	paddq	%mm3,%mm1
+	paddq	%mm2,%mm1
+	movd	%mm1,(%eax)
+	subl	$1,%ecx
+	psrlq	$32,%mm1
+	leal	4(%eax),%eax
+	jnz	L005maw_sse2_loop
+L004maw_sse2_exit:
+	movd	%mm1,%eax
+	emms
+	ret
+.align	4,0x90
+L001maw_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	xorl	%esi,%esi
+	movl	20(%esp),%edi
+	movl	28(%esp),%ecx
+	movl	24(%esp),%ebx
+	andl	$4294967288,%ecx
+	movl	32(%esp),%ebp
+	pushl	%ecx
+	jz	L006maw_finish
+.align	4,0x90
+L007maw_loop:
+	# Round 0 
+	movl	(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	# Round 4 
+	movl	4(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	4(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	# Round 8 
+	movl	8(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	8(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	# Round 12 
+	movl	12(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	12(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	# Round 16 
+	movl	16(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	16(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	# Round 20 
+	movl	20(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	20(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	# Round 24 
+	movl	24(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	24(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+	# Round 28 
+	movl	28(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	28(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,28(%edi)
+	movl	%edx,%esi
+
+	subl	$8,%ecx
+	leal	32(%ebx),%ebx
+	leal	32(%edi),%edi
+	jnz	L007maw_loop
+L006maw_finish:
+	movl	32(%esp),%ecx
+	andl	$7,%ecx
+	jnz	L008maw_finish2
+	jmp	L009maw_end
+L008maw_finish2:
+	# Tail Round 0 
+	movl	(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 1 
+	movl	4(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	4(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 2 
+	movl	8(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	8(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 3 
+	movl	12(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	12(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 4 
+	movl	16(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	16(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 5 
+	movl	20(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	20(%edi),%eax
+	adcl	$0,%edx
+	decl	%ecx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	jz	L009maw_end
+	# Tail Round 6 
+	movl	24(%ebx),%eax
+	mull	%ebp
+	addl	%esi,%eax
+	adcl	$0,%edx
+	addl	24(%edi),%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+L009maw_end:
+	movl	%esi,%eax
+	popl	%ecx
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_bn_mul_words
+.private_extern	_bn_mul_words
+.align	4
+_bn_mul_words:
+L_bn_mul_words_begin:
+	call	L010PIC_me_up
+L010PIC_me_up:
+	popl	%eax
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	L011mw_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+	movd	16(%esp),%mm0
+	pxor	%mm1,%mm1
+.align	4,0x90
+L012mw_sse2_loop:
+	movd	(%edx),%mm2
+	pmuludq	%mm0,%mm2
+	leal	4(%edx),%edx
+	paddq	%mm2,%mm1
+	movd	%mm1,(%eax)
+	subl	$1,%ecx
+	psrlq	$32,%mm1
+	leal	4(%eax),%eax
+	jnz	L012mw_sse2_loop
+	movd	%mm1,%eax
+	emms
+	ret
+.align	4,0x90
+L011mw_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	xorl	%esi,%esi
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ebp
+	movl	32(%esp),%ecx
+	andl	$4294967288,%ebp
+	jz	L013mw_finish
+L014mw_loop:
+	# Round 0 
+	movl	(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	# Round 4 
+	movl	4(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	# Round 8 
+	movl	8(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	# Round 12 
+	movl	12(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	# Round 16 
+	movl	16(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	# Round 20 
+	movl	20(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	# Round 24 
+	movl	24(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+	# Round 28 
+	movl	28(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,28(%edi)
+	movl	%edx,%esi
+
+	addl	$32,%ebx
+	addl	$32,%edi
+	subl	$8,%ebp
+	jz	L013mw_finish
+	jmp	L014mw_loop
+L013mw_finish:
+	movl	28(%esp),%ebp
+	andl	$7,%ebp
+	jnz	L015mw_finish2
+	jmp	L016mw_end
+L015mw_finish2:
+	# Tail Round 0 
+	movl	(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 1 
+	movl	4(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,4(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 2 
+	movl	8(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,8(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 3 
+	movl	12(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,12(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 4 
+	movl	16(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,16(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 5 
+	movl	20(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,20(%edi)
+	movl	%edx,%esi
+	decl	%ebp
+	jz	L016mw_end
+	# Tail Round 6 
+	movl	24(%ebx),%eax
+	mull	%ecx
+	addl	%esi,%eax
+	adcl	$0,%edx
+	movl	%eax,24(%edi)
+	movl	%edx,%esi
+L016mw_end:
+	movl	%esi,%eax
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_bn_sqr_words
+.private_extern	_bn_sqr_words
+.align	4
+_bn_sqr_words:
+L_bn_sqr_words_begin:
+	call	L017PIC_me_up
+L017PIC_me_up:
+	popl	%eax
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L017PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	L018sqr_non_sse2
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	movl	12(%esp),%ecx
+.align	4,0x90
+L019sqr_sse2_loop:
+	movd	(%edx),%mm0
+	pmuludq	%mm0,%mm0
+	leal	4(%edx),%edx
+	movq	%mm0,(%eax)
+	subl	$1,%ecx
+	leal	8(%eax),%eax
+	jnz	L019sqr_sse2_loop
+	emms
+	ret
+.align	4,0x90
+L018sqr_non_sse2:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%ebx
+	andl	$4294967288,%ebx
+	jz	L020sw_finish
+L021sw_loop:
+	# Round 0 
+	movl	(%edi),%eax
+	mull	%eax
+	movl	%eax,(%esi)
+	movl	%edx,4(%esi)
+	# Round 4 
+	movl	4(%edi),%eax
+	mull	%eax
+	movl	%eax,8(%esi)
+	movl	%edx,12(%esi)
+	# Round 8 
+	movl	8(%edi),%eax
+	mull	%eax
+	movl	%eax,16(%esi)
+	movl	%edx,20(%esi)
+	# Round 12 
+	movl	12(%edi),%eax
+	mull	%eax
+	movl	%eax,24(%esi)
+	movl	%edx,28(%esi)
+	# Round 16 
+	movl	16(%edi),%eax
+	mull	%eax
+	movl	%eax,32(%esi)
+	movl	%edx,36(%esi)
+	# Round 20 
+	movl	20(%edi),%eax
+	mull	%eax
+	movl	%eax,40(%esi)
+	movl	%edx,44(%esi)
+	# Round 24 
+	movl	24(%edi),%eax
+	mull	%eax
+	movl	%eax,48(%esi)
+	movl	%edx,52(%esi)
+	# Round 28 
+	movl	28(%edi),%eax
+	mull	%eax
+	movl	%eax,56(%esi)
+	movl	%edx,60(%esi)
+
+	addl	$32,%edi
+	addl	$64,%esi
+	subl	$8,%ebx
+	jnz	L021sw_loop
+L020sw_finish:
+	movl	28(%esp),%ebx
+	andl	$7,%ebx
+	jz	L022sw_end
+	# Tail Round 0 
+	movl	(%edi),%eax
+	mull	%eax
+	movl	%eax,(%esi)
+	decl	%ebx
+	movl	%edx,4(%esi)
+	jz	L022sw_end
+	# Tail Round 1 
+	movl	4(%edi),%eax
+	mull	%eax
+	movl	%eax,8(%esi)
+	decl	%ebx
+	movl	%edx,12(%esi)
+	jz	L022sw_end
+	# Tail Round 2 
+	movl	8(%edi),%eax
+	mull	%eax
+	movl	%eax,16(%esi)
+	decl	%ebx
+	movl	%edx,20(%esi)
+	jz	L022sw_end
+	# Tail Round 3 
+	movl	12(%edi),%eax
+	mull	%eax
+	movl	%eax,24(%esi)
+	decl	%ebx
+	movl	%edx,28(%esi)
+	jz	L022sw_end
+	# Tail Round 4 
+	movl	16(%edi),%eax
+	mull	%eax
+	movl	%eax,32(%esi)
+	decl	%ebx
+	movl	%edx,36(%esi)
+	jz	L022sw_end
+	# Tail Round 5 
+	movl	20(%edi),%eax
+	mull	%eax
+	movl	%eax,40(%esi)
+	decl	%ebx
+	movl	%edx,44(%esi)
+	jz	L022sw_end
+	# Tail Round 6 
+	movl	24(%edi),%eax
+	mull	%eax
+	movl	%eax,48(%esi)
+	movl	%edx,52(%esi)
+L022sw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_bn_div_words
+.private_extern	_bn_div_words
+.align	4
+_bn_div_words:
+L_bn_div_words_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%eax
+	movl	12(%esp),%ecx
+	divl	%ecx
+	ret
+.globl	_bn_add_words
+.private_extern	_bn_add_words
+.align	4
+_bn_add_words:
+L_bn_add_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	L023aw_finish
+L024aw_loop:
+	# Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	# Round 1 
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+	# Round 2 
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+	# Round 3 
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+	# Round 4 
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+	# Round 5 
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+	# Round 6 
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	# Round 7 
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L024aw_loop
+L023aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	L025aw_end
+	# Tail Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	L025aw_end
+	# Tail Round 1 
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	L025aw_end
+	# Tail Round 2 
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	L025aw_end
+	# Tail Round 3 
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	L025aw_end
+	# Tail Round 4 
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	L025aw_end
+	# Tail Round 5 
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	L025aw_end
+	# Tail Round 6 
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	addl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	addl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+L025aw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_bn_sub_words
+.private_extern	_bn_sub_words
+.align	4
+_bn_sub_words:
+L_bn_sub_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	L026aw_finish
+L027aw_loop:
+	# Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	# Round 1 
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+	# Round 2 
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+	# Round 3 
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+	# Round 4 
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+	# Round 5 
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+	# Round 6 
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	# Round 7 
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L027aw_loop
+L026aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	L028aw_end
+	# Tail Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	L028aw_end
+	# Tail Round 1 
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	L028aw_end
+	# Tail Round 2 
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	L028aw_end
+	# Tail Round 3 
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	L028aw_end
+	# Tail Round 4 
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	L028aw_end
+	# Tail Round 5 
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	L028aw_end
+	# Tail Round 6 
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+L028aw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_bn_sub_part_words
+.private_extern	_bn_sub_part_words
+.align	4
+_bn_sub_part_words:
+L_bn_sub_part_words_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+
+	movl	20(%esp),%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%edi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	andl	$4294967288,%ebp
+	jz	L029aw_finish
+L030aw_loop:
+	# Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	# Round 1 
+	movl	4(%esi),%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+	# Round 2 
+	movl	8(%esi),%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+	# Round 3 
+	movl	12(%esi),%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+	# Round 4 
+	movl	16(%esi),%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+	# Round 5 
+	movl	20(%esi),%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+	# Round 6 
+	movl	24(%esi),%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	# Round 7 
+	movl	28(%esi),%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%esi
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L030aw_loop
+L029aw_finish:
+	movl	32(%esp),%ebp
+	andl	$7,%ebp
+	jz	L031aw_end
+	# Tail Round 0 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 1 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 2 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 3 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 4 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 5 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+	decl	%ebp
+	jz	L031aw_end
+	# Tail Round 6 
+	movl	(%esi),%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	addl	$4,%esi
+	addl	$4,%edi
+	addl	$4,%ebx
+L031aw_end:
+	cmpl	$0,36(%esp)
+	je	L032pw_end
+	movl	36(%esp),%ebp
+	cmpl	$0,%ebp
+	je	L032pw_end
+	jge	L033pw_pos
+	# pw_neg 
+	movl	$0,%edx
+	subl	%ebp,%edx
+	movl	%edx,%ebp
+	andl	$4294967288,%ebp
+	jz	L034pw_neg_finish
+L035pw_neg_loop:
+	# dl<0 Round 0 
+	movl	$0,%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,(%ebx)
+	# dl<0 Round 1 
+	movl	$0,%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,4(%ebx)
+	# dl<0 Round 2 
+	movl	$0,%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,8(%ebx)
+	# dl<0 Round 3 
+	movl	$0,%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,12(%ebx)
+	# dl<0 Round 4 
+	movl	$0,%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,16(%ebx)
+	# dl<0 Round 5 
+	movl	$0,%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,20(%ebx)
+	# dl<0 Round 6 
+	movl	$0,%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	# dl<0 Round 7 
+	movl	$0,%ecx
+	movl	28(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,28(%ebx)
+
+	addl	$32,%edi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L035pw_neg_loop
+L034pw_neg_finish:
+	movl	36(%esp),%edx
+	movl	$0,%ebp
+	subl	%edx,%ebp
+	andl	$7,%ebp
+	jz	L032pw_end
+	# dl<0 Tail Round 0 
+	movl	$0,%ecx
+	movl	(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 1 
+	movl	$0,%ecx
+	movl	4(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,4(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 2 
+	movl	$0,%ecx
+	movl	8(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,8(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 3 
+	movl	$0,%ecx
+	movl	12(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,12(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 4 
+	movl	$0,%ecx
+	movl	16(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,16(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 5 
+	movl	$0,%ecx
+	movl	20(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	decl	%ebp
+	movl	%ecx,20(%ebx)
+	jz	L032pw_end
+	# dl<0 Tail Round 6 
+	movl	$0,%ecx
+	movl	24(%edi),%edx
+	subl	%eax,%ecx
+	movl	$0,%eax
+	adcl	%eax,%eax
+	subl	%edx,%ecx
+	adcl	$0,%eax
+	movl	%ecx,24(%ebx)
+	jmp	L032pw_end
+L033pw_pos:
+	andl	$4294967288,%ebp
+	jz	L036pw_pos_finish
+L037pw_pos_loop:
+	# dl>0 Round 0 
+	movl	(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,(%ebx)
+	jnc	L038pw_nc0
+	# dl>0 Round 1 
+	movl	4(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,4(%ebx)
+	jnc	L039pw_nc1
+	# dl>0 Round 2 
+	movl	8(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,8(%ebx)
+	jnc	L040pw_nc2
+	# dl>0 Round 3 
+	movl	12(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,12(%ebx)
+	jnc	L041pw_nc3
+	# dl>0 Round 4 
+	movl	16(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,16(%ebx)
+	jnc	L042pw_nc4
+	# dl>0 Round 5 
+	movl	20(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,20(%ebx)
+	jnc	L043pw_nc5
+	# dl>0 Round 6 
+	movl	24(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,24(%ebx)
+	jnc	L044pw_nc6
+	# dl>0 Round 7 
+	movl	28(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,28(%ebx)
+	jnc	L045pw_nc7
+
+	addl	$32,%esi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L037pw_pos_loop
+L036pw_pos_finish:
+	movl	36(%esp),%ebp
+	andl	$7,%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 0 
+	movl	(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,(%ebx)
+	jnc	L046pw_tail_nc0
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 1 
+	movl	4(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,4(%ebx)
+	jnc	L047pw_tail_nc1
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 2 
+	movl	8(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,8(%ebx)
+	jnc	L048pw_tail_nc2
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 3 
+	movl	12(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,12(%ebx)
+	jnc	L049pw_tail_nc3
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 4 
+	movl	16(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,16(%ebx)
+	jnc	L050pw_tail_nc4
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 5 
+	movl	20(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,20(%ebx)
+	jnc	L051pw_tail_nc5
+	decl	%ebp
+	jz	L032pw_end
+	# dl>0 Tail Round 6 
+	movl	24(%esi),%ecx
+	subl	%eax,%ecx
+	movl	%ecx,24(%ebx)
+	jnc	L052pw_tail_nc6
+	movl	$1,%eax
+	jmp	L032pw_end
+L053pw_nc_loop:
+	movl	(%esi),%ecx
+	movl	%ecx,(%ebx)
+L038pw_nc0:
+	movl	4(%esi),%ecx
+	movl	%ecx,4(%ebx)
+L039pw_nc1:
+	movl	8(%esi),%ecx
+	movl	%ecx,8(%ebx)
+L040pw_nc2:
+	movl	12(%esi),%ecx
+	movl	%ecx,12(%ebx)
+L041pw_nc3:
+	movl	16(%esi),%ecx
+	movl	%ecx,16(%ebx)
+L042pw_nc4:
+	movl	20(%esi),%ecx
+	movl	%ecx,20(%ebx)
+L043pw_nc5:
+	movl	24(%esi),%ecx
+	movl	%ecx,24(%ebx)
+L044pw_nc6:
+	movl	28(%esi),%ecx
+	movl	%ecx,28(%ebx)
+L045pw_nc7:
+
+	addl	$32,%esi
+	addl	$32,%ebx
+	subl	$8,%ebp
+	jnz	L053pw_nc_loop
+	movl	36(%esp),%ebp
+	andl	$7,%ebp
+	jz	L054pw_nc_end
+	movl	(%esi),%ecx
+	movl	%ecx,(%ebx)
+L046pw_tail_nc0:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	4(%esi),%ecx
+	movl	%ecx,4(%ebx)
+L047pw_tail_nc1:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	8(%esi),%ecx
+	movl	%ecx,8(%ebx)
+L048pw_tail_nc2:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	12(%esi),%ecx
+	movl	%ecx,12(%ebx)
+L049pw_tail_nc3:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	16(%esi),%ecx
+	movl	%ecx,16(%ebx)
+L050pw_tail_nc4:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	20(%esi),%ecx
+	movl	%ecx,20(%ebx)
+L051pw_tail_nc5:
+	decl	%ebp
+	jz	L054pw_nc_end
+	movl	24(%esi),%ecx
+	movl	%ecx,24(%ebx)
+L052pw_tail_nc6:
+L054pw_nc_end:
+	movl	$0,%eax
+L032pw_end:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/bn/co-586.S b/third_party/boringssl/mac-x86/crypto/bn/co-586.S
new file mode 100644
index 0000000..7ce8e79
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/bn/co-586.S
@@ -0,0 +1,1252 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/co-586.S"
+.text
+.globl	_bn_mul_comba8
+.private_extern	_bn_mul_comba8
+.align	4
+_bn_mul_comba8:
+L_bn_mul_comba8_begin:
+	pushl	%esi
+	movl	12(%esp),%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	pushl	%ebp
+	pushl	%ebx
+	xorl	%ebx,%ebx
+	movl	(%esi),%eax
+	xorl	%ecx,%ecx
+	movl	(%edi),%edx
+	# ################## Calculate word 0 
+	xorl	%ebp,%ebp
+	# mul a[0]*b[0] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%eax)
+	movl	4(%esi),%eax
+	# saved r[0] 
+	# ################## Calculate word 1 
+	xorl	%ebx,%ebx
+	# mul a[1]*b[0] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[0]*b[1] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,4(%eax)
+	movl	8(%esi),%eax
+	# saved r[1] 
+	# ################## Calculate word 2 
+	xorl	%ecx,%ecx
+	# mul a[2]*b[0] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[1]*b[1] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[0]*b[2] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%eax)
+	movl	12(%esi),%eax
+	# saved r[2] 
+	# ################## Calculate word 3 
+	xorl	%ebp,%ebp
+	# mul a[3]*b[0] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[2]*b[1] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[1]*b[2] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[0]*b[3] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,12(%eax)
+	movl	16(%esi),%eax
+	# saved r[3] 
+	# ################## Calculate word 4 
+	xorl	%ebx,%ebx
+	# mul a[4]*b[0] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[3]*b[1] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[2]*b[2] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[1]*b[3] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[0]*b[4] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%eax)
+	movl	20(%esi),%eax
+	# saved r[4] 
+	# ################## Calculate word 5 
+	xorl	%ecx,%ecx
+	# mul a[5]*b[0] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[4]*b[1] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	12(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[3]*b[2] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[2]*b[3] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	16(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[1]*b[4] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[0]*b[5] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,20(%eax)
+	movl	24(%esi),%eax
+	# saved r[5] 
+	# ################## Calculate word 6 
+	xorl	%ebp,%ebp
+	# mul a[6]*b[0] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[5]*b[1] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	16(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[4]*b[2] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	12(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[3]*b[3] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	16(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[2]*b[4] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	20(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[1]*b[5] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[0]*b[6] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,24(%eax)
+	movl	28(%esi),%eax
+	# saved r[6] 
+	# ################## Calculate word 7 
+	xorl	%ebx,%ebx
+	# mul a[7]*b[0] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[6]*b[1] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[5]*b[2] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	16(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[4]*b[3] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[3]*b[4] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	20(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[2]*b[5] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	24(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[1]*b[6] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[0]*b[7] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,28(%eax)
+	movl	28(%esi),%eax
+	# saved r[7] 
+	# ################## Calculate word 8 
+	xorl	%ecx,%ecx
+	# mul a[7]*b[1] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	24(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[6]*b[2] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[5]*b[3] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	16(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[4]*b[4] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	12(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[3]*b[5] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	24(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[2]*b[6] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	28(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[1]*b[7] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,32(%eax)
+	movl	28(%esi),%eax
+	# saved r[8] 
+	# ################## Calculate word 9 
+	xorl	%ebp,%ebp
+	# mul a[7]*b[2] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	24(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[6]*b[3] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	16(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[5]*b[4] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	16(%esi),%eax
+	adcl	%edx,%ecx
+	movl	20(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[4]*b[5] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	12(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[3]*b[6] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	28(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[2]*b[7] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,36(%eax)
+	movl	28(%esi),%eax
+	# saved r[9] 
+	# ################## Calculate word 10 
+	xorl	%ebx,%ebx
+	# mul a[7]*b[3] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[6]*b[4] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esi),%eax
+	adcl	%edx,%ebp
+	movl	20(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[5]*b[5] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	16(%esi),%eax
+	adcl	%edx,%ebp
+	movl	24(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[4]*b[6] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	12(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[3]*b[7] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	16(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,40(%eax)
+	movl	28(%esi),%eax
+	# saved r[10] 
+	# ################## Calculate word 11 
+	xorl	%ecx,%ecx
+	# mul a[7]*b[4] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	24(%esi),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[6]*b[5] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esi),%eax
+	adcl	%edx,%ebx
+	movl	24(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[5]*b[6] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	16(%esi),%eax
+	adcl	%edx,%ebx
+	movl	28(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[4]*b[7] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	20(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,44(%eax)
+	movl	28(%esi),%eax
+	# saved r[11] 
+	# ################## Calculate word 12 
+	xorl	%ebp,%ebp
+	# mul a[7]*b[5] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	24(%esi),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[6]*b[6] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esi),%eax
+	adcl	%edx,%ecx
+	movl	28(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[5]*b[7] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	24(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,48(%eax)
+	movl	28(%esi),%eax
+	# saved r[12] 
+	# ################## Calculate word 13 
+	xorl	%ebx,%ebx
+	# mul a[7]*b[6] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	24(%esi),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[6]*b[7] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	28(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,52(%eax)
+	movl	28(%esi),%eax
+	# saved r[13] 
+	# ################## Calculate word 14 
+	xorl	%ecx,%ecx
+	# mul a[7]*b[7] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	adcl	$0,%ecx
+	movl	%ebp,56(%eax)
+	# saved r[14] 
+	# save r[15] 
+	movl	%ebx,60(%eax)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.globl	_bn_mul_comba4
+.private_extern	_bn_mul_comba4
+.align	4
+_bn_mul_comba4:
+L_bn_mul_comba4_begin:
+	pushl	%esi
+	movl	12(%esp),%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	pushl	%ebp
+	pushl	%ebx
+	xorl	%ebx,%ebx
+	movl	(%esi),%eax
+	xorl	%ecx,%ecx
+	movl	(%edi),%edx
+	# ################## Calculate word 0 
+	xorl	%ebp,%ebp
+	# mul a[0]*b[0] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%eax)
+	movl	4(%esi),%eax
+	# saved r[0] 
+	# ################## Calculate word 1 
+	xorl	%ebx,%ebx
+	# mul a[1]*b[0] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	(%esi),%eax
+	adcl	%edx,%ebp
+	movl	4(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[0]*b[1] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,4(%eax)
+	movl	8(%esi),%eax
+	# saved r[1] 
+	# ################## Calculate word 2 
+	xorl	%ecx,%ecx
+	# mul a[2]*b[0] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	4(%esi),%eax
+	adcl	%edx,%ebx
+	movl	4(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[1]*b[1] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	(%esi),%eax
+	adcl	%edx,%ebx
+	movl	8(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[0]*b[2] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%eax)
+	movl	12(%esi),%eax
+	# saved r[2] 
+	# ################## Calculate word 3 
+	xorl	%ebp,%ebp
+	# mul a[3]*b[0] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	8(%esi),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[2]*b[1] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	4(%esi),%eax
+	adcl	%edx,%ecx
+	movl	8(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[1]*b[2] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	(%esi),%eax
+	adcl	%edx,%ecx
+	movl	12(%edi),%edx
+	adcl	$0,%ebp
+	# mul a[0]*b[3] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	movl	4(%edi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,12(%eax)
+	movl	12(%esi),%eax
+	# saved r[3] 
+	# ################## Calculate word 4 
+	xorl	%ebx,%ebx
+	# mul a[3]*b[1] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	8(%esi),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[2]*b[2] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	4(%esi),%eax
+	adcl	%edx,%ebp
+	movl	12(%edi),%edx
+	adcl	$0,%ebx
+	# mul a[1]*b[3] 
+	mull	%edx
+	addl	%eax,%ecx
+	movl	20(%esp),%eax
+	adcl	%edx,%ebp
+	movl	8(%edi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%eax)
+	movl	12(%esi),%eax
+	# saved r[4] 
+	# ################## Calculate word 5 
+	xorl	%ecx,%ecx
+	# mul a[3]*b[2] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	8(%esi),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+	# mul a[2]*b[3] 
+	mull	%edx
+	addl	%eax,%ebp
+	movl	20(%esp),%eax
+	adcl	%edx,%ebx
+	movl	12(%edi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,20(%eax)
+	movl	12(%esi),%eax
+	# saved r[5] 
+	# ################## Calculate word 6 
+	xorl	%ebp,%ebp
+	# mul a[3]*b[3] 
+	mull	%edx
+	addl	%eax,%ebx
+	movl	20(%esp),%eax
+	adcl	%edx,%ecx
+	adcl	$0,%ebp
+	movl	%ebx,24(%eax)
+	# saved r[6] 
+	# save r[7] 
+	movl	%ecx,28(%eax)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.globl	_bn_sqr_comba8
+.private_extern	_bn_sqr_comba8
+.align	4
+_bn_sqr_comba8:
+L_bn_sqr_comba8_begin:
+	pushl	%esi
+	pushl	%edi
+	pushl	%ebp
+	pushl	%ebx
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	xorl	%ebx,%ebx
+	xorl	%ecx,%ecx
+	movl	(%esi),%eax
+	# ############### Calculate word 0 
+	xorl	%ebp,%ebp
+	# sqr a[0]*a[0] 
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%edi)
+	movl	4(%esi),%eax
+	# saved r[0] 
+	# ############### Calculate word 1 
+	xorl	%ebx,%ebx
+	# sqr a[1]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,4(%edi)
+	movl	(%esi),%edx
+	# saved r[1] 
+	# ############### Calculate word 2 
+	xorl	%ecx,%ecx
+	# sqr a[2]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	4(%esi),%eax
+	adcl	$0,%ecx
+	# sqr a[1]*a[1] 
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%edi)
+	movl	12(%esi),%eax
+	# saved r[2] 
+	# ############### Calculate word 3 
+	xorl	%ebp,%ebp
+	# sqr a[3]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	8(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+	# sqr a[2]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	16(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,12(%edi)
+	movl	(%esi),%edx
+	# saved r[3] 
+	# ############### Calculate word 4 
+	xorl	%ebx,%ebx
+	# sqr a[4]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	12(%esi),%eax
+	adcl	$0,%ebx
+	movl	4(%esi),%edx
+	# sqr a[3]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	# sqr a[2]*a[2] 
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%edi)
+	movl	20(%esi),%eax
+	# saved r[4] 
+	# ############### Calculate word 5 
+	xorl	%ecx,%ecx
+	# sqr a[5]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	16(%esi),%eax
+	adcl	$0,%ecx
+	movl	4(%esi),%edx
+	# sqr a[4]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	12(%esi),%eax
+	adcl	$0,%ecx
+	movl	8(%esi),%edx
+	# sqr a[3]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,20(%edi)
+	movl	(%esi),%edx
+	# saved r[5] 
+	# ############### Calculate word 6 
+	xorl	%ebp,%ebp
+	# sqr a[6]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	20(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+	# sqr a[5]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	16(%esi),%eax
+	adcl	$0,%ebp
+	movl	8(%esi),%edx
+	# sqr a[4]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	12(%esi),%eax
+	adcl	$0,%ebp
+	# sqr a[3]*a[3] 
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,24(%edi)
+	movl	28(%esi),%eax
+	# saved r[6] 
+	# ############### Calculate word 7 
+	xorl	%ebx,%ebx
+	# sqr a[7]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	24(%esi),%eax
+	adcl	$0,%ebx
+	movl	4(%esi),%edx
+	# sqr a[6]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	20(%esi),%eax
+	adcl	$0,%ebx
+	movl	8(%esi),%edx
+	# sqr a[5]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	16(%esi),%eax
+	adcl	$0,%ebx
+	movl	12(%esi),%edx
+	# sqr a[4]*a[3] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	28(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,28(%edi)
+	movl	4(%esi),%edx
+	# saved r[7] 
+	# ############### Calculate word 8 
+	xorl	%ecx,%ecx
+	# sqr a[7]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	8(%esi),%edx
+	# sqr a[6]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	20(%esi),%eax
+	adcl	$0,%ecx
+	movl	12(%esi),%edx
+	# sqr a[5]*a[3] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	16(%esi),%eax
+	adcl	$0,%ecx
+	# sqr a[4]*a[4] 
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	8(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,32(%edi)
+	movl	28(%esi),%eax
+	# saved r[8] 
+	# ############### Calculate word 9 
+	xorl	%ebp,%ebp
+	# sqr a[7]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%eax
+	adcl	$0,%ebp
+	movl	12(%esi),%edx
+	# sqr a[6]*a[3] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	20(%esi),%eax
+	adcl	$0,%ebp
+	movl	16(%esi),%edx
+	# sqr a[5]*a[4] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	28(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,36(%edi)
+	movl	12(%esi),%edx
+	# saved r[9] 
+	# ############### Calculate word 10 
+	xorl	%ebx,%ebx
+	# sqr a[7]*a[3] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	24(%esi),%eax
+	adcl	$0,%ebx
+	movl	16(%esi),%edx
+	# sqr a[6]*a[4] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	20(%esi),%eax
+	adcl	$0,%ebx
+	# sqr a[5]*a[5] 
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	16(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,40(%edi)
+	movl	28(%esi),%eax
+	# saved r[10] 
+	# ############### Calculate word 11 
+	xorl	%ecx,%ecx
+	# sqr a[7]*a[4] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	24(%esi),%eax
+	adcl	$0,%ecx
+	movl	20(%esi),%edx
+	# sqr a[6]*a[5] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	28(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,44(%edi)
+	movl	20(%esi),%edx
+	# saved r[11] 
+	# ############### Calculate word 12 
+	xorl	%ebp,%ebp
+	# sqr a[7]*a[5] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%eax
+	adcl	$0,%ebp
+	# sqr a[6]*a[6] 
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	24(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,48(%edi)
+	movl	28(%esi),%eax
+	# saved r[12] 
+	# ############### Calculate word 13 
+	xorl	%ebx,%ebx
+	# sqr a[7]*a[6] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	28(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,52(%edi)
+	# saved r[13] 
+	# ############### Calculate word 14 
+	xorl	%ecx,%ecx
+	# sqr a[7]*a[7] 
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	adcl	$0,%ecx
+	movl	%ebp,56(%edi)
+	# saved r[14] 
+	movl	%ebx,60(%edi)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+.globl	_bn_sqr_comba4
+.private_extern	_bn_sqr_comba4
+.align	4
+_bn_sqr_comba4:
+L_bn_sqr_comba4_begin:
+	pushl	%esi
+	pushl	%edi
+	pushl	%ebp
+	pushl	%ebx
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	xorl	%ebx,%ebx
+	xorl	%ecx,%ecx
+	movl	(%esi),%eax
+	# ############### Calculate word 0 
+	xorl	%ebp,%ebp
+	# sqr a[0]*a[0] 
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	(%esi),%edx
+	adcl	$0,%ebp
+	movl	%ebx,(%edi)
+	movl	4(%esi),%eax
+	# saved r[0] 
+	# ############### Calculate word 1 
+	xorl	%ebx,%ebx
+	# sqr a[1]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	movl	%ecx,4(%edi)
+	movl	(%esi),%edx
+	# saved r[1] 
+	# ############### Calculate word 2 
+	xorl	%ecx,%ecx
+	# sqr a[2]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	4(%esi),%eax
+	adcl	$0,%ecx
+	# sqr a[1]*a[1] 
+	mull	%eax
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	(%esi),%edx
+	adcl	$0,%ecx
+	movl	%ebp,8(%edi)
+	movl	12(%esi),%eax
+	# saved r[2] 
+	# ############### Calculate word 3 
+	xorl	%ebp,%ebp
+	# sqr a[3]*a[0] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	8(%esi),%eax
+	adcl	$0,%ebp
+	movl	4(%esi),%edx
+	# sqr a[2]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebp
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	movl	12(%esi),%eax
+	adcl	$0,%ebp
+	movl	%ebx,12(%edi)
+	movl	4(%esi),%edx
+	# saved r[3] 
+	# ############### Calculate word 4 
+	xorl	%ebx,%ebx
+	# sqr a[3]*a[1] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ebx
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%eax
+	adcl	$0,%ebx
+	# sqr a[2]*a[2] 
+	mull	%eax
+	addl	%eax,%ecx
+	adcl	%edx,%ebp
+	movl	8(%esi),%edx
+	adcl	$0,%ebx
+	movl	%ecx,16(%edi)
+	movl	12(%esi),%eax
+	# saved r[4] 
+	# ############### Calculate word 5 
+	xorl	%ecx,%ecx
+	# sqr a[3]*a[2] 
+	mull	%edx
+	addl	%eax,%eax
+	adcl	%edx,%edx
+	adcl	$0,%ecx
+	addl	%eax,%ebp
+	adcl	%edx,%ebx
+	movl	12(%esi),%eax
+	adcl	$0,%ecx
+	movl	%ebp,20(%edi)
+	# saved r[5] 
+	# ############### Calculate word 6 
+	xorl	%ebp,%ebp
+	# sqr a[3]*a[3] 
+	mull	%eax
+	addl	%eax,%ebx
+	adcl	%edx,%ecx
+	adcl	$0,%ebp
+	movl	%ebx,24(%edi)
+	# saved r[6] 
+	movl	%ecx,28(%edi)
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S b/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S
new file mode 100644
index 0000000..234034b
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/bn/x86-mont.S
@@ -0,0 +1,462 @@
+#if defined(__i386__)
+.file	"src/crypto/bn/asm/x86-mont.S"
+.text
+.globl	_bn_mul_mont
+.private_extern	_bn_mul_mont
+.align	4
+_bn_mul_mont:
+L_bn_mul_mont_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	xorl	%eax,%eax
+	movl	40(%esp),%edi
+	cmpl	$4,%edi
+	jl	L000just_leave
+	leal	20(%esp),%esi
+	leal	24(%esp),%edx
+	movl	%esp,%ebp
+	addl	$2,%edi
+	negl	%edi
+	leal	-32(%esp,%edi,4),%esp
+	negl	%edi
+	movl	%esp,%eax
+	subl	%edx,%eax
+	andl	$2047,%eax
+	subl	%eax,%esp
+	xorl	%esp,%edx
+	andl	$2048,%edx
+	xorl	$2048,%edx
+	subl	%edx,%esp
+	andl	$-64,%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	movl	16(%esi),%esi
+	movl	(%esi),%esi
+	movl	%eax,4(%esp)
+	movl	%ebx,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	%edx,16(%esp)
+	movl	%esi,20(%esp)
+	leal	-3(%edi),%ebx
+	movl	%ebp,24(%esp)
+	call	L001PIC_me_up
+L001PIC_me_up:
+	popl	%eax
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L001PIC_me_up(%eax),%eax
+	btl	$26,(%eax)
+	jnc	L002non_sse2
+	movl	$-1,%eax
+	movd	%eax,%mm7
+	movl	8(%esp),%esi
+	movl	12(%esp),%edi
+	movl	16(%esp),%ebp
+	xorl	%edx,%edx
+	xorl	%ecx,%ecx
+	movd	(%edi),%mm4
+	movd	(%esi),%mm5
+	movd	(%ebp),%mm3
+	pmuludq	%mm4,%mm5
+	movq	%mm5,%mm2
+	movq	%mm5,%mm0
+	pand	%mm7,%mm0
+	pmuludq	20(%esp),%mm5
+	pmuludq	%mm5,%mm3
+	paddq	%mm0,%mm3
+	movd	4(%ebp),%mm1
+	movd	4(%esi),%mm0
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	incl	%ecx
+.align	4,0x90
+L0031st:
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	movd	4(%ebp,%ecx,4),%mm1
+	paddq	%mm0,%mm3
+	movd	4(%esi,%ecx,4),%mm0
+	psrlq	$32,%mm2
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm3
+	leal	1(%ecx),%ecx
+	cmpl	%ebx,%ecx
+	jl	L0031st
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	paddq	%mm0,%mm3
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	paddq	%mm2,%mm3
+	movq	%mm3,32(%esp,%ebx,4)
+	incl	%edx
+L004outer:
+	xorl	%ecx,%ecx
+	movd	(%edi,%edx,4),%mm4
+	movd	(%esi),%mm5
+	movd	32(%esp),%mm6
+	movd	(%ebp),%mm3
+	pmuludq	%mm4,%mm5
+	paddq	%mm6,%mm5
+	movq	%mm5,%mm0
+	movq	%mm5,%mm2
+	pand	%mm7,%mm0
+	pmuludq	20(%esp),%mm5
+	pmuludq	%mm5,%mm3
+	paddq	%mm0,%mm3
+	movd	36(%esp),%mm6
+	movd	4(%ebp),%mm1
+	movd	4(%esi),%mm0
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	paddq	%mm6,%mm2
+	incl	%ecx
+	decl	%ebx
+L005inner:
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	movd	36(%esp,%ecx,4),%mm6
+	pand	%mm7,%mm0
+	movd	4(%ebp,%ecx,4),%mm1
+	paddq	%mm0,%mm3
+	movd	4(%esi,%ecx,4),%mm0
+	psrlq	$32,%mm2
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm3
+	paddq	%mm6,%mm2
+	decl	%ebx
+	leal	1(%ecx),%ecx
+	jnz	L005inner
+	movl	%ecx,%ebx
+	pmuludq	%mm4,%mm0
+	pmuludq	%mm5,%mm1
+	paddq	%mm0,%mm2
+	paddq	%mm1,%mm3
+	movq	%mm2,%mm0
+	pand	%mm7,%mm0
+	paddq	%mm0,%mm3
+	movd	%mm3,28(%esp,%ecx,4)
+	psrlq	$32,%mm2
+	psrlq	$32,%mm3
+	movd	36(%esp,%ebx,4),%mm6
+	paddq	%mm2,%mm3
+	paddq	%mm6,%mm3
+	movq	%mm3,32(%esp,%ebx,4)
+	leal	1(%edx),%edx
+	cmpl	%ebx,%edx
+	jle	L004outer
+	emms
+	jmp	L006common_tail
+.align	4,0x90
+L002non_sse2:
+	movl	8(%esp),%esi
+	leal	1(%ebx),%ebp
+	movl	12(%esp),%edi
+	xorl	%ecx,%ecx
+	movl	%esi,%edx
+	andl	$1,%ebp
+	subl	%edi,%edx
+	leal	4(%edi,%ebx,4),%eax
+	orl	%edx,%ebp
+	movl	(%edi),%edi
+	jz	L007bn_sqr_mont
+	movl	%eax,28(%esp)
+	movl	(%esi),%eax
+	xorl	%edx,%edx
+.align	4,0x90
+L008mull:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%eax,%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	movl	(%esi,%ecx,4),%eax
+	cmpl	%ebx,%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	L008mull
+	movl	%edx,%ebp
+	mull	%edi
+	movl	20(%esp),%edi
+	addl	%ebp,%eax
+	movl	16(%esp),%esi
+	adcl	$0,%edx
+	imull	32(%esp),%edi
+	movl	%eax,32(%esp,%ebx,4)
+	xorl	%ecx,%ecx
+	movl	%edx,36(%esp,%ebx,4)
+	movl	%ecx,40(%esp,%ebx,4)
+	movl	(%esi),%eax
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	4(%esi),%eax
+	adcl	$0,%edx
+	incl	%ecx
+	jmp	L0092ndmadd
+.align	4,0x90
+L0101stmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	L0101stmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%eax
+	movl	20(%esp),%edi
+	adcl	$0,%edx
+	movl	16(%esp),%esi
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	imull	32(%esp),%edi
+	xorl	%ecx,%ecx
+	addl	36(%esp,%ebx,4),%edx
+	movl	%ebp,32(%esp,%ebx,4)
+	adcl	$0,%ecx
+	movl	(%esi),%eax
+	movl	%edx,36(%esp,%ebx,4)
+	movl	%ecx,40(%esp,%ebx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	4(%esi),%eax
+	adcl	$0,%edx
+	movl	$1,%ecx
+.align	4,0x90
+L0092ndmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,24(%esp,%ecx,4)
+	jl	L0092ndmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ebx,4)
+	xorl	%eax,%eax
+	movl	12(%esp),%ecx
+	addl	36(%esp,%ebx,4),%edx
+	adcl	40(%esp,%ebx,4),%eax
+	leal	4(%ecx),%ecx
+	movl	%edx,32(%esp,%ebx,4)
+	cmpl	28(%esp),%ecx
+	movl	%eax,36(%esp,%ebx,4)
+	je	L006common_tail
+	movl	(%ecx),%edi
+	movl	8(%esp),%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+	movl	(%esi),%eax
+	jmp	L0101stmadd
+.align	4,0x90
+L007bn_sqr_mont:
+	movl	%ebx,(%esp)
+	movl	%ecx,12(%esp)
+	movl	%edi,%eax
+	mull	%edi
+	movl	%eax,32(%esp)
+	movl	%edx,%ebx
+	shrl	$1,%edx
+	andl	$1,%ebx
+	incl	%ecx
+.align	4,0x90
+L011sqr:
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	leal	1(%ecx),%ecx
+	adcl	$0,%edx
+	leal	(%ebx,%eax,2),%ebp
+	shrl	$31,%eax
+	cmpl	(%esp),%ecx
+	movl	%eax,%ebx
+	movl	%ebp,28(%esp,%ecx,4)
+	jl	L011sqr
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	movl	20(%esp),%edi
+	adcl	$0,%edx
+	movl	16(%esp),%esi
+	leal	(%ebx,%eax,2),%ebp
+	imull	32(%esp),%edi
+	shrl	$31,%eax
+	movl	%ebp,32(%esp,%ecx,4)
+	leal	(%eax,%edx,2),%ebp
+	movl	(%esi),%eax
+	shrl	$31,%edx
+	movl	%ebp,36(%esp,%ecx,4)
+	movl	%edx,40(%esp,%ecx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	movl	%ecx,%ebx
+	adcl	$0,%edx
+	movl	4(%esi),%eax
+	movl	$1,%ecx
+.align	4,0x90
+L0123rdmadd:
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ecx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	4(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ecx,4)
+	movl	%edx,%ebp
+	mull	%edi
+	addl	36(%esp,%ecx,4),%ebp
+	leal	2(%ecx),%ecx
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	movl	(%esi,%ecx,4),%eax
+	adcl	$0,%edx
+	cmpl	%ebx,%ecx
+	movl	%ebp,24(%esp,%ecx,4)
+	jl	L0123rdmadd
+	movl	%edx,%ebp
+	mull	%edi
+	addl	32(%esp,%ebx,4),%ebp
+	adcl	$0,%edx
+	addl	%eax,%ebp
+	adcl	$0,%edx
+	movl	%ebp,28(%esp,%ebx,4)
+	movl	12(%esp),%ecx
+	xorl	%eax,%eax
+	movl	8(%esp),%esi
+	addl	36(%esp,%ebx,4),%edx
+	adcl	40(%esp,%ebx,4),%eax
+	movl	%edx,32(%esp,%ebx,4)
+	cmpl	%ebx,%ecx
+	movl	%eax,36(%esp,%ebx,4)
+	je	L006common_tail
+	movl	4(%esi,%ecx,4),%edi
+	leal	1(%ecx),%ecx
+	movl	%edi,%eax
+	movl	%ecx,12(%esp)
+	mull	%edi
+	addl	32(%esp,%ecx,4),%eax
+	adcl	$0,%edx
+	movl	%eax,32(%esp,%ecx,4)
+	xorl	%ebp,%ebp
+	cmpl	%ebx,%ecx
+	leal	1(%ecx),%ecx
+	je	L013sqrlast
+	movl	%edx,%ebx
+	shrl	$1,%edx
+	andl	$1,%ebx
+.align	4,0x90
+L014sqradd:
+	movl	(%esi,%ecx,4),%eax
+	movl	%edx,%ebp
+	mull	%edi
+	addl	%ebp,%eax
+	leal	(%eax,%eax,1),%ebp
+	adcl	$0,%edx
+	shrl	$31,%eax
+	addl	32(%esp,%ecx,4),%ebp
+	leal	1(%ecx),%ecx
+	adcl	$0,%eax
+	addl	%ebx,%ebp
+	adcl	$0,%eax
+	cmpl	(%esp),%ecx
+	movl	%ebp,28(%esp,%ecx,4)
+	movl	%eax,%ebx
+	jle	L014sqradd
+	movl	%edx,%ebp
+	addl	%edx,%edx
+	shrl	$31,%ebp
+	addl	%ebx,%edx
+	adcl	$0,%ebp
+L013sqrlast:
+	movl	20(%esp),%edi
+	movl	16(%esp),%esi
+	imull	32(%esp),%edi
+	addl	32(%esp,%ecx,4),%edx
+	movl	(%esi),%eax
+	adcl	$0,%ebp
+	movl	%edx,32(%esp,%ecx,4)
+	movl	%ebp,36(%esp,%ecx,4)
+	mull	%edi
+	addl	32(%esp),%eax
+	leal	-1(%ecx),%ebx
+	adcl	$0,%edx
+	movl	$1,%ecx
+	movl	4(%esi),%eax
+	jmp	L0123rdmadd
+.align	4,0x90
+L006common_tail:
+	movl	16(%esp),%ebp
+	movl	4(%esp),%edi
+	leal	32(%esp),%esi
+	movl	(%esi),%eax
+	movl	%ebx,%ecx
+	xorl	%edx,%edx
+.align	4,0x90
+L015sub:
+	sbbl	(%ebp,%edx,4),%eax
+	movl	%eax,(%edi,%edx,4)
+	decl	%ecx
+	movl	4(%esi,%edx,4),%eax
+	leal	1(%edx),%edx
+	jge	L015sub
+	sbbl	$0,%eax
+.align	4,0x90
+L016copy:
+	movl	(%esi,%ebx,4),%edx
+	movl	(%edi,%ebx,4),%ebp
+	xorl	%ebp,%edx
+	andl	%eax,%edx
+	xorl	%ebp,%edx
+	movl	%ecx,(%esi,%ebx,4)
+	movl	%edx,(%edi,%ebx,4)
+	decl	%ebx
+	jge	L016copy
+	movl	24(%esp),%esp
+	movl	$1,%eax
+L000just_leave:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
+.byte	112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
+.byte	54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+.byte	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+.byte	111,114,103,62,0
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S b/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S
new file mode 100644
index 0000000..bfb292c
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/cpu-x86-asm.S
@@ -0,0 +1,309 @@
+#if defined(__i386__)
+.file	"crypto/cpu-x86-asm.S"
+.text
+.globl	_OPENSSL_ia32_cpuid
+.private_extern	_OPENSSL_ia32_cpuid
+.align	4
+_OPENSSL_ia32_cpuid:
+L_OPENSSL_ia32_cpuid_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	xorl	%edx,%edx
+	pushfl
+	popl	%eax
+	movl	%eax,%ecx
+	xorl	$2097152,%eax
+	pushl	%eax
+	popfl
+	pushfl
+	popl	%eax
+	xorl	%eax,%ecx
+	xorl	%eax,%eax
+	btl	$21,%ecx
+	jnc	L000nocpuid
+	movl	20(%esp),%esi
+	movl	%eax,8(%esi)
+	.byte	0x0f,0xa2
+	movl	%eax,%edi
+	xorl	%eax,%eax
+	cmpl	$1970169159,%ebx
+	setne	%al
+	movl	%eax,%ebp
+	cmpl	$1231384169,%edx
+	setne	%al
+	orl	%eax,%ebp
+	cmpl	$1818588270,%ecx
+	setne	%al
+	orl	%eax,%ebp
+	jz	L001intel
+	cmpl	$1752462657,%ebx
+	setne	%al
+	movl	%eax,%esi
+	cmpl	$1769238117,%edx
+	setne	%al
+	orl	%eax,%esi
+	cmpl	$1145913699,%ecx
+	setne	%al
+	orl	%eax,%esi
+	jnz	L001intel
+	movl	$2147483648,%eax
+	.byte	0x0f,0xa2
+	cmpl	$2147483649,%eax
+	jb	L001intel
+	movl	%eax,%esi
+	movl	$2147483649,%eax
+	.byte	0x0f,0xa2
+	orl	%ecx,%ebp
+	andl	$2049,%ebp
+	cmpl	$2147483656,%esi
+	jb	L001intel
+	movl	$2147483656,%eax
+	.byte	0x0f,0xa2
+	movzbl	%cl,%esi
+	incl	%esi
+	movl	$1,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	btl	$28,%edx
+	jnc	L002generic
+	shrl	$16,%ebx
+	andl	$255,%ebx
+	cmpl	%esi,%ebx
+	ja	L002generic
+	andl	$4026531839,%edx
+	jmp	L002generic
+L001intel:
+	cmpl	$7,%edi
+	jb	L003cacheinfo
+	movl	20(%esp),%esi
+	movl	$7,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	movl	%ebx,8(%esi)
+L003cacheinfo:
+	cmpl	$4,%edi
+	movl	$-1,%edi
+	jb	L004nocacheinfo
+	movl	$4,%eax
+	movl	$0,%ecx
+	.byte	0x0f,0xa2
+	movl	%eax,%edi
+	shrl	$14,%edi
+	andl	$4095,%edi
+L004nocacheinfo:
+	movl	$1,%eax
+	xorl	%ecx,%ecx
+	.byte	0x0f,0xa2
+	andl	$3220176895,%edx
+	cmpl	$0,%ebp
+	jne	L005notintel
+	orl	$1073741824,%edx
+L005notintel:
+	btl	$28,%edx
+	jnc	L002generic
+	andl	$4026531839,%edx
+	cmpl	$0,%edi
+	je	L002generic
+	orl	$268435456,%edx
+	shrl	$16,%ebx
+	cmpb	$1,%bl
+	ja	L002generic
+	andl	$4026531839,%edx
+L002generic:
+	andl	$2048,%ebp
+	andl	$4294965247,%ecx
+	movl	%edx,%esi
+	orl	%ecx,%ebp
+	btl	$27,%ecx
+	jnc	L006clear_avx
+	xorl	%ecx,%ecx
+.byte	15,1,208
+	andl	$6,%eax
+	cmpl	$6,%eax
+	je	L007done
+	cmpl	$2,%eax
+	je	L006clear_avx
+L008clear_xmm:
+	andl	$4261412861,%ebp
+	andl	$4278190079,%esi
+L006clear_avx:
+	andl	$4026525695,%ebp
+	movl	20(%esp),%edi
+	andl	$4294967263,8(%edi)
+L007done:
+	movl	%esi,%eax
+	movl	%ebp,%edx
+L000nocpuid:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_OPENSSL_rdtsc
+.private_extern	_OPENSSL_rdtsc
+.align	4
+_OPENSSL_rdtsc:
+L_OPENSSL_rdtsc_begin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	call	L009PIC_me_up
+L009PIC_me_up:
+	popl	%ecx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L009PIC_me_up(%ecx),%ecx
+	btl	$4,(%ecx)
+	jnc	L010notsc
+	.byte	0x0f,0x31
+L010notsc:
+	ret
+.globl	_OPENSSL_instrument_halt
+.private_extern	_OPENSSL_instrument_halt
+.align	4
+_OPENSSL_instrument_halt:
+L_OPENSSL_instrument_halt_begin:
+	call	L011PIC_me_up
+L011PIC_me_up:
+	popl	%ecx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L011PIC_me_up(%ecx),%ecx
+	btl	$4,(%ecx)
+	jnc	L012nohalt
+.long	2421723150
+	andl	$3,%eax
+	jnz	L012nohalt
+	pushfl
+	popl	%eax
+	btl	$9,%eax
+	jnc	L012nohalt
+	.byte	0x0f,0x31
+	pushl	%edx
+	pushl	%eax
+	hlt
+	.byte	0x0f,0x31
+	subl	(%esp),%eax
+	sbbl	4(%esp),%edx
+	addl	$8,%esp
+	ret
+L012nohalt:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	ret
+.globl	_OPENSSL_far_spin
+.private_extern	_OPENSSL_far_spin
+.align	4
+_OPENSSL_far_spin:
+L_OPENSSL_far_spin_begin:
+	pushfl
+	popl	%eax
+	btl	$9,%eax
+	jnc	L013nospin
+	movl	4(%esp),%eax
+	movl	8(%esp),%ecx
+.long	2430111262
+	xorl	%eax,%eax
+	movl	(%ecx),%edx
+	jmp	L014spin
+.align	4,0x90
+L014spin:
+	incl	%eax
+	cmpl	(%ecx),%edx
+	je	L014spin
+.long	529567888
+	ret
+L013nospin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	ret
+.globl	_OPENSSL_wipe_cpu
+.private_extern	_OPENSSL_wipe_cpu
+.align	4
+_OPENSSL_wipe_cpu:
+L_OPENSSL_wipe_cpu_begin:
+	xorl	%eax,%eax
+	xorl	%edx,%edx
+	call	L015PIC_me_up
+L015PIC_me_up:
+	popl	%ecx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L015PIC_me_up(%ecx),%ecx
+	movl	(%ecx),%ecx
+	btl	$1,(%ecx)
+	jnc	L016no_x87
+	andl	$83886080,%ecx
+	cmpl	$83886080,%ecx
+	jne	L017no_sse2
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+L017no_sse2:
+.long	4007259865,4007259865,4007259865,4007259865,2430851995
+L016no_x87:
+	leal	4(%esp),%eax
+	ret
+.globl	_OPENSSL_atomic_add
+.private_extern	_OPENSSL_atomic_add
+.align	4
+_OPENSSL_atomic_add:
+L_OPENSSL_atomic_add_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%ecx
+	pushl	%ebx
+	nop
+	movl	(%edx),%eax
+L018spin:
+	leal	(%eax,%ecx,1),%ebx
+	nop
+.long	447811568
+	jne	L018spin
+	movl	%ebx,%eax
+	popl	%ebx
+	ret
+.globl	_OPENSSL_indirect_call
+.private_extern	_OPENSSL_indirect_call
+.align	4
+_OPENSSL_indirect_call:
+L_OPENSSL_indirect_call_begin:
+	pushl	%ebp
+	movl	%esp,%ebp
+	subl	$28,%esp
+	movl	12(%ebp),%ecx
+	movl	%ecx,(%esp)
+	movl	16(%ebp),%edx
+	movl	%edx,4(%esp)
+	movl	20(%ebp),%eax
+	movl	%eax,8(%esp)
+	movl	24(%ebp),%eax
+	movl	%eax,12(%esp)
+	movl	28(%ebp),%eax
+	movl	%eax,16(%esp)
+	movl	32(%ebp),%eax
+	movl	%eax,20(%esp)
+	movl	36(%ebp),%eax
+	movl	%eax,24(%esp)
+	call	*8(%ebp)
+	movl	%ebp,%esp
+	popl	%ebp
+	ret
+.globl	_OPENSSL_ia32_rdrand
+.private_extern	_OPENSSL_ia32_rdrand
+.align	4
+_OPENSSL_ia32_rdrand:
+L_OPENSSL_ia32_rdrand_begin:
+	movl	$8,%ecx
+L019loop:
+.byte	15,199,240
+	jc	L020break
+	loop	L019loop
+L020break:
+	cmpl	$0,%eax
+	cmovel	%ecx,%eax
+	ret
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/md5/md5-586.S b/third_party/boringssl/mac-x86/crypto/md5/md5-586.S
new file mode 100644
index 0000000..6830b16
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/md5/md5-586.S
@@ -0,0 +1,680 @@
+#if defined(__i386__)
+.file	"src/crypto/md5/asm/md5-586.S"
+.text
+.globl	_md5_block_asm_data_order
+.private_extern	_md5_block_asm_data_order
+.align	4
+_md5_block_asm_data_order:
+L_md5_block_asm_data_order_begin:
+	pushl	%esi
+	pushl	%edi
+	movl	12(%esp),%edi
+	movl	16(%esp),%esi
+	movl	20(%esp),%ecx
+	pushl	%ebp
+	shll	$6,%ecx
+	pushl	%ebx
+	addl	%esi,%ecx
+	subl	$64,%ecx
+	movl	(%edi),%eax
+	pushl	%ecx
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+L000start:
+
+	# R0 section 
+	movl	%ecx,%edi
+	movl	(%esi),%ebp
+	# R0 0 
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	3614090360(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	4(%esi),%ebp
+	addl	%ebx,%eax
+	# R0 1 
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	3905402710(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	8(%esi),%ebp
+	addl	%eax,%edx
+	# R0 2 
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	606105819(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	12(%esi),%ebp
+	addl	%edx,%ecx
+	# R0 3 
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	3250441966(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	16(%esi),%ebp
+	addl	%ecx,%ebx
+	# R0 4 
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	4118548399(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	20(%esi),%ebp
+	addl	%ebx,%eax
+	# R0 5 
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	1200080426(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	24(%esi),%ebp
+	addl	%eax,%edx
+	# R0 6 
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	2821735955(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	28(%esi),%ebp
+	addl	%edx,%ecx
+	# R0 7 
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	4249261313(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	32(%esi),%ebp
+	addl	%ecx,%ebx
+	# R0 8 
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	1770035416(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	36(%esi),%ebp
+	addl	%ebx,%eax
+	# R0 9 
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	2336552879(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	40(%esi),%ebp
+	addl	%eax,%edx
+	# R0 10 
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	4294925233(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	44(%esi),%ebp
+	addl	%edx,%ecx
+	# R0 11 
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	2304563134(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	48(%esi),%ebp
+	addl	%ecx,%ebx
+	# R0 12 
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	leal	1804603682(%eax,%ebp,1),%eax
+	xorl	%edx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$7,%eax
+	movl	52(%esi),%ebp
+	addl	%ebx,%eax
+	# R0 13 
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	leal	4254626195(%edx,%ebp,1),%edx
+	xorl	%ecx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$12,%edx
+	movl	56(%esi),%ebp
+	addl	%eax,%edx
+	# R0 14 
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	leal	2792965006(%ecx,%ebp,1),%ecx
+	xorl	%ebx,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$17,%ecx
+	movl	60(%esi),%ebp
+	addl	%edx,%ecx
+	# R0 15 
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	leal	1236535329(%ebx,%ebp,1),%ebx
+	xorl	%eax,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$22,%ebx
+	movl	4(%esi),%ebp
+	addl	%ecx,%ebx
+
+	# R1 section 
+	# R1 16 
+	leal	4129170786(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	24(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+	# R1 17 
+	leal	3225465664(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	44(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+	# R1 18 
+	leal	643717713(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	# R1 19 
+	leal	3921069994(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	20(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	# R1 20 
+	leal	3593408605(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	40(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+	# R1 21 
+	leal	38016083(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	60(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+	# R1 22 
+	leal	3634488961(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	16(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	# R1 23 
+	leal	3889429448(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	36(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	# R1 24 
+	leal	568446438(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	56(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+	# R1 25 
+	leal	3275163606(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	12(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+	# R1 26 
+	leal	4107603335(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	32(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	# R1 27 
+	leal	1163531501(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	52(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	# R1 28 
+	leal	2850285829(%eax,%ebp,1),%eax
+	xorl	%ebx,%edi
+	andl	%edx,%edi
+	movl	8(%esi),%ebp
+	xorl	%ecx,%edi
+	addl	%edi,%eax
+	movl	%ebx,%edi
+	roll	$5,%eax
+	addl	%ebx,%eax
+	# R1 29 
+	leal	4243563512(%edx,%ebp,1),%edx
+	xorl	%eax,%edi
+	andl	%ecx,%edi
+	movl	28(%esi),%ebp
+	xorl	%ebx,%edi
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$9,%edx
+	addl	%eax,%edx
+	# R1 30 
+	leal	1735328473(%ecx,%ebp,1),%ecx
+	xorl	%edx,%edi
+	andl	%ebx,%edi
+	movl	48(%esi),%ebp
+	xorl	%eax,%edi
+	addl	%edi,%ecx
+	movl	%edx,%edi
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	# R1 31 
+	leal	2368359562(%ebx,%ebp,1),%ebx
+	xorl	%ecx,%edi
+	andl	%eax,%edi
+	movl	20(%esi),%ebp
+	xorl	%edx,%edi
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+
+	# R2 section 
+	# R2 32 
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	4294588738(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	32(%esi),%ebp
+	movl	%ebx,%edi
+	# R2 33 
+	leal	2272392833(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	44(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+	# R2 34 
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	1839030562(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	56(%esi),%ebp
+	movl	%edx,%edi
+	# R2 35 
+	leal	4259657740(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	4(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+	# R2 36 
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	2763975236(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	16(%esi),%ebp
+	movl	%ebx,%edi
+	# R2 37 
+	leal	1272893353(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	28(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+	# R2 38 
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	4139469664(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	40(%esi),%ebp
+	movl	%edx,%edi
+	# R2 39 
+	leal	3200236656(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	52(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+	# R2 40 
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	681279174(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	(%esi),%ebp
+	movl	%ebx,%edi
+	# R2 41 
+	leal	3936430074(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	12(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+	# R2 42 
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	3572445317(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	24(%esi),%ebp
+	movl	%edx,%edi
+	# R2 43 
+	leal	76029189(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	36(%esi),%ebp
+	addl	%edi,%ebx
+	movl	%ecx,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+	# R2 44 
+	xorl	%edx,%edi
+	xorl	%ebx,%edi
+	leal	3654602809(%eax,%ebp,1),%eax
+	addl	%edi,%eax
+	roll	$4,%eax
+	movl	48(%esi),%ebp
+	movl	%ebx,%edi
+	# R2 45 
+	leal	3873151461(%edx,%ebp,1),%edx
+	addl	%ebx,%eax
+	xorl	%ecx,%edi
+	xorl	%eax,%edi
+	movl	60(%esi),%ebp
+	addl	%edi,%edx
+	movl	%eax,%edi
+	roll	$11,%edx
+	addl	%eax,%edx
+	# R2 46 
+	xorl	%ebx,%edi
+	xorl	%edx,%edi
+	leal	530742520(%ecx,%ebp,1),%ecx
+	addl	%edi,%ecx
+	roll	$16,%ecx
+	movl	8(%esi),%ebp
+	movl	%edx,%edi
+	# R2 47 
+	leal	3299628645(%ebx,%ebp,1),%ebx
+	addl	%edx,%ecx
+	xorl	%eax,%edi
+	xorl	%ecx,%edi
+	movl	(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$23,%ebx
+	addl	%ecx,%ebx
+
+	# R3 section 
+	# R3 48 
+	xorl	%edx,%edi
+	orl	%ebx,%edi
+	leal	4096336452(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	28(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+	# R3 49 
+	orl	%eax,%edi
+	leal	1126891415(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	56(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+	# R3 50 
+	orl	%edx,%edi
+	leal	2878612391(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	20(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	# R3 51 
+	orl	%ecx,%edi
+	leal	4237533241(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	48(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+	# R3 52 
+	orl	%ebx,%edi
+	leal	1700485571(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	12(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+	# R3 53 
+	orl	%eax,%edi
+	leal	2399980690(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	40(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+	# R3 54 
+	orl	%edx,%edi
+	leal	4293915773(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	4(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	# R3 55 
+	orl	%ecx,%edi
+	leal	2240044497(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	32(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+	# R3 56 
+	orl	%ebx,%edi
+	leal	1873313359(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	60(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+	# R3 57 
+	orl	%eax,%edi
+	leal	4264355552(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	24(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+	# R3 58 
+	orl	%edx,%edi
+	leal	2734768916(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	52(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	# R3 59 
+	orl	%ecx,%edi
+	leal	1309151649(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	16(%esi),%ebp
+	addl	%edi,%ebx
+	movl	$-1,%edi
+	roll	$21,%ebx
+	xorl	%edx,%edi
+	addl	%ecx,%ebx
+	# R3 60 
+	orl	%ebx,%edi
+	leal	4149444226(%eax,%ebp,1),%eax
+	xorl	%ecx,%edi
+	movl	44(%esi),%ebp
+	addl	%edi,%eax
+	movl	$-1,%edi
+	roll	$6,%eax
+	xorl	%ecx,%edi
+	addl	%ebx,%eax
+	# R3 61 
+	orl	%eax,%edi
+	leal	3174756917(%edx,%ebp,1),%edx
+	xorl	%ebx,%edi
+	movl	8(%esi),%ebp
+	addl	%edi,%edx
+	movl	$-1,%edi
+	roll	$10,%edx
+	xorl	%ebx,%edi
+	addl	%eax,%edx
+	# R3 62 
+	orl	%edx,%edi
+	leal	718787259(%ecx,%ebp,1),%ecx
+	xorl	%eax,%edi
+	movl	36(%esi),%ebp
+	addl	%edi,%ecx
+	movl	$-1,%edi
+	roll	$15,%ecx
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	# R3 63 
+	orl	%ecx,%edi
+	leal	3951481745(%ebx,%ebp,1),%ebx
+	xorl	%edx,%edi
+	movl	24(%esp),%ebp
+	addl	%edi,%ebx
+	addl	$64,%esi
+	roll	$21,%ebx
+	movl	(%ebp),%edi
+	addl	%ecx,%ebx
+	addl	%edi,%eax
+	movl	4(%ebp),%edi
+	addl	%edi,%ebx
+	movl	8(%ebp),%edi
+	addl	%edi,%ecx
+	movl	12(%ebp),%edi
+	addl	%edi,%edx
+	movl	%eax,(%ebp)
+	movl	%ebx,4(%ebp)
+	movl	(%esp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%edx,12(%ebp)
+	cmpl	%esi,%edi
+	jae	L000start
+	popl	%eax
+	popl	%ebx
+	popl	%ebp
+	popl	%edi
+	popl	%esi
+	ret
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S b/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S
new file mode 100644
index 0000000..8693b82
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/modes/ghash-x86.S
@@ -0,0 +1,1260 @@
+#if defined(__i386__)
+.file	"ghash-x86.S"
+.text
+.globl	_gcm_gmult_4bit_x86
+.private_extern	_gcm_gmult_4bit_x86
+.align	4
+_gcm_gmult_4bit_x86:
+L_gcm_gmult_4bit_x86_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	subl	$84,%esp
+	movl	104(%esp),%edi
+	movl	108(%esp),%esi
+	movl	(%edi),%ebp
+	movl	4(%edi),%edx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%ebx
+	movl	$0,16(%esp)
+	movl	$471859200,20(%esp)
+	movl	$943718400,24(%esp)
+	movl	$610271232,28(%esp)
+	movl	$1887436800,32(%esp)
+	movl	$1822425088,36(%esp)
+	movl	$1220542464,40(%esp)
+	movl	$1423966208,44(%esp)
+	movl	$3774873600,48(%esp)
+	movl	$4246732800,52(%esp)
+	movl	$3644850176,56(%esp)
+	movl	$3311403008,60(%esp)
+	movl	$2441084928,64(%esp)
+	movl	$2376073216,68(%esp)
+	movl	$2847932416,72(%esp)
+	movl	$3051356160,76(%esp)
+	movl	%ebp,(%esp)
+	movl	%edx,4(%esp)
+	movl	%ecx,8(%esp)
+	movl	%ebx,12(%esp)
+	shrl	$20,%ebx
+	andl	$240,%ebx
+	movl	4(%esi,%ebx,1),%ebp
+	movl	(%esi,%ebx,1),%edx
+	movl	12(%esi,%ebx,1),%ecx
+	movl	8(%esi,%ebx,1),%ebx
+	xorl	%eax,%eax
+	movl	$15,%edi
+	jmp	L000x86_loop
+.align	4,0x90
+L000x86_loop:
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	andb	$240,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	decl	%edi
+	js	L001x86_break
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	shlb	$4,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	jmp	L000x86_loop
+.align	4,0x90
+L001x86_break:
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	bswap	%ebp
+	movl	104(%esp),%edi
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,4(%edi)
+	movl	%ebp,(%edi)
+	addl	$84,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_gcm_ghash_4bit_x86
+.private_extern	_gcm_ghash_4bit_x86
+.align	4
+_gcm_ghash_4bit_x86:
+L_gcm_ghash_4bit_x86_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	subl	$84,%esp
+	movl	104(%esp),%ebx
+	movl	108(%esp),%esi
+	movl	112(%esp),%edi
+	movl	116(%esp),%ecx
+	addl	%edi,%ecx
+	movl	%ecx,116(%esp)
+	movl	(%ebx),%ebp
+	movl	4(%ebx),%edx
+	movl	8(%ebx),%ecx
+	movl	12(%ebx),%ebx
+	movl	$0,16(%esp)
+	movl	$471859200,20(%esp)
+	movl	$943718400,24(%esp)
+	movl	$610271232,28(%esp)
+	movl	$1887436800,32(%esp)
+	movl	$1822425088,36(%esp)
+	movl	$1220542464,40(%esp)
+	movl	$1423966208,44(%esp)
+	movl	$3774873600,48(%esp)
+	movl	$4246732800,52(%esp)
+	movl	$3644850176,56(%esp)
+	movl	$3311403008,60(%esp)
+	movl	$2441084928,64(%esp)
+	movl	$2376073216,68(%esp)
+	movl	$2847932416,72(%esp)
+	movl	$3051356160,76(%esp)
+.align	4,0x90
+L002x86_outer_loop:
+	xorl	12(%edi),%ebx
+	xorl	8(%edi),%ecx
+	xorl	4(%edi),%edx
+	xorl	(%edi),%ebp
+	movl	%ebx,12(%esp)
+	movl	%ecx,8(%esp)
+	movl	%edx,4(%esp)
+	movl	%ebp,(%esp)
+	shrl	$20,%ebx
+	andl	$240,%ebx
+	movl	4(%esi,%ebx,1),%ebp
+	movl	(%esi,%ebx,1),%edx
+	movl	12(%esi,%ebx,1),%ecx
+	movl	8(%esi,%ebx,1),%ebx
+	xorl	%eax,%eax
+	movl	$15,%edi
+	jmp	L003x86_loop
+.align	4,0x90
+L003x86_loop:
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	andb	$240,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	decl	%edi
+	js	L004x86_break
+	movb	%bl,%al
+	shrdl	$4,%ecx,%ebx
+	andb	$15,%al
+	shrdl	$4,%edx,%ecx
+	shrdl	$4,%ebp,%edx
+	shrl	$4,%ebp
+	xorl	16(%esp,%eax,4),%ebp
+	movb	(%esp,%edi,1),%al
+	shlb	$4,%al
+	xorl	8(%esi,%eax,1),%ebx
+	xorl	12(%esi,%eax,1),%ecx
+	xorl	(%esi,%eax,1),%edx
+	xorl	4(%esi,%eax,1),%ebp
+	jmp	L003x86_loop
+.align	4,0x90
+L004x86_break:
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	bswap	%ebp
+	movl	112(%esp),%edi
+	leal	16(%edi),%edi
+	cmpl	116(%esp),%edi
+	movl	%edi,112(%esp)
+	jb	L002x86_outer_loop
+	movl	104(%esp),%edi
+	movl	%ebx,12(%edi)
+	movl	%ecx,8(%edi)
+	movl	%edx,4(%edi)
+	movl	%ebp,(%edi)
+	addl	$84,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_gcm_gmult_4bit_mmx
+.private_extern	_gcm_gmult_4bit_mmx
+.align	4
+_gcm_gmult_4bit_mmx:
+L_gcm_gmult_4bit_mmx_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%esi
+	call	L005pic_point
+L005pic_point:
+	popl	%eax
+	leal	Lrem_4bit-L005pic_point(%eax),%eax
+	movzbl	15(%edi),%ebx
+	xorl	%ecx,%ecx
+	movl	%ebx,%edx
+	movb	%dl,%cl
+	movl	$14,%ebp
+	shlb	$4,%cl
+	andl	$240,%edx
+	movq	8(%esi,%ecx,1),%mm0
+	movq	(%esi,%ecx,1),%mm1
+	movd	%mm0,%ebx
+	jmp	L006mmx_loop
+.align	4,0x90
+L006mmx_loop:
+	psrlq	$4,%mm0
+	andl	$15,%ebx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%edx,1),%mm0
+	movb	(%edi,%ebp,1),%cl
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	decl	%ebp
+	movd	%mm0,%ebx
+	pxor	(%esi,%edx,1),%mm1
+	movl	%ecx,%edx
+	pxor	%mm2,%mm0
+	js	L007mmx_break
+	shlb	$4,%cl
+	andl	$15,%ebx
+	psrlq	$4,%mm0
+	andl	$240,%edx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%ecx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%ecx,1),%mm1
+	pxor	%mm2,%mm0
+	jmp	L006mmx_loop
+.align	4,0x90
+L007mmx_break:
+	shlb	$4,%cl
+	andl	$15,%ebx
+	psrlq	$4,%mm0
+	andl	$240,%edx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%ecx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%ecx,1),%mm1
+	pxor	%mm2,%mm0
+	psrlq	$4,%mm0
+	andl	$15,%ebx
+	movq	%mm1,%mm2
+	psrlq	$4,%mm1
+	pxor	8(%esi,%edx,1),%mm0
+	psllq	$60,%mm2
+	pxor	(%eax,%ebx,8),%mm1
+	movd	%mm0,%ebx
+	pxor	(%esi,%edx,1),%mm1
+	pxor	%mm2,%mm0
+	psrlq	$32,%mm0
+	movd	%mm1,%edx
+	psrlq	$32,%mm1
+	movd	%mm0,%ecx
+	movd	%mm1,%ebp
+	bswap	%ebx
+	bswap	%edx
+	bswap	%ecx
+	bswap	%ebp
+	emms
+	movl	%ebx,12(%edi)
+	movl	%edx,4(%edi)
+	movl	%ecx,8(%edi)
+	movl	%ebp,(%edi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_gcm_ghash_4bit_mmx
+.private_extern	_gcm_ghash_4bit_mmx
+.align	4
+_gcm_ghash_4bit_mmx:
+L_gcm_ghash_4bit_mmx_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%eax
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ecx
+	movl	32(%esp),%edx
+	movl	%esp,%ebp
+	call	L008pic_point
+L008pic_point:
+	popl	%esi
+	leal	Lrem_8bit-L008pic_point(%esi),%esi
+	subl	$544,%esp
+	andl	$-64,%esp
+	subl	$16,%esp
+	addl	%ecx,%edx
+	movl	%eax,544(%esp)
+	movl	%edx,552(%esp)
+	movl	%ebp,556(%esp)
+	addl	$128,%ebx
+	leal	144(%esp),%edi
+	leal	400(%esp),%ebp
+	movl	-120(%ebx),%edx
+	movq	-120(%ebx),%mm0
+	movq	-128(%ebx),%mm3
+	shll	$4,%edx
+	movb	%dl,(%esp)
+	movl	-104(%ebx),%edx
+	movq	-104(%ebx),%mm2
+	movq	-112(%ebx),%mm5
+	movq	%mm0,-128(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,(%edi)
+	movq	%mm3,%mm7
+	psrlq	$4,%mm3
+	shll	$4,%edx
+	movb	%dl,1(%esp)
+	movl	-88(%ebx),%edx
+	movq	-88(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	-96(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-120(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,8(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-128(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,(%ebp)
+	shll	$4,%edx
+	movb	%dl,2(%esp)
+	movl	-72(%ebx),%edx
+	movq	-72(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	-80(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-112(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,16(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-120(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,8(%ebp)
+	shll	$4,%edx
+	movb	%dl,3(%esp)
+	movl	-56(%ebx),%edx
+	movq	-56(%ebx),%mm2
+	psllq	$60,%mm7
+	movq	-64(%ebx),%mm5
+	por	%mm7,%mm1
+	movq	%mm0,-104(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,24(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-112(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,16(%ebp)
+	shll	$4,%edx
+	movb	%dl,4(%esp)
+	movl	-40(%ebx),%edx
+	movq	-40(%ebx),%mm1
+	psllq	$60,%mm6
+	movq	-48(%ebx),%mm4
+	por	%mm6,%mm0
+	movq	%mm2,-96(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,32(%edi)
+	movq	%mm5,%mm7
+	movq	%mm0,-104(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,24(%ebp)
+	shll	$4,%edx
+	movb	%dl,5(%esp)
+	movl	-24(%ebx),%edx
+	movq	-24(%ebx),%mm0
+	psllq	$60,%mm7
+	movq	-32(%ebx),%mm3
+	por	%mm7,%mm2
+	movq	%mm1,-88(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,40(%edi)
+	movq	%mm4,%mm6
+	movq	%mm2,-96(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,32(%ebp)
+	shll	$4,%edx
+	movb	%dl,6(%esp)
+	movl	-8(%ebx),%edx
+	movq	-8(%ebx),%mm2
+	psllq	$60,%mm6
+	movq	-16(%ebx),%mm5
+	por	%mm6,%mm1
+	movq	%mm0,-80(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,48(%edi)
+	movq	%mm3,%mm7
+	movq	%mm1,-88(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,40(%ebp)
+	shll	$4,%edx
+	movb	%dl,7(%esp)
+	movl	8(%ebx),%edx
+	movq	8(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-72(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,56(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-80(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,48(%ebp)
+	shll	$4,%edx
+	movb	%dl,8(%esp)
+	movl	24(%ebx),%edx
+	movq	24(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	16(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-64(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,64(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-72(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,56(%ebp)
+	shll	$4,%edx
+	movb	%dl,9(%esp)
+	movl	40(%ebx),%edx
+	movq	40(%ebx),%mm2
+	psllq	$60,%mm7
+	movq	32(%ebx),%mm5
+	por	%mm7,%mm1
+	movq	%mm0,-56(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,72(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-64(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,64(%ebp)
+	shll	$4,%edx
+	movb	%dl,10(%esp)
+	movl	56(%ebx),%edx
+	movq	56(%ebx),%mm1
+	psllq	$60,%mm6
+	movq	48(%ebx),%mm4
+	por	%mm6,%mm0
+	movq	%mm2,-48(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,80(%edi)
+	movq	%mm5,%mm7
+	movq	%mm0,-56(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,72(%ebp)
+	shll	$4,%edx
+	movb	%dl,11(%esp)
+	movl	72(%ebx),%edx
+	movq	72(%ebx),%mm0
+	psllq	$60,%mm7
+	movq	64(%ebx),%mm3
+	por	%mm7,%mm2
+	movq	%mm1,-40(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,88(%edi)
+	movq	%mm4,%mm6
+	movq	%mm2,-48(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,80(%ebp)
+	shll	$4,%edx
+	movb	%dl,12(%esp)
+	movl	88(%ebx),%edx
+	movq	88(%ebx),%mm2
+	psllq	$60,%mm6
+	movq	80(%ebx),%mm5
+	por	%mm6,%mm1
+	movq	%mm0,-32(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,96(%edi)
+	movq	%mm3,%mm7
+	movq	%mm1,-40(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,88(%ebp)
+	shll	$4,%edx
+	movb	%dl,13(%esp)
+	movl	104(%ebx),%edx
+	movq	104(%ebx),%mm1
+	psllq	$60,%mm7
+	movq	96(%ebx),%mm4
+	por	%mm7,%mm0
+	movq	%mm2,-24(%edi)
+	psrlq	$4,%mm2
+	movq	%mm5,104(%edi)
+	movq	%mm5,%mm6
+	movq	%mm0,-32(%ebp)
+	psrlq	$4,%mm5
+	movq	%mm3,96(%ebp)
+	shll	$4,%edx
+	movb	%dl,14(%esp)
+	movl	120(%ebx),%edx
+	movq	120(%ebx),%mm0
+	psllq	$60,%mm6
+	movq	112(%ebx),%mm3
+	por	%mm6,%mm2
+	movq	%mm1,-16(%edi)
+	psrlq	$4,%mm1
+	movq	%mm4,112(%edi)
+	movq	%mm4,%mm7
+	movq	%mm2,-24(%ebp)
+	psrlq	$4,%mm4
+	movq	%mm5,104(%ebp)
+	shll	$4,%edx
+	movb	%dl,15(%esp)
+	psllq	$60,%mm7
+	por	%mm7,%mm1
+	movq	%mm0,-8(%edi)
+	psrlq	$4,%mm0
+	movq	%mm3,120(%edi)
+	movq	%mm3,%mm6
+	movq	%mm1,-16(%ebp)
+	psrlq	$4,%mm3
+	movq	%mm4,112(%ebp)
+	psllq	$60,%mm6
+	por	%mm6,%mm0
+	movq	%mm0,-8(%ebp)
+	movq	%mm3,120(%ebp)
+	movq	(%eax),%mm6
+	movl	8(%eax),%ebx
+	movl	12(%eax),%edx
+.align	4,0x90
+L009outer:
+	xorl	12(%ecx),%edx
+	xorl	8(%ecx),%ebx
+	pxor	(%ecx),%mm6
+	leal	16(%ecx),%ecx
+	movl	%ebx,536(%esp)
+	movq	%mm6,528(%esp)
+	movl	%ecx,548(%esp)
+	xorl	%eax,%eax
+	roll	$8,%edx
+	movb	%dl,%al
+	movl	%eax,%ebp
+	andb	$15,%al
+	shrl	$4,%ebp
+	pxor	%mm0,%mm0
+	roll	$8,%edx
+	pxor	%mm1,%mm1
+	pxor	%mm2,%mm2
+	movq	16(%esp,%eax,8),%mm7
+	movq	144(%esp,%eax,8),%mm6
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	shrl	$4,%edi
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	536(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	532(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	528(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm1,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm0
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	movb	%dl,%al
+	movd	%mm7,%ecx
+	movzbl	%bl,%ebx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%ebp
+	psrlq	$8,%mm6
+	pxor	272(%esp,%edi,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm0,%mm6
+	shrl	$4,%ebp
+	pinsrw	$2,(%esi,%ebx,2),%mm2
+	pxor	16(%esp,%eax,8),%mm7
+	roll	$8,%edx
+	pxor	144(%esp,%eax,8),%mm6
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%edi,8),%mm6
+	xorb	(%esp,%edi,1),%cl
+	movb	%dl,%al
+	movl	524(%esp),%edx
+	movd	%mm7,%ebx
+	movzbl	%cl,%ecx
+	psrlq	$8,%mm7
+	movq	%mm6,%mm3
+	movl	%eax,%edi
+	psrlq	$8,%mm6
+	pxor	272(%esp,%ebp,8),%mm7
+	andb	$15,%al
+	psllq	$56,%mm3
+	pxor	%mm2,%mm6
+	shrl	$4,%edi
+	pinsrw	$2,(%esi,%ecx,2),%mm1
+	pxor	16(%esp,%eax,8),%mm7
+	pxor	144(%esp,%eax,8),%mm6
+	xorb	(%esp,%ebp,1),%bl
+	pxor	%mm3,%mm7
+	pxor	400(%esp,%ebp,8),%mm6
+	movzbl	%bl,%ebx
+	pxor	%mm2,%mm2
+	psllq	$4,%mm1
+	movd	%mm7,%ecx
+	psrlq	$4,%mm7
+	movq	%mm6,%mm3
+	psrlq	$4,%mm6
+	shll	$4,%ecx
+	pxor	16(%esp,%edi,8),%mm7
+	psllq	$60,%mm3
+	movzbl	%cl,%ecx
+	pxor	%mm3,%mm7
+	pxor	144(%esp,%edi,8),%mm6
+	pinsrw	$2,(%esi,%ebx,2),%mm0
+	pxor	%mm1,%mm6
+	movd	%mm7,%edx
+	pinsrw	$3,(%esi,%ecx,2),%mm2
+	psllq	$12,%mm0
+	pxor	%mm0,%mm6
+	psrlq	$32,%mm7
+	pxor	%mm2,%mm6
+	movl	548(%esp),%ecx
+	movd	%mm7,%ebx
+	movq	%mm6,%mm3
+	psllw	$8,%mm6
+	psrlw	$8,%mm3
+	por	%mm3,%mm6
+	bswap	%edx
+	pshufw	$27,%mm6,%mm6
+	bswap	%ebx
+	cmpl	552(%esp),%ecx
+	jne	L009outer
+	movl	544(%esp),%eax
+	movl	%edx,12(%eax)
+	movl	%ebx,8(%eax)
+	movq	%mm6,(%eax)
+	movl	556(%esp),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_gcm_init_clmul
+.private_extern	_gcm_init_clmul
+.align	4
+_gcm_init_clmul:
+L_gcm_init_clmul_begin:
+	movl	4(%esp),%edx
+	movl	8(%esp),%eax
+	call	L010pic
+L010pic:
+	popl	%ecx
+	leal	Lbswap-L010pic(%ecx),%ecx
+	movdqu	(%eax),%xmm2
+	pshufd	$78,%xmm2,%xmm2
+	pshufd	$255,%xmm2,%xmm4
+	movdqa	%xmm2,%xmm3
+	psllq	$1,%xmm2
+	pxor	%xmm5,%xmm5
+	psrlq	$63,%xmm3
+	pcmpgtd	%xmm4,%xmm5
+	pslldq	$8,%xmm3
+	por	%xmm3,%xmm2
+	pand	16(%ecx),%xmm5
+	pxor	%xmm5,%xmm2
+	movdqa	%xmm2,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pshufd	$78,%xmm2,%xmm4
+	pxor	%xmm0,%xmm3
+	pxor	%xmm2,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm2,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm2,%xmm3
+	movdqu	%xmm2,(%edx)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,16(%edx)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,32(%edx)
+	ret
+.globl	_gcm_gmult_clmul
+.private_extern	_gcm_gmult_clmul
+.align	4
+_gcm_gmult_clmul:
+L_gcm_gmult_clmul_begin:
+	movl	4(%esp),%eax
+	movl	8(%esp),%edx
+	call	L011pic
+L011pic:
+	popl	%ecx
+	leal	Lbswap-L011pic(%ecx),%ecx
+	movdqu	(%eax),%xmm0
+	movdqa	(%ecx),%xmm5
+	movups	(%edx),%xmm2
+.byte	102,15,56,0,197
+	movups	32(%edx),%xmm4
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%eax)
+	ret
+.globl	_gcm_ghash_clmul
+.private_extern	_gcm_ghash_clmul
+.align	4
+_gcm_ghash_clmul:
+L_gcm_ghash_clmul_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%eax
+	movl	24(%esp),%edx
+	movl	28(%esp),%esi
+	movl	32(%esp),%ebx
+	call	L012pic
+L012pic:
+	popl	%ecx
+	leal	Lbswap-L012pic(%ecx),%ecx
+	movdqu	(%eax),%xmm0
+	movdqa	(%ecx),%xmm5
+	movdqu	(%edx),%xmm2
+.byte	102,15,56,0,197
+	subl	$16,%ebx
+	jz	L013odd_tail
+	movdqu	(%esi),%xmm3
+	movdqu	16(%esi),%xmm6
+.byte	102,15,56,0,221
+.byte	102,15,56,0,245
+	movdqu	32(%edx),%xmm5
+	pxor	%xmm3,%xmm0
+	pshufd	$78,%xmm6,%xmm3
+	movdqa	%xmm6,%xmm7
+	pxor	%xmm6,%xmm3
+	leal	32(%esi),%esi
+.byte	102,15,58,68,242,0
+.byte	102,15,58,68,250,17
+.byte	102,15,58,68,221,0
+	movups	16(%edx),%xmm2
+	nop
+	subl	$32,%ebx
+	jbe	L014even_tail
+	jmp	L015mod_loop
+.align	5,0x90
+L015mod_loop:
+	pshufd	$78,%xmm0,%xmm4
+	movdqa	%xmm0,%xmm1
+	pxor	%xmm0,%xmm4
+	nop
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,229,16
+	movups	(%edx),%xmm2
+	xorps	%xmm6,%xmm0
+	movdqa	(%ecx),%xmm5
+	xorps	%xmm7,%xmm1
+	movdqu	(%esi),%xmm7
+	pxor	%xmm0,%xmm3
+	movdqu	16(%esi),%xmm6
+	pxor	%xmm1,%xmm3
+.byte	102,15,56,0,253
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm4,%xmm3
+	psrldq	$8,%xmm4
+	pslldq	$8,%xmm3
+	pxor	%xmm4,%xmm1
+	pxor	%xmm3,%xmm0
+.byte	102,15,56,0,245
+	pxor	%xmm7,%xmm1
+	movdqa	%xmm6,%xmm7
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+.byte	102,15,58,68,242,0
+	movups	32(%edx),%xmm5
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	pshufd	$78,%xmm7,%xmm3
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm7,%xmm3
+	pxor	%xmm4,%xmm1
+.byte	102,15,58,68,250,17
+	movups	16(%edx),%xmm2
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,58,68,221,0
+	leal	32(%esi),%esi
+	subl	$32,%ebx
+	ja	L015mod_loop
+L014even_tail:
+	pshufd	$78,%xmm0,%xmm4
+	movdqa	%xmm0,%xmm1
+	pxor	%xmm0,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,229,16
+	movdqa	(%ecx),%xmm5
+	xorps	%xmm6,%xmm0
+	xorps	%xmm7,%xmm1
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm4,%xmm3
+	psrldq	$8,%xmm4
+	pslldq	$8,%xmm3
+	pxor	%xmm4,%xmm1
+	pxor	%xmm3,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	testl	%ebx,%ebx
+	jnz	L016done
+	movups	(%edx),%xmm2
+L013odd_tail:
+	movdqu	(%esi),%xmm3
+.byte	102,15,56,0,221
+	pxor	%xmm3,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pshufd	$78,%xmm2,%xmm4
+	pxor	%xmm0,%xmm3
+	pxor	%xmm2,%xmm4
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	xorps	%xmm0,%xmm3
+	xorps	%xmm1,%xmm3
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+L016done:
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%eax)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	6,0x90
+Lbswap:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.byte	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194
+.align	6,0x90
+Lrem_8bit:
+.value	0,450,900,582,1800,1738,1164,1358
+.value	3600,4050,3476,3158,2328,2266,2716,2910
+.value	7200,7650,8100,7782,6952,6890,6316,6510
+.value	4656,5106,4532,4214,5432,5370,5820,6014
+.value	14400,14722,15300,14854,16200,16010,15564,15630
+.value	13904,14226,13780,13334,12632,12442,13020,13086
+.value	9312,9634,10212,9766,9064,8874,8428,8494
+.value	10864,11186,10740,10294,11640,11450,12028,12094
+.value	28800,28994,29444,29382,30600,30282,29708,30158
+.value	32400,32594,32020,31958,31128,30810,31260,31710
+.value	27808,28002,28452,28390,27560,27242,26668,27118
+.value	25264,25458,24884,24822,26040,25722,26172,26622
+.value	18624,18690,19268,19078,20424,19978,19532,19854
+.value	18128,18194,17748,17558,16856,16410,16988,17310
+.value	21728,21794,22372,22182,21480,21034,20588,20910
+.value	23280,23346,22900,22710,24056,23610,24188,24510
+.value	57600,57538,57988,58182,58888,59338,58764,58446
+.value	61200,61138,60564,60758,59416,59866,60316,59998
+.value	64800,64738,65188,65382,64040,64490,63916,63598
+.value	62256,62194,61620,61814,62520,62970,63420,63102
+.value	55616,55426,56004,56070,56904,57226,56780,56334
+.value	55120,54930,54484,54550,53336,53658,54236,53790
+.value	50528,50338,50916,50982,49768,50090,49644,49198
+.value	52080,51890,51444,51510,52344,52666,53244,52798
+.value	37248,36930,37380,37830,38536,38730,38156,38094
+.value	40848,40530,39956,40406,39064,39258,39708,39646
+.value	36256,35938,36388,36838,35496,35690,35116,35054
+.value	33712,33394,32820,33270,33976,34170,34620,34558
+.value	43456,43010,43588,43910,44744,44810,44364,44174
+.value	42960,42514,42068,42390,41176,41242,41820,41630
+.value	46560,46114,46692,47014,45800,45866,45420,45230
+.value	48112,47666,47220,47542,48376,48442,49020,48830
+.align	6,0x90
+Lrem_4bit:
+.long	0,0,0,471859200,0,943718400,0,610271232
+.long	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+.long	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+.long	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+.byte	71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67
+.byte	82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112
+.byte	112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62
+.byte	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S b/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S
new file mode 100644
index 0000000..faecdfa
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/rc4/rc4-586.S
@@ -0,0 +1,383 @@
+#if defined(__i386__)
+.file	"rc4-586.S"
+.text
+.globl	_asm_RC4
+.private_extern	_asm_RC4
+.align	4
+_asm_RC4:
+L_asm_RC4_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%edx
+	movl	28(%esp),%esi
+	movl	32(%esp),%ebp
+	xorl	%eax,%eax
+	xorl	%ebx,%ebx
+	cmpl	$0,%edx
+	je	L000abort
+	movb	(%edi),%al
+	movb	4(%edi),%bl
+	addl	$8,%edi
+	leal	(%esi,%edx,1),%ecx
+	subl	%esi,%ebp
+	movl	%ecx,24(%esp)
+	incb	%al
+	cmpl	$-1,256(%edi)
+	je	L001RC4_CHAR
+	movl	(%edi,%eax,4),%ecx
+	andl	$-4,%edx
+	jz	L002loop1
+	movl	%ebp,32(%esp)
+	testl	$-8,%edx
+	jz	L003go4loop4
+	call	L004PIC_me_up
+L004PIC_me_up:
+	popl	%ebp
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L004PIC_me_up(%ebp),%ebp
+	btl	$26,(%ebp)
+	jnc	L003go4loop4
+	movl	32(%esp),%ebp
+	andl	$-8,%edx
+	leal	-8(%esi,%edx,1),%edx
+	movl	%edx,-4(%edi)
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	movq	(%esi),%mm0
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm2
+	jmp	L005loop_mmx_enter
+.align	4,0x90
+L006loop_mmx:
+	addb	%cl,%bl
+	psllq	$56,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movq	(%esi),%mm0
+	movq	%mm2,-8(%ebp,%esi,1)
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm2
+L005loop_mmx_enter:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm0,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$8,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$16,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$24,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$32,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$40,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	addb	%cl,%bl
+	psllq	$48,%mm1
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	incl	%eax
+	addl	%ecx,%edx
+	movzbl	%al,%eax
+	movzbl	%dl,%edx
+	pxor	%mm1,%mm2
+	movl	(%edi,%eax,4),%ecx
+	movd	(%edi,%edx,4),%mm1
+	movl	%ebx,%edx
+	xorl	%ebx,%ebx
+	movb	%dl,%bl
+	cmpl	-4(%edi),%esi
+	leal	8(%esi),%esi
+	jb	L006loop_mmx
+	psllq	$56,%mm1
+	pxor	%mm1,%mm2
+	movq	%mm2,-8(%ebp,%esi,1)
+	emms
+	cmpl	24(%esp),%esi
+	je	L007done
+	jmp	L002loop1
+.align	4,0x90
+L003go4loop4:
+	leal	-4(%esi,%edx,1),%edx
+	movl	%edx,28(%esp)
+L008loop4:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	movl	(%edi,%eax,4),%ecx
+	movl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	(%edi,%eax,4),%ecx
+	orl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	(%edi,%eax,4),%ecx
+	orl	(%edi,%edx,4),%ebp
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	rorl	$8,%ebp
+	movl	32(%esp),%ecx
+	orl	(%edi,%edx,4),%ebp
+	rorl	$8,%ebp
+	xorl	(%esi),%ebp
+	cmpl	28(%esp),%esi
+	movl	%ebp,(%ecx,%esi,1)
+	leal	4(%esi),%esi
+	movl	(%edi,%eax,4),%ecx
+	jb	L008loop4
+	cmpl	24(%esp),%esi
+	je	L007done
+	movl	32(%esp),%ebp
+.align	4,0x90
+L002loop1:
+	addb	%cl,%bl
+	movl	(%edi,%ebx,4),%edx
+	movl	%ecx,(%edi,%ebx,4)
+	movl	%edx,(%edi,%eax,4)
+	addl	%ecx,%edx
+	incb	%al
+	andl	$255,%edx
+	movl	(%edi,%edx,4),%edx
+	xorb	(%esi),%dl
+	leal	1(%esi),%esi
+	movl	(%edi,%eax,4),%ecx
+	cmpl	24(%esp),%esi
+	movb	%dl,-1(%ebp,%esi,1)
+	jb	L002loop1
+	jmp	L007done
+.align	4,0x90
+L001RC4_CHAR:
+	movzbl	(%edi,%eax,1),%ecx
+L009cloop1:
+	addb	%cl,%bl
+	movzbl	(%edi,%ebx,1),%edx
+	movb	%cl,(%edi,%ebx,1)
+	movb	%dl,(%edi,%eax,1)
+	addb	%cl,%dl
+	movzbl	(%edi,%edx,1),%edx
+	addb	$1,%al
+	xorb	(%esi),%dl
+	leal	1(%esi),%esi
+	movzbl	(%edi,%eax,1),%ecx
+	cmpl	24(%esp),%esi
+	movb	%dl,-1(%ebp,%esi,1)
+	jb	L009cloop1
+L007done:
+	decb	%al
+	movl	%ebx,-4(%edi)
+	movb	%al,-8(%edi)
+L000abort:
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_asm_RC4_set_key
+.private_extern	_asm_RC4_set_key
+.align	4
+_asm_RC4_set_key:
+L_asm_RC4_set_key_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebp
+	movl	28(%esp),%esi
+	call	L010PIC_me_up
+L010PIC_me_up:
+	popl	%edx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%edx),%edx
+	leal	8(%edi),%edi
+	leal	(%esi,%ebp,1),%esi
+	negl	%ebp
+	xorl	%eax,%eax
+	movl	%ebp,-4(%edi)
+	btl	$20,(%edx)
+	jc	L011c1stloop
+.align	4,0x90
+L012w1stloop:
+	movl	%eax,(%edi,%eax,4)
+	addb	$1,%al
+	jnc	L012w1stloop
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+.align	4,0x90
+L013w2ndloop:
+	movl	(%edi,%ecx,4),%eax
+	addb	(%esi,%ebp,1),%dl
+	addb	%al,%dl
+	addl	$1,%ebp
+	movl	(%edi,%edx,4),%ebx
+	jnz	L014wnowrap
+	movl	-4(%edi),%ebp
+L014wnowrap:
+	movl	%eax,(%edi,%edx,4)
+	movl	%ebx,(%edi,%ecx,4)
+	addb	$1,%cl
+	jnc	L013w2ndloop
+	jmp	L015exit
+.align	4,0x90
+L011c1stloop:
+	movb	%al,(%edi,%eax,1)
+	addb	$1,%al
+	jnc	L011c1stloop
+	xorl	%ecx,%ecx
+	xorl	%edx,%edx
+	xorl	%ebx,%ebx
+.align	4,0x90
+L016c2ndloop:
+	movb	(%edi,%ecx,1),%al
+	addb	(%esi,%ebp,1),%dl
+	addb	%al,%dl
+	addl	$1,%ebp
+	movb	(%edi,%edx,1),%bl
+	jnz	L017cnowrap
+	movl	-4(%edi),%ebp
+L017cnowrap:
+	movb	%al,(%edi,%edx,1)
+	movb	%bl,(%edi,%ecx,1)
+	addb	$1,%cl
+	jnc	L016c2ndloop
+	movl	$-1,256(%edi)
+L015exit:
+	xorl	%eax,%eax
+	movl	%eax,-8(%edi)
+	movl	%eax,-4(%edi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.globl	_RC4_options
+.private_extern	_RC4_options
+.align	4
+_RC4_options:
+L_RC4_options_begin:
+	call	L018pic_point
+L018pic_point:
+	popl	%eax
+	leal	L019opts-L018pic_point(%eax),%eax
+	call	L020PIC_me_up
+L020PIC_me_up:
+	popl	%edx
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L020PIC_me_up(%edx),%edx
+	movl	(%edx),%edx
+	btl	$20,%edx
+	jc	L0211xchar
+	btl	$26,%edx
+	jnc	L022ret
+	addl	$25,%eax
+	ret
+L0211xchar:
+	addl	$12,%eax
+L022ret:
+	ret
+.align	6,0x90
+L019opts:
+.byte	114,99,52,40,52,120,44,105,110,116,41,0
+.byte	114,99,52,40,49,120,44,99,104,97,114,41,0
+.byte	114,99,52,40,56,120,44,109,109,120,41,0
+.byte	82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
+.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.align	6,0x90
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S
new file mode 100644
index 0000000..97aafbf
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/sha/sha1-586.S
@@ -0,0 +1,2797 @@
+#if defined(__i386__)
+.file	"sha1-586.S"
+.text
+.globl	_sha1_block_data_order
+.private_extern	_sha1_block_data_order
+.align	4
+_sha1_block_data_order:
+L_sha1_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	L000pic_point
+L000pic_point:
+	popl	%ebp
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L000pic_point(%ebp),%esi
+	leal	LK_XX_XX-L000pic_point(%ebp),%ebp
+	movl	(%esi),%eax
+	movl	4(%esi),%edx
+	testl	$512,%edx
+	jz	L001x86
+	movl	8(%esi),%ecx
+	testl	$16777216,%eax
+	jz	L001x86
+	testl	$536870912,%ecx
+	jnz	Lshaext_shortcut
+	jmp	Lssse3_shortcut
+.align	4,0x90
+L001x86:
+	movl	20(%esp),%ebp
+	movl	24(%esp),%esi
+	movl	28(%esp),%eax
+	subl	$76,%esp
+	shll	$6,%eax
+	addl	%esi,%eax
+	movl	%eax,104(%esp)
+	movl	16(%ebp),%edi
+	jmp	L002loop
+.align	4,0x90
+L002loop:
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movl	%ecx,8(%esp)
+	movl	%edx,12(%esp)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,16(%esp)
+	movl	%ebx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%edx,28(%esp)
+	movl	32(%esi),%eax
+	movl	36(%esi),%ebx
+	movl	40(%esi),%ecx
+	movl	44(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,40(%esp)
+	movl	%edx,44(%esp)
+	movl	48(%esi),%eax
+	movl	52(%esi),%ebx
+	movl	56(%esi),%ecx
+	movl	60(%esi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	movl	%eax,48(%esp)
+	movl	%ebx,52(%esp)
+	movl	%ecx,56(%esp)
+	movl	%edx,60(%esp)
+	movl	%esi,100(%esp)
+	movl	(%ebp),%eax
+	movl	4(%ebp),%ebx
+	movl	8(%ebp),%ecx
+	movl	12(%ebp),%edx
+	# 00_15 0 
+	movl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+	# 00_15 1 
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	4(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+	# 00_15 2 
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	8(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+	# 00_15 3 
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	12(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	addl	%ecx,%ebp
+	# 00_15 4 
+	movl	%edi,%ebx
+	movl	%ebp,%ecx
+	roll	$5,%ebp
+	xorl	%esi,%ebx
+	addl	%eax,%ebp
+	movl	16(%esp),%eax
+	andl	%edx,%ebx
+	rorl	$2,%edx
+	xorl	%esi,%ebx
+	leal	1518500249(%ebp,%eax,1),%ebp
+	addl	%ebx,%ebp
+	# 00_15 5 
+	movl	%edx,%eax
+	movl	%ebp,%ebx
+	roll	$5,%ebp
+	xorl	%edi,%eax
+	addl	%esi,%ebp
+	movl	20(%esp),%esi
+	andl	%ecx,%eax
+	rorl	$2,%ecx
+	xorl	%edi,%eax
+	leal	1518500249(%ebp,%esi,1),%ebp
+	addl	%eax,%ebp
+	# 00_15 6 
+	movl	%ecx,%esi
+	movl	%ebp,%eax
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	24(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+	# 00_15 7 
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	28(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+	# 00_15 8 
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	32(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+	# 00_15 9 
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	36(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	addl	%ecx,%ebp
+	# 00_15 10 
+	movl	%edi,%ebx
+	movl	%ebp,%ecx
+	roll	$5,%ebp
+	xorl	%esi,%ebx
+	addl	%eax,%ebp
+	movl	40(%esp),%eax
+	andl	%edx,%ebx
+	rorl	$2,%edx
+	xorl	%esi,%ebx
+	leal	1518500249(%ebp,%eax,1),%ebp
+	addl	%ebx,%ebp
+	# 00_15 11 
+	movl	%edx,%eax
+	movl	%ebp,%ebx
+	roll	$5,%ebp
+	xorl	%edi,%eax
+	addl	%esi,%ebp
+	movl	44(%esp),%esi
+	andl	%ecx,%eax
+	rorl	$2,%ecx
+	xorl	%edi,%eax
+	leal	1518500249(%ebp,%esi,1),%ebp
+	addl	%eax,%ebp
+	# 00_15 12 
+	movl	%ecx,%esi
+	movl	%ebp,%eax
+	roll	$5,%ebp
+	xorl	%edx,%esi
+	addl	%edi,%ebp
+	movl	48(%esp),%edi
+	andl	%ebx,%esi
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	leal	1518500249(%ebp,%edi,1),%ebp
+	addl	%esi,%ebp
+	# 00_15 13 
+	movl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	xorl	%ecx,%edi
+	addl	%edx,%ebp
+	movl	52(%esp),%edx
+	andl	%eax,%edi
+	rorl	$2,%eax
+	xorl	%ecx,%edi
+	leal	1518500249(%ebp,%edx,1),%ebp
+	addl	%edi,%ebp
+	# 00_15 14 
+	movl	%eax,%edx
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	xorl	%ebx,%edx
+	addl	%ecx,%ebp
+	movl	56(%esp),%ecx
+	andl	%esi,%edx
+	rorl	$2,%esi
+	xorl	%ebx,%edx
+	leal	1518500249(%ebp,%ecx,1),%ebp
+	addl	%edx,%ebp
+	# 00_15 15 
+	movl	%esi,%ecx
+	movl	%ebp,%edx
+	roll	$5,%ebp
+	xorl	%eax,%ecx
+	addl	%ebx,%ebp
+	movl	60(%esp),%ebx
+	andl	%edi,%ecx
+	rorl	$2,%edi
+	xorl	%eax,%ecx
+	leal	1518500249(%ebp,%ebx,1),%ebp
+	movl	(%esp),%ebx
+	addl	%ebp,%ecx
+	# 16_19 16 
+	movl	%edi,%ebp
+	xorl	8(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	32(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	52(%esp),%ebx
+	roll	$1,%ebx
+	xorl	%esi,%ebp
+	addl	%ebp,%eax
+	movl	%ecx,%ebp
+	rorl	$2,%edx
+	movl	%ebx,(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%ebx,%eax,1),%ebx
+	movl	4(%esp),%eax
+	addl	%ebp,%ebx
+	# 16_19 17 
+	movl	%edx,%ebp
+	xorl	12(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	36(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	56(%esp),%eax
+	roll	$1,%eax
+	xorl	%edi,%ebp
+	addl	%ebp,%esi
+	movl	%ebx,%ebp
+	rorl	$2,%ecx
+	movl	%eax,4(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%eax,%esi,1),%eax
+	movl	8(%esp),%esi
+	addl	%ebp,%eax
+	# 16_19 18 
+	movl	%ecx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	40(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	60(%esp),%esi
+	roll	$1,%esi
+	xorl	%edx,%ebp
+	addl	%ebp,%edi
+	movl	%eax,%ebp
+	rorl	$2,%ebx
+	movl	%esi,8(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%esi,%edi,1),%esi
+	movl	12(%esp),%edi
+	addl	%ebp,%esi
+	# 16_19 19 
+	movl	%ebx,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	44(%esp),%edi
+	andl	%eax,%ebp
+	xorl	(%esp),%edi
+	roll	$1,%edi
+	xorl	%ecx,%ebp
+	addl	%ebp,%edx
+	movl	%esi,%ebp
+	rorl	$2,%eax
+	movl	%edi,12(%esp)
+	roll	$5,%ebp
+	leal	1518500249(%edi,%edx,1),%edi
+	movl	16(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 20 
+	movl	%esi,%ebp
+	xorl	24(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,16(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	20(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 21 
+	movl	%edi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,20(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	24(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 22 
+	movl	%edx,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,24(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	28(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 23 
+	movl	%ecx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	16(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,28(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	32(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 24 
+	movl	%ebx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	20(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,32(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	36(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 25 
+	movl	%eax,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,36(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	40(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 26 
+	movl	%esi,%ebp
+	xorl	48(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,40(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	44(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 27 
+	movl	%edi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,44(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	48(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 28 
+	movl	%edx,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,48(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	52(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 29 
+	movl	%ecx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	40(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,52(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	56(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 30 
+	movl	%ebx,%ebp
+	xorl	(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	44(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,56(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	60(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 31 
+	movl	%eax,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,60(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 32 
+	movl	%esi,%ebp
+	xorl	8(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	52(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	4(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 33 
+	movl	%edi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	56(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,4(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	8(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 34 
+	movl	%edx,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	40(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	60(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,8(%esp)
+	leal	1859775393(%ebx,%eax,1),%ebx
+	movl	12(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 35 
+	movl	%ecx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	44(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,12(%esp)
+	leal	1859775393(%eax,%esi,1),%eax
+	movl	16(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 36 
+	movl	%ebx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	4(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,16(%esp)
+	leal	1859775393(%esi,%edi,1),%esi
+	movl	20(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 37 
+	movl	%eax,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	52(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	8(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,20(%esp)
+	leal	1859775393(%edi,%edx,1),%edi
+	movl	24(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 38 
+	movl	%esi,%ebp
+	xorl	32(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	56(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	12(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,24(%esp)
+	leal	1859775393(%edx,%ecx,1),%edx
+	movl	28(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 39 
+	movl	%edi,%ebp
+	xorl	36(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	60(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	16(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,28(%esp)
+	leal	1859775393(%ecx,%ebx,1),%ecx
+	movl	32(%esp),%ebx
+	addl	%ebp,%ecx
+	# 40_59 40 
+	movl	%edi,%ebp
+	xorl	40(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	20(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,32(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	36(%esp),%eax
+	addl	%ebp,%ebx
+	# 40_59 41 
+	movl	%edx,%ebp
+	xorl	44(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	4(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	24(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,36(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	40(%esp),%esi
+	addl	%ebp,%eax
+	# 40_59 42 
+	movl	%ecx,%ebp
+	xorl	48(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	8(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	28(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,40(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	44(%esp),%edi
+	addl	%ebp,%esi
+	# 40_59 43 
+	movl	%ebx,%ebp
+	xorl	52(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	12(%esp),%edi
+	andl	%eax,%ebp
+	xorl	32(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,44(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	48(%esp),%edx
+	addl	%ebp,%edi
+	# 40_59 44 
+	movl	%eax,%ebp
+	xorl	56(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	16(%esp),%edx
+	andl	%esi,%ebp
+	xorl	36(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,48(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	52(%esp),%ecx
+	addl	%ebp,%edx
+	# 40_59 45 
+	movl	%esi,%ebp
+	xorl	60(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	20(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	40(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,52(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	56(%esp),%ebx
+	addl	%ebp,%ecx
+	# 40_59 46 
+	movl	%edi,%ebp
+	xorl	(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	24(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	44(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,56(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	60(%esp),%eax
+	addl	%ebp,%ebx
+	# 40_59 47 
+	movl	%edx,%ebp
+	xorl	4(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	28(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	48(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,60(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	(%esp),%esi
+	addl	%ebp,%eax
+	# 40_59 48 
+	movl	%ecx,%ebp
+	xorl	8(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	32(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	52(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	4(%esp),%edi
+	addl	%ebp,%esi
+	# 40_59 49 
+	movl	%ebx,%ebp
+	xorl	12(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	36(%esp),%edi
+	andl	%eax,%ebp
+	xorl	56(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,4(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	8(%esp),%edx
+	addl	%ebp,%edi
+	# 40_59 50 
+	movl	%eax,%ebp
+	xorl	16(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	40(%esp),%edx
+	andl	%esi,%ebp
+	xorl	60(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,8(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	12(%esp),%ecx
+	addl	%ebp,%edx
+	# 40_59 51 
+	movl	%esi,%ebp
+	xorl	20(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	44(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,12(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	16(%esp),%ebx
+	addl	%ebp,%ecx
+	# 40_59 52 
+	movl	%edi,%ebp
+	xorl	24(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	48(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	4(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,16(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	20(%esp),%eax
+	addl	%ebp,%ebx
+	# 40_59 53 
+	movl	%edx,%ebp
+	xorl	28(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	52(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	8(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,20(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	24(%esp),%esi
+	addl	%ebp,%eax
+	# 40_59 54 
+	movl	%ecx,%ebp
+	xorl	32(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	56(%esp),%esi
+	andl	%ebx,%ebp
+	xorl	12(%esp),%esi
+	roll	$1,%esi
+	addl	%edi,%ebp
+	rorl	$2,%ebx
+	movl	%eax,%edi
+	roll	$5,%edi
+	movl	%esi,24(%esp)
+	leal	2400959708(%esi,%ebp,1),%esi
+	movl	%ecx,%ebp
+	addl	%edi,%esi
+	andl	%edx,%ebp
+	movl	28(%esp),%edi
+	addl	%ebp,%esi
+	# 40_59 55 
+	movl	%ebx,%ebp
+	xorl	36(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	60(%esp),%edi
+	andl	%eax,%ebp
+	xorl	16(%esp),%edi
+	roll	$1,%edi
+	addl	%edx,%ebp
+	rorl	$2,%eax
+	movl	%esi,%edx
+	roll	$5,%edx
+	movl	%edi,28(%esp)
+	leal	2400959708(%edi,%ebp,1),%edi
+	movl	%ebx,%ebp
+	addl	%edx,%edi
+	andl	%ecx,%ebp
+	movl	32(%esp),%edx
+	addl	%ebp,%edi
+	# 40_59 56 
+	movl	%eax,%ebp
+	xorl	40(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	(%esp),%edx
+	andl	%esi,%ebp
+	xorl	20(%esp),%edx
+	roll	$1,%edx
+	addl	%ecx,%ebp
+	rorl	$2,%esi
+	movl	%edi,%ecx
+	roll	$5,%ecx
+	movl	%edx,32(%esp)
+	leal	2400959708(%edx,%ebp,1),%edx
+	movl	%eax,%ebp
+	addl	%ecx,%edx
+	andl	%ebx,%ebp
+	movl	36(%esp),%ecx
+	addl	%ebp,%edx
+	# 40_59 57 
+	movl	%esi,%ebp
+	xorl	44(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	4(%esp),%ecx
+	andl	%edi,%ebp
+	xorl	24(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebx,%ebp
+	rorl	$2,%edi
+	movl	%edx,%ebx
+	roll	$5,%ebx
+	movl	%ecx,36(%esp)
+	leal	2400959708(%ecx,%ebp,1),%ecx
+	movl	%esi,%ebp
+	addl	%ebx,%ecx
+	andl	%eax,%ebp
+	movl	40(%esp),%ebx
+	addl	%ebp,%ecx
+	# 40_59 58 
+	movl	%edi,%ebp
+	xorl	48(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	8(%esp),%ebx
+	andl	%edx,%ebp
+	xorl	28(%esp),%ebx
+	roll	$1,%ebx
+	addl	%eax,%ebp
+	rorl	$2,%edx
+	movl	%ecx,%eax
+	roll	$5,%eax
+	movl	%ebx,40(%esp)
+	leal	2400959708(%ebx,%ebp,1),%ebx
+	movl	%edi,%ebp
+	addl	%eax,%ebx
+	andl	%esi,%ebp
+	movl	44(%esp),%eax
+	addl	%ebp,%ebx
+	# 40_59 59 
+	movl	%edx,%ebp
+	xorl	52(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	12(%esp),%eax
+	andl	%ecx,%ebp
+	xorl	32(%esp),%eax
+	roll	$1,%eax
+	addl	%esi,%ebp
+	rorl	$2,%ecx
+	movl	%ebx,%esi
+	roll	$5,%esi
+	movl	%eax,44(%esp)
+	leal	2400959708(%eax,%ebp,1),%eax
+	movl	%edx,%ebp
+	addl	%esi,%eax
+	andl	%edi,%ebp
+	movl	48(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 60 
+	movl	%ebx,%ebp
+	xorl	56(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	36(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,48(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	52(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 61 
+	movl	%eax,%ebp
+	xorl	60(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	40(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,52(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	56(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 62 
+	movl	%esi,%ebp
+	xorl	(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	24(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	44(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,56(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	60(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 63 
+	movl	%edi,%ebp
+	xorl	4(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,60(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 64 
+	movl	%edx,%ebp
+	xorl	8(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	4(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 65 
+	movl	%ecx,%ebp
+	xorl	12(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	56(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,4(%esp)
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	8(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 66 
+	movl	%ebx,%ebp
+	xorl	16(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	60(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,8(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	12(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 67 
+	movl	%eax,%ebp
+	xorl	20(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,12(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	16(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 68 
+	movl	%esi,%ebp
+	xorl	24(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	48(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,16(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	20(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 69 
+	movl	%edi,%ebp
+	xorl	28(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,20(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	24(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 70 
+	movl	%edx,%ebp
+	xorl	32(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,24(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	28(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 71 
+	movl	%ecx,%ebp
+	xorl	36(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	16(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	movl	%eax,28(%esp)
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	32(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 72 
+	movl	%ebx,%ebp
+	xorl	40(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	20(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	movl	%esi,32(%esp)
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	36(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 73 
+	movl	%eax,%ebp
+	xorl	44(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	movl	%edi,36(%esp)
+	leal	3395469782(%edi,%edx,1),%edi
+	movl	40(%esp),%edx
+	addl	%ebp,%edi
+	# 20_39 74 
+	movl	%esi,%ebp
+	xorl	48(%esp),%edx
+	xorl	%eax,%ebp
+	xorl	8(%esp),%edx
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edx
+	roll	$1,%edx
+	addl	%ebp,%ecx
+	rorl	$2,%esi
+	movl	%edi,%ebp
+	roll	$5,%ebp
+	movl	%edx,40(%esp)
+	leal	3395469782(%edx,%ecx,1),%edx
+	movl	44(%esp),%ecx
+	addl	%ebp,%edx
+	# 20_39 75 
+	movl	%edi,%ebp
+	xorl	52(%esp),%ecx
+	xorl	%esi,%ebp
+	xorl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	xorl	32(%esp),%ecx
+	roll	$1,%ecx
+	addl	%ebp,%ebx
+	rorl	$2,%edi
+	movl	%edx,%ebp
+	roll	$5,%ebp
+	movl	%ecx,44(%esp)
+	leal	3395469782(%ecx,%ebx,1),%ecx
+	movl	48(%esp),%ebx
+	addl	%ebp,%ecx
+	# 20_39 76 
+	movl	%edx,%ebp
+	xorl	56(%esp),%ebx
+	xorl	%edi,%ebp
+	xorl	16(%esp),%ebx
+	xorl	%esi,%ebp
+	xorl	36(%esp),%ebx
+	roll	$1,%ebx
+	addl	%ebp,%eax
+	rorl	$2,%edx
+	movl	%ecx,%ebp
+	roll	$5,%ebp
+	movl	%ebx,48(%esp)
+	leal	3395469782(%ebx,%eax,1),%ebx
+	movl	52(%esp),%eax
+	addl	%ebp,%ebx
+	# 20_39 77 
+	movl	%ecx,%ebp
+	xorl	60(%esp),%eax
+	xorl	%edx,%ebp
+	xorl	20(%esp),%eax
+	xorl	%edi,%ebp
+	xorl	40(%esp),%eax
+	roll	$1,%eax
+	addl	%ebp,%esi
+	rorl	$2,%ecx
+	movl	%ebx,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%eax,%esi,1),%eax
+	movl	56(%esp),%esi
+	addl	%ebp,%eax
+	# 20_39 78 
+	movl	%ebx,%ebp
+	xorl	(%esp),%esi
+	xorl	%ecx,%ebp
+	xorl	24(%esp),%esi
+	xorl	%edx,%ebp
+	xorl	44(%esp),%esi
+	roll	$1,%esi
+	addl	%ebp,%edi
+	rorl	$2,%ebx
+	movl	%eax,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%esi,%edi,1),%esi
+	movl	60(%esp),%edi
+	addl	%ebp,%esi
+	# 20_39 79 
+	movl	%eax,%ebp
+	xorl	4(%esp),%edi
+	xorl	%ebx,%ebp
+	xorl	28(%esp),%edi
+	xorl	%ecx,%ebp
+	xorl	48(%esp),%edi
+	roll	$1,%edi
+	addl	%ebp,%edx
+	rorl	$2,%eax
+	movl	%esi,%ebp
+	roll	$5,%ebp
+	leal	3395469782(%edi,%edx,1),%edi
+	addl	%ebp,%edi
+	movl	96(%esp),%ebp
+	movl	100(%esp),%edx
+	addl	(%ebp),%edi
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%eax
+	addl	12(%ebp),%ebx
+	addl	16(%ebp),%ecx
+	movl	%edi,(%ebp)
+	addl	$64,%edx
+	movl	%esi,4(%ebp)
+	cmpl	104(%esp),%edx
+	movl	%eax,8(%ebp)
+	movl	%ecx,%edi
+	movl	%ebx,12(%ebp)
+	movl	%edx,%esi
+	movl	%ecx,16(%ebp)
+	jb	L002loop
+	addl	$76,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.private_extern	__sha1_block_data_order_shaext
+.align	4
+__sha1_block_data_order_shaext:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	L003pic_point
+L003pic_point:
+	popl	%ebp
+	leal	LK_XX_XX-L003pic_point(%ebp),%ebp
+Lshaext_shortcut:
+	movl	20(%esp),%edi
+	movl	%esp,%ebx
+	movl	24(%esp),%esi
+	movl	28(%esp),%ecx
+	subl	$32,%esp
+	movdqu	(%edi),%xmm0
+	movd	16(%edi),%xmm1
+	andl	$-32,%esp
+	movdqa	80(%ebp),%xmm3
+	movdqu	(%esi),%xmm4
+	pshufd	$27,%xmm0,%xmm0
+	movdqu	16(%esi),%xmm5
+	pshufd	$27,%xmm1,%xmm1
+	movdqu	32(%esi),%xmm6
+.byte	102,15,56,0,227
+	movdqu	48(%esi),%xmm7
+.byte	102,15,56,0,235
+.byte	102,15,56,0,243
+.byte	102,15,56,0,251
+	jmp	L004loop_shaext
+.align	4,0x90
+L004loop_shaext:
+	decl	%ecx
+	leal	64(%esi),%eax
+	movdqa	%xmm1,(%esp)
+	paddd	%xmm4,%xmm1
+	cmovnel	%eax,%esi
+	movdqa	%xmm0,16(%esp)
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,0
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,0
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,0
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,1
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,1
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,1
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,2
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+.byte	15,56,201,229
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,213
+	pxor	%xmm6,%xmm4
+.byte	15,56,201,238
+.byte	15,56,202,231
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,2
+.byte	15,56,200,206
+	pxor	%xmm7,%xmm5
+.byte	15,56,202,236
+.byte	15,56,201,247
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,2
+.byte	15,56,200,215
+	pxor	%xmm4,%xmm6
+.byte	15,56,201,252
+.byte	15,56,202,245
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+.byte	15,56,200,204
+	pxor	%xmm5,%xmm7
+.byte	15,56,202,254
+	movdqu	(%esi),%xmm4
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,3
+.byte	15,56,200,213
+	movdqu	16(%esi),%xmm5
+.byte	102,15,56,0,227
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+.byte	15,56,200,206
+	movdqu	32(%esi),%xmm6
+.byte	102,15,56,0,235
+	movdqa	%xmm0,%xmm2
+.byte	15,58,204,193,3
+.byte	15,56,200,215
+	movdqu	48(%esi),%xmm7
+.byte	102,15,56,0,243
+	movdqa	%xmm0,%xmm1
+.byte	15,58,204,194,3
+	movdqa	(%esp),%xmm2
+.byte	102,15,56,0,251
+.byte	15,56,200,202
+	paddd	16(%esp),%xmm0
+	jnz	L004loop_shaext
+	pshufd	$27,%xmm0,%xmm0
+	pshufd	$27,%xmm1,%xmm1
+	movdqu	%xmm0,(%edi)
+	movd	%xmm1,16(%edi)
+	movl	%ebx,%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.private_extern	__sha1_block_data_order_ssse3
+.align	4
+__sha1_block_data_order_ssse3:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	call	L005pic_point
+L005pic_point:
+	popl	%ebp
+	leal	LK_XX_XX-L005pic_point(%ebp),%ebp
+Lssse3_shortcut:
+	movdqa	(%ebp),%xmm7
+	movdqa	16(%ebp),%xmm0
+	movdqa	32(%ebp),%xmm1
+	movdqa	48(%ebp),%xmm2
+	movdqa	64(%ebp),%xmm6
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebp
+	movl	28(%esp),%edx
+	movl	%esp,%esi
+	subl	$208,%esp
+	andl	$-64,%esp
+	movdqa	%xmm0,112(%esp)
+	movdqa	%xmm1,128(%esp)
+	movdqa	%xmm2,144(%esp)
+	shll	$6,%edx
+	movdqa	%xmm7,160(%esp)
+	addl	%ebp,%edx
+	movdqa	%xmm6,176(%esp)
+	addl	$64,%ebp
+	movl	%edi,192(%esp)
+	movl	%ebp,196(%esp)
+	movl	%edx,200(%esp)
+	movl	%esi,204(%esp)
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	movl	16(%edi),%edi
+	movl	%ebx,%esi
+	movdqu	-64(%ebp),%xmm0
+	movdqu	-48(%ebp),%xmm1
+	movdqu	-32(%ebp),%xmm2
+	movdqu	-16(%ebp),%xmm3
+.byte	102,15,56,0,198
+.byte	102,15,56,0,206
+.byte	102,15,56,0,214
+	movdqa	%xmm7,96(%esp)
+.byte	102,15,56,0,222
+	paddd	%xmm7,%xmm0
+	paddd	%xmm7,%xmm1
+	paddd	%xmm7,%xmm2
+	movdqa	%xmm0,(%esp)
+	psubd	%xmm7,%xmm0
+	movdqa	%xmm1,16(%esp)
+	psubd	%xmm7,%xmm1
+	movdqa	%xmm2,32(%esp)
+	movl	%ecx,%ebp
+	psubd	%xmm7,%xmm2
+	xorl	%edx,%ebp
+	pshufd	$238,%xmm0,%xmm4
+	andl	%ebp,%esi
+	jmp	L006loop
+.align	4,0x90
+L006loop:
+	rorl	$2,%ebx
+	xorl	%edx,%esi
+	movl	%eax,%ebp
+	punpcklqdq	%xmm1,%xmm4
+	movdqa	%xmm3,%xmm6
+	addl	(%esp),%edi
+	xorl	%ecx,%ebx
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm0,64(%esp)
+	roll	$5,%eax
+	addl	%esi,%edi
+	psrldq	$4,%xmm6
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	pxor	%xmm0,%xmm4
+	addl	%eax,%edi
+	rorl	$7,%eax
+	pxor	%xmm2,%xmm6
+	xorl	%ecx,%ebp
+	movl	%edi,%esi
+	addl	4(%esp),%edx
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm7,48(%esp)
+	addl	%ebp,%edx
+	andl	%eax,%esi
+	movdqa	%xmm4,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	movdqa	%xmm4,%xmm6
+	xorl	%ebx,%esi
+	pslldq	$12,%xmm0
+	paddd	%xmm4,%xmm4
+	movl	%edx,%ebp
+	addl	8(%esp),%ecx
+	psrld	$31,%xmm6
+	xorl	%eax,%edi
+	roll	$5,%edx
+	movdqa	%xmm0,%xmm7
+	addl	%esi,%ecx
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	psrld	$30,%xmm0
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	por	%xmm6,%xmm4
+	xorl	%eax,%ebp
+	movl	%ecx,%esi
+	addl	12(%esp),%ebx
+	pslld	$2,%xmm7
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	pxor	%xmm0,%xmm4
+	movdqa	96(%esp),%xmm0
+	addl	%ebp,%ebx
+	andl	%edx,%esi
+	pxor	%xmm7,%xmm4
+	pshufd	$238,%xmm1,%xmm5
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	movl	%ebx,%ebp
+	punpcklqdq	%xmm2,%xmm5
+	movdqa	%xmm4,%xmm7
+	addl	16(%esp),%eax
+	xorl	%edx,%ecx
+	paddd	%xmm4,%xmm0
+	movdqa	%xmm1,80(%esp)
+	roll	$5,%ebx
+	addl	%esi,%eax
+	psrldq	$4,%xmm7
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	pxor	%xmm1,%xmm5
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	pxor	%xmm3,%xmm7
+	xorl	%edx,%ebp
+	movl	%eax,%esi
+	addl	20(%esp),%edi
+	pxor	%xmm7,%xmm5
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm0,(%esp)
+	addl	%ebp,%edi
+	andl	%ebx,%esi
+	movdqa	%xmm5,%xmm1
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	rorl	$7,%eax
+	movdqa	%xmm5,%xmm7
+	xorl	%ecx,%esi
+	pslldq	$12,%xmm1
+	paddd	%xmm5,%xmm5
+	movl	%edi,%ebp
+	addl	24(%esp),%edx
+	psrld	$31,%xmm7
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm1,%xmm0
+	addl	%esi,%edx
+	andl	%eax,%ebp
+	xorl	%ebx,%eax
+	psrld	$30,%xmm1
+	addl	%edi,%edx
+	rorl	$7,%edi
+	por	%xmm7,%xmm5
+	xorl	%ebx,%ebp
+	movl	%edx,%esi
+	addl	28(%esp),%ecx
+	pslld	$2,%xmm0
+	xorl	%eax,%edi
+	roll	$5,%edx
+	pxor	%xmm1,%xmm5
+	movdqa	112(%esp),%xmm1
+	addl	%ebp,%ecx
+	andl	%edi,%esi
+	pxor	%xmm0,%xmm5
+	pshufd	$238,%xmm2,%xmm6
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	xorl	%eax,%esi
+	movl	%ecx,%ebp
+	punpcklqdq	%xmm3,%xmm6
+	movdqa	%xmm5,%xmm0
+	addl	32(%esp),%ebx
+	xorl	%edi,%edx
+	paddd	%xmm5,%xmm1
+	movdqa	%xmm2,96(%esp)
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	psrldq	$4,%xmm0
+	andl	%edx,%ebp
+	xorl	%edi,%edx
+	pxor	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pxor	%xmm4,%xmm0
+	xorl	%edi,%ebp
+	movl	%ebx,%esi
+	addl	36(%esp),%eax
+	pxor	%xmm0,%xmm6
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm1,16(%esp)
+	addl	%ebp,%eax
+	andl	%ecx,%esi
+	movdqa	%xmm6,%xmm2
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	movdqa	%xmm6,%xmm0
+	xorl	%edx,%esi
+	pslldq	$12,%xmm2
+	paddd	%xmm6,%xmm6
+	movl	%eax,%ebp
+	addl	40(%esp),%edi
+	psrld	$31,%xmm0
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm1
+	addl	%esi,%edi
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	psrld	$30,%xmm2
+	addl	%eax,%edi
+	rorl	$7,%eax
+	por	%xmm0,%xmm6
+	xorl	%ecx,%ebp
+	movdqa	64(%esp),%xmm0
+	movl	%edi,%esi
+	addl	44(%esp),%edx
+	pslld	$2,%xmm1
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	pxor	%xmm2,%xmm6
+	movdqa	112(%esp),%xmm2
+	addl	%ebp,%edx
+	andl	%eax,%esi
+	pxor	%xmm1,%xmm6
+	pshufd	$238,%xmm3,%xmm7
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	xorl	%ebx,%esi
+	movl	%edx,%ebp
+	punpcklqdq	%xmm4,%xmm7
+	movdqa	%xmm6,%xmm1
+	addl	48(%esp),%ecx
+	xorl	%eax,%edi
+	paddd	%xmm6,%xmm2
+	movdqa	%xmm3,64(%esp)
+	roll	$5,%edx
+	addl	%esi,%ecx
+	psrldq	$4,%xmm1
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	pxor	%xmm3,%xmm7
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pxor	%xmm5,%xmm1
+	xorl	%eax,%ebp
+	movl	%ecx,%esi
+	addl	52(%esp),%ebx
+	pxor	%xmm1,%xmm7
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	movdqa	%xmm2,32(%esp)
+	addl	%ebp,%ebx
+	andl	%edx,%esi
+	movdqa	%xmm7,%xmm3
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	movdqa	%xmm7,%xmm1
+	xorl	%edi,%esi
+	pslldq	$12,%xmm3
+	paddd	%xmm7,%xmm7
+	movl	%ebx,%ebp
+	addl	56(%esp),%eax
+	psrld	$31,%xmm1
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm2
+	addl	%esi,%eax
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	psrld	$30,%xmm3
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	por	%xmm1,%xmm7
+	xorl	%edx,%ebp
+	movdqa	80(%esp),%xmm1
+	movl	%eax,%esi
+	addl	60(%esp),%edi
+	pslld	$2,%xmm2
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	pxor	%xmm3,%xmm7
+	movdqa	112(%esp),%xmm3
+	addl	%ebp,%edi
+	andl	%ebx,%esi
+	pxor	%xmm2,%xmm7
+	pshufd	$238,%xmm6,%xmm2
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	rorl	$7,%eax
+	pxor	%xmm4,%xmm0
+	punpcklqdq	%xmm7,%xmm2
+	xorl	%ecx,%esi
+	movl	%edi,%ebp
+	addl	(%esp),%edx
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm4,80(%esp)
+	xorl	%ebx,%eax
+	roll	$5,%edi
+	movdqa	%xmm3,%xmm4
+	addl	%esi,%edx
+	paddd	%xmm7,%xmm3
+	andl	%eax,%ebp
+	pxor	%xmm2,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	rorl	$7,%edi
+	xorl	%ebx,%ebp
+	movdqa	%xmm0,%xmm2
+	movdqa	%xmm3,48(%esp)
+	movl	%edx,%esi
+	addl	4(%esp),%ecx
+	xorl	%eax,%edi
+	roll	$5,%edx
+	pslld	$2,%xmm0
+	addl	%ebp,%ecx
+	andl	%edi,%esi
+	psrld	$30,%xmm2
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	xorl	%eax,%esi
+	movl	%ecx,%ebp
+	addl	8(%esp),%ebx
+	xorl	%edi,%edx
+	roll	$5,%ecx
+	por	%xmm2,%xmm0
+	addl	%esi,%ebx
+	andl	%edx,%ebp
+	movdqa	96(%esp),%xmm2
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	12(%esp),%eax
+	xorl	%edi,%ebp
+	movl	%ebx,%esi
+	pshufd	$238,%xmm7,%xmm3
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	16(%esp),%edi
+	pxor	%xmm5,%xmm1
+	punpcklqdq	%xmm0,%xmm3
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,96(%esp)
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	movdqa	%xmm4,%xmm5
+	rorl	$7,%ebx
+	paddd	%xmm0,%xmm4
+	addl	%eax,%edi
+	pxor	%xmm3,%xmm1
+	addl	20(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	movdqa	%xmm1,%xmm3
+	movdqa	%xmm4,(%esp)
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	pslld	$2,%xmm1
+	addl	24(%esp),%ecx
+	xorl	%eax,%esi
+	psrld	$30,%xmm3
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	por	%xmm3,%xmm1
+	addl	28(%esp),%ebx
+	xorl	%edi,%ebp
+	movdqa	64(%esp),%xmm3
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	pshufd	$238,%xmm0,%xmm4
+	addl	%ecx,%ebx
+	addl	32(%esp),%eax
+	pxor	%xmm6,%xmm2
+	punpcklqdq	%xmm1,%xmm4
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm6,64(%esp)
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	movdqa	128(%esp),%xmm6
+	rorl	$7,%ecx
+	paddd	%xmm1,%xmm5
+	addl	%ebx,%eax
+	pxor	%xmm4,%xmm2
+	addl	36(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm5,16(%esp)
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	pslld	$2,%xmm2
+	addl	40(%esp),%edx
+	xorl	%ebx,%esi
+	psrld	$30,%xmm4
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	por	%xmm4,%xmm2
+	addl	44(%esp),%ecx
+	xorl	%eax,%ebp
+	movdqa	80(%esp),%xmm4
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	pshufd	$238,%xmm1,%xmm5
+	addl	%edx,%ecx
+	addl	48(%esp),%ebx
+	pxor	%xmm7,%xmm3
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm7,80(%esp)
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	movdqa	%xmm6,%xmm7
+	rorl	$7,%edx
+	paddd	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	pxor	%xmm5,%xmm3
+	addl	52(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm5
+	movdqa	%xmm6,32(%esp)
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	pslld	$2,%xmm3
+	addl	56(%esp),%edi
+	xorl	%ecx,%esi
+	psrld	$30,%xmm5
+	movl	%eax,%ebp
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	por	%xmm5,%xmm3
+	addl	60(%esp),%edx
+	xorl	%ebx,%ebp
+	movdqa	96(%esp),%xmm5
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	pshufd	$238,%xmm2,%xmm6
+	addl	%edi,%edx
+	addl	(%esp),%ecx
+	pxor	%xmm0,%xmm4
+	punpcklqdq	%xmm3,%xmm6
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm0,96(%esp)
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	movdqa	%xmm7,%xmm0
+	rorl	$7,%edi
+	paddd	%xmm3,%xmm7
+	addl	%edx,%ecx
+	pxor	%xmm6,%xmm4
+	addl	4(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	movdqa	%xmm4,%xmm6
+	movdqa	%xmm7,48(%esp)
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	pslld	$2,%xmm4
+	addl	8(%esp),%eax
+	xorl	%edx,%esi
+	psrld	$30,%xmm6
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	por	%xmm6,%xmm4
+	addl	12(%esp),%edi
+	xorl	%ecx,%ebp
+	movdqa	64(%esp),%xmm6
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	pshufd	$238,%xmm3,%xmm7
+	addl	%eax,%edi
+	addl	16(%esp),%edx
+	pxor	%xmm1,%xmm5
+	punpcklqdq	%xmm4,%xmm7
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	pxor	%xmm6,%xmm5
+	movdqa	%xmm1,64(%esp)
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	movdqa	%xmm0,%xmm1
+	rorl	$7,%eax
+	paddd	%xmm4,%xmm0
+	addl	%edi,%edx
+	pxor	%xmm7,%xmm5
+	addl	20(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	movdqa	%xmm5,%xmm7
+	movdqa	%xmm0,(%esp)
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	pslld	$2,%xmm5
+	addl	24(%esp),%ebx
+	xorl	%edi,%esi
+	psrld	$30,%xmm7
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	por	%xmm7,%xmm5
+	addl	28(%esp),%eax
+	movdqa	80(%esp),%xmm7
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	pshufd	$238,%xmm4,%xmm0
+	addl	%ebp,%eax
+	xorl	%ecx,%esi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	32(%esp),%edi
+	pxor	%xmm2,%xmm6
+	punpcklqdq	%xmm5,%xmm0
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	pxor	%xmm7,%xmm6
+	movdqa	%xmm2,80(%esp)
+	movl	%eax,%ebp
+	xorl	%ecx,%esi
+	roll	$5,%eax
+	movdqa	%xmm1,%xmm2
+	addl	%esi,%edi
+	paddd	%xmm5,%xmm1
+	xorl	%ebx,%ebp
+	pxor	%xmm0,%xmm6
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	36(%esp),%edx
+	andl	%ebx,%ebp
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm1,16(%esp)
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%edi,%esi
+	xorl	%ebx,%ebp
+	roll	$5,%edi
+	pslld	$2,%xmm6
+	addl	%ebp,%edx
+	xorl	%eax,%esi
+	psrld	$30,%xmm0
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	40(%esp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	por	%xmm0,%xmm6
+	movl	%edx,%ebp
+	xorl	%eax,%esi
+	movdqa	96(%esp),%xmm0
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%edi,%ebp
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	pshufd	$238,%xmm5,%xmm1
+	addl	44(%esp),%ebx
+	andl	%edi,%ebp
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%edi,%ebp
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edx,%esi
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	48(%esp),%eax
+	pxor	%xmm3,%xmm7
+	punpcklqdq	%xmm6,%xmm1
+	andl	%edx,%esi
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	pxor	%xmm0,%xmm7
+	movdqa	%xmm3,96(%esp)
+	movl	%ebx,%ebp
+	xorl	%edx,%esi
+	roll	$5,%ebx
+	movdqa	144(%esp),%xmm3
+	addl	%esi,%eax
+	paddd	%xmm6,%xmm2
+	xorl	%ecx,%ebp
+	pxor	%xmm1,%xmm7
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	52(%esp),%edi
+	andl	%ecx,%ebp
+	movdqa	%xmm7,%xmm1
+	movdqa	%xmm2,32(%esp)
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%ebp
+	roll	$5,%eax
+	pslld	$2,%xmm7
+	addl	%ebp,%edi
+	xorl	%ebx,%esi
+	psrld	$30,%xmm1
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	56(%esp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	por	%xmm1,%xmm7
+	movl	%edi,%ebp
+	xorl	%ebx,%esi
+	movdqa	64(%esp),%xmm1
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%eax,%ebp
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	pshufd	$238,%xmm6,%xmm2
+	addl	60(%esp),%ecx
+	andl	%eax,%ebp
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	movl	%edx,%esi
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%edi,%esi
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	(%esp),%ebx
+	pxor	%xmm4,%xmm0
+	punpcklqdq	%xmm7,%xmm2
+	andl	%edi,%esi
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm4,64(%esp)
+	movl	%ecx,%ebp
+	xorl	%edi,%esi
+	roll	$5,%ecx
+	movdqa	%xmm3,%xmm4
+	addl	%esi,%ebx
+	paddd	%xmm7,%xmm3
+	xorl	%edx,%ebp
+	pxor	%xmm2,%xmm0
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	4(%esp),%eax
+	andl	%edx,%ebp
+	movdqa	%xmm0,%xmm2
+	movdqa	%xmm3,48(%esp)
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	pslld	$2,%xmm0
+	addl	%ebp,%eax
+	xorl	%ecx,%esi
+	psrld	$30,%xmm2
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	8(%esp),%edi
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	por	%xmm2,%xmm0
+	movl	%eax,%ebp
+	xorl	%ecx,%esi
+	movdqa	80(%esp),%xmm2
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	pshufd	$238,%xmm7,%xmm3
+	addl	12(%esp),%edx
+	andl	%ebx,%ebp
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%edi,%esi
+	xorl	%ebx,%ebp
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%eax,%esi
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	16(%esp),%ecx
+	pxor	%xmm5,%xmm1
+	punpcklqdq	%xmm0,%xmm3
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm5,80(%esp)
+	movl	%edx,%ebp
+	xorl	%eax,%esi
+	roll	$5,%edx
+	movdqa	%xmm4,%xmm5
+	addl	%esi,%ecx
+	paddd	%xmm0,%xmm4
+	xorl	%edi,%ebp
+	pxor	%xmm3,%xmm1
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	20(%esp),%ebx
+	andl	%edi,%ebp
+	movdqa	%xmm1,%xmm3
+	movdqa	%xmm4,(%esp)
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%edi,%ebp
+	roll	$5,%ecx
+	pslld	$2,%xmm1
+	addl	%ebp,%ebx
+	xorl	%edx,%esi
+	psrld	$30,%xmm3
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	addl	24(%esp),%eax
+	andl	%edx,%esi
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	por	%xmm3,%xmm1
+	movl	%ebx,%ebp
+	xorl	%edx,%esi
+	movdqa	96(%esp),%xmm3
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%ecx,%ebp
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	pshufd	$238,%xmm0,%xmm4
+	addl	28(%esp),%edi
+	andl	%ecx,%ebp
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%ebp
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ebx,%esi
+	xorl	%ecx,%ebx
+	addl	%eax,%edi
+	addl	32(%esp),%edx
+	pxor	%xmm6,%xmm2
+	punpcklqdq	%xmm1,%xmm4
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm6,96(%esp)
+	movl	%edi,%ebp
+	xorl	%ebx,%esi
+	roll	$5,%edi
+	movdqa	%xmm5,%xmm6
+	addl	%esi,%edx
+	paddd	%xmm1,%xmm5
+	xorl	%eax,%ebp
+	pxor	%xmm4,%xmm2
+	xorl	%ebx,%eax
+	addl	%edi,%edx
+	addl	36(%esp),%ecx
+	andl	%eax,%ebp
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm5,16(%esp)
+	xorl	%ebx,%eax
+	rorl	$7,%edi
+	movl	%edx,%esi
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	pslld	$2,%xmm2
+	addl	%ebp,%ecx
+	xorl	%edi,%esi
+	psrld	$30,%xmm4
+	xorl	%eax,%edi
+	addl	%edx,%ecx
+	addl	40(%esp),%ebx
+	andl	%edi,%esi
+	xorl	%eax,%edi
+	rorl	$7,%edx
+	por	%xmm4,%xmm2
+	movl	%ecx,%ebp
+	xorl	%edi,%esi
+	movdqa	64(%esp),%xmm4
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edx,%ebp
+	xorl	%edi,%edx
+	addl	%ecx,%ebx
+	pshufd	$238,%xmm1,%xmm5
+	addl	44(%esp),%eax
+	andl	%edx,%ebp
+	xorl	%edi,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%ebp
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	addl	%ebx,%eax
+	addl	48(%esp),%edi
+	pxor	%xmm7,%xmm3
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm7,64(%esp)
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	movdqa	%xmm6,%xmm7
+	rorl	$7,%ebx
+	paddd	%xmm2,%xmm6
+	addl	%eax,%edi
+	pxor	%xmm5,%xmm3
+	addl	52(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	movdqa	%xmm3,%xmm5
+	movdqa	%xmm6,32(%esp)
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	pslld	$2,%xmm3
+	addl	56(%esp),%ecx
+	xorl	%eax,%esi
+	psrld	$30,%xmm5
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	por	%xmm5,%xmm3
+	addl	60(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	paddd	%xmm3,%xmm7
+	addl	%ebx,%eax
+	addl	4(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	movdqa	%xmm7,48(%esp)
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	8(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	12(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	movl	196(%esp),%ebp
+	cmpl	200(%esp),%ebp
+	je	L007done
+	movdqa	160(%esp),%xmm7
+	movdqa	176(%esp),%xmm6
+	movdqu	(%ebp),%xmm0
+	movdqu	16(%ebp),%xmm1
+	movdqu	32(%ebp),%xmm2
+	movdqu	48(%ebp),%xmm3
+	addl	$64,%ebp
+.byte	102,15,56,0,198
+	movl	%ebp,196(%esp)
+	movdqa	%xmm7,96(%esp)
+	addl	16(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+.byte	102,15,56,0,206
+	addl	%ecx,%ebx
+	addl	20(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	paddd	%xmm7,%xmm0
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	movdqa	%xmm0,(%esp)
+	addl	%ebx,%eax
+	addl	24(%esp),%edi
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	psubd	%xmm7,%xmm0
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	28(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	32(%esp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+.byte	102,15,56,0,214
+	addl	%edx,%ecx
+	addl	36(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	paddd	%xmm7,%xmm1
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	movdqa	%xmm1,16(%esp)
+	addl	%ecx,%ebx
+	addl	40(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	psubd	%xmm7,%xmm1
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	48(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+.byte	102,15,56,0,222
+	addl	%edi,%edx
+	addl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	paddd	%xmm7,%xmm2
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	movdqa	%xmm2,32(%esp)
+	addl	%edx,%ecx
+	addl	56(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	psubd	%xmm7,%xmm2
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	movl	192(%esp),%ebp
+	addl	(%ebp),%eax
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%ecx
+	movl	%eax,(%ebp)
+	addl	12(%ebp),%edx
+	movl	%esi,4(%ebp)
+	addl	16(%ebp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%ecx,%ebx
+	movl	%edx,12(%ebp)
+	xorl	%edx,%ebx
+	movl	%edi,16(%ebp)
+	movl	%esi,%ebp
+	pshufd	$238,%xmm0,%xmm4
+	andl	%ebx,%esi
+	movl	%ebp,%ebx
+	jmp	L006loop
+.align	4,0x90
+L007done:
+	addl	16(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	20(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	24(%esp),%edi
+	xorl	%ecx,%esi
+	movl	%eax,%ebp
+	roll	$5,%eax
+	addl	%esi,%edi
+	xorl	%ecx,%ebp
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	28(%esp),%edx
+	xorl	%ebx,%ebp
+	movl	%edi,%esi
+	roll	$5,%edi
+	addl	%ebp,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	32(%esp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%ebp
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	addl	36(%esp),%ebx
+	xorl	%edi,%ebp
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%ebp,%ebx
+	xorl	%edi,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	40(%esp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%ebp
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%ebp
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%esp),%edi
+	xorl	%ecx,%ebp
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%ebp,%edi
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%edi
+	addl	48(%esp),%edx
+	xorl	%ebx,%esi
+	movl	%edi,%ebp
+	roll	$5,%edi
+	addl	%esi,%edx
+	xorl	%ebx,%ebp
+	rorl	$7,%eax
+	addl	%edi,%edx
+	addl	52(%esp),%ecx
+	xorl	%eax,%ebp
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%ebp,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%edi
+	addl	%edx,%ecx
+	addl	56(%esp),%ebx
+	xorl	%edi,%esi
+	movl	%ecx,%ebp
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%edi,%ebp
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%esp),%eax
+	xorl	%edx,%ebp
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%ebp,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	movl	192(%esp),%ebp
+	addl	(%ebp),%eax
+	movl	204(%esp),%esp
+	addl	4(%ebp),%esi
+	addl	8(%ebp),%ecx
+	movl	%eax,(%ebp)
+	addl	12(%ebp),%edx
+	movl	%esi,4(%ebp)
+	addl	16(%ebp),%edi
+	movl	%ecx,8(%ebp)
+	movl	%edx,12(%ebp)
+	movl	%edi,16(%ebp)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	6,0x90
+LK_XX_XX:
+.long	1518500249,1518500249,1518500249,1518500249
+.long	1859775393,1859775393,1859775393,1859775393
+.long	2400959708,2400959708,2400959708,2400959708
+.long	3395469782,3395469782,3395469782,3395469782
+.long	66051,67438087,134810123,202182159
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
+.byte	102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82
+.byte	89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112
+.byte	114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S
new file mode 100644
index 0000000..f0ba612
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/sha/sha256-586.S
@@ -0,0 +1,4581 @@
+#if defined(__i386__)
+.file	"sha512-586.S"
+.text
+.globl	_sha256_block_data_order
+.private_extern	_sha256_block_data_order
+.align	4
+_sha256_block_data_order:
+L_sha256_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	%esp,%ebx
+	call	L000pic_point
+L000pic_point:
+	popl	%ebp
+	leal	L001K256-L000pic_point(%ebp),%ebp
+	subl	$16,%esp
+	andl	$-64,%esp
+	shll	$6,%eax
+	addl	%edi,%eax
+	movl	%esi,(%esp)
+	movl	%edi,4(%esp)
+	movl	%eax,8(%esp)
+	movl	%ebx,12(%esp)
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L001K256(%ebp),%edx
+	movl	(%edx),%ecx
+	movl	4(%edx),%ebx
+	testl	$1048576,%ecx
+	jnz	L002loop
+	movl	8(%edx),%edx
+	testl	$16777216,%ecx
+	jz	L003no_xmm
+	andl	$1073741824,%ecx
+	andl	$268435968,%ebx
+	testl	$536870912,%edx
+	jnz	L004shaext
+	orl	%ebx,%ecx
+	andl	$1342177280,%ecx
+	cmpl	$1342177280,%ecx
+	testl	$512,%ebx
+	jnz	L005SSSE3
+L003no_xmm:
+	subl	%edi,%eax
+	cmpl	$256,%eax
+	jae	L006unrolled
+	jmp	L002loop
+.align	4,0x90
+L002loop:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	bswap	%eax
+	movl	12(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	16(%edi),%eax
+	movl	20(%edi),%ebx
+	movl	24(%edi),%ecx
+	bswap	%eax
+	movl	28(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	32(%edi),%eax
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	bswap	%eax
+	movl	44(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	movl	48(%edi),%eax
+	movl	52(%edi),%ebx
+	movl	56(%edi),%ecx
+	bswap	%eax
+	movl	60(%edi),%edx
+	bswap	%ebx
+	pushl	%eax
+	bswap	%ecx
+	pushl	%ebx
+	bswap	%edx
+	pushl	%ecx
+	pushl	%edx
+	addl	$64,%edi
+	leal	-36(%esp),%esp
+	movl	%edi,104(%esp)
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edi
+	movl	%ebx,8(%esp)
+	xorl	%ecx,%ebx
+	movl	%ecx,12(%esp)
+	movl	%edi,16(%esp)
+	movl	%ebx,(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edi
+	movl	%ebx,24(%esp)
+	movl	%ecx,28(%esp)
+	movl	%edi,32(%esp)
+.align	4,0x90
+L00700_15:
+	movl	%edx,%ecx
+	movl	24(%esp),%esi
+	rorl	$14,%ecx
+	movl	28(%esp),%edi
+	xorl	%edx,%ecx
+	xorl	%edi,%esi
+	movl	96(%esp),%ebx
+	rorl	$5,%ecx
+	andl	%edx,%esi
+	movl	%edx,20(%esp)
+	xorl	%ecx,%edx
+	addl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%esi,%ebx
+	rorl	$9,%ecx
+	addl	%edx,%ebx
+	movl	8(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,4(%esp)
+	leal	-4(%esp),%esp
+	rorl	$11,%ecx
+	movl	(%ebp),%esi
+	xorl	%eax,%ecx
+	movl	20(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%esi,%ebx
+	movl	%eax,(%esp)
+	addl	%ebx,%edx
+	andl	4(%esp),%eax
+	addl	%ecx,%ebx
+	xorl	%edi,%eax
+	addl	$4,%ebp
+	addl	%ebx,%eax
+	cmpl	$3248222580,%esi
+	jne	L00700_15
+	movl	156(%esp),%ecx
+	jmp	L00816_63
+.align	4,0x90
+L00816_63:
+	movl	%ecx,%ebx
+	movl	104(%esp),%esi
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	160(%esp),%ebx
+	shrl	$10,%edi
+	addl	124(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	24(%esp),%esi
+	rorl	$14,%ecx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%edx,%ecx
+	xorl	%edi,%esi
+	movl	%ebx,96(%esp)
+	rorl	$5,%ecx
+	andl	%edx,%esi
+	movl	%edx,20(%esp)
+	xorl	%ecx,%edx
+	addl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%esi,%ebx
+	rorl	$9,%ecx
+	addl	%edx,%ebx
+	movl	8(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,4(%esp)
+	leal	-4(%esp),%esp
+	rorl	$11,%ecx
+	movl	(%ebp),%esi
+	xorl	%eax,%ecx
+	movl	20(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%esi,%ebx
+	movl	%eax,(%esp)
+	addl	%ebx,%edx
+	andl	4(%esp),%eax
+	addl	%ecx,%ebx
+	xorl	%edi,%eax
+	movl	156(%esp),%ecx
+	addl	$4,%ebp
+	addl	%ebx,%eax
+	cmpl	$3329325298,%esi
+	jne	L00816_63
+	movl	356(%esp),%esi
+	movl	8(%esp),%ebx
+	movl	16(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebx
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	24(%esp),%eax
+	movl	28(%esp),%ebx
+	movl	32(%esp),%ecx
+	movl	360(%esp),%edi
+	addl	16(%esi),%edx
+	addl	20(%esi),%eax
+	addl	24(%esi),%ebx
+	addl	28(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%eax,20(%esi)
+	movl	%ebx,24(%esi)
+	movl	%ecx,28(%esi)
+	leal	356(%esp),%esp
+	subl	$256,%ebp
+	cmpl	8(%esp),%edi
+	jb	L002loop
+	movl	12(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	6,0x90
+L001K256:
+.long	1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298
+.long	66051,67438087,134810123,202182159
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
+.byte	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+.byte	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+.byte	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+.byte	62,0
+.align	4,0x90
+L006unrolled:
+	leal	-96(%esp),%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebp
+	movl	8(%esi),%ecx
+	movl	12(%esi),%ebx
+	movl	%ebp,4(%esp)
+	xorl	%ecx,%ebp
+	movl	%ecx,8(%esp)
+	movl	%ebx,12(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%esi
+	movl	%ebx,20(%esp)
+	movl	%ecx,24(%esp)
+	movl	%esi,28(%esp)
+	jmp	L009grand_loop
+.align	4,0x90
+L009grand_loop:
+	movl	(%edi),%ebx
+	movl	4(%edi),%ecx
+	bswap	%ebx
+	movl	8(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,32(%esp)
+	bswap	%esi
+	movl	%ecx,36(%esp)
+	movl	%esi,40(%esp)
+	movl	12(%edi),%ebx
+	movl	16(%edi),%ecx
+	bswap	%ebx
+	movl	20(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,44(%esp)
+	bswap	%esi
+	movl	%ecx,48(%esp)
+	movl	%esi,52(%esp)
+	movl	24(%edi),%ebx
+	movl	28(%edi),%ecx
+	bswap	%ebx
+	movl	32(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,56(%esp)
+	bswap	%esi
+	movl	%ecx,60(%esp)
+	movl	%esi,64(%esp)
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	bswap	%ebx
+	movl	44(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,68(%esp)
+	bswap	%esi
+	movl	%ecx,72(%esp)
+	movl	%esi,76(%esp)
+	movl	48(%edi),%ebx
+	movl	52(%edi),%ecx
+	bswap	%ebx
+	movl	56(%edi),%esi
+	bswap	%ecx
+	movl	%ebx,80(%esp)
+	bswap	%esi
+	movl	%ecx,84(%esp)
+	movl	%esi,88(%esp)
+	movl	60(%edi),%ebx
+	addl	$64,%edi
+	bswap	%ebx
+	movl	%edi,100(%esp)
+	movl	%ebx,92(%esp)
+	movl	%edx,%ecx
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	32(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1116352408(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	36(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1899447441(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	40(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3049323471(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	44(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3921009573(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	48(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	961987163(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	52(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1508970993(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	56(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2453635748(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	60(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2870763221(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	64(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3624381080(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	68(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	310598401(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	72(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	607225278(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	76(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1426881987(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	80(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1925078388(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	84(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2162078206(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	%edx,%ecx
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	88(%esp),%ebx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2614888103(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	%edx,%esi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	92(%esp),%ebx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3248222580(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3835390401(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	4022224774(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	264347078(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	604807628(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	770255983(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1249150122(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1555081692(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1996064986(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2554220882(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2821834349(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2952996808(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3210313671(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3336571891(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3584528711(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,88(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	113926993(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,92(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	338241895(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	666307205(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	773529912(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1294757372(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1396182291(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1695183700(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1986661051(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2177026350(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2456956037(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2730485921(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2820302411(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3259730800(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3345764771(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3516065817(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3600352804(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,88(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	4094571909(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,92(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	275423344(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	36(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	88(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	32(%esp),%ebx
+	shrl	$10,%edi
+	addl	68(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,32(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	430227734(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	40(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	92(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	36(%esp),%ebx
+	shrl	$10,%edi
+	addl	72(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,36(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	506948616(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	44(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	32(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	40(%esp),%ebx
+	shrl	$10,%edi
+	addl	76(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,40(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	659060556(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	48(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	36(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	44(%esp),%ebx
+	shrl	$10,%edi
+	addl	80(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,44(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	883997877(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	52(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	40(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	48(%esp),%ebx
+	shrl	$10,%edi
+	addl	84(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,48(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	958139571(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	56(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	44(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	52(%esp),%ebx
+	shrl	$10,%edi
+	addl	88(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,52(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1322822218(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	60(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	48(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	56(%esp),%ebx
+	shrl	$10,%edi
+	addl	92(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,56(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1537002063(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	64(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	52(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	60(%esp),%ebx
+	shrl	$10,%edi
+	addl	32(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,60(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	1747873779(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	68(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	56(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	64(%esp),%ebx
+	shrl	$10,%edi
+	addl	36(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	20(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	24(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,64(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	addl	28(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	4(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	1955562222(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	72(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	12(%esp),%edx
+	addl	%ecx,%ebp
+	movl	60(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	68(%esp),%ebx
+	shrl	$10,%edi
+	addl	40(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	16(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	20(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,68(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,12(%esp)
+	xorl	%esi,%edx
+	addl	24(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,28(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2024104815(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	76(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%esi,%eax
+	movl	64(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	72(%esp),%ebx
+	shrl	$10,%edi
+	addl	44(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	12(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	16(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,72(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	addl	20(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	28(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,24(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2227730452(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	80(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	4(%esp),%edx
+	addl	%ecx,%ebp
+	movl	68(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	76(%esp),%ebx
+	shrl	$10,%edi
+	addl	48(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	8(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	12(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,76(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,4(%esp)
+	xorl	%esi,%edx
+	addl	16(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	24(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,20(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2361852424(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	84(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%esi,%eax
+	movl	72(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	80(%esp),%ebx
+	shrl	$10,%edi
+	addl	52(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	4(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	8(%esp),%edi
+	xorl	%ecx,%edx
+	movl	%ebx,80(%esp)
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	addl	12(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	20(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,16(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	2428436474(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	88(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	28(%esp),%edx
+	addl	%ecx,%ebp
+	movl	76(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	84(%esp),%ebx
+	shrl	$10,%edi
+	addl	56(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	4(%esp),%edi
+	xorl	%esi,%edx
+	movl	%ebx,84(%esp)
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,28(%esp)
+	xorl	%esi,%edx
+	addl	8(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	16(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,12(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	2756734187(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	movl	92(%esp),%ecx
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%esi,%eax
+	movl	80(%esp),%esi
+	movl	%ecx,%ebx
+	rorl	$11,%ecx
+	movl	%esi,%edi
+	rorl	$2,%esi
+	xorl	%ebx,%ecx
+	shrl	$3,%ebx
+	rorl	$7,%ecx
+	xorl	%edi,%esi
+	xorl	%ecx,%ebx
+	rorl	$17,%esi
+	addl	88(%esp),%ebx
+	shrl	$10,%edi
+	addl	60(%esp),%ebx
+	movl	%edx,%ecx
+	xorl	%esi,%edi
+	movl	28(%esp),%esi
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	(%esp),%edi
+	xorl	%ecx,%edx
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	addl	4(%esp),%ebx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%ebx
+	rorl	$9,%ecx
+	movl	%eax,%esi
+	movl	12(%esp),%edi
+	xorl	%eax,%ecx
+	movl	%eax,8(%esp)
+	xorl	%edi,%eax
+	rorl	$11,%ecx
+	andl	%eax,%ebp
+	leal	3204031479(%ebx,%edx,1),%edx
+	xorl	%esi,%ecx
+	xorl	%edi,%ebp
+	movl	32(%esp),%esi
+	rorl	$2,%ecx
+	addl	%edx,%ebp
+	addl	20(%esp),%edx
+	addl	%ecx,%ebp
+	movl	84(%esp),%ecx
+	movl	%esi,%ebx
+	rorl	$11,%esi
+	movl	%ecx,%edi
+	rorl	$2,%ecx
+	xorl	%ebx,%esi
+	shrl	$3,%ebx
+	rorl	$7,%esi
+	xorl	%edi,%ecx
+	xorl	%esi,%ebx
+	rorl	$17,%ecx
+	addl	92(%esp),%ebx
+	shrl	$10,%edi
+	addl	64(%esp),%ebx
+	movl	%edx,%esi
+	xorl	%ecx,%edi
+	movl	24(%esp),%ecx
+	rorl	$14,%edx
+	addl	%edi,%ebx
+	movl	28(%esp),%edi
+	xorl	%esi,%edx
+	xorl	%edi,%ecx
+	rorl	$5,%edx
+	andl	%esi,%ecx
+	movl	%esi,20(%esp)
+	xorl	%esi,%edx
+	addl	(%esp),%ebx
+	xorl	%ecx,%edi
+	rorl	$6,%edx
+	movl	%ebp,%esi
+	addl	%edi,%ebx
+	rorl	$9,%esi
+	movl	%ebp,%ecx
+	movl	8(%esp),%edi
+	xorl	%ebp,%esi
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	rorl	$11,%esi
+	andl	%ebp,%eax
+	leal	3329325298(%ebx,%edx,1),%edx
+	xorl	%ecx,%esi
+	xorl	%edi,%eax
+	rorl	$2,%esi
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%esi,%eax
+	movl	96(%esp),%esi
+	xorl	%edi,%ebp
+	movl	12(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebp
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebp,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	%ebp,4(%esp)
+	xorl	%edi,%ebp
+	movl	%edi,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	20(%esp),%edi
+	movl	24(%esp),%ebx
+	movl	28(%esp),%ecx
+	addl	16(%esi),%edx
+	addl	20(%esi),%edi
+	addl	24(%esi),%ebx
+	addl	28(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%edi,20(%esi)
+	movl	%ebx,24(%esi)
+	movl	%ecx,28(%esi)
+	movl	%edi,20(%esp)
+	movl	100(%esp),%edi
+	movl	%ebx,24(%esp)
+	movl	%ecx,28(%esp)
+	cmpl	104(%esp),%edi
+	jb	L009grand_loop
+	movl	108(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	5,0x90
+L004shaext:
+	subl	$32,%esp
+	movdqu	(%esi),%xmm1
+	leal	128(%ebp),%ebp
+	movdqu	16(%esi),%xmm2
+	movdqa	128(%ebp),%xmm7
+	pshufd	$27,%xmm1,%xmm0
+	pshufd	$177,%xmm1,%xmm1
+	pshufd	$27,%xmm2,%xmm2
+.byte	102,15,58,15,202,8
+	punpcklqdq	%xmm0,%xmm2
+	jmp	L010loop_shaext
+.align	4,0x90
+L010loop_shaext:
+	movdqu	(%edi),%xmm3
+	movdqu	16(%edi),%xmm4
+	movdqu	32(%edi),%xmm5
+.byte	102,15,56,0,223
+	movdqu	48(%edi),%xmm6
+	movdqa	%xmm2,16(%esp)
+	movdqa	-128(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	102,15,56,0,231
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	nop
+	movdqa	%xmm1,(%esp)
+.byte	15,56,203,202
+	movdqa	-112(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	102,15,56,0,239
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	leal	64(%edi),%edi
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	-96(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	102,15,56,0,247
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	-80(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	-64(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	-48(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+	nop
+	paddd	%xmm7,%xmm6
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	-32(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,205,245
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	-16(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	16(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+	nop
+	paddd	%xmm7,%xmm6
+.byte	15,56,204,220
+.byte	15,56,203,202
+	movdqa	32(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,205,245
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm6,%xmm7
+.byte	102,15,58,15,253,4
+	nop
+	paddd	%xmm7,%xmm3
+.byte	15,56,204,229
+.byte	15,56,203,202
+	movdqa	48(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+.byte	15,56,205,222
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm3,%xmm7
+.byte	102,15,58,15,254,4
+	nop
+	paddd	%xmm7,%xmm4
+.byte	15,56,204,238
+.byte	15,56,203,202
+	movdqa	64(%ebp),%xmm0
+	paddd	%xmm3,%xmm0
+.byte	15,56,205,227
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm4,%xmm7
+.byte	102,15,58,15,251,4
+	nop
+	paddd	%xmm7,%xmm5
+.byte	15,56,204,243
+.byte	15,56,203,202
+	movdqa	80(%ebp),%xmm0
+	paddd	%xmm4,%xmm0
+.byte	15,56,205,236
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	movdqa	%xmm5,%xmm7
+.byte	102,15,58,15,252,4
+.byte	15,56,203,202
+	paddd	%xmm7,%xmm6
+	movdqa	96(%ebp),%xmm0
+	paddd	%xmm5,%xmm0
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+.byte	15,56,205,245
+	movdqa	128(%ebp),%xmm7
+.byte	15,56,203,202
+	movdqa	112(%ebp),%xmm0
+	paddd	%xmm6,%xmm0
+	nop
+.byte	15,56,203,209
+	pshufd	$14,%xmm0,%xmm0
+	cmpl	%edi,%eax
+	nop
+.byte	15,56,203,202
+	paddd	16(%esp),%xmm2
+	paddd	(%esp),%xmm1
+	jnz	L010loop_shaext
+	pshufd	$177,%xmm2,%xmm2
+	pshufd	$27,%xmm1,%xmm7
+	pshufd	$177,%xmm1,%xmm1
+	punpckhqdq	%xmm2,%xmm1
+.byte	102,15,58,15,215,8
+	movl	44(%esp),%esp
+	movdqu	%xmm1,(%esi)
+	movdqu	%xmm2,16(%esi)
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	5,0x90
+L005SSSE3:
+	leal	-96(%esp),%esp
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edi
+	movl	%ebx,4(%esp)
+	xorl	%ecx,%ebx
+	movl	%ecx,8(%esp)
+	movl	%edi,12(%esp)
+	movl	16(%esi),%edx
+	movl	20(%esi),%edi
+	movl	24(%esi),%ecx
+	movl	28(%esi),%esi
+	movl	%edi,20(%esp)
+	movl	100(%esp),%edi
+	movl	%ecx,24(%esp)
+	movl	%esi,28(%esp)
+	movdqa	256(%ebp),%xmm7
+	jmp	L011grand_ssse3
+.align	4,0x90
+L011grand_ssse3:
+	movdqu	(%edi),%xmm0
+	movdqu	16(%edi),%xmm1
+	movdqu	32(%edi),%xmm2
+	movdqu	48(%edi),%xmm3
+	addl	$64,%edi
+.byte	102,15,56,0,199
+	movl	%edi,100(%esp)
+.byte	102,15,56,0,207
+	movdqa	(%ebp),%xmm4
+.byte	102,15,56,0,215
+	movdqa	16(%ebp),%xmm5
+	paddd	%xmm0,%xmm4
+.byte	102,15,56,0,223
+	movdqa	32(%ebp),%xmm6
+	paddd	%xmm1,%xmm5
+	movdqa	48(%ebp),%xmm7
+	movdqa	%xmm4,32(%esp)
+	paddd	%xmm2,%xmm6
+	movdqa	%xmm5,48(%esp)
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm6,64(%esp)
+	movdqa	%xmm7,80(%esp)
+	jmp	L012ssse3_00_47
+.align	4,0x90
+L012ssse3_00_47:
+	addl	$64,%ebp
+	movl	%edx,%ecx
+	movdqa	%xmm1,%xmm4
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	movdqa	%xmm3,%xmm7
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+.byte	102,15,58,15,224,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,250,4
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm0
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm3,%xmm7
+	xorl	%esi,%ecx
+	addl	32(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm0
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	36(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm0
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	pshufd	$80,%xmm0,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	40(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm0
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	paddd	%xmm0,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	44(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,32(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm2,%xmm4
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	movdqa	%xmm0,%xmm7
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+.byte	102,15,58,15,225,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,251,4
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm1
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm0,%xmm7
+	xorl	%esi,%ecx
+	addl	48(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm1
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	52(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm1
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	pshufd	$80,%xmm1,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	56(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	16(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm1
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	paddd	%xmm1,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	60(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,48(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm3,%xmm4
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	movdqa	%xmm1,%xmm7
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+.byte	102,15,58,15,226,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,248,4
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm2
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm1,%xmm7
+	xorl	%esi,%ecx
+	addl	64(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm2
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	68(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm2
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	pshufd	$80,%xmm2,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	72(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	32(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm2
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	paddd	%xmm2,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	76(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,64(%esp)
+	movl	%edx,%ecx
+	movdqa	%xmm0,%xmm4
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	movdqa	%xmm2,%xmm7
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+.byte	102,15,58,15,227,4
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+.byte	102,15,58,15,249,4
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	movdqa	%xmm4,%xmm5
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	movdqa	%xmm4,%xmm6
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	psrld	$3,%xmm4
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm3
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	psrld	$7,%xmm6
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	pshufd	$250,%xmm2,%xmm7
+	xorl	%esi,%ecx
+	addl	80(%esp),%edx
+	pslld	$14,%xmm5
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm4
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	psrld	$11,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm5,%xmm4
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	pslld	$11,%xmm5
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	pxor	%xmm6,%xmm4
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	movdqa	%xmm7,%xmm6
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	pxor	%xmm5,%xmm4
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	psrld	$10,%xmm7
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm4,%xmm3
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	psrlq	$17,%xmm6
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	pxor	%xmm6,%xmm7
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	psrlq	$2,%xmm6
+	addl	84(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	pshufd	$128,%xmm7,%xmm7
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	psrldq	$8,%xmm7
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	paddd	%xmm7,%xmm3
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	pshufd	$80,%xmm3,%xmm7
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	movdqa	%xmm7,%xmm6
+	rorl	$11,%ecx
+	psrld	$10,%xmm7
+	andl	%eax,%ebx
+	psrlq	$17,%xmm6
+	xorl	%esi,%ecx
+	addl	88(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	pxor	%xmm6,%xmm7
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	psrlq	$2,%xmm6
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	pxor	%xmm6,%xmm7
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	movdqa	48(%ebp),%xmm6
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	pslldq	$8,%xmm7
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	paddd	%xmm7,%xmm3
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	paddd	%xmm3,%xmm6
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	92(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movdqa	%xmm6,80(%esp)
+	cmpl	$66051,64(%ebp)
+	jne	L012ssse3_00_47
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	32(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	36(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	40(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	44(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	48(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	52(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	56(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	60(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	20(%esp),%esi
+	xorl	%ecx,%edx
+	movl	24(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,16(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	4(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	28(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	64(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	12(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	16(%esp),%esi
+	xorl	%ecx,%edx
+	movl	20(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,12(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,28(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	24(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	68(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	8(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	12(%esp),%esi
+	xorl	%ecx,%edx
+	movl	16(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,8(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	28(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,24(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	20(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	72(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	4(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	8(%esp),%esi
+	xorl	%ecx,%edx
+	movl	12(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,4(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	24(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,20(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	16(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	76(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	4(%esp),%esi
+	xorl	%ecx,%edx
+	movl	8(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	20(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,16(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	12(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	80(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	28(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	(%esp),%esi
+	xorl	%ecx,%edx
+	movl	4(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,28(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	16(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,12(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	8(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	84(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	24(%esp),%edx
+	addl	%ecx,%eax
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	28(%esp),%esi
+	xorl	%ecx,%edx
+	movl	(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,24(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%eax,%ecx
+	addl	%edi,%edx
+	movl	12(%esp),%edi
+	movl	%eax,%esi
+	rorl	$9,%ecx
+	movl	%eax,8(%esp)
+	xorl	%eax,%ecx
+	xorl	%edi,%eax
+	addl	4(%esp),%edx
+	rorl	$11,%ecx
+	andl	%eax,%ebx
+	xorl	%esi,%ecx
+	addl	88(%esp),%edx
+	xorl	%edi,%ebx
+	rorl	$2,%ecx
+	addl	%edx,%ebx
+	addl	20(%esp),%edx
+	addl	%ecx,%ebx
+	movl	%edx,%ecx
+	rorl	$14,%edx
+	movl	24(%esp),%esi
+	xorl	%ecx,%edx
+	movl	28(%esp),%edi
+	xorl	%edi,%esi
+	rorl	$5,%edx
+	andl	%ecx,%esi
+	movl	%ecx,20(%esp)
+	xorl	%ecx,%edx
+	xorl	%esi,%edi
+	rorl	$6,%edx
+	movl	%ebx,%ecx
+	addl	%edi,%edx
+	movl	8(%esp),%edi
+	movl	%ebx,%esi
+	rorl	$9,%ecx
+	movl	%ebx,4(%esp)
+	xorl	%ebx,%ecx
+	xorl	%edi,%ebx
+	addl	(%esp),%edx
+	rorl	$11,%ecx
+	andl	%ebx,%eax
+	xorl	%esi,%ecx
+	addl	92(%esp),%edx
+	xorl	%edi,%eax
+	rorl	$2,%ecx
+	addl	%edx,%eax
+	addl	16(%esp),%edx
+	addl	%ecx,%eax
+	movl	96(%esp),%esi
+	xorl	%edi,%ebx
+	movl	12(%esp),%ecx
+	addl	(%esi),%eax
+	addl	4(%esi),%ebx
+	addl	8(%esi),%edi
+	addl	12(%esi),%ecx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	movl	%edi,8(%esi)
+	movl	%ecx,12(%esi)
+	movl	%ebx,4(%esp)
+	xorl	%edi,%ebx
+	movl	%edi,8(%esp)
+	movl	%ecx,12(%esp)
+	movl	20(%esp),%edi
+	movl	24(%esp),%ecx
+	addl	16(%esi),%edx
+	addl	20(%esi),%edi
+	addl	24(%esi),%ecx
+	movl	%edx,16(%esi)
+	movl	%edi,20(%esi)
+	movl	%edi,20(%esp)
+	movl	28(%esp),%edi
+	movl	%ecx,24(%esi)
+	addl	28(%esi),%edi
+	movl	%ecx,24(%esp)
+	movl	%edi,28(%esi)
+	movl	%edi,28(%esp)
+	movl	100(%esp),%edi
+	movdqa	64(%ebp),%xmm7
+	subl	$192,%ebp
+	cmpl	104(%esp),%edi
+	jb	L011grand_ssse3
+	movl	108(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S b/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S
new file mode 100644
index 0000000..3066100
--- /dev/null
+++ b/third_party/boringssl/mac-x86/crypto/sha/sha512-586.S
@@ -0,0 +1,2833 @@
+#if defined(__i386__)
+.file	"sha512-586.S"
+.text
+.globl	_sha512_block_data_order
+.private_extern	_sha512_block_data_order
+.align	4
+_sha512_block_data_order:
+L_sha512_block_data_order_begin:
+	pushl	%ebp
+	pushl	%ebx
+	pushl	%esi
+	pushl	%edi
+	movl	20(%esp),%esi
+	movl	24(%esp),%edi
+	movl	28(%esp),%eax
+	movl	%esp,%ebx
+	call	L000pic_point
+L000pic_point:
+	popl	%ebp
+	leal	L001K512-L000pic_point(%ebp),%ebp
+	subl	$16,%esp
+	andl	$-64,%esp
+	shll	$7,%eax
+	addl	%edi,%eax
+	movl	%esi,(%esp)
+	movl	%edi,4(%esp)
+	movl	%eax,8(%esp)
+	movl	%ebx,12(%esp)
+	movl	L_OPENSSL_ia32cap_P$non_lazy_ptr-L001K512(%ebp),%edx
+	movl	(%edx),%ecx
+	testl	$67108864,%ecx
+	jz	L002loop_x86
+	movl	4(%edx),%edx
+	movq	(%esi),%mm0
+	andl	$16777216,%ecx
+	movq	8(%esi),%mm1
+	andl	$512,%edx
+	movq	16(%esi),%mm2
+	orl	%edx,%ecx
+	movq	24(%esi),%mm3
+	movq	32(%esi),%mm4
+	movq	40(%esi),%mm5
+	movq	48(%esi),%mm6
+	movq	56(%esi),%mm7
+	cmpl	$16777728,%ecx
+	je	L003SSSE3
+	subl	$80,%esp
+	jmp	L004loop_sse2
+.align	4,0x90
+L004loop_sse2:
+	movq	%mm1,8(%esp)
+	movq	%mm2,16(%esp)
+	movq	%mm3,24(%esp)
+	movq	%mm5,40(%esp)
+	movq	%mm6,48(%esp)
+	pxor	%mm1,%mm2
+	movq	%mm7,56(%esp)
+	movq	%mm0,%mm3
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	addl	$8,%edi
+	movl	$15,%edx
+	bswap	%eax
+	bswap	%ebx
+	jmp	L00500_14_sse2
+.align	4,0x90
+L00500_14_sse2:
+	movd	%eax,%mm1
+	movl	(%edi),%eax
+	movd	%ebx,%mm7
+	movl	4(%edi),%ebx
+	addl	$8,%edi
+	bswap	%eax
+	bswap	%ebx
+	punpckldq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm3,%mm0
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm2,%mm3
+	movq	%mm0,%mm2
+	addl	$8,%ebp
+	paddq	%mm6,%mm3
+	movq	48(%esp),%mm6
+	decl	%edx
+	jnz	L00500_14_sse2
+	movd	%eax,%mm1
+	movd	%ebx,%mm7
+	punpckldq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm3,%mm0
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm2,%mm3
+	movq	%mm0,%mm2
+	addl	$8,%ebp
+	paddq	%mm6,%mm3
+	pxor	%mm0,%mm0
+	movl	$32,%edx
+	jmp	L00616_79_sse2
+.align	4,0x90
+L00616_79_sse2:
+	movq	88(%esp),%mm5
+	movq	%mm7,%mm1
+	psrlq	$1,%mm7
+	movq	%mm5,%mm6
+	psrlq	$6,%mm5
+	psllq	$56,%mm1
+	paddq	%mm3,%mm0
+	movq	%mm7,%mm3
+	psrlq	$6,%mm7
+	pxor	%mm1,%mm3
+	psllq	$7,%mm1
+	pxor	%mm7,%mm3
+	psrlq	$1,%mm7
+	pxor	%mm1,%mm3
+	movq	%mm5,%mm1
+	psrlq	$13,%mm5
+	pxor	%mm3,%mm7
+	psllq	$3,%mm6
+	pxor	%mm5,%mm1
+	paddq	200(%esp),%mm7
+	pxor	%mm6,%mm1
+	psrlq	$42,%mm5
+	paddq	128(%esp),%mm7
+	pxor	%mm5,%mm1
+	psllq	$42,%mm6
+	movq	40(%esp),%mm5
+	pxor	%mm6,%mm1
+	movq	48(%esp),%mm6
+	paddq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm6,%mm2
+	addl	$8,%ebp
+	movq	88(%esp),%mm5
+	movq	%mm7,%mm1
+	psrlq	$1,%mm7
+	movq	%mm5,%mm6
+	psrlq	$6,%mm5
+	psllq	$56,%mm1
+	paddq	%mm3,%mm2
+	movq	%mm7,%mm3
+	psrlq	$6,%mm7
+	pxor	%mm1,%mm3
+	psllq	$7,%mm1
+	pxor	%mm7,%mm3
+	psrlq	$1,%mm7
+	pxor	%mm1,%mm3
+	movq	%mm5,%mm1
+	psrlq	$13,%mm5
+	pxor	%mm3,%mm7
+	psllq	$3,%mm6
+	pxor	%mm5,%mm1
+	paddq	200(%esp),%mm7
+	pxor	%mm6,%mm1
+	psrlq	$42,%mm5
+	paddq	128(%esp),%mm7
+	pxor	%mm5,%mm1
+	psllq	$42,%mm6
+	movq	40(%esp),%mm5
+	pxor	%mm6,%mm1
+	movq	48(%esp),%mm6
+	paddq	%mm1,%mm7
+	movq	%mm4,%mm1
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	movq	%mm7,72(%esp)
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	paddq	(%ebp),%mm7
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	subl	$8,%esp
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	192(%esp),%mm7
+	paddq	%mm6,%mm0
+	addl	$8,%ebp
+	decl	%edx
+	jnz	L00616_79_sse2
+	paddq	%mm3,%mm0
+	movq	8(%esp),%mm1
+	movq	24(%esp),%mm3
+	movq	40(%esp),%mm5
+	movq	48(%esp),%mm6
+	movq	56(%esp),%mm7
+	pxor	%mm1,%mm2
+	paddq	(%esi),%mm0
+	paddq	8(%esi),%mm1
+	paddq	16(%esi),%mm2
+	paddq	24(%esi),%mm3
+	paddq	32(%esi),%mm4
+	paddq	40(%esi),%mm5
+	paddq	48(%esi),%mm6
+	paddq	56(%esi),%mm7
+	movl	$640,%eax
+	movq	%mm0,(%esi)
+	movq	%mm1,8(%esi)
+	movq	%mm2,16(%esi)
+	movq	%mm3,24(%esi)
+	movq	%mm4,32(%esi)
+	movq	%mm5,40(%esi)
+	movq	%mm6,48(%esi)
+	movq	%mm7,56(%esi)
+	leal	(%esp,%eax,1),%esp
+	subl	%eax,%ebp
+	cmpl	88(%esp),%edi
+	jb	L004loop_sse2
+	movl	92(%esp),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	5,0x90
+L003SSSE3:
+	leal	-64(%esp),%edx
+	subl	$256,%esp
+	movdqa	640(%ebp),%xmm1
+	movdqu	(%edi),%xmm0
+.byte	102,15,56,0,193
+	movdqa	(%ebp),%xmm3
+	movdqa	%xmm1,%xmm2
+	movdqu	16(%edi),%xmm1
+	paddq	%xmm0,%xmm3
+.byte	102,15,56,0,202
+	movdqa	%xmm3,-128(%edx)
+	movdqa	16(%ebp),%xmm4
+	movdqa	%xmm2,%xmm3
+	movdqu	32(%edi),%xmm2
+	paddq	%xmm1,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm4,-112(%edx)
+	movdqa	32(%ebp),%xmm5
+	movdqa	%xmm3,%xmm4
+	movdqu	48(%edi),%xmm3
+	paddq	%xmm2,%xmm5
+.byte	102,15,56,0,220
+	movdqa	%xmm5,-96(%edx)
+	movdqa	48(%ebp),%xmm6
+	movdqa	%xmm4,%xmm5
+	movdqu	64(%edi),%xmm4
+	paddq	%xmm3,%xmm6
+.byte	102,15,56,0,229
+	movdqa	%xmm6,-80(%edx)
+	movdqa	64(%ebp),%xmm7
+	movdqa	%xmm5,%xmm6
+	movdqu	80(%edi),%xmm5
+	paddq	%xmm4,%xmm7
+.byte	102,15,56,0,238
+	movdqa	%xmm7,-64(%edx)
+	movdqa	%xmm0,(%edx)
+	movdqa	80(%ebp),%xmm0
+	movdqa	%xmm6,%xmm7
+	movdqu	96(%edi),%xmm6
+	paddq	%xmm5,%xmm0
+.byte	102,15,56,0,247
+	movdqa	%xmm0,-48(%edx)
+	movdqa	%xmm1,16(%edx)
+	movdqa	96(%ebp),%xmm1
+	movdqa	%xmm7,%xmm0
+	movdqu	112(%edi),%xmm7
+	paddq	%xmm6,%xmm1
+.byte	102,15,56,0,248
+	movdqa	%xmm1,-32(%edx)
+	movdqa	%xmm2,32(%edx)
+	movdqa	112(%ebp),%xmm2
+	movdqa	(%edx),%xmm0
+	paddq	%xmm7,%xmm2
+	movdqa	%xmm2,-16(%edx)
+	nop
+.align	5,0x90
+L007loop_ssse3:
+	movdqa	16(%edx),%xmm2
+	movdqa	%xmm3,48(%edx)
+	leal	128(%ebp),%ebp
+	movq	%mm1,8(%esp)
+	movl	%edi,%ebx
+	movq	%mm2,16(%esp)
+	leal	128(%edi),%edi
+	movq	%mm3,24(%esp)
+	cmpl	%eax,%edi
+	movq	%mm5,40(%esp)
+	cmovbl	%edi,%ebx
+	movq	%mm6,48(%esp)
+	movl	$4,%ecx
+	pxor	%mm1,%mm2
+	movq	%mm7,56(%esp)
+	pxor	%mm3,%mm3
+	jmp	L00800_47_ssse3
+.align	5,0x90
+L00800_47_ssse3:
+	movdqa	%xmm5,%xmm3
+	movdqa	%xmm2,%xmm1
+.byte	102,15,58,15,208,8
+	movdqa	%xmm4,(%edx)
+.byte	102,15,58,15,220,8
+	movdqa	%xmm2,%xmm4
+	psrlq	$7,%xmm2
+	paddq	%xmm3,%xmm0
+	movdqa	%xmm4,%xmm3
+	psrlq	$1,%xmm4
+	psllq	$56,%xmm3
+	pxor	%xmm4,%xmm2
+	psrlq	$7,%xmm4
+	pxor	%xmm3,%xmm2
+	psllq	$7,%xmm3
+	pxor	%xmm4,%xmm2
+	movdqa	%xmm7,%xmm4
+	pxor	%xmm3,%xmm2
+	movdqa	%xmm7,%xmm3
+	psrlq	$6,%xmm4
+	paddq	%xmm2,%xmm0
+	movdqa	%xmm7,%xmm2
+	psrlq	$19,%xmm3
+	psllq	$3,%xmm2
+	pxor	%xmm3,%xmm4
+	psrlq	$42,%xmm3
+	pxor	%xmm2,%xmm4
+	psllq	$42,%xmm2
+	pxor	%xmm3,%xmm4
+	movdqa	32(%edx),%xmm3
+	pxor	%xmm2,%xmm4
+	movdqa	(%ebp),%xmm2
+	movq	%mm4,%mm1
+	paddq	%xmm4,%xmm0
+	movq	-128(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	paddq	%xmm0,%xmm2
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-120(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm2,-128(%edx)
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm3,%xmm2
+.byte	102,15,58,15,217,8
+	movdqa	%xmm5,16(%edx)
+.byte	102,15,58,15,229,8
+	movdqa	%xmm3,%xmm5
+	psrlq	$7,%xmm3
+	paddq	%xmm4,%xmm1
+	movdqa	%xmm5,%xmm4
+	psrlq	$1,%xmm5
+	psllq	$56,%xmm4
+	pxor	%xmm5,%xmm3
+	psrlq	$7,%xmm5
+	pxor	%xmm4,%xmm3
+	psllq	$7,%xmm4
+	pxor	%xmm5,%xmm3
+	movdqa	%xmm0,%xmm5
+	pxor	%xmm4,%xmm3
+	movdqa	%xmm0,%xmm4
+	psrlq	$6,%xmm5
+	paddq	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm3
+	psrlq	$19,%xmm4
+	psllq	$3,%xmm3
+	pxor	%xmm4,%xmm5
+	psrlq	$42,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$42,%xmm3
+	pxor	%xmm4,%xmm5
+	movdqa	48(%edx),%xmm4
+	pxor	%xmm3,%xmm5
+	movdqa	16(%ebp),%xmm3
+	movq	%mm4,%mm1
+	paddq	%xmm5,%xmm1
+	movq	-112(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	paddq	%xmm1,%xmm3
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-104(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm3,-112(%edx)
+	movdqa	%xmm7,%xmm5
+	movdqa	%xmm4,%xmm3
+.byte	102,15,58,15,226,8
+	movdqa	%xmm6,32(%edx)
+.byte	102,15,58,15,238,8
+	movdqa	%xmm4,%xmm6
+	psrlq	$7,%xmm4
+	paddq	%xmm5,%xmm2
+	movdqa	%xmm6,%xmm5
+	psrlq	$1,%xmm6
+	psllq	$56,%xmm5
+	pxor	%xmm6,%xmm4
+	psrlq	$7,%xmm6
+	pxor	%xmm5,%xmm4
+	psllq	$7,%xmm5
+	pxor	%xmm6,%xmm4
+	movdqa	%xmm1,%xmm6
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm1,%xmm5
+	psrlq	$6,%xmm6
+	paddq	%xmm4,%xmm2
+	movdqa	%xmm1,%xmm4
+	psrlq	$19,%xmm5
+	psllq	$3,%xmm4
+	pxor	%xmm5,%xmm6
+	psrlq	$42,%xmm5
+	pxor	%xmm4,%xmm6
+	psllq	$42,%xmm4
+	pxor	%xmm5,%xmm6
+	movdqa	(%edx),%xmm5
+	pxor	%xmm4,%xmm6
+	movdqa	32(%ebp),%xmm4
+	movq	%mm4,%mm1
+	paddq	%xmm6,%xmm2
+	movq	-96(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	paddq	%xmm2,%xmm4
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-88(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm4,-96(%edx)
+	movdqa	%xmm0,%xmm6
+	movdqa	%xmm5,%xmm4
+.byte	102,15,58,15,235,8
+	movdqa	%xmm7,48(%edx)
+.byte	102,15,58,15,247,8
+	movdqa	%xmm5,%xmm7
+	psrlq	$7,%xmm5
+	paddq	%xmm6,%xmm3
+	movdqa	%xmm7,%xmm6
+	psrlq	$1,%xmm7
+	psllq	$56,%xmm6
+	pxor	%xmm7,%xmm5
+	psrlq	$7,%xmm7
+	pxor	%xmm6,%xmm5
+	psllq	$7,%xmm6
+	pxor	%xmm7,%xmm5
+	movdqa	%xmm2,%xmm7
+	pxor	%xmm6,%xmm5
+	movdqa	%xmm2,%xmm6
+	psrlq	$6,%xmm7
+	paddq	%xmm5,%xmm3
+	movdqa	%xmm2,%xmm5
+	psrlq	$19,%xmm6
+	psllq	$3,%xmm5
+	pxor	%xmm6,%xmm7
+	psrlq	$42,%xmm6
+	pxor	%xmm5,%xmm7
+	psllq	$42,%xmm5
+	pxor	%xmm6,%xmm7
+	movdqa	16(%edx),%xmm6
+	pxor	%xmm5,%xmm7
+	movdqa	48(%ebp),%xmm5
+	movq	%mm4,%mm1
+	paddq	%xmm7,%xmm3
+	movq	-80(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	paddq	%xmm3,%xmm5
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-72(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm5,-80(%edx)
+	movdqa	%xmm1,%xmm7
+	movdqa	%xmm6,%xmm5
+.byte	102,15,58,15,244,8
+	movdqa	%xmm0,(%edx)
+.byte	102,15,58,15,248,8
+	movdqa	%xmm6,%xmm0
+	psrlq	$7,%xmm6
+	paddq	%xmm7,%xmm4
+	movdqa	%xmm0,%xmm7
+	psrlq	$1,%xmm0
+	psllq	$56,%xmm7
+	pxor	%xmm0,%xmm6
+	psrlq	$7,%xmm0
+	pxor	%xmm7,%xmm6
+	psllq	$7,%xmm7
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm3,%xmm0
+	pxor	%xmm7,%xmm6
+	movdqa	%xmm3,%xmm7
+	psrlq	$6,%xmm0
+	paddq	%xmm6,%xmm4
+	movdqa	%xmm3,%xmm6
+	psrlq	$19,%xmm7
+	psllq	$3,%xmm6
+	pxor	%xmm7,%xmm0
+	psrlq	$42,%xmm7
+	pxor	%xmm6,%xmm0
+	psllq	$42,%xmm6
+	pxor	%xmm7,%xmm0
+	movdqa	32(%edx),%xmm7
+	pxor	%xmm6,%xmm0
+	movdqa	64(%ebp),%xmm6
+	movq	%mm4,%mm1
+	paddq	%xmm0,%xmm4
+	movq	-64(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	paddq	%xmm4,%xmm6
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-56(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm6,-64(%edx)
+	movdqa	%xmm2,%xmm0
+	movdqa	%xmm7,%xmm6
+.byte	102,15,58,15,253,8
+	movdqa	%xmm1,16(%edx)
+.byte	102,15,58,15,193,8
+	movdqa	%xmm7,%xmm1
+	psrlq	$7,%xmm7
+	paddq	%xmm0,%xmm5
+	movdqa	%xmm1,%xmm0
+	psrlq	$1,%xmm1
+	psllq	$56,%xmm0
+	pxor	%xmm1,%xmm7
+	psrlq	$7,%xmm1
+	pxor	%xmm0,%xmm7
+	psllq	$7,%xmm0
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm4,%xmm1
+	pxor	%xmm0,%xmm7
+	movdqa	%xmm4,%xmm0
+	psrlq	$6,%xmm1
+	paddq	%xmm7,%xmm5
+	movdqa	%xmm4,%xmm7
+	psrlq	$19,%xmm0
+	psllq	$3,%xmm7
+	pxor	%xmm0,%xmm1
+	psrlq	$42,%xmm0
+	pxor	%xmm7,%xmm1
+	psllq	$42,%xmm7
+	pxor	%xmm0,%xmm1
+	movdqa	48(%edx),%xmm0
+	pxor	%xmm7,%xmm1
+	movdqa	80(%ebp),%xmm7
+	movq	%mm4,%mm1
+	paddq	%xmm1,%xmm5
+	movq	-48(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	paddq	%xmm5,%xmm7
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-40(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm7,-48(%edx)
+	movdqa	%xmm3,%xmm1
+	movdqa	%xmm0,%xmm7
+.byte	102,15,58,15,198,8
+	movdqa	%xmm2,32(%edx)
+.byte	102,15,58,15,202,8
+	movdqa	%xmm0,%xmm2
+	psrlq	$7,%xmm0
+	paddq	%xmm1,%xmm6
+	movdqa	%xmm2,%xmm1
+	psrlq	$1,%xmm2
+	psllq	$56,%xmm1
+	pxor	%xmm2,%xmm0
+	psrlq	$7,%xmm2
+	pxor	%xmm1,%xmm0
+	psllq	$7,%xmm1
+	pxor	%xmm2,%xmm0
+	movdqa	%xmm5,%xmm2
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm5,%xmm1
+	psrlq	$6,%xmm2
+	paddq	%xmm0,%xmm6
+	movdqa	%xmm5,%xmm0
+	psrlq	$19,%xmm1
+	psllq	$3,%xmm0
+	pxor	%xmm1,%xmm2
+	psrlq	$42,%xmm1
+	pxor	%xmm0,%xmm2
+	psllq	$42,%xmm0
+	pxor	%xmm1,%xmm2
+	movdqa	(%edx),%xmm1
+	pxor	%xmm0,%xmm2
+	movdqa	96(%ebp),%xmm0
+	movq	%mm4,%mm1
+	paddq	%xmm2,%xmm6
+	movq	-32(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	paddq	%xmm6,%xmm0
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-24(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm0,-32(%edx)
+	movdqa	%xmm4,%xmm2
+	movdqa	%xmm1,%xmm0
+.byte	102,15,58,15,207,8
+	movdqa	%xmm3,48(%edx)
+.byte	102,15,58,15,211,8
+	movdqa	%xmm1,%xmm3
+	psrlq	$7,%xmm1
+	paddq	%xmm2,%xmm7
+	movdqa	%xmm3,%xmm2
+	psrlq	$1,%xmm3
+	psllq	$56,%xmm2
+	pxor	%xmm3,%xmm1
+	psrlq	$7,%xmm3
+	pxor	%xmm2,%xmm1
+	psllq	$7,%xmm2
+	pxor	%xmm3,%xmm1
+	movdqa	%xmm6,%xmm3
+	pxor	%xmm2,%xmm1
+	movdqa	%xmm6,%xmm2
+	psrlq	$6,%xmm3
+	paddq	%xmm1,%xmm7
+	movdqa	%xmm6,%xmm1
+	psrlq	$19,%xmm2
+	psllq	$3,%xmm1
+	pxor	%xmm2,%xmm3
+	psrlq	$42,%xmm2
+	pxor	%xmm1,%xmm3
+	psllq	$42,%xmm1
+	pxor	%xmm2,%xmm3
+	movdqa	16(%edx),%xmm2
+	pxor	%xmm1,%xmm3
+	movdqa	112(%ebp),%xmm1
+	movq	%mm4,%mm1
+	paddq	%xmm3,%xmm7
+	movq	-16(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	paddq	%xmm7,%xmm1
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-8(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm1,-16(%edx)
+	leal	128(%ebp),%ebp
+	decl	%ecx
+	jnz	L00800_47_ssse3
+	movdqa	(%ebp),%xmm1
+	leal	-640(%ebp),%ebp
+	movdqu	(%ebx),%xmm0
+.byte	102,15,56,0,193
+	movdqa	(%ebp),%xmm3
+	movdqa	%xmm1,%xmm2
+	movdqu	16(%ebx),%xmm1
+	paddq	%xmm0,%xmm3
+.byte	102,15,56,0,202
+	movq	%mm4,%mm1
+	movq	-128(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-120(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm3,-128(%edx)
+	movdqa	16(%ebp),%xmm4
+	movdqa	%xmm2,%xmm3
+	movdqu	32(%ebx),%xmm2
+	paddq	%xmm1,%xmm4
+.byte	102,15,56,0,211
+	movq	%mm4,%mm1
+	movq	-112(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-104(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm4,-112(%edx)
+	movdqa	32(%ebp),%xmm5
+	movdqa	%xmm3,%xmm4
+	movdqu	48(%ebx),%xmm3
+	paddq	%xmm2,%xmm5
+.byte	102,15,56,0,220
+	movq	%mm4,%mm1
+	movq	-96(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-88(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm5,-96(%edx)
+	movdqa	48(%ebp),%xmm6
+	movdqa	%xmm4,%xmm5
+	movdqu	64(%ebx),%xmm4
+	paddq	%xmm3,%xmm6
+.byte	102,15,56,0,229
+	movq	%mm4,%mm1
+	movq	-80(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-72(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm6,-80(%edx)
+	movdqa	64(%ebp),%xmm7
+	movdqa	%xmm5,%xmm6
+	movdqu	80(%ebx),%xmm5
+	paddq	%xmm4,%xmm7
+.byte	102,15,56,0,238
+	movq	%mm4,%mm1
+	movq	-64(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,32(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	56(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	24(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	8(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	32(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	40(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-56(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,24(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,56(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	48(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	16(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	24(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	32(%esp),%mm6
+	movdqa	%xmm7,-64(%edx)
+	movdqa	%xmm0,(%edx)
+	movdqa	80(%ebp),%xmm0
+	movdqa	%xmm6,%xmm7
+	movdqu	96(%ebx),%xmm6
+	paddq	%xmm5,%xmm0
+.byte	102,15,56,0,247
+	movq	%mm4,%mm1
+	movq	-48(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,16(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,48(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	40(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	8(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	56(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	16(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	24(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-40(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,8(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,40(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	32(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	48(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	8(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	16(%esp),%mm6
+	movdqa	%xmm0,-48(%edx)
+	movdqa	%xmm1,16(%edx)
+	movdqa	96(%ebp),%xmm1
+	movdqa	%xmm7,%xmm0
+	movdqu	112(%ebx),%xmm7
+	paddq	%xmm6,%xmm1
+.byte	102,15,56,0,248
+	movq	%mm4,%mm1
+	movq	-32(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,32(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	24(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	56(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	40(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	8(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-24(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,56(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,24(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	16(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	48(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	32(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	56(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	(%esp),%mm6
+	movdqa	%xmm1,-32(%edx)
+	movdqa	%xmm2,32(%edx)
+	movdqa	112(%ebp),%xmm2
+	movdqa	(%edx),%xmm0
+	paddq	%xmm7,%xmm2
+	movq	%mm4,%mm1
+	movq	-16(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,48(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm0
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm0,16(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	8(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	40(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm0,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm0,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	24(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm0,%mm2
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	pxor	%mm7,%mm6
+	movq	48(%esp),%mm5
+	paddq	%mm6,%mm2
+	movq	56(%esp),%mm6
+	movq	%mm4,%mm1
+	movq	-8(%edx),%mm7
+	pxor	%mm6,%mm5
+	psrlq	$14,%mm1
+	movq	%mm4,40(%esp)
+	pand	%mm4,%mm5
+	psllq	$23,%mm4
+	paddq	%mm3,%mm2
+	movq	%mm1,%mm3
+	psrlq	$4,%mm1
+	pxor	%mm6,%mm5
+	pxor	%mm4,%mm3
+	psllq	$23,%mm4
+	pxor	%mm1,%mm3
+	movq	%mm2,8(%esp)
+	paddq	%mm5,%mm7
+	pxor	%mm4,%mm3
+	psrlq	$23,%mm1
+	paddq	(%esp),%mm7
+	pxor	%mm1,%mm3
+	psllq	$4,%mm4
+	pxor	%mm4,%mm3
+	movq	32(%esp),%mm4
+	paddq	%mm7,%mm3
+	movq	%mm2,%mm5
+	psrlq	$28,%mm5
+	paddq	%mm3,%mm4
+	movq	%mm2,%mm6
+	movq	%mm5,%mm7
+	psllq	$25,%mm6
+	movq	16(%esp),%mm1
+	psrlq	$6,%mm5
+	pxor	%mm6,%mm7
+	psllq	$5,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm2
+	psrlq	$5,%mm5
+	pxor	%mm6,%mm7
+	pand	%mm2,%mm0
+	psllq	$6,%mm6
+	pxor	%mm5,%mm7
+	pxor	%mm1,%mm0
+	pxor	%mm7,%mm6
+	movq	40(%esp),%mm5
+	paddq	%mm6,%mm0
+	movq	48(%esp),%mm6
+	movdqa	%xmm2,-16(%edx)
+	movq	8(%esp),%mm1
+	paddq	%mm3,%mm0
+	movq	24(%esp),%mm3
+	movq	56(%esp),%mm7
+	pxor	%mm1,%mm2
+	paddq	(%esi),%mm0
+	paddq	8(%esi),%mm1
+	paddq	16(%esi),%mm2
+	paddq	24(%esi),%mm3
+	paddq	32(%esi),%mm4
+	paddq	40(%esi),%mm5
+	paddq	48(%esi),%mm6
+	paddq	56(%esi),%mm7
+	movq	%mm0,(%esi)
+	movq	%mm1,8(%esi)
+	movq	%mm2,16(%esi)
+	movq	%mm3,24(%esi)
+	movq	%mm4,32(%esi)
+	movq	%mm5,40(%esi)
+	movq	%mm6,48(%esi)
+	movq	%mm7,56(%esi)
+	cmpl	%eax,%edi
+	jb	L007loop_ssse3
+	movl	76(%edx),%esp
+	emms
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	4,0x90
+L002loop_x86:
+	movl	(%edi),%eax
+	movl	4(%edi),%ebx
+	movl	8(%edi),%ecx
+	movl	12(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	16(%edi),%eax
+	movl	20(%edi),%ebx
+	movl	24(%edi),%ecx
+	movl	28(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	32(%edi),%eax
+	movl	36(%edi),%ebx
+	movl	40(%edi),%ecx
+	movl	44(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	48(%edi),%eax
+	movl	52(%edi),%ebx
+	movl	56(%edi),%ecx
+	movl	60(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	64(%edi),%eax
+	movl	68(%edi),%ebx
+	movl	72(%edi),%ecx
+	movl	76(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	80(%edi),%eax
+	movl	84(%edi),%ebx
+	movl	88(%edi),%ecx
+	movl	92(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	96(%edi),%eax
+	movl	100(%edi),%ebx
+	movl	104(%edi),%ecx
+	movl	108(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	movl	112(%edi),%eax
+	movl	116(%edi),%ebx
+	movl	120(%edi),%ecx
+	movl	124(%edi),%edx
+	bswap	%eax
+	bswap	%ebx
+	bswap	%ecx
+	bswap	%edx
+	pushl	%eax
+	pushl	%ebx
+	pushl	%ecx
+	pushl	%edx
+	addl	$128,%edi
+	subl	$72,%esp
+	movl	%edi,204(%esp)
+	leal	8(%esp),%edi
+	movl	$16,%ecx
+.long	2784229001
+.align	4,0x90
+L00900_15_x86:
+	movl	40(%esp),%ecx
+	movl	44(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$9,%ecx
+	movl	%edx,%edi
+	shrl	$9,%edx
+	movl	%ecx,%ebx
+	shll	$14,%esi
+	movl	%edx,%eax
+	shll	$14,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%eax
+	shll	$4,%esi
+	xorl	%edx,%ebx
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$4,%ecx
+	xorl	%edi,%eax
+	shrl	$4,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	48(%esp),%ecx
+	movl	52(%esp),%edx
+	movl	56(%esp),%esi
+	movl	60(%esp),%edi
+	addl	64(%esp),%eax
+	adcl	68(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	andl	40(%esp),%ecx
+	andl	44(%esp),%edx
+	addl	192(%esp),%eax
+	adcl	196(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	movl	(%ebp),%esi
+	movl	4(%ebp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	32(%esp),%ecx
+	movl	36(%esp),%edx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,%esi
+	shrl	$2,%ecx
+	movl	%edx,%edi
+	shrl	$2,%edx
+	movl	%ecx,%ebx
+	shll	$4,%esi
+	movl	%edx,%eax
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%ebx
+	shll	$21,%esi
+	xorl	%edx,%eax
+	shll	$21,%edi
+	xorl	%esi,%eax
+	shrl	$21,%ecx
+	xorl	%edi,%ebx
+	shrl	$21,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	16(%esp),%esi
+	movl	20(%esp),%edi
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	andl	24(%esp),%ecx
+	andl	28(%esp),%edx
+	andl	8(%esp),%esi
+	andl	12(%esp),%edi
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movb	(%ebp),%dl
+	subl	$8,%esp
+	leal	8(%ebp),%ebp
+	cmpb	$148,%dl
+	jne	L00900_15_x86
+.align	4,0x90
+L01016_79_x86:
+	movl	312(%esp),%ecx
+	movl	316(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$1,%ecx
+	movl	%edx,%edi
+	shrl	$1,%edx
+	movl	%ecx,%eax
+	shll	$24,%esi
+	movl	%edx,%ebx
+	shll	$24,%edi
+	xorl	%esi,%ebx
+	shrl	$6,%ecx
+	xorl	%edi,%eax
+	shrl	$6,%edx
+	xorl	%ecx,%eax
+	shll	$7,%esi
+	xorl	%edx,%ebx
+	shll	$1,%edi
+	xorl	%esi,%ebx
+	shrl	$1,%ecx
+	xorl	%edi,%eax
+	shrl	$1,%edx
+	xorl	%ecx,%eax
+	shll	$6,%edi
+	xorl	%edx,%ebx
+	xorl	%edi,%eax
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movl	208(%esp),%ecx
+	movl	212(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$6,%ecx
+	movl	%edx,%edi
+	shrl	$6,%edx
+	movl	%ecx,%eax
+	shll	$3,%esi
+	movl	%edx,%ebx
+	shll	$3,%edi
+	xorl	%esi,%eax
+	shrl	$13,%ecx
+	xorl	%edi,%ebx
+	shrl	$13,%edx
+	xorl	%ecx,%eax
+	shll	$10,%esi
+	xorl	%edx,%ebx
+	shll	$10,%edi
+	xorl	%esi,%ebx
+	shrl	$10,%ecx
+	xorl	%edi,%eax
+	shrl	$10,%edx
+	xorl	%ecx,%ebx
+	shll	$13,%edi
+	xorl	%edx,%eax
+	xorl	%edi,%eax
+	movl	320(%esp),%ecx
+	movl	324(%esp),%edx
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	movl	248(%esp),%esi
+	movl	252(%esp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,192(%esp)
+	movl	%ebx,196(%esp)
+	movl	40(%esp),%ecx
+	movl	44(%esp),%edx
+	movl	%ecx,%esi
+	shrl	$9,%ecx
+	movl	%edx,%edi
+	shrl	$9,%edx
+	movl	%ecx,%ebx
+	shll	$14,%esi
+	movl	%edx,%eax
+	shll	$14,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%eax
+	shll	$4,%esi
+	xorl	%edx,%ebx
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$4,%ecx
+	xorl	%edi,%eax
+	shrl	$4,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	48(%esp),%ecx
+	movl	52(%esp),%edx
+	movl	56(%esp),%esi
+	movl	60(%esp),%edi
+	addl	64(%esp),%eax
+	adcl	68(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	andl	40(%esp),%ecx
+	andl	44(%esp),%edx
+	addl	192(%esp),%eax
+	adcl	196(%esp),%ebx
+	xorl	%esi,%ecx
+	xorl	%edi,%edx
+	movl	(%ebp),%esi
+	movl	4(%ebp),%edi
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	32(%esp),%ecx
+	movl	36(%esp),%edx
+	addl	%esi,%eax
+	adcl	%edi,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	%eax,32(%esp)
+	movl	%ebx,36(%esp)
+	movl	%ecx,%esi
+	shrl	$2,%ecx
+	movl	%edx,%edi
+	shrl	$2,%edx
+	movl	%ecx,%ebx
+	shll	$4,%esi
+	movl	%edx,%eax
+	shll	$4,%edi
+	xorl	%esi,%ebx
+	shrl	$5,%ecx
+	xorl	%edi,%eax
+	shrl	$5,%edx
+	xorl	%ecx,%ebx
+	shll	$21,%esi
+	xorl	%edx,%eax
+	shll	$21,%edi
+	xorl	%esi,%eax
+	shrl	$21,%ecx
+	xorl	%edi,%ebx
+	shrl	$21,%edx
+	xorl	%ecx,%eax
+	shll	$5,%esi
+	xorl	%edx,%ebx
+	shll	$5,%edi
+	xorl	%esi,%eax
+	xorl	%edi,%ebx
+	movl	8(%esp),%ecx
+	movl	12(%esp),%edx
+	movl	16(%esp),%esi
+	movl	20(%esp),%edi
+	addl	(%esp),%eax
+	adcl	4(%esp),%ebx
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	andl	24(%esp),%ecx
+	andl	28(%esp),%edx
+	andl	8(%esp),%esi
+	andl	12(%esp),%edi
+	orl	%esi,%ecx
+	orl	%edi,%edx
+	addl	%ecx,%eax
+	adcl	%edx,%ebx
+	movl	%eax,(%esp)
+	movl	%ebx,4(%esp)
+	movb	(%ebp),%dl
+	subl	$8,%esp
+	leal	8(%ebp),%ebp
+	cmpb	$23,%dl
+	jne	L01016_79_x86
+	movl	840(%esp),%esi
+	movl	844(%esp),%edi
+	movl	(%esi),%eax
+	movl	4(%esi),%ebx
+	movl	8(%esi),%ecx
+	movl	12(%esi),%edx
+	addl	8(%esp),%eax
+	adcl	12(%esp),%ebx
+	movl	%eax,(%esi)
+	movl	%ebx,4(%esi)
+	addl	16(%esp),%ecx
+	adcl	20(%esp),%edx
+	movl	%ecx,8(%esi)
+	movl	%edx,12(%esi)
+	movl	16(%esi),%eax
+	movl	20(%esi),%ebx
+	movl	24(%esi),%ecx
+	movl	28(%esi),%edx
+	addl	24(%esp),%eax
+	adcl	28(%esp),%ebx
+	movl	%eax,16(%esi)
+	movl	%ebx,20(%esi)
+	addl	32(%esp),%ecx
+	adcl	36(%esp),%edx
+	movl	%ecx,24(%esi)
+	movl	%edx,28(%esi)
+	movl	32(%esi),%eax
+	movl	36(%esi),%ebx
+	movl	40(%esi),%ecx
+	movl	44(%esi),%edx
+	addl	40(%esp),%eax
+	adcl	44(%esp),%ebx
+	movl	%eax,32(%esi)
+	movl	%ebx,36(%esi)
+	addl	48(%esp),%ecx
+	adcl	52(%esp),%edx
+	movl	%ecx,40(%esi)
+	movl	%edx,44(%esi)
+	movl	48(%esi),%eax
+	movl	52(%esi),%ebx
+	movl	56(%esi),%ecx
+	movl	60(%esi),%edx
+	addl	56(%esp),%eax
+	adcl	60(%esp),%ebx
+	movl	%eax,48(%esi)
+	movl	%ebx,52(%esi)
+	addl	64(%esp),%ecx
+	adcl	68(%esp),%edx
+	movl	%ecx,56(%esi)
+	movl	%edx,60(%esi)
+	addl	$840,%esp
+	subl	$640,%ebp
+	cmpl	8(%esp),%edi
+	jb	L002loop_x86
+	movl	12(%esp),%esp
+	popl	%edi
+	popl	%esi
+	popl	%ebx
+	popl	%ebp
+	ret
+.align	6,0x90
+L001K512:
+.long	3609767458,1116352408
+.long	602891725,1899447441
+.long	3964484399,3049323471
+.long	2173295548,3921009573
+.long	4081628472,961987163
+.long	3053834265,1508970993
+.long	2937671579,2453635748
+.long	3664609560,2870763221
+.long	2734883394,3624381080
+.long	1164996542,310598401
+.long	1323610764,607225278
+.long	3590304994,1426881987
+.long	4068182383,1925078388
+.long	991336113,2162078206
+.long	633803317,2614888103
+.long	3479774868,3248222580
+.long	2666613458,3835390401
+.long	944711139,4022224774
+.long	2341262773,264347078
+.long	2007800933,604807628
+.long	1495990901,770255983
+.long	1856431235,1249150122
+.long	3175218132,1555081692
+.long	2198950837,1996064986
+.long	3999719339,2554220882
+.long	766784016,2821834349
+.long	2566594879,2952996808
+.long	3203337956,3210313671
+.long	1034457026,3336571891
+.long	2466948901,3584528711
+.long	3758326383,113926993
+.long	168717936,338241895
+.long	1188179964,666307205
+.long	1546045734,773529912
+.long	1522805485,1294757372
+.long	2643833823,1396182291
+.long	2343527390,1695183700
+.long	1014477480,1986661051
+.long	1206759142,2177026350
+.long	344077627,2456956037
+.long	1290863460,2730485921
+.long	3158454273,2820302411
+.long	3505952657,3259730800
+.long	106217008,3345764771
+.long	3606008344,3516065817
+.long	1432725776,3600352804
+.long	1467031594,4094571909
+.long	851169720,275423344
+.long	3100823752,430227734
+.long	1363258195,506948616
+.long	3750685593,659060556
+.long	3785050280,883997877
+.long	3318307427,958139571
+.long	3812723403,1322822218
+.long	2003034995,1537002063
+.long	3602036899,1747873779
+.long	1575990012,1955562222
+.long	1125592928,2024104815
+.long	2716904306,2227730452
+.long	442776044,2361852424
+.long	593698344,2428436474
+.long	3733110249,2756734187
+.long	2999351573,3204031479
+.long	3815920427,3329325298
+.long	3928383900,3391569614
+.long	566280711,3515267271
+.long	3454069534,3940187606
+.long	4000239992,4118630271
+.long	1914138554,116418474
+.long	2731055270,174292421
+.long	3203993006,289380356
+.long	320620315,460393269
+.long	587496836,685471733
+.long	1086792851,852142971
+.long	365543100,1017036298
+.long	2618297676,1126000580
+.long	3409855158,1288033470
+.long	4234509866,1501505948
+.long	987167468,1607167915
+.long	1246189591,1816402316
+.long	67438087,66051
+.long	202182159,134810123
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
+.byte	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+.byte	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+.byte	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+.byte	62,0
+.section __IMPORT,__pointers,non_lazy_symbol_pointers
+L_OPENSSL_ia32cap_P$non_lazy_ptr:
+.indirect_symbol	_OPENSSL_ia32cap_P
+.long	0
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S
new file mode 100644
index 0000000..02f378b
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/aes/aes-x86_64.S
@@ -0,0 +1,2535 @@
+#if defined(__x86_64__)
+.text	
+
+.p2align	4
+_x86_64_AES_encrypt:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+
+	movl	240(%r15),%r13d
+	subl	$1,%r13d
+	jmp	L$enc_loop
+.p2align	4
+L$enc_loop:
+
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movl	0(%r14,%rsi,8),%r10d
+	movl	0(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r12d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movzbl	%dl,%ebp
+	xorl	3(%r14,%rsi,8),%r10d
+	xorl	3(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r8d
+
+	movzbl	%dh,%esi
+	shrl	$16,%ecx
+	movzbl	%ah,%ebp
+	xorl	3(%r14,%rsi,8),%r12d
+	shrl	$16,%edx
+	xorl	3(%r14,%rbp,8),%r8d
+
+	shrl	$16,%ebx
+	leaq	16(%r15),%r15
+	shrl	$16,%eax
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	xorl	2(%r14,%rsi,8),%r10d
+	xorl	2(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movzbl	%bl,%ebp
+	xorl	1(%r14,%rsi,8),%r10d
+	xorl	1(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r8d
+
+	movl	12(%r15),%edx
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movl	0(%r15),%eax
+	xorl	1(%r14,%rdi,8),%r12d
+	xorl	1(%r14,%rbp,8),%r8d
+
+	movl	4(%r15),%ebx
+	movl	8(%r15),%ecx
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	subl	$1,%r13d
+	jnz	L$enc_loop
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movzbl	2(%r14,%rsi,8),%r10d
+	movzbl	2(%r14,%rdi,8),%r11d
+	movzbl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%dl,%esi
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movzbl	2(%r14,%rsi,8),%r8d
+	movl	0(%r14,%rdi,8),%edi
+	movl	0(%r14,%rbp,8),%ebp
+
+	andl	$65280,%edi
+	andl	$65280,%ebp
+
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+	shrl	$16,%ecx
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	shrl	$16,%edx
+	movl	0(%r14,%rsi,8),%esi
+	movl	0(%r14,%rdi,8),%edi
+
+	andl	$65280,%esi
+	andl	$65280,%edi
+	shrl	$16,%ebx
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+	shrl	$16,%eax
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	movl	0(%r14,%rsi,8),%esi
+	movl	0(%r14,%rdi,8),%edi
+	movl	0(%r14,%rbp,8),%ebp
+
+	andl	$16711680,%esi
+	andl	$16711680,%edi
+	andl	$16711680,%ebp
+
+	xorl	%esi,%r10d
+	xorl	%edi,%r11d
+	xorl	%ebp,%r12d
+
+	movzbl	%bl,%esi
+	movzbl	%dh,%edi
+	movzbl	%ah,%ebp
+	movl	0(%r14,%rsi,8),%esi
+	movl	2(%r14,%rdi,8),%edi
+	movl	2(%r14,%rbp,8),%ebp
+
+	andl	$16711680,%esi
+	andl	$4278190080,%edi
+	andl	$4278190080,%ebp
+
+	xorl	%esi,%r8d
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movl	16+12(%r15),%edx
+	movl	2(%r14,%rsi,8),%esi
+	movl	2(%r14,%rdi,8),%edi
+	movl	16+0(%r15),%eax
+
+	andl	$4278190080,%esi
+	andl	$4278190080,%edi
+
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+
+	movl	16+4(%r15),%ebx
+	movl	16+8(%r15),%ecx
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+.byte	0xf3,0xc3
+
+
+.p2align	4
+_x86_64_AES_encrypt_compact:
+	leaq	128(%r14),%r8
+	movl	0-128(%r8),%edi
+	movl	32-128(%r8),%ebp
+	movl	64-128(%r8),%r10d
+	movl	96-128(%r8),%r11d
+	movl	128-128(%r8),%edi
+	movl	160-128(%r8),%ebp
+	movl	192-128(%r8),%r10d
+	movl	224-128(%r8),%r11d
+	jmp	L$enc_loop_compact
+.p2align	4
+L$enc_loop_compact:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+	leaq	16(%r15),%r15
+	movzbl	%al,%r10d
+	movzbl	%bl,%r11d
+	movzbl	%cl,%r12d
+	movzbl	%dl,%r8d
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	shrl	$16,%ecx
+	movzbl	%dh,%ebp
+	movzbl	(%r14,%r10,1),%r10d
+	movzbl	(%r14,%r11,1),%r11d
+	movzbl	(%r14,%r12,1),%r12d
+	movzbl	(%r14,%r8,1),%r8d
+
+	movzbl	(%r14,%rsi,1),%r9d
+	movzbl	%ah,%esi
+	movzbl	(%r14,%rdi,1),%r13d
+	movzbl	%cl,%edi
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+
+	shll	$8,%r9d
+	shrl	$16,%edx
+	shll	$8,%r13d
+	xorl	%r9d,%r10d
+	shrl	$16,%eax
+	movzbl	%dl,%r9d
+	shrl	$16,%ebx
+	xorl	%r13d,%r11d
+	shll	$8,%ebp
+	movzbl	%al,%r13d
+	movzbl	(%r14,%rdi,1),%edi
+	xorl	%ebp,%r12d
+
+	shll	$8,%esi
+	movzbl	%bl,%ebp
+	shll	$16,%edi
+	xorl	%esi,%r8d
+	movzbl	(%r14,%r9,1),%r9d
+	movzbl	%dh,%esi
+	movzbl	(%r14,%r13,1),%r13d
+	xorl	%edi,%r10d
+
+	shrl	$8,%ecx
+	movzbl	%ah,%edi
+	shll	$16,%r9d
+	shrl	$8,%ebx
+	shll	$16,%r13d
+	xorl	%r9d,%r11d
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rcx,1),%edx
+	movzbl	(%r14,%rbx,1),%ecx
+
+	shll	$16,%ebp
+	xorl	%r13d,%r12d
+	shll	$24,%esi
+	xorl	%ebp,%r8d
+	shll	$24,%edi
+	xorl	%esi,%r10d
+	shll	$24,%edx
+	xorl	%edi,%r11d
+	shll	$24,%ecx
+	movl	%r10d,%eax
+	movl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	cmpq	16(%rsp),%r15
+	je	L$enc_compact_done
+	movl	$2155905152,%r10d
+	movl	$2155905152,%r11d
+	andl	%eax,%r10d
+	andl	%ebx,%r11d
+	movl	%r10d,%esi
+	movl	%r11d,%edi
+	shrl	$7,%r10d
+	leal	(%rax,%rax,1),%r8d
+	shrl	$7,%r11d
+	leal	(%rbx,%rbx,1),%r9d
+	subl	%r10d,%esi
+	subl	%r11d,%edi
+	andl	$4278124286,%r8d
+	andl	$4278124286,%r9d
+	andl	$454761243,%esi
+	andl	$454761243,%edi
+	movl	%eax,%r10d
+	movl	%ebx,%r11d
+	xorl	%esi,%r8d
+	xorl	%edi,%r9d
+
+	xorl	%r8d,%eax
+	xorl	%r9d,%ebx
+	movl	$2155905152,%r12d
+	roll	$24,%eax
+	movl	$2155905152,%ebp
+	roll	$24,%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%ebp
+	xorl	%r8d,%eax
+	xorl	%r9d,%ebx
+	movl	%r12d,%esi
+	rorl	$16,%r10d
+	movl	%ebp,%edi
+	rorl	$16,%r11d
+	leal	(%rcx,%rcx,1),%r8d
+	shrl	$7,%r12d
+	xorl	%r10d,%eax
+	shrl	$7,%ebp
+	xorl	%r11d,%ebx
+	rorl	$8,%r10d
+	leal	(%rdx,%rdx,1),%r9d
+	rorl	$8,%r11d
+	subl	%r12d,%esi
+	subl	%ebp,%edi
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+
+	andl	$4278124286,%r8d
+	andl	$4278124286,%r9d
+	andl	$454761243,%esi
+	andl	$454761243,%edi
+	movl	%ecx,%r12d
+	movl	%edx,%ebp
+	xorl	%esi,%r8d
+	xorl	%edi,%r9d
+
+	rorl	$16,%r12d
+	xorl	%r8d,%ecx
+	rorl	$16,%ebp
+	xorl	%r9d,%edx
+	roll	$24,%ecx
+	movl	0(%r14),%esi
+	roll	$24,%edx
+	xorl	%r8d,%ecx
+	movl	64(%r14),%edi
+	xorl	%r9d,%edx
+	movl	128(%r14),%r8d
+	xorl	%r12d,%ecx
+	rorl	$8,%r12d
+	xorl	%ebp,%edx
+	rorl	$8,%ebp
+	xorl	%r12d,%ecx
+	movl	192(%r14),%r9d
+	xorl	%ebp,%edx
+	jmp	L$enc_loop_compact
+.p2align	4
+L$enc_compact_done:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+.byte	0xf3,0xc3
+
+.p2align	4
+.globl	_asm_AES_encrypt
+.private_extern _asm_AES_encrypt
+
+.private_extern	_asm_AES_encrypt
+_asm_AES_encrypt:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+
+	movq	%rsp,%r10
+	leaq	-63(%rdx),%rcx
+	andq	$-64,%rsp
+	subq	%rsp,%rcx
+	negq	%rcx
+	andq	$960,%rcx
+	subq	%rcx,%rsp
+	subq	$32,%rsp
+
+	movq	%rsi,16(%rsp)
+	movq	%r10,24(%rsp)
+L$enc_prologue:
+
+	movq	%rdx,%r15
+	movl	240(%r15),%r13d
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+
+	shll	$4,%r13d
+	leaq	(%r15,%r13,1),%rbp
+	movq	%r15,(%rsp)
+	movq	%rbp,8(%rsp)
+
+
+	leaq	L$AES_Te+2048(%rip),%r14
+	leaq	768(%rsp),%rbp
+	subq	%r14,%rbp
+	andq	$768,%rbp
+	leaq	(%r14,%rbp,1),%r14
+
+	call	_x86_64_AES_encrypt_compact
+
+	movq	16(%rsp),%r9
+	movq	24(%rsp),%rsi
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$enc_epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_x86_64_AES_decrypt:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+
+	movl	240(%r15),%r13d
+	subl	$1,%r13d
+	jmp	L$dec_loop
+.p2align	4
+L$dec_loop:
+
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movl	0(%r14,%rsi,8),%r10d
+	movl	0(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r12d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movzbl	%dl,%ebp
+	xorl	3(%r14,%rsi,8),%r10d
+	xorl	3(%r14,%rdi,8),%r11d
+	movl	0(%r14,%rbp,8),%r8d
+
+	movzbl	%bh,%esi
+	shrl	$16,%eax
+	movzbl	%ch,%ebp
+	xorl	3(%r14,%rsi,8),%r12d
+	shrl	$16,%edx
+	xorl	3(%r14,%rbp,8),%r8d
+
+	shrl	$16,%ebx
+	leaq	16(%r15),%r15
+	shrl	$16,%ecx
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	xorl	2(%r14,%rsi,8),%r10d
+	xorl	2(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r12d
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	movzbl	%bl,%ebp
+	xorl	1(%r14,%rsi,8),%r10d
+	xorl	1(%r14,%rdi,8),%r11d
+	xorl	2(%r14,%rbp,8),%r8d
+
+	movzbl	%dh,%esi
+	movl	12(%r15),%edx
+	movzbl	%ah,%ebp
+	xorl	1(%r14,%rsi,8),%r12d
+	movl	0(%r15),%eax
+	xorl	1(%r14,%rbp,8),%r8d
+
+	xorl	%r10d,%eax
+	movl	4(%r15),%ebx
+	movl	8(%r15),%ecx
+	xorl	%r12d,%ecx
+	xorl	%r11d,%ebx
+	xorl	%r8d,%edx
+	subl	$1,%r13d
+	jnz	L$dec_loop
+	leaq	2048(%r14),%r14
+	movzbl	%al,%esi
+	movzbl	%bl,%edi
+	movzbl	%cl,%ebp
+	movzbl	(%r14,%rsi,1),%r10d
+	movzbl	(%r14,%rdi,1),%r11d
+	movzbl	(%r14,%rbp,1),%r12d
+
+	movzbl	%dl,%esi
+	movzbl	%dh,%edi
+	movzbl	%ah,%ebp
+	movzbl	(%r14,%rsi,1),%r8d
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$8,%edi
+	shll	$8,%ebp
+
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+	shrl	$16,%edx
+
+	movzbl	%bh,%esi
+	movzbl	%ch,%edi
+	shrl	$16,%eax
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+
+	shll	$8,%esi
+	shll	$8,%edi
+	shrl	$16,%ebx
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+	shrl	$16,%ecx
+
+	movzbl	%cl,%esi
+	movzbl	%dl,%edi
+	movzbl	%al,%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$16,%esi
+	shll	$16,%edi
+	shll	$16,%ebp
+
+	xorl	%esi,%r10d
+	xorl	%edi,%r11d
+	xorl	%ebp,%r12d
+
+	movzbl	%bl,%esi
+	movzbl	%bh,%edi
+	movzbl	%ch,%ebp
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movzbl	(%r14,%rbp,1),%ebp
+
+	shll	$16,%esi
+	shll	$24,%edi
+	shll	$24,%ebp
+
+	xorl	%esi,%r8d
+	xorl	%edi,%r10d
+	xorl	%ebp,%r11d
+
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	movl	16+12(%r15),%edx
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%edi
+	movl	16+0(%r15),%eax
+
+	shll	$24,%esi
+	shll	$24,%edi
+
+	xorl	%esi,%r12d
+	xorl	%edi,%r8d
+
+	movl	16+4(%r15),%ebx
+	movl	16+8(%r15),%ecx
+	leaq	-2048(%r14),%r14
+	xorl	%r10d,%eax
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+.byte	0xf3,0xc3
+
+
+.p2align	4
+_x86_64_AES_decrypt_compact:
+	leaq	128(%r14),%r8
+	movl	0-128(%r8),%edi
+	movl	32-128(%r8),%ebp
+	movl	64-128(%r8),%r10d
+	movl	96-128(%r8),%r11d
+	movl	128-128(%r8),%edi
+	movl	160-128(%r8),%ebp
+	movl	192-128(%r8),%r10d
+	movl	224-128(%r8),%r11d
+	jmp	L$dec_loop_compact
+
+.p2align	4
+L$dec_loop_compact:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+	leaq	16(%r15),%r15
+	movzbl	%al,%r10d
+	movzbl	%bl,%r11d
+	movzbl	%cl,%r12d
+	movzbl	%dl,%r8d
+	movzbl	%dh,%esi
+	movzbl	%ah,%edi
+	shrl	$16,%edx
+	movzbl	%bh,%ebp
+	movzbl	(%r14,%r10,1),%r10d
+	movzbl	(%r14,%r11,1),%r11d
+	movzbl	(%r14,%r12,1),%r12d
+	movzbl	(%r14,%r8,1),%r8d
+
+	movzbl	(%r14,%rsi,1),%r9d
+	movzbl	%ch,%esi
+	movzbl	(%r14,%rdi,1),%r13d
+	movzbl	(%r14,%rbp,1),%ebp
+	movzbl	(%r14,%rsi,1),%esi
+
+	shrl	$16,%ecx
+	shll	$8,%r13d
+	shll	$8,%r9d
+	movzbl	%cl,%edi
+	shrl	$16,%eax
+	xorl	%r9d,%r10d
+	shrl	$16,%ebx
+	movzbl	%dl,%r9d
+
+	shll	$8,%ebp
+	xorl	%r13d,%r11d
+	shll	$8,%esi
+	movzbl	%al,%r13d
+	movzbl	(%r14,%rdi,1),%edi
+	xorl	%ebp,%r12d
+	movzbl	%bl,%ebp
+
+	shll	$16,%edi
+	xorl	%esi,%r8d
+	movzbl	(%r14,%r9,1),%r9d
+	movzbl	%bh,%esi
+	movzbl	(%r14,%rbp,1),%ebp
+	xorl	%edi,%r10d
+	movzbl	(%r14,%r13,1),%r13d
+	movzbl	%ch,%edi
+
+	shll	$16,%ebp
+	shll	$16,%r9d
+	shll	$16,%r13d
+	xorl	%ebp,%r8d
+	movzbl	%dh,%ebp
+	xorl	%r9d,%r11d
+	shrl	$8,%eax
+	xorl	%r13d,%r12d
+
+	movzbl	(%r14,%rsi,1),%esi
+	movzbl	(%r14,%rdi,1),%ebx
+	movzbl	(%r14,%rbp,1),%ecx
+	movzbl	(%r14,%rax,1),%edx
+
+	movl	%r10d,%eax
+	shll	$24,%esi
+	shll	$24,%ebx
+	shll	$24,%ecx
+	xorl	%esi,%eax
+	shll	$24,%edx
+	xorl	%r11d,%ebx
+	xorl	%r12d,%ecx
+	xorl	%r8d,%edx
+	cmpq	16(%rsp),%r15
+	je	L$dec_compact_done
+
+	movq	256+0(%r14),%rsi
+	shlq	$32,%rbx
+	shlq	$32,%rdx
+	movq	256+8(%r14),%rdi
+	orq	%rbx,%rax
+	orq	%rdx,%rcx
+	movq	256+16(%r14),%rbp
+	movq	%rsi,%r9
+	movq	%rsi,%r12
+	andq	%rax,%r9
+	andq	%rcx,%r12
+	movq	%r9,%rbx
+	movq	%r12,%rdx
+	shrq	$7,%r9
+	leaq	(%rax,%rax,1),%r8
+	shrq	$7,%r12
+	leaq	(%rcx,%rcx,1),%r11
+	subq	%r9,%rbx
+	subq	%r12,%rdx
+	andq	%rdi,%r8
+	andq	%rdi,%r11
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r8
+	xorq	%rdx,%r11
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r8,%r10
+	andq	%r11,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	leaq	(%r8,%r8,1),%r9
+	shrq	$7,%r13
+	leaq	(%r11,%r11,1),%r12
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	andq	%rdi,%r9
+	andq	%rdi,%r12
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r9
+	xorq	%rdx,%r12
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r9,%r10
+	andq	%r12,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	xorq	%rax,%r8
+	shrq	$7,%r13
+	xorq	%rcx,%r11
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	leaq	(%r9,%r9,1),%r10
+	leaq	(%r12,%r12,1),%r13
+	xorq	%rax,%r9
+	xorq	%rcx,%r12
+	andq	%rdi,%r10
+	andq	%rdi,%r13
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r10
+	xorq	%rdx,%r13
+
+	xorq	%r10,%rax
+	xorq	%r13,%rcx
+	xorq	%r10,%r8
+	xorq	%r13,%r11
+	movq	%rax,%rbx
+	movq	%rcx,%rdx
+	xorq	%r10,%r9
+	shrq	$32,%rbx
+	xorq	%r13,%r12
+	shrq	$32,%rdx
+	xorq	%r8,%r10
+	roll	$8,%eax
+	xorq	%r11,%r13
+	roll	$8,%ecx
+	xorq	%r9,%r10
+	roll	$8,%ebx
+	xorq	%r12,%r13
+
+	roll	$8,%edx
+	xorl	%r10d,%eax
+	shrq	$32,%r10
+	xorl	%r13d,%ecx
+	shrq	$32,%r13
+	xorl	%r10d,%ebx
+	xorl	%r13d,%edx
+
+	movq	%r8,%r10
+	roll	$24,%r8d
+	movq	%r11,%r13
+	roll	$24,%r11d
+	shrq	$32,%r10
+	xorl	%r8d,%eax
+	shrq	$32,%r13
+	xorl	%r11d,%ecx
+	roll	$24,%r10d
+	movq	%r9,%r8
+	roll	$24,%r13d
+	movq	%r12,%r11
+	shrq	$32,%r8
+	xorl	%r10d,%ebx
+	shrq	$32,%r11
+	xorl	%r13d,%edx
+
+	movq	0(%r14),%rsi
+	roll	$16,%r9d
+	movq	64(%r14),%rdi
+	roll	$16,%r12d
+	movq	128(%r14),%rbp
+	roll	$16,%r8d
+	movq	192(%r14),%r10
+	xorl	%r9d,%eax
+	roll	$16,%r11d
+	xorl	%r12d,%ecx
+	movq	256(%r14),%r13
+	xorl	%r8d,%ebx
+	xorl	%r11d,%edx
+	jmp	L$dec_loop_compact
+.p2align	4
+L$dec_compact_done:
+	xorl	0(%r15),%eax
+	xorl	4(%r15),%ebx
+	xorl	8(%r15),%ecx
+	xorl	12(%r15),%edx
+.byte	0xf3,0xc3
+
+.p2align	4
+.globl	_asm_AES_decrypt
+.private_extern _asm_AES_decrypt
+
+.private_extern	_asm_AES_decrypt
+_asm_AES_decrypt:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+
+	movq	%rsp,%r10
+	leaq	-63(%rdx),%rcx
+	andq	$-64,%rsp
+	subq	%rsp,%rcx
+	negq	%rcx
+	andq	$960,%rcx
+	subq	%rcx,%rsp
+	subq	$32,%rsp
+
+	movq	%rsi,16(%rsp)
+	movq	%r10,24(%rsp)
+L$dec_prologue:
+
+	movq	%rdx,%r15
+	movl	240(%r15),%r13d
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+
+	shll	$4,%r13d
+	leaq	(%r15,%r13,1),%rbp
+	movq	%r15,(%rsp)
+	movq	%rbp,8(%rsp)
+
+
+	leaq	L$AES_Td+2048(%rip),%r14
+	leaq	768(%rsp),%rbp
+	subq	%r14,%rbp
+	andq	$768,%rbp
+	leaq	(%r14,%rbp,1),%r14
+	shrq	$3,%rbp
+	addq	%rbp,%r14
+
+	call	_x86_64_AES_decrypt_compact
+
+	movq	16(%rsp),%r9
+	movq	24(%rsp),%rsi
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$dec_epilogue:
+	.byte	0xf3,0xc3
+
+.p2align	4
+.globl	_asm_AES_set_encrypt_key
+.private_extern _asm_AES_set_encrypt_key
+
+_asm_AES_set_encrypt_key:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$8,%rsp
+L$enc_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+
+	movq	40(%rsp),%rbp
+	movq	48(%rsp),%rbx
+	addq	$56,%rsp
+L$enc_key_epilogue:
+	.byte	0xf3,0xc3
+
+
+
+.p2align	4
+_x86_64_AES_set_encrypt_key:
+	movl	%esi,%ecx
+	movq	%rdi,%rsi
+	movq	%rdx,%rdi
+
+	testq	$-1,%rsi
+	jz	L$badpointer
+	testq	$-1,%rdi
+	jz	L$badpointer
+
+	leaq	L$AES_Te(%rip),%rbp
+	leaq	2048+128(%rbp),%rbp
+
+
+	movl	0-128(%rbp),%eax
+	movl	32-128(%rbp),%ebx
+	movl	64-128(%rbp),%r8d
+	movl	96-128(%rbp),%edx
+	movl	128-128(%rbp),%eax
+	movl	160-128(%rbp),%ebx
+	movl	192-128(%rbp),%r8d
+	movl	224-128(%rbp),%edx
+
+	cmpl	$128,%ecx
+	je	L$10rounds
+	cmpl	$192,%ecx
+	je	L$12rounds
+	cmpl	$256,%ecx
+	je	L$14rounds
+	movq	$-2,%rax
+	jmp	L$exit
+
+L$10rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rdx,8(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	L$10shortcut
+.p2align	2
+L$10loop:
+	movl	0(%rdi),%eax
+	movl	12(%rdi),%edx
+L$10shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,16(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,20(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,24(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,28(%rdi)
+	addl	$1,%ecx
+	leaq	16(%rdi),%rdi
+	cmpl	$10,%ecx
+	jl	L$10loop
+
+	movl	$10,80(%rdi)
+	xorq	%rax,%rax
+	jmp	L$exit
+
+L$12rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	16(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rdx,16(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	L$12shortcut
+.p2align	2
+L$12loop:
+	movl	0(%rdi),%eax
+	movl	20(%rdi),%edx
+L$12shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,24(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,28(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,32(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,36(%rdi)
+
+	cmpl	$7,%ecx
+	je	L$12break
+	addl	$1,%ecx
+
+	xorl	16(%rdi),%eax
+	movl	%eax,40(%rdi)
+	xorl	20(%rdi),%eax
+	movl	%eax,44(%rdi)
+
+	leaq	24(%rdi),%rdi
+	jmp	L$12loop
+L$12break:
+	movl	$12,72(%rdi)
+	xorq	%rax,%rax
+	jmp	L$exit
+
+L$14rounds:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	16(%rsi),%rcx
+	movq	24(%rsi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,16(%rdi)
+	movq	%rdx,24(%rdi)
+
+	shrq	$32,%rdx
+	xorl	%ecx,%ecx
+	jmp	L$14shortcut
+.p2align	2
+L$14loop:
+	movl	0(%rdi),%eax
+	movl	28(%rdi),%edx
+L$14shortcut:
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$8,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	xorl	1024-128(%rbp,%rcx,4),%eax
+	movl	%eax,32(%rdi)
+	xorl	4(%rdi),%eax
+	movl	%eax,36(%rdi)
+	xorl	8(%rdi),%eax
+	movl	%eax,40(%rdi)
+	xorl	12(%rdi),%eax
+	movl	%eax,44(%rdi)
+
+	cmpl	$6,%ecx
+	je	L$14break
+	addl	$1,%ecx
+
+	movl	%eax,%edx
+	movl	16(%rdi),%eax
+	movzbl	%dl,%esi
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shrl	$16,%edx
+	shll	$8,%ebx
+	movzbl	%dl,%esi
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	movzbl	%dh,%esi
+	shll	$16,%ebx
+	xorl	%ebx,%eax
+
+	movzbl	-128(%rbp,%rsi,1),%ebx
+	shll	$24,%ebx
+	xorl	%ebx,%eax
+
+	movl	%eax,48(%rdi)
+	xorl	20(%rdi),%eax
+	movl	%eax,52(%rdi)
+	xorl	24(%rdi),%eax
+	movl	%eax,56(%rdi)
+	xorl	28(%rdi),%eax
+	movl	%eax,60(%rdi)
+
+	leaq	32(%rdi),%rdi
+	jmp	L$14loop
+L$14break:
+	movl	$14,48(%rdi)
+	xorq	%rax,%rax
+	jmp	L$exit
+
+L$badpointer:
+	movq	$-1,%rax
+L$exit:
+.byte	0xf3,0xc3
+
+.p2align	4
+.globl	_asm_AES_set_decrypt_key
+.private_extern _asm_AES_set_decrypt_key
+
+_asm_AES_set_decrypt_key:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	pushq	%rdx
+L$dec_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+	movq	(%rsp),%r8
+	cmpl	$0,%eax
+	jne	L$abort
+
+	movl	240(%r8),%r14d
+	xorq	%rdi,%rdi
+	leaq	(%rdi,%r14,4),%rcx
+	movq	%r8,%rsi
+	leaq	(%r8,%rcx,4),%rdi
+.p2align	2
+L$invert:
+	movq	0(%rsi),%rax
+	movq	8(%rsi),%rbx
+	movq	0(%rdi),%rcx
+	movq	8(%rdi),%rdx
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,0(%rsi)
+	movq	%rdx,8(%rsi)
+	leaq	16(%rsi),%rsi
+	leaq	-16(%rdi),%rdi
+	cmpq	%rsi,%rdi
+	jne	L$invert
+
+	leaq	L$AES_Te+2048+1024(%rip),%rax
+
+	movq	40(%rax),%rsi
+	movq	48(%rax),%rdi
+	movq	56(%rax),%rbp
+
+	movq	%r8,%r15
+	subl	$1,%r14d
+.p2align	2
+L$permute:
+	leaq	16(%r15),%r15
+	movq	0(%r15),%rax
+	movq	8(%r15),%rcx
+	movq	%rsi,%r9
+	movq	%rsi,%r12
+	andq	%rax,%r9
+	andq	%rcx,%r12
+	movq	%r9,%rbx
+	movq	%r12,%rdx
+	shrq	$7,%r9
+	leaq	(%rax,%rax,1),%r8
+	shrq	$7,%r12
+	leaq	(%rcx,%rcx,1),%r11
+	subq	%r9,%rbx
+	subq	%r12,%rdx
+	andq	%rdi,%r8
+	andq	%rdi,%r11
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r8
+	xorq	%rdx,%r11
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r8,%r10
+	andq	%r11,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	leaq	(%r8,%r8,1),%r9
+	shrq	$7,%r13
+	leaq	(%r11,%r11,1),%r12
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	andq	%rdi,%r9
+	andq	%rdi,%r12
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r9
+	xorq	%rdx,%r12
+	movq	%rsi,%r10
+	movq	%rsi,%r13
+
+	andq	%r9,%r10
+	andq	%r12,%r13
+	movq	%r10,%rbx
+	movq	%r13,%rdx
+	shrq	$7,%r10
+	xorq	%rax,%r8
+	shrq	$7,%r13
+	xorq	%rcx,%r11
+	subq	%r10,%rbx
+	subq	%r13,%rdx
+	leaq	(%r9,%r9,1),%r10
+	leaq	(%r12,%r12,1),%r13
+	xorq	%rax,%r9
+	xorq	%rcx,%r12
+	andq	%rdi,%r10
+	andq	%rdi,%r13
+	andq	%rbp,%rbx
+	andq	%rbp,%rdx
+	xorq	%rbx,%r10
+	xorq	%rdx,%r13
+
+	xorq	%r10,%rax
+	xorq	%r13,%rcx
+	xorq	%r10,%r8
+	xorq	%r13,%r11
+	movq	%rax,%rbx
+	movq	%rcx,%rdx
+	xorq	%r10,%r9
+	shrq	$32,%rbx
+	xorq	%r13,%r12
+	shrq	$32,%rdx
+	xorq	%r8,%r10
+	roll	$8,%eax
+	xorq	%r11,%r13
+	roll	$8,%ecx
+	xorq	%r9,%r10
+	roll	$8,%ebx
+	xorq	%r12,%r13
+
+	roll	$8,%edx
+	xorl	%r10d,%eax
+	shrq	$32,%r10
+	xorl	%r13d,%ecx
+	shrq	$32,%r13
+	xorl	%r10d,%ebx
+	xorl	%r13d,%edx
+
+	movq	%r8,%r10
+	roll	$24,%r8d
+	movq	%r11,%r13
+	roll	$24,%r11d
+	shrq	$32,%r10
+	xorl	%r8d,%eax
+	shrq	$32,%r13
+	xorl	%r11d,%ecx
+	roll	$24,%r10d
+	movq	%r9,%r8
+	roll	$24,%r13d
+	movq	%r12,%r11
+	shrq	$32,%r8
+	xorl	%r10d,%ebx
+	shrq	$32,%r11
+	xorl	%r13d,%edx
+
+
+	roll	$16,%r9d
+
+	roll	$16,%r12d
+
+	roll	$16,%r8d
+
+	xorl	%r9d,%eax
+	roll	$16,%r11d
+	xorl	%r12d,%ecx
+
+	xorl	%r8d,%ebx
+	xorl	%r11d,%edx
+	movl	%eax,0(%r15)
+	movl	%ebx,4(%r15)
+	movl	%ecx,8(%r15)
+	movl	%edx,12(%r15)
+	subl	$1,%r14d
+	jnz	L$permute
+
+	xorq	%rax,%rax
+L$abort:
+	movq	8(%rsp),%r15
+	movq	16(%rsp),%r14
+	movq	24(%rsp),%r13
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%rbp
+	movq	48(%rsp),%rbx
+	addq	$56,%rsp
+L$dec_key_epilogue:
+	.byte	0xf3,0xc3
+
+.p2align	4
+.globl	_asm_AES_cbc_encrypt
+.private_extern _asm_AES_cbc_encrypt
+
+
+.private_extern	_asm_AES_cbc_encrypt
+_asm_AES_cbc_encrypt:
+	cmpq	$0,%rdx
+	je	L$cbc_epilogue
+	pushfq
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+L$cbc_prologue:
+
+	cld
+	movl	%r9d,%r9d
+
+	leaq	L$AES_Te(%rip),%r14
+	cmpq	$0,%r9
+	jne	L$cbc_picked_te
+	leaq	L$AES_Td(%rip),%r14
+L$cbc_picked_te:
+
+	movl	_OPENSSL_ia32cap_P(%rip),%r10d
+	cmpq	$512,%rdx
+	jb	L$cbc_slow_prologue
+	testq	$15,%rdx
+	jnz	L$cbc_slow_prologue
+	btl	$28,%r10d
+	jc	L$cbc_slow_prologue
+
+
+	leaq	-88-248(%rsp),%r15
+	andq	$-64,%r15
+
+
+	movq	%r14,%r10
+	leaq	2304(%r14),%r11
+	movq	%r15,%r12
+	andq	$4095,%r10
+	andq	$4095,%r11
+	andq	$4095,%r12
+
+	cmpq	%r11,%r12
+	jb	L$cbc_te_break_out
+	subq	%r11,%r12
+	subq	%r12,%r15
+	jmp	L$cbc_te_ok
+L$cbc_te_break_out:
+	subq	%r10,%r12
+	andq	$4095,%r12
+	addq	$320,%r12
+	subq	%r12,%r15
+.p2align	2
+L$cbc_te_ok:
+
+	xchgq	%rsp,%r15
+
+	movq	%r15,16(%rsp)
+L$cbc_fast_body:
+	movq	%rdi,24(%rsp)
+	movq	%rsi,32(%rsp)
+	movq	%rdx,40(%rsp)
+	movq	%rcx,48(%rsp)
+	movq	%r8,56(%rsp)
+	movl	$0,80+240(%rsp)
+	movq	%r8,%rbp
+	movq	%r9,%rbx
+	movq	%rsi,%r9
+	movq	%rdi,%r8
+	movq	%rcx,%r15
+
+	movl	240(%r15),%eax
+
+	movq	%r15,%r10
+	subq	%r14,%r10
+	andq	$4095,%r10
+	cmpq	$2304,%r10
+	jb	L$cbc_do_ecopy
+	cmpq	$4096-248,%r10
+	jb	L$cbc_skip_ecopy
+.p2align	2
+L$cbc_do_ecopy:
+	movq	%r15,%rsi
+	leaq	80(%rsp),%rdi
+	leaq	80(%rsp),%r15
+	movl	$30,%ecx
+.long	0x90A548F3
+	movl	%eax,(%rdi)
+L$cbc_skip_ecopy:
+	movq	%r15,0(%rsp)
+
+	movl	$18,%ecx
+.p2align	2
+L$cbc_prefetch_te:
+	movq	0(%r14),%r10
+	movq	32(%r14),%r11
+	movq	64(%r14),%r12
+	movq	96(%r14),%r13
+	leaq	128(%r14),%r14
+	subl	$1,%ecx
+	jnz	L$cbc_prefetch_te
+	leaq	-2304(%r14),%r14
+
+	cmpq	$0,%rbx
+	je	L$FAST_DECRYPT
+
+
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+
+.p2align	2
+L$cbc_fast_enc_loop:
+	xorl	0(%r8),%eax
+	xorl	4(%r8),%ebx
+	xorl	8(%r8),%ecx
+	xorl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_encrypt
+
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	subq	$16,%r10
+	testq	$-16,%r10
+	movq	%r10,40(%rsp)
+	jnz	L$cbc_fast_enc_loop
+	movq	56(%rsp),%rbp
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	jmp	L$cbc_fast_cleanup
+
+
+.p2align	4
+L$FAST_DECRYPT:
+	cmpq	%r8,%r9
+	je	L$cbc_fast_dec_in_place
+
+	movq	%rbp,64(%rsp)
+.p2align	2
+L$cbc_fast_dec_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_decrypt
+
+	movq	64(%rsp),%rbp
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	xorl	0(%rbp),%eax
+	xorl	4(%rbp),%ebx
+	xorl	8(%rbp),%ecx
+	xorl	12(%rbp),%edx
+	movq	%r8,%rbp
+
+	subq	$16,%r10
+	movq	%r10,40(%rsp)
+	movq	%rbp,64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	jnz	L$cbc_fast_dec_loop
+	movq	56(%rsp),%r12
+	movq	0(%rbp),%r10
+	movq	8(%rbp),%r11
+	movq	%r10,0(%r12)
+	movq	%r11,8(%r12)
+	jmp	L$cbc_fast_cleanup
+
+.p2align	4
+L$cbc_fast_dec_in_place:
+	movq	0(%rbp),%r10
+	movq	8(%rbp),%r11
+	movq	%r10,0+64(%rsp)
+	movq	%r11,8+64(%rsp)
+.p2align	2
+L$cbc_fast_dec_in_place_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+
+	call	_x86_64_AES_decrypt
+
+	movq	24(%rsp),%r8
+	movq	40(%rsp),%r10
+	xorl	0+64(%rsp),%eax
+	xorl	4+64(%rsp),%ebx
+	xorl	8+64(%rsp),%ecx
+	xorl	12+64(%rsp),%edx
+
+	movq	0(%r8),%r11
+	movq	8(%r8),%r12
+	subq	$16,%r10
+	jz	L$cbc_fast_dec_in_place_done
+
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	movq	%r10,40(%rsp)
+	jmp	L$cbc_fast_dec_in_place_loop
+L$cbc_fast_dec_in_place_done:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+.p2align	2
+L$cbc_fast_cleanup:
+	cmpl	$0,80+240(%rsp)
+	leaq	80(%rsp),%rdi
+	je	L$cbc_exit
+	movl	$30,%ecx
+	xorq	%rax,%rax
+.long	0x90AB48F3
+
+	jmp	L$cbc_exit
+
+
+.p2align	4
+L$cbc_slow_prologue:
+
+	leaq	-88(%rsp),%rbp
+	andq	$-64,%rbp
+
+	leaq	-88-63(%rcx),%r10
+	subq	%rbp,%r10
+	negq	%r10
+	andq	$960,%r10
+	subq	%r10,%rbp
+
+	xchgq	%rsp,%rbp
+
+	movq	%rbp,16(%rsp)
+L$cbc_slow_body:
+
+
+
+
+	movq	%r8,56(%rsp)
+	movq	%r8,%rbp
+	movq	%r9,%rbx
+	movq	%rsi,%r9
+	movq	%rdi,%r8
+	movq	%rcx,%r15
+	movq	%rdx,%r10
+
+	movl	240(%r15),%eax
+	movq	%r15,0(%rsp)
+	shll	$4,%eax
+	leaq	(%r15,%rax,1),%rax
+	movq	%rax,8(%rsp)
+
+
+	leaq	2048(%r14),%r14
+	leaq	768-8(%rsp),%rax
+	subq	%r14,%rax
+	andq	$768,%rax
+	leaq	(%r14,%rax,1),%r14
+
+	cmpq	$0,%rbx
+	je	L$SLOW_DECRYPT
+
+
+	testq	$-16,%r10
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+	jz	L$cbc_slow_enc_tail
+
+.p2align	2
+L$cbc_slow_enc_loop:
+	xorl	0(%r8),%eax
+	xorl	4(%r8),%ebx
+	xorl	8(%r8),%ecx
+	xorl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+	movq	%r9,32(%rsp)
+	movq	%r10,40(%rsp)
+
+	call	_x86_64_AES_encrypt_compact
+
+	movq	24(%rsp),%r8
+	movq	32(%rsp),%r9
+	movq	40(%rsp),%r10
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	subq	$16,%r10
+	testq	$-16,%r10
+	jnz	L$cbc_slow_enc_loop
+	testq	$15,%r10
+	jnz	L$cbc_slow_enc_tail
+	movq	56(%rsp),%rbp
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	jmp	L$cbc_exit
+
+.p2align	2
+L$cbc_slow_enc_tail:
+	movq	%rax,%r11
+	movq	%rcx,%r12
+	movq	%r10,%rcx
+	movq	%r8,%rsi
+	movq	%r9,%rdi
+.long	0x9066A4F3
+	movq	$16,%rcx
+	subq	%r10,%rcx
+	xorq	%rax,%rax
+.long	0x9066AAF3
+	movq	%r9,%r8
+	movq	$16,%r10
+	movq	%r11,%rax
+	movq	%r12,%rcx
+	jmp	L$cbc_slow_enc_loop
+
+.p2align	4
+L$SLOW_DECRYPT:
+	shrq	$3,%rax
+	addq	%rax,%r14
+
+	movq	0(%rbp),%r11
+	movq	8(%rbp),%r12
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+.p2align	2
+L$cbc_slow_dec_loop:
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movq	0(%rsp),%r15
+	movq	%r8,24(%rsp)
+	movq	%r9,32(%rsp)
+	movq	%r10,40(%rsp)
+
+	call	_x86_64_AES_decrypt_compact
+
+	movq	24(%rsp),%r8
+	movq	32(%rsp),%r9
+	movq	40(%rsp),%r10
+	xorl	0+64(%rsp),%eax
+	xorl	4+64(%rsp),%ebx
+	xorl	8+64(%rsp),%ecx
+	xorl	12+64(%rsp),%edx
+
+	movq	0(%r8),%r11
+	movq	8(%r8),%r12
+	subq	$16,%r10
+	jc	L$cbc_slow_dec_partial
+	jz	L$cbc_slow_dec_done
+
+	movq	%r11,0+64(%rsp)
+	movq	%r12,8+64(%rsp)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	leaq	16(%r8),%r8
+	leaq	16(%r9),%r9
+	jmp	L$cbc_slow_dec_loop
+L$cbc_slow_dec_done:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0(%r9)
+	movl	%ebx,4(%r9)
+	movl	%ecx,8(%r9)
+	movl	%edx,12(%r9)
+
+	jmp	L$cbc_exit
+
+.p2align	2
+L$cbc_slow_dec_partial:
+	movq	56(%rsp),%rdi
+	movq	%r11,0(%rdi)
+	movq	%r12,8(%rdi)
+
+	movl	%eax,0+64(%rsp)
+	movl	%ebx,4+64(%rsp)
+	movl	%ecx,8+64(%rsp)
+	movl	%edx,12+64(%rsp)
+
+	movq	%r9,%rdi
+	leaq	64(%rsp),%rsi
+	leaq	16(%r10),%rcx
+.long	0x9066A4F3
+	jmp	L$cbc_exit
+
+.p2align	4
+L$cbc_exit:
+	movq	16(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$cbc_popfq:
+	popfq
+L$cbc_epilogue:
+	.byte	0xf3,0xc3
+
+.p2align	6
+L$AES_Te:
+.long	0xa56363c6,0xa56363c6
+.long	0x847c7cf8,0x847c7cf8
+.long	0x997777ee,0x997777ee
+.long	0x8d7b7bf6,0x8d7b7bf6
+.long	0x0df2f2ff,0x0df2f2ff
+.long	0xbd6b6bd6,0xbd6b6bd6
+.long	0xb16f6fde,0xb16f6fde
+.long	0x54c5c591,0x54c5c591
+.long	0x50303060,0x50303060
+.long	0x03010102,0x03010102
+.long	0xa96767ce,0xa96767ce
+.long	0x7d2b2b56,0x7d2b2b56
+.long	0x19fefee7,0x19fefee7
+.long	0x62d7d7b5,0x62d7d7b5
+.long	0xe6abab4d,0xe6abab4d
+.long	0x9a7676ec,0x9a7676ec
+.long	0x45caca8f,0x45caca8f
+.long	0x9d82821f,0x9d82821f
+.long	0x40c9c989,0x40c9c989
+.long	0x877d7dfa,0x877d7dfa
+.long	0x15fafaef,0x15fafaef
+.long	0xeb5959b2,0xeb5959b2
+.long	0xc947478e,0xc947478e
+.long	0x0bf0f0fb,0x0bf0f0fb
+.long	0xecadad41,0xecadad41
+.long	0x67d4d4b3,0x67d4d4b3
+.long	0xfda2a25f,0xfda2a25f
+.long	0xeaafaf45,0xeaafaf45
+.long	0xbf9c9c23,0xbf9c9c23
+.long	0xf7a4a453,0xf7a4a453
+.long	0x967272e4,0x967272e4
+.long	0x5bc0c09b,0x5bc0c09b
+.long	0xc2b7b775,0xc2b7b775
+.long	0x1cfdfde1,0x1cfdfde1
+.long	0xae93933d,0xae93933d
+.long	0x6a26264c,0x6a26264c
+.long	0x5a36366c,0x5a36366c
+.long	0x413f3f7e,0x413f3f7e
+.long	0x02f7f7f5,0x02f7f7f5
+.long	0x4fcccc83,0x4fcccc83
+.long	0x5c343468,0x5c343468
+.long	0xf4a5a551,0xf4a5a551
+.long	0x34e5e5d1,0x34e5e5d1
+.long	0x08f1f1f9,0x08f1f1f9
+.long	0x937171e2,0x937171e2
+.long	0x73d8d8ab,0x73d8d8ab
+.long	0x53313162,0x53313162
+.long	0x3f15152a,0x3f15152a
+.long	0x0c040408,0x0c040408
+.long	0x52c7c795,0x52c7c795
+.long	0x65232346,0x65232346
+.long	0x5ec3c39d,0x5ec3c39d
+.long	0x28181830,0x28181830
+.long	0xa1969637,0xa1969637
+.long	0x0f05050a,0x0f05050a
+.long	0xb59a9a2f,0xb59a9a2f
+.long	0x0907070e,0x0907070e
+.long	0x36121224,0x36121224
+.long	0x9b80801b,0x9b80801b
+.long	0x3de2e2df,0x3de2e2df
+.long	0x26ebebcd,0x26ebebcd
+.long	0x6927274e,0x6927274e
+.long	0xcdb2b27f,0xcdb2b27f
+.long	0x9f7575ea,0x9f7575ea
+.long	0x1b090912,0x1b090912
+.long	0x9e83831d,0x9e83831d
+.long	0x742c2c58,0x742c2c58
+.long	0x2e1a1a34,0x2e1a1a34
+.long	0x2d1b1b36,0x2d1b1b36
+.long	0xb26e6edc,0xb26e6edc
+.long	0xee5a5ab4,0xee5a5ab4
+.long	0xfba0a05b,0xfba0a05b
+.long	0xf65252a4,0xf65252a4
+.long	0x4d3b3b76,0x4d3b3b76
+.long	0x61d6d6b7,0x61d6d6b7
+.long	0xceb3b37d,0xceb3b37d
+.long	0x7b292952,0x7b292952
+.long	0x3ee3e3dd,0x3ee3e3dd
+.long	0x712f2f5e,0x712f2f5e
+.long	0x97848413,0x97848413
+.long	0xf55353a6,0xf55353a6
+.long	0x68d1d1b9,0x68d1d1b9
+.long	0x00000000,0x00000000
+.long	0x2cededc1,0x2cededc1
+.long	0x60202040,0x60202040
+.long	0x1ffcfce3,0x1ffcfce3
+.long	0xc8b1b179,0xc8b1b179
+.long	0xed5b5bb6,0xed5b5bb6
+.long	0xbe6a6ad4,0xbe6a6ad4
+.long	0x46cbcb8d,0x46cbcb8d
+.long	0xd9bebe67,0xd9bebe67
+.long	0x4b393972,0x4b393972
+.long	0xde4a4a94,0xde4a4a94
+.long	0xd44c4c98,0xd44c4c98
+.long	0xe85858b0,0xe85858b0
+.long	0x4acfcf85,0x4acfcf85
+.long	0x6bd0d0bb,0x6bd0d0bb
+.long	0x2aefefc5,0x2aefefc5
+.long	0xe5aaaa4f,0xe5aaaa4f
+.long	0x16fbfbed,0x16fbfbed
+.long	0xc5434386,0xc5434386
+.long	0xd74d4d9a,0xd74d4d9a
+.long	0x55333366,0x55333366
+.long	0x94858511,0x94858511
+.long	0xcf45458a,0xcf45458a
+.long	0x10f9f9e9,0x10f9f9e9
+.long	0x06020204,0x06020204
+.long	0x817f7ffe,0x817f7ffe
+.long	0xf05050a0,0xf05050a0
+.long	0x443c3c78,0x443c3c78
+.long	0xba9f9f25,0xba9f9f25
+.long	0xe3a8a84b,0xe3a8a84b
+.long	0xf35151a2,0xf35151a2
+.long	0xfea3a35d,0xfea3a35d
+.long	0xc0404080,0xc0404080
+.long	0x8a8f8f05,0x8a8f8f05
+.long	0xad92923f,0xad92923f
+.long	0xbc9d9d21,0xbc9d9d21
+.long	0x48383870,0x48383870
+.long	0x04f5f5f1,0x04f5f5f1
+.long	0xdfbcbc63,0xdfbcbc63
+.long	0xc1b6b677,0xc1b6b677
+.long	0x75dadaaf,0x75dadaaf
+.long	0x63212142,0x63212142
+.long	0x30101020,0x30101020
+.long	0x1affffe5,0x1affffe5
+.long	0x0ef3f3fd,0x0ef3f3fd
+.long	0x6dd2d2bf,0x6dd2d2bf
+.long	0x4ccdcd81,0x4ccdcd81
+.long	0x140c0c18,0x140c0c18
+.long	0x35131326,0x35131326
+.long	0x2fececc3,0x2fececc3
+.long	0xe15f5fbe,0xe15f5fbe
+.long	0xa2979735,0xa2979735
+.long	0xcc444488,0xcc444488
+.long	0x3917172e,0x3917172e
+.long	0x57c4c493,0x57c4c493
+.long	0xf2a7a755,0xf2a7a755
+.long	0x827e7efc,0x827e7efc
+.long	0x473d3d7a,0x473d3d7a
+.long	0xac6464c8,0xac6464c8
+.long	0xe75d5dba,0xe75d5dba
+.long	0x2b191932,0x2b191932
+.long	0x957373e6,0x957373e6
+.long	0xa06060c0,0xa06060c0
+.long	0x98818119,0x98818119
+.long	0xd14f4f9e,0xd14f4f9e
+.long	0x7fdcdca3,0x7fdcdca3
+.long	0x66222244,0x66222244
+.long	0x7e2a2a54,0x7e2a2a54
+.long	0xab90903b,0xab90903b
+.long	0x8388880b,0x8388880b
+.long	0xca46468c,0xca46468c
+.long	0x29eeeec7,0x29eeeec7
+.long	0xd3b8b86b,0xd3b8b86b
+.long	0x3c141428,0x3c141428
+.long	0x79dedea7,0x79dedea7
+.long	0xe25e5ebc,0xe25e5ebc
+.long	0x1d0b0b16,0x1d0b0b16
+.long	0x76dbdbad,0x76dbdbad
+.long	0x3be0e0db,0x3be0e0db
+.long	0x56323264,0x56323264
+.long	0x4e3a3a74,0x4e3a3a74
+.long	0x1e0a0a14,0x1e0a0a14
+.long	0xdb494992,0xdb494992
+.long	0x0a06060c,0x0a06060c
+.long	0x6c242448,0x6c242448
+.long	0xe45c5cb8,0xe45c5cb8
+.long	0x5dc2c29f,0x5dc2c29f
+.long	0x6ed3d3bd,0x6ed3d3bd
+.long	0xefacac43,0xefacac43
+.long	0xa66262c4,0xa66262c4
+.long	0xa8919139,0xa8919139
+.long	0xa4959531,0xa4959531
+.long	0x37e4e4d3,0x37e4e4d3
+.long	0x8b7979f2,0x8b7979f2
+.long	0x32e7e7d5,0x32e7e7d5
+.long	0x43c8c88b,0x43c8c88b
+.long	0x5937376e,0x5937376e
+.long	0xb76d6dda,0xb76d6dda
+.long	0x8c8d8d01,0x8c8d8d01
+.long	0x64d5d5b1,0x64d5d5b1
+.long	0xd24e4e9c,0xd24e4e9c
+.long	0xe0a9a949,0xe0a9a949
+.long	0xb46c6cd8,0xb46c6cd8
+.long	0xfa5656ac,0xfa5656ac
+.long	0x07f4f4f3,0x07f4f4f3
+.long	0x25eaeacf,0x25eaeacf
+.long	0xaf6565ca,0xaf6565ca
+.long	0x8e7a7af4,0x8e7a7af4
+.long	0xe9aeae47,0xe9aeae47
+.long	0x18080810,0x18080810
+.long	0xd5baba6f,0xd5baba6f
+.long	0x887878f0,0x887878f0
+.long	0x6f25254a,0x6f25254a
+.long	0x722e2e5c,0x722e2e5c
+.long	0x241c1c38,0x241c1c38
+.long	0xf1a6a657,0xf1a6a657
+.long	0xc7b4b473,0xc7b4b473
+.long	0x51c6c697,0x51c6c697
+.long	0x23e8e8cb,0x23e8e8cb
+.long	0x7cdddda1,0x7cdddda1
+.long	0x9c7474e8,0x9c7474e8
+.long	0x211f1f3e,0x211f1f3e
+.long	0xdd4b4b96,0xdd4b4b96
+.long	0xdcbdbd61,0xdcbdbd61
+.long	0x868b8b0d,0x868b8b0d
+.long	0x858a8a0f,0x858a8a0f
+.long	0x907070e0,0x907070e0
+.long	0x423e3e7c,0x423e3e7c
+.long	0xc4b5b571,0xc4b5b571
+.long	0xaa6666cc,0xaa6666cc
+.long	0xd8484890,0xd8484890
+.long	0x05030306,0x05030306
+.long	0x01f6f6f7,0x01f6f6f7
+.long	0x120e0e1c,0x120e0e1c
+.long	0xa36161c2,0xa36161c2
+.long	0x5f35356a,0x5f35356a
+.long	0xf95757ae,0xf95757ae
+.long	0xd0b9b969,0xd0b9b969
+.long	0x91868617,0x91868617
+.long	0x58c1c199,0x58c1c199
+.long	0x271d1d3a,0x271d1d3a
+.long	0xb99e9e27,0xb99e9e27
+.long	0x38e1e1d9,0x38e1e1d9
+.long	0x13f8f8eb,0x13f8f8eb
+.long	0xb398982b,0xb398982b
+.long	0x33111122,0x33111122
+.long	0xbb6969d2,0xbb6969d2
+.long	0x70d9d9a9,0x70d9d9a9
+.long	0x898e8e07,0x898e8e07
+.long	0xa7949433,0xa7949433
+.long	0xb69b9b2d,0xb69b9b2d
+.long	0x221e1e3c,0x221e1e3c
+.long	0x92878715,0x92878715
+.long	0x20e9e9c9,0x20e9e9c9
+.long	0x49cece87,0x49cece87
+.long	0xff5555aa,0xff5555aa
+.long	0x78282850,0x78282850
+.long	0x7adfdfa5,0x7adfdfa5
+.long	0x8f8c8c03,0x8f8c8c03
+.long	0xf8a1a159,0xf8a1a159
+.long	0x80898909,0x80898909
+.long	0x170d0d1a,0x170d0d1a
+.long	0xdabfbf65,0xdabfbf65
+.long	0x31e6e6d7,0x31e6e6d7
+.long	0xc6424284,0xc6424284
+.long	0xb86868d0,0xb86868d0
+.long	0xc3414182,0xc3414182
+.long	0xb0999929,0xb0999929
+.long	0x772d2d5a,0x772d2d5a
+.long	0x110f0f1e,0x110f0f1e
+.long	0xcbb0b07b,0xcbb0b07b
+.long	0xfc5454a8,0xfc5454a8
+.long	0xd6bbbb6d,0xd6bbbb6d
+.long	0x3a16162c,0x3a16162c
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.byte	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+.byte	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+.byte	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+.byte	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+.byte	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+.byte	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+.byte	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+.byte	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+.byte	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+.byte	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+.byte	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+.byte	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+.byte	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+.byte	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+.byte	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+.byte	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+.byte	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+.byte	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+.byte	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+.byte	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+.byte	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+.byte	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+.byte	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+.byte	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+.byte	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+.byte	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+.byte	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+.byte	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+.byte	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+.byte	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+.byte	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+.byte	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+.long	0x00000001, 0x00000002, 0x00000004, 0x00000008
+.long	0x00000010, 0x00000020, 0x00000040, 0x00000080
+.long	0x0000001b, 0x00000036, 0x80808080, 0x80808080
+.long	0xfefefefe, 0xfefefefe, 0x1b1b1b1b, 0x1b1b1b1b
+.p2align	6
+L$AES_Td:
+.long	0x50a7f451,0x50a7f451
+.long	0x5365417e,0x5365417e
+.long	0xc3a4171a,0xc3a4171a
+.long	0x965e273a,0x965e273a
+.long	0xcb6bab3b,0xcb6bab3b
+.long	0xf1459d1f,0xf1459d1f
+.long	0xab58faac,0xab58faac
+.long	0x9303e34b,0x9303e34b
+.long	0x55fa3020,0x55fa3020
+.long	0xf66d76ad,0xf66d76ad
+.long	0x9176cc88,0x9176cc88
+.long	0x254c02f5,0x254c02f5
+.long	0xfcd7e54f,0xfcd7e54f
+.long	0xd7cb2ac5,0xd7cb2ac5
+.long	0x80443526,0x80443526
+.long	0x8fa362b5,0x8fa362b5
+.long	0x495ab1de,0x495ab1de
+.long	0x671bba25,0x671bba25
+.long	0x980eea45,0x980eea45
+.long	0xe1c0fe5d,0xe1c0fe5d
+.long	0x02752fc3,0x02752fc3
+.long	0x12f04c81,0x12f04c81
+.long	0xa397468d,0xa397468d
+.long	0xc6f9d36b,0xc6f9d36b
+.long	0xe75f8f03,0xe75f8f03
+.long	0x959c9215,0x959c9215
+.long	0xeb7a6dbf,0xeb7a6dbf
+.long	0xda595295,0xda595295
+.long	0x2d83bed4,0x2d83bed4
+.long	0xd3217458,0xd3217458
+.long	0x2969e049,0x2969e049
+.long	0x44c8c98e,0x44c8c98e
+.long	0x6a89c275,0x6a89c275
+.long	0x78798ef4,0x78798ef4
+.long	0x6b3e5899,0x6b3e5899
+.long	0xdd71b927,0xdd71b927
+.long	0xb64fe1be,0xb64fe1be
+.long	0x17ad88f0,0x17ad88f0
+.long	0x66ac20c9,0x66ac20c9
+.long	0xb43ace7d,0xb43ace7d
+.long	0x184adf63,0x184adf63
+.long	0x82311ae5,0x82311ae5
+.long	0x60335197,0x60335197
+.long	0x457f5362,0x457f5362
+.long	0xe07764b1,0xe07764b1
+.long	0x84ae6bbb,0x84ae6bbb
+.long	0x1ca081fe,0x1ca081fe
+.long	0x942b08f9,0x942b08f9
+.long	0x58684870,0x58684870
+.long	0x19fd458f,0x19fd458f
+.long	0x876cde94,0x876cde94
+.long	0xb7f87b52,0xb7f87b52
+.long	0x23d373ab,0x23d373ab
+.long	0xe2024b72,0xe2024b72
+.long	0x578f1fe3,0x578f1fe3
+.long	0x2aab5566,0x2aab5566
+.long	0x0728ebb2,0x0728ebb2
+.long	0x03c2b52f,0x03c2b52f
+.long	0x9a7bc586,0x9a7bc586
+.long	0xa50837d3,0xa50837d3
+.long	0xf2872830,0xf2872830
+.long	0xb2a5bf23,0xb2a5bf23
+.long	0xba6a0302,0xba6a0302
+.long	0x5c8216ed,0x5c8216ed
+.long	0x2b1ccf8a,0x2b1ccf8a
+.long	0x92b479a7,0x92b479a7
+.long	0xf0f207f3,0xf0f207f3
+.long	0xa1e2694e,0xa1e2694e
+.long	0xcdf4da65,0xcdf4da65
+.long	0xd5be0506,0xd5be0506
+.long	0x1f6234d1,0x1f6234d1
+.long	0x8afea6c4,0x8afea6c4
+.long	0x9d532e34,0x9d532e34
+.long	0xa055f3a2,0xa055f3a2
+.long	0x32e18a05,0x32e18a05
+.long	0x75ebf6a4,0x75ebf6a4
+.long	0x39ec830b,0x39ec830b
+.long	0xaaef6040,0xaaef6040
+.long	0x069f715e,0x069f715e
+.long	0x51106ebd,0x51106ebd
+.long	0xf98a213e,0xf98a213e
+.long	0x3d06dd96,0x3d06dd96
+.long	0xae053edd,0xae053edd
+.long	0x46bde64d,0x46bde64d
+.long	0xb58d5491,0xb58d5491
+.long	0x055dc471,0x055dc471
+.long	0x6fd40604,0x6fd40604
+.long	0xff155060,0xff155060
+.long	0x24fb9819,0x24fb9819
+.long	0x97e9bdd6,0x97e9bdd6
+.long	0xcc434089,0xcc434089
+.long	0x779ed967,0x779ed967
+.long	0xbd42e8b0,0xbd42e8b0
+.long	0x888b8907,0x888b8907
+.long	0x385b19e7,0x385b19e7
+.long	0xdbeec879,0xdbeec879
+.long	0x470a7ca1,0x470a7ca1
+.long	0xe90f427c,0xe90f427c
+.long	0xc91e84f8,0xc91e84f8
+.long	0x00000000,0x00000000
+.long	0x83868009,0x83868009
+.long	0x48ed2b32,0x48ed2b32
+.long	0xac70111e,0xac70111e
+.long	0x4e725a6c,0x4e725a6c
+.long	0xfbff0efd,0xfbff0efd
+.long	0x5638850f,0x5638850f
+.long	0x1ed5ae3d,0x1ed5ae3d
+.long	0x27392d36,0x27392d36
+.long	0x64d90f0a,0x64d90f0a
+.long	0x21a65c68,0x21a65c68
+.long	0xd1545b9b,0xd1545b9b
+.long	0x3a2e3624,0x3a2e3624
+.long	0xb1670a0c,0xb1670a0c
+.long	0x0fe75793,0x0fe75793
+.long	0xd296eeb4,0xd296eeb4
+.long	0x9e919b1b,0x9e919b1b
+.long	0x4fc5c080,0x4fc5c080
+.long	0xa220dc61,0xa220dc61
+.long	0x694b775a,0x694b775a
+.long	0x161a121c,0x161a121c
+.long	0x0aba93e2,0x0aba93e2
+.long	0xe52aa0c0,0xe52aa0c0
+.long	0x43e0223c,0x43e0223c
+.long	0x1d171b12,0x1d171b12
+.long	0x0b0d090e,0x0b0d090e
+.long	0xadc78bf2,0xadc78bf2
+.long	0xb9a8b62d,0xb9a8b62d
+.long	0xc8a91e14,0xc8a91e14
+.long	0x8519f157,0x8519f157
+.long	0x4c0775af,0x4c0775af
+.long	0xbbdd99ee,0xbbdd99ee
+.long	0xfd607fa3,0xfd607fa3
+.long	0x9f2601f7,0x9f2601f7
+.long	0xbcf5725c,0xbcf5725c
+.long	0xc53b6644,0xc53b6644
+.long	0x347efb5b,0x347efb5b
+.long	0x7629438b,0x7629438b
+.long	0xdcc623cb,0xdcc623cb
+.long	0x68fcedb6,0x68fcedb6
+.long	0x63f1e4b8,0x63f1e4b8
+.long	0xcadc31d7,0xcadc31d7
+.long	0x10856342,0x10856342
+.long	0x40229713,0x40229713
+.long	0x2011c684,0x2011c684
+.long	0x7d244a85,0x7d244a85
+.long	0xf83dbbd2,0xf83dbbd2
+.long	0x1132f9ae,0x1132f9ae
+.long	0x6da129c7,0x6da129c7
+.long	0x4b2f9e1d,0x4b2f9e1d
+.long	0xf330b2dc,0xf330b2dc
+.long	0xec52860d,0xec52860d
+.long	0xd0e3c177,0xd0e3c177
+.long	0x6c16b32b,0x6c16b32b
+.long	0x99b970a9,0x99b970a9
+.long	0xfa489411,0xfa489411
+.long	0x2264e947,0x2264e947
+.long	0xc48cfca8,0xc48cfca8
+.long	0x1a3ff0a0,0x1a3ff0a0
+.long	0xd82c7d56,0xd82c7d56
+.long	0xef903322,0xef903322
+.long	0xc74e4987,0xc74e4987
+.long	0xc1d138d9,0xc1d138d9
+.long	0xfea2ca8c,0xfea2ca8c
+.long	0x360bd498,0x360bd498
+.long	0xcf81f5a6,0xcf81f5a6
+.long	0x28de7aa5,0x28de7aa5
+.long	0x268eb7da,0x268eb7da
+.long	0xa4bfad3f,0xa4bfad3f
+.long	0xe49d3a2c,0xe49d3a2c
+.long	0x0d927850,0x0d927850
+.long	0x9bcc5f6a,0x9bcc5f6a
+.long	0x62467e54,0x62467e54
+.long	0xc2138df6,0xc2138df6
+.long	0xe8b8d890,0xe8b8d890
+.long	0x5ef7392e,0x5ef7392e
+.long	0xf5afc382,0xf5afc382
+.long	0xbe805d9f,0xbe805d9f
+.long	0x7c93d069,0x7c93d069
+.long	0xa92dd56f,0xa92dd56f
+.long	0xb31225cf,0xb31225cf
+.long	0x3b99acc8,0x3b99acc8
+.long	0xa77d1810,0xa77d1810
+.long	0x6e639ce8,0x6e639ce8
+.long	0x7bbb3bdb,0x7bbb3bdb
+.long	0x097826cd,0x097826cd
+.long	0xf418596e,0xf418596e
+.long	0x01b79aec,0x01b79aec
+.long	0xa89a4f83,0xa89a4f83
+.long	0x656e95e6,0x656e95e6
+.long	0x7ee6ffaa,0x7ee6ffaa
+.long	0x08cfbc21,0x08cfbc21
+.long	0xe6e815ef,0xe6e815ef
+.long	0xd99be7ba,0xd99be7ba
+.long	0xce366f4a,0xce366f4a
+.long	0xd4099fea,0xd4099fea
+.long	0xd67cb029,0xd67cb029
+.long	0xafb2a431,0xafb2a431
+.long	0x31233f2a,0x31233f2a
+.long	0x3094a5c6,0x3094a5c6
+.long	0xc066a235,0xc066a235
+.long	0x37bc4e74,0x37bc4e74
+.long	0xa6ca82fc,0xa6ca82fc
+.long	0xb0d090e0,0xb0d090e0
+.long	0x15d8a733,0x15d8a733
+.long	0x4a9804f1,0x4a9804f1
+.long	0xf7daec41,0xf7daec41
+.long	0x0e50cd7f,0x0e50cd7f
+.long	0x2ff69117,0x2ff69117
+.long	0x8dd64d76,0x8dd64d76
+.long	0x4db0ef43,0x4db0ef43
+.long	0x544daacc,0x544daacc
+.long	0xdf0496e4,0xdf0496e4
+.long	0xe3b5d19e,0xe3b5d19e
+.long	0x1b886a4c,0x1b886a4c
+.long	0xb81f2cc1,0xb81f2cc1
+.long	0x7f516546,0x7f516546
+.long	0x04ea5e9d,0x04ea5e9d
+.long	0x5d358c01,0x5d358c01
+.long	0x737487fa,0x737487fa
+.long	0x2e410bfb,0x2e410bfb
+.long	0x5a1d67b3,0x5a1d67b3
+.long	0x52d2db92,0x52d2db92
+.long	0x335610e9,0x335610e9
+.long	0x1347d66d,0x1347d66d
+.long	0x8c61d79a,0x8c61d79a
+.long	0x7a0ca137,0x7a0ca137
+.long	0x8e14f859,0x8e14f859
+.long	0x893c13eb,0x893c13eb
+.long	0xee27a9ce,0xee27a9ce
+.long	0x35c961b7,0x35c961b7
+.long	0xede51ce1,0xede51ce1
+.long	0x3cb1477a,0x3cb1477a
+.long	0x59dfd29c,0x59dfd29c
+.long	0x3f73f255,0x3f73f255
+.long	0x79ce1418,0x79ce1418
+.long	0xbf37c773,0xbf37c773
+.long	0xeacdf753,0xeacdf753
+.long	0x5baafd5f,0x5baafd5f
+.long	0x146f3ddf,0x146f3ddf
+.long	0x86db4478,0x86db4478
+.long	0x81f3afca,0x81f3afca
+.long	0x3ec468b9,0x3ec468b9
+.long	0x2c342438,0x2c342438
+.long	0x5f40a3c2,0x5f40a3c2
+.long	0x72c31d16,0x72c31d16
+.long	0x0c25e2bc,0x0c25e2bc
+.long	0x8b493c28,0x8b493c28
+.long	0x41950dff,0x41950dff
+.long	0x7101a839,0x7101a839
+.long	0xdeb30c08,0xdeb30c08
+.long	0x9ce4b4d8,0x9ce4b4d8
+.long	0x90c15664,0x90c15664
+.long	0x6184cb7b,0x6184cb7b
+.long	0x70b632d5,0x70b632d5
+.long	0x745c6c48,0x745c6c48
+.long	0x4257b8d0,0x4257b8d0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+.byte	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+.byte	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+.byte	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+.byte	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+.byte	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+.byte	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+.byte	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+.byte	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+.byte	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+.byte	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+.byte	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+.byte	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+.byte	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+.byte	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+.byte	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+.byte	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+.byte	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+.byte	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+.byte	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+.byte	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+.byte	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+.byte	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+.byte	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+.byte	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+.byte	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+.byte	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+.byte	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+.byte	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+.byte	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+.byte	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+.byte	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+.long	0x80808080, 0x80808080, 0xfefefefe, 0xfefefefe
+.long	0x1b1b1b1b, 0x1b1b1b1b, 0, 0
+.byte	65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.p2align	6
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S
new file mode 100644
index 0000000..69b22c2
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/aes/aesni-x86_64.S
@@ -0,0 +1,3564 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	_aesni_encrypt
+.private_extern _aesni_encrypt
+
+.p2align	4
+_aesni_encrypt:
+	movups	(%rdi),%xmm2
+	movl	240(%rdx),%eax
+	movups	(%rdx),%xmm0
+	movups	16(%rdx),%xmm1
+	leaq	32(%rdx),%rdx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_1:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rdx),%xmm1
+	leaq	16(%rdx),%rdx
+	jnz	L$oop_enc1_1
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	.byte	0xf3,0xc3
+
+
+.globl	_aesni_decrypt
+.private_extern _aesni_decrypt
+
+.p2align	4
+_aesni_decrypt:
+	movups	(%rdi),%xmm2
+	movl	240(%rdx),%eax
+	movups	(%rdx),%xmm0
+	movups	16(%rdx),%xmm1
+	leaq	32(%rdx),%rdx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_2:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rdx),%xmm1
+	leaq	16(%rdx),%rdx
+	jnz	L$oop_dec1_2
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_encrypt2:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+L$enc_loop2:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$enc_loop2
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_decrypt2:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+L$dec_loop2:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$dec_loop2
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_encrypt3:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+L$enc_loop3:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$enc_loop3
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_decrypt3:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+	addq	$16,%rax
+
+L$dec_loop3:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$dec_loop3
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_encrypt4:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	xorps	%xmm0,%xmm5
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	0x0f,0x1f,0x00
+	addq	$16,%rax
+
+L$enc_loop4:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$enc_loop4
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_decrypt4:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	xorps	%xmm0,%xmm4
+	xorps	%xmm0,%xmm5
+	movups	32(%rcx),%xmm0
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	0x0f,0x1f,0x00
+	addq	$16,%rax
+
+L$dec_loop4:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$dec_loop4
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_encrypt6:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,220,209
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,220,225
+	pxor	%xmm0,%xmm7
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	L$enc_loop6_enter
+.p2align	4
+L$enc_loop6:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+L$enc_loop6_enter:
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$enc_loop6
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_decrypt6:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	pxor	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+.byte	102,15,56,222,209
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+.byte	102,15,56,222,225
+	pxor	%xmm0,%xmm7
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	L$dec_loop6_enter
+.p2align	4
+L$dec_loop6:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+L$dec_loop6_enter:
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$dec_loop6
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_encrypt8:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,209
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+.byte	102,15,56,220,217
+	pxor	%xmm0,%xmm9
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	L$enc_loop8_inner
+.p2align	4
+L$enc_loop8:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+L$enc_loop8_inner:
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+L$enc_loop8_enter:
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$enc_loop8
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+.byte	102,15,56,221,224
+.byte	102,15,56,221,232
+.byte	102,15,56,221,240
+.byte	102,15,56,221,248
+.byte	102,68,15,56,221,192
+.byte	102,68,15,56,221,200
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_aesni_decrypt8:
+	movups	(%rcx),%xmm0
+	shll	$4,%eax
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm2
+	xorps	%xmm0,%xmm3
+	pxor	%xmm0,%xmm4
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	leaq	32(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm9
+	movups	(%rcx,%rax,1),%xmm0
+	addq	$16,%rax
+	jmp	L$dec_loop8_inner
+.p2align	4
+L$dec_loop8:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+L$dec_loop8_inner:
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+L$dec_loop8_enter:
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$dec_loop8
+
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+.byte	102,15,56,223,208
+.byte	102,15,56,223,216
+.byte	102,15,56,223,224
+.byte	102,15,56,223,232
+.byte	102,15,56,223,240
+.byte	102,15,56,223,248
+.byte	102,68,15,56,223,192
+.byte	102,68,15,56,223,200
+	.byte	0xf3,0xc3
+
+.globl	_aesni_ecb_encrypt
+.private_extern _aesni_ecb_encrypt
+
+.p2align	4
+_aesni_ecb_encrypt:
+	andq	$-16,%rdx
+	jz	L$ecb_ret
+
+	movl	240(%rcx),%eax
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%eax,%r10d
+	testl	%r8d,%r8d
+	jz	L$ecb_decrypt
+
+	cmpq	$128,%rdx
+	jb	L$ecb_enc_tail
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	movdqu	48(%rdi),%xmm5
+	movdqu	64(%rdi),%xmm6
+	movdqu	80(%rdi),%xmm7
+	movdqu	96(%rdi),%xmm8
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+	subq	$128,%rdx
+	jmp	L$ecb_enc_loop8_enter
+.p2align	4
+L$ecb_enc_loop8:
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movdqu	(%rdi),%xmm2
+	movl	%r10d,%eax
+	movups	%xmm3,16(%rsi)
+	movdqu	16(%rdi),%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqu	32(%rdi),%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqu	48(%rdi),%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqu	64(%rdi),%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqu	80(%rdi),%xmm7
+	movups	%xmm8,96(%rsi)
+	movdqu	96(%rdi),%xmm8
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+L$ecb_enc_loop8_enter:
+
+	call	_aesni_encrypt8
+
+	subq	$128,%rdx
+	jnc	L$ecb_enc_loop8
+
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movups	%xmm3,16(%rsi)
+	movl	%r10d,%eax
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	movups	%xmm8,96(%rsi)
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	addq	$128,%rdx
+	jz	L$ecb_ret
+
+L$ecb_enc_tail:
+	movups	(%rdi),%xmm2
+	cmpq	$32,%rdx
+	jb	L$ecb_enc_one
+	movups	16(%rdi),%xmm3
+	je	L$ecb_enc_two
+	movups	32(%rdi),%xmm4
+	cmpq	$64,%rdx
+	jb	L$ecb_enc_three
+	movups	48(%rdi),%xmm5
+	je	L$ecb_enc_four
+	movups	64(%rdi),%xmm6
+	cmpq	$96,%rdx
+	jb	L$ecb_enc_five
+	movups	80(%rdi),%xmm7
+	je	L$ecb_enc_six
+	movdqu	96(%rdi),%xmm8
+	xorps	%xmm9,%xmm9
+	call	_aesni_encrypt8
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	movups	%xmm8,96(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_one:
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_3:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_3
+.byte	102,15,56,221,209
+	movups	%xmm2,(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_two:
+	call	_aesni_encrypt2
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_three:
+	call	_aesni_encrypt3
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_four:
+	call	_aesni_encrypt4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_five:
+	xorps	%xmm7,%xmm7
+	call	_aesni_encrypt6
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_enc_six:
+	call	_aesni_encrypt6
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	movups	%xmm5,48(%rsi)
+	movups	%xmm6,64(%rsi)
+	movups	%xmm7,80(%rsi)
+	jmp	L$ecb_ret
+
+.p2align	4
+L$ecb_decrypt:
+	cmpq	$128,%rdx
+	jb	L$ecb_dec_tail
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	movdqu	48(%rdi),%xmm5
+	movdqu	64(%rdi),%xmm6
+	movdqu	80(%rdi),%xmm7
+	movdqu	96(%rdi),%xmm8
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+	subq	$128,%rdx
+	jmp	L$ecb_dec_loop8_enter
+.p2align	4
+L$ecb_dec_loop8:
+	movups	%xmm2,(%rsi)
+	movq	%r11,%rcx
+	movdqu	(%rdi),%xmm2
+	movl	%r10d,%eax
+	movups	%xmm3,16(%rsi)
+	movdqu	16(%rdi),%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqu	32(%rdi),%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqu	48(%rdi),%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqu	64(%rdi),%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqu	80(%rdi),%xmm7
+	movups	%xmm8,96(%rsi)
+	movdqu	96(%rdi),%xmm8
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+	movdqu	112(%rdi),%xmm9
+	leaq	128(%rdi),%rdi
+L$ecb_dec_loop8_enter:
+
+	call	_aesni_decrypt8
+
+	movups	(%r11),%xmm0
+	subq	$128,%rdx
+	jnc	L$ecb_dec_loop8
+
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movq	%r11,%rcx
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movl	%r10d,%eax
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	movups	%xmm8,96(%rsi)
+	pxor	%xmm8,%xmm8
+	movups	%xmm9,112(%rsi)
+	pxor	%xmm9,%xmm9
+	leaq	128(%rsi),%rsi
+	addq	$128,%rdx
+	jz	L$ecb_ret
+
+L$ecb_dec_tail:
+	movups	(%rdi),%xmm2
+	cmpq	$32,%rdx
+	jb	L$ecb_dec_one
+	movups	16(%rdi),%xmm3
+	je	L$ecb_dec_two
+	movups	32(%rdi),%xmm4
+	cmpq	$64,%rdx
+	jb	L$ecb_dec_three
+	movups	48(%rdi),%xmm5
+	je	L$ecb_dec_four
+	movups	64(%rdi),%xmm6
+	cmpq	$96,%rdx
+	jb	L$ecb_dec_five
+	movups	80(%rdi),%xmm7
+	je	L$ecb_dec_six
+	movups	96(%rdi),%xmm8
+	movups	(%rcx),%xmm0
+	xorps	%xmm9,%xmm9
+	call	_aesni_decrypt8
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	movups	%xmm8,96(%rsi)
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_one:
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_4:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_4
+.byte	102,15,56,223,209
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_two:
+	call	_aesni_decrypt2
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_three:
+	call	_aesni_decrypt3
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_four:
+	call	_aesni_decrypt4
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_five:
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	jmp	L$ecb_ret
+.p2align	4
+L$ecb_dec_six:
+	call	_aesni_decrypt6
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movups	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movups	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	movups	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	movups	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+
+L$ecb_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	.byte	0xf3,0xc3
+
+.globl	_aesni_ccm64_encrypt_blocks
+.private_extern _aesni_ccm64_encrypt_blocks
+
+.p2align	4
+_aesni_ccm64_encrypt_blocks:
+	movl	240(%rcx),%eax
+	movdqu	(%r8),%xmm6
+	movdqa	L$increment64(%rip),%xmm9
+	movdqa	L$bswap_mask(%rip),%xmm7
+
+	shll	$4,%eax
+	movl	$16,%r10d
+	leaq	0(%rcx),%r11
+	movdqu	(%r9),%xmm3
+	movdqa	%xmm6,%xmm2
+	leaq	32(%rcx,%rax,1),%rcx
+.byte	102,15,56,0,247
+	subq	%rax,%r10
+	jmp	L$ccm64_enc_outer
+.p2align	4
+L$ccm64_enc_outer:
+	movups	(%r11),%xmm0
+	movq	%r10,%rax
+	movups	(%rdi),%xmm8
+
+	xorps	%xmm0,%xmm2
+	movups	16(%r11),%xmm1
+	xorps	%xmm8,%xmm0
+	xorps	%xmm0,%xmm3
+	movups	32(%r11),%xmm0
+
+L$ccm64_enc2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$ccm64_enc2_loop
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	paddq	%xmm9,%xmm6
+	decq	%rdx
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+
+	leaq	16(%rdi),%rdi
+	xorps	%xmm2,%xmm8
+	movdqa	%xmm6,%xmm2
+	movups	%xmm8,(%rsi)
+.byte	102,15,56,0,215
+	leaq	16(%rsi),%rsi
+	jnz	L$ccm64_enc_outer
+
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,(%r9)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm8,%xmm8
+	pxor	%xmm6,%xmm6
+	.byte	0xf3,0xc3
+
+.globl	_aesni_ccm64_decrypt_blocks
+.private_extern _aesni_ccm64_decrypt_blocks
+
+.p2align	4
+_aesni_ccm64_decrypt_blocks:
+	movl	240(%rcx),%eax
+	movups	(%r8),%xmm6
+	movdqu	(%r9),%xmm3
+	movdqa	L$increment64(%rip),%xmm9
+	movdqa	L$bswap_mask(%rip),%xmm7
+
+	movaps	%xmm6,%xmm2
+	movl	%eax,%r10d
+	movq	%rcx,%r11
+.byte	102,15,56,0,247
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_5:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_5
+.byte	102,15,56,221,209
+	shll	$4,%r10d
+	movl	$16,%eax
+	movups	(%rdi),%xmm8
+	paddq	%xmm9,%xmm6
+	leaq	16(%rdi),%rdi
+	subq	%r10,%rax
+	leaq	32(%r11,%r10,1),%rcx
+	movq	%rax,%r10
+	jmp	L$ccm64_dec_outer
+.p2align	4
+L$ccm64_dec_outer:
+	xorps	%xmm2,%xmm8
+	movdqa	%xmm6,%xmm2
+	movups	%xmm8,(%rsi)
+	leaq	16(%rsi),%rsi
+.byte	102,15,56,0,215
+
+	subq	$1,%rdx
+	jz	L$ccm64_dec_break
+
+	movups	(%r11),%xmm0
+	movq	%r10,%rax
+	movups	16(%r11),%xmm1
+	xorps	%xmm0,%xmm8
+	xorps	%xmm0,%xmm2
+	xorps	%xmm8,%xmm3
+	movups	32(%r11),%xmm0
+	jmp	L$ccm64_dec2_loop
+.p2align	4
+L$ccm64_dec2_loop:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	movups	(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	movups	-16(%rcx,%rax,1),%xmm0
+	jnz	L$ccm64_dec2_loop
+	movups	(%rdi),%xmm8
+	paddq	%xmm9,%xmm6
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,221,208
+.byte	102,15,56,221,216
+	leaq	16(%rdi),%rdi
+	jmp	L$ccm64_dec_outer
+
+.p2align	4
+L$ccm64_dec_break:
+
+	movl	240(%r11),%eax
+	movups	(%r11),%xmm0
+	movups	16(%r11),%xmm1
+	xorps	%xmm0,%xmm8
+	leaq	32(%r11),%r11
+	xorps	%xmm8,%xmm3
+L$oop_enc1_6:
+.byte	102,15,56,220,217
+	decl	%eax
+	movups	(%r11),%xmm1
+	leaq	16(%r11),%r11
+	jnz	L$oop_enc1_6
+.byte	102,15,56,221,217
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	movups	%xmm3,(%r9)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm8,%xmm8
+	pxor	%xmm6,%xmm6
+	.byte	0xf3,0xc3
+
+.globl	_aesni_ctr32_encrypt_blocks
+.private_extern _aesni_ctr32_encrypt_blocks
+
+.p2align	4
+_aesni_ctr32_encrypt_blocks:
+	cmpq	$1,%rdx
+	jne	L$ctr32_bulk
+
+
+
+	movups	(%r8),%xmm2
+	movups	(%rdi),%xmm3
+	movl	240(%rcx),%edx
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_7:
+.byte	102,15,56,220,209
+	decl	%edx
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_7
+.byte	102,15,56,221,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	xorps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	movups	%xmm2,(%rsi)
+	xorps	%xmm2,%xmm2
+	jmp	L$ctr32_epilogue
+
+.p2align	4
+L$ctr32_bulk:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$128,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+
+
+
+
+	movdqu	(%r8),%xmm2
+	movdqu	(%rcx),%xmm0
+	movl	12(%r8),%r8d
+	pxor	%xmm0,%xmm2
+	movl	12(%rcx),%r11d
+	movdqa	%xmm2,0(%rsp)
+	bswapl	%r8d
+	movdqa	%xmm2,%xmm3
+	movdqa	%xmm2,%xmm4
+	movdqa	%xmm2,%xmm5
+	movdqa	%xmm2,64(%rsp)
+	movdqa	%xmm2,80(%rsp)
+	movdqa	%xmm2,96(%rsp)
+	movq	%rdx,%r10
+	movdqa	%xmm2,112(%rsp)
+
+	leaq	1(%r8),%rax
+	leaq	2(%r8),%rdx
+	bswapl	%eax
+	bswapl	%edx
+	xorl	%r11d,%eax
+	xorl	%r11d,%edx
+.byte	102,15,58,34,216,3
+	leaq	3(%r8),%rax
+	movdqa	%xmm3,16(%rsp)
+.byte	102,15,58,34,226,3
+	bswapl	%eax
+	movq	%r10,%rdx
+	leaq	4(%r8),%r10
+	movdqa	%xmm4,32(%rsp)
+	xorl	%r11d,%eax
+	bswapl	%r10d
+.byte	102,15,58,34,232,3
+	xorl	%r11d,%r10d
+	movdqa	%xmm5,48(%rsp)
+	leaq	5(%r8),%r9
+	movl	%r10d,64+12(%rsp)
+	bswapl	%r9d
+	leaq	6(%r8),%r10
+	movl	240(%rcx),%eax
+	xorl	%r11d,%r9d
+	bswapl	%r10d
+	movl	%r9d,80+12(%rsp)
+	xorl	%r11d,%r10d
+	leaq	7(%r8),%r9
+	movl	%r10d,96+12(%rsp)
+	bswapl	%r9d
+	movl	_OPENSSL_ia32cap_P+4(%rip),%r10d
+	xorl	%r11d,%r9d
+	andl	$71303168,%r10d
+	movl	%r9d,112+12(%rsp)
+
+	movups	16(%rcx),%xmm1
+
+	movdqa	64(%rsp),%xmm6
+	movdqa	80(%rsp),%xmm7
+
+	cmpq	$8,%rdx
+	jb	L$ctr32_tail
+
+	subq	$6,%rdx
+	cmpl	$4194304,%r10d
+	je	L$ctr32_6x
+
+	leaq	128(%rcx),%rcx
+	subq	$2,%rdx
+	jmp	L$ctr32_loop8
+
+.p2align	4
+L$ctr32_6x:
+	shll	$4,%eax
+	movl	$48,%r10d
+	bswapl	%r11d
+	leaq	32(%rcx,%rax,1),%rcx
+	subq	%rax,%r10
+	jmp	L$ctr32_loop6
+
+.p2align	4
+L$ctr32_loop6:
+	addl	$6,%r8d
+	movups	-48(%rcx,%r10,1),%xmm0
+.byte	102,15,56,220,209
+	movl	%r8d,%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,217
+.byte	0x0f,0x38,0xf1,0x44,0x24,12
+	leal	1(%r8),%eax
+.byte	102,15,56,220,225
+	xorl	%r11d,%eax
+.byte	0x0f,0x38,0xf1,0x44,0x24,28
+.byte	102,15,56,220,233
+	leal	2(%r8),%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,241
+.byte	0x0f,0x38,0xf1,0x44,0x24,44
+	leal	3(%r8),%eax
+.byte	102,15,56,220,249
+	movups	-32(%rcx,%r10,1),%xmm1
+	xorl	%r11d,%eax
+
+.byte	102,15,56,220,208
+.byte	0x0f,0x38,0xf1,0x44,0x24,60
+	leal	4(%r8),%eax
+.byte	102,15,56,220,216
+	xorl	%r11d,%eax
+.byte	0x0f,0x38,0xf1,0x44,0x24,76
+.byte	102,15,56,220,224
+	leal	5(%r8),%eax
+	xorl	%r11d,%eax
+.byte	102,15,56,220,232
+.byte	0x0f,0x38,0xf1,0x44,0x24,92
+	movq	%r10,%rax
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-16(%rcx,%r10,1),%xmm0
+
+	call	L$enc_loop6
+
+	movdqu	(%rdi),%xmm8
+	movdqu	16(%rdi),%xmm9
+	movdqu	32(%rdi),%xmm10
+	movdqu	48(%rdi),%xmm11
+	movdqu	64(%rdi),%xmm12
+	movdqu	80(%rdi),%xmm13
+	leaq	96(%rdi),%rdi
+	movups	-64(%rcx,%r10,1),%xmm1
+	pxor	%xmm2,%xmm8
+	movaps	0(%rsp),%xmm2
+	pxor	%xmm3,%xmm9
+	movaps	16(%rsp),%xmm3
+	pxor	%xmm4,%xmm10
+	movaps	32(%rsp),%xmm4
+	pxor	%xmm5,%xmm11
+	movaps	48(%rsp),%xmm5
+	pxor	%xmm6,%xmm12
+	movaps	64(%rsp),%xmm6
+	pxor	%xmm7,%xmm13
+	movaps	80(%rsp),%xmm7
+	movdqu	%xmm8,(%rsi)
+	movdqu	%xmm9,16(%rsi)
+	movdqu	%xmm10,32(%rsi)
+	movdqu	%xmm11,48(%rsi)
+	movdqu	%xmm12,64(%rsi)
+	movdqu	%xmm13,80(%rsi)
+	leaq	96(%rsi),%rsi
+
+	subq	$6,%rdx
+	jnc	L$ctr32_loop6
+
+	addq	$6,%rdx
+	jz	L$ctr32_done
+
+	leal	-48(%r10),%eax
+	leaq	-80(%rcx,%r10,1),%rcx
+	negl	%eax
+	shrl	$4,%eax
+	jmp	L$ctr32_tail
+
+.p2align	5
+L$ctr32_loop8:
+	addl	$8,%r8d
+	movdqa	96(%rsp),%xmm8
+.byte	102,15,56,220,209
+	movl	%r8d,%r9d
+	movdqa	112(%rsp),%xmm9
+.byte	102,15,56,220,217
+	bswapl	%r9d
+	movups	32-128(%rcx),%xmm0
+.byte	102,15,56,220,225
+	xorl	%r11d,%r9d
+	nop
+.byte	102,15,56,220,233
+	movl	%r9d,0+12(%rsp)
+	leaq	1(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	48-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,16+12(%rsp)
+	leaq	2(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	64-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,32+12(%rsp)
+	leaq	3(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	80-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,48+12(%rsp)
+	leaq	4(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	96-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,64+12(%rsp)
+	leaq	5(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	112-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	movl	%r9d,80+12(%rsp)
+	leaq	6(%r8),%r9
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	128-128(%rcx),%xmm0
+	bswapl	%r9d
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	xorl	%r11d,%r9d
+.byte	0x66,0x90
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movl	%r9d,96+12(%rsp)
+	leaq	7(%r8),%r9
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	144-128(%rcx),%xmm1
+	bswapl	%r9d
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+	xorl	%r11d,%r9d
+	movdqu	0(%rdi),%xmm10
+.byte	102,15,56,220,232
+	movl	%r9d,112+12(%rsp)
+	cmpl	$11,%eax
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	160-128(%rcx),%xmm0
+
+	jb	L$ctr32_enc_done
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	176-128(%rcx),%xmm1
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	192-128(%rcx),%xmm0
+	je	L$ctr32_enc_done
+
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movups	208-128(%rcx),%xmm1
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+.byte	102,68,15,56,220,192
+.byte	102,68,15,56,220,200
+	movups	224-128(%rcx),%xmm0
+	jmp	L$ctr32_enc_done
+
+.p2align	4
+L$ctr32_enc_done:
+	movdqu	16(%rdi),%xmm11
+	pxor	%xmm0,%xmm10
+	movdqu	32(%rdi),%xmm12
+	pxor	%xmm0,%xmm11
+	movdqu	48(%rdi),%xmm13
+	pxor	%xmm0,%xmm12
+	movdqu	64(%rdi),%xmm14
+	pxor	%xmm0,%xmm13
+	movdqu	80(%rdi),%xmm15
+	pxor	%xmm0,%xmm14
+	pxor	%xmm0,%xmm15
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+.byte	102,68,15,56,220,201
+	movdqu	96(%rdi),%xmm1
+	leaq	128(%rdi),%rdi
+
+.byte	102,65,15,56,221,210
+	pxor	%xmm0,%xmm1
+	movdqu	112-128(%rdi),%xmm10
+.byte	102,65,15,56,221,219
+	pxor	%xmm0,%xmm10
+	movdqa	0(%rsp),%xmm11
+.byte	102,65,15,56,221,228
+.byte	102,65,15,56,221,237
+	movdqa	16(%rsp),%xmm12
+	movdqa	32(%rsp),%xmm13
+.byte	102,65,15,56,221,246
+.byte	102,65,15,56,221,255
+	movdqa	48(%rsp),%xmm14
+	movdqa	64(%rsp),%xmm15
+.byte	102,68,15,56,221,193
+	movdqa	80(%rsp),%xmm0
+	movups	16-128(%rcx),%xmm1
+.byte	102,69,15,56,221,202
+
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm11,%xmm2
+	movups	%xmm3,16(%rsi)
+	movdqa	%xmm12,%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqa	%xmm13,%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqa	%xmm14,%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqa	%xmm15,%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqa	%xmm0,%xmm7
+	movups	%xmm8,96(%rsi)
+	movups	%xmm9,112(%rsi)
+	leaq	128(%rsi),%rsi
+
+	subq	$8,%rdx
+	jnc	L$ctr32_loop8
+
+	addq	$8,%rdx
+	jz	L$ctr32_done
+	leaq	-128(%rcx),%rcx
+
+L$ctr32_tail:
+
+
+	leaq	16(%rcx),%rcx
+	cmpq	$4,%rdx
+	jb	L$ctr32_loop3
+	je	L$ctr32_loop4
+
+
+	shll	$4,%eax
+	movdqa	96(%rsp),%xmm8
+	pxor	%xmm9,%xmm9
+
+	movups	16(%rcx),%xmm0
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+	leaq	32-16(%rcx,%rax,1),%rcx
+	negq	%rax
+.byte	102,15,56,220,225
+	addq	$16,%rax
+	movups	(%rdi),%xmm10
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+	movups	16(%rdi),%xmm11
+	movups	32(%rdi),%xmm12
+.byte	102,15,56,220,249
+.byte	102,68,15,56,220,193
+
+	call	L$enc_loop8_enter
+
+	movdqu	48(%rdi),%xmm13
+	pxor	%xmm10,%xmm2
+	movdqu	64(%rdi),%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm10,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	movdqu	%xmm6,64(%rsi)
+	cmpq	$6,%rdx
+	jb	L$ctr32_done
+
+	movups	80(%rdi),%xmm11
+	xorps	%xmm11,%xmm7
+	movups	%xmm7,80(%rsi)
+	je	L$ctr32_done
+
+	movups	96(%rdi),%xmm12
+	xorps	%xmm12,%xmm8
+	movups	%xmm8,96(%rsi)
+	jmp	L$ctr32_done
+
+.p2align	5
+L$ctr32_loop4:
+.byte	102,15,56,220,209
+	leaq	16(%rcx),%rcx
+	decl	%eax
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movups	(%rcx),%xmm1
+	jnz	L$ctr32_loop4
+.byte	102,15,56,221,209
+.byte	102,15,56,221,217
+	movups	(%rdi),%xmm10
+	movups	16(%rdi),%xmm11
+.byte	102,15,56,221,225
+.byte	102,15,56,221,233
+	movups	32(%rdi),%xmm12
+	movups	48(%rdi),%xmm13
+
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+	xorps	%xmm11,%xmm3
+	movups	%xmm3,16(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm5,48(%rsi)
+	jmp	L$ctr32_done
+
+.p2align	5
+L$ctr32_loop3:
+.byte	102,15,56,220,209
+	leaq	16(%rcx),%rcx
+	decl	%eax
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+	movups	(%rcx),%xmm1
+	jnz	L$ctr32_loop3
+.byte	102,15,56,221,209
+.byte	102,15,56,221,217
+.byte	102,15,56,221,225
+
+	movups	(%rdi),%xmm10
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+	cmpq	$2,%rdx
+	jb	L$ctr32_done
+
+	movups	16(%rdi),%xmm11
+	xorps	%xmm11,%xmm3
+	movups	%xmm3,16(%rsi)
+	je	L$ctr32_done
+
+	movups	32(%rdi),%xmm12
+	xorps	%xmm12,%xmm4
+	movups	%xmm4,32(%rsi)
+
+L$ctr32_done:
+	xorps	%xmm0,%xmm0
+	xorl	%r11d,%r11d
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	movaps	%xmm0,112(%rsp)
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+L$ctr32_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_aesni_xts_encrypt
+.private_extern _aesni_xts_encrypt
+
+.p2align	4
+_aesni_xts_encrypt:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$112,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r9),%xmm2
+	movl	240(%r8),%eax
+	movl	240(%rcx),%r10d
+	movups	(%r8),%xmm0
+	movups	16(%r8),%xmm1
+	leaq	32(%r8),%r8
+	xorps	%xmm0,%xmm2
+L$oop_enc1_8:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%r8),%xmm1
+	leaq	16(%r8),%r8
+	jnz	L$oop_enc1_8
+.byte	102,15,56,221,209
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%r10d,%eax
+	shll	$4,%r10d
+	movq	%rdx,%r9
+	andq	$-16,%rdx
+
+	movups	16(%rcx,%r10,1),%xmm1
+
+	movdqa	L$xts_magic(%rip),%xmm8
+	movdqa	%xmm2,%xmm15
+	pshufd	$95,%xmm2,%xmm9
+	pxor	%xmm0,%xmm1
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm10
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm10
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm11
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm11
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm12
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm12
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm13
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm13
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm15,%xmm14
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm9
+	pxor	%xmm0,%xmm14
+	pxor	%xmm9,%xmm15
+	movaps	%xmm1,96(%rsp)
+
+	subq	$96,%rdx
+	jc	L$xts_enc_short
+
+	movl	$16+96,%eax
+	leaq	32(%r11,%r10,1),%rcx
+	subq	%r10,%rax
+	movups	16(%r11),%xmm1
+	movq	%rax,%r10
+	leaq	L$xts_magic(%rip),%r8
+	jmp	L$xts_enc_grandloop
+
+.p2align	5
+L$xts_enc_grandloop:
+	movdqu	0(%rdi),%xmm2
+	movdqa	%xmm0,%xmm8
+	movdqu	16(%rdi),%xmm3
+	pxor	%xmm10,%xmm2
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm11,%xmm3
+.byte	102,15,56,220,209
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm12,%xmm4
+.byte	102,15,56,220,217
+	movdqu	64(%rdi),%xmm6
+	pxor	%xmm13,%xmm5
+.byte	102,15,56,220,225
+	movdqu	80(%rdi),%xmm7
+	pxor	%xmm15,%xmm8
+	movdqa	96(%rsp),%xmm9
+	pxor	%xmm14,%xmm6
+.byte	102,15,56,220,233
+	movups	32(%r11),%xmm0
+	leaq	96(%rdi),%rdi
+	pxor	%xmm8,%xmm7
+
+	pxor	%xmm9,%xmm10
+.byte	102,15,56,220,241
+	pxor	%xmm9,%xmm11
+	movdqa	%xmm10,0(%rsp)
+.byte	102,15,56,220,249
+	movups	48(%r11),%xmm1
+	pxor	%xmm9,%xmm12
+
+.byte	102,15,56,220,208
+	pxor	%xmm9,%xmm13
+	movdqa	%xmm11,16(%rsp)
+.byte	102,15,56,220,216
+	pxor	%xmm9,%xmm14
+	movdqa	%xmm12,32(%rsp)
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	pxor	%xmm9,%xmm8
+	movdqa	%xmm14,64(%rsp)
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	64(%r11),%xmm0
+	movdqa	%xmm8,80(%rsp)
+	pshufd	$95,%xmm15,%xmm9
+	jmp	L$xts_enc_loop6
+.p2align	5
+L$xts_enc_loop6:
+.byte	102,15,56,220,209
+.byte	102,15,56,220,217
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	-64(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+
+.byte	102,15,56,220,208
+.byte	102,15,56,220,216
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+.byte	102,15,56,220,248
+	movups	-80(%rcx,%rax,1),%xmm0
+	jnz	L$xts_enc_loop6
+
+	movdqa	(%r8),%xmm8
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	paddq	%xmm15,%xmm15
+	psrad	$31,%xmm14
+.byte	102,15,56,220,217
+	pand	%xmm8,%xmm14
+	movups	(%r11),%xmm10
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+.byte	102,15,56,220,241
+	pxor	%xmm14,%xmm15
+	movaps	%xmm10,%xmm11
+.byte	102,15,56,220,249
+	movups	-64(%rcx),%xmm1
+
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,208
+	paddd	%xmm9,%xmm9
+	pxor	%xmm15,%xmm10
+.byte	102,15,56,220,216
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+	pand	%xmm8,%xmm14
+	movaps	%xmm11,%xmm12
+.byte	102,15,56,220,240
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,248
+	movups	-48(%rcx),%xmm0
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	pxor	%xmm15,%xmm11
+	psrad	$31,%xmm14
+.byte	102,15,56,220,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	movdqa	%xmm13,48(%rsp)
+	pxor	%xmm14,%xmm15
+.byte	102,15,56,220,241
+	movaps	%xmm12,%xmm13
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,220,249
+	movups	-32(%rcx),%xmm1
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,208
+	pxor	%xmm15,%xmm12
+	psrad	$31,%xmm14
+.byte	102,15,56,220,216
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,220,224
+.byte	102,15,56,220,232
+.byte	102,15,56,220,240
+	pxor	%xmm14,%xmm15
+	movaps	%xmm13,%xmm14
+.byte	102,15,56,220,248
+
+	movdqa	%xmm9,%xmm0
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,220,209
+	pxor	%xmm15,%xmm13
+	psrad	$31,%xmm0
+.byte	102,15,56,220,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm0
+.byte	102,15,56,220,225
+.byte	102,15,56,220,233
+	pxor	%xmm0,%xmm15
+	movups	(%r11),%xmm0
+.byte	102,15,56,220,241
+.byte	102,15,56,220,249
+	movups	16(%r11),%xmm1
+
+	pxor	%xmm15,%xmm14
+.byte	102,15,56,221,84,36,0
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,221,92,36,16
+.byte	102,15,56,221,100,36,32
+	pand	%xmm8,%xmm9
+	movq	%r10,%rax
+.byte	102,15,56,221,108,36,48
+.byte	102,15,56,221,116,36,64
+.byte	102,15,56,221,124,36,80
+	pxor	%xmm9,%xmm15
+
+	leaq	96(%rsi),%rsi
+	movups	%xmm2,-96(%rsi)
+	movups	%xmm3,-80(%rsi)
+	movups	%xmm4,-64(%rsi)
+	movups	%xmm5,-48(%rsi)
+	movups	%xmm6,-32(%rsi)
+	movups	%xmm7,-16(%rsi)
+	subq	$96,%rdx
+	jnc	L$xts_enc_grandloop
+
+	movl	$16+96,%eax
+	subl	%r10d,%eax
+	movq	%r11,%rcx
+	shrl	$4,%eax
+
+L$xts_enc_short:
+
+	movl	%eax,%r10d
+	pxor	%xmm0,%xmm10
+	addq	$96,%rdx
+	jz	L$xts_enc_done
+
+	pxor	%xmm0,%xmm11
+	cmpq	$32,%rdx
+	jb	L$xts_enc_one
+	pxor	%xmm0,%xmm12
+	je	L$xts_enc_two
+
+	pxor	%xmm0,%xmm13
+	cmpq	$64,%rdx
+	jb	L$xts_enc_three
+	pxor	%xmm0,%xmm14
+	je	L$xts_enc_four
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm10,%xmm2
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm11,%xmm3
+	movdqu	64(%rdi),%xmm6
+	leaq	80(%rdi),%rdi
+	pxor	%xmm12,%xmm4
+	pxor	%xmm13,%xmm5
+	pxor	%xmm14,%xmm6
+	pxor	%xmm7,%xmm7
+
+	call	_aesni_encrypt6
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm15,%xmm10
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	xorps	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	xorps	%xmm14,%xmm6
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	jmp	L$xts_enc_done
+
+.p2align	4
+L$xts_enc_one:
+	movups	(%rdi),%xmm2
+	leaq	16(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_9:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_9
+.byte	102,15,56,221,209
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm11,%xmm10
+	movups	%xmm2,(%rsi)
+	leaq	16(%rsi),%rsi
+	jmp	L$xts_enc_done
+
+.p2align	4
+L$xts_enc_two:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	leaq	32(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+
+	call	_aesni_encrypt2
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm12,%xmm10
+	xorps	%xmm11,%xmm3
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	leaq	32(%rsi),%rsi
+	jmp	L$xts_enc_done
+
+.p2align	4
+L$xts_enc_three:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	leaq	48(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+
+	call	_aesni_encrypt3
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm13,%xmm10
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	leaq	48(%rsi),%rsi
+	jmp	L$xts_enc_done
+
+.p2align	4
+L$xts_enc_four:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	xorps	%xmm10,%xmm2
+	movups	48(%rdi),%xmm5
+	leaq	64(%rdi),%rdi
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	xorps	%xmm13,%xmm5
+
+	call	_aesni_encrypt4
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	leaq	64(%rsi),%rsi
+	jmp	L$xts_enc_done
+
+.p2align	4
+L$xts_enc_done:
+	andq	$15,%r9
+	jz	L$xts_enc_ret
+	movq	%r9,%rdx
+
+L$xts_enc_steal:
+	movzbl	(%rdi),%eax
+	movzbl	-16(%rsi),%ecx
+	leaq	1(%rdi),%rdi
+	movb	%al,-16(%rsi)
+	movb	%cl,0(%rsi)
+	leaq	1(%rsi),%rsi
+	subq	$1,%rdx
+	jnz	L$xts_enc_steal
+
+	subq	%r9,%rsi
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	-16(%rsi),%xmm2
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_enc1_10:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_10
+.byte	102,15,56,221,209
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,-16(%rsi)
+
+L$xts_enc_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+L$xts_enc_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_aesni_xts_decrypt
+.private_extern _aesni_xts_decrypt
+
+.p2align	4
+_aesni_xts_decrypt:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$112,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r9),%xmm2
+	movl	240(%r8),%eax
+	movl	240(%rcx),%r10d
+	movups	(%r8),%xmm0
+	movups	16(%r8),%xmm1
+	leaq	32(%r8),%r8
+	xorps	%xmm0,%xmm2
+L$oop_enc1_11:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%r8),%xmm1
+	leaq	16(%r8),%r8
+	jnz	L$oop_enc1_11
+.byte	102,15,56,221,209
+	xorl	%eax,%eax
+	testq	$15,%rdx
+	setnz	%al
+	shlq	$4,%rax
+	subq	%rax,%rdx
+
+	movups	(%rcx),%xmm0
+	movq	%rcx,%r11
+	movl	%r10d,%eax
+	shll	$4,%r10d
+	movq	%rdx,%r9
+	andq	$-16,%rdx
+
+	movups	16(%rcx,%r10,1),%xmm1
+
+	movdqa	L$xts_magic(%rip),%xmm8
+	movdqa	%xmm2,%xmm15
+	pshufd	$95,%xmm2,%xmm9
+	pxor	%xmm0,%xmm1
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm10
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm10
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm11
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm11
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm12
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm12
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+	movdqa	%xmm15,%xmm13
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+	pxor	%xmm0,%xmm13
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm15,%xmm14
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm9
+	pxor	%xmm0,%xmm14
+	pxor	%xmm9,%xmm15
+	movaps	%xmm1,96(%rsp)
+
+	subq	$96,%rdx
+	jc	L$xts_dec_short
+
+	movl	$16+96,%eax
+	leaq	32(%r11,%r10,1),%rcx
+	subq	%r10,%rax
+	movups	16(%r11),%xmm1
+	movq	%rax,%r10
+	leaq	L$xts_magic(%rip),%r8
+	jmp	L$xts_dec_grandloop
+
+.p2align	5
+L$xts_dec_grandloop:
+	movdqu	0(%rdi),%xmm2
+	movdqa	%xmm0,%xmm8
+	movdqu	16(%rdi),%xmm3
+	pxor	%xmm10,%xmm2
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm11,%xmm3
+.byte	102,15,56,222,209
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm12,%xmm4
+.byte	102,15,56,222,217
+	movdqu	64(%rdi),%xmm6
+	pxor	%xmm13,%xmm5
+.byte	102,15,56,222,225
+	movdqu	80(%rdi),%xmm7
+	pxor	%xmm15,%xmm8
+	movdqa	96(%rsp),%xmm9
+	pxor	%xmm14,%xmm6
+.byte	102,15,56,222,233
+	movups	32(%r11),%xmm0
+	leaq	96(%rdi),%rdi
+	pxor	%xmm8,%xmm7
+
+	pxor	%xmm9,%xmm10
+.byte	102,15,56,222,241
+	pxor	%xmm9,%xmm11
+	movdqa	%xmm10,0(%rsp)
+.byte	102,15,56,222,249
+	movups	48(%r11),%xmm1
+	pxor	%xmm9,%xmm12
+
+.byte	102,15,56,222,208
+	pxor	%xmm9,%xmm13
+	movdqa	%xmm11,16(%rsp)
+.byte	102,15,56,222,216
+	pxor	%xmm9,%xmm14
+	movdqa	%xmm12,32(%rsp)
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	pxor	%xmm9,%xmm8
+	movdqa	%xmm14,64(%rsp)
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	64(%r11),%xmm0
+	movdqa	%xmm8,80(%rsp)
+	pshufd	$95,%xmm15,%xmm9
+	jmp	L$xts_dec_loop6
+.p2align	5
+L$xts_dec_loop6:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	-64(%rcx,%rax,1),%xmm1
+	addq	$32,%rax
+
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+	movups	-80(%rcx,%rax,1),%xmm0
+	jnz	L$xts_dec_loop6
+
+	movdqa	(%r8),%xmm8
+	movdqa	%xmm9,%xmm14
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	paddq	%xmm15,%xmm15
+	psrad	$31,%xmm14
+.byte	102,15,56,222,217
+	pand	%xmm8,%xmm14
+	movups	(%r11),%xmm10
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+	pxor	%xmm14,%xmm15
+	movaps	%xmm10,%xmm11
+.byte	102,15,56,222,249
+	movups	-64(%rcx),%xmm1
+
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,208
+	paddd	%xmm9,%xmm9
+	pxor	%xmm15,%xmm10
+.byte	102,15,56,222,216
+	psrad	$31,%xmm14
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+	pand	%xmm8,%xmm14
+	movaps	%xmm11,%xmm12
+.byte	102,15,56,222,240
+	pxor	%xmm14,%xmm15
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,248
+	movups	-48(%rcx),%xmm0
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	pxor	%xmm15,%xmm11
+	psrad	$31,%xmm14
+.byte	102,15,56,222,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	movdqa	%xmm13,48(%rsp)
+	pxor	%xmm14,%xmm15
+.byte	102,15,56,222,241
+	movaps	%xmm12,%xmm13
+	movdqa	%xmm9,%xmm14
+.byte	102,15,56,222,249
+	movups	-32(%rcx),%xmm1
+
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,208
+	pxor	%xmm15,%xmm12
+	psrad	$31,%xmm14
+.byte	102,15,56,222,216
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm14
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+	pxor	%xmm14,%xmm15
+	movaps	%xmm13,%xmm14
+.byte	102,15,56,222,248
+
+	movdqa	%xmm9,%xmm0
+	paddd	%xmm9,%xmm9
+.byte	102,15,56,222,209
+	pxor	%xmm15,%xmm13
+	psrad	$31,%xmm0
+.byte	102,15,56,222,217
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm0
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	pxor	%xmm0,%xmm15
+	movups	(%r11),%xmm0
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	movups	16(%r11),%xmm1
+
+	pxor	%xmm15,%xmm14
+.byte	102,15,56,223,84,36,0
+	psrad	$31,%xmm9
+	paddq	%xmm15,%xmm15
+.byte	102,15,56,223,92,36,16
+.byte	102,15,56,223,100,36,32
+	pand	%xmm8,%xmm9
+	movq	%r10,%rax
+.byte	102,15,56,223,108,36,48
+.byte	102,15,56,223,116,36,64
+.byte	102,15,56,223,124,36,80
+	pxor	%xmm9,%xmm15
+
+	leaq	96(%rsi),%rsi
+	movups	%xmm2,-96(%rsi)
+	movups	%xmm3,-80(%rsi)
+	movups	%xmm4,-64(%rsi)
+	movups	%xmm5,-48(%rsi)
+	movups	%xmm6,-32(%rsi)
+	movups	%xmm7,-16(%rsi)
+	subq	$96,%rdx
+	jnc	L$xts_dec_grandloop
+
+	movl	$16+96,%eax
+	subl	%r10d,%eax
+	movq	%r11,%rcx
+	shrl	$4,%eax
+
+L$xts_dec_short:
+
+	movl	%eax,%r10d
+	pxor	%xmm0,%xmm10
+	pxor	%xmm0,%xmm11
+	addq	$96,%rdx
+	jz	L$xts_dec_done
+
+	pxor	%xmm0,%xmm12
+	cmpq	$32,%rdx
+	jb	L$xts_dec_one
+	pxor	%xmm0,%xmm13
+	je	L$xts_dec_two
+
+	pxor	%xmm0,%xmm14
+	cmpq	$64,%rdx
+	jb	L$xts_dec_three
+	je	L$xts_dec_four
+
+	movdqu	(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqu	32(%rdi),%xmm4
+	pxor	%xmm10,%xmm2
+	movdqu	48(%rdi),%xmm5
+	pxor	%xmm11,%xmm3
+	movdqu	64(%rdi),%xmm6
+	leaq	80(%rdi),%rdi
+	pxor	%xmm12,%xmm4
+	pxor	%xmm13,%xmm5
+	pxor	%xmm14,%xmm6
+
+	call	_aesni_decrypt6
+
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	xorps	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	xorps	%xmm14,%xmm6
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm14,%xmm14
+	movdqu	%xmm5,48(%rsi)
+	pcmpgtd	%xmm15,%xmm14
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	pshufd	$19,%xmm14,%xmm11
+	andq	$15,%r9
+	jz	L$xts_dec_ret
+
+	movdqa	%xmm15,%xmm10
+	paddq	%xmm15,%xmm15
+	pand	%xmm8,%xmm11
+	pxor	%xmm15,%xmm11
+	jmp	L$xts_dec_done2
+
+.p2align	4
+L$xts_dec_one:
+	movups	(%rdi),%xmm2
+	leaq	16(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_12:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_12
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm11,%xmm10
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm12,%xmm11
+	leaq	16(%rsi),%rsi
+	jmp	L$xts_dec_done
+
+.p2align	4
+L$xts_dec_two:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	leaq	32(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+
+	call	_aesni_decrypt2
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm12,%xmm10
+	xorps	%xmm11,%xmm3
+	movdqa	%xmm13,%xmm11
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	leaq	32(%rsi),%rsi
+	jmp	L$xts_dec_done
+
+.p2align	4
+L$xts_dec_three:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	leaq	48(%rdi),%rdi
+	xorps	%xmm10,%xmm2
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+
+	call	_aesni_decrypt3
+
+	xorps	%xmm10,%xmm2
+	movdqa	%xmm13,%xmm10
+	xorps	%xmm11,%xmm3
+	movdqa	%xmm14,%xmm11
+	xorps	%xmm12,%xmm4
+	movups	%xmm2,(%rsi)
+	movups	%xmm3,16(%rsi)
+	movups	%xmm4,32(%rsi)
+	leaq	48(%rsi),%rsi
+	jmp	L$xts_dec_done
+
+.p2align	4
+L$xts_dec_four:
+	movups	(%rdi),%xmm2
+	movups	16(%rdi),%xmm3
+	movups	32(%rdi),%xmm4
+	xorps	%xmm10,%xmm2
+	movups	48(%rdi),%xmm5
+	leaq	64(%rdi),%rdi
+	xorps	%xmm11,%xmm3
+	xorps	%xmm12,%xmm4
+	xorps	%xmm13,%xmm5
+
+	call	_aesni_decrypt4
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqa	%xmm15,%xmm11
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm3,16(%rsi)
+	movdqu	%xmm4,32(%rsi)
+	movdqu	%xmm5,48(%rsi)
+	leaq	64(%rsi),%rsi
+	jmp	L$xts_dec_done
+
+.p2align	4
+L$xts_dec_done:
+	andq	$15,%r9
+	jz	L$xts_dec_ret
+L$xts_dec_done2:
+	movq	%r9,%rdx
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	(%rdi),%xmm2
+	xorps	%xmm11,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_13:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_13
+.byte	102,15,56,223,209
+	xorps	%xmm11,%xmm2
+	movups	%xmm2,(%rsi)
+
+L$xts_dec_steal:
+	movzbl	16(%rdi),%eax
+	movzbl	(%rsi),%ecx
+	leaq	1(%rdi),%rdi
+	movb	%al,(%rsi)
+	movb	%cl,16(%rsi)
+	leaq	1(%rsi),%rsi
+	subq	$1,%rdx
+	jnz	L$xts_dec_steal
+
+	subq	%r9,%rsi
+	movq	%r11,%rcx
+	movl	%r10d,%eax
+
+	movups	(%rsi),%xmm2
+	xorps	%xmm10,%xmm2
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_14:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_14
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movups	%xmm2,(%rsi)
+
+L$xts_dec_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	movaps	%xmm0,0(%rsp)
+	pxor	%xmm8,%xmm8
+	movaps	%xmm0,16(%rsp)
+	pxor	%xmm9,%xmm9
+	movaps	%xmm0,32(%rsp)
+	pxor	%xmm10,%xmm10
+	movaps	%xmm0,48(%rsp)
+	pxor	%xmm11,%xmm11
+	movaps	%xmm0,64(%rsp)
+	pxor	%xmm12,%xmm12
+	movaps	%xmm0,80(%rsp)
+	pxor	%xmm13,%xmm13
+	movaps	%xmm0,96(%rsp)
+	pxor	%xmm14,%xmm14
+	pxor	%xmm15,%xmm15
+	leaq	(%rbp),%rsp
+	popq	%rbp
+L$xts_dec_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_aesni_cbc_encrypt
+.private_extern _aesni_cbc_encrypt
+
+.p2align	4
+_aesni_cbc_encrypt:
+	testq	%rdx,%rdx
+	jz	L$cbc_ret
+
+	movl	240(%rcx),%r10d
+	movq	%rcx,%r11
+	testl	%r9d,%r9d
+	jz	L$cbc_decrypt
+
+	movups	(%r8),%xmm2
+	movl	%r10d,%eax
+	cmpq	$16,%rdx
+	jb	L$cbc_enc_tail
+	subq	$16,%rdx
+	jmp	L$cbc_enc_loop
+.p2align	4
+L$cbc_enc_loop:
+	movups	(%rdi),%xmm3
+	leaq	16(%rdi),%rdi
+
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	xorps	%xmm0,%xmm3
+	leaq	32(%rcx),%rcx
+	xorps	%xmm3,%xmm2
+L$oop_enc1_15:
+.byte	102,15,56,220,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_enc1_15
+.byte	102,15,56,221,209
+	movl	%r10d,%eax
+	movq	%r11,%rcx
+	movups	%xmm2,0(%rsi)
+	leaq	16(%rsi),%rsi
+	subq	$16,%rdx
+	jnc	L$cbc_enc_loop
+	addq	$16,%rdx
+	jnz	L$cbc_enc_tail
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movups	%xmm2,(%r8)
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	jmp	L$cbc_ret
+
+L$cbc_enc_tail:
+	movq	%rdx,%rcx
+	xchgq	%rdi,%rsi
+.long	0x9066A4F3
+	movl	$16,%ecx
+	subq	%rdx,%rcx
+	xorl	%eax,%eax
+.long	0x9066AAF3
+	leaq	-16(%rdi),%rdi
+	movl	%r10d,%eax
+	movq	%rdi,%rsi
+	movq	%r11,%rcx
+	xorq	%rdx,%rdx
+	jmp	L$cbc_enc_loop
+
+.p2align	4
+L$cbc_decrypt:
+	cmpq	$16,%rdx
+	jne	L$cbc_decrypt_bulk
+
+
+
+	movdqu	(%rdi),%xmm2
+	movdqu	(%r8),%xmm3
+	movdqa	%xmm2,%xmm4
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_16:
+.byte	102,15,56,222,209
+	decl	%r10d
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_16
+.byte	102,15,56,223,209
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	movdqu	%xmm4,(%r8)
+	xorps	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	L$cbc_ret
+.p2align	4
+L$cbc_decrypt_bulk:
+	leaq	(%rsp),%rax
+	pushq	%rbp
+	subq	$16,%rsp
+	andq	$-16,%rsp
+	leaq	-8(%rax),%rbp
+	movups	(%r8),%xmm10
+	movl	%r10d,%eax
+	cmpq	$80,%rdx
+	jbe	L$cbc_dec_tail
+
+	movups	(%rcx),%xmm0
+	movdqu	0(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqa	%xmm2,%xmm11
+	movdqu	32(%rdi),%xmm4
+	movdqa	%xmm3,%xmm12
+	movdqu	48(%rdi),%xmm5
+	movdqa	%xmm4,%xmm13
+	movdqu	64(%rdi),%xmm6
+	movdqa	%xmm5,%xmm14
+	movdqu	80(%rdi),%xmm7
+	movdqa	%xmm6,%xmm15
+	movl	_OPENSSL_ia32cap_P+4(%rip),%r9d
+	cmpq	$112,%rdx
+	jbe	L$cbc_dec_six_or_seven
+
+	andl	$71303168,%r9d
+	subq	$80,%rdx
+	cmpl	$4194304,%r9d
+	je	L$cbc_dec_loop6_enter
+	subq	$32,%rdx
+	leaq	112(%rcx),%rcx
+	jmp	L$cbc_dec_loop8_enter
+.p2align	4
+L$cbc_dec_loop8:
+	movups	%xmm9,(%rsi)
+	leaq	16(%rsi),%rsi
+L$cbc_dec_loop8_enter:
+	movdqu	96(%rdi),%xmm8
+	pxor	%xmm0,%xmm2
+	movdqu	112(%rdi),%xmm9
+	pxor	%xmm0,%xmm3
+	movups	16-112(%rcx),%xmm1
+	pxor	%xmm0,%xmm4
+	xorq	%r11,%r11
+	cmpq	$112,%rdx
+	pxor	%xmm0,%xmm5
+	pxor	%xmm0,%xmm6
+	pxor	%xmm0,%xmm7
+	pxor	%xmm0,%xmm8
+
+.byte	102,15,56,222,209
+	pxor	%xmm0,%xmm9
+	movups	32-112(%rcx),%xmm0
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+	setnc	%r11b
+	shlq	$7,%r11
+.byte	102,68,15,56,222,201
+	addq	%rdi,%r11
+	movups	48-112(%rcx),%xmm1
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	64-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	80-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	96-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	112-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	128-112(%rcx),%xmm0
+	nop
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	144-112(%rcx),%xmm1
+	cmpl	$11,%eax
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	160-112(%rcx),%xmm0
+	jb	L$cbc_dec_done
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	176-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	192-112(%rcx),%xmm0
+	je	L$cbc_dec_done
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movups	208-112(%rcx),%xmm1
+	nop
+.byte	102,15,56,222,208
+.byte	102,15,56,222,216
+.byte	102,15,56,222,224
+.byte	102,15,56,222,232
+.byte	102,15,56,222,240
+.byte	102,15,56,222,248
+.byte	102,68,15,56,222,192
+.byte	102,68,15,56,222,200
+	movups	224-112(%rcx),%xmm0
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_done:
+.byte	102,15,56,222,209
+.byte	102,15,56,222,217
+	pxor	%xmm0,%xmm10
+	pxor	%xmm0,%xmm11
+.byte	102,15,56,222,225
+.byte	102,15,56,222,233
+	pxor	%xmm0,%xmm12
+	pxor	%xmm0,%xmm13
+.byte	102,15,56,222,241
+.byte	102,15,56,222,249
+	pxor	%xmm0,%xmm14
+	pxor	%xmm0,%xmm15
+.byte	102,68,15,56,222,193
+.byte	102,68,15,56,222,201
+	movdqu	80(%rdi),%xmm1
+
+.byte	102,65,15,56,223,210
+	movdqu	96(%rdi),%xmm10
+	pxor	%xmm0,%xmm1
+.byte	102,65,15,56,223,219
+	pxor	%xmm0,%xmm10
+	movdqu	112(%rdi),%xmm0
+.byte	102,65,15,56,223,228
+	leaq	128(%rdi),%rdi
+	movdqu	0(%r11),%xmm11
+.byte	102,65,15,56,223,237
+.byte	102,65,15,56,223,246
+	movdqu	16(%r11),%xmm12
+	movdqu	32(%r11),%xmm13
+.byte	102,65,15,56,223,255
+.byte	102,68,15,56,223,193
+	movdqu	48(%r11),%xmm14
+	movdqu	64(%r11),%xmm15
+.byte	102,69,15,56,223,202
+	movdqa	%xmm0,%xmm10
+	movdqu	80(%r11),%xmm1
+	movups	-112(%rcx),%xmm0
+
+	movups	%xmm2,(%rsi)
+	movdqa	%xmm11,%xmm2
+	movups	%xmm3,16(%rsi)
+	movdqa	%xmm12,%xmm3
+	movups	%xmm4,32(%rsi)
+	movdqa	%xmm13,%xmm4
+	movups	%xmm5,48(%rsi)
+	movdqa	%xmm14,%xmm5
+	movups	%xmm6,64(%rsi)
+	movdqa	%xmm15,%xmm6
+	movups	%xmm7,80(%rsi)
+	movdqa	%xmm1,%xmm7
+	movups	%xmm8,96(%rsi)
+	leaq	112(%rsi),%rsi
+
+	subq	$128,%rdx
+	ja	L$cbc_dec_loop8
+
+	movaps	%xmm9,%xmm2
+	leaq	-112(%rcx),%rcx
+	addq	$112,%rdx
+	jle	L$cbc_dec_clear_tail_collected
+	movups	%xmm9,(%rsi)
+	leaq	16(%rsi),%rsi
+	cmpq	$80,%rdx
+	jbe	L$cbc_dec_tail
+
+	movaps	%xmm11,%xmm2
+L$cbc_dec_six_or_seven:
+	cmpq	$96,%rdx
+	ja	L$cbc_dec_seven
+
+	movaps	%xmm7,%xmm8
+	call	_aesni_decrypt6
+	pxor	%xmm10,%xmm2
+	movaps	%xmm8,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	pxor	%xmm15,%xmm7
+	movdqu	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	leaq	80(%rsi),%rsi
+	movdqa	%xmm7,%xmm2
+	pxor	%xmm7,%xmm7
+	jmp	L$cbc_dec_tail_collected
+
+.p2align	4
+L$cbc_dec_seven:
+	movups	96(%rdi),%xmm8
+	xorps	%xmm9,%xmm9
+	call	_aesni_decrypt8
+	movups	80(%rdi),%xmm9
+	pxor	%xmm10,%xmm2
+	movups	96(%rdi),%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	pxor	%xmm15,%xmm7
+	movdqu	%xmm6,64(%rsi)
+	pxor	%xmm6,%xmm6
+	pxor	%xmm9,%xmm8
+	movdqu	%xmm7,80(%rsi)
+	pxor	%xmm7,%xmm7
+	leaq	96(%rsi),%rsi
+	movdqa	%xmm8,%xmm2
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+	jmp	L$cbc_dec_tail_collected
+
+.p2align	4
+L$cbc_dec_loop6:
+	movups	%xmm7,(%rsi)
+	leaq	16(%rsi),%rsi
+	movdqu	0(%rdi),%xmm2
+	movdqu	16(%rdi),%xmm3
+	movdqa	%xmm2,%xmm11
+	movdqu	32(%rdi),%xmm4
+	movdqa	%xmm3,%xmm12
+	movdqu	48(%rdi),%xmm5
+	movdqa	%xmm4,%xmm13
+	movdqu	64(%rdi),%xmm6
+	movdqa	%xmm5,%xmm14
+	movdqu	80(%rdi),%xmm7
+	movdqa	%xmm6,%xmm15
+L$cbc_dec_loop6_enter:
+	leaq	96(%rdi),%rdi
+	movdqa	%xmm7,%xmm8
+
+	call	_aesni_decrypt6
+
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm8,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm14,%xmm6
+	movq	%r11,%rcx
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm15,%xmm7
+	movl	%r10d,%eax
+	movdqu	%xmm6,64(%rsi)
+	leaq	80(%rsi),%rsi
+	subq	$96,%rdx
+	ja	L$cbc_dec_loop6
+
+	movdqa	%xmm7,%xmm2
+	addq	$80,%rdx
+	jle	L$cbc_dec_clear_tail_collected
+	movups	%xmm7,(%rsi)
+	leaq	16(%rsi),%rsi
+
+L$cbc_dec_tail:
+	movups	(%rdi),%xmm2
+	subq	$16,%rdx
+	jbe	L$cbc_dec_one
+
+	movups	16(%rdi),%xmm3
+	movaps	%xmm2,%xmm11
+	subq	$16,%rdx
+	jbe	L$cbc_dec_two
+
+	movups	32(%rdi),%xmm4
+	movaps	%xmm3,%xmm12
+	subq	$16,%rdx
+	jbe	L$cbc_dec_three
+
+	movups	48(%rdi),%xmm5
+	movaps	%xmm4,%xmm13
+	subq	$16,%rdx
+	jbe	L$cbc_dec_four
+
+	movups	64(%rdi),%xmm6
+	movaps	%xmm5,%xmm14
+	movaps	%xmm6,%xmm15
+	xorps	%xmm7,%xmm7
+	call	_aesni_decrypt6
+	pxor	%xmm10,%xmm2
+	movaps	%xmm15,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	pxor	%xmm14,%xmm6
+	movdqu	%xmm5,48(%rsi)
+	pxor	%xmm5,%xmm5
+	leaq	64(%rsi),%rsi
+	movdqa	%xmm6,%xmm2
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	subq	$16,%rdx
+	jmp	L$cbc_dec_tail_collected
+
+.p2align	4
+L$cbc_dec_one:
+	movaps	%xmm2,%xmm11
+	movups	(%rcx),%xmm0
+	movups	16(%rcx),%xmm1
+	leaq	32(%rcx),%rcx
+	xorps	%xmm0,%xmm2
+L$oop_dec1_17:
+.byte	102,15,56,222,209
+	decl	%eax
+	movups	(%rcx),%xmm1
+	leaq	16(%rcx),%rcx
+	jnz	L$oop_dec1_17
+.byte	102,15,56,223,209
+	xorps	%xmm10,%xmm2
+	movaps	%xmm11,%xmm10
+	jmp	L$cbc_dec_tail_collected
+.p2align	4
+L$cbc_dec_two:
+	movaps	%xmm3,%xmm12
+	call	_aesni_decrypt2
+	pxor	%xmm10,%xmm2
+	movaps	%xmm12,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	movdqa	%xmm3,%xmm2
+	pxor	%xmm3,%xmm3
+	leaq	16(%rsi),%rsi
+	jmp	L$cbc_dec_tail_collected
+.p2align	4
+L$cbc_dec_three:
+	movaps	%xmm4,%xmm13
+	call	_aesni_decrypt3
+	pxor	%xmm10,%xmm2
+	movaps	%xmm13,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	movdqa	%xmm4,%xmm2
+	pxor	%xmm4,%xmm4
+	leaq	32(%rsi),%rsi
+	jmp	L$cbc_dec_tail_collected
+.p2align	4
+L$cbc_dec_four:
+	movaps	%xmm5,%xmm14
+	call	_aesni_decrypt4
+	pxor	%xmm10,%xmm2
+	movaps	%xmm14,%xmm10
+	pxor	%xmm11,%xmm3
+	movdqu	%xmm2,(%rsi)
+	pxor	%xmm12,%xmm4
+	movdqu	%xmm3,16(%rsi)
+	pxor	%xmm3,%xmm3
+	pxor	%xmm13,%xmm5
+	movdqu	%xmm4,32(%rsi)
+	pxor	%xmm4,%xmm4
+	movdqa	%xmm5,%xmm2
+	pxor	%xmm5,%xmm5
+	leaq	48(%rsi),%rsi
+	jmp	L$cbc_dec_tail_collected
+
+.p2align	4
+L$cbc_dec_clear_tail_collected:
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	pxor	%xmm8,%xmm8
+	pxor	%xmm9,%xmm9
+L$cbc_dec_tail_collected:
+	movups	%xmm10,(%r8)
+	andq	$15,%rdx
+	jnz	L$cbc_dec_tail_partial
+	movups	%xmm2,(%rsi)
+	pxor	%xmm2,%xmm2
+	jmp	L$cbc_dec_ret
+.p2align	4
+L$cbc_dec_tail_partial:
+	movaps	%xmm2,(%rsp)
+	pxor	%xmm2,%xmm2
+	movq	$16,%rcx
+	movq	%rsi,%rdi
+	subq	%rdx,%rcx
+	leaq	(%rsp),%rsi
+.long	0x9066A4F3
+	movdqa	%xmm2,(%rsp)
+
+L$cbc_dec_ret:
+	xorps	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	leaq	(%rbp),%rsp
+	popq	%rbp
+L$cbc_ret:
+	.byte	0xf3,0xc3
+
+.globl	_aesni_set_decrypt_key
+.private_extern _aesni_set_decrypt_key
+
+.p2align	4
+_aesni_set_decrypt_key:
+.byte	0x48,0x83,0xEC,0x08
+	call	__aesni_set_encrypt_key
+	shll	$4,%esi
+	testl	%eax,%eax
+	jnz	L$dec_key_ret
+	leaq	16(%rdx,%rsi,1),%rdi
+
+	movups	(%rdx),%xmm0
+	movups	(%rdi),%xmm1
+	movups	%xmm0,(%rdi)
+	movups	%xmm1,(%rdx)
+	leaq	16(%rdx),%rdx
+	leaq	-16(%rdi),%rdi
+
+L$dec_key_inverse:
+	movups	(%rdx),%xmm0
+	movups	(%rdi),%xmm1
+.byte	102,15,56,219,192
+.byte	102,15,56,219,201
+	leaq	16(%rdx),%rdx
+	leaq	-16(%rdi),%rdi
+	movups	%xmm0,16(%rdi)
+	movups	%xmm1,-16(%rdx)
+	cmpq	%rdx,%rdi
+	ja	L$dec_key_inverse
+
+	movups	(%rdx),%xmm0
+.byte	102,15,56,219,192
+	pxor	%xmm1,%xmm1
+	movups	%xmm0,(%rdi)
+	pxor	%xmm0,%xmm0
+L$dec_key_ret:
+	addq	$8,%rsp
+	.byte	0xf3,0xc3
+L$SEH_end_set_decrypt_key:
+
+.globl	_aesni_set_encrypt_key
+.private_extern _aesni_set_encrypt_key
+
+.p2align	4
+_aesni_set_encrypt_key:
+__aesni_set_encrypt_key:
+.byte	0x48,0x83,0xEC,0x08
+	movq	$-1,%rax
+	testq	%rdi,%rdi
+	jz	L$enc_key_ret
+	testq	%rdx,%rdx
+	jz	L$enc_key_ret
+
+	movl	$268437504,%r10d
+	movups	(%rdi),%xmm0
+	xorps	%xmm4,%xmm4
+	andl	_OPENSSL_ia32cap_P+4(%rip),%r10d
+	leaq	16(%rdx),%rax
+	cmpl	$256,%esi
+	je	L$14rounds
+	cmpl	$192,%esi
+	je	L$12rounds
+	cmpl	$128,%esi
+	jne	L$bad_keybits
+
+L$10rounds:
+	movl	$9,%esi
+	cmpl	$268435456,%r10d
+	je	L$10rounds_alt
+
+	movups	%xmm0,(%rdx)
+.byte	102,15,58,223,200,1
+	call	L$key_expansion_128_cold
+.byte	102,15,58,223,200,2
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,4
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,8
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,16
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,32
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,64
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,128
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,27
+	call	L$key_expansion_128
+.byte	102,15,58,223,200,54
+	call	L$key_expansion_128
+	movups	%xmm0,(%rax)
+	movl	%esi,80(%rax)
+	xorl	%eax,%eax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$10rounds_alt:
+	movdqa	L$key_rotate(%rip),%xmm5
+	movl	$8,%r10d
+	movdqa	L$key_rcon1(%rip),%xmm4
+	movdqa	%xmm0,%xmm2
+	movdqu	%xmm0,(%rdx)
+	jmp	L$oop_key128
+
+.p2align	4
+L$oop_key128:
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+	leaq	16(%rax),%rax
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,-16(%rax)
+	movdqa	%xmm0,%xmm2
+
+	decl	%r10d
+	jnz	L$oop_key128
+
+	movdqa	L$key_rcon1b(%rip),%xmm4
+
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+	pslld	$1,%xmm4
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%rax)
+
+	movdqa	%xmm0,%xmm2
+.byte	102,15,56,0,197
+.byte	102,15,56,221,196
+
+	movdqa	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm2,%xmm3
+	pslldq	$4,%xmm2
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,16(%rax)
+
+	movl	%esi,96(%rax)
+	xorl	%eax,%eax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$12rounds:
+	movq	16(%rdi),%xmm2
+	movl	$11,%esi
+	cmpl	$268435456,%r10d
+	je	L$12rounds_alt
+
+	movups	%xmm0,(%rdx)
+.byte	102,15,58,223,202,1
+	call	L$key_expansion_192a_cold
+.byte	102,15,58,223,202,2
+	call	L$key_expansion_192b
+.byte	102,15,58,223,202,4
+	call	L$key_expansion_192a
+.byte	102,15,58,223,202,8
+	call	L$key_expansion_192b
+.byte	102,15,58,223,202,16
+	call	L$key_expansion_192a
+.byte	102,15,58,223,202,32
+	call	L$key_expansion_192b
+.byte	102,15,58,223,202,64
+	call	L$key_expansion_192a
+.byte	102,15,58,223,202,128
+	call	L$key_expansion_192b
+	movups	%xmm0,(%rax)
+	movl	%esi,48(%rax)
+	xorq	%rax,%rax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$12rounds_alt:
+	movdqa	L$key_rotate192(%rip),%xmm5
+	movdqa	L$key_rcon1(%rip),%xmm4
+	movl	$8,%r10d
+	movdqu	%xmm0,(%rdx)
+	jmp	L$oop_key192
+
+.p2align	4
+L$oop_key192:
+	movq	%xmm2,0(%rax)
+	movdqa	%xmm2,%xmm1
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+	pslld	$1,%xmm4
+	leaq	24(%rax),%rax
+
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+
+	pxor	%xmm2,%xmm0
+	pxor	%xmm3,%xmm2
+	movdqu	%xmm0,-16(%rax)
+
+	decl	%r10d
+	jnz	L$oop_key192
+
+	movl	%esi,32(%rax)
+	xorl	%eax,%eax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$14rounds:
+	movups	16(%rdi),%xmm2
+	movl	$13,%esi
+	leaq	16(%rax),%rax
+	cmpl	$268435456,%r10d
+	je	L$14rounds_alt
+
+	movups	%xmm0,(%rdx)
+	movups	%xmm2,16(%rdx)
+.byte	102,15,58,223,202,1
+	call	L$key_expansion_256a_cold
+.byte	102,15,58,223,200,1
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,2
+	call	L$key_expansion_256a
+.byte	102,15,58,223,200,2
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,4
+	call	L$key_expansion_256a
+.byte	102,15,58,223,200,4
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,8
+	call	L$key_expansion_256a
+.byte	102,15,58,223,200,8
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,16
+	call	L$key_expansion_256a
+.byte	102,15,58,223,200,16
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,32
+	call	L$key_expansion_256a
+.byte	102,15,58,223,200,32
+	call	L$key_expansion_256b
+.byte	102,15,58,223,202,64
+	call	L$key_expansion_256a
+	movups	%xmm0,(%rax)
+	movl	%esi,16(%rax)
+	xorq	%rax,%rax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$14rounds_alt:
+	movdqa	L$key_rotate(%rip),%xmm5
+	movdqa	L$key_rcon1(%rip),%xmm4
+	movl	$7,%r10d
+	movdqu	%xmm0,0(%rdx)
+	movdqa	%xmm2,%xmm1
+	movdqu	%xmm2,16(%rdx)
+	jmp	L$oop_key256
+
+.p2align	4
+L$oop_key256:
+.byte	102,15,56,0,213
+.byte	102,15,56,221,212
+
+	movdqa	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm0,%xmm3
+	pslldq	$4,%xmm0
+	pxor	%xmm3,%xmm0
+	pslld	$1,%xmm4
+
+	pxor	%xmm2,%xmm0
+	movdqu	%xmm0,(%rax)
+
+	decl	%r10d
+	jz	L$done_key256
+
+	pshufd	$255,%xmm0,%xmm2
+	pxor	%xmm3,%xmm3
+.byte	102,15,56,221,211
+
+	movdqa	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm1,%xmm3
+	pslldq	$4,%xmm1
+	pxor	%xmm3,%xmm1
+
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,16(%rax)
+	leaq	32(%rax),%rax
+	movdqa	%xmm2,%xmm1
+
+	jmp	L$oop_key256
+
+L$done_key256:
+	movl	%esi,16(%rax)
+	xorl	%eax,%eax
+	jmp	L$enc_key_ret
+
+.p2align	4
+L$bad_keybits:
+	movq	$-2,%rax
+L$enc_key_ret:
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	addq	$8,%rsp
+	.byte	0xf3,0xc3
+L$SEH_end_set_encrypt_key:
+
+.p2align	4
+L$key_expansion_128:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+L$key_expansion_128_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	.byte	0xf3,0xc3
+
+.p2align	4
+L$key_expansion_192a:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+L$key_expansion_192a_cold:
+	movaps	%xmm2,%xmm5
+L$key_expansion_192b_warm:
+	shufps	$16,%xmm0,%xmm4
+	movdqa	%xmm2,%xmm3
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	pslldq	$4,%xmm3
+	xorps	%xmm4,%xmm0
+	pshufd	$85,%xmm1,%xmm1
+	pxor	%xmm3,%xmm2
+	pxor	%xmm1,%xmm0
+	pshufd	$255,%xmm0,%xmm3
+	pxor	%xmm3,%xmm2
+	.byte	0xf3,0xc3
+
+.p2align	4
+L$key_expansion_192b:
+	movaps	%xmm0,%xmm3
+	shufps	$68,%xmm0,%xmm5
+	movups	%xmm5,(%rax)
+	shufps	$78,%xmm2,%xmm3
+	movups	%xmm3,16(%rax)
+	leaq	32(%rax),%rax
+	jmp	L$key_expansion_192b_warm
+
+.p2align	4
+L$key_expansion_256a:
+	movups	%xmm2,(%rax)
+	leaq	16(%rax),%rax
+L$key_expansion_256a_cold:
+	shufps	$16,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$140,%xmm0,%xmm4
+	xorps	%xmm4,%xmm0
+	shufps	$255,%xmm1,%xmm1
+	xorps	%xmm1,%xmm0
+	.byte	0xf3,0xc3
+
+.p2align	4
+L$key_expansion_256b:
+	movups	%xmm0,(%rax)
+	leaq	16(%rax),%rax
+
+	shufps	$16,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$140,%xmm2,%xmm4
+	xorps	%xmm4,%xmm2
+	shufps	$170,%xmm1,%xmm1
+	xorps	%xmm1,%xmm2
+	.byte	0xf3,0xc3
+
+
+.p2align	6
+L$bswap_mask:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+L$increment32:
+.long	6,6,6,0
+L$increment64:
+.long	1,0,0,0
+L$xts_magic:
+.long	0x87,0,1,0
+L$increment1:
+.byte	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
+L$key_rotate:
+.long	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d
+L$key_rotate192:
+.long	0x04070605,0x04070605,0x04070605,0x04070605
+L$key_rcon1:
+.long	1,1,1,1
+L$key_rcon1b:
+.long	0x1b,0x1b,0x1b,0x1b
+
+.byte	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69,83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.p2align	6
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S
new file mode 100644
index 0000000..c2d0477
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/aes/bsaes-x86_64.S
@@ -0,0 +1,2504 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+
+
+.p2align	6
+_bsaes_encrypt8:
+	leaq	L$BS0(%rip),%r11
+
+	movdqa	(%rax),%xmm8
+	leaq	16(%rax),%rax
+	movdqa	80(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+_bsaes_encrypt8_bitslice:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$1,%xmm3
+	pxor	%xmm6,%xmm5
+	pxor	%xmm4,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm6
+	psllq	$1,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$1,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm2,%xmm1
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm15
+	pxor	%xmm1,%xmm2
+	psllq	$1,%xmm1
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm4,%xmm9
+	psrlq	$2,%xmm4
+	movdqa	%xmm3,%xmm10
+	psrlq	$2,%xmm3
+	pxor	%xmm6,%xmm4
+	pxor	%xmm5,%xmm3
+	pand	%xmm8,%xmm4
+	pand	%xmm8,%xmm3
+	pxor	%xmm4,%xmm6
+	psllq	$2,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$2,%xmm3
+	pxor	%xmm9,%xmm4
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm2,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm2
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm2,%xmm9
+	psrlq	$4,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$4,%xmm1
+	pxor	%xmm6,%xmm2
+	pxor	%xmm5,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$4,%xmm2
+	pxor	%xmm1,%xmm5
+	psllq	$4,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm4
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	decl	%r10d
+	jmp	L$enc_sbox
+.p2align	4
+L$enc_loop:
+	pxor	0(%rax),%xmm15
+	pxor	16(%rax),%xmm0
+	pxor	32(%rax),%xmm1
+	pxor	48(%rax),%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	64(%rax),%xmm3
+	pxor	80(%rax),%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	96(%rax),%xmm5
+	pxor	112(%rax),%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	128(%rax),%rax
+L$enc_sbox:
+	pxor	%xmm5,%xmm4
+	pxor	%xmm0,%xmm1
+	pxor	%xmm15,%xmm2
+	pxor	%xmm1,%xmm5
+	pxor	%xmm15,%xmm4
+
+	pxor	%xmm2,%xmm5
+	pxor	%xmm6,%xmm2
+	pxor	%xmm4,%xmm6
+	pxor	%xmm3,%xmm2
+	pxor	%xmm4,%xmm3
+	pxor	%xmm0,%xmm2
+
+	pxor	%xmm6,%xmm1
+	pxor	%xmm4,%xmm0
+	movdqa	%xmm6,%xmm10
+	movdqa	%xmm0,%xmm9
+	movdqa	%xmm4,%xmm8
+	movdqa	%xmm1,%xmm12
+	movdqa	%xmm5,%xmm11
+
+	pxor	%xmm3,%xmm10
+	pxor	%xmm1,%xmm9
+	pxor	%xmm2,%xmm8
+	movdqa	%xmm10,%xmm13
+	pxor	%xmm3,%xmm12
+	movdqa	%xmm9,%xmm7
+	pxor	%xmm15,%xmm11
+	movdqa	%xmm10,%xmm14
+
+	por	%xmm8,%xmm9
+	por	%xmm11,%xmm10
+	pxor	%xmm7,%xmm14
+	pand	%xmm11,%xmm13
+	pxor	%xmm8,%xmm11
+	pand	%xmm8,%xmm7
+	pand	%xmm11,%xmm14
+	movdqa	%xmm2,%xmm11
+	pxor	%xmm15,%xmm11
+	pand	%xmm11,%xmm12
+	pxor	%xmm12,%xmm10
+	pxor	%xmm12,%xmm9
+	movdqa	%xmm6,%xmm12
+	movdqa	%xmm4,%xmm11
+	pxor	%xmm0,%xmm12
+	pxor	%xmm5,%xmm11
+	movdqa	%xmm12,%xmm8
+	pand	%xmm11,%xmm12
+	por	%xmm11,%xmm8
+	pxor	%xmm12,%xmm7
+	pxor	%xmm14,%xmm10
+	pxor	%xmm13,%xmm9
+	pxor	%xmm14,%xmm8
+	movdqa	%xmm1,%xmm11
+	pxor	%xmm13,%xmm7
+	movdqa	%xmm3,%xmm12
+	pxor	%xmm13,%xmm8
+	movdqa	%xmm0,%xmm13
+	pand	%xmm2,%xmm11
+	movdqa	%xmm6,%xmm14
+	pand	%xmm15,%xmm12
+	pand	%xmm4,%xmm13
+	por	%xmm5,%xmm14
+	pxor	%xmm11,%xmm10
+	pxor	%xmm12,%xmm9
+	pxor	%xmm13,%xmm8
+	pxor	%xmm14,%xmm7
+
+
+
+
+
+	movdqa	%xmm10,%xmm11
+	pand	%xmm8,%xmm10
+	pxor	%xmm9,%xmm11
+
+	movdqa	%xmm7,%xmm13
+	movdqa	%xmm11,%xmm14
+	pxor	%xmm10,%xmm13
+	pand	%xmm13,%xmm14
+
+	movdqa	%xmm8,%xmm12
+	pxor	%xmm9,%xmm14
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm9,%xmm10
+
+	pand	%xmm10,%xmm12
+
+	movdqa	%xmm13,%xmm9
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm12,%xmm9
+	pxor	%xmm12,%xmm8
+
+	pand	%xmm7,%xmm9
+
+	pxor	%xmm9,%xmm13
+	pxor	%xmm9,%xmm8
+
+	pand	%xmm14,%xmm13
+
+	pxor	%xmm11,%xmm13
+	movdqa	%xmm5,%xmm11
+	movdqa	%xmm4,%xmm7
+	movdqa	%xmm14,%xmm9
+	pxor	%xmm13,%xmm9
+	pand	%xmm5,%xmm9
+	pxor	%xmm4,%xmm5
+	pand	%xmm14,%xmm4
+	pand	%xmm13,%xmm5
+	pxor	%xmm4,%xmm5
+	pxor	%xmm9,%xmm4
+	pxor	%xmm15,%xmm11
+	pxor	%xmm2,%xmm7
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm15,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm2,%xmm15
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm2
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm15
+	pxor	%xmm11,%xmm7
+	pxor	%xmm2,%xmm15
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm2
+	pxor	%xmm11,%xmm5
+	pxor	%xmm11,%xmm15
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm2
+
+	movdqa	%xmm6,%xmm11
+	movdqa	%xmm0,%xmm7
+	pxor	%xmm3,%xmm11
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm3,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm1,%xmm3
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm1
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm3
+	pxor	%xmm11,%xmm7
+	pxor	%xmm1,%xmm3
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm1
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm13,%xmm10
+	pand	%xmm6,%xmm10
+	pxor	%xmm0,%xmm6
+	pand	%xmm14,%xmm0
+	pand	%xmm13,%xmm6
+	pxor	%xmm0,%xmm6
+	pxor	%xmm10,%xmm0
+	pxor	%xmm11,%xmm6
+	pxor	%xmm11,%xmm3
+	pxor	%xmm7,%xmm0
+	pxor	%xmm7,%xmm1
+	pxor	%xmm15,%xmm6
+	pxor	%xmm5,%xmm0
+	pxor	%xmm6,%xmm3
+	pxor	%xmm15,%xmm5
+	pxor	%xmm0,%xmm15
+
+	pxor	%xmm4,%xmm0
+	pxor	%xmm1,%xmm4
+	pxor	%xmm2,%xmm1
+	pxor	%xmm4,%xmm2
+	pxor	%xmm4,%xmm3
+
+	pxor	%xmm2,%xmm5
+	decl	%r10d
+	jl	L$enc_done
+	pshufd	$147,%xmm15,%xmm7
+	pshufd	$147,%xmm0,%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$147,%xmm3,%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$147,%xmm5,%xmm10
+	pxor	%xmm9,%xmm3
+	pshufd	$147,%xmm2,%xmm11
+	pxor	%xmm10,%xmm5
+	pshufd	$147,%xmm6,%xmm12
+	pxor	%xmm11,%xmm2
+	pshufd	$147,%xmm1,%xmm13
+	pxor	%xmm12,%xmm6
+	pshufd	$147,%xmm4,%xmm14
+	pxor	%xmm13,%xmm1
+	pxor	%xmm14,%xmm4
+
+	pxor	%xmm15,%xmm8
+	pxor	%xmm4,%xmm7
+	pxor	%xmm4,%xmm8
+	pshufd	$78,%xmm15,%xmm15
+	pxor	%xmm0,%xmm9
+	pshufd	$78,%xmm0,%xmm0
+	pxor	%xmm2,%xmm12
+	pxor	%xmm7,%xmm15
+	pxor	%xmm6,%xmm13
+	pxor	%xmm8,%xmm0
+	pxor	%xmm5,%xmm11
+	pshufd	$78,%xmm2,%xmm7
+	pxor	%xmm1,%xmm14
+	pshufd	$78,%xmm6,%xmm8
+	pxor	%xmm3,%xmm10
+	pshufd	$78,%xmm5,%xmm2
+	pxor	%xmm4,%xmm10
+	pshufd	$78,%xmm4,%xmm6
+	pxor	%xmm4,%xmm11
+	pshufd	$78,%xmm1,%xmm5
+	pxor	%xmm11,%xmm7
+	pshufd	$78,%xmm3,%xmm1
+	pxor	%xmm12,%xmm8
+	pxor	%xmm10,%xmm2
+	pxor	%xmm14,%xmm6
+	pxor	%xmm13,%xmm5
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm9,%xmm1
+	movdqa	%xmm8,%xmm4
+	movdqa	48(%r11),%xmm7
+	jnz	L$enc_loop
+	movdqa	64(%r11),%xmm7
+	jmp	L$enc_loop
+.p2align	4
+L$enc_done:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm2,%xmm10
+	psrlq	$1,%xmm2
+	pxor	%xmm4,%xmm1
+	pxor	%xmm6,%xmm2
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm2
+	pxor	%xmm1,%xmm4
+	psllq	$1,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$1,%xmm2
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm3,%xmm9
+	psrlq	$1,%xmm3
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm5,%xmm3
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm3
+	pand	%xmm7,%xmm15
+	pxor	%xmm3,%xmm5
+	psllq	$1,%xmm3
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm3
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm6,%xmm9
+	psrlq	$2,%xmm6
+	movdqa	%xmm2,%xmm10
+	psrlq	$2,%xmm2
+	pxor	%xmm4,%xmm6
+	pxor	%xmm1,%xmm2
+	pand	%xmm8,%xmm6
+	pand	%xmm8,%xmm2
+	pxor	%xmm6,%xmm4
+	psllq	$2,%xmm6
+	pxor	%xmm2,%xmm1
+	psllq	$2,%xmm2
+	pxor	%xmm9,%xmm6
+	pxor	%xmm10,%xmm2
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm5,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm5
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm5,%xmm9
+	psrlq	$4,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$4,%xmm3
+	pxor	%xmm4,%xmm5
+	pxor	%xmm1,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm4
+	psllq	$4,%xmm5
+	pxor	%xmm3,%xmm1
+	psllq	$4,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm6,%xmm0
+	pxor	%xmm2,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm6
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm2
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	(%rax),%xmm7
+	pxor	%xmm7,%xmm3
+	pxor	%xmm7,%xmm5
+	pxor	%xmm7,%xmm2
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm1
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm15
+	pxor	%xmm7,%xmm0
+	.byte	0xf3,0xc3
+
+
+
+.p2align	6
+_bsaes_decrypt8:
+	leaq	L$BS0(%rip),%r11
+
+	movdqa	(%rax),%xmm8
+	leaq	16(%rax),%rax
+	movdqa	-48(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm3,%xmm10
+	psrlq	$1,%xmm3
+	pxor	%xmm6,%xmm5
+	pxor	%xmm4,%xmm3
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm3
+	pxor	%xmm5,%xmm6
+	psllq	$1,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$1,%xmm3
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm1,%xmm9
+	psrlq	$1,%xmm1
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm2,%xmm1
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm1
+	pand	%xmm7,%xmm15
+	pxor	%xmm1,%xmm2
+	psllq	$1,%xmm1
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm1
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm4,%xmm9
+	psrlq	$2,%xmm4
+	movdqa	%xmm3,%xmm10
+	psrlq	$2,%xmm3
+	pxor	%xmm6,%xmm4
+	pxor	%xmm5,%xmm3
+	pand	%xmm8,%xmm4
+	pand	%xmm8,%xmm3
+	pxor	%xmm4,%xmm6
+	psllq	$2,%xmm4
+	pxor	%xmm3,%xmm5
+	psllq	$2,%xmm3
+	pxor	%xmm9,%xmm4
+	pxor	%xmm10,%xmm3
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm2,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm2
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm2,%xmm9
+	psrlq	$4,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$4,%xmm1
+	pxor	%xmm6,%xmm2
+	pxor	%xmm5,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm6
+	psllq	$4,%xmm2
+	pxor	%xmm1,%xmm5
+	psllq	$4,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm4
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm3
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	decl	%r10d
+	jmp	L$dec_sbox
+.p2align	4
+L$dec_loop:
+	pxor	0(%rax),%xmm15
+	pxor	16(%rax),%xmm0
+	pxor	32(%rax),%xmm1
+	pxor	48(%rax),%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	64(%rax),%xmm3
+	pxor	80(%rax),%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	96(%rax),%xmm5
+	pxor	112(%rax),%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	128(%rax),%rax
+L$dec_sbox:
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm6,%xmm3
+	pxor	%xmm6,%xmm1
+	pxor	%xmm3,%xmm5
+	pxor	%xmm5,%xmm6
+	pxor	%xmm6,%xmm0
+
+	pxor	%xmm0,%xmm15
+	pxor	%xmm4,%xmm1
+	pxor	%xmm15,%xmm2
+	pxor	%xmm15,%xmm4
+	pxor	%xmm2,%xmm0
+	movdqa	%xmm2,%xmm10
+	movdqa	%xmm6,%xmm9
+	movdqa	%xmm0,%xmm8
+	movdqa	%xmm3,%xmm12
+	movdqa	%xmm4,%xmm11
+
+	pxor	%xmm15,%xmm10
+	pxor	%xmm3,%xmm9
+	pxor	%xmm5,%xmm8
+	movdqa	%xmm10,%xmm13
+	pxor	%xmm15,%xmm12
+	movdqa	%xmm9,%xmm7
+	pxor	%xmm1,%xmm11
+	movdqa	%xmm10,%xmm14
+
+	por	%xmm8,%xmm9
+	por	%xmm11,%xmm10
+	pxor	%xmm7,%xmm14
+	pand	%xmm11,%xmm13
+	pxor	%xmm8,%xmm11
+	pand	%xmm8,%xmm7
+	pand	%xmm11,%xmm14
+	movdqa	%xmm5,%xmm11
+	pxor	%xmm1,%xmm11
+	pand	%xmm11,%xmm12
+	pxor	%xmm12,%xmm10
+	pxor	%xmm12,%xmm9
+	movdqa	%xmm2,%xmm12
+	movdqa	%xmm0,%xmm11
+	pxor	%xmm6,%xmm12
+	pxor	%xmm4,%xmm11
+	movdqa	%xmm12,%xmm8
+	pand	%xmm11,%xmm12
+	por	%xmm11,%xmm8
+	pxor	%xmm12,%xmm7
+	pxor	%xmm14,%xmm10
+	pxor	%xmm13,%xmm9
+	pxor	%xmm14,%xmm8
+	movdqa	%xmm3,%xmm11
+	pxor	%xmm13,%xmm7
+	movdqa	%xmm15,%xmm12
+	pxor	%xmm13,%xmm8
+	movdqa	%xmm6,%xmm13
+	pand	%xmm5,%xmm11
+	movdqa	%xmm2,%xmm14
+	pand	%xmm1,%xmm12
+	pand	%xmm0,%xmm13
+	por	%xmm4,%xmm14
+	pxor	%xmm11,%xmm10
+	pxor	%xmm12,%xmm9
+	pxor	%xmm13,%xmm8
+	pxor	%xmm14,%xmm7
+
+
+
+
+
+	movdqa	%xmm10,%xmm11
+	pand	%xmm8,%xmm10
+	pxor	%xmm9,%xmm11
+
+	movdqa	%xmm7,%xmm13
+	movdqa	%xmm11,%xmm14
+	pxor	%xmm10,%xmm13
+	pand	%xmm13,%xmm14
+
+	movdqa	%xmm8,%xmm12
+	pxor	%xmm9,%xmm14
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm9,%xmm10
+
+	pand	%xmm10,%xmm12
+
+	movdqa	%xmm13,%xmm9
+	pxor	%xmm7,%xmm12
+
+	pxor	%xmm12,%xmm9
+	pxor	%xmm12,%xmm8
+
+	pand	%xmm7,%xmm9
+
+	pxor	%xmm9,%xmm13
+	pxor	%xmm9,%xmm8
+
+	pand	%xmm14,%xmm13
+
+	pxor	%xmm11,%xmm13
+	movdqa	%xmm4,%xmm11
+	movdqa	%xmm0,%xmm7
+	movdqa	%xmm14,%xmm9
+	pxor	%xmm13,%xmm9
+	pand	%xmm4,%xmm9
+	pxor	%xmm0,%xmm4
+	pand	%xmm14,%xmm0
+	pand	%xmm13,%xmm4
+	pxor	%xmm0,%xmm4
+	pxor	%xmm9,%xmm0
+	pxor	%xmm1,%xmm11
+	pxor	%xmm5,%xmm7
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm1,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm5,%xmm1
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm5
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm1
+	pxor	%xmm11,%xmm7
+	pxor	%xmm5,%xmm1
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm5
+	pxor	%xmm11,%xmm4
+	pxor	%xmm11,%xmm1
+	pxor	%xmm7,%xmm0
+	pxor	%xmm7,%xmm5
+
+	movdqa	%xmm2,%xmm11
+	movdqa	%xmm6,%xmm7
+	pxor	%xmm15,%xmm11
+	pxor	%xmm3,%xmm7
+	movdqa	%xmm14,%xmm10
+	movdqa	%xmm12,%xmm9
+	pxor	%xmm13,%xmm10
+	pxor	%xmm8,%xmm9
+	pand	%xmm11,%xmm10
+	pand	%xmm15,%xmm9
+	pxor	%xmm7,%xmm11
+	pxor	%xmm3,%xmm15
+	pand	%xmm14,%xmm7
+	pand	%xmm12,%xmm3
+	pand	%xmm13,%xmm11
+	pand	%xmm8,%xmm15
+	pxor	%xmm11,%xmm7
+	pxor	%xmm3,%xmm15
+	pxor	%xmm10,%xmm11
+	pxor	%xmm9,%xmm3
+	pxor	%xmm12,%xmm14
+	pxor	%xmm8,%xmm13
+	movdqa	%xmm14,%xmm10
+	pxor	%xmm13,%xmm10
+	pand	%xmm2,%xmm10
+	pxor	%xmm6,%xmm2
+	pand	%xmm14,%xmm6
+	pand	%xmm13,%xmm2
+	pxor	%xmm6,%xmm2
+	pxor	%xmm10,%xmm6
+	pxor	%xmm11,%xmm2
+	pxor	%xmm11,%xmm15
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm3
+	pxor	%xmm6,%xmm0
+	pxor	%xmm4,%xmm5
+
+	pxor	%xmm0,%xmm3
+	pxor	%xmm6,%xmm1
+	pxor	%xmm6,%xmm4
+	pxor	%xmm1,%xmm3
+	pxor	%xmm15,%xmm6
+	pxor	%xmm4,%xmm3
+	pxor	%xmm5,%xmm2
+	pxor	%xmm0,%xmm5
+	pxor	%xmm3,%xmm2
+
+	pxor	%xmm15,%xmm3
+	pxor	%xmm2,%xmm6
+	decl	%r10d
+	jl	L$dec_done
+
+	pshufd	$78,%xmm15,%xmm7
+	pshufd	$78,%xmm2,%xmm13
+	pxor	%xmm15,%xmm7
+	pshufd	$78,%xmm4,%xmm14
+	pxor	%xmm2,%xmm13
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm4,%xmm14
+	pshufd	$78,%xmm5,%xmm9
+	pxor	%xmm0,%xmm8
+	pshufd	$78,%xmm3,%xmm10
+	pxor	%xmm5,%xmm9
+	pxor	%xmm13,%xmm15
+	pxor	%xmm13,%xmm0
+	pshufd	$78,%xmm1,%xmm11
+	pxor	%xmm3,%xmm10
+	pxor	%xmm7,%xmm5
+	pxor	%xmm8,%xmm3
+	pshufd	$78,%xmm6,%xmm12
+	pxor	%xmm1,%xmm11
+	pxor	%xmm14,%xmm0
+	pxor	%xmm9,%xmm1
+	pxor	%xmm6,%xmm12
+
+	pxor	%xmm14,%xmm5
+	pxor	%xmm13,%xmm3
+	pxor	%xmm13,%xmm1
+	pxor	%xmm10,%xmm6
+	pxor	%xmm11,%xmm2
+	pxor	%xmm14,%xmm1
+	pxor	%xmm14,%xmm6
+	pxor	%xmm12,%xmm4
+	pshufd	$147,%xmm15,%xmm7
+	pshufd	$147,%xmm0,%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$147,%xmm5,%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$147,%xmm3,%xmm10
+	pxor	%xmm9,%xmm5
+	pshufd	$147,%xmm1,%xmm11
+	pxor	%xmm10,%xmm3
+	pshufd	$147,%xmm6,%xmm12
+	pxor	%xmm11,%xmm1
+	pshufd	$147,%xmm2,%xmm13
+	pxor	%xmm12,%xmm6
+	pshufd	$147,%xmm4,%xmm14
+	pxor	%xmm13,%xmm2
+	pxor	%xmm14,%xmm4
+
+	pxor	%xmm15,%xmm8
+	pxor	%xmm4,%xmm7
+	pxor	%xmm4,%xmm8
+	pshufd	$78,%xmm15,%xmm15
+	pxor	%xmm0,%xmm9
+	pshufd	$78,%xmm0,%xmm0
+	pxor	%xmm1,%xmm12
+	pxor	%xmm7,%xmm15
+	pxor	%xmm6,%xmm13
+	pxor	%xmm8,%xmm0
+	pxor	%xmm3,%xmm11
+	pshufd	$78,%xmm1,%xmm7
+	pxor	%xmm2,%xmm14
+	pshufd	$78,%xmm6,%xmm8
+	pxor	%xmm5,%xmm10
+	pshufd	$78,%xmm3,%xmm1
+	pxor	%xmm4,%xmm10
+	pshufd	$78,%xmm4,%xmm6
+	pxor	%xmm4,%xmm11
+	pshufd	$78,%xmm2,%xmm3
+	pxor	%xmm11,%xmm7
+	pshufd	$78,%xmm5,%xmm2
+	pxor	%xmm12,%xmm8
+	pxor	%xmm1,%xmm10
+	pxor	%xmm14,%xmm6
+	pxor	%xmm3,%xmm13
+	movdqa	%xmm7,%xmm3
+	pxor	%xmm9,%xmm2
+	movdqa	%xmm13,%xmm5
+	movdqa	%xmm8,%xmm4
+	movdqa	%xmm2,%xmm1
+	movdqa	%xmm10,%xmm2
+	movdqa	-16(%r11),%xmm7
+	jnz	L$dec_loop
+	movdqa	-32(%r11),%xmm7
+	jmp	L$dec_loop
+.p2align	4
+L$dec_done:
+	movdqa	0(%r11),%xmm7
+	movdqa	16(%r11),%xmm8
+	movdqa	%xmm2,%xmm9
+	psrlq	$1,%xmm2
+	movdqa	%xmm1,%xmm10
+	psrlq	$1,%xmm1
+	pxor	%xmm4,%xmm2
+	pxor	%xmm6,%xmm1
+	pand	%xmm7,%xmm2
+	pand	%xmm7,%xmm1
+	pxor	%xmm2,%xmm4
+	psllq	$1,%xmm2
+	pxor	%xmm1,%xmm6
+	psllq	$1,%xmm1
+	pxor	%xmm9,%xmm2
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm5,%xmm9
+	psrlq	$1,%xmm5
+	movdqa	%xmm15,%xmm10
+	psrlq	$1,%xmm15
+	pxor	%xmm3,%xmm5
+	pxor	%xmm0,%xmm15
+	pand	%xmm7,%xmm5
+	pand	%xmm7,%xmm15
+	pxor	%xmm5,%xmm3
+	psllq	$1,%xmm5
+	pxor	%xmm15,%xmm0
+	psllq	$1,%xmm15
+	pxor	%xmm9,%xmm5
+	pxor	%xmm10,%xmm15
+	movdqa	32(%r11),%xmm7
+	movdqa	%xmm6,%xmm9
+	psrlq	$2,%xmm6
+	movdqa	%xmm1,%xmm10
+	psrlq	$2,%xmm1
+	pxor	%xmm4,%xmm6
+	pxor	%xmm2,%xmm1
+	pand	%xmm8,%xmm6
+	pand	%xmm8,%xmm1
+	pxor	%xmm6,%xmm4
+	psllq	$2,%xmm6
+	pxor	%xmm1,%xmm2
+	psllq	$2,%xmm1
+	pxor	%xmm9,%xmm6
+	pxor	%xmm10,%xmm1
+	movdqa	%xmm0,%xmm9
+	psrlq	$2,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$2,%xmm15
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm15
+	pand	%xmm8,%xmm0
+	pand	%xmm8,%xmm15
+	pxor	%xmm0,%xmm3
+	psllq	$2,%xmm0
+	pxor	%xmm15,%xmm5
+	psllq	$2,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	%xmm3,%xmm9
+	psrlq	$4,%xmm3
+	movdqa	%xmm5,%xmm10
+	psrlq	$4,%xmm5
+	pxor	%xmm4,%xmm3
+	pxor	%xmm2,%xmm5
+	pand	%xmm7,%xmm3
+	pand	%xmm7,%xmm5
+	pxor	%xmm3,%xmm4
+	psllq	$4,%xmm3
+	pxor	%xmm5,%xmm2
+	psllq	$4,%xmm5
+	pxor	%xmm9,%xmm3
+	pxor	%xmm10,%xmm5
+	movdqa	%xmm0,%xmm9
+	psrlq	$4,%xmm0
+	movdqa	%xmm15,%xmm10
+	psrlq	$4,%xmm15
+	pxor	%xmm6,%xmm0
+	pxor	%xmm1,%xmm15
+	pand	%xmm7,%xmm0
+	pand	%xmm7,%xmm15
+	pxor	%xmm0,%xmm6
+	psllq	$4,%xmm0
+	pxor	%xmm15,%xmm1
+	psllq	$4,%xmm15
+	pxor	%xmm9,%xmm0
+	pxor	%xmm10,%xmm15
+	movdqa	(%rax),%xmm7
+	pxor	%xmm7,%xmm5
+	pxor	%xmm7,%xmm3
+	pxor	%xmm7,%xmm1
+	pxor	%xmm7,%xmm6
+	pxor	%xmm7,%xmm2
+	pxor	%xmm7,%xmm4
+	pxor	%xmm7,%xmm15
+	pxor	%xmm7,%xmm0
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+_bsaes_key_convert:
+	leaq	L$masks(%rip),%r11
+	movdqu	(%rcx),%xmm7
+	leaq	16(%rcx),%rcx
+	movdqa	0(%r11),%xmm0
+	movdqa	16(%r11),%xmm1
+	movdqa	32(%r11),%xmm2
+	movdqa	48(%r11),%xmm3
+	movdqa	64(%r11),%xmm4
+	pcmpeqd	%xmm5,%xmm5
+
+	movdqu	(%rcx),%xmm6
+	movdqa	%xmm7,(%rax)
+	leaq	16(%rax),%rax
+	decl	%r10d
+	jmp	L$key_loop
+.p2align	4
+L$key_loop:
+.byte	102,15,56,0,244
+
+	movdqa	%xmm0,%xmm8
+	movdqa	%xmm1,%xmm9
+
+	pand	%xmm6,%xmm8
+	pand	%xmm6,%xmm9
+	movdqa	%xmm2,%xmm10
+	pcmpeqb	%xmm0,%xmm8
+	psllq	$4,%xmm0
+	movdqa	%xmm3,%xmm11
+	pcmpeqb	%xmm1,%xmm9
+	psllq	$4,%xmm1
+
+	pand	%xmm6,%xmm10
+	pand	%xmm6,%xmm11
+	movdqa	%xmm0,%xmm12
+	pcmpeqb	%xmm2,%xmm10
+	psllq	$4,%xmm2
+	movdqa	%xmm1,%xmm13
+	pcmpeqb	%xmm3,%xmm11
+	psllq	$4,%xmm3
+
+	movdqa	%xmm2,%xmm14
+	movdqa	%xmm3,%xmm15
+	pxor	%xmm5,%xmm8
+	pxor	%xmm5,%xmm9
+
+	pand	%xmm6,%xmm12
+	pand	%xmm6,%xmm13
+	movdqa	%xmm8,0(%rax)
+	pcmpeqb	%xmm0,%xmm12
+	psrlq	$4,%xmm0
+	movdqa	%xmm9,16(%rax)
+	pcmpeqb	%xmm1,%xmm13
+	psrlq	$4,%xmm1
+	leaq	16(%rcx),%rcx
+
+	pand	%xmm6,%xmm14
+	pand	%xmm6,%xmm15
+	movdqa	%xmm10,32(%rax)
+	pcmpeqb	%xmm2,%xmm14
+	psrlq	$4,%xmm2
+	movdqa	%xmm11,48(%rax)
+	pcmpeqb	%xmm3,%xmm15
+	psrlq	$4,%xmm3
+	movdqu	(%rcx),%xmm6
+
+	pxor	%xmm5,%xmm13
+	pxor	%xmm5,%xmm14
+	movdqa	%xmm12,64(%rax)
+	movdqa	%xmm13,80(%rax)
+	movdqa	%xmm14,96(%rax)
+	movdqa	%xmm15,112(%rax)
+	leaq	128(%rax),%rax
+	decl	%r10d
+	jnz	L$key_loop
+
+	movdqa	80(%r11),%xmm7
+
+	.byte	0xf3,0xc3
+
+
+.globl	_bsaes_cbc_encrypt
+.private_extern _bsaes_cbc_encrypt
+
+.p2align	4
+_bsaes_cbc_encrypt:
+	cmpl	$0,%r9d
+	jne	_asm_AES_cbc_encrypt
+	cmpq	$128,%rdx
+	jb	_asm_AES_cbc_encrypt
+
+	movq	%rsp,%rax
+L$cbc_dec_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movl	240(%rcx),%eax
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	movq	%r8,%rbx
+	shrq	$4,%r14
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	(%rsp),%xmm7
+	movdqa	%xmm6,(%rax)
+	movdqa	%xmm7,(%rsp)
+
+	movdqu	(%rbx),%xmm14
+	subq	$8,%r14
+L$cbc_dec_loop:
+	movdqu	0(%r12),%xmm15
+	movdqu	16(%r12),%xmm0
+	movdqu	32(%r12),%xmm1
+	movdqu	48(%r12),%xmm2
+	movdqu	64(%r12),%xmm3
+	movdqu	80(%r12),%xmm4
+	movq	%rsp,%rax
+	movdqu	96(%r12),%xmm5
+	movl	%edx,%r10d
+	movdqu	112(%r12),%xmm6
+	movdqa	%xmm14,32(%rbp)
+
+	call	_bsaes_decrypt8
+
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm6
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm2
+	movdqu	112(%r12),%xmm14
+	pxor	%xmm13,%xmm4
+	movdqu	%xmm15,0(%r13)
+	leaq	128(%r12),%r12
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+	subq	$8,%r14
+	jnc	L$cbc_dec_loop
+
+	addq	$8,%r14
+	jz	L$cbc_dec_done
+
+	movdqu	0(%r12),%xmm15
+	movq	%rsp,%rax
+	movl	%edx,%r10d
+	cmpq	$2,%r14
+	jb	L$cbc_dec_one
+	movdqu	16(%r12),%xmm0
+	je	L$cbc_dec_two
+	movdqu	32(%r12),%xmm1
+	cmpq	$4,%r14
+	jb	L$cbc_dec_three
+	movdqu	48(%r12),%xmm2
+	je	L$cbc_dec_four
+	movdqu	64(%r12),%xmm3
+	cmpq	$6,%r14
+	jb	L$cbc_dec_five
+	movdqu	80(%r12),%xmm4
+	je	L$cbc_dec_six
+	movdqu	96(%r12),%xmm5
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm6
+	movdqu	96(%r12),%xmm14
+	pxor	%xmm12,%xmm2
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_six:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm1
+	movdqu	80(%r12),%xmm14
+	pxor	%xmm11,%xmm6
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_five:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm3
+	movdqu	64(%r12),%xmm14
+	pxor	%xmm10,%xmm1
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_four:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm5
+	movdqu	48(%r12),%xmm14
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_three:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm0
+	movdqu	32(%r12),%xmm14
+	pxor	%xmm8,%xmm5
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_two:
+	movdqa	%xmm14,32(%rbp)
+	call	_bsaes_decrypt8
+	pxor	32(%rbp),%xmm15
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm14
+	pxor	%xmm7,%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	jmp	L$cbc_dec_done
+.p2align	4
+L$cbc_dec_one:
+	leaq	(%r12),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	_asm_AES_decrypt
+	pxor	32(%rbp),%xmm14
+	movdqu	%xmm14,(%r13)
+	movdqa	%xmm15,%xmm14
+
+L$cbc_dec_done:
+	movdqu	%xmm14,(%rbx)
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+L$cbc_dec_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	L$cbc_dec_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+L$cbc_dec_epilogue:
+	.byte	0xf3,0xc3
+
+
+.globl	_bsaes_ctr32_encrypt_blocks
+.private_extern _bsaes_ctr32_encrypt_blocks
+
+.p2align	4
+_bsaes_ctr32_encrypt_blocks:
+	movq	%rsp,%rax
+L$ctr_enc_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movdqu	(%r8),%xmm0
+	movl	240(%rcx),%eax
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	movdqa	%xmm0,32(%rbp)
+	cmpq	$8,%rdx
+	jb	L$ctr_enc_short
+
+	movl	%eax,%ebx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%ebx,%r10d
+	call	_bsaes_key_convert
+	pxor	%xmm6,%xmm7
+	movdqa	%xmm7,(%rax)
+
+	movdqa	(%rsp),%xmm8
+	leaq	L$ADD1(%rip),%r11
+	movdqa	32(%rbp),%xmm15
+	movdqa	-32(%r11),%xmm7
+.byte	102,68,15,56,0,199
+.byte	102,68,15,56,0,255
+	movdqa	%xmm8,(%rsp)
+	jmp	L$ctr_enc_loop
+.p2align	4
+L$ctr_enc_loop:
+	movdqa	%xmm15,32(%rbp)
+	movdqa	%xmm15,%xmm0
+	movdqa	%xmm15,%xmm1
+	paddd	0(%r11),%xmm0
+	movdqa	%xmm15,%xmm2
+	paddd	16(%r11),%xmm1
+	movdqa	%xmm15,%xmm3
+	paddd	32(%r11),%xmm2
+	movdqa	%xmm15,%xmm4
+	paddd	48(%r11),%xmm3
+	movdqa	%xmm15,%xmm5
+	paddd	64(%r11),%xmm4
+	movdqa	%xmm15,%xmm6
+	paddd	80(%r11),%xmm5
+	paddd	96(%r11),%xmm6
+
+
+
+	movdqa	(%rsp),%xmm8
+	leaq	16(%rsp),%rax
+	movdqa	-16(%r11),%xmm7
+	pxor	%xmm8,%xmm15
+	pxor	%xmm8,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm8,%xmm2
+.byte	102,68,15,56,0,255
+.byte	102,15,56,0,199
+	pxor	%xmm8,%xmm3
+	pxor	%xmm8,%xmm4
+.byte	102,15,56,0,207
+.byte	102,15,56,0,215
+	pxor	%xmm8,%xmm5
+	pxor	%xmm8,%xmm6
+.byte	102,15,56,0,223
+.byte	102,15,56,0,231
+.byte	102,15,56,0,239
+.byte	102,15,56,0,247
+	leaq	L$BS0(%rip),%r11
+	movl	%ebx,%r10d
+
+	call	_bsaes_encrypt8_bitslice
+
+	subq	$8,%r14
+	jc	L$ctr_enc_loop_done
+
+	movdqu	0(%r12),%xmm7
+	movdqu	16(%r12),%xmm8
+	movdqu	32(%r12),%xmm9
+	movdqu	48(%r12),%xmm10
+	movdqu	64(%r12),%xmm11
+	movdqu	80(%r12),%xmm12
+	movdqu	96(%r12),%xmm13
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	pxor	%xmm15,%xmm7
+	movdqa	32(%rbp),%xmm15
+	pxor	%xmm8,%xmm0
+	movdqu	%xmm7,0(%r13)
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	%xmm10,%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	%xmm11,%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	%xmm12,%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	%xmm13,%xmm1
+	movdqu	%xmm6,80(%r13)
+	pxor	%xmm14,%xmm4
+	movdqu	%xmm1,96(%r13)
+	leaq	L$ADD1(%rip),%r11
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+	paddd	112(%r11),%xmm15
+	jnz	L$ctr_enc_loop
+
+	jmp	L$ctr_enc_done
+.p2align	4
+L$ctr_enc_loop_done:
+	addq	$8,%r14
+	movdqu	0(%r12),%xmm7
+	pxor	%xmm7,%xmm15
+	movdqu	%xmm15,0(%r13)
+	cmpq	$2,%r14
+	jb	L$ctr_enc_done
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm8,%xmm0
+	movdqu	%xmm0,16(%r13)
+	je	L$ctr_enc_done
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm9,%xmm3
+	movdqu	%xmm3,32(%r13)
+	cmpq	$4,%r14
+	jb	L$ctr_enc_done
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm10,%xmm5
+	movdqu	%xmm5,48(%r13)
+	je	L$ctr_enc_done
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm11,%xmm2
+	movdqu	%xmm2,64(%r13)
+	cmpq	$6,%r14
+	jb	L$ctr_enc_done
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm12,%xmm6
+	movdqu	%xmm6,80(%r13)
+	je	L$ctr_enc_done
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm13,%xmm1
+	movdqu	%xmm1,96(%r13)
+	jmp	L$ctr_enc_done
+
+.p2align	4
+L$ctr_enc_short:
+	leaq	32(%rbp),%rdi
+	leaq	48(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	_asm_AES_encrypt
+	movdqu	(%r12),%xmm0
+	leaq	16(%r12),%r12
+	movl	44(%rbp),%eax
+	bswapl	%eax
+	pxor	48(%rbp),%xmm0
+	incl	%eax
+	movdqu	%xmm0,(%r13)
+	bswapl	%eax
+	leaq	16(%r13),%r13
+	movl	%eax,44(%rsp)
+	decq	%r14
+	jnz	L$ctr_enc_short
+
+L$ctr_enc_done:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+L$ctr_enc_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	L$ctr_enc_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+L$ctr_enc_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_bsaes_xts_encrypt
+.private_extern _bsaes_xts_encrypt
+
+.p2align	4
+_bsaes_xts_encrypt:
+	movq	%rsp,%rax
+L$xts_enc_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+
+	leaq	(%r9),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r8),%rdx
+	call	_asm_AES_encrypt
+
+	movl	240(%r15),%eax
+	movq	%r14,%rbx
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	%xmm6,%xmm7
+	movdqa	%xmm7,(%rax)
+
+	andq	$-16,%r14
+	subq	$128,%rsp
+	movdqa	32(%rbp),%xmm6
+
+	pxor	%xmm14,%xmm14
+	movdqa	L$xts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+
+	subq	$128,%r14
+	jc	L$xts_enc_short
+	jmp	L$xts_enc_loop
+
+.p2align	4
+L$xts_enc_loop:
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	movdqa	%xmm6,112(%rsp)
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	pxor	%xmm14,%xmm6
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	96(%rsp),%xmm1
+	movdqu	%xmm6,80(%r13)
+	pxor	112(%rsp),%xmm4
+	movdqu	%xmm1,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	pxor	%xmm14,%xmm14
+	movdqa	L$xts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+
+	subq	$128,%r14
+	jnc	L$xts_enc_loop
+
+L$xts_enc_short:
+	addq	$128,%r14
+	jz	L$xts_enc_done
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	cmpq	$16,%r14
+	je	L$xts_enc_1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	cmpq	$32,%r14
+	je	L$xts_enc_2
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	cmpq	$48,%r14
+	je	L$xts_enc_3
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	cmpq	$64,%r14
+	je	L$xts_enc_4
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	cmpq	$80,%r14
+	je	L$xts_enc_5
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	cmpq	$96,%r14
+	je	L$xts_enc_6
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqa	%xmm6,112(%rsp)
+	leaq	112(%r12),%r12
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	pxor	96(%rsp),%xmm1
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm1,96(%r13)
+	leaq	112(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_6:
+	pxor	%xmm11,%xmm3
+	leaq	96(%r12),%r12
+	pxor	%xmm12,%xmm4
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm2,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	leaq	96(%r13),%r13
+
+	movdqa	96(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_5:
+	pxor	%xmm10,%xmm2
+	leaq	80(%r12),%r12
+	pxor	%xmm11,%xmm3
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	pxor	64(%rsp),%xmm2
+	movdqu	%xmm5,48(%r13)
+	movdqu	%xmm2,64(%r13)
+	leaq	80(%r13),%r13
+
+	movdqa	80(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_4:
+	pxor	%xmm9,%xmm1
+	leaq	64(%r12),%r12
+	pxor	%xmm10,%xmm2
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm5
+	movdqu	%xmm3,32(%r13)
+	movdqu	%xmm5,48(%r13)
+	leaq	64(%r13),%r13
+
+	movdqa	64(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_3:
+	pxor	%xmm8,%xmm0
+	leaq	48(%r12),%r12
+	pxor	%xmm9,%xmm1
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm3
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm3,32(%r13)
+	leaq	48(%r13),%r13
+
+	movdqa	48(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_2:
+	pxor	%xmm7,%xmm15
+	leaq	32(%r12),%r12
+	pxor	%xmm8,%xmm0
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_encrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	leaq	32(%r13),%r13
+
+	movdqa	32(%rsp),%xmm6
+	jmp	L$xts_enc_done
+.p2align	4
+L$xts_enc_1:
+	pxor	%xmm15,%xmm7
+	leaq	16(%r12),%r12
+	movdqa	%xmm7,32(%rbp)
+	leaq	32(%rbp),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	_asm_AES_encrypt
+	pxor	32(%rbp),%xmm15
+
+
+
+
+
+	movdqu	%xmm15,0(%r13)
+	leaq	16(%r13),%r13
+
+	movdqa	16(%rsp),%xmm6
+
+L$xts_enc_done:
+	andl	$15,%ebx
+	jz	L$xts_enc_ret
+	movq	%r13,%rdx
+
+L$xts_enc_steal:
+	movzbl	(%r12),%eax
+	movzbl	-16(%rdx),%ecx
+	leaq	1(%r12),%r12
+	movb	%al,-16(%rdx)
+	movb	%cl,0(%rdx)
+	leaq	1(%rdx),%rdx
+	subl	$1,%ebx
+	jnz	L$xts_enc_steal
+
+	movdqu	-16(%r13),%xmm15
+	leaq	32(%rbp),%rdi
+	pxor	%xmm6,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	_asm_AES_encrypt
+	pxor	32(%rbp),%xmm6
+	movdqu	%xmm6,-16(%r13)
+
+L$xts_enc_ret:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+L$xts_enc_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	L$xts_enc_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+L$xts_enc_epilogue:
+	.byte	0xf3,0xc3
+
+
+.globl	_bsaes_xts_decrypt
+.private_extern _bsaes_xts_decrypt
+
+.p2align	4
+_bsaes_xts_decrypt:
+	movq	%rsp,%rax
+L$xts_dec_prologue:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	-72(%rsp),%rsp
+	movq	%rsp,%rbp
+	movq	%rdi,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+
+	leaq	(%r9),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r8),%rdx
+	call	_asm_AES_encrypt
+
+	movl	240(%r15),%eax
+	movq	%r14,%rbx
+
+	movl	%eax,%edx
+	shlq	$7,%rax
+	subq	$96,%rax
+	subq	%rax,%rsp
+
+	movq	%rsp,%rax
+	movq	%r15,%rcx
+	movl	%edx,%r10d
+	call	_bsaes_key_convert
+	pxor	(%rsp),%xmm7
+	movdqa	%xmm6,(%rax)
+	movdqa	%xmm7,(%rsp)
+
+	xorl	%eax,%eax
+	andq	$-16,%r14
+	testl	$15,%ebx
+	setnz	%al
+	shlq	$4,%rax
+	subq	%rax,%r14
+
+	subq	$128,%rsp
+	movdqa	32(%rbp),%xmm6
+
+	pxor	%xmm14,%xmm14
+	movdqa	L$xts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+
+	subq	$128,%r14
+	jc	L$xts_dec_short
+	jmp	L$xts_dec_loop
+
+.p2align	4
+L$xts_dec_loop:
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqu	112(%r12),%xmm14
+	leaq	128(%r12),%r12
+	movdqa	%xmm6,112(%rsp)
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	pxor	%xmm14,%xmm6
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	pxor	96(%rsp),%xmm2
+	movdqu	%xmm6,80(%r13)
+	pxor	112(%rsp),%xmm4
+	movdqu	%xmm2,96(%r13)
+	movdqu	%xmm4,112(%r13)
+	leaq	128(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	pxor	%xmm14,%xmm14
+	movdqa	L$xts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+
+	subq	$128,%r14
+	jnc	L$xts_dec_loop
+
+L$xts_dec_short:
+	addq	$128,%r14
+	jz	L$xts_dec_done
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm15
+	movdqa	%xmm6,0(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm0
+	movdqa	%xmm6,16(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	0(%r12),%xmm7
+	cmpq	$16,%r14
+	je	L$xts_dec_1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm1
+	movdqa	%xmm6,32(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	16(%r12),%xmm8
+	cmpq	$32,%r14
+	je	L$xts_dec_2
+	pxor	%xmm7,%xmm15
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm2
+	movdqa	%xmm6,48(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	32(%r12),%xmm9
+	cmpq	$48,%r14
+	je	L$xts_dec_3
+	pxor	%xmm8,%xmm0
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm3
+	movdqa	%xmm6,64(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	48(%r12),%xmm10
+	cmpq	$64,%r14
+	je	L$xts_dec_4
+	pxor	%xmm9,%xmm1
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm4
+	movdqa	%xmm6,80(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	64(%r12),%xmm11
+	cmpq	$80,%r14
+	je	L$xts_dec_5
+	pxor	%xmm10,%xmm2
+	pshufd	$19,%xmm14,%xmm13
+	pxor	%xmm14,%xmm14
+	movdqa	%xmm6,%xmm5
+	movdqa	%xmm6,96(%rsp)
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	pcmpgtd	%xmm6,%xmm14
+	pxor	%xmm13,%xmm6
+	movdqu	80(%r12),%xmm12
+	cmpq	$96,%r14
+	je	L$xts_dec_6
+	pxor	%xmm11,%xmm3
+	movdqu	96(%r12),%xmm13
+	pxor	%xmm12,%xmm4
+	movdqa	%xmm6,112(%rsp)
+	leaq	112(%r12),%r12
+	pxor	%xmm13,%xmm5
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	pxor	96(%rsp),%xmm2
+	movdqu	%xmm6,80(%r13)
+	movdqu	%xmm2,96(%r13)
+	leaq	112(%r13),%r13
+
+	movdqa	112(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_6:
+	pxor	%xmm11,%xmm3
+	leaq	96(%r12),%r12
+	pxor	%xmm12,%xmm4
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	pxor	80(%rsp),%xmm6
+	movdqu	%xmm1,64(%r13)
+	movdqu	%xmm6,80(%r13)
+	leaq	96(%r13),%r13
+
+	movdqa	96(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_5:
+	pxor	%xmm10,%xmm2
+	leaq	80(%r12),%r12
+	pxor	%xmm11,%xmm3
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	pxor	64(%rsp),%xmm1
+	movdqu	%xmm3,48(%r13)
+	movdqu	%xmm1,64(%r13)
+	leaq	80(%r13),%r13
+
+	movdqa	80(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_4:
+	pxor	%xmm9,%xmm1
+	leaq	64(%r12),%r12
+	pxor	%xmm10,%xmm2
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	pxor	48(%rsp),%xmm3
+	movdqu	%xmm5,32(%r13)
+	movdqu	%xmm3,48(%r13)
+	leaq	64(%r13),%r13
+
+	movdqa	64(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_3:
+	pxor	%xmm8,%xmm0
+	leaq	48(%r12),%r12
+	pxor	%xmm9,%xmm1
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	pxor	32(%rsp),%xmm5
+	movdqu	%xmm0,16(%r13)
+	movdqu	%xmm5,32(%r13)
+	leaq	48(%r13),%r13
+
+	movdqa	48(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_2:
+	pxor	%xmm7,%xmm15
+	leaq	32(%r12),%r12
+	pxor	%xmm8,%xmm0
+	leaq	128(%rsp),%rax
+	movl	%edx,%r10d
+
+	call	_bsaes_decrypt8
+
+	pxor	0(%rsp),%xmm15
+	pxor	16(%rsp),%xmm0
+	movdqu	%xmm15,0(%r13)
+	movdqu	%xmm0,16(%r13)
+	leaq	32(%r13),%r13
+
+	movdqa	32(%rsp),%xmm6
+	jmp	L$xts_dec_done
+.p2align	4
+L$xts_dec_1:
+	pxor	%xmm15,%xmm7
+	leaq	16(%r12),%r12
+	movdqa	%xmm7,32(%rbp)
+	leaq	32(%rbp),%rdi
+	leaq	32(%rbp),%rsi
+	leaq	(%r15),%rdx
+	call	_asm_AES_decrypt
+	pxor	32(%rbp),%xmm15
+
+
+
+
+
+	movdqu	%xmm15,0(%r13)
+	leaq	16(%r13),%r13
+
+	movdqa	16(%rsp),%xmm6
+
+L$xts_dec_done:
+	andl	$15,%ebx
+	jz	L$xts_dec_ret
+
+	pxor	%xmm14,%xmm14
+	movdqa	L$xts_magic(%rip),%xmm12
+	pcmpgtd	%xmm6,%xmm14
+	pshufd	$19,%xmm14,%xmm13
+	movdqa	%xmm6,%xmm5
+	paddq	%xmm6,%xmm6
+	pand	%xmm12,%xmm13
+	movdqu	(%r12),%xmm15
+	pxor	%xmm13,%xmm6
+
+	leaq	32(%rbp),%rdi
+	pxor	%xmm6,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	_asm_AES_decrypt
+	pxor	32(%rbp),%xmm6
+	movq	%r13,%rdx
+	movdqu	%xmm6,(%r13)
+
+L$xts_dec_steal:
+	movzbl	16(%r12),%eax
+	movzbl	(%rdx),%ecx
+	leaq	1(%r12),%r12
+	movb	%al,(%rdx)
+	movb	%cl,16(%rdx)
+	leaq	1(%rdx),%rdx
+	subl	$1,%ebx
+	jnz	L$xts_dec_steal
+
+	movdqu	(%r13),%xmm15
+	leaq	32(%rbp),%rdi
+	pxor	%xmm5,%xmm15
+	leaq	32(%rbp),%rsi
+	movdqa	%xmm15,32(%rbp)
+	leaq	(%r15),%rdx
+	call	_asm_AES_decrypt
+	pxor	32(%rbp),%xmm5
+	movdqu	%xmm5,(%r13)
+
+L$xts_dec_ret:
+	leaq	(%rsp),%rax
+	pxor	%xmm0,%xmm0
+L$xts_dec_bzero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	leaq	32(%rax),%rax
+	cmpq	%rax,%rbp
+	ja	L$xts_dec_bzero
+
+	leaq	(%rbp),%rsp
+	movq	72(%rsp),%r15
+	movq	80(%rsp),%r14
+	movq	88(%rsp),%r13
+	movq	96(%rsp),%r12
+	movq	104(%rsp),%rbx
+	movq	112(%rsp),%rax
+	leaq	120(%rsp),%rsp
+	movq	%rax,%rbp
+L$xts_dec_epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	6
+_bsaes_const:
+L$M0ISR:
+.quad	0x0a0e0206070b0f03, 0x0004080c0d010509
+L$ISRM0:
+.quad	0x01040b0e0205080f, 0x0306090c00070a0d
+L$ISR:
+.quad	0x0504070602010003, 0x0f0e0d0c080b0a09
+L$BS0:
+.quad	0x5555555555555555, 0x5555555555555555
+L$BS1:
+.quad	0x3333333333333333, 0x3333333333333333
+L$BS2:
+.quad	0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f
+L$SR:
+.quad	0x0504070600030201, 0x0f0e0d0c0a09080b
+L$SRM0:
+.quad	0x0304090e00050a0f, 0x01060b0c0207080d
+L$M0SR:
+.quad	0x0a0e02060f03070b, 0x0004080c05090d01
+L$SWPUP:
+.quad	0x0706050403020100, 0x0c0d0e0f0b0a0908
+L$SWPUPM0SR:
+.quad	0x0a0d02060c03070b, 0x0004080f05090e01
+L$ADD1:
+.quad	0x0000000000000000, 0x0000000100000000
+L$ADD2:
+.quad	0x0000000000000000, 0x0000000200000000
+L$ADD3:
+.quad	0x0000000000000000, 0x0000000300000000
+L$ADD4:
+.quad	0x0000000000000000, 0x0000000400000000
+L$ADD5:
+.quad	0x0000000000000000, 0x0000000500000000
+L$ADD6:
+.quad	0x0000000000000000, 0x0000000600000000
+L$ADD7:
+.quad	0x0000000000000000, 0x0000000700000000
+L$ADD8:
+.quad	0x0000000000000000, 0x0000000800000000
+L$xts_magic:
+.long	0x87,0,1,0
+L$masks:
+.quad	0x0101010101010101, 0x0101010101010101
+.quad	0x0202020202020202, 0x0202020202020202
+.quad	0x0404040404040404, 0x0404040404040404
+.quad	0x0808080808080808, 0x0808080808080808
+L$M0:
+.quad	0x02060a0e03070b0f, 0x0004080c0105090d
+L$63:
+.quad	0x6363636363636363, 0x6363636363636363
+.byte	66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44,32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32,65,110,100,121,32,80,111,108,121,97,107,111,118,0
+.p2align	6
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S
new file mode 100644
index 0000000..711ea43
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/aes/vpaes-x86_64.S
@@ -0,0 +1,834 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_encrypt_core:
+	movq	%rdx,%r9
+	movq	$16,%r11
+	movl	240(%rdx),%eax
+	movdqa	%xmm9,%xmm1
+	movdqa	L$k_ipt(%rip),%xmm2
+	pandn	%xmm0,%xmm1
+	movdqu	(%r9),%xmm5
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	L$k_ipt+16(%rip),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm5,%xmm2
+	addq	$16,%r9
+	pxor	%xmm2,%xmm0
+	leaq	L$k_mc_backward(%rip),%r10
+	jmp	L$enc_entry
+
+.p2align	4
+L$enc_loop:
+
+	movdqa	%xmm13,%xmm4
+	movdqa	%xmm12,%xmm0
+.byte	102,15,56,0,226
+.byte	102,15,56,0,195
+	pxor	%xmm5,%xmm4
+	movdqa	%xmm15,%xmm5
+	pxor	%xmm4,%xmm0
+	movdqa	-64(%r11,%r10,1),%xmm1
+.byte	102,15,56,0,234
+	movdqa	(%r11,%r10,1),%xmm4
+	movdqa	%xmm14,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm0,%xmm3
+	pxor	%xmm5,%xmm2
+.byte	102,15,56,0,193
+	addq	$16,%r9
+	pxor	%xmm2,%xmm0
+.byte	102,15,56,0,220
+	addq	$16,%r11
+	pxor	%xmm0,%xmm3
+.byte	102,15,56,0,193
+	andq	$48,%r11
+	subq	$1,%rax
+	pxor	%xmm3,%xmm0
+
+L$enc_entry:
+
+	movdqa	%xmm9,%xmm1
+	movdqa	%xmm11,%xmm5
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,232
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm10,%xmm4
+	pxor	%xmm5,%xmm3
+.byte	102,15,56,0,224
+	movdqa	%xmm10,%xmm2
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,211
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%r9),%xmm5
+	pxor	%xmm1,%xmm3
+	jnz	L$enc_loop
+
+
+	movdqa	-96(%r10),%xmm4
+	movdqa	-80(%r10),%xmm0
+.byte	102,15,56,0,226
+	pxor	%xmm5,%xmm4
+.byte	102,15,56,0,195
+	movdqa	64(%r11,%r10,1),%xmm1
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,193
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_decrypt_core:
+	movq	%rdx,%r9
+	movl	240(%rdx),%eax
+	movdqa	%xmm9,%xmm1
+	movdqa	L$k_dipt(%rip),%xmm2
+	pandn	%xmm0,%xmm1
+	movq	%rax,%r11
+	psrld	$4,%xmm1
+	movdqu	(%r9),%xmm5
+	shlq	$4,%r11
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	L$k_dipt+16(%rip),%xmm0
+	xorq	$48,%r11
+	leaq	L$k_dsbd(%rip),%r10
+.byte	102,15,56,0,193
+	andq	$48,%r11
+	pxor	%xmm5,%xmm2
+	movdqa	L$k_mc_forward+48(%rip),%xmm5
+	pxor	%xmm2,%xmm0
+	addq	$16,%r9
+	addq	%r10,%r11
+	jmp	L$dec_entry
+
+.p2align	4
+L$dec_loop:
+
+
+
+	movdqa	-32(%r10),%xmm4
+	movdqa	-16(%r10),%xmm1
+.byte	102,15,56,0,226
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	0(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	16(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	32(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	48(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	movdqa	64(%r10),%xmm4
+	pxor	%xmm1,%xmm0
+	movdqa	80(%r10),%xmm1
+
+.byte	102,15,56,0,226
+.byte	102,15,56,0,197
+.byte	102,15,56,0,203
+	pxor	%xmm4,%xmm0
+	addq	$16,%r9
+.byte	102,15,58,15,237,12
+	pxor	%xmm1,%xmm0
+	subq	$1,%rax
+
+L$dec_entry:
+
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	movdqa	%xmm11,%xmm2
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+.byte	102,15,56,0,208
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,217
+	movdqa	%xmm10,%xmm4
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm10,%xmm2
+.byte	102,15,56,0,211
+	movdqa	%xmm10,%xmm3
+	pxor	%xmm0,%xmm2
+.byte	102,15,56,0,220
+	movdqu	(%r9),%xmm0
+	pxor	%xmm1,%xmm3
+	jnz	L$dec_loop
+
+
+	movdqa	96(%r10),%xmm4
+.byte	102,15,56,0,226
+	pxor	%xmm0,%xmm4
+	movdqa	112(%r10),%xmm0
+	movdqa	-352(%r11),%xmm2
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+.byte	102,15,56,0,194
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_schedule_core:
+
+
+
+
+
+	call	_vpaes_preheat
+	movdqa	L$k_rcon(%rip),%xmm8
+	movdqu	(%rdi),%xmm0
+
+
+	movdqa	%xmm0,%xmm3
+	leaq	L$k_ipt(%rip),%r11
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm7
+
+	leaq	L$k_sr(%rip),%r10
+	testq	%rcx,%rcx
+	jnz	L$schedule_am_decrypting
+
+
+	movdqu	%xmm0,(%rdx)
+	jmp	L$schedule_go
+
+L$schedule_am_decrypting:
+
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,217
+	movdqu	%xmm3,(%rdx)
+	xorq	$48,%r8
+
+L$schedule_go:
+	cmpl	$192,%esi
+	ja	L$schedule_256
+	je	L$schedule_192
+
+
+
+
+
+
+
+
+
+
+L$schedule_128:
+	movl	$10,%esi
+
+L$oop_schedule_128:
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	jmp	L$oop_schedule_128
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+L$schedule_192:
+	movdqu	8(%rdi),%xmm0
+	call	_vpaes_schedule_transform
+	movdqa	%xmm0,%xmm6
+	pxor	%xmm4,%xmm4
+	movhlps	%xmm4,%xmm6
+	movl	$4,%esi
+
+L$oop_schedule_192:
+	call	_vpaes_schedule_round
+.byte	102,15,58,15,198,8
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	jmp	L$oop_schedule_192
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+L$schedule_256:
+	movdqu	16(%rdi),%xmm0
+	call	_vpaes_schedule_transform
+	movl	$7,%esi
+
+L$oop_schedule_256:
+	call	_vpaes_schedule_mangle
+	movdqa	%xmm0,%xmm6
+
+
+	call	_vpaes_schedule_round
+	decq	%rsi
+	jz	L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+
+
+	pshufd	$255,%xmm0,%xmm0
+	movdqa	%xmm7,%xmm5
+	movdqa	%xmm6,%xmm7
+	call	_vpaes_schedule_low_round
+	movdqa	%xmm5,%xmm7
+
+	jmp	L$oop_schedule_256
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+L$schedule_mangle_last:
+
+	leaq	L$k_deskew(%rip),%r11
+	testq	%rcx,%rcx
+	jnz	L$schedule_mangle_last_dec
+
+
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,193
+	leaq	L$k_opt(%rip),%r11
+	addq	$32,%rdx
+
+L$schedule_mangle_last_dec:
+	addq	$-16,%rdx
+	pxor	L$k_s63(%rip),%xmm0
+	call	_vpaes_schedule_transform
+	movdqu	%xmm0,(%rdx)
+
+
+	pxor	%xmm0,%xmm0
+	pxor	%xmm1,%xmm1
+	pxor	%xmm2,%xmm2
+	pxor	%xmm3,%xmm3
+	pxor	%xmm4,%xmm4
+	pxor	%xmm5,%xmm5
+	pxor	%xmm6,%xmm6
+	pxor	%xmm7,%xmm7
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_schedule_192_smear:
+	pshufd	$128,%xmm6,%xmm1
+	pshufd	$254,%xmm7,%xmm0
+	pxor	%xmm1,%xmm6
+	pxor	%xmm1,%xmm1
+	pxor	%xmm0,%xmm6
+	movdqa	%xmm6,%xmm0
+	movhlps	%xmm1,%xmm6
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_schedule_round:
+
+	pxor	%xmm1,%xmm1
+.byte	102,65,15,58,15,200,15
+.byte	102,69,15,58,15,192,15
+	pxor	%xmm1,%xmm7
+
+
+	pshufd	$255,%xmm0,%xmm0
+.byte	102,15,58,15,192,1
+
+
+
+
+_vpaes_schedule_low_round:
+
+	movdqa	%xmm7,%xmm1
+	pslldq	$4,%xmm7
+	pxor	%xmm1,%xmm7
+	movdqa	%xmm7,%xmm1
+	pslldq	$8,%xmm7
+	pxor	%xmm1,%xmm7
+	pxor	L$k_s63(%rip),%xmm7
+
+
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+	movdqa	%xmm11,%xmm2
+.byte	102,15,56,0,208
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm10,%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+	movdqa	%xmm10,%xmm4
+.byte	102,15,56,0,224
+	pxor	%xmm2,%xmm4
+	movdqa	%xmm10,%xmm2
+.byte	102,15,56,0,211
+	pxor	%xmm0,%xmm2
+	movdqa	%xmm10,%xmm3
+.byte	102,15,56,0,220
+	pxor	%xmm1,%xmm3
+	movdqa	%xmm13,%xmm4
+.byte	102,15,56,0,226
+	movdqa	%xmm12,%xmm0
+.byte	102,15,56,0,195
+	pxor	%xmm4,%xmm0
+
+
+	pxor	%xmm7,%xmm0
+	movdqa	%xmm0,%xmm7
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_schedule_transform:
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm0,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm0
+	movdqa	(%r11),%xmm2
+.byte	102,15,56,0,208
+	movdqa	16(%r11),%xmm0
+.byte	102,15,56,0,193
+	pxor	%xmm2,%xmm0
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_schedule_mangle:
+	movdqa	%xmm0,%xmm4
+	movdqa	L$k_mc_forward(%rip),%xmm5
+	testq	%rcx,%rcx
+	jnz	L$schedule_mangle_dec
+
+
+	addq	$16,%rdx
+	pxor	L$k_s63(%rip),%xmm4
+.byte	102,15,56,0,229
+	movdqa	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+.byte	102,15,56,0,229
+	pxor	%xmm4,%xmm3
+
+	jmp	L$schedule_mangle_both
+.p2align	4
+L$schedule_mangle_dec:
+
+	leaq	L$k_dksd(%rip),%r11
+	movdqa	%xmm9,%xmm1
+	pandn	%xmm4,%xmm1
+	psrld	$4,%xmm1
+	pand	%xmm9,%xmm4
+
+	movdqa	0(%r11),%xmm2
+.byte	102,15,56,0,212
+	movdqa	16(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	32(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	48(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	64(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	80(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+.byte	102,15,56,0,221
+
+	movdqa	96(%r11),%xmm2
+.byte	102,15,56,0,212
+	pxor	%xmm3,%xmm2
+	movdqa	112(%r11),%xmm3
+.byte	102,15,56,0,217
+	pxor	%xmm2,%xmm3
+
+	addq	$-16,%rdx
+
+L$schedule_mangle_both:
+	movdqa	(%r8,%r10,1),%xmm1
+.byte	102,15,56,0,217
+	addq	$-16,%r8
+	andq	$48,%r8
+	movdqu	%xmm3,(%rdx)
+	.byte	0xf3,0xc3
+
+
+
+
+
+.globl	_vpaes_set_encrypt_key
+.private_extern _vpaes_set_encrypt_key
+
+.p2align	4
+_vpaes_set_encrypt_key:
+	movl	%esi,%eax
+	shrl	$5,%eax
+	addl	$5,%eax
+	movl	%eax,240(%rdx)
+
+	movl	$0,%ecx
+	movl	$48,%r8d
+	call	_vpaes_schedule_core
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+
+.globl	_vpaes_set_decrypt_key
+.private_extern _vpaes_set_decrypt_key
+
+.p2align	4
+_vpaes_set_decrypt_key:
+	movl	%esi,%eax
+	shrl	$5,%eax
+	addl	$5,%eax
+	movl	%eax,240(%rdx)
+	shll	$4,%eax
+	leaq	16(%rdx,%rax,1),%rdx
+
+	movl	$1,%ecx
+	movl	%esi,%r8d
+	shrl	$1,%r8d
+	andl	$32,%r8d
+	xorl	$32,%r8d
+	call	_vpaes_schedule_core
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+
+.globl	_vpaes_encrypt
+.private_extern _vpaes_encrypt
+
+.p2align	4
+_vpaes_encrypt:
+	movdqu	(%rdi),%xmm0
+	call	_vpaes_preheat
+	call	_vpaes_encrypt_core
+	movdqu	%xmm0,(%rsi)
+	.byte	0xf3,0xc3
+
+
+.globl	_vpaes_decrypt
+.private_extern _vpaes_decrypt
+
+.p2align	4
+_vpaes_decrypt:
+	movdqu	(%rdi),%xmm0
+	call	_vpaes_preheat
+	call	_vpaes_decrypt_core
+	movdqu	%xmm0,(%rsi)
+	.byte	0xf3,0xc3
+
+.globl	_vpaes_cbc_encrypt
+.private_extern _vpaes_cbc_encrypt
+
+.p2align	4
+_vpaes_cbc_encrypt:
+	xchgq	%rcx,%rdx
+	subq	$16,%rcx
+	jc	L$cbc_abort
+	movdqu	(%r8),%xmm6
+	subq	%rdi,%rsi
+	call	_vpaes_preheat
+	cmpl	$0,%r9d
+	je	L$cbc_dec_loop
+	jmp	L$cbc_enc_loop
+.p2align	4
+L$cbc_enc_loop:
+	movdqu	(%rdi),%xmm0
+	pxor	%xmm6,%xmm0
+	call	_vpaes_encrypt_core
+	movdqa	%xmm0,%xmm6
+	movdqu	%xmm0,(%rsi,%rdi,1)
+	leaq	16(%rdi),%rdi
+	subq	$16,%rcx
+	jnc	L$cbc_enc_loop
+	jmp	L$cbc_done
+.p2align	4
+L$cbc_dec_loop:
+	movdqu	(%rdi),%xmm0
+	movdqa	%xmm0,%xmm7
+	call	_vpaes_decrypt_core
+	pxor	%xmm6,%xmm0
+	movdqa	%xmm7,%xmm6
+	movdqu	%xmm0,(%rsi,%rdi,1)
+	leaq	16(%rdi),%rdi
+	subq	$16,%rcx
+	jnc	L$cbc_dec_loop
+L$cbc_done:
+	movdqu	%xmm6,(%r8)
+L$cbc_abort:
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+
+.p2align	4
+_vpaes_preheat:
+	leaq	L$k_s0F(%rip),%r10
+	movdqa	-32(%r10),%xmm10
+	movdqa	-16(%r10),%xmm11
+	movdqa	0(%r10),%xmm9
+	movdqa	48(%r10),%xmm13
+	movdqa	64(%r10),%xmm12
+	movdqa	80(%r10),%xmm15
+	movdqa	96(%r10),%xmm14
+	.byte	0xf3,0xc3
+
+
+
+
+
+
+
+.p2align	6
+_vpaes_consts:
+L$k_inv:
+.quad	0x0E05060F0D080180, 0x040703090A0B0C02
+.quad	0x01040A060F0B0780, 0x030D0E0C02050809
+
+L$k_s0F:
+.quad	0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F
+
+L$k_ipt:
+.quad	0xC2B2E8985A2A7000, 0xCABAE09052227808
+.quad	0x4C01307D317C4D00, 0xCD80B1FCB0FDCC81
+
+L$k_sb1:
+.quad	0xB19BE18FCB503E00, 0xA5DF7A6E142AF544
+.quad	0x3618D415FAE22300, 0x3BF7CCC10D2ED9EF
+L$k_sb2:
+.quad	0xE27A93C60B712400, 0x5EB7E955BC982FCD
+.quad	0x69EB88400AE12900, 0xC2A163C8AB82234A
+L$k_sbo:
+.quad	0xD0D26D176FBDC700, 0x15AABF7AC502A878
+.quad	0xCFE474A55FBB6A00, 0x8E1E90D1412B35FA
+
+L$k_mc_forward:
+.quad	0x0407060500030201, 0x0C0F0E0D080B0A09
+.quad	0x080B0A0904070605, 0x000302010C0F0E0D
+.quad	0x0C0F0E0D080B0A09, 0x0407060500030201
+.quad	0x000302010C0F0E0D, 0x080B0A0904070605
+
+L$k_mc_backward:
+.quad	0x0605040702010003, 0x0E0D0C0F0A09080B
+.quad	0x020100030E0D0C0F, 0x0A09080B06050407
+.quad	0x0E0D0C0F0A09080B, 0x0605040702010003
+.quad	0x0A09080B06050407, 0x020100030E0D0C0F
+
+L$k_sr:
+.quad	0x0706050403020100, 0x0F0E0D0C0B0A0908
+.quad	0x030E09040F0A0500, 0x0B06010C07020D08
+.quad	0x0F060D040B020900, 0x070E050C030A0108
+.quad	0x0B0E0104070A0D00, 0x0306090C0F020508
+
+L$k_rcon:
+.quad	0x1F8391B9AF9DEEB6, 0x702A98084D7C7D81
+
+L$k_s63:
+.quad	0x5B5B5B5B5B5B5B5B, 0x5B5B5B5B5B5B5B5B
+
+L$k_opt:
+.quad	0xFF9F4929D6B66000, 0xF7974121DEBE6808
+.quad	0x01EDBD5150BCEC00, 0xE10D5DB1B05C0CE0
+
+L$k_deskew:
+.quad	0x07E4A34047A4E300, 0x1DFEB95A5DBEF91A
+.quad	0x5F36B5DC83EA6900, 0x2841C2ABF49D1E77
+
+
+
+
+
+L$k_dksd:
+.quad	0xFEB91A5DA3E44700, 0x0740E3A45A1DBEF9
+.quad	0x41C277F4B5368300, 0x5FDC69EAAB289D1E
+L$k_dksb:
+.quad	0x9A4FCA1F8550D500, 0x03D653861CC94C99
+.quad	0x115BEDA7B6FC4A00, 0xD993256F7E3482C8
+L$k_dkse:
+.quad	0xD5031CCA1FC9D600, 0x53859A4C994F5086
+.quad	0xA23196054FDC7BE8, 0xCD5EF96A20B31487
+L$k_dks9:
+.quad	0xB6116FC87ED9A700, 0x4AED933482255BFC
+.quad	0x4576516227143300, 0x8BB89FACE9DAFDCE
+
+
+
+
+
+L$k_dipt:
+.quad	0x0F505B040B545F00, 0x154A411E114E451A
+.quad	0x86E383E660056500, 0x12771772F491F194
+
+L$k_dsb9:
+.quad	0x851C03539A86D600, 0xCAD51F504F994CC9
+.quad	0xC03B1789ECD74900, 0x725E2C9EB2FBA565
+L$k_dsbd:
+.quad	0x7D57CCDFE6B1A200, 0xF56E9B13882A4439
+.quad	0x3CE2FAF724C6CB00, 0x2931180D15DEEFD3
+L$k_dsbb:
+.quad	0xD022649296B44200, 0x602646F6B0F2D404
+.quad	0xC19498A6CD596700, 0xF3FF0C3E3255AA6B
+L$k_dsbe:
+.quad	0x46F2929626D4D000, 0x2242600464B4F6B0
+.quad	0x0C55A6CDFFAAC100, 0x9467F36B98593E32
+L$k_dsbo:
+.quad	0x1387EA537EF94000, 0xC7AA6DB9D4943E2D
+.quad	0x12D7560F93441D00, 0xCA4B8159D8C58E9C
+.byte	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105,111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105,118,101,114,115,105,116,121,41,0
+.p2align	6
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S
new file mode 100644
index 0000000..8ba2019
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-avx2.S
@@ -0,0 +1,34 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	_rsaz_avx2_eligible
+.private_extern _rsaz_avx2_eligible
+
+_rsaz_avx2_eligible:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+
+.globl	_rsaz_1024_sqr_avx2
+.private_extern _rsaz_1024_sqr_avx2
+.globl	_rsaz_1024_mul_avx2
+.private_extern _rsaz_1024_mul_avx2
+.globl	_rsaz_1024_norm2red_avx2
+.private_extern _rsaz_1024_norm2red_avx2
+.globl	_rsaz_1024_red2norm_avx2
+.private_extern _rsaz_1024_red2norm_avx2
+.globl	_rsaz_1024_scatter5_avx2
+.private_extern _rsaz_1024_scatter5_avx2
+.globl	_rsaz_1024_gather5_avx2
+.private_extern _rsaz_1024_gather5_avx2
+
+_rsaz_1024_sqr_avx2:
+_rsaz_1024_mul_avx2:
+_rsaz_1024_norm2red_avx2:
+_rsaz_1024_red2norm_avx2:
+_rsaz_1024_scatter5_avx2:
+_rsaz_1024_gather5_avx2:
+.byte	0x0f,0x0b
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S
new file mode 100644
index 0000000..5e9e82f
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/bn/rsaz-x86_64.S
@@ -0,0 +1,1126 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+.globl	_rsaz_512_sqr
+.private_extern _rsaz_512_sqr
+
+.p2align	5
+_rsaz_512_sqr:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+L$sqr_body:
+	movq	%rdx,%rbp
+	movq	(%rsi),%rdx
+	movq	8(%rsi),%rax
+	movq	%rcx,128(%rsp)
+	jmp	L$oop_sqr
+
+.p2align	5
+L$oop_sqr:
+	movl	%r8d,128+8(%rsp)
+
+	movq	%rdx,%rbx
+	mulq	%rdx
+	movq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	%rbx,%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	addq	%r8,%r8
+	movq	%r9,%rcx
+	adcq	%r9,%r9
+
+	mulq	%rax
+	movq	%rax,(%rsp)
+	addq	%rdx,%r8
+	adcq	$0,%r9
+
+	movq	%r8,8(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	8(%rsi),%r8
+	movq	16(%rsi),%rax
+	mulq	%r8
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r11
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r12
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r13
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r14
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r8
+	addq	%rax,%r15
+	movq	%r8,%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r15
+	movq	%rdx,%r8
+	movq	%r10,%rdx
+	adcq	$0,%r8
+
+	addq	%rdx,%rdx
+	leaq	(%rcx,%r10,2),%r10
+	movq	%r11,%rbx
+	adcq	%r11,%r11
+
+	mulq	%rax
+	addq	%rax,%r9
+	adcq	%rdx,%r10
+	adcq	$0,%r11
+
+	movq	%r9,16(%rsp)
+	movq	%r10,24(%rsp)
+	shrq	$63,%rbx
+
+
+	movq	16(%rsi),%r9
+	movq	24(%rsi),%rax
+	mulq	%r9
+	addq	%rax,%r12
+	movq	32(%rsi),%rax
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	addq	%rax,%r13
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r13
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	addq	%rax,%r14
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r14
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	movq	%r12,%r10
+	leaq	(%rbx,%r12,2),%r12
+	addq	%rax,%r15
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r15
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r9
+	shrq	$63,%r10
+	addq	%rax,%r8
+	movq	%r9,%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	movq	%r13,%rcx
+	leaq	(%r10,%r13,2),%r13
+
+	mulq	%rax
+	addq	%rax,%r11
+	adcq	%rdx,%r12
+	adcq	$0,%r13
+
+	movq	%r11,32(%rsp)
+	movq	%r12,40(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	24(%rsi),%r10
+	movq	32(%rsi),%rax
+	mulq	%r10
+	addq	%rax,%r14
+	movq	40(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	addq	%rax,%r15
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r15
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	movq	%r14,%r12
+	leaq	(%rcx,%r14,2),%r14
+	addq	%rax,%r8
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r8
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r10
+	shrq	$63,%r12
+	addq	%rax,%r9
+	movq	%r10,%rax
+	adcq	$0,%rdx
+	addq	%rbx,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	movq	%r15,%rbx
+	leaq	(%r12,%r15,2),%r15
+
+	mulq	%rax
+	addq	%rax,%r13
+	adcq	%rdx,%r14
+	adcq	$0,%r15
+
+	movq	%r13,48(%rsp)
+	movq	%r14,56(%rsp)
+	shrq	$63,%rbx
+
+
+	movq	32(%rsi),%r11
+	movq	40(%rsi),%rax
+	mulq	%r11
+	addq	%rax,%r8
+	movq	48(%rsi),%rax
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r11
+	addq	%rax,%r9
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%r8,%r12
+	leaq	(%rbx,%r8,2),%r8
+	addq	%rcx,%r9
+	movq	%rdx,%rcx
+	adcq	$0,%rcx
+
+	mulq	%r11
+	shrq	$63,%r12
+	addq	%rax,%r10
+	movq	%r11,%rax
+	adcq	$0,%rdx
+	addq	%rcx,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	movq	%r9,%rcx
+	leaq	(%r12,%r9,2),%r9
+
+	mulq	%rax
+	addq	%rax,%r15
+	adcq	%rdx,%r8
+	adcq	$0,%r9
+
+	movq	%r15,64(%rsp)
+	movq	%r8,72(%rsp)
+	shrq	$63,%rcx
+
+
+	movq	40(%rsi),%r12
+	movq	48(%rsi),%rax
+	mulq	%r12
+	addq	%rax,%r10
+	movq	56(%rsi),%rax
+	movq	%rdx,%rbx
+	adcq	$0,%rbx
+
+	mulq	%r12
+	addq	%rax,%r11
+	movq	%r12,%rax
+	movq	%r10,%r15
+	leaq	(%rcx,%r10,2),%r10
+	adcq	$0,%rdx
+	shrq	$63,%r15
+	addq	%rbx,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	movq	%r11,%rbx
+	leaq	(%r15,%r11,2),%r11
+
+	mulq	%rax
+	addq	%rax,%r9
+	adcq	%rdx,%r10
+	adcq	$0,%r11
+
+	movq	%r9,80(%rsp)
+	movq	%r10,88(%rsp)
+
+
+	movq	48(%rsi),%r13
+	movq	56(%rsi),%rax
+	mulq	%r13
+	addq	%rax,%r12
+	movq	%r13,%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	xorq	%r14,%r14
+	shlq	$1,%rbx
+	adcq	%r12,%r12
+	adcq	%r13,%r13
+	adcq	%r14,%r14
+
+	mulq	%rax
+	addq	%rax,%r11
+	adcq	%rdx,%r12
+	adcq	$0,%r13
+
+	movq	%r11,96(%rsp)
+	movq	%r12,104(%rsp)
+
+
+	movq	56(%rsi),%rax
+	mulq	%rax
+	addq	%rax,%r13
+	adcq	$0,%rdx
+
+	addq	%rdx,%r14
+
+	movq	%r13,112(%rsp)
+	movq	%r14,120(%rsp)
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	movq	%r8,%rdx
+	movq	%r9,%rax
+	movl	128+8(%rsp),%r8d
+	movq	%rdi,%rsi
+
+	decl	%r8d
+	jnz	L$oop_sqr
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+L$sqr_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_rsaz_512_mul
+.private_extern _rsaz_512_mul
+
+.p2align	5
+_rsaz_512_mul:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+L$mul_body:
+.byte	102,72,15,110,199
+.byte	102,72,15,110,201
+	movq	%r8,128(%rsp)
+	movq	(%rdx),%rbx
+	movq	%rdx,%rbp
+	call	__rsaz_512_mul
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+L$mul_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_rsaz_512_mul_gather4
+.private_extern _rsaz_512_mul_gather4
+
+.p2align	5
+_rsaz_512_mul_gather4:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	subq	$128+24,%rsp
+L$mul_gather4_body:
+	movl	64(%rdx,%r9,4),%eax
+.byte	102,72,15,110,199
+	movl	(%rdx,%r9,4),%ebx
+.byte	102,72,15,110,201
+	movq	%r8,128(%rsp)
+
+	shlq	$32,%rax
+	orq	%rax,%rbx
+	movq	(%rsi),%rax
+	movq	8(%rsi),%rcx
+	leaq	128(%rdx,%r9,4),%rbp
+	mulq	%rbx
+	movq	%rax,(%rsp)
+	movq	%rcx,%rax
+	movq	%rdx,%r8
+
+	mulq	%rbx
+	movd	(%rbp),%xmm4
+	addq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	movd	64(%rbp),%xmm5
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	pslldq	$4,%xmm5
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	por	%xmm5,%xmm4
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	leaq	128(%rbp),%rbp
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+.byte	102,72,15,126,227
+	addq	%rax,%r14
+	movq	(%rsi),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rsp),%rdi
+	movl	$7,%ecx
+	jmp	L$oop_mul_gather
+
+.p2align	5
+L$oop_mul_gather:
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	8(%rsi),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	movd	(%rbp),%xmm4
+	addq	%rax,%r9
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	movd	64(%rbp),%xmm5
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	pslldq	$4,%xmm5
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	por	%xmm5,%xmm4
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+.byte	102,72,15,126,227
+	addq	%rax,%r15
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	128(%rbp),%rbp
+	leaq	8(%rdi),%rdi
+
+	decl	%ecx
+	jnz	L$oop_mul_gather
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+L$mul_gather4_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_rsaz_512_mul_scatter4
+.private_extern _rsaz_512_mul_scatter4
+
+.p2align	5
+_rsaz_512_mul_scatter4:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	subq	$128+24,%rsp
+L$mul_scatter4_body:
+	leaq	(%r8,%r9,4),%r8
+.byte	102,72,15,110,199
+.byte	102,72,15,110,202
+.byte	102,73,15,110,208
+	movq	%rcx,128(%rsp)
+
+	movq	%rdi,%rbp
+	movq	(%rdi),%rbx
+	call	__rsaz_512_mul
+
+.byte	102,72,15,126,199
+.byte	102,72,15,126,205
+
+	movq	(%rsp),%r8
+	movq	8(%rsp),%r9
+	movq	16(%rsp),%r10
+	movq	24(%rsp),%r11
+	movq	32(%rsp),%r12
+	movq	40(%rsp),%r13
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r15
+
+	call	__rsaz_512_reduce
+	addq	64(%rsp),%r8
+	adcq	72(%rsp),%r9
+	adcq	80(%rsp),%r10
+	adcq	88(%rsp),%r11
+	adcq	96(%rsp),%r12
+	adcq	104(%rsp),%r13
+	adcq	112(%rsp),%r14
+	adcq	120(%rsp),%r15
+.byte	102,72,15,126,214
+	sbbq	%rcx,%rcx
+
+	call	__rsaz_512_subtract
+
+	movl	%r8d,0(%rsi)
+	shrq	$32,%r8
+	movl	%r9d,128(%rsi)
+	shrq	$32,%r9
+	movl	%r10d,256(%rsi)
+	shrq	$32,%r10
+	movl	%r11d,384(%rsi)
+	shrq	$32,%r11
+	movl	%r12d,512(%rsi)
+	shrq	$32,%r12
+	movl	%r13d,640(%rsi)
+	shrq	$32,%r13
+	movl	%r14d,768(%rsi)
+	shrq	$32,%r14
+	movl	%r15d,896(%rsi)
+	shrq	$32,%r15
+	movl	%r8d,64(%rsi)
+	movl	%r9d,192(%rsi)
+	movl	%r10d,320(%rsi)
+	movl	%r11d,448(%rsi)
+	movl	%r12d,576(%rsi)
+	movl	%r13d,704(%rsi)
+	movl	%r14d,832(%rsi)
+	movl	%r15d,960(%rsi)
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+L$mul_scatter4_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_rsaz_512_mul_by_one
+.private_extern _rsaz_512_mul_by_one
+
+.p2align	5
+_rsaz_512_mul_by_one:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	subq	$128+24,%rsp
+L$mul_by_one_body:
+	movq	%rdx,%rbp
+	movq	%rcx,128(%rsp)
+
+	movq	(%rsi),%r8
+	pxor	%xmm0,%xmm0
+	movq	8(%rsi),%r9
+	movq	16(%rsi),%r10
+	movq	24(%rsi),%r11
+	movq	32(%rsi),%r12
+	movq	40(%rsi),%r13
+	movq	48(%rsi),%r14
+	movq	56(%rsi),%r15
+
+	movdqa	%xmm0,(%rsp)
+	movdqa	%xmm0,16(%rsp)
+	movdqa	%xmm0,32(%rsp)
+	movdqa	%xmm0,48(%rsp)
+	movdqa	%xmm0,64(%rsp)
+	movdqa	%xmm0,80(%rsp)
+	movdqa	%xmm0,96(%rsp)
+	call	__rsaz_512_reduce
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	leaq	128+24+48(%rsp),%rax
+	movq	-48(%rax),%r15
+	movq	-40(%rax),%r14
+	movq	-32(%rax),%r13
+	movq	-24(%rax),%r12
+	movq	-16(%rax),%rbp
+	movq	-8(%rax),%rbx
+	leaq	(%rax),%rsp
+L$mul_by_one_epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	5
+__rsaz_512_reduce:
+	movq	%r8,%rbx
+	imulq	128+8(%rsp),%rbx
+	movq	0(%rbp),%rax
+	movl	$8,%ecx
+	jmp	L$reduction_loop
+
+.p2align	5
+L$reduction_loop:
+	mulq	%rbx
+	movq	8(%rbp),%rax
+	negq	%r8
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	16(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	24(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	128+8(%rsp),%rsi
+
+
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	40(%rbp),%rax
+	adcq	$0,%rdx
+	imulq	%r8,%rsi
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	%rsi,%rbx
+	addq	%rax,%r15
+	movq	0(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jne	L$reduction_loop
+
+	.byte	0xf3,0xc3
+
+
+.p2align	5
+__rsaz_512_subtract:
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	movq	0(%rbp),%r8
+	movq	8(%rbp),%r9
+	negq	%r8
+	notq	%r9
+	andq	%rcx,%r8
+	movq	16(%rbp),%r10
+	andq	%rcx,%r9
+	notq	%r10
+	movq	24(%rbp),%r11
+	andq	%rcx,%r10
+	notq	%r11
+	movq	32(%rbp),%r12
+	andq	%rcx,%r11
+	notq	%r12
+	movq	40(%rbp),%r13
+	andq	%rcx,%r12
+	notq	%r13
+	movq	48(%rbp),%r14
+	andq	%rcx,%r13
+	notq	%r14
+	movq	56(%rbp),%r15
+	andq	%rcx,%r14
+	notq	%r15
+	andq	%rcx,%r15
+
+	addq	(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	.byte	0xf3,0xc3
+
+
+.p2align	5
+__rsaz_512_mul:
+	leaq	8(%rsp),%rdi
+
+	movq	(%rsi),%rax
+	mulq	%rbx
+	movq	%rax,(%rdi)
+	movq	8(%rsi),%rax
+	movq	%rdx,%r8
+
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	16(%rsi),%rax
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	24(%rsi),%rax
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	32(%rsi),%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	40(%rsi),%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	48(%rsi),%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	56(%rsi),%rax
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	(%rsi),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rbp),%rbp
+	leaq	8(%rdi),%rdi
+
+	movl	$7,%ecx
+	jmp	L$oop_mul
+
+.p2align	5
+L$oop_mul:
+	movq	(%rbp),%rbx
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	8(%rsi),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	24(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	32(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	40(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	48(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	56(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	leaq	8(%rbp),%rbp
+	adcq	$0,%r14
+
+	mulq	%rbx
+	addq	%rax,%r15
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	leaq	8(%rdi),%rdi
+
+	decl	%ecx
+	jnz	L$oop_mul
+
+	movq	%r8,(%rdi)
+	movq	%r9,8(%rdi)
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+
+	.byte	0xf3,0xc3
+
+.globl	_rsaz_512_scatter4
+.private_extern _rsaz_512_scatter4
+
+.p2align	4
+_rsaz_512_scatter4:
+	leaq	(%rdi,%rdx,4),%rdi
+	movl	$8,%r9d
+	jmp	L$oop_scatter
+.p2align	4
+L$oop_scatter:
+	movq	(%rsi),%rax
+	leaq	8(%rsi),%rsi
+	movl	%eax,(%rdi)
+	shrq	$32,%rax
+	movl	%eax,64(%rdi)
+	leaq	128(%rdi),%rdi
+	decl	%r9d
+	jnz	L$oop_scatter
+	.byte	0xf3,0xc3
+
+
+.globl	_rsaz_512_gather4
+.private_extern _rsaz_512_gather4
+
+.p2align	4
+_rsaz_512_gather4:
+	leaq	(%rsi,%rdx,4),%rsi
+	movl	$8,%r9d
+	jmp	L$oop_gather
+.p2align	4
+L$oop_gather:
+	movl	(%rsi),%eax
+	movl	64(%rsi),%r8d
+	leaq	128(%rsi),%rsi
+	shlq	$32,%r8
+	orq	%r8,%rax
+	movq	%rax,(%rdi)
+	leaq	8(%rdi),%rdi
+	decl	%r9d
+	jnz	L$oop_gather
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S
new file mode 100644
index 0000000..6b9bc05
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont.S
@@ -0,0 +1,726 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+.globl	_bn_mul_mont
+.private_extern _bn_mul_mont
+
+.p2align	4
+_bn_mul_mont:
+	testl	$3,%r9d
+	jnz	L$mul_enter
+	cmpl	$8,%r9d
+	jb	L$mul_enter
+	cmpq	%rsi,%rdx
+	jne	L$mul4x_enter
+	testl	$7,%r9d
+	jz	L$sqr8x_enter
+	jmp	L$mul4x_enter
+
+.p2align	4
+L$mul_enter:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	leaq	2(%r9),%r10
+	movq	%rsp,%r11
+	negq	%r10
+	leaq	(%rsp,%r10,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%r11,8(%rsp,%r9,8)
+L$mul_body:
+	movq	%rdx,%r12
+	movq	(%r8),%r8
+	movq	(%r12),%rbx
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	L$1st_enter
+
+.p2align	4
+L$1st:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	movq	%r10,%r11
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+L$1st_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	1(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	L$1st
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+	movq	%r10,%r11
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	jmp	L$outer
+.p2align	4
+L$outer:
+	movq	(%r12,%r14,8),%rbx
+	xorq	%r15,%r15
+	movq	%r8,%rbp
+	movq	(%rsp),%r10
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	8(%rsp),%r10
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	L$inner_enter
+
+.p2align	4
+L$inner:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+L$inner_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	leaq	1(%r15),%r15
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	L$inner
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	cmpq	%r9,%r14
+	jb	L$outer
+
+	xorq	%r14,%r14
+	movq	(%rsp),%rax
+	leaq	(%rsp),%rsi
+	movq	%r9,%r15
+	jmp	L$sub
+.p2align	4
+L$sub:	sbbq	(%rcx,%r14,8),%rax
+	movq	%rax,(%rdi,%r14,8)
+	movq	8(%rsi,%r14,8),%rax
+	leaq	1(%r14),%r14
+	decq	%r15
+	jnz	L$sub
+
+	sbbq	$0,%rax
+	xorq	%r14,%r14
+	movq	%r9,%r15
+.p2align	4
+L$copy:
+	movq	(%rsp,%r14,8),%rsi
+	movq	(%rdi,%r14,8),%rcx
+	xorq	%rcx,%rsi
+	andq	%rax,%rsi
+	xorq	%rcx,%rsi
+	movq	%r14,(%rsp,%r14,8)
+	movq	%rsi,(%rdi,%r14,8)
+	leaq	1(%r14),%r14
+	subq	$1,%r15
+	jnz	L$copy
+
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$mul_epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+bn_mul4x_mont:
+L$mul4x_enter:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r9d
+	leaq	4(%r9),%r10
+	movq	%rsp,%r11
+	negq	%r10
+	leaq	(%rsp,%r10,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%r11,8(%rsp,%r9,8)
+L$mul4x_body:
+	movq	%rdi,16(%rsp,%r9,8)
+	movq	%rdx,%r12
+	movq	(%r8),%r8
+	movq	(%r12),%rbx
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	4(%r15),%r15
+	adcq	$0,%rdx
+	movq	%rdi,(%rsp)
+	movq	%rdx,%r13
+	jmp	L$1st4x
+.p2align	4
+L$1st4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	4(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	-16(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-32(%rsp,%r15,8)
+	movq	%rdx,%r13
+	cmpq	%r9,%r15
+	jb	L$1st4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdi,(%rsp,%r15,8)
+
+	leaq	1(%r14),%r14
+.p2align	2
+L$outer4x:
+	movq	(%r12,%r14,8),%rbx
+	xorq	%r15,%r15
+	movq	(%rsp),%r10
+	movq	%r8,%rbp
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%rsp),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	4(%r15),%r15
+	adcq	$0,%rdx
+	movq	%rdi,(%rsp)
+	movq	%rdx,%r13
+	jmp	L$inner4x
+.p2align	4
+L$inner4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-16(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	leaq	4(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	-16(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-32(%rsp,%r15,8)
+	movq	%rdx,%r13
+	cmpq	%r9,%r15
+	jb	L$inner4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-16(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-16(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%rsp,%r15,8)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-8(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	-8(%rsp,%r15,8),%r11
+	adcq	$0,%rdx
+	leaq	1(%r14),%r14
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	addq	(%rsp,%r9,8),%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%rsp,%r15,8)
+	movq	%rdi,(%rsp,%r15,8)
+
+	cmpq	%r9,%r14
+	jb	L$outer4x
+	movq	16(%rsp,%r9,8),%rdi
+	movq	0(%rsp),%rax
+	movq	8(%rsp),%rdx
+	shrq	$2,%r9
+	leaq	(%rsp),%rsi
+	xorq	%r14,%r14
+
+	subq	0(%rcx),%rax
+	movq	16(%rsi),%rbx
+	movq	24(%rsi),%rbp
+	sbbq	8(%rcx),%rdx
+	leaq	-1(%r9),%r15
+	jmp	L$sub4x
+.p2align	4
+L$sub4x:
+	movq	%rax,0(%rdi,%r14,8)
+	movq	%rdx,8(%rdi,%r14,8)
+	sbbq	16(%rcx,%r14,8),%rbx
+	movq	32(%rsi,%r14,8),%rax
+	movq	40(%rsi,%r14,8),%rdx
+	sbbq	24(%rcx,%r14,8),%rbp
+	movq	%rbx,16(%rdi,%r14,8)
+	movq	%rbp,24(%rdi,%r14,8)
+	sbbq	32(%rcx,%r14,8),%rax
+	movq	48(%rsi,%r14,8),%rbx
+	movq	56(%rsi,%r14,8),%rbp
+	sbbq	40(%rcx,%r14,8),%rdx
+	leaq	4(%r14),%r14
+	decq	%r15
+	jnz	L$sub4x
+
+	movq	%rax,0(%rdi,%r14,8)
+	movq	32(%rsi,%r14,8),%rax
+	sbbq	16(%rcx,%r14,8),%rbx
+	movq	%rdx,8(%rdi,%r14,8)
+	sbbq	24(%rcx,%r14,8),%rbp
+	movq	%rbx,16(%rdi,%r14,8)
+
+	sbbq	$0,%rax
+	movq	%rax,%xmm0
+	punpcklqdq	%xmm0,%xmm0
+	movq	%rbp,24(%rdi,%r14,8)
+	xorq	%r14,%r14
+
+	movq	%r9,%r15
+	pxor	%xmm5,%xmm5
+	jmp	L$copy4x
+.p2align	4
+L$copy4x:
+	movdqu	(%rsp,%r14,1),%xmm2
+	movdqu	16(%rsp,%r14,1),%xmm4
+	movdqu	(%rdi,%r14,1),%xmm1
+	movdqu	16(%rdi,%r14,1),%xmm3
+	pxor	%xmm1,%xmm2
+	pxor	%xmm3,%xmm4
+	pand	%xmm0,%xmm2
+	pand	%xmm0,%xmm4
+	pxor	%xmm1,%xmm2
+	pxor	%xmm3,%xmm4
+	movdqu	%xmm2,(%rdi,%r14,1)
+	movdqu	%xmm4,16(%rdi,%r14,1)
+	movdqa	%xmm5,(%rsp,%r14,1)
+	movdqa	%xmm5,16(%rsp,%r14,1)
+
+	leaq	32(%r14),%r14
+	decq	%r15
+	jnz	L$copy4x
+
+	shlq	$2,%r9
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$mul4x_epilogue:
+	.byte	0xf3,0xc3
+
+
+
+
+.p2align	5
+bn_sqr8x_mont:
+L$sqr8x_enter:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shlq	$3+2,%r10
+	negq	%r9
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,4),%r11
+	movq	(%r8),%r8
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	L$sqr8x_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,4),%rsp
+	jmp	L$sqr8x_sp_done
+
+.p2align	5
+L$sqr8x_sp_alt:
+	leaq	4096-64(,%r9,4),%r10
+	leaq	-64(%rsp,%r9,4),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+L$sqr8x_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+	leaq	64(%rsp,%r9,2),%r11
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+L$sqr8x_body:
+
+	movq	%r9,%rbp
+.byte	102,73,15,110,211
+	shrq	$3+2,%rbp
+	movl	_OPENSSL_ia32cap_P+8(%rip),%eax
+	jmp	L$sqr8x_copy_n
+
+.p2align	5
+L$sqr8x_copy_n:
+	movq	0(%rcx),%xmm0
+	movq	8(%rcx),%xmm1
+	movq	16(%rcx),%xmm3
+	movq	24(%rcx),%xmm4
+	leaq	32(%rcx),%rcx
+	movdqa	%xmm0,0(%r11)
+	movdqa	%xmm1,16(%r11)
+	movdqa	%xmm3,32(%r11)
+	movdqa	%xmm4,48(%r11)
+	leaq	64(%r11),%r11
+	decq	%rbp
+	jnz	L$sqr8x_copy_n
+
+	pxor	%xmm0,%xmm0
+.byte	102,72,15,110,207
+.byte	102,73,15,110,218
+	call	_bn_sqr8x_internal
+
+	pxor	%xmm0,%xmm0
+	leaq	48(%rsp),%rax
+	leaq	64(%rsp,%r9,2),%rdx
+	shrq	$3+2,%r9
+	movq	40(%rsp),%rsi
+	jmp	L$sqr8x_zero
+
+.p2align	5
+L$sqr8x_zero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	movdqa	%xmm0,32(%rax)
+	movdqa	%xmm0,48(%rax)
+	leaq	64(%rax),%rax
+	movdqa	%xmm0,0(%rdx)
+	movdqa	%xmm0,16(%rdx)
+	movdqa	%xmm0,32(%rdx)
+	movdqa	%xmm0,48(%rdx)
+	leaq	64(%rdx),%rdx
+	decq	%r9
+	jnz	L$sqr8x_zero
+
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$sqr8x_epilogue:
+	.byte	0xf3,0xc3
+
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.p2align	4
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S
new file mode 100644
index 0000000..2e8f469
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/bn/x86_64-mont5.S
@@ -0,0 +1,1822 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+.globl	_bn_mul_mont_gather5
+.private_extern _bn_mul_mont_gather5
+
+.p2align	6
+_bn_mul_mont_gather5:
+	testl	$7,%r9d
+	jnz	L$mul_enter
+	jmp	L$mul4x_enter
+
+.p2align	4
+L$mul_enter:
+	movl	%r9d,%r9d
+	movq	%rsp,%rax
+	movl	8(%rsp),%r10d
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	leaq	2(%r9),%r11
+	negq	%r11
+	leaq	(%rsp,%r11,8),%rsp
+	andq	$-1024,%rsp
+
+	movq	%rax,8(%rsp,%r9,8)
+L$mul_body:
+	movq	%rdx,%r12
+	movq	%r10,%r11
+	shrq	$3,%r10
+	andq	$7,%r11
+	notq	%r10
+	leaq	L$magic_masks(%rip),%rax
+	andq	$3,%r10
+	leaq	96(%r12,%r11,8),%r12
+	movq	0(%rax,%r10,8),%xmm4
+	movq	8(%rax,%r10,8),%xmm5
+	movq	16(%rax,%r10,8),%xmm6
+	movq	24(%rax,%r10,8),%xmm7
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+.byte	102,72,15,126,195
+
+	movq	(%r8),%r8
+	movq	(%rsi),%rax
+
+	xorq	%r14,%r14
+	xorq	%r15,%r15
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	L$1st_enter
+
+.p2align	4
+L$1st:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	movq	%r10,%r11
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+L$1st_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	leaq	1(%r15),%r15
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	L$1st
+
+.byte	102,72,15,126,195
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+	movq	%r10,%r11
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	jmp	L$outer
+.p2align	4
+L$outer:
+	xorq	%r15,%r15
+	movq	%r8,%rbp
+	movq	(%rsp),%r10
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+
+	imulq	%r10,%rbp
+	movq	%rdx,%r11
+
+	por	%xmm2,%xmm0
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi),%rax
+	adcq	$0,%rdx
+	movq	8(%rsp),%r10
+	movq	%rdx,%r13
+
+	leaq	1(%r15),%r15
+	jmp	L$inner_enter
+
+.p2align	4
+L$inner:
+	addq	%rax,%r13
+	movq	(%rsi,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+L$inner_enter:
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	(%rcx,%r15,8),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	leaq	1(%r15),%r15
+
+	mulq	%rbp
+	cmpq	%r9,%r15
+	jne	L$inner
+
+.byte	102,72,15,126,195
+
+	addq	%rax,%r13
+	movq	(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	movq	(%rsp,%r15,8),%r10
+	adcq	$0,%rdx
+	movq	%r13,-16(%rsp,%r15,8)
+	movq	%rdx,%r13
+
+	xorq	%rdx,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%rsp,%r9,8)
+	movq	%rdx,(%rsp,%r9,8)
+
+	leaq	1(%r14),%r14
+	cmpq	%r9,%r14
+	jb	L$outer
+
+	xorq	%r14,%r14
+	movq	(%rsp),%rax
+	leaq	(%rsp),%rsi
+	movq	%r9,%r15
+	jmp	L$sub
+.p2align	4
+L$sub:	sbbq	(%rcx,%r14,8),%rax
+	movq	%rax,(%rdi,%r14,8)
+	movq	8(%rsi,%r14,8),%rax
+	leaq	1(%r14),%r14
+	decq	%r15
+	jnz	L$sub
+
+	sbbq	$0,%rax
+	xorq	%r14,%r14
+	movq	%r9,%r15
+.p2align	4
+L$copy:
+	movq	(%rsp,%r14,8),%rsi
+	movq	(%rdi,%r14,8),%rcx
+	xorq	%rcx,%rsi
+	andq	%rax,%rsi
+	xorq	%rcx,%rsi
+	movq	%r14,(%rsp,%r14,8)
+	movq	%rsi,(%rdi,%r14,8)
+	leaq	1(%r14),%r14
+	subq	$1,%r15
+	jnz	L$copy
+
+	movq	8(%rsp,%r9,8),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$mul_epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	5
+bn_mul4x_mont_gather5:
+L$mul4x_enter:
+.byte	0x67
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+.byte	0x67
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	L$mul4xsp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	L$mul4xsp_done
+
+.p2align	5
+L$mul4xsp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+L$mul4xsp_done:
+	andq	$-64,%rsp
+	negq	%r9
+
+	movq	%rax,40(%rsp)
+L$mul4x_body:
+
+	call	mul4x_internal
+
+	movq	40(%rsp),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$mul4x_epilogue:
+	.byte	0xf3,0xc3
+
+
+
+.p2align	5
+mul4x_internal:
+	shlq	$5,%r9
+	movl	8(%rax),%r10d
+	leaq	256(%rdx,%r9,1),%r13
+	shrq	$5,%r9
+	movq	%r10,%r11
+	shrq	$3,%r10
+	andq	$7,%r11
+	notq	%r10
+	leaq	L$magic_masks(%rip),%rax
+	andq	$3,%r10
+	leaq	96(%rdx,%r11,8),%r12
+	movq	0(%rax,%r10,8),%xmm4
+	movq	8(%rax,%r10,8),%xmm5
+	addq	$7,%r11
+	movq	16(%rax,%r10,8),%xmm6
+	movq	24(%rax,%r10,8),%xmm7
+	andq	$7,%r11
+
+	movq	-96(%r12),%xmm0
+	leaq	256(%r12),%r14
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+	pand	%xmm6,%xmm2
+.byte	0x67
+	por	%xmm1,%xmm0
+	movq	-96(%r14),%xmm1
+.byte	0x67
+	pand	%xmm7,%xmm3
+.byte	0x67
+	por	%xmm2,%xmm0
+	movq	-32(%r14),%xmm2
+.byte	0x67
+	pand	%xmm4,%xmm1
+.byte	0x67
+	por	%xmm3,%xmm0
+	movq	32(%r14),%xmm3
+
+.byte	102,72,15,126,195
+	movq	96(%r14),%xmm0
+	movq	%r13,16+8(%rsp)
+	movq	%rdi,56+8(%rsp)
+
+	movq	(%r8),%r8
+	movq	(%rsi),%rax
+	leaq	(%rsi,%r9,1),%rsi
+	negq	%r9
+
+	movq	%r8,%rbp
+	mulq	%rbx
+	movq	%rax,%r10
+	movq	(%rcx),%rax
+
+	pand	%xmm5,%xmm2
+	pand	%xmm6,%xmm3
+	por	%xmm2,%xmm1
+
+	imulq	%r10,%rbp
+
+
+
+
+
+
+
+	leaq	64+8(%rsp,%r11,8),%r14
+	movq	%rdx,%r11
+
+	pand	%xmm7,%xmm0
+	por	%xmm3,%xmm1
+	leaq	512(%r12),%r12
+	por	%xmm1,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	32(%r9),%r15
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdi,(%r14)
+	movq	%rdx,%r13
+	jmp	L$1st4x
+
+.p2align	5
+L$1st4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	0(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-8(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdi,(%r14)
+	movq	%rdx,%r13
+
+	addq	$32,%r15
+	jnz	L$1st4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%r13
+
+.byte	102,72,15,126,195
+	leaq	(%rcx,%r9,2),%rcx
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%r14)
+
+	jmp	L$outer4x
+
+.p2align	5
+L$outer4x:
+	movq	(%r14,%r9,1),%r10
+	movq	%r8,%rbp
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	(%rcx),%rax
+	adcq	$0,%rdx
+
+	movq	-96(%r12),%xmm0
+	movq	-32(%r12),%xmm1
+	pand	%xmm4,%xmm0
+	movq	32(%r12),%xmm2
+	pand	%xmm5,%xmm1
+	movq	96(%r12),%xmm3
+
+	imulq	%r10,%rbp
+.byte	0x67
+	movq	%rdx,%r11
+	movq	%rdi,(%r14)
+
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+	por	%xmm2,%xmm0
+	leaq	(%r14,%r9,1),%r14
+	leaq	256(%r12),%r12
+	por	%xmm3,%xmm0
+
+	mulq	%rbp
+	addq	%rax,%r10
+	movq	8(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	32(%r9),%r15
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%rdx,%r13
+	jmp	L$inner4x
+
+.p2align	5
+L$inner4x:
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	adcq	$0,%rdx
+	addq	16(%r14),%r10
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-32(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	-16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	-8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%r13
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	0(%rcx),%rax
+	adcq	$0,%rdx
+	addq	(%r14),%r10
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	8(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-16(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	16(%rcx),%rax
+	adcq	$0,%rdx
+	addq	8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	16(%rsi,%r15,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	leaq	64(%rcx),%rcx
+	adcq	$0,%rdx
+	movq	%r13,-8(%r14)
+	movq	%rdx,%r13
+
+	addq	$32,%r15
+	jnz	L$inner4x
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	-32(%rcx),%rax
+	adcq	$0,%rdx
+	addq	16(%r14),%r10
+	leaq	32(%r14),%r14
+	adcq	$0,%rdx
+	movq	%rdx,%r11
+
+	mulq	%rbp
+	addq	%rax,%r13
+	movq	-8(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r13
+	adcq	$0,%rdx
+	movq	%rdi,-32(%r14)
+	movq	%rdx,%rdi
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	%rbp,%rax
+	movq	-16(%rcx),%rbp
+	adcq	$0,%rdx
+	addq	-8(%r14),%r11
+	adcq	$0,%rdx
+	movq	%rdx,%r10
+
+	mulq	%rbp
+	addq	%rax,%rdi
+	movq	(%rsi,%r9,1),%rax
+	adcq	$0,%rdx
+	addq	%r11,%rdi
+	adcq	$0,%rdx
+	movq	%r13,-24(%r14)
+	movq	%rdx,%r13
+
+.byte	102,72,15,126,195
+	movq	%rdi,-16(%r14)
+	leaq	(%rcx,%r9,2),%rcx
+
+	xorq	%rdi,%rdi
+	addq	%r10,%r13
+	adcq	$0,%rdi
+	addq	(%r14),%r13
+	adcq	$0,%rdi
+	movq	%r13,-8(%r14)
+
+	cmpq	16+8(%rsp),%r12
+	jb	L$outer4x
+	subq	%r13,%rbp
+	adcq	%r15,%r15
+	orq	%r15,%rdi
+	xorq	$1,%rdi
+	leaq	(%r14,%r9,1),%rbx
+	leaq	(%rcx,%rdi,8),%rbp
+	movq	%r9,%rcx
+	sarq	$3+2,%rcx
+	movq	56+8(%rsp),%rdi
+	jmp	L$sqr4x_sub
+
+.globl	_bn_power5
+.private_extern _bn_power5
+
+.p2align	5
+_bn_power5:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+	movq	(%r8),%r8
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	L$pwr_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	L$pwr_sp_done
+
+.p2align	5
+L$pwr_sp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+L$pwr_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+
+
+
+
+
+
+
+
+
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+L$power5_body:
+.byte	102,72,15,110,207
+.byte	102,72,15,110,209
+.byte	102,73,15,110,218
+.byte	102,72,15,110,226
+
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+
+.byte	102,72,15,126,209
+.byte	102,72,15,126,226
+	movq	%rsi,%rdi
+	movq	40(%rsp),%rax
+	leaq	32(%rsp),%r8
+
+	call	mul4x_internal
+
+	movq	40(%rsp),%rsi
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$power5_epilogue:
+	.byte	0xf3,0xc3
+
+
+.globl	_bn_sqr8x_internal
+.private_extern _bn_sqr8x_internal
+.private_extern	_bn_sqr8x_internal
+
+.p2align	5
+_bn_sqr8x_internal:
+__bn_sqr8x_internal:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	leaq	32(%r10),%rbp
+	leaq	(%rsi,%r9,1),%rsi
+
+	movq	%r9,%rcx
+
+
+	movq	-32(%rsi,%rbp,1),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi,%rbp,1),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi,%rbp,1),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	movq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	movq	%r10,-24(%rdi,%rbp,1)
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	movq	%r11,-16(%rdi,%rbp,1)
+	movq	%rdx,%r10
+
+
+	movq	-8(%rsi,%rbp,1),%rbx
+	mulq	%r15
+	movq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%rdx,%r13
+
+	leaq	(%rbp),%rcx
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+	jmp	L$sqr4x_1st
+
+.p2align	5
+L$sqr4x_1st:
+	movq	(%rsi,%rcx,1),%rbx
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	8(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,(%rdi,%rcx,1)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	16(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%r10,8(%rdi,%rcx,1)
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	24(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,16(%rdi,%rcx,1)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+	leaq	32(%rcx),%rcx
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+
+	cmpq	$0,%rcx
+	jne	L$sqr4x_1st
+
+	mulq	%r15
+	addq	%rax,%r13
+	leaq	16(%rbp),%rbp
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+	jmp	L$sqr4x_outer
+
+.p2align	5
+L$sqr4x_outer:
+	movq	-32(%rsi,%rbp,1),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi,%rbp,1),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi,%rbp,1),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	movq	-24(%rdi,%rbp,1),%r10
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	movq	%r10,-24(%rdi,%rbp,1)
+	movq	%rdx,%r11
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	-16(%rdi,%rbp,1),%r11
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	movq	%r11,-16(%rdi,%rbp,1)
+
+	xorq	%r12,%r12
+
+	movq	-8(%rsi,%rbp,1),%rbx
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	-8(%rdi,%rbp,1),%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	%r12,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rbp,1)
+
+	leaq	(%rbp),%rcx
+	jmp	L$sqr4x_inner
+
+.p2align	5
+L$sqr4x_inner:
+	movq	(%rsi,%rcx,1),%rbx
+	mulq	%r15
+	addq	%rax,%r13
+	movq	%rbx,%rax
+	movq	%rdx,%r12
+	adcq	$0,%r12
+	addq	(%rdi,%rcx,1),%r13
+	adcq	$0,%r12
+
+.byte	0x67
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	8(%rsi,%rcx,1),%rbx
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	adcq	$0,%r10
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%r11,(%rdi,%rcx,1)
+	movq	%rbx,%rax
+	movq	%rdx,%r13
+	adcq	$0,%r13
+	addq	8(%rdi,%rcx,1),%r12
+	leaq	16(%rcx),%rcx
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	adcq	$0,%rdx
+	addq	%r12,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi,%rcx,1)
+
+	cmpq	$0,%rcx
+	jne	L$sqr4x_inner
+
+.byte	0x67
+	mulq	%r15
+	addq	%rax,%r13
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+
+	addq	$16,%rbp
+	jnz	L$sqr4x_outer
+
+
+	movq	-32(%rsi),%r14
+	leaq	48+8(%rsp,%r9,2),%rdi
+	movq	-24(%rsi),%rax
+	leaq	-32(%rdi,%rbp,1),%rdi
+	movq	-16(%rsi),%rbx
+	movq	%rax,%r15
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%r14
+	addq	%rax,%r11
+	movq	%rbx,%rax
+	movq	%r10,-24(%rdi)
+	movq	%rdx,%r10
+	adcq	$0,%r10
+	addq	%r13,%r11
+	movq	-8(%rsi),%rbx
+	adcq	$0,%r10
+
+	mulq	%r15
+	addq	%rax,%r12
+	movq	%rbx,%rax
+	movq	%r11,-16(%rdi)
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%r14
+	addq	%rax,%r10
+	movq	%rbx,%rax
+	movq	%rdx,%r11
+	adcq	$0,%r11
+	addq	%r12,%r10
+	adcq	$0,%r11
+	movq	%r10,-8(%rdi)
+
+	mulq	%r15
+	addq	%rax,%r13
+	movq	-16(%rsi),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r13
+	adcq	$0,%rdx
+
+	movq	%r13,(%rdi)
+	movq	%rdx,%r12
+	movq	%rdx,8(%rdi)
+
+	mulq	%rbx
+	addq	$16,%rbp
+	xorq	%r14,%r14
+	subq	%r9,%rbp
+	xorq	%r15,%r15
+
+	addq	%r12,%rax
+	adcq	$0,%rdx
+	movq	%rax,8(%rdi)
+	movq	%rdx,16(%rdi)
+	movq	%r15,24(%rdi)
+
+	movq	-16(%rsi,%rbp,1),%rax
+	leaq	48+8(%rsp),%rdi
+	xorq	%r10,%r10
+	movq	8(%rdi),%r11
+
+	leaq	(%r14,%r10,2),%r12
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	24(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi,%rbp,1),%rax
+	movq	%r12,(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	32(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	40(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	0(%rsi,%rbp,1),%rax
+	movq	%rbx,16(%rdi)
+	adcq	%rdx,%r8
+	leaq	16(%rbp),%rbp
+	movq	%r8,24(%rdi)
+	sbbq	%r15,%r15
+	leaq	64(%rdi),%rdi
+	jmp	L$sqr4x_shift_n_add
+
+.p2align	5
+L$sqr4x_shift_n_add:
+	leaq	(%r14,%r10,2),%r12
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	-16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	-8(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi,%rbp,1),%rax
+	movq	%r12,-32(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,-24(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	0(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	8(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	0(%rsi,%rbp,1),%rax
+	movq	%rbx,-16(%rdi)
+	adcq	%rdx,%r8
+
+	leaq	(%r14,%r10,2),%r12
+	movq	%r8,-8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	24(%rdi),%r11
+	adcq	%rax,%r12
+	movq	8(%rsi,%rbp,1),%rax
+	movq	%r12,0(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,8(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	movq	32(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	40(%rdi),%r11
+	adcq	%rax,%rbx
+	movq	16(%rsi,%rbp,1),%rax
+	movq	%rbx,16(%rdi)
+	adcq	%rdx,%r8
+	movq	%r8,24(%rdi)
+	sbbq	%r15,%r15
+	leaq	64(%rdi),%rdi
+	addq	$32,%rbp
+	jnz	L$sqr4x_shift_n_add
+
+	leaq	(%r14,%r10,2),%r12
+.byte	0x67
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r13
+	shrq	$63,%r11
+	orq	%r10,%r13
+	movq	-16(%rdi),%r10
+	movq	%r11,%r14
+	mulq	%rax
+	negq	%r15
+	movq	-8(%rdi),%r11
+	adcq	%rax,%r12
+	movq	-8(%rsi),%rax
+	movq	%r12,-32(%rdi)
+	adcq	%rdx,%r13
+
+	leaq	(%r14,%r10,2),%rbx
+	movq	%r13,-24(%rdi)
+	sbbq	%r15,%r15
+	shrq	$63,%r10
+	leaq	(%rcx,%r11,2),%r8
+	shrq	$63,%r11
+	orq	%r10,%r8
+	mulq	%rax
+	negq	%r15
+	adcq	%rax,%rbx
+	adcq	%rdx,%r8
+	movq	%rbx,-16(%rdi)
+	movq	%r8,-8(%rdi)
+.byte	102,72,15,126,213
+sqr8x_reduction:
+	xorq	%rax,%rax
+	leaq	(%rbp,%r9,2),%rcx
+	leaq	48+8(%rsp,%r9,2),%rdx
+	movq	%rcx,0+8(%rsp)
+	leaq	48+8(%rsp,%r9,1),%rdi
+	movq	%rdx,8+8(%rsp)
+	negq	%r9
+	jmp	L$8x_reduction_loop
+
+.p2align	5
+L$8x_reduction_loop:
+	leaq	(%rdi,%r9,1),%rdi
+.byte	0x66
+	movq	0(%rdi),%rbx
+	movq	8(%rdi),%r9
+	movq	16(%rdi),%r10
+	movq	24(%rdi),%r11
+	movq	32(%rdi),%r12
+	movq	40(%rdi),%r13
+	movq	48(%rdi),%r14
+	movq	56(%rdi),%r15
+	movq	%rax,(%rdx)
+	leaq	64(%rdi),%rdi
+
+.byte	0x67
+	movq	%rbx,%r8
+	imulq	32+8(%rsp),%rbx
+	movq	0(%rbp),%rax
+	movl	$8,%ecx
+	jmp	L$8x_reduce
+
+.p2align	5
+L$8x_reduce:
+	mulq	%rbx
+	movq	16(%rbp),%rax
+	negq	%r8
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	movq	%rbx,48-8+8(%rsp,%rcx,8)
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	32+8(%rsp),%rsi
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	64(%rbp),%rax
+	adcq	$0,%rdx
+	imulq	%r8,%rsi
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	80(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	96(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	112(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	%rsi,%rbx
+	addq	%rax,%r15
+	movq	0(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jnz	L$8x_reduce
+
+	leaq	128(%rbp),%rbp
+	xorq	%rax,%rax
+	movq	8+8(%rsp),%rdx
+	cmpq	0+8(%rsp),%rbp
+	jae	L$8x_no_tail
+
+.byte	0x66
+	addq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	sbbq	%rsi,%rsi
+
+	movq	48+56+8(%rsp),%rbx
+	movl	$8,%ecx
+	movq	0(%rbp),%rax
+	jmp	L$8x_tail
+
+.p2align	5
+L$8x_tail:
+	mulq	%rbx
+	addq	%rax,%r8
+	movq	16(%rbp),%rax
+	movq	%r8,(%rdi)
+	movq	%rdx,%r8
+	adcq	$0,%r8
+
+	mulq	%rbx
+	addq	%rax,%r9
+	movq	32(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r9,%r8
+	leaq	8(%rdi),%rdi
+	movq	%rdx,%r9
+	adcq	$0,%r9
+
+	mulq	%rbx
+	addq	%rax,%r10
+	movq	48(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r10,%r9
+	movq	%rdx,%r10
+	adcq	$0,%r10
+
+	mulq	%rbx
+	addq	%rax,%r11
+	movq	64(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r11,%r10
+	movq	%rdx,%r11
+	adcq	$0,%r11
+
+	mulq	%rbx
+	addq	%rax,%r12
+	movq	80(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r12,%r11
+	movq	%rdx,%r12
+	adcq	$0,%r12
+
+	mulq	%rbx
+	addq	%rax,%r13
+	movq	96(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r13,%r12
+	movq	%rdx,%r13
+	adcq	$0,%r13
+
+	mulq	%rbx
+	addq	%rax,%r14
+	movq	112(%rbp),%rax
+	adcq	$0,%rdx
+	addq	%r14,%r13
+	movq	%rdx,%r14
+	adcq	$0,%r14
+
+	mulq	%rbx
+	movq	48-16+8(%rsp,%rcx,8),%rbx
+	addq	%rax,%r15
+	adcq	$0,%rdx
+	addq	%r15,%r14
+	movq	0(%rbp),%rax
+	movq	%rdx,%r15
+	adcq	$0,%r15
+
+	decl	%ecx
+	jnz	L$8x_tail
+
+	leaq	128(%rbp),%rbp
+	movq	8+8(%rsp),%rdx
+	cmpq	0+8(%rsp),%rbp
+	jae	L$8x_tail_done
+
+	movq	48+56+8(%rsp),%rbx
+	negq	%rsi
+	movq	0(%rbp),%rax
+	adcq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	sbbq	%rsi,%rsi
+
+	movl	$8,%ecx
+	jmp	L$8x_tail
+
+.p2align	5
+L$8x_tail_done:
+	addq	(%rdx),%r8
+	xorq	%rax,%rax
+
+	negq	%rsi
+L$8x_no_tail:
+	adcq	0(%rdi),%r8
+	adcq	8(%rdi),%r9
+	adcq	16(%rdi),%r10
+	adcq	24(%rdi),%r11
+	adcq	32(%rdi),%r12
+	adcq	40(%rdi),%r13
+	adcq	48(%rdi),%r14
+	adcq	56(%rdi),%r15
+	adcq	$0,%rax
+	movq	-16(%rbp),%rcx
+	xorq	%rsi,%rsi
+
+.byte	102,72,15,126,213
+
+	movq	%r8,0(%rdi)
+	movq	%r9,8(%rdi)
+.byte	102,73,15,126,217
+	movq	%r10,16(%rdi)
+	movq	%r11,24(%rdi)
+	movq	%r12,32(%rdi)
+	movq	%r13,40(%rdi)
+	movq	%r14,48(%rdi)
+	movq	%r15,56(%rdi)
+	leaq	64(%rdi),%rdi
+
+	cmpq	%rdx,%rdi
+	jb	L$8x_reduction_loop
+
+	subq	%r15,%rcx
+	leaq	(%rdi,%r9,1),%rbx
+	adcq	%rsi,%rsi
+	movq	%r9,%rcx
+	orq	%rsi,%rax
+.byte	102,72,15,126,207
+	xorq	$1,%rax
+.byte	102,72,15,126,206
+	leaq	(%rbp,%rax,8),%rbp
+	sarq	$3+2,%rcx
+	jmp	L$sqr4x_sub
+
+.p2align	5
+L$sqr4x_sub:
+.byte	0x66
+	movq	0(%rbx),%r12
+	movq	8(%rbx),%r13
+	sbbq	0(%rbp),%r12
+	movq	16(%rbx),%r14
+	sbbq	16(%rbp),%r13
+	movq	24(%rbx),%r15
+	leaq	32(%rbx),%rbx
+	sbbq	32(%rbp),%r14
+	movq	%r12,0(%rdi)
+	sbbq	48(%rbp),%r15
+	leaq	64(%rbp),%rbp
+	movq	%r13,8(%rdi)
+	movq	%r14,16(%rdi)
+	movq	%r15,24(%rdi)
+	leaq	32(%rdi),%rdi
+
+	incq	%rcx
+	jnz	L$sqr4x_sub
+	movq	%r9,%r10
+	negq	%r9
+	.byte	0xf3,0xc3
+
+.globl	_bn_from_montgomery
+.private_extern _bn_from_montgomery
+
+.p2align	5
+_bn_from_montgomery:
+	testl	$7,%r9d
+	jz	bn_from_mont8x
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+
+
+.p2align	5
+bn_from_mont8x:
+.byte	0x67
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+.byte	0x67
+	movl	%r9d,%r10d
+	shll	$3,%r9d
+	shll	$3+2,%r10d
+	negq	%r9
+	movq	(%r8),%r8
+
+
+
+
+
+
+
+	leaq	-64(%rsp,%r9,2),%r11
+	subq	%rsi,%r11
+	andq	$4095,%r11
+	cmpq	%r11,%r10
+	jb	L$from_sp_alt
+	subq	%r11,%rsp
+	leaq	-64(%rsp,%r9,2),%rsp
+	jmp	L$from_sp_done
+
+.p2align	5
+L$from_sp_alt:
+	leaq	4096-64(,%r9,2),%r10
+	leaq	-64(%rsp,%r9,2),%rsp
+	subq	%r10,%r11
+	movq	$0,%r10
+	cmovcq	%r10,%r11
+	subq	%r11,%rsp
+L$from_sp_done:
+	andq	$-64,%rsp
+	movq	%r9,%r10
+	negq	%r9
+
+
+
+
+
+
+
+
+
+
+	movq	%r8,32(%rsp)
+	movq	%rax,40(%rsp)
+L$from_body:
+	movq	%r9,%r11
+	leaq	48(%rsp),%rax
+	pxor	%xmm0,%xmm0
+	jmp	L$mul_by_1
+
+.p2align	5
+L$mul_by_1:
+	movdqu	(%rsi),%xmm1
+	movdqu	16(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm3
+	movdqa	%xmm0,(%rax,%r9,1)
+	movdqu	48(%rsi),%xmm4
+	movdqa	%xmm0,16(%rax,%r9,1)
+.byte	0x48,0x8d,0xb6,0x40,0x00,0x00,0x00
+	movdqa	%xmm1,(%rax)
+	movdqa	%xmm0,32(%rax,%r9,1)
+	movdqa	%xmm2,16(%rax)
+	movdqa	%xmm0,48(%rax,%r9,1)
+	movdqa	%xmm3,32(%rax)
+	movdqa	%xmm4,48(%rax)
+	leaq	64(%rax),%rax
+	subq	$64,%r11
+	jnz	L$mul_by_1
+
+.byte	102,72,15,110,207
+.byte	102,72,15,110,209
+.byte	0x67
+	movq	%rcx,%rbp
+.byte	102,73,15,110,218
+	call	sqr8x_reduction
+
+	pxor	%xmm0,%xmm0
+	leaq	48(%rsp),%rax
+	movq	40(%rsp),%rsi
+	jmp	L$from_mont_zero
+
+.p2align	5
+L$from_mont_zero:
+	movdqa	%xmm0,0(%rax)
+	movdqa	%xmm0,16(%rax)
+	movdqa	%xmm0,32(%rax)
+	movdqa	%xmm0,48(%rax)
+	leaq	64(%rax),%rax
+	subq	$32,%r9
+	jnz	L$from_mont_zero
+
+	movq	$1,%rax
+	movq	-48(%rsi),%r15
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$from_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_bn_scatter5
+.private_extern _bn_scatter5
+
+.p2align	4
+_bn_scatter5:
+	cmpl	$0,%esi
+	jz	L$scatter_epilogue
+	leaq	(%rdx,%rcx,8),%rdx
+L$scatter:
+	movq	(%rdi),%rax
+	leaq	8(%rdi),%rdi
+	movq	%rax,(%rdx)
+	leaq	256(%rdx),%rdx
+	subl	$1,%esi
+	jnz	L$scatter
+L$scatter_epilogue:
+	.byte	0xf3,0xc3
+
+
+.globl	_bn_gather5
+.private_extern _bn_gather5
+
+.p2align	4
+_bn_gather5:
+	movl	%ecx,%r11d
+	shrl	$3,%ecx
+	andq	$7,%r11
+	notl	%ecx
+	leaq	L$magic_masks(%rip),%rax
+	andl	$3,%ecx
+	leaq	128(%rdx,%r11,8),%rdx
+	movq	0(%rax,%rcx,8),%xmm4
+	movq	8(%rax,%rcx,8),%xmm5
+	movq	16(%rax,%rcx,8),%xmm6
+	movq	24(%rax,%rcx,8),%xmm7
+	jmp	L$gather
+.p2align	4
+L$gather:
+	movq	-128(%rdx),%xmm0
+	movq	-64(%rdx),%xmm1
+	pand	%xmm4,%xmm0
+	movq	0(%rdx),%xmm2
+	pand	%xmm5,%xmm1
+	movq	64(%rdx),%xmm3
+	pand	%xmm6,%xmm2
+	por	%xmm1,%xmm0
+	pand	%xmm7,%xmm3
+.byte	0x67,0x67
+	por	%xmm2,%xmm0
+	leaq	256(%rdx),%rdx
+	por	%xmm3,%xmm0
+
+	movq	%xmm0,(%rdi)
+	leaq	8(%rdi),%rdi
+	subl	$1,%esi
+	jnz	L$gather
+	.byte	0xf3,0xc3
+L$SEH_end_bn_gather5:
+
+.p2align	6
+L$magic_masks:
+.long	0,0, 0,0, 0,0, -1,-1
+.long	0,0, 0,0, 0,0,  0,0
+.byte	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115,99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S b/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S
new file mode 100644
index 0000000..0dde04d
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/cpu-x86_64-asm.S
@@ -0,0 +1,143 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	_OPENSSL_ia32_cpuid
+.private_extern _OPENSSL_ia32_cpuid
+
+.p2align	4
+_OPENSSL_ia32_cpuid:
+
+
+	movq	%rdi,%rdi
+	movq	%rbx,%r8
+
+	xorl	%eax,%eax
+	movl	%eax,8(%rdi)
+	cpuid
+	movl	%eax,%r11d
+
+	xorl	%eax,%eax
+	cmpl	$1970169159,%ebx
+	setne	%al
+	movl	%eax,%r9d
+	cmpl	$1231384169,%edx
+	setne	%al
+	orl	%eax,%r9d
+	cmpl	$1818588270,%ecx
+	setne	%al
+	orl	%eax,%r9d
+	jz	L$intel
+
+	cmpl	$1752462657,%ebx
+	setne	%al
+	movl	%eax,%r10d
+	cmpl	$1769238117,%edx
+	setne	%al
+	orl	%eax,%r10d
+	cmpl	$1145913699,%ecx
+	setne	%al
+	orl	%eax,%r10d
+	jnz	L$intel
+
+
+
+
+	movl	$2147483648,%eax
+	cpuid
+
+
+	cmpl	$2147483649,%eax
+	jb	L$intel
+	movl	%eax,%r10d
+	movl	$2147483649,%eax
+	cpuid
+
+
+	orl	%ecx,%r9d
+	andl	$2049,%r9d
+
+	cmpl	$2147483656,%r10d
+	jb	L$intel
+
+	movl	$2147483656,%eax
+	cpuid
+
+	movzbq	%cl,%r10
+	incq	%r10
+
+	movl	$1,%eax
+	cpuid
+
+	btl	$28,%edx
+	jnc	L$generic
+	shrl	$16,%ebx
+	cmpb	%r10b,%bl
+	ja	L$generic
+	andl	$4026531839,%edx
+	jmp	L$generic
+
+L$intel:
+	cmpl	$4,%r11d
+	movl	$-1,%r10d
+	jb	L$nocacheinfo
+
+	movl	$4,%eax
+	movl	$0,%ecx
+	cpuid
+	movl	%eax,%r10d
+	shrl	$14,%r10d
+	andl	$4095,%r10d
+
+	cmpl	$7,%r11d
+	jb	L$nocacheinfo
+
+	movl	$7,%eax
+	xorl	%ecx,%ecx
+	cpuid
+	movl	%ebx,8(%rdi)
+
+L$nocacheinfo:
+	movl	$1,%eax
+	cpuid
+
+	andl	$3220176895,%edx
+	cmpl	$0,%r9d
+	jne	L$notintel
+	orl	$1073741824,%edx
+L$notintel:
+	btl	$28,%edx
+	jnc	L$generic
+	andl	$4026531839,%edx
+	cmpl	$0,%r10d
+	je	L$generic
+
+	orl	$268435456,%edx
+	shrl	$16,%ebx
+	cmpb	$1,%bl
+	ja	L$generic
+	andl	$4026531839,%edx
+L$generic:
+	andl	$2048,%r9d
+	andl	$4294965247,%ecx
+	orl	%ecx,%r9d
+
+	movl	%edx,%r10d
+	btl	$27,%r9d
+	jnc	L$clear_avx
+	xorl	%ecx,%ecx
+.byte	0x0f,0x01,0xd0
+	andl	$6,%eax
+	cmpl	$6,%eax
+	je	L$done
+L$clear_avx:
+	movl	$4026525695,%eax
+	andl	%eax,%r9d
+	andl	$4294967263,8(%rdi)
+L$done:
+	movl	%r9d,4(%rdi)
+	movl	%r10d,0(%rdi)
+	movq	%r8,%rbx
+	.byte	0xf3,0xc3
+
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S
new file mode 100644
index 0000000..1e61479
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/md5/md5-x86_64.S
@@ -0,0 +1,671 @@
+#if defined(__x86_64__)
+.text	
+.p2align	4
+
+.globl	_md5_block_asm_data_order
+.private_extern _md5_block_asm_data_order
+
+_md5_block_asm_data_order:
+	pushq	%rbp
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r14
+	pushq	%r15
+L$prologue:
+
+
+
+
+	movq	%rdi,%rbp
+	shlq	$6,%rdx
+	leaq	(%rsi,%rdx,1),%rdi
+	movl	0(%rbp),%eax
+	movl	4(%rbp),%ebx
+	movl	8(%rbp),%ecx
+	movl	12(%rbp),%edx
+
+
+
+
+
+
+
+	cmpq	%rdi,%rsi
+	je	L$end
+
+
+L$loop:
+	movl	%eax,%r8d
+	movl	%ebx,%r9d
+	movl	%ecx,%r14d
+	movl	%edx,%r15d
+	movl	0(%rsi),%r10d
+	movl	%edx,%r11d
+	xorl	%ecx,%r11d
+	leal	-680876936(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	4(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-389564586(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	8(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	606105819(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	12(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-1044525330(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	16(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	-176418897(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	20(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	1200080426(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	24(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-1473231341(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	28(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-45705983(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	32(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	1770035416(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	36(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-1958414417(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	40(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-42063(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	44(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	-1990404162(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	48(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	xorl	%ecx,%r11d
+	leal	1804603682(%rax,%r10,1),%eax
+	andl	%ebx,%r11d
+	xorl	%edx,%r11d
+	movl	52(%rsi),%r10d
+	addl	%r11d,%eax
+	roll	$7,%eax
+	movl	%ecx,%r11d
+	addl	%ebx,%eax
+	xorl	%ebx,%r11d
+	leal	-40341101(%rdx,%r10,1),%edx
+	andl	%eax,%r11d
+	xorl	%ecx,%r11d
+	movl	56(%rsi),%r10d
+	addl	%r11d,%edx
+	roll	$12,%edx
+	movl	%ebx,%r11d
+	addl	%eax,%edx
+	xorl	%eax,%r11d
+	leal	-1502002290(%rcx,%r10,1),%ecx
+	andl	%edx,%r11d
+	xorl	%ebx,%r11d
+	movl	60(%rsi),%r10d
+	addl	%r11d,%ecx
+	roll	$17,%ecx
+	movl	%eax,%r11d
+	addl	%edx,%ecx
+	xorl	%edx,%r11d
+	leal	1236535329(%rbx,%r10,1),%ebx
+	andl	%ecx,%r11d
+	xorl	%eax,%r11d
+	movl	0(%rsi),%r10d
+	addl	%r11d,%ebx
+	roll	$22,%ebx
+	movl	%edx,%r11d
+	addl	%ecx,%ebx
+	movl	4(%rsi),%r10d
+	movl	%edx,%r11d
+	movl	%edx,%r12d
+	notl	%r11d
+	leal	-165796510(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	24(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-1069501632(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	44(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	643717713(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	0(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-373897302(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	20(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	-701558691(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	40(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	38016083(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	60(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	-660478335(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	16(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-405537848(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	36(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	568446438(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	56(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-1019803690(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	12(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	-187363961(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	32(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	1163531501(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	52(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	notl	%r11d
+	leal	-1444681467(%rax,%r10,1),%eax
+	andl	%ebx,%r12d
+	andl	%ecx,%r11d
+	movl	8(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ecx,%r11d
+	addl	%r12d,%eax
+	movl	%ecx,%r12d
+	roll	$5,%eax
+	addl	%ebx,%eax
+	notl	%r11d
+	leal	-51403784(%rdx,%r10,1),%edx
+	andl	%eax,%r12d
+	andl	%ebx,%r11d
+	movl	28(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%ebx,%r11d
+	addl	%r12d,%edx
+	movl	%ebx,%r12d
+	roll	$9,%edx
+	addl	%eax,%edx
+	notl	%r11d
+	leal	1735328473(%rcx,%r10,1),%ecx
+	andl	%edx,%r12d
+	andl	%eax,%r11d
+	movl	48(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%eax,%r11d
+	addl	%r12d,%ecx
+	movl	%eax,%r12d
+	roll	$14,%ecx
+	addl	%edx,%ecx
+	notl	%r11d
+	leal	-1926607734(%rbx,%r10,1),%ebx
+	andl	%ecx,%r12d
+	andl	%edx,%r11d
+	movl	0(%rsi),%r10d
+	orl	%r11d,%r12d
+	movl	%edx,%r11d
+	addl	%r12d,%ebx
+	movl	%edx,%r12d
+	roll	$20,%ebx
+	addl	%ecx,%ebx
+	movl	20(%rsi),%r10d
+	movl	%ecx,%r11d
+	leal	-378558(%rax,%r10,1),%eax
+	movl	32(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-2022574463(%rdx,%r10,1),%edx
+	movl	44(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	1839030562(%rcx,%r10,1),%ecx
+	movl	56(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-35309556(%rbx,%r10,1),%ebx
+	movl	4(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	-1530992060(%rax,%r10,1),%eax
+	movl	16(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	1272893353(%rdx,%r10,1),%edx
+	movl	28(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	-155497632(%rcx,%r10,1),%ecx
+	movl	40(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-1094730640(%rbx,%r10,1),%ebx
+	movl	52(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	681279174(%rax,%r10,1),%eax
+	movl	0(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-358537222(%rdx,%r10,1),%edx
+	movl	12(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	-722521979(%rcx,%r10,1),%ecx
+	movl	24(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	76029189(%rbx,%r10,1),%ebx
+	movl	36(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	leal	-640364487(%rax,%r10,1),%eax
+	movl	48(%rsi),%r10d
+	xorl	%edx,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%eax
+	roll	$4,%eax
+	movl	%ebx,%r11d
+	addl	%ebx,%eax
+	leal	-421815835(%rdx,%r10,1),%edx
+	movl	60(%rsi),%r10d
+	xorl	%ecx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%edx
+	roll	$11,%edx
+	movl	%eax,%r11d
+	addl	%eax,%edx
+	leal	530742520(%rcx,%r10,1),%ecx
+	movl	8(%rsi),%r10d
+	xorl	%ebx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ecx
+	roll	$16,%ecx
+	movl	%edx,%r11d
+	addl	%edx,%ecx
+	leal	-995338651(%rbx,%r10,1),%ebx
+	movl	0(%rsi),%r10d
+	xorl	%eax,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%ebx
+	roll	$23,%ebx
+	movl	%ecx,%r11d
+	addl	%ecx,%ebx
+	movl	0(%rsi),%r10d
+	movl	$4294967295,%r11d
+	xorl	%edx,%r11d
+	leal	-198630844(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	28(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	1126891415(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	56(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1416354905(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	20(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-57434055(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	48(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	1700485571(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	12(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-1894986606(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	40(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1051523(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	4(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-2054922799(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	32(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	1873313359(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	60(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-30611744(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	24(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	-1560198380(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	52(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	1309151649(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	16(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+	leal	-145523070(%rax,%r10,1),%eax
+	orl	%ebx,%r11d
+	xorl	%ecx,%r11d
+	addl	%r11d,%eax
+	movl	44(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$6,%eax
+	xorl	%ecx,%r11d
+	addl	%ebx,%eax
+	leal	-1120210379(%rdx,%r10,1),%edx
+	orl	%eax,%r11d
+	xorl	%ebx,%r11d
+	addl	%r11d,%edx
+	movl	8(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$10,%edx
+	xorl	%ebx,%r11d
+	addl	%eax,%edx
+	leal	718787259(%rcx,%r10,1),%ecx
+	orl	%edx,%r11d
+	xorl	%eax,%r11d
+	addl	%r11d,%ecx
+	movl	36(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$15,%ecx
+	xorl	%eax,%r11d
+	addl	%edx,%ecx
+	leal	-343485551(%rbx,%r10,1),%ebx
+	orl	%ecx,%r11d
+	xorl	%edx,%r11d
+	addl	%r11d,%ebx
+	movl	0(%rsi),%r10d
+	movl	$4294967295,%r11d
+	roll	$21,%ebx
+	xorl	%edx,%r11d
+	addl	%ecx,%ebx
+
+	addl	%r8d,%eax
+	addl	%r9d,%ebx
+	addl	%r14d,%ecx
+	addl	%r15d,%edx
+
+
+	addq	$64,%rsi
+	cmpq	%rdi,%rsi
+	jb	L$loop
+
+
+L$end:
+	movl	%eax,0(%rbp)
+	movl	%ebx,4(%rbp)
+	movl	%ecx,8(%rbp)
+	movl	%edx,12(%rbp)
+
+	movq	(%rsp),%r15
+	movq	8(%rsp),%r14
+	movq	16(%rsp),%r12
+	movq	24(%rsp),%rbx
+	movq	32(%rsp),%rbp
+	addq	$40,%rsp
+L$epilogue:
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S
new file mode 100644
index 0000000..21d5ad6
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/modes/aesni-gcm-x86_64.S
@@ -0,0 +1,19 @@
+#if defined(__x86_64__)
+.text	
+
+.globl	_aesni_gcm_encrypt
+.private_extern _aesni_gcm_encrypt
+
+_aesni_gcm_encrypt:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+
+.globl	_aesni_gcm_decrypt
+.private_extern _aesni_gcm_decrypt
+
+_aesni_gcm_decrypt:
+	xorl	%eax,%eax
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S
new file mode 100644
index 0000000..305a91c
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/modes/ghash-x86_64.S
@@ -0,0 +1,1328 @@
+#if defined(__x86_64__)
+.text	
+
+
+.globl	_gcm_gmult_4bit
+.private_extern _gcm_gmult_4bit
+
+.p2align	4
+_gcm_gmult_4bit:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+L$gmult_prologue:
+
+	movzbq	15(%rdi),%r8
+	leaq	L$rem_4bit(%rip),%r11
+	xorq	%rax,%rax
+	xorq	%rbx,%rbx
+	movb	%r8b,%al
+	movb	%r8b,%bl
+	shlb	$4,%al
+	movq	$14,%rcx
+	movq	8(%rsi,%rax,1),%r8
+	movq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	movq	%r8,%rdx
+	jmp	L$oop1
+
+.p2align	4
+L$oop1:
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	movb	(%rdi,%rcx,1),%al
+	shrq	$4,%r9
+	xorq	8(%rsi,%rbx,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rbx,1),%r9
+	movb	%al,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	shlb	$4,%al
+	xorq	%r10,%r8
+	decq	%rcx
+	js	L$break1
+
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rax,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	xorq	%r10,%r8
+	jmp	L$oop1
+
+.p2align	4
+L$break1:
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rax,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rax,1),%r9
+	andb	$240,%bl
+	xorq	(%r11,%rdx,8),%r9
+	movq	%r8,%rdx
+	xorq	%r10,%r8
+
+	shrq	$4,%r8
+	andq	$15,%rdx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	xorq	8(%rsi,%rbx,1),%r8
+	shlq	$60,%r10
+	xorq	(%rsi,%rbx,1),%r9
+	xorq	%r10,%r8
+	xorq	(%r11,%rdx,8),%r9
+
+	bswapq	%r8
+	bswapq	%r9
+	movq	%r8,8(%rdi)
+	movq	%r9,(%rdi)
+
+	movq	16(%rsp),%rbx
+	leaq	24(%rsp),%rsp
+L$gmult_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_gcm_ghash_4bit
+.private_extern _gcm_ghash_4bit
+
+.p2align	4
+_gcm_ghash_4bit:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$280,%rsp
+L$ghash_prologue:
+	movq	%rdx,%r14
+	movq	%rcx,%r15
+	subq	$-128,%rsi
+	leaq	16+128(%rsp),%rbp
+	xorl	%edx,%edx
+	movq	0+0-128(%rsi),%r8
+	movq	0+8-128(%rsi),%rax
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	16+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	16+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,0(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,0(%rbp)
+	movq	32+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,0-128(%rbp)
+	movq	32+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,1(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,8(%rbp)
+	movq	48+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,8-128(%rbp)
+	movq	48+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,2(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,16(%rbp)
+	movq	64+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,16-128(%rbp)
+	movq	64+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,3(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,24(%rbp)
+	movq	80+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,24-128(%rbp)
+	movq	80+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,4(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,32(%rbp)
+	movq	96+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,32-128(%rbp)
+	movq	96+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,5(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,40(%rbp)
+	movq	112+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,40-128(%rbp)
+	movq	112+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,6(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,48(%rbp)
+	movq	128+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,48-128(%rbp)
+	movq	128+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,7(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,56(%rbp)
+	movq	144+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,56-128(%rbp)
+	movq	144+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,8(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,64(%rbp)
+	movq	160+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,64-128(%rbp)
+	movq	160+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,9(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,72(%rbp)
+	movq	176+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,72-128(%rbp)
+	movq	176+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,10(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,80(%rbp)
+	movq	192+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,80-128(%rbp)
+	movq	192+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,11(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,88(%rbp)
+	movq	208+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,88-128(%rbp)
+	movq	208+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,12(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,96(%rbp)
+	movq	224+0-128(%rsi),%r8
+	shlb	$4,%dl
+	movq	%rax,96-128(%rbp)
+	movq	224+8-128(%rsi),%rax
+	shlq	$60,%r10
+	movb	%dl,13(%rsp)
+	orq	%r10,%rbx
+	movb	%al,%dl
+	shrq	$4,%rax
+	movq	%r8,%r10
+	shrq	$4,%r8
+	movq	%r9,104(%rbp)
+	movq	240+0-128(%rsi),%r9
+	shlb	$4,%dl
+	movq	%rbx,104-128(%rbp)
+	movq	240+8-128(%rsi),%rbx
+	shlq	$60,%r10
+	movb	%dl,14(%rsp)
+	orq	%r10,%rax
+	movb	%bl,%dl
+	shrq	$4,%rbx
+	movq	%r9,%r10
+	shrq	$4,%r9
+	movq	%r8,112(%rbp)
+	shlb	$4,%dl
+	movq	%rax,112-128(%rbp)
+	shlq	$60,%r10
+	movb	%dl,15(%rsp)
+	orq	%r10,%rbx
+	movq	%r9,120(%rbp)
+	movq	%rbx,120-128(%rbp)
+	addq	$-128,%rsi
+	movq	8(%rdi),%r8
+	movq	0(%rdi),%r9
+	addq	%r14,%r15
+	leaq	L$rem_8bit(%rip),%r11
+	jmp	L$outer_loop
+.p2align	4
+L$outer_loop:
+	xorq	(%r14),%r9
+	movq	8(%r14),%rdx
+	leaq	16(%r14),%r14
+	xorq	%r8,%rdx
+	movq	%r9,(%rdi)
+	movq	%rdx,8(%rdi)
+	shrq	$32,%rdx
+	xorq	%rax,%rax
+	roll	$8,%edx
+	movb	%dl,%al
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	shrl	$4,%ebx
+	roll	$8,%edx
+	movq	8(%rsi,%rax,1),%r8
+	movq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	8(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	4(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	0(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	shrl	$4,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r12,2),%r12
+	movzbl	%dl,%ebx
+	shlb	$4,%al
+	movzbq	(%rsp,%rcx,1),%r13
+	shrl	$4,%ebx
+	shlq	$48,%r12
+	xorq	%r8,%r13
+	movq	%r9,%r10
+	xorq	%r12,%r9
+	shrq	$8,%r8
+	movzbq	%r13b,%r13
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rcx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rcx,8),%r9
+	roll	$8,%edx
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	movb	%dl,%al
+	xorq	%r10,%r8
+	movzwq	(%r11,%r13,2),%r13
+	movzbl	%dl,%ecx
+	shlb	$4,%al
+	movzbq	(%rsp,%rbx,1),%r12
+	andl	$240,%ecx
+	shlq	$48,%r13
+	xorq	%r8,%r12
+	movq	%r9,%r10
+	xorq	%r13,%r9
+	shrq	$8,%r8
+	movzbq	%r12b,%r12
+	movl	-4(%rdi),%edx
+	shrq	$8,%r9
+	xorq	-128(%rbp,%rbx,8),%r8
+	shlq	$56,%r10
+	xorq	(%rbp,%rbx,8),%r9
+	movzwq	(%r11,%r12,2),%r12
+	xorq	8(%rsi,%rax,1),%r8
+	xorq	(%rsi,%rax,1),%r9
+	shlq	$48,%r12
+	xorq	%r10,%r8
+	xorq	%r12,%r9
+	movzbq	%r8b,%r13
+	shrq	$4,%r8
+	movq	%r9,%r10
+	shlb	$4,%r13b
+	shrq	$4,%r9
+	xorq	8(%rsi,%rcx,1),%r8
+	movzwq	(%r11,%r13,2),%r13
+	shlq	$60,%r10
+	xorq	(%rsi,%rcx,1),%r9
+	xorq	%r10,%r8
+	shlq	$48,%r13
+	bswapq	%r8
+	xorq	%r13,%r9
+	bswapq	%r9
+	cmpq	%r15,%r14
+	jb	L$outer_loop
+	movq	%r8,8(%rdi)
+	movq	%r9,(%rdi)
+
+	leaq	280(%rsp),%rsi
+	movq	0(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$ghash_epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_gcm_init_clmul
+.private_extern _gcm_init_clmul
+
+.p2align	4
+_gcm_init_clmul:
+L$_init_clmul:
+	movdqu	(%rsi),%xmm2
+	pshufd	$78,%xmm2,%xmm2
+
+
+	pshufd	$255,%xmm2,%xmm4
+	movdqa	%xmm2,%xmm3
+	psllq	$1,%xmm2
+	pxor	%xmm5,%xmm5
+	psrlq	$63,%xmm3
+	pcmpgtd	%xmm4,%xmm5
+	pslldq	$8,%xmm3
+	por	%xmm3,%xmm2
+
+
+	pand	L$0x1c2_polynomial(%rip),%xmm5
+	pxor	%xmm5,%xmm2
+
+
+	pshufd	$78,%xmm2,%xmm6
+	movdqa	%xmm2,%xmm0
+	pxor	%xmm2,%xmm6
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm2,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm2,%xmm3
+	movdqu	%xmm2,0(%rdi)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,16(%rdi)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,32(%rdi)
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm0,%xmm5
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,222,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	pshufd	$78,%xmm5,%xmm3
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm5,%xmm3
+	movdqu	%xmm5,48(%rdi)
+	pxor	%xmm0,%xmm4
+	movdqu	%xmm0,64(%rdi)
+.byte	102,15,58,15,227,8
+	movdqu	%xmm4,80(%rdi)
+	.byte	0xf3,0xc3
+
+.globl	_gcm_gmult_clmul
+.private_extern _gcm_gmult_clmul
+
+.p2align	4
+_gcm_gmult_clmul:
+L$_gmult_clmul:
+	movdqu	(%rdi),%xmm0
+	movdqa	L$bswap_mask(%rip),%xmm5
+	movdqu	(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm4
+.byte	102,15,56,0,197
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,220,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+.byte	102,15,56,0,197
+	movdqu	%xmm0,(%rdi)
+	.byte	0xf3,0xc3
+
+.globl	_gcm_ghash_clmul
+.private_extern _gcm_ghash_clmul
+
+.p2align	5
+_gcm_ghash_clmul:
+L$_ghash_clmul:
+	movdqa	L$bswap_mask(%rip),%xmm10
+
+	movdqu	(%rdi),%xmm0
+	movdqu	(%rsi),%xmm2
+	movdqu	32(%rsi),%xmm7
+.byte	102,65,15,56,0,194
+
+	subq	$16,%rcx
+	jz	L$odd_tail
+
+	movdqu	16(%rsi),%xmm6
+	movl	_OPENSSL_ia32cap_P+4(%rip),%eax
+	cmpq	$48,%rcx
+	jb	L$skip4x
+
+	andl	$71303168,%eax
+	cmpl	$4194304,%eax
+	je	L$skip4x
+
+	subq	$48,%rcx
+	movq	$11547335547999543296,%rax
+	movdqu	48(%rsi),%xmm14
+	movdqu	64(%rsi),%xmm15
+
+
+
+
+	movdqu	48(%rdx),%xmm3
+	movdqu	32(%rdx),%xmm11
+.byte	102,65,15,56,0,218
+.byte	102,69,15,56,0,218
+	movdqa	%xmm3,%xmm5
+	pshufd	$78,%xmm3,%xmm4
+	pxor	%xmm3,%xmm4
+.byte	102,15,58,68,218,0
+.byte	102,15,58,68,234,17
+.byte	102,15,58,68,231,0
+
+	movdqa	%xmm11,%xmm13
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm11,%xmm12
+.byte	102,68,15,58,68,222,0
+.byte	102,68,15,58,68,238,17
+.byte	102,68,15,58,68,231,16
+	xorps	%xmm11,%xmm3
+	xorps	%xmm13,%xmm5
+	movups	80(%rsi),%xmm7
+	xorps	%xmm12,%xmm4
+
+	movdqu	16(%rdx),%xmm11
+	movdqu	0(%rdx),%xmm8
+.byte	102,69,15,56,0,218
+.byte	102,69,15,56,0,194
+	movdqa	%xmm11,%xmm13
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm8,%xmm0
+	pxor	%xmm11,%xmm12
+.byte	102,69,15,58,68,222,0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm0,%xmm8
+.byte	102,69,15,58,68,238,17
+.byte	102,68,15,58,68,231,0
+	xorps	%xmm11,%xmm3
+	xorps	%xmm13,%xmm5
+
+	leaq	64(%rdx),%rdx
+	subq	$64,%rcx
+	jc	L$tail4x
+
+	jmp	L$mod4_loop
+.p2align	5
+L$mod4_loop:
+.byte	102,65,15,58,68,199,0
+	xorps	%xmm12,%xmm4
+	movdqu	48(%rdx),%xmm11
+.byte	102,69,15,56,0,218
+.byte	102,65,15,58,68,207,17
+	xorps	%xmm3,%xmm0
+	movdqu	32(%rdx),%xmm3
+	movdqa	%xmm11,%xmm13
+.byte	102,68,15,58,68,199,16
+	pshufd	$78,%xmm11,%xmm12
+	xorps	%xmm5,%xmm1
+	pxor	%xmm11,%xmm12
+.byte	102,65,15,56,0,218
+	movups	32(%rsi),%xmm7
+	xorps	%xmm4,%xmm8
+.byte	102,68,15,58,68,218,0
+	pshufd	$78,%xmm3,%xmm4
+
+	pxor	%xmm0,%xmm8
+	movdqa	%xmm3,%xmm5
+	pxor	%xmm1,%xmm8
+	pxor	%xmm3,%xmm4
+	movdqa	%xmm8,%xmm9
+.byte	102,68,15,58,68,234,17
+	pslldq	$8,%xmm8
+	psrldq	$8,%xmm9
+	pxor	%xmm8,%xmm0
+	movdqa	L$7_mask(%rip),%xmm8
+	pxor	%xmm9,%xmm1
+.byte	102,76,15,110,200
+
+	pand	%xmm0,%xmm8
+.byte	102,69,15,56,0,200
+	pxor	%xmm0,%xmm9
+.byte	102,68,15,58,68,231,0
+	psllq	$57,%xmm9
+	movdqa	%xmm9,%xmm8
+	pslldq	$8,%xmm9
+.byte	102,15,58,68,222,0
+	psrldq	$8,%xmm8
+	pxor	%xmm9,%xmm0
+	pxor	%xmm8,%xmm1
+	movdqu	0(%rdx),%xmm8
+
+	movdqa	%xmm0,%xmm9
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,238,17
+	xorps	%xmm11,%xmm3
+	movdqu	16(%rdx),%xmm11
+.byte	102,69,15,56,0,218
+.byte	102,15,58,68,231,16
+	xorps	%xmm13,%xmm5
+	movups	80(%rsi),%xmm7
+.byte	102,69,15,56,0,194
+	pxor	%xmm9,%xmm1
+	pxor	%xmm0,%xmm9
+	psrlq	$5,%xmm0
+
+	movdqa	%xmm11,%xmm13
+	pxor	%xmm12,%xmm4
+	pshufd	$78,%xmm11,%xmm12
+	pxor	%xmm9,%xmm0
+	pxor	%xmm8,%xmm1
+	pxor	%xmm11,%xmm12
+.byte	102,69,15,58,68,222,0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	movdqa	%xmm0,%xmm1
+.byte	102,69,15,58,68,238,17
+	xorps	%xmm11,%xmm3
+	pshufd	$78,%xmm0,%xmm8
+	pxor	%xmm0,%xmm8
+
+.byte	102,68,15,58,68,231,0
+	xorps	%xmm13,%xmm5
+
+	leaq	64(%rdx),%rdx
+	subq	$64,%rcx
+	jnc	L$mod4_loop
+
+L$tail4x:
+.byte	102,65,15,58,68,199,0
+.byte	102,65,15,58,68,207,17
+.byte	102,68,15,58,68,199,16
+	xorps	%xmm12,%xmm4
+	xorps	%xmm3,%xmm0
+	xorps	%xmm5,%xmm1
+	pxor	%xmm0,%xmm1
+	pxor	%xmm4,%xmm8
+
+	pxor	%xmm1,%xmm8
+	pxor	%xmm0,%xmm1
+
+	movdqa	%xmm8,%xmm9
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm9
+	pxor	%xmm8,%xmm1
+	pxor	%xmm9,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	addq	$64,%rcx
+	jz	L$done
+	movdqu	32(%rsi),%xmm7
+	subq	$16,%rcx
+	jz	L$odd_tail
+L$skip4x:
+
+
+
+
+
+	movdqu	(%rdx),%xmm8
+	movdqu	16(%rdx),%xmm3
+.byte	102,69,15,56,0,194
+.byte	102,65,15,56,0,218
+	pxor	%xmm8,%xmm0
+
+	movdqa	%xmm3,%xmm5
+	pshufd	$78,%xmm3,%xmm4
+	pxor	%xmm3,%xmm4
+.byte	102,15,58,68,218,0
+.byte	102,15,58,68,234,17
+.byte	102,15,58,68,231,0
+
+	leaq	32(%rdx),%rdx
+	nop
+	subq	$32,%rcx
+	jbe	L$even_tail
+	nop
+	jmp	L$mod_loop
+
+.p2align	5
+L$mod_loop:
+	movdqa	%xmm0,%xmm1
+	movdqa	%xmm4,%xmm8
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm0,%xmm4
+
+.byte	102,15,58,68,198,0
+.byte	102,15,58,68,206,17
+.byte	102,15,58,68,231,16
+
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm1
+	movdqu	(%rdx),%xmm9
+	pxor	%xmm0,%xmm8
+.byte	102,69,15,56,0,202
+	movdqu	16(%rdx),%xmm3
+
+	pxor	%xmm1,%xmm8
+	pxor	%xmm9,%xmm1
+	pxor	%xmm8,%xmm4
+.byte	102,65,15,56,0,218
+	movdqa	%xmm4,%xmm8
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm3,%xmm5
+
+	movdqa	%xmm0,%xmm9
+	movdqa	%xmm0,%xmm8
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm8
+.byte	102,15,58,68,218,0
+	psllq	$1,%xmm0
+	pxor	%xmm8,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm8
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm8
+	pxor	%xmm9,%xmm0
+	pshufd	$78,%xmm5,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm5,%xmm4
+
+	movdqa	%xmm0,%xmm9
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,234,17
+	pxor	%xmm9,%xmm1
+	pxor	%xmm0,%xmm9
+	psrlq	$5,%xmm0
+	pxor	%xmm9,%xmm0
+	leaq	32(%rdx),%rdx
+	psrlq	$1,%xmm0
+.byte	102,15,58,68,231,0
+	pxor	%xmm1,%xmm0
+
+	subq	$32,%rcx
+	ja	L$mod_loop
+
+L$even_tail:
+	movdqa	%xmm0,%xmm1
+	movdqa	%xmm4,%xmm8
+	pshufd	$78,%xmm0,%xmm4
+	pxor	%xmm0,%xmm4
+
+.byte	102,15,58,68,198,0
+.byte	102,15,58,68,206,17
+.byte	102,15,58,68,231,16
+
+	pxor	%xmm3,%xmm0
+	pxor	%xmm5,%xmm1
+	pxor	%xmm0,%xmm8
+	pxor	%xmm1,%xmm8
+	pxor	%xmm8,%xmm4
+	movdqa	%xmm4,%xmm8
+	psrldq	$8,%xmm8
+	pslldq	$8,%xmm4
+	pxor	%xmm8,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+	testq	%rcx,%rcx
+	jnz	L$done
+
+L$odd_tail:
+	movdqu	(%rdx),%xmm8
+.byte	102,69,15,56,0,194
+	pxor	%xmm8,%xmm0
+	movdqa	%xmm0,%xmm1
+	pshufd	$78,%xmm0,%xmm3
+	pxor	%xmm0,%xmm3
+.byte	102,15,58,68,194,0
+.byte	102,15,58,68,202,17
+.byte	102,15,58,68,223,0
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+
+	movdqa	%xmm3,%xmm4
+	psrldq	$8,%xmm3
+	pslldq	$8,%xmm4
+	pxor	%xmm3,%xmm1
+	pxor	%xmm4,%xmm0
+
+	movdqa	%xmm0,%xmm4
+	movdqa	%xmm0,%xmm3
+	psllq	$5,%xmm0
+	pxor	%xmm0,%xmm3
+	psllq	$1,%xmm0
+	pxor	%xmm3,%xmm0
+	psllq	$57,%xmm0
+	movdqa	%xmm0,%xmm3
+	pslldq	$8,%xmm0
+	psrldq	$8,%xmm3
+	pxor	%xmm4,%xmm0
+	pxor	%xmm3,%xmm1
+
+
+	movdqa	%xmm0,%xmm4
+	psrlq	$1,%xmm0
+	pxor	%xmm4,%xmm1
+	pxor	%xmm0,%xmm4
+	psrlq	$5,%xmm0
+	pxor	%xmm4,%xmm0
+	psrlq	$1,%xmm0
+	pxor	%xmm1,%xmm0
+L$done:
+.byte	102,65,15,56,0,194
+	movdqu	%xmm0,(%rdi)
+	.byte	0xf3,0xc3
+
+.globl	_gcm_init_avx
+.private_extern _gcm_init_avx
+
+.p2align	5
+_gcm_init_avx:
+	jmp	L$_init_clmul
+
+.globl	_gcm_gmult_avx
+.private_extern _gcm_gmult_avx
+
+.p2align	5
+_gcm_gmult_avx:
+	jmp	L$_gmult_clmul
+
+.globl	_gcm_ghash_avx
+.private_extern _gcm_ghash_avx
+
+.p2align	5
+_gcm_ghash_avx:
+	jmp	L$_ghash_clmul
+
+.p2align	6
+L$bswap_mask:
+.byte	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+L$0x1c2_polynomial:
+.byte	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
+L$7_mask:
+.long	7,0,7,0
+L$7_mask_poly:
+.long	7,0,450,0
+.p2align	6
+
+L$rem_4bit:
+.long	0,0,0,471859200,0,943718400,0,610271232
+.long	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+.long	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+.long	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+
+L$rem_8bit:
+.value	0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
+.value	0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
+.value	0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E
+.value	0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E
+.value	0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E
+.value	0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E
+.value	0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E
+.value	0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E
+.value	0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE
+.value	0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE
+.value	0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE
+.value	0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE
+.value	0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E
+.value	0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E
+.value	0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE
+.value	0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE
+.value	0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E
+.value	0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E
+.value	0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E
+.value	0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E
+.value	0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E
+.value	0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E
+.value	0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E
+.value	0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E
+.value	0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE
+.value	0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE
+.value	0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE
+.value	0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE
+.value	0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E
+.value	0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E
+.value	0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE
+.value	0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
+
+.byte	71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.p2align	6
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S
new file mode 100644
index 0000000..f0df296
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/rand/rdrand-x86_64.S
@@ -0,0 +1,48 @@
+#if defined(__x86_64__)
+.text	
+
+
+
+
+.globl	_CRYPTO_rdrand
+.private_extern _CRYPTO_rdrand
+
+.p2align	4
+_CRYPTO_rdrand:
+	xorq	%rax,%rax
+
+
+.byte	0x48, 0x0f, 0xc7, 0xf1
+
+	adcq	%rax,%rax
+	movq	%rcx,0(%rdi)
+	.byte	0xf3,0xc3
+
+
+
+
+
+.globl	_CRYPTO_rdrand_multiple8_buf
+.private_extern _CRYPTO_rdrand_multiple8_buf
+
+.p2align	4
+_CRYPTO_rdrand_multiple8_buf:
+	testq	%rsi,%rsi
+	jz	L$out
+	movq	$8,%rdx
+L$loop:
+
+
+.byte	0x48, 0x0f, 0xc7, 0xf1
+	jnc	L$err
+	movq	%rcx,0(%rdi)
+	addq	%rdx,%rdi
+	subq	%rdx,%rsi
+	jnz	L$loop
+L$out:
+	movq	$1,%rax
+	.byte	0xf3,0xc3
+L$err:
+	xorq	%rax,%rax
+	.byte	0xf3,0xc3
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S
new file mode 100644
index 0000000..31ee7d2
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-md5-x86_64.S
@@ -0,0 +1,1262 @@
+#if defined(__x86_64__)
+.text	
+.p2align	4
+
+.globl	_rc4_md5_enc
+.private_extern _rc4_md5_enc
+
+_rc4_md5_enc:
+	cmpq	$0,%r9
+	je	L$abort
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	subq	$40,%rsp
+L$body:
+	movq	%rcx,%r11
+	movq	%r9,%r12
+	movq	%rsi,%r13
+	movq	%rdx,%r14
+	movq	%r8,%r15
+	xorq	%rbp,%rbp
+	xorq	%rcx,%rcx
+
+	leaq	8(%rdi),%rdi
+	movb	-8(%rdi),%bpl
+	movb	-4(%rdi),%cl
+
+	incb	%bpl
+	subq	%r13,%r14
+	movl	(%rdi,%rbp,4),%eax
+	addb	%al,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	shlq	$6,%r12
+	addq	%r15,%r12
+	movq	%r12,16(%rsp)
+
+	movq	%r11,24(%rsp)
+	movl	0(%r11),%r8d
+	movl	4(%r11),%r9d
+	movl	8(%r11),%r10d
+	movl	12(%r11),%r11d
+	jmp	L$oop
+
+.p2align	4
+L$oop:
+	movl	%r8d,0(%rsp)
+	movl	%r9d,4(%rsp)
+	movl	%r10d,8(%rsp)
+	movl	%r11d,%r12d
+	movl	%r11d,12(%rsp)
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	0(%r15),%r8d
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	addl	$3614090360,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	4(%r15),%r11d
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	addl	$3905402710,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,4(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	8(%r15),%r10d
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	addl	$606105819,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,8(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	12(%r15),%r9d
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	addl	$3250441966,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,12(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	16(%r15),%r8d
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	addl	$4118548399,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,16(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	20(%r15),%r11d
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	addl	$1200080426,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,20(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	24(%r15),%r10d
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	addl	$2821735955,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,24(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	28(%r15),%r9d
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	addl	$4249261313,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,28(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	32(%r15),%r8d
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	addl	$1770035416,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,32(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	36(%r15),%r11d
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	addl	$2336552879,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,36(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	40(%r15),%r10d
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	addl	$4294925233,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,40(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	44(%r15),%r9d
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	addl	$2304563134,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,44(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	48(%r15),%r8d
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	addl	$1804603682,%r8d
+	xorl	%r11d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,48(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$7,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	52(%r15),%r11d
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	addl	$4254626195,%r11d
+	xorl	%r10d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,52(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$12,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	56(%r15),%r10d
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	addl	$2792965006,%r10d
+	xorl	%r9d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,56(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$17,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	(%r13),%xmm2
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	60(%r15),%r9d
+	addb	%dl,%bl
+	movl	64(%rsi),%eax
+	addl	$1236535329,%r9d
+	xorl	%r8d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,60(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$22,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm2
+	pxor	%xmm1,%xmm2
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	4(%r15),%r8d
+	addb	%dl,%al
+	movl	68(%rsi),%ebx
+	addl	$4129170786,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,64(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	24(%r15),%r11d
+	addb	%dl,%bl
+	movl	72(%rsi),%eax
+	addl	$3225465664,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,68(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	44(%r15),%r10d
+	addb	%dl,%al
+	movl	76(%rsi),%ebx
+	addl	$643717713,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,72(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	0(%r15),%r9d
+	addb	%dl,%bl
+	movl	80(%rsi),%eax
+	addl	$3921069994,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,76(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	20(%r15),%r8d
+	addb	%dl,%al
+	movl	84(%rsi),%ebx
+	addl	$3593408605,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,80(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	40(%r15),%r11d
+	addb	%dl,%bl
+	movl	88(%rsi),%eax
+	addl	$38016083,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,84(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	60(%r15),%r10d
+	addb	%dl,%al
+	movl	92(%rsi),%ebx
+	addl	$3634488961,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,88(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	16(%r15),%r9d
+	addb	%dl,%bl
+	movl	96(%rsi),%eax
+	addl	$3889429448,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,92(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	36(%r15),%r8d
+	addb	%dl,%al
+	movl	100(%rsi),%ebx
+	addl	$568446438,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,96(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	56(%r15),%r11d
+	addb	%dl,%bl
+	movl	104(%rsi),%eax
+	addl	$3275163606,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,100(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	12(%r15),%r10d
+	addb	%dl,%al
+	movl	108(%rsi),%ebx
+	addl	$4107603335,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,104(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	32(%r15),%r9d
+	addb	%dl,%bl
+	movl	112(%rsi),%eax
+	addl	$1163531501,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,108(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r10d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r11d,%r12d
+	addl	52(%r15),%r8d
+	addb	%dl,%al
+	movl	116(%rsi),%ebx
+	addl	$2850285829,%r8d
+	xorl	%r10d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,112(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$5,%r8d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r10d,%r12d
+	addl	8(%r15),%r11d
+	addb	%dl,%bl
+	movl	120(%rsi),%eax
+	addl	$4243563512,%r11d
+	xorl	%r9d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,116(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$9,%r11d
+	movl	%r8d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	andl	%r9d,%r12d
+	addl	28(%r15),%r10d
+	addb	%dl,%al
+	movl	124(%rsi),%ebx
+	addl	$1735328473,%r10d
+	xorl	%r8d,%r12d
+	movzbl	%al,%eax
+	movl	%edx,120(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$14,%r10d
+	movl	%r11d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	16(%r13),%xmm3
+	addb	$32,%bpl
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	andl	%r8d,%r12d
+	addl	48(%r15),%r9d
+	addb	%dl,%bl
+	movl	0(%rdi,%rbp,4),%eax
+	addl	$2368359562,%r9d
+	xorl	%r11d,%r12d
+	movzbl	%bl,%ebx
+	movl	%edx,124(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$20,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movq	%rcx,%rsi
+	xorq	%rcx,%rcx
+	movb	%sil,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm3
+	pxor	%xmm1,%xmm3
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	20(%r15),%r8d
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	addl	$4294588738,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,0(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	32(%r15),%r11d
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	addl	$2272392833,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,4(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	44(%r15),%r10d
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	addl	$1839030562,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,8(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	56(%r15),%r9d
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	addl	$4259657740,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,12(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	4(%r15),%r8d
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	addl	$2763975236,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,16(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	16(%r15),%r11d
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	addl	$1272893353,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,20(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	28(%r15),%r10d
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	addl	$4139469664,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,24(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	40(%r15),%r9d
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	addl	$3200236656,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,28(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	52(%r15),%r8d
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	addl	$681279174,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,32(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	0(%r15),%r11d
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	addl	$3936430074,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,36(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	12(%r15),%r10d
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	addl	$3572445317,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,40(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	24(%r15),%r9d
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	addl	$76029189,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,44(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	%r11d,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r9d,%r12d
+	addl	36(%r15),%r8d
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	addl	$3654602809,%r8d
+	movzbl	%al,%eax
+	addl	%r12d,%r8d
+	movl	%edx,48(%rsi)
+	addb	%bl,%cl
+	roll	$4,%r8d
+	movl	%r10d,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r8d,%r12d
+	addl	48(%r15),%r11d
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	addl	$3873151461,%r11d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r11d
+	movl	%edx,52(%rsi)
+	addb	%al,%cl
+	roll	$11,%r11d
+	movl	%r9d,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	xorl	%r11d,%r12d
+	addl	60(%r15),%r10d
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	addl	$530742520,%r10d
+	movzbl	%al,%eax
+	addl	%r12d,%r10d
+	movl	%edx,56(%rsi)
+	addb	%bl,%cl
+	roll	$16,%r10d
+	movl	%r8d,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	32(%r13),%xmm4
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	xorl	%r10d,%r12d
+	addl	8(%r15),%r9d
+	addb	%dl,%bl
+	movl	64(%rsi),%eax
+	addl	$3299628645,%r9d
+	movzbl	%bl,%ebx
+	addl	%r12d,%r9d
+	movl	%edx,60(%rsi)
+	addb	%al,%cl
+	roll	$23,%r9d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm4
+	pxor	%xmm1,%xmm4
+	pxor	%xmm0,%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	0(%r15),%r8d
+	addb	%dl,%al
+	movl	68(%rsi),%ebx
+	addl	$4096336452,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,64(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	movd	(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	pxor	%xmm1,%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	28(%r15),%r11d
+	addb	%dl,%bl
+	movl	72(%rsi),%eax
+	addl	$1126891415,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,68(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	movd	(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	56(%r15),%r10d
+	addb	%dl,%al
+	movl	76(%rsi),%ebx
+	addl	$2878612391,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,72(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	20(%r15),%r9d
+	addb	%dl,%bl
+	movl	80(%rsi),%eax
+	addl	$4237533241,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,76(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	48(%r15),%r8d
+	addb	%dl,%al
+	movl	84(%rsi),%ebx
+	addl	$1700485571,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,80(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	12(%r15),%r11d
+	addb	%dl,%bl
+	movl	88(%rsi),%eax
+	addl	$2399980690,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,84(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	40(%r15),%r10d
+	addb	%dl,%al
+	movl	92(%rsi),%ebx
+	addl	$4293915773,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,88(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	4(%r15),%r9d
+	addb	%dl,%bl
+	movl	96(%rsi),%eax
+	addl	$2240044497,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,92(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	32(%r15),%r8d
+	addb	%dl,%al
+	movl	100(%rsi),%ebx
+	addl	$1873313359,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,96(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	60(%r15),%r11d
+	addb	%dl,%bl
+	movl	104(%rsi),%eax
+	addl	$4264355552,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,100(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	24(%r15),%r10d
+	addb	%dl,%al
+	movl	108(%rsi),%ebx
+	addl	$2734768916,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,104(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	52(%r15),%r9d
+	addb	%dl,%bl
+	movl	112(%rsi),%eax
+	addl	$1309151649,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,108(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r11d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r9d,%r12d
+	addl	16(%r15),%r8d
+	addb	%dl,%al
+	movl	116(%rsi),%ebx
+	addl	$4149444226,%r8d
+	movzbl	%al,%eax
+	xorl	%r10d,%r12d
+	movl	%edx,112(%rsi)
+	addl	%r12d,%r8d
+	addb	%bl,%cl
+	roll	$6,%r8d
+	movl	$-1,%r12d
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+
+	addl	%r9d,%r8d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r10d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r8d,%r12d
+	addl	44(%r15),%r11d
+	addb	%dl,%bl
+	movl	120(%rsi),%eax
+	addl	$3174756917,%r11d
+	movzbl	%bl,%ebx
+	xorl	%r9d,%r12d
+	movl	%edx,116(%rsi)
+	addl	%r12d,%r11d
+	addb	%al,%cl
+	roll	$10,%r11d
+	movl	$-1,%r12d
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+
+	addl	%r8d,%r11d
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r9d,%r12d
+	movl	%eax,(%rdi,%rcx,4)
+	orl	%r11d,%r12d
+	addl	8(%r15),%r10d
+	addb	%dl,%al
+	movl	124(%rsi),%ebx
+	addl	$718787259,%r10d
+	movzbl	%al,%eax
+	xorl	%r8d,%r12d
+	movl	%edx,120(%rsi)
+	addl	%r12d,%r10d
+	addb	%bl,%cl
+	roll	$15,%r10d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+
+	addl	%r11d,%r10d
+	movdqu	48(%r13),%xmm5
+	addb	$32,%bpl
+	movl	(%rdi,%rcx,4),%edx
+	xorl	%r8d,%r12d
+	movl	%ebx,(%rdi,%rcx,4)
+	orl	%r10d,%r12d
+	addl	36(%r15),%r9d
+	addb	%dl,%bl
+	movl	0(%rdi,%rbp,4),%eax
+	addl	$3951481745,%r9d
+	movzbl	%bl,%ebx
+	xorl	%r11d,%r12d
+	movl	%edx,124(%rsi)
+	addl	%r12d,%r9d
+	addb	%al,%cl
+	roll	$21,%r9d
+	movl	$-1,%r12d
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+
+	addl	%r10d,%r9d
+	movq	%rbp,%rsi
+	xorq	%rbp,%rbp
+	movb	%sil,%bpl
+	movq	%rcx,%rsi
+	xorq	%rcx,%rcx
+	movb	%sil,%cl
+	leaq	(%rdi,%rbp,4),%rsi
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm5
+	pxor	%xmm1,%xmm5
+	addl	0(%rsp),%r8d
+	addl	4(%rsp),%r9d
+	addl	8(%rsp),%r10d
+	addl	12(%rsp),%r11d
+
+	movdqu	%xmm2,(%r14,%r13,1)
+	movdqu	%xmm3,16(%r14,%r13,1)
+	movdqu	%xmm4,32(%r14,%r13,1)
+	movdqu	%xmm5,48(%r14,%r13,1)
+	leaq	64(%r15),%r15
+	leaq	64(%r13),%r13
+	cmpq	16(%rsp),%r15
+	jb	L$oop
+
+	movq	24(%rsp),%r12
+	subb	%al,%cl
+	movl	%r8d,0(%r12)
+	movl	%r9d,4(%r12)
+	movl	%r10d,8(%r12)
+	movl	%r11d,12(%r12)
+	subb	$1,%bpl
+	movl	%ebp,-8(%rdi)
+	movl	%ecx,-4(%rdi)
+
+	movq	40(%rsp),%r15
+	movq	48(%rsp),%r14
+	movq	56(%rsp),%r13
+	movq	64(%rsp),%r12
+	movq	72(%rsp),%rbp
+	movq	80(%rsp),%rbx
+	leaq	88(%rsp),%rsp
+L$epilogue:
+L$abort:
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S
new file mode 100644
index 0000000..7808184
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/rc4/rc4-x86_64.S
@@ -0,0 +1,595 @@
+#if defined(__x86_64__)
+.text	
+
+
+.globl	_asm_RC4
+.private_extern _asm_RC4
+
+.p2align	4
+_asm_RC4:
+	orq	%rsi,%rsi
+	jne	L$entry
+	.byte	0xf3,0xc3
+L$entry:
+	pushq	%rbx
+	pushq	%r12
+	pushq	%r13
+L$prologue:
+	movq	%rsi,%r11
+	movq	%rdx,%r12
+	movq	%rcx,%r13
+	xorq	%r10,%r10
+	xorq	%rcx,%rcx
+
+	leaq	8(%rdi),%rdi
+	movb	-8(%rdi),%r10b
+	movb	-4(%rdi),%cl
+	cmpl	$-1,256(%rdi)
+	je	L$RC4_CHAR
+	movl	_OPENSSL_ia32cap_P(%rip),%r8d
+	xorq	%rbx,%rbx
+	incb	%r10b
+	subq	%r10,%rbx
+	subq	%r12,%r13
+	movl	(%rdi,%r10,4),%eax
+	testq	$-16,%r11
+	jz	L$loop1
+	btl	$30,%r8d
+	jc	L$intel
+	andq	$7,%rbx
+	leaq	1(%r10),%rsi
+	jz	L$oop8
+	subq	%rbx,%r11
+L$oop8_warmup:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%rbx
+	jnz	L$oop8_warmup
+
+	leaq	1(%r10),%rsi
+	jmp	L$oop8
+.p2align	4
+L$oop8:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	0(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,0(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	4(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,4(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	8(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,8(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	12(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,12(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	16(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,16(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	20(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,20(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	24(%rdi,%rsi,4),%ebx
+	rorq	$8,%r8
+	movl	%edx,24(%rdi,%r10,4)
+	addb	%al,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	$8,%sil
+	addb	%bl,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	movl	-4(%rdi,%rsi,4),%eax
+	rorq	$8,%r8
+	movl	%edx,28(%rdi,%r10,4)
+	addb	%bl,%dl
+	movb	(%rdi,%rdx,4),%r8b
+	addb	$8,%r10b
+	rorq	$8,%r8
+	subq	$8,%r11
+
+	xorq	(%r12),%r8
+	movq	%r8,(%r12,%r13,1)
+	leaq	8(%r12),%r12
+
+	testq	$-8,%r11
+	jnz	L$oop8
+	cmpq	$0,%r11
+	jne	L$loop1
+	jmp	L$exit
+
+.p2align	4
+L$intel:
+	testq	$-32,%r11
+	jz	L$loop1
+	andq	$15,%rbx
+	jz	L$oop16_is_hot
+	subq	%rbx,%r11
+L$oop16_warmup:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%rbx
+	jnz	L$oop16_warmup
+
+	movq	%rcx,%rbx
+	xorq	%rcx,%rcx
+	movb	%bl,%cl
+
+L$oop16_is_hot:
+	leaq	(%rdi,%r10,4),%rsi
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm0,%xmm0
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	addb	%bl,%cl
+	pinsrw	$0,(%rdi,%rax,4),%xmm0
+	jmp	L$oop16_enter
+.p2align	4
+L$oop16:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm0,%xmm2
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm0
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	4(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,0(%rsi)
+	pxor	%xmm1,%xmm2
+	addb	%bl,%cl
+	pinsrw	$0,(%rdi,%rax,4),%xmm0
+	movdqu	%xmm2,(%r12,%r13,1)
+	leaq	16(%r12),%r12
+L$oop16_enter:
+	movl	(%rdi,%rcx,4),%edx
+	pxor	%xmm1,%xmm1
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	8(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,4(%rsi)
+	addb	%al,%cl
+	pinsrw	$0,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	12(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,8(%rsi)
+	addb	%bl,%cl
+	pinsrw	$1,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	16(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,12(%rsi)
+	addb	%al,%cl
+	pinsrw	$1,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	20(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,16(%rsi)
+	addb	%bl,%cl
+	pinsrw	$2,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	24(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,20(%rsi)
+	addb	%al,%cl
+	pinsrw	$2,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	28(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,24(%rsi)
+	addb	%bl,%cl
+	pinsrw	$3,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	32(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,28(%rsi)
+	addb	%al,%cl
+	pinsrw	$3,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	36(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,32(%rsi)
+	addb	%bl,%cl
+	pinsrw	$4,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	40(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,36(%rsi)
+	addb	%al,%cl
+	pinsrw	$4,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	44(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,40(%rsi)
+	addb	%bl,%cl
+	pinsrw	$5,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	48(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,44(%rsi)
+	addb	%al,%cl
+	pinsrw	$5,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	52(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,48(%rsi)
+	addb	%bl,%cl
+	pinsrw	$6,(%rdi,%rax,4),%xmm0
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movl	56(%rsi),%eax
+	movzbl	%bl,%ebx
+	movl	%edx,52(%rsi)
+	addb	%al,%cl
+	pinsrw	$6,(%rdi,%rbx,4),%xmm1
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	addb	%dl,%al
+	movl	60(%rsi),%ebx
+	movzbl	%al,%eax
+	movl	%edx,56(%rsi)
+	addb	%bl,%cl
+	pinsrw	$7,(%rdi,%rax,4),%xmm0
+	addb	$16,%r10b
+	movdqu	(%r12),%xmm2
+	movl	(%rdi,%rcx,4),%edx
+	movl	%ebx,(%rdi,%rcx,4)
+	addb	%dl,%bl
+	movzbl	%bl,%ebx
+	movl	%edx,60(%rsi)
+	leaq	(%rdi,%r10,4),%rsi
+	pinsrw	$7,(%rdi,%rbx,4),%xmm1
+	movl	(%rsi),%eax
+	movq	%rcx,%rbx
+	xorq	%rcx,%rcx
+	subq	$16,%r11
+	movb	%bl,%cl
+	testq	$-16,%r11
+	jnz	L$oop16
+
+	psllq	$8,%xmm1
+	pxor	%xmm0,%xmm2
+	pxor	%xmm1,%xmm2
+	movdqu	%xmm2,(%r12,%r13,1)
+	leaq	16(%r12),%r12
+
+	cmpq	$0,%r11
+	jne	L$loop1
+	jmp	L$exit
+
+.p2align	4
+L$loop1:
+	addb	%al,%cl
+	movl	(%rdi,%rcx,4),%edx
+	movl	%eax,(%rdi,%rcx,4)
+	movl	%edx,(%rdi,%r10,4)
+	addb	%dl,%al
+	incb	%r10b
+	movl	(%rdi,%rax,4),%edx
+	movl	(%rdi,%r10,4),%eax
+	xorb	(%r12),%dl
+	movb	%dl,(%r12,%r13,1)
+	leaq	1(%r12),%r12
+	decq	%r11
+	jnz	L$loop1
+	jmp	L$exit
+
+.p2align	4
+L$RC4_CHAR:
+	addb	$1,%r10b
+	movzbl	(%rdi,%r10,1),%eax
+	testq	$-8,%r11
+	jz	L$cloop1
+	jmp	L$cloop8
+.p2align	4
+L$cloop8:
+	movl	(%r12),%r8d
+	movl	4(%r12),%r9d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	L$cmov0
+	movq	%rax,%rbx
+L$cmov0:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	L$cmov1
+	movq	%rbx,%rax
+L$cmov1:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	L$cmov2
+	movq	%rax,%rbx
+L$cmov2:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	L$cmov3
+	movq	%rbx,%rax
+L$cmov3:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r8b
+	rorl	$8,%r8d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	L$cmov4
+	movq	%rax,%rbx
+L$cmov4:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	L$cmov5
+	movq	%rbx,%rax
+L$cmov5:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%al,%cl
+	leaq	1(%r10),%rsi
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%sil,%esi
+	movzbl	(%rdi,%rsi,1),%ebx
+	movb	%al,(%rdi,%rcx,1)
+	cmpq	%rsi,%rcx
+	movb	%dl,(%rdi,%r10,1)
+	jne	L$cmov6
+	movq	%rax,%rbx
+L$cmov6:
+	addb	%al,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	addb	%bl,%cl
+	leaq	1(%rsi),%r10
+	movzbl	(%rdi,%rcx,1),%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%r10,1),%eax
+	movb	%bl,(%rdi,%rcx,1)
+	cmpq	%r10,%rcx
+	movb	%dl,(%rdi,%rsi,1)
+	jne	L$cmov7
+	movq	%rbx,%rax
+L$cmov7:
+	addb	%bl,%dl
+	xorb	(%rdi,%rdx,1),%r9b
+	rorl	$8,%r9d
+	leaq	-8(%r11),%r11
+	movl	%r8d,(%r13)
+	leaq	8(%r12),%r12
+	movl	%r9d,4(%r13)
+	leaq	8(%r13),%r13
+
+	testq	$-8,%r11
+	jnz	L$cloop8
+	cmpq	$0,%r11
+	jne	L$cloop1
+	jmp	L$exit
+.p2align	4
+L$cloop1:
+	addb	%al,%cl
+	movzbl	%cl,%ecx
+	movzbl	(%rdi,%rcx,1),%edx
+	movb	%al,(%rdi,%rcx,1)
+	movb	%dl,(%rdi,%r10,1)
+	addb	%al,%dl
+	addb	$1,%r10b
+	movzbl	%dl,%edx
+	movzbl	%r10b,%r10d
+	movzbl	(%rdi,%rdx,1),%edx
+	movzbl	(%rdi,%r10,1),%eax
+	xorb	(%r12),%dl
+	leaq	1(%r12),%r12
+	movb	%dl,(%r13)
+	leaq	1(%r13),%r13
+	subq	$1,%r11
+	jnz	L$cloop1
+	jmp	L$exit
+
+.p2align	4
+L$exit:
+	subb	$1,%r10b
+	movl	%r10d,-8(%rdi)
+	movl	%ecx,-4(%rdi)
+
+	movq	(%rsp),%r13
+	movq	8(%rsp),%r12
+	movq	16(%rsp),%rbx
+	addq	$24,%rsp
+L$epilogue:
+	.byte	0xf3,0xc3
+
+.globl	_asm_RC4_set_key
+.private_extern _asm_RC4_set_key
+
+.p2align	4
+_asm_RC4_set_key:
+	leaq	8(%rdi),%rdi
+	leaq	(%rdx,%rsi,1),%rdx
+	negq	%rsi
+	movq	%rsi,%rcx
+	xorl	%eax,%eax
+	xorq	%r9,%r9
+	xorq	%r10,%r10
+	xorq	%r11,%r11
+
+	movl	_OPENSSL_ia32cap_P(%rip),%r8d
+	btl	$20,%r8d
+	jc	L$c1stloop
+	jmp	L$w1stloop
+
+.p2align	4
+L$w1stloop:
+	movl	%eax,(%rdi,%rax,4)
+	addb	$1,%al
+	jnc	L$w1stloop
+
+	xorq	%r9,%r9
+	xorq	%r8,%r8
+.p2align	4
+L$w2ndloop:
+	movl	(%rdi,%r9,4),%r10d
+	addb	(%rdx,%rsi,1),%r8b
+	addb	%r10b,%r8b
+	addq	$1,%rsi
+	movl	(%rdi,%r8,4),%r11d
+	cmovzq	%rcx,%rsi
+	movl	%r10d,(%rdi,%r8,4)
+	movl	%r11d,(%rdi,%r9,4)
+	addb	$1,%r9b
+	jnc	L$w2ndloop
+	jmp	L$exit_key
+
+.p2align	4
+L$c1stloop:
+	movb	%al,(%rdi,%rax,1)
+	addb	$1,%al
+	jnc	L$c1stloop
+
+	xorq	%r9,%r9
+	xorq	%r8,%r8
+.p2align	4
+L$c2ndloop:
+	movb	(%rdi,%r9,1),%r10b
+	addb	(%rdx,%rsi,1),%r8b
+	addb	%r10b,%r8b
+	addq	$1,%rsi
+	movb	(%rdi,%r8,1),%r11b
+	jnz	L$cnowrap
+	movq	%rcx,%rsi
+L$cnowrap:
+	movb	%r10b,(%rdi,%r8,1)
+	movb	%r11b,(%rdi,%r9,1)
+	addb	$1,%r9b
+	jnc	L$c2ndloop
+	movl	$-1,256(%rdi)
+
+.p2align	4
+L$exit_key:
+	xorl	%eax,%eax
+	movl	%eax,-8(%rdi)
+	movl	%eax,-4(%rdi)
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S
new file mode 100644
index 0000000..044dc5b
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/sha/sha1-x86_64.S
@@ -0,0 +1,2425 @@
+#if defined(__x86_64__)
+.text	
+
+
+.globl	_sha1_block_data_order
+.private_extern _sha1_block_data_order
+
+.p2align	4
+_sha1_block_data_order:
+	movl	_OPENSSL_ia32cap_P+0(%rip),%r9d
+	movl	_OPENSSL_ia32cap_P+4(%rip),%r8d
+	movl	_OPENSSL_ia32cap_P+8(%rip),%r10d
+	testl	$512,%r8d
+	jz	L$ialu
+	jmp	_ssse3_shortcut
+
+.p2align	4
+L$ialu:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	movq	%rdi,%r8
+	subq	$72,%rsp
+	movq	%rsi,%r9
+	andq	$-64,%rsp
+	movq	%rdx,%r10
+	movq	%rax,64(%rsp)
+L$prologue:
+
+	movl	0(%r8),%esi
+	movl	4(%r8),%edi
+	movl	8(%r8),%r11d
+	movl	12(%r8),%r12d
+	movl	16(%r8),%r13d
+	jmp	L$loop
+
+.p2align	4
+L$loop:
+	movl	0(%r9),%edx
+	bswapl	%edx
+	movl	4(%r9),%ebp
+	movl	%r12d,%eax
+	movl	%edx,0(%rsp)
+	movl	%esi,%ecx
+	bswapl	%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%rdx,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	8(%r9),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,4(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%rbp,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	12(%r9),%edx
+	movl	%edi,%eax
+	movl	%r14d,8(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%r14,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	16(%r9),%ebp
+	movl	%esi,%eax
+	movl	%edx,12(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%rdx,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	20(%r9),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,16(%rsp)
+	movl	%edi,%ecx
+	bswapl	%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%rbp,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	movl	24(%r9),%edx
+	movl	%r12d,%eax
+	movl	%r14d,20(%rsp)
+	movl	%esi,%ecx
+	bswapl	%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%r14,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	28(%r9),%ebp
+	movl	%r11d,%eax
+	movl	%edx,24(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%rdx,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	32(%r9),%r14d
+	movl	%edi,%eax
+	movl	%ebp,28(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%rbp,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	36(%r9),%edx
+	movl	%esi,%eax
+	movl	%r14d,32(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%r14,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	40(%r9),%ebp
+	movl	%r13d,%eax
+	movl	%edx,36(%rsp)
+	movl	%edi,%ecx
+	bswapl	%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%rdx,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	movl	44(%r9),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,40(%rsp)
+	movl	%esi,%ecx
+	bswapl	%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	andl	%edi,%eax
+	leal	1518500249(%rbp,%r13,1),%r13d
+	addl	%ecx,%r13d
+	xorl	%r12d,%eax
+	roll	$30,%edi
+	addl	%eax,%r13d
+	movl	48(%r9),%edx
+	movl	%r11d,%eax
+	movl	%r14d,44(%rsp)
+	movl	%r13d,%ecx
+	bswapl	%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	andl	%esi,%eax
+	leal	1518500249(%r14,%r12,1),%r12d
+	addl	%ecx,%r12d
+	xorl	%r11d,%eax
+	roll	$30,%esi
+	addl	%eax,%r12d
+	movl	52(%r9),%ebp
+	movl	%edi,%eax
+	movl	%edx,48(%rsp)
+	movl	%r12d,%ecx
+	bswapl	%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	andl	%r13d,%eax
+	leal	1518500249(%rdx,%r11,1),%r11d
+	addl	%ecx,%r11d
+	xorl	%edi,%eax
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	movl	56(%r9),%r14d
+	movl	%esi,%eax
+	movl	%ebp,52(%rsp)
+	movl	%r11d,%ecx
+	bswapl	%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	andl	%r12d,%eax
+	leal	1518500249(%rbp,%rdi,1),%edi
+	addl	%ecx,%edi
+	xorl	%esi,%eax
+	roll	$30,%r12d
+	addl	%eax,%edi
+	movl	60(%r9),%edx
+	movl	%r13d,%eax
+	movl	%r14d,56(%rsp)
+	movl	%edi,%ecx
+	bswapl	%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	andl	%r11d,%eax
+	leal	1518500249(%r14,%rsi,1),%esi
+	addl	%ecx,%esi
+	xorl	%r13d,%eax
+	roll	$30,%r11d
+	addl	%eax,%esi
+	xorl	0(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,60(%rsp)
+	movl	%esi,%ecx
+	xorl	8(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%ebp
+	andl	%edi,%eax
+	leal	1518500249(%rdx,%r13,1),%r13d
+	roll	$30,%edi
+	xorl	%r12d,%eax
+	addl	%ecx,%r13d
+	roll	$1,%ebp
+	addl	%eax,%r13d
+	xorl	4(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,0(%rsp)
+	movl	%r13d,%ecx
+	xorl	12(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%r14d
+	andl	%esi,%eax
+	leal	1518500249(%rbp,%r12,1),%r12d
+	roll	$30,%esi
+	xorl	%r11d,%eax
+	addl	%ecx,%r12d
+	roll	$1,%r14d
+	addl	%eax,%r12d
+	xorl	8(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,4(%rsp)
+	movl	%r12d,%ecx
+	xorl	16(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%edx
+	andl	%r13d,%eax
+	leal	1518500249(%r14,%r11,1),%r11d
+	roll	$30,%r13d
+	xorl	%edi,%eax
+	addl	%ecx,%r11d
+	roll	$1,%edx
+	addl	%eax,%r11d
+	xorl	12(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,8(%rsp)
+	movl	%r11d,%ecx
+	xorl	20(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%ebp
+	andl	%r12d,%eax
+	leal	1518500249(%rdx,%rdi,1),%edi
+	roll	$30,%r12d
+	xorl	%esi,%eax
+	addl	%ecx,%edi
+	roll	$1,%ebp
+	addl	%eax,%edi
+	xorl	16(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,12(%rsp)
+	movl	%edi,%ecx
+	xorl	24(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%r14d
+	andl	%r11d,%eax
+	leal	1518500249(%rbp,%rsi,1),%esi
+	roll	$30,%r11d
+	xorl	%r13d,%eax
+	addl	%ecx,%esi
+	roll	$1,%r14d
+	addl	%eax,%esi
+	xorl	20(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,16(%rsp)
+	movl	%esi,%ecx
+	xorl	28(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%edx
+	leal	1859775393(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	24(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,20(%rsp)
+	movl	%r13d,%ecx
+	xorl	32(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%ebp
+	leal	1859775393(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	28(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,24(%rsp)
+	movl	%r12d,%ecx
+	xorl	36(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%r14d
+	leal	1859775393(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	32(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,28(%rsp)
+	movl	%r11d,%ecx
+	xorl	40(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%edx
+	leal	1859775393(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	36(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,32(%rsp)
+	movl	%edi,%ecx
+	xorl	44(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	4(%rsp),%ebp
+	leal	1859775393(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	40(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,36(%rsp)
+	movl	%esi,%ecx
+	xorl	48(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	8(%rsp),%r14d
+	leal	1859775393(%rbp,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	xorl	44(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,40(%rsp)
+	movl	%r13d,%ecx
+	xorl	52(%rsp),%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	12(%rsp),%edx
+	leal	1859775393(%r14,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%edx
+	xorl	48(%rsp),%ebp
+	movl	%r13d,%eax
+	movl	%edx,44(%rsp)
+	movl	%r12d,%ecx
+	xorl	56(%rsp),%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	16(%rsp),%ebp
+	leal	1859775393(%rdx,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	xorl	52(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,48(%rsp)
+	movl	%r11d,%ecx
+	xorl	60(%rsp),%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%r14d
+	leal	1859775393(%rbp,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%r14d
+	xorl	56(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,52(%rsp)
+	movl	%edi,%ecx
+	xorl	0(%rsp),%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%edx
+	leal	1859775393(%r14,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%edx
+	xorl	60(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,56(%rsp)
+	movl	%esi,%ecx
+	xorl	4(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%ebp
+	leal	1859775393(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	0(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,60(%rsp)
+	movl	%r13d,%ecx
+	xorl	8(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%r14d
+	leal	1859775393(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	4(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,0(%rsp)
+	movl	%r12d,%ecx
+	xorl	12(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%edx
+	leal	1859775393(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	8(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,4(%rsp)
+	movl	%r11d,%ecx
+	xorl	16(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%ebp
+	leal	1859775393(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	xorl	12(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,8(%rsp)
+	movl	%edi,%ecx
+	xorl	20(%rsp),%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%r14d
+	leal	1859775393(%rbp,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%r14d
+	xorl	16(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,12(%rsp)
+	movl	%esi,%ecx
+	xorl	24(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%edx
+	leal	1859775393(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	20(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,16(%rsp)
+	movl	%r13d,%ecx
+	xorl	28(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%ebp
+	leal	1859775393(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	24(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,20(%rsp)
+	movl	%r12d,%ecx
+	xorl	32(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%r14d
+	leal	1859775393(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	28(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,24(%rsp)
+	movl	%r11d,%ecx
+	xorl	36(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%edx
+	leal	1859775393(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	32(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,28(%rsp)
+	movl	%edi,%ecx
+	xorl	40(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%ebp
+	leal	1859775393(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	36(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,32(%rsp)
+	movl	%r12d,%ebx
+	xorl	44(%rsp),%r14d
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	4(%rsp),%r14d
+	leal	-1894007588(%rbp,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	40(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,36(%rsp)
+	movl	%r11d,%ebx
+	xorl	48(%rsp),%edx
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	8(%rsp),%edx
+	leal	-1894007588(%r14,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%edx
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	44(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,40(%rsp)
+	movl	%edi,%ebx
+	xorl	52(%rsp),%ebp
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	12(%rsp),%ebp
+	leal	-1894007588(%rdx,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	48(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,44(%rsp)
+	movl	%esi,%ebx
+	xorl	56(%rsp),%r14d
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	16(%rsp),%r14d
+	leal	-1894007588(%rbp,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%r14d
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	52(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,48(%rsp)
+	movl	%r13d,%ebx
+	xorl	60(%rsp),%edx
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	20(%rsp),%edx
+	leal	-1894007588(%r14,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%edx
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	56(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,52(%rsp)
+	movl	%r12d,%ebx
+	xorl	0(%rsp),%ebp
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	24(%rsp),%ebp
+	leal	-1894007588(%rdx,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	60(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,56(%rsp)
+	movl	%r11d,%ebx
+	xorl	4(%rsp),%r14d
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	28(%rsp),%r14d
+	leal	-1894007588(%rbp,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	0(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,60(%rsp)
+	movl	%edi,%ebx
+	xorl	8(%rsp),%edx
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	32(%rsp),%edx
+	leal	-1894007588(%r14,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%edx
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	4(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,0(%rsp)
+	movl	%esi,%ebx
+	xorl	12(%rsp),%ebp
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	36(%rsp),%ebp
+	leal	-1894007588(%rdx,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%ebp
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	8(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,4(%rsp)
+	movl	%r13d,%ebx
+	xorl	16(%rsp),%r14d
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	40(%rsp),%r14d
+	leal	-1894007588(%rbp,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%r14d
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	12(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,8(%rsp)
+	movl	%r12d,%ebx
+	xorl	20(%rsp),%edx
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	44(%rsp),%edx
+	leal	-1894007588(%r14,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%edx
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	16(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,12(%rsp)
+	movl	%r11d,%ebx
+	xorl	24(%rsp),%ebp
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	48(%rsp),%ebp
+	leal	-1894007588(%rdx,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	20(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,16(%rsp)
+	movl	%edi,%ebx
+	xorl	28(%rsp),%r14d
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	52(%rsp),%r14d
+	leal	-1894007588(%rbp,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	24(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,20(%rsp)
+	movl	%esi,%ebx
+	xorl	32(%rsp),%edx
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	56(%rsp),%edx
+	leal	-1894007588(%r14,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%edx
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	28(%rsp),%ebp
+	movl	%r13d,%eax
+	movl	%edx,24(%rsp)
+	movl	%r13d,%ebx
+	xorl	36(%rsp),%ebp
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	60(%rsp),%ebp
+	leal	-1894007588(%rdx,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%ebp
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	32(%rsp),%r14d
+	movl	%r12d,%eax
+	movl	%ebp,28(%rsp)
+	movl	%r12d,%ebx
+	xorl	40(%rsp),%r14d
+	andl	%r11d,%eax
+	movl	%esi,%ecx
+	xorl	0(%rsp),%r14d
+	leal	-1894007588(%rbp,%r13,1),%r13d
+	xorl	%r11d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	andl	%edi,%ebx
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%ebx,%r13d
+	xorl	36(%rsp),%edx
+	movl	%r11d,%eax
+	movl	%r14d,32(%rsp)
+	movl	%r11d,%ebx
+	xorl	44(%rsp),%edx
+	andl	%edi,%eax
+	movl	%r13d,%ecx
+	xorl	4(%rsp),%edx
+	leal	-1894007588(%r14,%r12,1),%r12d
+	xorl	%edi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r12d
+	roll	$1,%edx
+	andl	%esi,%ebx
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%ebx,%r12d
+	xorl	40(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,36(%rsp)
+	movl	%edi,%ebx
+	xorl	48(%rsp),%ebp
+	andl	%esi,%eax
+	movl	%r12d,%ecx
+	xorl	8(%rsp),%ebp
+	leal	-1894007588(%rdx,%r11,1),%r11d
+	xorl	%esi,%ebx
+	roll	$5,%ecx
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	andl	%r13d,%ebx
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%ebx,%r11d
+	xorl	44(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,40(%rsp)
+	movl	%esi,%ebx
+	xorl	52(%rsp),%r14d
+	andl	%r13d,%eax
+	movl	%r11d,%ecx
+	xorl	12(%rsp),%r14d
+	leal	-1894007588(%rbp,%rdi,1),%edi
+	xorl	%r13d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%edi
+	roll	$1,%r14d
+	andl	%r12d,%ebx
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%ebx,%edi
+	xorl	48(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,44(%rsp)
+	movl	%r13d,%ebx
+	xorl	56(%rsp),%edx
+	andl	%r12d,%eax
+	movl	%edi,%ecx
+	xorl	16(%rsp),%edx
+	leal	-1894007588(%r14,%rsi,1),%esi
+	xorl	%r12d,%ebx
+	roll	$5,%ecx
+	addl	%eax,%esi
+	roll	$1,%edx
+	andl	%r11d,%ebx
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%ebx,%esi
+	xorl	52(%rsp),%ebp
+	movl	%edi,%eax
+	movl	%edx,48(%rsp)
+	movl	%esi,%ecx
+	xorl	60(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%ebp
+	leal	-899497514(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	56(%rsp),%r14d
+	movl	%esi,%eax
+	movl	%ebp,52(%rsp)
+	movl	%r13d,%ecx
+	xorl	0(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%r14d
+	leal	-899497514(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	60(%rsp),%edx
+	movl	%r13d,%eax
+	movl	%r14d,56(%rsp)
+	movl	%r12d,%ecx
+	xorl	4(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%edx
+	leal	-899497514(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	0(%rsp),%ebp
+	movl	%r12d,%eax
+	movl	%edx,60(%rsp)
+	movl	%r11d,%ecx
+	xorl	8(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	32(%rsp),%ebp
+	leal	-899497514(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	xorl	4(%rsp),%r14d
+	movl	%r11d,%eax
+	movl	%ebp,0(%rsp)
+	movl	%edi,%ecx
+	xorl	12(%rsp),%r14d
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	36(%rsp),%r14d
+	leal	-899497514(%rbp,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%r14d
+	xorl	8(%rsp),%edx
+	movl	%edi,%eax
+	movl	%r14d,4(%rsp)
+	movl	%esi,%ecx
+	xorl	16(%rsp),%edx
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	40(%rsp),%edx
+	leal	-899497514(%r14,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%edx
+	xorl	12(%rsp),%ebp
+	movl	%esi,%eax
+	movl	%edx,8(%rsp)
+	movl	%r13d,%ecx
+	xorl	20(%rsp),%ebp
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	44(%rsp),%ebp
+	leal	-899497514(%rdx,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%ebp
+	xorl	16(%rsp),%r14d
+	movl	%r13d,%eax
+	movl	%ebp,12(%rsp)
+	movl	%r12d,%ecx
+	xorl	24(%rsp),%r14d
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	48(%rsp),%r14d
+	leal	-899497514(%rbp,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%r14d
+	xorl	20(%rsp),%edx
+	movl	%r12d,%eax
+	movl	%r14d,16(%rsp)
+	movl	%r11d,%ecx
+	xorl	28(%rsp),%edx
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	52(%rsp),%edx
+	leal	-899497514(%r14,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%edx
+	xorl	24(%rsp),%ebp
+	movl	%r11d,%eax
+	movl	%edx,20(%rsp)
+	movl	%edi,%ecx
+	xorl	32(%rsp),%ebp
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	56(%rsp),%ebp
+	leal	-899497514(%rdx,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%ebp
+	xorl	28(%rsp),%r14d
+	movl	%edi,%eax
+	movl	%ebp,24(%rsp)
+	movl	%esi,%ecx
+	xorl	36(%rsp),%r14d
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	60(%rsp),%r14d
+	leal	-899497514(%rbp,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%r14d
+	xorl	32(%rsp),%edx
+	movl	%esi,%eax
+	movl	%r14d,28(%rsp)
+	movl	%r13d,%ecx
+	xorl	40(%rsp),%edx
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	0(%rsp),%edx
+	leal	-899497514(%r14,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%edx
+	xorl	36(%rsp),%ebp
+	movl	%r13d,%eax
+
+	movl	%r12d,%ecx
+	xorl	44(%rsp),%ebp
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	4(%rsp),%ebp
+	leal	-899497514(%rdx,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%ebp
+	xorl	40(%rsp),%r14d
+	movl	%r12d,%eax
+
+	movl	%r11d,%ecx
+	xorl	48(%rsp),%r14d
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	8(%rsp),%r14d
+	leal	-899497514(%rbp,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%r14d
+	xorl	44(%rsp),%edx
+	movl	%r11d,%eax
+
+	movl	%edi,%ecx
+	xorl	52(%rsp),%edx
+	xorl	%r13d,%eax
+	roll	$5,%ecx
+	xorl	12(%rsp),%edx
+	leal	-899497514(%r14,%rsi,1),%esi
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	roll	$1,%edx
+	xorl	48(%rsp),%ebp
+	movl	%edi,%eax
+
+	movl	%esi,%ecx
+	xorl	56(%rsp),%ebp
+	xorl	%r12d,%eax
+	roll	$5,%ecx
+	xorl	16(%rsp),%ebp
+	leal	-899497514(%rdx,%r13,1),%r13d
+	xorl	%r11d,%eax
+	addl	%ecx,%r13d
+	roll	$30,%edi
+	addl	%eax,%r13d
+	roll	$1,%ebp
+	xorl	52(%rsp),%r14d
+	movl	%esi,%eax
+
+	movl	%r13d,%ecx
+	xorl	60(%rsp),%r14d
+	xorl	%r11d,%eax
+	roll	$5,%ecx
+	xorl	20(%rsp),%r14d
+	leal	-899497514(%rbp,%r12,1),%r12d
+	xorl	%edi,%eax
+	addl	%ecx,%r12d
+	roll	$30,%esi
+	addl	%eax,%r12d
+	roll	$1,%r14d
+	xorl	56(%rsp),%edx
+	movl	%r13d,%eax
+
+	movl	%r12d,%ecx
+	xorl	0(%rsp),%edx
+	xorl	%edi,%eax
+	roll	$5,%ecx
+	xorl	24(%rsp),%edx
+	leal	-899497514(%r14,%r11,1),%r11d
+	xorl	%esi,%eax
+	addl	%ecx,%r11d
+	roll	$30,%r13d
+	addl	%eax,%r11d
+	roll	$1,%edx
+	xorl	60(%rsp),%ebp
+	movl	%r12d,%eax
+
+	movl	%r11d,%ecx
+	xorl	4(%rsp),%ebp
+	xorl	%esi,%eax
+	roll	$5,%ecx
+	xorl	28(%rsp),%ebp
+	leal	-899497514(%rdx,%rdi,1),%edi
+	xorl	%r13d,%eax
+	addl	%ecx,%edi
+	roll	$30,%r12d
+	addl	%eax,%edi
+	roll	$1,%ebp
+	movl	%r11d,%eax
+	movl	%edi,%ecx
+	xorl	%r13d,%eax
+	leal	-899497514(%rbp,%rsi,1),%esi
+	roll	$5,%ecx
+	xorl	%r12d,%eax
+	addl	%ecx,%esi
+	roll	$30,%r11d
+	addl	%eax,%esi
+	addl	0(%r8),%esi
+	addl	4(%r8),%edi
+	addl	8(%r8),%r11d
+	addl	12(%r8),%r12d
+	addl	16(%r8),%r13d
+	movl	%esi,0(%r8)
+	movl	%edi,4(%r8)
+	movl	%r11d,8(%r8)
+	movl	%r12d,12(%r8)
+	movl	%r13d,16(%r8)
+
+	subq	$1,%r10
+	leaq	64(%r9),%r9
+	jnz	L$loop
+
+	movq	64(%rsp),%rsi
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$epilogue:
+	.byte	0xf3,0xc3
+
+
+.p2align	4
+sha1_block_data_order_ssse3:
+_ssse3_shortcut:
+	movq	%rsp,%rax
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	leaq	-64(%rsp),%rsp
+	movq	%rax,%r14
+	andq	$-64,%rsp
+	movq	%rdi,%r8
+	movq	%rsi,%r9
+	movq	%rdx,%r10
+
+	shlq	$6,%r10
+	addq	%r9,%r10
+	leaq	K_XX_XX+64(%rip),%r11
+
+	movl	0(%r8),%eax
+	movl	4(%r8),%ebx
+	movl	8(%r8),%ecx
+	movl	12(%r8),%edx
+	movl	%ebx,%esi
+	movl	16(%r8),%ebp
+	movl	%ecx,%edi
+	xorl	%edx,%edi
+	andl	%edi,%esi
+
+	movdqa	64(%r11),%xmm6
+	movdqa	-64(%r11),%xmm9
+	movdqu	0(%r9),%xmm0
+	movdqu	16(%r9),%xmm1
+	movdqu	32(%r9),%xmm2
+	movdqu	48(%r9),%xmm3
+.byte	102,15,56,0,198
+.byte	102,15,56,0,206
+.byte	102,15,56,0,214
+	addq	$64,%r9
+	paddd	%xmm9,%xmm0
+.byte	102,15,56,0,222
+	paddd	%xmm9,%xmm1
+	paddd	%xmm9,%xmm2
+	movdqa	%xmm0,0(%rsp)
+	psubd	%xmm9,%xmm0
+	movdqa	%xmm1,16(%rsp)
+	psubd	%xmm9,%xmm1
+	movdqa	%xmm2,32(%rsp)
+	psubd	%xmm9,%xmm2
+	jmp	L$oop_ssse3
+.p2align	4
+L$oop_ssse3:
+	rorl	$2,%ebx
+	pshufd	$238,%xmm0,%xmm4
+	xorl	%edx,%esi
+	movdqa	%xmm3,%xmm8
+	paddd	%xmm3,%xmm9
+	movl	%eax,%edi
+	addl	0(%rsp),%ebp
+	punpcklqdq	%xmm1,%xmm4
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	addl	%esi,%ebp
+	psrldq	$4,%xmm8
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	pxor	%xmm0,%xmm4
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	pxor	%xmm2,%xmm8
+	xorl	%ecx,%edi
+	movl	%ebp,%esi
+	addl	4(%rsp),%edx
+	pxor	%xmm8,%xmm4
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	movdqa	%xmm9,48(%rsp)
+	addl	%edi,%edx
+	andl	%eax,%esi
+	movdqa	%xmm4,%xmm10
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	movdqa	%xmm4,%xmm8
+	xorl	%ebx,%esi
+	pslldq	$12,%xmm10
+	paddd	%xmm4,%xmm4
+	movl	%edx,%edi
+	addl	8(%rsp),%ecx
+	psrld	$31,%xmm8
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	movdqa	%xmm10,%xmm9
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	psrld	$30,%xmm10
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	por	%xmm8,%xmm4
+	xorl	%eax,%edi
+	movl	%ecx,%esi
+	addl	12(%rsp),%ebx
+	pslld	$2,%xmm9
+	pxor	%xmm10,%xmm4
+	xorl	%ebp,%edx
+	movdqa	-64(%r11),%xmm10
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	andl	%edx,%esi
+	pxor	%xmm9,%xmm4
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pshufd	$238,%xmm1,%xmm5
+	xorl	%ebp,%esi
+	movdqa	%xmm4,%xmm9
+	paddd	%xmm4,%xmm10
+	movl	%ebx,%edi
+	addl	16(%rsp),%eax
+	punpcklqdq	%xmm2,%xmm5
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	addl	%esi,%eax
+	psrldq	$4,%xmm9
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	pxor	%xmm1,%xmm5
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	pxor	%xmm3,%xmm9
+	xorl	%edx,%edi
+	movl	%eax,%esi
+	addl	20(%rsp),%ebp
+	pxor	%xmm9,%xmm5
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	movdqa	%xmm10,0(%rsp)
+	addl	%edi,%ebp
+	andl	%ebx,%esi
+	movdqa	%xmm5,%xmm8
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	movdqa	%xmm5,%xmm9
+	xorl	%ecx,%esi
+	pslldq	$12,%xmm8
+	paddd	%xmm5,%xmm5
+	movl	%ebp,%edi
+	addl	24(%rsp),%edx
+	psrld	$31,%xmm9
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	addl	%esi,%edx
+	movdqa	%xmm8,%xmm10
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	psrld	$30,%xmm8
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	por	%xmm9,%xmm5
+	xorl	%ebx,%edi
+	movl	%edx,%esi
+	addl	28(%rsp),%ecx
+	pslld	$2,%xmm10
+	pxor	%xmm8,%xmm5
+	xorl	%eax,%ebp
+	movdqa	-32(%r11),%xmm8
+	roll	$5,%edx
+	addl	%edi,%ecx
+	andl	%ebp,%esi
+	pxor	%xmm10,%xmm5
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pshufd	$238,%xmm2,%xmm6
+	xorl	%eax,%esi
+	movdqa	%xmm5,%xmm10
+	paddd	%xmm5,%xmm8
+	movl	%ecx,%edi
+	addl	32(%rsp),%ebx
+	punpcklqdq	%xmm3,%xmm6
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	psrldq	$4,%xmm10
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	pxor	%xmm2,%xmm6
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	pxor	%xmm4,%xmm10
+	xorl	%ebp,%edi
+	movl	%ebx,%esi
+	addl	36(%rsp),%eax
+	pxor	%xmm10,%xmm6
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	movdqa	%xmm8,16(%rsp)
+	addl	%edi,%eax
+	andl	%ecx,%esi
+	movdqa	%xmm6,%xmm9
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	movdqa	%xmm6,%xmm10
+	xorl	%edx,%esi
+	pslldq	$12,%xmm9
+	paddd	%xmm6,%xmm6
+	movl	%eax,%edi
+	addl	40(%rsp),%ebp
+	psrld	$31,%xmm10
+	xorl	%ecx,%ebx
+	roll	$5,%eax
+	addl	%esi,%ebp
+	movdqa	%xmm9,%xmm8
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	psrld	$30,%xmm9
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	por	%xmm10,%xmm6
+	xorl	%ecx,%edi
+	movl	%ebp,%esi
+	addl	44(%rsp),%edx
+	pslld	$2,%xmm8
+	pxor	%xmm9,%xmm6
+	xorl	%ebx,%eax
+	movdqa	-32(%r11),%xmm9
+	roll	$5,%ebp
+	addl	%edi,%edx
+	andl	%eax,%esi
+	pxor	%xmm8,%xmm6
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	rorl	$7,%ebp
+	pshufd	$238,%xmm3,%xmm7
+	xorl	%ebx,%esi
+	movdqa	%xmm6,%xmm8
+	paddd	%xmm6,%xmm9
+	movl	%edx,%edi
+	addl	48(%rsp),%ecx
+	punpcklqdq	%xmm4,%xmm7
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	addl	%esi,%ecx
+	psrldq	$4,%xmm8
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	pxor	%xmm3,%xmm7
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	pxor	%xmm5,%xmm8
+	xorl	%eax,%edi
+	movl	%ecx,%esi
+	addl	52(%rsp),%ebx
+	pxor	%xmm8,%xmm7
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	movdqa	%xmm9,32(%rsp)
+	addl	%edi,%ebx
+	andl	%edx,%esi
+	movdqa	%xmm7,%xmm10
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	rorl	$7,%ecx
+	movdqa	%xmm7,%xmm8
+	xorl	%ebp,%esi
+	pslldq	$12,%xmm10
+	paddd	%xmm7,%xmm7
+	movl	%ebx,%edi
+	addl	56(%rsp),%eax
+	psrld	$31,%xmm8
+	xorl	%edx,%ecx
+	roll	$5,%ebx
+	addl	%esi,%eax
+	movdqa	%xmm10,%xmm9
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	psrld	$30,%xmm10
+	addl	%ebx,%eax
+	rorl	$7,%ebx
+	por	%xmm8,%xmm7
+	xorl	%edx,%edi
+	movl	%eax,%esi
+	addl	60(%rsp),%ebp
+	pslld	$2,%xmm9
+	pxor	%xmm10,%xmm7
+	xorl	%ecx,%ebx
+	movdqa	-32(%r11),%xmm10
+	roll	$5,%eax
+	addl	%edi,%ebp
+	andl	%ebx,%esi
+	pxor	%xmm9,%xmm7
+	pshufd	$238,%xmm6,%xmm9
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	rorl	$7,%eax
+	pxor	%xmm4,%xmm0
+	xorl	%ecx,%esi
+	movl	%ebp,%edi
+	addl	0(%rsp),%edx
+	punpcklqdq	%xmm7,%xmm9
+	xorl	%ebx,%eax
+	roll	$5,%ebp
+	pxor	%xmm1,%xmm0
+	addl	%esi,%edx
+	andl	%eax,%edi
+	movdqa	%xmm10,%xmm8
+	xorl	%ebx,%eax
+	paddd	%xmm7,%xmm10
+	addl	%ebp,%edx
+	pxor	%xmm9,%xmm0
+	rorl	$7,%ebp
+	xorl	%ebx,%edi
+	movl	%edx,%esi
+	addl	4(%rsp),%ecx
+	movdqa	%xmm0,%xmm9
+	xorl	%eax,%ebp
+	roll	$5,%edx
+	movdqa	%xmm10,48(%rsp)
+	addl	%edi,%ecx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	pslld	$2,%xmm0
+	addl	%edx,%ecx
+	rorl	$7,%edx
+	psrld	$30,%xmm9
+	xorl	%eax,%esi
+	movl	%ecx,%edi
+	addl	8(%rsp),%ebx
+	por	%xmm9,%xmm0
+	xorl	%ebp,%edx
+	roll	$5,%ecx
+	pshufd	$238,%xmm7,%xmm10
+	addl	%esi,%ebx
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	addl	12(%rsp),%eax
+	xorl	%ebp,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	pxor	%xmm5,%xmm1
+	addl	16(%rsp),%ebp
+	xorl	%ecx,%esi
+	punpcklqdq	%xmm0,%xmm10
+	movl	%eax,%edi
+	roll	$5,%eax
+	pxor	%xmm2,%xmm1
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	movdqa	%xmm8,%xmm9
+	rorl	$7,%ebx
+	paddd	%xmm0,%xmm8
+	addl	%eax,%ebp
+	pxor	%xmm10,%xmm1
+	addl	20(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	movdqa	%xmm1,%xmm10
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	movdqa	%xmm8,0(%rsp)
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	24(%rsp),%ecx
+	pslld	$2,%xmm1
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	psrld	$30,%xmm10
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	por	%xmm10,%xmm1
+	addl	%edx,%ecx
+	addl	28(%rsp),%ebx
+	pshufd	$238,%xmm0,%xmm8
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	pxor	%xmm6,%xmm2
+	addl	32(%rsp),%eax
+	xorl	%edx,%esi
+	punpcklqdq	%xmm1,%xmm8
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	pxor	%xmm3,%xmm2
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	movdqa	0(%r11),%xmm10
+	rorl	$7,%ecx
+	paddd	%xmm1,%xmm9
+	addl	%ebx,%eax
+	pxor	%xmm8,%xmm2
+	addl	36(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	movdqa	%xmm2,%xmm8
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	movdqa	%xmm9,16(%rsp)
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	40(%rsp),%edx
+	pslld	$2,%xmm2
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	psrld	$30,%xmm8
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	por	%xmm8,%xmm2
+	addl	%ebp,%edx
+	addl	44(%rsp),%ecx
+	pshufd	$238,%xmm1,%xmm9
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	pxor	%xmm7,%xmm3
+	addl	48(%rsp),%ebx
+	xorl	%ebp,%esi
+	punpcklqdq	%xmm2,%xmm9
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	pxor	%xmm4,%xmm3
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	movdqa	%xmm10,%xmm8
+	rorl	$7,%edx
+	paddd	%xmm2,%xmm10
+	addl	%ecx,%ebx
+	pxor	%xmm9,%xmm3
+	addl	52(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	movdqa	%xmm3,%xmm9
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	movdqa	%xmm10,32(%rsp)
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	56(%rsp),%ebp
+	pslld	$2,%xmm3
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	psrld	$30,%xmm9
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	por	%xmm9,%xmm3
+	addl	%eax,%ebp
+	addl	60(%rsp),%edx
+	pshufd	$238,%xmm2,%xmm10
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	pxor	%xmm0,%xmm4
+	addl	0(%rsp),%ecx
+	xorl	%eax,%esi
+	punpcklqdq	%xmm3,%xmm10
+	movl	%edx,%edi
+	roll	$5,%edx
+	pxor	%xmm5,%xmm4
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	movdqa	%xmm8,%xmm9
+	rorl	$7,%ebp
+	paddd	%xmm3,%xmm8
+	addl	%edx,%ecx
+	pxor	%xmm10,%xmm4
+	addl	4(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	movdqa	%xmm4,%xmm10
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	movdqa	%xmm8,48(%rsp)
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	8(%rsp),%eax
+	pslld	$2,%xmm4
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	psrld	$30,%xmm10
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	por	%xmm10,%xmm4
+	addl	%ebx,%eax
+	addl	12(%rsp),%ebp
+	pshufd	$238,%xmm3,%xmm8
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	pxor	%xmm1,%xmm5
+	addl	16(%rsp),%edx
+	xorl	%ebx,%esi
+	punpcklqdq	%xmm4,%xmm8
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	pxor	%xmm6,%xmm5
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	movdqa	%xmm9,%xmm10
+	rorl	$7,%eax
+	paddd	%xmm4,%xmm9
+	addl	%ebp,%edx
+	pxor	%xmm8,%xmm5
+	addl	20(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	movdqa	%xmm5,%xmm8
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	movdqa	%xmm9,0(%rsp)
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	24(%rsp),%ebx
+	pslld	$2,%xmm5
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	psrld	$30,%xmm8
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	por	%xmm8,%xmm5
+	addl	%ecx,%ebx
+	addl	28(%rsp),%eax
+	pshufd	$238,%xmm4,%xmm9
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%ecx,%esi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	pxor	%xmm2,%xmm6
+	addl	32(%rsp),%ebp
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	punpcklqdq	%xmm5,%xmm9
+	movl	%eax,%edi
+	xorl	%ecx,%esi
+	pxor	%xmm7,%xmm6
+	roll	$5,%eax
+	addl	%esi,%ebp
+	movdqa	%xmm10,%xmm8
+	xorl	%ebx,%edi
+	paddd	%xmm5,%xmm10
+	xorl	%ecx,%ebx
+	pxor	%xmm9,%xmm6
+	addl	%eax,%ebp
+	addl	36(%rsp),%edx
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movdqa	%xmm6,%xmm9
+	movl	%ebp,%esi
+	xorl	%ebx,%edi
+	movdqa	%xmm10,16(%rsp)
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%eax,%esi
+	pslld	$2,%xmm6
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	psrld	$30,%xmm9
+	addl	40(%rsp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	por	%xmm9,%xmm6
+	rorl	$7,%ebp
+	movl	%edx,%edi
+	xorl	%eax,%esi
+	roll	$5,%edx
+	pshufd	$238,%xmm5,%xmm10
+	addl	%esi,%ecx
+	xorl	%ebp,%edi
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	addl	44(%rsp),%ebx
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	movl	%ecx,%esi
+	xorl	%ebp,%edi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%edx,%esi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	pxor	%xmm3,%xmm7
+	addl	48(%rsp),%eax
+	andl	%edx,%esi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	punpcklqdq	%xmm6,%xmm10
+	movl	%ebx,%edi
+	xorl	%edx,%esi
+	pxor	%xmm0,%xmm7
+	roll	$5,%ebx
+	addl	%esi,%eax
+	movdqa	32(%r11),%xmm9
+	xorl	%ecx,%edi
+	paddd	%xmm6,%xmm8
+	xorl	%edx,%ecx
+	pxor	%xmm10,%xmm7
+	addl	%ebx,%eax
+	addl	52(%rsp),%ebp
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movdqa	%xmm7,%xmm10
+	movl	%eax,%esi
+	xorl	%ecx,%edi
+	movdqa	%xmm8,32(%rsp)
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ebx,%esi
+	pslld	$2,%xmm7
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	psrld	$30,%xmm10
+	addl	56(%rsp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	por	%xmm10,%xmm7
+	rorl	$7,%eax
+	movl	%ebp,%edi
+	xorl	%ebx,%esi
+	roll	$5,%ebp
+	pshufd	$238,%xmm6,%xmm8
+	addl	%esi,%edx
+	xorl	%eax,%edi
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	addl	60(%rsp),%ecx
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	movl	%edx,%esi
+	xorl	%eax,%edi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%ebp,%esi
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	pxor	%xmm4,%xmm0
+	addl	0(%rsp),%ebx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	punpcklqdq	%xmm7,%xmm8
+	movl	%ecx,%edi
+	xorl	%ebp,%esi
+	pxor	%xmm1,%xmm0
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	movdqa	%xmm9,%xmm10
+	xorl	%edx,%edi
+	paddd	%xmm7,%xmm9
+	xorl	%ebp,%edx
+	pxor	%xmm8,%xmm0
+	addl	%ecx,%ebx
+	addl	4(%rsp),%eax
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	movdqa	%xmm0,%xmm8
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	movdqa	%xmm9,48(%rsp)
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%ecx,%esi
+	pslld	$2,%xmm0
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	psrld	$30,%xmm8
+	addl	8(%rsp),%ebp
+	andl	%ecx,%esi
+	xorl	%edx,%ecx
+	por	%xmm8,%xmm0
+	rorl	$7,%ebx
+	movl	%eax,%edi
+	xorl	%ecx,%esi
+	roll	$5,%eax
+	pshufd	$238,%xmm7,%xmm9
+	addl	%esi,%ebp
+	xorl	%ebx,%edi
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	addl	12(%rsp),%edx
+	andl	%ebx,%edi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	movl	%ebp,%esi
+	xorl	%ebx,%edi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%eax,%esi
+	xorl	%ebx,%eax
+	addl	%ebp,%edx
+	pxor	%xmm5,%xmm1
+	addl	16(%rsp),%ecx
+	andl	%eax,%esi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	punpcklqdq	%xmm0,%xmm9
+	movl	%edx,%edi
+	xorl	%eax,%esi
+	pxor	%xmm2,%xmm1
+	roll	$5,%edx
+	addl	%esi,%ecx
+	movdqa	%xmm10,%xmm8
+	xorl	%ebp,%edi
+	paddd	%xmm0,%xmm10
+	xorl	%eax,%ebp
+	pxor	%xmm9,%xmm1
+	addl	%edx,%ecx
+	addl	20(%rsp),%ebx
+	andl	%ebp,%edi
+	xorl	%eax,%ebp
+	rorl	$7,%edx
+	movdqa	%xmm1,%xmm9
+	movl	%ecx,%esi
+	xorl	%ebp,%edi
+	movdqa	%xmm10,0(%rsp)
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%edx,%esi
+	pslld	$2,%xmm1
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	psrld	$30,%xmm9
+	addl	24(%rsp),%eax
+	andl	%edx,%esi
+	xorl	%ebp,%edx
+	por	%xmm9,%xmm1
+	rorl	$7,%ecx
+	movl	%ebx,%edi
+	xorl	%edx,%esi
+	roll	$5,%ebx
+	pshufd	$238,%xmm0,%xmm10
+	addl	%esi,%eax
+	xorl	%ecx,%edi
+	xorl	%edx,%ecx
+	addl	%ebx,%eax
+	addl	28(%rsp),%ebp
+	andl	%ecx,%edi
+	xorl	%edx,%ecx
+	rorl	$7,%ebx
+	movl	%eax,%esi
+	xorl	%ecx,%edi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ebx,%esi
+	xorl	%ecx,%ebx
+	addl	%eax,%ebp
+	pxor	%xmm6,%xmm2
+	addl	32(%rsp),%edx
+	andl	%ebx,%esi
+	xorl	%ecx,%ebx
+	rorl	$7,%eax
+	punpcklqdq	%xmm1,%xmm10
+	movl	%ebp,%edi
+	xorl	%ebx,%esi
+	pxor	%xmm3,%xmm2
+	roll	$5,%ebp
+	addl	%esi,%edx
+	movdqa	%xmm8,%xmm9
+	xorl	%eax,%edi
+	paddd	%xmm1,%xmm8
+	xorl	%ebx,%eax
+	pxor	%xmm10,%xmm2
+	addl	%ebp,%edx
+	addl	36(%rsp),%ecx
+	andl	%eax,%edi
+	xorl	%ebx,%eax
+	rorl	$7,%ebp
+	movdqa	%xmm2,%xmm10
+	movl	%edx,%esi
+	xorl	%eax,%edi
+	movdqa	%xmm8,16(%rsp)
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%ebp,%esi
+	pslld	$2,%xmm2
+	xorl	%eax,%ebp
+	addl	%edx,%ecx
+	psrld	$30,%xmm10
+	addl	40(%rsp),%ebx
+	andl	%ebp,%esi
+	xorl	%eax,%ebp
+	por	%xmm10,%xmm2
+	rorl	$7,%edx
+	movl	%ecx,%edi
+	xorl	%ebp,%esi
+	roll	$5,%ecx
+	pshufd	$238,%xmm1,%xmm8
+	addl	%esi,%ebx
+	xorl	%edx,%edi
+	xorl	%ebp,%edx
+	addl	%ecx,%ebx
+	addl	44(%rsp),%eax
+	andl	%edx,%edi
+	xorl	%ebp,%edx
+	rorl	$7,%ecx
+	movl	%ebx,%esi
+	xorl	%edx,%edi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	addl	%ebx,%eax
+	pxor	%xmm7,%xmm3
+	addl	48(%rsp),%ebp
+	xorl	%ecx,%esi
+	punpcklqdq	%xmm2,%xmm8
+	movl	%eax,%edi
+	roll	$5,%eax
+	pxor	%xmm4,%xmm3
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	movdqa	%xmm9,%xmm10
+	rorl	$7,%ebx
+	paddd	%xmm2,%xmm9
+	addl	%eax,%ebp
+	pxor	%xmm8,%xmm3
+	addl	52(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	movdqa	%xmm3,%xmm8
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	movdqa	%xmm9,32(%rsp)
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	56(%rsp),%ecx
+	pslld	$2,%xmm3
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	psrld	$30,%xmm8
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	por	%xmm8,%xmm3
+	addl	%edx,%ecx
+	addl	60(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	0(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	paddd	%xmm3,%xmm10
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	movdqa	%xmm10,48(%rsp)
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	4(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	8(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	12(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	cmpq	%r10,%r9
+	je	L$done_ssse3
+	movdqa	64(%r11),%xmm6
+	movdqa	-64(%r11),%xmm9
+	movdqu	0(%r9),%xmm0
+	movdqu	16(%r9),%xmm1
+	movdqu	32(%r9),%xmm2
+	movdqu	48(%r9),%xmm3
+.byte	102,15,56,0,198
+	addq	$64,%r9
+	addl	16(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+.byte	102,15,56,0,206
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	paddd	%xmm9,%xmm0
+	addl	%ecx,%ebx
+	addl	20(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	movdqa	%xmm0,0(%rsp)
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	psubd	%xmm9,%xmm0
+	addl	%ebx,%eax
+	addl	24(%rsp),%ebp
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	28(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	32(%rsp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%edi
+.byte	102,15,56,0,214
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	paddd	%xmm9,%xmm1
+	addl	%edx,%ecx
+	addl	36(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	movdqa	%xmm1,16(%rsp)
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	psubd	%xmm9,%xmm1
+	addl	%ecx,%ebx
+	addl	40(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	48(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+.byte	102,15,56,0,222
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	paddd	%xmm9,%xmm2
+	addl	%ebp,%edx
+	addl	52(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	movdqa	%xmm2,32(%rsp)
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	psubd	%xmm9,%xmm2
+	addl	%edx,%ecx
+	addl	56(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	0(%r8),%eax
+	addl	4(%r8),%esi
+	addl	8(%r8),%ecx
+	addl	12(%r8),%edx
+	movl	%eax,0(%r8)
+	addl	16(%r8),%ebp
+	movl	%esi,4(%r8)
+	movl	%esi,%ebx
+	movl	%ecx,8(%r8)
+	movl	%ecx,%edi
+	movl	%edx,12(%r8)
+	xorl	%edx,%edi
+	movl	%ebp,16(%r8)
+	andl	%edi,%esi
+	jmp	L$oop_ssse3
+
+.p2align	4
+L$done_ssse3:
+	addl	16(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	20(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	xorl	%edx,%esi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	24(%rsp),%ebp
+	xorl	%ecx,%esi
+	movl	%eax,%edi
+	roll	$5,%eax
+	addl	%esi,%ebp
+	xorl	%ecx,%edi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	28(%rsp),%edx
+	xorl	%ebx,%edi
+	movl	%ebp,%esi
+	roll	$5,%ebp
+	addl	%edi,%edx
+	xorl	%ebx,%esi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	32(%rsp),%ecx
+	xorl	%eax,%esi
+	movl	%edx,%edi
+	roll	$5,%edx
+	addl	%esi,%ecx
+	xorl	%eax,%edi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	36(%rsp),%ebx
+	xorl	%ebp,%edi
+	movl	%ecx,%esi
+	roll	$5,%ecx
+	addl	%edi,%ebx
+	xorl	%ebp,%esi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	40(%rsp),%eax
+	xorl	%edx,%esi
+	movl	%ebx,%edi
+	roll	$5,%ebx
+	addl	%esi,%eax
+	xorl	%edx,%edi
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	44(%rsp),%ebp
+	xorl	%ecx,%edi
+	movl	%eax,%esi
+	roll	$5,%eax
+	addl	%edi,%ebp
+	xorl	%ecx,%esi
+	rorl	$7,%ebx
+	addl	%eax,%ebp
+	addl	48(%rsp),%edx
+	xorl	%ebx,%esi
+	movl	%ebp,%edi
+	roll	$5,%ebp
+	addl	%esi,%edx
+	xorl	%ebx,%edi
+	rorl	$7,%eax
+	addl	%ebp,%edx
+	addl	52(%rsp),%ecx
+	xorl	%eax,%edi
+	movl	%edx,%esi
+	roll	$5,%edx
+	addl	%edi,%ecx
+	xorl	%eax,%esi
+	rorl	$7,%ebp
+	addl	%edx,%ecx
+	addl	56(%rsp),%ebx
+	xorl	%ebp,%esi
+	movl	%ecx,%edi
+	roll	$5,%ecx
+	addl	%esi,%ebx
+	xorl	%ebp,%edi
+	rorl	$7,%edx
+	addl	%ecx,%ebx
+	addl	60(%rsp),%eax
+	xorl	%edx,%edi
+	movl	%ebx,%esi
+	roll	$5,%ebx
+	addl	%edi,%eax
+	rorl	$7,%ecx
+	addl	%ebx,%eax
+	addl	0(%r8),%eax
+	addl	4(%r8),%esi
+	addl	8(%r8),%ecx
+	movl	%eax,0(%r8)
+	addl	12(%r8),%edx
+	movl	%esi,4(%r8)
+	addl	16(%r8),%ebp
+	movl	%ecx,8(%r8)
+	movl	%edx,12(%r8)
+	movl	%ebp,16(%r8)
+	leaq	(%r14),%rsi
+	movq	-40(%rsi),%r14
+	movq	-32(%rsi),%r13
+	movq	-24(%rsi),%r12
+	movq	-16(%rsi),%rbp
+	movq	-8(%rsi),%rbx
+	leaq	(%rsi),%rsp
+L$epilogue_ssse3:
+	.byte	0xf3,0xc3
+
+.p2align	6
+K_XX_XX:
+.long	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+.long	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+.long	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+.long	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+.long	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+.long	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+.long	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+.long	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.byte	0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+.byte	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+.p2align	6
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S
new file mode 100644
index 0000000..da02d4c
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/sha/sha256-x86_64.S
@@ -0,0 +1,2843 @@
+#if defined(__x86_64__)
+.text	
+
+
+.globl	_sha256_block_data_order
+.private_extern _sha256_block_data_order
+
+.p2align	4
+_sha256_block_data_order:
+	leaq	_OPENSSL_ia32cap_P(%rip),%r11
+	movl	0(%r11),%r9d
+	movl	4(%r11),%r10d
+	movl	8(%r11),%r11d
+	testl	$512,%r10d
+	jnz	L$ssse3_shortcut
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$64+32,%rsp
+	leaq	(%rsi,%rdx,4),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,64+0(%rsp)
+	movq	%rsi,64+8(%rsp)
+	movq	%rdx,64+16(%rsp)
+	movq	%r11,64+24(%rsp)
+L$prologue:
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+	movl	16(%rdi),%r8d
+	movl	20(%rdi),%r9d
+	movl	24(%rdi),%r10d
+	movl	28(%rdi),%r11d
+	jmp	L$loop
+
+.p2align	4
+L$loop:
+	movl	%ebx,%edi
+	leaq	K256(%rip),%rbp
+	xorl	%ecx,%edi
+	movl	0(%rsi),%r12d
+	movl	%r8d,%r13d
+	movl	%eax,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,0(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r11d
+	movl	4(%rsi),%r12d
+	movl	%edx,%r13d
+	movl	%r11d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,4(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r10d
+	movl	8(%rsi),%r12d
+	movl	%ecx,%r13d
+	movl	%r10d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,8(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r9d
+	movl	12(%rsi),%r12d
+	movl	%ebx,%r13d
+	movl	%r9d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,12(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%r8d
+	movl	16(%rsi),%r12d
+	movl	%eax,%r13d
+	movl	%r8d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,16(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%edx
+	movl	20(%rsi),%r12d
+	movl	%r11d,%r13d
+	movl	%edx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,20(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ecx
+	movl	24(%rsi),%r12d
+	movl	%r10d,%r13d
+	movl	%ecx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,24(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ebx
+	movl	28(%rsi),%r12d
+	movl	%r9d,%r13d
+	movl	%ebx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,28(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%eax
+	movl	32(%rsi),%r12d
+	movl	%r8d,%r13d
+	movl	%eax,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,32(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r11d
+	movl	36(%rsi),%r12d
+	movl	%edx,%r13d
+	movl	%r11d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,36(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r10d
+	movl	40(%rsi),%r12d
+	movl	%ecx,%r13d
+	movl	%r10d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,40(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%r9d
+	movl	44(%rsi),%r12d
+	movl	%ebx,%r13d
+	movl	%r9d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,44(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	addl	%r14d,%r8d
+	movl	48(%rsi),%r12d
+	movl	%eax,%r13d
+	movl	%r8d,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,48(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%edx
+	movl	52(%rsi),%r12d
+	movl	%r11d,%r13d
+	movl	%edx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,52(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ecx
+	movl	56(%rsi),%r12d
+	movl	%r10d,%r13d
+	movl	%ecx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,56(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	addl	%r14d,%ebx
+	movl	60(%rsi),%r12d
+	movl	%r9d,%r13d
+	movl	%ebx,%r14d
+	bswapl	%r12d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,60(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	jmp	L$rounds_16_xx
+.p2align	4
+L$rounds_16_xx:
+	movl	4(%rsp),%r13d
+	movl	56(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%eax
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	36(%rsp),%r12d
+
+	addl	0(%rsp),%r12d
+	movl	%r8d,%r13d
+	addl	%r15d,%r12d
+	movl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,0(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	movl	8(%rsp),%r13d
+	movl	60(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r11d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	40(%rsp),%r12d
+
+	addl	4(%rsp),%r12d
+	movl	%edx,%r13d
+	addl	%edi,%r12d
+	movl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,4(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	movl	12(%rsp),%r13d
+	movl	0(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r10d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	44(%rsp),%r12d
+
+	addl	8(%rsp),%r12d
+	movl	%ecx,%r13d
+	addl	%r15d,%r12d
+	movl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,8(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	movl	16(%rsp),%r13d
+	movl	4(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r9d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	48(%rsp),%r12d
+
+	addl	12(%rsp),%r12d
+	movl	%ebx,%r13d
+	addl	%edi,%r12d
+	movl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,12(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	movl	20(%rsp),%r13d
+	movl	8(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r8d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	52(%rsp),%r12d
+
+	addl	16(%rsp),%r12d
+	movl	%eax,%r13d
+	addl	%r15d,%r12d
+	movl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,16(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	movl	24(%rsp),%r13d
+	movl	12(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%edx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	56(%rsp),%r12d
+
+	addl	20(%rsp),%r12d
+	movl	%r11d,%r13d
+	addl	%edi,%r12d
+	movl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,20(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	movl	28(%rsp),%r13d
+	movl	16(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ecx
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	60(%rsp),%r12d
+
+	addl	24(%rsp),%r12d
+	movl	%r10d,%r13d
+	addl	%r15d,%r12d
+	movl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,24(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	movl	32(%rsp),%r13d
+	movl	20(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ebx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	0(%rsp),%r12d
+
+	addl	28(%rsp),%r12d
+	movl	%r9d,%r13d
+	addl	%edi,%r12d
+	movl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,28(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	movl	36(%rsp),%r13d
+	movl	24(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%eax
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	4(%rsp),%r12d
+
+	addl	32(%rsp),%r12d
+	movl	%r8d,%r13d
+	addl	%r15d,%r12d
+	movl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r9d,%r15d
+
+	xorl	%r8d,%r13d
+	rorl	$9,%r14d
+	xorl	%r10d,%r15d
+
+	movl	%r12d,32(%rsp)
+	xorl	%eax,%r14d
+	andl	%r8d,%r15d
+
+	rorl	$5,%r13d
+	addl	%r11d,%r12d
+	xorl	%r10d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r8d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%eax,%r15d
+	addl	(%rbp),%r12d
+	xorl	%eax,%r14d
+
+	xorl	%ebx,%r15d
+	rorl	$6,%r13d
+	movl	%ebx,%r11d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r11d
+	addl	%r12d,%edx
+	addl	%r12d,%r11d
+
+	leaq	4(%rbp),%rbp
+	movl	40(%rsp),%r13d
+	movl	28(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r11d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	8(%rsp),%r12d
+
+	addl	36(%rsp),%r12d
+	movl	%edx,%r13d
+	addl	%edi,%r12d
+	movl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r8d,%edi
+
+	xorl	%edx,%r13d
+	rorl	$9,%r14d
+	xorl	%r9d,%edi
+
+	movl	%r12d,36(%rsp)
+	xorl	%r11d,%r14d
+	andl	%edx,%edi
+
+	rorl	$5,%r13d
+	addl	%r10d,%r12d
+	xorl	%r9d,%edi
+
+	rorl	$11,%r14d
+	xorl	%edx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r11d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r11d,%r14d
+
+	xorl	%eax,%edi
+	rorl	$6,%r13d
+	movl	%eax,%r10d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r10d
+	addl	%r12d,%ecx
+	addl	%r12d,%r10d
+
+	leaq	4(%rbp),%rbp
+	movl	44(%rsp),%r13d
+	movl	32(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r10d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	12(%rsp),%r12d
+
+	addl	40(%rsp),%r12d
+	movl	%ecx,%r13d
+	addl	%r15d,%r12d
+	movl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%edx,%r15d
+
+	xorl	%ecx,%r13d
+	rorl	$9,%r14d
+	xorl	%r8d,%r15d
+
+	movl	%r12d,40(%rsp)
+	xorl	%r10d,%r14d
+	andl	%ecx,%r15d
+
+	rorl	$5,%r13d
+	addl	%r9d,%r12d
+	xorl	%r8d,%r15d
+
+	rorl	$11,%r14d
+	xorl	%ecx,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r10d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r10d,%r14d
+
+	xorl	%r11d,%r15d
+	rorl	$6,%r13d
+	movl	%r11d,%r9d
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%r9d
+	addl	%r12d,%ebx
+	addl	%r12d,%r9d
+
+	leaq	4(%rbp),%rbp
+	movl	48(%rsp),%r13d
+	movl	36(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r9d
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	16(%rsp),%r12d
+
+	addl	44(%rsp),%r12d
+	movl	%ebx,%r13d
+	addl	%edi,%r12d
+	movl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%ecx,%edi
+
+	xorl	%ebx,%r13d
+	rorl	$9,%r14d
+	xorl	%edx,%edi
+
+	movl	%r12d,44(%rsp)
+	xorl	%r9d,%r14d
+	andl	%ebx,%edi
+
+	rorl	$5,%r13d
+	addl	%r8d,%r12d
+	xorl	%edx,%edi
+
+	rorl	$11,%r14d
+	xorl	%ebx,%r13d
+	addl	%edi,%r12d
+
+	movl	%r9d,%edi
+	addl	(%rbp),%r12d
+	xorl	%r9d,%r14d
+
+	xorl	%r10d,%edi
+	rorl	$6,%r13d
+	movl	%r10d,%r8d
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%r8d
+	addl	%r12d,%eax
+	addl	%r12d,%r8d
+
+	leaq	20(%rbp),%rbp
+	movl	52(%rsp),%r13d
+	movl	40(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%r8d
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	20(%rsp),%r12d
+
+	addl	48(%rsp),%r12d
+	movl	%eax,%r13d
+	addl	%r15d,%r12d
+	movl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%ebx,%r15d
+
+	xorl	%eax,%r13d
+	rorl	$9,%r14d
+	xorl	%ecx,%r15d
+
+	movl	%r12d,48(%rsp)
+	xorl	%r8d,%r14d
+	andl	%eax,%r15d
+
+	rorl	$5,%r13d
+	addl	%edx,%r12d
+	xorl	%ecx,%r15d
+
+	rorl	$11,%r14d
+	xorl	%eax,%r13d
+	addl	%r15d,%r12d
+
+	movl	%r8d,%r15d
+	addl	(%rbp),%r12d
+	xorl	%r8d,%r14d
+
+	xorl	%r9d,%r15d
+	rorl	$6,%r13d
+	movl	%r9d,%edx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%edx
+	addl	%r12d,%r11d
+	addl	%r12d,%edx
+
+	leaq	4(%rbp),%rbp
+	movl	56(%rsp),%r13d
+	movl	44(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%edx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	24(%rsp),%r12d
+
+	addl	52(%rsp),%r12d
+	movl	%r11d,%r13d
+	addl	%edi,%r12d
+	movl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%eax,%edi
+
+	xorl	%r11d,%r13d
+	rorl	$9,%r14d
+	xorl	%ebx,%edi
+
+	movl	%r12d,52(%rsp)
+	xorl	%edx,%r14d
+	andl	%r11d,%edi
+
+	rorl	$5,%r13d
+	addl	%ecx,%r12d
+	xorl	%ebx,%edi
+
+	rorl	$11,%r14d
+	xorl	%r11d,%r13d
+	addl	%edi,%r12d
+
+	movl	%edx,%edi
+	addl	(%rbp),%r12d
+	xorl	%edx,%r14d
+
+	xorl	%r8d,%edi
+	rorl	$6,%r13d
+	movl	%r8d,%ecx
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%ecx
+	addl	%r12d,%r10d
+	addl	%r12d,%ecx
+
+	leaq	4(%rbp),%rbp
+	movl	60(%rsp),%r13d
+	movl	48(%rsp),%r15d
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ecx
+	movl	%r15d,%r14d
+	rorl	$2,%r15d
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%r15d
+	shrl	$10,%r14d
+
+	rorl	$17,%r15d
+	xorl	%r13d,%r12d
+	xorl	%r14d,%r15d
+	addl	28(%rsp),%r12d
+
+	addl	56(%rsp),%r12d
+	movl	%r10d,%r13d
+	addl	%r15d,%r12d
+	movl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r11d,%r15d
+
+	xorl	%r10d,%r13d
+	rorl	$9,%r14d
+	xorl	%eax,%r15d
+
+	movl	%r12d,56(%rsp)
+	xorl	%ecx,%r14d
+	andl	%r10d,%r15d
+
+	rorl	$5,%r13d
+	addl	%ebx,%r12d
+	xorl	%eax,%r15d
+
+	rorl	$11,%r14d
+	xorl	%r10d,%r13d
+	addl	%r15d,%r12d
+
+	movl	%ecx,%r15d
+	addl	(%rbp),%r12d
+	xorl	%ecx,%r14d
+
+	xorl	%edx,%r15d
+	rorl	$6,%r13d
+	movl	%edx,%ebx
+
+	andl	%r15d,%edi
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%edi,%ebx
+	addl	%r12d,%r9d
+	addl	%r12d,%ebx
+
+	leaq	4(%rbp),%rbp
+	movl	0(%rsp),%r13d
+	movl	52(%rsp),%edi
+
+	movl	%r13d,%r12d
+	rorl	$11,%r13d
+	addl	%r14d,%ebx
+	movl	%edi,%r14d
+	rorl	$2,%edi
+
+	xorl	%r12d,%r13d
+	shrl	$3,%r12d
+	rorl	$7,%r13d
+	xorl	%r14d,%edi
+	shrl	$10,%r14d
+
+	rorl	$17,%edi
+	xorl	%r13d,%r12d
+	xorl	%r14d,%edi
+	addl	32(%rsp),%r12d
+
+	addl	60(%rsp),%r12d
+	movl	%r9d,%r13d
+	addl	%edi,%r12d
+	movl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r10d,%edi
+
+	xorl	%r9d,%r13d
+	rorl	$9,%r14d
+	xorl	%r11d,%edi
+
+	movl	%r12d,60(%rsp)
+	xorl	%ebx,%r14d
+	andl	%r9d,%edi
+
+	rorl	$5,%r13d
+	addl	%eax,%r12d
+	xorl	%r11d,%edi
+
+	rorl	$11,%r14d
+	xorl	%r9d,%r13d
+	addl	%edi,%r12d
+
+	movl	%ebx,%edi
+	addl	(%rbp),%r12d
+	xorl	%ebx,%r14d
+
+	xorl	%ecx,%edi
+	rorl	$6,%r13d
+	movl	%ecx,%eax
+
+	andl	%edi,%r15d
+	rorl	$2,%r14d
+	addl	%r13d,%r12d
+
+	xorl	%r15d,%eax
+	addl	%r12d,%r8d
+	addl	%r12d,%eax
+
+	leaq	20(%rbp),%rbp
+	cmpb	$0,3(%rbp)
+	jnz	L$rounds_16_xx
+
+	movq	64+0(%rsp),%rdi
+	addl	%r14d,%eax
+	leaq	64(%rsi),%rsi
+
+	addl	0(%rdi),%eax
+	addl	4(%rdi),%ebx
+	addl	8(%rdi),%ecx
+	addl	12(%rdi),%edx
+	addl	16(%rdi),%r8d
+	addl	20(%rdi),%r9d
+	addl	24(%rdi),%r10d
+	addl	28(%rdi),%r11d
+
+	cmpq	64+16(%rsp),%rsi
+
+	movl	%eax,0(%rdi)
+	movl	%ebx,4(%rdi)
+	movl	%ecx,8(%rdi)
+	movl	%edx,12(%rdi)
+	movl	%r8d,16(%rdi)
+	movl	%r9d,20(%rdi)
+	movl	%r10d,24(%rdi)
+	movl	%r11d,28(%rdi)
+	jb	L$loop
+
+	movq	64+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$epilogue:
+	.byte	0xf3,0xc3
+
+.p2align	6
+
+K256:
+.long	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+.long	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+.long	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+.long	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+.long	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.long	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+.long	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+.long	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+.long	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.long	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+.long	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+.long	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+.long	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+.long	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+.long	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+.long	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+.long	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+.long	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+.long	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+.long	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+.long	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+.long	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+.long	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+.byte	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+
+.p2align	6
+sha256_block_data_order_ssse3:
+L$ssse3_shortcut:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$96,%rsp
+	leaq	(%rsi,%rdx,4),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,64+0(%rsp)
+	movq	%rsi,64+8(%rsp)
+	movq	%rdx,64+16(%rsp)
+	movq	%r11,64+24(%rsp)
+L$prologue_ssse3:
+
+	movl	0(%rdi),%eax
+	movl	4(%rdi),%ebx
+	movl	8(%rdi),%ecx
+	movl	12(%rdi),%edx
+	movl	16(%rdi),%r8d
+	movl	20(%rdi),%r9d
+	movl	24(%rdi),%r10d
+	movl	28(%rdi),%r11d
+
+
+	jmp	L$loop_ssse3
+.p2align	4
+L$loop_ssse3:
+	movdqa	K256+512(%rip),%xmm7
+	movdqu	0(%rsi),%xmm0
+	movdqu	16(%rsi),%xmm1
+	movdqu	32(%rsi),%xmm2
+.byte	102,15,56,0,199
+	movdqu	48(%rsi),%xmm3
+	leaq	K256(%rip),%rbp
+.byte	102,15,56,0,207
+	movdqa	0(%rbp),%xmm4
+	movdqa	32(%rbp),%xmm5
+.byte	102,15,56,0,215
+	paddd	%xmm0,%xmm4
+	movdqa	64(%rbp),%xmm6
+.byte	102,15,56,0,223
+	movdqa	96(%rbp),%xmm7
+	paddd	%xmm1,%xmm5
+	paddd	%xmm2,%xmm6
+	paddd	%xmm3,%xmm7
+	movdqa	%xmm4,0(%rsp)
+	movl	%eax,%r14d
+	movdqa	%xmm5,16(%rsp)
+	movl	%ebx,%edi
+	movdqa	%xmm6,32(%rsp)
+	xorl	%ecx,%edi
+	movdqa	%xmm7,48(%rsp)
+	movl	%r8d,%r13d
+	jmp	L$ssse3_00_47
+
+.p2align	4
+L$ssse3_00_47:
+	subq	$-128,%rbp
+	rorl	$14,%r13d
+	movdqa	%xmm1,%xmm4
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	movdqa	%xmm3,%xmm7
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+.byte	102,15,58,15,224,4
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+.byte	102,15,58,15,250,4
+	addl	0(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	paddd	%xmm7,%xmm0
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	psrld	$7,%xmm6
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	pshufd	$250,%xmm3,%xmm7
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%r11d,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	pslld	$11,%xmm5
+	addl	4(%rsp),%r10d
+	movl	%r11d,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	paddd	%xmm4,%xmm0
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	psrlq	$17,%xmm6
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%ecx,%r13d
+	addl	8(%rsp),%r9d
+	movl	%r10d,%r15d
+	psrldq	$8,%xmm7
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm0
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	pshufd	$80,%xmm0,%xmm7
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	psrld	$10,%xmm7
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	psrlq	$2,%xmm6
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	12(%rsp),%r8d
+	pxor	%xmm6,%xmm7
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	movdqa	0(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	paddd	%xmm7,%xmm0
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	paddd	%xmm0,%xmm6
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	movdqa	%xmm6,0(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm2,%xmm4
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	movdqa	%xmm0,%xmm7
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+.byte	102,15,58,15,225,4
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+.byte	102,15,58,15,251,4
+	addl	16(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	paddd	%xmm7,%xmm1
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	psrld	$7,%xmm6
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	pshufd	$250,%xmm0,%xmm7
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%edx,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	pslld	$11,%xmm5
+	addl	20(%rsp),%ecx
+	movl	%edx,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	paddd	%xmm4,%xmm1
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	psrlq	$17,%xmm6
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%r10d,%r13d
+	addl	24(%rsp),%ebx
+	movl	%ecx,%r15d
+	psrldq	$8,%xmm7
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm1
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	pshufd	$80,%xmm1,%xmm7
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	psrld	$10,%xmm7
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	psrlq	$2,%xmm6
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	28(%rsp),%eax
+	pxor	%xmm6,%xmm7
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	movdqa	32(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	paddd	%xmm7,%xmm1
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	paddd	%xmm1,%xmm6
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movdqa	%xmm6,16(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm3,%xmm4
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	movdqa	%xmm1,%xmm7
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+.byte	102,15,58,15,226,4
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+.byte	102,15,58,15,248,4
+	addl	32(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	paddd	%xmm7,%xmm2
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	psrld	$7,%xmm6
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	pshufd	$250,%xmm1,%xmm7
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%r11d,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	pslld	$11,%xmm5
+	addl	36(%rsp),%r10d
+	movl	%r11d,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	paddd	%xmm4,%xmm2
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	psrlq	$17,%xmm6
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%ecx,%r13d
+	addl	40(%rsp),%r9d
+	movl	%r10d,%r15d
+	psrldq	$8,%xmm7
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm2
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	pshufd	$80,%xmm2,%xmm7
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	psrld	$10,%xmm7
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	psrlq	$2,%xmm6
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	44(%rsp),%r8d
+	pxor	%xmm6,%xmm7
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	movdqa	64(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	paddd	%xmm7,%xmm2
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	paddd	%xmm2,%xmm6
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	movdqa	%xmm6,32(%rsp)
+	rorl	$14,%r13d
+	movdqa	%xmm0,%xmm4
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	movdqa	%xmm2,%xmm7
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+.byte	102,15,58,15,227,4
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+.byte	102,15,58,15,249,4
+	addl	48(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm4,%xmm5
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	movdqa	%xmm4,%xmm6
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	psrld	$3,%xmm4
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	paddd	%xmm7,%xmm3
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	psrld	$7,%xmm6
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	pshufd	$250,%xmm2,%xmm7
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	pslld	$14,%xmm5
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	pxor	%xmm6,%xmm4
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	psrld	$11,%xmm6
+	xorl	%edx,%r14d
+	pxor	%xmm5,%xmm4
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	pslld	$11,%xmm5
+	addl	52(%rsp),%ecx
+	movl	%edx,%edi
+	pxor	%xmm6,%xmm4
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	movdqa	%xmm7,%xmm6
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	pxor	%xmm5,%xmm4
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	psrld	$10,%xmm7
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	paddd	%xmm4,%xmm3
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	psrlq	$17,%xmm6
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	pxor	%xmm6,%xmm7
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	psrlq	$2,%xmm6
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	pshufd	$128,%xmm7,%xmm7
+	xorl	%r10d,%r13d
+	addl	56(%rsp),%ebx
+	movl	%ecx,%r15d
+	psrldq	$8,%xmm7
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	paddd	%xmm7,%xmm3
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	pshufd	$80,%xmm3,%xmm7
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	movdqa	%xmm7,%xmm6
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	psrld	$10,%xmm7
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	psrlq	$17,%xmm6
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	pxor	%xmm6,%xmm7
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	psrlq	$2,%xmm6
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	60(%rsp),%eax
+	pxor	%xmm6,%xmm7
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	pshufd	$8,%xmm7,%xmm7
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	movdqa	96(%rbp),%xmm6
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	pslldq	$8,%xmm7
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	paddd	%xmm7,%xmm3
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	paddd	%xmm3,%xmm6
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movdqa	%xmm6,48(%rsp)
+	cmpb	$0,131(%rbp)
+	jne	L$ssse3_00_47
+	rorl	$14,%r13d
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+	addl	0(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	xorl	%r11d,%r14d
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	addl	4(%rsp),%r10d
+	movl	%r11d,%edi
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	xorl	%ecx,%r13d
+	addl	8(%rsp),%r9d
+	movl	%r10d,%r15d
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	12(%rsp),%r8d
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+	addl	16(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	xorl	%edx,%r14d
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	addl	20(%rsp),%ecx
+	movl	%edx,%edi
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	xorl	%r10d,%r13d
+	addl	24(%rsp),%ebx
+	movl	%ecx,%r15d
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	28(%rsp),%eax
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%eax
+	movl	%r9d,%r12d
+	rorl	$9,%r14d
+	xorl	%r8d,%r13d
+	xorl	%r10d,%r12d
+	rorl	$5,%r13d
+	xorl	%eax,%r14d
+	andl	%r8d,%r12d
+	xorl	%r8d,%r13d
+	addl	32(%rsp),%r11d
+	movl	%eax,%r15d
+	xorl	%r10d,%r12d
+	rorl	$11,%r14d
+	xorl	%ebx,%r15d
+	addl	%r12d,%r11d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%eax,%r14d
+	addl	%r13d,%r11d
+	xorl	%ebx,%edi
+	rorl	$2,%r14d
+	addl	%r11d,%edx
+	addl	%edi,%r11d
+	movl	%edx,%r13d
+	addl	%r11d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r11d
+	movl	%r8d,%r12d
+	rorl	$9,%r14d
+	xorl	%edx,%r13d
+	xorl	%r9d,%r12d
+	rorl	$5,%r13d
+	xorl	%r11d,%r14d
+	andl	%edx,%r12d
+	xorl	%edx,%r13d
+	addl	36(%rsp),%r10d
+	movl	%r11d,%edi
+	xorl	%r9d,%r12d
+	rorl	$11,%r14d
+	xorl	%eax,%edi
+	addl	%r12d,%r10d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r11d,%r14d
+	addl	%r13d,%r10d
+	xorl	%eax,%r15d
+	rorl	$2,%r14d
+	addl	%r10d,%ecx
+	addl	%r15d,%r10d
+	movl	%ecx,%r13d
+	addl	%r10d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r10d
+	movl	%edx,%r12d
+	rorl	$9,%r14d
+	xorl	%ecx,%r13d
+	xorl	%r8d,%r12d
+	rorl	$5,%r13d
+	xorl	%r10d,%r14d
+	andl	%ecx,%r12d
+	xorl	%ecx,%r13d
+	addl	40(%rsp),%r9d
+	movl	%r10d,%r15d
+	xorl	%r8d,%r12d
+	rorl	$11,%r14d
+	xorl	%r11d,%r15d
+	addl	%r12d,%r9d
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r10d,%r14d
+	addl	%r13d,%r9d
+	xorl	%r11d,%edi
+	rorl	$2,%r14d
+	addl	%r9d,%ebx
+	addl	%edi,%r9d
+	movl	%ebx,%r13d
+	addl	%r9d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r9d
+	movl	%ecx,%r12d
+	rorl	$9,%r14d
+	xorl	%ebx,%r13d
+	xorl	%edx,%r12d
+	rorl	$5,%r13d
+	xorl	%r9d,%r14d
+	andl	%ebx,%r12d
+	xorl	%ebx,%r13d
+	addl	44(%rsp),%r8d
+	movl	%r9d,%edi
+	xorl	%edx,%r12d
+	rorl	$11,%r14d
+	xorl	%r10d,%edi
+	addl	%r12d,%r8d
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%r9d,%r14d
+	addl	%r13d,%r8d
+	xorl	%r10d,%r15d
+	rorl	$2,%r14d
+	addl	%r8d,%eax
+	addl	%r15d,%r8d
+	movl	%eax,%r13d
+	addl	%r8d,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%r8d
+	movl	%ebx,%r12d
+	rorl	$9,%r14d
+	xorl	%eax,%r13d
+	xorl	%ecx,%r12d
+	rorl	$5,%r13d
+	xorl	%r8d,%r14d
+	andl	%eax,%r12d
+	xorl	%eax,%r13d
+	addl	48(%rsp),%edx
+	movl	%r8d,%r15d
+	xorl	%ecx,%r12d
+	rorl	$11,%r14d
+	xorl	%r9d,%r15d
+	addl	%r12d,%edx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%r8d,%r14d
+	addl	%r13d,%edx
+	xorl	%r9d,%edi
+	rorl	$2,%r14d
+	addl	%edx,%r11d
+	addl	%edi,%edx
+	movl	%r11d,%r13d
+	addl	%edx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%edx
+	movl	%eax,%r12d
+	rorl	$9,%r14d
+	xorl	%r11d,%r13d
+	xorl	%ebx,%r12d
+	rorl	$5,%r13d
+	xorl	%edx,%r14d
+	andl	%r11d,%r12d
+	xorl	%r11d,%r13d
+	addl	52(%rsp),%ecx
+	movl	%edx,%edi
+	xorl	%ebx,%r12d
+	rorl	$11,%r14d
+	xorl	%r8d,%edi
+	addl	%r12d,%ecx
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%edx,%r14d
+	addl	%r13d,%ecx
+	xorl	%r8d,%r15d
+	rorl	$2,%r14d
+	addl	%ecx,%r10d
+	addl	%r15d,%ecx
+	movl	%r10d,%r13d
+	addl	%ecx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ecx
+	movl	%r11d,%r12d
+	rorl	$9,%r14d
+	xorl	%r10d,%r13d
+	xorl	%eax,%r12d
+	rorl	$5,%r13d
+	xorl	%ecx,%r14d
+	andl	%r10d,%r12d
+	xorl	%r10d,%r13d
+	addl	56(%rsp),%ebx
+	movl	%ecx,%r15d
+	xorl	%eax,%r12d
+	rorl	$11,%r14d
+	xorl	%edx,%r15d
+	addl	%r12d,%ebx
+	rorl	$6,%r13d
+	andl	%r15d,%edi
+	xorl	%ecx,%r14d
+	addl	%r13d,%ebx
+	xorl	%edx,%edi
+	rorl	$2,%r14d
+	addl	%ebx,%r9d
+	addl	%edi,%ebx
+	movl	%r9d,%r13d
+	addl	%ebx,%r14d
+	rorl	$14,%r13d
+	movl	%r14d,%ebx
+	movl	%r10d,%r12d
+	rorl	$9,%r14d
+	xorl	%r9d,%r13d
+	xorl	%r11d,%r12d
+	rorl	$5,%r13d
+	xorl	%ebx,%r14d
+	andl	%r9d,%r12d
+	xorl	%r9d,%r13d
+	addl	60(%rsp),%eax
+	movl	%ebx,%edi
+	xorl	%r11d,%r12d
+	rorl	$11,%r14d
+	xorl	%ecx,%edi
+	addl	%r12d,%eax
+	rorl	$6,%r13d
+	andl	%edi,%r15d
+	xorl	%ebx,%r14d
+	addl	%r13d,%eax
+	xorl	%ecx,%r15d
+	rorl	$2,%r14d
+	addl	%eax,%r8d
+	addl	%r15d,%eax
+	movl	%r8d,%r13d
+	addl	%eax,%r14d
+	movq	64+0(%rsp),%rdi
+	movl	%r14d,%eax
+
+	addl	0(%rdi),%eax
+	leaq	64(%rsi),%rsi
+	addl	4(%rdi),%ebx
+	addl	8(%rdi),%ecx
+	addl	12(%rdi),%edx
+	addl	16(%rdi),%r8d
+	addl	20(%rdi),%r9d
+	addl	24(%rdi),%r10d
+	addl	28(%rdi),%r11d
+
+	cmpq	64+16(%rsp),%rsi
+
+	movl	%eax,0(%rdi)
+	movl	%ebx,4(%rdi)
+	movl	%ecx,8(%rdi)
+	movl	%edx,12(%rdi)
+	movl	%r8d,16(%rdi)
+	movl	%r9d,20(%rdi)
+	movl	%r10d,24(%rdi)
+	movl	%r11d,28(%rdi)
+	jb	L$loop_ssse3
+
+	movq	64+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$epilogue_ssse3:
+	.byte	0xf3,0xc3
+
+#endif
diff --git a/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S b/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S
new file mode 100644
index 0000000..2f5d912
--- /dev/null
+++ b/third_party/boringssl/mac-x86_64/crypto/sha/sha512-x86_64.S
@@ -0,0 +1,1786 @@
+#if defined(__x86_64__)
+.text	
+
+
+.globl	_sha512_block_data_order
+.private_extern _sha512_block_data_order
+
+.p2align	4
+_sha512_block_data_order:
+	pushq	%rbx
+	pushq	%rbp
+	pushq	%r12
+	pushq	%r13
+	pushq	%r14
+	pushq	%r15
+	movq	%rsp,%r11
+	shlq	$4,%rdx
+	subq	$128+32,%rsp
+	leaq	(%rsi,%rdx,8),%rdx
+	andq	$-64,%rsp
+	movq	%rdi,128+0(%rsp)
+	movq	%rsi,128+8(%rsp)
+	movq	%rdx,128+16(%rsp)
+	movq	%r11,128+24(%rsp)
+L$prologue:
+
+	movq	0(%rdi),%rax
+	movq	8(%rdi),%rbx
+	movq	16(%rdi),%rcx
+	movq	24(%rdi),%rdx
+	movq	32(%rdi),%r8
+	movq	40(%rdi),%r9
+	movq	48(%rdi),%r10
+	movq	56(%rdi),%r11
+	jmp	L$loop
+
+.p2align	4
+L$loop:
+	movq	%rbx,%rdi
+	leaq	K512(%rip),%rbp
+	xorq	%rcx,%rdi
+	movq	0(%rsi),%r12
+	movq	%r8,%r13
+	movq	%rax,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,0(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r11
+	movq	8(%rsi),%r12
+	movq	%rdx,%r13
+	movq	%r11,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,8(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r10
+	movq	16(%rsi),%r12
+	movq	%rcx,%r13
+	movq	%r10,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,16(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r9
+	movq	24(%rsi),%r12
+	movq	%rbx,%r13
+	movq	%r9,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,24(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r8
+	movq	32(%rsi),%r12
+	movq	%rax,%r13
+	movq	%r8,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,32(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rdx
+	movq	40(%rsi),%r12
+	movq	%r11,%r13
+	movq	%rdx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,40(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rcx
+	movq	48(%rsi),%r12
+	movq	%r10,%r13
+	movq	%rcx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,48(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rbx
+	movq	56(%rsi),%r12
+	movq	%r9,%r13
+	movq	%rbx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,56(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rax
+	movq	64(%rsi),%r12
+	movq	%r8,%r13
+	movq	%rax,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,64(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r11
+	movq	72(%rsi),%r12
+	movq	%rdx,%r13
+	movq	%r11,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,72(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r10
+	movq	80(%rsi),%r12
+	movq	%rcx,%r13
+	movq	%r10,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,80(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%r9
+	movq	88(%rsi),%r12
+	movq	%rbx,%r13
+	movq	%r9,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,88(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%r8
+	movq	96(%rsi),%r12
+	movq	%rax,%r13
+	movq	%r8,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,96(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rdx
+	movq	104(%rsi),%r12
+	movq	%r11,%r13
+	movq	%rdx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,104(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	addq	%r14,%rcx
+	movq	112(%rsi),%r12
+	movq	%r10,%r13
+	movq	%rcx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,112(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	addq	%r14,%rbx
+	movq	120(%rsi),%r12
+	movq	%r9,%r13
+	movq	%rbx,%r14
+	bswapq	%r12
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,120(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	jmp	L$rounds_16_xx
+.p2align	4
+L$rounds_16_xx:
+	movq	8(%rsp),%r13
+	movq	112(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rax
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	72(%rsp),%r12
+
+	addq	0(%rsp),%r12
+	movq	%r8,%r13
+	addq	%r15,%r12
+	movq	%rax,%r14
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,0(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	movq	16(%rsp),%r13
+	movq	120(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r11
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	80(%rsp),%r12
+
+	addq	8(%rsp),%r12
+	movq	%rdx,%r13
+	addq	%rdi,%r12
+	movq	%r11,%r14
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,8(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	movq	24(%rsp),%r13
+	movq	0(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r10
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	88(%rsp),%r12
+
+	addq	16(%rsp),%r12
+	movq	%rcx,%r13
+	addq	%r15,%r12
+	movq	%r10,%r14
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,16(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	movq	32(%rsp),%r13
+	movq	8(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r9
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	96(%rsp),%r12
+
+	addq	24(%rsp),%r12
+	movq	%rbx,%r13
+	addq	%rdi,%r12
+	movq	%r9,%r14
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,24(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	movq	40(%rsp),%r13
+	movq	16(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r8
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	104(%rsp),%r12
+
+	addq	32(%rsp),%r12
+	movq	%rax,%r13
+	addq	%r15,%r12
+	movq	%r8,%r14
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,32(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	movq	48(%rsp),%r13
+	movq	24(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rdx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	112(%rsp),%r12
+
+	addq	40(%rsp),%r12
+	movq	%r11,%r13
+	addq	%rdi,%r12
+	movq	%rdx,%r14
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,40(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	movq	56(%rsp),%r13
+	movq	32(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rcx
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	120(%rsp),%r12
+
+	addq	48(%rsp),%r12
+	movq	%r10,%r13
+	addq	%r15,%r12
+	movq	%rcx,%r14
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,48(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	movq	64(%rsp),%r13
+	movq	40(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rbx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	0(%rsp),%r12
+
+	addq	56(%rsp),%r12
+	movq	%r9,%r13
+	addq	%rdi,%r12
+	movq	%rbx,%r14
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,56(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	movq	72(%rsp),%r13
+	movq	48(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rax
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	8(%rsp),%r12
+
+	addq	64(%rsp),%r12
+	movq	%r8,%r13
+	addq	%r15,%r12
+	movq	%rax,%r14
+	rorq	$23,%r13
+	movq	%r9,%r15
+
+	xorq	%r8,%r13
+	rorq	$5,%r14
+	xorq	%r10,%r15
+
+	movq	%r12,64(%rsp)
+	xorq	%rax,%r14
+	andq	%r8,%r15
+
+	rorq	$4,%r13
+	addq	%r11,%r12
+	xorq	%r10,%r15
+
+	rorq	$6,%r14
+	xorq	%r8,%r13
+	addq	%r15,%r12
+
+	movq	%rax,%r15
+	addq	(%rbp),%r12
+	xorq	%rax,%r14
+
+	xorq	%rbx,%r15
+	rorq	$14,%r13
+	movq	%rbx,%r11
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r11
+	addq	%r12,%rdx
+	addq	%r12,%r11
+
+	leaq	8(%rbp),%rbp
+	movq	80(%rsp),%r13
+	movq	56(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r11
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	16(%rsp),%r12
+
+	addq	72(%rsp),%r12
+	movq	%rdx,%r13
+	addq	%rdi,%r12
+	movq	%r11,%r14
+	rorq	$23,%r13
+	movq	%r8,%rdi
+
+	xorq	%rdx,%r13
+	rorq	$5,%r14
+	xorq	%r9,%rdi
+
+	movq	%r12,72(%rsp)
+	xorq	%r11,%r14
+	andq	%rdx,%rdi
+
+	rorq	$4,%r13
+	addq	%r10,%r12
+	xorq	%r9,%rdi
+
+	rorq	$6,%r14
+	xorq	%rdx,%r13
+	addq	%rdi,%r12
+
+	movq	%r11,%rdi
+	addq	(%rbp),%r12
+	xorq	%r11,%r14
+
+	xorq	%rax,%rdi
+	rorq	$14,%r13
+	movq	%rax,%r10
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r10
+	addq	%r12,%rcx
+	addq	%r12,%r10
+
+	leaq	24(%rbp),%rbp
+	movq	88(%rsp),%r13
+	movq	64(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r10
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	24(%rsp),%r12
+
+	addq	80(%rsp),%r12
+	movq	%rcx,%r13
+	addq	%r15,%r12
+	movq	%r10,%r14
+	rorq	$23,%r13
+	movq	%rdx,%r15
+
+	xorq	%rcx,%r13
+	rorq	$5,%r14
+	xorq	%r8,%r15
+
+	movq	%r12,80(%rsp)
+	xorq	%r10,%r14
+	andq	%rcx,%r15
+
+	rorq	$4,%r13
+	addq	%r9,%r12
+	xorq	%r8,%r15
+
+	rorq	$6,%r14
+	xorq	%rcx,%r13
+	addq	%r15,%r12
+
+	movq	%r10,%r15
+	addq	(%rbp),%r12
+	xorq	%r10,%r14
+
+	xorq	%r11,%r15
+	rorq	$14,%r13
+	movq	%r11,%r9
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%r9
+	addq	%r12,%rbx
+	addq	%r12,%r9
+
+	leaq	8(%rbp),%rbp
+	movq	96(%rsp),%r13
+	movq	72(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r9
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	32(%rsp),%r12
+
+	addq	88(%rsp),%r12
+	movq	%rbx,%r13
+	addq	%rdi,%r12
+	movq	%r9,%r14
+	rorq	$23,%r13
+	movq	%rcx,%rdi
+
+	xorq	%rbx,%r13
+	rorq	$5,%r14
+	xorq	%rdx,%rdi
+
+	movq	%r12,88(%rsp)
+	xorq	%r9,%r14
+	andq	%rbx,%rdi
+
+	rorq	$4,%r13
+	addq	%r8,%r12
+	xorq	%rdx,%rdi
+
+	rorq	$6,%r14
+	xorq	%rbx,%r13
+	addq	%rdi,%r12
+
+	movq	%r9,%rdi
+	addq	(%rbp),%r12
+	xorq	%r9,%r14
+
+	xorq	%r10,%rdi
+	rorq	$14,%r13
+	movq	%r10,%r8
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%r8
+	addq	%r12,%rax
+	addq	%r12,%r8
+
+	leaq	24(%rbp),%rbp
+	movq	104(%rsp),%r13
+	movq	80(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%r8
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	40(%rsp),%r12
+
+	addq	96(%rsp),%r12
+	movq	%rax,%r13
+	addq	%r15,%r12
+	movq	%r8,%r14
+	rorq	$23,%r13
+	movq	%rbx,%r15
+
+	xorq	%rax,%r13
+	rorq	$5,%r14
+	xorq	%rcx,%r15
+
+	movq	%r12,96(%rsp)
+	xorq	%r8,%r14
+	andq	%rax,%r15
+
+	rorq	$4,%r13
+	addq	%rdx,%r12
+	xorq	%rcx,%r15
+
+	rorq	$6,%r14
+	xorq	%rax,%r13
+	addq	%r15,%r12
+
+	movq	%r8,%r15
+	addq	(%rbp),%r12
+	xorq	%r8,%r14
+
+	xorq	%r9,%r15
+	rorq	$14,%r13
+	movq	%r9,%rdx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rdx
+	addq	%r12,%r11
+	addq	%r12,%rdx
+
+	leaq	8(%rbp),%rbp
+	movq	112(%rsp),%r13
+	movq	88(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rdx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	48(%rsp),%r12
+
+	addq	104(%rsp),%r12
+	movq	%r11,%r13
+	addq	%rdi,%r12
+	movq	%rdx,%r14
+	rorq	$23,%r13
+	movq	%rax,%rdi
+
+	xorq	%r11,%r13
+	rorq	$5,%r14
+	xorq	%rbx,%rdi
+
+	movq	%r12,104(%rsp)
+	xorq	%rdx,%r14
+	andq	%r11,%rdi
+
+	rorq	$4,%r13
+	addq	%rcx,%r12
+	xorq	%rbx,%rdi
+
+	rorq	$6,%r14
+	xorq	%r11,%r13
+	addq	%rdi,%r12
+
+	movq	%rdx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rdx,%r14
+
+	xorq	%r8,%rdi
+	rorq	$14,%r13
+	movq	%r8,%rcx
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rcx
+	addq	%r12,%r10
+	addq	%r12,%rcx
+
+	leaq	24(%rbp),%rbp
+	movq	120(%rsp),%r13
+	movq	96(%rsp),%r15
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rcx
+	movq	%r15,%r14
+	rorq	$42,%r15
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%r15
+	shrq	$6,%r14
+
+	rorq	$19,%r15
+	xorq	%r13,%r12
+	xorq	%r14,%r15
+	addq	56(%rsp),%r12
+
+	addq	112(%rsp),%r12
+	movq	%r10,%r13
+	addq	%r15,%r12
+	movq	%rcx,%r14
+	rorq	$23,%r13
+	movq	%r11,%r15
+
+	xorq	%r10,%r13
+	rorq	$5,%r14
+	xorq	%rax,%r15
+
+	movq	%r12,112(%rsp)
+	xorq	%rcx,%r14
+	andq	%r10,%r15
+
+	rorq	$4,%r13
+	addq	%rbx,%r12
+	xorq	%rax,%r15
+
+	rorq	$6,%r14
+	xorq	%r10,%r13
+	addq	%r15,%r12
+
+	movq	%rcx,%r15
+	addq	(%rbp),%r12
+	xorq	%rcx,%r14
+
+	xorq	%rdx,%r15
+	rorq	$14,%r13
+	movq	%rdx,%rbx
+
+	andq	%r15,%rdi
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%rdi,%rbx
+	addq	%r12,%r9
+	addq	%r12,%rbx
+
+	leaq	8(%rbp),%rbp
+	movq	0(%rsp),%r13
+	movq	104(%rsp),%rdi
+
+	movq	%r13,%r12
+	rorq	$7,%r13
+	addq	%r14,%rbx
+	movq	%rdi,%r14
+	rorq	$42,%rdi
+
+	xorq	%r12,%r13
+	shrq	$7,%r12
+	rorq	$1,%r13
+	xorq	%r14,%rdi
+	shrq	$6,%r14
+
+	rorq	$19,%rdi
+	xorq	%r13,%r12
+	xorq	%r14,%rdi
+	addq	64(%rsp),%r12
+
+	addq	120(%rsp),%r12
+	movq	%r9,%r13
+	addq	%rdi,%r12
+	movq	%rbx,%r14
+	rorq	$23,%r13
+	movq	%r10,%rdi
+
+	xorq	%r9,%r13
+	rorq	$5,%r14
+	xorq	%r11,%rdi
+
+	movq	%r12,120(%rsp)
+	xorq	%rbx,%r14
+	andq	%r9,%rdi
+
+	rorq	$4,%r13
+	addq	%rax,%r12
+	xorq	%r11,%rdi
+
+	rorq	$6,%r14
+	xorq	%r9,%r13
+	addq	%rdi,%r12
+
+	movq	%rbx,%rdi
+	addq	(%rbp),%r12
+	xorq	%rbx,%r14
+
+	xorq	%rcx,%rdi
+	rorq	$14,%r13
+	movq	%rcx,%rax
+
+	andq	%rdi,%r15
+	rorq	$28,%r14
+	addq	%r13,%r12
+
+	xorq	%r15,%rax
+	addq	%r12,%r8
+	addq	%r12,%rax
+
+	leaq	24(%rbp),%rbp
+	cmpb	$0,7(%rbp)
+	jnz	L$rounds_16_xx
+
+	movq	128+0(%rsp),%rdi
+	addq	%r14,%rax
+	leaq	128(%rsi),%rsi
+
+	addq	0(%rdi),%rax
+	addq	8(%rdi),%rbx
+	addq	16(%rdi),%rcx
+	addq	24(%rdi),%rdx
+	addq	32(%rdi),%r8
+	addq	40(%rdi),%r9
+	addq	48(%rdi),%r10
+	addq	56(%rdi),%r11
+
+	cmpq	128+16(%rsp),%rsi
+
+	movq	%rax,0(%rdi)
+	movq	%rbx,8(%rdi)
+	movq	%rcx,16(%rdi)
+	movq	%rdx,24(%rdi)
+	movq	%r8,32(%rdi)
+	movq	%r9,40(%rdi)
+	movq	%r10,48(%rdi)
+	movq	%r11,56(%rdi)
+	jb	L$loop
+
+	movq	128+24(%rsp),%rsi
+	movq	(%rsi),%r15
+	movq	8(%rsi),%r14
+	movq	16(%rsi),%r13
+	movq	24(%rsi),%r12
+	movq	32(%rsi),%rbp
+	movq	40(%rsi),%rbx
+	leaq	48(%rsi),%rsp
+L$epilogue:
+	.byte	0xf3,0xc3
+
+.p2align	6
+
+K512:
+.quad	0x428a2f98d728ae22,0x7137449123ef65cd
+.quad	0x428a2f98d728ae22,0x7137449123ef65cd
+.quad	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+.quad	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+.quad	0x3956c25bf348b538,0x59f111f1b605d019
+.quad	0x3956c25bf348b538,0x59f111f1b605d019
+.quad	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+.quad	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+.quad	0xd807aa98a3030242,0x12835b0145706fbe
+.quad	0xd807aa98a3030242,0x12835b0145706fbe
+.quad	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+.quad	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+.quad	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+.quad	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+.quad	0x9bdc06a725c71235,0xc19bf174cf692694
+.quad	0x9bdc06a725c71235,0xc19bf174cf692694
+.quad	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+.quad	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+.quad	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+.quad	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+.quad	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+.quad	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+.quad	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+.quad	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+.quad	0x983e5152ee66dfab,0xa831c66d2db43210
+.quad	0x983e5152ee66dfab,0xa831c66d2db43210
+.quad	0xb00327c898fb213f,0xbf597fc7beef0ee4
+.quad	0xb00327c898fb213f,0xbf597fc7beef0ee4
+.quad	0xc6e00bf33da88fc2,0xd5a79147930aa725
+.quad	0xc6e00bf33da88fc2,0xd5a79147930aa725
+.quad	0x06ca6351e003826f,0x142929670a0e6e70
+.quad	0x06ca6351e003826f,0x142929670a0e6e70
+.quad	0x27b70a8546d22ffc,0x2e1b21385c26c926
+.quad	0x27b70a8546d22ffc,0x2e1b21385c26c926
+.quad	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+.quad	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+.quad	0x650a73548baf63de,0x766a0abb3c77b2a8
+.quad	0x650a73548baf63de,0x766a0abb3c77b2a8
+.quad	0x81c2c92e47edaee6,0x92722c851482353b
+.quad	0x81c2c92e47edaee6,0x92722c851482353b
+.quad	0xa2bfe8a14cf10364,0xa81a664bbc423001
+.quad	0xa2bfe8a14cf10364,0xa81a664bbc423001
+.quad	0xc24b8b70d0f89791,0xc76c51a30654be30
+.quad	0xc24b8b70d0f89791,0xc76c51a30654be30
+.quad	0xd192e819d6ef5218,0xd69906245565a910
+.quad	0xd192e819d6ef5218,0xd69906245565a910
+.quad	0xf40e35855771202a,0x106aa07032bbd1b8
+.quad	0xf40e35855771202a,0x106aa07032bbd1b8
+.quad	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+.quad	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+.quad	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+.quad	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+.quad	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+.quad	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+.quad	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+.quad	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+.quad	0x748f82ee5defb2fc,0x78a5636f43172f60
+.quad	0x748f82ee5defb2fc,0x78a5636f43172f60
+.quad	0x84c87814a1f0ab72,0x8cc702081a6439ec
+.quad	0x84c87814a1f0ab72,0x8cc702081a6439ec
+.quad	0x90befffa23631e28,0xa4506cebde82bde9
+.quad	0x90befffa23631e28,0xa4506cebde82bde9
+.quad	0xbef9a3f7b2c67915,0xc67178f2e372532b
+.quad	0xbef9a3f7b2c67915,0xc67178f2e372532b
+.quad	0xca273eceea26619c,0xd186b8c721c0c207
+.quad	0xca273eceea26619c,0xd186b8c721c0c207
+.quad	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+.quad	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+.quad	0x06f067aa72176fba,0x0a637dc5a2c898a6
+.quad	0x06f067aa72176fba,0x0a637dc5a2c898a6
+.quad	0x113f9804bef90dae,0x1b710b35131c471b
+.quad	0x113f9804bef90dae,0x1b710b35131c471b
+.quad	0x28db77f523047d84,0x32caab7b40c72493
+.quad	0x28db77f523047d84,0x32caab7b40c72493
+.quad	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+.quad	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+.quad	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+.quad	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+.quad	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+.quad	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+
+.quad	0x0001020304050607,0x08090a0b0c0d0e0f
+.quad	0x0001020304050607,0x08090a0b0c0d0e0f
+.byte	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+#endif
diff --git a/third_party/boringssl/win-x86/crypto/aes/aes-586.asm b/third_party/boringssl/win-x86/crypto/aes/aes-586.asm
new file mode 100644
index 0000000..42ca026
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/aes/aes-586.asm
@@ -0,0 +1,3219 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+align	16
+__x86_AES_encrypt_compact:
+	mov	DWORD [20+esp],edi
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+	mov	edi,DWORD [ebp-128]
+	mov	esi,DWORD [ebp-96]
+	mov	edi,DWORD [ebp-64]
+	mov	esi,DWORD [ebp-32]
+	mov	edi,DWORD [ebp]
+	mov	esi,DWORD [32+ebp]
+	mov	edi,DWORD [64+ebp]
+	mov	esi,DWORD [96+ebp]
+align	16
+L$000loop:
+	mov	esi,eax
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	shr	ebx,16
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,ch
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	shr	ecx,24
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,dh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edx,255
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	and	edx,255
+	movzx	edx,BYTE [edx*1+ebp-128]
+	movzx	eax,ah
+	movzx	eax,BYTE [eax*1+ebp-128]
+	shl	eax,8
+	xor	edx,eax
+	mov	eax,DWORD [4+esp]
+	and	ebx,255
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	shl	ebx,16
+	xor	edx,ebx
+	mov	ebx,DWORD [8+esp]
+	movzx	ecx,BYTE [ecx*1+ebp-128]
+	shl	ecx,24
+	xor	edx,ecx
+	mov	ecx,esi
+	mov	ebp,2155905152
+	and	ebp,ecx
+	lea	edi,[ecx*1+ecx]
+	mov	esi,ebp
+	shr	ebp,7
+	and	edi,4278124286
+	sub	esi,ebp
+	mov	ebp,ecx
+	and	esi,454761243
+	ror	ebp,16
+	xor	esi,edi
+	mov	edi,ecx
+	xor	ecx,esi
+	ror	edi,24
+	xor	esi,ebp
+	rol	ecx,24
+	xor	esi,edi
+	mov	ebp,2155905152
+	xor	ecx,esi
+	and	ebp,edx
+	lea	edi,[edx*1+edx]
+	mov	esi,ebp
+	shr	ebp,7
+	and	edi,4278124286
+	sub	esi,ebp
+	mov	ebp,edx
+	and	esi,454761243
+	ror	ebp,16
+	xor	esi,edi
+	mov	edi,edx
+	xor	edx,esi
+	ror	edi,24
+	xor	esi,ebp
+	rol	edx,24
+	xor	esi,edi
+	mov	ebp,2155905152
+	xor	edx,esi
+	and	ebp,eax
+	lea	edi,[eax*1+eax]
+	mov	esi,ebp
+	shr	ebp,7
+	and	edi,4278124286
+	sub	esi,ebp
+	mov	ebp,eax
+	and	esi,454761243
+	ror	ebp,16
+	xor	esi,edi
+	mov	edi,eax
+	xor	eax,esi
+	ror	edi,24
+	xor	esi,ebp
+	rol	eax,24
+	xor	esi,edi
+	mov	ebp,2155905152
+	xor	eax,esi
+	and	ebp,ebx
+	lea	edi,[ebx*1+ebx]
+	mov	esi,ebp
+	shr	ebp,7
+	and	edi,4278124286
+	sub	esi,ebp
+	mov	ebp,ebx
+	and	esi,454761243
+	ror	ebp,16
+	xor	esi,edi
+	mov	edi,ebx
+	xor	ebx,esi
+	ror	edi,24
+	xor	esi,ebp
+	rol	ebx,24
+	xor	esi,edi
+	xor	ebx,esi
+	mov	edi,DWORD [20+esp]
+	mov	ebp,DWORD [28+esp]
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	cmp	edi,DWORD [24+esp]
+	mov	DWORD [20+esp],edi
+	jb	NEAR L$000loop
+	mov	esi,eax
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	shr	ebx,16
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,ch
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	shr	ecx,24
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,dh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edx,255
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	edi,DWORD [20+esp]
+	and	edx,255
+	movzx	edx,BYTE [edx*1+ebp-128]
+	movzx	eax,ah
+	movzx	eax,BYTE [eax*1+ebp-128]
+	shl	eax,8
+	xor	edx,eax
+	mov	eax,DWORD [4+esp]
+	and	ebx,255
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	shl	ebx,16
+	xor	edx,ebx
+	mov	ebx,DWORD [8+esp]
+	movzx	ecx,BYTE [ecx*1+ebp-128]
+	shl	ecx,24
+	xor	edx,ecx
+	mov	ecx,esi
+	xor	eax,DWORD [16+edi]
+	xor	ebx,DWORD [20+edi]
+	xor	ecx,DWORD [24+edi]
+	xor	edx,DWORD [28+edi]
+	ret
+align	16
+__sse_AES_encrypt_compact:
+	pxor	mm0,[edi]
+	pxor	mm4,[8+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+	mov	eax,454761243
+	mov	DWORD [8+esp],eax
+	mov	DWORD [12+esp],eax
+	mov	eax,DWORD [ebp-128]
+	mov	ebx,DWORD [ebp-96]
+	mov	ecx,DWORD [ebp-64]
+	mov	edx,DWORD [ebp-32]
+	mov	eax,DWORD [ebp]
+	mov	ebx,DWORD [32+ebp]
+	mov	ecx,DWORD [64+ebp]
+	mov	edx,DWORD [96+ebp]
+align	16
+L$001loop:
+	pshufw	mm1,mm0,8
+	pshufw	mm5,mm4,13
+	movd	eax,mm1
+	movd	ebx,mm5
+	mov	DWORD [20+esp],edi
+	movzx	esi,al
+	movzx	edx,ah
+	pshufw	mm2,mm0,13
+	movzx	ecx,BYTE [esi*1+ebp-128]
+	movzx	edi,bl
+	movzx	edx,BYTE [edx*1+ebp-128]
+	shr	eax,16
+	shl	edx,8
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,16
+	pshufw	mm6,mm4,8
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,ah
+	shl	esi,24
+	shr	ebx,16
+	or	edx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,8
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,al
+	shl	esi,24
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bl
+	movd	eax,mm2
+	movd	mm0,ecx
+	movzx	ecx,BYTE [edi*1+ebp-128]
+	movzx	edi,ah
+	shl	ecx,16
+	movd	ebx,mm6
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,24
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bl
+	shl	esi,8
+	shr	ebx,16
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,al
+	shr	eax,16
+	movd	mm1,ecx
+	movzx	ecx,BYTE [edi*1+ebp-128]
+	movzx	edi,ah
+	shl	ecx,16
+	and	eax,255
+	or	ecx,esi
+	punpckldq	mm0,mm1
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,24
+	and	ebx,255
+	movzx	eax,BYTE [eax*1+ebp-128]
+	or	ecx,esi
+	shl	eax,16
+	movzx	esi,BYTE [edi*1+ebp-128]
+	or	edx,eax
+	shl	esi,8
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	or	ecx,esi
+	or	edx,ebx
+	mov	edi,DWORD [20+esp]
+	movd	mm4,ecx
+	movd	mm5,edx
+	punpckldq	mm4,mm5
+	add	edi,16
+	cmp	edi,DWORD [24+esp]
+	ja	NEAR L$002out
+	movq	mm2,[8+esp]
+	pxor	mm3,mm3
+	pxor	mm7,mm7
+	movq	mm1,mm0
+	movq	mm5,mm4
+	pcmpgtb	mm3,mm0
+	pcmpgtb	mm7,mm4
+	pand	mm3,mm2
+	pand	mm7,mm2
+	pshufw	mm2,mm0,177
+	pshufw	mm6,mm4,177
+	paddb	mm0,mm0
+	paddb	mm4,mm4
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pshufw	mm3,mm2,177
+	pshufw	mm7,mm6,177
+	pxor	mm1,mm0
+	pxor	mm5,mm4
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	movq	mm2,mm3
+	movq	mm6,mm7
+	pslld	mm3,8
+	pslld	mm7,8
+	psrld	mm2,24
+	psrld	mm6,24
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	movq	mm3,mm1
+	movq	mm7,mm5
+	movq	mm2,[edi]
+	movq	mm6,[8+edi]
+	psrld	mm1,8
+	psrld	mm5,8
+	mov	eax,DWORD [ebp-128]
+	pslld	mm3,24
+	pslld	mm7,24
+	mov	ebx,DWORD [ebp-64]
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	mov	ecx,DWORD [ebp]
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	mov	edx,DWORD [64+ebp]
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	jmp	NEAR L$001loop
+align	16
+L$002out:
+	pxor	mm0,[edi]
+	pxor	mm4,[8+edi]
+	ret
+align	16
+__x86_AES_encrypt:
+	mov	DWORD [20+esp],edi
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+align	16
+L$003loop:
+	mov	esi,eax
+	and	esi,255
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,bh
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	mov	edi,edx
+	shr	edi,24
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	shr	ebx,16
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,ch
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	mov	edi,eax
+	shr	edi,24
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	shr	ecx,24
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,dh
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,eax
+	shr	edi,16
+	and	edx,255
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	movzx	edi,bh
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	edi,DWORD [20+esp]
+	mov	edx,DWORD [edx*8+ebp]
+	movzx	eax,ah
+	xor	edx,DWORD [3+eax*8+ebp]
+	mov	eax,DWORD [4+esp]
+	and	ebx,255
+	xor	edx,DWORD [2+ebx*8+ebp]
+	mov	ebx,DWORD [8+esp]
+	xor	edx,DWORD [1+ecx*8+ebp]
+	mov	ecx,esi
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	cmp	edi,DWORD [24+esp]
+	mov	DWORD [20+esp],edi
+	jb	NEAR L$003loop
+	mov	esi,eax
+	and	esi,255
+	mov	esi,DWORD [2+esi*8+ebp]
+	and	esi,255
+	movzx	edi,bh
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,65280
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,16711680
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	mov	edi,DWORD [2+edi*8+ebp]
+	and	edi,4278190080
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	shr	ebx,16
+	mov	esi,DWORD [2+esi*8+ebp]
+	and	esi,255
+	movzx	edi,ch
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,65280
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,16711680
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,24
+	mov	edi,DWORD [2+edi*8+ebp]
+	and	edi,4278190080
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	shr	ecx,24
+	mov	esi,DWORD [2+esi*8+ebp]
+	and	esi,255
+	movzx	edi,dh
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,65280
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edx,255
+	and	edi,255
+	mov	edi,DWORD [edi*8+ebp]
+	and	edi,16711680
+	xor	esi,edi
+	movzx	edi,bh
+	mov	edi,DWORD [2+edi*8+ebp]
+	and	edi,4278190080
+	xor	esi,edi
+	mov	edi,DWORD [20+esp]
+	and	edx,255
+	mov	edx,DWORD [2+edx*8+ebp]
+	and	edx,255
+	movzx	eax,ah
+	mov	eax,DWORD [eax*8+ebp]
+	and	eax,65280
+	xor	edx,eax
+	mov	eax,DWORD [4+esp]
+	and	ebx,255
+	mov	ebx,DWORD [ebx*8+ebp]
+	and	ebx,16711680
+	xor	edx,ebx
+	mov	ebx,DWORD [8+esp]
+	mov	ecx,DWORD [2+ecx*8+ebp]
+	and	ecx,4278190080
+	xor	edx,ecx
+	mov	ecx,esi
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	ret
+align	64
+L$AES_Te:
+dd	2774754246,2774754246
+dd	2222750968,2222750968
+dd	2574743534,2574743534
+dd	2373680118,2373680118
+dd	234025727,234025727
+dd	3177933782,3177933782
+dd	2976870366,2976870366
+dd	1422247313,1422247313
+dd	1345335392,1345335392
+dd	50397442,50397442
+dd	2842126286,2842126286
+dd	2099981142,2099981142
+dd	436141799,436141799
+dd	1658312629,1658312629
+dd	3870010189,3870010189
+dd	2591454956,2591454956
+dd	1170918031,1170918031
+dd	2642575903,2642575903
+dd	1086966153,1086966153
+dd	2273148410,2273148410
+dd	368769775,368769775
+dd	3948501426,3948501426
+dd	3376891790,3376891790
+dd	200339707,200339707
+dd	3970805057,3970805057
+dd	1742001331,1742001331
+dd	4255294047,4255294047
+dd	3937382213,3937382213
+dd	3214711843,3214711843
+dd	4154762323,4154762323
+dd	2524082916,2524082916
+dd	1539358875,1539358875
+dd	3266819957,3266819957
+dd	486407649,486407649
+dd	2928907069,2928907069
+dd	1780885068,1780885068
+dd	1513502316,1513502316
+dd	1094664062,1094664062
+dd	49805301,49805301
+dd	1338821763,1338821763
+dd	1546925160,1546925160
+dd	4104496465,4104496465
+dd	887481809,887481809
+dd	150073849,150073849
+dd	2473685474,2473685474
+dd	1943591083,1943591083
+dd	1395732834,1395732834
+dd	1058346282,1058346282
+dd	201589768,201589768
+dd	1388824469,1388824469
+dd	1696801606,1696801606
+dd	1589887901,1589887901
+dd	672667696,672667696
+dd	2711000631,2711000631
+dd	251987210,251987210
+dd	3046808111,3046808111
+dd	151455502,151455502
+dd	907153956,907153956
+dd	2608889883,2608889883
+dd	1038279391,1038279391
+dd	652995533,652995533
+dd	1764173646,1764173646
+dd	3451040383,3451040383
+dd	2675275242,2675275242
+dd	453576978,453576978
+dd	2659418909,2659418909
+dd	1949051992,1949051992
+dd	773462580,773462580
+dd	756751158,756751158
+dd	2993581788,2993581788
+dd	3998898868,3998898868
+dd	4221608027,4221608027
+dd	4132590244,4132590244
+dd	1295727478,1295727478
+dd	1641469623,1641469623
+dd	3467883389,3467883389
+dd	2066295122,2066295122
+dd	1055122397,1055122397
+dd	1898917726,1898917726
+dd	2542044179,2542044179
+dd	4115878822,4115878822
+dd	1758581177,1758581177
+dd	0,0
+dd	753790401,753790401
+dd	1612718144,1612718144
+dd	536673507,536673507
+dd	3367088505,3367088505
+dd	3982187446,3982187446
+dd	3194645204,3194645204
+dd	1187761037,1187761037
+dd	3653156455,3653156455
+dd	1262041458,1262041458
+dd	3729410708,3729410708
+dd	3561770136,3561770136
+dd	3898103984,3898103984
+dd	1255133061,1255133061
+dd	1808847035,1808847035
+dd	720367557,720367557
+dd	3853167183,3853167183
+dd	385612781,385612781
+dd	3309519750,3309519750
+dd	3612167578,3612167578
+dd	1429418854,1429418854
+dd	2491778321,2491778321
+dd	3477423498,3477423498
+dd	284817897,284817897
+dd	100794884,100794884
+dd	2172616702,2172616702
+dd	4031795360,4031795360
+dd	1144798328,1144798328
+dd	3131023141,3131023141
+dd	3819481163,3819481163
+dd	4082192802,4082192802
+dd	4272137053,4272137053
+dd	3225436288,3225436288
+dd	2324664069,2324664069
+dd	2912064063,2912064063
+dd	3164445985,3164445985
+dd	1211644016,1211644016
+dd	83228145,83228145
+dd	3753688163,3753688163
+dd	3249976951,3249976951
+dd	1977277103,1977277103
+dd	1663115586,1663115586
+dd	806359072,806359072
+dd	452984805,452984805
+dd	250868733,250868733
+dd	1842533055,1842533055
+dd	1288555905,1288555905
+dd	336333848,336333848
+dd	890442534,890442534
+dd	804056259,804056259
+dd	3781124030,3781124030
+dd	2727843637,2727843637
+dd	3427026056,3427026056
+dd	957814574,957814574
+dd	1472513171,1472513171
+dd	4071073621,4071073621
+dd	2189328124,2189328124
+dd	1195195770,1195195770
+dd	2892260552,2892260552
+dd	3881655738,3881655738
+dd	723065138,723065138
+dd	2507371494,2507371494
+dd	2690670784,2690670784
+dd	2558624025,2558624025
+dd	3511635870,3511635870
+dd	2145180835,2145180835
+dd	1713513028,1713513028
+dd	2116692564,2116692564
+dd	2878378043,2878378043
+dd	2206763019,2206763019
+dd	3393603212,3393603212
+dd	703524551,703524551
+dd	3552098411,3552098411
+dd	1007948840,1007948840
+dd	2044649127,2044649127
+dd	3797835452,3797835452
+dd	487262998,487262998
+dd	1994120109,1994120109
+dd	1004593371,1004593371
+dd	1446130276,1446130276
+dd	1312438900,1312438900
+dd	503974420,503974420
+dd	3679013266,3679013266
+dd	168166924,168166924
+dd	1814307912,1814307912
+dd	3831258296,3831258296
+dd	1573044895,1573044895
+dd	1859376061,1859376061
+dd	4021070915,4021070915
+dd	2791465668,2791465668
+dd	2828112185,2828112185
+dd	2761266481,2761266481
+dd	937747667,937747667
+dd	2339994098,2339994098
+dd	854058965,854058965
+dd	1137232011,1137232011
+dd	1496790894,1496790894
+dd	3077402074,3077402074
+dd	2358086913,2358086913
+dd	1691735473,1691735473
+dd	3528347292,3528347292
+dd	3769215305,3769215305
+dd	3027004632,3027004632
+dd	4199962284,4199962284
+dd	133494003,133494003
+dd	636152527,636152527
+dd	2942657994,2942657994
+dd	2390391540,2390391540
+dd	3920539207,3920539207
+dd	403179536,403179536
+dd	3585784431,3585784431
+dd	2289596656,2289596656
+dd	1864705354,1864705354
+dd	1915629148,1915629148
+dd	605822008,605822008
+dd	4054230615,4054230615
+dd	3350508659,3350508659
+dd	1371981463,1371981463
+dd	602466507,602466507
+dd	2094914977,2094914977
+dd	2624877800,2624877800
+dd	555687742,555687742
+dd	3712699286,3712699286
+dd	3703422305,3703422305
+dd	2257292045,2257292045
+dd	2240449039,2240449039
+dd	2423288032,2423288032
+dd	1111375484,1111375484
+dd	3300242801,3300242801
+dd	2858837708,2858837708
+dd	3628615824,3628615824
+dd	84083462,84083462
+dd	32962295,32962295
+dd	302911004,302911004
+dd	2741068226,2741068226
+dd	1597322602,1597322602
+dd	4183250862,4183250862
+dd	3501832553,3501832553
+dd	2441512471,2441512471
+dd	1489093017,1489093017
+dd	656219450,656219450
+dd	3114180135,3114180135
+dd	954327513,954327513
+dd	335083755,335083755
+dd	3013122091,3013122091
+dd	856756514,856756514
+dd	3144247762,3144247762
+dd	1893325225,1893325225
+dd	2307821063,2307821063
+dd	2811532339,2811532339
+dd	3063651117,3063651117
+dd	572399164,572399164
+dd	2458355477,2458355477
+dd	552200649,552200649
+dd	1238290055,1238290055
+dd	4283782570,4283782570
+dd	2015897680,2015897680
+dd	2061492133,2061492133
+dd	2408352771,2408352771
+dd	4171342169,4171342169
+dd	2156497161,2156497161
+dd	386731290,386731290
+dd	3669999461,3669999461
+dd	837215959,837215959
+dd	3326231172,3326231172
+dd	3093850320,3093850320
+dd	3275833730,3275833730
+dd	2962856233,2962856233
+dd	1999449434,1999449434
+dd	286199582,286199582
+dd	3417354363,3417354363
+dd	4233385128,4233385128
+dd	3602627437,3602627437
+dd	974525996,974525996
+db	99,124,119,123,242,107,111,197
+db	48,1,103,43,254,215,171,118
+db	202,130,201,125,250,89,71,240
+db	173,212,162,175,156,164,114,192
+db	183,253,147,38,54,63,247,204
+db	52,165,229,241,113,216,49,21
+db	4,199,35,195,24,150,5,154
+db	7,18,128,226,235,39,178,117
+db	9,131,44,26,27,110,90,160
+db	82,59,214,179,41,227,47,132
+db	83,209,0,237,32,252,177,91
+db	106,203,190,57,74,76,88,207
+db	208,239,170,251,67,77,51,133
+db	69,249,2,127,80,60,159,168
+db	81,163,64,143,146,157,56,245
+db	188,182,218,33,16,255,243,210
+db	205,12,19,236,95,151,68,23
+db	196,167,126,61,100,93,25,115
+db	96,129,79,220,34,42,144,136
+db	70,238,184,20,222,94,11,219
+db	224,50,58,10,73,6,36,92
+db	194,211,172,98,145,149,228,121
+db	231,200,55,109,141,213,78,169
+db	108,86,244,234,101,122,174,8
+db	186,120,37,46,28,166,180,198
+db	232,221,116,31,75,189,139,138
+db	112,62,181,102,72,3,246,14
+db	97,53,87,185,134,193,29,158
+db	225,248,152,17,105,217,142,148
+db	155,30,135,233,206,85,40,223
+db	140,161,137,13,191,230,66,104
+db	65,153,45,15,176,84,187,22
+db	99,124,119,123,242,107,111,197
+db	48,1,103,43,254,215,171,118
+db	202,130,201,125,250,89,71,240
+db	173,212,162,175,156,164,114,192
+db	183,253,147,38,54,63,247,204
+db	52,165,229,241,113,216,49,21
+db	4,199,35,195,24,150,5,154
+db	7,18,128,226,235,39,178,117
+db	9,131,44,26,27,110,90,160
+db	82,59,214,179,41,227,47,132
+db	83,209,0,237,32,252,177,91
+db	106,203,190,57,74,76,88,207
+db	208,239,170,251,67,77,51,133
+db	69,249,2,127,80,60,159,168
+db	81,163,64,143,146,157,56,245
+db	188,182,218,33,16,255,243,210
+db	205,12,19,236,95,151,68,23
+db	196,167,126,61,100,93,25,115
+db	96,129,79,220,34,42,144,136
+db	70,238,184,20,222,94,11,219
+db	224,50,58,10,73,6,36,92
+db	194,211,172,98,145,149,228,121
+db	231,200,55,109,141,213,78,169
+db	108,86,244,234,101,122,174,8
+db	186,120,37,46,28,166,180,198
+db	232,221,116,31,75,189,139,138
+db	112,62,181,102,72,3,246,14
+db	97,53,87,185,134,193,29,158
+db	225,248,152,17,105,217,142,148
+db	155,30,135,233,206,85,40,223
+db	140,161,137,13,191,230,66,104
+db	65,153,45,15,176,84,187,22
+db	99,124,119,123,242,107,111,197
+db	48,1,103,43,254,215,171,118
+db	202,130,201,125,250,89,71,240
+db	173,212,162,175,156,164,114,192
+db	183,253,147,38,54,63,247,204
+db	52,165,229,241,113,216,49,21
+db	4,199,35,195,24,150,5,154
+db	7,18,128,226,235,39,178,117
+db	9,131,44,26,27,110,90,160
+db	82,59,214,179,41,227,47,132
+db	83,209,0,237,32,252,177,91
+db	106,203,190,57,74,76,88,207
+db	208,239,170,251,67,77,51,133
+db	69,249,2,127,80,60,159,168
+db	81,163,64,143,146,157,56,245
+db	188,182,218,33,16,255,243,210
+db	205,12,19,236,95,151,68,23
+db	196,167,126,61,100,93,25,115
+db	96,129,79,220,34,42,144,136
+db	70,238,184,20,222,94,11,219
+db	224,50,58,10,73,6,36,92
+db	194,211,172,98,145,149,228,121
+db	231,200,55,109,141,213,78,169
+db	108,86,244,234,101,122,174,8
+db	186,120,37,46,28,166,180,198
+db	232,221,116,31,75,189,139,138
+db	112,62,181,102,72,3,246,14
+db	97,53,87,185,134,193,29,158
+db	225,248,152,17,105,217,142,148
+db	155,30,135,233,206,85,40,223
+db	140,161,137,13,191,230,66,104
+db	65,153,45,15,176,84,187,22
+db	99,124,119,123,242,107,111,197
+db	48,1,103,43,254,215,171,118
+db	202,130,201,125,250,89,71,240
+db	173,212,162,175,156,164,114,192
+db	183,253,147,38,54,63,247,204
+db	52,165,229,241,113,216,49,21
+db	4,199,35,195,24,150,5,154
+db	7,18,128,226,235,39,178,117
+db	9,131,44,26,27,110,90,160
+db	82,59,214,179,41,227,47,132
+db	83,209,0,237,32,252,177,91
+db	106,203,190,57,74,76,88,207
+db	208,239,170,251,67,77,51,133
+db	69,249,2,127,80,60,159,168
+db	81,163,64,143,146,157,56,245
+db	188,182,218,33,16,255,243,210
+db	205,12,19,236,95,151,68,23
+db	196,167,126,61,100,93,25,115
+db	96,129,79,220,34,42,144,136
+db	70,238,184,20,222,94,11,219
+db	224,50,58,10,73,6,36,92
+db	194,211,172,98,145,149,228,121
+db	231,200,55,109,141,213,78,169
+db	108,86,244,234,101,122,174,8
+db	186,120,37,46,28,166,180,198
+db	232,221,116,31,75,189,139,138
+db	112,62,181,102,72,3,246,14
+db	97,53,87,185,134,193,29,158
+db	225,248,152,17,105,217,142,148
+db	155,30,135,233,206,85,40,223
+db	140,161,137,13,191,230,66,104
+db	65,153,45,15,176,84,187,22
+dd	1,2,4,8
+dd	16,32,64,128
+dd	27,54,0,0
+dd	0,0,0,0
+global	_asm_AES_encrypt
+align	16
+_asm_AES_encrypt:
+L$_asm_AES_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [28+esp]
+	mov	eax,esp
+	sub	esp,36
+	and	esp,-64
+	lea	ebx,[edi-127]
+	sub	ebx,esp
+	neg	ebx
+	and	ebx,960
+	sub	esp,ebx
+	add	esp,4
+	mov	DWORD [28+esp],eax
+	call	L$004pic_point
+L$004pic_point:
+	pop	ebp
+	lea	eax,[_OPENSSL_ia32cap_P]
+	lea	ebp,[(L$AES_Te-L$004pic_point)+ebp]
+	lea	ebx,[764+esp]
+	sub	ebx,ebp
+	and	ebx,768
+	lea	ebp,[2176+ebx*1+ebp]
+	bt	DWORD [eax],25
+	jnc	NEAR L$005x86
+	movq	mm0,[esi]
+	movq	mm4,[8+esi]
+	call	__sse_AES_encrypt_compact
+	mov	esp,DWORD [28+esp]
+	mov	esi,DWORD [24+esp]
+	movq	[esi],mm0
+	movq	[8+esi],mm4
+	emms
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+L$005x86:
+	mov	DWORD [24+esp],ebp
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	call	__x86_AES_encrypt_compact
+	mov	esp,DWORD [28+esp]
+	mov	esi,DWORD [24+esp]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+__x86_AES_decrypt_compact:
+	mov	DWORD [20+esp],edi
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+	mov	edi,DWORD [ebp-128]
+	mov	esi,DWORD [ebp-96]
+	mov	edi,DWORD [ebp-64]
+	mov	esi,DWORD [ebp-32]
+	mov	edi,DWORD [ebp]
+	mov	esi,DWORD [32+ebp]
+	mov	edi,DWORD [64+ebp]
+	mov	esi,DWORD [96+ebp]
+align	16
+L$006loop:
+	mov	esi,eax
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,dh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ebx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,ah
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	and	edx,255
+	movzx	edx,BYTE [edx*1+ebp-128]
+	movzx	ecx,ch
+	movzx	ecx,BYTE [ecx*1+ebp-128]
+	shl	ecx,8
+	xor	edx,ecx
+	mov	ecx,esi
+	shr	ebx,16
+	and	ebx,255
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	shl	ebx,16
+	xor	edx,ebx
+	shr	eax,24
+	movzx	eax,BYTE [eax*1+ebp-128]
+	shl	eax,24
+	xor	edx,eax
+	mov	edi,2155905152
+	and	edi,ecx
+	mov	esi,edi
+	shr	edi,7
+	lea	eax,[ecx*1+ecx]
+	sub	esi,edi
+	and	eax,4278124286
+	and	esi,454761243
+	xor	eax,esi
+	mov	edi,2155905152
+	and	edi,eax
+	mov	esi,edi
+	shr	edi,7
+	lea	ebx,[eax*1+eax]
+	sub	esi,edi
+	and	ebx,4278124286
+	and	esi,454761243
+	xor	eax,ecx
+	xor	ebx,esi
+	mov	edi,2155905152
+	and	edi,ebx
+	mov	esi,edi
+	shr	edi,7
+	lea	ebp,[ebx*1+ebx]
+	sub	esi,edi
+	and	ebp,4278124286
+	and	esi,454761243
+	xor	ebx,ecx
+	rol	ecx,8
+	xor	ebp,esi
+	xor	ecx,eax
+	xor	eax,ebp
+	xor	ecx,ebx
+	xor	ebx,ebp
+	rol	eax,24
+	xor	ecx,ebp
+	rol	ebx,16
+	xor	ecx,eax
+	rol	ebp,8
+	xor	ecx,ebx
+	mov	eax,DWORD [4+esp]
+	xor	ecx,ebp
+	mov	DWORD [12+esp],ecx
+	mov	edi,2155905152
+	and	edi,edx
+	mov	esi,edi
+	shr	edi,7
+	lea	ebx,[edx*1+edx]
+	sub	esi,edi
+	and	ebx,4278124286
+	and	esi,454761243
+	xor	ebx,esi
+	mov	edi,2155905152
+	and	edi,ebx
+	mov	esi,edi
+	shr	edi,7
+	lea	ecx,[ebx*1+ebx]
+	sub	esi,edi
+	and	ecx,4278124286
+	and	esi,454761243
+	xor	ebx,edx
+	xor	ecx,esi
+	mov	edi,2155905152
+	and	edi,ecx
+	mov	esi,edi
+	shr	edi,7
+	lea	ebp,[ecx*1+ecx]
+	sub	esi,edi
+	and	ebp,4278124286
+	and	esi,454761243
+	xor	ecx,edx
+	rol	edx,8
+	xor	ebp,esi
+	xor	edx,ebx
+	xor	ebx,ebp
+	xor	edx,ecx
+	xor	ecx,ebp
+	rol	ebx,24
+	xor	edx,ebp
+	rol	ecx,16
+	xor	edx,ebx
+	rol	ebp,8
+	xor	edx,ecx
+	mov	ebx,DWORD [8+esp]
+	xor	edx,ebp
+	mov	DWORD [16+esp],edx
+	mov	edi,2155905152
+	and	edi,eax
+	mov	esi,edi
+	shr	edi,7
+	lea	ecx,[eax*1+eax]
+	sub	esi,edi
+	and	ecx,4278124286
+	and	esi,454761243
+	xor	ecx,esi
+	mov	edi,2155905152
+	and	edi,ecx
+	mov	esi,edi
+	shr	edi,7
+	lea	edx,[ecx*1+ecx]
+	sub	esi,edi
+	and	edx,4278124286
+	and	esi,454761243
+	xor	ecx,eax
+	xor	edx,esi
+	mov	edi,2155905152
+	and	edi,edx
+	mov	esi,edi
+	shr	edi,7
+	lea	ebp,[edx*1+edx]
+	sub	esi,edi
+	and	ebp,4278124286
+	and	esi,454761243
+	xor	edx,eax
+	rol	eax,8
+	xor	ebp,esi
+	xor	eax,ecx
+	xor	ecx,ebp
+	xor	eax,edx
+	xor	edx,ebp
+	rol	ecx,24
+	xor	eax,ebp
+	rol	edx,16
+	xor	eax,ecx
+	rol	ebp,8
+	xor	eax,edx
+	xor	eax,ebp
+	mov	edi,2155905152
+	and	edi,ebx
+	mov	esi,edi
+	shr	edi,7
+	lea	ecx,[ebx*1+ebx]
+	sub	esi,edi
+	and	ecx,4278124286
+	and	esi,454761243
+	xor	ecx,esi
+	mov	edi,2155905152
+	and	edi,ecx
+	mov	esi,edi
+	shr	edi,7
+	lea	edx,[ecx*1+ecx]
+	sub	esi,edi
+	and	edx,4278124286
+	and	esi,454761243
+	xor	ecx,ebx
+	xor	edx,esi
+	mov	edi,2155905152
+	and	edi,edx
+	mov	esi,edi
+	shr	edi,7
+	lea	ebp,[edx*1+edx]
+	sub	esi,edi
+	and	ebp,4278124286
+	and	esi,454761243
+	xor	edx,ebx
+	rol	ebx,8
+	xor	ebp,esi
+	xor	ebx,ecx
+	xor	ecx,ebp
+	xor	ebx,edx
+	xor	edx,ebp
+	rol	ecx,24
+	xor	ebx,ebp
+	rol	edx,16
+	xor	ebx,ecx
+	rol	ebp,8
+	xor	ebx,edx
+	mov	ecx,DWORD [12+esp]
+	xor	ebx,ebp
+	mov	edx,DWORD [16+esp]
+	mov	edi,DWORD [20+esp]
+	mov	ebp,DWORD [28+esp]
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	cmp	edi,DWORD [24+esp]
+	mov	DWORD [20+esp],edi
+	jb	NEAR L$006loop
+	mov	esi,eax
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,dh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ebx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,ah
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp-128]
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp-128]
+	shl	edi,24
+	xor	esi,edi
+	mov	edi,DWORD [20+esp]
+	and	edx,255
+	movzx	edx,BYTE [edx*1+ebp-128]
+	movzx	ecx,ch
+	movzx	ecx,BYTE [ecx*1+ebp-128]
+	shl	ecx,8
+	xor	edx,ecx
+	mov	ecx,esi
+	shr	ebx,16
+	and	ebx,255
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	shl	ebx,16
+	xor	edx,ebx
+	mov	ebx,DWORD [8+esp]
+	shr	eax,24
+	movzx	eax,BYTE [eax*1+ebp-128]
+	shl	eax,24
+	xor	edx,eax
+	mov	eax,DWORD [4+esp]
+	xor	eax,DWORD [16+edi]
+	xor	ebx,DWORD [20+edi]
+	xor	ecx,DWORD [24+edi]
+	xor	edx,DWORD [28+edi]
+	ret
+align	16
+__sse_AES_decrypt_compact:
+	pxor	mm0,[edi]
+	pxor	mm4,[8+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+	mov	eax,454761243
+	mov	DWORD [8+esp],eax
+	mov	DWORD [12+esp],eax
+	mov	eax,DWORD [ebp-128]
+	mov	ebx,DWORD [ebp-96]
+	mov	ecx,DWORD [ebp-64]
+	mov	edx,DWORD [ebp-32]
+	mov	eax,DWORD [ebp]
+	mov	ebx,DWORD [32+ebp]
+	mov	ecx,DWORD [64+ebp]
+	mov	edx,DWORD [96+ebp]
+align	16
+L$007loop:
+	pshufw	mm1,mm0,12
+	pshufw	mm5,mm4,9
+	movd	eax,mm1
+	movd	ebx,mm5
+	mov	DWORD [20+esp],edi
+	movzx	esi,al
+	movzx	edx,ah
+	pshufw	mm2,mm0,6
+	movzx	ecx,BYTE [esi*1+ebp-128]
+	movzx	edi,bl
+	movzx	edx,BYTE [edx*1+ebp-128]
+	shr	eax,16
+	shl	edx,8
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,16
+	pshufw	mm6,mm4,3
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,ah
+	shl	esi,24
+	shr	ebx,16
+	or	edx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	esi,24
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,al
+	shl	esi,8
+	movd	eax,mm2
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bl
+	shl	esi,16
+	movd	ebx,mm6
+	movd	mm0,ecx
+	movzx	ecx,BYTE [edi*1+ebp-128]
+	movzx	edi,al
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bl
+	or	edx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,ah
+	shl	esi,16
+	shr	eax,16
+	or	edx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shr	ebx,16
+	shl	esi,8
+	movd	mm1,edx
+	movzx	edx,BYTE [edi*1+ebp-128]
+	movzx	edi,bh
+	shl	edx,24
+	and	ebx,255
+	or	edx,esi
+	punpckldq	mm0,mm1
+	movzx	esi,BYTE [edi*1+ebp-128]
+	movzx	edi,al
+	shl	esi,8
+	movzx	eax,ah
+	movzx	ebx,BYTE [ebx*1+ebp-128]
+	or	ecx,esi
+	movzx	esi,BYTE [edi*1+ebp-128]
+	or	edx,ebx
+	shl	esi,16
+	movzx	eax,BYTE [eax*1+ebp-128]
+	or	edx,esi
+	shl	eax,24
+	or	ecx,eax
+	mov	edi,DWORD [20+esp]
+	movd	mm4,edx
+	movd	mm5,ecx
+	punpckldq	mm4,mm5
+	add	edi,16
+	cmp	edi,DWORD [24+esp]
+	ja	NEAR L$008out
+	movq	mm3,mm0
+	movq	mm7,mm4
+	pshufw	mm2,mm0,228
+	pshufw	mm6,mm4,228
+	movq	mm1,mm0
+	movq	mm5,mm4
+	pshufw	mm0,mm0,177
+	pshufw	mm4,mm4,177
+	pslld	mm2,8
+	pslld	mm6,8
+	psrld	mm3,8
+	psrld	mm7,8
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pslld	mm2,16
+	pslld	mm6,16
+	psrld	mm3,16
+	psrld	mm7,16
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	movq	mm3,[8+esp]
+	pxor	mm2,mm2
+	pxor	mm6,mm6
+	pcmpgtb	mm2,mm1
+	pcmpgtb	mm6,mm5
+	pand	mm2,mm3
+	pand	mm6,mm3
+	paddb	mm1,mm1
+	paddb	mm5,mm5
+	pxor	mm1,mm2
+	pxor	mm5,mm6
+	movq	mm3,mm1
+	movq	mm7,mm5
+	movq	mm2,mm1
+	movq	mm6,mm5
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	pslld	mm3,24
+	pslld	mm7,24
+	psrld	mm2,8
+	psrld	mm6,8
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	movq	mm2,[8+esp]
+	pxor	mm3,mm3
+	pxor	mm7,mm7
+	pcmpgtb	mm3,mm1
+	pcmpgtb	mm7,mm5
+	pand	mm3,mm2
+	pand	mm7,mm2
+	paddb	mm1,mm1
+	paddb	mm5,mm5
+	pxor	mm1,mm3
+	pxor	mm5,mm7
+	pshufw	mm3,mm1,177
+	pshufw	mm7,mm5,177
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pxor	mm3,mm3
+	pxor	mm7,mm7
+	pcmpgtb	mm3,mm1
+	pcmpgtb	mm7,mm5
+	pand	mm3,mm2
+	pand	mm7,mm2
+	paddb	mm1,mm1
+	paddb	mm5,mm5
+	pxor	mm1,mm3
+	pxor	mm5,mm7
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	movq	mm3,mm1
+	movq	mm7,mm5
+	pshufw	mm2,mm1,177
+	pshufw	mm6,mm5,177
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	pslld	mm1,8
+	pslld	mm5,8
+	psrld	mm3,8
+	psrld	mm7,8
+	movq	mm2,[edi]
+	movq	mm6,[8+edi]
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	mov	eax,DWORD [ebp-128]
+	pslld	mm1,16
+	pslld	mm5,16
+	mov	ebx,DWORD [ebp-64]
+	psrld	mm3,16
+	psrld	mm7,16
+	mov	ecx,DWORD [ebp]
+	pxor	mm0,mm1
+	pxor	mm4,mm5
+	mov	edx,DWORD [64+ebp]
+	pxor	mm0,mm3
+	pxor	mm4,mm7
+	pxor	mm0,mm2
+	pxor	mm4,mm6
+	jmp	NEAR L$007loop
+align	16
+L$008out:
+	pxor	mm0,[edi]
+	pxor	mm4,[8+edi]
+	ret
+align	16
+__x86_AES_decrypt:
+	mov	DWORD [20+esp],edi
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [24+esp],esi
+align	16
+L$009loop:
+	mov	esi,eax
+	and	esi,255
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,dh
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	mov	edi,ebx
+	shr	edi,24
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,ah
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	mov	edi,ecx
+	shr	edi,24
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	mov	esi,DWORD [esi*8+ebp]
+	movzx	edi,bh
+	xor	esi,DWORD [3+edi*8+ebp]
+	mov	edi,eax
+	shr	edi,16
+	and	edi,255
+	xor	esi,DWORD [2+edi*8+ebp]
+	mov	edi,edx
+	shr	edi,24
+	xor	esi,DWORD [1+edi*8+ebp]
+	mov	edi,DWORD [20+esp]
+	and	edx,255
+	mov	edx,DWORD [edx*8+ebp]
+	movzx	ecx,ch
+	xor	edx,DWORD [3+ecx*8+ebp]
+	mov	ecx,esi
+	shr	ebx,16
+	and	ebx,255
+	xor	edx,DWORD [2+ebx*8+ebp]
+	mov	ebx,DWORD [8+esp]
+	shr	eax,24
+	xor	edx,DWORD [1+eax*8+ebp]
+	mov	eax,DWORD [4+esp]
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	cmp	edi,DWORD [24+esp]
+	mov	DWORD [20+esp],edi
+	jb	NEAR L$009loop
+	lea	ebp,[2176+ebp]
+	mov	edi,DWORD [ebp-128]
+	mov	esi,DWORD [ebp-96]
+	mov	edi,DWORD [ebp-64]
+	mov	esi,DWORD [ebp-32]
+	mov	edi,DWORD [ebp]
+	mov	esi,DWORD [32+ebp]
+	mov	edi,DWORD [64+ebp]
+	mov	esi,DWORD [96+ebp]
+	lea	ebp,[ebp-128]
+	mov	esi,eax
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp]
+	movzx	edi,dh
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ebx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [4+esp],esi
+	mov	esi,ebx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp]
+	movzx	edi,ah
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,ecx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,24
+	xor	esi,edi
+	mov	DWORD [8+esp],esi
+	mov	esi,ecx
+	and	esi,255
+	movzx	esi,BYTE [esi*1+ebp]
+	movzx	edi,bh
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,8
+	xor	esi,edi
+	mov	edi,eax
+	shr	edi,16
+	and	edi,255
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,16
+	xor	esi,edi
+	mov	edi,edx
+	shr	edi,24
+	movzx	edi,BYTE [edi*1+ebp]
+	shl	edi,24
+	xor	esi,edi
+	mov	edi,DWORD [20+esp]
+	and	edx,255
+	movzx	edx,BYTE [edx*1+ebp]
+	movzx	ecx,ch
+	movzx	ecx,BYTE [ecx*1+ebp]
+	shl	ecx,8
+	xor	edx,ecx
+	mov	ecx,esi
+	shr	ebx,16
+	and	ebx,255
+	movzx	ebx,BYTE [ebx*1+ebp]
+	shl	ebx,16
+	xor	edx,ebx
+	mov	ebx,DWORD [8+esp]
+	shr	eax,24
+	movzx	eax,BYTE [eax*1+ebp]
+	shl	eax,24
+	xor	edx,eax
+	mov	eax,DWORD [4+esp]
+	lea	ebp,[ebp-2048]
+	add	edi,16
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	ret
+align	64
+L$AES_Td:
+dd	1353184337,1353184337
+dd	1399144830,1399144830
+dd	3282310938,3282310938
+dd	2522752826,2522752826
+dd	3412831035,3412831035
+dd	4047871263,4047871263
+dd	2874735276,2874735276
+dd	2466505547,2466505547
+dd	1442459680,1442459680
+dd	4134368941,4134368941
+dd	2440481928,2440481928
+dd	625738485,625738485
+dd	4242007375,4242007375
+dd	3620416197,3620416197
+dd	2151953702,2151953702
+dd	2409849525,2409849525
+dd	1230680542,1230680542
+dd	1729870373,1729870373
+dd	2551114309,2551114309
+dd	3787521629,3787521629
+dd	41234371,41234371
+dd	317738113,317738113
+dd	2744600205,2744600205
+dd	3338261355,3338261355
+dd	3881799427,3881799427
+dd	2510066197,2510066197
+dd	3950669247,3950669247
+dd	3663286933,3663286933
+dd	763608788,763608788
+dd	3542185048,3542185048
+dd	694804553,694804553
+dd	1154009486,1154009486
+dd	1787413109,1787413109
+dd	2021232372,2021232372
+dd	1799248025,1799248025
+dd	3715217703,3715217703
+dd	3058688446,3058688446
+dd	397248752,397248752
+dd	1722556617,1722556617
+dd	3023752829,3023752829
+dd	407560035,407560035
+dd	2184256229,2184256229
+dd	1613975959,1613975959
+dd	1165972322,1165972322
+dd	3765920945,3765920945
+dd	2226023355,2226023355
+dd	480281086,480281086
+dd	2485848313,2485848313
+dd	1483229296,1483229296
+dd	436028815,436028815
+dd	2272059028,2272059028
+dd	3086515026,3086515026
+dd	601060267,601060267
+dd	3791801202,3791801202
+dd	1468997603,1468997603
+dd	715871590,715871590
+dd	120122290,120122290
+dd	63092015,63092015
+dd	2591802758,2591802758
+dd	2768779219,2768779219
+dd	4068943920,4068943920
+dd	2997206819,2997206819
+dd	3127509762,3127509762
+dd	1552029421,1552029421
+dd	723308426,723308426
+dd	2461301159,2461301159
+dd	4042393587,4042393587
+dd	2715969870,2715969870
+dd	3455375973,3455375973
+dd	3586000134,3586000134
+dd	526529745,526529745
+dd	2331944644,2331944644
+dd	2639474228,2639474228
+dd	2689987490,2689987490
+dd	853641733,853641733
+dd	1978398372,1978398372
+dd	971801355,971801355
+dd	2867814464,2867814464
+dd	111112542,111112542
+dd	1360031421,1360031421
+dd	4186579262,4186579262
+dd	1023860118,1023860118
+dd	2919579357,2919579357
+dd	1186850381,1186850381
+dd	3045938321,3045938321
+dd	90031217,90031217
+dd	1876166148,1876166148
+dd	4279586912,4279586912
+dd	620468249,620468249
+dd	2548678102,2548678102
+dd	3426959497,3426959497
+dd	2006899047,2006899047
+dd	3175278768,3175278768
+dd	2290845959,2290845959
+dd	945494503,945494503
+dd	3689859193,3689859193
+dd	1191869601,1191869601
+dd	3910091388,3910091388
+dd	3374220536,3374220536
+dd	0,0
+dd	2206629897,2206629897
+dd	1223502642,1223502642
+dd	2893025566,2893025566
+dd	1316117100,1316117100
+dd	4227796733,4227796733
+dd	1446544655,1446544655
+dd	517320253,517320253
+dd	658058550,658058550
+dd	1691946762,1691946762
+dd	564550760,564550760
+dd	3511966619,3511966619
+dd	976107044,976107044
+dd	2976320012,2976320012
+dd	266819475,266819475
+dd	3533106868,3533106868
+dd	2660342555,2660342555
+dd	1338359936,1338359936
+dd	2720062561,2720062561
+dd	1766553434,1766553434
+dd	370807324,370807324
+dd	179999714,179999714
+dd	3844776128,3844776128
+dd	1138762300,1138762300
+dd	488053522,488053522
+dd	185403662,185403662
+dd	2915535858,2915535858
+dd	3114841645,3114841645
+dd	3366526484,3366526484
+dd	2233069911,2233069911
+dd	1275557295,1275557295
+dd	3151862254,3151862254
+dd	4250959779,4250959779
+dd	2670068215,2670068215
+dd	3170202204,3170202204
+dd	3309004356,3309004356
+dd	880737115,880737115
+dd	1982415755,1982415755
+dd	3703972811,3703972811
+dd	1761406390,1761406390
+dd	1676797112,1676797112
+dd	3403428311,3403428311
+dd	277177154,277177154
+dd	1076008723,1076008723
+dd	538035844,538035844
+dd	2099530373,2099530373
+dd	4164795346,4164795346
+dd	288553390,288553390
+dd	1839278535,1839278535
+dd	1261411869,1261411869
+dd	4080055004,4080055004
+dd	3964831245,3964831245
+dd	3504587127,3504587127
+dd	1813426987,1813426987
+dd	2579067049,2579067049
+dd	4199060497,4199060497
+dd	577038663,577038663
+dd	3297574056,3297574056
+dd	440397984,440397984
+dd	3626794326,3626794326
+dd	4019204898,4019204898
+dd	3343796615,3343796615
+dd	3251714265,3251714265
+dd	4272081548,4272081548
+dd	906744984,906744984
+dd	3481400742,3481400742
+dd	685669029,685669029
+dd	646887386,646887386
+dd	2764025151,2764025151
+dd	3835509292,3835509292
+dd	227702864,227702864
+dd	2613862250,2613862250
+dd	1648787028,1648787028
+dd	3256061430,3256061430
+dd	3904428176,3904428176
+dd	1593260334,1593260334
+dd	4121936770,4121936770
+dd	3196083615,3196083615
+dd	2090061929,2090061929
+dd	2838353263,2838353263
+dd	3004310991,3004310991
+dd	999926984,999926984
+dd	2809993232,2809993232
+dd	1852021992,1852021992
+dd	2075868123,2075868123
+dd	158869197,158869197
+dd	4095236462,4095236462
+dd	28809964,28809964
+dd	2828685187,2828685187
+dd	1701746150,1701746150
+dd	2129067946,2129067946
+dd	147831841,147831841
+dd	3873969647,3873969647
+dd	3650873274,3650873274
+dd	3459673930,3459673930
+dd	3557400554,3557400554
+dd	3598495785,3598495785
+dd	2947720241,2947720241
+dd	824393514,824393514
+dd	815048134,815048134
+dd	3227951669,3227951669
+dd	935087732,935087732
+dd	2798289660,2798289660
+dd	2966458592,2966458592
+dd	366520115,366520115
+dd	1251476721,1251476721
+dd	4158319681,4158319681
+dd	240176511,240176511
+dd	804688151,804688151
+dd	2379631990,2379631990
+dd	1303441219,1303441219
+dd	1414376140,1414376140
+dd	3741619940,3741619940
+dd	3820343710,3820343710
+dd	461924940,461924940
+dd	3089050817,3089050817
+dd	2136040774,2136040774
+dd	82468509,82468509
+dd	1563790337,1563790337
+dd	1937016826,1937016826
+dd	776014843,776014843
+dd	1511876531,1511876531
+dd	1389550482,1389550482
+dd	861278441,861278441
+dd	323475053,323475053
+dd	2355222426,2355222426
+dd	2047648055,2047648055
+dd	2383738969,2383738969
+dd	2302415851,2302415851
+dd	3995576782,3995576782
+dd	902390199,902390199
+dd	3991215329,3991215329
+dd	1018251130,1018251130
+dd	1507840668,1507840668
+dd	1064563285,1064563285
+dd	2043548696,2043548696
+dd	3208103795,3208103795
+dd	3939366739,3939366739
+dd	1537932639,1537932639
+dd	342834655,342834655
+dd	2262516856,2262516856
+dd	2180231114,2180231114
+dd	1053059257,1053059257
+dd	741614648,741614648
+dd	1598071746,1598071746
+dd	1925389590,1925389590
+dd	203809468,203809468
+dd	2336832552,2336832552
+dd	1100287487,1100287487
+dd	1895934009,1895934009
+dd	3736275976,3736275976
+dd	2632234200,2632234200
+dd	2428589668,2428589668
+dd	1636092795,1636092795
+dd	1890988757,1890988757
+dd	1952214088,1952214088
+dd	1113045200,1113045200
+db	82,9,106,213,48,54,165,56
+db	191,64,163,158,129,243,215,251
+db	124,227,57,130,155,47,255,135
+db	52,142,67,68,196,222,233,203
+db	84,123,148,50,166,194,35,61
+db	238,76,149,11,66,250,195,78
+db	8,46,161,102,40,217,36,178
+db	118,91,162,73,109,139,209,37
+db	114,248,246,100,134,104,152,22
+db	212,164,92,204,93,101,182,146
+db	108,112,72,80,253,237,185,218
+db	94,21,70,87,167,141,157,132
+db	144,216,171,0,140,188,211,10
+db	247,228,88,5,184,179,69,6
+db	208,44,30,143,202,63,15,2
+db	193,175,189,3,1,19,138,107
+db	58,145,17,65,79,103,220,234
+db	151,242,207,206,240,180,230,115
+db	150,172,116,34,231,173,53,133
+db	226,249,55,232,28,117,223,110
+db	71,241,26,113,29,41,197,137
+db	111,183,98,14,170,24,190,27
+db	252,86,62,75,198,210,121,32
+db	154,219,192,254,120,205,90,244
+db	31,221,168,51,136,7,199,49
+db	177,18,16,89,39,128,236,95
+db	96,81,127,169,25,181,74,13
+db	45,229,122,159,147,201,156,239
+db	160,224,59,77,174,42,245,176
+db	200,235,187,60,131,83,153,97
+db	23,43,4,126,186,119,214,38
+db	225,105,20,99,85,33,12,125
+db	82,9,106,213,48,54,165,56
+db	191,64,163,158,129,243,215,251
+db	124,227,57,130,155,47,255,135
+db	52,142,67,68,196,222,233,203
+db	84,123,148,50,166,194,35,61
+db	238,76,149,11,66,250,195,78
+db	8,46,161,102,40,217,36,178
+db	118,91,162,73,109,139,209,37
+db	114,248,246,100,134,104,152,22
+db	212,164,92,204,93,101,182,146
+db	108,112,72,80,253,237,185,218
+db	94,21,70,87,167,141,157,132
+db	144,216,171,0,140,188,211,10
+db	247,228,88,5,184,179,69,6
+db	208,44,30,143,202,63,15,2
+db	193,175,189,3,1,19,138,107
+db	58,145,17,65,79,103,220,234
+db	151,242,207,206,240,180,230,115
+db	150,172,116,34,231,173,53,133
+db	226,249,55,232,28,117,223,110
+db	71,241,26,113,29,41,197,137
+db	111,183,98,14,170,24,190,27
+db	252,86,62,75,198,210,121,32
+db	154,219,192,254,120,205,90,244
+db	31,221,168,51,136,7,199,49
+db	177,18,16,89,39,128,236,95
+db	96,81,127,169,25,181,74,13
+db	45,229,122,159,147,201,156,239
+db	160,224,59,77,174,42,245,176
+db	200,235,187,60,131,83,153,97
+db	23,43,4,126,186,119,214,38
+db	225,105,20,99,85,33,12,125
+db	82,9,106,213,48,54,165,56
+db	191,64,163,158,129,243,215,251
+db	124,227,57,130,155,47,255,135
+db	52,142,67,68,196,222,233,203
+db	84,123,148,50,166,194,35,61
+db	238,76,149,11,66,250,195,78
+db	8,46,161,102,40,217,36,178
+db	118,91,162,73,109,139,209,37
+db	114,248,246,100,134,104,152,22
+db	212,164,92,204,93,101,182,146
+db	108,112,72,80,253,237,185,218
+db	94,21,70,87,167,141,157,132
+db	144,216,171,0,140,188,211,10
+db	247,228,88,5,184,179,69,6
+db	208,44,30,143,202,63,15,2
+db	193,175,189,3,1,19,138,107
+db	58,145,17,65,79,103,220,234
+db	151,242,207,206,240,180,230,115
+db	150,172,116,34,231,173,53,133
+db	226,249,55,232,28,117,223,110
+db	71,241,26,113,29,41,197,137
+db	111,183,98,14,170,24,190,27
+db	252,86,62,75,198,210,121,32
+db	154,219,192,254,120,205,90,244
+db	31,221,168,51,136,7,199,49
+db	177,18,16,89,39,128,236,95
+db	96,81,127,169,25,181,74,13
+db	45,229,122,159,147,201,156,239
+db	160,224,59,77,174,42,245,176
+db	200,235,187,60,131,83,153,97
+db	23,43,4,126,186,119,214,38
+db	225,105,20,99,85,33,12,125
+db	82,9,106,213,48,54,165,56
+db	191,64,163,158,129,243,215,251
+db	124,227,57,130,155,47,255,135
+db	52,142,67,68,196,222,233,203
+db	84,123,148,50,166,194,35,61
+db	238,76,149,11,66,250,195,78
+db	8,46,161,102,40,217,36,178
+db	118,91,162,73,109,139,209,37
+db	114,248,246,100,134,104,152,22
+db	212,164,92,204,93,101,182,146
+db	108,112,72,80,253,237,185,218
+db	94,21,70,87,167,141,157,132
+db	144,216,171,0,140,188,211,10
+db	247,228,88,5,184,179,69,6
+db	208,44,30,143,202,63,15,2
+db	193,175,189,3,1,19,138,107
+db	58,145,17,65,79,103,220,234
+db	151,242,207,206,240,180,230,115
+db	150,172,116,34,231,173,53,133
+db	226,249,55,232,28,117,223,110
+db	71,241,26,113,29,41,197,137
+db	111,183,98,14,170,24,190,27
+db	252,86,62,75,198,210,121,32
+db	154,219,192,254,120,205,90,244
+db	31,221,168,51,136,7,199,49
+db	177,18,16,89,39,128,236,95
+db	96,81,127,169,25,181,74,13
+db	45,229,122,159,147,201,156,239
+db	160,224,59,77,174,42,245,176
+db	200,235,187,60,131,83,153,97
+db	23,43,4,126,186,119,214,38
+db	225,105,20,99,85,33,12,125
+global	_asm_AES_decrypt
+align	16
+_asm_AES_decrypt:
+L$_asm_AES_decrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [28+esp]
+	mov	eax,esp
+	sub	esp,36
+	and	esp,-64
+	lea	ebx,[edi-127]
+	sub	ebx,esp
+	neg	ebx
+	and	ebx,960
+	sub	esp,ebx
+	add	esp,4
+	mov	DWORD [28+esp],eax
+	call	L$010pic_point
+L$010pic_point:
+	pop	ebp
+	lea	eax,[_OPENSSL_ia32cap_P]
+	lea	ebp,[(L$AES_Td-L$010pic_point)+ebp]
+	lea	ebx,[764+esp]
+	sub	ebx,ebp
+	and	ebx,768
+	lea	ebp,[2176+ebx*1+ebp]
+	bt	DWORD [eax],25
+	jnc	NEAR L$011x86
+	movq	mm0,[esi]
+	movq	mm4,[8+esi]
+	call	__sse_AES_decrypt_compact
+	mov	esp,DWORD [28+esp]
+	mov	esi,DWORD [24+esp]
+	movq	[esi],mm0
+	movq	[8+esi],mm4
+	emms
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+L$011x86:
+	mov	DWORD [24+esp],ebp
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	call	__x86_AES_decrypt_compact
+	mov	esp,DWORD [28+esp]
+	mov	esi,DWORD [24+esp]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_asm_AES_cbc_encrypt
+align	16
+_asm_AES_cbc_encrypt:
+L$_asm_AES_cbc_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	ecx,DWORD [28+esp]
+	cmp	ecx,0
+	je	NEAR L$012drop_out
+	call	L$013pic_point
+L$013pic_point:
+	pop	ebp
+	lea	eax,[_OPENSSL_ia32cap_P]
+	cmp	DWORD [40+esp],0
+	lea	ebp,[(L$AES_Te-L$013pic_point)+ebp]
+	jne	NEAR L$014picked_te
+	lea	ebp,[(L$AES_Td-L$AES_Te)+ebp]
+L$014picked_te:
+	pushfd
+	cld
+	cmp	ecx,512
+	jb	NEAR L$015slow_way
+	test	ecx,15
+	jnz	NEAR L$015slow_way
+	bt	DWORD [eax],28
+	jc	NEAR L$015slow_way
+	lea	esi,[esp-324]
+	and	esi,-64
+	mov	eax,ebp
+	lea	ebx,[2304+ebp]
+	mov	edx,esi
+	and	eax,4095
+	and	ebx,4095
+	and	edx,4095
+	cmp	edx,ebx
+	jb	NEAR L$016tbl_break_out
+	sub	edx,ebx
+	sub	esi,edx
+	jmp	NEAR L$017tbl_ok
+align	4
+L$016tbl_break_out:
+	sub	edx,eax
+	and	edx,4095
+	add	edx,384
+	sub	esi,edx
+align	4
+L$017tbl_ok:
+	lea	edx,[24+esp]
+	xchg	esp,esi
+	add	esp,4
+	mov	DWORD [24+esp],ebp
+	mov	DWORD [28+esp],esi
+	mov	eax,DWORD [edx]
+	mov	ebx,DWORD [4+edx]
+	mov	edi,DWORD [12+edx]
+	mov	esi,DWORD [16+edx]
+	mov	edx,DWORD [20+edx]
+	mov	DWORD [32+esp],eax
+	mov	DWORD [36+esp],ebx
+	mov	DWORD [40+esp],ecx
+	mov	DWORD [44+esp],edi
+	mov	DWORD [48+esp],esi
+	mov	DWORD [316+esp],0
+	mov	ebx,edi
+	mov	ecx,61
+	sub	ebx,ebp
+	mov	esi,edi
+	and	ebx,4095
+	lea	edi,[76+esp]
+	cmp	ebx,2304
+	jb	NEAR L$018do_copy
+	cmp	ebx,3852
+	jb	NEAR L$019skip_copy
+align	4
+L$018do_copy:
+	mov	DWORD [44+esp],edi
+dd	2784229001
+L$019skip_copy:
+	mov	edi,16
+align	4
+L$020prefetch_tbl:
+	mov	eax,DWORD [ebp]
+	mov	ebx,DWORD [32+ebp]
+	mov	ecx,DWORD [64+ebp]
+	mov	esi,DWORD [96+ebp]
+	lea	ebp,[128+ebp]
+	sub	edi,1
+	jnz	NEAR L$020prefetch_tbl
+	sub	ebp,2048
+	mov	esi,DWORD [32+esp]
+	mov	edi,DWORD [48+esp]
+	cmp	edx,0
+	je	NEAR L$021fast_decrypt
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+align	16
+L$022fast_enc_loop:
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	xor	eax,DWORD [esi]
+	xor	ebx,DWORD [4+esi]
+	xor	ecx,DWORD [8+esi]
+	xor	edx,DWORD [12+esi]
+	mov	edi,DWORD [44+esp]
+	call	__x86_AES_encrypt
+	mov	esi,DWORD [32+esp]
+	mov	edi,DWORD [36+esp]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	lea	esi,[16+esi]
+	mov	ecx,DWORD [40+esp]
+	mov	DWORD [32+esp],esi
+	lea	edx,[16+edi]
+	mov	DWORD [36+esp],edx
+	sub	ecx,16
+	mov	DWORD [40+esp],ecx
+	jnz	NEAR L$022fast_enc_loop
+	mov	esi,DWORD [48+esp]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	cmp	DWORD [316+esp],0
+	mov	edi,DWORD [44+esp]
+	je	NEAR L$023skip_ezero
+	mov	ecx,60
+	xor	eax,eax
+align	4
+dd	2884892297
+L$023skip_ezero:
+	mov	esp,DWORD [28+esp]
+	popfd
+L$012drop_out:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$021fast_decrypt:
+	cmp	esi,DWORD [36+esp]
+	je	NEAR L$024fast_dec_in_place
+	mov	DWORD [52+esp],edi
+align	4
+align	16
+L$025fast_dec_loop:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	edi,DWORD [44+esp]
+	call	__x86_AES_decrypt
+	mov	edi,DWORD [52+esp]
+	mov	esi,DWORD [40+esp]
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	edi,DWORD [36+esp]
+	mov	esi,DWORD [32+esp]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	ecx,DWORD [40+esp]
+	mov	DWORD [52+esp],esi
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	lea	edi,[16+edi]
+	mov	DWORD [36+esp],edi
+	sub	ecx,16
+	mov	DWORD [40+esp],ecx
+	jnz	NEAR L$025fast_dec_loop
+	mov	edi,DWORD [52+esp]
+	mov	esi,DWORD [48+esp]
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	jmp	NEAR L$026fast_dec_out
+align	16
+L$024fast_dec_in_place:
+L$027fast_dec_in_place_loop:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	lea	edi,[60+esp]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	edi,DWORD [44+esp]
+	call	__x86_AES_decrypt
+	mov	edi,DWORD [48+esp]
+	mov	esi,DWORD [36+esp]
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	lea	esi,[16+esi]
+	mov	DWORD [36+esp],esi
+	lea	esi,[60+esp]
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	esi,DWORD [32+esp]
+	mov	ecx,DWORD [40+esp]
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	sub	ecx,16
+	mov	DWORD [40+esp],ecx
+	jnz	NEAR L$027fast_dec_in_place_loop
+align	4
+L$026fast_dec_out:
+	cmp	DWORD [316+esp],0
+	mov	edi,DWORD [44+esp]
+	je	NEAR L$028skip_dzero
+	mov	ecx,60
+	xor	eax,eax
+align	4
+dd	2884892297
+L$028skip_dzero:
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$015slow_way:
+	mov	eax,DWORD [eax]
+	mov	edi,DWORD [36+esp]
+	lea	esi,[esp-80]
+	and	esi,-64
+	lea	ebx,[edi-143]
+	sub	ebx,esi
+	neg	ebx
+	and	ebx,960
+	sub	esi,ebx
+	lea	ebx,[768+esi]
+	sub	ebx,ebp
+	and	ebx,768
+	lea	ebp,[2176+ebx*1+ebp]
+	lea	edx,[24+esp]
+	xchg	esp,esi
+	add	esp,4
+	mov	DWORD [24+esp],ebp
+	mov	DWORD [28+esp],esi
+	mov	DWORD [52+esp],eax
+	mov	eax,DWORD [edx]
+	mov	ebx,DWORD [4+edx]
+	mov	esi,DWORD [16+edx]
+	mov	edx,DWORD [20+edx]
+	mov	DWORD [32+esp],eax
+	mov	DWORD [36+esp],ebx
+	mov	DWORD [40+esp],ecx
+	mov	DWORD [44+esp],edi
+	mov	DWORD [48+esp],esi
+	mov	edi,esi
+	mov	esi,eax
+	cmp	edx,0
+	je	NEAR L$029slow_decrypt
+	cmp	ecx,16
+	mov	edx,ebx
+	jb	NEAR L$030slow_enc_tail
+	bt	DWORD [52+esp],25
+	jnc	NEAR L$031slow_enc_x86
+	movq	mm0,[edi]
+	movq	mm4,[8+edi]
+align	16
+L$032slow_enc_loop_sse:
+	pxor	mm0,[esi]
+	pxor	mm4,[8+esi]
+	mov	edi,DWORD [44+esp]
+	call	__sse_AES_encrypt_compact
+	mov	esi,DWORD [32+esp]
+	mov	edi,DWORD [36+esp]
+	mov	ecx,DWORD [40+esp]
+	movq	[edi],mm0
+	movq	[8+edi],mm4
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	lea	edx,[16+edi]
+	mov	DWORD [36+esp],edx
+	sub	ecx,16
+	cmp	ecx,16
+	mov	DWORD [40+esp],ecx
+	jae	NEAR L$032slow_enc_loop_sse
+	test	ecx,15
+	jnz	NEAR L$030slow_enc_tail
+	mov	esi,DWORD [48+esp]
+	movq	[esi],mm0
+	movq	[8+esi],mm4
+	emms
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$031slow_enc_x86:
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+align	4
+L$033slow_enc_loop_x86:
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	xor	eax,DWORD [esi]
+	xor	ebx,DWORD [4+esi]
+	xor	ecx,DWORD [8+esi]
+	xor	edx,DWORD [12+esi]
+	mov	edi,DWORD [44+esp]
+	call	__x86_AES_encrypt_compact
+	mov	esi,DWORD [32+esp]
+	mov	edi,DWORD [36+esp]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	ecx,DWORD [40+esp]
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	lea	edx,[16+edi]
+	mov	DWORD [36+esp],edx
+	sub	ecx,16
+	cmp	ecx,16
+	mov	DWORD [40+esp],ecx
+	jae	NEAR L$033slow_enc_loop_x86
+	test	ecx,15
+	jnz	NEAR L$030slow_enc_tail
+	mov	esi,DWORD [48+esp]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$030slow_enc_tail:
+	emms
+	mov	edi,edx
+	mov	ebx,16
+	sub	ebx,ecx
+	cmp	edi,esi
+	je	NEAR L$034enc_in_place
+align	4
+dd	2767451785
+	jmp	NEAR L$035enc_skip_in_place
+L$034enc_in_place:
+	lea	edi,[ecx*1+edi]
+L$035enc_skip_in_place:
+	mov	ecx,ebx
+	xor	eax,eax
+align	4
+dd	2868115081
+	mov	edi,DWORD [48+esp]
+	mov	esi,edx
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	mov	DWORD [40+esp],16
+	jmp	NEAR L$033slow_enc_loop_x86
+align	16
+L$029slow_decrypt:
+	bt	DWORD [52+esp],25
+	jnc	NEAR L$036slow_dec_loop_x86
+align	4
+L$037slow_dec_loop_sse:
+	movq	mm0,[esi]
+	movq	mm4,[8+esi]
+	mov	edi,DWORD [44+esp]
+	call	__sse_AES_decrypt_compact
+	mov	esi,DWORD [32+esp]
+	lea	eax,[60+esp]
+	mov	ebx,DWORD [36+esp]
+	mov	ecx,DWORD [40+esp]
+	mov	edi,DWORD [48+esp]
+	movq	mm1,[esi]
+	movq	mm5,[8+esi]
+	pxor	mm0,[edi]
+	pxor	mm4,[8+edi]
+	movq	[edi],mm1
+	movq	[8+edi],mm5
+	sub	ecx,16
+	jc	NEAR L$038slow_dec_partial_sse
+	movq	[ebx],mm0
+	movq	[8+ebx],mm4
+	lea	ebx,[16+ebx]
+	mov	DWORD [36+esp],ebx
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	mov	DWORD [40+esp],ecx
+	jnz	NEAR L$037slow_dec_loop_sse
+	emms
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$038slow_dec_partial_sse:
+	movq	[eax],mm0
+	movq	[8+eax],mm4
+	emms
+	add	ecx,16
+	mov	edi,ebx
+	mov	esi,eax
+align	4
+dd	2767451785
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$036slow_dec_loop_x86:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	lea	edi,[60+esp]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	edi,DWORD [44+esp]
+	call	__x86_AES_decrypt_compact
+	mov	edi,DWORD [48+esp]
+	mov	esi,DWORD [40+esp]
+	xor	eax,DWORD [edi]
+	xor	ebx,DWORD [4+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [12+edi]
+	sub	esi,16
+	jc	NEAR L$039slow_dec_partial_x86
+	mov	DWORD [40+esp],esi
+	mov	esi,DWORD [36+esp]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	lea	esi,[16+esi]
+	mov	DWORD [36+esp],esi
+	lea	esi,[60+esp]
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	esi,DWORD [32+esp]
+	lea	esi,[16+esi]
+	mov	DWORD [32+esp],esi
+	jnz	NEAR L$036slow_dec_loop_x86
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+	pushfd
+align	16
+L$039slow_dec_partial_x86:
+	lea	esi,[60+esp]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	mov	esi,DWORD [32+esp]
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	ecx,DWORD [40+esp]
+	mov	edi,DWORD [36+esp]
+	lea	esi,[60+esp]
+align	4
+dd	2767451785
+	mov	esp,DWORD [28+esp]
+	popfd
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+__x86_AES_set_encrypt_key:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [24+esp]
+	mov	edi,DWORD [32+esp]
+	test	esi,-1
+	jz	NEAR L$040badpointer
+	test	edi,-1
+	jz	NEAR L$040badpointer
+	call	L$041pic_point
+L$041pic_point:
+	pop	ebp
+	lea	ebp,[(L$AES_Te-L$041pic_point)+ebp]
+	lea	ebp,[2176+ebp]
+	mov	eax,DWORD [ebp-128]
+	mov	ebx,DWORD [ebp-96]
+	mov	ecx,DWORD [ebp-64]
+	mov	edx,DWORD [ebp-32]
+	mov	eax,DWORD [ebp]
+	mov	ebx,DWORD [32+ebp]
+	mov	ecx,DWORD [64+ebp]
+	mov	edx,DWORD [96+ebp]
+	mov	ecx,DWORD [28+esp]
+	cmp	ecx,128
+	je	NEAR L$04210rounds
+	cmp	ecx,192
+	je	NEAR L$04312rounds
+	cmp	ecx,256
+	je	NEAR L$04414rounds
+	mov	eax,-2
+	jmp	NEAR L$045exit
+L$04210rounds:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	xor	ecx,ecx
+	jmp	NEAR L$04610shortcut
+align	4
+L$04710loop:
+	mov	eax,DWORD [edi]
+	mov	edx,DWORD [12+edi]
+L$04610shortcut:
+	movzx	esi,dl
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shl	ebx,16
+	xor	eax,ebx
+	xor	eax,DWORD [896+ecx*4+ebp]
+	mov	DWORD [16+edi],eax
+	xor	eax,DWORD [4+edi]
+	mov	DWORD [20+edi],eax
+	xor	eax,DWORD [8+edi]
+	mov	DWORD [24+edi],eax
+	xor	eax,DWORD [12+edi]
+	mov	DWORD [28+edi],eax
+	inc	ecx
+	add	edi,16
+	cmp	ecx,10
+	jl	NEAR L$04710loop
+	mov	DWORD [80+edi],10
+	xor	eax,eax
+	jmp	NEAR L$045exit
+L$04312rounds:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [20+esi]
+	mov	DWORD [16+edi],ecx
+	mov	DWORD [20+edi],edx
+	xor	ecx,ecx
+	jmp	NEAR L$04812shortcut
+align	4
+L$04912loop:
+	mov	eax,DWORD [edi]
+	mov	edx,DWORD [20+edi]
+L$04812shortcut:
+	movzx	esi,dl
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shl	ebx,16
+	xor	eax,ebx
+	xor	eax,DWORD [896+ecx*4+ebp]
+	mov	DWORD [24+edi],eax
+	xor	eax,DWORD [4+edi]
+	mov	DWORD [28+edi],eax
+	xor	eax,DWORD [8+edi]
+	mov	DWORD [32+edi],eax
+	xor	eax,DWORD [12+edi]
+	mov	DWORD [36+edi],eax
+	cmp	ecx,7
+	je	NEAR L$05012break
+	inc	ecx
+	xor	eax,DWORD [16+edi]
+	mov	DWORD [40+edi],eax
+	xor	eax,DWORD [20+edi]
+	mov	DWORD [44+edi],eax
+	add	edi,24
+	jmp	NEAR L$04912loop
+L$05012break:
+	mov	DWORD [72+edi],12
+	xor	eax,eax
+	jmp	NEAR L$045exit
+L$04414rounds:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [12+edi],edx
+	mov	eax,DWORD [16+esi]
+	mov	ebx,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [28+esi]
+	mov	DWORD [16+edi],eax
+	mov	DWORD [20+edi],ebx
+	mov	DWORD [24+edi],ecx
+	mov	DWORD [28+edi],edx
+	xor	ecx,ecx
+	jmp	NEAR L$05114shortcut
+align	4
+L$05214loop:
+	mov	edx,DWORD [28+edi]
+L$05114shortcut:
+	mov	eax,DWORD [edi]
+	movzx	esi,dl
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shl	ebx,16
+	xor	eax,ebx
+	xor	eax,DWORD [896+ecx*4+ebp]
+	mov	DWORD [32+edi],eax
+	xor	eax,DWORD [4+edi]
+	mov	DWORD [36+edi],eax
+	xor	eax,DWORD [8+edi]
+	mov	DWORD [40+edi],eax
+	xor	eax,DWORD [12+edi]
+	mov	DWORD [44+edi],eax
+	cmp	ecx,6
+	je	NEAR L$05314break
+	inc	ecx
+	mov	edx,eax
+	mov	eax,DWORD [16+edi]
+	movzx	esi,dl
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shr	edx,16
+	shl	ebx,8
+	movzx	esi,dl
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	movzx	esi,dh
+	shl	ebx,16
+	xor	eax,ebx
+	movzx	ebx,BYTE [esi*1+ebp-128]
+	shl	ebx,24
+	xor	eax,ebx
+	mov	DWORD [48+edi],eax
+	xor	eax,DWORD [20+edi]
+	mov	DWORD [52+edi],eax
+	xor	eax,DWORD [24+edi]
+	mov	DWORD [56+edi],eax
+	xor	eax,DWORD [28+edi]
+	mov	DWORD [60+edi],eax
+	add	edi,32
+	jmp	NEAR L$05214loop
+L$05314break:
+	mov	DWORD [48+edi],14
+	xor	eax,eax
+	jmp	NEAR L$045exit
+L$040badpointer:
+	mov	eax,-1
+L$045exit:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_asm_AES_set_encrypt_key
+align	16
+_asm_AES_set_encrypt_key:
+L$_asm_AES_set_encrypt_key_begin:
+	call	__x86_AES_set_encrypt_key
+	ret
+global	_asm_AES_set_decrypt_key
+align	16
+_asm_AES_set_decrypt_key:
+L$_asm_AES_set_decrypt_key_begin:
+	call	__x86_AES_set_encrypt_key
+	cmp	eax,0
+	je	NEAR L$054proceed
+	ret
+L$054proceed:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [28+esp]
+	mov	ecx,DWORD [240+esi]
+	lea	ecx,[ecx*4]
+	lea	edi,[ecx*4+esi]
+align	4
+L$055invert:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [edi]
+	mov	edx,DWORD [4+edi]
+	mov	DWORD [edi],eax
+	mov	DWORD [4+edi],ebx
+	mov	DWORD [esi],ecx
+	mov	DWORD [4+esi],edx
+	mov	eax,DWORD [8+esi]
+	mov	ebx,DWORD [12+esi]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	mov	DWORD [8+edi],eax
+	mov	DWORD [12+edi],ebx
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	add	esi,16
+	sub	edi,16
+	cmp	esi,edi
+	jne	NEAR L$055invert
+	mov	edi,DWORD [28+esp]
+	mov	esi,DWORD [240+edi]
+	lea	esi,[esi*1+esi-2]
+	lea	esi,[esi*8+edi]
+	mov	DWORD [28+esp],esi
+	mov	eax,DWORD [16+edi]
+align	4
+L$056permute:
+	add	edi,16
+	mov	ebp,2155905152
+	and	ebp,eax
+	lea	ebx,[eax*1+eax]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	ebx,4278124286
+	and	esi,454761243
+	xor	ebx,esi
+	mov	ebp,2155905152
+	and	ebp,ebx
+	lea	ecx,[ebx*1+ebx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	ecx,4278124286
+	and	esi,454761243
+	xor	ebx,eax
+	xor	ecx,esi
+	mov	ebp,2155905152
+	and	ebp,ecx
+	lea	edx,[ecx*1+ecx]
+	mov	esi,ebp
+	shr	ebp,7
+	xor	ecx,eax
+	sub	esi,ebp
+	and	edx,4278124286
+	and	esi,454761243
+	rol	eax,8
+	xor	edx,esi
+	mov	ebp,DWORD [4+edi]
+	xor	eax,ebx
+	xor	ebx,edx
+	xor	eax,ecx
+	rol	ebx,24
+	xor	ecx,edx
+	xor	eax,edx
+	rol	ecx,16
+	xor	eax,ebx
+	rol	edx,8
+	xor	eax,ecx
+	mov	ebx,ebp
+	xor	eax,edx
+	mov	DWORD [edi],eax
+	mov	ebp,2155905152
+	and	ebp,ebx
+	lea	ecx,[ebx*1+ebx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	ecx,4278124286
+	and	esi,454761243
+	xor	ecx,esi
+	mov	ebp,2155905152
+	and	ebp,ecx
+	lea	edx,[ecx*1+ecx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	edx,4278124286
+	and	esi,454761243
+	xor	ecx,ebx
+	xor	edx,esi
+	mov	ebp,2155905152
+	and	ebp,edx
+	lea	eax,[edx*1+edx]
+	mov	esi,ebp
+	shr	ebp,7
+	xor	edx,ebx
+	sub	esi,ebp
+	and	eax,4278124286
+	and	esi,454761243
+	rol	ebx,8
+	xor	eax,esi
+	mov	ebp,DWORD [8+edi]
+	xor	ebx,ecx
+	xor	ecx,eax
+	xor	ebx,edx
+	rol	ecx,24
+	xor	edx,eax
+	xor	ebx,eax
+	rol	edx,16
+	xor	ebx,ecx
+	rol	eax,8
+	xor	ebx,edx
+	mov	ecx,ebp
+	xor	ebx,eax
+	mov	DWORD [4+edi],ebx
+	mov	ebp,2155905152
+	and	ebp,ecx
+	lea	edx,[ecx*1+ecx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	edx,4278124286
+	and	esi,454761243
+	xor	edx,esi
+	mov	ebp,2155905152
+	and	ebp,edx
+	lea	eax,[edx*1+edx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	eax,4278124286
+	and	esi,454761243
+	xor	edx,ecx
+	xor	eax,esi
+	mov	ebp,2155905152
+	and	ebp,eax
+	lea	ebx,[eax*1+eax]
+	mov	esi,ebp
+	shr	ebp,7
+	xor	eax,ecx
+	sub	esi,ebp
+	and	ebx,4278124286
+	and	esi,454761243
+	rol	ecx,8
+	xor	ebx,esi
+	mov	ebp,DWORD [12+edi]
+	xor	ecx,edx
+	xor	edx,ebx
+	xor	ecx,eax
+	rol	edx,24
+	xor	eax,ebx
+	xor	ecx,ebx
+	rol	eax,16
+	xor	ecx,edx
+	rol	ebx,8
+	xor	ecx,eax
+	mov	edx,ebp
+	xor	ecx,ebx
+	mov	DWORD [8+edi],ecx
+	mov	ebp,2155905152
+	and	ebp,edx
+	lea	eax,[edx*1+edx]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	eax,4278124286
+	and	esi,454761243
+	xor	eax,esi
+	mov	ebp,2155905152
+	and	ebp,eax
+	lea	ebx,[eax*1+eax]
+	mov	esi,ebp
+	shr	ebp,7
+	sub	esi,ebp
+	and	ebx,4278124286
+	and	esi,454761243
+	xor	eax,edx
+	xor	ebx,esi
+	mov	ebp,2155905152
+	and	ebp,ebx
+	lea	ecx,[ebx*1+ebx]
+	mov	esi,ebp
+	shr	ebp,7
+	xor	ebx,edx
+	sub	esi,ebp
+	and	ecx,4278124286
+	and	esi,454761243
+	rol	edx,8
+	xor	ecx,esi
+	mov	ebp,DWORD [16+edi]
+	xor	edx,eax
+	xor	eax,ecx
+	xor	edx,ebx
+	rol	eax,24
+	xor	ebx,ecx
+	xor	edx,ecx
+	rol	ebx,16
+	xor	edx,eax
+	rol	ecx,8
+	xor	edx,ebx
+	mov	eax,ebp
+	xor	edx,ecx
+	mov	DWORD [12+edi],edx
+	cmp	edi,DWORD [28+esp]
+	jb	NEAR L$056permute
+	xor	eax,eax
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+db	65,69,83,32,102,111,114,32,120,56,54,44,32,67,82,89
+db	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+db	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm b/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm
new file mode 100644
index 0000000..a9a5956
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/aes/aesni-x86.asm
@@ -0,0 +1,2424 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_aesni_encrypt
+align	16
+_aesni_encrypt:
+L$_aesni_encrypt_begin:
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [12+esp]
+	movups	xmm2,[eax]
+	mov	ecx,DWORD [240+edx]
+	mov	eax,DWORD [8+esp]
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$000enc1_loop_1:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$000enc1_loop_1
+db	102,15,56,221,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movups	[eax],xmm2
+	pxor	xmm2,xmm2
+	ret
+global	_aesni_decrypt
+align	16
+_aesni_decrypt:
+L$_aesni_decrypt_begin:
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [12+esp]
+	movups	xmm2,[eax]
+	mov	ecx,DWORD [240+edx]
+	mov	eax,DWORD [8+esp]
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$001dec1_loop_2:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$001dec1_loop_2
+db	102,15,56,223,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movups	[eax],xmm2
+	pxor	xmm2,xmm2
+	ret
+align	16
+__aesni_encrypt2:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+	add	ecx,16
+L$002enc2_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$002enc2_loop
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,221,208
+db	102,15,56,221,216
+	ret
+align	16
+__aesni_decrypt2:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+	add	ecx,16
+L$003dec2_loop:
+db	102,15,56,222,209
+db	102,15,56,222,217
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,222,208
+db	102,15,56,222,216
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$003dec2_loop
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,223,208
+db	102,15,56,223,216
+	ret
+align	16
+__aesni_encrypt3:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+	add	ecx,16
+L$004enc3_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+db	102,15,56,220,224
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$004enc3_loop
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+db	102,15,56,221,208
+db	102,15,56,221,216
+db	102,15,56,221,224
+	ret
+align	16
+__aesni_decrypt3:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+	add	ecx,16
+L$005dec3_loop:
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,222,208
+db	102,15,56,222,216
+db	102,15,56,222,224
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$005dec3_loop
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+db	102,15,56,223,208
+db	102,15,56,223,216
+db	102,15,56,223,224
+	ret
+align	16
+__aesni_encrypt4:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	shl	ecx,4
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+	pxor	xmm5,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+db	15,31,64,0
+	add	ecx,16
+L$006enc4_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+db	102,15,56,220,233
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+db	102,15,56,220,224
+db	102,15,56,220,232
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$006enc4_loop
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+db	102,15,56,220,233
+db	102,15,56,221,208
+db	102,15,56,221,216
+db	102,15,56,221,224
+db	102,15,56,221,232
+	ret
+align	16
+__aesni_decrypt4:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	shl	ecx,4
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+	pxor	xmm5,xmm0
+	movups	xmm0,[32+edx]
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+db	15,31,64,0
+	add	ecx,16
+L$007dec4_loop:
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+db	102,15,56,222,233
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,222,208
+db	102,15,56,222,216
+db	102,15,56,222,224
+db	102,15,56,222,232
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$007dec4_loop
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+db	102,15,56,222,233
+db	102,15,56,223,208
+db	102,15,56,223,216
+db	102,15,56,223,224
+db	102,15,56,223,232
+	ret
+align	16
+__aesni_encrypt6:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+db	102,15,56,220,209
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+db	102,15,56,220,217
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+db	102,15,56,220,225
+	pxor	xmm7,xmm0
+	movups	xmm0,[ecx*1+edx]
+	add	ecx,16
+	jmp	NEAR L$008_aesni_encrypt6_inner
+align	16
+L$009enc6_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+L$008_aesni_encrypt6_inner:
+db	102,15,56,220,233
+db	102,15,56,220,241
+db	102,15,56,220,249
+L$_aesni_encrypt6_enter:
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+db	102,15,56,220,224
+db	102,15,56,220,232
+db	102,15,56,220,240
+db	102,15,56,220,248
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$009enc6_loop
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,220,225
+db	102,15,56,220,233
+db	102,15,56,220,241
+db	102,15,56,220,249
+db	102,15,56,221,208
+db	102,15,56,221,216
+db	102,15,56,221,224
+db	102,15,56,221,232
+db	102,15,56,221,240
+db	102,15,56,221,248
+	ret
+align	16
+__aesni_decrypt6:
+	movups	xmm0,[edx]
+	shl	ecx,4
+	movups	xmm1,[16+edx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+db	102,15,56,222,209
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+db	102,15,56,222,217
+	lea	edx,[32+ecx*1+edx]
+	neg	ecx
+db	102,15,56,222,225
+	pxor	xmm7,xmm0
+	movups	xmm0,[ecx*1+edx]
+	add	ecx,16
+	jmp	NEAR L$010_aesni_decrypt6_inner
+align	16
+L$011dec6_loop:
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+L$010_aesni_decrypt6_inner:
+db	102,15,56,222,233
+db	102,15,56,222,241
+db	102,15,56,222,249
+L$_aesni_decrypt6_enter:
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,222,208
+db	102,15,56,222,216
+db	102,15,56,222,224
+db	102,15,56,222,232
+db	102,15,56,222,240
+db	102,15,56,222,248
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$011dec6_loop
+db	102,15,56,222,209
+db	102,15,56,222,217
+db	102,15,56,222,225
+db	102,15,56,222,233
+db	102,15,56,222,241
+db	102,15,56,222,249
+db	102,15,56,223,208
+db	102,15,56,223,216
+db	102,15,56,223,224
+db	102,15,56,223,232
+db	102,15,56,223,240
+db	102,15,56,223,248
+	ret
+global	_aesni_ecb_encrypt
+align	16
+_aesni_ecb_encrypt:
+L$_aesni_ecb_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebx,DWORD [36+esp]
+	and	eax,-16
+	jz	NEAR L$012ecb_ret
+	mov	ecx,DWORD [240+edx]
+	test	ebx,ebx
+	jz	NEAR L$013ecb_decrypt
+	mov	ebp,edx
+	mov	ebx,ecx
+	cmp	eax,96
+	jb	NEAR L$014ecb_enc_tail
+	movdqu	xmm2,[esi]
+	movdqu	xmm3,[16+esi]
+	movdqu	xmm4,[32+esi]
+	movdqu	xmm5,[48+esi]
+	movdqu	xmm6,[64+esi]
+	movdqu	xmm7,[80+esi]
+	lea	esi,[96+esi]
+	sub	eax,96
+	jmp	NEAR L$015ecb_enc_loop6_enter
+align	16
+L$016ecb_enc_loop6:
+	movups	[edi],xmm2
+	movdqu	xmm2,[esi]
+	movups	[16+edi],xmm3
+	movdqu	xmm3,[16+esi]
+	movups	[32+edi],xmm4
+	movdqu	xmm4,[32+esi]
+	movups	[48+edi],xmm5
+	movdqu	xmm5,[48+esi]
+	movups	[64+edi],xmm6
+	movdqu	xmm6,[64+esi]
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	movdqu	xmm7,[80+esi]
+	lea	esi,[96+esi]
+L$015ecb_enc_loop6_enter:
+	call	__aesni_encrypt6
+	mov	edx,ebp
+	mov	ecx,ebx
+	sub	eax,96
+	jnc	NEAR L$016ecb_enc_loop6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	add	eax,96
+	jz	NEAR L$012ecb_ret
+L$014ecb_enc_tail:
+	movups	xmm2,[esi]
+	cmp	eax,32
+	jb	NEAR L$017ecb_enc_one
+	movups	xmm3,[16+esi]
+	je	NEAR L$018ecb_enc_two
+	movups	xmm4,[32+esi]
+	cmp	eax,64
+	jb	NEAR L$019ecb_enc_three
+	movups	xmm5,[48+esi]
+	je	NEAR L$020ecb_enc_four
+	movups	xmm6,[64+esi]
+	xorps	xmm7,xmm7
+	call	__aesni_encrypt6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	jmp	NEAR L$012ecb_ret
+align	16
+L$017ecb_enc_one:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$021enc1_loop_3:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$021enc1_loop_3
+db	102,15,56,221,209
+	movups	[edi],xmm2
+	jmp	NEAR L$012ecb_ret
+align	16
+L$018ecb_enc_two:
+	call	__aesni_encrypt2
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	jmp	NEAR L$012ecb_ret
+align	16
+L$019ecb_enc_three:
+	call	__aesni_encrypt3
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	jmp	NEAR L$012ecb_ret
+align	16
+L$020ecb_enc_four:
+	call	__aesni_encrypt4
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	jmp	NEAR L$012ecb_ret
+align	16
+L$013ecb_decrypt:
+	mov	ebp,edx
+	mov	ebx,ecx
+	cmp	eax,96
+	jb	NEAR L$022ecb_dec_tail
+	movdqu	xmm2,[esi]
+	movdqu	xmm3,[16+esi]
+	movdqu	xmm4,[32+esi]
+	movdqu	xmm5,[48+esi]
+	movdqu	xmm6,[64+esi]
+	movdqu	xmm7,[80+esi]
+	lea	esi,[96+esi]
+	sub	eax,96
+	jmp	NEAR L$023ecb_dec_loop6_enter
+align	16
+L$024ecb_dec_loop6:
+	movups	[edi],xmm2
+	movdqu	xmm2,[esi]
+	movups	[16+edi],xmm3
+	movdqu	xmm3,[16+esi]
+	movups	[32+edi],xmm4
+	movdqu	xmm4,[32+esi]
+	movups	[48+edi],xmm5
+	movdqu	xmm5,[48+esi]
+	movups	[64+edi],xmm6
+	movdqu	xmm6,[64+esi]
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	movdqu	xmm7,[80+esi]
+	lea	esi,[96+esi]
+L$023ecb_dec_loop6_enter:
+	call	__aesni_decrypt6
+	mov	edx,ebp
+	mov	ecx,ebx
+	sub	eax,96
+	jnc	NEAR L$024ecb_dec_loop6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	add	eax,96
+	jz	NEAR L$012ecb_ret
+L$022ecb_dec_tail:
+	movups	xmm2,[esi]
+	cmp	eax,32
+	jb	NEAR L$025ecb_dec_one
+	movups	xmm3,[16+esi]
+	je	NEAR L$026ecb_dec_two
+	movups	xmm4,[32+esi]
+	cmp	eax,64
+	jb	NEAR L$027ecb_dec_three
+	movups	xmm5,[48+esi]
+	je	NEAR L$028ecb_dec_four
+	movups	xmm6,[64+esi]
+	xorps	xmm7,xmm7
+	call	__aesni_decrypt6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	jmp	NEAR L$012ecb_ret
+align	16
+L$025ecb_dec_one:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$029dec1_loop_4:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$029dec1_loop_4
+db	102,15,56,223,209
+	movups	[edi],xmm2
+	jmp	NEAR L$012ecb_ret
+align	16
+L$026ecb_dec_two:
+	call	__aesni_decrypt2
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	jmp	NEAR L$012ecb_ret
+align	16
+L$027ecb_dec_three:
+	call	__aesni_decrypt3
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	jmp	NEAR L$012ecb_ret
+align	16
+L$028ecb_dec_four:
+	call	__aesni_decrypt4
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+L$012ecb_ret:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_ccm64_encrypt_blocks
+align	16
+_aesni_ccm64_encrypt_blocks:
+L$_aesni_ccm64_encrypt_blocks_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebx,DWORD [36+esp]
+	mov	ecx,DWORD [40+esp]
+	mov	ebp,esp
+	sub	esp,60
+	and	esp,-16
+	mov	DWORD [48+esp],ebp
+	movdqu	xmm7,[ebx]
+	movdqu	xmm3,[ecx]
+	mov	ecx,DWORD [240+edx]
+	mov	DWORD [esp],202182159
+	mov	DWORD [4+esp],134810123
+	mov	DWORD [8+esp],67438087
+	mov	DWORD [12+esp],66051
+	mov	ebx,1
+	xor	ebp,ebp
+	mov	DWORD [16+esp],ebx
+	mov	DWORD [20+esp],ebp
+	mov	DWORD [24+esp],ebp
+	mov	DWORD [28+esp],ebp
+	shl	ecx,4
+	mov	ebx,16
+	lea	ebp,[edx]
+	movdqa	xmm5,[esp]
+	movdqa	xmm2,xmm7
+	lea	edx,[32+ecx*1+edx]
+	sub	ebx,ecx
+db	102,15,56,0,253
+L$030ccm64_enc_outer:
+	movups	xmm0,[ebp]
+	mov	ecx,ebx
+	movups	xmm6,[esi]
+	xorps	xmm2,xmm0
+	movups	xmm1,[16+ebp]
+	xorps	xmm0,xmm6
+	xorps	xmm3,xmm0
+	movups	xmm0,[32+ebp]
+L$031ccm64_enc2_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$031ccm64_enc2_loop
+db	102,15,56,220,209
+db	102,15,56,220,217
+	paddq	xmm7,[16+esp]
+	dec	eax
+db	102,15,56,221,208
+db	102,15,56,221,216
+	lea	esi,[16+esi]
+	xorps	xmm6,xmm2
+	movdqa	xmm2,xmm7
+	movups	[edi],xmm6
+db	102,15,56,0,213
+	lea	edi,[16+edi]
+	jnz	NEAR L$030ccm64_enc_outer
+	mov	esp,DWORD [48+esp]
+	mov	edi,DWORD [40+esp]
+	movups	[edi],xmm3
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_ccm64_decrypt_blocks
+align	16
+_aesni_ccm64_decrypt_blocks:
+L$_aesni_ccm64_decrypt_blocks_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebx,DWORD [36+esp]
+	mov	ecx,DWORD [40+esp]
+	mov	ebp,esp
+	sub	esp,60
+	and	esp,-16
+	mov	DWORD [48+esp],ebp
+	movdqu	xmm7,[ebx]
+	movdqu	xmm3,[ecx]
+	mov	ecx,DWORD [240+edx]
+	mov	DWORD [esp],202182159
+	mov	DWORD [4+esp],134810123
+	mov	DWORD [8+esp],67438087
+	mov	DWORD [12+esp],66051
+	mov	ebx,1
+	xor	ebp,ebp
+	mov	DWORD [16+esp],ebx
+	mov	DWORD [20+esp],ebp
+	mov	DWORD [24+esp],ebp
+	mov	DWORD [28+esp],ebp
+	movdqa	xmm5,[esp]
+	movdqa	xmm2,xmm7
+	mov	ebp,edx
+	mov	ebx,ecx
+db	102,15,56,0,253
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$032enc1_loop_5:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$032enc1_loop_5
+db	102,15,56,221,209
+	shl	ebx,4
+	mov	ecx,16
+	movups	xmm6,[esi]
+	paddq	xmm7,[16+esp]
+	lea	esi,[16+esi]
+	sub	ecx,ebx
+	lea	edx,[32+ebx*1+ebp]
+	mov	ebx,ecx
+	jmp	NEAR L$033ccm64_dec_outer
+align	16
+L$033ccm64_dec_outer:
+	xorps	xmm6,xmm2
+	movdqa	xmm2,xmm7
+	movups	[edi],xmm6
+	lea	edi,[16+edi]
+db	102,15,56,0,213
+	sub	eax,1
+	jz	NEAR L$034ccm64_dec_break
+	movups	xmm0,[ebp]
+	mov	ecx,ebx
+	movups	xmm1,[16+ebp]
+	xorps	xmm6,xmm0
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm6
+	movups	xmm0,[32+ebp]
+L$035ccm64_dec2_loop:
+db	102,15,56,220,209
+db	102,15,56,220,217
+	movups	xmm1,[ecx*1+edx]
+	add	ecx,32
+db	102,15,56,220,208
+db	102,15,56,220,216
+	movups	xmm0,[ecx*1+edx-16]
+	jnz	NEAR L$035ccm64_dec2_loop
+	movups	xmm6,[esi]
+	paddq	xmm7,[16+esp]
+db	102,15,56,220,209
+db	102,15,56,220,217
+db	102,15,56,221,208
+db	102,15,56,221,216
+	lea	esi,[16+esi]
+	jmp	NEAR L$033ccm64_dec_outer
+align	16
+L$034ccm64_dec_break:
+	mov	ecx,DWORD [240+ebp]
+	mov	edx,ebp
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	xorps	xmm6,xmm0
+	lea	edx,[32+edx]
+	xorps	xmm3,xmm6
+L$036enc1_loop_6:
+db	102,15,56,220,217
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$036enc1_loop_6
+db	102,15,56,221,217
+	mov	esp,DWORD [48+esp]
+	mov	edi,DWORD [40+esp]
+	movups	[edi],xmm3
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_ctr32_encrypt_blocks
+align	16
+_aesni_ctr32_encrypt_blocks:
+L$_aesni_ctr32_encrypt_blocks_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebx,DWORD [36+esp]
+	mov	ebp,esp
+	sub	esp,88
+	and	esp,-16
+	mov	DWORD [80+esp],ebp
+	cmp	eax,1
+	je	NEAR L$037ctr32_one_shortcut
+	movdqu	xmm7,[ebx]
+	mov	DWORD [esp],202182159
+	mov	DWORD [4+esp],134810123
+	mov	DWORD [8+esp],67438087
+	mov	DWORD [12+esp],66051
+	mov	ecx,6
+	xor	ebp,ebp
+	mov	DWORD [16+esp],ecx
+	mov	DWORD [20+esp],ecx
+	mov	DWORD [24+esp],ecx
+	mov	DWORD [28+esp],ebp
+db	102,15,58,22,251,3
+db	102,15,58,34,253,3
+	mov	ecx,DWORD [240+edx]
+	bswap	ebx
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movdqa	xmm2,[esp]
+db	102,15,58,34,195,0
+	lea	ebp,[3+ebx]
+db	102,15,58,34,205,0
+	inc	ebx
+db	102,15,58,34,195,1
+	inc	ebp
+db	102,15,58,34,205,1
+	inc	ebx
+db	102,15,58,34,195,2
+	inc	ebp
+db	102,15,58,34,205,2
+	movdqa	[48+esp],xmm0
+db	102,15,56,0,194
+	movdqu	xmm6,[edx]
+	movdqa	[64+esp],xmm1
+db	102,15,56,0,202
+	pshufd	xmm2,xmm0,192
+	pshufd	xmm3,xmm0,128
+	cmp	eax,6
+	jb	NEAR L$038ctr32_tail
+	pxor	xmm7,xmm6
+	shl	ecx,4
+	mov	ebx,16
+	movdqa	[32+esp],xmm7
+	mov	ebp,edx
+	sub	ebx,ecx
+	lea	edx,[32+ecx*1+edx]
+	sub	eax,6
+	jmp	NEAR L$039ctr32_loop6
+align	16
+L$039ctr32_loop6:
+	pshufd	xmm4,xmm0,64
+	movdqa	xmm0,[32+esp]
+	pshufd	xmm5,xmm1,192
+	pxor	xmm2,xmm0
+	pshufd	xmm6,xmm1,128
+	pxor	xmm3,xmm0
+	pshufd	xmm7,xmm1,64
+	movups	xmm1,[16+ebp]
+	pxor	xmm4,xmm0
+	pxor	xmm5,xmm0
+db	102,15,56,220,209
+	pxor	xmm6,xmm0
+	pxor	xmm7,xmm0
+db	102,15,56,220,217
+	movups	xmm0,[32+ebp]
+	mov	ecx,ebx
+db	102,15,56,220,225
+db	102,15,56,220,233
+db	102,15,56,220,241
+db	102,15,56,220,249
+	call	L$_aesni_encrypt6_enter
+	movups	xmm1,[esi]
+	movups	xmm0,[16+esi]
+	xorps	xmm2,xmm1
+	movups	xmm1,[32+esi]
+	xorps	xmm3,xmm0
+	movups	[edi],xmm2
+	movdqa	xmm0,[16+esp]
+	xorps	xmm4,xmm1
+	movdqa	xmm1,[64+esp]
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	paddd	xmm1,xmm0
+	paddd	xmm0,[48+esp]
+	movdqa	xmm2,[esp]
+	movups	xmm3,[48+esi]
+	movups	xmm4,[64+esi]
+	xorps	xmm5,xmm3
+	movups	xmm3,[80+esi]
+	lea	esi,[96+esi]
+	movdqa	[48+esp],xmm0
+db	102,15,56,0,194
+	xorps	xmm6,xmm4
+	movups	[48+edi],xmm5
+	xorps	xmm7,xmm3
+	movdqa	[64+esp],xmm1
+db	102,15,56,0,202
+	movups	[64+edi],xmm6
+	pshufd	xmm2,xmm0,192
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	pshufd	xmm3,xmm0,128
+	sub	eax,6
+	jnc	NEAR L$039ctr32_loop6
+	add	eax,6
+	jz	NEAR L$040ctr32_ret
+	movdqu	xmm7,[ebp]
+	mov	edx,ebp
+	pxor	xmm7,[32+esp]
+	mov	ecx,DWORD [240+ebp]
+L$038ctr32_tail:
+	por	xmm2,xmm7
+	cmp	eax,2
+	jb	NEAR L$041ctr32_one
+	pshufd	xmm4,xmm0,64
+	por	xmm3,xmm7
+	je	NEAR L$042ctr32_two
+	pshufd	xmm5,xmm1,192
+	por	xmm4,xmm7
+	cmp	eax,4
+	jb	NEAR L$043ctr32_three
+	pshufd	xmm6,xmm1,128
+	por	xmm5,xmm7
+	je	NEAR L$044ctr32_four
+	por	xmm6,xmm7
+	call	__aesni_encrypt6
+	movups	xmm1,[esi]
+	movups	xmm0,[16+esi]
+	xorps	xmm2,xmm1
+	movups	xmm1,[32+esi]
+	xorps	xmm3,xmm0
+	movups	xmm0,[48+esi]
+	xorps	xmm4,xmm1
+	movups	xmm1,[64+esi]
+	xorps	xmm5,xmm0
+	movups	[edi],xmm2
+	xorps	xmm6,xmm1
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	jmp	NEAR L$040ctr32_ret
+align	16
+L$037ctr32_one_shortcut:
+	movups	xmm2,[ebx]
+	mov	ecx,DWORD [240+edx]
+L$041ctr32_one:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$045enc1_loop_7:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$045enc1_loop_7
+db	102,15,56,221,209
+	movups	xmm6,[esi]
+	xorps	xmm6,xmm2
+	movups	[edi],xmm6
+	jmp	NEAR L$040ctr32_ret
+align	16
+L$042ctr32_two:
+	call	__aesni_encrypt2
+	movups	xmm5,[esi]
+	movups	xmm6,[16+esi]
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	jmp	NEAR L$040ctr32_ret
+align	16
+L$043ctr32_three:
+	call	__aesni_encrypt3
+	movups	xmm5,[esi]
+	movups	xmm6,[16+esi]
+	xorps	xmm2,xmm5
+	movups	xmm7,[32+esi]
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	xorps	xmm4,xmm7
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	jmp	NEAR L$040ctr32_ret
+align	16
+L$044ctr32_four:
+	call	__aesni_encrypt4
+	movups	xmm6,[esi]
+	movups	xmm7,[16+esi]
+	movups	xmm1,[32+esi]
+	xorps	xmm2,xmm6
+	movups	xmm0,[48+esi]
+	xorps	xmm3,xmm7
+	movups	[edi],xmm2
+	xorps	xmm4,xmm1
+	movups	[16+edi],xmm3
+	xorps	xmm5,xmm0
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+L$040ctr32_ret:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	movdqa	[32+esp],xmm0
+	pxor	xmm5,xmm5
+	movdqa	[48+esp],xmm0
+	pxor	xmm6,xmm6
+	movdqa	[64+esp],xmm0
+	pxor	xmm7,xmm7
+	mov	esp,DWORD [80+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_xts_encrypt
+align	16
+_aesni_xts_encrypt:
+L$_aesni_xts_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	edx,DWORD [36+esp]
+	mov	esi,DWORD [40+esp]
+	mov	ecx,DWORD [240+edx]
+	movups	xmm2,[esi]
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$046enc1_loop_8:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$046enc1_loop_8
+db	102,15,56,221,209
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebp,esp
+	sub	esp,120
+	mov	ecx,DWORD [240+edx]
+	and	esp,-16
+	mov	DWORD [96+esp],135
+	mov	DWORD [100+esp],0
+	mov	DWORD [104+esp],1
+	mov	DWORD [108+esp],0
+	mov	DWORD [112+esp],eax
+	mov	DWORD [116+esp],ebp
+	movdqa	xmm1,xmm2
+	pxor	xmm0,xmm0
+	movdqa	xmm3,[96+esp]
+	pcmpgtd	xmm0,xmm1
+	and	eax,-16
+	mov	ebp,edx
+	mov	ebx,ecx
+	sub	eax,96
+	jc	NEAR L$047xts_enc_short
+	shl	ecx,4
+	mov	ebx,16
+	sub	ebx,ecx
+	lea	edx,[32+ecx*1+edx]
+	jmp	NEAR L$048xts_enc_loop6
+align	16
+L$048xts_enc_loop6:
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[16+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[32+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[48+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm7,xmm0,19
+	movdqa	[64+esp],xmm1
+	paddq	xmm1,xmm1
+	movups	xmm0,[ebp]
+	pand	xmm7,xmm3
+	movups	xmm2,[esi]
+	pxor	xmm7,xmm1
+	mov	ecx,ebx
+	movdqu	xmm3,[16+esi]
+	xorps	xmm2,xmm0
+	movdqu	xmm4,[32+esi]
+	pxor	xmm3,xmm0
+	movdqu	xmm5,[48+esi]
+	pxor	xmm4,xmm0
+	movdqu	xmm6,[64+esi]
+	pxor	xmm5,xmm0
+	movdqu	xmm1,[80+esi]
+	pxor	xmm6,xmm0
+	lea	esi,[96+esi]
+	pxor	xmm2,[esp]
+	movdqa	[80+esp],xmm7
+	pxor	xmm7,xmm1
+	movups	xmm1,[16+ebp]
+	pxor	xmm3,[16+esp]
+	pxor	xmm4,[32+esp]
+db	102,15,56,220,209
+	pxor	xmm5,[48+esp]
+	pxor	xmm6,[64+esp]
+db	102,15,56,220,217
+	pxor	xmm7,xmm0
+	movups	xmm0,[32+ebp]
+db	102,15,56,220,225
+db	102,15,56,220,233
+db	102,15,56,220,241
+db	102,15,56,220,249
+	call	L$_aesni_encrypt6_enter
+	movdqa	xmm1,[80+esp]
+	pxor	xmm0,xmm0
+	xorps	xmm2,[esp]
+	pcmpgtd	xmm0,xmm1
+	xorps	xmm3,[16+esp]
+	movups	[edi],xmm2
+	xorps	xmm4,[32+esp]
+	movups	[16+edi],xmm3
+	xorps	xmm5,[48+esp]
+	movups	[32+edi],xmm4
+	xorps	xmm6,[64+esp]
+	movups	[48+edi],xmm5
+	xorps	xmm7,xmm1
+	movups	[64+edi],xmm6
+	pshufd	xmm2,xmm0,19
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	movdqa	xmm3,[96+esp]
+	pxor	xmm0,xmm0
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	sub	eax,96
+	jnc	NEAR L$048xts_enc_loop6
+	mov	ecx,DWORD [240+ebp]
+	mov	edx,ebp
+	mov	ebx,ecx
+L$047xts_enc_short:
+	add	eax,96
+	jz	NEAR L$049xts_enc_done6x
+	movdqa	xmm5,xmm1
+	cmp	eax,32
+	jb	NEAR L$050xts_enc_one
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	je	NEAR L$051xts_enc_two
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	xmm6,xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	cmp	eax,64
+	jb	NEAR L$052xts_enc_three
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	xmm7,xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	movdqa	[esp],xmm5
+	movdqa	[16+esp],xmm6
+	je	NEAR L$053xts_enc_four
+	movdqa	[32+esp],xmm7
+	pshufd	xmm7,xmm0,19
+	movdqa	[48+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm7,xmm3
+	pxor	xmm7,xmm1
+	movdqu	xmm2,[esi]
+	movdqu	xmm3,[16+esi]
+	movdqu	xmm4,[32+esi]
+	pxor	xmm2,[esp]
+	movdqu	xmm5,[48+esi]
+	pxor	xmm3,[16+esp]
+	movdqu	xmm6,[64+esi]
+	pxor	xmm4,[32+esp]
+	lea	esi,[80+esi]
+	pxor	xmm5,[48+esp]
+	movdqa	[64+esp],xmm7
+	pxor	xmm6,xmm7
+	call	__aesni_encrypt6
+	movaps	xmm1,[64+esp]
+	xorps	xmm2,[esp]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,[32+esp]
+	movups	[edi],xmm2
+	xorps	xmm5,[48+esp]
+	movups	[16+edi],xmm3
+	xorps	xmm6,xmm1
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	lea	edi,[80+edi]
+	jmp	NEAR L$054xts_enc_done
+align	16
+L$050xts_enc_one:
+	movups	xmm2,[esi]
+	lea	esi,[16+esi]
+	xorps	xmm2,xmm5
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$055enc1_loop_9:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$055enc1_loop_9
+db	102,15,56,221,209
+	xorps	xmm2,xmm5
+	movups	[edi],xmm2
+	lea	edi,[16+edi]
+	movdqa	xmm1,xmm5
+	jmp	NEAR L$054xts_enc_done
+align	16
+L$051xts_enc_two:
+	movaps	xmm6,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	lea	esi,[32+esi]
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	call	__aesni_encrypt2
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	lea	edi,[32+edi]
+	movdqa	xmm1,xmm6
+	jmp	NEAR L$054xts_enc_done
+align	16
+L$052xts_enc_three:
+	movaps	xmm7,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	movups	xmm4,[32+esi]
+	lea	esi,[48+esi]
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	xorps	xmm4,xmm7
+	call	__aesni_encrypt3
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	xorps	xmm4,xmm7
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	lea	edi,[48+edi]
+	movdqa	xmm1,xmm7
+	jmp	NEAR L$054xts_enc_done
+align	16
+L$053xts_enc_four:
+	movaps	xmm6,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	movups	xmm4,[32+esi]
+	xorps	xmm2,[esp]
+	movups	xmm5,[48+esi]
+	lea	esi,[64+esi]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,xmm7
+	xorps	xmm5,xmm6
+	call	__aesni_encrypt4
+	xorps	xmm2,[esp]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,xmm7
+	movups	[edi],xmm2
+	xorps	xmm5,xmm6
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	lea	edi,[64+edi]
+	movdqa	xmm1,xmm6
+	jmp	NEAR L$054xts_enc_done
+align	16
+L$049xts_enc_done6x:
+	mov	eax,DWORD [112+esp]
+	and	eax,15
+	jz	NEAR L$056xts_enc_ret
+	movdqa	xmm5,xmm1
+	mov	DWORD [112+esp],eax
+	jmp	NEAR L$057xts_enc_steal
+align	16
+L$054xts_enc_done:
+	mov	eax,DWORD [112+esp]
+	pxor	xmm0,xmm0
+	and	eax,15
+	jz	NEAR L$056xts_enc_ret
+	pcmpgtd	xmm0,xmm1
+	mov	DWORD [112+esp],eax
+	pshufd	xmm5,xmm0,19
+	paddq	xmm1,xmm1
+	pand	xmm5,[96+esp]
+	pxor	xmm5,xmm1
+L$057xts_enc_steal:
+	movzx	ecx,BYTE [esi]
+	movzx	edx,BYTE [edi-16]
+	lea	esi,[1+esi]
+	mov	BYTE [edi-16],cl
+	mov	BYTE [edi],dl
+	lea	edi,[1+edi]
+	sub	eax,1
+	jnz	NEAR L$057xts_enc_steal
+	sub	edi,DWORD [112+esp]
+	mov	edx,ebp
+	mov	ecx,ebx
+	movups	xmm2,[edi-16]
+	xorps	xmm2,xmm5
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$058enc1_loop_10:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$058enc1_loop_10
+db	102,15,56,221,209
+	xorps	xmm2,xmm5
+	movups	[edi-16],xmm2
+L$056xts_enc_ret:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	movdqa	[esp],xmm0
+	pxor	xmm3,xmm3
+	movdqa	[16+esp],xmm0
+	pxor	xmm4,xmm4
+	movdqa	[32+esp],xmm0
+	pxor	xmm5,xmm5
+	movdqa	[48+esp],xmm0
+	pxor	xmm6,xmm6
+	movdqa	[64+esp],xmm0
+	pxor	xmm7,xmm7
+	movdqa	[80+esp],xmm0
+	mov	esp,DWORD [116+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_xts_decrypt
+align	16
+_aesni_xts_decrypt:
+L$_aesni_xts_decrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	edx,DWORD [36+esp]
+	mov	esi,DWORD [40+esp]
+	mov	ecx,DWORD [240+edx]
+	movups	xmm2,[esi]
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$059enc1_loop_11:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$059enc1_loop_11
+db	102,15,56,221,209
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebp,esp
+	sub	esp,120
+	and	esp,-16
+	xor	ebx,ebx
+	test	eax,15
+	setnz	bl
+	shl	ebx,4
+	sub	eax,ebx
+	mov	DWORD [96+esp],135
+	mov	DWORD [100+esp],0
+	mov	DWORD [104+esp],1
+	mov	DWORD [108+esp],0
+	mov	DWORD [112+esp],eax
+	mov	DWORD [116+esp],ebp
+	mov	ecx,DWORD [240+edx]
+	mov	ebp,edx
+	mov	ebx,ecx
+	movdqa	xmm1,xmm2
+	pxor	xmm0,xmm0
+	movdqa	xmm3,[96+esp]
+	pcmpgtd	xmm0,xmm1
+	and	eax,-16
+	sub	eax,96
+	jc	NEAR L$060xts_dec_short
+	shl	ecx,4
+	mov	ebx,16
+	sub	ebx,ecx
+	lea	edx,[32+ecx*1+edx]
+	jmp	NEAR L$061xts_dec_loop6
+align	16
+L$061xts_dec_loop6:
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[16+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[32+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	[48+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	pshufd	xmm7,xmm0,19
+	movdqa	[64+esp],xmm1
+	paddq	xmm1,xmm1
+	movups	xmm0,[ebp]
+	pand	xmm7,xmm3
+	movups	xmm2,[esi]
+	pxor	xmm7,xmm1
+	mov	ecx,ebx
+	movdqu	xmm3,[16+esi]
+	xorps	xmm2,xmm0
+	movdqu	xmm4,[32+esi]
+	pxor	xmm3,xmm0
+	movdqu	xmm5,[48+esi]
+	pxor	xmm4,xmm0
+	movdqu	xmm6,[64+esi]
+	pxor	xmm5,xmm0
+	movdqu	xmm1,[80+esi]
+	pxor	xmm6,xmm0
+	lea	esi,[96+esi]
+	pxor	xmm2,[esp]
+	movdqa	[80+esp],xmm7
+	pxor	xmm7,xmm1
+	movups	xmm1,[16+ebp]
+	pxor	xmm3,[16+esp]
+	pxor	xmm4,[32+esp]
+db	102,15,56,222,209
+	pxor	xmm5,[48+esp]
+	pxor	xmm6,[64+esp]
+db	102,15,56,222,217
+	pxor	xmm7,xmm0
+	movups	xmm0,[32+ebp]
+db	102,15,56,222,225
+db	102,15,56,222,233
+db	102,15,56,222,241
+db	102,15,56,222,249
+	call	L$_aesni_decrypt6_enter
+	movdqa	xmm1,[80+esp]
+	pxor	xmm0,xmm0
+	xorps	xmm2,[esp]
+	pcmpgtd	xmm0,xmm1
+	xorps	xmm3,[16+esp]
+	movups	[edi],xmm2
+	xorps	xmm4,[32+esp]
+	movups	[16+edi],xmm3
+	xorps	xmm5,[48+esp]
+	movups	[32+edi],xmm4
+	xorps	xmm6,[64+esp]
+	movups	[48+edi],xmm5
+	xorps	xmm7,xmm1
+	movups	[64+edi],xmm6
+	pshufd	xmm2,xmm0,19
+	movups	[80+edi],xmm7
+	lea	edi,[96+edi]
+	movdqa	xmm3,[96+esp]
+	pxor	xmm0,xmm0
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	sub	eax,96
+	jnc	NEAR L$061xts_dec_loop6
+	mov	ecx,DWORD [240+ebp]
+	mov	edx,ebp
+	mov	ebx,ecx
+L$060xts_dec_short:
+	add	eax,96
+	jz	NEAR L$062xts_dec_done6x
+	movdqa	xmm5,xmm1
+	cmp	eax,32
+	jb	NEAR L$063xts_dec_one
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	je	NEAR L$064xts_dec_two
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	xmm6,xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	cmp	eax,64
+	jb	NEAR L$065xts_dec_three
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	xmm7,xmm1
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+	movdqa	[esp],xmm5
+	movdqa	[16+esp],xmm6
+	je	NEAR L$066xts_dec_four
+	movdqa	[32+esp],xmm7
+	pshufd	xmm7,xmm0,19
+	movdqa	[48+esp],xmm1
+	paddq	xmm1,xmm1
+	pand	xmm7,xmm3
+	pxor	xmm7,xmm1
+	movdqu	xmm2,[esi]
+	movdqu	xmm3,[16+esi]
+	movdqu	xmm4,[32+esi]
+	pxor	xmm2,[esp]
+	movdqu	xmm5,[48+esi]
+	pxor	xmm3,[16+esp]
+	movdqu	xmm6,[64+esi]
+	pxor	xmm4,[32+esp]
+	lea	esi,[80+esi]
+	pxor	xmm5,[48+esp]
+	movdqa	[64+esp],xmm7
+	pxor	xmm6,xmm7
+	call	__aesni_decrypt6
+	movaps	xmm1,[64+esp]
+	xorps	xmm2,[esp]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,[32+esp]
+	movups	[edi],xmm2
+	xorps	xmm5,[48+esp]
+	movups	[16+edi],xmm3
+	xorps	xmm6,xmm1
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	movups	[64+edi],xmm6
+	lea	edi,[80+edi]
+	jmp	NEAR L$067xts_dec_done
+align	16
+L$063xts_dec_one:
+	movups	xmm2,[esi]
+	lea	esi,[16+esi]
+	xorps	xmm2,xmm5
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$068dec1_loop_12:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$068dec1_loop_12
+db	102,15,56,223,209
+	xorps	xmm2,xmm5
+	movups	[edi],xmm2
+	lea	edi,[16+edi]
+	movdqa	xmm1,xmm5
+	jmp	NEAR L$067xts_dec_done
+align	16
+L$064xts_dec_two:
+	movaps	xmm6,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	lea	esi,[32+esi]
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	call	__aesni_decrypt2
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	lea	edi,[32+edi]
+	movdqa	xmm1,xmm6
+	jmp	NEAR L$067xts_dec_done
+align	16
+L$065xts_dec_three:
+	movaps	xmm7,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	movups	xmm4,[32+esi]
+	lea	esi,[48+esi]
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	xorps	xmm4,xmm7
+	call	__aesni_decrypt3
+	xorps	xmm2,xmm5
+	xorps	xmm3,xmm6
+	xorps	xmm4,xmm7
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	lea	edi,[48+edi]
+	movdqa	xmm1,xmm7
+	jmp	NEAR L$067xts_dec_done
+align	16
+L$066xts_dec_four:
+	movaps	xmm6,xmm1
+	movups	xmm2,[esi]
+	movups	xmm3,[16+esi]
+	movups	xmm4,[32+esi]
+	xorps	xmm2,[esp]
+	movups	xmm5,[48+esi]
+	lea	esi,[64+esi]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,xmm7
+	xorps	xmm5,xmm6
+	call	__aesni_decrypt4
+	xorps	xmm2,[esp]
+	xorps	xmm3,[16+esp]
+	xorps	xmm4,xmm7
+	movups	[edi],xmm2
+	xorps	xmm5,xmm6
+	movups	[16+edi],xmm3
+	movups	[32+edi],xmm4
+	movups	[48+edi],xmm5
+	lea	edi,[64+edi]
+	movdqa	xmm1,xmm6
+	jmp	NEAR L$067xts_dec_done
+align	16
+L$062xts_dec_done6x:
+	mov	eax,DWORD [112+esp]
+	and	eax,15
+	jz	NEAR L$069xts_dec_ret
+	mov	DWORD [112+esp],eax
+	jmp	NEAR L$070xts_dec_only_one_more
+align	16
+L$067xts_dec_done:
+	mov	eax,DWORD [112+esp]
+	pxor	xmm0,xmm0
+	and	eax,15
+	jz	NEAR L$069xts_dec_ret
+	pcmpgtd	xmm0,xmm1
+	mov	DWORD [112+esp],eax
+	pshufd	xmm2,xmm0,19
+	pxor	xmm0,xmm0
+	movdqa	xmm3,[96+esp]
+	paddq	xmm1,xmm1
+	pand	xmm2,xmm3
+	pcmpgtd	xmm0,xmm1
+	pxor	xmm1,xmm2
+L$070xts_dec_only_one_more:
+	pshufd	xmm5,xmm0,19
+	movdqa	xmm6,xmm1
+	paddq	xmm1,xmm1
+	pand	xmm5,xmm3
+	pxor	xmm5,xmm1
+	mov	edx,ebp
+	mov	ecx,ebx
+	movups	xmm2,[esi]
+	xorps	xmm2,xmm5
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$071dec1_loop_13:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$071dec1_loop_13
+db	102,15,56,223,209
+	xorps	xmm2,xmm5
+	movups	[edi],xmm2
+L$072xts_dec_steal:
+	movzx	ecx,BYTE [16+esi]
+	movzx	edx,BYTE [edi]
+	lea	esi,[1+esi]
+	mov	BYTE [edi],cl
+	mov	BYTE [16+edi],dl
+	lea	edi,[1+edi]
+	sub	eax,1
+	jnz	NEAR L$072xts_dec_steal
+	sub	edi,DWORD [112+esp]
+	mov	edx,ebp
+	mov	ecx,ebx
+	movups	xmm2,[edi]
+	xorps	xmm2,xmm6
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$073dec1_loop_14:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$073dec1_loop_14
+db	102,15,56,223,209
+	xorps	xmm2,xmm6
+	movups	[edi],xmm2
+L$069xts_dec_ret:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	movdqa	[esp],xmm0
+	pxor	xmm3,xmm3
+	movdqa	[16+esp],xmm0
+	pxor	xmm4,xmm4
+	movdqa	[32+esp],xmm0
+	pxor	xmm5,xmm5
+	movdqa	[48+esp],xmm0
+	pxor	xmm6,xmm6
+	movdqa	[64+esp],xmm0
+	pxor	xmm7,xmm7
+	movdqa	[80+esp],xmm0
+	mov	esp,DWORD [116+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_cbc_encrypt
+align	16
+_aesni_cbc_encrypt:
+L$_aesni_cbc_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	ebx,esp
+	mov	edi,DWORD [24+esp]
+	sub	ebx,24
+	mov	eax,DWORD [28+esp]
+	and	ebx,-16
+	mov	edx,DWORD [32+esp]
+	mov	ebp,DWORD [36+esp]
+	test	eax,eax
+	jz	NEAR L$074cbc_abort
+	cmp	DWORD [40+esp],0
+	xchg	ebx,esp
+	movups	xmm7,[ebp]
+	mov	ecx,DWORD [240+edx]
+	mov	ebp,edx
+	mov	DWORD [16+esp],ebx
+	mov	ebx,ecx
+	je	NEAR L$075cbc_decrypt
+	movaps	xmm2,xmm7
+	cmp	eax,16
+	jb	NEAR L$076cbc_enc_tail
+	sub	eax,16
+	jmp	NEAR L$077cbc_enc_loop
+align	16
+L$077cbc_enc_loop:
+	movups	xmm7,[esi]
+	lea	esi,[16+esi]
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	xorps	xmm7,xmm0
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm7
+L$078enc1_loop_15:
+db	102,15,56,220,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$078enc1_loop_15
+db	102,15,56,221,209
+	mov	ecx,ebx
+	mov	edx,ebp
+	movups	[edi],xmm2
+	lea	edi,[16+edi]
+	sub	eax,16
+	jnc	NEAR L$077cbc_enc_loop
+	add	eax,16
+	jnz	NEAR L$076cbc_enc_tail
+	movaps	xmm7,xmm2
+	pxor	xmm2,xmm2
+	jmp	NEAR L$079cbc_ret
+L$076cbc_enc_tail:
+	mov	ecx,eax
+dd	2767451785
+	mov	ecx,16
+	sub	ecx,eax
+	xor	eax,eax
+dd	2868115081
+	lea	edi,[edi-16]
+	mov	ecx,ebx
+	mov	esi,edi
+	mov	edx,ebp
+	jmp	NEAR L$077cbc_enc_loop
+align	16
+L$075cbc_decrypt:
+	cmp	eax,80
+	jbe	NEAR L$080cbc_dec_tail
+	movaps	[esp],xmm7
+	sub	eax,80
+	jmp	NEAR L$081cbc_dec_loop6_enter
+align	16
+L$082cbc_dec_loop6:
+	movaps	[esp],xmm0
+	movups	[edi],xmm7
+	lea	edi,[16+edi]
+L$081cbc_dec_loop6_enter:
+	movdqu	xmm2,[esi]
+	movdqu	xmm3,[16+esi]
+	movdqu	xmm4,[32+esi]
+	movdqu	xmm5,[48+esi]
+	movdqu	xmm6,[64+esi]
+	movdqu	xmm7,[80+esi]
+	call	__aesni_decrypt6
+	movups	xmm1,[esi]
+	movups	xmm0,[16+esi]
+	xorps	xmm2,[esp]
+	xorps	xmm3,xmm1
+	movups	xmm1,[32+esi]
+	xorps	xmm4,xmm0
+	movups	xmm0,[48+esi]
+	xorps	xmm5,xmm1
+	movups	xmm1,[64+esi]
+	xorps	xmm6,xmm0
+	movups	xmm0,[80+esi]
+	xorps	xmm7,xmm1
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	lea	esi,[96+esi]
+	movups	[32+edi],xmm4
+	mov	ecx,ebx
+	movups	[48+edi],xmm5
+	mov	edx,ebp
+	movups	[64+edi],xmm6
+	lea	edi,[80+edi]
+	sub	eax,96
+	ja	NEAR L$082cbc_dec_loop6
+	movaps	xmm2,xmm7
+	movaps	xmm7,xmm0
+	add	eax,80
+	jle	NEAR L$083cbc_dec_clear_tail_collected
+	movups	[edi],xmm2
+	lea	edi,[16+edi]
+L$080cbc_dec_tail:
+	movups	xmm2,[esi]
+	movaps	xmm6,xmm2
+	cmp	eax,16
+	jbe	NEAR L$084cbc_dec_one
+	movups	xmm3,[16+esi]
+	movaps	xmm5,xmm3
+	cmp	eax,32
+	jbe	NEAR L$085cbc_dec_two
+	movups	xmm4,[32+esi]
+	cmp	eax,48
+	jbe	NEAR L$086cbc_dec_three
+	movups	xmm5,[48+esi]
+	cmp	eax,64
+	jbe	NEAR L$087cbc_dec_four
+	movups	xmm6,[64+esi]
+	movaps	[esp],xmm7
+	movups	xmm2,[esi]
+	xorps	xmm7,xmm7
+	call	__aesni_decrypt6
+	movups	xmm1,[esi]
+	movups	xmm0,[16+esi]
+	xorps	xmm2,[esp]
+	xorps	xmm3,xmm1
+	movups	xmm1,[32+esi]
+	xorps	xmm4,xmm0
+	movups	xmm0,[48+esi]
+	xorps	xmm5,xmm1
+	movups	xmm7,[64+esi]
+	xorps	xmm6,xmm0
+	movups	[edi],xmm2
+	movups	[16+edi],xmm3
+	pxor	xmm3,xmm3
+	movups	[32+edi],xmm4
+	pxor	xmm4,xmm4
+	movups	[48+edi],xmm5
+	pxor	xmm5,xmm5
+	lea	edi,[64+edi]
+	movaps	xmm2,xmm6
+	pxor	xmm6,xmm6
+	sub	eax,80
+	jmp	NEAR L$088cbc_dec_tail_collected
+align	16
+L$084cbc_dec_one:
+	movups	xmm0,[edx]
+	movups	xmm1,[16+edx]
+	lea	edx,[32+edx]
+	xorps	xmm2,xmm0
+L$089dec1_loop_16:
+db	102,15,56,222,209
+	dec	ecx
+	movups	xmm1,[edx]
+	lea	edx,[16+edx]
+	jnz	NEAR L$089dec1_loop_16
+db	102,15,56,223,209
+	xorps	xmm2,xmm7
+	movaps	xmm7,xmm6
+	sub	eax,16
+	jmp	NEAR L$088cbc_dec_tail_collected
+align	16
+L$085cbc_dec_two:
+	call	__aesni_decrypt2
+	xorps	xmm2,xmm7
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	movaps	xmm2,xmm3
+	pxor	xmm3,xmm3
+	lea	edi,[16+edi]
+	movaps	xmm7,xmm5
+	sub	eax,32
+	jmp	NEAR L$088cbc_dec_tail_collected
+align	16
+L$086cbc_dec_three:
+	call	__aesni_decrypt3
+	xorps	xmm2,xmm7
+	xorps	xmm3,xmm6
+	xorps	xmm4,xmm5
+	movups	[edi],xmm2
+	movaps	xmm2,xmm4
+	pxor	xmm4,xmm4
+	movups	[16+edi],xmm3
+	pxor	xmm3,xmm3
+	lea	edi,[32+edi]
+	movups	xmm7,[32+esi]
+	sub	eax,48
+	jmp	NEAR L$088cbc_dec_tail_collected
+align	16
+L$087cbc_dec_four:
+	call	__aesni_decrypt4
+	movups	xmm1,[16+esi]
+	movups	xmm0,[32+esi]
+	xorps	xmm2,xmm7
+	movups	xmm7,[48+esi]
+	xorps	xmm3,xmm6
+	movups	[edi],xmm2
+	xorps	xmm4,xmm1
+	movups	[16+edi],xmm3
+	pxor	xmm3,xmm3
+	xorps	xmm5,xmm0
+	movups	[32+edi],xmm4
+	pxor	xmm4,xmm4
+	lea	edi,[48+edi]
+	movaps	xmm2,xmm5
+	pxor	xmm5,xmm5
+	sub	eax,64
+	jmp	NEAR L$088cbc_dec_tail_collected
+align	16
+L$083cbc_dec_clear_tail_collected:
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+L$088cbc_dec_tail_collected:
+	and	eax,15
+	jnz	NEAR L$090cbc_dec_tail_partial
+	movups	[edi],xmm2
+	pxor	xmm0,xmm0
+	jmp	NEAR L$079cbc_ret
+align	16
+L$090cbc_dec_tail_partial:
+	movaps	[esp],xmm2
+	pxor	xmm0,xmm0
+	mov	ecx,16
+	mov	esi,esp
+	sub	ecx,eax
+dd	2767451785
+	movdqa	[esp],xmm2
+L$079cbc_ret:
+	mov	esp,DWORD [16+esp]
+	mov	ebp,DWORD [36+esp]
+	pxor	xmm2,xmm2
+	pxor	xmm1,xmm1
+	movups	[ebp],xmm7
+	pxor	xmm7,xmm7
+L$074cbc_abort:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+__aesni_set_encrypt_key:
+	push	ebp
+	push	ebx
+	test	eax,eax
+	jz	NEAR L$091bad_pointer
+	test	edx,edx
+	jz	NEAR L$091bad_pointer
+	call	L$092pic
+L$092pic:
+	pop	ebx
+	lea	ebx,[(L$key_const-L$092pic)+ebx]
+	lea	ebp,[_OPENSSL_ia32cap_P]
+	movups	xmm0,[eax]
+	xorps	xmm4,xmm4
+	mov	ebp,DWORD [4+ebp]
+	lea	edx,[16+edx]
+	and	ebp,268437504
+	cmp	ecx,256
+	je	NEAR L$09314rounds
+	cmp	ecx,192
+	je	NEAR L$09412rounds
+	cmp	ecx,128
+	jne	NEAR L$095bad_keybits
+align	16
+L$09610rounds:
+	cmp	ebp,268435456
+	je	NEAR L$09710rounds_alt
+	mov	ecx,9
+	movups	[edx-16],xmm0
+db	102,15,58,223,200,1
+	call	L$098key_128_cold
+db	102,15,58,223,200,2
+	call	L$099key_128
+db	102,15,58,223,200,4
+	call	L$099key_128
+db	102,15,58,223,200,8
+	call	L$099key_128
+db	102,15,58,223,200,16
+	call	L$099key_128
+db	102,15,58,223,200,32
+	call	L$099key_128
+db	102,15,58,223,200,64
+	call	L$099key_128
+db	102,15,58,223,200,128
+	call	L$099key_128
+db	102,15,58,223,200,27
+	call	L$099key_128
+db	102,15,58,223,200,54
+	call	L$099key_128
+	movups	[edx],xmm0
+	mov	DWORD [80+edx],ecx
+	jmp	NEAR L$100good_key
+align	16
+L$099key_128:
+	movups	[edx],xmm0
+	lea	edx,[16+edx]
+L$098key_128_cold:
+	shufps	xmm4,xmm0,16
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	xorps	xmm0,xmm4
+	shufps	xmm1,xmm1,255
+	xorps	xmm0,xmm1
+	ret
+align	16
+L$09710rounds_alt:
+	movdqa	xmm5,[ebx]
+	mov	ecx,8
+	movdqa	xmm4,[32+ebx]
+	movdqa	xmm2,xmm0
+	movdqu	[edx-16],xmm0
+L$101loop_key128:
+db	102,15,56,0,197
+db	102,15,56,221,196
+	pslld	xmm4,1
+	lea	edx,[16+edx]
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+	pxor	xmm0,xmm2
+	movdqu	[edx-16],xmm0
+	movdqa	xmm2,xmm0
+	dec	ecx
+	jnz	NEAR L$101loop_key128
+	movdqa	xmm4,[48+ebx]
+db	102,15,56,0,197
+db	102,15,56,221,196
+	pslld	xmm4,1
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+	pxor	xmm0,xmm2
+	movdqu	[edx],xmm0
+	movdqa	xmm2,xmm0
+db	102,15,56,0,197
+db	102,15,56,221,196
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+	pxor	xmm0,xmm2
+	movdqu	[16+edx],xmm0
+	mov	ecx,9
+	mov	DWORD [96+edx],ecx
+	jmp	NEAR L$100good_key
+align	16
+L$09412rounds:
+	movq	xmm2,[16+eax]
+	cmp	ebp,268435456
+	je	NEAR L$10212rounds_alt
+	mov	ecx,11
+	movups	[edx-16],xmm0
+db	102,15,58,223,202,1
+	call	L$103key_192a_cold
+db	102,15,58,223,202,2
+	call	L$104key_192b
+db	102,15,58,223,202,4
+	call	L$105key_192a
+db	102,15,58,223,202,8
+	call	L$104key_192b
+db	102,15,58,223,202,16
+	call	L$105key_192a
+db	102,15,58,223,202,32
+	call	L$104key_192b
+db	102,15,58,223,202,64
+	call	L$105key_192a
+db	102,15,58,223,202,128
+	call	L$104key_192b
+	movups	[edx],xmm0
+	mov	DWORD [48+edx],ecx
+	jmp	NEAR L$100good_key
+align	16
+L$105key_192a:
+	movups	[edx],xmm0
+	lea	edx,[16+edx]
+align	16
+L$103key_192a_cold:
+	movaps	xmm5,xmm2
+L$106key_192b_warm:
+	shufps	xmm4,xmm0,16
+	movdqa	xmm3,xmm2
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	pslldq	xmm3,4
+	xorps	xmm0,xmm4
+	pshufd	xmm1,xmm1,85
+	pxor	xmm2,xmm3
+	pxor	xmm0,xmm1
+	pshufd	xmm3,xmm0,255
+	pxor	xmm2,xmm3
+	ret
+align	16
+L$104key_192b:
+	movaps	xmm3,xmm0
+	shufps	xmm5,xmm0,68
+	movups	[edx],xmm5
+	shufps	xmm3,xmm2,78
+	movups	[16+edx],xmm3
+	lea	edx,[32+edx]
+	jmp	NEAR L$106key_192b_warm
+align	16
+L$10212rounds_alt:
+	movdqa	xmm5,[16+ebx]
+	movdqa	xmm4,[32+ebx]
+	mov	ecx,8
+	movdqu	[edx-16],xmm0
+L$107loop_key192:
+	movq	[edx],xmm2
+	movdqa	xmm1,xmm2
+db	102,15,56,0,213
+db	102,15,56,221,212
+	pslld	xmm4,1
+	lea	edx,[24+edx]
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm0,xmm3
+	pshufd	xmm3,xmm0,255
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+	pxor	xmm0,xmm2
+	pxor	xmm2,xmm3
+	movdqu	[edx-16],xmm0
+	dec	ecx
+	jnz	NEAR L$107loop_key192
+	mov	ecx,11
+	mov	DWORD [32+edx],ecx
+	jmp	NEAR L$100good_key
+align	16
+L$09314rounds:
+	movups	xmm2,[16+eax]
+	lea	edx,[16+edx]
+	cmp	ebp,268435456
+	je	NEAR L$10814rounds_alt
+	mov	ecx,13
+	movups	[edx-32],xmm0
+	movups	[edx-16],xmm2
+db	102,15,58,223,202,1
+	call	L$109key_256a_cold
+db	102,15,58,223,200,1
+	call	L$110key_256b
+db	102,15,58,223,202,2
+	call	L$111key_256a
+db	102,15,58,223,200,2
+	call	L$110key_256b
+db	102,15,58,223,202,4
+	call	L$111key_256a
+db	102,15,58,223,200,4
+	call	L$110key_256b
+db	102,15,58,223,202,8
+	call	L$111key_256a
+db	102,15,58,223,200,8
+	call	L$110key_256b
+db	102,15,58,223,202,16
+	call	L$111key_256a
+db	102,15,58,223,200,16
+	call	L$110key_256b
+db	102,15,58,223,202,32
+	call	L$111key_256a
+db	102,15,58,223,200,32
+	call	L$110key_256b
+db	102,15,58,223,202,64
+	call	L$111key_256a
+	movups	[edx],xmm0
+	mov	DWORD [16+edx],ecx
+	xor	eax,eax
+	jmp	NEAR L$100good_key
+align	16
+L$111key_256a:
+	movups	[edx],xmm2
+	lea	edx,[16+edx]
+L$109key_256a_cold:
+	shufps	xmm4,xmm0,16
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	xorps	xmm0,xmm4
+	shufps	xmm1,xmm1,255
+	xorps	xmm0,xmm1
+	ret
+align	16
+L$110key_256b:
+	movups	[edx],xmm0
+	lea	edx,[16+edx]
+	shufps	xmm4,xmm2,16
+	xorps	xmm2,xmm4
+	shufps	xmm4,xmm2,140
+	xorps	xmm2,xmm4
+	shufps	xmm1,xmm1,170
+	xorps	xmm2,xmm1
+	ret
+align	16
+L$10814rounds_alt:
+	movdqa	xmm5,[ebx]
+	movdqa	xmm4,[32+ebx]
+	mov	ecx,7
+	movdqu	[edx-32],xmm0
+	movdqa	xmm1,xmm2
+	movdqu	[edx-16],xmm2
+L$112loop_key256:
+db	102,15,56,0,213
+db	102,15,56,221,212
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm0,xmm3
+	pslld	xmm4,1
+	pxor	xmm0,xmm2
+	movdqu	[edx],xmm0
+	dec	ecx
+	jz	NEAR L$113done_key256
+	pshufd	xmm2,xmm0,255
+	pxor	xmm3,xmm3
+db	102,15,56,221,211
+	movdqa	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm1,xmm3
+	pxor	xmm2,xmm1
+	movdqu	[16+edx],xmm2
+	lea	edx,[32+edx]
+	movdqa	xmm1,xmm2
+	jmp	NEAR L$112loop_key256
+L$113done_key256:
+	mov	ecx,13
+	mov	DWORD [16+edx],ecx
+L$100good_key:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	xor	eax,eax
+	pop	ebx
+	pop	ebp
+	ret
+align	4
+L$091bad_pointer:
+	mov	eax,-1
+	pop	ebx
+	pop	ebp
+	ret
+align	4
+L$095bad_keybits:
+	pxor	xmm0,xmm0
+	mov	eax,-2
+	pop	ebx
+	pop	ebp
+	ret
+global	_aesni_set_encrypt_key
+align	16
+_aesni_set_encrypt_key:
+L$_aesni_set_encrypt_key_begin:
+	mov	eax,DWORD [4+esp]
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	call	__aesni_set_encrypt_key
+	ret
+global	_aesni_set_decrypt_key
+align	16
+_aesni_set_decrypt_key:
+L$_aesni_set_decrypt_key_begin:
+	mov	eax,DWORD [4+esp]
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	call	__aesni_set_encrypt_key
+	mov	edx,DWORD [12+esp]
+	shl	ecx,4
+	test	eax,eax
+	jnz	NEAR L$114dec_key_ret
+	lea	eax,[16+ecx*1+edx]
+	movups	xmm0,[edx]
+	movups	xmm1,[eax]
+	movups	[eax],xmm0
+	movups	[edx],xmm1
+	lea	edx,[16+edx]
+	lea	eax,[eax-16]
+L$115dec_key_inverse:
+	movups	xmm0,[edx]
+	movups	xmm1,[eax]
+db	102,15,56,219,192
+db	102,15,56,219,201
+	lea	edx,[16+edx]
+	lea	eax,[eax-16]
+	movups	[16+eax],xmm0
+	movups	[edx-16],xmm1
+	cmp	eax,edx
+	ja	NEAR L$115dec_key_inverse
+	movups	xmm0,[edx]
+db	102,15,56,219,192
+	movups	[edx],xmm0
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	xor	eax,eax
+L$114dec_key_ret:
+	ret
+align	64
+L$key_const:
+dd	202313229,202313229,202313229,202313229
+dd	67569157,67569157,67569157,67569157
+dd	1,1,1,1
+dd	27,27,27,27
+db	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
+db	83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
+db	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+db	115,108,46,111,114,103,62,0
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm b/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm
new file mode 100644
index 0000000..b08b056
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/aes/vpaes-x86.asm
@@ -0,0 +1,649 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+align	64
+L$_vpaes_consts:
+dd	218628480,235210255,168496130,67568393
+dd	252381056,17041926,33884169,51187212
+dd	252645135,252645135,252645135,252645135
+dd	1512730624,3266504856,1377990664,3401244816
+dd	830229760,1275146365,2969422977,3447763452
+dd	3411033600,2979783055,338359620,2782886510
+dd	4209124096,907596821,221174255,1006095553
+dd	191964160,3799684038,3164090317,1589111125
+dd	182528256,1777043520,2877432650,3265356744
+dd	1874708224,3503451415,3305285752,363511674
+dd	1606117888,3487855781,1093350906,2384367825
+dd	197121,67569157,134941193,202313229
+dd	67569157,134941193,202313229,197121
+dd	134941193,202313229,197121,67569157
+dd	202313229,197121,67569157,134941193
+dd	33619971,100992007,168364043,235736079
+dd	235736079,33619971,100992007,168364043
+dd	168364043,235736079,33619971,100992007
+dd	100992007,168364043,235736079,33619971
+dd	50462976,117835012,185207048,252579084
+dd	252314880,51251460,117574920,184942860
+dd	184682752,252054788,50987272,118359308
+dd	118099200,185467140,251790600,50727180
+dd	2946363062,528716217,1300004225,1881839624
+dd	1532713819,1532713819,1532713819,1532713819
+dd	3602276352,4288629033,3737020424,4153884961
+dd	1354558464,32357713,2958822624,3775749553
+dd	1201988352,132424512,1572796698,503232858
+dd	2213177600,1597421020,4103937655,675398315
+dd	2749646592,4273543773,1511898873,121693092
+dd	3040248576,1103263732,2871565598,1608280554
+dd	2236667136,2588920351,482954393,64377734
+dd	3069987328,291237287,2117370568,3650299247
+dd	533321216,3573750986,2572112006,1401264716
+dd	1339849704,2721158661,548607111,3445553514
+dd	2128193280,3054596040,2183486460,1257083700
+dd	655635200,1165381986,3923443150,2344132524
+dd	190078720,256924420,290342170,357187870
+dd	1610966272,2263057382,4103205268,309794674
+dd	2592527872,2233205587,1335446729,3402964816
+dd	3973531904,3225098121,3002836325,1918774430
+dd	3870401024,2102906079,2284471353,4117666579
+dd	617007872,1021508343,366931923,691083277
+dd	2528395776,3491914898,2968704004,1613121270
+dd	3445188352,3247741094,844474987,4093578302
+dd	651481088,1190302358,1689581232,574775300
+dd	4289380608,206939853,2555985458,2489840491
+dd	2130264064,327674451,3566485037,3349835193
+dd	2470714624,316102159,3636825756,3393945945
+db	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
+db	111,110,32,65,69,83,32,102,111,114,32,120,56,54,47,83
+db	83,83,69,51,44,32,77,105,107,101,32,72,97,109,98,117
+db	114,103,32,40,83,116,97,110,102,111,114,100,32,85,110,105
+db	118,101,114,115,105,116,121,41,0
+align	64
+align	16
+__vpaes_preheat:
+	add	ebp,DWORD [esp]
+	movdqa	xmm7,[ebp-48]
+	movdqa	xmm6,[ebp-16]
+	ret
+align	16
+__vpaes_encrypt_core:
+	mov	ecx,16
+	mov	eax,DWORD [240+edx]
+	movdqa	xmm1,xmm6
+	movdqa	xmm2,[ebp]
+	pandn	xmm1,xmm0
+	pand	xmm0,xmm6
+	movdqu	xmm5,[edx]
+db	102,15,56,0,208
+	movdqa	xmm0,[16+ebp]
+	pxor	xmm2,xmm5
+	psrld	xmm1,4
+	add	edx,16
+db	102,15,56,0,193
+	lea	ebx,[192+ebp]
+	pxor	xmm0,xmm2
+	jmp	NEAR L$000enc_entry
+align	16
+L$001enc_loop:
+	movdqa	xmm4,[32+ebp]
+	movdqa	xmm0,[48+ebp]
+db	102,15,56,0,226
+db	102,15,56,0,195
+	pxor	xmm4,xmm5
+	movdqa	xmm5,[64+ebp]
+	pxor	xmm0,xmm4
+	movdqa	xmm1,[ecx*1+ebx-64]
+db	102,15,56,0,234
+	movdqa	xmm2,[80+ebp]
+	movdqa	xmm4,[ecx*1+ebx]
+db	102,15,56,0,211
+	movdqa	xmm3,xmm0
+	pxor	xmm2,xmm5
+db	102,15,56,0,193
+	add	edx,16
+	pxor	xmm0,xmm2
+db	102,15,56,0,220
+	add	ecx,16
+	pxor	xmm3,xmm0
+db	102,15,56,0,193
+	and	ecx,48
+	sub	eax,1
+	pxor	xmm0,xmm3
+L$000enc_entry:
+	movdqa	xmm1,xmm6
+	movdqa	xmm5,[ebp-32]
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm6
+db	102,15,56,0,232
+	movdqa	xmm3,xmm7
+	pxor	xmm0,xmm1
+db	102,15,56,0,217
+	movdqa	xmm4,xmm7
+	pxor	xmm3,xmm5
+db	102,15,56,0,224
+	movdqa	xmm2,xmm7
+	pxor	xmm4,xmm5
+db	102,15,56,0,211
+	movdqa	xmm3,xmm7
+	pxor	xmm2,xmm0
+db	102,15,56,0,220
+	movdqu	xmm5,[edx]
+	pxor	xmm3,xmm1
+	jnz	NEAR L$001enc_loop
+	movdqa	xmm4,[96+ebp]
+	movdqa	xmm0,[112+ebp]
+db	102,15,56,0,226
+	pxor	xmm4,xmm5
+db	102,15,56,0,195
+	movdqa	xmm1,[64+ecx*1+ebx]
+	pxor	xmm0,xmm4
+db	102,15,56,0,193
+	ret
+align	16
+__vpaes_decrypt_core:
+	lea	ebx,[608+ebp]
+	mov	eax,DWORD [240+edx]
+	movdqa	xmm1,xmm6
+	movdqa	xmm2,[ebx-64]
+	pandn	xmm1,xmm0
+	mov	ecx,eax
+	psrld	xmm1,4
+	movdqu	xmm5,[edx]
+	shl	ecx,4
+	pand	xmm0,xmm6
+db	102,15,56,0,208
+	movdqa	xmm0,[ebx-48]
+	xor	ecx,48
+db	102,15,56,0,193
+	and	ecx,48
+	pxor	xmm2,xmm5
+	movdqa	xmm5,[176+ebp]
+	pxor	xmm0,xmm2
+	add	edx,16
+	lea	ecx,[ecx*1+ebx-352]
+	jmp	NEAR L$002dec_entry
+align	16
+L$003dec_loop:
+	movdqa	xmm4,[ebx-32]
+	movdqa	xmm1,[ebx-16]
+db	102,15,56,0,226
+db	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,[ebx]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,[16+ebx]
+db	102,15,56,0,226
+db	102,15,56,0,197
+db	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,[32+ebx]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,[48+ebx]
+db	102,15,56,0,226
+db	102,15,56,0,197
+db	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,[64+ebx]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,[80+ebx]
+db	102,15,56,0,226
+db	102,15,56,0,197
+db	102,15,56,0,203
+	pxor	xmm0,xmm4
+	add	edx,16
+db	102,15,58,15,237,12
+	pxor	xmm0,xmm1
+	sub	eax,1
+L$002dec_entry:
+	movdqa	xmm1,xmm6
+	movdqa	xmm2,[ebp-32]
+	pandn	xmm1,xmm0
+	pand	xmm0,xmm6
+	psrld	xmm1,4
+db	102,15,56,0,208
+	movdqa	xmm3,xmm7
+	pxor	xmm0,xmm1
+db	102,15,56,0,217
+	movdqa	xmm4,xmm7
+	pxor	xmm3,xmm2
+db	102,15,56,0,224
+	pxor	xmm4,xmm2
+	movdqa	xmm2,xmm7
+db	102,15,56,0,211
+	movdqa	xmm3,xmm7
+	pxor	xmm2,xmm0
+db	102,15,56,0,220
+	movdqu	xmm0,[edx]
+	pxor	xmm3,xmm1
+	jnz	NEAR L$003dec_loop
+	movdqa	xmm4,[96+ebx]
+db	102,15,56,0,226
+	pxor	xmm4,xmm0
+	movdqa	xmm0,[112+ebx]
+	movdqa	xmm2,[ecx]
+db	102,15,56,0,195
+	pxor	xmm0,xmm4
+db	102,15,56,0,194
+	ret
+align	16
+__vpaes_schedule_core:
+	add	ebp,DWORD [esp]
+	movdqu	xmm0,[esi]
+	movdqa	xmm2,[320+ebp]
+	movdqa	xmm3,xmm0
+	lea	ebx,[ebp]
+	movdqa	[4+esp],xmm2
+	call	__vpaes_schedule_transform
+	movdqa	xmm7,xmm0
+	test	edi,edi
+	jnz	NEAR L$004schedule_am_decrypting
+	movdqu	[edx],xmm0
+	jmp	NEAR L$005schedule_go
+L$004schedule_am_decrypting:
+	movdqa	xmm1,[256+ecx*1+ebp]
+db	102,15,56,0,217
+	movdqu	[edx],xmm3
+	xor	ecx,48
+L$005schedule_go:
+	cmp	eax,192
+	ja	NEAR L$006schedule_256
+	je	NEAR L$007schedule_192
+L$008schedule_128:
+	mov	eax,10
+L$009loop_schedule_128:
+	call	__vpaes_schedule_round
+	dec	eax
+	jz	NEAR L$010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	jmp	NEAR L$009loop_schedule_128
+align	16
+L$007schedule_192:
+	movdqu	xmm0,[8+esi]
+	call	__vpaes_schedule_transform
+	movdqa	xmm6,xmm0
+	pxor	xmm4,xmm4
+	movhlps	xmm6,xmm4
+	mov	eax,4
+L$011loop_schedule_192:
+	call	__vpaes_schedule_round
+db	102,15,58,15,198,8
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_192_smear
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_round
+	dec	eax
+	jz	NEAR L$010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	call	__vpaes_schedule_192_smear
+	jmp	NEAR L$011loop_schedule_192
+align	16
+L$006schedule_256:
+	movdqu	xmm0,[16+esi]
+	call	__vpaes_schedule_transform
+	mov	eax,7
+L$012loop_schedule_256:
+	call	__vpaes_schedule_mangle
+	movdqa	xmm6,xmm0
+	call	__vpaes_schedule_round
+	dec	eax
+	jz	NEAR L$010schedule_mangle_last
+	call	__vpaes_schedule_mangle
+	pshufd	xmm0,xmm0,255
+	movdqa	[20+esp],xmm7
+	movdqa	xmm7,xmm6
+	call	L$_vpaes_schedule_low_round
+	movdqa	xmm7,[20+esp]
+	jmp	NEAR L$012loop_schedule_256
+align	16
+L$010schedule_mangle_last:
+	lea	ebx,[384+ebp]
+	test	edi,edi
+	jnz	NEAR L$013schedule_mangle_last_dec
+	movdqa	xmm1,[256+ecx*1+ebp]
+db	102,15,56,0,193
+	lea	ebx,[352+ebp]
+	add	edx,32
+L$013schedule_mangle_last_dec:
+	add	edx,-16
+	pxor	xmm0,[336+ebp]
+	call	__vpaes_schedule_transform
+	movdqu	[edx],xmm0
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	ret
+align	16
+__vpaes_schedule_192_smear:
+	pshufd	xmm1,xmm6,128
+	pshufd	xmm0,xmm7,254
+	pxor	xmm6,xmm1
+	pxor	xmm1,xmm1
+	pxor	xmm6,xmm0
+	movdqa	xmm0,xmm6
+	movhlps	xmm6,xmm1
+	ret
+align	16
+__vpaes_schedule_round:
+	movdqa	xmm2,[8+esp]
+	pxor	xmm1,xmm1
+db	102,15,58,15,202,15
+db	102,15,58,15,210,15
+	pxor	xmm7,xmm1
+	pshufd	xmm0,xmm0,255
+db	102,15,58,15,192,1
+	movdqa	[8+esp],xmm2
+L$_vpaes_schedule_low_round:
+	movdqa	xmm1,xmm7
+	pslldq	xmm7,4
+	pxor	xmm7,xmm1
+	movdqa	xmm1,xmm7
+	pslldq	xmm7,8
+	pxor	xmm7,xmm1
+	pxor	xmm7,[336+ebp]
+	movdqa	xmm4,[ebp-16]
+	movdqa	xmm5,[ebp-48]
+	movdqa	xmm1,xmm4
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm4
+	movdqa	xmm2,[ebp-32]
+db	102,15,56,0,208
+	pxor	xmm0,xmm1
+	movdqa	xmm3,xmm5
+db	102,15,56,0,217
+	pxor	xmm3,xmm2
+	movdqa	xmm4,xmm5
+db	102,15,56,0,224
+	pxor	xmm4,xmm2
+	movdqa	xmm2,xmm5
+db	102,15,56,0,211
+	pxor	xmm2,xmm0
+	movdqa	xmm3,xmm5
+db	102,15,56,0,220
+	pxor	xmm3,xmm1
+	movdqa	xmm4,[32+ebp]
+db	102,15,56,0,226
+	movdqa	xmm0,[48+ebp]
+db	102,15,56,0,195
+	pxor	xmm0,xmm4
+	pxor	xmm0,xmm7
+	movdqa	xmm7,xmm0
+	ret
+align	16
+__vpaes_schedule_transform:
+	movdqa	xmm2,[ebp-16]
+	movdqa	xmm1,xmm2
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm2
+	movdqa	xmm2,[ebx]
+db	102,15,56,0,208
+	movdqa	xmm0,[16+ebx]
+db	102,15,56,0,193
+	pxor	xmm0,xmm2
+	ret
+align	16
+__vpaes_schedule_mangle:
+	movdqa	xmm4,xmm0
+	movdqa	xmm5,[128+ebp]
+	test	edi,edi
+	jnz	NEAR L$014schedule_mangle_dec
+	add	edx,16
+	pxor	xmm4,[336+ebp]
+db	102,15,56,0,229
+	movdqa	xmm3,xmm4
+db	102,15,56,0,229
+	pxor	xmm3,xmm4
+db	102,15,56,0,229
+	pxor	xmm3,xmm4
+	jmp	NEAR L$015schedule_mangle_both
+align	16
+L$014schedule_mangle_dec:
+	movdqa	xmm2,[ebp-16]
+	lea	esi,[416+ebp]
+	movdqa	xmm1,xmm2
+	pandn	xmm1,xmm4
+	psrld	xmm1,4
+	pand	xmm4,xmm2
+	movdqa	xmm2,[esi]
+db	102,15,56,0,212
+	movdqa	xmm3,[16+esi]
+db	102,15,56,0,217
+	pxor	xmm3,xmm2
+db	102,15,56,0,221
+	movdqa	xmm2,[32+esi]
+db	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,[48+esi]
+db	102,15,56,0,217
+	pxor	xmm3,xmm2
+db	102,15,56,0,221
+	movdqa	xmm2,[64+esi]
+db	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,[80+esi]
+db	102,15,56,0,217
+	pxor	xmm3,xmm2
+db	102,15,56,0,221
+	movdqa	xmm2,[96+esi]
+db	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,[112+esi]
+db	102,15,56,0,217
+	pxor	xmm3,xmm2
+	add	edx,-16
+L$015schedule_mangle_both:
+	movdqa	xmm1,[256+ecx*1+ebp]
+db	102,15,56,0,217
+	add	ecx,-16
+	and	ecx,48
+	movdqu	[edx],xmm3
+	ret
+global	_vpaes_set_encrypt_key
+align	16
+_vpaes_set_encrypt_key:
+L$_vpaes_set_encrypt_key_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	lea	ebx,[esp-56]
+	mov	eax,DWORD [24+esp]
+	and	ebx,-16
+	mov	edx,DWORD [28+esp]
+	xchg	ebx,esp
+	mov	DWORD [48+esp],ebx
+	mov	ebx,eax
+	shr	ebx,5
+	add	ebx,5
+	mov	DWORD [240+edx],ebx
+	mov	ecx,48
+	mov	edi,0
+	lea	ebp,[(L$_vpaes_consts+0x30-L$016pic_point)]
+	call	__vpaes_schedule_core
+L$016pic_point:
+	mov	esp,DWORD [48+esp]
+	xor	eax,eax
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_vpaes_set_decrypt_key
+align	16
+_vpaes_set_decrypt_key:
+L$_vpaes_set_decrypt_key_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	lea	ebx,[esp-56]
+	mov	eax,DWORD [24+esp]
+	and	ebx,-16
+	mov	edx,DWORD [28+esp]
+	xchg	ebx,esp
+	mov	DWORD [48+esp],ebx
+	mov	ebx,eax
+	shr	ebx,5
+	add	ebx,5
+	mov	DWORD [240+edx],ebx
+	shl	ebx,4
+	lea	edx,[16+ebx*1+edx]
+	mov	edi,1
+	mov	ecx,eax
+	shr	ecx,1
+	and	ecx,32
+	xor	ecx,32
+	lea	ebp,[(L$_vpaes_consts+0x30-L$017pic_point)]
+	call	__vpaes_schedule_core
+L$017pic_point:
+	mov	esp,DWORD [48+esp]
+	xor	eax,eax
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_vpaes_encrypt
+align	16
+_vpaes_encrypt:
+L$_vpaes_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	lea	ebp,[(L$_vpaes_consts+0x30-L$018pic_point)]
+	call	__vpaes_preheat
+L$018pic_point:
+	mov	esi,DWORD [20+esp]
+	lea	ebx,[esp-56]
+	mov	edi,DWORD [24+esp]
+	and	ebx,-16
+	mov	edx,DWORD [28+esp]
+	xchg	ebx,esp
+	mov	DWORD [48+esp],ebx
+	movdqu	xmm0,[esi]
+	call	__vpaes_encrypt_core
+	movdqu	[edi],xmm0
+	mov	esp,DWORD [48+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_vpaes_decrypt
+align	16
+_vpaes_decrypt:
+L$_vpaes_decrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	lea	ebp,[(L$_vpaes_consts+0x30-L$019pic_point)]
+	call	__vpaes_preheat
+L$019pic_point:
+	mov	esi,DWORD [20+esp]
+	lea	ebx,[esp-56]
+	mov	edi,DWORD [24+esp]
+	and	ebx,-16
+	mov	edx,DWORD [28+esp]
+	xchg	ebx,esp
+	mov	DWORD [48+esp],ebx
+	movdqu	xmm0,[esi]
+	call	__vpaes_decrypt_core
+	movdqu	[edi],xmm0
+	mov	esp,DWORD [48+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_vpaes_cbc_encrypt
+align	16
+_vpaes_cbc_encrypt:
+L$_vpaes_cbc_encrypt_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	sub	eax,16
+	jc	NEAR L$020cbc_abort
+	lea	ebx,[esp-56]
+	mov	ebp,DWORD [36+esp]
+	and	ebx,-16
+	mov	ecx,DWORD [40+esp]
+	xchg	ebx,esp
+	movdqu	xmm1,[ebp]
+	sub	edi,esi
+	mov	DWORD [48+esp],ebx
+	mov	DWORD [esp],edi
+	mov	DWORD [4+esp],edx
+	mov	DWORD [8+esp],ebp
+	mov	edi,eax
+	lea	ebp,[(L$_vpaes_consts+0x30-L$021pic_point)]
+	call	__vpaes_preheat
+L$021pic_point:
+	cmp	ecx,0
+	je	NEAR L$022cbc_dec_loop
+	jmp	NEAR L$023cbc_enc_loop
+align	16
+L$023cbc_enc_loop:
+	movdqu	xmm0,[esi]
+	pxor	xmm0,xmm1
+	call	__vpaes_encrypt_core
+	mov	ebx,DWORD [esp]
+	mov	edx,DWORD [4+esp]
+	movdqa	xmm1,xmm0
+	movdqu	[esi*1+ebx],xmm0
+	lea	esi,[16+esi]
+	sub	edi,16
+	jnc	NEAR L$023cbc_enc_loop
+	jmp	NEAR L$024cbc_done
+align	16
+L$022cbc_dec_loop:
+	movdqu	xmm0,[esi]
+	movdqa	[16+esp],xmm1
+	movdqa	[32+esp],xmm0
+	call	__vpaes_decrypt_core
+	mov	ebx,DWORD [esp]
+	mov	edx,DWORD [4+esp]
+	pxor	xmm0,[16+esp]
+	movdqa	xmm1,[32+esp]
+	movdqu	[esi*1+ebx],xmm0
+	lea	esi,[16+esi]
+	sub	edi,16
+	jnc	NEAR L$022cbc_dec_loop
+L$024cbc_done:
+	mov	ebx,DWORD [8+esp]
+	mov	esp,DWORD [48+esp]
+	movdqu	[ebx],xmm1
+L$020cbc_abort:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
diff --git a/third_party/boringssl/win-x86/crypto/bn/bn-586.asm b/third_party/boringssl/win-x86/crypto/bn/bn-586.asm
new file mode 100644
index 0000000..b222040a
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/bn/bn-586.asm
@@ -0,0 +1,1523 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_bn_mul_add_words
+align	16
+_bn_mul_add_words:
+L$_bn_mul_add_words_begin:
+	lea	eax,[_OPENSSL_ia32cap_P]
+	bt	DWORD [eax],26
+	jnc	NEAR L$000maw_non_sse2
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [8+esp]
+	mov	ecx,DWORD [12+esp]
+	movd	mm0,DWORD [16+esp]
+	pxor	mm1,mm1
+	jmp	NEAR L$001maw_sse2_entry
+align	16
+L$002maw_sse2_unrolled:
+	movd	mm3,DWORD [eax]
+	paddq	mm1,mm3
+	movd	mm2,DWORD [edx]
+	pmuludq	mm2,mm0
+	movd	mm4,DWORD [4+edx]
+	pmuludq	mm4,mm0
+	movd	mm6,DWORD [8+edx]
+	pmuludq	mm6,mm0
+	movd	mm7,DWORD [12+edx]
+	pmuludq	mm7,mm0
+	paddq	mm1,mm2
+	movd	mm3,DWORD [4+eax]
+	paddq	mm3,mm4
+	movd	mm5,DWORD [8+eax]
+	paddq	mm5,mm6
+	movd	mm4,DWORD [12+eax]
+	paddq	mm7,mm4
+	movd	DWORD [eax],mm1
+	movd	mm2,DWORD [16+edx]
+	pmuludq	mm2,mm0
+	psrlq	mm1,32
+	movd	mm4,DWORD [20+edx]
+	pmuludq	mm4,mm0
+	paddq	mm1,mm3
+	movd	mm6,DWORD [24+edx]
+	pmuludq	mm6,mm0
+	movd	DWORD [4+eax],mm1
+	psrlq	mm1,32
+	movd	mm3,DWORD [28+edx]
+	add	edx,32
+	pmuludq	mm3,mm0
+	paddq	mm1,mm5
+	movd	mm5,DWORD [16+eax]
+	paddq	mm2,mm5
+	movd	DWORD [8+eax],mm1
+	psrlq	mm1,32
+	paddq	mm1,mm7
+	movd	mm5,DWORD [20+eax]
+	paddq	mm4,mm5
+	movd	DWORD [12+eax],mm1
+	psrlq	mm1,32
+	paddq	mm1,mm2
+	movd	mm5,DWORD [24+eax]
+	paddq	mm6,mm5
+	movd	DWORD [16+eax],mm1
+	psrlq	mm1,32
+	paddq	mm1,mm4
+	movd	mm5,DWORD [28+eax]
+	paddq	mm3,mm5
+	movd	DWORD [20+eax],mm1
+	psrlq	mm1,32
+	paddq	mm1,mm6
+	movd	DWORD [24+eax],mm1
+	psrlq	mm1,32
+	paddq	mm1,mm3
+	movd	DWORD [28+eax],mm1
+	lea	eax,[32+eax]
+	psrlq	mm1,32
+	sub	ecx,8
+	jz	NEAR L$003maw_sse2_exit
+L$001maw_sse2_entry:
+	test	ecx,4294967288
+	jnz	NEAR L$002maw_sse2_unrolled
+align	4
+L$004maw_sse2_loop:
+	movd	mm2,DWORD [edx]
+	movd	mm3,DWORD [eax]
+	pmuludq	mm2,mm0
+	lea	edx,[4+edx]
+	paddq	mm1,mm3
+	paddq	mm1,mm2
+	movd	DWORD [eax],mm1
+	sub	ecx,1
+	psrlq	mm1,32
+	lea	eax,[4+eax]
+	jnz	NEAR L$004maw_sse2_loop
+L$003maw_sse2_exit:
+	movd	eax,mm1
+	emms
+	ret
+align	16
+L$000maw_non_sse2:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	xor	esi,esi
+	mov	edi,DWORD [20+esp]
+	mov	ecx,DWORD [28+esp]
+	mov	ebx,DWORD [24+esp]
+	and	ecx,4294967288
+	mov	ebp,DWORD [32+esp]
+	push	ecx
+	jz	NEAR L$005maw_finish
+align	16
+L$006maw_loop:
+	; Round 0
+	mov	eax,DWORD [ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [edi]
+	adc	edx,0
+	mov	DWORD [edi],eax
+	mov	esi,edx
+	; Round 4
+	mov	eax,DWORD [4+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [4+edi]
+	adc	edx,0
+	mov	DWORD [4+edi],eax
+	mov	esi,edx
+	; Round 8
+	mov	eax,DWORD [8+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [8+edi]
+	adc	edx,0
+	mov	DWORD [8+edi],eax
+	mov	esi,edx
+	; Round 12
+	mov	eax,DWORD [12+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [12+edi]
+	adc	edx,0
+	mov	DWORD [12+edi],eax
+	mov	esi,edx
+	; Round 16
+	mov	eax,DWORD [16+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [16+edi]
+	adc	edx,0
+	mov	DWORD [16+edi],eax
+	mov	esi,edx
+	; Round 20
+	mov	eax,DWORD [20+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [20+edi]
+	adc	edx,0
+	mov	DWORD [20+edi],eax
+	mov	esi,edx
+	; Round 24
+	mov	eax,DWORD [24+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [24+edi]
+	adc	edx,0
+	mov	DWORD [24+edi],eax
+	mov	esi,edx
+	; Round 28
+	mov	eax,DWORD [28+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [28+edi]
+	adc	edx,0
+	mov	DWORD [28+edi],eax
+	mov	esi,edx
+	; 
+	sub	ecx,8
+	lea	ebx,[32+ebx]
+	lea	edi,[32+edi]
+	jnz	NEAR L$006maw_loop
+L$005maw_finish:
+	mov	ecx,DWORD [32+esp]
+	and	ecx,7
+	jnz	NEAR L$007maw_finish2
+	jmp	NEAR L$008maw_end
+L$007maw_finish2:
+	; Tail Round 0
+	mov	eax,DWORD [ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 1
+	mov	eax,DWORD [4+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [4+edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [4+edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 2
+	mov	eax,DWORD [8+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [8+edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [8+edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 3
+	mov	eax,DWORD [12+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [12+edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [12+edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 4
+	mov	eax,DWORD [16+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [16+edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [16+edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 5
+	mov	eax,DWORD [20+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [20+edi]
+	adc	edx,0
+	dec	ecx
+	mov	DWORD [20+edi],eax
+	mov	esi,edx
+	jz	NEAR L$008maw_end
+	; Tail Round 6
+	mov	eax,DWORD [24+ebx]
+	mul	ebp
+	add	eax,esi
+	adc	edx,0
+	add	eax,DWORD [24+edi]
+	adc	edx,0
+	mov	DWORD [24+edi],eax
+	mov	esi,edx
+L$008maw_end:
+	mov	eax,esi
+	pop	ecx
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_bn_mul_words
+align	16
+_bn_mul_words:
+L$_bn_mul_words_begin:
+	lea	eax,[_OPENSSL_ia32cap_P]
+	bt	DWORD [eax],26
+	jnc	NEAR L$009mw_non_sse2
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [8+esp]
+	mov	ecx,DWORD [12+esp]
+	movd	mm0,DWORD [16+esp]
+	pxor	mm1,mm1
+align	16
+L$010mw_sse2_loop:
+	movd	mm2,DWORD [edx]
+	pmuludq	mm2,mm0
+	lea	edx,[4+edx]
+	paddq	mm1,mm2
+	movd	DWORD [eax],mm1
+	sub	ecx,1
+	psrlq	mm1,32
+	lea	eax,[4+eax]
+	jnz	NEAR L$010mw_sse2_loop
+	movd	eax,mm1
+	emms
+	ret
+align	16
+L$009mw_non_sse2:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	xor	esi,esi
+	mov	edi,DWORD [20+esp]
+	mov	ebx,DWORD [24+esp]
+	mov	ebp,DWORD [28+esp]
+	mov	ecx,DWORD [32+esp]
+	and	ebp,4294967288
+	jz	NEAR L$011mw_finish
+L$012mw_loop:
+	; Round 0
+	mov	eax,DWORD [ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [edi],eax
+	mov	esi,edx
+	; Round 4
+	mov	eax,DWORD [4+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [4+edi],eax
+	mov	esi,edx
+	; Round 8
+	mov	eax,DWORD [8+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [8+edi],eax
+	mov	esi,edx
+	; Round 12
+	mov	eax,DWORD [12+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [12+edi],eax
+	mov	esi,edx
+	; Round 16
+	mov	eax,DWORD [16+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [16+edi],eax
+	mov	esi,edx
+	; Round 20
+	mov	eax,DWORD [20+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [20+edi],eax
+	mov	esi,edx
+	; Round 24
+	mov	eax,DWORD [24+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [24+edi],eax
+	mov	esi,edx
+	; Round 28
+	mov	eax,DWORD [28+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [28+edi],eax
+	mov	esi,edx
+	; 
+	add	ebx,32
+	add	edi,32
+	sub	ebp,8
+	jz	NEAR L$011mw_finish
+	jmp	NEAR L$012mw_loop
+L$011mw_finish:
+	mov	ebp,DWORD [28+esp]
+	and	ebp,7
+	jnz	NEAR L$013mw_finish2
+	jmp	NEAR L$014mw_end
+L$013mw_finish2:
+	; Tail Round 0
+	mov	eax,DWORD [ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 1
+	mov	eax,DWORD [4+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [4+edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 2
+	mov	eax,DWORD [8+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [8+edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 3
+	mov	eax,DWORD [12+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [12+edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 4
+	mov	eax,DWORD [16+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [16+edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 5
+	mov	eax,DWORD [20+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [20+edi],eax
+	mov	esi,edx
+	dec	ebp
+	jz	NEAR L$014mw_end
+	; Tail Round 6
+	mov	eax,DWORD [24+ebx]
+	mul	ecx
+	add	eax,esi
+	adc	edx,0
+	mov	DWORD [24+edi],eax
+	mov	esi,edx
+L$014mw_end:
+	mov	eax,esi
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_bn_sqr_words
+align	16
+_bn_sqr_words:
+L$_bn_sqr_words_begin:
+	lea	eax,[_OPENSSL_ia32cap_P]
+	bt	DWORD [eax],26
+	jnc	NEAR L$015sqr_non_sse2
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [8+esp]
+	mov	ecx,DWORD [12+esp]
+align	16
+L$016sqr_sse2_loop:
+	movd	mm0,DWORD [edx]
+	pmuludq	mm0,mm0
+	lea	edx,[4+edx]
+	movq	[eax],mm0
+	sub	ecx,1
+	lea	eax,[8+eax]
+	jnz	NEAR L$016sqr_sse2_loop
+	emms
+	ret
+align	16
+L$015sqr_non_sse2:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	ebx,DWORD [28+esp]
+	and	ebx,4294967288
+	jz	NEAR L$017sw_finish
+L$018sw_loop:
+	; Round 0
+	mov	eax,DWORD [edi]
+	mul	eax
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],edx
+	; Round 4
+	mov	eax,DWORD [4+edi]
+	mul	eax
+	mov	DWORD [8+esi],eax
+	mov	DWORD [12+esi],edx
+	; Round 8
+	mov	eax,DWORD [8+edi]
+	mul	eax
+	mov	DWORD [16+esi],eax
+	mov	DWORD [20+esi],edx
+	; Round 12
+	mov	eax,DWORD [12+edi]
+	mul	eax
+	mov	DWORD [24+esi],eax
+	mov	DWORD [28+esi],edx
+	; Round 16
+	mov	eax,DWORD [16+edi]
+	mul	eax
+	mov	DWORD [32+esi],eax
+	mov	DWORD [36+esi],edx
+	; Round 20
+	mov	eax,DWORD [20+edi]
+	mul	eax
+	mov	DWORD [40+esi],eax
+	mov	DWORD [44+esi],edx
+	; Round 24
+	mov	eax,DWORD [24+edi]
+	mul	eax
+	mov	DWORD [48+esi],eax
+	mov	DWORD [52+esi],edx
+	; Round 28
+	mov	eax,DWORD [28+edi]
+	mul	eax
+	mov	DWORD [56+esi],eax
+	mov	DWORD [60+esi],edx
+	; 
+	add	edi,32
+	add	esi,64
+	sub	ebx,8
+	jnz	NEAR L$018sw_loop
+L$017sw_finish:
+	mov	ebx,DWORD [28+esp]
+	and	ebx,7
+	jz	NEAR L$019sw_end
+	; Tail Round 0
+	mov	eax,DWORD [edi]
+	mul	eax
+	mov	DWORD [esi],eax
+	dec	ebx
+	mov	DWORD [4+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 1
+	mov	eax,DWORD [4+edi]
+	mul	eax
+	mov	DWORD [8+esi],eax
+	dec	ebx
+	mov	DWORD [12+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 2
+	mov	eax,DWORD [8+edi]
+	mul	eax
+	mov	DWORD [16+esi],eax
+	dec	ebx
+	mov	DWORD [20+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 3
+	mov	eax,DWORD [12+edi]
+	mul	eax
+	mov	DWORD [24+esi],eax
+	dec	ebx
+	mov	DWORD [28+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 4
+	mov	eax,DWORD [16+edi]
+	mul	eax
+	mov	DWORD [32+esi],eax
+	dec	ebx
+	mov	DWORD [36+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 5
+	mov	eax,DWORD [20+edi]
+	mul	eax
+	mov	DWORD [40+esi],eax
+	dec	ebx
+	mov	DWORD [44+esi],edx
+	jz	NEAR L$019sw_end
+	; Tail Round 6
+	mov	eax,DWORD [24+edi]
+	mul	eax
+	mov	DWORD [48+esi],eax
+	mov	DWORD [52+esi],edx
+L$019sw_end:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_bn_div_words
+align	16
+_bn_div_words:
+L$_bn_div_words_begin:
+	mov	edx,DWORD [4+esp]
+	mov	eax,DWORD [8+esp]
+	mov	ecx,DWORD [12+esp]
+	div	ecx
+	ret
+global	_bn_add_words
+align	16
+_bn_add_words:
+L$_bn_add_words_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	mov	ebx,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	mov	edi,DWORD [28+esp]
+	mov	ebp,DWORD [32+esp]
+	xor	eax,eax
+	and	ebp,4294967288
+	jz	NEAR L$020aw_finish
+L$021aw_loop:
+	; Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	; Round 1
+	mov	ecx,DWORD [4+esi]
+	mov	edx,DWORD [4+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [4+ebx],ecx
+	; Round 2
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [8+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [8+ebx],ecx
+	; Round 3
+	mov	ecx,DWORD [12+esi]
+	mov	edx,DWORD [12+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [12+ebx],ecx
+	; Round 4
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [16+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [16+ebx],ecx
+	; Round 5
+	mov	ecx,DWORD [20+esi]
+	mov	edx,DWORD [20+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [20+ebx],ecx
+	; Round 6
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [24+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+	; Round 7
+	mov	ecx,DWORD [28+esi]
+	mov	edx,DWORD [28+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [28+ebx],ecx
+	; 
+	add	esi,32
+	add	edi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$021aw_loop
+L$020aw_finish:
+	mov	ebp,DWORD [32+esp]
+	and	ebp,7
+	jz	NEAR L$022aw_end
+	; Tail Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 1
+	mov	ecx,DWORD [4+esi]
+	mov	edx,DWORD [4+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [4+ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 2
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [8+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [8+ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 3
+	mov	ecx,DWORD [12+esi]
+	mov	edx,DWORD [12+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [12+ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 4
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [16+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [16+ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 5
+	mov	ecx,DWORD [20+esi]
+	mov	edx,DWORD [20+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [20+ebx],ecx
+	jz	NEAR L$022aw_end
+	; Tail Round 6
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [24+edi]
+	add	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	add	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+L$022aw_end:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_bn_sub_words
+align	16
+_bn_sub_words:
+L$_bn_sub_words_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	mov	ebx,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	mov	edi,DWORD [28+esp]
+	mov	ebp,DWORD [32+esp]
+	xor	eax,eax
+	and	ebp,4294967288
+	jz	NEAR L$023aw_finish
+L$024aw_loop:
+	; Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	; Round 1
+	mov	ecx,DWORD [4+esi]
+	mov	edx,DWORD [4+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [4+ebx],ecx
+	; Round 2
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [8+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [8+ebx],ecx
+	; Round 3
+	mov	ecx,DWORD [12+esi]
+	mov	edx,DWORD [12+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [12+ebx],ecx
+	; Round 4
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [16+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [16+ebx],ecx
+	; Round 5
+	mov	ecx,DWORD [20+esi]
+	mov	edx,DWORD [20+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [20+ebx],ecx
+	; Round 6
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [24+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+	; Round 7
+	mov	ecx,DWORD [28+esi]
+	mov	edx,DWORD [28+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [28+ebx],ecx
+	; 
+	add	esi,32
+	add	edi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$024aw_loop
+L$023aw_finish:
+	mov	ebp,DWORD [32+esp]
+	and	ebp,7
+	jz	NEAR L$025aw_end
+	; Tail Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 1
+	mov	ecx,DWORD [4+esi]
+	mov	edx,DWORD [4+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [4+ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 2
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [8+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [8+ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 3
+	mov	ecx,DWORD [12+esi]
+	mov	edx,DWORD [12+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [12+ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 4
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [16+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [16+ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 5
+	mov	ecx,DWORD [20+esi]
+	mov	edx,DWORD [20+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [20+ebx],ecx
+	jz	NEAR L$025aw_end
+	; Tail Round 6
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [24+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+L$025aw_end:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_bn_sub_part_words
+align	16
+_bn_sub_part_words:
+L$_bn_sub_part_words_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	; 
+	mov	ebx,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	mov	edi,DWORD [28+esp]
+	mov	ebp,DWORD [32+esp]
+	xor	eax,eax
+	and	ebp,4294967288
+	jz	NEAR L$026aw_finish
+L$027aw_loop:
+	; Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	; Round 1
+	mov	ecx,DWORD [4+esi]
+	mov	edx,DWORD [4+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [4+ebx],ecx
+	; Round 2
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [8+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [8+ebx],ecx
+	; Round 3
+	mov	ecx,DWORD [12+esi]
+	mov	edx,DWORD [12+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [12+ebx],ecx
+	; Round 4
+	mov	ecx,DWORD [16+esi]
+	mov	edx,DWORD [16+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [16+ebx],ecx
+	; Round 5
+	mov	ecx,DWORD [20+esi]
+	mov	edx,DWORD [20+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [20+ebx],ecx
+	; Round 6
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [24+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+	; Round 7
+	mov	ecx,DWORD [28+esi]
+	mov	edx,DWORD [28+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [28+ebx],ecx
+	; 
+	add	esi,32
+	add	edi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$027aw_loop
+L$026aw_finish:
+	mov	ebp,DWORD [32+esp]
+	and	ebp,7
+	jz	NEAR L$028aw_end
+	; Tail Round 0
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 1
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 2
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 3
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 4
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 5
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+	dec	ebp
+	jz	NEAR L$028aw_end
+	; Tail Round 6
+	mov	ecx,DWORD [esi]
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	add	esi,4
+	add	edi,4
+	add	ebx,4
+L$028aw_end:
+	cmp	DWORD [36+esp],0
+	je	NEAR L$029pw_end
+	mov	ebp,DWORD [36+esp]
+	cmp	ebp,0
+	je	NEAR L$029pw_end
+	jge	NEAR L$030pw_pos
+	; pw_neg
+	mov	edx,0
+	sub	edx,ebp
+	mov	ebp,edx
+	and	ebp,4294967288
+	jz	NEAR L$031pw_neg_finish
+L$032pw_neg_loop:
+	; dl<0 Round 0
+	mov	ecx,0
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [ebx],ecx
+	; dl<0 Round 1
+	mov	ecx,0
+	mov	edx,DWORD [4+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [4+ebx],ecx
+	; dl<0 Round 2
+	mov	ecx,0
+	mov	edx,DWORD [8+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [8+ebx],ecx
+	; dl<0 Round 3
+	mov	ecx,0
+	mov	edx,DWORD [12+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [12+ebx],ecx
+	; dl<0 Round 4
+	mov	ecx,0
+	mov	edx,DWORD [16+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [16+ebx],ecx
+	; dl<0 Round 5
+	mov	ecx,0
+	mov	edx,DWORD [20+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [20+ebx],ecx
+	; dl<0 Round 6
+	mov	ecx,0
+	mov	edx,DWORD [24+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+	; dl<0 Round 7
+	mov	ecx,0
+	mov	edx,DWORD [28+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [28+ebx],ecx
+	; 
+	add	edi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$032pw_neg_loop
+L$031pw_neg_finish:
+	mov	edx,DWORD [36+esp]
+	mov	ebp,0
+	sub	ebp,edx
+	and	ebp,7
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 0
+	mov	ecx,0
+	mov	edx,DWORD [edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 1
+	mov	ecx,0
+	mov	edx,DWORD [4+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [4+ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 2
+	mov	ecx,0
+	mov	edx,DWORD [8+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [8+ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 3
+	mov	ecx,0
+	mov	edx,DWORD [12+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [12+ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 4
+	mov	ecx,0
+	mov	edx,DWORD [16+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [16+ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 5
+	mov	ecx,0
+	mov	edx,DWORD [20+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	dec	ebp
+	mov	DWORD [20+ebx],ecx
+	jz	NEAR L$029pw_end
+	; dl<0 Tail Round 6
+	mov	ecx,0
+	mov	edx,DWORD [24+edi]
+	sub	ecx,eax
+	mov	eax,0
+	adc	eax,eax
+	sub	ecx,edx
+	adc	eax,0
+	mov	DWORD [24+ebx],ecx
+	jmp	NEAR L$029pw_end
+L$030pw_pos:
+	and	ebp,4294967288
+	jz	NEAR L$033pw_pos_finish
+L$034pw_pos_loop:
+	; dl>0 Round 0
+	mov	ecx,DWORD [esi]
+	sub	ecx,eax
+	mov	DWORD [ebx],ecx
+	jnc	NEAR L$035pw_nc0
+	; dl>0 Round 1
+	mov	ecx,DWORD [4+esi]
+	sub	ecx,eax
+	mov	DWORD [4+ebx],ecx
+	jnc	NEAR L$036pw_nc1
+	; dl>0 Round 2
+	mov	ecx,DWORD [8+esi]
+	sub	ecx,eax
+	mov	DWORD [8+ebx],ecx
+	jnc	NEAR L$037pw_nc2
+	; dl>0 Round 3
+	mov	ecx,DWORD [12+esi]
+	sub	ecx,eax
+	mov	DWORD [12+ebx],ecx
+	jnc	NEAR L$038pw_nc3
+	; dl>0 Round 4
+	mov	ecx,DWORD [16+esi]
+	sub	ecx,eax
+	mov	DWORD [16+ebx],ecx
+	jnc	NEAR L$039pw_nc4
+	; dl>0 Round 5
+	mov	ecx,DWORD [20+esi]
+	sub	ecx,eax
+	mov	DWORD [20+ebx],ecx
+	jnc	NEAR L$040pw_nc5
+	; dl>0 Round 6
+	mov	ecx,DWORD [24+esi]
+	sub	ecx,eax
+	mov	DWORD [24+ebx],ecx
+	jnc	NEAR L$041pw_nc6
+	; dl>0 Round 7
+	mov	ecx,DWORD [28+esi]
+	sub	ecx,eax
+	mov	DWORD [28+ebx],ecx
+	jnc	NEAR L$042pw_nc7
+	; 
+	add	esi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$034pw_pos_loop
+L$033pw_pos_finish:
+	mov	ebp,DWORD [36+esp]
+	and	ebp,7
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 0
+	mov	ecx,DWORD [esi]
+	sub	ecx,eax
+	mov	DWORD [ebx],ecx
+	jnc	NEAR L$043pw_tail_nc0
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 1
+	mov	ecx,DWORD [4+esi]
+	sub	ecx,eax
+	mov	DWORD [4+ebx],ecx
+	jnc	NEAR L$044pw_tail_nc1
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 2
+	mov	ecx,DWORD [8+esi]
+	sub	ecx,eax
+	mov	DWORD [8+ebx],ecx
+	jnc	NEAR L$045pw_tail_nc2
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 3
+	mov	ecx,DWORD [12+esi]
+	sub	ecx,eax
+	mov	DWORD [12+ebx],ecx
+	jnc	NEAR L$046pw_tail_nc3
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 4
+	mov	ecx,DWORD [16+esi]
+	sub	ecx,eax
+	mov	DWORD [16+ebx],ecx
+	jnc	NEAR L$047pw_tail_nc4
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 5
+	mov	ecx,DWORD [20+esi]
+	sub	ecx,eax
+	mov	DWORD [20+ebx],ecx
+	jnc	NEAR L$048pw_tail_nc5
+	dec	ebp
+	jz	NEAR L$029pw_end
+	; dl>0 Tail Round 6
+	mov	ecx,DWORD [24+esi]
+	sub	ecx,eax
+	mov	DWORD [24+ebx],ecx
+	jnc	NEAR L$049pw_tail_nc6
+	mov	eax,1
+	jmp	NEAR L$029pw_end
+L$050pw_nc_loop:
+	mov	ecx,DWORD [esi]
+	mov	DWORD [ebx],ecx
+L$035pw_nc0:
+	mov	ecx,DWORD [4+esi]
+	mov	DWORD [4+ebx],ecx
+L$036pw_nc1:
+	mov	ecx,DWORD [8+esi]
+	mov	DWORD [8+ebx],ecx
+L$037pw_nc2:
+	mov	ecx,DWORD [12+esi]
+	mov	DWORD [12+ebx],ecx
+L$038pw_nc3:
+	mov	ecx,DWORD [16+esi]
+	mov	DWORD [16+ebx],ecx
+L$039pw_nc4:
+	mov	ecx,DWORD [20+esi]
+	mov	DWORD [20+ebx],ecx
+L$040pw_nc5:
+	mov	ecx,DWORD [24+esi]
+	mov	DWORD [24+ebx],ecx
+L$041pw_nc6:
+	mov	ecx,DWORD [28+esi]
+	mov	DWORD [28+ebx],ecx
+L$042pw_nc7:
+	; 
+	add	esi,32
+	add	ebx,32
+	sub	ebp,8
+	jnz	NEAR L$050pw_nc_loop
+	mov	ebp,DWORD [36+esp]
+	and	ebp,7
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [esi]
+	mov	DWORD [ebx],ecx
+L$043pw_tail_nc0:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [4+esi]
+	mov	DWORD [4+ebx],ecx
+L$044pw_tail_nc1:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [8+esi]
+	mov	DWORD [8+ebx],ecx
+L$045pw_tail_nc2:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [12+esi]
+	mov	DWORD [12+ebx],ecx
+L$046pw_tail_nc3:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [16+esi]
+	mov	DWORD [16+ebx],ecx
+L$047pw_tail_nc4:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [20+esi]
+	mov	DWORD [20+ebx],ecx
+L$048pw_tail_nc5:
+	dec	ebp
+	jz	NEAR L$051pw_nc_end
+	mov	ecx,DWORD [24+esi]
+	mov	DWORD [24+ebx],ecx
+L$049pw_tail_nc6:
+L$051pw_nc_end:
+	mov	eax,0
+L$029pw_end:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/bn/co-586.asm b/third_party/boringssl/win-x86/crypto/bn/co-586.asm
new file mode 100644
index 0000000..5780dc8
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/bn/co-586.asm
@@ -0,0 +1,1260 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+global	_bn_mul_comba8
+align	16
+_bn_mul_comba8:
+L$_bn_mul_comba8_begin:
+	push	esi
+	mov	esi,DWORD [12+esp]
+	push	edi
+	mov	edi,DWORD [20+esp]
+	push	ebp
+	push	ebx
+	xor	ebx,ebx
+	mov	eax,DWORD [esi]
+	xor	ecx,ecx
+	mov	edx,DWORD [edi]
+	; ################## Calculate word 0
+	xor	ebp,ebp
+	; mul a[0]*b[0]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [edi]
+	adc	ebp,0
+	mov	DWORD [eax],ebx
+	mov	eax,DWORD [4+esi]
+	; saved r[0]
+	; ################## Calculate word 1
+	xor	ebx,ebx
+	; mul a[1]*b[0]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [esi]
+	adc	ebp,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebx,0
+	; mul a[0]*b[1]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [edi]
+	adc	ebx,0
+	mov	DWORD [4+eax],ecx
+	mov	eax,DWORD [8+esi]
+	; saved r[1]
+	; ################## Calculate word 2
+	xor	ecx,ecx
+	; mul a[2]*b[0]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ecx,0
+	; mul a[1]*b[1]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [esi]
+	adc	ebx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ecx,0
+	; mul a[0]*b[2]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [edi]
+	adc	ecx,0
+	mov	DWORD [8+eax],ebp
+	mov	eax,DWORD [12+esi]
+	; saved r[2]
+	; ################## Calculate word 3
+	xor	ebp,ebp
+	; mul a[3]*b[0]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebp,0
+	; mul a[2]*b[1]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebp,0
+	; mul a[1]*b[2]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [esi]
+	adc	ecx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebp,0
+	; mul a[0]*b[3]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [edi]
+	adc	ebp,0
+	mov	DWORD [12+eax],ebx
+	mov	eax,DWORD [16+esi]
+	; saved r[3]
+	; ################## Calculate word 4
+	xor	ebx,ebx
+	; mul a[4]*b[0]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [12+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebx,0
+	; mul a[3]*b[1]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebx,0
+	; mul a[2]*b[2]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebx,0
+	; mul a[1]*b[3]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [esi]
+	adc	ebp,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebx,0
+	; mul a[0]*b[4]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [edi]
+	adc	ebx,0
+	mov	DWORD [16+eax],ecx
+	mov	eax,DWORD [20+esi]
+	; saved r[4]
+	; ################## Calculate word 5
+	xor	ecx,ecx
+	; mul a[5]*b[0]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [16+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ecx,0
+	; mul a[4]*b[1]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [12+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ecx,0
+	; mul a[3]*b[2]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ecx,0
+	; mul a[2]*b[3]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [16+edi]
+	adc	ecx,0
+	; mul a[1]*b[4]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [esi]
+	adc	ebx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ecx,0
+	; mul a[0]*b[5]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [edi]
+	adc	ecx,0
+	mov	DWORD [20+eax],ebp
+	mov	eax,DWORD [24+esi]
+	; saved r[5]
+	; ################## Calculate word 6
+	xor	ebp,ebp
+	; mul a[6]*b[0]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebp,0
+	; mul a[5]*b[1]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [16+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebp,0
+	; mul a[4]*b[2]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [12+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebp,0
+	; mul a[3]*b[3]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebp,0
+	; mul a[2]*b[4]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ebp,0
+	; mul a[1]*b[5]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [esi]
+	adc	ecx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebp,0
+	; mul a[0]*b[6]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [edi]
+	adc	ebp,0
+	mov	DWORD [24+eax],ebx
+	mov	eax,DWORD [28+esi]
+	; saved r[6]
+	; ################## Calculate word 7
+	xor	ebx,ebx
+	; mul a[7]*b[0]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [24+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebx,0
+	; mul a[6]*b[1]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebx,0
+	; mul a[5]*b[2]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [16+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebx,0
+	; mul a[4]*b[3]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [12+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebx,0
+	; mul a[3]*b[4]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [20+edi]
+	adc	ebx,0
+	; mul a[2]*b[5]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebx,0
+	; mul a[1]*b[6]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [esi]
+	adc	ebp,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebx,0
+	; mul a[0]*b[7]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebx,0
+	mov	DWORD [28+eax],ecx
+	mov	eax,DWORD [28+esi]
+	; saved r[7]
+	; ################## Calculate word 8
+	xor	ecx,ecx
+	; mul a[7]*b[1]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [24+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ecx,0
+	; mul a[6]*b[2]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ecx,0
+	; mul a[5]*b[3]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [16+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [16+edi]
+	adc	ecx,0
+	; mul a[4]*b[4]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [12+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ecx,0
+	; mul a[3]*b[5]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ecx,0
+	; mul a[2]*b[6]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [28+edi]
+	adc	ecx,0
+	; mul a[1]*b[7]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ecx,0
+	mov	DWORD [32+eax],ebp
+	mov	eax,DWORD [28+esi]
+	; saved r[8]
+	; ################## Calculate word 9
+	xor	ebp,ebp
+	; mul a[7]*b[2]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [24+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebp,0
+	; mul a[6]*b[3]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebp,0
+	; mul a[5]*b[4]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [16+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ebp,0
+	; mul a[4]*b[5]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [12+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebp,0
+	; mul a[3]*b[6]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebp,0
+	; mul a[2]*b[7]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebp,0
+	mov	DWORD [36+eax],ebx
+	mov	eax,DWORD [28+esi]
+	; saved r[9]
+	; ################## Calculate word 10
+	xor	ebx,ebx
+	; mul a[7]*b[3]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [24+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebx,0
+	; mul a[6]*b[4]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [20+edi]
+	adc	ebx,0
+	; mul a[5]*b[5]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [16+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebx,0
+	; mul a[4]*b[6]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [12+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebx,0
+	; mul a[3]*b[7]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [16+edi]
+	adc	ebx,0
+	mov	DWORD [40+eax],ecx
+	mov	eax,DWORD [28+esi]
+	; saved r[10]
+	; ################## Calculate word 11
+	xor	ecx,ecx
+	; mul a[7]*b[4]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [24+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ecx,0
+	; mul a[6]*b[5]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ecx,0
+	; mul a[5]*b[6]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [16+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [28+edi]
+	adc	ecx,0
+	; mul a[4]*b[7]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [20+edi]
+	adc	ecx,0
+	mov	DWORD [44+eax],ebp
+	mov	eax,DWORD [28+esi]
+	; saved r[11]
+	; ################## Calculate word 12
+	xor	ebp,ebp
+	; mul a[7]*b[5]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [24+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebp,0
+	; mul a[6]*b[6]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebp,0
+	; mul a[5]*b[7]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [24+edi]
+	adc	ebp,0
+	mov	DWORD [48+eax],ebx
+	mov	eax,DWORD [28+esi]
+	; saved r[12]
+	; ################## Calculate word 13
+	xor	ebx,ebx
+	; mul a[7]*b[6]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [24+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebx,0
+	; mul a[6]*b[7]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [28+edi]
+	adc	ebx,0
+	mov	DWORD [52+eax],ecx
+	mov	eax,DWORD [28+esi]
+	; saved r[13]
+	; ################## Calculate word 14
+	xor	ecx,ecx
+	; mul a[7]*b[7]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	adc	ecx,0
+	mov	DWORD [56+eax],ebp
+	; saved r[14]
+	; save r[15]
+	mov	DWORD [60+eax],ebx
+	pop	ebx
+	pop	ebp
+	pop	edi
+	pop	esi
+	ret
+global	_bn_mul_comba4
+align	16
+_bn_mul_comba4:
+L$_bn_mul_comba4_begin:
+	push	esi
+	mov	esi,DWORD [12+esp]
+	push	edi
+	mov	edi,DWORD [20+esp]
+	push	ebp
+	push	ebx
+	xor	ebx,ebx
+	mov	eax,DWORD [esi]
+	xor	ecx,ecx
+	mov	edx,DWORD [edi]
+	; ################## Calculate word 0
+	xor	ebp,ebp
+	; mul a[0]*b[0]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [edi]
+	adc	ebp,0
+	mov	DWORD [eax],ebx
+	mov	eax,DWORD [4+esi]
+	; saved r[0]
+	; ################## Calculate word 1
+	xor	ebx,ebx
+	; mul a[1]*b[0]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [esi]
+	adc	ebp,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebx,0
+	; mul a[0]*b[1]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [edi]
+	adc	ebx,0
+	mov	DWORD [4+eax],ecx
+	mov	eax,DWORD [8+esi]
+	; saved r[1]
+	; ################## Calculate word 2
+	xor	ecx,ecx
+	; mul a[2]*b[0]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ecx,0
+	; mul a[1]*b[1]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [esi]
+	adc	ebx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ecx,0
+	; mul a[0]*b[2]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [edi]
+	adc	ecx,0
+	mov	DWORD [8+eax],ebp
+	mov	eax,DWORD [12+esi]
+	; saved r[2]
+	; ################## Calculate word 3
+	xor	ebp,ebp
+	; mul a[3]*b[0]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebp,0
+	; mul a[2]*b[1]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ecx,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebp,0
+	; mul a[1]*b[2]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [esi]
+	adc	ecx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebp,0
+	; mul a[0]*b[3]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	mov	edx,DWORD [4+edi]
+	adc	ebp,0
+	mov	DWORD [12+eax],ebx
+	mov	eax,DWORD [12+esi]
+	; saved r[3]
+	; ################## Calculate word 4
+	xor	ebx,ebx
+	; mul a[3]*b[1]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebx,0
+	; mul a[2]*b[2]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [4+esi]
+	adc	ebp,edx
+	mov	edx,DWORD [12+edi]
+	adc	ebx,0
+	; mul a[1]*b[3]
+	mul	edx
+	add	ecx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebp,edx
+	mov	edx,DWORD [8+edi]
+	adc	ebx,0
+	mov	DWORD [16+eax],ecx
+	mov	eax,DWORD [12+esi]
+	; saved r[4]
+	; ################## Calculate word 5
+	xor	ecx,ecx
+	; mul a[3]*b[2]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [8+esi]
+	adc	ebx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ecx,0
+	; mul a[2]*b[3]
+	mul	edx
+	add	ebp,eax
+	mov	eax,DWORD [20+esp]
+	adc	ebx,edx
+	mov	edx,DWORD [12+edi]
+	adc	ecx,0
+	mov	DWORD [20+eax],ebp
+	mov	eax,DWORD [12+esi]
+	; saved r[5]
+	; ################## Calculate word 6
+	xor	ebp,ebp
+	; mul a[3]*b[3]
+	mul	edx
+	add	ebx,eax
+	mov	eax,DWORD [20+esp]
+	adc	ecx,edx
+	adc	ebp,0
+	mov	DWORD [24+eax],ebx
+	; saved r[6]
+	; save r[7]
+	mov	DWORD [28+eax],ecx
+	pop	ebx
+	pop	ebp
+	pop	edi
+	pop	esi
+	ret
+global	_bn_sqr_comba8
+align	16
+_bn_sqr_comba8:
+L$_bn_sqr_comba8_begin:
+	push	esi
+	push	edi
+	push	ebp
+	push	ebx
+	mov	edi,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	xor	ebx,ebx
+	xor	ecx,ecx
+	mov	eax,DWORD [esi]
+	; ############### Calculate word 0
+	xor	ebp,ebp
+	; sqr a[0]*a[0]
+	mul	eax
+	add	ebx,eax
+	adc	ecx,edx
+	mov	edx,DWORD [esi]
+	adc	ebp,0
+	mov	DWORD [edi],ebx
+	mov	eax,DWORD [4+esi]
+	; saved r[0]
+	; ############### Calculate word 1
+	xor	ebx,ebx
+	; sqr a[1]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebx,0
+	mov	DWORD [4+edi],ecx
+	mov	edx,DWORD [esi]
+	; saved r[1]
+	; ############### Calculate word 2
+	xor	ecx,ecx
+	; sqr a[2]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [4+esi]
+	adc	ecx,0
+	; sqr a[1]*a[1]
+	mul	eax
+	add	ebp,eax
+	adc	ebx,edx
+	mov	edx,DWORD [esi]
+	adc	ecx,0
+	mov	DWORD [8+edi],ebp
+	mov	eax,DWORD [12+esi]
+	; saved r[2]
+	; ############### Calculate word 3
+	xor	ebp,ebp
+	; sqr a[3]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebp,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[2]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [16+esi]
+	adc	ebp,0
+	mov	DWORD [12+edi],ebx
+	mov	edx,DWORD [esi]
+	; saved r[3]
+	; ############### Calculate word 4
+	xor	ebx,ebx
+	; sqr a[4]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [12+esi]
+	adc	ebx,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[3]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebx,0
+	; sqr a[2]*a[2]
+	mul	eax
+	add	ecx,eax
+	adc	ebp,edx
+	mov	edx,DWORD [esi]
+	adc	ebx,0
+	mov	DWORD [16+edi],ecx
+	mov	eax,DWORD [20+esi]
+	; saved r[4]
+	; ############### Calculate word 5
+	xor	ecx,ecx
+	; sqr a[5]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [16+esi]
+	adc	ecx,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[4]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [12+esi]
+	adc	ecx,0
+	mov	edx,DWORD [8+esi]
+	; sqr a[3]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [24+esi]
+	adc	ecx,0
+	mov	DWORD [20+edi],ebp
+	mov	edx,DWORD [esi]
+	; saved r[5]
+	; ############### Calculate word 6
+	xor	ebp,ebp
+	; sqr a[6]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [20+esi]
+	adc	ebp,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[5]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [16+esi]
+	adc	ebp,0
+	mov	edx,DWORD [8+esi]
+	; sqr a[4]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [12+esi]
+	adc	ebp,0
+	; sqr a[3]*a[3]
+	mul	eax
+	add	ebx,eax
+	adc	ecx,edx
+	mov	edx,DWORD [esi]
+	adc	ebp,0
+	mov	DWORD [24+edi],ebx
+	mov	eax,DWORD [28+esi]
+	; saved r[6]
+	; ############### Calculate word 7
+	xor	ebx,ebx
+	; sqr a[7]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [24+esi]
+	adc	ebx,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[6]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [20+esi]
+	adc	ebx,0
+	mov	edx,DWORD [8+esi]
+	; sqr a[5]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [16+esi]
+	adc	ebx,0
+	mov	edx,DWORD [12+esi]
+	; sqr a[4]*a[3]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [28+esi]
+	adc	ebx,0
+	mov	DWORD [28+edi],ecx
+	mov	edx,DWORD [4+esi]
+	; saved r[7]
+	; ############### Calculate word 8
+	xor	ecx,ecx
+	; sqr a[7]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [24+esi]
+	adc	ecx,0
+	mov	edx,DWORD [8+esi]
+	; sqr a[6]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [20+esi]
+	adc	ecx,0
+	mov	edx,DWORD [12+esi]
+	; sqr a[5]*a[3]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [16+esi]
+	adc	ecx,0
+	; sqr a[4]*a[4]
+	mul	eax
+	add	ebp,eax
+	adc	ebx,edx
+	mov	edx,DWORD [8+esi]
+	adc	ecx,0
+	mov	DWORD [32+edi],ebp
+	mov	eax,DWORD [28+esi]
+	; saved r[8]
+	; ############### Calculate word 9
+	xor	ebp,ebp
+	; sqr a[7]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [24+esi]
+	adc	ebp,0
+	mov	edx,DWORD [12+esi]
+	; sqr a[6]*a[3]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [20+esi]
+	adc	ebp,0
+	mov	edx,DWORD [16+esi]
+	; sqr a[5]*a[4]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [28+esi]
+	adc	ebp,0
+	mov	DWORD [36+edi],ebx
+	mov	edx,DWORD [12+esi]
+	; saved r[9]
+	; ############### Calculate word 10
+	xor	ebx,ebx
+	; sqr a[7]*a[3]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [24+esi]
+	adc	ebx,0
+	mov	edx,DWORD [16+esi]
+	; sqr a[6]*a[4]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [20+esi]
+	adc	ebx,0
+	; sqr a[5]*a[5]
+	mul	eax
+	add	ecx,eax
+	adc	ebp,edx
+	mov	edx,DWORD [16+esi]
+	adc	ebx,0
+	mov	DWORD [40+edi],ecx
+	mov	eax,DWORD [28+esi]
+	; saved r[10]
+	; ############### Calculate word 11
+	xor	ecx,ecx
+	; sqr a[7]*a[4]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [24+esi]
+	adc	ecx,0
+	mov	edx,DWORD [20+esi]
+	; sqr a[6]*a[5]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [28+esi]
+	adc	ecx,0
+	mov	DWORD [44+edi],ebp
+	mov	edx,DWORD [20+esi]
+	; saved r[11]
+	; ############### Calculate word 12
+	xor	ebp,ebp
+	; sqr a[7]*a[5]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [24+esi]
+	adc	ebp,0
+	; sqr a[6]*a[6]
+	mul	eax
+	add	ebx,eax
+	adc	ecx,edx
+	mov	edx,DWORD [24+esi]
+	adc	ebp,0
+	mov	DWORD [48+edi],ebx
+	mov	eax,DWORD [28+esi]
+	; saved r[12]
+	; ############### Calculate word 13
+	xor	ebx,ebx
+	; sqr a[7]*a[6]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [28+esi]
+	adc	ebx,0
+	mov	DWORD [52+edi],ecx
+	; saved r[13]
+	; ############### Calculate word 14
+	xor	ecx,ecx
+	; sqr a[7]*a[7]
+	mul	eax
+	add	ebp,eax
+	adc	ebx,edx
+	adc	ecx,0
+	mov	DWORD [56+edi],ebp
+	; saved r[14]
+	mov	DWORD [60+edi],ebx
+	pop	ebx
+	pop	ebp
+	pop	edi
+	pop	esi
+	ret
+global	_bn_sqr_comba4
+align	16
+_bn_sqr_comba4:
+L$_bn_sqr_comba4_begin:
+	push	esi
+	push	edi
+	push	ebp
+	push	ebx
+	mov	edi,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	xor	ebx,ebx
+	xor	ecx,ecx
+	mov	eax,DWORD [esi]
+	; ############### Calculate word 0
+	xor	ebp,ebp
+	; sqr a[0]*a[0]
+	mul	eax
+	add	ebx,eax
+	adc	ecx,edx
+	mov	edx,DWORD [esi]
+	adc	ebp,0
+	mov	DWORD [edi],ebx
+	mov	eax,DWORD [4+esi]
+	; saved r[0]
+	; ############### Calculate word 1
+	xor	ebx,ebx
+	; sqr a[1]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebx,0
+	mov	DWORD [4+edi],ecx
+	mov	edx,DWORD [esi]
+	; saved r[1]
+	; ############### Calculate word 2
+	xor	ecx,ecx
+	; sqr a[2]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [4+esi]
+	adc	ecx,0
+	; sqr a[1]*a[1]
+	mul	eax
+	add	ebp,eax
+	adc	ebx,edx
+	mov	edx,DWORD [esi]
+	adc	ecx,0
+	mov	DWORD [8+edi],ebp
+	mov	eax,DWORD [12+esi]
+	; saved r[2]
+	; ############### Calculate word 3
+	xor	ebp,ebp
+	; sqr a[3]*a[0]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebp,0
+	mov	edx,DWORD [4+esi]
+	; sqr a[2]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebp,0
+	add	ebx,eax
+	adc	ecx,edx
+	mov	eax,DWORD [12+esi]
+	adc	ebp,0
+	mov	DWORD [12+edi],ebx
+	mov	edx,DWORD [4+esi]
+	; saved r[3]
+	; ############### Calculate word 4
+	xor	ebx,ebx
+	; sqr a[3]*a[1]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ebx,0
+	add	ecx,eax
+	adc	ebp,edx
+	mov	eax,DWORD [8+esi]
+	adc	ebx,0
+	; sqr a[2]*a[2]
+	mul	eax
+	add	ecx,eax
+	adc	ebp,edx
+	mov	edx,DWORD [8+esi]
+	adc	ebx,0
+	mov	DWORD [16+edi],ecx
+	mov	eax,DWORD [12+esi]
+	; saved r[4]
+	; ############### Calculate word 5
+	xor	ecx,ecx
+	; sqr a[3]*a[2]
+	mul	edx
+	add	eax,eax
+	adc	edx,edx
+	adc	ecx,0
+	add	ebp,eax
+	adc	ebx,edx
+	mov	eax,DWORD [12+esi]
+	adc	ecx,0
+	mov	DWORD [20+edi],ebp
+	; saved r[5]
+	; ############### Calculate word 6
+	xor	ebp,ebp
+	; sqr a[3]*a[3]
+	mul	eax
+	add	ebx,eax
+	adc	ecx,edx
+	adc	ebp,0
+	mov	DWORD [24+edi],ebx
+	; saved r[6]
+	mov	DWORD [28+edi],ecx
+	pop	ebx
+	pop	ebp
+	pop	edi
+	pop	esi
+	ret
diff --git a/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm b/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm
new file mode 100644
index 0000000..de7b949
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/bn/x86-mont.asm
@@ -0,0 +1,469 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_bn_mul_mont
+align	16
+_bn_mul_mont:
+L$_bn_mul_mont_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	xor	eax,eax
+	mov	edi,DWORD [40+esp]
+	cmp	edi,4
+	jl	NEAR L$000just_leave
+	lea	esi,[20+esp]
+	lea	edx,[24+esp]
+	mov	ebp,esp
+	add	edi,2
+	neg	edi
+	lea	esp,[edi*4+esp-32]
+	neg	edi
+	mov	eax,esp
+	sub	eax,edx
+	and	eax,2047
+	sub	esp,eax
+	xor	edx,esp
+	and	edx,2048
+	xor	edx,2048
+	sub	esp,edx
+	and	esp,-64
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	mov	esi,DWORD [16+esi]
+	mov	esi,DWORD [esi]
+	mov	DWORD [4+esp],eax
+	mov	DWORD [8+esp],ebx
+	mov	DWORD [12+esp],ecx
+	mov	DWORD [16+esp],edx
+	mov	DWORD [20+esp],esi
+	lea	ebx,[edi-3]
+	mov	DWORD [24+esp],ebp
+	lea	eax,[_OPENSSL_ia32cap_P]
+	bt	DWORD [eax],26
+	jnc	NEAR L$001non_sse2
+	mov	eax,-1
+	movd	mm7,eax
+	mov	esi,DWORD [8+esp]
+	mov	edi,DWORD [12+esp]
+	mov	ebp,DWORD [16+esp]
+	xor	edx,edx
+	xor	ecx,ecx
+	movd	mm4,DWORD [edi]
+	movd	mm5,DWORD [esi]
+	movd	mm3,DWORD [ebp]
+	pmuludq	mm5,mm4
+	movq	mm2,mm5
+	movq	mm0,mm5
+	pand	mm0,mm7
+	pmuludq	mm5,[20+esp]
+	pmuludq	mm3,mm5
+	paddq	mm3,mm0
+	movd	mm1,DWORD [4+ebp]
+	movd	mm0,DWORD [4+esi]
+	psrlq	mm2,32
+	psrlq	mm3,32
+	inc	ecx
+align	16
+L$0021st:
+	pmuludq	mm0,mm4
+	pmuludq	mm1,mm5
+	paddq	mm2,mm0
+	paddq	mm3,mm1
+	movq	mm0,mm2
+	pand	mm0,mm7
+	movd	mm1,DWORD [4+ecx*4+ebp]
+	paddq	mm3,mm0
+	movd	mm0,DWORD [4+ecx*4+esi]
+	psrlq	mm2,32
+	movd	DWORD [28+ecx*4+esp],mm3
+	psrlq	mm3,32
+	lea	ecx,[1+ecx]
+	cmp	ecx,ebx
+	jl	NEAR L$0021st
+	pmuludq	mm0,mm4
+	pmuludq	mm1,mm5
+	paddq	mm2,mm0
+	paddq	mm3,mm1
+	movq	mm0,mm2
+	pand	mm0,mm7
+	paddq	mm3,mm0
+	movd	DWORD [28+ecx*4+esp],mm3
+	psrlq	mm2,32
+	psrlq	mm3,32
+	paddq	mm3,mm2
+	movq	[32+ebx*4+esp],mm3
+	inc	edx
+L$003outer:
+	xor	ecx,ecx
+	movd	mm4,DWORD [edx*4+edi]
+	movd	mm5,DWORD [esi]
+	movd	mm6,DWORD [32+esp]
+	movd	mm3,DWORD [ebp]
+	pmuludq	mm5,mm4
+	paddq	mm5,mm6
+	movq	mm0,mm5
+	movq	mm2,mm5
+	pand	mm0,mm7
+	pmuludq	mm5,[20+esp]
+	pmuludq	mm3,mm5
+	paddq	mm3,mm0
+	movd	mm6,DWORD [36+esp]
+	movd	mm1,DWORD [4+ebp]
+	movd	mm0,DWORD [4+esi]
+	psrlq	mm2,32
+	psrlq	mm3,32
+	paddq	mm2,mm6
+	inc	ecx
+	dec	ebx
+L$004inner:
+	pmuludq	mm0,mm4
+	pmuludq	mm1,mm5
+	paddq	mm2,mm0
+	paddq	mm3,mm1
+	movq	mm0,mm2
+	movd	mm6,DWORD [36+ecx*4+esp]
+	pand	mm0,mm7
+	movd	mm1,DWORD [4+ecx*4+ebp]
+	paddq	mm3,mm0
+	movd	mm0,DWORD [4+ecx*4+esi]
+	psrlq	mm2,32
+	movd	DWORD [28+ecx*4+esp],mm3
+	psrlq	mm3,32
+	paddq	mm2,mm6
+	dec	ebx
+	lea	ecx,[1+ecx]
+	jnz	NEAR L$004inner
+	mov	ebx,ecx
+	pmuludq	mm0,mm4
+	pmuludq	mm1,mm5
+	paddq	mm2,mm0
+	paddq	mm3,mm1
+	movq	mm0,mm2
+	pand	mm0,mm7
+	paddq	mm3,mm0
+	movd	DWORD [28+ecx*4+esp],mm3
+	psrlq	mm2,32
+	psrlq	mm3,32
+	movd	mm6,DWORD [36+ebx*4+esp]
+	paddq	mm3,mm2
+	paddq	mm3,mm6
+	movq	[32+ebx*4+esp],mm3
+	lea	edx,[1+edx]
+	cmp	edx,ebx
+	jle	NEAR L$003outer
+	emms
+	jmp	NEAR L$005common_tail
+align	16
+L$001non_sse2:
+	mov	esi,DWORD [8+esp]
+	lea	ebp,[1+ebx]
+	mov	edi,DWORD [12+esp]
+	xor	ecx,ecx
+	mov	edx,esi
+	and	ebp,1
+	sub	edx,edi
+	lea	eax,[4+ebx*4+edi]
+	or	ebp,edx
+	mov	edi,DWORD [edi]
+	jz	NEAR L$006bn_sqr_mont
+	mov	DWORD [28+esp],eax
+	mov	eax,DWORD [esi]
+	xor	edx,edx
+align	16
+L$007mull:
+	mov	ebp,edx
+	mul	edi
+	add	ebp,eax
+	lea	ecx,[1+ecx]
+	adc	edx,0
+	mov	eax,DWORD [ecx*4+esi]
+	cmp	ecx,ebx
+	mov	DWORD [28+ecx*4+esp],ebp
+	jl	NEAR L$007mull
+	mov	ebp,edx
+	mul	edi
+	mov	edi,DWORD [20+esp]
+	add	eax,ebp
+	mov	esi,DWORD [16+esp]
+	adc	edx,0
+	imul	edi,DWORD [32+esp]
+	mov	DWORD [32+ebx*4+esp],eax
+	xor	ecx,ecx
+	mov	DWORD [36+ebx*4+esp],edx
+	mov	DWORD [40+ebx*4+esp],ecx
+	mov	eax,DWORD [esi]
+	mul	edi
+	add	eax,DWORD [32+esp]
+	mov	eax,DWORD [4+esi]
+	adc	edx,0
+	inc	ecx
+	jmp	NEAR L$0082ndmadd
+align	16
+L$0091stmadd:
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [32+ecx*4+esp]
+	lea	ecx,[1+ecx]
+	adc	edx,0
+	add	ebp,eax
+	mov	eax,DWORD [ecx*4+esi]
+	adc	edx,0
+	cmp	ecx,ebx
+	mov	DWORD [28+ecx*4+esp],ebp
+	jl	NEAR L$0091stmadd
+	mov	ebp,edx
+	mul	edi
+	add	eax,DWORD [32+ebx*4+esp]
+	mov	edi,DWORD [20+esp]
+	adc	edx,0
+	mov	esi,DWORD [16+esp]
+	add	ebp,eax
+	adc	edx,0
+	imul	edi,DWORD [32+esp]
+	xor	ecx,ecx
+	add	edx,DWORD [36+ebx*4+esp]
+	mov	DWORD [32+ebx*4+esp],ebp
+	adc	ecx,0
+	mov	eax,DWORD [esi]
+	mov	DWORD [36+ebx*4+esp],edx
+	mov	DWORD [40+ebx*4+esp],ecx
+	mul	edi
+	add	eax,DWORD [32+esp]
+	mov	eax,DWORD [4+esi]
+	adc	edx,0
+	mov	ecx,1
+align	16
+L$0082ndmadd:
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [32+ecx*4+esp]
+	lea	ecx,[1+ecx]
+	adc	edx,0
+	add	ebp,eax
+	mov	eax,DWORD [ecx*4+esi]
+	adc	edx,0
+	cmp	ecx,ebx
+	mov	DWORD [24+ecx*4+esp],ebp
+	jl	NEAR L$0082ndmadd
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [32+ebx*4+esp]
+	adc	edx,0
+	add	ebp,eax
+	adc	edx,0
+	mov	DWORD [28+ebx*4+esp],ebp
+	xor	eax,eax
+	mov	ecx,DWORD [12+esp]
+	add	edx,DWORD [36+ebx*4+esp]
+	adc	eax,DWORD [40+ebx*4+esp]
+	lea	ecx,[4+ecx]
+	mov	DWORD [32+ebx*4+esp],edx
+	cmp	ecx,DWORD [28+esp]
+	mov	DWORD [36+ebx*4+esp],eax
+	je	NEAR L$005common_tail
+	mov	edi,DWORD [ecx]
+	mov	esi,DWORD [8+esp]
+	mov	DWORD [12+esp],ecx
+	xor	ecx,ecx
+	xor	edx,edx
+	mov	eax,DWORD [esi]
+	jmp	NEAR L$0091stmadd
+align	16
+L$006bn_sqr_mont:
+	mov	DWORD [esp],ebx
+	mov	DWORD [12+esp],ecx
+	mov	eax,edi
+	mul	edi
+	mov	DWORD [32+esp],eax
+	mov	ebx,edx
+	shr	edx,1
+	and	ebx,1
+	inc	ecx
+align	16
+L$010sqr:
+	mov	eax,DWORD [ecx*4+esi]
+	mov	ebp,edx
+	mul	edi
+	add	eax,ebp
+	lea	ecx,[1+ecx]
+	adc	edx,0
+	lea	ebp,[eax*2+ebx]
+	shr	eax,31
+	cmp	ecx,DWORD [esp]
+	mov	ebx,eax
+	mov	DWORD [28+ecx*4+esp],ebp
+	jl	NEAR L$010sqr
+	mov	eax,DWORD [ecx*4+esi]
+	mov	ebp,edx
+	mul	edi
+	add	eax,ebp
+	mov	edi,DWORD [20+esp]
+	adc	edx,0
+	mov	esi,DWORD [16+esp]
+	lea	ebp,[eax*2+ebx]
+	imul	edi,DWORD [32+esp]
+	shr	eax,31
+	mov	DWORD [32+ecx*4+esp],ebp
+	lea	ebp,[edx*2+eax]
+	mov	eax,DWORD [esi]
+	shr	edx,31
+	mov	DWORD [36+ecx*4+esp],ebp
+	mov	DWORD [40+ecx*4+esp],edx
+	mul	edi
+	add	eax,DWORD [32+esp]
+	mov	ebx,ecx
+	adc	edx,0
+	mov	eax,DWORD [4+esi]
+	mov	ecx,1
+align	16
+L$0113rdmadd:
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [32+ecx*4+esp]
+	adc	edx,0
+	add	ebp,eax
+	mov	eax,DWORD [4+ecx*4+esi]
+	adc	edx,0
+	mov	DWORD [28+ecx*4+esp],ebp
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [36+ecx*4+esp]
+	lea	ecx,[2+ecx]
+	adc	edx,0
+	add	ebp,eax
+	mov	eax,DWORD [ecx*4+esi]
+	adc	edx,0
+	cmp	ecx,ebx
+	mov	DWORD [24+ecx*4+esp],ebp
+	jl	NEAR L$0113rdmadd
+	mov	ebp,edx
+	mul	edi
+	add	ebp,DWORD [32+ebx*4+esp]
+	adc	edx,0
+	add	ebp,eax
+	adc	edx,0
+	mov	DWORD [28+ebx*4+esp],ebp
+	mov	ecx,DWORD [12+esp]
+	xor	eax,eax
+	mov	esi,DWORD [8+esp]
+	add	edx,DWORD [36+ebx*4+esp]
+	adc	eax,DWORD [40+ebx*4+esp]
+	mov	DWORD [32+ebx*4+esp],edx
+	cmp	ecx,ebx
+	mov	DWORD [36+ebx*4+esp],eax
+	je	NEAR L$005common_tail
+	mov	edi,DWORD [4+ecx*4+esi]
+	lea	ecx,[1+ecx]
+	mov	eax,edi
+	mov	DWORD [12+esp],ecx
+	mul	edi
+	add	eax,DWORD [32+ecx*4+esp]
+	adc	edx,0
+	mov	DWORD [32+ecx*4+esp],eax
+	xor	ebp,ebp
+	cmp	ecx,ebx
+	lea	ecx,[1+ecx]
+	je	NEAR L$012sqrlast
+	mov	ebx,edx
+	shr	edx,1
+	and	ebx,1
+align	16
+L$013sqradd:
+	mov	eax,DWORD [ecx*4+esi]
+	mov	ebp,edx
+	mul	edi
+	add	eax,ebp
+	lea	ebp,[eax*1+eax]
+	adc	edx,0
+	shr	eax,31
+	add	ebp,DWORD [32+ecx*4+esp]
+	lea	ecx,[1+ecx]
+	adc	eax,0
+	add	ebp,ebx
+	adc	eax,0
+	cmp	ecx,DWORD [esp]
+	mov	DWORD [28+ecx*4+esp],ebp
+	mov	ebx,eax
+	jle	NEAR L$013sqradd
+	mov	ebp,edx
+	add	edx,edx
+	shr	ebp,31
+	add	edx,ebx
+	adc	ebp,0
+L$012sqrlast:
+	mov	edi,DWORD [20+esp]
+	mov	esi,DWORD [16+esp]
+	imul	edi,DWORD [32+esp]
+	add	edx,DWORD [32+ecx*4+esp]
+	mov	eax,DWORD [esi]
+	adc	ebp,0
+	mov	DWORD [32+ecx*4+esp],edx
+	mov	DWORD [36+ecx*4+esp],ebp
+	mul	edi
+	add	eax,DWORD [32+esp]
+	lea	ebx,[ecx-1]
+	adc	edx,0
+	mov	ecx,1
+	mov	eax,DWORD [4+esi]
+	jmp	NEAR L$0113rdmadd
+align	16
+L$005common_tail:
+	mov	ebp,DWORD [16+esp]
+	mov	edi,DWORD [4+esp]
+	lea	esi,[32+esp]
+	mov	eax,DWORD [esi]
+	mov	ecx,ebx
+	xor	edx,edx
+align	16
+L$014sub:
+	sbb	eax,DWORD [edx*4+ebp]
+	mov	DWORD [edx*4+edi],eax
+	dec	ecx
+	mov	eax,DWORD [4+edx*4+esi]
+	lea	edx,[1+edx]
+	jge	NEAR L$014sub
+	sbb	eax,0
+align	16
+L$015copy:
+	mov	edx,DWORD [ebx*4+esi]
+	mov	ebp,DWORD [ebx*4+edi]
+	xor	edx,ebp
+	and	edx,eax
+	xor	edx,ebp
+	mov	DWORD [ebx*4+esi],ecx
+	mov	DWORD [ebx*4+edi],edx
+	dec	ebx
+	jge	NEAR L$015copy
+	mov	esp,DWORD [24+esp]
+	mov	eax,1
+L$000just_leave:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+db	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
+db	112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
+db	54,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+db	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+db	111,114,103,62,0
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm b/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm
new file mode 100644
index 0000000..4317a73
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/cpu-x86-asm.asm
@@ -0,0 +1,303 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+global	_OPENSSL_ia32_cpuid
+align	16
+_OPENSSL_ia32_cpuid:
+L$_OPENSSL_ia32_cpuid_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	xor	edx,edx
+	pushfd
+	pop	eax
+	mov	ecx,eax
+	xor	eax,2097152
+	push	eax
+	popfd
+	pushfd
+	pop	eax
+	xor	ecx,eax
+	xor	eax,eax
+	bt	ecx,21
+	jnc	NEAR L$000nocpuid
+	mov	esi,DWORD [20+esp]
+	mov	DWORD [8+esi],eax
+	cpuid
+	mov	edi,eax
+	xor	eax,eax
+	cmp	ebx,1970169159
+	setne	al
+	mov	ebp,eax
+	cmp	edx,1231384169
+	setne	al
+	or	ebp,eax
+	cmp	ecx,1818588270
+	setne	al
+	or	ebp,eax
+	jz	NEAR L$001intel
+	cmp	ebx,1752462657
+	setne	al
+	mov	esi,eax
+	cmp	edx,1769238117
+	setne	al
+	or	esi,eax
+	cmp	ecx,1145913699
+	setne	al
+	or	esi,eax
+	jnz	NEAR L$001intel
+	mov	eax,2147483648
+	cpuid
+	cmp	eax,2147483649
+	jb	NEAR L$001intel
+	mov	esi,eax
+	mov	eax,2147483649
+	cpuid
+	or	ebp,ecx
+	and	ebp,2049
+	cmp	esi,2147483656
+	jb	NEAR L$001intel
+	mov	eax,2147483656
+	cpuid
+	movzx	esi,cl
+	inc	esi
+	mov	eax,1
+	xor	ecx,ecx
+	cpuid
+	bt	edx,28
+	jnc	NEAR L$002generic
+	shr	ebx,16
+	and	ebx,255
+	cmp	ebx,esi
+	ja	NEAR L$002generic
+	and	edx,4026531839
+	jmp	NEAR L$002generic
+L$001intel:
+	cmp	edi,7
+	jb	NEAR L$003cacheinfo
+	mov	esi,DWORD [20+esp]
+	mov	eax,7
+	xor	ecx,ecx
+	cpuid
+	mov	DWORD [8+esi],ebx
+L$003cacheinfo:
+	cmp	edi,4
+	mov	edi,-1
+	jb	NEAR L$004nocacheinfo
+	mov	eax,4
+	mov	ecx,0
+	cpuid
+	mov	edi,eax
+	shr	edi,14
+	and	edi,4095
+L$004nocacheinfo:
+	mov	eax,1
+	xor	ecx,ecx
+	cpuid
+	and	edx,3220176895
+	cmp	ebp,0
+	jne	NEAR L$005notintel
+	or	edx,1073741824
+L$005notintel:
+	bt	edx,28
+	jnc	NEAR L$002generic
+	and	edx,4026531839
+	cmp	edi,0
+	je	NEAR L$002generic
+	or	edx,268435456
+	shr	ebx,16
+	cmp	bl,1
+	ja	NEAR L$002generic
+	and	edx,4026531839
+L$002generic:
+	and	ebp,2048
+	and	ecx,4294965247
+	mov	esi,edx
+	or	ebp,ecx
+	bt	ecx,27
+	jnc	NEAR L$006clear_avx
+	xor	ecx,ecx
+db	15,1,208
+	and	eax,6
+	cmp	eax,6
+	je	NEAR L$007done
+	cmp	eax,2
+	je	NEAR L$006clear_avx
+L$008clear_xmm:
+	and	ebp,4261412861
+	and	esi,4278190079
+L$006clear_avx:
+	and	ebp,4026525695
+	mov	edi,DWORD [20+esp]
+	and	DWORD [8+edi],4294967263
+L$007done:
+	mov	eax,esi
+	mov	edx,ebp
+L$000nocpuid:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+;extern	_OPENSSL_ia32cap_P
+global	_OPENSSL_rdtsc
+align	16
+_OPENSSL_rdtsc:
+L$_OPENSSL_rdtsc_begin:
+	xor	eax,eax
+	xor	edx,edx
+	lea	ecx,[_OPENSSL_ia32cap_P]
+	bt	DWORD [ecx],4
+	jnc	NEAR L$009notsc
+	rdtsc
+L$009notsc:
+	ret
+global	_OPENSSL_instrument_halt
+align	16
+_OPENSSL_instrument_halt:
+L$_OPENSSL_instrument_halt_begin:
+	lea	ecx,[_OPENSSL_ia32cap_P]
+	bt	DWORD [ecx],4
+	jnc	NEAR L$010nohalt
+dd	2421723150
+	and	eax,3
+	jnz	NEAR L$010nohalt
+	pushfd
+	pop	eax
+	bt	eax,9
+	jnc	NEAR L$010nohalt
+	rdtsc
+	push	edx
+	push	eax
+	hlt
+	rdtsc
+	sub	eax,DWORD [esp]
+	sbb	edx,DWORD [4+esp]
+	add	esp,8
+	ret
+L$010nohalt:
+	xor	eax,eax
+	xor	edx,edx
+	ret
+global	_OPENSSL_far_spin
+align	16
+_OPENSSL_far_spin:
+L$_OPENSSL_far_spin_begin:
+	pushfd
+	pop	eax
+	bt	eax,9
+	jnc	NEAR L$011nospin
+	mov	eax,DWORD [4+esp]
+	mov	ecx,DWORD [8+esp]
+dd	2430111262
+	xor	eax,eax
+	mov	edx,DWORD [ecx]
+	jmp	NEAR L$012spin
+align	16
+L$012spin:
+	inc	eax
+	cmp	edx,DWORD [ecx]
+	je	NEAR L$012spin
+dd	529567888
+	ret
+L$011nospin:
+	xor	eax,eax
+	xor	edx,edx
+	ret
+global	_OPENSSL_wipe_cpu
+align	16
+_OPENSSL_wipe_cpu:
+L$_OPENSSL_wipe_cpu_begin:
+	xor	eax,eax
+	xor	edx,edx
+	lea	ecx,[_OPENSSL_ia32cap_P]
+	mov	ecx,DWORD [ecx]
+	bt	DWORD [ecx],1
+	jnc	NEAR L$013no_x87
+	and	ecx,83886080
+	cmp	ecx,83886080
+	jne	NEAR L$014no_sse2
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+L$014no_sse2:
+dd	4007259865,4007259865,4007259865,4007259865,2430851995
+L$013no_x87:
+	lea	eax,[4+esp]
+	ret
+global	_OPENSSL_atomic_add
+align	16
+_OPENSSL_atomic_add:
+L$_OPENSSL_atomic_add_begin:
+	mov	edx,DWORD [4+esp]
+	mov	ecx,DWORD [8+esp]
+	push	ebx
+	nop
+	mov	eax,DWORD [edx]
+L$015spin:
+	lea	ebx,[ecx*1+eax]
+	nop
+dd	447811568
+	jne	NEAR L$015spin
+	mov	eax,ebx
+	pop	ebx
+	ret
+global	_OPENSSL_indirect_call
+align	16
+_OPENSSL_indirect_call:
+L$_OPENSSL_indirect_call_begin:
+	push	ebp
+	mov	ebp,esp
+	sub	esp,28
+	mov	ecx,DWORD [12+ebp]
+	mov	DWORD [esp],ecx
+	mov	edx,DWORD [16+ebp]
+	mov	DWORD [4+esp],edx
+	mov	eax,DWORD [20+ebp]
+	mov	DWORD [8+esp],eax
+	mov	eax,DWORD [24+ebp]
+	mov	DWORD [12+esp],eax
+	mov	eax,DWORD [28+ebp]
+	mov	DWORD [16+esp],eax
+	mov	eax,DWORD [32+ebp]
+	mov	DWORD [20+esp],eax
+	mov	eax,DWORD [36+ebp]
+	mov	DWORD [24+esp],eax
+	call	DWORD [8+ebp]
+	mov	esp,ebp
+	pop	ebp
+	ret
+global	_OPENSSL_ia32_rdrand
+align	16
+_OPENSSL_ia32_rdrand:
+L$_OPENSSL_ia32_rdrand_begin:
+	mov	ecx,8
+L$016loop:
+db	15,199,240
+	jc	NEAR L$017break
+	loop	L$016loop
+L$017break:
+	cmp	eax,0
+	cmove	eax,ecx
+	ret
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/md5/md5-586.asm b/third_party/boringssl/win-x86/crypto/md5/md5-586.asm
new file mode 100644
index 0000000..67ee216
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/md5/md5-586.asm
@@ -0,0 +1,691 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+global	_md5_block_asm_data_order
+align	16
+_md5_block_asm_data_order:
+L$_md5_block_asm_data_order_begin:
+	push	esi
+	push	edi
+	mov	edi,DWORD [12+esp]
+	mov	esi,DWORD [16+esp]
+	mov	ecx,DWORD [20+esp]
+	push	ebp
+	shl	ecx,6
+	push	ebx
+	add	ecx,esi
+	sub	ecx,64
+	mov	eax,DWORD [edi]
+	push	ecx
+	mov	ebx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+L$000start:
+	; 
+	; R0 section
+	mov	edi,ecx
+	mov	ebp,DWORD [esi]
+	; R0 0
+	xor	edi,edx
+	and	edi,ebx
+	lea	eax,[3614090360+ebp*1+eax]
+	xor	edi,edx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,7
+	mov	ebp,DWORD [4+esi]
+	add	eax,ebx
+	; R0 1
+	xor	edi,ecx
+	and	edi,eax
+	lea	edx,[3905402710+ebp*1+edx]
+	xor	edi,ecx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,12
+	mov	ebp,DWORD [8+esi]
+	add	edx,eax
+	; R0 2
+	xor	edi,ebx
+	and	edi,edx
+	lea	ecx,[606105819+ebp*1+ecx]
+	xor	edi,ebx
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,17
+	mov	ebp,DWORD [12+esi]
+	add	ecx,edx
+	; R0 3
+	xor	edi,eax
+	and	edi,ecx
+	lea	ebx,[3250441966+ebp*1+ebx]
+	xor	edi,eax
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,22
+	mov	ebp,DWORD [16+esi]
+	add	ebx,ecx
+	; R0 4
+	xor	edi,edx
+	and	edi,ebx
+	lea	eax,[4118548399+ebp*1+eax]
+	xor	edi,edx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,7
+	mov	ebp,DWORD [20+esi]
+	add	eax,ebx
+	; R0 5
+	xor	edi,ecx
+	and	edi,eax
+	lea	edx,[1200080426+ebp*1+edx]
+	xor	edi,ecx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,12
+	mov	ebp,DWORD [24+esi]
+	add	edx,eax
+	; R0 6
+	xor	edi,ebx
+	and	edi,edx
+	lea	ecx,[2821735955+ebp*1+ecx]
+	xor	edi,ebx
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,17
+	mov	ebp,DWORD [28+esi]
+	add	ecx,edx
+	; R0 7
+	xor	edi,eax
+	and	edi,ecx
+	lea	ebx,[4249261313+ebp*1+ebx]
+	xor	edi,eax
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,22
+	mov	ebp,DWORD [32+esi]
+	add	ebx,ecx
+	; R0 8
+	xor	edi,edx
+	and	edi,ebx
+	lea	eax,[1770035416+ebp*1+eax]
+	xor	edi,edx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,7
+	mov	ebp,DWORD [36+esi]
+	add	eax,ebx
+	; R0 9
+	xor	edi,ecx
+	and	edi,eax
+	lea	edx,[2336552879+ebp*1+edx]
+	xor	edi,ecx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,12
+	mov	ebp,DWORD [40+esi]
+	add	edx,eax
+	; R0 10
+	xor	edi,ebx
+	and	edi,edx
+	lea	ecx,[4294925233+ebp*1+ecx]
+	xor	edi,ebx
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,17
+	mov	ebp,DWORD [44+esi]
+	add	ecx,edx
+	; R0 11
+	xor	edi,eax
+	and	edi,ecx
+	lea	ebx,[2304563134+ebp*1+ebx]
+	xor	edi,eax
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,22
+	mov	ebp,DWORD [48+esi]
+	add	ebx,ecx
+	; R0 12
+	xor	edi,edx
+	and	edi,ebx
+	lea	eax,[1804603682+ebp*1+eax]
+	xor	edi,edx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,7
+	mov	ebp,DWORD [52+esi]
+	add	eax,ebx
+	; R0 13
+	xor	edi,ecx
+	and	edi,eax
+	lea	edx,[4254626195+ebp*1+edx]
+	xor	edi,ecx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,12
+	mov	ebp,DWORD [56+esi]
+	add	edx,eax
+	; R0 14
+	xor	edi,ebx
+	and	edi,edx
+	lea	ecx,[2792965006+ebp*1+ecx]
+	xor	edi,ebx
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,17
+	mov	ebp,DWORD [60+esi]
+	add	ecx,edx
+	; R0 15
+	xor	edi,eax
+	and	edi,ecx
+	lea	ebx,[1236535329+ebp*1+ebx]
+	xor	edi,eax
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,22
+	mov	ebp,DWORD [4+esi]
+	add	ebx,ecx
+	; 
+	; R1 section
+	; R1 16
+	lea	eax,[4129170786+ebp*1+eax]
+	xor	edi,ebx
+	and	edi,edx
+	mov	ebp,DWORD [24+esi]
+	xor	edi,ecx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,5
+	add	eax,ebx
+	; R1 17
+	lea	edx,[3225465664+ebp*1+edx]
+	xor	edi,eax
+	and	edi,ecx
+	mov	ebp,DWORD [44+esi]
+	xor	edi,ebx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,9
+	add	edx,eax
+	; R1 18
+	lea	ecx,[643717713+ebp*1+ecx]
+	xor	edi,edx
+	and	edi,ebx
+	mov	ebp,DWORD [esi]
+	xor	edi,eax
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,14
+	add	ecx,edx
+	; R1 19
+	lea	ebx,[3921069994+ebp*1+ebx]
+	xor	edi,ecx
+	and	edi,eax
+	mov	ebp,DWORD [20+esi]
+	xor	edi,edx
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,20
+	add	ebx,ecx
+	; R1 20
+	lea	eax,[3593408605+ebp*1+eax]
+	xor	edi,ebx
+	and	edi,edx
+	mov	ebp,DWORD [40+esi]
+	xor	edi,ecx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,5
+	add	eax,ebx
+	; R1 21
+	lea	edx,[38016083+ebp*1+edx]
+	xor	edi,eax
+	and	edi,ecx
+	mov	ebp,DWORD [60+esi]
+	xor	edi,ebx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,9
+	add	edx,eax
+	; R1 22
+	lea	ecx,[3634488961+ebp*1+ecx]
+	xor	edi,edx
+	and	edi,ebx
+	mov	ebp,DWORD [16+esi]
+	xor	edi,eax
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,14
+	add	ecx,edx
+	; R1 23
+	lea	ebx,[3889429448+ebp*1+ebx]
+	xor	edi,ecx
+	and	edi,eax
+	mov	ebp,DWORD [36+esi]
+	xor	edi,edx
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,20
+	add	ebx,ecx
+	; R1 24
+	lea	eax,[568446438+ebp*1+eax]
+	xor	edi,ebx
+	and	edi,edx
+	mov	ebp,DWORD [56+esi]
+	xor	edi,ecx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,5
+	add	eax,ebx
+	; R1 25
+	lea	edx,[3275163606+ebp*1+edx]
+	xor	edi,eax
+	and	edi,ecx
+	mov	ebp,DWORD [12+esi]
+	xor	edi,ebx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,9
+	add	edx,eax
+	; R1 26
+	lea	ecx,[4107603335+ebp*1+ecx]
+	xor	edi,edx
+	and	edi,ebx
+	mov	ebp,DWORD [32+esi]
+	xor	edi,eax
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,14
+	add	ecx,edx
+	; R1 27
+	lea	ebx,[1163531501+ebp*1+ebx]
+	xor	edi,ecx
+	and	edi,eax
+	mov	ebp,DWORD [52+esi]
+	xor	edi,edx
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,20
+	add	ebx,ecx
+	; R1 28
+	lea	eax,[2850285829+ebp*1+eax]
+	xor	edi,ebx
+	and	edi,edx
+	mov	ebp,DWORD [8+esi]
+	xor	edi,ecx
+	add	eax,edi
+	mov	edi,ebx
+	rol	eax,5
+	add	eax,ebx
+	; R1 29
+	lea	edx,[4243563512+ebp*1+edx]
+	xor	edi,eax
+	and	edi,ecx
+	mov	ebp,DWORD [28+esi]
+	xor	edi,ebx
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,9
+	add	edx,eax
+	; R1 30
+	lea	ecx,[1735328473+ebp*1+ecx]
+	xor	edi,edx
+	and	edi,ebx
+	mov	ebp,DWORD [48+esi]
+	xor	edi,eax
+	add	ecx,edi
+	mov	edi,edx
+	rol	ecx,14
+	add	ecx,edx
+	; R1 31
+	lea	ebx,[2368359562+ebp*1+ebx]
+	xor	edi,ecx
+	and	edi,eax
+	mov	ebp,DWORD [20+esi]
+	xor	edi,edx
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,20
+	add	ebx,ecx
+	; 
+	; R2 section
+	; R2 32
+	xor	edi,edx
+	xor	edi,ebx
+	lea	eax,[4294588738+ebp*1+eax]
+	add	eax,edi
+	rol	eax,4
+	mov	ebp,DWORD [32+esi]
+	mov	edi,ebx
+	; R2 33
+	lea	edx,[2272392833+ebp*1+edx]
+	add	eax,ebx
+	xor	edi,ecx
+	xor	edi,eax
+	mov	ebp,DWORD [44+esi]
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,11
+	add	edx,eax
+	; R2 34
+	xor	edi,ebx
+	xor	edi,edx
+	lea	ecx,[1839030562+ebp*1+ecx]
+	add	ecx,edi
+	rol	ecx,16
+	mov	ebp,DWORD [56+esi]
+	mov	edi,edx
+	; R2 35
+	lea	ebx,[4259657740+ebp*1+ebx]
+	add	ecx,edx
+	xor	edi,eax
+	xor	edi,ecx
+	mov	ebp,DWORD [4+esi]
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,23
+	add	ebx,ecx
+	; R2 36
+	xor	edi,edx
+	xor	edi,ebx
+	lea	eax,[2763975236+ebp*1+eax]
+	add	eax,edi
+	rol	eax,4
+	mov	ebp,DWORD [16+esi]
+	mov	edi,ebx
+	; R2 37
+	lea	edx,[1272893353+ebp*1+edx]
+	add	eax,ebx
+	xor	edi,ecx
+	xor	edi,eax
+	mov	ebp,DWORD [28+esi]
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,11
+	add	edx,eax
+	; R2 38
+	xor	edi,ebx
+	xor	edi,edx
+	lea	ecx,[4139469664+ebp*1+ecx]
+	add	ecx,edi
+	rol	ecx,16
+	mov	ebp,DWORD [40+esi]
+	mov	edi,edx
+	; R2 39
+	lea	ebx,[3200236656+ebp*1+ebx]
+	add	ecx,edx
+	xor	edi,eax
+	xor	edi,ecx
+	mov	ebp,DWORD [52+esi]
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,23
+	add	ebx,ecx
+	; R2 40
+	xor	edi,edx
+	xor	edi,ebx
+	lea	eax,[681279174+ebp*1+eax]
+	add	eax,edi
+	rol	eax,4
+	mov	ebp,DWORD [esi]
+	mov	edi,ebx
+	; R2 41
+	lea	edx,[3936430074+ebp*1+edx]
+	add	eax,ebx
+	xor	edi,ecx
+	xor	edi,eax
+	mov	ebp,DWORD [12+esi]
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,11
+	add	edx,eax
+	; R2 42
+	xor	edi,ebx
+	xor	edi,edx
+	lea	ecx,[3572445317+ebp*1+ecx]
+	add	ecx,edi
+	rol	ecx,16
+	mov	ebp,DWORD [24+esi]
+	mov	edi,edx
+	; R2 43
+	lea	ebx,[76029189+ebp*1+ebx]
+	add	ecx,edx
+	xor	edi,eax
+	xor	edi,ecx
+	mov	ebp,DWORD [36+esi]
+	add	ebx,edi
+	mov	edi,ecx
+	rol	ebx,23
+	add	ebx,ecx
+	; R2 44
+	xor	edi,edx
+	xor	edi,ebx
+	lea	eax,[3654602809+ebp*1+eax]
+	add	eax,edi
+	rol	eax,4
+	mov	ebp,DWORD [48+esi]
+	mov	edi,ebx
+	; R2 45
+	lea	edx,[3873151461+ebp*1+edx]
+	add	eax,ebx
+	xor	edi,ecx
+	xor	edi,eax
+	mov	ebp,DWORD [60+esi]
+	add	edx,edi
+	mov	edi,eax
+	rol	edx,11
+	add	edx,eax
+	; R2 46
+	xor	edi,ebx
+	xor	edi,edx
+	lea	ecx,[530742520+ebp*1+ecx]
+	add	ecx,edi
+	rol	ecx,16
+	mov	ebp,DWORD [8+esi]
+	mov	edi,edx
+	; R2 47
+	lea	ebx,[3299628645+ebp*1+ebx]
+	add	ecx,edx
+	xor	edi,eax
+	xor	edi,ecx
+	mov	ebp,DWORD [esi]
+	add	ebx,edi
+	mov	edi,-1
+	rol	ebx,23
+	add	ebx,ecx
+	; 
+	; R3 section
+	; R3 48
+	xor	edi,edx
+	or	edi,ebx
+	lea	eax,[4096336452+ebp*1+eax]
+	xor	edi,ecx
+	mov	ebp,DWORD [28+esi]
+	add	eax,edi
+	mov	edi,-1
+	rol	eax,6
+	xor	edi,ecx
+	add	eax,ebx
+	; R3 49
+	or	edi,eax
+	lea	edx,[1126891415+ebp*1+edx]
+	xor	edi,ebx
+	mov	ebp,DWORD [56+esi]
+	add	edx,edi
+	mov	edi,-1
+	rol	edx,10
+	xor	edi,ebx
+	add	edx,eax
+	; R3 50
+	or	edi,edx
+	lea	ecx,[2878612391+ebp*1+ecx]
+	xor	edi,eax
+	mov	ebp,DWORD [20+esi]
+	add	ecx,edi
+	mov	edi,-1
+	rol	ecx,15
+	xor	edi,eax
+	add	ecx,edx
+	; R3 51
+	or	edi,ecx
+	lea	ebx,[4237533241+ebp*1+ebx]
+	xor	edi,edx
+	mov	ebp,DWORD [48+esi]
+	add	ebx,edi
+	mov	edi,-1
+	rol	ebx,21
+	xor	edi,edx
+	add	ebx,ecx
+	; R3 52
+	or	edi,ebx
+	lea	eax,[1700485571+ebp*1+eax]
+	xor	edi,ecx
+	mov	ebp,DWORD [12+esi]
+	add	eax,edi
+	mov	edi,-1
+	rol	eax,6
+	xor	edi,ecx
+	add	eax,ebx
+	; R3 53
+	or	edi,eax
+	lea	edx,[2399980690+ebp*1+edx]
+	xor	edi,ebx
+	mov	ebp,DWORD [40+esi]
+	add	edx,edi
+	mov	edi,-1
+	rol	edx,10
+	xor	edi,ebx
+	add	edx,eax
+	; R3 54
+	or	edi,edx
+	lea	ecx,[4293915773+ebp*1+ecx]
+	xor	edi,eax
+	mov	ebp,DWORD [4+esi]
+	add	ecx,edi
+	mov	edi,-1
+	rol	ecx,15
+	xor	edi,eax
+	add	ecx,edx
+	; R3 55
+	or	edi,ecx
+	lea	ebx,[2240044497+ebp*1+ebx]
+	xor	edi,edx
+	mov	ebp,DWORD [32+esi]
+	add	ebx,edi
+	mov	edi,-1
+	rol	ebx,21
+	xor	edi,edx
+	add	ebx,ecx
+	; R3 56
+	or	edi,ebx
+	lea	eax,[1873313359+ebp*1+eax]
+	xor	edi,ecx
+	mov	ebp,DWORD [60+esi]
+	add	eax,edi
+	mov	edi,-1
+	rol	eax,6
+	xor	edi,ecx
+	add	eax,ebx
+	; R3 57
+	or	edi,eax
+	lea	edx,[4264355552+ebp*1+edx]
+	xor	edi,ebx
+	mov	ebp,DWORD [24+esi]
+	add	edx,edi
+	mov	edi,-1
+	rol	edx,10
+	xor	edi,ebx
+	add	edx,eax
+	; R3 58
+	or	edi,edx
+	lea	ecx,[2734768916+ebp*1+ecx]
+	xor	edi,eax
+	mov	ebp,DWORD [52+esi]
+	add	ecx,edi
+	mov	edi,-1
+	rol	ecx,15
+	xor	edi,eax
+	add	ecx,edx
+	; R3 59
+	or	edi,ecx
+	lea	ebx,[1309151649+ebp*1+ebx]
+	xor	edi,edx
+	mov	ebp,DWORD [16+esi]
+	add	ebx,edi
+	mov	edi,-1
+	rol	ebx,21
+	xor	edi,edx
+	add	ebx,ecx
+	; R3 60
+	or	edi,ebx
+	lea	eax,[4149444226+ebp*1+eax]
+	xor	edi,ecx
+	mov	ebp,DWORD [44+esi]
+	add	eax,edi
+	mov	edi,-1
+	rol	eax,6
+	xor	edi,ecx
+	add	eax,ebx
+	; R3 61
+	or	edi,eax
+	lea	edx,[3174756917+ebp*1+edx]
+	xor	edi,ebx
+	mov	ebp,DWORD [8+esi]
+	add	edx,edi
+	mov	edi,-1
+	rol	edx,10
+	xor	edi,ebx
+	add	edx,eax
+	; R3 62
+	or	edi,edx
+	lea	ecx,[718787259+ebp*1+ecx]
+	xor	edi,eax
+	mov	ebp,DWORD [36+esi]
+	add	ecx,edi
+	mov	edi,-1
+	rol	ecx,15
+	xor	edi,eax
+	add	ecx,edx
+	; R3 63
+	or	edi,ecx
+	lea	ebx,[3951481745+ebp*1+ebx]
+	xor	edi,edx
+	mov	ebp,DWORD [24+esp]
+	add	ebx,edi
+	add	esi,64
+	rol	ebx,21
+	mov	edi,DWORD [ebp]
+	add	ebx,ecx
+	add	eax,edi
+	mov	edi,DWORD [4+ebp]
+	add	ebx,edi
+	mov	edi,DWORD [8+ebp]
+	add	ecx,edi
+	mov	edi,DWORD [12+ebp]
+	add	edx,edi
+	mov	DWORD [ebp],eax
+	mov	DWORD [4+ebp],ebx
+	mov	edi,DWORD [esp]
+	mov	DWORD [8+ebp],ecx
+	mov	DWORD [12+ebp],edx
+	cmp	edi,esi
+	jae	NEAR L$000start
+	pop	eax
+	pop	ebx
+	pop	ebp
+	pop	edi
+	pop	esi
+	ret
diff --git a/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm b/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm
new file mode 100644
index 0000000..eb493ac
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/modes/ghash-x86.asm
@@ -0,0 +1,1265 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+global	_gcm_gmult_4bit_x86
+align	16
+_gcm_gmult_4bit_x86:
+L$_gcm_gmult_4bit_x86_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	sub	esp,84
+	mov	edi,DWORD [104+esp]
+	mov	esi,DWORD [108+esp]
+	mov	ebp,DWORD [edi]
+	mov	edx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	mov	ebx,DWORD [12+edi]
+	mov	DWORD [16+esp],0
+	mov	DWORD [20+esp],471859200
+	mov	DWORD [24+esp],943718400
+	mov	DWORD [28+esp],610271232
+	mov	DWORD [32+esp],1887436800
+	mov	DWORD [36+esp],1822425088
+	mov	DWORD [40+esp],1220542464
+	mov	DWORD [44+esp],1423966208
+	mov	DWORD [48+esp],3774873600
+	mov	DWORD [52+esp],4246732800
+	mov	DWORD [56+esp],3644850176
+	mov	DWORD [60+esp],3311403008
+	mov	DWORD [64+esp],2441084928
+	mov	DWORD [68+esp],2376073216
+	mov	DWORD [72+esp],2847932416
+	mov	DWORD [76+esp],3051356160
+	mov	DWORD [esp],ebp
+	mov	DWORD [4+esp],edx
+	mov	DWORD [8+esp],ecx
+	mov	DWORD [12+esp],ebx
+	shr	ebx,20
+	and	ebx,240
+	mov	ebp,DWORD [4+ebx*1+esi]
+	mov	edx,DWORD [ebx*1+esi]
+	mov	ecx,DWORD [12+ebx*1+esi]
+	mov	ebx,DWORD [8+ebx*1+esi]
+	xor	eax,eax
+	mov	edi,15
+	jmp	NEAR L$000x86_loop
+align	16
+L$000x86_loop:
+	mov	al,bl
+	shrd	ebx,ecx,4
+	and	al,15
+	shrd	ecx,edx,4
+	shrd	edx,ebp,4
+	shr	ebp,4
+	xor	ebp,DWORD [16+eax*4+esp]
+	mov	al,BYTE [edi*1+esp]
+	and	al,240
+	xor	ebx,DWORD [8+eax*1+esi]
+	xor	ecx,DWORD [12+eax*1+esi]
+	xor	edx,DWORD [eax*1+esi]
+	xor	ebp,DWORD [4+eax*1+esi]
+	dec	edi
+	js	NEAR L$001x86_break
+	mov	al,bl
+	shrd	ebx,ecx,4
+	and	al,15
+	shrd	ecx,edx,4
+	shrd	edx,ebp,4
+	shr	ebp,4
+	xor	ebp,DWORD [16+eax*4+esp]
+	mov	al,BYTE [edi*1+esp]
+	shl	al,4
+	xor	ebx,DWORD [8+eax*1+esi]
+	xor	ecx,DWORD [12+eax*1+esi]
+	xor	edx,DWORD [eax*1+esi]
+	xor	ebp,DWORD [4+eax*1+esi]
+	jmp	NEAR L$000x86_loop
+align	16
+L$001x86_break:
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	bswap	ebp
+	mov	edi,DWORD [104+esp]
+	mov	DWORD [12+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [4+edi],edx
+	mov	DWORD [edi],ebp
+	add	esp,84
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_gcm_ghash_4bit_x86
+align	16
+_gcm_ghash_4bit_x86:
+L$_gcm_ghash_4bit_x86_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	sub	esp,84
+	mov	ebx,DWORD [104+esp]
+	mov	esi,DWORD [108+esp]
+	mov	edi,DWORD [112+esp]
+	mov	ecx,DWORD [116+esp]
+	add	ecx,edi
+	mov	DWORD [116+esp],ecx
+	mov	ebp,DWORD [ebx]
+	mov	edx,DWORD [4+ebx]
+	mov	ecx,DWORD [8+ebx]
+	mov	ebx,DWORD [12+ebx]
+	mov	DWORD [16+esp],0
+	mov	DWORD [20+esp],471859200
+	mov	DWORD [24+esp],943718400
+	mov	DWORD [28+esp],610271232
+	mov	DWORD [32+esp],1887436800
+	mov	DWORD [36+esp],1822425088
+	mov	DWORD [40+esp],1220542464
+	mov	DWORD [44+esp],1423966208
+	mov	DWORD [48+esp],3774873600
+	mov	DWORD [52+esp],4246732800
+	mov	DWORD [56+esp],3644850176
+	mov	DWORD [60+esp],3311403008
+	mov	DWORD [64+esp],2441084928
+	mov	DWORD [68+esp],2376073216
+	mov	DWORD [72+esp],2847932416
+	mov	DWORD [76+esp],3051356160
+align	16
+L$002x86_outer_loop:
+	xor	ebx,DWORD [12+edi]
+	xor	ecx,DWORD [8+edi]
+	xor	edx,DWORD [4+edi]
+	xor	ebp,DWORD [edi]
+	mov	DWORD [12+esp],ebx
+	mov	DWORD [8+esp],ecx
+	mov	DWORD [4+esp],edx
+	mov	DWORD [esp],ebp
+	shr	ebx,20
+	and	ebx,240
+	mov	ebp,DWORD [4+ebx*1+esi]
+	mov	edx,DWORD [ebx*1+esi]
+	mov	ecx,DWORD [12+ebx*1+esi]
+	mov	ebx,DWORD [8+ebx*1+esi]
+	xor	eax,eax
+	mov	edi,15
+	jmp	NEAR L$003x86_loop
+align	16
+L$003x86_loop:
+	mov	al,bl
+	shrd	ebx,ecx,4
+	and	al,15
+	shrd	ecx,edx,4
+	shrd	edx,ebp,4
+	shr	ebp,4
+	xor	ebp,DWORD [16+eax*4+esp]
+	mov	al,BYTE [edi*1+esp]
+	and	al,240
+	xor	ebx,DWORD [8+eax*1+esi]
+	xor	ecx,DWORD [12+eax*1+esi]
+	xor	edx,DWORD [eax*1+esi]
+	xor	ebp,DWORD [4+eax*1+esi]
+	dec	edi
+	js	NEAR L$004x86_break
+	mov	al,bl
+	shrd	ebx,ecx,4
+	and	al,15
+	shrd	ecx,edx,4
+	shrd	edx,ebp,4
+	shr	ebp,4
+	xor	ebp,DWORD [16+eax*4+esp]
+	mov	al,BYTE [edi*1+esp]
+	shl	al,4
+	xor	ebx,DWORD [8+eax*1+esi]
+	xor	ecx,DWORD [12+eax*1+esi]
+	xor	edx,DWORD [eax*1+esi]
+	xor	ebp,DWORD [4+eax*1+esi]
+	jmp	NEAR L$003x86_loop
+align	16
+L$004x86_break:
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	bswap	ebp
+	mov	edi,DWORD [112+esp]
+	lea	edi,[16+edi]
+	cmp	edi,DWORD [116+esp]
+	mov	DWORD [112+esp],edi
+	jb	NEAR L$002x86_outer_loop
+	mov	edi,DWORD [104+esp]
+	mov	DWORD [12+edi],ebx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [4+edi],edx
+	mov	DWORD [edi],ebp
+	add	esp,84
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_gcm_gmult_4bit_mmx
+align	16
+_gcm_gmult_4bit_mmx:
+L$_gcm_gmult_4bit_mmx_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	edi,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	call	L$005pic_point
+L$005pic_point:
+	pop	eax
+	lea	eax,[(L$rem_4bit-L$005pic_point)+eax]
+	movzx	ebx,BYTE [15+edi]
+	xor	ecx,ecx
+	mov	edx,ebx
+	mov	cl,dl
+	mov	ebp,14
+	shl	cl,4
+	and	edx,240
+	movq	mm0,[8+ecx*1+esi]
+	movq	mm1,[ecx*1+esi]
+	movd	ebx,mm0
+	jmp	NEAR L$006mmx_loop
+align	16
+L$006mmx_loop:
+	psrlq	mm0,4
+	and	ebx,15
+	movq	mm2,mm1
+	psrlq	mm1,4
+	pxor	mm0,[8+edx*1+esi]
+	mov	cl,BYTE [ebp*1+edi]
+	psllq	mm2,60
+	pxor	mm1,[ebx*8+eax]
+	dec	ebp
+	movd	ebx,mm0
+	pxor	mm1,[edx*1+esi]
+	mov	edx,ecx
+	pxor	mm0,mm2
+	js	NEAR L$007mmx_break
+	shl	cl,4
+	and	ebx,15
+	psrlq	mm0,4
+	and	edx,240
+	movq	mm2,mm1
+	psrlq	mm1,4
+	pxor	mm0,[8+ecx*1+esi]
+	psllq	mm2,60
+	pxor	mm1,[ebx*8+eax]
+	movd	ebx,mm0
+	pxor	mm1,[ecx*1+esi]
+	pxor	mm0,mm2
+	jmp	NEAR L$006mmx_loop
+align	16
+L$007mmx_break:
+	shl	cl,4
+	and	ebx,15
+	psrlq	mm0,4
+	and	edx,240
+	movq	mm2,mm1
+	psrlq	mm1,4
+	pxor	mm0,[8+ecx*1+esi]
+	psllq	mm2,60
+	pxor	mm1,[ebx*8+eax]
+	movd	ebx,mm0
+	pxor	mm1,[ecx*1+esi]
+	pxor	mm0,mm2
+	psrlq	mm0,4
+	and	ebx,15
+	movq	mm2,mm1
+	psrlq	mm1,4
+	pxor	mm0,[8+edx*1+esi]
+	psllq	mm2,60
+	pxor	mm1,[ebx*8+eax]
+	movd	ebx,mm0
+	pxor	mm1,[edx*1+esi]
+	pxor	mm0,mm2
+	psrlq	mm0,32
+	movd	edx,mm1
+	psrlq	mm1,32
+	movd	ecx,mm0
+	movd	ebp,mm1
+	bswap	ebx
+	bswap	edx
+	bswap	ecx
+	bswap	ebp
+	emms
+	mov	DWORD [12+edi],ebx
+	mov	DWORD [4+edi],edx
+	mov	DWORD [8+edi],ecx
+	mov	DWORD [edi],ebp
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_gcm_ghash_4bit_mmx
+align	16
+_gcm_ghash_4bit_mmx:
+L$_gcm_ghash_4bit_mmx_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	eax,DWORD [20+esp]
+	mov	ebx,DWORD [24+esp]
+	mov	ecx,DWORD [28+esp]
+	mov	edx,DWORD [32+esp]
+	mov	ebp,esp
+	call	L$008pic_point
+L$008pic_point:
+	pop	esi
+	lea	esi,[(L$rem_8bit-L$008pic_point)+esi]
+	sub	esp,544
+	and	esp,-64
+	sub	esp,16
+	add	edx,ecx
+	mov	DWORD [544+esp],eax
+	mov	DWORD [552+esp],edx
+	mov	DWORD [556+esp],ebp
+	add	ebx,128
+	lea	edi,[144+esp]
+	lea	ebp,[400+esp]
+	mov	edx,DWORD [ebx-120]
+	movq	mm0,[ebx-120]
+	movq	mm3,[ebx-128]
+	shl	edx,4
+	mov	BYTE [esp],dl
+	mov	edx,DWORD [ebx-104]
+	movq	mm2,[ebx-104]
+	movq	mm5,[ebx-112]
+	movq	[edi-128],mm0
+	psrlq	mm0,4
+	movq	[edi],mm3
+	movq	mm7,mm3
+	psrlq	mm3,4
+	shl	edx,4
+	mov	BYTE [1+esp],dl
+	mov	edx,DWORD [ebx-88]
+	movq	mm1,[ebx-88]
+	psllq	mm7,60
+	movq	mm4,[ebx-96]
+	por	mm0,mm7
+	movq	[edi-120],mm2
+	psrlq	mm2,4
+	movq	[8+edi],mm5
+	movq	mm6,mm5
+	movq	[ebp-128],mm0
+	psrlq	mm5,4
+	movq	[ebp],mm3
+	shl	edx,4
+	mov	BYTE [2+esp],dl
+	mov	edx,DWORD [ebx-72]
+	movq	mm0,[ebx-72]
+	psllq	mm6,60
+	movq	mm3,[ebx-80]
+	por	mm2,mm6
+	movq	[edi-112],mm1
+	psrlq	mm1,4
+	movq	[16+edi],mm4
+	movq	mm7,mm4
+	movq	[ebp-120],mm2
+	psrlq	mm4,4
+	movq	[8+ebp],mm5
+	shl	edx,4
+	mov	BYTE [3+esp],dl
+	mov	edx,DWORD [ebx-56]
+	movq	mm2,[ebx-56]
+	psllq	mm7,60
+	movq	mm5,[ebx-64]
+	por	mm1,mm7
+	movq	[edi-104],mm0
+	psrlq	mm0,4
+	movq	[24+edi],mm3
+	movq	mm6,mm3
+	movq	[ebp-112],mm1
+	psrlq	mm3,4
+	movq	[16+ebp],mm4
+	shl	edx,4
+	mov	BYTE [4+esp],dl
+	mov	edx,DWORD [ebx-40]
+	movq	mm1,[ebx-40]
+	psllq	mm6,60
+	movq	mm4,[ebx-48]
+	por	mm0,mm6
+	movq	[edi-96],mm2
+	psrlq	mm2,4
+	movq	[32+edi],mm5
+	movq	mm7,mm5
+	movq	[ebp-104],mm0
+	psrlq	mm5,4
+	movq	[24+ebp],mm3
+	shl	edx,4
+	mov	BYTE [5+esp],dl
+	mov	edx,DWORD [ebx-24]
+	movq	mm0,[ebx-24]
+	psllq	mm7,60
+	movq	mm3,[ebx-32]
+	por	mm2,mm7
+	movq	[edi-88],mm1
+	psrlq	mm1,4
+	movq	[40+edi],mm4
+	movq	mm6,mm4
+	movq	[ebp-96],mm2
+	psrlq	mm4,4
+	movq	[32+ebp],mm5
+	shl	edx,4
+	mov	BYTE [6+esp],dl
+	mov	edx,DWORD [ebx-8]
+	movq	mm2,[ebx-8]
+	psllq	mm6,60
+	movq	mm5,[ebx-16]
+	por	mm1,mm6
+	movq	[edi-80],mm0
+	psrlq	mm0,4
+	movq	[48+edi],mm3
+	movq	mm7,mm3
+	movq	[ebp-88],mm1
+	psrlq	mm3,4
+	movq	[40+ebp],mm4
+	shl	edx,4
+	mov	BYTE [7+esp],dl
+	mov	edx,DWORD [8+ebx]
+	movq	mm1,[8+ebx]
+	psllq	mm7,60
+	movq	mm4,[ebx]
+	por	mm0,mm7
+	movq	[edi-72],mm2
+	psrlq	mm2,4
+	movq	[56+edi],mm5
+	movq	mm6,mm5
+	movq	[ebp-80],mm0
+	psrlq	mm5,4
+	movq	[48+ebp],mm3
+	shl	edx,4
+	mov	BYTE [8+esp],dl
+	mov	edx,DWORD [24+ebx]
+	movq	mm0,[24+ebx]
+	psllq	mm6,60
+	movq	mm3,[16+ebx]
+	por	mm2,mm6
+	movq	[edi-64],mm1
+	psrlq	mm1,4
+	movq	[64+edi],mm4
+	movq	mm7,mm4
+	movq	[ebp-72],mm2
+	psrlq	mm4,4
+	movq	[56+ebp],mm5
+	shl	edx,4
+	mov	BYTE [9+esp],dl
+	mov	edx,DWORD [40+ebx]
+	movq	mm2,[40+ebx]
+	psllq	mm7,60
+	movq	mm5,[32+ebx]
+	por	mm1,mm7
+	movq	[edi-56],mm0
+	psrlq	mm0,4
+	movq	[72+edi],mm3
+	movq	mm6,mm3
+	movq	[ebp-64],mm1
+	psrlq	mm3,4
+	movq	[64+ebp],mm4
+	shl	edx,4
+	mov	BYTE [10+esp],dl
+	mov	edx,DWORD [56+ebx]
+	movq	mm1,[56+ebx]
+	psllq	mm6,60
+	movq	mm4,[48+ebx]
+	por	mm0,mm6
+	movq	[edi-48],mm2
+	psrlq	mm2,4
+	movq	[80+edi],mm5
+	movq	mm7,mm5
+	movq	[ebp-56],mm0
+	psrlq	mm5,4
+	movq	[72+ebp],mm3
+	shl	edx,4
+	mov	BYTE [11+esp],dl
+	mov	edx,DWORD [72+ebx]
+	movq	mm0,[72+ebx]
+	psllq	mm7,60
+	movq	mm3,[64+ebx]
+	por	mm2,mm7
+	movq	[edi-40],mm1
+	psrlq	mm1,4
+	movq	[88+edi],mm4
+	movq	mm6,mm4
+	movq	[ebp-48],mm2
+	psrlq	mm4,4
+	movq	[80+ebp],mm5
+	shl	edx,4
+	mov	BYTE [12+esp],dl
+	mov	edx,DWORD [88+ebx]
+	movq	mm2,[88+ebx]
+	psllq	mm6,60
+	movq	mm5,[80+ebx]
+	por	mm1,mm6
+	movq	[edi-32],mm0
+	psrlq	mm0,4
+	movq	[96+edi],mm3
+	movq	mm7,mm3
+	movq	[ebp-40],mm1
+	psrlq	mm3,4
+	movq	[88+ebp],mm4
+	shl	edx,4
+	mov	BYTE [13+esp],dl
+	mov	edx,DWORD [104+ebx]
+	movq	mm1,[104+ebx]
+	psllq	mm7,60
+	movq	mm4,[96+ebx]
+	por	mm0,mm7
+	movq	[edi-24],mm2
+	psrlq	mm2,4
+	movq	[104+edi],mm5
+	movq	mm6,mm5
+	movq	[ebp-32],mm0
+	psrlq	mm5,4
+	movq	[96+ebp],mm3
+	shl	edx,4
+	mov	BYTE [14+esp],dl
+	mov	edx,DWORD [120+ebx]
+	movq	mm0,[120+ebx]
+	psllq	mm6,60
+	movq	mm3,[112+ebx]
+	por	mm2,mm6
+	movq	[edi-16],mm1
+	psrlq	mm1,4
+	movq	[112+edi],mm4
+	movq	mm7,mm4
+	movq	[ebp-24],mm2
+	psrlq	mm4,4
+	movq	[104+ebp],mm5
+	shl	edx,4
+	mov	BYTE [15+esp],dl
+	psllq	mm7,60
+	por	mm1,mm7
+	movq	[edi-8],mm0
+	psrlq	mm0,4
+	movq	[120+edi],mm3
+	movq	mm6,mm3
+	movq	[ebp-16],mm1
+	psrlq	mm3,4
+	movq	[112+ebp],mm4
+	psllq	mm6,60
+	por	mm0,mm6
+	movq	[ebp-8],mm0
+	movq	[120+ebp],mm3
+	movq	mm6,[eax]
+	mov	ebx,DWORD [8+eax]
+	mov	edx,DWORD [12+eax]
+align	16
+L$009outer:
+	xor	edx,DWORD [12+ecx]
+	xor	ebx,DWORD [8+ecx]
+	pxor	mm6,[ecx]
+	lea	ecx,[16+ecx]
+	mov	DWORD [536+esp],ebx
+	movq	[528+esp],mm6
+	mov	DWORD [548+esp],ecx
+	xor	eax,eax
+	rol	edx,8
+	mov	al,dl
+	mov	ebp,eax
+	and	al,15
+	shr	ebp,4
+	pxor	mm0,mm0
+	rol	edx,8
+	pxor	mm1,mm1
+	pxor	mm2,mm2
+	movq	mm7,[16+eax*8+esp]
+	movq	mm6,[144+eax*8+esp]
+	mov	al,dl
+	movd	ebx,mm7
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	shr	edi,4
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	shr	ebp,4
+	pinsrw	mm2,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	mov	edx,DWORD [536+esp]
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm2
+	shr	edi,4
+	pinsrw	mm1,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm1
+	shr	ebp,4
+	pinsrw	mm0,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm0
+	shr	edi,4
+	pinsrw	mm2,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm2
+	shr	ebp,4
+	pinsrw	mm1,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	mov	edx,DWORD [532+esp]
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm1
+	shr	edi,4
+	pinsrw	mm0,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm0
+	shr	ebp,4
+	pinsrw	mm2,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm2
+	shr	edi,4
+	pinsrw	mm1,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm1
+	shr	ebp,4
+	pinsrw	mm0,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	mov	edx,DWORD [528+esp]
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm0
+	shr	edi,4
+	pinsrw	mm2,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm2
+	shr	ebp,4
+	pinsrw	mm1,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm1
+	shr	edi,4
+	pinsrw	mm0,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	mov	al,dl
+	movd	ecx,mm7
+	movzx	ebx,bl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	ebp,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+edi*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm0
+	shr	ebp,4
+	pinsrw	mm2,WORD [ebx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	rol	edx,8
+	pxor	mm6,[144+eax*8+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+edi*8+esp]
+	xor	cl,BYTE [edi*1+esp]
+	mov	al,dl
+	mov	edx,DWORD [524+esp]
+	movd	ebx,mm7
+	movzx	ecx,cl
+	psrlq	mm7,8
+	movq	mm3,mm6
+	mov	edi,eax
+	psrlq	mm6,8
+	pxor	mm7,[272+ebp*8+esp]
+	and	al,15
+	psllq	mm3,56
+	pxor	mm6,mm2
+	shr	edi,4
+	pinsrw	mm1,WORD [ecx*2+esi],2
+	pxor	mm7,[16+eax*8+esp]
+	pxor	mm6,[144+eax*8+esp]
+	xor	bl,BYTE [ebp*1+esp]
+	pxor	mm7,mm3
+	pxor	mm6,[400+ebp*8+esp]
+	movzx	ebx,bl
+	pxor	mm2,mm2
+	psllq	mm1,4
+	movd	ecx,mm7
+	psrlq	mm7,4
+	movq	mm3,mm6
+	psrlq	mm6,4
+	shl	ecx,4
+	pxor	mm7,[16+edi*8+esp]
+	psllq	mm3,60
+	movzx	ecx,cl
+	pxor	mm7,mm3
+	pxor	mm6,[144+edi*8+esp]
+	pinsrw	mm0,WORD [ebx*2+esi],2
+	pxor	mm6,mm1
+	movd	edx,mm7
+	pinsrw	mm2,WORD [ecx*2+esi],3
+	psllq	mm0,12
+	pxor	mm6,mm0
+	psrlq	mm7,32
+	pxor	mm6,mm2
+	mov	ecx,DWORD [548+esp]
+	movd	ebx,mm7
+	movq	mm3,mm6
+	psllw	mm6,8
+	psrlw	mm3,8
+	por	mm6,mm3
+	bswap	edx
+	pshufw	mm6,mm6,27
+	bswap	ebx
+	cmp	ecx,DWORD [552+esp]
+	jne	NEAR L$009outer
+	mov	eax,DWORD [544+esp]
+	mov	DWORD [12+eax],edx
+	mov	DWORD [8+eax],ebx
+	movq	[eax],mm6
+	mov	esp,DWORD [556+esp]
+	emms
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_gcm_init_clmul
+align	16
+_gcm_init_clmul:
+L$_gcm_init_clmul_begin:
+	mov	edx,DWORD [4+esp]
+	mov	eax,DWORD [8+esp]
+	call	L$010pic
+L$010pic:
+	pop	ecx
+	lea	ecx,[(L$bswap-L$010pic)+ecx]
+	movdqu	xmm2,[eax]
+	pshufd	xmm2,xmm2,78
+	pshufd	xmm4,xmm2,255
+	movdqa	xmm3,xmm2
+	psllq	xmm2,1
+	pxor	xmm5,xmm5
+	psrlq	xmm3,63
+	pcmpgtd	xmm5,xmm4
+	pslldq	xmm3,8
+	por	xmm2,xmm3
+	pand	xmm5,[16+ecx]
+	pxor	xmm2,xmm5
+	movdqa	xmm0,xmm2
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pshufd	xmm4,xmm2,78
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm2
+db	102,15,58,68,194,0
+db	102,15,58,68,202,17
+db	102,15,58,68,220,0
+	xorps	xmm3,xmm0
+	xorps	xmm3,xmm1
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	pshufd	xmm3,xmm2,78
+	pshufd	xmm4,xmm0,78
+	pxor	xmm3,xmm2
+	movdqu	[edx],xmm2
+	pxor	xmm4,xmm0
+	movdqu	[16+edx],xmm0
+db	102,15,58,15,227,8
+	movdqu	[32+edx],xmm4
+	ret
+global	_gcm_gmult_clmul
+align	16
+_gcm_gmult_clmul:
+L$_gcm_gmult_clmul_begin:
+	mov	eax,DWORD [4+esp]
+	mov	edx,DWORD [8+esp]
+	call	L$011pic
+L$011pic:
+	pop	ecx
+	lea	ecx,[(L$bswap-L$011pic)+ecx]
+	movdqu	xmm0,[eax]
+	movdqa	xmm5,[ecx]
+	movups	xmm2,[edx]
+db	102,15,56,0,197
+	movups	xmm4,[32+edx]
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+db	102,15,58,68,194,0
+db	102,15,58,68,202,17
+db	102,15,58,68,220,0
+	xorps	xmm3,xmm0
+	xorps	xmm3,xmm1
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+db	102,15,56,0,197
+	movdqu	[eax],xmm0
+	ret
+global	_gcm_ghash_clmul
+align	16
+_gcm_ghash_clmul:
+L$_gcm_ghash_clmul_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	eax,DWORD [20+esp]
+	mov	edx,DWORD [24+esp]
+	mov	esi,DWORD [28+esp]
+	mov	ebx,DWORD [32+esp]
+	call	L$012pic
+L$012pic:
+	pop	ecx
+	lea	ecx,[(L$bswap-L$012pic)+ecx]
+	movdqu	xmm0,[eax]
+	movdqa	xmm5,[ecx]
+	movdqu	xmm2,[edx]
+db	102,15,56,0,197
+	sub	ebx,16
+	jz	NEAR L$013odd_tail
+	movdqu	xmm3,[esi]
+	movdqu	xmm6,[16+esi]
+db	102,15,56,0,221
+db	102,15,56,0,245
+	movdqu	xmm5,[32+edx]
+	pxor	xmm0,xmm3
+	pshufd	xmm3,xmm6,78
+	movdqa	xmm7,xmm6
+	pxor	xmm3,xmm6
+	lea	esi,[32+esi]
+db	102,15,58,68,242,0
+db	102,15,58,68,250,17
+db	102,15,58,68,221,0
+	movups	xmm2,[16+edx]
+	nop
+	sub	ebx,32
+	jbe	NEAR L$014even_tail
+	jmp	NEAR L$015mod_loop
+align	32
+L$015mod_loop:
+	pshufd	xmm4,xmm0,78
+	movdqa	xmm1,xmm0
+	pxor	xmm4,xmm0
+	nop
+db	102,15,58,68,194,0
+db	102,15,58,68,202,17
+db	102,15,58,68,229,16
+	movups	xmm2,[edx]
+	xorps	xmm0,xmm6
+	movdqa	xmm5,[ecx]
+	xorps	xmm1,xmm7
+	movdqu	xmm7,[esi]
+	pxor	xmm3,xmm0
+	movdqu	xmm6,[16+esi]
+	pxor	xmm3,xmm1
+db	102,15,56,0,253
+	pxor	xmm4,xmm3
+	movdqa	xmm3,xmm4
+	psrldq	xmm4,8
+	pslldq	xmm3,8
+	pxor	xmm1,xmm4
+	pxor	xmm0,xmm3
+db	102,15,56,0,245
+	pxor	xmm1,xmm7
+	movdqa	xmm7,xmm6
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+db	102,15,58,68,242,0
+	movups	xmm5,[32+edx]
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+	pshufd	xmm3,xmm7,78
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm3,xmm7
+	pxor	xmm1,xmm4
+db	102,15,58,68,250,17
+	movups	xmm2,[16+edx]
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+db	102,15,58,68,221,0
+	lea	esi,[32+esi]
+	sub	ebx,32
+	ja	NEAR L$015mod_loop
+L$014even_tail:
+	pshufd	xmm4,xmm0,78
+	movdqa	xmm1,xmm0
+	pxor	xmm4,xmm0
+db	102,15,58,68,194,0
+db	102,15,58,68,202,17
+db	102,15,58,68,229,16
+	movdqa	xmm5,[ecx]
+	xorps	xmm0,xmm6
+	xorps	xmm1,xmm7
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+	pxor	xmm4,xmm3
+	movdqa	xmm3,xmm4
+	psrldq	xmm4,8
+	pslldq	xmm3,8
+	pxor	xmm1,xmm4
+	pxor	xmm0,xmm3
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	test	ebx,ebx
+	jnz	NEAR L$016done
+	movups	xmm2,[edx]
+L$013odd_tail:
+	movdqu	xmm3,[esi]
+db	102,15,56,0,221
+	pxor	xmm0,xmm3
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pshufd	xmm4,xmm2,78
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm2
+db	102,15,58,68,194,0
+db	102,15,58,68,202,17
+db	102,15,58,68,220,0
+	xorps	xmm3,xmm0
+	xorps	xmm3,xmm1
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+L$016done:
+db	102,15,56,0,197
+	movdqu	[eax],xmm0
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	64
+L$bswap:
+db	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+db	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,194
+align	64
+L$rem_8bit:
+dw	0,450,900,582,1800,1738,1164,1358
+dw	3600,4050,3476,3158,2328,2266,2716,2910
+dw	7200,7650,8100,7782,6952,6890,6316,6510
+dw	4656,5106,4532,4214,5432,5370,5820,6014
+dw	14400,14722,15300,14854,16200,16010,15564,15630
+dw	13904,14226,13780,13334,12632,12442,13020,13086
+dw	9312,9634,10212,9766,9064,8874,8428,8494
+dw	10864,11186,10740,10294,11640,11450,12028,12094
+dw	28800,28994,29444,29382,30600,30282,29708,30158
+dw	32400,32594,32020,31958,31128,30810,31260,31710
+dw	27808,28002,28452,28390,27560,27242,26668,27118
+dw	25264,25458,24884,24822,26040,25722,26172,26622
+dw	18624,18690,19268,19078,20424,19978,19532,19854
+dw	18128,18194,17748,17558,16856,16410,16988,17310
+dw	21728,21794,22372,22182,21480,21034,20588,20910
+dw	23280,23346,22900,22710,24056,23610,24188,24510
+dw	57600,57538,57988,58182,58888,59338,58764,58446
+dw	61200,61138,60564,60758,59416,59866,60316,59998
+dw	64800,64738,65188,65382,64040,64490,63916,63598
+dw	62256,62194,61620,61814,62520,62970,63420,63102
+dw	55616,55426,56004,56070,56904,57226,56780,56334
+dw	55120,54930,54484,54550,53336,53658,54236,53790
+dw	50528,50338,50916,50982,49768,50090,49644,49198
+dw	52080,51890,51444,51510,52344,52666,53244,52798
+dw	37248,36930,37380,37830,38536,38730,38156,38094
+dw	40848,40530,39956,40406,39064,39258,39708,39646
+dw	36256,35938,36388,36838,35496,35690,35116,35054
+dw	33712,33394,32820,33270,33976,34170,34620,34558
+dw	43456,43010,43588,43910,44744,44810,44364,44174
+dw	42960,42514,42068,42390,41176,41242,41820,41630
+dw	46560,46114,46692,47014,45800,45866,45420,45230
+dw	48112,47666,47220,47542,48376,48442,49020,48830
+align	64
+L$rem_4bit:
+dd	0,0,0,471859200,0,943718400,0,610271232
+dd	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+dd	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+dd	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+db	71,72,65,83,72,32,102,111,114,32,120,56,54,44,32,67
+db	82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112
+db	112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62
+db	0
diff --git a/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm b/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm
new file mode 100644
index 0000000..08cd9f6
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/rc4/rc4-586.asm
@@ -0,0 +1,382 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_asm_RC4
+align	16
+_asm_RC4:
+L$_asm_RC4_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	edi,DWORD [20+esp]
+	mov	edx,DWORD [24+esp]
+	mov	esi,DWORD [28+esp]
+	mov	ebp,DWORD [32+esp]
+	xor	eax,eax
+	xor	ebx,ebx
+	cmp	edx,0
+	je	NEAR L$000abort
+	mov	al,BYTE [edi]
+	mov	bl,BYTE [4+edi]
+	add	edi,8
+	lea	ecx,[edx*1+esi]
+	sub	ebp,esi
+	mov	DWORD [24+esp],ecx
+	inc	al
+	cmp	DWORD [256+edi],-1
+	je	NEAR L$001RC4_CHAR
+	mov	ecx,DWORD [eax*4+edi]
+	and	edx,-4
+	jz	NEAR L$002loop1
+	mov	DWORD [32+esp],ebp
+	test	edx,-8
+	jz	NEAR L$003go4loop4
+	lea	ebp,[_OPENSSL_ia32cap_P]
+	bt	DWORD [ebp],26
+	jnc	NEAR L$003go4loop4
+	mov	ebp,DWORD [32+esp]
+	and	edx,-8
+	lea	edx,[edx*1+esi-8]
+	mov	DWORD [edi-4],edx
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	movq	mm0,[esi]
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm2,DWORD [edx*4+edi]
+	jmp	NEAR L$004loop_mmx_enter
+align	16
+L$005loop_mmx:
+	add	bl,cl
+	psllq	mm1,56
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	movq	mm0,[esi]
+	movq	[esi*1+ebp-8],mm2
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm2,DWORD [edx*4+edi]
+L$004loop_mmx_enter:
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm0
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,8
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,16
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,24
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,32
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,40
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	add	bl,cl
+	psllq	mm1,48
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	inc	eax
+	add	edx,ecx
+	movzx	eax,al
+	movzx	edx,dl
+	pxor	mm2,mm1
+	mov	ecx,DWORD [eax*4+edi]
+	movd	mm1,DWORD [edx*4+edi]
+	mov	edx,ebx
+	xor	ebx,ebx
+	mov	bl,dl
+	cmp	esi,DWORD [edi-4]
+	lea	esi,[8+esi]
+	jb	NEAR L$005loop_mmx
+	psllq	mm1,56
+	pxor	mm2,mm1
+	movq	[esi*1+ebp-8],mm2
+	emms
+	cmp	esi,DWORD [24+esp]
+	je	NEAR L$006done
+	jmp	NEAR L$002loop1
+align	16
+L$003go4loop4:
+	lea	edx,[edx*1+esi-4]
+	mov	DWORD [28+esp],edx
+L$007loop4:
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	add	edx,ecx
+	inc	al
+	and	edx,255
+	mov	ecx,DWORD [eax*4+edi]
+	mov	ebp,DWORD [edx*4+edi]
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	add	edx,ecx
+	inc	al
+	and	edx,255
+	ror	ebp,8
+	mov	ecx,DWORD [eax*4+edi]
+	or	ebp,DWORD [edx*4+edi]
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	add	edx,ecx
+	inc	al
+	and	edx,255
+	ror	ebp,8
+	mov	ecx,DWORD [eax*4+edi]
+	or	ebp,DWORD [edx*4+edi]
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	add	edx,ecx
+	inc	al
+	and	edx,255
+	ror	ebp,8
+	mov	ecx,DWORD [32+esp]
+	or	ebp,DWORD [edx*4+edi]
+	ror	ebp,8
+	xor	ebp,DWORD [esi]
+	cmp	esi,DWORD [28+esp]
+	mov	DWORD [esi*1+ecx],ebp
+	lea	esi,[4+esi]
+	mov	ecx,DWORD [eax*4+edi]
+	jb	NEAR L$007loop4
+	cmp	esi,DWORD [24+esp]
+	je	NEAR L$006done
+	mov	ebp,DWORD [32+esp]
+align	16
+L$002loop1:
+	add	bl,cl
+	mov	edx,DWORD [ebx*4+edi]
+	mov	DWORD [ebx*4+edi],ecx
+	mov	DWORD [eax*4+edi],edx
+	add	edx,ecx
+	inc	al
+	and	edx,255
+	mov	edx,DWORD [edx*4+edi]
+	xor	dl,BYTE [esi]
+	lea	esi,[1+esi]
+	mov	ecx,DWORD [eax*4+edi]
+	cmp	esi,DWORD [24+esp]
+	mov	BYTE [esi*1+ebp-1],dl
+	jb	NEAR L$002loop1
+	jmp	NEAR L$006done
+align	16
+L$001RC4_CHAR:
+	movzx	ecx,BYTE [eax*1+edi]
+L$008cloop1:
+	add	bl,cl
+	movzx	edx,BYTE [ebx*1+edi]
+	mov	BYTE [ebx*1+edi],cl
+	mov	BYTE [eax*1+edi],dl
+	add	dl,cl
+	movzx	edx,BYTE [edx*1+edi]
+	add	al,1
+	xor	dl,BYTE [esi]
+	lea	esi,[1+esi]
+	movzx	ecx,BYTE [eax*1+edi]
+	cmp	esi,DWORD [24+esp]
+	mov	BYTE [esi*1+ebp-1],dl
+	jb	NEAR L$008cloop1
+L$006done:
+	dec	al
+	mov	DWORD [edi-4],ebx
+	mov	BYTE [edi-8],al
+L$000abort:
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_asm_RC4_set_key
+align	16
+_asm_RC4_set_key:
+L$_asm_RC4_set_key_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	edi,DWORD [20+esp]
+	mov	ebp,DWORD [24+esp]
+	mov	esi,DWORD [28+esp]
+	lea	edx,[_OPENSSL_ia32cap_P]
+	lea	edi,[8+edi]
+	lea	esi,[ebp*1+esi]
+	neg	ebp
+	xor	eax,eax
+	mov	DWORD [edi-4],ebp
+	bt	DWORD [edx],20
+	jc	NEAR L$009c1stloop
+align	16
+L$010w1stloop:
+	mov	DWORD [eax*4+edi],eax
+	add	al,1
+	jnc	NEAR L$010w1stloop
+	xor	ecx,ecx
+	xor	edx,edx
+align	16
+L$011w2ndloop:
+	mov	eax,DWORD [ecx*4+edi]
+	add	dl,BYTE [ebp*1+esi]
+	add	dl,al
+	add	ebp,1
+	mov	ebx,DWORD [edx*4+edi]
+	jnz	NEAR L$012wnowrap
+	mov	ebp,DWORD [edi-4]
+L$012wnowrap:
+	mov	DWORD [edx*4+edi],eax
+	mov	DWORD [ecx*4+edi],ebx
+	add	cl,1
+	jnc	NEAR L$011w2ndloop
+	jmp	NEAR L$013exit
+align	16
+L$009c1stloop:
+	mov	BYTE [eax*1+edi],al
+	add	al,1
+	jnc	NEAR L$009c1stloop
+	xor	ecx,ecx
+	xor	edx,edx
+	xor	ebx,ebx
+align	16
+L$014c2ndloop:
+	mov	al,BYTE [ecx*1+edi]
+	add	dl,BYTE [ebp*1+esi]
+	add	dl,al
+	add	ebp,1
+	mov	bl,BYTE [edx*1+edi]
+	jnz	NEAR L$015cnowrap
+	mov	ebp,DWORD [edi-4]
+L$015cnowrap:
+	mov	BYTE [edx*1+edi],al
+	mov	BYTE [ecx*1+edi],bl
+	add	cl,1
+	jnc	NEAR L$014c2ndloop
+	mov	DWORD [256+edi],-1
+L$013exit:
+	xor	eax,eax
+	mov	DWORD [edi-8],eax
+	mov	DWORD [edi-4],eax
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+global	_RC4_options
+align	16
+_RC4_options:
+L$_RC4_options_begin:
+	call	L$016pic_point
+L$016pic_point:
+	pop	eax
+	lea	eax,[(L$017opts-L$016pic_point)+eax]
+	lea	edx,[_OPENSSL_ia32cap_P]
+	mov	edx,DWORD [edx]
+	bt	edx,20
+	jc	NEAR L$0181xchar
+	bt	edx,26
+	jnc	NEAR L$019ret
+	add	eax,25
+	ret
+L$0181xchar:
+	add	eax,12
+L$019ret:
+	ret
+align	64
+L$017opts:
+db	114,99,52,40,52,120,44,105,110,116,41,0
+db	114,99,52,40,49,120,44,99,104,97,114,41,0
+db	114,99,52,40,56,120,44,109,109,120,41,0
+db	82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
+db	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
+db	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+align	64
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm
new file mode 100644
index 0000000..e24449d
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/sha/sha1-586.asm
@@ -0,0 +1,2805 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_sha1_block_data_order
+align	16
+_sha1_block_data_order:
+L$_sha1_block_data_order_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	call	L$000pic_point
+L$000pic_point:
+	pop	ebp
+	lea	esi,[_OPENSSL_ia32cap_P]
+	lea	ebp,[(L$K_XX_XX-L$000pic_point)+ebp]
+	mov	eax,DWORD [esi]
+	mov	edx,DWORD [4+esi]
+	test	edx,512
+	jz	NEAR L$001x86
+	mov	ecx,DWORD [8+esi]
+	test	eax,16777216
+	jz	NEAR L$001x86
+	test	ecx,536870912
+	jnz	NEAR L$shaext_shortcut
+	jmp	NEAR L$ssse3_shortcut
+align	16
+L$001x86:
+	mov	ebp,DWORD [20+esp]
+	mov	esi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	sub	esp,76
+	shl	eax,6
+	add	eax,esi
+	mov	DWORD [104+esp],eax
+	mov	edi,DWORD [16+ebp]
+	jmp	NEAR L$002loop
+align	16
+L$002loop:
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	mov	DWORD [8+esp],ecx
+	mov	DWORD [12+esp],edx
+	mov	eax,DWORD [16+esi]
+	mov	ebx,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [28+esi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	mov	DWORD [16+esp],eax
+	mov	DWORD [20+esp],ebx
+	mov	DWORD [24+esp],ecx
+	mov	DWORD [28+esp],edx
+	mov	eax,DWORD [32+esi]
+	mov	ebx,DWORD [36+esi]
+	mov	ecx,DWORD [40+esi]
+	mov	edx,DWORD [44+esi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	mov	DWORD [32+esp],eax
+	mov	DWORD [36+esp],ebx
+	mov	DWORD [40+esp],ecx
+	mov	DWORD [44+esp],edx
+	mov	eax,DWORD [48+esi]
+	mov	ebx,DWORD [52+esi]
+	mov	ecx,DWORD [56+esi]
+	mov	edx,DWORD [60+esi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	mov	DWORD [48+esp],eax
+	mov	DWORD [52+esp],ebx
+	mov	DWORD [56+esp],ecx
+	mov	DWORD [60+esp],edx
+	mov	DWORD [100+esp],esi
+	mov	eax,DWORD [ebp]
+	mov	ebx,DWORD [4+ebp]
+	mov	ecx,DWORD [8+ebp]
+	mov	edx,DWORD [12+ebp]
+	; 00_15 0
+	mov	esi,ecx
+	mov	ebp,eax
+	rol	ebp,5
+	xor	esi,edx
+	add	ebp,edi
+	mov	edi,DWORD [esp]
+	and	esi,ebx
+	ror	ebx,2
+	xor	esi,edx
+	lea	ebp,[1518500249+edi*1+ebp]
+	add	ebp,esi
+	; 00_15 1
+	mov	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	xor	edi,ecx
+	add	ebp,edx
+	mov	edx,DWORD [4+esp]
+	and	edi,eax
+	ror	eax,2
+	xor	edi,ecx
+	lea	ebp,[1518500249+edx*1+ebp]
+	add	ebp,edi
+	; 00_15 2
+	mov	edx,eax
+	mov	edi,ebp
+	rol	ebp,5
+	xor	edx,ebx
+	add	ebp,ecx
+	mov	ecx,DWORD [8+esp]
+	and	edx,esi
+	ror	esi,2
+	xor	edx,ebx
+	lea	ebp,[1518500249+ecx*1+ebp]
+	add	ebp,edx
+	; 00_15 3
+	mov	ecx,esi
+	mov	edx,ebp
+	rol	ebp,5
+	xor	ecx,eax
+	add	ebp,ebx
+	mov	ebx,DWORD [12+esp]
+	and	ecx,edi
+	ror	edi,2
+	xor	ecx,eax
+	lea	ebp,[1518500249+ebx*1+ebp]
+	add	ebp,ecx
+	; 00_15 4
+	mov	ebx,edi
+	mov	ecx,ebp
+	rol	ebp,5
+	xor	ebx,esi
+	add	ebp,eax
+	mov	eax,DWORD [16+esp]
+	and	ebx,edx
+	ror	edx,2
+	xor	ebx,esi
+	lea	ebp,[1518500249+eax*1+ebp]
+	add	ebp,ebx
+	; 00_15 5
+	mov	eax,edx
+	mov	ebx,ebp
+	rol	ebp,5
+	xor	eax,edi
+	add	ebp,esi
+	mov	esi,DWORD [20+esp]
+	and	eax,ecx
+	ror	ecx,2
+	xor	eax,edi
+	lea	ebp,[1518500249+esi*1+ebp]
+	add	ebp,eax
+	; 00_15 6
+	mov	esi,ecx
+	mov	eax,ebp
+	rol	ebp,5
+	xor	esi,edx
+	add	ebp,edi
+	mov	edi,DWORD [24+esp]
+	and	esi,ebx
+	ror	ebx,2
+	xor	esi,edx
+	lea	ebp,[1518500249+edi*1+ebp]
+	add	ebp,esi
+	; 00_15 7
+	mov	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	xor	edi,ecx
+	add	ebp,edx
+	mov	edx,DWORD [28+esp]
+	and	edi,eax
+	ror	eax,2
+	xor	edi,ecx
+	lea	ebp,[1518500249+edx*1+ebp]
+	add	ebp,edi
+	; 00_15 8
+	mov	edx,eax
+	mov	edi,ebp
+	rol	ebp,5
+	xor	edx,ebx
+	add	ebp,ecx
+	mov	ecx,DWORD [32+esp]
+	and	edx,esi
+	ror	esi,2
+	xor	edx,ebx
+	lea	ebp,[1518500249+ecx*1+ebp]
+	add	ebp,edx
+	; 00_15 9
+	mov	ecx,esi
+	mov	edx,ebp
+	rol	ebp,5
+	xor	ecx,eax
+	add	ebp,ebx
+	mov	ebx,DWORD [36+esp]
+	and	ecx,edi
+	ror	edi,2
+	xor	ecx,eax
+	lea	ebp,[1518500249+ebx*1+ebp]
+	add	ebp,ecx
+	; 00_15 10
+	mov	ebx,edi
+	mov	ecx,ebp
+	rol	ebp,5
+	xor	ebx,esi
+	add	ebp,eax
+	mov	eax,DWORD [40+esp]
+	and	ebx,edx
+	ror	edx,2
+	xor	ebx,esi
+	lea	ebp,[1518500249+eax*1+ebp]
+	add	ebp,ebx
+	; 00_15 11
+	mov	eax,edx
+	mov	ebx,ebp
+	rol	ebp,5
+	xor	eax,edi
+	add	ebp,esi
+	mov	esi,DWORD [44+esp]
+	and	eax,ecx
+	ror	ecx,2
+	xor	eax,edi
+	lea	ebp,[1518500249+esi*1+ebp]
+	add	ebp,eax
+	; 00_15 12
+	mov	esi,ecx
+	mov	eax,ebp
+	rol	ebp,5
+	xor	esi,edx
+	add	ebp,edi
+	mov	edi,DWORD [48+esp]
+	and	esi,ebx
+	ror	ebx,2
+	xor	esi,edx
+	lea	ebp,[1518500249+edi*1+ebp]
+	add	ebp,esi
+	; 00_15 13
+	mov	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	xor	edi,ecx
+	add	ebp,edx
+	mov	edx,DWORD [52+esp]
+	and	edi,eax
+	ror	eax,2
+	xor	edi,ecx
+	lea	ebp,[1518500249+edx*1+ebp]
+	add	ebp,edi
+	; 00_15 14
+	mov	edx,eax
+	mov	edi,ebp
+	rol	ebp,5
+	xor	edx,ebx
+	add	ebp,ecx
+	mov	ecx,DWORD [56+esp]
+	and	edx,esi
+	ror	esi,2
+	xor	edx,ebx
+	lea	ebp,[1518500249+ecx*1+ebp]
+	add	ebp,edx
+	; 00_15 15
+	mov	ecx,esi
+	mov	edx,ebp
+	rol	ebp,5
+	xor	ecx,eax
+	add	ebp,ebx
+	mov	ebx,DWORD [60+esp]
+	and	ecx,edi
+	ror	edi,2
+	xor	ecx,eax
+	lea	ebp,[1518500249+ebx*1+ebp]
+	mov	ebx,DWORD [esp]
+	add	ecx,ebp
+	; 16_19 16
+	mov	ebp,edi
+	xor	ebx,DWORD [8+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [32+esp]
+	and	ebp,edx
+	xor	ebx,DWORD [52+esp]
+	rol	ebx,1
+	xor	ebp,esi
+	add	eax,ebp
+	mov	ebp,ecx
+	ror	edx,2
+	mov	DWORD [esp],ebx
+	rol	ebp,5
+	lea	ebx,[1518500249+eax*1+ebx]
+	mov	eax,DWORD [4+esp]
+	add	ebx,ebp
+	; 16_19 17
+	mov	ebp,edx
+	xor	eax,DWORD [12+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [36+esp]
+	and	ebp,ecx
+	xor	eax,DWORD [56+esp]
+	rol	eax,1
+	xor	ebp,edi
+	add	esi,ebp
+	mov	ebp,ebx
+	ror	ecx,2
+	mov	DWORD [4+esp],eax
+	rol	ebp,5
+	lea	eax,[1518500249+esi*1+eax]
+	mov	esi,DWORD [8+esp]
+	add	eax,ebp
+	; 16_19 18
+	mov	ebp,ecx
+	xor	esi,DWORD [16+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [40+esp]
+	and	ebp,ebx
+	xor	esi,DWORD [60+esp]
+	rol	esi,1
+	xor	ebp,edx
+	add	edi,ebp
+	mov	ebp,eax
+	ror	ebx,2
+	mov	DWORD [8+esp],esi
+	rol	ebp,5
+	lea	esi,[1518500249+edi*1+esi]
+	mov	edi,DWORD [12+esp]
+	add	esi,ebp
+	; 16_19 19
+	mov	ebp,ebx
+	xor	edi,DWORD [20+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [44+esp]
+	and	ebp,eax
+	xor	edi,DWORD [esp]
+	rol	edi,1
+	xor	ebp,ecx
+	add	edx,ebp
+	mov	ebp,esi
+	ror	eax,2
+	mov	DWORD [12+esp],edi
+	rol	ebp,5
+	lea	edi,[1518500249+edx*1+edi]
+	mov	edx,DWORD [16+esp]
+	add	edi,ebp
+	; 20_39 20
+	mov	ebp,esi
+	xor	edx,DWORD [24+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [48+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [4+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [16+esp],edx
+	lea	edx,[1859775393+ecx*1+edx]
+	mov	ecx,DWORD [20+esp]
+	add	edx,ebp
+	; 20_39 21
+	mov	ebp,edi
+	xor	ecx,DWORD [28+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [52+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [8+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [20+esp],ecx
+	lea	ecx,[1859775393+ebx*1+ecx]
+	mov	ebx,DWORD [24+esp]
+	add	ecx,ebp
+	; 20_39 22
+	mov	ebp,edx
+	xor	ebx,DWORD [32+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [56+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [12+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [24+esp],ebx
+	lea	ebx,[1859775393+eax*1+ebx]
+	mov	eax,DWORD [28+esp]
+	add	ebx,ebp
+	; 20_39 23
+	mov	ebp,ecx
+	xor	eax,DWORD [36+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [60+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [16+esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	mov	DWORD [28+esp],eax
+	lea	eax,[1859775393+esi*1+eax]
+	mov	esi,DWORD [32+esp]
+	add	eax,ebp
+	; 20_39 24
+	mov	ebp,ebx
+	xor	esi,DWORD [40+esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [esp]
+	xor	ebp,edx
+	xor	esi,DWORD [20+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [32+esp],esi
+	lea	esi,[1859775393+edi*1+esi]
+	mov	edi,DWORD [36+esp]
+	add	esi,ebp
+	; 20_39 25
+	mov	ebp,eax
+	xor	edi,DWORD [44+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [4+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [24+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [36+esp],edi
+	lea	edi,[1859775393+edx*1+edi]
+	mov	edx,DWORD [40+esp]
+	add	edi,ebp
+	; 20_39 26
+	mov	ebp,esi
+	xor	edx,DWORD [48+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [8+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [28+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [40+esp],edx
+	lea	edx,[1859775393+ecx*1+edx]
+	mov	ecx,DWORD [44+esp]
+	add	edx,ebp
+	; 20_39 27
+	mov	ebp,edi
+	xor	ecx,DWORD [52+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [12+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [32+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [44+esp],ecx
+	lea	ecx,[1859775393+ebx*1+ecx]
+	mov	ebx,DWORD [48+esp]
+	add	ecx,ebp
+	; 20_39 28
+	mov	ebp,edx
+	xor	ebx,DWORD [56+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [16+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [36+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [48+esp],ebx
+	lea	ebx,[1859775393+eax*1+ebx]
+	mov	eax,DWORD [52+esp]
+	add	ebx,ebp
+	; 20_39 29
+	mov	ebp,ecx
+	xor	eax,DWORD [60+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [20+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [40+esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	mov	DWORD [52+esp],eax
+	lea	eax,[1859775393+esi*1+eax]
+	mov	esi,DWORD [56+esp]
+	add	eax,ebp
+	; 20_39 30
+	mov	ebp,ebx
+	xor	esi,DWORD [esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [24+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [44+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [56+esp],esi
+	lea	esi,[1859775393+edi*1+esi]
+	mov	edi,DWORD [60+esp]
+	add	esi,ebp
+	; 20_39 31
+	mov	ebp,eax
+	xor	edi,DWORD [4+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [28+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [48+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [60+esp],edi
+	lea	edi,[1859775393+edx*1+edi]
+	mov	edx,DWORD [esp]
+	add	edi,ebp
+	; 20_39 32
+	mov	ebp,esi
+	xor	edx,DWORD [8+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [32+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [52+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [esp],edx
+	lea	edx,[1859775393+ecx*1+edx]
+	mov	ecx,DWORD [4+esp]
+	add	edx,ebp
+	; 20_39 33
+	mov	ebp,edi
+	xor	ecx,DWORD [12+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [36+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [56+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [4+esp],ecx
+	lea	ecx,[1859775393+ebx*1+ecx]
+	mov	ebx,DWORD [8+esp]
+	add	ecx,ebp
+	; 20_39 34
+	mov	ebp,edx
+	xor	ebx,DWORD [16+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [40+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [60+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [8+esp],ebx
+	lea	ebx,[1859775393+eax*1+ebx]
+	mov	eax,DWORD [12+esp]
+	add	ebx,ebp
+	; 20_39 35
+	mov	ebp,ecx
+	xor	eax,DWORD [20+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [44+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	mov	DWORD [12+esp],eax
+	lea	eax,[1859775393+esi*1+eax]
+	mov	esi,DWORD [16+esp]
+	add	eax,ebp
+	; 20_39 36
+	mov	ebp,ebx
+	xor	esi,DWORD [24+esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [48+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [4+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [16+esp],esi
+	lea	esi,[1859775393+edi*1+esi]
+	mov	edi,DWORD [20+esp]
+	add	esi,ebp
+	; 20_39 37
+	mov	ebp,eax
+	xor	edi,DWORD [28+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [52+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [8+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [20+esp],edi
+	lea	edi,[1859775393+edx*1+edi]
+	mov	edx,DWORD [24+esp]
+	add	edi,ebp
+	; 20_39 38
+	mov	ebp,esi
+	xor	edx,DWORD [32+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [56+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [12+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [24+esp],edx
+	lea	edx,[1859775393+ecx*1+edx]
+	mov	ecx,DWORD [28+esp]
+	add	edx,ebp
+	; 20_39 39
+	mov	ebp,edi
+	xor	ecx,DWORD [36+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [60+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [16+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [28+esp],ecx
+	lea	ecx,[1859775393+ebx*1+ecx]
+	mov	ebx,DWORD [32+esp]
+	add	ecx,ebp
+	; 40_59 40
+	mov	ebp,edi
+	xor	ebx,DWORD [40+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [esp]
+	and	ebp,edx
+	xor	ebx,DWORD [20+esp]
+	rol	ebx,1
+	add	ebp,eax
+	ror	edx,2
+	mov	eax,ecx
+	rol	eax,5
+	mov	DWORD [32+esp],ebx
+	lea	ebx,[2400959708+ebp*1+ebx]
+	mov	ebp,edi
+	add	ebx,eax
+	and	ebp,esi
+	mov	eax,DWORD [36+esp]
+	add	ebx,ebp
+	; 40_59 41
+	mov	ebp,edx
+	xor	eax,DWORD [44+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [4+esp]
+	and	ebp,ecx
+	xor	eax,DWORD [24+esp]
+	rol	eax,1
+	add	ebp,esi
+	ror	ecx,2
+	mov	esi,ebx
+	rol	esi,5
+	mov	DWORD [36+esp],eax
+	lea	eax,[2400959708+ebp*1+eax]
+	mov	ebp,edx
+	add	eax,esi
+	and	ebp,edi
+	mov	esi,DWORD [40+esp]
+	add	eax,ebp
+	; 40_59 42
+	mov	ebp,ecx
+	xor	esi,DWORD [48+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [8+esp]
+	and	ebp,ebx
+	xor	esi,DWORD [28+esp]
+	rol	esi,1
+	add	ebp,edi
+	ror	ebx,2
+	mov	edi,eax
+	rol	edi,5
+	mov	DWORD [40+esp],esi
+	lea	esi,[2400959708+ebp*1+esi]
+	mov	ebp,ecx
+	add	esi,edi
+	and	ebp,edx
+	mov	edi,DWORD [44+esp]
+	add	esi,ebp
+	; 40_59 43
+	mov	ebp,ebx
+	xor	edi,DWORD [52+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [12+esp]
+	and	ebp,eax
+	xor	edi,DWORD [32+esp]
+	rol	edi,1
+	add	ebp,edx
+	ror	eax,2
+	mov	edx,esi
+	rol	edx,5
+	mov	DWORD [44+esp],edi
+	lea	edi,[2400959708+ebp*1+edi]
+	mov	ebp,ebx
+	add	edi,edx
+	and	ebp,ecx
+	mov	edx,DWORD [48+esp]
+	add	edi,ebp
+	; 40_59 44
+	mov	ebp,eax
+	xor	edx,DWORD [56+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [16+esp]
+	and	ebp,esi
+	xor	edx,DWORD [36+esp]
+	rol	edx,1
+	add	ebp,ecx
+	ror	esi,2
+	mov	ecx,edi
+	rol	ecx,5
+	mov	DWORD [48+esp],edx
+	lea	edx,[2400959708+ebp*1+edx]
+	mov	ebp,eax
+	add	edx,ecx
+	and	ebp,ebx
+	mov	ecx,DWORD [52+esp]
+	add	edx,ebp
+	; 40_59 45
+	mov	ebp,esi
+	xor	ecx,DWORD [60+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [20+esp]
+	and	ebp,edi
+	xor	ecx,DWORD [40+esp]
+	rol	ecx,1
+	add	ebp,ebx
+	ror	edi,2
+	mov	ebx,edx
+	rol	ebx,5
+	mov	DWORD [52+esp],ecx
+	lea	ecx,[2400959708+ebp*1+ecx]
+	mov	ebp,esi
+	add	ecx,ebx
+	and	ebp,eax
+	mov	ebx,DWORD [56+esp]
+	add	ecx,ebp
+	; 40_59 46
+	mov	ebp,edi
+	xor	ebx,DWORD [esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [24+esp]
+	and	ebp,edx
+	xor	ebx,DWORD [44+esp]
+	rol	ebx,1
+	add	ebp,eax
+	ror	edx,2
+	mov	eax,ecx
+	rol	eax,5
+	mov	DWORD [56+esp],ebx
+	lea	ebx,[2400959708+ebp*1+ebx]
+	mov	ebp,edi
+	add	ebx,eax
+	and	ebp,esi
+	mov	eax,DWORD [60+esp]
+	add	ebx,ebp
+	; 40_59 47
+	mov	ebp,edx
+	xor	eax,DWORD [4+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [28+esp]
+	and	ebp,ecx
+	xor	eax,DWORD [48+esp]
+	rol	eax,1
+	add	ebp,esi
+	ror	ecx,2
+	mov	esi,ebx
+	rol	esi,5
+	mov	DWORD [60+esp],eax
+	lea	eax,[2400959708+ebp*1+eax]
+	mov	ebp,edx
+	add	eax,esi
+	and	ebp,edi
+	mov	esi,DWORD [esp]
+	add	eax,ebp
+	; 40_59 48
+	mov	ebp,ecx
+	xor	esi,DWORD [8+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [32+esp]
+	and	ebp,ebx
+	xor	esi,DWORD [52+esp]
+	rol	esi,1
+	add	ebp,edi
+	ror	ebx,2
+	mov	edi,eax
+	rol	edi,5
+	mov	DWORD [esp],esi
+	lea	esi,[2400959708+ebp*1+esi]
+	mov	ebp,ecx
+	add	esi,edi
+	and	ebp,edx
+	mov	edi,DWORD [4+esp]
+	add	esi,ebp
+	; 40_59 49
+	mov	ebp,ebx
+	xor	edi,DWORD [12+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [36+esp]
+	and	ebp,eax
+	xor	edi,DWORD [56+esp]
+	rol	edi,1
+	add	ebp,edx
+	ror	eax,2
+	mov	edx,esi
+	rol	edx,5
+	mov	DWORD [4+esp],edi
+	lea	edi,[2400959708+ebp*1+edi]
+	mov	ebp,ebx
+	add	edi,edx
+	and	ebp,ecx
+	mov	edx,DWORD [8+esp]
+	add	edi,ebp
+	; 40_59 50
+	mov	ebp,eax
+	xor	edx,DWORD [16+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [40+esp]
+	and	ebp,esi
+	xor	edx,DWORD [60+esp]
+	rol	edx,1
+	add	ebp,ecx
+	ror	esi,2
+	mov	ecx,edi
+	rol	ecx,5
+	mov	DWORD [8+esp],edx
+	lea	edx,[2400959708+ebp*1+edx]
+	mov	ebp,eax
+	add	edx,ecx
+	and	ebp,ebx
+	mov	ecx,DWORD [12+esp]
+	add	edx,ebp
+	; 40_59 51
+	mov	ebp,esi
+	xor	ecx,DWORD [20+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [44+esp]
+	and	ebp,edi
+	xor	ecx,DWORD [esp]
+	rol	ecx,1
+	add	ebp,ebx
+	ror	edi,2
+	mov	ebx,edx
+	rol	ebx,5
+	mov	DWORD [12+esp],ecx
+	lea	ecx,[2400959708+ebp*1+ecx]
+	mov	ebp,esi
+	add	ecx,ebx
+	and	ebp,eax
+	mov	ebx,DWORD [16+esp]
+	add	ecx,ebp
+	; 40_59 52
+	mov	ebp,edi
+	xor	ebx,DWORD [24+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [48+esp]
+	and	ebp,edx
+	xor	ebx,DWORD [4+esp]
+	rol	ebx,1
+	add	ebp,eax
+	ror	edx,2
+	mov	eax,ecx
+	rol	eax,5
+	mov	DWORD [16+esp],ebx
+	lea	ebx,[2400959708+ebp*1+ebx]
+	mov	ebp,edi
+	add	ebx,eax
+	and	ebp,esi
+	mov	eax,DWORD [20+esp]
+	add	ebx,ebp
+	; 40_59 53
+	mov	ebp,edx
+	xor	eax,DWORD [28+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [52+esp]
+	and	ebp,ecx
+	xor	eax,DWORD [8+esp]
+	rol	eax,1
+	add	ebp,esi
+	ror	ecx,2
+	mov	esi,ebx
+	rol	esi,5
+	mov	DWORD [20+esp],eax
+	lea	eax,[2400959708+ebp*1+eax]
+	mov	ebp,edx
+	add	eax,esi
+	and	ebp,edi
+	mov	esi,DWORD [24+esp]
+	add	eax,ebp
+	; 40_59 54
+	mov	ebp,ecx
+	xor	esi,DWORD [32+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [56+esp]
+	and	ebp,ebx
+	xor	esi,DWORD [12+esp]
+	rol	esi,1
+	add	ebp,edi
+	ror	ebx,2
+	mov	edi,eax
+	rol	edi,5
+	mov	DWORD [24+esp],esi
+	lea	esi,[2400959708+ebp*1+esi]
+	mov	ebp,ecx
+	add	esi,edi
+	and	ebp,edx
+	mov	edi,DWORD [28+esp]
+	add	esi,ebp
+	; 40_59 55
+	mov	ebp,ebx
+	xor	edi,DWORD [36+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [60+esp]
+	and	ebp,eax
+	xor	edi,DWORD [16+esp]
+	rol	edi,1
+	add	ebp,edx
+	ror	eax,2
+	mov	edx,esi
+	rol	edx,5
+	mov	DWORD [28+esp],edi
+	lea	edi,[2400959708+ebp*1+edi]
+	mov	ebp,ebx
+	add	edi,edx
+	and	ebp,ecx
+	mov	edx,DWORD [32+esp]
+	add	edi,ebp
+	; 40_59 56
+	mov	ebp,eax
+	xor	edx,DWORD [40+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [esp]
+	and	ebp,esi
+	xor	edx,DWORD [20+esp]
+	rol	edx,1
+	add	ebp,ecx
+	ror	esi,2
+	mov	ecx,edi
+	rol	ecx,5
+	mov	DWORD [32+esp],edx
+	lea	edx,[2400959708+ebp*1+edx]
+	mov	ebp,eax
+	add	edx,ecx
+	and	ebp,ebx
+	mov	ecx,DWORD [36+esp]
+	add	edx,ebp
+	; 40_59 57
+	mov	ebp,esi
+	xor	ecx,DWORD [44+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [4+esp]
+	and	ebp,edi
+	xor	ecx,DWORD [24+esp]
+	rol	ecx,1
+	add	ebp,ebx
+	ror	edi,2
+	mov	ebx,edx
+	rol	ebx,5
+	mov	DWORD [36+esp],ecx
+	lea	ecx,[2400959708+ebp*1+ecx]
+	mov	ebp,esi
+	add	ecx,ebx
+	and	ebp,eax
+	mov	ebx,DWORD [40+esp]
+	add	ecx,ebp
+	; 40_59 58
+	mov	ebp,edi
+	xor	ebx,DWORD [48+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [8+esp]
+	and	ebp,edx
+	xor	ebx,DWORD [28+esp]
+	rol	ebx,1
+	add	ebp,eax
+	ror	edx,2
+	mov	eax,ecx
+	rol	eax,5
+	mov	DWORD [40+esp],ebx
+	lea	ebx,[2400959708+ebp*1+ebx]
+	mov	ebp,edi
+	add	ebx,eax
+	and	ebp,esi
+	mov	eax,DWORD [44+esp]
+	add	ebx,ebp
+	; 40_59 59
+	mov	ebp,edx
+	xor	eax,DWORD [52+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [12+esp]
+	and	ebp,ecx
+	xor	eax,DWORD [32+esp]
+	rol	eax,1
+	add	ebp,esi
+	ror	ecx,2
+	mov	esi,ebx
+	rol	esi,5
+	mov	DWORD [44+esp],eax
+	lea	eax,[2400959708+ebp*1+eax]
+	mov	ebp,edx
+	add	eax,esi
+	and	ebp,edi
+	mov	esi,DWORD [48+esp]
+	add	eax,ebp
+	; 20_39 60
+	mov	ebp,ebx
+	xor	esi,DWORD [56+esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [16+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [36+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [48+esp],esi
+	lea	esi,[3395469782+edi*1+esi]
+	mov	edi,DWORD [52+esp]
+	add	esi,ebp
+	; 20_39 61
+	mov	ebp,eax
+	xor	edi,DWORD [60+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [20+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [40+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [52+esp],edi
+	lea	edi,[3395469782+edx*1+edi]
+	mov	edx,DWORD [56+esp]
+	add	edi,ebp
+	; 20_39 62
+	mov	ebp,esi
+	xor	edx,DWORD [esp]
+	xor	ebp,eax
+	xor	edx,DWORD [24+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [44+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [56+esp],edx
+	lea	edx,[3395469782+ecx*1+edx]
+	mov	ecx,DWORD [60+esp]
+	add	edx,ebp
+	; 20_39 63
+	mov	ebp,edi
+	xor	ecx,DWORD [4+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [28+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [48+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [60+esp],ecx
+	lea	ecx,[3395469782+ebx*1+ecx]
+	mov	ebx,DWORD [esp]
+	add	ecx,ebp
+	; 20_39 64
+	mov	ebp,edx
+	xor	ebx,DWORD [8+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [32+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [52+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [esp],ebx
+	lea	ebx,[3395469782+eax*1+ebx]
+	mov	eax,DWORD [4+esp]
+	add	ebx,ebp
+	; 20_39 65
+	mov	ebp,ecx
+	xor	eax,DWORD [12+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [36+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [56+esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	mov	DWORD [4+esp],eax
+	lea	eax,[3395469782+esi*1+eax]
+	mov	esi,DWORD [8+esp]
+	add	eax,ebp
+	; 20_39 66
+	mov	ebp,ebx
+	xor	esi,DWORD [16+esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [40+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [60+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [8+esp],esi
+	lea	esi,[3395469782+edi*1+esi]
+	mov	edi,DWORD [12+esp]
+	add	esi,ebp
+	; 20_39 67
+	mov	ebp,eax
+	xor	edi,DWORD [20+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [44+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [12+esp],edi
+	lea	edi,[3395469782+edx*1+edi]
+	mov	edx,DWORD [16+esp]
+	add	edi,ebp
+	; 20_39 68
+	mov	ebp,esi
+	xor	edx,DWORD [24+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [48+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [4+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [16+esp],edx
+	lea	edx,[3395469782+ecx*1+edx]
+	mov	ecx,DWORD [20+esp]
+	add	edx,ebp
+	; 20_39 69
+	mov	ebp,edi
+	xor	ecx,DWORD [28+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [52+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [8+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [20+esp],ecx
+	lea	ecx,[3395469782+ebx*1+ecx]
+	mov	ebx,DWORD [24+esp]
+	add	ecx,ebp
+	; 20_39 70
+	mov	ebp,edx
+	xor	ebx,DWORD [32+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [56+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [12+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [24+esp],ebx
+	lea	ebx,[3395469782+eax*1+ebx]
+	mov	eax,DWORD [28+esp]
+	add	ebx,ebp
+	; 20_39 71
+	mov	ebp,ecx
+	xor	eax,DWORD [36+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [60+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [16+esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	mov	DWORD [28+esp],eax
+	lea	eax,[3395469782+esi*1+eax]
+	mov	esi,DWORD [32+esp]
+	add	eax,ebp
+	; 20_39 72
+	mov	ebp,ebx
+	xor	esi,DWORD [40+esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [esp]
+	xor	ebp,edx
+	xor	esi,DWORD [20+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	mov	DWORD [32+esp],esi
+	lea	esi,[3395469782+edi*1+esi]
+	mov	edi,DWORD [36+esp]
+	add	esi,ebp
+	; 20_39 73
+	mov	ebp,eax
+	xor	edi,DWORD [44+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [4+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [24+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	mov	DWORD [36+esp],edi
+	lea	edi,[3395469782+edx*1+edi]
+	mov	edx,DWORD [40+esp]
+	add	edi,ebp
+	; 20_39 74
+	mov	ebp,esi
+	xor	edx,DWORD [48+esp]
+	xor	ebp,eax
+	xor	edx,DWORD [8+esp]
+	xor	ebp,ebx
+	xor	edx,DWORD [28+esp]
+	rol	edx,1
+	add	ecx,ebp
+	ror	esi,2
+	mov	ebp,edi
+	rol	ebp,5
+	mov	DWORD [40+esp],edx
+	lea	edx,[3395469782+ecx*1+edx]
+	mov	ecx,DWORD [44+esp]
+	add	edx,ebp
+	; 20_39 75
+	mov	ebp,edi
+	xor	ecx,DWORD [52+esp]
+	xor	ebp,esi
+	xor	ecx,DWORD [12+esp]
+	xor	ebp,eax
+	xor	ecx,DWORD [32+esp]
+	rol	ecx,1
+	add	ebx,ebp
+	ror	edi,2
+	mov	ebp,edx
+	rol	ebp,5
+	mov	DWORD [44+esp],ecx
+	lea	ecx,[3395469782+ebx*1+ecx]
+	mov	ebx,DWORD [48+esp]
+	add	ecx,ebp
+	; 20_39 76
+	mov	ebp,edx
+	xor	ebx,DWORD [56+esp]
+	xor	ebp,edi
+	xor	ebx,DWORD [16+esp]
+	xor	ebp,esi
+	xor	ebx,DWORD [36+esp]
+	rol	ebx,1
+	add	eax,ebp
+	ror	edx,2
+	mov	ebp,ecx
+	rol	ebp,5
+	mov	DWORD [48+esp],ebx
+	lea	ebx,[3395469782+eax*1+ebx]
+	mov	eax,DWORD [52+esp]
+	add	ebx,ebp
+	; 20_39 77
+	mov	ebp,ecx
+	xor	eax,DWORD [60+esp]
+	xor	ebp,edx
+	xor	eax,DWORD [20+esp]
+	xor	ebp,edi
+	xor	eax,DWORD [40+esp]
+	rol	eax,1
+	add	esi,ebp
+	ror	ecx,2
+	mov	ebp,ebx
+	rol	ebp,5
+	lea	eax,[3395469782+esi*1+eax]
+	mov	esi,DWORD [56+esp]
+	add	eax,ebp
+	; 20_39 78
+	mov	ebp,ebx
+	xor	esi,DWORD [esp]
+	xor	ebp,ecx
+	xor	esi,DWORD [24+esp]
+	xor	ebp,edx
+	xor	esi,DWORD [44+esp]
+	rol	esi,1
+	add	edi,ebp
+	ror	ebx,2
+	mov	ebp,eax
+	rol	ebp,5
+	lea	esi,[3395469782+edi*1+esi]
+	mov	edi,DWORD [60+esp]
+	add	esi,ebp
+	; 20_39 79
+	mov	ebp,eax
+	xor	edi,DWORD [4+esp]
+	xor	ebp,ebx
+	xor	edi,DWORD [28+esp]
+	xor	ebp,ecx
+	xor	edi,DWORD [48+esp]
+	rol	edi,1
+	add	edx,ebp
+	ror	eax,2
+	mov	ebp,esi
+	rol	ebp,5
+	lea	edi,[3395469782+edx*1+edi]
+	add	edi,ebp
+	mov	ebp,DWORD [96+esp]
+	mov	edx,DWORD [100+esp]
+	add	edi,DWORD [ebp]
+	add	esi,DWORD [4+ebp]
+	add	eax,DWORD [8+ebp]
+	add	ebx,DWORD [12+ebp]
+	add	ecx,DWORD [16+ebp]
+	mov	DWORD [ebp],edi
+	add	edx,64
+	mov	DWORD [4+ebp],esi
+	cmp	edx,DWORD [104+esp]
+	mov	DWORD [8+ebp],eax
+	mov	edi,ecx
+	mov	DWORD [12+ebp],ebx
+	mov	esi,edx
+	mov	DWORD [16+ebp],ecx
+	jb	NEAR L$002loop
+	add	esp,76
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+__sha1_block_data_order_shaext:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	call	L$003pic_point
+L$003pic_point:
+	pop	ebp
+	lea	ebp,[(L$K_XX_XX-L$003pic_point)+ebp]
+L$shaext_shortcut:
+	mov	edi,DWORD [20+esp]
+	mov	ebx,esp
+	mov	esi,DWORD [24+esp]
+	mov	ecx,DWORD [28+esp]
+	sub	esp,32
+	movdqu	xmm0,[edi]
+	movd	xmm1,DWORD [16+edi]
+	and	esp,-32
+	movdqa	xmm3,[80+ebp]
+	movdqu	xmm4,[esi]
+	pshufd	xmm0,xmm0,27
+	movdqu	xmm5,[16+esi]
+	pshufd	xmm1,xmm1,27
+	movdqu	xmm6,[32+esi]
+db	102,15,56,0,227
+	movdqu	xmm7,[48+esi]
+db	102,15,56,0,235
+db	102,15,56,0,243
+db	102,15,56,0,251
+	jmp	NEAR L$004loop_shaext
+align	16
+L$004loop_shaext:
+	dec	ecx
+	lea	eax,[64+esi]
+	movdqa	[esp],xmm1
+	paddd	xmm1,xmm4
+	cmovne	esi,eax
+	movdqa	[16+esp],xmm0
+db	15,56,201,229
+	movdqa	xmm2,xmm0
+db	15,58,204,193,0
+db	15,56,200,213
+	pxor	xmm4,xmm6
+db	15,56,201,238
+db	15,56,202,231
+	movdqa	xmm1,xmm0
+db	15,58,204,194,0
+db	15,56,200,206
+	pxor	xmm5,xmm7
+db	15,56,202,236
+db	15,56,201,247
+	movdqa	xmm2,xmm0
+db	15,58,204,193,0
+db	15,56,200,215
+	pxor	xmm6,xmm4
+db	15,56,201,252
+db	15,56,202,245
+	movdqa	xmm1,xmm0
+db	15,58,204,194,0
+db	15,56,200,204
+	pxor	xmm7,xmm5
+db	15,56,202,254
+db	15,56,201,229
+	movdqa	xmm2,xmm0
+db	15,58,204,193,0
+db	15,56,200,213
+	pxor	xmm4,xmm6
+db	15,56,201,238
+db	15,56,202,231
+	movdqa	xmm1,xmm0
+db	15,58,204,194,1
+db	15,56,200,206
+	pxor	xmm5,xmm7
+db	15,56,202,236
+db	15,56,201,247
+	movdqa	xmm2,xmm0
+db	15,58,204,193,1
+db	15,56,200,215
+	pxor	xmm6,xmm4
+db	15,56,201,252
+db	15,56,202,245
+	movdqa	xmm1,xmm0
+db	15,58,204,194,1
+db	15,56,200,204
+	pxor	xmm7,xmm5
+db	15,56,202,254
+db	15,56,201,229
+	movdqa	xmm2,xmm0
+db	15,58,204,193,1
+db	15,56,200,213
+	pxor	xmm4,xmm6
+db	15,56,201,238
+db	15,56,202,231
+	movdqa	xmm1,xmm0
+db	15,58,204,194,1
+db	15,56,200,206
+	pxor	xmm5,xmm7
+db	15,56,202,236
+db	15,56,201,247
+	movdqa	xmm2,xmm0
+db	15,58,204,193,2
+db	15,56,200,215
+	pxor	xmm6,xmm4
+db	15,56,201,252
+db	15,56,202,245
+	movdqa	xmm1,xmm0
+db	15,58,204,194,2
+db	15,56,200,204
+	pxor	xmm7,xmm5
+db	15,56,202,254
+db	15,56,201,229
+	movdqa	xmm2,xmm0
+db	15,58,204,193,2
+db	15,56,200,213
+	pxor	xmm4,xmm6
+db	15,56,201,238
+db	15,56,202,231
+	movdqa	xmm1,xmm0
+db	15,58,204,194,2
+db	15,56,200,206
+	pxor	xmm5,xmm7
+db	15,56,202,236
+db	15,56,201,247
+	movdqa	xmm2,xmm0
+db	15,58,204,193,2
+db	15,56,200,215
+	pxor	xmm6,xmm4
+db	15,56,201,252
+db	15,56,202,245
+	movdqa	xmm1,xmm0
+db	15,58,204,194,3
+db	15,56,200,204
+	pxor	xmm7,xmm5
+db	15,56,202,254
+	movdqu	xmm4,[esi]
+	movdqa	xmm2,xmm0
+db	15,58,204,193,3
+db	15,56,200,213
+	movdqu	xmm5,[16+esi]
+db	102,15,56,0,227
+	movdqa	xmm1,xmm0
+db	15,58,204,194,3
+db	15,56,200,206
+	movdqu	xmm6,[32+esi]
+db	102,15,56,0,235
+	movdqa	xmm2,xmm0
+db	15,58,204,193,3
+db	15,56,200,215
+	movdqu	xmm7,[48+esi]
+db	102,15,56,0,243
+	movdqa	xmm1,xmm0
+db	15,58,204,194,3
+	movdqa	xmm2,[esp]
+db	102,15,56,0,251
+db	15,56,200,202
+	paddd	xmm0,[16+esp]
+	jnz	NEAR L$004loop_shaext
+	pshufd	xmm0,xmm0,27
+	pshufd	xmm1,xmm1,27
+	movdqu	[edi],xmm0
+	movd	DWORD [16+edi],xmm1
+	mov	esp,ebx
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+__sha1_block_data_order_ssse3:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	call	L$005pic_point
+L$005pic_point:
+	pop	ebp
+	lea	ebp,[(L$K_XX_XX-L$005pic_point)+ebp]
+L$ssse3_shortcut:
+	movdqa	xmm7,[ebp]
+	movdqa	xmm0,[16+ebp]
+	movdqa	xmm1,[32+ebp]
+	movdqa	xmm2,[48+ebp]
+	movdqa	xmm6,[64+ebp]
+	mov	edi,DWORD [20+esp]
+	mov	ebp,DWORD [24+esp]
+	mov	edx,DWORD [28+esp]
+	mov	esi,esp
+	sub	esp,208
+	and	esp,-64
+	movdqa	[112+esp],xmm0
+	movdqa	[128+esp],xmm1
+	movdqa	[144+esp],xmm2
+	shl	edx,6
+	movdqa	[160+esp],xmm7
+	add	edx,ebp
+	movdqa	[176+esp],xmm6
+	add	ebp,64
+	mov	DWORD [192+esp],edi
+	mov	DWORD [196+esp],ebp
+	mov	DWORD [200+esp],edx
+	mov	DWORD [204+esp],esi
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	mov	edi,DWORD [16+edi]
+	mov	esi,ebx
+	movdqu	xmm0,[ebp-64]
+	movdqu	xmm1,[ebp-48]
+	movdqu	xmm2,[ebp-32]
+	movdqu	xmm3,[ebp-16]
+db	102,15,56,0,198
+db	102,15,56,0,206
+db	102,15,56,0,214
+	movdqa	[96+esp],xmm7
+db	102,15,56,0,222
+	paddd	xmm0,xmm7
+	paddd	xmm1,xmm7
+	paddd	xmm2,xmm7
+	movdqa	[esp],xmm0
+	psubd	xmm0,xmm7
+	movdqa	[16+esp],xmm1
+	psubd	xmm1,xmm7
+	movdqa	[32+esp],xmm2
+	mov	ebp,ecx
+	psubd	xmm2,xmm7
+	xor	ebp,edx
+	pshufd	xmm4,xmm0,238
+	and	esi,ebp
+	jmp	NEAR L$006loop
+align	16
+L$006loop:
+	ror	ebx,2
+	xor	esi,edx
+	mov	ebp,eax
+	punpcklqdq	xmm4,xmm1
+	movdqa	xmm6,xmm3
+	add	edi,DWORD [esp]
+	xor	ebx,ecx
+	paddd	xmm7,xmm3
+	movdqa	[64+esp],xmm0
+	rol	eax,5
+	add	edi,esi
+	psrldq	xmm6,4
+	and	ebp,ebx
+	xor	ebx,ecx
+	pxor	xmm4,xmm0
+	add	edi,eax
+	ror	eax,7
+	pxor	xmm6,xmm2
+	xor	ebp,ecx
+	mov	esi,edi
+	add	edx,DWORD [4+esp]
+	pxor	xmm4,xmm6
+	xor	eax,ebx
+	rol	edi,5
+	movdqa	[48+esp],xmm7
+	add	edx,ebp
+	and	esi,eax
+	movdqa	xmm0,xmm4
+	xor	eax,ebx
+	add	edx,edi
+	ror	edi,7
+	movdqa	xmm6,xmm4
+	xor	esi,ebx
+	pslldq	xmm0,12
+	paddd	xmm4,xmm4
+	mov	ebp,edx
+	add	ecx,DWORD [8+esp]
+	psrld	xmm6,31
+	xor	edi,eax
+	rol	edx,5
+	movdqa	xmm7,xmm0
+	add	ecx,esi
+	and	ebp,edi
+	xor	edi,eax
+	psrld	xmm0,30
+	add	ecx,edx
+	ror	edx,7
+	por	xmm4,xmm6
+	xor	ebp,eax
+	mov	esi,ecx
+	add	ebx,DWORD [12+esp]
+	pslld	xmm7,2
+	xor	edx,edi
+	rol	ecx,5
+	pxor	xmm4,xmm0
+	movdqa	xmm0,[96+esp]
+	add	ebx,ebp
+	and	esi,edx
+	pxor	xmm4,xmm7
+	pshufd	xmm5,xmm1,238
+	xor	edx,edi
+	add	ebx,ecx
+	ror	ecx,7
+	xor	esi,edi
+	mov	ebp,ebx
+	punpcklqdq	xmm5,xmm2
+	movdqa	xmm7,xmm4
+	add	eax,DWORD [16+esp]
+	xor	ecx,edx
+	paddd	xmm0,xmm4
+	movdqa	[80+esp],xmm1
+	rol	ebx,5
+	add	eax,esi
+	psrldq	xmm7,4
+	and	ebp,ecx
+	xor	ecx,edx
+	pxor	xmm5,xmm1
+	add	eax,ebx
+	ror	ebx,7
+	pxor	xmm7,xmm3
+	xor	ebp,edx
+	mov	esi,eax
+	add	edi,DWORD [20+esp]
+	pxor	xmm5,xmm7
+	xor	ebx,ecx
+	rol	eax,5
+	movdqa	[esp],xmm0
+	add	edi,ebp
+	and	esi,ebx
+	movdqa	xmm1,xmm5
+	xor	ebx,ecx
+	add	edi,eax
+	ror	eax,7
+	movdqa	xmm7,xmm5
+	xor	esi,ecx
+	pslldq	xmm1,12
+	paddd	xmm5,xmm5
+	mov	ebp,edi
+	add	edx,DWORD [24+esp]
+	psrld	xmm7,31
+	xor	eax,ebx
+	rol	edi,5
+	movdqa	xmm0,xmm1
+	add	edx,esi
+	and	ebp,eax
+	xor	eax,ebx
+	psrld	xmm1,30
+	add	edx,edi
+	ror	edi,7
+	por	xmm5,xmm7
+	xor	ebp,ebx
+	mov	esi,edx
+	add	ecx,DWORD [28+esp]
+	pslld	xmm0,2
+	xor	edi,eax
+	rol	edx,5
+	pxor	xmm5,xmm1
+	movdqa	xmm1,[112+esp]
+	add	ecx,ebp
+	and	esi,edi
+	pxor	xmm5,xmm0
+	pshufd	xmm6,xmm2,238
+	xor	edi,eax
+	add	ecx,edx
+	ror	edx,7
+	xor	esi,eax
+	mov	ebp,ecx
+	punpcklqdq	xmm6,xmm3
+	movdqa	xmm0,xmm5
+	add	ebx,DWORD [32+esp]
+	xor	edx,edi
+	paddd	xmm1,xmm5
+	movdqa	[96+esp],xmm2
+	rol	ecx,5
+	add	ebx,esi
+	psrldq	xmm0,4
+	and	ebp,edx
+	xor	edx,edi
+	pxor	xmm6,xmm2
+	add	ebx,ecx
+	ror	ecx,7
+	pxor	xmm0,xmm4
+	xor	ebp,edi
+	mov	esi,ebx
+	add	eax,DWORD [36+esp]
+	pxor	xmm6,xmm0
+	xor	ecx,edx
+	rol	ebx,5
+	movdqa	[16+esp],xmm1
+	add	eax,ebp
+	and	esi,ecx
+	movdqa	xmm2,xmm6
+	xor	ecx,edx
+	add	eax,ebx
+	ror	ebx,7
+	movdqa	xmm0,xmm6
+	xor	esi,edx
+	pslldq	xmm2,12
+	paddd	xmm6,xmm6
+	mov	ebp,eax
+	add	edi,DWORD [40+esp]
+	psrld	xmm0,31
+	xor	ebx,ecx
+	rol	eax,5
+	movdqa	xmm1,xmm2
+	add	edi,esi
+	and	ebp,ebx
+	xor	ebx,ecx
+	psrld	xmm2,30
+	add	edi,eax
+	ror	eax,7
+	por	xmm6,xmm0
+	xor	ebp,ecx
+	movdqa	xmm0,[64+esp]
+	mov	esi,edi
+	add	edx,DWORD [44+esp]
+	pslld	xmm1,2
+	xor	eax,ebx
+	rol	edi,5
+	pxor	xmm6,xmm2
+	movdqa	xmm2,[112+esp]
+	add	edx,ebp
+	and	esi,eax
+	pxor	xmm6,xmm1
+	pshufd	xmm7,xmm3,238
+	xor	eax,ebx
+	add	edx,edi
+	ror	edi,7
+	xor	esi,ebx
+	mov	ebp,edx
+	punpcklqdq	xmm7,xmm4
+	movdqa	xmm1,xmm6
+	add	ecx,DWORD [48+esp]
+	xor	edi,eax
+	paddd	xmm2,xmm6
+	movdqa	[64+esp],xmm3
+	rol	edx,5
+	add	ecx,esi
+	psrldq	xmm1,4
+	and	ebp,edi
+	xor	edi,eax
+	pxor	xmm7,xmm3
+	add	ecx,edx
+	ror	edx,7
+	pxor	xmm1,xmm5
+	xor	ebp,eax
+	mov	esi,ecx
+	add	ebx,DWORD [52+esp]
+	pxor	xmm7,xmm1
+	xor	edx,edi
+	rol	ecx,5
+	movdqa	[32+esp],xmm2
+	add	ebx,ebp
+	and	esi,edx
+	movdqa	xmm3,xmm7
+	xor	edx,edi
+	add	ebx,ecx
+	ror	ecx,7
+	movdqa	xmm1,xmm7
+	xor	esi,edi
+	pslldq	xmm3,12
+	paddd	xmm7,xmm7
+	mov	ebp,ebx
+	add	eax,DWORD [56+esp]
+	psrld	xmm1,31
+	xor	ecx,edx
+	rol	ebx,5
+	movdqa	xmm2,xmm3
+	add	eax,esi
+	and	ebp,ecx
+	xor	ecx,edx
+	psrld	xmm3,30
+	add	eax,ebx
+	ror	ebx,7
+	por	xmm7,xmm1
+	xor	ebp,edx
+	movdqa	xmm1,[80+esp]
+	mov	esi,eax
+	add	edi,DWORD [60+esp]
+	pslld	xmm2,2
+	xor	ebx,ecx
+	rol	eax,5
+	pxor	xmm7,xmm3
+	movdqa	xmm3,[112+esp]
+	add	edi,ebp
+	and	esi,ebx
+	pxor	xmm7,xmm2
+	pshufd	xmm2,xmm6,238
+	xor	ebx,ecx
+	add	edi,eax
+	ror	eax,7
+	pxor	xmm0,xmm4
+	punpcklqdq	xmm2,xmm7
+	xor	esi,ecx
+	mov	ebp,edi
+	add	edx,DWORD [esp]
+	pxor	xmm0,xmm1
+	movdqa	[80+esp],xmm4
+	xor	eax,ebx
+	rol	edi,5
+	movdqa	xmm4,xmm3
+	add	edx,esi
+	paddd	xmm3,xmm7
+	and	ebp,eax
+	pxor	xmm0,xmm2
+	xor	eax,ebx
+	add	edx,edi
+	ror	edi,7
+	xor	ebp,ebx
+	movdqa	xmm2,xmm0
+	movdqa	[48+esp],xmm3
+	mov	esi,edx
+	add	ecx,DWORD [4+esp]
+	xor	edi,eax
+	rol	edx,5
+	pslld	xmm0,2
+	add	ecx,ebp
+	and	esi,edi
+	psrld	xmm2,30
+	xor	edi,eax
+	add	ecx,edx
+	ror	edx,7
+	xor	esi,eax
+	mov	ebp,ecx
+	add	ebx,DWORD [8+esp]
+	xor	edx,edi
+	rol	ecx,5
+	por	xmm0,xmm2
+	add	ebx,esi
+	and	ebp,edx
+	movdqa	xmm2,[96+esp]
+	xor	edx,edi
+	add	ebx,ecx
+	add	eax,DWORD [12+esp]
+	xor	ebp,edi
+	mov	esi,ebx
+	pshufd	xmm3,xmm7,238
+	rol	ebx,5
+	add	eax,ebp
+	xor	esi,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	edi,DWORD [16+esp]
+	pxor	xmm1,xmm5
+	punpcklqdq	xmm3,xmm0
+	xor	esi,ecx
+	mov	ebp,eax
+	rol	eax,5
+	pxor	xmm1,xmm2
+	movdqa	[96+esp],xmm5
+	add	edi,esi
+	xor	ebp,ecx
+	movdqa	xmm5,xmm4
+	ror	ebx,7
+	paddd	xmm4,xmm0
+	add	edi,eax
+	pxor	xmm1,xmm3
+	add	edx,DWORD [20+esp]
+	xor	ebp,ebx
+	mov	esi,edi
+	rol	edi,5
+	movdqa	xmm3,xmm1
+	movdqa	[esp],xmm4
+	add	edx,ebp
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,edi
+	pslld	xmm1,2
+	add	ecx,DWORD [24+esp]
+	xor	esi,eax
+	psrld	xmm3,30
+	mov	ebp,edx
+	rol	edx,5
+	add	ecx,esi
+	xor	ebp,eax
+	ror	edi,7
+	add	ecx,edx
+	por	xmm1,xmm3
+	add	ebx,DWORD [28+esp]
+	xor	ebp,edi
+	movdqa	xmm3,[64+esp]
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,ebp
+	xor	esi,edi
+	ror	edx,7
+	pshufd	xmm4,xmm0,238
+	add	ebx,ecx
+	add	eax,DWORD [32+esp]
+	pxor	xmm2,xmm6
+	punpcklqdq	xmm4,xmm1
+	xor	esi,edx
+	mov	ebp,ebx
+	rol	ebx,5
+	pxor	xmm2,xmm3
+	movdqa	[64+esp],xmm6
+	add	eax,esi
+	xor	ebp,edx
+	movdqa	xmm6,[128+esp]
+	ror	ecx,7
+	paddd	xmm5,xmm1
+	add	eax,ebx
+	pxor	xmm2,xmm4
+	add	edi,DWORD [36+esp]
+	xor	ebp,ecx
+	mov	esi,eax
+	rol	eax,5
+	movdqa	xmm4,xmm2
+	movdqa	[16+esp],xmm5
+	add	edi,ebp
+	xor	esi,ecx
+	ror	ebx,7
+	add	edi,eax
+	pslld	xmm2,2
+	add	edx,DWORD [40+esp]
+	xor	esi,ebx
+	psrld	xmm4,30
+	mov	ebp,edi
+	rol	edi,5
+	add	edx,esi
+	xor	ebp,ebx
+	ror	eax,7
+	add	edx,edi
+	por	xmm2,xmm4
+	add	ecx,DWORD [44+esp]
+	xor	ebp,eax
+	movdqa	xmm4,[80+esp]
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,ebp
+	xor	esi,eax
+	ror	edi,7
+	pshufd	xmm5,xmm1,238
+	add	ecx,edx
+	add	ebx,DWORD [48+esp]
+	pxor	xmm3,xmm7
+	punpcklqdq	xmm5,xmm2
+	xor	esi,edi
+	mov	ebp,ecx
+	rol	ecx,5
+	pxor	xmm3,xmm4
+	movdqa	[80+esp],xmm7
+	add	ebx,esi
+	xor	ebp,edi
+	movdqa	xmm7,xmm6
+	ror	edx,7
+	paddd	xmm6,xmm2
+	add	ebx,ecx
+	pxor	xmm3,xmm5
+	add	eax,DWORD [52+esp]
+	xor	ebp,edx
+	mov	esi,ebx
+	rol	ebx,5
+	movdqa	xmm5,xmm3
+	movdqa	[32+esp],xmm6
+	add	eax,ebp
+	xor	esi,edx
+	ror	ecx,7
+	add	eax,ebx
+	pslld	xmm3,2
+	add	edi,DWORD [56+esp]
+	xor	esi,ecx
+	psrld	xmm5,30
+	mov	ebp,eax
+	rol	eax,5
+	add	edi,esi
+	xor	ebp,ecx
+	ror	ebx,7
+	add	edi,eax
+	por	xmm3,xmm5
+	add	edx,DWORD [60+esp]
+	xor	ebp,ebx
+	movdqa	xmm5,[96+esp]
+	mov	esi,edi
+	rol	edi,5
+	add	edx,ebp
+	xor	esi,ebx
+	ror	eax,7
+	pshufd	xmm6,xmm2,238
+	add	edx,edi
+	add	ecx,DWORD [esp]
+	pxor	xmm4,xmm0
+	punpcklqdq	xmm6,xmm3
+	xor	esi,eax
+	mov	ebp,edx
+	rol	edx,5
+	pxor	xmm4,xmm5
+	movdqa	[96+esp],xmm0
+	add	ecx,esi
+	xor	ebp,eax
+	movdqa	xmm0,xmm7
+	ror	edi,7
+	paddd	xmm7,xmm3
+	add	ecx,edx
+	pxor	xmm4,xmm6
+	add	ebx,DWORD [4+esp]
+	xor	ebp,edi
+	mov	esi,ecx
+	rol	ecx,5
+	movdqa	xmm6,xmm4
+	movdqa	[48+esp],xmm7
+	add	ebx,ebp
+	xor	esi,edi
+	ror	edx,7
+	add	ebx,ecx
+	pslld	xmm4,2
+	add	eax,DWORD [8+esp]
+	xor	esi,edx
+	psrld	xmm6,30
+	mov	ebp,ebx
+	rol	ebx,5
+	add	eax,esi
+	xor	ebp,edx
+	ror	ecx,7
+	add	eax,ebx
+	por	xmm4,xmm6
+	add	edi,DWORD [12+esp]
+	xor	ebp,ecx
+	movdqa	xmm6,[64+esp]
+	mov	esi,eax
+	rol	eax,5
+	add	edi,ebp
+	xor	esi,ecx
+	ror	ebx,7
+	pshufd	xmm7,xmm3,238
+	add	edi,eax
+	add	edx,DWORD [16+esp]
+	pxor	xmm5,xmm1
+	punpcklqdq	xmm7,xmm4
+	xor	esi,ebx
+	mov	ebp,edi
+	rol	edi,5
+	pxor	xmm5,xmm6
+	movdqa	[64+esp],xmm1
+	add	edx,esi
+	xor	ebp,ebx
+	movdqa	xmm1,xmm0
+	ror	eax,7
+	paddd	xmm0,xmm4
+	add	edx,edi
+	pxor	xmm5,xmm7
+	add	ecx,DWORD [20+esp]
+	xor	ebp,eax
+	mov	esi,edx
+	rol	edx,5
+	movdqa	xmm7,xmm5
+	movdqa	[esp],xmm0
+	add	ecx,ebp
+	xor	esi,eax
+	ror	edi,7
+	add	ecx,edx
+	pslld	xmm5,2
+	add	ebx,DWORD [24+esp]
+	xor	esi,edi
+	psrld	xmm7,30
+	mov	ebp,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edi
+	ror	edx,7
+	add	ebx,ecx
+	por	xmm5,xmm7
+	add	eax,DWORD [28+esp]
+	movdqa	xmm7,[80+esp]
+	ror	ecx,7
+	mov	esi,ebx
+	xor	ebp,edx
+	rol	ebx,5
+	pshufd	xmm0,xmm4,238
+	add	eax,ebp
+	xor	esi,ecx
+	xor	ecx,edx
+	add	eax,ebx
+	add	edi,DWORD [32+esp]
+	pxor	xmm6,xmm2
+	punpcklqdq	xmm0,xmm5
+	and	esi,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	pxor	xmm6,xmm7
+	movdqa	[80+esp],xmm2
+	mov	ebp,eax
+	xor	esi,ecx
+	rol	eax,5
+	movdqa	xmm2,xmm1
+	add	edi,esi
+	paddd	xmm1,xmm5
+	xor	ebp,ebx
+	pxor	xmm6,xmm0
+	xor	ebx,ecx
+	add	edi,eax
+	add	edx,DWORD [36+esp]
+	and	ebp,ebx
+	movdqa	xmm0,xmm6
+	movdqa	[16+esp],xmm1
+	xor	ebx,ecx
+	ror	eax,7
+	mov	esi,edi
+	xor	ebp,ebx
+	rol	edi,5
+	pslld	xmm6,2
+	add	edx,ebp
+	xor	esi,eax
+	psrld	xmm0,30
+	xor	eax,ebx
+	add	edx,edi
+	add	ecx,DWORD [40+esp]
+	and	esi,eax
+	xor	eax,ebx
+	ror	edi,7
+	por	xmm6,xmm0
+	mov	ebp,edx
+	xor	esi,eax
+	movdqa	xmm0,[96+esp]
+	rol	edx,5
+	add	ecx,esi
+	xor	ebp,edi
+	xor	edi,eax
+	add	ecx,edx
+	pshufd	xmm1,xmm5,238
+	add	ebx,DWORD [44+esp]
+	and	ebp,edi
+	xor	edi,eax
+	ror	edx,7
+	mov	esi,ecx
+	xor	ebp,edi
+	rol	ecx,5
+	add	ebx,ebp
+	xor	esi,edx
+	xor	edx,edi
+	add	ebx,ecx
+	add	eax,DWORD [48+esp]
+	pxor	xmm7,xmm3
+	punpcklqdq	xmm1,xmm6
+	and	esi,edx
+	xor	edx,edi
+	ror	ecx,7
+	pxor	xmm7,xmm0
+	movdqa	[96+esp],xmm3
+	mov	ebp,ebx
+	xor	esi,edx
+	rol	ebx,5
+	movdqa	xmm3,[144+esp]
+	add	eax,esi
+	paddd	xmm2,xmm6
+	xor	ebp,ecx
+	pxor	xmm7,xmm1
+	xor	ecx,edx
+	add	eax,ebx
+	add	edi,DWORD [52+esp]
+	and	ebp,ecx
+	movdqa	xmm1,xmm7
+	movdqa	[32+esp],xmm2
+	xor	ecx,edx
+	ror	ebx,7
+	mov	esi,eax
+	xor	ebp,ecx
+	rol	eax,5
+	pslld	xmm7,2
+	add	edi,ebp
+	xor	esi,ebx
+	psrld	xmm1,30
+	xor	ebx,ecx
+	add	edi,eax
+	add	edx,DWORD [56+esp]
+	and	esi,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	por	xmm7,xmm1
+	mov	ebp,edi
+	xor	esi,ebx
+	movdqa	xmm1,[64+esp]
+	rol	edi,5
+	add	edx,esi
+	xor	ebp,eax
+	xor	eax,ebx
+	add	edx,edi
+	pshufd	xmm2,xmm6,238
+	add	ecx,DWORD [60+esp]
+	and	ebp,eax
+	xor	eax,ebx
+	ror	edi,7
+	mov	esi,edx
+	xor	ebp,eax
+	rol	edx,5
+	add	ecx,ebp
+	xor	esi,edi
+	xor	edi,eax
+	add	ecx,edx
+	add	ebx,DWORD [esp]
+	pxor	xmm0,xmm4
+	punpcklqdq	xmm2,xmm7
+	and	esi,edi
+	xor	edi,eax
+	ror	edx,7
+	pxor	xmm0,xmm1
+	movdqa	[64+esp],xmm4
+	mov	ebp,ecx
+	xor	esi,edi
+	rol	ecx,5
+	movdqa	xmm4,xmm3
+	add	ebx,esi
+	paddd	xmm3,xmm7
+	xor	ebp,edx
+	pxor	xmm0,xmm2
+	xor	edx,edi
+	add	ebx,ecx
+	add	eax,DWORD [4+esp]
+	and	ebp,edx
+	movdqa	xmm2,xmm0
+	movdqa	[48+esp],xmm3
+	xor	edx,edi
+	ror	ecx,7
+	mov	esi,ebx
+	xor	ebp,edx
+	rol	ebx,5
+	pslld	xmm0,2
+	add	eax,ebp
+	xor	esi,ecx
+	psrld	xmm2,30
+	xor	ecx,edx
+	add	eax,ebx
+	add	edi,DWORD [8+esp]
+	and	esi,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	por	xmm0,xmm2
+	mov	ebp,eax
+	xor	esi,ecx
+	movdqa	xmm2,[80+esp]
+	rol	eax,5
+	add	edi,esi
+	xor	ebp,ebx
+	xor	ebx,ecx
+	add	edi,eax
+	pshufd	xmm3,xmm7,238
+	add	edx,DWORD [12+esp]
+	and	ebp,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	mov	esi,edi
+	xor	ebp,ebx
+	rol	edi,5
+	add	edx,ebp
+	xor	esi,eax
+	xor	eax,ebx
+	add	edx,edi
+	add	ecx,DWORD [16+esp]
+	pxor	xmm1,xmm5
+	punpcklqdq	xmm3,xmm0
+	and	esi,eax
+	xor	eax,ebx
+	ror	edi,7
+	pxor	xmm1,xmm2
+	movdqa	[80+esp],xmm5
+	mov	ebp,edx
+	xor	esi,eax
+	rol	edx,5
+	movdqa	xmm5,xmm4
+	add	ecx,esi
+	paddd	xmm4,xmm0
+	xor	ebp,edi
+	pxor	xmm1,xmm3
+	xor	edi,eax
+	add	ecx,edx
+	add	ebx,DWORD [20+esp]
+	and	ebp,edi
+	movdqa	xmm3,xmm1
+	movdqa	[esp],xmm4
+	xor	edi,eax
+	ror	edx,7
+	mov	esi,ecx
+	xor	ebp,edi
+	rol	ecx,5
+	pslld	xmm1,2
+	add	ebx,ebp
+	xor	esi,edx
+	psrld	xmm3,30
+	xor	edx,edi
+	add	ebx,ecx
+	add	eax,DWORD [24+esp]
+	and	esi,edx
+	xor	edx,edi
+	ror	ecx,7
+	por	xmm1,xmm3
+	mov	ebp,ebx
+	xor	esi,edx
+	movdqa	xmm3,[96+esp]
+	rol	ebx,5
+	add	eax,esi
+	xor	ebp,ecx
+	xor	ecx,edx
+	add	eax,ebx
+	pshufd	xmm4,xmm0,238
+	add	edi,DWORD [28+esp]
+	and	ebp,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	mov	esi,eax
+	xor	ebp,ecx
+	rol	eax,5
+	add	edi,ebp
+	xor	esi,ebx
+	xor	ebx,ecx
+	add	edi,eax
+	add	edx,DWORD [32+esp]
+	pxor	xmm2,xmm6
+	punpcklqdq	xmm4,xmm1
+	and	esi,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	pxor	xmm2,xmm3
+	movdqa	[96+esp],xmm6
+	mov	ebp,edi
+	xor	esi,ebx
+	rol	edi,5
+	movdqa	xmm6,xmm5
+	add	edx,esi
+	paddd	xmm5,xmm1
+	xor	ebp,eax
+	pxor	xmm2,xmm4
+	xor	eax,ebx
+	add	edx,edi
+	add	ecx,DWORD [36+esp]
+	and	ebp,eax
+	movdqa	xmm4,xmm2
+	movdqa	[16+esp],xmm5
+	xor	eax,ebx
+	ror	edi,7
+	mov	esi,edx
+	xor	ebp,eax
+	rol	edx,5
+	pslld	xmm2,2
+	add	ecx,ebp
+	xor	esi,edi
+	psrld	xmm4,30
+	xor	edi,eax
+	add	ecx,edx
+	add	ebx,DWORD [40+esp]
+	and	esi,edi
+	xor	edi,eax
+	ror	edx,7
+	por	xmm2,xmm4
+	mov	ebp,ecx
+	xor	esi,edi
+	movdqa	xmm4,[64+esp]
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edx
+	xor	edx,edi
+	add	ebx,ecx
+	pshufd	xmm5,xmm1,238
+	add	eax,DWORD [44+esp]
+	and	ebp,edx
+	xor	edx,edi
+	ror	ecx,7
+	mov	esi,ebx
+	xor	ebp,edx
+	rol	ebx,5
+	add	eax,ebp
+	xor	esi,edx
+	add	eax,ebx
+	add	edi,DWORD [48+esp]
+	pxor	xmm3,xmm7
+	punpcklqdq	xmm5,xmm2
+	xor	esi,ecx
+	mov	ebp,eax
+	rol	eax,5
+	pxor	xmm3,xmm4
+	movdqa	[64+esp],xmm7
+	add	edi,esi
+	xor	ebp,ecx
+	movdqa	xmm7,xmm6
+	ror	ebx,7
+	paddd	xmm6,xmm2
+	add	edi,eax
+	pxor	xmm3,xmm5
+	add	edx,DWORD [52+esp]
+	xor	ebp,ebx
+	mov	esi,edi
+	rol	edi,5
+	movdqa	xmm5,xmm3
+	movdqa	[32+esp],xmm6
+	add	edx,ebp
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,edi
+	pslld	xmm3,2
+	add	ecx,DWORD [56+esp]
+	xor	esi,eax
+	psrld	xmm5,30
+	mov	ebp,edx
+	rol	edx,5
+	add	ecx,esi
+	xor	ebp,eax
+	ror	edi,7
+	add	ecx,edx
+	por	xmm3,xmm5
+	add	ebx,DWORD [60+esp]
+	xor	ebp,edi
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,ebp
+	xor	esi,edi
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD [esp]
+	xor	esi,edx
+	mov	ebp,ebx
+	rol	ebx,5
+	add	eax,esi
+	xor	ebp,edx
+	ror	ecx,7
+	paddd	xmm7,xmm3
+	add	eax,ebx
+	add	edi,DWORD [4+esp]
+	xor	ebp,ecx
+	mov	esi,eax
+	movdqa	[48+esp],xmm7
+	rol	eax,5
+	add	edi,ebp
+	xor	esi,ecx
+	ror	ebx,7
+	add	edi,eax
+	add	edx,DWORD [8+esp]
+	xor	esi,ebx
+	mov	ebp,edi
+	rol	edi,5
+	add	edx,esi
+	xor	ebp,ebx
+	ror	eax,7
+	add	edx,edi
+	add	ecx,DWORD [12+esp]
+	xor	ebp,eax
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,ebp
+	xor	esi,eax
+	ror	edi,7
+	add	ecx,edx
+	mov	ebp,DWORD [196+esp]
+	cmp	ebp,DWORD [200+esp]
+	je	NEAR L$007done
+	movdqa	xmm7,[160+esp]
+	movdqa	xmm6,[176+esp]
+	movdqu	xmm0,[ebp]
+	movdqu	xmm1,[16+ebp]
+	movdqu	xmm2,[32+ebp]
+	movdqu	xmm3,[48+ebp]
+	add	ebp,64
+db	102,15,56,0,198
+	mov	DWORD [196+esp],ebp
+	movdqa	[96+esp],xmm7
+	add	ebx,DWORD [16+esp]
+	xor	esi,edi
+	mov	ebp,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edi
+	ror	edx,7
+db	102,15,56,0,206
+	add	ebx,ecx
+	add	eax,DWORD [20+esp]
+	xor	ebp,edx
+	mov	esi,ebx
+	paddd	xmm0,xmm7
+	rol	ebx,5
+	add	eax,ebp
+	xor	esi,edx
+	ror	ecx,7
+	movdqa	[esp],xmm0
+	add	eax,ebx
+	add	edi,DWORD [24+esp]
+	xor	esi,ecx
+	mov	ebp,eax
+	psubd	xmm0,xmm7
+	rol	eax,5
+	add	edi,esi
+	xor	ebp,ecx
+	ror	ebx,7
+	add	edi,eax
+	add	edx,DWORD [28+esp]
+	xor	ebp,ebx
+	mov	esi,edi
+	rol	edi,5
+	add	edx,ebp
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,edi
+	add	ecx,DWORD [32+esp]
+	xor	esi,eax
+	mov	ebp,edx
+	rol	edx,5
+	add	ecx,esi
+	xor	ebp,eax
+	ror	edi,7
+db	102,15,56,0,214
+	add	ecx,edx
+	add	ebx,DWORD [36+esp]
+	xor	ebp,edi
+	mov	esi,ecx
+	paddd	xmm1,xmm7
+	rol	ecx,5
+	add	ebx,ebp
+	xor	esi,edi
+	ror	edx,7
+	movdqa	[16+esp],xmm1
+	add	ebx,ecx
+	add	eax,DWORD [40+esp]
+	xor	esi,edx
+	mov	ebp,ebx
+	psubd	xmm1,xmm7
+	rol	ebx,5
+	add	eax,esi
+	xor	ebp,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	edi,DWORD [44+esp]
+	xor	ebp,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	edi,ebp
+	xor	esi,ecx
+	ror	ebx,7
+	add	edi,eax
+	add	edx,DWORD [48+esp]
+	xor	esi,ebx
+	mov	ebp,edi
+	rol	edi,5
+	add	edx,esi
+	xor	ebp,ebx
+	ror	eax,7
+db	102,15,56,0,222
+	add	edx,edi
+	add	ecx,DWORD [52+esp]
+	xor	ebp,eax
+	mov	esi,edx
+	paddd	xmm2,xmm7
+	rol	edx,5
+	add	ecx,ebp
+	xor	esi,eax
+	ror	edi,7
+	movdqa	[32+esp],xmm2
+	add	ecx,edx
+	add	ebx,DWORD [56+esp]
+	xor	esi,edi
+	mov	ebp,ecx
+	psubd	xmm2,xmm7
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edi
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD [60+esp]
+	xor	ebp,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,ebp
+	ror	ecx,7
+	add	eax,ebx
+	mov	ebp,DWORD [192+esp]
+	add	eax,DWORD [ebp]
+	add	esi,DWORD [4+ebp]
+	add	ecx,DWORD [8+ebp]
+	mov	DWORD [ebp],eax
+	add	edx,DWORD [12+ebp]
+	mov	DWORD [4+ebp],esi
+	add	edi,DWORD [16+ebp]
+	mov	DWORD [8+ebp],ecx
+	mov	ebx,ecx
+	mov	DWORD [12+ebp],edx
+	xor	ebx,edx
+	mov	DWORD [16+ebp],edi
+	mov	ebp,esi
+	pshufd	xmm4,xmm0,238
+	and	esi,ebx
+	mov	ebx,ebp
+	jmp	NEAR L$006loop
+align	16
+L$007done:
+	add	ebx,DWORD [16+esp]
+	xor	esi,edi
+	mov	ebp,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edi
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD [20+esp]
+	xor	ebp,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,ebp
+	xor	esi,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	edi,DWORD [24+esp]
+	xor	esi,ecx
+	mov	ebp,eax
+	rol	eax,5
+	add	edi,esi
+	xor	ebp,ecx
+	ror	ebx,7
+	add	edi,eax
+	add	edx,DWORD [28+esp]
+	xor	ebp,ebx
+	mov	esi,edi
+	rol	edi,5
+	add	edx,ebp
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,edi
+	add	ecx,DWORD [32+esp]
+	xor	esi,eax
+	mov	ebp,edx
+	rol	edx,5
+	add	ecx,esi
+	xor	ebp,eax
+	ror	edi,7
+	add	ecx,edx
+	add	ebx,DWORD [36+esp]
+	xor	ebp,edi
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,ebp
+	xor	esi,edi
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD [40+esp]
+	xor	esi,edx
+	mov	ebp,ebx
+	rol	ebx,5
+	add	eax,esi
+	xor	ebp,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	edi,DWORD [44+esp]
+	xor	ebp,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	edi,ebp
+	xor	esi,ecx
+	ror	ebx,7
+	add	edi,eax
+	add	edx,DWORD [48+esp]
+	xor	esi,ebx
+	mov	ebp,edi
+	rol	edi,5
+	add	edx,esi
+	xor	ebp,ebx
+	ror	eax,7
+	add	edx,edi
+	add	ecx,DWORD [52+esp]
+	xor	ebp,eax
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,ebp
+	xor	esi,eax
+	ror	edi,7
+	add	ecx,edx
+	add	ebx,DWORD [56+esp]
+	xor	esi,edi
+	mov	ebp,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	ebp,edi
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD [60+esp]
+	xor	ebp,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,ebp
+	ror	ecx,7
+	add	eax,ebx
+	mov	ebp,DWORD [192+esp]
+	add	eax,DWORD [ebp]
+	mov	esp,DWORD [204+esp]
+	add	esi,DWORD [4+ebp]
+	add	ecx,DWORD [8+ebp]
+	mov	DWORD [ebp],eax
+	add	edx,DWORD [12+ebp]
+	mov	DWORD [4+ebp],esi
+	add	edi,DWORD [16+ebp]
+	mov	DWORD [8+ebp],ecx
+	mov	DWORD [12+ebp],edx
+	mov	DWORD [16+ebp],edi
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	64
+L$K_XX_XX:
+dd	1518500249,1518500249,1518500249,1518500249
+dd	1859775393,1859775393,1859775393,1859775393
+dd	2400959708,2400959708,2400959708,2400959708
+dd	3395469782,3395469782,3395469782,3395469782
+dd	66051,67438087,134810123,202182159
+db	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+db	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
+db	102,111,114,109,32,102,111,114,32,120,56,54,44,32,67,82
+db	89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112
+db	114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm
new file mode 100644
index 0000000..fe36bc5
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/sha/sha256-586.asm
@@ -0,0 +1,4591 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_sha256_block_data_order
+align	16
+_sha256_block_data_order:
+L$_sha256_block_data_order_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	ebx,esp
+	call	L$000pic_point
+L$000pic_point:
+	pop	ebp
+	lea	ebp,[(L$001K256-L$000pic_point)+ebp]
+	sub	esp,16
+	and	esp,-64
+	shl	eax,6
+	add	eax,edi
+	mov	DWORD [esp],esi
+	mov	DWORD [4+esp],edi
+	mov	DWORD [8+esp],eax
+	mov	DWORD [12+esp],ebx
+	lea	edx,[_OPENSSL_ia32cap_P]
+	mov	ecx,DWORD [edx]
+	mov	ebx,DWORD [4+edx]
+	test	ecx,1048576
+	jnz	NEAR L$002loop
+	mov	edx,DWORD [8+edx]
+	test	ecx,16777216
+	jz	NEAR L$003no_xmm
+	and	ecx,1073741824
+	and	ebx,268435968
+	test	edx,536870912
+	jnz	NEAR L$004shaext
+	or	ecx,ebx
+	and	ecx,1342177280
+	cmp	ecx,1342177280
+	test	ebx,512
+	jnz	NEAR L$005SSSE3
+L$003no_xmm:
+	sub	eax,edi
+	cmp	eax,256
+	jae	NEAR L$006unrolled
+	jmp	NEAR L$002loop
+align	16
+L$002loop:
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	bswap	eax
+	mov	edx,DWORD [12+edi]
+	bswap	ebx
+	push	eax
+	bswap	ecx
+	push	ebx
+	bswap	edx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [16+edi]
+	mov	ebx,DWORD [20+edi]
+	mov	ecx,DWORD [24+edi]
+	bswap	eax
+	mov	edx,DWORD [28+edi]
+	bswap	ebx
+	push	eax
+	bswap	ecx
+	push	ebx
+	bswap	edx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [32+edi]
+	mov	ebx,DWORD [36+edi]
+	mov	ecx,DWORD [40+edi]
+	bswap	eax
+	mov	edx,DWORD [44+edi]
+	bswap	ebx
+	push	eax
+	bswap	ecx
+	push	ebx
+	bswap	edx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [48+edi]
+	mov	ebx,DWORD [52+edi]
+	mov	ecx,DWORD [56+edi]
+	bswap	eax
+	mov	edx,DWORD [60+edi]
+	bswap	ebx
+	push	eax
+	bswap	ecx
+	push	ebx
+	bswap	edx
+	push	ecx
+	push	edx
+	add	edi,64
+	lea	esp,[esp-36]
+	mov	DWORD [104+esp],edi
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edi,DWORD [12+esi]
+	mov	DWORD [8+esp],ebx
+	xor	ebx,ecx
+	mov	DWORD [12+esp],ecx
+	mov	DWORD [16+esp],edi
+	mov	DWORD [esp],ebx
+	mov	edx,DWORD [16+esi]
+	mov	ebx,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	edi,DWORD [28+esi]
+	mov	DWORD [24+esp],ebx
+	mov	DWORD [28+esp],ecx
+	mov	DWORD [32+esp],edi
+align	16
+L$00700_15:
+	mov	ecx,edx
+	mov	esi,DWORD [24+esp]
+	ror	ecx,14
+	mov	edi,DWORD [28+esp]
+	xor	ecx,edx
+	xor	esi,edi
+	mov	ebx,DWORD [96+esp]
+	ror	ecx,5
+	and	esi,edx
+	mov	DWORD [20+esp],edx
+	xor	edx,ecx
+	add	ebx,DWORD [32+esp]
+	xor	esi,edi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,esi
+	ror	ecx,9
+	add	ebx,edx
+	mov	edi,DWORD [8+esp]
+	xor	ecx,eax
+	mov	DWORD [4+esp],eax
+	lea	esp,[esp-4]
+	ror	ecx,11
+	mov	esi,DWORD [ebp]
+	xor	ecx,eax
+	mov	edx,DWORD [20+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	ebx,esi
+	mov	DWORD [esp],eax
+	add	edx,ebx
+	and	eax,DWORD [4+esp]
+	add	ebx,ecx
+	xor	eax,edi
+	add	ebp,4
+	add	eax,ebx
+	cmp	esi,3248222580
+	jne	NEAR L$00700_15
+	mov	ecx,DWORD [156+esp]
+	jmp	NEAR L$00816_63
+align	16
+L$00816_63:
+	mov	ebx,ecx
+	mov	esi,DWORD [104+esp]
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [160+esp]
+	shr	edi,10
+	add	ebx,DWORD [124+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [24+esp]
+	ror	ecx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	ecx,edx
+	xor	esi,edi
+	mov	DWORD [96+esp],ebx
+	ror	ecx,5
+	and	esi,edx
+	mov	DWORD [20+esp],edx
+	xor	edx,ecx
+	add	ebx,DWORD [32+esp]
+	xor	esi,edi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,esi
+	ror	ecx,9
+	add	ebx,edx
+	mov	edi,DWORD [8+esp]
+	xor	ecx,eax
+	mov	DWORD [4+esp],eax
+	lea	esp,[esp-4]
+	ror	ecx,11
+	mov	esi,DWORD [ebp]
+	xor	ecx,eax
+	mov	edx,DWORD [20+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	ebx,esi
+	mov	DWORD [esp],eax
+	add	edx,ebx
+	and	eax,DWORD [4+esp]
+	add	ebx,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [156+esp]
+	add	ebp,4
+	add	eax,ebx
+	cmp	esi,3329325298
+	jne	NEAR L$00816_63
+	mov	esi,DWORD [356+esp]
+	mov	ebx,DWORD [8+esp]
+	mov	ecx,DWORD [16+esp]
+	add	eax,DWORD [esi]
+	add	ebx,DWORD [4+esi]
+	add	edi,DWORD [8+esi]
+	add	ecx,DWORD [12+esi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],edi
+	mov	DWORD [12+esi],ecx
+	mov	eax,DWORD [24+esp]
+	mov	ebx,DWORD [28+esp]
+	mov	ecx,DWORD [32+esp]
+	mov	edi,DWORD [360+esp]
+	add	edx,DWORD [16+esi]
+	add	eax,DWORD [20+esi]
+	add	ebx,DWORD [24+esi]
+	add	ecx,DWORD [28+esi]
+	mov	DWORD [16+esi],edx
+	mov	DWORD [20+esi],eax
+	mov	DWORD [24+esi],ebx
+	mov	DWORD [28+esi],ecx
+	lea	esp,[356+esp]
+	sub	ebp,256
+	cmp	edi,DWORD [8+esp]
+	jb	NEAR L$002loop
+	mov	esp,DWORD [12+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	64
+L$001K256:
+dd	1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298
+dd	66051,67438087,134810123,202182159
+db	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
+db	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+db	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+db	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+db	62,0
+align	16
+L$006unrolled:
+	lea	esp,[esp-96]
+	mov	eax,DWORD [esi]
+	mov	ebp,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	ebx,DWORD [12+esi]
+	mov	DWORD [4+esp],ebp
+	xor	ebp,ecx
+	mov	DWORD [8+esp],ecx
+	mov	DWORD [12+esp],ebx
+	mov	edx,DWORD [16+esi]
+	mov	ebx,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	esi,DWORD [28+esi]
+	mov	DWORD [20+esp],ebx
+	mov	DWORD [24+esp],ecx
+	mov	DWORD [28+esp],esi
+	jmp	NEAR L$009grand_loop
+align	16
+L$009grand_loop:
+	mov	ebx,DWORD [edi]
+	mov	ecx,DWORD [4+edi]
+	bswap	ebx
+	mov	esi,DWORD [8+edi]
+	bswap	ecx
+	mov	DWORD [32+esp],ebx
+	bswap	esi
+	mov	DWORD [36+esp],ecx
+	mov	DWORD [40+esp],esi
+	mov	ebx,DWORD [12+edi]
+	mov	ecx,DWORD [16+edi]
+	bswap	ebx
+	mov	esi,DWORD [20+edi]
+	bswap	ecx
+	mov	DWORD [44+esp],ebx
+	bswap	esi
+	mov	DWORD [48+esp],ecx
+	mov	DWORD [52+esp],esi
+	mov	ebx,DWORD [24+edi]
+	mov	ecx,DWORD [28+edi]
+	bswap	ebx
+	mov	esi,DWORD [32+edi]
+	bswap	ecx
+	mov	DWORD [56+esp],ebx
+	bswap	esi
+	mov	DWORD [60+esp],ecx
+	mov	DWORD [64+esp],esi
+	mov	ebx,DWORD [36+edi]
+	mov	ecx,DWORD [40+edi]
+	bswap	ebx
+	mov	esi,DWORD [44+edi]
+	bswap	ecx
+	mov	DWORD [68+esp],ebx
+	bswap	esi
+	mov	DWORD [72+esp],ecx
+	mov	DWORD [76+esp],esi
+	mov	ebx,DWORD [48+edi]
+	mov	ecx,DWORD [52+edi]
+	bswap	ebx
+	mov	esi,DWORD [56+edi]
+	bswap	ecx
+	mov	DWORD [80+esp],ebx
+	bswap	esi
+	mov	DWORD [84+esp],ecx
+	mov	DWORD [88+esp],esi
+	mov	ebx,DWORD [60+edi]
+	add	edi,64
+	bswap	ebx
+	mov	DWORD [100+esp],edi
+	mov	DWORD [92+esp],ebx
+	mov	ecx,edx
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [32+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1116352408+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [36+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1899447441+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [40+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3049323471+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [44+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3921009573+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [48+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[961987163+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [52+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1508970993+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [56+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2453635748+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [60+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2870763221+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [64+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3624381080+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [68+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[310598401+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [72+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[607225278+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [76+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1426881987+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [80+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1925078388+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [84+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2162078206+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	ecx,edx
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	ebx,DWORD [88+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2614888103+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	esi,edx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	ebx,DWORD [92+esp]
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3248222580+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [36+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [88+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [32+esp]
+	shr	edi,10
+	add	ebx,DWORD [68+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [32+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3835390401+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [40+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [92+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [36+esp]
+	shr	edi,10
+	add	ebx,DWORD [72+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [36+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[4022224774+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [44+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [32+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [40+esp]
+	shr	edi,10
+	add	ebx,DWORD [76+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [40+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[264347078+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [48+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [36+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [44+esp]
+	shr	edi,10
+	add	ebx,DWORD [80+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [44+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[604807628+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [52+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [40+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [48+esp]
+	shr	edi,10
+	add	ebx,DWORD [84+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [48+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[770255983+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [56+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [44+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [52+esp]
+	shr	edi,10
+	add	ebx,DWORD [88+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [52+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1249150122+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [60+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [48+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [56+esp]
+	shr	edi,10
+	add	ebx,DWORD [92+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	DWORD [56+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1555081692+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [64+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [52+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [60+esp]
+	shr	edi,10
+	add	ebx,DWORD [32+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	DWORD [60+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1996064986+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [68+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [56+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [64+esp]
+	shr	edi,10
+	add	ebx,DWORD [36+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [64+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2554220882+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [72+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [60+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [68+esp]
+	shr	edi,10
+	add	ebx,DWORD [40+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [68+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2821834349+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [76+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [64+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [72+esp]
+	shr	edi,10
+	add	ebx,DWORD [44+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [72+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2952996808+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [80+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [68+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [76+esp]
+	shr	edi,10
+	add	ebx,DWORD [48+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [76+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3210313671+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [84+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [72+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [80+esp]
+	shr	edi,10
+	add	ebx,DWORD [52+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [80+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3336571891+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [88+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [76+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [84+esp]
+	shr	edi,10
+	add	ebx,DWORD [56+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [84+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3584528711+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [92+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [80+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [88+esp]
+	shr	edi,10
+	add	ebx,DWORD [60+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	DWORD [88+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[113926993+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [32+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [84+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [92+esp]
+	shr	edi,10
+	add	ebx,DWORD [64+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	DWORD [92+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[338241895+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [36+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [88+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [32+esp]
+	shr	edi,10
+	add	ebx,DWORD [68+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [32+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[666307205+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [40+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [92+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [36+esp]
+	shr	edi,10
+	add	ebx,DWORD [72+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [36+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[773529912+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [44+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [32+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [40+esp]
+	shr	edi,10
+	add	ebx,DWORD [76+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [40+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1294757372+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [48+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [36+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [44+esp]
+	shr	edi,10
+	add	ebx,DWORD [80+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [44+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1396182291+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [52+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [40+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [48+esp]
+	shr	edi,10
+	add	ebx,DWORD [84+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [48+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1695183700+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [56+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [44+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [52+esp]
+	shr	edi,10
+	add	ebx,DWORD [88+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [52+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1986661051+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [60+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [48+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [56+esp]
+	shr	edi,10
+	add	ebx,DWORD [92+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	DWORD [56+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2177026350+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [64+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [52+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [60+esp]
+	shr	edi,10
+	add	ebx,DWORD [32+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	DWORD [60+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2456956037+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [68+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [56+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [64+esp]
+	shr	edi,10
+	add	ebx,DWORD [36+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [64+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2730485921+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [72+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [60+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [68+esp]
+	shr	edi,10
+	add	ebx,DWORD [40+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [68+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2820302411+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [76+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [64+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [72+esp]
+	shr	edi,10
+	add	ebx,DWORD [44+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [72+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3259730800+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [80+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [68+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [76+esp]
+	shr	edi,10
+	add	ebx,DWORD [48+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [76+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3345764771+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [84+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [72+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [80+esp]
+	shr	edi,10
+	add	ebx,DWORD [52+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [80+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3516065817+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [88+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [76+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [84+esp]
+	shr	edi,10
+	add	ebx,DWORD [56+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [84+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3600352804+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [92+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [80+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [88+esp]
+	shr	edi,10
+	add	ebx,DWORD [60+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	DWORD [88+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[4094571909+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [32+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [84+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [92+esp]
+	shr	edi,10
+	add	ebx,DWORD [64+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	DWORD [92+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[275423344+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [36+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [88+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [32+esp]
+	shr	edi,10
+	add	ebx,DWORD [68+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [32+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[430227734+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [40+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [92+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [36+esp]
+	shr	edi,10
+	add	ebx,DWORD [72+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [36+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[506948616+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [44+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [32+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [40+esp]
+	shr	edi,10
+	add	ebx,DWORD [76+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [40+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[659060556+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [48+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [36+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [44+esp]
+	shr	edi,10
+	add	ebx,DWORD [80+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [44+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[883997877+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [52+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [40+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [48+esp]
+	shr	edi,10
+	add	ebx,DWORD [84+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [48+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[958139571+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [56+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [44+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [52+esp]
+	shr	edi,10
+	add	ebx,DWORD [88+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [52+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1322822218+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [60+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [48+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [56+esp]
+	shr	edi,10
+	add	ebx,DWORD [92+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	mov	DWORD [56+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1537002063+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [64+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [52+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [60+esp]
+	shr	edi,10
+	add	ebx,DWORD [32+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	mov	DWORD [60+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[1747873779+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [68+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [56+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [64+esp]
+	shr	edi,10
+	add	ebx,DWORD [36+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [20+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	DWORD [64+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [28+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [4+esp]
+	xor	ecx,eax
+	mov	DWORD [esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[1955562222+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [72+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [12+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [60+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [68+esp]
+	shr	edi,10
+	add	ebx,DWORD [40+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [16+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [20+esp]
+	xor	edx,esi
+	mov	DWORD [68+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [12+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [24+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [esp]
+	xor	esi,ebp
+	mov	DWORD [28+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2024104815+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [76+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,esi
+	mov	esi,DWORD [64+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [72+esp]
+	shr	edi,10
+	add	ebx,DWORD [44+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [12+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	DWORD [72+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [20+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [28+esp]
+	xor	ecx,eax
+	mov	DWORD [24+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2227730452+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [80+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [4+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [68+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [76+esp]
+	shr	edi,10
+	add	ebx,DWORD [48+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [8+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [12+esp]
+	xor	edx,esi
+	mov	DWORD [76+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [4+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [16+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [24+esp]
+	xor	esi,ebp
+	mov	DWORD [20+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2361852424+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [84+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,esi
+	mov	esi,DWORD [72+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [80+esp]
+	shr	edi,10
+	add	ebx,DWORD [52+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [4+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	DWORD [80+esp],ebx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [12+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [20+esp]
+	xor	ecx,eax
+	mov	DWORD [16+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[2428436474+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [88+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [28+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [76+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [84+esp]
+	shr	edi,10
+	add	ebx,DWORD [56+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [4+esp]
+	xor	edx,esi
+	mov	DWORD [84+esp],ebx
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [28+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [8+esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [16+esp]
+	xor	esi,ebp
+	mov	DWORD [12+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[2756734187+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	mov	ecx,DWORD [92+esp]
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,esi
+	mov	esi,DWORD [80+esp]
+	mov	ebx,ecx
+	ror	ecx,11
+	mov	edi,esi
+	ror	esi,2
+	xor	ecx,ebx
+	shr	ebx,3
+	ror	ecx,7
+	xor	esi,edi
+	xor	ebx,ecx
+	ror	esi,17
+	add	ebx,DWORD [88+esp]
+	shr	edi,10
+	add	ebx,DWORD [60+esp]
+	mov	ecx,edx
+	xor	edi,esi
+	mov	esi,DWORD [28+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [esp]
+	xor	edx,ecx
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	add	ebx,DWORD [4+esp]
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	ebx,edi
+	ror	ecx,9
+	mov	esi,eax
+	mov	edi,DWORD [12+esp]
+	xor	ecx,eax
+	mov	DWORD [8+esp],eax
+	xor	eax,edi
+	ror	ecx,11
+	and	ebp,eax
+	lea	edx,[3204031479+edx*1+ebx]
+	xor	ecx,esi
+	xor	ebp,edi
+	mov	esi,DWORD [32+esp]
+	ror	ecx,2
+	add	ebp,edx
+	add	edx,DWORD [20+esp]
+	add	ebp,ecx
+	mov	ecx,DWORD [84+esp]
+	mov	ebx,esi
+	ror	esi,11
+	mov	edi,ecx
+	ror	ecx,2
+	xor	esi,ebx
+	shr	ebx,3
+	ror	esi,7
+	xor	ecx,edi
+	xor	ebx,esi
+	ror	ecx,17
+	add	ebx,DWORD [92+esp]
+	shr	edi,10
+	add	ebx,DWORD [64+esp]
+	mov	esi,edx
+	xor	edi,ecx
+	mov	ecx,DWORD [24+esp]
+	ror	edx,14
+	add	ebx,edi
+	mov	edi,DWORD [28+esp]
+	xor	edx,esi
+	xor	ecx,edi
+	ror	edx,5
+	and	ecx,esi
+	mov	DWORD [20+esp],esi
+	xor	edx,esi
+	add	ebx,DWORD [esp]
+	xor	edi,ecx
+	ror	edx,6
+	mov	esi,ebp
+	add	ebx,edi
+	ror	esi,9
+	mov	ecx,ebp
+	mov	edi,DWORD [8+esp]
+	xor	esi,ebp
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	ror	esi,11
+	and	eax,ebp
+	lea	edx,[3329325298+edx*1+ebx]
+	xor	esi,ecx
+	xor	eax,edi
+	ror	esi,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,esi
+	mov	esi,DWORD [96+esp]
+	xor	ebp,edi
+	mov	ecx,DWORD [12+esp]
+	add	eax,DWORD [esi]
+	add	ebp,DWORD [4+esi]
+	add	edi,DWORD [8+esi]
+	add	ecx,DWORD [12+esi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebp
+	mov	DWORD [8+esi],edi
+	mov	DWORD [12+esi],ecx
+	mov	DWORD [4+esp],ebp
+	xor	ebp,edi
+	mov	DWORD [8+esp],edi
+	mov	DWORD [12+esp],ecx
+	mov	edi,DWORD [20+esp]
+	mov	ebx,DWORD [24+esp]
+	mov	ecx,DWORD [28+esp]
+	add	edx,DWORD [16+esi]
+	add	edi,DWORD [20+esi]
+	add	ebx,DWORD [24+esi]
+	add	ecx,DWORD [28+esi]
+	mov	DWORD [16+esi],edx
+	mov	DWORD [20+esi],edi
+	mov	DWORD [24+esi],ebx
+	mov	DWORD [28+esi],ecx
+	mov	DWORD [20+esp],edi
+	mov	edi,DWORD [100+esp]
+	mov	DWORD [24+esp],ebx
+	mov	DWORD [28+esp],ecx
+	cmp	edi,DWORD [104+esp]
+	jb	NEAR L$009grand_loop
+	mov	esp,DWORD [108+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	32
+L$004shaext:
+	sub	esp,32
+	movdqu	xmm1,[esi]
+	lea	ebp,[128+ebp]
+	movdqu	xmm2,[16+esi]
+	movdqa	xmm7,[128+ebp]
+	pshufd	xmm0,xmm1,27
+	pshufd	xmm1,xmm1,177
+	pshufd	xmm2,xmm2,27
+db	102,15,58,15,202,8
+	punpcklqdq	xmm2,xmm0
+	jmp	NEAR L$010loop_shaext
+align	16
+L$010loop_shaext:
+	movdqu	xmm3,[edi]
+	movdqu	xmm4,[16+edi]
+	movdqu	xmm5,[32+edi]
+db	102,15,56,0,223
+	movdqu	xmm6,[48+edi]
+	movdqa	[16+esp],xmm2
+	movdqa	xmm0,[ebp-128]
+	paddd	xmm0,xmm3
+db	102,15,56,0,231
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	nop
+	movdqa	[esp],xmm1
+db	15,56,203,202
+	movdqa	xmm0,[ebp-112]
+	paddd	xmm0,xmm4
+db	102,15,56,0,239
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	lea	edi,[64+edi]
+db	15,56,204,220
+db	15,56,203,202
+	movdqa	xmm0,[ebp-96]
+	paddd	xmm0,xmm5
+db	102,15,56,0,247
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm6
+db	102,15,58,15,253,4
+	nop
+	paddd	xmm3,xmm7
+db	15,56,204,229
+db	15,56,203,202
+	movdqa	xmm0,[ebp-80]
+	paddd	xmm0,xmm6
+db	15,56,205,222
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm3
+db	102,15,58,15,254,4
+	nop
+	paddd	xmm4,xmm7
+db	15,56,204,238
+db	15,56,203,202
+	movdqa	xmm0,[ebp-64]
+	paddd	xmm0,xmm3
+db	15,56,205,227
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm4
+db	102,15,58,15,251,4
+	nop
+	paddd	xmm5,xmm7
+db	15,56,204,243
+db	15,56,203,202
+	movdqa	xmm0,[ebp-48]
+	paddd	xmm0,xmm4
+db	15,56,205,236
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm5
+db	102,15,58,15,252,4
+	nop
+	paddd	xmm6,xmm7
+db	15,56,204,220
+db	15,56,203,202
+	movdqa	xmm0,[ebp-32]
+	paddd	xmm0,xmm5
+db	15,56,205,245
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm6
+db	102,15,58,15,253,4
+	nop
+	paddd	xmm3,xmm7
+db	15,56,204,229
+db	15,56,203,202
+	movdqa	xmm0,[ebp-16]
+	paddd	xmm0,xmm6
+db	15,56,205,222
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm3
+db	102,15,58,15,254,4
+	nop
+	paddd	xmm4,xmm7
+db	15,56,204,238
+db	15,56,203,202
+	movdqa	xmm0,[ebp]
+	paddd	xmm0,xmm3
+db	15,56,205,227
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm4
+db	102,15,58,15,251,4
+	nop
+	paddd	xmm5,xmm7
+db	15,56,204,243
+db	15,56,203,202
+	movdqa	xmm0,[16+ebp]
+	paddd	xmm0,xmm4
+db	15,56,205,236
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm5
+db	102,15,58,15,252,4
+	nop
+	paddd	xmm6,xmm7
+db	15,56,204,220
+db	15,56,203,202
+	movdqa	xmm0,[32+ebp]
+	paddd	xmm0,xmm5
+db	15,56,205,245
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm6
+db	102,15,58,15,253,4
+	nop
+	paddd	xmm3,xmm7
+db	15,56,204,229
+db	15,56,203,202
+	movdqa	xmm0,[48+ebp]
+	paddd	xmm0,xmm6
+db	15,56,205,222
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm3
+db	102,15,58,15,254,4
+	nop
+	paddd	xmm4,xmm7
+db	15,56,204,238
+db	15,56,203,202
+	movdqa	xmm0,[64+ebp]
+	paddd	xmm0,xmm3
+db	15,56,205,227
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm4
+db	102,15,58,15,251,4
+	nop
+	paddd	xmm5,xmm7
+db	15,56,204,243
+db	15,56,203,202
+	movdqa	xmm0,[80+ebp]
+	paddd	xmm0,xmm4
+db	15,56,205,236
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	movdqa	xmm7,xmm5
+db	102,15,58,15,252,4
+db	15,56,203,202
+	paddd	xmm6,xmm7
+	movdqa	xmm0,[96+ebp]
+	paddd	xmm0,xmm5
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+db	15,56,205,245
+	movdqa	xmm7,[128+ebp]
+db	15,56,203,202
+	movdqa	xmm0,[112+ebp]
+	paddd	xmm0,xmm6
+	nop
+db	15,56,203,209
+	pshufd	xmm0,xmm0,14
+	cmp	eax,edi
+	nop
+db	15,56,203,202
+	paddd	xmm2,[16+esp]
+	paddd	xmm1,[esp]
+	jnz	NEAR L$010loop_shaext
+	pshufd	xmm2,xmm2,177
+	pshufd	xmm7,xmm1,27
+	pshufd	xmm1,xmm1,177
+	punpckhqdq	xmm1,xmm2
+db	102,15,58,15,215,8
+	mov	esp,DWORD [44+esp]
+	movdqu	[esi],xmm1
+	movdqu	[16+esi],xmm2
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	32
+L$005SSSE3:
+	lea	esp,[esp-96]
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edi,DWORD [12+esi]
+	mov	DWORD [4+esp],ebx
+	xor	ebx,ecx
+	mov	DWORD [8+esp],ecx
+	mov	DWORD [12+esp],edi
+	mov	edx,DWORD [16+esi]
+	mov	edi,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	esi,DWORD [28+esi]
+	mov	DWORD [20+esp],edi
+	mov	edi,DWORD [100+esp]
+	mov	DWORD [24+esp],ecx
+	mov	DWORD [28+esp],esi
+	movdqa	xmm7,[256+ebp]
+	jmp	NEAR L$011grand_ssse3
+align	16
+L$011grand_ssse3:
+	movdqu	xmm0,[edi]
+	movdqu	xmm1,[16+edi]
+	movdqu	xmm2,[32+edi]
+	movdqu	xmm3,[48+edi]
+	add	edi,64
+db	102,15,56,0,199
+	mov	DWORD [100+esp],edi
+db	102,15,56,0,207
+	movdqa	xmm4,[ebp]
+db	102,15,56,0,215
+	movdqa	xmm5,[16+ebp]
+	paddd	xmm4,xmm0
+db	102,15,56,0,223
+	movdqa	xmm6,[32+ebp]
+	paddd	xmm5,xmm1
+	movdqa	xmm7,[48+ebp]
+	movdqa	[32+esp],xmm4
+	paddd	xmm6,xmm2
+	movdqa	[48+esp],xmm5
+	paddd	xmm7,xmm3
+	movdqa	[64+esp],xmm6
+	movdqa	[80+esp],xmm7
+	jmp	NEAR L$012ssse3_00_47
+align	16
+L$012ssse3_00_47:
+	add	ebp,64
+	mov	ecx,edx
+	movdqa	xmm4,xmm1
+	ror	edx,14
+	mov	esi,DWORD [20+esp]
+	movdqa	xmm7,xmm3
+	xor	edx,ecx
+	mov	edi,DWORD [24+esp]
+db	102,15,58,15,224,4
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+db	102,15,58,15,250,4
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	movdqa	xmm5,xmm4
+	ror	edx,6
+	mov	ecx,eax
+	movdqa	xmm6,xmm4
+	add	edx,edi
+	mov	edi,DWORD [4+esp]
+	psrld	xmm4,3
+	mov	esi,eax
+	ror	ecx,9
+	paddd	xmm0,xmm7
+	mov	DWORD [esp],eax
+	xor	ecx,eax
+	psrld	xmm6,7
+	xor	eax,edi
+	add	edx,DWORD [28+esp]
+	ror	ecx,11
+	and	ebx,eax
+	pshufd	xmm7,xmm3,250
+	xor	ecx,esi
+	add	edx,DWORD [32+esp]
+	pslld	xmm5,14
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm4,xmm6
+	add	ebx,edx
+	add	edx,DWORD [12+esp]
+	psrld	xmm6,11
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm4,xmm5
+	mov	esi,DWORD [16+esp]
+	xor	edx,ecx
+	pslld	xmm5,11
+	mov	edi,DWORD [20+esp]
+	xor	esi,edi
+	ror	edx,5
+	pxor	xmm4,xmm6
+	and	esi,ecx
+	mov	DWORD [12+esp],ecx
+	movdqa	xmm6,xmm7
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	pxor	xmm4,xmm5
+	mov	ecx,ebx
+	add	edx,edi
+	psrld	xmm7,10
+	mov	edi,DWORD [esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm0,xmm4
+	mov	DWORD [28+esp],ebx
+	xor	ecx,ebx
+	psrlq	xmm6,17
+	xor	ebx,edi
+	add	edx,DWORD [24+esp]
+	ror	ecx,11
+	pxor	xmm7,xmm6
+	and	eax,ebx
+	xor	ecx,esi
+	psrlq	xmm6,2
+	add	edx,DWORD [36+esp]
+	xor	eax,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	pshufd	xmm7,xmm7,128
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [12+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [16+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	psrldq	xmm7,8
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	paddd	xmm0,xmm7
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [28+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [24+esp],eax
+	pshufd	xmm7,xmm0,80
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [20+esp]
+	movdqa	xmm6,xmm7
+	ror	ecx,11
+	psrld	xmm7,10
+	and	ebx,eax
+	psrlq	xmm6,17
+	xor	ecx,esi
+	add	edx,DWORD [40+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	ebx,edx
+	add	edx,DWORD [4+esp]
+	psrlq	xmm6,2
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm7,xmm6
+	mov	esi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [12+esp]
+	pshufd	xmm7,xmm7,8
+	xor	esi,edi
+	ror	edx,5
+	movdqa	xmm6,[ebp]
+	and	esi,ecx
+	mov	DWORD [4+esp],ecx
+	pslldq	xmm7,8
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [24+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm0,xmm7
+	mov	DWORD [20+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [16+esp]
+	paddd	xmm6,xmm0
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [44+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,ecx
+	movdqa	[32+esp],xmm6
+	mov	ecx,edx
+	movdqa	xmm4,xmm2
+	ror	edx,14
+	mov	esi,DWORD [4+esp]
+	movdqa	xmm7,xmm0
+	xor	edx,ecx
+	mov	edi,DWORD [8+esp]
+db	102,15,58,15,225,4
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+db	102,15,58,15,251,4
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	movdqa	xmm5,xmm4
+	ror	edx,6
+	mov	ecx,eax
+	movdqa	xmm6,xmm4
+	add	edx,edi
+	mov	edi,DWORD [20+esp]
+	psrld	xmm4,3
+	mov	esi,eax
+	ror	ecx,9
+	paddd	xmm1,xmm7
+	mov	DWORD [16+esp],eax
+	xor	ecx,eax
+	psrld	xmm6,7
+	xor	eax,edi
+	add	edx,DWORD [12+esp]
+	ror	ecx,11
+	and	ebx,eax
+	pshufd	xmm7,xmm0,250
+	xor	ecx,esi
+	add	edx,DWORD [48+esp]
+	pslld	xmm5,14
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm4,xmm6
+	add	ebx,edx
+	add	edx,DWORD [28+esp]
+	psrld	xmm6,11
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm4,xmm5
+	mov	esi,DWORD [esp]
+	xor	edx,ecx
+	pslld	xmm5,11
+	mov	edi,DWORD [4+esp]
+	xor	esi,edi
+	ror	edx,5
+	pxor	xmm4,xmm6
+	and	esi,ecx
+	mov	DWORD [28+esp],ecx
+	movdqa	xmm6,xmm7
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	pxor	xmm4,xmm5
+	mov	ecx,ebx
+	add	edx,edi
+	psrld	xmm7,10
+	mov	edi,DWORD [16+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm1,xmm4
+	mov	DWORD [12+esp],ebx
+	xor	ecx,ebx
+	psrlq	xmm6,17
+	xor	ebx,edi
+	add	edx,DWORD [8+esp]
+	ror	ecx,11
+	pxor	xmm7,xmm6
+	and	eax,ebx
+	xor	ecx,esi
+	psrlq	xmm6,2
+	add	edx,DWORD [52+esp]
+	xor	eax,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	pshufd	xmm7,xmm7,128
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [28+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	psrldq	xmm7,8
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	paddd	xmm1,xmm7
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [12+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [8+esp],eax
+	pshufd	xmm7,xmm1,80
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [4+esp]
+	movdqa	xmm6,xmm7
+	ror	ecx,11
+	psrld	xmm7,10
+	and	ebx,eax
+	psrlq	xmm6,17
+	xor	ecx,esi
+	add	edx,DWORD [56+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	ebx,edx
+	add	edx,DWORD [20+esp]
+	psrlq	xmm6,2
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm7,xmm6
+	mov	esi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [28+esp]
+	pshufd	xmm7,xmm7,8
+	xor	esi,edi
+	ror	edx,5
+	movdqa	xmm6,[16+ebp]
+	and	esi,ecx
+	mov	DWORD [20+esp],ecx
+	pslldq	xmm7,8
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [8+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm1,xmm7
+	mov	DWORD [4+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [esp]
+	paddd	xmm6,xmm1
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [60+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,ecx
+	movdqa	[48+esp],xmm6
+	mov	ecx,edx
+	movdqa	xmm4,xmm3
+	ror	edx,14
+	mov	esi,DWORD [20+esp]
+	movdqa	xmm7,xmm1
+	xor	edx,ecx
+	mov	edi,DWORD [24+esp]
+db	102,15,58,15,226,4
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+db	102,15,58,15,248,4
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	movdqa	xmm5,xmm4
+	ror	edx,6
+	mov	ecx,eax
+	movdqa	xmm6,xmm4
+	add	edx,edi
+	mov	edi,DWORD [4+esp]
+	psrld	xmm4,3
+	mov	esi,eax
+	ror	ecx,9
+	paddd	xmm2,xmm7
+	mov	DWORD [esp],eax
+	xor	ecx,eax
+	psrld	xmm6,7
+	xor	eax,edi
+	add	edx,DWORD [28+esp]
+	ror	ecx,11
+	and	ebx,eax
+	pshufd	xmm7,xmm1,250
+	xor	ecx,esi
+	add	edx,DWORD [64+esp]
+	pslld	xmm5,14
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm4,xmm6
+	add	ebx,edx
+	add	edx,DWORD [12+esp]
+	psrld	xmm6,11
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm4,xmm5
+	mov	esi,DWORD [16+esp]
+	xor	edx,ecx
+	pslld	xmm5,11
+	mov	edi,DWORD [20+esp]
+	xor	esi,edi
+	ror	edx,5
+	pxor	xmm4,xmm6
+	and	esi,ecx
+	mov	DWORD [12+esp],ecx
+	movdqa	xmm6,xmm7
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	pxor	xmm4,xmm5
+	mov	ecx,ebx
+	add	edx,edi
+	psrld	xmm7,10
+	mov	edi,DWORD [esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm2,xmm4
+	mov	DWORD [28+esp],ebx
+	xor	ecx,ebx
+	psrlq	xmm6,17
+	xor	ebx,edi
+	add	edx,DWORD [24+esp]
+	ror	ecx,11
+	pxor	xmm7,xmm6
+	and	eax,ebx
+	xor	ecx,esi
+	psrlq	xmm6,2
+	add	edx,DWORD [68+esp]
+	xor	eax,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	pshufd	xmm7,xmm7,128
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [12+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [16+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	psrldq	xmm7,8
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	paddd	xmm2,xmm7
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [28+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [24+esp],eax
+	pshufd	xmm7,xmm2,80
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [20+esp]
+	movdqa	xmm6,xmm7
+	ror	ecx,11
+	psrld	xmm7,10
+	and	ebx,eax
+	psrlq	xmm6,17
+	xor	ecx,esi
+	add	edx,DWORD [72+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	ebx,edx
+	add	edx,DWORD [4+esp]
+	psrlq	xmm6,2
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm7,xmm6
+	mov	esi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [12+esp]
+	pshufd	xmm7,xmm7,8
+	xor	esi,edi
+	ror	edx,5
+	movdqa	xmm6,[32+ebp]
+	and	esi,ecx
+	mov	DWORD [4+esp],ecx
+	pslldq	xmm7,8
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [24+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm2,xmm7
+	mov	DWORD [20+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [16+esp]
+	paddd	xmm6,xmm2
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [76+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,ecx
+	movdqa	[64+esp],xmm6
+	mov	ecx,edx
+	movdqa	xmm4,xmm0
+	ror	edx,14
+	mov	esi,DWORD [4+esp]
+	movdqa	xmm7,xmm2
+	xor	edx,ecx
+	mov	edi,DWORD [8+esp]
+db	102,15,58,15,227,4
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+db	102,15,58,15,249,4
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	movdqa	xmm5,xmm4
+	ror	edx,6
+	mov	ecx,eax
+	movdqa	xmm6,xmm4
+	add	edx,edi
+	mov	edi,DWORD [20+esp]
+	psrld	xmm4,3
+	mov	esi,eax
+	ror	ecx,9
+	paddd	xmm3,xmm7
+	mov	DWORD [16+esp],eax
+	xor	ecx,eax
+	psrld	xmm6,7
+	xor	eax,edi
+	add	edx,DWORD [12+esp]
+	ror	ecx,11
+	and	ebx,eax
+	pshufd	xmm7,xmm2,250
+	xor	ecx,esi
+	add	edx,DWORD [80+esp]
+	pslld	xmm5,14
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm4,xmm6
+	add	ebx,edx
+	add	edx,DWORD [28+esp]
+	psrld	xmm6,11
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm4,xmm5
+	mov	esi,DWORD [esp]
+	xor	edx,ecx
+	pslld	xmm5,11
+	mov	edi,DWORD [4+esp]
+	xor	esi,edi
+	ror	edx,5
+	pxor	xmm4,xmm6
+	and	esi,ecx
+	mov	DWORD [28+esp],ecx
+	movdqa	xmm6,xmm7
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	pxor	xmm4,xmm5
+	mov	ecx,ebx
+	add	edx,edi
+	psrld	xmm7,10
+	mov	edi,DWORD [16+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm3,xmm4
+	mov	DWORD [12+esp],ebx
+	xor	ecx,ebx
+	psrlq	xmm6,17
+	xor	ebx,edi
+	add	edx,DWORD [8+esp]
+	ror	ecx,11
+	pxor	xmm7,xmm6
+	and	eax,ebx
+	xor	ecx,esi
+	psrlq	xmm6,2
+	add	edx,DWORD [84+esp]
+	xor	eax,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	pshufd	xmm7,xmm7,128
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [28+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	psrldq	xmm7,8
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	paddd	xmm3,xmm7
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [12+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [8+esp],eax
+	pshufd	xmm7,xmm3,80
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [4+esp]
+	movdqa	xmm6,xmm7
+	ror	ecx,11
+	psrld	xmm7,10
+	and	ebx,eax
+	psrlq	xmm6,17
+	xor	ecx,esi
+	add	edx,DWORD [88+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	pxor	xmm7,xmm6
+	add	ebx,edx
+	add	edx,DWORD [20+esp]
+	psrlq	xmm6,2
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	pxor	xmm7,xmm6
+	mov	esi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [28+esp]
+	pshufd	xmm7,xmm7,8
+	xor	esi,edi
+	ror	edx,5
+	movdqa	xmm6,[48+ebp]
+	and	esi,ecx
+	mov	DWORD [20+esp],ecx
+	pslldq	xmm7,8
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [8+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	paddd	xmm3,xmm7
+	mov	DWORD [4+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [esp]
+	paddd	xmm6,xmm3
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [92+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,ecx
+	movdqa	[80+esp],xmm6
+	cmp	DWORD [64+ebp],66051
+	jne	NEAR L$012ssse3_00_47
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [20+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [24+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [4+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [28+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [32+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [12+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [20+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [12+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [28+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [24+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [36+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [12+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [16+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [28+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [24+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [20+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [40+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [4+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [12+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [4+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [24+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [20+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [16+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [44+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [4+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [8+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [20+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [16+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [12+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [48+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [28+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [esp]
+	xor	edx,ecx
+	mov	edi,DWORD [4+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [28+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [16+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [12+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [8+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [52+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [28+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [12+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [8+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [4+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [56+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [20+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [28+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [20+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [8+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [4+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [60+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [20+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [24+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [16+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [4+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [28+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [64+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [12+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [16+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [20+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [12+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [28+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [24+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [68+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [8+esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [12+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [16+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [8+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [28+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [24+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [20+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [72+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [4+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [8+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [12+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [4+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [24+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [20+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [16+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [76+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [4+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [8+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [20+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [16+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [12+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [80+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [28+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [esp]
+	xor	edx,ecx
+	mov	edi,DWORD [4+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [28+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [16+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [12+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [8+esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [84+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [24+esp]
+	add	eax,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [28+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [24+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,eax
+	add	edx,edi
+	mov	edi,DWORD [12+esp]
+	mov	esi,eax
+	ror	ecx,9
+	mov	DWORD [8+esp],eax
+	xor	ecx,eax
+	xor	eax,edi
+	add	edx,DWORD [4+esp]
+	ror	ecx,11
+	and	ebx,eax
+	xor	ecx,esi
+	add	edx,DWORD [88+esp]
+	xor	ebx,edi
+	ror	ecx,2
+	add	ebx,edx
+	add	edx,DWORD [20+esp]
+	add	ebx,ecx
+	mov	ecx,edx
+	ror	edx,14
+	mov	esi,DWORD [24+esp]
+	xor	edx,ecx
+	mov	edi,DWORD [28+esp]
+	xor	esi,edi
+	ror	edx,5
+	and	esi,ecx
+	mov	DWORD [20+esp],ecx
+	xor	edx,ecx
+	xor	edi,esi
+	ror	edx,6
+	mov	ecx,ebx
+	add	edx,edi
+	mov	edi,DWORD [8+esp]
+	mov	esi,ebx
+	ror	ecx,9
+	mov	DWORD [4+esp],ebx
+	xor	ecx,ebx
+	xor	ebx,edi
+	add	edx,DWORD [esp]
+	ror	ecx,11
+	and	eax,ebx
+	xor	ecx,esi
+	add	edx,DWORD [92+esp]
+	xor	eax,edi
+	ror	ecx,2
+	add	eax,edx
+	add	edx,DWORD [16+esp]
+	add	eax,ecx
+	mov	esi,DWORD [96+esp]
+	xor	ebx,edi
+	mov	ecx,DWORD [12+esp]
+	add	eax,DWORD [esi]
+	add	ebx,DWORD [4+esi]
+	add	edi,DWORD [8+esi]
+	add	ecx,DWORD [12+esi]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	mov	DWORD [8+esi],edi
+	mov	DWORD [12+esi],ecx
+	mov	DWORD [4+esp],ebx
+	xor	ebx,edi
+	mov	DWORD [8+esp],edi
+	mov	DWORD [12+esp],ecx
+	mov	edi,DWORD [20+esp]
+	mov	ecx,DWORD [24+esp]
+	add	edx,DWORD [16+esi]
+	add	edi,DWORD [20+esi]
+	add	ecx,DWORD [24+esi]
+	mov	DWORD [16+esi],edx
+	mov	DWORD [20+esi],edi
+	mov	DWORD [20+esp],edi
+	mov	edi,DWORD [28+esp]
+	mov	DWORD [24+esi],ecx
+	add	edi,DWORD [28+esi]
+	mov	DWORD [24+esp],ecx
+	mov	DWORD [28+esi],edi
+	mov	DWORD [28+esp],edi
+	mov	edi,DWORD [100+esp]
+	movdqa	xmm7,[64+ebp]
+	sub	ebp,192
+	cmp	edi,DWORD [104+esp]
+	jb	NEAR L$011grand_ssse3
+	mov	esp,DWORD [108+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm b/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm
new file mode 100644
index 0000000..88ed0b3
--- /dev/null
+++ b/third_party/boringssl/win-x86/crypto/sha/sha512-586.asm
@@ -0,0 +1,2843 @@
+%ifidn __OUTPUT_FORMAT__,obj
+section	code	use32 class=code align=64
+%elifidn __OUTPUT_FORMAT__,win32
+%ifdef __YASM_VERSION_ID__
+%if __YASM_VERSION_ID__ < 01010000h
+%error yasm version 1.1.0 or later needed.
+%endif
+; Yasm automatically includes .00 and complains about redefining it.
+; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html
+%else
+$@feat.00 equ 1
+%endif
+section	.text	code align=64
+%else
+section	.text	code
+%endif
+;extern	_OPENSSL_ia32cap_P
+global	_sha512_block_data_order
+align	16
+_sha512_block_data_order:
+L$_sha512_block_data_order_begin:
+	push	ebp
+	push	ebx
+	push	esi
+	push	edi
+	mov	esi,DWORD [20+esp]
+	mov	edi,DWORD [24+esp]
+	mov	eax,DWORD [28+esp]
+	mov	ebx,esp
+	call	L$000pic_point
+L$000pic_point:
+	pop	ebp
+	lea	ebp,[(L$001K512-L$000pic_point)+ebp]
+	sub	esp,16
+	and	esp,-64
+	shl	eax,7
+	add	eax,edi
+	mov	DWORD [esp],esi
+	mov	DWORD [4+esp],edi
+	mov	DWORD [8+esp],eax
+	mov	DWORD [12+esp],ebx
+	lea	edx,[_OPENSSL_ia32cap_P]
+	mov	ecx,DWORD [edx]
+	test	ecx,67108864
+	jz	NEAR L$002loop_x86
+	mov	edx,DWORD [4+edx]
+	movq	mm0,[esi]
+	and	ecx,16777216
+	movq	mm1,[8+esi]
+	and	edx,512
+	movq	mm2,[16+esi]
+	or	ecx,edx
+	movq	mm3,[24+esi]
+	movq	mm4,[32+esi]
+	movq	mm5,[40+esi]
+	movq	mm6,[48+esi]
+	movq	mm7,[56+esi]
+	cmp	ecx,16777728
+	je	NEAR L$003SSSE3
+	sub	esp,80
+	jmp	NEAR L$004loop_sse2
+align	16
+L$004loop_sse2:
+	movq	[8+esp],mm1
+	movq	[16+esp],mm2
+	movq	[24+esp],mm3
+	movq	[40+esp],mm5
+	movq	[48+esp],mm6
+	pxor	mm2,mm1
+	movq	[56+esp],mm7
+	movq	mm3,mm0
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	add	edi,8
+	mov	edx,15
+	bswap	eax
+	bswap	ebx
+	jmp	NEAR L$00500_14_sse2
+align	16
+L$00500_14_sse2:
+	movd	mm1,eax
+	mov	eax,DWORD [edi]
+	movd	mm7,ebx
+	mov	ebx,DWORD [4+edi]
+	add	edi,8
+	bswap	eax
+	bswap	ebx
+	punpckldq	mm7,mm1
+	movq	mm1,mm4
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	movq	mm0,mm3
+	movq	[72+esp],mm7
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	paddq	mm7,[ebp]
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	sub	esp,8
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[40+esp]
+	paddq	mm3,mm2
+	movq	mm2,mm0
+	add	ebp,8
+	paddq	mm3,mm6
+	movq	mm6,[48+esp]
+	dec	edx
+	jnz	NEAR L$00500_14_sse2
+	movd	mm1,eax
+	movd	mm7,ebx
+	punpckldq	mm7,mm1
+	movq	mm1,mm4
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	movq	mm0,mm3
+	movq	[72+esp],mm7
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	paddq	mm7,[ebp]
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	sub	esp,8
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm7,[192+esp]
+	paddq	mm3,mm2
+	movq	mm2,mm0
+	add	ebp,8
+	paddq	mm3,mm6
+	pxor	mm0,mm0
+	mov	edx,32
+	jmp	NEAR L$00616_79_sse2
+align	16
+L$00616_79_sse2:
+	movq	mm5,[88+esp]
+	movq	mm1,mm7
+	psrlq	mm7,1
+	movq	mm6,mm5
+	psrlq	mm5,6
+	psllq	mm1,56
+	paddq	mm0,mm3
+	movq	mm3,mm7
+	psrlq	mm7,6
+	pxor	mm3,mm1
+	psllq	mm1,7
+	pxor	mm3,mm7
+	psrlq	mm7,1
+	pxor	mm3,mm1
+	movq	mm1,mm5
+	psrlq	mm5,13
+	pxor	mm7,mm3
+	psllq	mm6,3
+	pxor	mm1,mm5
+	paddq	mm7,[200+esp]
+	pxor	mm1,mm6
+	psrlq	mm5,42
+	paddq	mm7,[128+esp]
+	pxor	mm1,mm5
+	psllq	mm6,42
+	movq	mm5,[40+esp]
+	pxor	mm1,mm6
+	movq	mm6,[48+esp]
+	paddq	mm7,mm1
+	movq	mm1,mm4
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	movq	[72+esp],mm7
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	paddq	mm7,[ebp]
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	sub	esp,8
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm7,[192+esp]
+	paddq	mm2,mm6
+	add	ebp,8
+	movq	mm5,[88+esp]
+	movq	mm1,mm7
+	psrlq	mm7,1
+	movq	mm6,mm5
+	psrlq	mm5,6
+	psllq	mm1,56
+	paddq	mm2,mm3
+	movq	mm3,mm7
+	psrlq	mm7,6
+	pxor	mm3,mm1
+	psllq	mm1,7
+	pxor	mm3,mm7
+	psrlq	mm7,1
+	pxor	mm3,mm1
+	movq	mm1,mm5
+	psrlq	mm5,13
+	pxor	mm7,mm3
+	psllq	mm6,3
+	pxor	mm1,mm5
+	paddq	mm7,[200+esp]
+	pxor	mm1,mm6
+	psrlq	mm5,42
+	paddq	mm7,[128+esp]
+	pxor	mm1,mm5
+	psllq	mm6,42
+	movq	mm5,[40+esp]
+	pxor	mm1,mm6
+	movq	mm6,[48+esp]
+	paddq	mm7,mm1
+	movq	mm1,mm4
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	movq	[72+esp],mm7
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	paddq	mm7,[ebp]
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	sub	esp,8
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm7,[192+esp]
+	paddq	mm0,mm6
+	add	ebp,8
+	dec	edx
+	jnz	NEAR L$00616_79_sse2
+	paddq	mm0,mm3
+	movq	mm1,[8+esp]
+	movq	mm3,[24+esp]
+	movq	mm5,[40+esp]
+	movq	mm6,[48+esp]
+	movq	mm7,[56+esp]
+	pxor	mm2,mm1
+	paddq	mm0,[esi]
+	paddq	mm1,[8+esi]
+	paddq	mm2,[16+esi]
+	paddq	mm3,[24+esi]
+	paddq	mm4,[32+esi]
+	paddq	mm5,[40+esi]
+	paddq	mm6,[48+esi]
+	paddq	mm7,[56+esi]
+	mov	eax,640
+	movq	[esi],mm0
+	movq	[8+esi],mm1
+	movq	[16+esi],mm2
+	movq	[24+esi],mm3
+	movq	[32+esi],mm4
+	movq	[40+esi],mm5
+	movq	[48+esi],mm6
+	movq	[56+esi],mm7
+	lea	esp,[eax*1+esp]
+	sub	ebp,eax
+	cmp	edi,DWORD [88+esp]
+	jb	NEAR L$004loop_sse2
+	mov	esp,DWORD [92+esp]
+	emms
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	32
+L$003SSSE3:
+	lea	edx,[esp-64]
+	sub	esp,256
+	movdqa	xmm1,[640+ebp]
+	movdqu	xmm0,[edi]
+db	102,15,56,0,193
+	movdqa	xmm3,[ebp]
+	movdqa	xmm2,xmm1
+	movdqu	xmm1,[16+edi]
+	paddq	xmm3,xmm0
+db	102,15,56,0,202
+	movdqa	[edx-128],xmm3
+	movdqa	xmm4,[16+ebp]
+	movdqa	xmm3,xmm2
+	movdqu	xmm2,[32+edi]
+	paddq	xmm4,xmm1
+db	102,15,56,0,211
+	movdqa	[edx-112],xmm4
+	movdqa	xmm5,[32+ebp]
+	movdqa	xmm4,xmm3
+	movdqu	xmm3,[48+edi]
+	paddq	xmm5,xmm2
+db	102,15,56,0,220
+	movdqa	[edx-96],xmm5
+	movdqa	xmm6,[48+ebp]
+	movdqa	xmm5,xmm4
+	movdqu	xmm4,[64+edi]
+	paddq	xmm6,xmm3
+db	102,15,56,0,229
+	movdqa	[edx-80],xmm6
+	movdqa	xmm7,[64+ebp]
+	movdqa	xmm6,xmm5
+	movdqu	xmm5,[80+edi]
+	paddq	xmm7,xmm4
+db	102,15,56,0,238
+	movdqa	[edx-64],xmm7
+	movdqa	[edx],xmm0
+	movdqa	xmm0,[80+ebp]
+	movdqa	xmm7,xmm6
+	movdqu	xmm6,[96+edi]
+	paddq	xmm0,xmm5
+db	102,15,56,0,247
+	movdqa	[edx-48],xmm0
+	movdqa	[16+edx],xmm1
+	movdqa	xmm1,[96+ebp]
+	movdqa	xmm0,xmm7
+	movdqu	xmm7,[112+edi]
+	paddq	xmm1,xmm6
+db	102,15,56,0,248
+	movdqa	[edx-32],xmm1
+	movdqa	[32+edx],xmm2
+	movdqa	xmm2,[112+ebp]
+	movdqa	xmm0,[edx]
+	paddq	xmm2,xmm7
+	movdqa	[edx-16],xmm2
+	nop
+align	32
+L$007loop_ssse3:
+	movdqa	xmm2,[16+edx]
+	movdqa	[48+edx],xmm3
+	lea	ebp,[128+ebp]
+	movq	[8+esp],mm1
+	mov	ebx,edi
+	movq	[16+esp],mm2
+	lea	edi,[128+edi]
+	movq	[24+esp],mm3
+	cmp	edi,eax
+	movq	[40+esp],mm5
+	cmovb	ebx,edi
+	movq	[48+esp],mm6
+	mov	ecx,4
+	pxor	mm2,mm1
+	movq	[56+esp],mm7
+	pxor	mm3,mm3
+	jmp	NEAR L$00800_47_ssse3
+align	32
+L$00800_47_ssse3:
+	movdqa	xmm3,xmm5
+	movdqa	xmm1,xmm2
+db	102,15,58,15,208,8
+	movdqa	[edx],xmm4
+db	102,15,58,15,220,8
+	movdqa	xmm4,xmm2
+	psrlq	xmm2,7
+	paddq	xmm0,xmm3
+	movdqa	xmm3,xmm4
+	psrlq	xmm4,1
+	psllq	xmm3,56
+	pxor	xmm2,xmm4
+	psrlq	xmm4,7
+	pxor	xmm2,xmm3
+	psllq	xmm3,7
+	pxor	xmm2,xmm4
+	movdqa	xmm4,xmm7
+	pxor	xmm2,xmm3
+	movdqa	xmm3,xmm7
+	psrlq	xmm4,6
+	paddq	xmm0,xmm2
+	movdqa	xmm2,xmm7
+	psrlq	xmm3,19
+	psllq	xmm2,3
+	pxor	xmm4,xmm3
+	psrlq	xmm3,42
+	pxor	xmm4,xmm2
+	psllq	xmm2,42
+	pxor	xmm4,xmm3
+	movdqa	xmm3,[32+edx]
+	pxor	xmm4,xmm2
+	movdqa	xmm2,[ebp]
+	movq	mm1,mm4
+	paddq	xmm0,xmm4
+	movq	mm7,[edx-128]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	paddq	xmm2,xmm0
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[32+esp]
+	paddq	mm2,mm6
+	movq	mm6,[40+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-120]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[24+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[56+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[48+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[16+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[24+esp]
+	paddq	mm0,mm6
+	movq	mm6,[32+esp]
+	movdqa	[edx-128],xmm2
+	movdqa	xmm4,xmm6
+	movdqa	xmm2,xmm3
+db	102,15,58,15,217,8
+	movdqa	[16+edx],xmm5
+db	102,15,58,15,229,8
+	movdqa	xmm5,xmm3
+	psrlq	xmm3,7
+	paddq	xmm1,xmm4
+	movdqa	xmm4,xmm5
+	psrlq	xmm5,1
+	psllq	xmm4,56
+	pxor	xmm3,xmm5
+	psrlq	xmm5,7
+	pxor	xmm3,xmm4
+	psllq	xmm4,7
+	pxor	xmm3,xmm5
+	movdqa	xmm5,xmm0
+	pxor	xmm3,xmm4
+	movdqa	xmm4,xmm0
+	psrlq	xmm5,6
+	paddq	xmm1,xmm3
+	movdqa	xmm3,xmm0
+	psrlq	xmm4,19
+	psllq	xmm3,3
+	pxor	xmm5,xmm4
+	psrlq	xmm4,42
+	pxor	xmm5,xmm3
+	psllq	xmm3,42
+	pxor	xmm5,xmm4
+	movdqa	xmm4,[48+edx]
+	pxor	xmm5,xmm3
+	movdqa	xmm3,[16+ebp]
+	movq	mm1,mm4
+	paddq	xmm1,xmm5
+	movq	mm7,[edx-112]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[16+esp],mm4
+	paddq	xmm3,xmm1
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[48+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[40+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[8+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[56+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[16+esp]
+	paddq	mm2,mm6
+	movq	mm6,[24+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-104]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[8+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[40+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[32+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[48+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[8+esp]
+	paddq	mm0,mm6
+	movq	mm6,[16+esp]
+	movdqa	[edx-112],xmm3
+	movdqa	xmm5,xmm7
+	movdqa	xmm3,xmm4
+db	102,15,58,15,226,8
+	movdqa	[32+edx],xmm6
+db	102,15,58,15,238,8
+	movdqa	xmm6,xmm4
+	psrlq	xmm4,7
+	paddq	xmm2,xmm5
+	movdqa	xmm5,xmm6
+	psrlq	xmm6,1
+	psllq	xmm5,56
+	pxor	xmm4,xmm6
+	psrlq	xmm6,7
+	pxor	xmm4,xmm5
+	psllq	xmm5,7
+	pxor	xmm4,xmm6
+	movdqa	xmm6,xmm1
+	pxor	xmm4,xmm5
+	movdqa	xmm5,xmm1
+	psrlq	xmm6,6
+	paddq	xmm2,xmm4
+	movdqa	xmm4,xmm1
+	psrlq	xmm5,19
+	psllq	xmm4,3
+	pxor	xmm6,xmm5
+	psrlq	xmm5,42
+	pxor	xmm6,xmm4
+	psllq	xmm4,42
+	pxor	xmm6,xmm5
+	movdqa	xmm5,[edx]
+	pxor	xmm6,xmm4
+	movdqa	xmm4,[32+ebp]
+	movq	mm1,mm4
+	paddq	xmm2,xmm6
+	movq	mm7,[edx-96]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[esp],mm4
+	paddq	xmm4,xmm2
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[32+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[24+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[56+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[40+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[esp]
+	paddq	mm2,mm6
+	movq	mm6,[8+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-88]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[56+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[24+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[16+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[48+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[32+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[56+esp]
+	paddq	mm0,mm6
+	movq	mm6,[esp]
+	movdqa	[edx-96],xmm4
+	movdqa	xmm6,xmm0
+	movdqa	xmm4,xmm5
+db	102,15,58,15,235,8
+	movdqa	[48+edx],xmm7
+db	102,15,58,15,247,8
+	movdqa	xmm7,xmm5
+	psrlq	xmm5,7
+	paddq	xmm3,xmm6
+	movdqa	xmm6,xmm7
+	psrlq	xmm7,1
+	psllq	xmm6,56
+	pxor	xmm5,xmm7
+	psrlq	xmm7,7
+	pxor	xmm5,xmm6
+	psllq	xmm6,7
+	pxor	xmm5,xmm7
+	movdqa	xmm7,xmm2
+	pxor	xmm5,xmm6
+	movdqa	xmm6,xmm2
+	psrlq	xmm7,6
+	paddq	xmm3,xmm5
+	movdqa	xmm5,xmm2
+	psrlq	xmm6,19
+	psllq	xmm5,3
+	pxor	xmm7,xmm6
+	psrlq	xmm6,42
+	pxor	xmm7,xmm5
+	psllq	xmm5,42
+	pxor	xmm7,xmm6
+	movdqa	xmm6,[16+edx]
+	pxor	xmm7,xmm5
+	movdqa	xmm5,[48+ebp]
+	movq	mm1,mm4
+	paddq	xmm3,xmm7
+	movq	mm7,[edx-80]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[48+esp],mm4
+	paddq	xmm5,xmm3
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[16+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[8+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[40+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[24+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[48+esp]
+	paddq	mm2,mm6
+	movq	mm6,[56+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-72]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[40+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[8+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[32+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[16+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[40+esp]
+	paddq	mm0,mm6
+	movq	mm6,[48+esp]
+	movdqa	[edx-80],xmm5
+	movdqa	xmm7,xmm1
+	movdqa	xmm5,xmm6
+db	102,15,58,15,244,8
+	movdqa	[edx],xmm0
+db	102,15,58,15,248,8
+	movdqa	xmm0,xmm6
+	psrlq	xmm6,7
+	paddq	xmm4,xmm7
+	movdqa	xmm7,xmm0
+	psrlq	xmm0,1
+	psllq	xmm7,56
+	pxor	xmm6,xmm0
+	psrlq	xmm0,7
+	pxor	xmm6,xmm7
+	psllq	xmm7,7
+	pxor	xmm6,xmm0
+	movdqa	xmm0,xmm3
+	pxor	xmm6,xmm7
+	movdqa	xmm7,xmm3
+	psrlq	xmm0,6
+	paddq	xmm4,xmm6
+	movdqa	xmm6,xmm3
+	psrlq	xmm7,19
+	psllq	xmm6,3
+	pxor	xmm0,xmm7
+	psrlq	xmm7,42
+	pxor	xmm0,xmm6
+	psllq	xmm6,42
+	pxor	xmm0,xmm7
+	movdqa	xmm7,[32+edx]
+	pxor	xmm0,xmm6
+	movdqa	xmm6,[64+ebp]
+	movq	mm1,mm4
+	paddq	xmm4,xmm0
+	movq	mm7,[edx-64]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	paddq	xmm6,xmm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[32+esp]
+	paddq	mm2,mm6
+	movq	mm6,[40+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-56]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[24+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[56+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[48+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[16+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[24+esp]
+	paddq	mm0,mm6
+	movq	mm6,[32+esp]
+	movdqa	[edx-64],xmm6
+	movdqa	xmm0,xmm2
+	movdqa	xmm6,xmm7
+db	102,15,58,15,253,8
+	movdqa	[16+edx],xmm1
+db	102,15,58,15,193,8
+	movdqa	xmm1,xmm7
+	psrlq	xmm7,7
+	paddq	xmm5,xmm0
+	movdqa	xmm0,xmm1
+	psrlq	xmm1,1
+	psllq	xmm0,56
+	pxor	xmm7,xmm1
+	psrlq	xmm1,7
+	pxor	xmm7,xmm0
+	psllq	xmm0,7
+	pxor	xmm7,xmm1
+	movdqa	xmm1,xmm4
+	pxor	xmm7,xmm0
+	movdqa	xmm0,xmm4
+	psrlq	xmm1,6
+	paddq	xmm5,xmm7
+	movdqa	xmm7,xmm4
+	psrlq	xmm0,19
+	psllq	xmm7,3
+	pxor	xmm1,xmm0
+	psrlq	xmm0,42
+	pxor	xmm1,xmm7
+	psllq	xmm7,42
+	pxor	xmm1,xmm0
+	movdqa	xmm0,[48+edx]
+	pxor	xmm1,xmm7
+	movdqa	xmm7,[80+ebp]
+	movq	mm1,mm4
+	paddq	xmm5,xmm1
+	movq	mm7,[edx-48]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[16+esp],mm4
+	paddq	xmm7,xmm5
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[48+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[40+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[8+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[56+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[16+esp]
+	paddq	mm2,mm6
+	movq	mm6,[24+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-40]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[8+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[40+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[32+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[48+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[8+esp]
+	paddq	mm0,mm6
+	movq	mm6,[16+esp]
+	movdqa	[edx-48],xmm7
+	movdqa	xmm1,xmm3
+	movdqa	xmm7,xmm0
+db	102,15,58,15,198,8
+	movdqa	[32+edx],xmm2
+db	102,15,58,15,202,8
+	movdqa	xmm2,xmm0
+	psrlq	xmm0,7
+	paddq	xmm6,xmm1
+	movdqa	xmm1,xmm2
+	psrlq	xmm2,1
+	psllq	xmm1,56
+	pxor	xmm0,xmm2
+	psrlq	xmm2,7
+	pxor	xmm0,xmm1
+	psllq	xmm1,7
+	pxor	xmm0,xmm2
+	movdqa	xmm2,xmm5
+	pxor	xmm0,xmm1
+	movdqa	xmm1,xmm5
+	psrlq	xmm2,6
+	paddq	xmm6,xmm0
+	movdqa	xmm0,xmm5
+	psrlq	xmm1,19
+	psllq	xmm0,3
+	pxor	xmm2,xmm1
+	psrlq	xmm1,42
+	pxor	xmm2,xmm0
+	psllq	xmm0,42
+	pxor	xmm2,xmm1
+	movdqa	xmm1,[edx]
+	pxor	xmm2,xmm0
+	movdqa	xmm0,[96+ebp]
+	movq	mm1,mm4
+	paddq	xmm6,xmm2
+	movq	mm7,[edx-32]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[esp],mm4
+	paddq	xmm0,xmm6
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[32+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[24+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[56+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[40+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[esp]
+	paddq	mm2,mm6
+	movq	mm6,[8+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-24]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[56+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[24+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[16+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[48+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[32+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[56+esp]
+	paddq	mm0,mm6
+	movq	mm6,[esp]
+	movdqa	[edx-32],xmm0
+	movdqa	xmm2,xmm4
+	movdqa	xmm0,xmm1
+db	102,15,58,15,207,8
+	movdqa	[48+edx],xmm3
+db	102,15,58,15,211,8
+	movdqa	xmm3,xmm1
+	psrlq	xmm1,7
+	paddq	xmm7,xmm2
+	movdqa	xmm2,xmm3
+	psrlq	xmm3,1
+	psllq	xmm2,56
+	pxor	xmm1,xmm3
+	psrlq	xmm3,7
+	pxor	xmm1,xmm2
+	psllq	xmm2,7
+	pxor	xmm1,xmm3
+	movdqa	xmm3,xmm6
+	pxor	xmm1,xmm2
+	movdqa	xmm2,xmm6
+	psrlq	xmm3,6
+	paddq	xmm7,xmm1
+	movdqa	xmm1,xmm6
+	psrlq	xmm2,19
+	psllq	xmm1,3
+	pxor	xmm3,xmm2
+	psrlq	xmm2,42
+	pxor	xmm3,xmm1
+	psllq	xmm1,42
+	pxor	xmm3,xmm2
+	movdqa	xmm2,[16+edx]
+	pxor	xmm3,xmm1
+	movdqa	xmm1,[112+ebp]
+	movq	mm1,mm4
+	paddq	xmm7,xmm3
+	movq	mm7,[edx-16]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[48+esp],mm4
+	paddq	xmm1,xmm7
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[16+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[8+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[40+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[24+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[48+esp]
+	paddq	mm2,mm6
+	movq	mm6,[56+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-8]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[40+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[8+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[32+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[16+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[40+esp]
+	paddq	mm0,mm6
+	movq	mm6,[48+esp]
+	movdqa	[edx-16],xmm1
+	lea	ebp,[128+ebp]
+	dec	ecx
+	jnz	NEAR L$00800_47_ssse3
+	movdqa	xmm1,[ebp]
+	lea	ebp,[ebp-640]
+	movdqu	xmm0,[ebx]
+db	102,15,56,0,193
+	movdqa	xmm3,[ebp]
+	movdqa	xmm2,xmm1
+	movdqu	xmm1,[16+ebx]
+	paddq	xmm3,xmm0
+db	102,15,56,0,202
+	movq	mm1,mm4
+	movq	mm7,[edx-128]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[32+esp]
+	paddq	mm2,mm6
+	movq	mm6,[40+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-120]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[24+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[56+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[48+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[16+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[24+esp]
+	paddq	mm0,mm6
+	movq	mm6,[32+esp]
+	movdqa	[edx-128],xmm3
+	movdqa	xmm4,[16+ebp]
+	movdqa	xmm3,xmm2
+	movdqu	xmm2,[32+ebx]
+	paddq	xmm4,xmm1
+db	102,15,56,0,211
+	movq	mm1,mm4
+	movq	mm7,[edx-112]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[16+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[48+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[40+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[8+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[56+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[16+esp]
+	paddq	mm2,mm6
+	movq	mm6,[24+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-104]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[8+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[40+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[32+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[48+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[8+esp]
+	paddq	mm0,mm6
+	movq	mm6,[16+esp]
+	movdqa	[edx-112],xmm4
+	movdqa	xmm5,[32+ebp]
+	movdqa	xmm4,xmm3
+	movdqu	xmm3,[48+ebx]
+	paddq	xmm5,xmm2
+db	102,15,56,0,220
+	movq	mm1,mm4
+	movq	mm7,[edx-96]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[32+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[24+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[56+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[40+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[esp]
+	paddq	mm2,mm6
+	movq	mm6,[8+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-88]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[56+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[24+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[16+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[48+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[32+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[56+esp]
+	paddq	mm0,mm6
+	movq	mm6,[esp]
+	movdqa	[edx-96],xmm5
+	movdqa	xmm6,[48+ebp]
+	movdqa	xmm5,xmm4
+	movdqu	xmm4,[64+ebx]
+	paddq	xmm6,xmm3
+db	102,15,56,0,229
+	movq	mm1,mm4
+	movq	mm7,[edx-80]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[48+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[16+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[8+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[40+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[24+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[48+esp]
+	paddq	mm2,mm6
+	movq	mm6,[56+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-72]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[40+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[8+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[32+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[16+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[40+esp]
+	paddq	mm0,mm6
+	movq	mm6,[48+esp]
+	movdqa	[edx-80],xmm6
+	movdqa	xmm7,[64+ebp]
+	movdqa	xmm6,xmm5
+	movdqu	xmm5,[80+ebx]
+	paddq	xmm7,xmm4
+db	102,15,56,0,238
+	movq	mm1,mm4
+	movq	mm7,[edx-64]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[32+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[56+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[24+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[8+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[32+esp]
+	paddq	mm2,mm6
+	movq	mm6,[40+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-56]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[24+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[56+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[48+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[16+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[24+esp]
+	paddq	mm0,mm6
+	movq	mm6,[32+esp]
+	movdqa	[edx-64],xmm7
+	movdqa	[edx],xmm0
+	movdqa	xmm0,[80+ebp]
+	movdqa	xmm7,xmm6
+	movdqu	xmm6,[96+ebx]
+	paddq	xmm0,xmm5
+db	102,15,56,0,247
+	movq	mm1,mm4
+	movq	mm7,[edx-48]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[16+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[48+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[40+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[8+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[56+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[16+esp]
+	paddq	mm2,mm6
+	movq	mm6,[24+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-40]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[8+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[40+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[32+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[48+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[8+esp]
+	paddq	mm0,mm6
+	movq	mm6,[16+esp]
+	movdqa	[edx-48],xmm0
+	movdqa	[16+edx],xmm1
+	movdqa	xmm1,[96+ebp]
+	movdqa	xmm0,xmm7
+	movdqu	xmm7,[112+ebx]
+	paddq	xmm1,xmm6
+db	102,15,56,0,248
+	movq	mm1,mm4
+	movq	mm7,[edx-32]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[32+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[24+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[56+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[40+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[esp]
+	paddq	mm2,mm6
+	movq	mm6,[8+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-24]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[56+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[24+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[16+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[48+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[32+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[56+esp]
+	paddq	mm0,mm6
+	movq	mm6,[esp]
+	movdqa	[edx-32],xmm1
+	movdqa	[32+edx],xmm2
+	movdqa	xmm2,[112+ebp]
+	movdqa	xmm0,[edx]
+	paddq	xmm2,xmm7
+	movq	mm1,mm4
+	movq	mm7,[edx-16]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[48+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm0,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[16+esp],mm0
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[8+esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[40+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm0
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm0
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[24+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm2,mm0
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	pxor	mm6,mm7
+	movq	mm5,[48+esp]
+	paddq	mm2,mm6
+	movq	mm6,[56+esp]
+	movq	mm1,mm4
+	movq	mm7,[edx-8]
+	pxor	mm5,mm6
+	psrlq	mm1,14
+	movq	[40+esp],mm4
+	pand	mm5,mm4
+	psllq	mm4,23
+	paddq	mm2,mm3
+	movq	mm3,mm1
+	psrlq	mm1,4
+	pxor	mm5,mm6
+	pxor	mm3,mm4
+	psllq	mm4,23
+	pxor	mm3,mm1
+	movq	[8+esp],mm2
+	paddq	mm7,mm5
+	pxor	mm3,mm4
+	psrlq	mm1,23
+	paddq	mm7,[esp]
+	pxor	mm3,mm1
+	psllq	mm4,4
+	pxor	mm3,mm4
+	movq	mm4,[32+esp]
+	paddq	mm3,mm7
+	movq	mm5,mm2
+	psrlq	mm5,28
+	paddq	mm4,mm3
+	movq	mm6,mm2
+	movq	mm7,mm5
+	psllq	mm6,25
+	movq	mm1,[16+esp]
+	psrlq	mm5,6
+	pxor	mm7,mm6
+	psllq	mm6,5
+	pxor	mm7,mm5
+	pxor	mm2,mm1
+	psrlq	mm5,5
+	pxor	mm7,mm6
+	pand	mm0,mm2
+	psllq	mm6,6
+	pxor	mm7,mm5
+	pxor	mm0,mm1
+	pxor	mm6,mm7
+	movq	mm5,[40+esp]
+	paddq	mm0,mm6
+	movq	mm6,[48+esp]
+	movdqa	[edx-16],xmm2
+	movq	mm1,[8+esp]
+	paddq	mm0,mm3
+	movq	mm3,[24+esp]
+	movq	mm7,[56+esp]
+	pxor	mm2,mm1
+	paddq	mm0,[esi]
+	paddq	mm1,[8+esi]
+	paddq	mm2,[16+esi]
+	paddq	mm3,[24+esi]
+	paddq	mm4,[32+esi]
+	paddq	mm5,[40+esi]
+	paddq	mm6,[48+esi]
+	paddq	mm7,[56+esi]
+	movq	[esi],mm0
+	movq	[8+esi],mm1
+	movq	[16+esi],mm2
+	movq	[24+esi],mm3
+	movq	[32+esi],mm4
+	movq	[40+esi],mm5
+	movq	[48+esi],mm6
+	movq	[56+esi],mm7
+	cmp	edi,eax
+	jb	NEAR L$007loop_ssse3
+	mov	esp,DWORD [76+edx]
+	emms
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	16
+L$002loop_x86:
+	mov	eax,DWORD [edi]
+	mov	ebx,DWORD [4+edi]
+	mov	ecx,DWORD [8+edi]
+	mov	edx,DWORD [12+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [16+edi]
+	mov	ebx,DWORD [20+edi]
+	mov	ecx,DWORD [24+edi]
+	mov	edx,DWORD [28+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [32+edi]
+	mov	ebx,DWORD [36+edi]
+	mov	ecx,DWORD [40+edi]
+	mov	edx,DWORD [44+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [48+edi]
+	mov	ebx,DWORD [52+edi]
+	mov	ecx,DWORD [56+edi]
+	mov	edx,DWORD [60+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [64+edi]
+	mov	ebx,DWORD [68+edi]
+	mov	ecx,DWORD [72+edi]
+	mov	edx,DWORD [76+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [80+edi]
+	mov	ebx,DWORD [84+edi]
+	mov	ecx,DWORD [88+edi]
+	mov	edx,DWORD [92+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [96+edi]
+	mov	ebx,DWORD [100+edi]
+	mov	ecx,DWORD [104+edi]
+	mov	edx,DWORD [108+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	mov	eax,DWORD [112+edi]
+	mov	ebx,DWORD [116+edi]
+	mov	ecx,DWORD [120+edi]
+	mov	edx,DWORD [124+edi]
+	bswap	eax
+	bswap	ebx
+	bswap	ecx
+	bswap	edx
+	push	eax
+	push	ebx
+	push	ecx
+	push	edx
+	add	edi,128
+	sub	esp,72
+	mov	DWORD [204+esp],edi
+	lea	edi,[8+esp]
+	mov	ecx,16
+dd	2784229001
+align	16
+L$00900_15_x86:
+	mov	ecx,DWORD [40+esp]
+	mov	edx,DWORD [44+esp]
+	mov	esi,ecx
+	shr	ecx,9
+	mov	edi,edx
+	shr	edx,9
+	mov	ebx,ecx
+	shl	esi,14
+	mov	eax,edx
+	shl	edi,14
+	xor	ebx,esi
+	shr	ecx,5
+	xor	eax,edi
+	shr	edx,5
+	xor	eax,ecx
+	shl	esi,4
+	xor	ebx,edx
+	shl	edi,4
+	xor	ebx,esi
+	shr	ecx,4
+	xor	eax,edi
+	shr	edx,4
+	xor	eax,ecx
+	shl	esi,5
+	xor	ebx,edx
+	shl	edi,5
+	xor	eax,esi
+	xor	ebx,edi
+	mov	ecx,DWORD [48+esp]
+	mov	edx,DWORD [52+esp]
+	mov	esi,DWORD [56+esp]
+	mov	edi,DWORD [60+esp]
+	add	eax,DWORD [64+esp]
+	adc	ebx,DWORD [68+esp]
+	xor	ecx,esi
+	xor	edx,edi
+	and	ecx,DWORD [40+esp]
+	and	edx,DWORD [44+esp]
+	add	eax,DWORD [192+esp]
+	adc	ebx,DWORD [196+esp]
+	xor	ecx,esi
+	xor	edx,edi
+	mov	esi,DWORD [ebp]
+	mov	edi,DWORD [4+ebp]
+	add	eax,ecx
+	adc	ebx,edx
+	mov	ecx,DWORD [32+esp]
+	mov	edx,DWORD [36+esp]
+	add	eax,esi
+	adc	ebx,edi
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	add	eax,ecx
+	adc	ebx,edx
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	mov	DWORD [32+esp],eax
+	mov	DWORD [36+esp],ebx
+	mov	esi,ecx
+	shr	ecx,2
+	mov	edi,edx
+	shr	edx,2
+	mov	ebx,ecx
+	shl	esi,4
+	mov	eax,edx
+	shl	edi,4
+	xor	ebx,esi
+	shr	ecx,5
+	xor	eax,edi
+	shr	edx,5
+	xor	ebx,ecx
+	shl	esi,21
+	xor	eax,edx
+	shl	edi,21
+	xor	eax,esi
+	shr	ecx,21
+	xor	ebx,edi
+	shr	edx,21
+	xor	eax,ecx
+	shl	esi,5
+	xor	ebx,edx
+	shl	edi,5
+	xor	eax,esi
+	xor	ebx,edi
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	mov	esi,DWORD [16+esp]
+	mov	edi,DWORD [20+esp]
+	add	eax,DWORD [esp]
+	adc	ebx,DWORD [4+esp]
+	or	ecx,esi
+	or	edx,edi
+	and	ecx,DWORD [24+esp]
+	and	edx,DWORD [28+esp]
+	and	esi,DWORD [8+esp]
+	and	edi,DWORD [12+esp]
+	or	ecx,esi
+	or	edx,edi
+	add	eax,ecx
+	adc	ebx,edx
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	mov	dl,BYTE [ebp]
+	sub	esp,8
+	lea	ebp,[8+ebp]
+	cmp	dl,148
+	jne	NEAR L$00900_15_x86
+align	16
+L$01016_79_x86:
+	mov	ecx,DWORD [312+esp]
+	mov	edx,DWORD [316+esp]
+	mov	esi,ecx
+	shr	ecx,1
+	mov	edi,edx
+	shr	edx,1
+	mov	eax,ecx
+	shl	esi,24
+	mov	ebx,edx
+	shl	edi,24
+	xor	ebx,esi
+	shr	ecx,6
+	xor	eax,edi
+	shr	edx,6
+	xor	eax,ecx
+	shl	esi,7
+	xor	ebx,edx
+	shl	edi,1
+	xor	ebx,esi
+	shr	ecx,1
+	xor	eax,edi
+	shr	edx,1
+	xor	eax,ecx
+	shl	edi,6
+	xor	ebx,edx
+	xor	eax,edi
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	mov	ecx,DWORD [208+esp]
+	mov	edx,DWORD [212+esp]
+	mov	esi,ecx
+	shr	ecx,6
+	mov	edi,edx
+	shr	edx,6
+	mov	eax,ecx
+	shl	esi,3
+	mov	ebx,edx
+	shl	edi,3
+	xor	eax,esi
+	shr	ecx,13
+	xor	ebx,edi
+	shr	edx,13
+	xor	eax,ecx
+	shl	esi,10
+	xor	ebx,edx
+	shl	edi,10
+	xor	ebx,esi
+	shr	ecx,10
+	xor	eax,edi
+	shr	edx,10
+	xor	ebx,ecx
+	shl	edi,13
+	xor	eax,edx
+	xor	eax,edi
+	mov	ecx,DWORD [320+esp]
+	mov	edx,DWORD [324+esp]
+	add	eax,DWORD [esp]
+	adc	ebx,DWORD [4+esp]
+	mov	esi,DWORD [248+esp]
+	mov	edi,DWORD [252+esp]
+	add	eax,ecx
+	adc	ebx,edx
+	add	eax,esi
+	adc	ebx,edi
+	mov	DWORD [192+esp],eax
+	mov	DWORD [196+esp],ebx
+	mov	ecx,DWORD [40+esp]
+	mov	edx,DWORD [44+esp]
+	mov	esi,ecx
+	shr	ecx,9
+	mov	edi,edx
+	shr	edx,9
+	mov	ebx,ecx
+	shl	esi,14
+	mov	eax,edx
+	shl	edi,14
+	xor	ebx,esi
+	shr	ecx,5
+	xor	eax,edi
+	shr	edx,5
+	xor	eax,ecx
+	shl	esi,4
+	xor	ebx,edx
+	shl	edi,4
+	xor	ebx,esi
+	shr	ecx,4
+	xor	eax,edi
+	shr	edx,4
+	xor	eax,ecx
+	shl	esi,5
+	xor	ebx,edx
+	shl	edi,5
+	xor	eax,esi
+	xor	ebx,edi
+	mov	ecx,DWORD [48+esp]
+	mov	edx,DWORD [52+esp]
+	mov	esi,DWORD [56+esp]
+	mov	edi,DWORD [60+esp]
+	add	eax,DWORD [64+esp]
+	adc	ebx,DWORD [68+esp]
+	xor	ecx,esi
+	xor	edx,edi
+	and	ecx,DWORD [40+esp]
+	and	edx,DWORD [44+esp]
+	add	eax,DWORD [192+esp]
+	adc	ebx,DWORD [196+esp]
+	xor	ecx,esi
+	xor	edx,edi
+	mov	esi,DWORD [ebp]
+	mov	edi,DWORD [4+ebp]
+	add	eax,ecx
+	adc	ebx,edx
+	mov	ecx,DWORD [32+esp]
+	mov	edx,DWORD [36+esp]
+	add	eax,esi
+	adc	ebx,edi
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	add	eax,ecx
+	adc	ebx,edx
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	mov	DWORD [32+esp],eax
+	mov	DWORD [36+esp],ebx
+	mov	esi,ecx
+	shr	ecx,2
+	mov	edi,edx
+	shr	edx,2
+	mov	ebx,ecx
+	shl	esi,4
+	mov	eax,edx
+	shl	edi,4
+	xor	ebx,esi
+	shr	ecx,5
+	xor	eax,edi
+	shr	edx,5
+	xor	ebx,ecx
+	shl	esi,21
+	xor	eax,edx
+	shl	edi,21
+	xor	eax,esi
+	shr	ecx,21
+	xor	ebx,edi
+	shr	edx,21
+	xor	eax,ecx
+	shl	esi,5
+	xor	ebx,edx
+	shl	edi,5
+	xor	eax,esi
+	xor	ebx,edi
+	mov	ecx,DWORD [8+esp]
+	mov	edx,DWORD [12+esp]
+	mov	esi,DWORD [16+esp]
+	mov	edi,DWORD [20+esp]
+	add	eax,DWORD [esp]
+	adc	ebx,DWORD [4+esp]
+	or	ecx,esi
+	or	edx,edi
+	and	ecx,DWORD [24+esp]
+	and	edx,DWORD [28+esp]
+	and	esi,DWORD [8+esp]
+	and	edi,DWORD [12+esp]
+	or	ecx,esi
+	or	edx,edi
+	add	eax,ecx
+	adc	ebx,edx
+	mov	DWORD [esp],eax
+	mov	DWORD [4+esp],ebx
+	mov	dl,BYTE [ebp]
+	sub	esp,8
+	lea	ebp,[8+ebp]
+	cmp	dl,23
+	jne	NEAR L$01016_79_x86
+	mov	esi,DWORD [840+esp]
+	mov	edi,DWORD [844+esp]
+	mov	eax,DWORD [esi]
+	mov	ebx,DWORD [4+esi]
+	mov	ecx,DWORD [8+esi]
+	mov	edx,DWORD [12+esi]
+	add	eax,DWORD [8+esp]
+	adc	ebx,DWORD [12+esp]
+	mov	DWORD [esi],eax
+	mov	DWORD [4+esi],ebx
+	add	ecx,DWORD [16+esp]
+	adc	edx,DWORD [20+esp]
+	mov	DWORD [8+esi],ecx
+	mov	DWORD [12+esi],edx
+	mov	eax,DWORD [16+esi]
+	mov	ebx,DWORD [20+esi]
+	mov	ecx,DWORD [24+esi]
+	mov	edx,DWORD [28+esi]
+	add	eax,DWORD [24+esp]
+	adc	ebx,DWORD [28+esp]
+	mov	DWORD [16+esi],eax
+	mov	DWORD [20+esi],ebx
+	add	ecx,DWORD [32+esp]
+	adc	edx,DWORD [36+esp]
+	mov	DWORD [24+esi],ecx
+	mov	DWORD [28+esi],edx
+	mov	eax,DWORD [32+esi]
+	mov	ebx,DWORD [36+esi]
+	mov	ecx,DWORD [40+esi]
+	mov	edx,DWORD [44+esi]
+	add	eax,DWORD [40+esp]
+	adc	ebx,DWORD [44+esp]
+	mov	DWORD [32+esi],eax
+	mov	DWORD [36+esi],ebx
+	add	ecx,DWORD [48+esp]
+	adc	edx,DWORD [52+esp]
+	mov	DWORD [40+esi],ecx
+	mov	DWORD [44+esi],edx
+	mov	eax,DWORD [48+esi]
+	mov	ebx,DWORD [52+esi]
+	mov	ecx,DWORD [56+esi]
+	mov	edx,DWORD [60+esi]
+	add	eax,DWORD [56+esp]
+	adc	ebx,DWORD [60+esp]
+	mov	DWORD [48+esi],eax
+	mov	DWORD [52+esi],ebx
+	add	ecx,DWORD [64+esp]
+	adc	edx,DWORD [68+esp]
+	mov	DWORD [56+esi],ecx
+	mov	DWORD [60+esi],edx
+	add	esp,840
+	sub	ebp,640
+	cmp	edi,DWORD [8+esp]
+	jb	NEAR L$002loop_x86
+	mov	esp,DWORD [12+esp]
+	pop	edi
+	pop	esi
+	pop	ebx
+	pop	ebp
+	ret
+align	64
+L$001K512:
+dd	3609767458,1116352408
+dd	602891725,1899447441
+dd	3964484399,3049323471
+dd	2173295548,3921009573
+dd	4081628472,961987163
+dd	3053834265,1508970993
+dd	2937671579,2453635748
+dd	3664609560,2870763221
+dd	2734883394,3624381080
+dd	1164996542,310598401
+dd	1323610764,607225278
+dd	3590304994,1426881987
+dd	4068182383,1925078388
+dd	991336113,2162078206
+dd	633803317,2614888103
+dd	3479774868,3248222580
+dd	2666613458,3835390401
+dd	944711139,4022224774
+dd	2341262773,264347078
+dd	2007800933,604807628
+dd	1495990901,770255983
+dd	1856431235,1249150122
+dd	3175218132,1555081692
+dd	2198950837,1996064986
+dd	3999719339,2554220882
+dd	766784016,2821834349
+dd	2566594879,2952996808
+dd	3203337956,3210313671
+dd	1034457026,3336571891
+dd	2466948901,3584528711
+dd	3758326383,113926993
+dd	168717936,338241895
+dd	1188179964,666307205
+dd	1546045734,773529912
+dd	1522805485,1294757372
+dd	2643833823,1396182291
+dd	2343527390,1695183700
+dd	1014477480,1986661051
+dd	1206759142,2177026350
+dd	344077627,2456956037
+dd	1290863460,2730485921
+dd	3158454273,2820302411
+dd	3505952657,3259730800
+dd	106217008,3345764771
+dd	3606008344,3516065817
+dd	1432725776,3600352804
+dd	1467031594,4094571909
+dd	851169720,275423344
+dd	3100823752,430227734
+dd	1363258195,506948616
+dd	3750685593,659060556
+dd	3785050280,883997877
+dd	3318307427,958139571
+dd	3812723403,1322822218
+dd	2003034995,1537002063
+dd	3602036899,1747873779
+dd	1575990012,1955562222
+dd	1125592928,2024104815
+dd	2716904306,2227730452
+dd	442776044,2361852424
+dd	593698344,2428436474
+dd	3733110249,2756734187
+dd	2999351573,3204031479
+dd	3815920427,3329325298
+dd	3928383900,3391569614
+dd	566280711,3515267271
+dd	3454069534,3940187606
+dd	4000239992,4118630271
+dd	1914138554,116418474
+dd	2731055270,174292421
+dd	3203993006,289380356
+dd	320620315,460393269
+dd	587496836,685471733
+dd	1086792851,852142971
+dd	365543100,1017036298
+dd	2618297676,1126000580
+dd	3409855158,1288033470
+dd	4234509866,1501505948
+dd	987167468,1607167915
+dd	1246189591,1816402316
+dd	67438087,66051
+dd	202182159,134810123
+db	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
+db	110,115,102,111,114,109,32,102,111,114,32,120,56,54,44,32
+db	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+db	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+db	62,0
+segment	.bss
+common	_OPENSSL_ia32cap_P 16
diff --git a/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm
new file mode 100644
index 0000000..53394f0
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/aes/aes-x86_64.asm
@@ -0,0 +1,2858 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+ALIGN	16
+_x86_64_AES_encrypt:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+
+	mov	r13d,DWORD[240+r15]
+	sub	r13d,1
+	jmp	NEAR $L$enc_loop
+ALIGN	16
+$L$enc_loop:
+
+	movzx	esi,al
+	movzx	edi,bl
+	movzx	ebp,cl
+	mov	r10d,DWORD[rsi*8+r14]
+	mov	r11d,DWORD[rdi*8+r14]
+	mov	r12d,DWORD[rbp*8+r14]
+
+	movzx	esi,bh
+	movzx	edi,ch
+	movzx	ebp,dl
+	xor	r10d,DWORD[3+rsi*8+r14]
+	xor	r11d,DWORD[3+rdi*8+r14]
+	mov	r8d,DWORD[rbp*8+r14]
+
+	movzx	esi,dh
+	shr	ecx,16
+	movzx	ebp,ah
+	xor	r12d,DWORD[3+rsi*8+r14]
+	shr	edx,16
+	xor	r8d,DWORD[3+rbp*8+r14]
+
+	shr	ebx,16
+	lea	r15,[16+r15]
+	shr	eax,16
+
+	movzx	esi,cl
+	movzx	edi,dl
+	movzx	ebp,al
+	xor	r10d,DWORD[2+rsi*8+r14]
+	xor	r11d,DWORD[2+rdi*8+r14]
+	xor	r12d,DWORD[2+rbp*8+r14]
+
+	movzx	esi,dh
+	movzx	edi,ah
+	movzx	ebp,bl
+	xor	r10d,DWORD[1+rsi*8+r14]
+	xor	r11d,DWORD[1+rdi*8+r14]
+	xor	r8d,DWORD[2+rbp*8+r14]
+
+	mov	edx,DWORD[12+r15]
+	movzx	edi,bh
+	movzx	ebp,ch
+	mov	eax,DWORD[r15]
+	xor	r12d,DWORD[1+rdi*8+r14]
+	xor	r8d,DWORD[1+rbp*8+r14]
+
+	mov	ebx,DWORD[4+r15]
+	mov	ecx,DWORD[8+r15]
+	xor	eax,r10d
+	xor	ebx,r11d
+	xor	ecx,r12d
+	xor	edx,r8d
+	sub	r13d,1
+	jnz	NEAR $L$enc_loop
+	movzx	esi,al
+	movzx	edi,bl
+	movzx	ebp,cl
+	movzx	r10d,BYTE[2+rsi*8+r14]
+	movzx	r11d,BYTE[2+rdi*8+r14]
+	movzx	r12d,BYTE[2+rbp*8+r14]
+
+	movzx	esi,dl
+	movzx	edi,bh
+	movzx	ebp,ch
+	movzx	r8d,BYTE[2+rsi*8+r14]
+	mov	edi,DWORD[rdi*8+r14]
+	mov	ebp,DWORD[rbp*8+r14]
+
+	and	edi,0x0000ff00
+	and	ebp,0x0000ff00
+
+	xor	r10d,edi
+	xor	r11d,ebp
+	shr	ecx,16
+
+	movzx	esi,dh
+	movzx	edi,ah
+	shr	edx,16
+	mov	esi,DWORD[rsi*8+r14]
+	mov	edi,DWORD[rdi*8+r14]
+
+	and	esi,0x0000ff00
+	and	edi,0x0000ff00
+	shr	ebx,16
+	xor	r12d,esi
+	xor	r8d,edi
+	shr	eax,16
+
+	movzx	esi,cl
+	movzx	edi,dl
+	movzx	ebp,al
+	mov	esi,DWORD[rsi*8+r14]
+	mov	edi,DWORD[rdi*8+r14]
+	mov	ebp,DWORD[rbp*8+r14]
+
+	and	esi,0x00ff0000
+	and	edi,0x00ff0000
+	and	ebp,0x00ff0000
+
+	xor	r10d,esi
+	xor	r11d,edi
+	xor	r12d,ebp
+
+	movzx	esi,bl
+	movzx	edi,dh
+	movzx	ebp,ah
+	mov	esi,DWORD[rsi*8+r14]
+	mov	edi,DWORD[2+rdi*8+r14]
+	mov	ebp,DWORD[2+rbp*8+r14]
+
+	and	esi,0x00ff0000
+	and	edi,0xff000000
+	and	ebp,0xff000000
+
+	xor	r8d,esi
+	xor	r10d,edi
+	xor	r11d,ebp
+
+	movzx	esi,bh
+	movzx	edi,ch
+	mov	edx,DWORD[((16+12))+r15]
+	mov	esi,DWORD[2+rsi*8+r14]
+	mov	edi,DWORD[2+rdi*8+r14]
+	mov	eax,DWORD[((16+0))+r15]
+
+	and	esi,0xff000000
+	and	edi,0xff000000
+
+	xor	r12d,esi
+	xor	r8d,edi
+
+	mov	ebx,DWORD[((16+4))+r15]
+	mov	ecx,DWORD[((16+8))+r15]
+	xor	eax,r10d
+	xor	ebx,r11d
+	xor	ecx,r12d
+	xor	edx,r8d
+DB	0xf3,0xc3
+
+
+ALIGN	16
+_x86_64_AES_encrypt_compact:
+	lea	r8,[128+r14]
+	mov	edi,DWORD[((0-128))+r8]
+	mov	ebp,DWORD[((32-128))+r8]
+	mov	r10d,DWORD[((64-128))+r8]
+	mov	r11d,DWORD[((96-128))+r8]
+	mov	edi,DWORD[((128-128))+r8]
+	mov	ebp,DWORD[((160-128))+r8]
+	mov	r10d,DWORD[((192-128))+r8]
+	mov	r11d,DWORD[((224-128))+r8]
+	jmp	NEAR $L$enc_loop_compact
+ALIGN	16
+$L$enc_loop_compact:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+	lea	r15,[16+r15]
+	movzx	r10d,al
+	movzx	r11d,bl
+	movzx	r12d,cl
+	movzx	r8d,dl
+	movzx	esi,bh
+	movzx	edi,ch
+	shr	ecx,16
+	movzx	ebp,dh
+	movzx	r10d,BYTE[r10*1+r14]
+	movzx	r11d,BYTE[r11*1+r14]
+	movzx	r12d,BYTE[r12*1+r14]
+	movzx	r8d,BYTE[r8*1+r14]
+
+	movzx	r9d,BYTE[rsi*1+r14]
+	movzx	esi,ah
+	movzx	r13d,BYTE[rdi*1+r14]
+	movzx	edi,cl
+	movzx	ebp,BYTE[rbp*1+r14]
+	movzx	esi,BYTE[rsi*1+r14]
+
+	shl	r9d,8
+	shr	edx,16
+	shl	r13d,8
+	xor	r10d,r9d
+	shr	eax,16
+	movzx	r9d,dl
+	shr	ebx,16
+	xor	r11d,r13d
+	shl	ebp,8
+	movzx	r13d,al
+	movzx	edi,BYTE[rdi*1+r14]
+	xor	r12d,ebp
+
+	shl	esi,8
+	movzx	ebp,bl
+	shl	edi,16
+	xor	r8d,esi
+	movzx	r9d,BYTE[r9*1+r14]
+	movzx	esi,dh
+	movzx	r13d,BYTE[r13*1+r14]
+	xor	r10d,edi
+
+	shr	ecx,8
+	movzx	edi,ah
+	shl	r9d,16
+	shr	ebx,8
+	shl	r13d,16
+	xor	r11d,r9d
+	movzx	ebp,BYTE[rbp*1+r14]
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+	movzx	edx,BYTE[rcx*1+r14]
+	movzx	ecx,BYTE[rbx*1+r14]
+
+	shl	ebp,16
+	xor	r12d,r13d
+	shl	esi,24
+	xor	r8d,ebp
+	shl	edi,24
+	xor	r10d,esi
+	shl	edx,24
+	xor	r11d,edi
+	shl	ecx,24
+	mov	eax,r10d
+	mov	ebx,r11d
+	xor	ecx,r12d
+	xor	edx,r8d
+	cmp	r15,QWORD[16+rsp]
+	je	NEAR $L$enc_compact_done
+	mov	r10d,0x80808080
+	mov	r11d,0x80808080
+	and	r10d,eax
+	and	r11d,ebx
+	mov	esi,r10d
+	mov	edi,r11d
+	shr	r10d,7
+	lea	r8d,[rax*1+rax]
+	shr	r11d,7
+	lea	r9d,[rbx*1+rbx]
+	sub	esi,r10d
+	sub	edi,r11d
+	and	r8d,0xfefefefe
+	and	r9d,0xfefefefe
+	and	esi,0x1b1b1b1b
+	and	edi,0x1b1b1b1b
+	mov	r10d,eax
+	mov	r11d,ebx
+	xor	r8d,esi
+	xor	r9d,edi
+
+	xor	eax,r8d
+	xor	ebx,r9d
+	mov	r12d,0x80808080
+	rol	eax,24
+	mov	ebp,0x80808080
+	rol	ebx,24
+	and	r12d,ecx
+	and	ebp,edx
+	xor	eax,r8d
+	xor	ebx,r9d
+	mov	esi,r12d
+	ror	r10d,16
+	mov	edi,ebp
+	ror	r11d,16
+	lea	r8d,[rcx*1+rcx]
+	shr	r12d,7
+	xor	eax,r10d
+	shr	ebp,7
+	xor	ebx,r11d
+	ror	r10d,8
+	lea	r9d,[rdx*1+rdx]
+	ror	r11d,8
+	sub	esi,r12d
+	sub	edi,ebp
+	xor	eax,r10d
+	xor	ebx,r11d
+
+	and	r8d,0xfefefefe
+	and	r9d,0xfefefefe
+	and	esi,0x1b1b1b1b
+	and	edi,0x1b1b1b1b
+	mov	r12d,ecx
+	mov	ebp,edx
+	xor	r8d,esi
+	xor	r9d,edi
+
+	ror	r12d,16
+	xor	ecx,r8d
+	ror	ebp,16
+	xor	edx,r9d
+	rol	ecx,24
+	mov	esi,DWORD[r14]
+	rol	edx,24
+	xor	ecx,r8d
+	mov	edi,DWORD[64+r14]
+	xor	edx,r9d
+	mov	r8d,DWORD[128+r14]
+	xor	ecx,r12d
+	ror	r12d,8
+	xor	edx,ebp
+	ror	ebp,8
+	xor	ecx,r12d
+	mov	r9d,DWORD[192+r14]
+	xor	edx,ebp
+	jmp	NEAR $L$enc_loop_compact
+ALIGN	16
+$L$enc_compact_done:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+DB	0xf3,0xc3
+
+ALIGN	16
+global	asm_AES_encrypt
+
+
+asm_AES_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_AES_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+
+	mov	r10,rsp
+	lea	rcx,[((-63))+rdx]
+	and	rsp,-64
+	sub	rcx,rsp
+	neg	rcx
+	and	rcx,0x3c0
+	sub	rsp,rcx
+	sub	rsp,32
+
+	mov	QWORD[16+rsp],rsi
+	mov	QWORD[24+rsp],r10
+$L$enc_prologue:
+
+	mov	r15,rdx
+	mov	r13d,DWORD[240+r15]
+
+	mov	eax,DWORD[rdi]
+	mov	ebx,DWORD[4+rdi]
+	mov	ecx,DWORD[8+rdi]
+	mov	edx,DWORD[12+rdi]
+
+	shl	r13d,4
+	lea	rbp,[r13*1+r15]
+	mov	QWORD[rsp],r15
+	mov	QWORD[8+rsp],rbp
+
+
+	lea	r14,[(($L$AES_Te+2048))]
+	lea	rbp,[768+rsp]
+	sub	rbp,r14
+	and	rbp,0x300
+	lea	r14,[rbp*1+r14]
+
+	call	_x86_64_AES_encrypt_compact
+
+	mov	r9,QWORD[16+rsp]
+	mov	rsi,QWORD[24+rsp]
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$enc_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_AES_encrypt:
+
+ALIGN	16
+_x86_64_AES_decrypt:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+
+	mov	r13d,DWORD[240+r15]
+	sub	r13d,1
+	jmp	NEAR $L$dec_loop
+ALIGN	16
+$L$dec_loop:
+
+	movzx	esi,al
+	movzx	edi,bl
+	movzx	ebp,cl
+	mov	r10d,DWORD[rsi*8+r14]
+	mov	r11d,DWORD[rdi*8+r14]
+	mov	r12d,DWORD[rbp*8+r14]
+
+	movzx	esi,dh
+	movzx	edi,ah
+	movzx	ebp,dl
+	xor	r10d,DWORD[3+rsi*8+r14]
+	xor	r11d,DWORD[3+rdi*8+r14]
+	mov	r8d,DWORD[rbp*8+r14]
+
+	movzx	esi,bh
+	shr	eax,16
+	movzx	ebp,ch
+	xor	r12d,DWORD[3+rsi*8+r14]
+	shr	edx,16
+	xor	r8d,DWORD[3+rbp*8+r14]
+
+	shr	ebx,16
+	lea	r15,[16+r15]
+	shr	ecx,16
+
+	movzx	esi,cl
+	movzx	edi,dl
+	movzx	ebp,al
+	xor	r10d,DWORD[2+rsi*8+r14]
+	xor	r11d,DWORD[2+rdi*8+r14]
+	xor	r12d,DWORD[2+rbp*8+r14]
+
+	movzx	esi,bh
+	movzx	edi,ch
+	movzx	ebp,bl
+	xor	r10d,DWORD[1+rsi*8+r14]
+	xor	r11d,DWORD[1+rdi*8+r14]
+	xor	r8d,DWORD[2+rbp*8+r14]
+
+	movzx	esi,dh
+	mov	edx,DWORD[12+r15]
+	movzx	ebp,ah
+	xor	r12d,DWORD[1+rsi*8+r14]
+	mov	eax,DWORD[r15]
+	xor	r8d,DWORD[1+rbp*8+r14]
+
+	xor	eax,r10d
+	mov	ebx,DWORD[4+r15]
+	mov	ecx,DWORD[8+r15]
+	xor	ecx,r12d
+	xor	ebx,r11d
+	xor	edx,r8d
+	sub	r13d,1
+	jnz	NEAR $L$dec_loop
+	lea	r14,[2048+r14]
+	movzx	esi,al
+	movzx	edi,bl
+	movzx	ebp,cl
+	movzx	r10d,BYTE[rsi*1+r14]
+	movzx	r11d,BYTE[rdi*1+r14]
+	movzx	r12d,BYTE[rbp*1+r14]
+
+	movzx	esi,dl
+	movzx	edi,dh
+	movzx	ebp,ah
+	movzx	r8d,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+	movzx	ebp,BYTE[rbp*1+r14]
+
+	shl	edi,8
+	shl	ebp,8
+
+	xor	r10d,edi
+	xor	r11d,ebp
+	shr	edx,16
+
+	movzx	esi,bh
+	movzx	edi,ch
+	shr	eax,16
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+
+	shl	esi,8
+	shl	edi,8
+	shr	ebx,16
+	xor	r12d,esi
+	xor	r8d,edi
+	shr	ecx,16
+
+	movzx	esi,cl
+	movzx	edi,dl
+	movzx	ebp,al
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+	movzx	ebp,BYTE[rbp*1+r14]
+
+	shl	esi,16
+	shl	edi,16
+	shl	ebp,16
+
+	xor	r10d,esi
+	xor	r11d,edi
+	xor	r12d,ebp
+
+	movzx	esi,bl
+	movzx	edi,bh
+	movzx	ebp,ch
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+	movzx	ebp,BYTE[rbp*1+r14]
+
+	shl	esi,16
+	shl	edi,24
+	shl	ebp,24
+
+	xor	r8d,esi
+	xor	r10d,edi
+	xor	r11d,ebp
+
+	movzx	esi,dh
+	movzx	edi,ah
+	mov	edx,DWORD[((16+12))+r15]
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	edi,BYTE[rdi*1+r14]
+	mov	eax,DWORD[((16+0))+r15]
+
+	shl	esi,24
+	shl	edi,24
+
+	xor	r12d,esi
+	xor	r8d,edi
+
+	mov	ebx,DWORD[((16+4))+r15]
+	mov	ecx,DWORD[((16+8))+r15]
+	lea	r14,[((-2048))+r14]
+	xor	eax,r10d
+	xor	ebx,r11d
+	xor	ecx,r12d
+	xor	edx,r8d
+DB	0xf3,0xc3
+
+
+ALIGN	16
+_x86_64_AES_decrypt_compact:
+	lea	r8,[128+r14]
+	mov	edi,DWORD[((0-128))+r8]
+	mov	ebp,DWORD[((32-128))+r8]
+	mov	r10d,DWORD[((64-128))+r8]
+	mov	r11d,DWORD[((96-128))+r8]
+	mov	edi,DWORD[((128-128))+r8]
+	mov	ebp,DWORD[((160-128))+r8]
+	mov	r10d,DWORD[((192-128))+r8]
+	mov	r11d,DWORD[((224-128))+r8]
+	jmp	NEAR $L$dec_loop_compact
+
+ALIGN	16
+$L$dec_loop_compact:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+	lea	r15,[16+r15]
+	movzx	r10d,al
+	movzx	r11d,bl
+	movzx	r12d,cl
+	movzx	r8d,dl
+	movzx	esi,dh
+	movzx	edi,ah
+	shr	edx,16
+	movzx	ebp,bh
+	movzx	r10d,BYTE[r10*1+r14]
+	movzx	r11d,BYTE[r11*1+r14]
+	movzx	r12d,BYTE[r12*1+r14]
+	movzx	r8d,BYTE[r8*1+r14]
+
+	movzx	r9d,BYTE[rsi*1+r14]
+	movzx	esi,ch
+	movzx	r13d,BYTE[rdi*1+r14]
+	movzx	ebp,BYTE[rbp*1+r14]
+	movzx	esi,BYTE[rsi*1+r14]
+
+	shr	ecx,16
+	shl	r13d,8
+	shl	r9d,8
+	movzx	edi,cl
+	shr	eax,16
+	xor	r10d,r9d
+	shr	ebx,16
+	movzx	r9d,dl
+
+	shl	ebp,8
+	xor	r11d,r13d
+	shl	esi,8
+	movzx	r13d,al
+	movzx	edi,BYTE[rdi*1+r14]
+	xor	r12d,ebp
+	movzx	ebp,bl
+
+	shl	edi,16
+	xor	r8d,esi
+	movzx	r9d,BYTE[r9*1+r14]
+	movzx	esi,bh
+	movzx	ebp,BYTE[rbp*1+r14]
+	xor	r10d,edi
+	movzx	r13d,BYTE[r13*1+r14]
+	movzx	edi,ch
+
+	shl	ebp,16
+	shl	r9d,16
+	shl	r13d,16
+	xor	r8d,ebp
+	movzx	ebp,dh
+	xor	r11d,r9d
+	shr	eax,8
+	xor	r12d,r13d
+
+	movzx	esi,BYTE[rsi*1+r14]
+	movzx	ebx,BYTE[rdi*1+r14]
+	movzx	ecx,BYTE[rbp*1+r14]
+	movzx	edx,BYTE[rax*1+r14]
+
+	mov	eax,r10d
+	shl	esi,24
+	shl	ebx,24
+	shl	ecx,24
+	xor	eax,esi
+	shl	edx,24
+	xor	ebx,r11d
+	xor	ecx,r12d
+	xor	edx,r8d
+	cmp	r15,QWORD[16+rsp]
+	je	NEAR $L$dec_compact_done
+
+	mov	rsi,QWORD[((256+0))+r14]
+	shl	rbx,32
+	shl	rdx,32
+	mov	rdi,QWORD[((256+8))+r14]
+	or	rax,rbx
+	or	rcx,rdx
+	mov	rbp,QWORD[((256+16))+r14]
+	mov	r9,rsi
+	mov	r12,rsi
+	and	r9,rax
+	and	r12,rcx
+	mov	rbx,r9
+	mov	rdx,r12
+	shr	r9,7
+	lea	r8,[rax*1+rax]
+	shr	r12,7
+	lea	r11,[rcx*1+rcx]
+	sub	rbx,r9
+	sub	rdx,r12
+	and	r8,rdi
+	and	r11,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r8,rbx
+	xor	r11,rdx
+	mov	r10,rsi
+	mov	r13,rsi
+
+	and	r10,r8
+	and	r13,r11
+	mov	rbx,r10
+	mov	rdx,r13
+	shr	r10,7
+	lea	r9,[r8*1+r8]
+	shr	r13,7
+	lea	r12,[r11*1+r11]
+	sub	rbx,r10
+	sub	rdx,r13
+	and	r9,rdi
+	and	r12,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r9,rbx
+	xor	r12,rdx
+	mov	r10,rsi
+	mov	r13,rsi
+
+	and	r10,r9
+	and	r13,r12
+	mov	rbx,r10
+	mov	rdx,r13
+	shr	r10,7
+	xor	r8,rax
+	shr	r13,7
+	xor	r11,rcx
+	sub	rbx,r10
+	sub	rdx,r13
+	lea	r10,[r9*1+r9]
+	lea	r13,[r12*1+r12]
+	xor	r9,rax
+	xor	r12,rcx
+	and	r10,rdi
+	and	r13,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r10,rbx
+	xor	r13,rdx
+
+	xor	rax,r10
+	xor	rcx,r13
+	xor	r8,r10
+	xor	r11,r13
+	mov	rbx,rax
+	mov	rdx,rcx
+	xor	r9,r10
+	shr	rbx,32
+	xor	r12,r13
+	shr	rdx,32
+	xor	r10,r8
+	rol	eax,8
+	xor	r13,r11
+	rol	ecx,8
+	xor	r10,r9
+	rol	ebx,8
+	xor	r13,r12
+
+	rol	edx,8
+	xor	eax,r10d
+	shr	r10,32
+	xor	ecx,r13d
+	shr	r13,32
+	xor	ebx,r10d
+	xor	edx,r13d
+
+	mov	r10,r8
+	rol	r8d,24
+	mov	r13,r11
+	rol	r11d,24
+	shr	r10,32
+	xor	eax,r8d
+	shr	r13,32
+	xor	ecx,r11d
+	rol	r10d,24
+	mov	r8,r9
+	rol	r13d,24
+	mov	r11,r12
+	shr	r8,32
+	xor	ebx,r10d
+	shr	r11,32
+	xor	edx,r13d
+
+	mov	rsi,QWORD[r14]
+	rol	r9d,16
+	mov	rdi,QWORD[64+r14]
+	rol	r12d,16
+	mov	rbp,QWORD[128+r14]
+	rol	r8d,16
+	mov	r10,QWORD[192+r14]
+	xor	eax,r9d
+	rol	r11d,16
+	xor	ecx,r12d
+	mov	r13,QWORD[256+r14]
+	xor	ebx,r8d
+	xor	edx,r11d
+	jmp	NEAR $L$dec_loop_compact
+ALIGN	16
+$L$dec_compact_done:
+	xor	eax,DWORD[r15]
+	xor	ebx,DWORD[4+r15]
+	xor	ecx,DWORD[8+r15]
+	xor	edx,DWORD[12+r15]
+DB	0xf3,0xc3
+
+ALIGN	16
+global	asm_AES_decrypt
+
+
+asm_AES_decrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_AES_decrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+
+	mov	r10,rsp
+	lea	rcx,[((-63))+rdx]
+	and	rsp,-64
+	sub	rcx,rsp
+	neg	rcx
+	and	rcx,0x3c0
+	sub	rsp,rcx
+	sub	rsp,32
+
+	mov	QWORD[16+rsp],rsi
+	mov	QWORD[24+rsp],r10
+$L$dec_prologue:
+
+	mov	r15,rdx
+	mov	r13d,DWORD[240+r15]
+
+	mov	eax,DWORD[rdi]
+	mov	ebx,DWORD[4+rdi]
+	mov	ecx,DWORD[8+rdi]
+	mov	edx,DWORD[12+rdi]
+
+	shl	r13d,4
+	lea	rbp,[r13*1+r15]
+	mov	QWORD[rsp],r15
+	mov	QWORD[8+rsp],rbp
+
+
+	lea	r14,[(($L$AES_Td+2048))]
+	lea	rbp,[768+rsp]
+	sub	rbp,r14
+	and	rbp,0x300
+	lea	r14,[rbp*1+r14]
+	shr	rbp,3
+	add	r14,rbp
+
+	call	_x86_64_AES_decrypt_compact
+
+	mov	r9,QWORD[16+rsp]
+	mov	rsi,QWORD[24+rsp]
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$dec_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_AES_decrypt:
+ALIGN	16
+global	asm_AES_set_encrypt_key
+
+asm_AES_set_encrypt_key:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_AES_set_encrypt_key:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	sub	rsp,8
+$L$enc_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+
+	mov	rbp,QWORD[40+rsp]
+	mov	rbx,QWORD[48+rsp]
+	add	rsp,56
+$L$enc_key_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_AES_set_encrypt_key:
+
+
+ALIGN	16
+_x86_64_AES_set_encrypt_key:
+	mov	ecx,esi
+	mov	rsi,rdi
+	mov	rdi,rdx
+
+	test	rsi,-1
+	jz	NEAR $L$badpointer
+	test	rdi,-1
+	jz	NEAR $L$badpointer
+
+	lea	rbp,[$L$AES_Te]
+	lea	rbp,[((2048+128))+rbp]
+
+
+	mov	eax,DWORD[((0-128))+rbp]
+	mov	ebx,DWORD[((32-128))+rbp]
+	mov	r8d,DWORD[((64-128))+rbp]
+	mov	edx,DWORD[((96-128))+rbp]
+	mov	eax,DWORD[((128-128))+rbp]
+	mov	ebx,DWORD[((160-128))+rbp]
+	mov	r8d,DWORD[((192-128))+rbp]
+	mov	edx,DWORD[((224-128))+rbp]
+
+	cmp	ecx,128
+	je	NEAR $L$10rounds
+	cmp	ecx,192
+	je	NEAR $L$12rounds
+	cmp	ecx,256
+	je	NEAR $L$14rounds
+	mov	rax,-2
+	jmp	NEAR $L$exit
+
+$L$10rounds:
+	mov	rax,QWORD[rsi]
+	mov	rdx,QWORD[8+rsi]
+	mov	QWORD[rdi],rax
+	mov	QWORD[8+rdi],rdx
+
+	shr	rdx,32
+	xor	ecx,ecx
+	jmp	NEAR $L$10shortcut
+ALIGN	4
+$L$10loop:
+	mov	eax,DWORD[rdi]
+	mov	edx,DWORD[12+rdi]
+$L$10shortcut:
+	movzx	esi,dl
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shl	ebx,16
+	xor	eax,ebx
+
+	xor	eax,DWORD[((1024-128))+rcx*4+rbp]
+	mov	DWORD[16+rdi],eax
+	xor	eax,DWORD[4+rdi]
+	mov	DWORD[20+rdi],eax
+	xor	eax,DWORD[8+rdi]
+	mov	DWORD[24+rdi],eax
+	xor	eax,DWORD[12+rdi]
+	mov	DWORD[28+rdi],eax
+	add	ecx,1
+	lea	rdi,[16+rdi]
+	cmp	ecx,10
+	jl	NEAR $L$10loop
+
+	mov	DWORD[80+rdi],10
+	xor	rax,rax
+	jmp	NEAR $L$exit
+
+$L$12rounds:
+	mov	rax,QWORD[rsi]
+	mov	rbx,QWORD[8+rsi]
+	mov	rdx,QWORD[16+rsi]
+	mov	QWORD[rdi],rax
+	mov	QWORD[8+rdi],rbx
+	mov	QWORD[16+rdi],rdx
+
+	shr	rdx,32
+	xor	ecx,ecx
+	jmp	NEAR $L$12shortcut
+ALIGN	4
+$L$12loop:
+	mov	eax,DWORD[rdi]
+	mov	edx,DWORD[20+rdi]
+$L$12shortcut:
+	movzx	esi,dl
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shl	ebx,16
+	xor	eax,ebx
+
+	xor	eax,DWORD[((1024-128))+rcx*4+rbp]
+	mov	DWORD[24+rdi],eax
+	xor	eax,DWORD[4+rdi]
+	mov	DWORD[28+rdi],eax
+	xor	eax,DWORD[8+rdi]
+	mov	DWORD[32+rdi],eax
+	xor	eax,DWORD[12+rdi]
+	mov	DWORD[36+rdi],eax
+
+	cmp	ecx,7
+	je	NEAR $L$12break
+	add	ecx,1
+
+	xor	eax,DWORD[16+rdi]
+	mov	DWORD[40+rdi],eax
+	xor	eax,DWORD[20+rdi]
+	mov	DWORD[44+rdi],eax
+
+	lea	rdi,[24+rdi]
+	jmp	NEAR $L$12loop
+$L$12break:
+	mov	DWORD[72+rdi],12
+	xor	rax,rax
+	jmp	NEAR $L$exit
+
+$L$14rounds:
+	mov	rax,QWORD[rsi]
+	mov	rbx,QWORD[8+rsi]
+	mov	rcx,QWORD[16+rsi]
+	mov	rdx,QWORD[24+rsi]
+	mov	QWORD[rdi],rax
+	mov	QWORD[8+rdi],rbx
+	mov	QWORD[16+rdi],rcx
+	mov	QWORD[24+rdi],rdx
+
+	shr	rdx,32
+	xor	ecx,ecx
+	jmp	NEAR $L$14shortcut
+ALIGN	4
+$L$14loop:
+	mov	eax,DWORD[rdi]
+	mov	edx,DWORD[28+rdi]
+$L$14shortcut:
+	movzx	esi,dl
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,24
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shr	edx,16
+	movzx	esi,dl
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,8
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shl	ebx,16
+	xor	eax,ebx
+
+	xor	eax,DWORD[((1024-128))+rcx*4+rbp]
+	mov	DWORD[32+rdi],eax
+	xor	eax,DWORD[4+rdi]
+	mov	DWORD[36+rdi],eax
+	xor	eax,DWORD[8+rdi]
+	mov	DWORD[40+rdi],eax
+	xor	eax,DWORD[12+rdi]
+	mov	DWORD[44+rdi],eax
+
+	cmp	ecx,6
+	je	NEAR $L$14break
+	add	ecx,1
+
+	mov	edx,eax
+	mov	eax,DWORD[16+rdi]
+	movzx	esi,dl
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shr	edx,16
+	shl	ebx,8
+	movzx	esi,dl
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	movzx	esi,dh
+	shl	ebx,16
+	xor	eax,ebx
+
+	movzx	ebx,BYTE[((-128))+rsi*1+rbp]
+	shl	ebx,24
+	xor	eax,ebx
+
+	mov	DWORD[48+rdi],eax
+	xor	eax,DWORD[20+rdi]
+	mov	DWORD[52+rdi],eax
+	xor	eax,DWORD[24+rdi]
+	mov	DWORD[56+rdi],eax
+	xor	eax,DWORD[28+rdi]
+	mov	DWORD[60+rdi],eax
+
+	lea	rdi,[32+rdi]
+	jmp	NEAR $L$14loop
+$L$14break:
+	mov	DWORD[48+rdi],14
+	xor	rax,rax
+	jmp	NEAR $L$exit
+
+$L$badpointer:
+	mov	rax,-1
+$L$exit:
+DB	0xf3,0xc3
+
+ALIGN	16
+global	asm_AES_set_decrypt_key
+
+asm_AES_set_decrypt_key:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_AES_set_decrypt_key:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	push	rdx
+$L$dec_key_prologue:
+
+	call	_x86_64_AES_set_encrypt_key
+	mov	r8,QWORD[rsp]
+	cmp	eax,0
+	jne	NEAR $L$abort
+
+	mov	r14d,DWORD[240+r8]
+	xor	rdi,rdi
+	lea	rcx,[r14*4+rdi]
+	mov	rsi,r8
+	lea	rdi,[rcx*4+r8]
+ALIGN	4
+$L$invert:
+	mov	rax,QWORD[rsi]
+	mov	rbx,QWORD[8+rsi]
+	mov	rcx,QWORD[rdi]
+	mov	rdx,QWORD[8+rdi]
+	mov	QWORD[rdi],rax
+	mov	QWORD[8+rdi],rbx
+	mov	QWORD[rsi],rcx
+	mov	QWORD[8+rsi],rdx
+	lea	rsi,[16+rsi]
+	lea	rdi,[((-16))+rdi]
+	cmp	rdi,rsi
+	jne	NEAR $L$invert
+
+	lea	rax,[(($L$AES_Te+2048+1024))]
+
+	mov	rsi,QWORD[40+rax]
+	mov	rdi,QWORD[48+rax]
+	mov	rbp,QWORD[56+rax]
+
+	mov	r15,r8
+	sub	r14d,1
+ALIGN	4
+$L$permute:
+	lea	r15,[16+r15]
+	mov	rax,QWORD[r15]
+	mov	rcx,QWORD[8+r15]
+	mov	r9,rsi
+	mov	r12,rsi
+	and	r9,rax
+	and	r12,rcx
+	mov	rbx,r9
+	mov	rdx,r12
+	shr	r9,7
+	lea	r8,[rax*1+rax]
+	shr	r12,7
+	lea	r11,[rcx*1+rcx]
+	sub	rbx,r9
+	sub	rdx,r12
+	and	r8,rdi
+	and	r11,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r8,rbx
+	xor	r11,rdx
+	mov	r10,rsi
+	mov	r13,rsi
+
+	and	r10,r8
+	and	r13,r11
+	mov	rbx,r10
+	mov	rdx,r13
+	shr	r10,7
+	lea	r9,[r8*1+r8]
+	shr	r13,7
+	lea	r12,[r11*1+r11]
+	sub	rbx,r10
+	sub	rdx,r13
+	and	r9,rdi
+	and	r12,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r9,rbx
+	xor	r12,rdx
+	mov	r10,rsi
+	mov	r13,rsi
+
+	and	r10,r9
+	and	r13,r12
+	mov	rbx,r10
+	mov	rdx,r13
+	shr	r10,7
+	xor	r8,rax
+	shr	r13,7
+	xor	r11,rcx
+	sub	rbx,r10
+	sub	rdx,r13
+	lea	r10,[r9*1+r9]
+	lea	r13,[r12*1+r12]
+	xor	r9,rax
+	xor	r12,rcx
+	and	r10,rdi
+	and	r13,rdi
+	and	rbx,rbp
+	and	rdx,rbp
+	xor	r10,rbx
+	xor	r13,rdx
+
+	xor	rax,r10
+	xor	rcx,r13
+	xor	r8,r10
+	xor	r11,r13
+	mov	rbx,rax
+	mov	rdx,rcx
+	xor	r9,r10
+	shr	rbx,32
+	xor	r12,r13
+	shr	rdx,32
+	xor	r10,r8
+	rol	eax,8
+	xor	r13,r11
+	rol	ecx,8
+	xor	r10,r9
+	rol	ebx,8
+	xor	r13,r12
+
+	rol	edx,8
+	xor	eax,r10d
+	shr	r10,32
+	xor	ecx,r13d
+	shr	r13,32
+	xor	ebx,r10d
+	xor	edx,r13d
+
+	mov	r10,r8
+	rol	r8d,24
+	mov	r13,r11
+	rol	r11d,24
+	shr	r10,32
+	xor	eax,r8d
+	shr	r13,32
+	xor	ecx,r11d
+	rol	r10d,24
+	mov	r8,r9
+	rol	r13d,24
+	mov	r11,r12
+	shr	r8,32
+	xor	ebx,r10d
+	shr	r11,32
+	xor	edx,r13d
+
+
+	rol	r9d,16
+
+	rol	r12d,16
+
+	rol	r8d,16
+
+	xor	eax,r9d
+	rol	r11d,16
+	xor	ecx,r12d
+
+	xor	ebx,r8d
+	xor	edx,r11d
+	mov	DWORD[r15],eax
+	mov	DWORD[4+r15],ebx
+	mov	DWORD[8+r15],ecx
+	mov	DWORD[12+r15],edx
+	sub	r14d,1
+	jnz	NEAR $L$permute
+
+	xor	rax,rax
+$L$abort:
+	mov	r15,QWORD[8+rsp]
+	mov	r14,QWORD[16+rsp]
+	mov	r13,QWORD[24+rsp]
+	mov	r12,QWORD[32+rsp]
+	mov	rbp,QWORD[40+rsp]
+	mov	rbx,QWORD[48+rsp]
+	add	rsp,56
+$L$dec_key_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_AES_set_decrypt_key:
+ALIGN	16
+global	asm_AES_cbc_encrypt
+
+EXTERN	OPENSSL_ia32cap_P
+
+asm_AES_cbc_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_AES_cbc_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	cmp	rdx,0
+	je	NEAR $L$cbc_epilogue
+	pushfq
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+$L$cbc_prologue:
+
+	cld
+	mov	r9d,r9d
+
+	lea	r14,[$L$AES_Te]
+	cmp	r9,0
+	jne	NEAR $L$cbc_picked_te
+	lea	r14,[$L$AES_Td]
+$L$cbc_picked_te:
+
+	mov	r10d,DWORD[OPENSSL_ia32cap_P]
+	cmp	rdx,512
+	jb	NEAR $L$cbc_slow_prologue
+	test	rdx,15
+	jnz	NEAR $L$cbc_slow_prologue
+	bt	r10d,28
+	jc	NEAR $L$cbc_slow_prologue
+
+
+	lea	r15,[((-88-248))+rsp]
+	and	r15,-64
+
+
+	mov	r10,r14
+	lea	r11,[2304+r14]
+	mov	r12,r15
+	and	r10,0xFFF
+	and	r11,0xFFF
+	and	r12,0xFFF
+
+	cmp	r12,r11
+	jb	NEAR $L$cbc_te_break_out
+	sub	r12,r11
+	sub	r15,r12
+	jmp	NEAR $L$cbc_te_ok
+$L$cbc_te_break_out:
+	sub	r12,r10
+	and	r12,0xFFF
+	add	r12,320
+	sub	r15,r12
+ALIGN	4
+$L$cbc_te_ok:
+
+	xchg	r15,rsp
+
+	mov	QWORD[16+rsp],r15
+$L$cbc_fast_body:
+	mov	QWORD[24+rsp],rdi
+	mov	QWORD[32+rsp],rsi
+	mov	QWORD[40+rsp],rdx
+	mov	QWORD[48+rsp],rcx
+	mov	QWORD[56+rsp],r8
+	mov	DWORD[((80+240))+rsp],0
+	mov	rbp,r8
+	mov	rbx,r9
+	mov	r9,rsi
+	mov	r8,rdi
+	mov	r15,rcx
+
+	mov	eax,DWORD[240+r15]
+
+	mov	r10,r15
+	sub	r10,r14
+	and	r10,0xfff
+	cmp	r10,2304
+	jb	NEAR $L$cbc_do_ecopy
+	cmp	r10,4096-248
+	jb	NEAR $L$cbc_skip_ecopy
+ALIGN	4
+$L$cbc_do_ecopy:
+	mov	rsi,r15
+	lea	rdi,[80+rsp]
+	lea	r15,[80+rsp]
+	mov	ecx,240/8
+	DD	0x90A548F3
+	mov	DWORD[rdi],eax
+$L$cbc_skip_ecopy:
+	mov	QWORD[rsp],r15
+
+	mov	ecx,18
+ALIGN	4
+$L$cbc_prefetch_te:
+	mov	r10,QWORD[r14]
+	mov	r11,QWORD[32+r14]
+	mov	r12,QWORD[64+r14]
+	mov	r13,QWORD[96+r14]
+	lea	r14,[128+r14]
+	sub	ecx,1
+	jnz	NEAR $L$cbc_prefetch_te
+	lea	r14,[((-2304))+r14]
+
+	cmp	rbx,0
+	je	NEAR $L$FAST_DECRYPT
+
+
+	mov	eax,DWORD[rbp]
+	mov	ebx,DWORD[4+rbp]
+	mov	ecx,DWORD[8+rbp]
+	mov	edx,DWORD[12+rbp]
+
+ALIGN	4
+$L$cbc_fast_enc_loop:
+	xor	eax,DWORD[r8]
+	xor	ebx,DWORD[4+r8]
+	xor	ecx,DWORD[8+r8]
+	xor	edx,DWORD[12+r8]
+	mov	r15,QWORD[rsp]
+	mov	QWORD[24+rsp],r8
+
+	call	_x86_64_AES_encrypt
+
+	mov	r8,QWORD[24+rsp]
+	mov	r10,QWORD[40+rsp]
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	lea	r8,[16+r8]
+	lea	r9,[16+r9]
+	sub	r10,16
+	test	r10,-16
+	mov	QWORD[40+rsp],r10
+	jnz	NEAR $L$cbc_fast_enc_loop
+	mov	rbp,QWORD[56+rsp]
+	mov	DWORD[rbp],eax
+	mov	DWORD[4+rbp],ebx
+	mov	DWORD[8+rbp],ecx
+	mov	DWORD[12+rbp],edx
+
+	jmp	NEAR $L$cbc_fast_cleanup
+
+
+ALIGN	16
+$L$FAST_DECRYPT:
+	cmp	r9,r8
+	je	NEAR $L$cbc_fast_dec_in_place
+
+	mov	QWORD[64+rsp],rbp
+ALIGN	4
+$L$cbc_fast_dec_loop:
+	mov	eax,DWORD[r8]
+	mov	ebx,DWORD[4+r8]
+	mov	ecx,DWORD[8+r8]
+	mov	edx,DWORD[12+r8]
+	mov	r15,QWORD[rsp]
+	mov	QWORD[24+rsp],r8
+
+	call	_x86_64_AES_decrypt
+
+	mov	rbp,QWORD[64+rsp]
+	mov	r8,QWORD[24+rsp]
+	mov	r10,QWORD[40+rsp]
+	xor	eax,DWORD[rbp]
+	xor	ebx,DWORD[4+rbp]
+	xor	ecx,DWORD[8+rbp]
+	xor	edx,DWORD[12+rbp]
+	mov	rbp,r8
+
+	sub	r10,16
+	mov	QWORD[40+rsp],r10
+	mov	QWORD[64+rsp],rbp
+
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	lea	r8,[16+r8]
+	lea	r9,[16+r9]
+	jnz	NEAR $L$cbc_fast_dec_loop
+	mov	r12,QWORD[56+rsp]
+	mov	r10,QWORD[rbp]
+	mov	r11,QWORD[8+rbp]
+	mov	QWORD[r12],r10
+	mov	QWORD[8+r12],r11
+	jmp	NEAR $L$cbc_fast_cleanup
+
+ALIGN	16
+$L$cbc_fast_dec_in_place:
+	mov	r10,QWORD[rbp]
+	mov	r11,QWORD[8+rbp]
+	mov	QWORD[((0+64))+rsp],r10
+	mov	QWORD[((8+64))+rsp],r11
+ALIGN	4
+$L$cbc_fast_dec_in_place_loop:
+	mov	eax,DWORD[r8]
+	mov	ebx,DWORD[4+r8]
+	mov	ecx,DWORD[8+r8]
+	mov	edx,DWORD[12+r8]
+	mov	r15,QWORD[rsp]
+	mov	QWORD[24+rsp],r8
+
+	call	_x86_64_AES_decrypt
+
+	mov	r8,QWORD[24+rsp]
+	mov	r10,QWORD[40+rsp]
+	xor	eax,DWORD[((0+64))+rsp]
+	xor	ebx,DWORD[((4+64))+rsp]
+	xor	ecx,DWORD[((8+64))+rsp]
+	xor	edx,DWORD[((12+64))+rsp]
+
+	mov	r11,QWORD[r8]
+	mov	r12,QWORD[8+r8]
+	sub	r10,16
+	jz	NEAR $L$cbc_fast_dec_in_place_done
+
+	mov	QWORD[((0+64))+rsp],r11
+	mov	QWORD[((8+64))+rsp],r12
+
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	lea	r8,[16+r8]
+	lea	r9,[16+r9]
+	mov	QWORD[40+rsp],r10
+	jmp	NEAR $L$cbc_fast_dec_in_place_loop
+$L$cbc_fast_dec_in_place_done:
+	mov	rdi,QWORD[56+rsp]
+	mov	QWORD[rdi],r11
+	mov	QWORD[8+rdi],r12
+
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+ALIGN	4
+$L$cbc_fast_cleanup:
+	cmp	DWORD[((80+240))+rsp],0
+	lea	rdi,[80+rsp]
+	je	NEAR $L$cbc_exit
+	mov	ecx,240/8
+	xor	rax,rax
+	DD	0x90AB48F3
+
+	jmp	NEAR $L$cbc_exit
+
+
+ALIGN	16
+$L$cbc_slow_prologue:
+
+	lea	rbp,[((-88))+rsp]
+	and	rbp,-64
+
+	lea	r10,[((-88-63))+rcx]
+	sub	r10,rbp
+	neg	r10
+	and	r10,0x3c0
+	sub	rbp,r10
+
+	xchg	rbp,rsp
+
+	mov	QWORD[16+rsp],rbp
+$L$cbc_slow_body:
+
+
+
+
+	mov	QWORD[56+rsp],r8
+	mov	rbp,r8
+	mov	rbx,r9
+	mov	r9,rsi
+	mov	r8,rdi
+	mov	r15,rcx
+	mov	r10,rdx
+
+	mov	eax,DWORD[240+r15]
+	mov	QWORD[rsp],r15
+	shl	eax,4
+	lea	rax,[rax*1+r15]
+	mov	QWORD[8+rsp],rax
+
+
+	lea	r14,[2048+r14]
+	lea	rax,[((768-8))+rsp]
+	sub	rax,r14
+	and	rax,0x300
+	lea	r14,[rax*1+r14]
+
+	cmp	rbx,0
+	je	NEAR $L$SLOW_DECRYPT
+
+
+	test	r10,-16
+	mov	eax,DWORD[rbp]
+	mov	ebx,DWORD[4+rbp]
+	mov	ecx,DWORD[8+rbp]
+	mov	edx,DWORD[12+rbp]
+	jz	NEAR $L$cbc_slow_enc_tail
+
+ALIGN	4
+$L$cbc_slow_enc_loop:
+	xor	eax,DWORD[r8]
+	xor	ebx,DWORD[4+r8]
+	xor	ecx,DWORD[8+r8]
+	xor	edx,DWORD[12+r8]
+	mov	r15,QWORD[rsp]
+	mov	QWORD[24+rsp],r8
+	mov	QWORD[32+rsp],r9
+	mov	QWORD[40+rsp],r10
+
+	call	_x86_64_AES_encrypt_compact
+
+	mov	r8,QWORD[24+rsp]
+	mov	r9,QWORD[32+rsp]
+	mov	r10,QWORD[40+rsp]
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	lea	r8,[16+r8]
+	lea	r9,[16+r9]
+	sub	r10,16
+	test	r10,-16
+	jnz	NEAR $L$cbc_slow_enc_loop
+	test	r10,15
+	jnz	NEAR $L$cbc_slow_enc_tail
+	mov	rbp,QWORD[56+rsp]
+	mov	DWORD[rbp],eax
+	mov	DWORD[4+rbp],ebx
+	mov	DWORD[8+rbp],ecx
+	mov	DWORD[12+rbp],edx
+
+	jmp	NEAR $L$cbc_exit
+
+ALIGN	4
+$L$cbc_slow_enc_tail:
+	mov	r11,rax
+	mov	r12,rcx
+	mov	rcx,r10
+	mov	rsi,r8
+	mov	rdi,r9
+	DD	0x9066A4F3
+	mov	rcx,16
+	sub	rcx,r10
+	xor	rax,rax
+	DD	0x9066AAF3
+	mov	r8,r9
+	mov	r10,16
+	mov	rax,r11
+	mov	rcx,r12
+	jmp	NEAR $L$cbc_slow_enc_loop
+
+ALIGN	16
+$L$SLOW_DECRYPT:
+	shr	rax,3
+	add	r14,rax
+
+	mov	r11,QWORD[rbp]
+	mov	r12,QWORD[8+rbp]
+	mov	QWORD[((0+64))+rsp],r11
+	mov	QWORD[((8+64))+rsp],r12
+
+ALIGN	4
+$L$cbc_slow_dec_loop:
+	mov	eax,DWORD[r8]
+	mov	ebx,DWORD[4+r8]
+	mov	ecx,DWORD[8+r8]
+	mov	edx,DWORD[12+r8]
+	mov	r15,QWORD[rsp]
+	mov	QWORD[24+rsp],r8
+	mov	QWORD[32+rsp],r9
+	mov	QWORD[40+rsp],r10
+
+	call	_x86_64_AES_decrypt_compact
+
+	mov	r8,QWORD[24+rsp]
+	mov	r9,QWORD[32+rsp]
+	mov	r10,QWORD[40+rsp]
+	xor	eax,DWORD[((0+64))+rsp]
+	xor	ebx,DWORD[((4+64))+rsp]
+	xor	ecx,DWORD[((8+64))+rsp]
+	xor	edx,DWORD[((12+64))+rsp]
+
+	mov	r11,QWORD[r8]
+	mov	r12,QWORD[8+r8]
+	sub	r10,16
+	jc	NEAR $L$cbc_slow_dec_partial
+	jz	NEAR $L$cbc_slow_dec_done
+
+	mov	QWORD[((0+64))+rsp],r11
+	mov	QWORD[((8+64))+rsp],r12
+
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	lea	r8,[16+r8]
+	lea	r9,[16+r9]
+	jmp	NEAR $L$cbc_slow_dec_loop
+$L$cbc_slow_dec_done:
+	mov	rdi,QWORD[56+rsp]
+	mov	QWORD[rdi],r11
+	mov	QWORD[8+rdi],r12
+
+	mov	DWORD[r9],eax
+	mov	DWORD[4+r9],ebx
+	mov	DWORD[8+r9],ecx
+	mov	DWORD[12+r9],edx
+
+	jmp	NEAR $L$cbc_exit
+
+ALIGN	4
+$L$cbc_slow_dec_partial:
+	mov	rdi,QWORD[56+rsp]
+	mov	QWORD[rdi],r11
+	mov	QWORD[8+rdi],r12
+
+	mov	DWORD[((0+64))+rsp],eax
+	mov	DWORD[((4+64))+rsp],ebx
+	mov	DWORD[((8+64))+rsp],ecx
+	mov	DWORD[((12+64))+rsp],edx
+
+	mov	rdi,r9
+	lea	rsi,[64+rsp]
+	lea	rcx,[16+r10]
+	DD	0x9066A4F3
+	jmp	NEAR $L$cbc_exit
+
+ALIGN	16
+$L$cbc_exit:
+	mov	rsi,QWORD[16+rsp]
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$cbc_popfq:
+	popfq
+$L$cbc_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_AES_cbc_encrypt:
+ALIGN	64
+$L$AES_Te:
+	DD	0xa56363c6,0xa56363c6
+	DD	0x847c7cf8,0x847c7cf8
+	DD	0x997777ee,0x997777ee
+	DD	0x8d7b7bf6,0x8d7b7bf6
+	DD	0x0df2f2ff,0x0df2f2ff
+	DD	0xbd6b6bd6,0xbd6b6bd6
+	DD	0xb16f6fde,0xb16f6fde
+	DD	0x54c5c591,0x54c5c591
+	DD	0x50303060,0x50303060
+	DD	0x03010102,0x03010102
+	DD	0xa96767ce,0xa96767ce
+	DD	0x7d2b2b56,0x7d2b2b56
+	DD	0x19fefee7,0x19fefee7
+	DD	0x62d7d7b5,0x62d7d7b5
+	DD	0xe6abab4d,0xe6abab4d
+	DD	0x9a7676ec,0x9a7676ec
+	DD	0x45caca8f,0x45caca8f
+	DD	0x9d82821f,0x9d82821f
+	DD	0x40c9c989,0x40c9c989
+	DD	0x877d7dfa,0x877d7dfa
+	DD	0x15fafaef,0x15fafaef
+	DD	0xeb5959b2,0xeb5959b2
+	DD	0xc947478e,0xc947478e
+	DD	0x0bf0f0fb,0x0bf0f0fb
+	DD	0xecadad41,0xecadad41
+	DD	0x67d4d4b3,0x67d4d4b3
+	DD	0xfda2a25f,0xfda2a25f
+	DD	0xeaafaf45,0xeaafaf45
+	DD	0xbf9c9c23,0xbf9c9c23
+	DD	0xf7a4a453,0xf7a4a453
+	DD	0x967272e4,0x967272e4
+	DD	0x5bc0c09b,0x5bc0c09b
+	DD	0xc2b7b775,0xc2b7b775
+	DD	0x1cfdfde1,0x1cfdfde1
+	DD	0xae93933d,0xae93933d
+	DD	0x6a26264c,0x6a26264c
+	DD	0x5a36366c,0x5a36366c
+	DD	0x413f3f7e,0x413f3f7e
+	DD	0x02f7f7f5,0x02f7f7f5
+	DD	0x4fcccc83,0x4fcccc83
+	DD	0x5c343468,0x5c343468
+	DD	0xf4a5a551,0xf4a5a551
+	DD	0x34e5e5d1,0x34e5e5d1
+	DD	0x08f1f1f9,0x08f1f1f9
+	DD	0x937171e2,0x937171e2
+	DD	0x73d8d8ab,0x73d8d8ab
+	DD	0x53313162,0x53313162
+	DD	0x3f15152a,0x3f15152a
+	DD	0x0c040408,0x0c040408
+	DD	0x52c7c795,0x52c7c795
+	DD	0x65232346,0x65232346
+	DD	0x5ec3c39d,0x5ec3c39d
+	DD	0x28181830,0x28181830
+	DD	0xa1969637,0xa1969637
+	DD	0x0f05050a,0x0f05050a
+	DD	0xb59a9a2f,0xb59a9a2f
+	DD	0x0907070e,0x0907070e
+	DD	0x36121224,0x36121224
+	DD	0x9b80801b,0x9b80801b
+	DD	0x3de2e2df,0x3de2e2df
+	DD	0x26ebebcd,0x26ebebcd
+	DD	0x6927274e,0x6927274e
+	DD	0xcdb2b27f,0xcdb2b27f
+	DD	0x9f7575ea,0x9f7575ea
+	DD	0x1b090912,0x1b090912
+	DD	0x9e83831d,0x9e83831d
+	DD	0x742c2c58,0x742c2c58
+	DD	0x2e1a1a34,0x2e1a1a34
+	DD	0x2d1b1b36,0x2d1b1b36
+	DD	0xb26e6edc,0xb26e6edc
+	DD	0xee5a5ab4,0xee5a5ab4
+	DD	0xfba0a05b,0xfba0a05b
+	DD	0xf65252a4,0xf65252a4
+	DD	0x4d3b3b76,0x4d3b3b76
+	DD	0x61d6d6b7,0x61d6d6b7
+	DD	0xceb3b37d,0xceb3b37d
+	DD	0x7b292952,0x7b292952
+	DD	0x3ee3e3dd,0x3ee3e3dd
+	DD	0x712f2f5e,0x712f2f5e
+	DD	0x97848413,0x97848413
+	DD	0xf55353a6,0xf55353a6
+	DD	0x68d1d1b9,0x68d1d1b9
+	DD	0x00000000,0x00000000
+	DD	0x2cededc1,0x2cededc1
+	DD	0x60202040,0x60202040
+	DD	0x1ffcfce3,0x1ffcfce3
+	DD	0xc8b1b179,0xc8b1b179
+	DD	0xed5b5bb6,0xed5b5bb6
+	DD	0xbe6a6ad4,0xbe6a6ad4
+	DD	0x46cbcb8d,0x46cbcb8d
+	DD	0xd9bebe67,0xd9bebe67
+	DD	0x4b393972,0x4b393972
+	DD	0xde4a4a94,0xde4a4a94
+	DD	0xd44c4c98,0xd44c4c98
+	DD	0xe85858b0,0xe85858b0
+	DD	0x4acfcf85,0x4acfcf85
+	DD	0x6bd0d0bb,0x6bd0d0bb
+	DD	0x2aefefc5,0x2aefefc5
+	DD	0xe5aaaa4f,0xe5aaaa4f
+	DD	0x16fbfbed,0x16fbfbed
+	DD	0xc5434386,0xc5434386
+	DD	0xd74d4d9a,0xd74d4d9a
+	DD	0x55333366,0x55333366
+	DD	0x94858511,0x94858511
+	DD	0xcf45458a,0xcf45458a
+	DD	0x10f9f9e9,0x10f9f9e9
+	DD	0x06020204,0x06020204
+	DD	0x817f7ffe,0x817f7ffe
+	DD	0xf05050a0,0xf05050a0
+	DD	0x443c3c78,0x443c3c78
+	DD	0xba9f9f25,0xba9f9f25
+	DD	0xe3a8a84b,0xe3a8a84b
+	DD	0xf35151a2,0xf35151a2
+	DD	0xfea3a35d,0xfea3a35d
+	DD	0xc0404080,0xc0404080
+	DD	0x8a8f8f05,0x8a8f8f05
+	DD	0xad92923f,0xad92923f
+	DD	0xbc9d9d21,0xbc9d9d21
+	DD	0x48383870,0x48383870
+	DD	0x04f5f5f1,0x04f5f5f1
+	DD	0xdfbcbc63,0xdfbcbc63
+	DD	0xc1b6b677,0xc1b6b677
+	DD	0x75dadaaf,0x75dadaaf
+	DD	0x63212142,0x63212142
+	DD	0x30101020,0x30101020
+	DD	0x1affffe5,0x1affffe5
+	DD	0x0ef3f3fd,0x0ef3f3fd
+	DD	0x6dd2d2bf,0x6dd2d2bf
+	DD	0x4ccdcd81,0x4ccdcd81
+	DD	0x140c0c18,0x140c0c18
+	DD	0x35131326,0x35131326
+	DD	0x2fececc3,0x2fececc3
+	DD	0xe15f5fbe,0xe15f5fbe
+	DD	0xa2979735,0xa2979735
+	DD	0xcc444488,0xcc444488
+	DD	0x3917172e,0x3917172e
+	DD	0x57c4c493,0x57c4c493
+	DD	0xf2a7a755,0xf2a7a755
+	DD	0x827e7efc,0x827e7efc
+	DD	0x473d3d7a,0x473d3d7a
+	DD	0xac6464c8,0xac6464c8
+	DD	0xe75d5dba,0xe75d5dba
+	DD	0x2b191932,0x2b191932
+	DD	0x957373e6,0x957373e6
+	DD	0xa06060c0,0xa06060c0
+	DD	0x98818119,0x98818119
+	DD	0xd14f4f9e,0xd14f4f9e
+	DD	0x7fdcdca3,0x7fdcdca3
+	DD	0x66222244,0x66222244
+	DD	0x7e2a2a54,0x7e2a2a54
+	DD	0xab90903b,0xab90903b
+	DD	0x8388880b,0x8388880b
+	DD	0xca46468c,0xca46468c
+	DD	0x29eeeec7,0x29eeeec7
+	DD	0xd3b8b86b,0xd3b8b86b
+	DD	0x3c141428,0x3c141428
+	DD	0x79dedea7,0x79dedea7
+	DD	0xe25e5ebc,0xe25e5ebc
+	DD	0x1d0b0b16,0x1d0b0b16
+	DD	0x76dbdbad,0x76dbdbad
+	DD	0x3be0e0db,0x3be0e0db
+	DD	0x56323264,0x56323264
+	DD	0x4e3a3a74,0x4e3a3a74
+	DD	0x1e0a0a14,0x1e0a0a14
+	DD	0xdb494992,0xdb494992
+	DD	0x0a06060c,0x0a06060c
+	DD	0x6c242448,0x6c242448
+	DD	0xe45c5cb8,0xe45c5cb8
+	DD	0x5dc2c29f,0x5dc2c29f
+	DD	0x6ed3d3bd,0x6ed3d3bd
+	DD	0xefacac43,0xefacac43
+	DD	0xa66262c4,0xa66262c4
+	DD	0xa8919139,0xa8919139
+	DD	0xa4959531,0xa4959531
+	DD	0x37e4e4d3,0x37e4e4d3
+	DD	0x8b7979f2,0x8b7979f2
+	DD	0x32e7e7d5,0x32e7e7d5
+	DD	0x43c8c88b,0x43c8c88b
+	DD	0x5937376e,0x5937376e
+	DD	0xb76d6dda,0xb76d6dda
+	DD	0x8c8d8d01,0x8c8d8d01
+	DD	0x64d5d5b1,0x64d5d5b1
+	DD	0xd24e4e9c,0xd24e4e9c
+	DD	0xe0a9a949,0xe0a9a949
+	DD	0xb46c6cd8,0xb46c6cd8
+	DD	0xfa5656ac,0xfa5656ac
+	DD	0x07f4f4f3,0x07f4f4f3
+	DD	0x25eaeacf,0x25eaeacf
+	DD	0xaf6565ca,0xaf6565ca
+	DD	0x8e7a7af4,0x8e7a7af4
+	DD	0xe9aeae47,0xe9aeae47
+	DD	0x18080810,0x18080810
+	DD	0xd5baba6f,0xd5baba6f
+	DD	0x887878f0,0x887878f0
+	DD	0x6f25254a,0x6f25254a
+	DD	0x722e2e5c,0x722e2e5c
+	DD	0x241c1c38,0x241c1c38
+	DD	0xf1a6a657,0xf1a6a657
+	DD	0xc7b4b473,0xc7b4b473
+	DD	0x51c6c697,0x51c6c697
+	DD	0x23e8e8cb,0x23e8e8cb
+	DD	0x7cdddda1,0x7cdddda1
+	DD	0x9c7474e8,0x9c7474e8
+	DD	0x211f1f3e,0x211f1f3e
+	DD	0xdd4b4b96,0xdd4b4b96
+	DD	0xdcbdbd61,0xdcbdbd61
+	DD	0x868b8b0d,0x868b8b0d
+	DD	0x858a8a0f,0x858a8a0f
+	DD	0x907070e0,0x907070e0
+	DD	0x423e3e7c,0x423e3e7c
+	DD	0xc4b5b571,0xc4b5b571
+	DD	0xaa6666cc,0xaa6666cc
+	DD	0xd8484890,0xd8484890
+	DD	0x05030306,0x05030306
+	DD	0x01f6f6f7,0x01f6f6f7
+	DD	0x120e0e1c,0x120e0e1c
+	DD	0xa36161c2,0xa36161c2
+	DD	0x5f35356a,0x5f35356a
+	DD	0xf95757ae,0xf95757ae
+	DD	0xd0b9b969,0xd0b9b969
+	DD	0x91868617,0x91868617
+	DD	0x58c1c199,0x58c1c199
+	DD	0x271d1d3a,0x271d1d3a
+	DD	0xb99e9e27,0xb99e9e27
+	DD	0x38e1e1d9,0x38e1e1d9
+	DD	0x13f8f8eb,0x13f8f8eb
+	DD	0xb398982b,0xb398982b
+	DD	0x33111122,0x33111122
+	DD	0xbb6969d2,0xbb6969d2
+	DD	0x70d9d9a9,0x70d9d9a9
+	DD	0x898e8e07,0x898e8e07
+	DD	0xa7949433,0xa7949433
+	DD	0xb69b9b2d,0xb69b9b2d
+	DD	0x221e1e3c,0x221e1e3c
+	DD	0x92878715,0x92878715
+	DD	0x20e9e9c9,0x20e9e9c9
+	DD	0x49cece87,0x49cece87
+	DD	0xff5555aa,0xff5555aa
+	DD	0x78282850,0x78282850
+	DD	0x7adfdfa5,0x7adfdfa5
+	DD	0x8f8c8c03,0x8f8c8c03
+	DD	0xf8a1a159,0xf8a1a159
+	DD	0x80898909,0x80898909
+	DD	0x170d0d1a,0x170d0d1a
+	DD	0xdabfbf65,0xdabfbf65
+	DD	0x31e6e6d7,0x31e6e6d7
+	DD	0xc6424284,0xc6424284
+	DD	0xb86868d0,0xb86868d0
+	DD	0xc3414182,0xc3414182
+	DD	0xb0999929,0xb0999929
+	DD	0x772d2d5a,0x772d2d5a
+	DD	0x110f0f1e,0x110f0f1e
+	DD	0xcbb0b07b,0xcbb0b07b
+	DD	0xfc5454a8,0xfc5454a8
+	DD	0xd6bbbb6d,0xd6bbbb6d
+	DD	0x3a16162c,0x3a16162c
+DB	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+DB	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+DB	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+DB	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+DB	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+DB	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+DB	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+DB	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+DB	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+DB	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+DB	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+DB	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+DB	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+DB	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+DB	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+DB	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+DB	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+DB	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+DB	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+DB	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+DB	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+DB	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+DB	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+DB	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+DB	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+DB	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+DB	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+DB	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+DB	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+DB	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+DB	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+DB	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+DB	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+DB	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+DB	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+DB	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+DB	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+DB	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+DB	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+DB	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+DB	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+DB	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+DB	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+DB	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+DB	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+DB	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+DB	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+DB	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+DB	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+DB	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+DB	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+DB	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+DB	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+DB	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+DB	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+DB	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+DB	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+DB	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+DB	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+DB	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+DB	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+DB	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+DB	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+DB	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+DB	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+DB	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+DB	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+DB	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+DB	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+DB	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+DB	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+DB	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+DB	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+DB	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+DB	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+DB	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+DB	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+DB	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+DB	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+DB	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+DB	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+DB	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+DB	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+DB	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+DB	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+DB	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+DB	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+DB	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+DB	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+DB	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+DB	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+DB	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+DB	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+DB	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+DB	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+DB	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+DB	0x63,0x7c,0x77,0x7b,0xf2,0x6b,0x6f,0xc5
+DB	0x30,0x01,0x67,0x2b,0xfe,0xd7,0xab,0x76
+DB	0xca,0x82,0xc9,0x7d,0xfa,0x59,0x47,0xf0
+DB	0xad,0xd4,0xa2,0xaf,0x9c,0xa4,0x72,0xc0
+DB	0xb7,0xfd,0x93,0x26,0x36,0x3f,0xf7,0xcc
+DB	0x34,0xa5,0xe5,0xf1,0x71,0xd8,0x31,0x15
+DB	0x04,0xc7,0x23,0xc3,0x18,0x96,0x05,0x9a
+DB	0x07,0x12,0x80,0xe2,0xeb,0x27,0xb2,0x75
+DB	0x09,0x83,0x2c,0x1a,0x1b,0x6e,0x5a,0xa0
+DB	0x52,0x3b,0xd6,0xb3,0x29,0xe3,0x2f,0x84
+DB	0x53,0xd1,0x00,0xed,0x20,0xfc,0xb1,0x5b
+DB	0x6a,0xcb,0xbe,0x39,0x4a,0x4c,0x58,0xcf
+DB	0xd0,0xef,0xaa,0xfb,0x43,0x4d,0x33,0x85
+DB	0x45,0xf9,0x02,0x7f,0x50,0x3c,0x9f,0xa8
+DB	0x51,0xa3,0x40,0x8f,0x92,0x9d,0x38,0xf5
+DB	0xbc,0xb6,0xda,0x21,0x10,0xff,0xf3,0xd2
+DB	0xcd,0x0c,0x13,0xec,0x5f,0x97,0x44,0x17
+DB	0xc4,0xa7,0x7e,0x3d,0x64,0x5d,0x19,0x73
+DB	0x60,0x81,0x4f,0xdc,0x22,0x2a,0x90,0x88
+DB	0x46,0xee,0xb8,0x14,0xde,0x5e,0x0b,0xdb
+DB	0xe0,0x32,0x3a,0x0a,0x49,0x06,0x24,0x5c
+DB	0xc2,0xd3,0xac,0x62,0x91,0x95,0xe4,0x79
+DB	0xe7,0xc8,0x37,0x6d,0x8d,0xd5,0x4e,0xa9
+DB	0x6c,0x56,0xf4,0xea,0x65,0x7a,0xae,0x08
+DB	0xba,0x78,0x25,0x2e,0x1c,0xa6,0xb4,0xc6
+DB	0xe8,0xdd,0x74,0x1f,0x4b,0xbd,0x8b,0x8a
+DB	0x70,0x3e,0xb5,0x66,0x48,0x03,0xf6,0x0e
+DB	0x61,0x35,0x57,0xb9,0x86,0xc1,0x1d,0x9e
+DB	0xe1,0xf8,0x98,0x11,0x69,0xd9,0x8e,0x94
+DB	0x9b,0x1e,0x87,0xe9,0xce,0x55,0x28,0xdf
+DB	0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68
+DB	0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16
+	DD	0x00000001,0x00000002,0x00000004,0x00000008
+	DD	0x00000010,0x00000020,0x00000040,0x00000080
+	DD	0x0000001b,0x00000036,0x80808080,0x80808080
+	DD	0xfefefefe,0xfefefefe,0x1b1b1b1b,0x1b1b1b1b
+ALIGN	64
+$L$AES_Td:
+	DD	0x50a7f451,0x50a7f451
+	DD	0x5365417e,0x5365417e
+	DD	0xc3a4171a,0xc3a4171a
+	DD	0x965e273a,0x965e273a
+	DD	0xcb6bab3b,0xcb6bab3b
+	DD	0xf1459d1f,0xf1459d1f
+	DD	0xab58faac,0xab58faac
+	DD	0x9303e34b,0x9303e34b
+	DD	0x55fa3020,0x55fa3020
+	DD	0xf66d76ad,0xf66d76ad
+	DD	0x9176cc88,0x9176cc88
+	DD	0x254c02f5,0x254c02f5
+	DD	0xfcd7e54f,0xfcd7e54f
+	DD	0xd7cb2ac5,0xd7cb2ac5
+	DD	0x80443526,0x80443526
+	DD	0x8fa362b5,0x8fa362b5
+	DD	0x495ab1de,0x495ab1de
+	DD	0x671bba25,0x671bba25
+	DD	0x980eea45,0x980eea45
+	DD	0xe1c0fe5d,0xe1c0fe5d
+	DD	0x02752fc3,0x02752fc3
+	DD	0x12f04c81,0x12f04c81
+	DD	0xa397468d,0xa397468d
+	DD	0xc6f9d36b,0xc6f9d36b
+	DD	0xe75f8f03,0xe75f8f03
+	DD	0x959c9215,0x959c9215
+	DD	0xeb7a6dbf,0xeb7a6dbf
+	DD	0xda595295,0xda595295
+	DD	0x2d83bed4,0x2d83bed4
+	DD	0xd3217458,0xd3217458
+	DD	0x2969e049,0x2969e049
+	DD	0x44c8c98e,0x44c8c98e
+	DD	0x6a89c275,0x6a89c275
+	DD	0x78798ef4,0x78798ef4
+	DD	0x6b3e5899,0x6b3e5899
+	DD	0xdd71b927,0xdd71b927
+	DD	0xb64fe1be,0xb64fe1be
+	DD	0x17ad88f0,0x17ad88f0
+	DD	0x66ac20c9,0x66ac20c9
+	DD	0xb43ace7d,0xb43ace7d
+	DD	0x184adf63,0x184adf63
+	DD	0x82311ae5,0x82311ae5
+	DD	0x60335197,0x60335197
+	DD	0x457f5362,0x457f5362
+	DD	0xe07764b1,0xe07764b1
+	DD	0x84ae6bbb,0x84ae6bbb
+	DD	0x1ca081fe,0x1ca081fe
+	DD	0x942b08f9,0x942b08f9
+	DD	0x58684870,0x58684870
+	DD	0x19fd458f,0x19fd458f
+	DD	0x876cde94,0x876cde94
+	DD	0xb7f87b52,0xb7f87b52
+	DD	0x23d373ab,0x23d373ab
+	DD	0xe2024b72,0xe2024b72
+	DD	0x578f1fe3,0x578f1fe3
+	DD	0x2aab5566,0x2aab5566
+	DD	0x0728ebb2,0x0728ebb2
+	DD	0x03c2b52f,0x03c2b52f
+	DD	0x9a7bc586,0x9a7bc586
+	DD	0xa50837d3,0xa50837d3
+	DD	0xf2872830,0xf2872830
+	DD	0xb2a5bf23,0xb2a5bf23
+	DD	0xba6a0302,0xba6a0302
+	DD	0x5c8216ed,0x5c8216ed
+	DD	0x2b1ccf8a,0x2b1ccf8a
+	DD	0x92b479a7,0x92b479a7
+	DD	0xf0f207f3,0xf0f207f3
+	DD	0xa1e2694e,0xa1e2694e
+	DD	0xcdf4da65,0xcdf4da65
+	DD	0xd5be0506,0xd5be0506
+	DD	0x1f6234d1,0x1f6234d1
+	DD	0x8afea6c4,0x8afea6c4
+	DD	0x9d532e34,0x9d532e34
+	DD	0xa055f3a2,0xa055f3a2
+	DD	0x32e18a05,0x32e18a05
+	DD	0x75ebf6a4,0x75ebf6a4
+	DD	0x39ec830b,0x39ec830b
+	DD	0xaaef6040,0xaaef6040
+	DD	0x069f715e,0x069f715e
+	DD	0x51106ebd,0x51106ebd
+	DD	0xf98a213e,0xf98a213e
+	DD	0x3d06dd96,0x3d06dd96
+	DD	0xae053edd,0xae053edd
+	DD	0x46bde64d,0x46bde64d
+	DD	0xb58d5491,0xb58d5491
+	DD	0x055dc471,0x055dc471
+	DD	0x6fd40604,0x6fd40604
+	DD	0xff155060,0xff155060
+	DD	0x24fb9819,0x24fb9819
+	DD	0x97e9bdd6,0x97e9bdd6
+	DD	0xcc434089,0xcc434089
+	DD	0x779ed967,0x779ed967
+	DD	0xbd42e8b0,0xbd42e8b0
+	DD	0x888b8907,0x888b8907
+	DD	0x385b19e7,0x385b19e7
+	DD	0xdbeec879,0xdbeec879
+	DD	0x470a7ca1,0x470a7ca1
+	DD	0xe90f427c,0xe90f427c
+	DD	0xc91e84f8,0xc91e84f8
+	DD	0x00000000,0x00000000
+	DD	0x83868009,0x83868009
+	DD	0x48ed2b32,0x48ed2b32
+	DD	0xac70111e,0xac70111e
+	DD	0x4e725a6c,0x4e725a6c
+	DD	0xfbff0efd,0xfbff0efd
+	DD	0x5638850f,0x5638850f
+	DD	0x1ed5ae3d,0x1ed5ae3d
+	DD	0x27392d36,0x27392d36
+	DD	0x64d90f0a,0x64d90f0a
+	DD	0x21a65c68,0x21a65c68
+	DD	0xd1545b9b,0xd1545b9b
+	DD	0x3a2e3624,0x3a2e3624
+	DD	0xb1670a0c,0xb1670a0c
+	DD	0x0fe75793,0x0fe75793
+	DD	0xd296eeb4,0xd296eeb4
+	DD	0x9e919b1b,0x9e919b1b
+	DD	0x4fc5c080,0x4fc5c080
+	DD	0xa220dc61,0xa220dc61
+	DD	0x694b775a,0x694b775a
+	DD	0x161a121c,0x161a121c
+	DD	0x0aba93e2,0x0aba93e2
+	DD	0xe52aa0c0,0xe52aa0c0
+	DD	0x43e0223c,0x43e0223c
+	DD	0x1d171b12,0x1d171b12
+	DD	0x0b0d090e,0x0b0d090e
+	DD	0xadc78bf2,0xadc78bf2
+	DD	0xb9a8b62d,0xb9a8b62d
+	DD	0xc8a91e14,0xc8a91e14
+	DD	0x8519f157,0x8519f157
+	DD	0x4c0775af,0x4c0775af
+	DD	0xbbdd99ee,0xbbdd99ee
+	DD	0xfd607fa3,0xfd607fa3
+	DD	0x9f2601f7,0x9f2601f7
+	DD	0xbcf5725c,0xbcf5725c
+	DD	0xc53b6644,0xc53b6644
+	DD	0x347efb5b,0x347efb5b
+	DD	0x7629438b,0x7629438b
+	DD	0xdcc623cb,0xdcc623cb
+	DD	0x68fcedb6,0x68fcedb6
+	DD	0x63f1e4b8,0x63f1e4b8
+	DD	0xcadc31d7,0xcadc31d7
+	DD	0x10856342,0x10856342
+	DD	0x40229713,0x40229713
+	DD	0x2011c684,0x2011c684
+	DD	0x7d244a85,0x7d244a85
+	DD	0xf83dbbd2,0xf83dbbd2
+	DD	0x1132f9ae,0x1132f9ae
+	DD	0x6da129c7,0x6da129c7
+	DD	0x4b2f9e1d,0x4b2f9e1d
+	DD	0xf330b2dc,0xf330b2dc
+	DD	0xec52860d,0xec52860d
+	DD	0xd0e3c177,0xd0e3c177
+	DD	0x6c16b32b,0x6c16b32b
+	DD	0x99b970a9,0x99b970a9
+	DD	0xfa489411,0xfa489411
+	DD	0x2264e947,0x2264e947
+	DD	0xc48cfca8,0xc48cfca8
+	DD	0x1a3ff0a0,0x1a3ff0a0
+	DD	0xd82c7d56,0xd82c7d56
+	DD	0xef903322,0xef903322
+	DD	0xc74e4987,0xc74e4987
+	DD	0xc1d138d9,0xc1d138d9
+	DD	0xfea2ca8c,0xfea2ca8c
+	DD	0x360bd498,0x360bd498
+	DD	0xcf81f5a6,0xcf81f5a6
+	DD	0x28de7aa5,0x28de7aa5
+	DD	0x268eb7da,0x268eb7da
+	DD	0xa4bfad3f,0xa4bfad3f
+	DD	0xe49d3a2c,0xe49d3a2c
+	DD	0x0d927850,0x0d927850
+	DD	0x9bcc5f6a,0x9bcc5f6a
+	DD	0x62467e54,0x62467e54
+	DD	0xc2138df6,0xc2138df6
+	DD	0xe8b8d890,0xe8b8d890
+	DD	0x5ef7392e,0x5ef7392e
+	DD	0xf5afc382,0xf5afc382
+	DD	0xbe805d9f,0xbe805d9f
+	DD	0x7c93d069,0x7c93d069
+	DD	0xa92dd56f,0xa92dd56f
+	DD	0xb31225cf,0xb31225cf
+	DD	0x3b99acc8,0x3b99acc8
+	DD	0xa77d1810,0xa77d1810
+	DD	0x6e639ce8,0x6e639ce8
+	DD	0x7bbb3bdb,0x7bbb3bdb
+	DD	0x097826cd,0x097826cd
+	DD	0xf418596e,0xf418596e
+	DD	0x01b79aec,0x01b79aec
+	DD	0xa89a4f83,0xa89a4f83
+	DD	0x656e95e6,0x656e95e6
+	DD	0x7ee6ffaa,0x7ee6ffaa
+	DD	0x08cfbc21,0x08cfbc21
+	DD	0xe6e815ef,0xe6e815ef
+	DD	0xd99be7ba,0xd99be7ba
+	DD	0xce366f4a,0xce366f4a
+	DD	0xd4099fea,0xd4099fea
+	DD	0xd67cb029,0xd67cb029
+	DD	0xafb2a431,0xafb2a431
+	DD	0x31233f2a,0x31233f2a
+	DD	0x3094a5c6,0x3094a5c6
+	DD	0xc066a235,0xc066a235
+	DD	0x37bc4e74,0x37bc4e74
+	DD	0xa6ca82fc,0xa6ca82fc
+	DD	0xb0d090e0,0xb0d090e0
+	DD	0x15d8a733,0x15d8a733
+	DD	0x4a9804f1,0x4a9804f1
+	DD	0xf7daec41,0xf7daec41
+	DD	0x0e50cd7f,0x0e50cd7f
+	DD	0x2ff69117,0x2ff69117
+	DD	0x8dd64d76,0x8dd64d76
+	DD	0x4db0ef43,0x4db0ef43
+	DD	0x544daacc,0x544daacc
+	DD	0xdf0496e4,0xdf0496e4
+	DD	0xe3b5d19e,0xe3b5d19e
+	DD	0x1b886a4c,0x1b886a4c
+	DD	0xb81f2cc1,0xb81f2cc1
+	DD	0x7f516546,0x7f516546
+	DD	0x04ea5e9d,0x04ea5e9d
+	DD	0x5d358c01,0x5d358c01
+	DD	0x737487fa,0x737487fa
+	DD	0x2e410bfb,0x2e410bfb
+	DD	0x5a1d67b3,0x5a1d67b3
+	DD	0x52d2db92,0x52d2db92
+	DD	0x335610e9,0x335610e9
+	DD	0x1347d66d,0x1347d66d
+	DD	0x8c61d79a,0x8c61d79a
+	DD	0x7a0ca137,0x7a0ca137
+	DD	0x8e14f859,0x8e14f859
+	DD	0x893c13eb,0x893c13eb
+	DD	0xee27a9ce,0xee27a9ce
+	DD	0x35c961b7,0x35c961b7
+	DD	0xede51ce1,0xede51ce1
+	DD	0x3cb1477a,0x3cb1477a
+	DD	0x59dfd29c,0x59dfd29c
+	DD	0x3f73f255,0x3f73f255
+	DD	0x79ce1418,0x79ce1418
+	DD	0xbf37c773,0xbf37c773
+	DD	0xeacdf753,0xeacdf753
+	DD	0x5baafd5f,0x5baafd5f
+	DD	0x146f3ddf,0x146f3ddf
+	DD	0x86db4478,0x86db4478
+	DD	0x81f3afca,0x81f3afca
+	DD	0x3ec468b9,0x3ec468b9
+	DD	0x2c342438,0x2c342438
+	DD	0x5f40a3c2,0x5f40a3c2
+	DD	0x72c31d16,0x72c31d16
+	DD	0x0c25e2bc,0x0c25e2bc
+	DD	0x8b493c28,0x8b493c28
+	DD	0x41950dff,0x41950dff
+	DD	0x7101a839,0x7101a839
+	DD	0xdeb30c08,0xdeb30c08
+	DD	0x9ce4b4d8,0x9ce4b4d8
+	DD	0x90c15664,0x90c15664
+	DD	0x6184cb7b,0x6184cb7b
+	DD	0x70b632d5,0x70b632d5
+	DD	0x745c6c48,0x745c6c48
+	DD	0x4257b8d0,0x4257b8d0
+DB	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+DB	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+DB	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+DB	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+DB	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+DB	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+DB	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+DB	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+DB	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+DB	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+DB	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+DB	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+DB	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+DB	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+DB	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+DB	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+DB	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+DB	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+DB	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+DB	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+DB	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+DB	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+DB	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+DB	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+DB	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+DB	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+DB	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+DB	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+DB	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+DB	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+DB	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+DB	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+	DD	0x80808080,0x80808080,0xfefefefe,0xfefefefe
+	DD	0x1b1b1b1b,0x1b1b1b1b,0,0
+DB	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+DB	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+DB	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+DB	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+DB	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+DB	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+DB	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+DB	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+DB	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+DB	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+DB	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+DB	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+DB	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+DB	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+DB	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+DB	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+DB	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+DB	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+DB	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+DB	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+DB	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+DB	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+DB	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+DB	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+DB	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+DB	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+DB	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+DB	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+DB	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+DB	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+DB	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+DB	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+	DD	0x80808080,0x80808080,0xfefefefe,0xfefefefe
+	DD	0x1b1b1b1b,0x1b1b1b1b,0,0
+DB	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+DB	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+DB	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+DB	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+DB	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+DB	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+DB	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+DB	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+DB	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+DB	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+DB	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+DB	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+DB	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+DB	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+DB	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+DB	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+DB	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+DB	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+DB	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+DB	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+DB	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+DB	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+DB	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+DB	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+DB	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+DB	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+DB	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+DB	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+DB	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+DB	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+DB	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+DB	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+	DD	0x80808080,0x80808080,0xfefefefe,0xfefefefe
+	DD	0x1b1b1b1b,0x1b1b1b1b,0,0
+DB	0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38
+DB	0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb
+DB	0x7c,0xe3,0x39,0x82,0x9b,0x2f,0xff,0x87
+DB	0x34,0x8e,0x43,0x44,0xc4,0xde,0xe9,0xcb
+DB	0x54,0x7b,0x94,0x32,0xa6,0xc2,0x23,0x3d
+DB	0xee,0x4c,0x95,0x0b,0x42,0xfa,0xc3,0x4e
+DB	0x08,0x2e,0xa1,0x66,0x28,0xd9,0x24,0xb2
+DB	0x76,0x5b,0xa2,0x49,0x6d,0x8b,0xd1,0x25
+DB	0x72,0xf8,0xf6,0x64,0x86,0x68,0x98,0x16
+DB	0xd4,0xa4,0x5c,0xcc,0x5d,0x65,0xb6,0x92
+DB	0x6c,0x70,0x48,0x50,0xfd,0xed,0xb9,0xda
+DB	0x5e,0x15,0x46,0x57,0xa7,0x8d,0x9d,0x84
+DB	0x90,0xd8,0xab,0x00,0x8c,0xbc,0xd3,0x0a
+DB	0xf7,0xe4,0x58,0x05,0xb8,0xb3,0x45,0x06
+DB	0xd0,0x2c,0x1e,0x8f,0xca,0x3f,0x0f,0x02
+DB	0xc1,0xaf,0xbd,0x03,0x01,0x13,0x8a,0x6b
+DB	0x3a,0x91,0x11,0x41,0x4f,0x67,0xdc,0xea
+DB	0x97,0xf2,0xcf,0xce,0xf0,0xb4,0xe6,0x73
+DB	0x96,0xac,0x74,0x22,0xe7,0xad,0x35,0x85
+DB	0xe2,0xf9,0x37,0xe8,0x1c,0x75,0xdf,0x6e
+DB	0x47,0xf1,0x1a,0x71,0x1d,0x29,0xc5,0x89
+DB	0x6f,0xb7,0x62,0x0e,0xaa,0x18,0xbe,0x1b
+DB	0xfc,0x56,0x3e,0x4b,0xc6,0xd2,0x79,0x20
+DB	0x9a,0xdb,0xc0,0xfe,0x78,0xcd,0x5a,0xf4
+DB	0x1f,0xdd,0xa8,0x33,0x88,0x07,0xc7,0x31
+DB	0xb1,0x12,0x10,0x59,0x27,0x80,0xec,0x5f
+DB	0x60,0x51,0x7f,0xa9,0x19,0xb5,0x4a,0x0d
+DB	0x2d,0xe5,0x7a,0x9f,0x93,0xc9,0x9c,0xef
+DB	0xa0,0xe0,0x3b,0x4d,0xae,0x2a,0xf5,0xb0
+DB	0xc8,0xeb,0xbb,0x3c,0x83,0x53,0x99,0x61
+DB	0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26
+DB	0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
+	DD	0x80808080,0x80808080,0xfefefefe,0xfefefefe
+	DD	0x1b1b1b1b,0x1b1b1b1b,0,0
+DB	65,69,83,32,102,111,114,32,120,56,54,95,54,52,44,32
+DB	67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97
+DB	112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103
+DB	62,0
+ALIGN	64
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+block_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_block_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_block_prologue
+
+	mov	rax,QWORD[24+rax]
+	lea	rax,[48+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_block_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	jmp	NEAR $L$common_seh_exit
+
+
+
+ALIGN	16
+key_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_key_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_key_prologue
+
+	lea	rax,[56+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_key_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	jmp	NEAR $L$common_seh_exit
+
+
+
+ALIGN	16
+cbc_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$cbc_prologue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_cbc_prologue
+
+	lea	r10,[$L$cbc_fast_body]
+	cmp	rbx,r10
+	jb	NEAR $L$in_cbc_frame_setup
+
+	lea	r10,[$L$cbc_slow_prologue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_cbc_body
+
+	lea	r10,[$L$cbc_slow_body]
+	cmp	rbx,r10
+	jb	NEAR $L$in_cbc_frame_setup
+
+$L$in_cbc_body:
+	mov	rax,QWORD[152+r8]
+
+	lea	r10,[$L$cbc_epilogue]
+	cmp	rbx,r10
+	jae	NEAR $L$in_cbc_prologue
+
+	lea	rax,[8+rax]
+
+	lea	r10,[$L$cbc_popfq]
+	cmp	rbx,r10
+	jae	NEAR $L$in_cbc_prologue
+
+	mov	rax,QWORD[8+rax]
+	lea	rax,[56+rax]
+
+$L$in_cbc_frame_setup:
+	mov	rbx,QWORD[((-16))+rax]
+	mov	rbp,QWORD[((-24))+rax]
+	mov	r12,QWORD[((-32))+rax]
+	mov	r13,QWORD[((-40))+rax]
+	mov	r14,QWORD[((-48))+rax]
+	mov	r15,QWORD[((-56))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_cbc_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+$L$common_seh_exit:
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_asm_AES_encrypt wrt ..imagebase
+	DD	$L$SEH_end_asm_AES_encrypt wrt ..imagebase
+	DD	$L$SEH_info_asm_AES_encrypt wrt ..imagebase
+
+	DD	$L$SEH_begin_asm_AES_decrypt wrt ..imagebase
+	DD	$L$SEH_end_asm_AES_decrypt wrt ..imagebase
+	DD	$L$SEH_info_asm_AES_decrypt wrt ..imagebase
+
+	DD	$L$SEH_begin_asm_AES_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_end_asm_AES_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_info_asm_AES_set_encrypt_key wrt ..imagebase
+
+	DD	$L$SEH_begin_asm_AES_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_end_asm_AES_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_info_asm_AES_set_decrypt_key wrt ..imagebase
+
+	DD	$L$SEH_begin_asm_AES_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_end_asm_AES_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_info_asm_AES_cbc_encrypt wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_asm_AES_encrypt:
+DB	9,0,0,0
+	DD	block_se_handler wrt ..imagebase
+	DD	$L$enc_prologue wrt ..imagebase,$L$enc_epilogue wrt ..imagebase
+$L$SEH_info_asm_AES_decrypt:
+DB	9,0,0,0
+	DD	block_se_handler wrt ..imagebase
+	DD	$L$dec_prologue wrt ..imagebase,$L$dec_epilogue wrt ..imagebase
+$L$SEH_info_asm_AES_set_encrypt_key:
+DB	9,0,0,0
+	DD	key_se_handler wrt ..imagebase
+	DD	$L$enc_key_prologue wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase
+$L$SEH_info_asm_AES_set_decrypt_key:
+DB	9,0,0,0
+	DD	key_se_handler wrt ..imagebase
+	DD	$L$dec_key_prologue wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase
+$L$SEH_info_asm_AES_cbc_encrypt:
+DB	9,0,0,0
+	DD	cbc_se_handler wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm
new file mode 100644
index 0000000..cf313d1
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm
@@ -0,0 +1,4027 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+EXTERN	OPENSSL_ia32cap_P
+global	aesni_encrypt
+
+ALIGN	16
+aesni_encrypt:
+	movups	xmm2,XMMWORD[rcx]
+	mov	eax,DWORD[240+r8]
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[16+r8]
+	lea	r8,[32+r8]
+	xorps	xmm2,xmm0
+$L$oop_enc1_1:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[r8]
+	lea	r8,[16+r8]
+	jnz	NEAR $L$oop_enc1_1
+DB	102,15,56,221,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movups	XMMWORD[rdx],xmm2
+	pxor	xmm2,xmm2
+	DB	0F3h,0C3h		;repret
+
+
+global	aesni_decrypt
+
+ALIGN	16
+aesni_decrypt:
+	movups	xmm2,XMMWORD[rcx]
+	mov	eax,DWORD[240+r8]
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[16+r8]
+	lea	r8,[32+r8]
+	xorps	xmm2,xmm0
+$L$oop_dec1_2:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[r8]
+	lea	r8,[16+r8]
+	jnz	NEAR $L$oop_dec1_2
+DB	102,15,56,223,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movups	XMMWORD[rdx],xmm2
+	pxor	xmm2,xmm2
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_encrypt2:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+	add	rax,16
+
+$L$enc_loop2:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$enc_loop2
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_decrypt2:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+	add	rax,16
+
+$L$dec_loop2:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$dec_loop2
+
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,223,208
+DB	102,15,56,223,216
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_encrypt3:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	xorps	xmm4,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+	add	rax,16
+
+$L$enc_loop3:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$enc_loop3
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+DB	102,15,56,221,224
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_decrypt3:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	xorps	xmm4,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+	add	rax,16
+
+$L$dec_loop3:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$dec_loop3
+
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,223,208
+DB	102,15,56,223,216
+DB	102,15,56,223,224
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_encrypt4:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	xorps	xmm4,xmm0
+	xorps	xmm5,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	0x0f,0x1f,0x00
+	add	rax,16
+
+$L$enc_loop4:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$enc_loop4
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+DB	102,15,56,221,224
+DB	102,15,56,221,232
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_decrypt4:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	xorps	xmm4,xmm0
+	xorps	xmm5,xmm0
+	movups	xmm0,XMMWORD[32+rcx]
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	0x0f,0x1f,0x00
+	add	rax,16
+
+$L$dec_loop4:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$dec_loop4
+
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,223,208
+DB	102,15,56,223,216
+DB	102,15,56,223,224
+DB	102,15,56,223,232
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_encrypt6:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+DB	102,15,56,220,209
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	102,15,56,220,217
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+DB	102,15,56,220,225
+	pxor	xmm7,xmm0
+	movups	xmm0,XMMWORD[rax*1+rcx]
+	add	rax,16
+	jmp	NEAR $L$enc_loop6_enter
+ALIGN	16
+$L$enc_loop6:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+$L$enc_loop6_enter:
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$enc_loop6
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+DB	102,15,56,221,224
+DB	102,15,56,221,232
+DB	102,15,56,221,240
+DB	102,15,56,221,248
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_decrypt6:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	pxor	xmm3,xmm0
+	pxor	xmm4,xmm0
+DB	102,15,56,222,209
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	102,15,56,222,217
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+DB	102,15,56,222,225
+	pxor	xmm7,xmm0
+	movups	xmm0,XMMWORD[rax*1+rcx]
+	add	rax,16
+	jmp	NEAR $L$dec_loop6_enter
+ALIGN	16
+$L$dec_loop6:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+$L$dec_loop6_enter:
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$dec_loop6
+
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,15,56,223,208
+DB	102,15,56,223,216
+DB	102,15,56,223,224
+DB	102,15,56,223,232
+DB	102,15,56,223,240
+DB	102,15,56,223,248
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_encrypt8:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	pxor	xmm4,xmm0
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	102,15,56,220,209
+	pxor	xmm7,xmm0
+	pxor	xmm8,xmm0
+DB	102,15,56,220,217
+	pxor	xmm9,xmm0
+	movups	xmm0,XMMWORD[rax*1+rcx]
+	add	rax,16
+	jmp	NEAR $L$enc_loop8_inner
+ALIGN	16
+$L$enc_loop8:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+$L$enc_loop8_inner:
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+$L$enc_loop8_enter:
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$enc_loop8
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+DB	102,15,56,221,224
+DB	102,15,56,221,232
+DB	102,15,56,221,240
+DB	102,15,56,221,248
+DB	102,68,15,56,221,192
+DB	102,68,15,56,221,200
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_aesni_decrypt8:
+	movups	xmm0,XMMWORD[rcx]
+	shl	eax,4
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm0
+	pxor	xmm4,xmm0
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+	lea	rcx,[32+rax*1+rcx]
+	neg	rax
+DB	102,15,56,222,209
+	pxor	xmm7,xmm0
+	pxor	xmm8,xmm0
+DB	102,15,56,222,217
+	pxor	xmm9,xmm0
+	movups	xmm0,XMMWORD[rax*1+rcx]
+	add	rax,16
+	jmp	NEAR $L$dec_loop8_inner
+ALIGN	16
+$L$dec_loop8:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+$L$dec_loop8_inner:
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+$L$dec_loop8_enter:
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$dec_loop8
+
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+DB	102,15,56,223,208
+DB	102,15,56,223,216
+DB	102,15,56,223,224
+DB	102,15,56,223,232
+DB	102,15,56,223,240
+DB	102,15,56,223,248
+DB	102,68,15,56,223,192
+DB	102,68,15,56,223,200
+	DB	0F3h,0C3h		;repret
+
+global	aesni_ecb_encrypt
+
+ALIGN	16
+aesni_ecb_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_ecb_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+
+
+	lea	rsp,[((-88))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+	movaps	XMMWORD[32+rsp],xmm8
+	movaps	XMMWORD[48+rsp],xmm9
+$L$ecb_enc_body:
+	and	rdx,-16
+	jz	NEAR $L$ecb_ret
+
+	mov	eax,DWORD[240+rcx]
+	movups	xmm0,XMMWORD[rcx]
+	mov	r11,rcx
+	mov	r10d,eax
+	test	r8d,r8d
+	jz	NEAR $L$ecb_decrypt
+
+	cmp	rdx,0x80
+	jb	NEAR $L$ecb_enc_tail
+
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movdqu	xmm8,XMMWORD[96+rdi]
+	movdqu	xmm9,XMMWORD[112+rdi]
+	lea	rdi,[128+rdi]
+	sub	rdx,0x80
+	jmp	NEAR $L$ecb_enc_loop8_enter
+ALIGN	16
+$L$ecb_enc_loop8:
+	movups	XMMWORD[rsi],xmm2
+	mov	rcx,r11
+	movdqu	xmm2,XMMWORD[rdi]
+	mov	eax,r10d
+	movups	XMMWORD[16+rsi],xmm3
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movups	XMMWORD[32+rsi],xmm4
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movups	XMMWORD[48+rsi],xmm5
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movups	XMMWORD[64+rsi],xmm6
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movups	XMMWORD[80+rsi],xmm7
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movups	XMMWORD[96+rsi],xmm8
+	movdqu	xmm8,XMMWORD[96+rdi]
+	movups	XMMWORD[112+rsi],xmm9
+	lea	rsi,[128+rsi]
+	movdqu	xmm9,XMMWORD[112+rdi]
+	lea	rdi,[128+rdi]
+$L$ecb_enc_loop8_enter:
+
+	call	_aesni_encrypt8
+
+	sub	rdx,0x80
+	jnc	NEAR $L$ecb_enc_loop8
+
+	movups	XMMWORD[rsi],xmm2
+	mov	rcx,r11
+	movups	XMMWORD[16+rsi],xmm3
+	mov	eax,r10d
+	movups	XMMWORD[32+rsi],xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	movups	XMMWORD[96+rsi],xmm8
+	movups	XMMWORD[112+rsi],xmm9
+	lea	rsi,[128+rsi]
+	add	rdx,0x80
+	jz	NEAR $L$ecb_ret
+
+$L$ecb_enc_tail:
+	movups	xmm2,XMMWORD[rdi]
+	cmp	rdx,0x20
+	jb	NEAR $L$ecb_enc_one
+	movups	xmm3,XMMWORD[16+rdi]
+	je	NEAR $L$ecb_enc_two
+	movups	xmm4,XMMWORD[32+rdi]
+	cmp	rdx,0x40
+	jb	NEAR $L$ecb_enc_three
+	movups	xmm5,XMMWORD[48+rdi]
+	je	NEAR $L$ecb_enc_four
+	movups	xmm6,XMMWORD[64+rdi]
+	cmp	rdx,0x60
+	jb	NEAR $L$ecb_enc_five
+	movups	xmm7,XMMWORD[80+rdi]
+	je	NEAR $L$ecb_enc_six
+	movdqu	xmm8,XMMWORD[96+rdi]
+	xorps	xmm9,xmm9
+	call	_aesni_encrypt8
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	movups	XMMWORD[96+rsi],xmm8
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_one:
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_enc1_3:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_3
+DB	102,15,56,221,209
+	movups	XMMWORD[rsi],xmm2
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_two:
+	call	_aesni_encrypt2
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_three:
+	call	_aesni_encrypt3
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_four:
+	call	_aesni_encrypt4
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_five:
+	xorps	xmm7,xmm7
+	call	_aesni_encrypt6
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_enc_six:
+	call	_aesni_encrypt6
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	jmp	NEAR $L$ecb_ret
+
+ALIGN	16
+$L$ecb_decrypt:
+	cmp	rdx,0x80
+	jb	NEAR $L$ecb_dec_tail
+
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movdqu	xmm8,XMMWORD[96+rdi]
+	movdqu	xmm9,XMMWORD[112+rdi]
+	lea	rdi,[128+rdi]
+	sub	rdx,0x80
+	jmp	NEAR $L$ecb_dec_loop8_enter
+ALIGN	16
+$L$ecb_dec_loop8:
+	movups	XMMWORD[rsi],xmm2
+	mov	rcx,r11
+	movdqu	xmm2,XMMWORD[rdi]
+	mov	eax,r10d
+	movups	XMMWORD[16+rsi],xmm3
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movups	XMMWORD[32+rsi],xmm4
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movups	XMMWORD[48+rsi],xmm5
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movups	XMMWORD[64+rsi],xmm6
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movups	XMMWORD[80+rsi],xmm7
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movups	XMMWORD[96+rsi],xmm8
+	movdqu	xmm8,XMMWORD[96+rdi]
+	movups	XMMWORD[112+rsi],xmm9
+	lea	rsi,[128+rsi]
+	movdqu	xmm9,XMMWORD[112+rdi]
+	lea	rdi,[128+rdi]
+$L$ecb_dec_loop8_enter:
+
+	call	_aesni_decrypt8
+
+	movups	xmm0,XMMWORD[r11]
+	sub	rdx,0x80
+	jnc	NEAR $L$ecb_dec_loop8
+
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	mov	rcx,r11
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	mov	eax,r10d
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	pxor	xmm7,xmm7
+	movups	XMMWORD[96+rsi],xmm8
+	pxor	xmm8,xmm8
+	movups	XMMWORD[112+rsi],xmm9
+	pxor	xmm9,xmm9
+	lea	rsi,[128+rsi]
+	add	rdx,0x80
+	jz	NEAR $L$ecb_ret
+
+$L$ecb_dec_tail:
+	movups	xmm2,XMMWORD[rdi]
+	cmp	rdx,0x20
+	jb	NEAR $L$ecb_dec_one
+	movups	xmm3,XMMWORD[16+rdi]
+	je	NEAR $L$ecb_dec_two
+	movups	xmm4,XMMWORD[32+rdi]
+	cmp	rdx,0x40
+	jb	NEAR $L$ecb_dec_three
+	movups	xmm5,XMMWORD[48+rdi]
+	je	NEAR $L$ecb_dec_four
+	movups	xmm6,XMMWORD[64+rdi]
+	cmp	rdx,0x60
+	jb	NEAR $L$ecb_dec_five
+	movups	xmm7,XMMWORD[80+rdi]
+	je	NEAR $L$ecb_dec_six
+	movups	xmm8,XMMWORD[96+rdi]
+	movups	xmm0,XMMWORD[rcx]
+	xorps	xmm9,xmm9
+	call	_aesni_decrypt8
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	pxor	xmm7,xmm7
+	movups	XMMWORD[96+rsi],xmm8
+	pxor	xmm8,xmm8
+	pxor	xmm9,xmm9
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_one:
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_4:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_4
+DB	102,15,56,223,209
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_two:
+	call	_aesni_decrypt2
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_three:
+	call	_aesni_decrypt3
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_four:
+	call	_aesni_decrypt4
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_five:
+	xorps	xmm7,xmm7
+	call	_aesni_decrypt6
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	jmp	NEAR $L$ecb_ret
+ALIGN	16
+$L$ecb_dec_six:
+	call	_aesni_decrypt6
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movups	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	movups	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	movups	XMMWORD[80+rsi],xmm7
+	pxor	xmm7,xmm7
+
+$L$ecb_ret:
+	xorps	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movaps	xmm6,XMMWORD[rsp]
+	movaps	XMMWORD[rsp],xmm0
+	movaps	xmm7,XMMWORD[16+rsp]
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	xmm8,XMMWORD[32+rsp]
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	xmm9,XMMWORD[48+rsp]
+	movaps	XMMWORD[48+rsp],xmm0
+	lea	rsp,[88+rsp]
+$L$ecb_enc_ret:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_ecb_encrypt:
+global	aesni_ccm64_encrypt_blocks
+
+ALIGN	16
+aesni_ccm64_encrypt_blocks:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_ccm64_encrypt_blocks:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	lea	rsp,[((-88))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+	movaps	XMMWORD[32+rsp],xmm8
+	movaps	XMMWORD[48+rsp],xmm9
+$L$ccm64_enc_body:
+	mov	eax,DWORD[240+rcx]
+	movdqu	xmm6,XMMWORD[r8]
+	movdqa	xmm9,XMMWORD[$L$increment64]
+	movdqa	xmm7,XMMWORD[$L$bswap_mask]
+
+	shl	eax,4
+	mov	r10d,16
+	lea	r11,[rcx]
+	movdqu	xmm3,XMMWORD[r9]
+	movdqa	xmm2,xmm6
+	lea	rcx,[32+rax*1+rcx]
+DB	102,15,56,0,247
+	sub	r10,rax
+	jmp	NEAR $L$ccm64_enc_outer
+ALIGN	16
+$L$ccm64_enc_outer:
+	movups	xmm0,XMMWORD[r11]
+	mov	rax,r10
+	movups	xmm8,XMMWORD[rdi]
+
+	xorps	xmm2,xmm0
+	movups	xmm1,XMMWORD[16+r11]
+	xorps	xmm0,xmm8
+	xorps	xmm3,xmm0
+	movups	xmm0,XMMWORD[32+r11]
+
+$L$ccm64_enc2_loop:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$ccm64_enc2_loop
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	paddq	xmm6,xmm9
+	dec	rdx
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+
+	lea	rdi,[16+rdi]
+	xorps	xmm8,xmm2
+	movdqa	xmm2,xmm6
+	movups	XMMWORD[rsi],xmm8
+DB	102,15,56,0,215
+	lea	rsi,[16+rsi]
+	jnz	NEAR $L$ccm64_enc_outer
+
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	movups	XMMWORD[r9],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm8,xmm8
+	pxor	xmm6,xmm6
+	movaps	xmm6,XMMWORD[rsp]
+	movaps	XMMWORD[rsp],xmm0
+	movaps	xmm7,XMMWORD[16+rsp]
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	xmm8,XMMWORD[32+rsp]
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	xmm9,XMMWORD[48+rsp]
+	movaps	XMMWORD[48+rsp],xmm0
+	lea	rsp,[88+rsp]
+$L$ccm64_enc_ret:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_ccm64_encrypt_blocks:
+global	aesni_ccm64_decrypt_blocks
+
+ALIGN	16
+aesni_ccm64_decrypt_blocks:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_ccm64_decrypt_blocks:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	lea	rsp,[((-88))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+	movaps	XMMWORD[32+rsp],xmm8
+	movaps	XMMWORD[48+rsp],xmm9
+$L$ccm64_dec_body:
+	mov	eax,DWORD[240+rcx]
+	movups	xmm6,XMMWORD[r8]
+	movdqu	xmm3,XMMWORD[r9]
+	movdqa	xmm9,XMMWORD[$L$increment64]
+	movdqa	xmm7,XMMWORD[$L$bswap_mask]
+
+	movaps	xmm2,xmm6
+	mov	r10d,eax
+	mov	r11,rcx
+DB	102,15,56,0,247
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_enc1_5:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_5
+DB	102,15,56,221,209
+	shl	r10d,4
+	mov	eax,16
+	movups	xmm8,XMMWORD[rdi]
+	paddq	xmm6,xmm9
+	lea	rdi,[16+rdi]
+	sub	rax,r10
+	lea	rcx,[32+r10*1+r11]
+	mov	r10,rax
+	jmp	NEAR $L$ccm64_dec_outer
+ALIGN	16
+$L$ccm64_dec_outer:
+	xorps	xmm8,xmm2
+	movdqa	xmm2,xmm6
+	movups	XMMWORD[rsi],xmm8
+	lea	rsi,[16+rsi]
+DB	102,15,56,0,215
+
+	sub	rdx,1
+	jz	NEAR $L$ccm64_dec_break
+
+	movups	xmm0,XMMWORD[r11]
+	mov	rax,r10
+	movups	xmm1,XMMWORD[16+r11]
+	xorps	xmm8,xmm0
+	xorps	xmm2,xmm0
+	xorps	xmm3,xmm8
+	movups	xmm0,XMMWORD[32+r11]
+	jmp	NEAR $L$ccm64_dec2_loop
+ALIGN	16
+$L$ccm64_dec2_loop:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	movups	xmm1,XMMWORD[rax*1+rcx]
+	add	rax,32
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	movups	xmm0,XMMWORD[((-16))+rax*1+rcx]
+	jnz	NEAR $L$ccm64_dec2_loop
+	movups	xmm8,XMMWORD[rdi]
+	paddq	xmm6,xmm9
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,221,208
+DB	102,15,56,221,216
+	lea	rdi,[16+rdi]
+	jmp	NEAR $L$ccm64_dec_outer
+
+ALIGN	16
+$L$ccm64_dec_break:
+
+	mov	eax,DWORD[240+r11]
+	movups	xmm0,XMMWORD[r11]
+	movups	xmm1,XMMWORD[16+r11]
+	xorps	xmm8,xmm0
+	lea	r11,[32+r11]
+	xorps	xmm3,xmm8
+$L$oop_enc1_6:
+DB	102,15,56,220,217
+	dec	eax
+	movups	xmm1,XMMWORD[r11]
+	lea	r11,[16+r11]
+	jnz	NEAR $L$oop_enc1_6
+DB	102,15,56,221,217
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	movups	XMMWORD[r9],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm8,xmm8
+	pxor	xmm6,xmm6
+	movaps	xmm6,XMMWORD[rsp]
+	movaps	XMMWORD[rsp],xmm0
+	movaps	xmm7,XMMWORD[16+rsp]
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	xmm8,XMMWORD[32+rsp]
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	xmm9,XMMWORD[48+rsp]
+	movaps	XMMWORD[48+rsp],xmm0
+	lea	rsp,[88+rsp]
+$L$ccm64_dec_ret:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_ccm64_decrypt_blocks:
+global	aesni_ctr32_encrypt_blocks
+
+ALIGN	16
+aesni_ctr32_encrypt_blocks:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_ctr32_encrypt_blocks:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+
+
+	cmp	rdx,1
+	jne	NEAR $L$ctr32_bulk
+
+
+
+	movups	xmm2,XMMWORD[r8]
+	movups	xmm3,XMMWORD[rdi]
+	mov	edx,DWORD[240+rcx]
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_enc1_7:
+DB	102,15,56,220,209
+	dec	edx
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_7
+DB	102,15,56,221,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	xorps	xmm2,xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[rsi],xmm2
+	xorps	xmm2,xmm2
+	jmp	NEAR $L$ctr32_epilogue
+
+ALIGN	16
+$L$ctr32_bulk:
+	lea	rax,[rsp]
+	push	rbp
+	sub	rsp,288
+	and	rsp,-16
+	movaps	XMMWORD[(-168)+rax],xmm6
+	movaps	XMMWORD[(-152)+rax],xmm7
+	movaps	XMMWORD[(-136)+rax],xmm8
+	movaps	XMMWORD[(-120)+rax],xmm9
+	movaps	XMMWORD[(-104)+rax],xmm10
+	movaps	XMMWORD[(-88)+rax],xmm11
+	movaps	XMMWORD[(-72)+rax],xmm12
+	movaps	XMMWORD[(-56)+rax],xmm13
+	movaps	XMMWORD[(-40)+rax],xmm14
+	movaps	XMMWORD[(-24)+rax],xmm15
+$L$ctr32_body:
+	lea	rbp,[((-8))+rax]
+
+
+
+
+	movdqu	xmm2,XMMWORD[r8]
+	movdqu	xmm0,XMMWORD[rcx]
+	mov	r8d,DWORD[12+r8]
+	pxor	xmm2,xmm0
+	mov	r11d,DWORD[12+rcx]
+	movdqa	XMMWORD[rsp],xmm2
+	bswap	r8d
+	movdqa	xmm3,xmm2
+	movdqa	xmm4,xmm2
+	movdqa	xmm5,xmm2
+	movdqa	XMMWORD[64+rsp],xmm2
+	movdqa	XMMWORD[80+rsp],xmm2
+	movdqa	XMMWORD[96+rsp],xmm2
+	mov	r10,rdx
+	movdqa	XMMWORD[112+rsp],xmm2
+
+	lea	rax,[1+r8]
+	lea	rdx,[2+r8]
+	bswap	eax
+	bswap	edx
+	xor	eax,r11d
+	xor	edx,r11d
+DB	102,15,58,34,216,3
+	lea	rax,[3+r8]
+	movdqa	XMMWORD[16+rsp],xmm3
+DB	102,15,58,34,226,3
+	bswap	eax
+	mov	rdx,r10
+	lea	r10,[4+r8]
+	movdqa	XMMWORD[32+rsp],xmm4
+	xor	eax,r11d
+	bswap	r10d
+DB	102,15,58,34,232,3
+	xor	r10d,r11d
+	movdqa	XMMWORD[48+rsp],xmm5
+	lea	r9,[5+r8]
+	mov	DWORD[((64+12))+rsp],r10d
+	bswap	r9d
+	lea	r10,[6+r8]
+	mov	eax,DWORD[240+rcx]
+	xor	r9d,r11d
+	bswap	r10d
+	mov	DWORD[((80+12))+rsp],r9d
+	xor	r10d,r11d
+	lea	r9,[7+r8]
+	mov	DWORD[((96+12))+rsp],r10d
+	bswap	r9d
+	mov	r10d,DWORD[((OPENSSL_ia32cap_P+4))]
+	xor	r9d,r11d
+	and	r10d,71303168
+	mov	DWORD[((112+12))+rsp],r9d
+
+	movups	xmm1,XMMWORD[16+rcx]
+
+	movdqa	xmm6,XMMWORD[64+rsp]
+	movdqa	xmm7,XMMWORD[80+rsp]
+
+	cmp	rdx,8
+	jb	NEAR $L$ctr32_tail
+
+	sub	rdx,6
+	cmp	r10d,4194304
+	je	NEAR $L$ctr32_6x
+
+	lea	rcx,[128+rcx]
+	sub	rdx,2
+	jmp	NEAR $L$ctr32_loop8
+
+ALIGN	16
+$L$ctr32_6x:
+	shl	eax,4
+	mov	r10d,48
+	bswap	r11d
+	lea	rcx,[32+rax*1+rcx]
+	sub	r10,rax
+	jmp	NEAR $L$ctr32_loop6
+
+ALIGN	16
+$L$ctr32_loop6:
+	add	r8d,6
+	movups	xmm0,XMMWORD[((-48))+r10*1+rcx]
+DB	102,15,56,220,209
+	mov	eax,r8d
+	xor	eax,r11d
+DB	102,15,56,220,217
+DB	0x0f,0x38,0xf1,0x44,0x24,12
+	lea	eax,[1+r8]
+DB	102,15,56,220,225
+	xor	eax,r11d
+DB	0x0f,0x38,0xf1,0x44,0x24,28
+DB	102,15,56,220,233
+	lea	eax,[2+r8]
+	xor	eax,r11d
+DB	102,15,56,220,241
+DB	0x0f,0x38,0xf1,0x44,0x24,44
+	lea	eax,[3+r8]
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[((-32))+r10*1+rcx]
+	xor	eax,r11d
+
+DB	102,15,56,220,208
+DB	0x0f,0x38,0xf1,0x44,0x24,60
+	lea	eax,[4+r8]
+DB	102,15,56,220,216
+	xor	eax,r11d
+DB	0x0f,0x38,0xf1,0x44,0x24,76
+DB	102,15,56,220,224
+	lea	eax,[5+r8]
+	xor	eax,r11d
+DB	102,15,56,220,232
+DB	0x0f,0x38,0xf1,0x44,0x24,92
+	mov	rax,r10
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+	movups	xmm0,XMMWORD[((-16))+r10*1+rcx]
+
+	call	$L$enc_loop6
+
+	movdqu	xmm8,XMMWORD[rdi]
+	movdqu	xmm9,XMMWORD[16+rdi]
+	movdqu	xmm10,XMMWORD[32+rdi]
+	movdqu	xmm11,XMMWORD[48+rdi]
+	movdqu	xmm12,XMMWORD[64+rdi]
+	movdqu	xmm13,XMMWORD[80+rdi]
+	lea	rdi,[96+rdi]
+	movups	xmm1,XMMWORD[((-64))+r10*1+rcx]
+	pxor	xmm8,xmm2
+	movaps	xmm2,XMMWORD[rsp]
+	pxor	xmm9,xmm3
+	movaps	xmm3,XMMWORD[16+rsp]
+	pxor	xmm10,xmm4
+	movaps	xmm4,XMMWORD[32+rsp]
+	pxor	xmm11,xmm5
+	movaps	xmm5,XMMWORD[48+rsp]
+	pxor	xmm12,xmm6
+	movaps	xmm6,XMMWORD[64+rsp]
+	pxor	xmm13,xmm7
+	movaps	xmm7,XMMWORD[80+rsp]
+	movdqu	XMMWORD[rsi],xmm8
+	movdqu	XMMWORD[16+rsi],xmm9
+	movdqu	XMMWORD[32+rsi],xmm10
+	movdqu	XMMWORD[48+rsi],xmm11
+	movdqu	XMMWORD[64+rsi],xmm12
+	movdqu	XMMWORD[80+rsi],xmm13
+	lea	rsi,[96+rsi]
+
+	sub	rdx,6
+	jnc	NEAR $L$ctr32_loop6
+
+	add	rdx,6
+	jz	NEAR $L$ctr32_done
+
+	lea	eax,[((-48))+r10]
+	lea	rcx,[((-80))+r10*1+rcx]
+	neg	eax
+	shr	eax,4
+	jmp	NEAR $L$ctr32_tail
+
+ALIGN	32
+$L$ctr32_loop8:
+	add	r8d,8
+	movdqa	xmm8,XMMWORD[96+rsp]
+DB	102,15,56,220,209
+	mov	r9d,r8d
+	movdqa	xmm9,XMMWORD[112+rsp]
+DB	102,15,56,220,217
+	bswap	r9d
+	movups	xmm0,XMMWORD[((32-128))+rcx]
+DB	102,15,56,220,225
+	xor	r9d,r11d
+	nop
+DB	102,15,56,220,233
+	mov	DWORD[((0+12))+rsp],r9d
+	lea	r9,[1+r8]
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((48-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	mov	DWORD[((16+12))+rsp],r9d
+	lea	r9,[2+r8]
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((64-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	mov	DWORD[((32+12))+rsp],r9d
+	lea	r9,[3+r8]
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((80-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	mov	DWORD[((48+12))+rsp],r9d
+	lea	r9,[4+r8]
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((96-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	mov	DWORD[((64+12))+rsp],r9d
+	lea	r9,[5+r8]
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((112-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	mov	DWORD[((80+12))+rsp],r9d
+	lea	r9,[6+r8]
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((128-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	xor	r9d,r11d
+DB	0x66,0x90
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	mov	DWORD[((96+12))+rsp],r9d
+	lea	r9,[7+r8]
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((144-128))+rcx]
+	bswap	r9d
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+	xor	r9d,r11d
+	movdqu	xmm10,XMMWORD[rdi]
+DB	102,15,56,220,232
+	mov	DWORD[((112+12))+rsp],r9d
+	cmp	eax,11
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((160-128))+rcx]
+
+	jb	NEAR $L$ctr32_enc_done
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((176-128))+rcx]
+
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((192-128))+rcx]
+	je	NEAR $L$ctr32_enc_done
+
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movups	xmm1,XMMWORD[((208-128))+rcx]
+
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+DB	102,68,15,56,220,192
+DB	102,68,15,56,220,200
+	movups	xmm0,XMMWORD[((224-128))+rcx]
+	jmp	NEAR $L$ctr32_enc_done
+
+ALIGN	16
+$L$ctr32_enc_done:
+	movdqu	xmm11,XMMWORD[16+rdi]
+	pxor	xmm10,xmm0
+	movdqu	xmm12,XMMWORD[32+rdi]
+	pxor	xmm11,xmm0
+	movdqu	xmm13,XMMWORD[48+rdi]
+	pxor	xmm12,xmm0
+	movdqu	xmm14,XMMWORD[64+rdi]
+	pxor	xmm13,xmm0
+	movdqu	xmm15,XMMWORD[80+rdi]
+	pxor	xmm14,xmm0
+	pxor	xmm15,xmm0
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+DB	102,68,15,56,220,201
+	movdqu	xmm1,XMMWORD[96+rdi]
+	lea	rdi,[128+rdi]
+
+DB	102,65,15,56,221,210
+	pxor	xmm1,xmm0
+	movdqu	xmm10,XMMWORD[((112-128))+rdi]
+DB	102,65,15,56,221,219
+	pxor	xmm10,xmm0
+	movdqa	xmm11,XMMWORD[rsp]
+DB	102,65,15,56,221,228
+DB	102,65,15,56,221,237
+	movdqa	xmm12,XMMWORD[16+rsp]
+	movdqa	xmm13,XMMWORD[32+rsp]
+DB	102,65,15,56,221,246
+DB	102,65,15,56,221,255
+	movdqa	xmm14,XMMWORD[48+rsp]
+	movdqa	xmm15,XMMWORD[64+rsp]
+DB	102,68,15,56,221,193
+	movdqa	xmm0,XMMWORD[80+rsp]
+	movups	xmm1,XMMWORD[((16-128))+rcx]
+DB	102,69,15,56,221,202
+
+	movups	XMMWORD[rsi],xmm2
+	movdqa	xmm2,xmm11
+	movups	XMMWORD[16+rsi],xmm3
+	movdqa	xmm3,xmm12
+	movups	XMMWORD[32+rsi],xmm4
+	movdqa	xmm4,xmm13
+	movups	XMMWORD[48+rsi],xmm5
+	movdqa	xmm5,xmm14
+	movups	XMMWORD[64+rsi],xmm6
+	movdqa	xmm6,xmm15
+	movups	XMMWORD[80+rsi],xmm7
+	movdqa	xmm7,xmm0
+	movups	XMMWORD[96+rsi],xmm8
+	movups	XMMWORD[112+rsi],xmm9
+	lea	rsi,[128+rsi]
+
+	sub	rdx,8
+	jnc	NEAR $L$ctr32_loop8
+
+	add	rdx,8
+	jz	NEAR $L$ctr32_done
+	lea	rcx,[((-128))+rcx]
+
+$L$ctr32_tail:
+
+
+	lea	rcx,[16+rcx]
+	cmp	rdx,4
+	jb	NEAR $L$ctr32_loop3
+	je	NEAR $L$ctr32_loop4
+
+
+	shl	eax,4
+	movdqa	xmm8,XMMWORD[96+rsp]
+	pxor	xmm9,xmm9
+
+	movups	xmm0,XMMWORD[16+rcx]
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+	lea	rcx,[((32-16))+rax*1+rcx]
+	neg	rax
+DB	102,15,56,220,225
+	add	rax,16
+	movups	xmm10,XMMWORD[rdi]
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+	movups	xmm11,XMMWORD[16+rdi]
+	movups	xmm12,XMMWORD[32+rdi]
+DB	102,15,56,220,249
+DB	102,68,15,56,220,193
+
+	call	$L$enc_loop8_enter
+
+	movdqu	xmm13,XMMWORD[48+rdi]
+	pxor	xmm2,xmm10
+	movdqu	xmm10,XMMWORD[64+rdi]
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm6,xmm10
+	movdqu	XMMWORD[48+rsi],xmm5
+	movdqu	XMMWORD[64+rsi],xmm6
+	cmp	rdx,6
+	jb	NEAR $L$ctr32_done
+
+	movups	xmm11,XMMWORD[80+rdi]
+	xorps	xmm7,xmm11
+	movups	XMMWORD[80+rsi],xmm7
+	je	NEAR $L$ctr32_done
+
+	movups	xmm12,XMMWORD[96+rdi]
+	xorps	xmm8,xmm12
+	movups	XMMWORD[96+rsi],xmm8
+	jmp	NEAR $L$ctr32_done
+
+ALIGN	32
+$L$ctr32_loop4:
+DB	102,15,56,220,209
+	lea	rcx,[16+rcx]
+	dec	eax
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	movups	xmm1,XMMWORD[rcx]
+	jnz	NEAR $L$ctr32_loop4
+DB	102,15,56,221,209
+DB	102,15,56,221,217
+	movups	xmm10,XMMWORD[rdi]
+	movups	xmm11,XMMWORD[16+rdi]
+DB	102,15,56,221,225
+DB	102,15,56,221,233
+	movups	xmm12,XMMWORD[32+rdi]
+	movups	xmm13,XMMWORD[48+rdi]
+
+	xorps	xmm2,xmm10
+	movups	XMMWORD[rsi],xmm2
+	xorps	xmm3,xmm11
+	movups	XMMWORD[16+rsi],xmm3
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[48+rsi],xmm5
+	jmp	NEAR $L$ctr32_done
+
+ALIGN	32
+$L$ctr32_loop3:
+DB	102,15,56,220,209
+	lea	rcx,[16+rcx]
+	dec	eax
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+	movups	xmm1,XMMWORD[rcx]
+	jnz	NEAR $L$ctr32_loop3
+DB	102,15,56,221,209
+DB	102,15,56,221,217
+DB	102,15,56,221,225
+
+	movups	xmm10,XMMWORD[rdi]
+	xorps	xmm2,xmm10
+	movups	XMMWORD[rsi],xmm2
+	cmp	rdx,2
+	jb	NEAR $L$ctr32_done
+
+	movups	xmm11,XMMWORD[16+rdi]
+	xorps	xmm3,xmm11
+	movups	XMMWORD[16+rsi],xmm3
+	je	NEAR $L$ctr32_done
+
+	movups	xmm12,XMMWORD[32+rdi]
+	xorps	xmm4,xmm12
+	movups	XMMWORD[32+rsi],xmm4
+
+$L$ctr32_done:
+	xorps	xmm0,xmm0
+	xor	r11d,r11d
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	movaps	xmm6,XMMWORD[((-160))+rbp]
+	movaps	XMMWORD[(-160)+rbp],xmm0
+	movaps	xmm7,XMMWORD[((-144))+rbp]
+	movaps	XMMWORD[(-144)+rbp],xmm0
+	movaps	xmm8,XMMWORD[((-128))+rbp]
+	movaps	XMMWORD[(-128)+rbp],xmm0
+	movaps	xmm9,XMMWORD[((-112))+rbp]
+	movaps	XMMWORD[(-112)+rbp],xmm0
+	movaps	xmm10,XMMWORD[((-96))+rbp]
+	movaps	XMMWORD[(-96)+rbp],xmm0
+	movaps	xmm11,XMMWORD[((-80))+rbp]
+	movaps	XMMWORD[(-80)+rbp],xmm0
+	movaps	xmm12,XMMWORD[((-64))+rbp]
+	movaps	XMMWORD[(-64)+rbp],xmm0
+	movaps	xmm13,XMMWORD[((-48))+rbp]
+	movaps	XMMWORD[(-48)+rbp],xmm0
+	movaps	xmm14,XMMWORD[((-32))+rbp]
+	movaps	XMMWORD[(-32)+rbp],xmm0
+	movaps	xmm15,XMMWORD[((-16))+rbp]
+	movaps	XMMWORD[(-16)+rbp],xmm0
+	movaps	XMMWORD[rsp],xmm0
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	XMMWORD[48+rsp],xmm0
+	movaps	XMMWORD[64+rsp],xmm0
+	movaps	XMMWORD[80+rsp],xmm0
+	movaps	XMMWORD[96+rsp],xmm0
+	movaps	XMMWORD[112+rsp],xmm0
+	lea	rsp,[rbp]
+	pop	rbp
+$L$ctr32_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_ctr32_encrypt_blocks:
+global	aesni_xts_encrypt
+
+ALIGN	16
+aesni_xts_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_xts_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	lea	rax,[rsp]
+	push	rbp
+	sub	rsp,272
+	and	rsp,-16
+	movaps	XMMWORD[(-168)+rax],xmm6
+	movaps	XMMWORD[(-152)+rax],xmm7
+	movaps	XMMWORD[(-136)+rax],xmm8
+	movaps	XMMWORD[(-120)+rax],xmm9
+	movaps	XMMWORD[(-104)+rax],xmm10
+	movaps	XMMWORD[(-88)+rax],xmm11
+	movaps	XMMWORD[(-72)+rax],xmm12
+	movaps	XMMWORD[(-56)+rax],xmm13
+	movaps	XMMWORD[(-40)+rax],xmm14
+	movaps	XMMWORD[(-24)+rax],xmm15
+$L$xts_enc_body:
+	lea	rbp,[((-8))+rax]
+	movups	xmm2,XMMWORD[r9]
+	mov	eax,DWORD[240+r8]
+	mov	r10d,DWORD[240+rcx]
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[16+r8]
+	lea	r8,[32+r8]
+	xorps	xmm2,xmm0
+$L$oop_enc1_8:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[r8]
+	lea	r8,[16+r8]
+	jnz	NEAR $L$oop_enc1_8
+DB	102,15,56,221,209
+	movups	xmm0,XMMWORD[rcx]
+	mov	r11,rcx
+	mov	eax,r10d
+	shl	r10d,4
+	mov	r9,rdx
+	and	rdx,-16
+
+	movups	xmm1,XMMWORD[16+r10*1+rcx]
+
+	movdqa	xmm8,XMMWORD[$L$xts_magic]
+	movdqa	xmm15,xmm2
+	pshufd	xmm9,xmm2,0x5f
+	pxor	xmm1,xmm0
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm10,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm10,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm11,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm11,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm12,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm12,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm13,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm13,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm15
+	psrad	xmm9,31
+	paddq	xmm15,xmm15
+	pand	xmm9,xmm8
+	pxor	xmm14,xmm0
+	pxor	xmm15,xmm9
+	movaps	XMMWORD[96+rsp],xmm1
+
+	sub	rdx,16*6
+	jc	NEAR $L$xts_enc_short
+
+	mov	eax,16+96
+	lea	rcx,[32+r10*1+r11]
+	sub	rax,r10
+	movups	xmm1,XMMWORD[16+r11]
+	mov	r10,rax
+	lea	r8,[$L$xts_magic]
+	jmp	NEAR $L$xts_enc_grandloop
+
+ALIGN	32
+$L$xts_enc_grandloop:
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqa	xmm8,xmm0
+	movdqu	xmm3,XMMWORD[16+rdi]
+	pxor	xmm2,xmm10
+	movdqu	xmm4,XMMWORD[32+rdi]
+	pxor	xmm3,xmm11
+DB	102,15,56,220,209
+	movdqu	xmm5,XMMWORD[48+rdi]
+	pxor	xmm4,xmm12
+DB	102,15,56,220,217
+	movdqu	xmm6,XMMWORD[64+rdi]
+	pxor	xmm5,xmm13
+DB	102,15,56,220,225
+	movdqu	xmm7,XMMWORD[80+rdi]
+	pxor	xmm8,xmm15
+	movdqa	xmm9,XMMWORD[96+rsp]
+	pxor	xmm6,xmm14
+DB	102,15,56,220,233
+	movups	xmm0,XMMWORD[32+r11]
+	lea	rdi,[96+rdi]
+	pxor	xmm7,xmm8
+
+	pxor	xmm10,xmm9
+DB	102,15,56,220,241
+	pxor	xmm11,xmm9
+	movdqa	XMMWORD[rsp],xmm10
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[48+r11]
+	pxor	xmm12,xmm9
+
+DB	102,15,56,220,208
+	pxor	xmm13,xmm9
+	movdqa	XMMWORD[16+rsp],xmm11
+DB	102,15,56,220,216
+	pxor	xmm14,xmm9
+	movdqa	XMMWORD[32+rsp],xmm12
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	pxor	xmm8,xmm9
+	movdqa	XMMWORD[64+rsp],xmm14
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+	movups	xmm0,XMMWORD[64+r11]
+	movdqa	XMMWORD[80+rsp],xmm8
+	pshufd	xmm9,xmm15,0x5f
+	jmp	NEAR $L$xts_enc_loop6
+ALIGN	32
+$L$xts_enc_loop6:
+DB	102,15,56,220,209
+DB	102,15,56,220,217
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[((-64))+rax*1+rcx]
+	add	rax,32
+
+DB	102,15,56,220,208
+DB	102,15,56,220,216
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+DB	102,15,56,220,248
+	movups	xmm0,XMMWORD[((-80))+rax*1+rcx]
+	jnz	NEAR $L$xts_enc_loop6
+
+	movdqa	xmm8,XMMWORD[r8]
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+DB	102,15,56,220,209
+	paddq	xmm15,xmm15
+	psrad	xmm14,31
+DB	102,15,56,220,217
+	pand	xmm14,xmm8
+	movups	xmm10,XMMWORD[r11]
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+DB	102,15,56,220,241
+	pxor	xmm15,xmm14
+	movaps	xmm11,xmm10
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[((-64))+rcx]
+
+	movdqa	xmm14,xmm9
+DB	102,15,56,220,208
+	paddd	xmm9,xmm9
+	pxor	xmm10,xmm15
+DB	102,15,56,220,216
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+	pand	xmm14,xmm8
+	movaps	xmm12,xmm11
+DB	102,15,56,220,240
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+DB	102,15,56,220,248
+	movups	xmm0,XMMWORD[((-48))+rcx]
+
+	paddd	xmm9,xmm9
+DB	102,15,56,220,209
+	pxor	xmm11,xmm15
+	psrad	xmm14,31
+DB	102,15,56,220,217
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	movdqa	XMMWORD[48+rsp],xmm13
+	pxor	xmm15,xmm14
+DB	102,15,56,220,241
+	movaps	xmm13,xmm12
+	movdqa	xmm14,xmm9
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[((-32))+rcx]
+
+	paddd	xmm9,xmm9
+DB	102,15,56,220,208
+	pxor	xmm12,xmm15
+	psrad	xmm14,31
+DB	102,15,56,220,216
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+DB	102,15,56,220,224
+DB	102,15,56,220,232
+DB	102,15,56,220,240
+	pxor	xmm15,xmm14
+	movaps	xmm14,xmm13
+DB	102,15,56,220,248
+
+	movdqa	xmm0,xmm9
+	paddd	xmm9,xmm9
+DB	102,15,56,220,209
+	pxor	xmm13,xmm15
+	psrad	xmm0,31
+DB	102,15,56,220,217
+	paddq	xmm15,xmm15
+	pand	xmm0,xmm8
+DB	102,15,56,220,225
+DB	102,15,56,220,233
+	pxor	xmm15,xmm0
+	movups	xmm0,XMMWORD[r11]
+DB	102,15,56,220,241
+DB	102,15,56,220,249
+	movups	xmm1,XMMWORD[16+r11]
+
+	pxor	xmm14,xmm15
+DB	102,15,56,221,84,36,0
+	psrad	xmm9,31
+	paddq	xmm15,xmm15
+DB	102,15,56,221,92,36,16
+DB	102,15,56,221,100,36,32
+	pand	xmm9,xmm8
+	mov	rax,r10
+DB	102,15,56,221,108,36,48
+DB	102,15,56,221,116,36,64
+DB	102,15,56,221,124,36,80
+	pxor	xmm15,xmm9
+
+	lea	rsi,[96+rsi]
+	movups	XMMWORD[(-96)+rsi],xmm2
+	movups	XMMWORD[(-80)+rsi],xmm3
+	movups	XMMWORD[(-64)+rsi],xmm4
+	movups	XMMWORD[(-48)+rsi],xmm5
+	movups	XMMWORD[(-32)+rsi],xmm6
+	movups	XMMWORD[(-16)+rsi],xmm7
+	sub	rdx,16*6
+	jnc	NEAR $L$xts_enc_grandloop
+
+	mov	eax,16+96
+	sub	eax,r10d
+	mov	rcx,r11
+	shr	eax,4
+
+$L$xts_enc_short:
+
+	mov	r10d,eax
+	pxor	xmm10,xmm0
+	add	rdx,16*6
+	jz	NEAR $L$xts_enc_done
+
+	pxor	xmm11,xmm0
+	cmp	rdx,0x20
+	jb	NEAR $L$xts_enc_one
+	pxor	xmm12,xmm0
+	je	NEAR $L$xts_enc_two
+
+	pxor	xmm13,xmm0
+	cmp	rdx,0x40
+	jb	NEAR $L$xts_enc_three
+	pxor	xmm14,xmm0
+	je	NEAR $L$xts_enc_four
+
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqu	xmm4,XMMWORD[32+rdi]
+	pxor	xmm2,xmm10
+	movdqu	xmm5,XMMWORD[48+rdi]
+	pxor	xmm3,xmm11
+	movdqu	xmm6,XMMWORD[64+rdi]
+	lea	rdi,[80+rdi]
+	pxor	xmm4,xmm12
+	pxor	xmm5,xmm13
+	pxor	xmm6,xmm14
+	pxor	xmm7,xmm7
+
+	call	_aesni_encrypt6
+
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm15
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+	movdqu	XMMWORD[rsi],xmm2
+	xorps	xmm5,xmm13
+	movdqu	XMMWORD[16+rsi],xmm3
+	xorps	xmm6,xmm14
+	movdqu	XMMWORD[32+rsi],xmm4
+	movdqu	XMMWORD[48+rsi],xmm5
+	movdqu	XMMWORD[64+rsi],xmm6
+	lea	rsi,[80+rsi]
+	jmp	NEAR $L$xts_enc_done
+
+ALIGN	16
+$L$xts_enc_one:
+	movups	xmm2,XMMWORD[rdi]
+	lea	rdi,[16+rdi]
+	xorps	xmm2,xmm10
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_enc1_9:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_9
+DB	102,15,56,221,209
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm11
+	movups	XMMWORD[rsi],xmm2
+	lea	rsi,[16+rsi]
+	jmp	NEAR $L$xts_enc_done
+
+ALIGN	16
+$L$xts_enc_two:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	lea	rdi,[32+rdi]
+	xorps	xmm2,xmm10
+	xorps	xmm3,xmm11
+
+	call	_aesni_encrypt2
+
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm12
+	xorps	xmm3,xmm11
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	lea	rsi,[32+rsi]
+	jmp	NEAR $L$xts_enc_done
+
+ALIGN	16
+$L$xts_enc_three:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	movups	xmm4,XMMWORD[32+rdi]
+	lea	rdi,[48+rdi]
+	xorps	xmm2,xmm10
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+
+	call	_aesni_encrypt3
+
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm13
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	lea	rsi,[48+rsi]
+	jmp	NEAR $L$xts_enc_done
+
+ALIGN	16
+$L$xts_enc_four:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	movups	xmm4,XMMWORD[32+rdi]
+	xorps	xmm2,xmm10
+	movups	xmm5,XMMWORD[48+rdi]
+	lea	rdi,[64+rdi]
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+	xorps	xmm5,xmm13
+
+	call	_aesni_encrypt4
+
+	pxor	xmm2,xmm10
+	movdqa	xmm10,xmm14
+	pxor	xmm3,xmm11
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[16+rsi],xmm3
+	movdqu	XMMWORD[32+rsi],xmm4
+	movdqu	XMMWORD[48+rsi],xmm5
+	lea	rsi,[64+rsi]
+	jmp	NEAR $L$xts_enc_done
+
+ALIGN	16
+$L$xts_enc_done:
+	and	r9,15
+	jz	NEAR $L$xts_enc_ret
+	mov	rdx,r9
+
+$L$xts_enc_steal:
+	movzx	eax,BYTE[rdi]
+	movzx	ecx,BYTE[((-16))+rsi]
+	lea	rdi,[1+rdi]
+	mov	BYTE[((-16))+rsi],al
+	mov	BYTE[rsi],cl
+	lea	rsi,[1+rsi]
+	sub	rdx,1
+	jnz	NEAR $L$xts_enc_steal
+
+	sub	rsi,r9
+	mov	rcx,r11
+	mov	eax,r10d
+
+	movups	xmm2,XMMWORD[((-16))+rsi]
+	xorps	xmm2,xmm10
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_enc1_10:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_10
+DB	102,15,56,221,209
+	xorps	xmm2,xmm10
+	movups	XMMWORD[(-16)+rsi],xmm2
+
+$L$xts_enc_ret:
+	xorps	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	movaps	xmm6,XMMWORD[((-160))+rbp]
+	movaps	XMMWORD[(-160)+rbp],xmm0
+	movaps	xmm7,XMMWORD[((-144))+rbp]
+	movaps	XMMWORD[(-144)+rbp],xmm0
+	movaps	xmm8,XMMWORD[((-128))+rbp]
+	movaps	XMMWORD[(-128)+rbp],xmm0
+	movaps	xmm9,XMMWORD[((-112))+rbp]
+	movaps	XMMWORD[(-112)+rbp],xmm0
+	movaps	xmm10,XMMWORD[((-96))+rbp]
+	movaps	XMMWORD[(-96)+rbp],xmm0
+	movaps	xmm11,XMMWORD[((-80))+rbp]
+	movaps	XMMWORD[(-80)+rbp],xmm0
+	movaps	xmm12,XMMWORD[((-64))+rbp]
+	movaps	XMMWORD[(-64)+rbp],xmm0
+	movaps	xmm13,XMMWORD[((-48))+rbp]
+	movaps	XMMWORD[(-48)+rbp],xmm0
+	movaps	xmm14,XMMWORD[((-32))+rbp]
+	movaps	XMMWORD[(-32)+rbp],xmm0
+	movaps	xmm15,XMMWORD[((-16))+rbp]
+	movaps	XMMWORD[(-16)+rbp],xmm0
+	movaps	XMMWORD[rsp],xmm0
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	XMMWORD[48+rsp],xmm0
+	movaps	XMMWORD[64+rsp],xmm0
+	movaps	XMMWORD[80+rsp],xmm0
+	movaps	XMMWORD[96+rsp],xmm0
+	lea	rsp,[rbp]
+	pop	rbp
+$L$xts_enc_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_xts_encrypt:
+global	aesni_xts_decrypt
+
+ALIGN	16
+aesni_xts_decrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_xts_decrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	lea	rax,[rsp]
+	push	rbp
+	sub	rsp,272
+	and	rsp,-16
+	movaps	XMMWORD[(-168)+rax],xmm6
+	movaps	XMMWORD[(-152)+rax],xmm7
+	movaps	XMMWORD[(-136)+rax],xmm8
+	movaps	XMMWORD[(-120)+rax],xmm9
+	movaps	XMMWORD[(-104)+rax],xmm10
+	movaps	XMMWORD[(-88)+rax],xmm11
+	movaps	XMMWORD[(-72)+rax],xmm12
+	movaps	XMMWORD[(-56)+rax],xmm13
+	movaps	XMMWORD[(-40)+rax],xmm14
+	movaps	XMMWORD[(-24)+rax],xmm15
+$L$xts_dec_body:
+	lea	rbp,[((-8))+rax]
+	movups	xmm2,XMMWORD[r9]
+	mov	eax,DWORD[240+r8]
+	mov	r10d,DWORD[240+rcx]
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[16+r8]
+	lea	r8,[32+r8]
+	xorps	xmm2,xmm0
+$L$oop_enc1_11:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[r8]
+	lea	r8,[16+r8]
+	jnz	NEAR $L$oop_enc1_11
+DB	102,15,56,221,209
+	xor	eax,eax
+	test	rdx,15
+	setnz	al
+	shl	rax,4
+	sub	rdx,rax
+
+	movups	xmm0,XMMWORD[rcx]
+	mov	r11,rcx
+	mov	eax,r10d
+	shl	r10d,4
+	mov	r9,rdx
+	and	rdx,-16
+
+	movups	xmm1,XMMWORD[16+r10*1+rcx]
+
+	movdqa	xmm8,XMMWORD[$L$xts_magic]
+	movdqa	xmm15,xmm2
+	pshufd	xmm9,xmm2,0x5f
+	pxor	xmm1,xmm0
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm10,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm10,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm11,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm11,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm12,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm12,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+	movdqa	xmm13,xmm15
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+	pxor	xmm13,xmm0
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm15
+	psrad	xmm9,31
+	paddq	xmm15,xmm15
+	pand	xmm9,xmm8
+	pxor	xmm14,xmm0
+	pxor	xmm15,xmm9
+	movaps	XMMWORD[96+rsp],xmm1
+
+	sub	rdx,16*6
+	jc	NEAR $L$xts_dec_short
+
+	mov	eax,16+96
+	lea	rcx,[32+r10*1+r11]
+	sub	rax,r10
+	movups	xmm1,XMMWORD[16+r11]
+	mov	r10,rax
+	lea	r8,[$L$xts_magic]
+	jmp	NEAR $L$xts_dec_grandloop
+
+ALIGN	32
+$L$xts_dec_grandloop:
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqa	xmm8,xmm0
+	movdqu	xmm3,XMMWORD[16+rdi]
+	pxor	xmm2,xmm10
+	movdqu	xmm4,XMMWORD[32+rdi]
+	pxor	xmm3,xmm11
+DB	102,15,56,222,209
+	movdqu	xmm5,XMMWORD[48+rdi]
+	pxor	xmm4,xmm12
+DB	102,15,56,222,217
+	movdqu	xmm6,XMMWORD[64+rdi]
+	pxor	xmm5,xmm13
+DB	102,15,56,222,225
+	movdqu	xmm7,XMMWORD[80+rdi]
+	pxor	xmm8,xmm15
+	movdqa	xmm9,XMMWORD[96+rsp]
+	pxor	xmm6,xmm14
+DB	102,15,56,222,233
+	movups	xmm0,XMMWORD[32+r11]
+	lea	rdi,[96+rdi]
+	pxor	xmm7,xmm8
+
+	pxor	xmm10,xmm9
+DB	102,15,56,222,241
+	pxor	xmm11,xmm9
+	movdqa	XMMWORD[rsp],xmm10
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[48+r11]
+	pxor	xmm12,xmm9
+
+DB	102,15,56,222,208
+	pxor	xmm13,xmm9
+	movdqa	XMMWORD[16+rsp],xmm11
+DB	102,15,56,222,216
+	pxor	xmm14,xmm9
+	movdqa	XMMWORD[32+rsp],xmm12
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+	pxor	xmm8,xmm9
+	movdqa	XMMWORD[64+rsp],xmm14
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+	movups	xmm0,XMMWORD[64+r11]
+	movdqa	XMMWORD[80+rsp],xmm8
+	pshufd	xmm9,xmm15,0x5f
+	jmp	NEAR $L$xts_dec_loop6
+ALIGN	32
+$L$xts_dec_loop6:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[((-64))+rax*1+rcx]
+	add	rax,32
+
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+	movups	xmm0,XMMWORD[((-80))+rax*1+rcx]
+	jnz	NEAR $L$xts_dec_loop6
+
+	movdqa	xmm8,XMMWORD[r8]
+	movdqa	xmm14,xmm9
+	paddd	xmm9,xmm9
+DB	102,15,56,222,209
+	paddq	xmm15,xmm15
+	psrad	xmm14,31
+DB	102,15,56,222,217
+	pand	xmm14,xmm8
+	movups	xmm10,XMMWORD[r11]
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+	pxor	xmm15,xmm14
+	movaps	xmm11,xmm10
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[((-64))+rcx]
+
+	movdqa	xmm14,xmm9
+DB	102,15,56,222,208
+	paddd	xmm9,xmm9
+	pxor	xmm10,xmm15
+DB	102,15,56,222,216
+	psrad	xmm14,31
+	paddq	xmm15,xmm15
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+	pand	xmm14,xmm8
+	movaps	xmm12,xmm11
+DB	102,15,56,222,240
+	pxor	xmm15,xmm14
+	movdqa	xmm14,xmm9
+DB	102,15,56,222,248
+	movups	xmm0,XMMWORD[((-48))+rcx]
+
+	paddd	xmm9,xmm9
+DB	102,15,56,222,209
+	pxor	xmm11,xmm15
+	psrad	xmm14,31
+DB	102,15,56,222,217
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+	movdqa	XMMWORD[48+rsp],xmm13
+	pxor	xmm15,xmm14
+DB	102,15,56,222,241
+	movaps	xmm13,xmm12
+	movdqa	xmm14,xmm9
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[((-32))+rcx]
+
+	paddd	xmm9,xmm9
+DB	102,15,56,222,208
+	pxor	xmm12,xmm15
+	psrad	xmm14,31
+DB	102,15,56,222,216
+	paddq	xmm15,xmm15
+	pand	xmm14,xmm8
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+	pxor	xmm15,xmm14
+	movaps	xmm14,xmm13
+DB	102,15,56,222,248
+
+	movdqa	xmm0,xmm9
+	paddd	xmm9,xmm9
+DB	102,15,56,222,209
+	pxor	xmm13,xmm15
+	psrad	xmm0,31
+DB	102,15,56,222,217
+	paddq	xmm15,xmm15
+	pand	xmm0,xmm8
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+	pxor	xmm15,xmm0
+	movups	xmm0,XMMWORD[r11]
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+	movups	xmm1,XMMWORD[16+r11]
+
+	pxor	xmm14,xmm15
+DB	102,15,56,223,84,36,0
+	psrad	xmm9,31
+	paddq	xmm15,xmm15
+DB	102,15,56,223,92,36,16
+DB	102,15,56,223,100,36,32
+	pand	xmm9,xmm8
+	mov	rax,r10
+DB	102,15,56,223,108,36,48
+DB	102,15,56,223,116,36,64
+DB	102,15,56,223,124,36,80
+	pxor	xmm15,xmm9
+
+	lea	rsi,[96+rsi]
+	movups	XMMWORD[(-96)+rsi],xmm2
+	movups	XMMWORD[(-80)+rsi],xmm3
+	movups	XMMWORD[(-64)+rsi],xmm4
+	movups	XMMWORD[(-48)+rsi],xmm5
+	movups	XMMWORD[(-32)+rsi],xmm6
+	movups	XMMWORD[(-16)+rsi],xmm7
+	sub	rdx,16*6
+	jnc	NEAR $L$xts_dec_grandloop
+
+	mov	eax,16+96
+	sub	eax,r10d
+	mov	rcx,r11
+	shr	eax,4
+
+$L$xts_dec_short:
+
+	mov	r10d,eax
+	pxor	xmm10,xmm0
+	pxor	xmm11,xmm0
+	add	rdx,16*6
+	jz	NEAR $L$xts_dec_done
+
+	pxor	xmm12,xmm0
+	cmp	rdx,0x20
+	jb	NEAR $L$xts_dec_one
+	pxor	xmm13,xmm0
+	je	NEAR $L$xts_dec_two
+
+	pxor	xmm14,xmm0
+	cmp	rdx,0x40
+	jb	NEAR $L$xts_dec_three
+	je	NEAR $L$xts_dec_four
+
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqu	xmm4,XMMWORD[32+rdi]
+	pxor	xmm2,xmm10
+	movdqu	xmm5,XMMWORD[48+rdi]
+	pxor	xmm3,xmm11
+	movdqu	xmm6,XMMWORD[64+rdi]
+	lea	rdi,[80+rdi]
+	pxor	xmm4,xmm12
+	pxor	xmm5,xmm13
+	pxor	xmm6,xmm14
+
+	call	_aesni_decrypt6
+
+	xorps	xmm2,xmm10
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+	movdqu	XMMWORD[rsi],xmm2
+	xorps	xmm5,xmm13
+	movdqu	XMMWORD[16+rsi],xmm3
+	xorps	xmm6,xmm14
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm14,xmm14
+	movdqu	XMMWORD[48+rsi],xmm5
+	pcmpgtd	xmm14,xmm15
+	movdqu	XMMWORD[64+rsi],xmm6
+	lea	rsi,[80+rsi]
+	pshufd	xmm11,xmm14,0x13
+	and	r9,15
+	jz	NEAR $L$xts_dec_ret
+
+	movdqa	xmm10,xmm15
+	paddq	xmm15,xmm15
+	pand	xmm11,xmm8
+	pxor	xmm11,xmm15
+	jmp	NEAR $L$xts_dec_done2
+
+ALIGN	16
+$L$xts_dec_one:
+	movups	xmm2,XMMWORD[rdi]
+	lea	rdi,[16+rdi]
+	xorps	xmm2,xmm10
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_12:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_12
+DB	102,15,56,223,209
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm11
+	movups	XMMWORD[rsi],xmm2
+	movdqa	xmm11,xmm12
+	lea	rsi,[16+rsi]
+	jmp	NEAR $L$xts_dec_done
+
+ALIGN	16
+$L$xts_dec_two:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	lea	rdi,[32+rdi]
+	xorps	xmm2,xmm10
+	xorps	xmm3,xmm11
+
+	call	_aesni_decrypt2
+
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm12
+	xorps	xmm3,xmm11
+	movdqa	xmm11,xmm13
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	lea	rsi,[32+rsi]
+	jmp	NEAR $L$xts_dec_done
+
+ALIGN	16
+$L$xts_dec_three:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	movups	xmm4,XMMWORD[32+rdi]
+	lea	rdi,[48+rdi]
+	xorps	xmm2,xmm10
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+
+	call	_aesni_decrypt3
+
+	xorps	xmm2,xmm10
+	movdqa	xmm10,xmm13
+	xorps	xmm3,xmm11
+	movdqa	xmm11,xmm14
+	xorps	xmm4,xmm12
+	movups	XMMWORD[rsi],xmm2
+	movups	XMMWORD[16+rsi],xmm3
+	movups	XMMWORD[32+rsi],xmm4
+	lea	rsi,[48+rsi]
+	jmp	NEAR $L$xts_dec_done
+
+ALIGN	16
+$L$xts_dec_four:
+	movups	xmm2,XMMWORD[rdi]
+	movups	xmm3,XMMWORD[16+rdi]
+	movups	xmm4,XMMWORD[32+rdi]
+	xorps	xmm2,xmm10
+	movups	xmm5,XMMWORD[48+rdi]
+	lea	rdi,[64+rdi]
+	xorps	xmm3,xmm11
+	xorps	xmm4,xmm12
+	xorps	xmm5,xmm13
+
+	call	_aesni_decrypt4
+
+	pxor	xmm2,xmm10
+	movdqa	xmm10,xmm14
+	pxor	xmm3,xmm11
+	movdqa	xmm11,xmm15
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[16+rsi],xmm3
+	movdqu	XMMWORD[32+rsi],xmm4
+	movdqu	XMMWORD[48+rsi],xmm5
+	lea	rsi,[64+rsi]
+	jmp	NEAR $L$xts_dec_done
+
+ALIGN	16
+$L$xts_dec_done:
+	and	r9,15
+	jz	NEAR $L$xts_dec_ret
+$L$xts_dec_done2:
+	mov	rdx,r9
+	mov	rcx,r11
+	mov	eax,r10d
+
+	movups	xmm2,XMMWORD[rdi]
+	xorps	xmm2,xmm11
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_13:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_13
+DB	102,15,56,223,209
+	xorps	xmm2,xmm11
+	movups	XMMWORD[rsi],xmm2
+
+$L$xts_dec_steal:
+	movzx	eax,BYTE[16+rdi]
+	movzx	ecx,BYTE[rsi]
+	lea	rdi,[1+rdi]
+	mov	BYTE[rsi],al
+	mov	BYTE[16+rsi],cl
+	lea	rsi,[1+rsi]
+	sub	rdx,1
+	jnz	NEAR $L$xts_dec_steal
+
+	sub	rsi,r9
+	mov	rcx,r11
+	mov	eax,r10d
+
+	movups	xmm2,XMMWORD[rsi]
+	xorps	xmm2,xmm10
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_14:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_14
+DB	102,15,56,223,209
+	xorps	xmm2,xmm10
+	movups	XMMWORD[rsi],xmm2
+
+$L$xts_dec_ret:
+	xorps	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	movaps	xmm6,XMMWORD[((-160))+rbp]
+	movaps	XMMWORD[(-160)+rbp],xmm0
+	movaps	xmm7,XMMWORD[((-144))+rbp]
+	movaps	XMMWORD[(-144)+rbp],xmm0
+	movaps	xmm8,XMMWORD[((-128))+rbp]
+	movaps	XMMWORD[(-128)+rbp],xmm0
+	movaps	xmm9,XMMWORD[((-112))+rbp]
+	movaps	XMMWORD[(-112)+rbp],xmm0
+	movaps	xmm10,XMMWORD[((-96))+rbp]
+	movaps	XMMWORD[(-96)+rbp],xmm0
+	movaps	xmm11,XMMWORD[((-80))+rbp]
+	movaps	XMMWORD[(-80)+rbp],xmm0
+	movaps	xmm12,XMMWORD[((-64))+rbp]
+	movaps	XMMWORD[(-64)+rbp],xmm0
+	movaps	xmm13,XMMWORD[((-48))+rbp]
+	movaps	XMMWORD[(-48)+rbp],xmm0
+	movaps	xmm14,XMMWORD[((-32))+rbp]
+	movaps	XMMWORD[(-32)+rbp],xmm0
+	movaps	xmm15,XMMWORD[((-16))+rbp]
+	movaps	XMMWORD[(-16)+rbp],xmm0
+	movaps	XMMWORD[rsp],xmm0
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	XMMWORD[48+rsp],xmm0
+	movaps	XMMWORD[64+rsp],xmm0
+	movaps	XMMWORD[80+rsp],xmm0
+	movaps	XMMWORD[96+rsp],xmm0
+	lea	rsp,[rbp]
+	pop	rbp
+$L$xts_dec_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_xts_decrypt:
+global	aesni_cbc_encrypt
+
+ALIGN	16
+aesni_cbc_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_aesni_cbc_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	test	rdx,rdx
+	jz	NEAR $L$cbc_ret
+
+	mov	r10d,DWORD[240+rcx]
+	mov	r11,rcx
+	test	r9d,r9d
+	jz	NEAR $L$cbc_decrypt
+
+	movups	xmm2,XMMWORD[r8]
+	mov	eax,r10d
+	cmp	rdx,16
+	jb	NEAR $L$cbc_enc_tail
+	sub	rdx,16
+	jmp	NEAR $L$cbc_enc_loop
+ALIGN	16
+$L$cbc_enc_loop:
+	movups	xmm3,XMMWORD[rdi]
+	lea	rdi,[16+rdi]
+
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	xorps	xmm3,xmm0
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm3
+$L$oop_enc1_15:
+DB	102,15,56,220,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_enc1_15
+DB	102,15,56,221,209
+	mov	eax,r10d
+	mov	rcx,r11
+	movups	XMMWORD[rsi],xmm2
+	lea	rsi,[16+rsi]
+	sub	rdx,16
+	jnc	NEAR $L$cbc_enc_loop
+	add	rdx,16
+	jnz	NEAR $L$cbc_enc_tail
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movups	XMMWORD[r8],xmm2
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	jmp	NEAR $L$cbc_ret
+
+$L$cbc_enc_tail:
+	mov	rcx,rdx
+	xchg	rsi,rdi
+	DD	0x9066A4F3
+	mov	ecx,16
+	sub	rcx,rdx
+	xor	eax,eax
+	DD	0x9066AAF3
+	lea	rdi,[((-16))+rdi]
+	mov	eax,r10d
+	mov	rsi,rdi
+	mov	rcx,r11
+	xor	rdx,rdx
+	jmp	NEAR $L$cbc_enc_loop
+
+ALIGN	16
+$L$cbc_decrypt:
+	cmp	rdx,16
+	jne	NEAR $L$cbc_decrypt_bulk
+
+
+
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[r8]
+	movdqa	xmm4,xmm2
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_16:
+DB	102,15,56,222,209
+	dec	r10d
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_16
+DB	102,15,56,223,209
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movdqu	XMMWORD[r8],xmm4
+	xorps	xmm2,xmm3
+	pxor	xmm3,xmm3
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	jmp	NEAR $L$cbc_ret
+ALIGN	16
+$L$cbc_decrypt_bulk:
+	lea	rax,[rsp]
+	push	rbp
+	sub	rsp,176
+	and	rsp,-16
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$cbc_decrypt_body:
+	lea	rbp,[((-8))+rax]
+	movups	xmm10,XMMWORD[r8]
+	mov	eax,r10d
+	cmp	rdx,0x50
+	jbe	NEAR $L$cbc_dec_tail
+
+	movups	xmm0,XMMWORD[rcx]
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqa	xmm11,xmm2
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movdqa	xmm12,xmm3
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movdqa	xmm13,xmm4
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movdqa	xmm14,xmm5
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movdqa	xmm15,xmm6
+	mov	r9d,DWORD[((OPENSSL_ia32cap_P+4))]
+	cmp	rdx,0x70
+	jbe	NEAR $L$cbc_dec_six_or_seven
+
+	and	r9d,71303168
+	sub	rdx,0x50
+	cmp	r9d,4194304
+	je	NEAR $L$cbc_dec_loop6_enter
+	sub	rdx,0x20
+	lea	rcx,[112+rcx]
+	jmp	NEAR $L$cbc_dec_loop8_enter
+ALIGN	16
+$L$cbc_dec_loop8:
+	movups	XMMWORD[rsi],xmm9
+	lea	rsi,[16+rsi]
+$L$cbc_dec_loop8_enter:
+	movdqu	xmm8,XMMWORD[96+rdi]
+	pxor	xmm2,xmm0
+	movdqu	xmm9,XMMWORD[112+rdi]
+	pxor	xmm3,xmm0
+	movups	xmm1,XMMWORD[((16-112))+rcx]
+	pxor	xmm4,xmm0
+	xor	r11,r11
+	cmp	rdx,0x70
+	pxor	xmm5,xmm0
+	pxor	xmm6,xmm0
+	pxor	xmm7,xmm0
+	pxor	xmm8,xmm0
+
+DB	102,15,56,222,209
+	pxor	xmm9,xmm0
+	movups	xmm0,XMMWORD[((32-112))+rcx]
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+	setnc	r11b
+	shl	r11,7
+DB	102,68,15,56,222,201
+	add	r11,rdi
+	movups	xmm1,XMMWORD[((48-112))+rcx]
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((64-112))+rcx]
+	nop
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movups	xmm1,XMMWORD[((80-112))+rcx]
+	nop
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((96-112))+rcx]
+	nop
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movups	xmm1,XMMWORD[((112-112))+rcx]
+	nop
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((128-112))+rcx]
+	nop
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movups	xmm1,XMMWORD[((144-112))+rcx]
+	cmp	eax,11
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((160-112))+rcx]
+	jb	NEAR $L$cbc_dec_done
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movups	xmm1,XMMWORD[((176-112))+rcx]
+	nop
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((192-112))+rcx]
+	je	NEAR $L$cbc_dec_done
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movups	xmm1,XMMWORD[((208-112))+rcx]
+	nop
+DB	102,15,56,222,208
+DB	102,15,56,222,216
+DB	102,15,56,222,224
+DB	102,15,56,222,232
+DB	102,15,56,222,240
+DB	102,15,56,222,248
+DB	102,68,15,56,222,192
+DB	102,68,15,56,222,200
+	movups	xmm0,XMMWORD[((224-112))+rcx]
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_done:
+DB	102,15,56,222,209
+DB	102,15,56,222,217
+	pxor	xmm10,xmm0
+	pxor	xmm11,xmm0
+DB	102,15,56,222,225
+DB	102,15,56,222,233
+	pxor	xmm12,xmm0
+	pxor	xmm13,xmm0
+DB	102,15,56,222,241
+DB	102,15,56,222,249
+	pxor	xmm14,xmm0
+	pxor	xmm15,xmm0
+DB	102,68,15,56,222,193
+DB	102,68,15,56,222,201
+	movdqu	xmm1,XMMWORD[80+rdi]
+
+DB	102,65,15,56,223,210
+	movdqu	xmm10,XMMWORD[96+rdi]
+	pxor	xmm1,xmm0
+DB	102,65,15,56,223,219
+	pxor	xmm10,xmm0
+	movdqu	xmm0,XMMWORD[112+rdi]
+DB	102,65,15,56,223,228
+	lea	rdi,[128+rdi]
+	movdqu	xmm11,XMMWORD[r11]
+DB	102,65,15,56,223,237
+DB	102,65,15,56,223,246
+	movdqu	xmm12,XMMWORD[16+r11]
+	movdqu	xmm13,XMMWORD[32+r11]
+DB	102,65,15,56,223,255
+DB	102,68,15,56,223,193
+	movdqu	xmm14,XMMWORD[48+r11]
+	movdqu	xmm15,XMMWORD[64+r11]
+DB	102,69,15,56,223,202
+	movdqa	xmm10,xmm0
+	movdqu	xmm1,XMMWORD[80+r11]
+	movups	xmm0,XMMWORD[((-112))+rcx]
+
+	movups	XMMWORD[rsi],xmm2
+	movdqa	xmm2,xmm11
+	movups	XMMWORD[16+rsi],xmm3
+	movdqa	xmm3,xmm12
+	movups	XMMWORD[32+rsi],xmm4
+	movdqa	xmm4,xmm13
+	movups	XMMWORD[48+rsi],xmm5
+	movdqa	xmm5,xmm14
+	movups	XMMWORD[64+rsi],xmm6
+	movdqa	xmm6,xmm15
+	movups	XMMWORD[80+rsi],xmm7
+	movdqa	xmm7,xmm1
+	movups	XMMWORD[96+rsi],xmm8
+	lea	rsi,[112+rsi]
+
+	sub	rdx,0x80
+	ja	NEAR $L$cbc_dec_loop8
+
+	movaps	xmm2,xmm9
+	lea	rcx,[((-112))+rcx]
+	add	rdx,0x70
+	jle	NEAR $L$cbc_dec_clear_tail_collected
+	movups	XMMWORD[rsi],xmm9
+	lea	rsi,[16+rsi]
+	cmp	rdx,0x50
+	jbe	NEAR $L$cbc_dec_tail
+
+	movaps	xmm2,xmm11
+$L$cbc_dec_six_or_seven:
+	cmp	rdx,0x60
+	ja	NEAR $L$cbc_dec_seven
+
+	movaps	xmm8,xmm7
+	call	_aesni_decrypt6
+	pxor	xmm2,xmm10
+	movaps	xmm10,xmm8
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	pxor	xmm6,xmm14
+	movdqu	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	pxor	xmm7,xmm15
+	movdqu	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	lea	rsi,[80+rsi]
+	movdqa	xmm2,xmm7
+	pxor	xmm7,xmm7
+	jmp	NEAR $L$cbc_dec_tail_collected
+
+ALIGN	16
+$L$cbc_dec_seven:
+	movups	xmm8,XMMWORD[96+rdi]
+	xorps	xmm9,xmm9
+	call	_aesni_decrypt8
+	movups	xmm9,XMMWORD[80+rdi]
+	pxor	xmm2,xmm10
+	movups	xmm10,XMMWORD[96+rdi]
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	pxor	xmm6,xmm14
+	movdqu	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	pxor	xmm7,xmm15
+	movdqu	XMMWORD[64+rsi],xmm6
+	pxor	xmm6,xmm6
+	pxor	xmm8,xmm9
+	movdqu	XMMWORD[80+rsi],xmm7
+	pxor	xmm7,xmm7
+	lea	rsi,[96+rsi]
+	movdqa	xmm2,xmm8
+	pxor	xmm8,xmm8
+	pxor	xmm9,xmm9
+	jmp	NEAR $L$cbc_dec_tail_collected
+
+ALIGN	16
+$L$cbc_dec_loop6:
+	movups	XMMWORD[rsi],xmm7
+	lea	rsi,[16+rsi]
+	movdqu	xmm2,XMMWORD[rdi]
+	movdqu	xmm3,XMMWORD[16+rdi]
+	movdqa	xmm11,xmm2
+	movdqu	xmm4,XMMWORD[32+rdi]
+	movdqa	xmm12,xmm3
+	movdqu	xmm5,XMMWORD[48+rdi]
+	movdqa	xmm13,xmm4
+	movdqu	xmm6,XMMWORD[64+rdi]
+	movdqa	xmm14,xmm5
+	movdqu	xmm7,XMMWORD[80+rdi]
+	movdqa	xmm15,xmm6
+$L$cbc_dec_loop6_enter:
+	lea	rdi,[96+rdi]
+	movdqa	xmm8,xmm7
+
+	call	_aesni_decrypt6
+
+	pxor	xmm2,xmm10
+	movdqa	xmm10,xmm8
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm6,xmm14
+	mov	rcx,r11
+	movdqu	XMMWORD[48+rsi],xmm5
+	pxor	xmm7,xmm15
+	mov	eax,r10d
+	movdqu	XMMWORD[64+rsi],xmm6
+	lea	rsi,[80+rsi]
+	sub	rdx,0x60
+	ja	NEAR $L$cbc_dec_loop6
+
+	movdqa	xmm2,xmm7
+	add	rdx,0x50
+	jle	NEAR $L$cbc_dec_clear_tail_collected
+	movups	XMMWORD[rsi],xmm7
+	lea	rsi,[16+rsi]
+
+$L$cbc_dec_tail:
+	movups	xmm2,XMMWORD[rdi]
+	sub	rdx,0x10
+	jbe	NEAR $L$cbc_dec_one
+
+	movups	xmm3,XMMWORD[16+rdi]
+	movaps	xmm11,xmm2
+	sub	rdx,0x10
+	jbe	NEAR $L$cbc_dec_two
+
+	movups	xmm4,XMMWORD[32+rdi]
+	movaps	xmm12,xmm3
+	sub	rdx,0x10
+	jbe	NEAR $L$cbc_dec_three
+
+	movups	xmm5,XMMWORD[48+rdi]
+	movaps	xmm13,xmm4
+	sub	rdx,0x10
+	jbe	NEAR $L$cbc_dec_four
+
+	movups	xmm6,XMMWORD[64+rdi]
+	movaps	xmm14,xmm5
+	movaps	xmm15,xmm6
+	xorps	xmm7,xmm7
+	call	_aesni_decrypt6
+	pxor	xmm2,xmm10
+	movaps	xmm10,xmm15
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	pxor	xmm6,xmm14
+	movdqu	XMMWORD[48+rsi],xmm5
+	pxor	xmm5,xmm5
+	lea	rsi,[64+rsi]
+	movdqa	xmm2,xmm6
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	sub	rdx,0x10
+	jmp	NEAR $L$cbc_dec_tail_collected
+
+ALIGN	16
+$L$cbc_dec_one:
+	movaps	xmm11,xmm2
+	movups	xmm0,XMMWORD[rcx]
+	movups	xmm1,XMMWORD[16+rcx]
+	lea	rcx,[32+rcx]
+	xorps	xmm2,xmm0
+$L$oop_dec1_17:
+DB	102,15,56,222,209
+	dec	eax
+	movups	xmm1,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	jnz	NEAR $L$oop_dec1_17
+DB	102,15,56,223,209
+	xorps	xmm2,xmm10
+	movaps	xmm10,xmm11
+	jmp	NEAR $L$cbc_dec_tail_collected
+ALIGN	16
+$L$cbc_dec_two:
+	movaps	xmm12,xmm3
+	call	_aesni_decrypt2
+	pxor	xmm2,xmm10
+	movaps	xmm10,xmm12
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	movdqa	xmm2,xmm3
+	pxor	xmm3,xmm3
+	lea	rsi,[16+rsi]
+	jmp	NEAR $L$cbc_dec_tail_collected
+ALIGN	16
+$L$cbc_dec_three:
+	movaps	xmm13,xmm4
+	call	_aesni_decrypt3
+	pxor	xmm2,xmm10
+	movaps	xmm10,xmm13
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	movdqa	xmm2,xmm4
+	pxor	xmm4,xmm4
+	lea	rsi,[32+rsi]
+	jmp	NEAR $L$cbc_dec_tail_collected
+ALIGN	16
+$L$cbc_dec_four:
+	movaps	xmm14,xmm5
+	call	_aesni_decrypt4
+	pxor	xmm2,xmm10
+	movaps	xmm10,xmm14
+	pxor	xmm3,xmm11
+	movdqu	XMMWORD[rsi],xmm2
+	pxor	xmm4,xmm12
+	movdqu	XMMWORD[16+rsi],xmm3
+	pxor	xmm3,xmm3
+	pxor	xmm5,xmm13
+	movdqu	XMMWORD[32+rsi],xmm4
+	pxor	xmm4,xmm4
+	movdqa	xmm2,xmm5
+	pxor	xmm5,xmm5
+	lea	rsi,[48+rsi]
+	jmp	NEAR $L$cbc_dec_tail_collected
+
+ALIGN	16
+$L$cbc_dec_clear_tail_collected:
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+$L$cbc_dec_tail_collected:
+	movups	XMMWORD[r8],xmm10
+	and	rdx,15
+	jnz	NEAR $L$cbc_dec_tail_partial
+	movups	XMMWORD[rsi],xmm2
+	pxor	xmm2,xmm2
+	jmp	NEAR $L$cbc_dec_ret
+ALIGN	16
+$L$cbc_dec_tail_partial:
+	movaps	XMMWORD[rsp],xmm2
+	pxor	xmm2,xmm2
+	mov	rcx,16
+	mov	rdi,rsi
+	sub	rcx,rdx
+	lea	rsi,[rsp]
+	DD	0x9066A4F3
+	movdqa	XMMWORD[rsp],xmm2
+
+$L$cbc_dec_ret:
+	xorps	xmm0,xmm0
+	pxor	xmm1,xmm1
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	XMMWORD[16+rsp],xmm0
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	XMMWORD[32+rsp],xmm0
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	XMMWORD[48+rsp],xmm0
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	XMMWORD[64+rsp],xmm0
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	XMMWORD[80+rsp],xmm0
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	XMMWORD[96+rsp],xmm0
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	XMMWORD[112+rsp],xmm0
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	XMMWORD[128+rsp],xmm0
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	XMMWORD[144+rsp],xmm0
+	movaps	xmm15,XMMWORD[160+rsp]
+	movaps	XMMWORD[160+rsp],xmm0
+	lea	rsp,[rbp]
+	pop	rbp
+$L$cbc_ret:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_aesni_cbc_encrypt:
+global	aesni_set_decrypt_key
+
+ALIGN	16
+aesni_set_decrypt_key:
+DB	0x48,0x83,0xEC,0x08
+	call	__aesni_set_encrypt_key
+	shl	edx,4
+	test	eax,eax
+	jnz	NEAR $L$dec_key_ret
+	lea	rcx,[16+rdx*1+r8]
+
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[rcx]
+	movups	XMMWORD[rcx],xmm0
+	movups	XMMWORD[r8],xmm1
+	lea	r8,[16+r8]
+	lea	rcx,[((-16))+rcx]
+
+$L$dec_key_inverse:
+	movups	xmm0,XMMWORD[r8]
+	movups	xmm1,XMMWORD[rcx]
+DB	102,15,56,219,192
+DB	102,15,56,219,201
+	lea	r8,[16+r8]
+	lea	rcx,[((-16))+rcx]
+	movups	XMMWORD[16+rcx],xmm0
+	movups	XMMWORD[(-16)+r8],xmm1
+	cmp	rcx,r8
+	ja	NEAR $L$dec_key_inverse
+
+	movups	xmm0,XMMWORD[r8]
+DB	102,15,56,219,192
+	pxor	xmm1,xmm1
+	movups	XMMWORD[rcx],xmm0
+	pxor	xmm0,xmm0
+$L$dec_key_ret:
+	add	rsp,8
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_set_decrypt_key:
+
+global	aesni_set_encrypt_key
+
+ALIGN	16
+aesni_set_encrypt_key:
+__aesni_set_encrypt_key:
+DB	0x48,0x83,0xEC,0x08
+	mov	rax,-1
+	test	rcx,rcx
+	jz	NEAR $L$enc_key_ret
+	test	r8,r8
+	jz	NEAR $L$enc_key_ret
+
+	mov	r10d,268437504
+	movups	xmm0,XMMWORD[rcx]
+	xorps	xmm4,xmm4
+	and	r10d,DWORD[((OPENSSL_ia32cap_P+4))]
+	lea	rax,[16+r8]
+	cmp	edx,256
+	je	NEAR $L$14rounds
+	cmp	edx,192
+	je	NEAR $L$12rounds
+	cmp	edx,128
+	jne	NEAR $L$bad_keybits
+
+$L$10rounds:
+	mov	edx,9
+	cmp	r10d,268435456
+	je	NEAR $L$10rounds_alt
+
+	movups	XMMWORD[r8],xmm0
+DB	102,15,58,223,200,1
+	call	$L$key_expansion_128_cold
+DB	102,15,58,223,200,2
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,4
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,8
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,16
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,32
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,64
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,128
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,27
+	call	$L$key_expansion_128
+DB	102,15,58,223,200,54
+	call	$L$key_expansion_128
+	movups	XMMWORD[rax],xmm0
+	mov	DWORD[80+rax],edx
+	xor	eax,eax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$10rounds_alt:
+	movdqa	xmm5,XMMWORD[$L$key_rotate]
+	mov	r10d,8
+	movdqa	xmm4,XMMWORD[$L$key_rcon1]
+	movdqa	xmm2,xmm0
+	movdqu	XMMWORD[r8],xmm0
+	jmp	NEAR $L$oop_key128
+
+ALIGN	16
+$L$oop_key128:
+DB	102,15,56,0,197
+DB	102,15,56,221,196
+	pslld	xmm4,1
+	lea	rax,[16+rax]
+
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+
+	pxor	xmm0,xmm2
+	movdqu	XMMWORD[(-16)+rax],xmm0
+	movdqa	xmm2,xmm0
+
+	dec	r10d
+	jnz	NEAR $L$oop_key128
+
+	movdqa	xmm4,XMMWORD[$L$key_rcon1b]
+
+DB	102,15,56,0,197
+DB	102,15,56,221,196
+	pslld	xmm4,1
+
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+
+	pxor	xmm0,xmm2
+	movdqu	XMMWORD[rax],xmm0
+
+	movdqa	xmm2,xmm0
+DB	102,15,56,0,197
+DB	102,15,56,221,196
+
+	movdqa	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm3,xmm2
+	pslldq	xmm2,4
+	pxor	xmm2,xmm3
+
+	pxor	xmm0,xmm2
+	movdqu	XMMWORD[16+rax],xmm0
+
+	mov	DWORD[96+rax],edx
+	xor	eax,eax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$12rounds:
+	movq	xmm2,QWORD[16+rcx]
+	mov	edx,11
+	cmp	r10d,268435456
+	je	NEAR $L$12rounds_alt
+
+	movups	XMMWORD[r8],xmm0
+DB	102,15,58,223,202,1
+	call	$L$key_expansion_192a_cold
+DB	102,15,58,223,202,2
+	call	$L$key_expansion_192b
+DB	102,15,58,223,202,4
+	call	$L$key_expansion_192a
+DB	102,15,58,223,202,8
+	call	$L$key_expansion_192b
+DB	102,15,58,223,202,16
+	call	$L$key_expansion_192a
+DB	102,15,58,223,202,32
+	call	$L$key_expansion_192b
+DB	102,15,58,223,202,64
+	call	$L$key_expansion_192a
+DB	102,15,58,223,202,128
+	call	$L$key_expansion_192b
+	movups	XMMWORD[rax],xmm0
+	mov	DWORD[48+rax],edx
+	xor	rax,rax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$12rounds_alt:
+	movdqa	xmm5,XMMWORD[$L$key_rotate192]
+	movdqa	xmm4,XMMWORD[$L$key_rcon1]
+	mov	r10d,8
+	movdqu	XMMWORD[r8],xmm0
+	jmp	NEAR $L$oop_key192
+
+ALIGN	16
+$L$oop_key192:
+	movq	QWORD[rax],xmm2
+	movdqa	xmm1,xmm2
+DB	102,15,56,0,213
+DB	102,15,56,221,212
+	pslld	xmm4,1
+	lea	rax,[24+rax]
+
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm0,xmm3
+
+	pshufd	xmm3,xmm0,0xff
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+
+	pxor	xmm0,xmm2
+	pxor	xmm2,xmm3
+	movdqu	XMMWORD[(-16)+rax],xmm0
+
+	dec	r10d
+	jnz	NEAR $L$oop_key192
+
+	mov	DWORD[32+rax],edx
+	xor	eax,eax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$14rounds:
+	movups	xmm2,XMMWORD[16+rcx]
+	mov	edx,13
+	lea	rax,[16+rax]
+	cmp	r10d,268435456
+	je	NEAR $L$14rounds_alt
+
+	movups	XMMWORD[r8],xmm0
+	movups	XMMWORD[16+r8],xmm2
+DB	102,15,58,223,202,1
+	call	$L$key_expansion_256a_cold
+DB	102,15,58,223,200,1
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,2
+	call	$L$key_expansion_256a
+DB	102,15,58,223,200,2
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,4
+	call	$L$key_expansion_256a
+DB	102,15,58,223,200,4
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,8
+	call	$L$key_expansion_256a
+DB	102,15,58,223,200,8
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,16
+	call	$L$key_expansion_256a
+DB	102,15,58,223,200,16
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,32
+	call	$L$key_expansion_256a
+DB	102,15,58,223,200,32
+	call	$L$key_expansion_256b
+DB	102,15,58,223,202,64
+	call	$L$key_expansion_256a
+	movups	XMMWORD[rax],xmm0
+	mov	DWORD[16+rax],edx
+	xor	rax,rax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$14rounds_alt:
+	movdqa	xmm5,XMMWORD[$L$key_rotate]
+	movdqa	xmm4,XMMWORD[$L$key_rcon1]
+	mov	r10d,7
+	movdqu	XMMWORD[r8],xmm0
+	movdqa	xmm1,xmm2
+	movdqu	XMMWORD[16+r8],xmm2
+	jmp	NEAR $L$oop_key256
+
+ALIGN	16
+$L$oop_key256:
+DB	102,15,56,0,213
+DB	102,15,56,221,212
+
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm3,xmm0
+	pslldq	xmm0,4
+	pxor	xmm0,xmm3
+	pslld	xmm4,1
+
+	pxor	xmm0,xmm2
+	movdqu	XMMWORD[rax],xmm0
+
+	dec	r10d
+	jz	NEAR $L$done_key256
+
+	pshufd	xmm2,xmm0,0xff
+	pxor	xmm3,xmm3
+DB	102,15,56,221,211
+
+	movdqa	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm3,xmm1
+	pslldq	xmm1,4
+	pxor	xmm1,xmm3
+
+	pxor	xmm2,xmm1
+	movdqu	XMMWORD[16+rax],xmm2
+	lea	rax,[32+rax]
+	movdqa	xmm1,xmm2
+
+	jmp	NEAR $L$oop_key256
+
+$L$done_key256:
+	mov	DWORD[16+rax],edx
+	xor	eax,eax
+	jmp	NEAR $L$enc_key_ret
+
+ALIGN	16
+$L$bad_keybits:
+	mov	rax,-2
+$L$enc_key_ret:
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	add	rsp,8
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_set_encrypt_key:
+
+ALIGN	16
+$L$key_expansion_128:
+	movups	XMMWORD[rax],xmm0
+	lea	rax,[16+rax]
+$L$key_expansion_128_cold:
+	shufps	xmm4,xmm0,16
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	xorps	xmm0,xmm4
+	shufps	xmm1,xmm1,255
+	xorps	xmm0,xmm1
+	DB	0F3h,0C3h		;repret
+
+ALIGN	16
+$L$key_expansion_192a:
+	movups	XMMWORD[rax],xmm0
+	lea	rax,[16+rax]
+$L$key_expansion_192a_cold:
+	movaps	xmm5,xmm2
+$L$key_expansion_192b_warm:
+	shufps	xmm4,xmm0,16
+	movdqa	xmm3,xmm2
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	pslldq	xmm3,4
+	xorps	xmm0,xmm4
+	pshufd	xmm1,xmm1,85
+	pxor	xmm2,xmm3
+	pxor	xmm0,xmm1
+	pshufd	xmm3,xmm0,255
+	pxor	xmm2,xmm3
+	DB	0F3h,0C3h		;repret
+
+ALIGN	16
+$L$key_expansion_192b:
+	movaps	xmm3,xmm0
+	shufps	xmm5,xmm0,68
+	movups	XMMWORD[rax],xmm5
+	shufps	xmm3,xmm2,78
+	movups	XMMWORD[16+rax],xmm3
+	lea	rax,[32+rax]
+	jmp	NEAR $L$key_expansion_192b_warm
+
+ALIGN	16
+$L$key_expansion_256a:
+	movups	XMMWORD[rax],xmm2
+	lea	rax,[16+rax]
+$L$key_expansion_256a_cold:
+	shufps	xmm4,xmm0,16
+	xorps	xmm0,xmm4
+	shufps	xmm4,xmm0,140
+	xorps	xmm0,xmm4
+	shufps	xmm1,xmm1,255
+	xorps	xmm0,xmm1
+	DB	0F3h,0C3h		;repret
+
+ALIGN	16
+$L$key_expansion_256b:
+	movups	XMMWORD[rax],xmm0
+	lea	rax,[16+rax]
+
+	shufps	xmm4,xmm2,16
+	xorps	xmm2,xmm4
+	shufps	xmm4,xmm2,140
+	xorps	xmm2,xmm4
+	shufps	xmm1,xmm1,170
+	xorps	xmm2,xmm1
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	64
+$L$bswap_mask:
+DB	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+$L$increment32:
+	DD	6,6,6,0
+$L$increment64:
+	DD	1,0,0,0
+$L$xts_magic:
+	DD	0x87,0,1,0
+$L$increment1:
+DB	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
+$L$key_rotate:
+	DD	0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d
+$L$key_rotate192:
+	DD	0x04070605,0x04070605,0x04070605,0x04070605
+$L$key_rcon1:
+	DD	1,1,1,1
+$L$key_rcon1b:
+	DD	0x1b,0x1b,0x1b,0x1b
+
+DB	65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69
+DB	83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83
+DB	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+DB	115,108,46,111,114,103,62,0
+ALIGN	64
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+ecb_ccm64_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	lea	rsi,[rax]
+	lea	rdi,[512+r8]
+	mov	ecx,8
+	DD	0xa548f3fc
+	lea	rax,[88+rax]
+
+	jmp	NEAR $L$common_seh_tail
+
+
+
+ALIGN	16
+ctr_xts_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[160+r8]
+	lea	rsi,[((-160))+rax]
+	lea	rdi,[512+r8]
+	mov	ecx,20
+	DD	0xa548f3fc
+
+	jmp	NEAR $L$common_rbp_tail
+
+
+ALIGN	16
+cbc_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[152+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$cbc_decrypt_bulk]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	lea	r10,[$L$cbc_decrypt_body]
+	cmp	rbx,r10
+	jb	NEAR $L$restore_cbc_rax
+
+	lea	r10,[$L$cbc_ret]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	lea	rsi,[16+rax]
+	lea	rdi,[512+r8]
+	mov	ecx,20
+	DD	0xa548f3fc
+
+$L$common_rbp_tail:
+	mov	rax,QWORD[160+r8]
+	mov	rbp,QWORD[rax]
+	lea	rax,[8+rax]
+	mov	QWORD[160+r8],rbp
+	jmp	NEAR $L$common_seh_tail
+
+$L$restore_cbc_rax:
+	mov	rax,QWORD[120+r8]
+
+$L$common_seh_tail:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_aesni_ecb_encrypt wrt ..imagebase
+	DD	$L$SEH_end_aesni_ecb_encrypt wrt ..imagebase
+	DD	$L$SEH_info_ecb wrt ..imagebase
+
+	DD	$L$SEH_begin_aesni_ccm64_encrypt_blocks wrt ..imagebase
+	DD	$L$SEH_end_aesni_ccm64_encrypt_blocks wrt ..imagebase
+	DD	$L$SEH_info_ccm64_enc wrt ..imagebase
+
+	DD	$L$SEH_begin_aesni_ccm64_decrypt_blocks wrt ..imagebase
+	DD	$L$SEH_end_aesni_ccm64_decrypt_blocks wrt ..imagebase
+	DD	$L$SEH_info_ccm64_dec wrt ..imagebase
+
+	DD	$L$SEH_begin_aesni_ctr32_encrypt_blocks wrt ..imagebase
+	DD	$L$SEH_end_aesni_ctr32_encrypt_blocks wrt ..imagebase
+	DD	$L$SEH_info_ctr32 wrt ..imagebase
+
+	DD	$L$SEH_begin_aesni_xts_encrypt wrt ..imagebase
+	DD	$L$SEH_end_aesni_xts_encrypt wrt ..imagebase
+	DD	$L$SEH_info_xts_enc wrt ..imagebase
+
+	DD	$L$SEH_begin_aesni_xts_decrypt wrt ..imagebase
+	DD	$L$SEH_end_aesni_xts_decrypt wrt ..imagebase
+	DD	$L$SEH_info_xts_dec wrt ..imagebase
+	DD	$L$SEH_begin_aesni_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_end_aesni_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_info_cbc wrt ..imagebase
+
+	DD	aesni_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_end_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_info_key wrt ..imagebase
+
+	DD	aesni_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_end_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_info_key wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_ecb:
+DB	9,0,0,0
+	DD	ecb_ccm64_se_handler wrt ..imagebase
+	DD	$L$ecb_enc_body wrt ..imagebase,$L$ecb_enc_ret wrt ..imagebase
+$L$SEH_info_ccm64_enc:
+DB	9,0,0,0
+	DD	ecb_ccm64_se_handler wrt ..imagebase
+	DD	$L$ccm64_enc_body wrt ..imagebase,$L$ccm64_enc_ret wrt ..imagebase
+$L$SEH_info_ccm64_dec:
+DB	9,0,0,0
+	DD	ecb_ccm64_se_handler wrt ..imagebase
+	DD	$L$ccm64_dec_body wrt ..imagebase,$L$ccm64_dec_ret wrt ..imagebase
+$L$SEH_info_ctr32:
+DB	9,0,0,0
+	DD	ctr_xts_se_handler wrt ..imagebase
+	DD	$L$ctr32_body wrt ..imagebase,$L$ctr32_epilogue wrt ..imagebase
+$L$SEH_info_xts_enc:
+DB	9,0,0,0
+	DD	ctr_xts_se_handler wrt ..imagebase
+	DD	$L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase
+$L$SEH_info_xts_dec:
+DB	9,0,0,0
+	DD	ctr_xts_se_handler wrt ..imagebase
+	DD	$L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase
+$L$SEH_info_cbc:
+DB	9,0,0,0
+	DD	cbc_se_handler wrt ..imagebase
+$L$SEH_info_key:
+DB	0x01,0x04,0x01,0x00
+DB	0x04,0x02,0x00,0x00
diff --git a/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm
new file mode 100644
index 0000000..6d75248
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/aes/bsaes-x86_64.asm
@@ -0,0 +1,2733 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	asm_AES_encrypt
+EXTERN	asm_AES_decrypt
+
+
+ALIGN	64
+_bsaes_encrypt8:
+	lea	r11,[$L$BS0]
+
+	movdqa	xmm8,XMMWORD[rax]
+	lea	rax,[16+rax]
+	movdqa	xmm7,XMMWORD[80+r11]
+	pxor	xmm15,xmm8
+	pxor	xmm0,xmm8
+	pxor	xmm1,xmm8
+	pxor	xmm2,xmm8
+DB	102,68,15,56,0,255
+DB	102,15,56,0,199
+	pxor	xmm3,xmm8
+	pxor	xmm4,xmm8
+DB	102,15,56,0,207
+DB	102,15,56,0,215
+	pxor	xmm5,xmm8
+	pxor	xmm6,xmm8
+DB	102,15,56,0,223
+DB	102,15,56,0,231
+DB	102,15,56,0,239
+DB	102,15,56,0,247
+_bsaes_encrypt8_bitslice:
+	movdqa	xmm7,XMMWORD[r11]
+	movdqa	xmm8,XMMWORD[16+r11]
+	movdqa	xmm9,xmm5
+	psrlq	xmm5,1
+	movdqa	xmm10,xmm3
+	psrlq	xmm3,1
+	pxor	xmm5,xmm6
+	pxor	xmm3,xmm4
+	pand	xmm5,xmm7
+	pand	xmm3,xmm7
+	pxor	xmm6,xmm5
+	psllq	xmm5,1
+	pxor	xmm4,xmm3
+	psllq	xmm3,1
+	pxor	xmm5,xmm9
+	pxor	xmm3,xmm10
+	movdqa	xmm9,xmm1
+	psrlq	xmm1,1
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,1
+	pxor	xmm1,xmm2
+	pxor	xmm15,xmm0
+	pand	xmm1,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm2,xmm1
+	psllq	xmm1,1
+	pxor	xmm0,xmm15
+	psllq	xmm15,1
+	pxor	xmm1,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[32+r11]
+	movdqa	xmm9,xmm4
+	psrlq	xmm4,2
+	movdqa	xmm10,xmm3
+	psrlq	xmm3,2
+	pxor	xmm4,xmm6
+	pxor	xmm3,xmm5
+	pand	xmm4,xmm8
+	pand	xmm3,xmm8
+	pxor	xmm6,xmm4
+	psllq	xmm4,2
+	pxor	xmm5,xmm3
+	psllq	xmm3,2
+	pxor	xmm4,xmm9
+	pxor	xmm3,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,2
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,2
+	pxor	xmm0,xmm2
+	pxor	xmm15,xmm1
+	pand	xmm0,xmm8
+	pand	xmm15,xmm8
+	pxor	xmm2,xmm0
+	psllq	xmm0,2
+	pxor	xmm1,xmm15
+	psllq	xmm15,2
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm9,xmm2
+	psrlq	xmm2,4
+	movdqa	xmm10,xmm1
+	psrlq	xmm1,4
+	pxor	xmm2,xmm6
+	pxor	xmm1,xmm5
+	pand	xmm2,xmm7
+	pand	xmm1,xmm7
+	pxor	xmm6,xmm2
+	psllq	xmm2,4
+	pxor	xmm5,xmm1
+	psllq	xmm1,4
+	pxor	xmm2,xmm9
+	pxor	xmm1,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,4
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,4
+	pxor	xmm0,xmm4
+	pxor	xmm15,xmm3
+	pand	xmm0,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm4,xmm0
+	psllq	xmm0,4
+	pxor	xmm3,xmm15
+	psllq	xmm15,4
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	dec	r10d
+	jmp	NEAR $L$enc_sbox
+ALIGN	16
+$L$enc_loop:
+	pxor	xmm15,XMMWORD[rax]
+	pxor	xmm0,XMMWORD[16+rax]
+	pxor	xmm1,XMMWORD[32+rax]
+	pxor	xmm2,XMMWORD[48+rax]
+DB	102,68,15,56,0,255
+DB	102,15,56,0,199
+	pxor	xmm3,XMMWORD[64+rax]
+	pxor	xmm4,XMMWORD[80+rax]
+DB	102,15,56,0,207
+DB	102,15,56,0,215
+	pxor	xmm5,XMMWORD[96+rax]
+	pxor	xmm6,XMMWORD[112+rax]
+DB	102,15,56,0,223
+DB	102,15,56,0,231
+DB	102,15,56,0,239
+DB	102,15,56,0,247
+	lea	rax,[128+rax]
+$L$enc_sbox:
+	pxor	xmm4,xmm5
+	pxor	xmm1,xmm0
+	pxor	xmm2,xmm15
+	pxor	xmm5,xmm1
+	pxor	xmm4,xmm15
+
+	pxor	xmm5,xmm2
+	pxor	xmm2,xmm6
+	pxor	xmm6,xmm4
+	pxor	xmm2,xmm3
+	pxor	xmm3,xmm4
+	pxor	xmm2,xmm0
+
+	pxor	xmm1,xmm6
+	pxor	xmm0,xmm4
+	movdqa	xmm10,xmm6
+	movdqa	xmm9,xmm0
+	movdqa	xmm8,xmm4
+	movdqa	xmm12,xmm1
+	movdqa	xmm11,xmm5
+
+	pxor	xmm10,xmm3
+	pxor	xmm9,xmm1
+	pxor	xmm8,xmm2
+	movdqa	xmm13,xmm10
+	pxor	xmm12,xmm3
+	movdqa	xmm7,xmm9
+	pxor	xmm11,xmm15
+	movdqa	xmm14,xmm10
+
+	por	xmm9,xmm8
+	por	xmm10,xmm11
+	pxor	xmm14,xmm7
+	pand	xmm13,xmm11
+	pxor	xmm11,xmm8
+	pand	xmm7,xmm8
+	pand	xmm14,xmm11
+	movdqa	xmm11,xmm2
+	pxor	xmm11,xmm15
+	pand	xmm12,xmm11
+	pxor	xmm10,xmm12
+	pxor	xmm9,xmm12
+	movdqa	xmm12,xmm6
+	movdqa	xmm11,xmm4
+	pxor	xmm12,xmm0
+	pxor	xmm11,xmm5
+	movdqa	xmm8,xmm12
+	pand	xmm12,xmm11
+	por	xmm8,xmm11
+	pxor	xmm7,xmm12
+	pxor	xmm10,xmm14
+	pxor	xmm9,xmm13
+	pxor	xmm8,xmm14
+	movdqa	xmm11,xmm1
+	pxor	xmm7,xmm13
+	movdqa	xmm12,xmm3
+	pxor	xmm8,xmm13
+	movdqa	xmm13,xmm0
+	pand	xmm11,xmm2
+	movdqa	xmm14,xmm6
+	pand	xmm12,xmm15
+	pand	xmm13,xmm4
+	por	xmm14,xmm5
+	pxor	xmm10,xmm11
+	pxor	xmm9,xmm12
+	pxor	xmm8,xmm13
+	pxor	xmm7,xmm14
+
+
+
+
+
+	movdqa	xmm11,xmm10
+	pand	xmm10,xmm8
+	pxor	xmm11,xmm9
+
+	movdqa	xmm13,xmm7
+	movdqa	xmm14,xmm11
+	pxor	xmm13,xmm10
+	pand	xmm14,xmm13
+
+	movdqa	xmm12,xmm8
+	pxor	xmm14,xmm9
+	pxor	xmm12,xmm7
+
+	pxor	xmm10,xmm9
+
+	pand	xmm12,xmm10
+
+	movdqa	xmm9,xmm13
+	pxor	xmm12,xmm7
+
+	pxor	xmm9,xmm12
+	pxor	xmm8,xmm12
+
+	pand	xmm9,xmm7
+
+	pxor	xmm13,xmm9
+	pxor	xmm8,xmm9
+
+	pand	xmm13,xmm14
+
+	pxor	xmm13,xmm11
+	movdqa	xmm11,xmm5
+	movdqa	xmm7,xmm4
+	movdqa	xmm9,xmm14
+	pxor	xmm9,xmm13
+	pand	xmm9,xmm5
+	pxor	xmm5,xmm4
+	pand	xmm4,xmm14
+	pand	xmm5,xmm13
+	pxor	xmm5,xmm4
+	pxor	xmm4,xmm9
+	pxor	xmm11,xmm15
+	pxor	xmm7,xmm2
+	pxor	xmm14,xmm12
+	pxor	xmm13,xmm8
+	movdqa	xmm10,xmm14
+	movdqa	xmm9,xmm12
+	pxor	xmm10,xmm13
+	pxor	xmm9,xmm8
+	pand	xmm10,xmm11
+	pand	xmm9,xmm15
+	pxor	xmm11,xmm7
+	pxor	xmm15,xmm2
+	pand	xmm7,xmm14
+	pand	xmm2,xmm12
+	pand	xmm11,xmm13
+	pand	xmm15,xmm8
+	pxor	xmm7,xmm11
+	pxor	xmm15,xmm2
+	pxor	xmm11,xmm10
+	pxor	xmm2,xmm9
+	pxor	xmm5,xmm11
+	pxor	xmm15,xmm11
+	pxor	xmm4,xmm7
+	pxor	xmm2,xmm7
+
+	movdqa	xmm11,xmm6
+	movdqa	xmm7,xmm0
+	pxor	xmm11,xmm3
+	pxor	xmm7,xmm1
+	movdqa	xmm10,xmm14
+	movdqa	xmm9,xmm12
+	pxor	xmm10,xmm13
+	pxor	xmm9,xmm8
+	pand	xmm10,xmm11
+	pand	xmm9,xmm3
+	pxor	xmm11,xmm7
+	pxor	xmm3,xmm1
+	pand	xmm7,xmm14
+	pand	xmm1,xmm12
+	pand	xmm11,xmm13
+	pand	xmm3,xmm8
+	pxor	xmm7,xmm11
+	pxor	xmm3,xmm1
+	pxor	xmm11,xmm10
+	pxor	xmm1,xmm9
+	pxor	xmm14,xmm12
+	pxor	xmm13,xmm8
+	movdqa	xmm10,xmm14
+	pxor	xmm10,xmm13
+	pand	xmm10,xmm6
+	pxor	xmm6,xmm0
+	pand	xmm0,xmm14
+	pand	xmm6,xmm13
+	pxor	xmm6,xmm0
+	pxor	xmm0,xmm10
+	pxor	xmm6,xmm11
+	pxor	xmm3,xmm11
+	pxor	xmm0,xmm7
+	pxor	xmm1,xmm7
+	pxor	xmm6,xmm15
+	pxor	xmm0,xmm5
+	pxor	xmm3,xmm6
+	pxor	xmm5,xmm15
+	pxor	xmm15,xmm0
+
+	pxor	xmm0,xmm4
+	pxor	xmm4,xmm1
+	pxor	xmm1,xmm2
+	pxor	xmm2,xmm4
+	pxor	xmm3,xmm4
+
+	pxor	xmm5,xmm2
+	dec	r10d
+	jl	NEAR $L$enc_done
+	pshufd	xmm7,xmm15,0x93
+	pshufd	xmm8,xmm0,0x93
+	pxor	xmm15,xmm7
+	pshufd	xmm9,xmm3,0x93
+	pxor	xmm0,xmm8
+	pshufd	xmm10,xmm5,0x93
+	pxor	xmm3,xmm9
+	pshufd	xmm11,xmm2,0x93
+	pxor	xmm5,xmm10
+	pshufd	xmm12,xmm6,0x93
+	pxor	xmm2,xmm11
+	pshufd	xmm13,xmm1,0x93
+	pxor	xmm6,xmm12
+	pshufd	xmm14,xmm4,0x93
+	pxor	xmm1,xmm13
+	pxor	xmm4,xmm14
+
+	pxor	xmm8,xmm15
+	pxor	xmm7,xmm4
+	pxor	xmm8,xmm4
+	pshufd	xmm15,xmm15,0x4E
+	pxor	xmm9,xmm0
+	pshufd	xmm0,xmm0,0x4E
+	pxor	xmm12,xmm2
+	pxor	xmm15,xmm7
+	pxor	xmm13,xmm6
+	pxor	xmm0,xmm8
+	pxor	xmm11,xmm5
+	pshufd	xmm7,xmm2,0x4E
+	pxor	xmm14,xmm1
+	pshufd	xmm8,xmm6,0x4E
+	pxor	xmm10,xmm3
+	pshufd	xmm2,xmm5,0x4E
+	pxor	xmm10,xmm4
+	pshufd	xmm6,xmm4,0x4E
+	pxor	xmm11,xmm4
+	pshufd	xmm5,xmm1,0x4E
+	pxor	xmm7,xmm11
+	pshufd	xmm1,xmm3,0x4E
+	pxor	xmm8,xmm12
+	pxor	xmm2,xmm10
+	pxor	xmm6,xmm14
+	pxor	xmm5,xmm13
+	movdqa	xmm3,xmm7
+	pxor	xmm1,xmm9
+	movdqa	xmm4,xmm8
+	movdqa	xmm7,XMMWORD[48+r11]
+	jnz	NEAR $L$enc_loop
+	movdqa	xmm7,XMMWORD[64+r11]
+	jmp	NEAR $L$enc_loop
+ALIGN	16
+$L$enc_done:
+	movdqa	xmm7,XMMWORD[r11]
+	movdqa	xmm8,XMMWORD[16+r11]
+	movdqa	xmm9,xmm1
+	psrlq	xmm1,1
+	movdqa	xmm10,xmm2
+	psrlq	xmm2,1
+	pxor	xmm1,xmm4
+	pxor	xmm2,xmm6
+	pand	xmm1,xmm7
+	pand	xmm2,xmm7
+	pxor	xmm4,xmm1
+	psllq	xmm1,1
+	pxor	xmm6,xmm2
+	psllq	xmm2,1
+	pxor	xmm1,xmm9
+	pxor	xmm2,xmm10
+	movdqa	xmm9,xmm3
+	psrlq	xmm3,1
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,1
+	pxor	xmm3,xmm5
+	pxor	xmm15,xmm0
+	pand	xmm3,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm5,xmm3
+	psllq	xmm3,1
+	pxor	xmm0,xmm15
+	psllq	xmm15,1
+	pxor	xmm3,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[32+r11]
+	movdqa	xmm9,xmm6
+	psrlq	xmm6,2
+	movdqa	xmm10,xmm2
+	psrlq	xmm2,2
+	pxor	xmm6,xmm4
+	pxor	xmm2,xmm1
+	pand	xmm6,xmm8
+	pand	xmm2,xmm8
+	pxor	xmm4,xmm6
+	psllq	xmm6,2
+	pxor	xmm1,xmm2
+	psllq	xmm2,2
+	pxor	xmm6,xmm9
+	pxor	xmm2,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,2
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,2
+	pxor	xmm0,xmm5
+	pxor	xmm15,xmm3
+	pand	xmm0,xmm8
+	pand	xmm15,xmm8
+	pxor	xmm5,xmm0
+	psllq	xmm0,2
+	pxor	xmm3,xmm15
+	psllq	xmm15,2
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm9,xmm5
+	psrlq	xmm5,4
+	movdqa	xmm10,xmm3
+	psrlq	xmm3,4
+	pxor	xmm5,xmm4
+	pxor	xmm3,xmm1
+	pand	xmm5,xmm7
+	pand	xmm3,xmm7
+	pxor	xmm4,xmm5
+	psllq	xmm5,4
+	pxor	xmm1,xmm3
+	psllq	xmm3,4
+	pxor	xmm5,xmm9
+	pxor	xmm3,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,4
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,4
+	pxor	xmm0,xmm6
+	pxor	xmm15,xmm2
+	pand	xmm0,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm6,xmm0
+	psllq	xmm0,4
+	pxor	xmm2,xmm15
+	psllq	xmm15,4
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[rax]
+	pxor	xmm3,xmm7
+	pxor	xmm5,xmm7
+	pxor	xmm2,xmm7
+	pxor	xmm6,xmm7
+	pxor	xmm1,xmm7
+	pxor	xmm4,xmm7
+	pxor	xmm15,xmm7
+	pxor	xmm0,xmm7
+	DB	0F3h,0C3h		;repret
+
+
+
+ALIGN	64
+_bsaes_decrypt8:
+	lea	r11,[$L$BS0]
+
+	movdqa	xmm8,XMMWORD[rax]
+	lea	rax,[16+rax]
+	movdqa	xmm7,XMMWORD[((-48))+r11]
+	pxor	xmm15,xmm8
+	pxor	xmm0,xmm8
+	pxor	xmm1,xmm8
+	pxor	xmm2,xmm8
+DB	102,68,15,56,0,255
+DB	102,15,56,0,199
+	pxor	xmm3,xmm8
+	pxor	xmm4,xmm8
+DB	102,15,56,0,207
+DB	102,15,56,0,215
+	pxor	xmm5,xmm8
+	pxor	xmm6,xmm8
+DB	102,15,56,0,223
+DB	102,15,56,0,231
+DB	102,15,56,0,239
+DB	102,15,56,0,247
+	movdqa	xmm7,XMMWORD[r11]
+	movdqa	xmm8,XMMWORD[16+r11]
+	movdqa	xmm9,xmm5
+	psrlq	xmm5,1
+	movdqa	xmm10,xmm3
+	psrlq	xmm3,1
+	pxor	xmm5,xmm6
+	pxor	xmm3,xmm4
+	pand	xmm5,xmm7
+	pand	xmm3,xmm7
+	pxor	xmm6,xmm5
+	psllq	xmm5,1
+	pxor	xmm4,xmm3
+	psllq	xmm3,1
+	pxor	xmm5,xmm9
+	pxor	xmm3,xmm10
+	movdqa	xmm9,xmm1
+	psrlq	xmm1,1
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,1
+	pxor	xmm1,xmm2
+	pxor	xmm15,xmm0
+	pand	xmm1,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm2,xmm1
+	psllq	xmm1,1
+	pxor	xmm0,xmm15
+	psllq	xmm15,1
+	pxor	xmm1,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[32+r11]
+	movdqa	xmm9,xmm4
+	psrlq	xmm4,2
+	movdqa	xmm10,xmm3
+	psrlq	xmm3,2
+	pxor	xmm4,xmm6
+	pxor	xmm3,xmm5
+	pand	xmm4,xmm8
+	pand	xmm3,xmm8
+	pxor	xmm6,xmm4
+	psllq	xmm4,2
+	pxor	xmm5,xmm3
+	psllq	xmm3,2
+	pxor	xmm4,xmm9
+	pxor	xmm3,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,2
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,2
+	pxor	xmm0,xmm2
+	pxor	xmm15,xmm1
+	pand	xmm0,xmm8
+	pand	xmm15,xmm8
+	pxor	xmm2,xmm0
+	psllq	xmm0,2
+	pxor	xmm1,xmm15
+	psllq	xmm15,2
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm9,xmm2
+	psrlq	xmm2,4
+	movdqa	xmm10,xmm1
+	psrlq	xmm1,4
+	pxor	xmm2,xmm6
+	pxor	xmm1,xmm5
+	pand	xmm2,xmm7
+	pand	xmm1,xmm7
+	pxor	xmm6,xmm2
+	psllq	xmm2,4
+	pxor	xmm5,xmm1
+	psllq	xmm1,4
+	pxor	xmm2,xmm9
+	pxor	xmm1,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,4
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,4
+	pxor	xmm0,xmm4
+	pxor	xmm15,xmm3
+	pand	xmm0,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm4,xmm0
+	psllq	xmm0,4
+	pxor	xmm3,xmm15
+	psllq	xmm15,4
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	dec	r10d
+	jmp	NEAR $L$dec_sbox
+ALIGN	16
+$L$dec_loop:
+	pxor	xmm15,XMMWORD[rax]
+	pxor	xmm0,XMMWORD[16+rax]
+	pxor	xmm1,XMMWORD[32+rax]
+	pxor	xmm2,XMMWORD[48+rax]
+DB	102,68,15,56,0,255
+DB	102,15,56,0,199
+	pxor	xmm3,XMMWORD[64+rax]
+	pxor	xmm4,XMMWORD[80+rax]
+DB	102,15,56,0,207
+DB	102,15,56,0,215
+	pxor	xmm5,XMMWORD[96+rax]
+	pxor	xmm6,XMMWORD[112+rax]
+DB	102,15,56,0,223
+DB	102,15,56,0,231
+DB	102,15,56,0,239
+DB	102,15,56,0,247
+	lea	rax,[128+rax]
+$L$dec_sbox:
+	pxor	xmm2,xmm3
+
+	pxor	xmm3,xmm6
+	pxor	xmm1,xmm6
+	pxor	xmm5,xmm3
+	pxor	xmm6,xmm5
+	pxor	xmm0,xmm6
+
+	pxor	xmm15,xmm0
+	pxor	xmm1,xmm4
+	pxor	xmm2,xmm15
+	pxor	xmm4,xmm15
+	pxor	xmm0,xmm2
+	movdqa	xmm10,xmm2
+	movdqa	xmm9,xmm6
+	movdqa	xmm8,xmm0
+	movdqa	xmm12,xmm3
+	movdqa	xmm11,xmm4
+
+	pxor	xmm10,xmm15
+	pxor	xmm9,xmm3
+	pxor	xmm8,xmm5
+	movdqa	xmm13,xmm10
+	pxor	xmm12,xmm15
+	movdqa	xmm7,xmm9
+	pxor	xmm11,xmm1
+	movdqa	xmm14,xmm10
+
+	por	xmm9,xmm8
+	por	xmm10,xmm11
+	pxor	xmm14,xmm7
+	pand	xmm13,xmm11
+	pxor	xmm11,xmm8
+	pand	xmm7,xmm8
+	pand	xmm14,xmm11
+	movdqa	xmm11,xmm5
+	pxor	xmm11,xmm1
+	pand	xmm12,xmm11
+	pxor	xmm10,xmm12
+	pxor	xmm9,xmm12
+	movdqa	xmm12,xmm2
+	movdqa	xmm11,xmm0
+	pxor	xmm12,xmm6
+	pxor	xmm11,xmm4
+	movdqa	xmm8,xmm12
+	pand	xmm12,xmm11
+	por	xmm8,xmm11
+	pxor	xmm7,xmm12
+	pxor	xmm10,xmm14
+	pxor	xmm9,xmm13
+	pxor	xmm8,xmm14
+	movdqa	xmm11,xmm3
+	pxor	xmm7,xmm13
+	movdqa	xmm12,xmm15
+	pxor	xmm8,xmm13
+	movdqa	xmm13,xmm6
+	pand	xmm11,xmm5
+	movdqa	xmm14,xmm2
+	pand	xmm12,xmm1
+	pand	xmm13,xmm0
+	por	xmm14,xmm4
+	pxor	xmm10,xmm11
+	pxor	xmm9,xmm12
+	pxor	xmm8,xmm13
+	pxor	xmm7,xmm14
+
+
+
+
+
+	movdqa	xmm11,xmm10
+	pand	xmm10,xmm8
+	pxor	xmm11,xmm9
+
+	movdqa	xmm13,xmm7
+	movdqa	xmm14,xmm11
+	pxor	xmm13,xmm10
+	pand	xmm14,xmm13
+
+	movdqa	xmm12,xmm8
+	pxor	xmm14,xmm9
+	pxor	xmm12,xmm7
+
+	pxor	xmm10,xmm9
+
+	pand	xmm12,xmm10
+
+	movdqa	xmm9,xmm13
+	pxor	xmm12,xmm7
+
+	pxor	xmm9,xmm12
+	pxor	xmm8,xmm12
+
+	pand	xmm9,xmm7
+
+	pxor	xmm13,xmm9
+	pxor	xmm8,xmm9
+
+	pand	xmm13,xmm14
+
+	pxor	xmm13,xmm11
+	movdqa	xmm11,xmm4
+	movdqa	xmm7,xmm0
+	movdqa	xmm9,xmm14
+	pxor	xmm9,xmm13
+	pand	xmm9,xmm4
+	pxor	xmm4,xmm0
+	pand	xmm0,xmm14
+	pand	xmm4,xmm13
+	pxor	xmm4,xmm0
+	pxor	xmm0,xmm9
+	pxor	xmm11,xmm1
+	pxor	xmm7,xmm5
+	pxor	xmm14,xmm12
+	pxor	xmm13,xmm8
+	movdqa	xmm10,xmm14
+	movdqa	xmm9,xmm12
+	pxor	xmm10,xmm13
+	pxor	xmm9,xmm8
+	pand	xmm10,xmm11
+	pand	xmm9,xmm1
+	pxor	xmm11,xmm7
+	pxor	xmm1,xmm5
+	pand	xmm7,xmm14
+	pand	xmm5,xmm12
+	pand	xmm11,xmm13
+	pand	xmm1,xmm8
+	pxor	xmm7,xmm11
+	pxor	xmm1,xmm5
+	pxor	xmm11,xmm10
+	pxor	xmm5,xmm9
+	pxor	xmm4,xmm11
+	pxor	xmm1,xmm11
+	pxor	xmm0,xmm7
+	pxor	xmm5,xmm7
+
+	movdqa	xmm11,xmm2
+	movdqa	xmm7,xmm6
+	pxor	xmm11,xmm15
+	pxor	xmm7,xmm3
+	movdqa	xmm10,xmm14
+	movdqa	xmm9,xmm12
+	pxor	xmm10,xmm13
+	pxor	xmm9,xmm8
+	pand	xmm10,xmm11
+	pand	xmm9,xmm15
+	pxor	xmm11,xmm7
+	pxor	xmm15,xmm3
+	pand	xmm7,xmm14
+	pand	xmm3,xmm12
+	pand	xmm11,xmm13
+	pand	xmm15,xmm8
+	pxor	xmm7,xmm11
+	pxor	xmm15,xmm3
+	pxor	xmm11,xmm10
+	pxor	xmm3,xmm9
+	pxor	xmm14,xmm12
+	pxor	xmm13,xmm8
+	movdqa	xmm10,xmm14
+	pxor	xmm10,xmm13
+	pand	xmm10,xmm2
+	pxor	xmm2,xmm6
+	pand	xmm6,xmm14
+	pand	xmm2,xmm13
+	pxor	xmm2,xmm6
+	pxor	xmm6,xmm10
+	pxor	xmm2,xmm11
+	pxor	xmm15,xmm11
+	pxor	xmm6,xmm7
+	pxor	xmm3,xmm7
+	pxor	xmm0,xmm6
+	pxor	xmm5,xmm4
+
+	pxor	xmm3,xmm0
+	pxor	xmm1,xmm6
+	pxor	xmm4,xmm6
+	pxor	xmm3,xmm1
+	pxor	xmm6,xmm15
+	pxor	xmm3,xmm4
+	pxor	xmm2,xmm5
+	pxor	xmm5,xmm0
+	pxor	xmm2,xmm3
+
+	pxor	xmm3,xmm15
+	pxor	xmm6,xmm2
+	dec	r10d
+	jl	NEAR $L$dec_done
+
+	pshufd	xmm7,xmm15,0x4E
+	pshufd	xmm13,xmm2,0x4E
+	pxor	xmm7,xmm15
+	pshufd	xmm14,xmm4,0x4E
+	pxor	xmm13,xmm2
+	pshufd	xmm8,xmm0,0x4E
+	pxor	xmm14,xmm4
+	pshufd	xmm9,xmm5,0x4E
+	pxor	xmm8,xmm0
+	pshufd	xmm10,xmm3,0x4E
+	pxor	xmm9,xmm5
+	pxor	xmm15,xmm13
+	pxor	xmm0,xmm13
+	pshufd	xmm11,xmm1,0x4E
+	pxor	xmm10,xmm3
+	pxor	xmm5,xmm7
+	pxor	xmm3,xmm8
+	pshufd	xmm12,xmm6,0x4E
+	pxor	xmm11,xmm1
+	pxor	xmm0,xmm14
+	pxor	xmm1,xmm9
+	pxor	xmm12,xmm6
+
+	pxor	xmm5,xmm14
+	pxor	xmm3,xmm13
+	pxor	xmm1,xmm13
+	pxor	xmm6,xmm10
+	pxor	xmm2,xmm11
+	pxor	xmm1,xmm14
+	pxor	xmm6,xmm14
+	pxor	xmm4,xmm12
+	pshufd	xmm7,xmm15,0x93
+	pshufd	xmm8,xmm0,0x93
+	pxor	xmm15,xmm7
+	pshufd	xmm9,xmm5,0x93
+	pxor	xmm0,xmm8
+	pshufd	xmm10,xmm3,0x93
+	pxor	xmm5,xmm9
+	pshufd	xmm11,xmm1,0x93
+	pxor	xmm3,xmm10
+	pshufd	xmm12,xmm6,0x93
+	pxor	xmm1,xmm11
+	pshufd	xmm13,xmm2,0x93
+	pxor	xmm6,xmm12
+	pshufd	xmm14,xmm4,0x93
+	pxor	xmm2,xmm13
+	pxor	xmm4,xmm14
+
+	pxor	xmm8,xmm15
+	pxor	xmm7,xmm4
+	pxor	xmm8,xmm4
+	pshufd	xmm15,xmm15,0x4E
+	pxor	xmm9,xmm0
+	pshufd	xmm0,xmm0,0x4E
+	pxor	xmm12,xmm1
+	pxor	xmm15,xmm7
+	pxor	xmm13,xmm6
+	pxor	xmm0,xmm8
+	pxor	xmm11,xmm3
+	pshufd	xmm7,xmm1,0x4E
+	pxor	xmm14,xmm2
+	pshufd	xmm8,xmm6,0x4E
+	pxor	xmm10,xmm5
+	pshufd	xmm1,xmm3,0x4E
+	pxor	xmm10,xmm4
+	pshufd	xmm6,xmm4,0x4E
+	pxor	xmm11,xmm4
+	pshufd	xmm3,xmm2,0x4E
+	pxor	xmm7,xmm11
+	pshufd	xmm2,xmm5,0x4E
+	pxor	xmm8,xmm12
+	pxor	xmm10,xmm1
+	pxor	xmm6,xmm14
+	pxor	xmm13,xmm3
+	movdqa	xmm3,xmm7
+	pxor	xmm2,xmm9
+	movdqa	xmm5,xmm13
+	movdqa	xmm4,xmm8
+	movdqa	xmm1,xmm2
+	movdqa	xmm2,xmm10
+	movdqa	xmm7,XMMWORD[((-16))+r11]
+	jnz	NEAR $L$dec_loop
+	movdqa	xmm7,XMMWORD[((-32))+r11]
+	jmp	NEAR $L$dec_loop
+ALIGN	16
+$L$dec_done:
+	movdqa	xmm7,XMMWORD[r11]
+	movdqa	xmm8,XMMWORD[16+r11]
+	movdqa	xmm9,xmm2
+	psrlq	xmm2,1
+	movdqa	xmm10,xmm1
+	psrlq	xmm1,1
+	pxor	xmm2,xmm4
+	pxor	xmm1,xmm6
+	pand	xmm2,xmm7
+	pand	xmm1,xmm7
+	pxor	xmm4,xmm2
+	psllq	xmm2,1
+	pxor	xmm6,xmm1
+	psllq	xmm1,1
+	pxor	xmm2,xmm9
+	pxor	xmm1,xmm10
+	movdqa	xmm9,xmm5
+	psrlq	xmm5,1
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,1
+	pxor	xmm5,xmm3
+	pxor	xmm15,xmm0
+	pand	xmm5,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm3,xmm5
+	psllq	xmm5,1
+	pxor	xmm0,xmm15
+	psllq	xmm15,1
+	pxor	xmm5,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[32+r11]
+	movdqa	xmm9,xmm6
+	psrlq	xmm6,2
+	movdqa	xmm10,xmm1
+	psrlq	xmm1,2
+	pxor	xmm6,xmm4
+	pxor	xmm1,xmm2
+	pand	xmm6,xmm8
+	pand	xmm1,xmm8
+	pxor	xmm4,xmm6
+	psllq	xmm6,2
+	pxor	xmm2,xmm1
+	psllq	xmm1,2
+	pxor	xmm6,xmm9
+	pxor	xmm1,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,2
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,2
+	pxor	xmm0,xmm3
+	pxor	xmm15,xmm5
+	pand	xmm0,xmm8
+	pand	xmm15,xmm8
+	pxor	xmm3,xmm0
+	psllq	xmm0,2
+	pxor	xmm5,xmm15
+	psllq	xmm15,2
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm9,xmm3
+	psrlq	xmm3,4
+	movdqa	xmm10,xmm5
+	psrlq	xmm5,4
+	pxor	xmm3,xmm4
+	pxor	xmm5,xmm2
+	pand	xmm3,xmm7
+	pand	xmm5,xmm7
+	pxor	xmm4,xmm3
+	psllq	xmm3,4
+	pxor	xmm2,xmm5
+	psllq	xmm5,4
+	pxor	xmm3,xmm9
+	pxor	xmm5,xmm10
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,4
+	movdqa	xmm10,xmm15
+	psrlq	xmm15,4
+	pxor	xmm0,xmm6
+	pxor	xmm15,xmm1
+	pand	xmm0,xmm7
+	pand	xmm15,xmm7
+	pxor	xmm6,xmm0
+	psllq	xmm0,4
+	pxor	xmm1,xmm15
+	psllq	xmm15,4
+	pxor	xmm0,xmm9
+	pxor	xmm15,xmm10
+	movdqa	xmm7,XMMWORD[rax]
+	pxor	xmm5,xmm7
+	pxor	xmm3,xmm7
+	pxor	xmm1,xmm7
+	pxor	xmm6,xmm7
+	pxor	xmm2,xmm7
+	pxor	xmm4,xmm7
+	pxor	xmm15,xmm7
+	pxor	xmm0,xmm7
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	16
+_bsaes_key_convert:
+	lea	r11,[$L$masks]
+	movdqu	xmm7,XMMWORD[rcx]
+	lea	rcx,[16+rcx]
+	movdqa	xmm0,XMMWORD[r11]
+	movdqa	xmm1,XMMWORD[16+r11]
+	movdqa	xmm2,XMMWORD[32+r11]
+	movdqa	xmm3,XMMWORD[48+r11]
+	movdqa	xmm4,XMMWORD[64+r11]
+	pcmpeqd	xmm5,xmm5
+
+	movdqu	xmm6,XMMWORD[rcx]
+	movdqa	XMMWORD[rax],xmm7
+	lea	rax,[16+rax]
+	dec	r10d
+	jmp	NEAR $L$key_loop
+ALIGN	16
+$L$key_loop:
+DB	102,15,56,0,244
+
+	movdqa	xmm8,xmm0
+	movdqa	xmm9,xmm1
+
+	pand	xmm8,xmm6
+	pand	xmm9,xmm6
+	movdqa	xmm10,xmm2
+	pcmpeqb	xmm8,xmm0
+	psllq	xmm0,4
+	movdqa	xmm11,xmm3
+	pcmpeqb	xmm9,xmm1
+	psllq	xmm1,4
+
+	pand	xmm10,xmm6
+	pand	xmm11,xmm6
+	movdqa	xmm12,xmm0
+	pcmpeqb	xmm10,xmm2
+	psllq	xmm2,4
+	movdqa	xmm13,xmm1
+	pcmpeqb	xmm11,xmm3
+	psllq	xmm3,4
+
+	movdqa	xmm14,xmm2
+	movdqa	xmm15,xmm3
+	pxor	xmm8,xmm5
+	pxor	xmm9,xmm5
+
+	pand	xmm12,xmm6
+	pand	xmm13,xmm6
+	movdqa	XMMWORD[rax],xmm8
+	pcmpeqb	xmm12,xmm0
+	psrlq	xmm0,4
+	movdqa	XMMWORD[16+rax],xmm9
+	pcmpeqb	xmm13,xmm1
+	psrlq	xmm1,4
+	lea	rcx,[16+rcx]
+
+	pand	xmm14,xmm6
+	pand	xmm15,xmm6
+	movdqa	XMMWORD[32+rax],xmm10
+	pcmpeqb	xmm14,xmm2
+	psrlq	xmm2,4
+	movdqa	XMMWORD[48+rax],xmm11
+	pcmpeqb	xmm15,xmm3
+	psrlq	xmm3,4
+	movdqu	xmm6,XMMWORD[rcx]
+
+	pxor	xmm13,xmm5
+	pxor	xmm14,xmm5
+	movdqa	XMMWORD[64+rax],xmm12
+	movdqa	XMMWORD[80+rax],xmm13
+	movdqa	XMMWORD[96+rax],xmm14
+	movdqa	XMMWORD[112+rax],xmm15
+	lea	rax,[128+rax]
+	dec	r10d
+	jnz	NEAR $L$key_loop
+
+	movdqa	xmm7,XMMWORD[80+r11]
+
+	DB	0F3h,0C3h		;repret
+
+EXTERN	asm_AES_cbc_encrypt
+global	bsaes_cbc_encrypt
+
+ALIGN	16
+bsaes_cbc_encrypt:
+	mov	r11d,DWORD[48+rsp]
+	cmp	r11d,0
+	jne	NEAR asm_AES_cbc_encrypt
+	cmp	r8,128
+	jb	NEAR asm_AES_cbc_encrypt
+
+	mov	rax,rsp
+$L$cbc_dec_prologue:
+	push	rbp
+	push	rbx
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-72))+rsp]
+	mov	r10,QWORD[160+rsp]
+	lea	rsp,[((-160))+rsp]
+	movaps	XMMWORD[64+rsp],xmm6
+	movaps	XMMWORD[80+rsp],xmm7
+	movaps	XMMWORD[96+rsp],xmm8
+	movaps	XMMWORD[112+rsp],xmm9
+	movaps	XMMWORD[128+rsp],xmm10
+	movaps	XMMWORD[144+rsp],xmm11
+	movaps	XMMWORD[160+rsp],xmm12
+	movaps	XMMWORD[176+rsp],xmm13
+	movaps	XMMWORD[192+rsp],xmm14
+	movaps	XMMWORD[208+rsp],xmm15
+$L$cbc_dec_body:
+	mov	rbp,rsp
+	mov	eax,DWORD[240+r9]
+	mov	r12,rcx
+	mov	r13,rdx
+	mov	r14,r8
+	mov	r15,r9
+	mov	rbx,r10
+	shr	r14,4
+
+	mov	edx,eax
+	shl	rax,7
+	sub	rax,96
+	sub	rsp,rax
+
+	mov	rax,rsp
+	mov	rcx,r15
+	mov	r10d,edx
+	call	_bsaes_key_convert
+	pxor	xmm7,XMMWORD[rsp]
+	movdqa	XMMWORD[rax],xmm6
+	movdqa	XMMWORD[rsp],xmm7
+
+	movdqu	xmm14,XMMWORD[rbx]
+	sub	r14,8
+$L$cbc_dec_loop:
+	movdqu	xmm15,XMMWORD[r12]
+	movdqu	xmm0,XMMWORD[16+r12]
+	movdqu	xmm1,XMMWORD[32+r12]
+	movdqu	xmm2,XMMWORD[48+r12]
+	movdqu	xmm3,XMMWORD[64+r12]
+	movdqu	xmm4,XMMWORD[80+r12]
+	mov	rax,rsp
+	movdqu	xmm5,XMMWORD[96+r12]
+	mov	r10d,edx
+	movdqu	xmm6,XMMWORD[112+r12]
+	movdqa	XMMWORD[32+rbp],xmm14
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm3,xmm9
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm1,xmm10
+	movdqu	xmm12,XMMWORD[80+r12]
+	pxor	xmm6,xmm11
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm2,xmm12
+	movdqu	xmm14,XMMWORD[112+r12]
+	pxor	xmm4,xmm13
+	movdqu	XMMWORD[r13],xmm15
+	lea	r12,[128+r12]
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	movdqu	XMMWORD[64+r13],xmm1
+	movdqu	XMMWORD[80+r13],xmm6
+	movdqu	XMMWORD[96+r13],xmm2
+	movdqu	XMMWORD[112+r13],xmm4
+	lea	r13,[128+r13]
+	sub	r14,8
+	jnc	NEAR $L$cbc_dec_loop
+
+	add	r14,8
+	jz	NEAR $L$cbc_dec_done
+
+	movdqu	xmm15,XMMWORD[r12]
+	mov	rax,rsp
+	mov	r10d,edx
+	cmp	r14,2
+	jb	NEAR $L$cbc_dec_one
+	movdqu	xmm0,XMMWORD[16+r12]
+	je	NEAR $L$cbc_dec_two
+	movdqu	xmm1,XMMWORD[32+r12]
+	cmp	r14,4
+	jb	NEAR $L$cbc_dec_three
+	movdqu	xmm2,XMMWORD[48+r12]
+	je	NEAR $L$cbc_dec_four
+	movdqu	xmm3,XMMWORD[64+r12]
+	cmp	r14,6
+	jb	NEAR $L$cbc_dec_five
+	movdqu	xmm4,XMMWORD[80+r12]
+	je	NEAR $L$cbc_dec_six
+	movdqu	xmm5,XMMWORD[96+r12]
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm3,xmm9
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm1,xmm10
+	movdqu	xmm12,XMMWORD[80+r12]
+	pxor	xmm6,xmm11
+	movdqu	xmm14,XMMWORD[96+r12]
+	pxor	xmm2,xmm12
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	movdqu	XMMWORD[64+r13],xmm1
+	movdqu	XMMWORD[80+r13],xmm6
+	movdqu	XMMWORD[96+r13],xmm2
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_six:
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm3,xmm9
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm1,xmm10
+	movdqu	xmm14,XMMWORD[80+r12]
+	pxor	xmm6,xmm11
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	movdqu	XMMWORD[64+r13],xmm1
+	movdqu	XMMWORD[80+r13],xmm6
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_five:
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm3,xmm9
+	movdqu	xmm14,XMMWORD[64+r12]
+	pxor	xmm1,xmm10
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	movdqu	XMMWORD[64+r13],xmm1
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_four:
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	xmm14,XMMWORD[48+r12]
+	pxor	xmm3,xmm9
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_three:
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	xmm14,XMMWORD[32+r12]
+	pxor	xmm5,xmm8
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_two:
+	movdqa	XMMWORD[32+rbp],xmm14
+	call	_bsaes_decrypt8
+	pxor	xmm15,XMMWORD[32+rbp]
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm14,XMMWORD[16+r12]
+	pxor	xmm0,xmm7
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	jmp	NEAR $L$cbc_dec_done
+ALIGN	16
+$L$cbc_dec_one:
+	lea	rcx,[r12]
+	lea	rdx,[32+rbp]
+	lea	r8,[r15]
+	call	asm_AES_decrypt
+	pxor	xmm14,XMMWORD[32+rbp]
+	movdqu	XMMWORD[r13],xmm14
+	movdqa	xmm14,xmm15
+
+$L$cbc_dec_done:
+	movdqu	XMMWORD[rbx],xmm14
+	lea	rax,[rsp]
+	pxor	xmm0,xmm0
+$L$cbc_dec_bzero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	lea	rax,[32+rax]
+	cmp	rbp,rax
+	ja	NEAR $L$cbc_dec_bzero
+
+	lea	rsp,[rbp]
+	movaps	xmm6,XMMWORD[64+rbp]
+	movaps	xmm7,XMMWORD[80+rbp]
+	movaps	xmm8,XMMWORD[96+rbp]
+	movaps	xmm9,XMMWORD[112+rbp]
+	movaps	xmm10,XMMWORD[128+rbp]
+	movaps	xmm11,XMMWORD[144+rbp]
+	movaps	xmm12,XMMWORD[160+rbp]
+	movaps	xmm13,XMMWORD[176+rbp]
+	movaps	xmm14,XMMWORD[192+rbp]
+	movaps	xmm15,XMMWORD[208+rbp]
+	lea	rsp,[160+rbp]
+	mov	r15,QWORD[72+rsp]
+	mov	r14,QWORD[80+rsp]
+	mov	r13,QWORD[88+rsp]
+	mov	r12,QWORD[96+rsp]
+	mov	rbx,QWORD[104+rsp]
+	mov	rax,QWORD[112+rsp]
+	lea	rsp,[120+rsp]
+	mov	rbp,rax
+$L$cbc_dec_epilogue:
+	DB	0F3h,0C3h		;repret
+
+
+global	bsaes_ctr32_encrypt_blocks
+
+ALIGN	16
+bsaes_ctr32_encrypt_blocks:
+	mov	rax,rsp
+$L$ctr_enc_prologue:
+	push	rbp
+	push	rbx
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-72))+rsp]
+	mov	r10,QWORD[160+rsp]
+	lea	rsp,[((-160))+rsp]
+	movaps	XMMWORD[64+rsp],xmm6
+	movaps	XMMWORD[80+rsp],xmm7
+	movaps	XMMWORD[96+rsp],xmm8
+	movaps	XMMWORD[112+rsp],xmm9
+	movaps	XMMWORD[128+rsp],xmm10
+	movaps	XMMWORD[144+rsp],xmm11
+	movaps	XMMWORD[160+rsp],xmm12
+	movaps	XMMWORD[176+rsp],xmm13
+	movaps	XMMWORD[192+rsp],xmm14
+	movaps	XMMWORD[208+rsp],xmm15
+$L$ctr_enc_body:
+	mov	rbp,rsp
+	movdqu	xmm0,XMMWORD[r10]
+	mov	eax,DWORD[240+r9]
+	mov	r12,rcx
+	mov	r13,rdx
+	mov	r14,r8
+	mov	r15,r9
+	movdqa	XMMWORD[32+rbp],xmm0
+	cmp	r8,8
+	jb	NEAR $L$ctr_enc_short
+
+	mov	ebx,eax
+	shl	rax,7
+	sub	rax,96
+	sub	rsp,rax
+
+	mov	rax,rsp
+	mov	rcx,r15
+	mov	r10d,ebx
+	call	_bsaes_key_convert
+	pxor	xmm7,xmm6
+	movdqa	XMMWORD[rax],xmm7
+
+	movdqa	xmm8,XMMWORD[rsp]
+	lea	r11,[$L$ADD1]
+	movdqa	xmm15,XMMWORD[32+rbp]
+	movdqa	xmm7,XMMWORD[((-32))+r11]
+DB	102,68,15,56,0,199
+DB	102,68,15,56,0,255
+	movdqa	XMMWORD[rsp],xmm8
+	jmp	NEAR $L$ctr_enc_loop
+ALIGN	16
+$L$ctr_enc_loop:
+	movdqa	XMMWORD[32+rbp],xmm15
+	movdqa	xmm0,xmm15
+	movdqa	xmm1,xmm15
+	paddd	xmm0,XMMWORD[r11]
+	movdqa	xmm2,xmm15
+	paddd	xmm1,XMMWORD[16+r11]
+	movdqa	xmm3,xmm15
+	paddd	xmm2,XMMWORD[32+r11]
+	movdqa	xmm4,xmm15
+	paddd	xmm3,XMMWORD[48+r11]
+	movdqa	xmm5,xmm15
+	paddd	xmm4,XMMWORD[64+r11]
+	movdqa	xmm6,xmm15
+	paddd	xmm5,XMMWORD[80+r11]
+	paddd	xmm6,XMMWORD[96+r11]
+
+
+
+	movdqa	xmm8,XMMWORD[rsp]
+	lea	rax,[16+rsp]
+	movdqa	xmm7,XMMWORD[((-16))+r11]
+	pxor	xmm15,xmm8
+	pxor	xmm0,xmm8
+	pxor	xmm1,xmm8
+	pxor	xmm2,xmm8
+DB	102,68,15,56,0,255
+DB	102,15,56,0,199
+	pxor	xmm3,xmm8
+	pxor	xmm4,xmm8
+DB	102,15,56,0,207
+DB	102,15,56,0,215
+	pxor	xmm5,xmm8
+	pxor	xmm6,xmm8
+DB	102,15,56,0,223
+DB	102,15,56,0,231
+DB	102,15,56,0,239
+DB	102,15,56,0,247
+	lea	r11,[$L$BS0]
+	mov	r10d,ebx
+
+	call	_bsaes_encrypt8_bitslice
+
+	sub	r14,8
+	jc	NEAR $L$ctr_enc_loop_done
+
+	movdqu	xmm7,XMMWORD[r12]
+	movdqu	xmm8,XMMWORD[16+r12]
+	movdqu	xmm9,XMMWORD[32+r12]
+	movdqu	xmm10,XMMWORD[48+r12]
+	movdqu	xmm11,XMMWORD[64+r12]
+	movdqu	xmm12,XMMWORD[80+r12]
+	movdqu	xmm13,XMMWORD[96+r12]
+	movdqu	xmm14,XMMWORD[112+r12]
+	lea	r12,[128+r12]
+	pxor	xmm7,xmm15
+	movdqa	xmm15,XMMWORD[32+rbp]
+	pxor	xmm0,xmm8
+	movdqu	XMMWORD[r13],xmm7
+	pxor	xmm3,xmm9
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,xmm10
+	movdqu	XMMWORD[32+r13],xmm3
+	pxor	xmm2,xmm11
+	movdqu	XMMWORD[48+r13],xmm5
+	pxor	xmm6,xmm12
+	movdqu	XMMWORD[64+r13],xmm2
+	pxor	xmm1,xmm13
+	movdqu	XMMWORD[80+r13],xmm6
+	pxor	xmm4,xmm14
+	movdqu	XMMWORD[96+r13],xmm1
+	lea	r11,[$L$ADD1]
+	movdqu	XMMWORD[112+r13],xmm4
+	lea	r13,[128+r13]
+	paddd	xmm15,XMMWORD[112+r11]
+	jnz	NEAR $L$ctr_enc_loop
+
+	jmp	NEAR $L$ctr_enc_done
+ALIGN	16
+$L$ctr_enc_loop_done:
+	add	r14,8
+	movdqu	xmm7,XMMWORD[r12]
+	pxor	xmm15,xmm7
+	movdqu	XMMWORD[r13],xmm15
+	cmp	r14,2
+	jb	NEAR $L$ctr_enc_done
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm0,xmm8
+	movdqu	XMMWORD[16+r13],xmm0
+	je	NEAR $L$ctr_enc_done
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm3,xmm9
+	movdqu	XMMWORD[32+r13],xmm3
+	cmp	r14,4
+	jb	NEAR $L$ctr_enc_done
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm5,xmm10
+	movdqu	XMMWORD[48+r13],xmm5
+	je	NEAR $L$ctr_enc_done
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm2,xmm11
+	movdqu	XMMWORD[64+r13],xmm2
+	cmp	r14,6
+	jb	NEAR $L$ctr_enc_done
+	movdqu	xmm12,XMMWORD[80+r12]
+	pxor	xmm6,xmm12
+	movdqu	XMMWORD[80+r13],xmm6
+	je	NEAR $L$ctr_enc_done
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm1,xmm13
+	movdqu	XMMWORD[96+r13],xmm1
+	jmp	NEAR $L$ctr_enc_done
+
+ALIGN	16
+$L$ctr_enc_short:
+	lea	rcx,[32+rbp]
+	lea	rdx,[48+rbp]
+	lea	r8,[r15]
+	call	asm_AES_encrypt
+	movdqu	xmm0,XMMWORD[r12]
+	lea	r12,[16+r12]
+	mov	eax,DWORD[44+rbp]
+	bswap	eax
+	pxor	xmm0,XMMWORD[48+rbp]
+	inc	eax
+	movdqu	XMMWORD[r13],xmm0
+	bswap	eax
+	lea	r13,[16+r13]
+	mov	DWORD[44+rsp],eax
+	dec	r14
+	jnz	NEAR $L$ctr_enc_short
+
+$L$ctr_enc_done:
+	lea	rax,[rsp]
+	pxor	xmm0,xmm0
+$L$ctr_enc_bzero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	lea	rax,[32+rax]
+	cmp	rbp,rax
+	ja	NEAR $L$ctr_enc_bzero
+
+	lea	rsp,[rbp]
+	movaps	xmm6,XMMWORD[64+rbp]
+	movaps	xmm7,XMMWORD[80+rbp]
+	movaps	xmm8,XMMWORD[96+rbp]
+	movaps	xmm9,XMMWORD[112+rbp]
+	movaps	xmm10,XMMWORD[128+rbp]
+	movaps	xmm11,XMMWORD[144+rbp]
+	movaps	xmm12,XMMWORD[160+rbp]
+	movaps	xmm13,XMMWORD[176+rbp]
+	movaps	xmm14,XMMWORD[192+rbp]
+	movaps	xmm15,XMMWORD[208+rbp]
+	lea	rsp,[160+rbp]
+	mov	r15,QWORD[72+rsp]
+	mov	r14,QWORD[80+rsp]
+	mov	r13,QWORD[88+rsp]
+	mov	r12,QWORD[96+rsp]
+	mov	rbx,QWORD[104+rsp]
+	mov	rax,QWORD[112+rsp]
+	lea	rsp,[120+rsp]
+	mov	rbp,rax
+$L$ctr_enc_epilogue:
+	DB	0F3h,0C3h		;repret
+
+global	bsaes_xts_encrypt
+
+ALIGN	16
+bsaes_xts_encrypt:
+	mov	rax,rsp
+$L$xts_enc_prologue:
+	push	rbp
+	push	rbx
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-72))+rsp]
+	mov	r10,QWORD[160+rsp]
+	mov	r11,QWORD[168+rsp]
+	lea	rsp,[((-160))+rsp]
+	movaps	XMMWORD[64+rsp],xmm6
+	movaps	XMMWORD[80+rsp],xmm7
+	movaps	XMMWORD[96+rsp],xmm8
+	movaps	XMMWORD[112+rsp],xmm9
+	movaps	XMMWORD[128+rsp],xmm10
+	movaps	XMMWORD[144+rsp],xmm11
+	movaps	XMMWORD[160+rsp],xmm12
+	movaps	XMMWORD[176+rsp],xmm13
+	movaps	XMMWORD[192+rsp],xmm14
+	movaps	XMMWORD[208+rsp],xmm15
+$L$xts_enc_body:
+	mov	rbp,rsp
+	mov	r12,rcx
+	mov	r13,rdx
+	mov	r14,r8
+	mov	r15,r9
+
+	lea	rcx,[r11]
+	lea	rdx,[32+rbp]
+	lea	r8,[r10]
+	call	asm_AES_encrypt
+
+	mov	eax,DWORD[240+r15]
+	mov	rbx,r14
+
+	mov	edx,eax
+	shl	rax,7
+	sub	rax,96
+	sub	rsp,rax
+
+	mov	rax,rsp
+	mov	rcx,r15
+	mov	r10d,edx
+	call	_bsaes_key_convert
+	pxor	xmm7,xmm6
+	movdqa	XMMWORD[rax],xmm7
+
+	and	r14,-16
+	sub	rsp,0x80
+	movdqa	xmm6,XMMWORD[32+rbp]
+
+	pxor	xmm14,xmm14
+	movdqa	xmm12,XMMWORD[$L$xts_magic]
+	pcmpgtd	xmm14,xmm6
+
+	sub	r14,0x80
+	jc	NEAR $L$xts_enc_short
+	jmp	NEAR $L$xts_enc_loop
+
+ALIGN	16
+$L$xts_enc_loop:
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm15,xmm6
+	movdqa	XMMWORD[rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm0,xmm6
+	movdqa	XMMWORD[16+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm7,XMMWORD[r12]
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm1,xmm6
+	movdqa	XMMWORD[32+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm15,xmm7
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm2,xmm6
+	movdqa	XMMWORD[48+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm0,xmm8
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm3,xmm6
+	movdqa	XMMWORD[64+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm1,xmm9
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm4,xmm6
+	movdqa	XMMWORD[80+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm2,xmm10
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm5,xmm6
+	movdqa	XMMWORD[96+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm12,XMMWORD[80+r12]
+	pxor	xmm3,xmm11
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm4,xmm12
+	movdqu	xmm14,XMMWORD[112+r12]
+	lea	r12,[128+r12]
+	movdqa	XMMWORD[112+rsp],xmm6
+	pxor	xmm5,xmm13
+	lea	rax,[128+rsp]
+	pxor	xmm6,xmm14
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm3
+	pxor	xmm2,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm5
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm2
+	pxor	xmm1,XMMWORD[96+rsp]
+	movdqu	XMMWORD[80+r13],xmm6
+	pxor	xmm4,XMMWORD[112+rsp]
+	movdqu	XMMWORD[96+r13],xmm1
+	movdqu	XMMWORD[112+r13],xmm4
+	lea	r13,[128+r13]
+
+	movdqa	xmm6,XMMWORD[112+rsp]
+	pxor	xmm14,xmm14
+	movdqa	xmm12,XMMWORD[$L$xts_magic]
+	pcmpgtd	xmm14,xmm6
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+
+	sub	r14,0x80
+	jnc	NEAR $L$xts_enc_loop
+
+$L$xts_enc_short:
+	add	r14,0x80
+	jz	NEAR $L$xts_enc_done
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm15,xmm6
+	movdqa	XMMWORD[rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm0,xmm6
+	movdqa	XMMWORD[16+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm7,XMMWORD[r12]
+	cmp	r14,16
+	je	NEAR $L$xts_enc_1
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm1,xmm6
+	movdqa	XMMWORD[32+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm8,XMMWORD[16+r12]
+	cmp	r14,32
+	je	NEAR $L$xts_enc_2
+	pxor	xmm15,xmm7
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm2,xmm6
+	movdqa	XMMWORD[48+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm9,XMMWORD[32+r12]
+	cmp	r14,48
+	je	NEAR $L$xts_enc_3
+	pxor	xmm0,xmm8
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm3,xmm6
+	movdqa	XMMWORD[64+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm10,XMMWORD[48+r12]
+	cmp	r14,64
+	je	NEAR $L$xts_enc_4
+	pxor	xmm1,xmm9
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm4,xmm6
+	movdqa	XMMWORD[80+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm11,XMMWORD[64+r12]
+	cmp	r14,80
+	je	NEAR $L$xts_enc_5
+	pxor	xmm2,xmm10
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm5,xmm6
+	movdqa	XMMWORD[96+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm12,XMMWORD[80+r12]
+	cmp	r14,96
+	je	NEAR $L$xts_enc_6
+	pxor	xmm3,xmm11
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm4,xmm12
+	movdqa	XMMWORD[112+rsp],xmm6
+	lea	r12,[112+r12]
+	pxor	xmm5,xmm13
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm3
+	pxor	xmm2,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm5
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm2
+	pxor	xmm1,XMMWORD[96+rsp]
+	movdqu	XMMWORD[80+r13],xmm6
+	movdqu	XMMWORD[96+r13],xmm1
+	lea	r13,[112+r13]
+
+	movdqa	xmm6,XMMWORD[112+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_6:
+	pxor	xmm3,xmm11
+	lea	r12,[96+r12]
+	pxor	xmm4,xmm12
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm3
+	pxor	xmm2,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm5
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm2
+	movdqu	XMMWORD[80+r13],xmm6
+	lea	r13,[96+r13]
+
+	movdqa	xmm6,XMMWORD[96+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_5:
+	pxor	xmm2,xmm10
+	lea	r12,[80+r12]
+	pxor	xmm3,xmm11
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm3
+	pxor	xmm2,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm5
+	movdqu	XMMWORD[64+r13],xmm2
+	lea	r13,[80+r13]
+
+	movdqa	xmm6,XMMWORD[80+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_4:
+	pxor	xmm1,xmm9
+	lea	r12,[64+r12]
+	pxor	xmm2,xmm10
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm5,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm3
+	movdqu	XMMWORD[48+r13],xmm5
+	lea	r13,[64+r13]
+
+	movdqa	xmm6,XMMWORD[64+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_3:
+	pxor	xmm0,xmm8
+	lea	r12,[48+r12]
+	pxor	xmm1,xmm9
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm3,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm3
+	lea	r13,[48+r13]
+
+	movdqa	xmm6,XMMWORD[48+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_2:
+	pxor	xmm15,xmm7
+	lea	r12,[32+r12]
+	pxor	xmm0,xmm8
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_encrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	lea	r13,[32+r13]
+
+	movdqa	xmm6,XMMWORD[32+rsp]
+	jmp	NEAR $L$xts_enc_done
+ALIGN	16
+$L$xts_enc_1:
+	pxor	xmm7,xmm15
+	lea	r12,[16+r12]
+	movdqa	XMMWORD[32+rbp],xmm7
+	lea	rcx,[32+rbp]
+	lea	rdx,[32+rbp]
+	lea	r8,[r15]
+	call	asm_AES_encrypt
+	pxor	xmm15,XMMWORD[32+rbp]
+
+
+
+
+
+	movdqu	XMMWORD[r13],xmm15
+	lea	r13,[16+r13]
+
+	movdqa	xmm6,XMMWORD[16+rsp]
+
+$L$xts_enc_done:
+	and	ebx,15
+	jz	NEAR $L$xts_enc_ret
+	mov	rdx,r13
+
+$L$xts_enc_steal:
+	movzx	eax,BYTE[r12]
+	movzx	ecx,BYTE[((-16))+rdx]
+	lea	r12,[1+r12]
+	mov	BYTE[((-16))+rdx],al
+	mov	BYTE[rdx],cl
+	lea	rdx,[1+rdx]
+	sub	ebx,1
+	jnz	NEAR $L$xts_enc_steal
+
+	movdqu	xmm15,XMMWORD[((-16))+r13]
+	lea	rcx,[32+rbp]
+	pxor	xmm15,xmm6
+	lea	rdx,[32+rbp]
+	movdqa	XMMWORD[32+rbp],xmm15
+	lea	r8,[r15]
+	call	asm_AES_encrypt
+	pxor	xmm6,XMMWORD[32+rbp]
+	movdqu	XMMWORD[(-16)+r13],xmm6
+
+$L$xts_enc_ret:
+	lea	rax,[rsp]
+	pxor	xmm0,xmm0
+$L$xts_enc_bzero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	lea	rax,[32+rax]
+	cmp	rbp,rax
+	ja	NEAR $L$xts_enc_bzero
+
+	lea	rsp,[rbp]
+	movaps	xmm6,XMMWORD[64+rbp]
+	movaps	xmm7,XMMWORD[80+rbp]
+	movaps	xmm8,XMMWORD[96+rbp]
+	movaps	xmm9,XMMWORD[112+rbp]
+	movaps	xmm10,XMMWORD[128+rbp]
+	movaps	xmm11,XMMWORD[144+rbp]
+	movaps	xmm12,XMMWORD[160+rbp]
+	movaps	xmm13,XMMWORD[176+rbp]
+	movaps	xmm14,XMMWORD[192+rbp]
+	movaps	xmm15,XMMWORD[208+rbp]
+	lea	rsp,[160+rbp]
+	mov	r15,QWORD[72+rsp]
+	mov	r14,QWORD[80+rsp]
+	mov	r13,QWORD[88+rsp]
+	mov	r12,QWORD[96+rsp]
+	mov	rbx,QWORD[104+rsp]
+	mov	rax,QWORD[112+rsp]
+	lea	rsp,[120+rsp]
+	mov	rbp,rax
+$L$xts_enc_epilogue:
+	DB	0F3h,0C3h		;repret
+
+
+global	bsaes_xts_decrypt
+
+ALIGN	16
+bsaes_xts_decrypt:
+	mov	rax,rsp
+$L$xts_dec_prologue:
+	push	rbp
+	push	rbx
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-72))+rsp]
+	mov	r10,QWORD[160+rsp]
+	mov	r11,QWORD[168+rsp]
+	lea	rsp,[((-160))+rsp]
+	movaps	XMMWORD[64+rsp],xmm6
+	movaps	XMMWORD[80+rsp],xmm7
+	movaps	XMMWORD[96+rsp],xmm8
+	movaps	XMMWORD[112+rsp],xmm9
+	movaps	XMMWORD[128+rsp],xmm10
+	movaps	XMMWORD[144+rsp],xmm11
+	movaps	XMMWORD[160+rsp],xmm12
+	movaps	XMMWORD[176+rsp],xmm13
+	movaps	XMMWORD[192+rsp],xmm14
+	movaps	XMMWORD[208+rsp],xmm15
+$L$xts_dec_body:
+	mov	rbp,rsp
+	mov	r12,rcx
+	mov	r13,rdx
+	mov	r14,r8
+	mov	r15,r9
+
+	lea	rcx,[r11]
+	lea	rdx,[32+rbp]
+	lea	r8,[r10]
+	call	asm_AES_encrypt
+
+	mov	eax,DWORD[240+r15]
+	mov	rbx,r14
+
+	mov	edx,eax
+	shl	rax,7
+	sub	rax,96
+	sub	rsp,rax
+
+	mov	rax,rsp
+	mov	rcx,r15
+	mov	r10d,edx
+	call	_bsaes_key_convert
+	pxor	xmm7,XMMWORD[rsp]
+	movdqa	XMMWORD[rax],xmm6
+	movdqa	XMMWORD[rsp],xmm7
+
+	xor	eax,eax
+	and	r14,-16
+	test	ebx,15
+	setnz	al
+	shl	rax,4
+	sub	r14,rax
+
+	sub	rsp,0x80
+	movdqa	xmm6,XMMWORD[32+rbp]
+
+	pxor	xmm14,xmm14
+	movdqa	xmm12,XMMWORD[$L$xts_magic]
+	pcmpgtd	xmm14,xmm6
+
+	sub	r14,0x80
+	jc	NEAR $L$xts_dec_short
+	jmp	NEAR $L$xts_dec_loop
+
+ALIGN	16
+$L$xts_dec_loop:
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm15,xmm6
+	movdqa	XMMWORD[rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm0,xmm6
+	movdqa	XMMWORD[16+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm7,XMMWORD[r12]
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm1,xmm6
+	movdqa	XMMWORD[32+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm8,XMMWORD[16+r12]
+	pxor	xmm15,xmm7
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm2,xmm6
+	movdqa	XMMWORD[48+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm9,XMMWORD[32+r12]
+	pxor	xmm0,xmm8
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm3,xmm6
+	movdqa	XMMWORD[64+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm10,XMMWORD[48+r12]
+	pxor	xmm1,xmm9
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm4,xmm6
+	movdqa	XMMWORD[80+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm11,XMMWORD[64+r12]
+	pxor	xmm2,xmm10
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm5,xmm6
+	movdqa	XMMWORD[96+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm12,XMMWORD[80+r12]
+	pxor	xmm3,xmm11
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm4,xmm12
+	movdqu	xmm14,XMMWORD[112+r12]
+	lea	r12,[128+r12]
+	movdqa	XMMWORD[112+rsp],xmm6
+	pxor	xmm5,xmm13
+	lea	rax,[128+rsp]
+	pxor	xmm6,xmm14
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm3,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm5
+	pxor	xmm1,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm3
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm1
+	pxor	xmm2,XMMWORD[96+rsp]
+	movdqu	XMMWORD[80+r13],xmm6
+	pxor	xmm4,XMMWORD[112+rsp]
+	movdqu	XMMWORD[96+r13],xmm2
+	movdqu	XMMWORD[112+r13],xmm4
+	lea	r13,[128+r13]
+
+	movdqa	xmm6,XMMWORD[112+rsp]
+	pxor	xmm14,xmm14
+	movdqa	xmm12,XMMWORD[$L$xts_magic]
+	pcmpgtd	xmm14,xmm6
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+
+	sub	r14,0x80
+	jnc	NEAR $L$xts_dec_loop
+
+$L$xts_dec_short:
+	add	r14,0x80
+	jz	NEAR $L$xts_dec_done
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm15,xmm6
+	movdqa	XMMWORD[rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm0,xmm6
+	movdqa	XMMWORD[16+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm7,XMMWORD[r12]
+	cmp	r14,16
+	je	NEAR $L$xts_dec_1
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm1,xmm6
+	movdqa	XMMWORD[32+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm8,XMMWORD[16+r12]
+	cmp	r14,32
+	je	NEAR $L$xts_dec_2
+	pxor	xmm15,xmm7
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm2,xmm6
+	movdqa	XMMWORD[48+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm9,XMMWORD[32+r12]
+	cmp	r14,48
+	je	NEAR $L$xts_dec_3
+	pxor	xmm0,xmm8
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm3,xmm6
+	movdqa	XMMWORD[64+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm10,XMMWORD[48+r12]
+	cmp	r14,64
+	je	NEAR $L$xts_dec_4
+	pxor	xmm1,xmm9
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm4,xmm6
+	movdqa	XMMWORD[80+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm11,XMMWORD[64+r12]
+	cmp	r14,80
+	je	NEAR $L$xts_dec_5
+	pxor	xmm2,xmm10
+	pshufd	xmm13,xmm14,0x13
+	pxor	xmm14,xmm14
+	movdqa	xmm5,xmm6
+	movdqa	XMMWORD[96+rsp],xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	pcmpgtd	xmm14,xmm6
+	pxor	xmm6,xmm13
+	movdqu	xmm12,XMMWORD[80+r12]
+	cmp	r14,96
+	je	NEAR $L$xts_dec_6
+	pxor	xmm3,xmm11
+	movdqu	xmm13,XMMWORD[96+r12]
+	pxor	xmm4,xmm12
+	movdqa	XMMWORD[112+rsp],xmm6
+	lea	r12,[112+r12]
+	pxor	xmm5,xmm13
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm3,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm5
+	pxor	xmm1,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm3
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm1
+	pxor	xmm2,XMMWORD[96+rsp]
+	movdqu	XMMWORD[80+r13],xmm6
+	movdqu	XMMWORD[96+r13],xmm2
+	lea	r13,[112+r13]
+
+	movdqa	xmm6,XMMWORD[112+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_6:
+	pxor	xmm3,xmm11
+	lea	r12,[96+r12]
+	pxor	xmm4,xmm12
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm3,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm5
+	pxor	xmm1,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm3
+	pxor	xmm6,XMMWORD[80+rsp]
+	movdqu	XMMWORD[64+r13],xmm1
+	movdqu	XMMWORD[80+r13],xmm6
+	lea	r13,[96+r13]
+
+	movdqa	xmm6,XMMWORD[96+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_5:
+	pxor	xmm2,xmm10
+	lea	r12,[80+r12]
+	pxor	xmm3,xmm11
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm3,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm5
+	pxor	xmm1,XMMWORD[64+rsp]
+	movdqu	XMMWORD[48+r13],xmm3
+	movdqu	XMMWORD[64+r13],xmm1
+	lea	r13,[80+r13]
+
+	movdqa	xmm6,XMMWORD[80+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_4:
+	pxor	xmm1,xmm9
+	lea	r12,[64+r12]
+	pxor	xmm2,xmm10
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	pxor	xmm3,XMMWORD[48+rsp]
+	movdqu	XMMWORD[32+r13],xmm5
+	movdqu	XMMWORD[48+r13],xmm3
+	lea	r13,[64+r13]
+
+	movdqa	xmm6,XMMWORD[64+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_3:
+	pxor	xmm0,xmm8
+	lea	r12,[48+r12]
+	pxor	xmm1,xmm9
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	pxor	xmm5,XMMWORD[32+rsp]
+	movdqu	XMMWORD[16+r13],xmm0
+	movdqu	XMMWORD[32+r13],xmm5
+	lea	r13,[48+r13]
+
+	movdqa	xmm6,XMMWORD[48+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_2:
+	pxor	xmm15,xmm7
+	lea	r12,[32+r12]
+	pxor	xmm0,xmm8
+	lea	rax,[128+rsp]
+	mov	r10d,edx
+
+	call	_bsaes_decrypt8
+
+	pxor	xmm15,XMMWORD[rsp]
+	pxor	xmm0,XMMWORD[16+rsp]
+	movdqu	XMMWORD[r13],xmm15
+	movdqu	XMMWORD[16+r13],xmm0
+	lea	r13,[32+r13]
+
+	movdqa	xmm6,XMMWORD[32+rsp]
+	jmp	NEAR $L$xts_dec_done
+ALIGN	16
+$L$xts_dec_1:
+	pxor	xmm7,xmm15
+	lea	r12,[16+r12]
+	movdqa	XMMWORD[32+rbp],xmm7
+	lea	rcx,[32+rbp]
+	lea	rdx,[32+rbp]
+	lea	r8,[r15]
+	call	asm_AES_decrypt
+	pxor	xmm15,XMMWORD[32+rbp]
+
+
+
+
+
+	movdqu	XMMWORD[r13],xmm15
+	lea	r13,[16+r13]
+
+	movdqa	xmm6,XMMWORD[16+rsp]
+
+$L$xts_dec_done:
+	and	ebx,15
+	jz	NEAR $L$xts_dec_ret
+
+	pxor	xmm14,xmm14
+	movdqa	xmm12,XMMWORD[$L$xts_magic]
+	pcmpgtd	xmm14,xmm6
+	pshufd	xmm13,xmm14,0x13
+	movdqa	xmm5,xmm6
+	paddq	xmm6,xmm6
+	pand	xmm13,xmm12
+	movdqu	xmm15,XMMWORD[r12]
+	pxor	xmm6,xmm13
+
+	lea	rcx,[32+rbp]
+	pxor	xmm15,xmm6
+	lea	rdx,[32+rbp]
+	movdqa	XMMWORD[32+rbp],xmm15
+	lea	r8,[r15]
+	call	asm_AES_decrypt
+	pxor	xmm6,XMMWORD[32+rbp]
+	mov	rdx,r13
+	movdqu	XMMWORD[r13],xmm6
+
+$L$xts_dec_steal:
+	movzx	eax,BYTE[16+r12]
+	movzx	ecx,BYTE[rdx]
+	lea	r12,[1+r12]
+	mov	BYTE[rdx],al
+	mov	BYTE[16+rdx],cl
+	lea	rdx,[1+rdx]
+	sub	ebx,1
+	jnz	NEAR $L$xts_dec_steal
+
+	movdqu	xmm15,XMMWORD[r13]
+	lea	rcx,[32+rbp]
+	pxor	xmm15,xmm5
+	lea	rdx,[32+rbp]
+	movdqa	XMMWORD[32+rbp],xmm15
+	lea	r8,[r15]
+	call	asm_AES_decrypt
+	pxor	xmm5,XMMWORD[32+rbp]
+	movdqu	XMMWORD[r13],xmm5
+
+$L$xts_dec_ret:
+	lea	rax,[rsp]
+	pxor	xmm0,xmm0
+$L$xts_dec_bzero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	lea	rax,[32+rax]
+	cmp	rbp,rax
+	ja	NEAR $L$xts_dec_bzero
+
+	lea	rsp,[rbp]
+	movaps	xmm6,XMMWORD[64+rbp]
+	movaps	xmm7,XMMWORD[80+rbp]
+	movaps	xmm8,XMMWORD[96+rbp]
+	movaps	xmm9,XMMWORD[112+rbp]
+	movaps	xmm10,XMMWORD[128+rbp]
+	movaps	xmm11,XMMWORD[144+rbp]
+	movaps	xmm12,XMMWORD[160+rbp]
+	movaps	xmm13,XMMWORD[176+rbp]
+	movaps	xmm14,XMMWORD[192+rbp]
+	movaps	xmm15,XMMWORD[208+rbp]
+	lea	rsp,[160+rbp]
+	mov	r15,QWORD[72+rsp]
+	mov	r14,QWORD[80+rsp]
+	mov	r13,QWORD[88+rsp]
+	mov	r12,QWORD[96+rsp]
+	mov	rbx,QWORD[104+rsp]
+	mov	rax,QWORD[112+rsp]
+	lea	rsp,[120+rsp]
+	mov	rbp,rax
+$L$xts_dec_epilogue:
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	64
+_bsaes_const:
+$L$M0ISR:
+	DQ	0x0a0e0206070b0f03,0x0004080c0d010509
+$L$ISRM0:
+	DQ	0x01040b0e0205080f,0x0306090c00070a0d
+$L$ISR:
+	DQ	0x0504070602010003,0x0f0e0d0c080b0a09
+$L$BS0:
+	DQ	0x5555555555555555,0x5555555555555555
+$L$BS1:
+	DQ	0x3333333333333333,0x3333333333333333
+$L$BS2:
+	DQ	0x0f0f0f0f0f0f0f0f,0x0f0f0f0f0f0f0f0f
+$L$SR:
+	DQ	0x0504070600030201,0x0f0e0d0c0a09080b
+$L$SRM0:
+	DQ	0x0304090e00050a0f,0x01060b0c0207080d
+$L$M0SR:
+	DQ	0x0a0e02060f03070b,0x0004080c05090d01
+$L$SWPUP:
+	DQ	0x0706050403020100,0x0c0d0e0f0b0a0908
+$L$SWPUPM0SR:
+	DQ	0x0a0d02060c03070b,0x0004080f05090e01
+$L$ADD1:
+	DQ	0x0000000000000000,0x0000000100000000
+$L$ADD2:
+	DQ	0x0000000000000000,0x0000000200000000
+$L$ADD3:
+	DQ	0x0000000000000000,0x0000000300000000
+$L$ADD4:
+	DQ	0x0000000000000000,0x0000000400000000
+$L$ADD5:
+	DQ	0x0000000000000000,0x0000000500000000
+$L$ADD6:
+	DQ	0x0000000000000000,0x0000000600000000
+$L$ADD7:
+	DQ	0x0000000000000000,0x0000000700000000
+$L$ADD8:
+	DQ	0x0000000000000000,0x0000000800000000
+$L$xts_magic:
+	DD	0x87,0,1,0
+$L$masks:
+	DQ	0x0101010101010101,0x0101010101010101
+	DQ	0x0202020202020202,0x0202020202020202
+	DQ	0x0404040404040404,0x0404040404040404
+	DQ	0x0808080808080808,0x0808080808080808
+$L$M0:
+	DQ	0x02060a0e03070b0f,0x0004080c0105090d
+$L$63:
+	DQ	0x6363636363636363,0x6363636363636363
+DB	66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102
+DB	111,114,32,120,56,54,95,54,52,47,83,83,83,69,51,44
+DB	32,69,109,105,108,105,97,32,75,195,164,115,112,101,114,44
+DB	32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32
+DB	65,110,100,121,32,80,111,108,121,97,107,111,118,0
+ALIGN	64
+
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	mov	rax,QWORD[160+r8]
+
+	lea	rsi,[64+rax]
+	lea	rdi,[512+r8]
+	mov	ecx,20
+	DD	0xa548f3fc
+	lea	rax,[160+rax]
+
+	mov	rbp,QWORD[112+rax]
+	mov	rbx,QWORD[104+rax]
+	mov	r12,QWORD[96+rax]
+	mov	r13,QWORD[88+rax]
+	mov	r14,QWORD[80+rax]
+	mov	r15,QWORD[72+rax]
+	lea	rax,[120+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_prologue:
+	mov	QWORD[152+r8],rax
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$cbc_dec_prologue wrt ..imagebase
+	DD	$L$cbc_dec_epilogue wrt ..imagebase
+	DD	$L$cbc_dec_info wrt ..imagebase
+
+	DD	$L$ctr_enc_prologue wrt ..imagebase
+	DD	$L$ctr_enc_epilogue wrt ..imagebase
+	DD	$L$ctr_enc_info wrt ..imagebase
+
+	DD	$L$xts_enc_prologue wrt ..imagebase
+	DD	$L$xts_enc_epilogue wrt ..imagebase
+	DD	$L$xts_enc_info wrt ..imagebase
+
+	DD	$L$xts_dec_prologue wrt ..imagebase
+	DD	$L$xts_dec_epilogue wrt ..imagebase
+	DD	$L$xts_dec_info wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$cbc_dec_info:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$cbc_dec_body wrt ..imagebase,$L$cbc_dec_epilogue wrt ..imagebase
+$L$ctr_enc_info:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$ctr_enc_body wrt ..imagebase,$L$ctr_enc_epilogue wrt ..imagebase
+$L$xts_enc_info:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$xts_enc_body wrt ..imagebase,$L$xts_enc_epilogue wrt ..imagebase
+$L$xts_dec_info:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$xts_dec_body wrt ..imagebase,$L$xts_dec_epilogue wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm
new file mode 100644
index 0000000..3edde9f
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/aes/vpaes-x86_64.asm
@@ -0,0 +1,1137 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_encrypt_core:
+	mov	r9,rdx
+	mov	r11,16
+	mov	eax,DWORD[240+rdx]
+	movdqa	xmm1,xmm9
+	movdqa	xmm2,XMMWORD[$L$k_ipt]
+	pandn	xmm1,xmm0
+	movdqu	xmm5,XMMWORD[r9]
+	psrld	xmm1,4
+	pand	xmm0,xmm9
+DB	102,15,56,0,208
+	movdqa	xmm0,XMMWORD[(($L$k_ipt+16))]
+DB	102,15,56,0,193
+	pxor	xmm2,xmm5
+	add	r9,16
+	pxor	xmm0,xmm2
+	lea	r10,[$L$k_mc_backward]
+	jmp	NEAR $L$enc_entry
+
+ALIGN	16
+$L$enc_loop:
+
+	movdqa	xmm4,xmm13
+	movdqa	xmm0,xmm12
+DB	102,15,56,0,226
+DB	102,15,56,0,195
+	pxor	xmm4,xmm5
+	movdqa	xmm5,xmm15
+	pxor	xmm0,xmm4
+	movdqa	xmm1,XMMWORD[((-64))+r10*1+r11]
+DB	102,15,56,0,234
+	movdqa	xmm4,XMMWORD[r10*1+r11]
+	movdqa	xmm2,xmm14
+DB	102,15,56,0,211
+	movdqa	xmm3,xmm0
+	pxor	xmm2,xmm5
+DB	102,15,56,0,193
+	add	r9,16
+	pxor	xmm0,xmm2
+DB	102,15,56,0,220
+	add	r11,16
+	pxor	xmm3,xmm0
+DB	102,15,56,0,193
+	and	r11,0x30
+	sub	rax,1
+	pxor	xmm0,xmm3
+
+$L$enc_entry:
+
+	movdqa	xmm1,xmm9
+	movdqa	xmm5,xmm11
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm9
+DB	102,15,56,0,232
+	movdqa	xmm3,xmm10
+	pxor	xmm0,xmm1
+DB	102,15,56,0,217
+	movdqa	xmm4,xmm10
+	pxor	xmm3,xmm5
+DB	102,15,56,0,224
+	movdqa	xmm2,xmm10
+	pxor	xmm4,xmm5
+DB	102,15,56,0,211
+	movdqa	xmm3,xmm10
+	pxor	xmm2,xmm0
+DB	102,15,56,0,220
+	movdqu	xmm5,XMMWORD[r9]
+	pxor	xmm3,xmm1
+	jnz	NEAR $L$enc_loop
+
+
+	movdqa	xmm4,XMMWORD[((-96))+r10]
+	movdqa	xmm0,XMMWORD[((-80))+r10]
+DB	102,15,56,0,226
+	pxor	xmm4,xmm5
+DB	102,15,56,0,195
+	movdqa	xmm1,XMMWORD[64+r10*1+r11]
+	pxor	xmm0,xmm4
+DB	102,15,56,0,193
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_decrypt_core:
+	mov	r9,rdx
+	mov	eax,DWORD[240+rdx]
+	movdqa	xmm1,xmm9
+	movdqa	xmm2,XMMWORD[$L$k_dipt]
+	pandn	xmm1,xmm0
+	mov	r11,rax
+	psrld	xmm1,4
+	movdqu	xmm5,XMMWORD[r9]
+	shl	r11,4
+	pand	xmm0,xmm9
+DB	102,15,56,0,208
+	movdqa	xmm0,XMMWORD[(($L$k_dipt+16))]
+	xor	r11,0x30
+	lea	r10,[$L$k_dsbd]
+DB	102,15,56,0,193
+	and	r11,0x30
+	pxor	xmm2,xmm5
+	movdqa	xmm5,XMMWORD[(($L$k_mc_forward+48))]
+	pxor	xmm0,xmm2
+	add	r9,16
+	add	r11,r10
+	jmp	NEAR $L$dec_entry
+
+ALIGN	16
+$L$dec_loop:
+
+
+
+	movdqa	xmm4,XMMWORD[((-32))+r10]
+	movdqa	xmm1,XMMWORD[((-16))+r10]
+DB	102,15,56,0,226
+DB	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,XMMWORD[r10]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,XMMWORD[16+r10]
+
+DB	102,15,56,0,226
+DB	102,15,56,0,197
+DB	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,XMMWORD[32+r10]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,XMMWORD[48+r10]
+
+DB	102,15,56,0,226
+DB	102,15,56,0,197
+DB	102,15,56,0,203
+	pxor	xmm0,xmm4
+	movdqa	xmm4,XMMWORD[64+r10]
+	pxor	xmm0,xmm1
+	movdqa	xmm1,XMMWORD[80+r10]
+
+DB	102,15,56,0,226
+DB	102,15,56,0,197
+DB	102,15,56,0,203
+	pxor	xmm0,xmm4
+	add	r9,16
+DB	102,15,58,15,237,12
+	pxor	xmm0,xmm1
+	sub	rax,1
+
+$L$dec_entry:
+
+	movdqa	xmm1,xmm9
+	pandn	xmm1,xmm0
+	movdqa	xmm2,xmm11
+	psrld	xmm1,4
+	pand	xmm0,xmm9
+DB	102,15,56,0,208
+	movdqa	xmm3,xmm10
+	pxor	xmm0,xmm1
+DB	102,15,56,0,217
+	movdqa	xmm4,xmm10
+	pxor	xmm3,xmm2
+DB	102,15,56,0,224
+	pxor	xmm4,xmm2
+	movdqa	xmm2,xmm10
+DB	102,15,56,0,211
+	movdqa	xmm3,xmm10
+	pxor	xmm2,xmm0
+DB	102,15,56,0,220
+	movdqu	xmm0,XMMWORD[r9]
+	pxor	xmm3,xmm1
+	jnz	NEAR $L$dec_loop
+
+
+	movdqa	xmm4,XMMWORD[96+r10]
+DB	102,15,56,0,226
+	pxor	xmm4,xmm0
+	movdqa	xmm0,XMMWORD[112+r10]
+	movdqa	xmm2,XMMWORD[((-352))+r11]
+DB	102,15,56,0,195
+	pxor	xmm0,xmm4
+DB	102,15,56,0,194
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_schedule_core:
+
+
+
+
+
+	call	_vpaes_preheat
+	movdqa	xmm8,XMMWORD[$L$k_rcon]
+	movdqu	xmm0,XMMWORD[rdi]
+
+
+	movdqa	xmm3,xmm0
+	lea	r11,[$L$k_ipt]
+	call	_vpaes_schedule_transform
+	movdqa	xmm7,xmm0
+
+	lea	r10,[$L$k_sr]
+	test	rcx,rcx
+	jnz	NEAR $L$schedule_am_decrypting
+
+
+	movdqu	XMMWORD[rdx],xmm0
+	jmp	NEAR $L$schedule_go
+
+$L$schedule_am_decrypting:
+
+	movdqa	xmm1,XMMWORD[r10*1+r8]
+DB	102,15,56,0,217
+	movdqu	XMMWORD[rdx],xmm3
+	xor	r8,0x30
+
+$L$schedule_go:
+	cmp	esi,192
+	ja	NEAR $L$schedule_256
+	je	NEAR $L$schedule_192
+
+
+
+
+
+
+
+
+
+
+$L$schedule_128:
+	mov	esi,10
+
+$L$oop_schedule_128:
+	call	_vpaes_schedule_round
+	dec	rsi
+	jz	NEAR $L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	jmp	NEAR $L$oop_schedule_128
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+$L$schedule_192:
+	movdqu	xmm0,XMMWORD[8+rdi]
+	call	_vpaes_schedule_transform
+	movdqa	xmm6,xmm0
+	pxor	xmm4,xmm4
+	movhlps	xmm6,xmm4
+	mov	esi,4
+
+$L$oop_schedule_192:
+	call	_vpaes_schedule_round
+DB	102,15,58,15,198,8
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_round
+	dec	rsi
+	jz	NEAR $L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+	call	_vpaes_schedule_192_smear
+	jmp	NEAR $L$oop_schedule_192
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+$L$schedule_256:
+	movdqu	xmm0,XMMWORD[16+rdi]
+	call	_vpaes_schedule_transform
+	mov	esi,7
+
+$L$oop_schedule_256:
+	call	_vpaes_schedule_mangle
+	movdqa	xmm6,xmm0
+
+
+	call	_vpaes_schedule_round
+	dec	rsi
+	jz	NEAR $L$schedule_mangle_last
+	call	_vpaes_schedule_mangle
+
+
+	pshufd	xmm0,xmm0,0xFF
+	movdqa	xmm5,xmm7
+	movdqa	xmm7,xmm6
+	call	_vpaes_schedule_low_round
+	movdqa	xmm7,xmm5
+
+	jmp	NEAR $L$oop_schedule_256
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+$L$schedule_mangle_last:
+
+	lea	r11,[$L$k_deskew]
+	test	rcx,rcx
+	jnz	NEAR $L$schedule_mangle_last_dec
+
+
+	movdqa	xmm1,XMMWORD[r10*1+r8]
+DB	102,15,56,0,193
+	lea	r11,[$L$k_opt]
+	add	rdx,32
+
+$L$schedule_mangle_last_dec:
+	add	rdx,-16
+	pxor	xmm0,XMMWORD[$L$k_s63]
+	call	_vpaes_schedule_transform
+	movdqu	XMMWORD[rdx],xmm0
+
+
+	pxor	xmm0,xmm0
+	pxor	xmm1,xmm1
+	pxor	xmm2,xmm2
+	pxor	xmm3,xmm3
+	pxor	xmm4,xmm4
+	pxor	xmm5,xmm5
+	pxor	xmm6,xmm6
+	pxor	xmm7,xmm7
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_schedule_192_smear:
+	pshufd	xmm1,xmm6,0x80
+	pshufd	xmm0,xmm7,0xFE
+	pxor	xmm6,xmm1
+	pxor	xmm1,xmm1
+	pxor	xmm6,xmm0
+	movdqa	xmm0,xmm6
+	movhlps	xmm6,xmm1
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_schedule_round:
+
+	pxor	xmm1,xmm1
+DB	102,65,15,58,15,200,15
+DB	102,69,15,58,15,192,15
+	pxor	xmm7,xmm1
+
+
+	pshufd	xmm0,xmm0,0xFF
+DB	102,15,58,15,192,1
+
+
+
+
+_vpaes_schedule_low_round:
+
+	movdqa	xmm1,xmm7
+	pslldq	xmm7,4
+	pxor	xmm7,xmm1
+	movdqa	xmm1,xmm7
+	pslldq	xmm7,8
+	pxor	xmm7,xmm1
+	pxor	xmm7,XMMWORD[$L$k_s63]
+
+
+	movdqa	xmm1,xmm9
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm9
+	movdqa	xmm2,xmm11
+DB	102,15,56,0,208
+	pxor	xmm0,xmm1
+	movdqa	xmm3,xmm10
+DB	102,15,56,0,217
+	pxor	xmm3,xmm2
+	movdqa	xmm4,xmm10
+DB	102,15,56,0,224
+	pxor	xmm4,xmm2
+	movdqa	xmm2,xmm10
+DB	102,15,56,0,211
+	pxor	xmm2,xmm0
+	movdqa	xmm3,xmm10
+DB	102,15,56,0,220
+	pxor	xmm3,xmm1
+	movdqa	xmm4,xmm13
+DB	102,15,56,0,226
+	movdqa	xmm0,xmm12
+DB	102,15,56,0,195
+	pxor	xmm0,xmm4
+
+
+	pxor	xmm0,xmm7
+	movdqa	xmm7,xmm0
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_schedule_transform:
+	movdqa	xmm1,xmm9
+	pandn	xmm1,xmm0
+	psrld	xmm1,4
+	pand	xmm0,xmm9
+	movdqa	xmm2,XMMWORD[r11]
+DB	102,15,56,0,208
+	movdqa	xmm0,XMMWORD[16+r11]
+DB	102,15,56,0,193
+	pxor	xmm0,xmm2
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_schedule_mangle:
+	movdqa	xmm4,xmm0
+	movdqa	xmm5,XMMWORD[$L$k_mc_forward]
+	test	rcx,rcx
+	jnz	NEAR $L$schedule_mangle_dec
+
+
+	add	rdx,16
+	pxor	xmm4,XMMWORD[$L$k_s63]
+DB	102,15,56,0,229
+	movdqa	xmm3,xmm4
+DB	102,15,56,0,229
+	pxor	xmm3,xmm4
+DB	102,15,56,0,229
+	pxor	xmm3,xmm4
+
+	jmp	NEAR $L$schedule_mangle_both
+ALIGN	16
+$L$schedule_mangle_dec:
+
+	lea	r11,[$L$k_dksd]
+	movdqa	xmm1,xmm9
+	pandn	xmm1,xmm4
+	psrld	xmm1,4
+	pand	xmm4,xmm9
+
+	movdqa	xmm2,XMMWORD[r11]
+DB	102,15,56,0,212
+	movdqa	xmm3,XMMWORD[16+r11]
+DB	102,15,56,0,217
+	pxor	xmm3,xmm2
+DB	102,15,56,0,221
+
+	movdqa	xmm2,XMMWORD[32+r11]
+DB	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,XMMWORD[48+r11]
+DB	102,15,56,0,217
+	pxor	xmm3,xmm2
+DB	102,15,56,0,221
+
+	movdqa	xmm2,XMMWORD[64+r11]
+DB	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,XMMWORD[80+r11]
+DB	102,15,56,0,217
+	pxor	xmm3,xmm2
+DB	102,15,56,0,221
+
+	movdqa	xmm2,XMMWORD[96+r11]
+DB	102,15,56,0,212
+	pxor	xmm2,xmm3
+	movdqa	xmm3,XMMWORD[112+r11]
+DB	102,15,56,0,217
+	pxor	xmm3,xmm2
+
+	add	rdx,-16
+
+$L$schedule_mangle_both:
+	movdqa	xmm1,XMMWORD[r10*1+r8]
+DB	102,15,56,0,217
+	add	r8,-16
+	and	r8,0x30
+	movdqu	XMMWORD[rdx],xmm3
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+global	vpaes_set_encrypt_key
+
+ALIGN	16
+vpaes_set_encrypt_key:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_vpaes_set_encrypt_key:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	rsp,[((-184))+rsp]
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$enc_key_body:
+	mov	eax,esi
+	shr	eax,5
+	add	eax,5
+	mov	DWORD[240+rdx],eax
+
+	mov	ecx,0
+	mov	r8d,0x30
+	call	_vpaes_schedule_core
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	xmm15,XMMWORD[160+rsp]
+	lea	rsp,[184+rsp]
+$L$enc_key_epilogue:
+	xor	eax,eax
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_vpaes_set_encrypt_key:
+
+global	vpaes_set_decrypt_key
+
+ALIGN	16
+vpaes_set_decrypt_key:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_vpaes_set_decrypt_key:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	rsp,[((-184))+rsp]
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$dec_key_body:
+	mov	eax,esi
+	shr	eax,5
+	add	eax,5
+	mov	DWORD[240+rdx],eax
+	shl	eax,4
+	lea	rdx,[16+rax*1+rdx]
+
+	mov	ecx,1
+	mov	r8d,esi
+	shr	r8d,1
+	and	r8d,32
+	xor	r8d,32
+	call	_vpaes_schedule_core
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	xmm15,XMMWORD[160+rsp]
+	lea	rsp,[184+rsp]
+$L$dec_key_epilogue:
+	xor	eax,eax
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_vpaes_set_decrypt_key:
+
+global	vpaes_encrypt
+
+ALIGN	16
+vpaes_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_vpaes_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	rsp,[((-184))+rsp]
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$enc_body:
+	movdqu	xmm0,XMMWORD[rdi]
+	call	_vpaes_preheat
+	call	_vpaes_encrypt_core
+	movdqu	XMMWORD[rsi],xmm0
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	xmm15,XMMWORD[160+rsp]
+	lea	rsp,[184+rsp]
+$L$enc_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_vpaes_encrypt:
+
+global	vpaes_decrypt
+
+ALIGN	16
+vpaes_decrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_vpaes_decrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	rsp,[((-184))+rsp]
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$dec_body:
+	movdqu	xmm0,XMMWORD[rdi]
+	call	_vpaes_preheat
+	call	_vpaes_decrypt_core
+	movdqu	XMMWORD[rsi],xmm0
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	xmm15,XMMWORD[160+rsp]
+	lea	rsp,[184+rsp]
+$L$dec_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_vpaes_decrypt:
+global	vpaes_cbc_encrypt
+
+ALIGN	16
+vpaes_cbc_encrypt:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_vpaes_cbc_encrypt:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	xchg	rdx,rcx
+	sub	rcx,16
+	jc	NEAR $L$cbc_abort
+	lea	rsp,[((-184))+rsp]
+	movaps	XMMWORD[16+rsp],xmm6
+	movaps	XMMWORD[32+rsp],xmm7
+	movaps	XMMWORD[48+rsp],xmm8
+	movaps	XMMWORD[64+rsp],xmm9
+	movaps	XMMWORD[80+rsp],xmm10
+	movaps	XMMWORD[96+rsp],xmm11
+	movaps	XMMWORD[112+rsp],xmm12
+	movaps	XMMWORD[128+rsp],xmm13
+	movaps	XMMWORD[144+rsp],xmm14
+	movaps	XMMWORD[160+rsp],xmm15
+$L$cbc_body:
+	movdqu	xmm6,XMMWORD[r8]
+	sub	rsi,rdi
+	call	_vpaes_preheat
+	cmp	r9d,0
+	je	NEAR $L$cbc_dec_loop
+	jmp	NEAR $L$cbc_enc_loop
+ALIGN	16
+$L$cbc_enc_loop:
+	movdqu	xmm0,XMMWORD[rdi]
+	pxor	xmm0,xmm6
+	call	_vpaes_encrypt_core
+	movdqa	xmm6,xmm0
+	movdqu	XMMWORD[rdi*1+rsi],xmm0
+	lea	rdi,[16+rdi]
+	sub	rcx,16
+	jnc	NEAR $L$cbc_enc_loop
+	jmp	NEAR $L$cbc_done
+ALIGN	16
+$L$cbc_dec_loop:
+	movdqu	xmm0,XMMWORD[rdi]
+	movdqa	xmm7,xmm0
+	call	_vpaes_decrypt_core
+	pxor	xmm0,xmm6
+	movdqa	xmm6,xmm7
+	movdqu	XMMWORD[rdi*1+rsi],xmm0
+	lea	rdi,[16+rdi]
+	sub	rcx,16
+	jnc	NEAR $L$cbc_dec_loop
+$L$cbc_done:
+	movdqu	XMMWORD[r8],xmm6
+	movaps	xmm6,XMMWORD[16+rsp]
+	movaps	xmm7,XMMWORD[32+rsp]
+	movaps	xmm8,XMMWORD[48+rsp]
+	movaps	xmm9,XMMWORD[64+rsp]
+	movaps	xmm10,XMMWORD[80+rsp]
+	movaps	xmm11,XMMWORD[96+rsp]
+	movaps	xmm12,XMMWORD[112+rsp]
+	movaps	xmm13,XMMWORD[128+rsp]
+	movaps	xmm14,XMMWORD[144+rsp]
+	movaps	xmm15,XMMWORD[160+rsp]
+	lea	rsp,[184+rsp]
+$L$cbc_epilogue:
+$L$cbc_abort:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_vpaes_cbc_encrypt:
+
+
+
+
+
+
+
+ALIGN	16
+_vpaes_preheat:
+	lea	r10,[$L$k_s0F]
+	movdqa	xmm10,XMMWORD[((-32))+r10]
+	movdqa	xmm11,XMMWORD[((-16))+r10]
+	movdqa	xmm9,XMMWORD[r10]
+	movdqa	xmm13,XMMWORD[48+r10]
+	movdqa	xmm12,XMMWORD[64+r10]
+	movdqa	xmm15,XMMWORD[80+r10]
+	movdqa	xmm14,XMMWORD[96+r10]
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+
+
+ALIGN	64
+_vpaes_consts:
+$L$k_inv:
+	DQ	0x0E05060F0D080180,0x040703090A0B0C02
+	DQ	0x01040A060F0B0780,0x030D0E0C02050809
+
+$L$k_s0F:
+	DQ	0x0F0F0F0F0F0F0F0F,0x0F0F0F0F0F0F0F0F
+
+$L$k_ipt:
+	DQ	0xC2B2E8985A2A7000,0xCABAE09052227808
+	DQ	0x4C01307D317C4D00,0xCD80B1FCB0FDCC81
+
+$L$k_sb1:
+	DQ	0xB19BE18FCB503E00,0xA5DF7A6E142AF544
+	DQ	0x3618D415FAE22300,0x3BF7CCC10D2ED9EF
+$L$k_sb2:
+	DQ	0xE27A93C60B712400,0x5EB7E955BC982FCD
+	DQ	0x69EB88400AE12900,0xC2A163C8AB82234A
+$L$k_sbo:
+	DQ	0xD0D26D176FBDC700,0x15AABF7AC502A878
+	DQ	0xCFE474A55FBB6A00,0x8E1E90D1412B35FA
+
+$L$k_mc_forward:
+	DQ	0x0407060500030201,0x0C0F0E0D080B0A09
+	DQ	0x080B0A0904070605,0x000302010C0F0E0D
+	DQ	0x0C0F0E0D080B0A09,0x0407060500030201
+	DQ	0x000302010C0F0E0D,0x080B0A0904070605
+
+$L$k_mc_backward:
+	DQ	0x0605040702010003,0x0E0D0C0F0A09080B
+	DQ	0x020100030E0D0C0F,0x0A09080B06050407
+	DQ	0x0E0D0C0F0A09080B,0x0605040702010003
+	DQ	0x0A09080B06050407,0x020100030E0D0C0F
+
+$L$k_sr:
+	DQ	0x0706050403020100,0x0F0E0D0C0B0A0908
+	DQ	0x030E09040F0A0500,0x0B06010C07020D08
+	DQ	0x0F060D040B020900,0x070E050C030A0108
+	DQ	0x0B0E0104070A0D00,0x0306090C0F020508
+
+$L$k_rcon:
+	DQ	0x1F8391B9AF9DEEB6,0x702A98084D7C7D81
+
+$L$k_s63:
+	DQ	0x5B5B5B5B5B5B5B5B,0x5B5B5B5B5B5B5B5B
+
+$L$k_opt:
+	DQ	0xFF9F4929D6B66000,0xF7974121DEBE6808
+	DQ	0x01EDBD5150BCEC00,0xE10D5DB1B05C0CE0
+
+$L$k_deskew:
+	DQ	0x07E4A34047A4E300,0x1DFEB95A5DBEF91A
+	DQ	0x5F36B5DC83EA6900,0x2841C2ABF49D1E77
+
+
+
+
+
+$L$k_dksd:
+	DQ	0xFEB91A5DA3E44700,0x0740E3A45A1DBEF9
+	DQ	0x41C277F4B5368300,0x5FDC69EAAB289D1E
+$L$k_dksb:
+	DQ	0x9A4FCA1F8550D500,0x03D653861CC94C99
+	DQ	0x115BEDA7B6FC4A00,0xD993256F7E3482C8
+$L$k_dkse:
+	DQ	0xD5031CCA1FC9D600,0x53859A4C994F5086
+	DQ	0xA23196054FDC7BE8,0xCD5EF96A20B31487
+$L$k_dks9:
+	DQ	0xB6116FC87ED9A700,0x4AED933482255BFC
+	DQ	0x4576516227143300,0x8BB89FACE9DAFDCE
+
+
+
+
+
+$L$k_dipt:
+	DQ	0x0F505B040B545F00,0x154A411E114E451A
+	DQ	0x86E383E660056500,0x12771772F491F194
+
+$L$k_dsb9:
+	DQ	0x851C03539A86D600,0xCAD51F504F994CC9
+	DQ	0xC03B1789ECD74900,0x725E2C9EB2FBA565
+$L$k_dsbd:
+	DQ	0x7D57CCDFE6B1A200,0xF56E9B13882A4439
+	DQ	0x3CE2FAF724C6CB00,0x2931180D15DEEFD3
+$L$k_dsbb:
+	DQ	0xD022649296B44200,0x602646F6B0F2D404
+	DQ	0xC19498A6CD596700,0xF3FF0C3E3255AA6B
+$L$k_dsbe:
+	DQ	0x46F2929626D4D000,0x2242600464B4F6B0
+	DQ	0x0C55A6CDFFAAC100,0x9467F36B98593E32
+$L$k_dsbo:
+	DQ	0x1387EA537EF94000,0xC7AA6DB9D4943E2D
+	DQ	0x12D7560F93441D00,0xCA4B8159D8C58E9C
+DB	86,101,99,116,111,114,32,80,101,114,109,117,116,97,116,105
+DB	111,110,32,65,69,83,32,102,111,114,32,120,56,54,95,54
+DB	52,47,83,83,83,69,51,44,32,77,105,107,101,32,72,97
+DB	109,98,117,114,103,32,40,83,116,97,110,102,111,114,100,32
+DB	85,110,105,118,101,114,115,105,116,121,41,0
+ALIGN	64
+
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	lea	rsi,[16+rax]
+	lea	rdi,[512+r8]
+	mov	ecx,20
+	DD	0xa548f3fc
+	lea	rax,[184+rax]
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_vpaes_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_end_vpaes_set_encrypt_key wrt ..imagebase
+	DD	$L$SEH_info_vpaes_set_encrypt_key wrt ..imagebase
+
+	DD	$L$SEH_begin_vpaes_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_end_vpaes_set_decrypt_key wrt ..imagebase
+	DD	$L$SEH_info_vpaes_set_decrypt_key wrt ..imagebase
+
+	DD	$L$SEH_begin_vpaes_encrypt wrt ..imagebase
+	DD	$L$SEH_end_vpaes_encrypt wrt ..imagebase
+	DD	$L$SEH_info_vpaes_encrypt wrt ..imagebase
+
+	DD	$L$SEH_begin_vpaes_decrypt wrt ..imagebase
+	DD	$L$SEH_end_vpaes_decrypt wrt ..imagebase
+	DD	$L$SEH_info_vpaes_decrypt wrt ..imagebase
+
+	DD	$L$SEH_begin_vpaes_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_end_vpaes_cbc_encrypt wrt ..imagebase
+	DD	$L$SEH_info_vpaes_cbc_encrypt wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_vpaes_set_encrypt_key:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$enc_key_body wrt ..imagebase,$L$enc_key_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_set_decrypt_key:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$dec_key_body wrt ..imagebase,$L$dec_key_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_encrypt:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$enc_body wrt ..imagebase,$L$enc_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_decrypt:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$dec_body wrt ..imagebase,$L$dec_epilogue wrt ..imagebase
+$L$SEH_info_vpaes_cbc_encrypt:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$cbc_body wrt ..imagebase,$L$cbc_epilogue wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm
new file mode 100644
index 0000000..45d0fd4
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-avx2.asm
@@ -0,0 +1,30 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+global	rsaz_avx2_eligible
+
+rsaz_avx2_eligible:
+	xor	eax,eax
+	DB	0F3h,0C3h		;repret
+
+
+global	rsaz_1024_sqr_avx2
+global	rsaz_1024_mul_avx2
+global	rsaz_1024_norm2red_avx2
+global	rsaz_1024_red2norm_avx2
+global	rsaz_1024_scatter5_avx2
+global	rsaz_1024_gather5_avx2
+
+rsaz_1024_sqr_avx2:
+rsaz_1024_mul_avx2:
+rsaz_1024_norm2red_avx2:
+rsaz_1024_red2norm_avx2:
+rsaz_1024_scatter5_avx2:
+rsaz_1024_gather5_avx2:
+DB	0x0f,0x0b
+	DB	0F3h,0C3h		;repret
+
diff --git a/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm
new file mode 100644
index 0000000..04d5e39
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/bn/rsaz-x86_64.asm
@@ -0,0 +1,1320 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	rsaz_512_sqr
+
+ALIGN	32
+rsaz_512_sqr:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rsaz_512_sqr:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	sub	rsp,128+24
+$L$sqr_body:
+	mov	rbp,rdx
+	mov	rdx,QWORD[rsi]
+	mov	rax,QWORD[8+rsi]
+	mov	QWORD[128+rsp],rcx
+	jmp	NEAR $L$oop_sqr
+
+ALIGN	32
+$L$oop_sqr:
+	mov	DWORD[((128+8))+rsp],r8d
+
+	mov	rbx,rdx
+	mul	rdx
+	mov	r8,rax
+	mov	rax,QWORD[16+rsi]
+	mov	r9,rdx
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[24+rsi]
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[32+rsi]
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[40+rsi]
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[48+rsi]
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[56+rsi]
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,rbx
+	mov	r15,rdx
+	adc	r15,0
+
+	add	r8,r8
+	mov	rcx,r9
+	adc	r9,r9
+
+	mul	rax
+	mov	QWORD[rsp],rax
+	add	r8,rdx
+	adc	r9,0
+
+	mov	QWORD[8+rsp],r8
+	shr	rcx,63
+
+
+	mov	r8,QWORD[8+rsi]
+	mov	rax,QWORD[16+rsi]
+	mul	r8
+	add	r10,rax
+	mov	rax,QWORD[24+rsi]
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r8
+	add	r11,rax
+	mov	rax,QWORD[32+rsi]
+	adc	rdx,0
+	add	r11,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r8
+	add	r12,rax
+	mov	rax,QWORD[40+rsi]
+	adc	rdx,0
+	add	r12,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r8
+	add	r13,rax
+	mov	rax,QWORD[48+rsi]
+	adc	rdx,0
+	add	r13,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r8
+	add	r14,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	add	r14,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r8
+	add	r15,rax
+	mov	rax,r8
+	adc	rdx,0
+	add	r15,rbx
+	mov	r8,rdx
+	mov	rdx,r10
+	adc	r8,0
+
+	add	rdx,rdx
+	lea	r10,[r10*2+rcx]
+	mov	rbx,r11
+	adc	r11,r11
+
+	mul	rax
+	add	r9,rax
+	adc	r10,rdx
+	adc	r11,0
+
+	mov	QWORD[16+rsp],r9
+	mov	QWORD[24+rsp],r10
+	shr	rbx,63
+
+
+	mov	r9,QWORD[16+rsi]
+	mov	rax,QWORD[24+rsi]
+	mul	r9
+	add	r12,rax
+	mov	rax,QWORD[32+rsi]
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r9
+	add	r13,rax
+	mov	rax,QWORD[40+rsi]
+	adc	rdx,0
+	add	r13,rcx
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r9
+	add	r14,rax
+	mov	rax,QWORD[48+rsi]
+	adc	rdx,0
+	add	r14,rcx
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r9
+	mov	r10,r12
+	lea	r12,[r12*2+rbx]
+	add	r15,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	add	r15,rcx
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r9
+	shr	r10,63
+	add	r8,rax
+	mov	rax,r9
+	adc	rdx,0
+	add	r8,rcx
+	mov	r9,rdx
+	adc	r9,0
+
+	mov	rcx,r13
+	lea	r13,[r13*2+r10]
+
+	mul	rax
+	add	r11,rax
+	adc	r12,rdx
+	adc	r13,0
+
+	mov	QWORD[32+rsp],r11
+	mov	QWORD[40+rsp],r12
+	shr	rcx,63
+
+
+	mov	r10,QWORD[24+rsi]
+	mov	rax,QWORD[32+rsi]
+	mul	r10
+	add	r14,rax
+	mov	rax,QWORD[40+rsi]
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r10
+	add	r15,rax
+	mov	rax,QWORD[48+rsi]
+	adc	rdx,0
+	add	r15,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r10
+	mov	r12,r14
+	lea	r14,[r14*2+rcx]
+	add	r8,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	add	r8,rbx
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r10
+	shr	r12,63
+	add	r9,rax
+	mov	rax,r10
+	adc	rdx,0
+	add	r9,rbx
+	mov	r10,rdx
+	adc	r10,0
+
+	mov	rbx,r15
+	lea	r15,[r15*2+r12]
+
+	mul	rax
+	add	r13,rax
+	adc	r14,rdx
+	adc	r15,0
+
+	mov	QWORD[48+rsp],r13
+	mov	QWORD[56+rsp],r14
+	shr	rbx,63
+
+
+	mov	r11,QWORD[32+rsi]
+	mov	rax,QWORD[40+rsi]
+	mul	r11
+	add	r8,rax
+	mov	rax,QWORD[48+rsi]
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r11
+	add	r9,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	mov	r12,r8
+	lea	r8,[r8*2+rbx]
+	add	r9,rcx
+	mov	rcx,rdx
+	adc	rcx,0
+
+	mul	r11
+	shr	r12,63
+	add	r10,rax
+	mov	rax,r11
+	adc	rdx,0
+	add	r10,rcx
+	mov	r11,rdx
+	adc	r11,0
+
+	mov	rcx,r9
+	lea	r9,[r9*2+r12]
+
+	mul	rax
+	add	r15,rax
+	adc	r8,rdx
+	adc	r9,0
+
+	mov	QWORD[64+rsp],r15
+	mov	QWORD[72+rsp],r8
+	shr	rcx,63
+
+
+	mov	r12,QWORD[40+rsi]
+	mov	rax,QWORD[48+rsi]
+	mul	r12
+	add	r10,rax
+	mov	rax,QWORD[56+rsi]
+	mov	rbx,rdx
+	adc	rbx,0
+
+	mul	r12
+	add	r11,rax
+	mov	rax,r12
+	mov	r15,r10
+	lea	r10,[r10*2+rcx]
+	adc	rdx,0
+	shr	r15,63
+	add	r11,rbx
+	mov	r12,rdx
+	adc	r12,0
+
+	mov	rbx,r11
+	lea	r11,[r11*2+r15]
+
+	mul	rax
+	add	r9,rax
+	adc	r10,rdx
+	adc	r11,0
+
+	mov	QWORD[80+rsp],r9
+	mov	QWORD[88+rsp],r10
+
+
+	mov	r13,QWORD[48+rsi]
+	mov	rax,QWORD[56+rsi]
+	mul	r13
+	add	r12,rax
+	mov	rax,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	xor	r14,r14
+	shl	rbx,1
+	adc	r12,r12
+	adc	r13,r13
+	adc	r14,r14
+
+	mul	rax
+	add	r11,rax
+	adc	r12,rdx
+	adc	r13,0
+
+	mov	QWORD[96+rsp],r11
+	mov	QWORD[104+rsp],r12
+
+
+	mov	rax,QWORD[56+rsi]
+	mul	rax
+	add	r13,rax
+	adc	rdx,0
+
+	add	r14,rdx
+
+	mov	QWORD[112+rsp],r13
+	mov	QWORD[120+rsp],r14
+
+	mov	r8,QWORD[rsp]
+	mov	r9,QWORD[8+rsp]
+	mov	r10,QWORD[16+rsp]
+	mov	r11,QWORD[24+rsp]
+	mov	r12,QWORD[32+rsp]
+	mov	r13,QWORD[40+rsp]
+	mov	r14,QWORD[48+rsp]
+	mov	r15,QWORD[56+rsp]
+
+	call	__rsaz_512_reduce
+
+	add	r8,QWORD[64+rsp]
+	adc	r9,QWORD[72+rsp]
+	adc	r10,QWORD[80+rsp]
+	adc	r11,QWORD[88+rsp]
+	adc	r12,QWORD[96+rsp]
+	adc	r13,QWORD[104+rsp]
+	adc	r14,QWORD[112+rsp]
+	adc	r15,QWORD[120+rsp]
+	sbb	rcx,rcx
+
+	call	__rsaz_512_subtract
+
+	mov	rdx,r8
+	mov	rax,r9
+	mov	r8d,DWORD[((128+8))+rsp]
+	mov	rsi,rdi
+
+	dec	r8d
+	jnz	NEAR $L$oop_sqr
+
+	lea	rax,[((128+24+48))+rsp]
+	mov	r15,QWORD[((-48))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	rbx,QWORD[((-8))+rax]
+	lea	rsp,[rax]
+$L$sqr_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rsaz_512_sqr:
+global	rsaz_512_mul
+
+ALIGN	32
+rsaz_512_mul:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rsaz_512_mul:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	sub	rsp,128+24
+$L$mul_body:
+DB	102,72,15,110,199
+DB	102,72,15,110,201
+	mov	QWORD[128+rsp],r8
+	mov	rbx,QWORD[rdx]
+	mov	rbp,rdx
+	call	__rsaz_512_mul
+
+DB	102,72,15,126,199
+DB	102,72,15,126,205
+
+	mov	r8,QWORD[rsp]
+	mov	r9,QWORD[8+rsp]
+	mov	r10,QWORD[16+rsp]
+	mov	r11,QWORD[24+rsp]
+	mov	r12,QWORD[32+rsp]
+	mov	r13,QWORD[40+rsp]
+	mov	r14,QWORD[48+rsp]
+	mov	r15,QWORD[56+rsp]
+
+	call	__rsaz_512_reduce
+	add	r8,QWORD[64+rsp]
+	adc	r9,QWORD[72+rsp]
+	adc	r10,QWORD[80+rsp]
+	adc	r11,QWORD[88+rsp]
+	adc	r12,QWORD[96+rsp]
+	adc	r13,QWORD[104+rsp]
+	adc	r14,QWORD[112+rsp]
+	adc	r15,QWORD[120+rsp]
+	sbb	rcx,rcx
+
+	call	__rsaz_512_subtract
+
+	lea	rax,[((128+24+48))+rsp]
+	mov	r15,QWORD[((-48))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	rbx,QWORD[((-8))+rax]
+	lea	rsp,[rax]
+$L$mul_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rsaz_512_mul:
+global	rsaz_512_mul_gather4
+
+ALIGN	32
+rsaz_512_mul_gather4:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rsaz_512_mul_gather4:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	mov	r9d,r9d
+	sub	rsp,128+24
+$L$mul_gather4_body:
+	mov	eax,DWORD[64+r9*4+rdx]
+DB	102,72,15,110,199
+	mov	ebx,DWORD[r9*4+rdx]
+DB	102,72,15,110,201
+	mov	QWORD[128+rsp],r8
+
+	shl	rax,32
+	or	rbx,rax
+	mov	rax,QWORD[rsi]
+	mov	rcx,QWORD[8+rsi]
+	lea	rbp,[128+r9*4+rdx]
+	mul	rbx
+	mov	QWORD[rsp],rax
+	mov	rax,rcx
+	mov	r8,rdx
+
+	mul	rbx
+	movd	xmm4,DWORD[rbp]
+	add	r8,rax
+	mov	rax,QWORD[16+rsi]
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	movd	xmm5,DWORD[64+rbp]
+	add	r9,rax
+	mov	rax,QWORD[24+rsi]
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	pslldq	xmm5,4
+	add	r10,rax
+	mov	rax,QWORD[32+rsi]
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	por	xmm4,xmm5
+	add	r11,rax
+	mov	rax,QWORD[40+rsi]
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[48+rsi]
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	lea	rbp,[128+rbp]
+	add	r13,rax
+	mov	rax,QWORD[56+rsi]
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+DB	102,72,15,126,227
+	add	r14,rax
+	mov	rax,QWORD[rsi]
+	mov	r15,rdx
+	adc	r15,0
+
+	lea	rdi,[8+rsp]
+	mov	ecx,7
+	jmp	NEAR $L$oop_mul_gather
+
+ALIGN	32
+$L$oop_mul_gather:
+	mul	rbx
+	add	r8,rax
+	mov	rax,QWORD[8+rsi]
+	mov	QWORD[rdi],r8
+	mov	r8,rdx
+	adc	r8,0
+
+	mul	rbx
+	movd	xmm4,DWORD[rbp]
+	add	r9,rax
+	mov	rax,QWORD[16+rsi]
+	adc	rdx,0
+	add	r8,r9
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	movd	xmm5,DWORD[64+rbp]
+	add	r10,rax
+	mov	rax,QWORD[24+rsi]
+	adc	rdx,0
+	add	r9,r10
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	pslldq	xmm5,4
+	add	r11,rax
+	mov	rax,QWORD[32+rsi]
+	adc	rdx,0
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	por	xmm4,xmm5
+	add	r12,rax
+	mov	rax,QWORD[40+rsi]
+	adc	rdx,0
+	add	r11,r12
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[48+rsi]
+	adc	rdx,0
+	add	r12,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	add	r13,r14
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+DB	102,72,15,126,227
+	add	r15,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r14,r15
+	mov	r15,rdx
+	adc	r15,0
+
+	lea	rbp,[128+rbp]
+	lea	rdi,[8+rdi]
+
+	dec	ecx
+	jnz	NEAR $L$oop_mul_gather
+
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+
+DB	102,72,15,126,199
+DB	102,72,15,126,205
+
+	mov	r8,QWORD[rsp]
+	mov	r9,QWORD[8+rsp]
+	mov	r10,QWORD[16+rsp]
+	mov	r11,QWORD[24+rsp]
+	mov	r12,QWORD[32+rsp]
+	mov	r13,QWORD[40+rsp]
+	mov	r14,QWORD[48+rsp]
+	mov	r15,QWORD[56+rsp]
+
+	call	__rsaz_512_reduce
+	add	r8,QWORD[64+rsp]
+	adc	r9,QWORD[72+rsp]
+	adc	r10,QWORD[80+rsp]
+	adc	r11,QWORD[88+rsp]
+	adc	r12,QWORD[96+rsp]
+	adc	r13,QWORD[104+rsp]
+	adc	r14,QWORD[112+rsp]
+	adc	r15,QWORD[120+rsp]
+	sbb	rcx,rcx
+
+	call	__rsaz_512_subtract
+
+	lea	rax,[((128+24+48))+rsp]
+	mov	r15,QWORD[((-48))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	rbx,QWORD[((-8))+rax]
+	lea	rsp,[rax]
+$L$mul_gather4_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rsaz_512_mul_gather4:
+global	rsaz_512_mul_scatter4
+
+ALIGN	32
+rsaz_512_mul_scatter4:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rsaz_512_mul_scatter4:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	mov	r9d,r9d
+	sub	rsp,128+24
+$L$mul_scatter4_body:
+	lea	r8,[r9*4+r8]
+DB	102,72,15,110,199
+DB	102,72,15,110,202
+DB	102,73,15,110,208
+	mov	QWORD[128+rsp],rcx
+
+	mov	rbp,rdi
+	mov	rbx,QWORD[rdi]
+	call	__rsaz_512_mul
+
+DB	102,72,15,126,199
+DB	102,72,15,126,205
+
+	mov	r8,QWORD[rsp]
+	mov	r9,QWORD[8+rsp]
+	mov	r10,QWORD[16+rsp]
+	mov	r11,QWORD[24+rsp]
+	mov	r12,QWORD[32+rsp]
+	mov	r13,QWORD[40+rsp]
+	mov	r14,QWORD[48+rsp]
+	mov	r15,QWORD[56+rsp]
+
+	call	__rsaz_512_reduce
+	add	r8,QWORD[64+rsp]
+	adc	r9,QWORD[72+rsp]
+	adc	r10,QWORD[80+rsp]
+	adc	r11,QWORD[88+rsp]
+	adc	r12,QWORD[96+rsp]
+	adc	r13,QWORD[104+rsp]
+	adc	r14,QWORD[112+rsp]
+	adc	r15,QWORD[120+rsp]
+DB	102,72,15,126,214
+	sbb	rcx,rcx
+
+	call	__rsaz_512_subtract
+
+	mov	DWORD[rsi],r8d
+	shr	r8,32
+	mov	DWORD[128+rsi],r9d
+	shr	r9,32
+	mov	DWORD[256+rsi],r10d
+	shr	r10,32
+	mov	DWORD[384+rsi],r11d
+	shr	r11,32
+	mov	DWORD[512+rsi],r12d
+	shr	r12,32
+	mov	DWORD[640+rsi],r13d
+	shr	r13,32
+	mov	DWORD[768+rsi],r14d
+	shr	r14,32
+	mov	DWORD[896+rsi],r15d
+	shr	r15,32
+	mov	DWORD[64+rsi],r8d
+	mov	DWORD[192+rsi],r9d
+	mov	DWORD[320+rsi],r10d
+	mov	DWORD[448+rsi],r11d
+	mov	DWORD[576+rsi],r12d
+	mov	DWORD[704+rsi],r13d
+	mov	DWORD[832+rsi],r14d
+	mov	DWORD[960+rsi],r15d
+
+	lea	rax,[((128+24+48))+rsp]
+	mov	r15,QWORD[((-48))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	rbx,QWORD[((-8))+rax]
+	lea	rsp,[rax]
+$L$mul_scatter4_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rsaz_512_mul_scatter4:
+global	rsaz_512_mul_by_one
+
+ALIGN	32
+rsaz_512_mul_by_one:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rsaz_512_mul_by_one:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	sub	rsp,128+24
+$L$mul_by_one_body:
+	mov	rbp,rdx
+	mov	QWORD[128+rsp],rcx
+
+	mov	r8,QWORD[rsi]
+	pxor	xmm0,xmm0
+	mov	r9,QWORD[8+rsi]
+	mov	r10,QWORD[16+rsi]
+	mov	r11,QWORD[24+rsi]
+	mov	r12,QWORD[32+rsi]
+	mov	r13,QWORD[40+rsi]
+	mov	r14,QWORD[48+rsi]
+	mov	r15,QWORD[56+rsi]
+
+	movdqa	XMMWORD[rsp],xmm0
+	movdqa	XMMWORD[16+rsp],xmm0
+	movdqa	XMMWORD[32+rsp],xmm0
+	movdqa	XMMWORD[48+rsp],xmm0
+	movdqa	XMMWORD[64+rsp],xmm0
+	movdqa	XMMWORD[80+rsp],xmm0
+	movdqa	XMMWORD[96+rsp],xmm0
+	call	__rsaz_512_reduce
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+
+	lea	rax,[((128+24+48))+rsp]
+	mov	r15,QWORD[((-48))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	rbx,QWORD[((-8))+rax]
+	lea	rsp,[rax]
+$L$mul_by_one_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rsaz_512_mul_by_one:
+
+ALIGN	32
+__rsaz_512_reduce:
+	mov	rbx,r8
+	imul	rbx,QWORD[((128+8))+rsp]
+	mov	rax,QWORD[rbp]
+	mov	ecx,8
+	jmp	NEAR $L$reduction_loop
+
+ALIGN	32
+$L$reduction_loop:
+	mul	rbx
+	mov	rax,QWORD[8+rbp]
+	neg	r8
+	mov	r8,rdx
+	adc	r8,0
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[16+rbp]
+	adc	rdx,0
+	add	r8,r9
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[24+rbp]
+	adc	rdx,0
+	add	r9,r10
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[32+rbp]
+	adc	rdx,0
+	add	r10,r11
+	mov	rsi,QWORD[((128+8))+rsp]
+
+
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[40+rbp]
+	adc	rdx,0
+	imul	rsi,r8
+	add	r11,r12
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[48+rbp]
+	adc	rdx,0
+	add	r12,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[56+rbp]
+	adc	rdx,0
+	add	r13,r14
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+	mov	rbx,rsi
+	add	r15,rax
+	mov	rax,QWORD[rbp]
+	adc	rdx,0
+	add	r14,r15
+	mov	r15,rdx
+	adc	r15,0
+
+	dec	ecx
+	jne	NEAR $L$reduction_loop
+
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	32
+__rsaz_512_subtract:
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+
+	mov	r8,QWORD[rbp]
+	mov	r9,QWORD[8+rbp]
+	neg	r8
+	not	r9
+	and	r8,rcx
+	mov	r10,QWORD[16+rbp]
+	and	r9,rcx
+	not	r10
+	mov	r11,QWORD[24+rbp]
+	and	r10,rcx
+	not	r11
+	mov	r12,QWORD[32+rbp]
+	and	r11,rcx
+	not	r12
+	mov	r13,QWORD[40+rbp]
+	and	r12,rcx
+	not	r13
+	mov	r14,QWORD[48+rbp]
+	and	r13,rcx
+	not	r14
+	mov	r15,QWORD[56+rbp]
+	and	r14,rcx
+	not	r15
+	and	r15,rcx
+
+	add	r8,QWORD[rdi]
+	adc	r9,QWORD[8+rdi]
+	adc	r10,QWORD[16+rdi]
+	adc	r11,QWORD[24+rdi]
+	adc	r12,QWORD[32+rdi]
+	adc	r13,QWORD[40+rdi]
+	adc	r14,QWORD[48+rdi]
+	adc	r15,QWORD[56+rdi]
+
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+
+	DB	0F3h,0C3h		;repret
+
+
+ALIGN	32
+__rsaz_512_mul:
+	lea	rdi,[8+rsp]
+
+	mov	rax,QWORD[rsi]
+	mul	rbx
+	mov	QWORD[rdi],rax
+	mov	rax,QWORD[8+rsi]
+	mov	r8,rdx
+
+	mul	rbx
+	add	r8,rax
+	mov	rax,QWORD[16+rsi]
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[24+rsi]
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[32+rsi]
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[40+rsi]
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[48+rsi]
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[56+rsi]
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[rsi]
+	mov	r15,rdx
+	adc	r15,0
+
+	lea	rbp,[8+rbp]
+	lea	rdi,[8+rdi]
+
+	mov	ecx,7
+	jmp	NEAR $L$oop_mul
+
+ALIGN	32
+$L$oop_mul:
+	mov	rbx,QWORD[rbp]
+	mul	rbx
+	add	r8,rax
+	mov	rax,QWORD[8+rsi]
+	mov	QWORD[rdi],r8
+	mov	r8,rdx
+	adc	r8,0
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[16+rsi]
+	adc	rdx,0
+	add	r8,r9
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[24+rsi]
+	adc	rdx,0
+	add	r9,r10
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[32+rsi]
+	adc	rdx,0
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[40+rsi]
+	adc	rdx,0
+	add	r11,r12
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[48+rsi]
+	adc	rdx,0
+	add	r12,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[56+rsi]
+	adc	rdx,0
+	add	r13,r14
+	mov	r14,rdx
+	lea	rbp,[8+rbp]
+	adc	r14,0
+
+	mul	rbx
+	add	r15,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r14,r15
+	mov	r15,rdx
+	adc	r15,0
+
+	lea	rdi,[8+rdi]
+
+	dec	ecx
+	jnz	NEAR $L$oop_mul
+
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+
+	DB	0F3h,0C3h		;repret
+
+global	rsaz_512_scatter4
+
+ALIGN	16
+rsaz_512_scatter4:
+	lea	rcx,[r8*4+rcx]
+	mov	r9d,8
+	jmp	NEAR $L$oop_scatter
+ALIGN	16
+$L$oop_scatter:
+	mov	rax,QWORD[rdx]
+	lea	rdx,[8+rdx]
+	mov	DWORD[rcx],eax
+	shr	rax,32
+	mov	DWORD[64+rcx],eax
+	lea	rcx,[128+rcx]
+	dec	r9d
+	jnz	NEAR $L$oop_scatter
+	DB	0F3h,0C3h		;repret
+
+
+global	rsaz_512_gather4
+
+ALIGN	16
+rsaz_512_gather4:
+	lea	rdx,[r8*4+rdx]
+	mov	r9d,8
+	jmp	NEAR $L$oop_gather
+ALIGN	16
+$L$oop_gather:
+	mov	eax,DWORD[rdx]
+	mov	r8d,DWORD[64+rdx]
+	lea	rdx,[128+rdx]
+	shl	r8,32
+	or	rax,r8
+	mov	QWORD[rcx],rax
+	lea	rcx,[8+rcx]
+	dec	r9d
+	jnz	NEAR $L$oop_gather
+	DB	0F3h,0C3h		;repret
+
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	lea	rax,[((128+24+48))+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$common_seh_tail:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_rsaz_512_sqr wrt ..imagebase
+	DD	$L$SEH_end_rsaz_512_sqr wrt ..imagebase
+	DD	$L$SEH_info_rsaz_512_sqr wrt ..imagebase
+
+	DD	$L$SEH_begin_rsaz_512_mul wrt ..imagebase
+	DD	$L$SEH_end_rsaz_512_mul wrt ..imagebase
+	DD	$L$SEH_info_rsaz_512_mul wrt ..imagebase
+
+	DD	$L$SEH_begin_rsaz_512_mul_gather4 wrt ..imagebase
+	DD	$L$SEH_end_rsaz_512_mul_gather4 wrt ..imagebase
+	DD	$L$SEH_info_rsaz_512_mul_gather4 wrt ..imagebase
+
+	DD	$L$SEH_begin_rsaz_512_mul_scatter4 wrt ..imagebase
+	DD	$L$SEH_end_rsaz_512_mul_scatter4 wrt ..imagebase
+	DD	$L$SEH_info_rsaz_512_mul_scatter4 wrt ..imagebase
+
+	DD	$L$SEH_begin_rsaz_512_mul_by_one wrt ..imagebase
+	DD	$L$SEH_end_rsaz_512_mul_by_one wrt ..imagebase
+	DD	$L$SEH_info_rsaz_512_mul_by_one wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_rsaz_512_sqr:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$sqr_body wrt ..imagebase,$L$sqr_epilogue wrt ..imagebase
+$L$SEH_info_rsaz_512_mul:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase
+$L$SEH_info_rsaz_512_mul_gather4:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$mul_gather4_body wrt ..imagebase,$L$mul_gather4_epilogue wrt ..imagebase
+$L$SEH_info_rsaz_512_mul_scatter4:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$mul_scatter4_body wrt ..imagebase,$L$mul_scatter4_epilogue wrt ..imagebase
+$L$SEH_info_rsaz_512_mul_by_one:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$mul_by_one_body wrt ..imagebase,$L$mul_by_one_epilogue wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm
new file mode 100644
index 0000000..db0d1b9
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont.asm
@@ -0,0 +1,941 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	bn_mul_mont
+
+ALIGN	16
+bn_mul_mont:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_mul_mont:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	test	r9d,3
+	jnz	NEAR $L$mul_enter
+	cmp	r9d,8
+	jb	NEAR $L$mul_enter
+	cmp	rdx,rsi
+	jne	NEAR $L$mul4x_enter
+	test	r9d,7
+	jz	NEAR $L$sqr8x_enter
+	jmp	NEAR $L$mul4x_enter
+
+ALIGN	16
+$L$mul_enter:
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	mov	r9d,r9d
+	lea	r10,[2+r9]
+	mov	r11,rsp
+	neg	r10
+	lea	rsp,[r10*8+rsp]
+	and	rsp,-1024
+
+	mov	QWORD[8+r9*8+rsp],r11
+$L$mul_body:
+	mov	r12,rdx
+	mov	r8,QWORD[r8]
+	mov	rbx,QWORD[r12]
+	mov	rax,QWORD[rsi]
+
+	xor	r14,r14
+	xor	r15,r15
+
+	mov	rbp,r8
+	mul	rbx
+	mov	r10,rax
+	mov	rax,QWORD[rcx]
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	r13,rdx
+
+	lea	r15,[1+r15]
+	jmp	NEAR $L$1st_enter
+
+ALIGN	16
+$L$1st:
+	add	r13,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	r13,r11
+	mov	r11,r10
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+$L$1st_enter:
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	lea	r15,[1+r15]
+	mov	r10,rdx
+
+	mul	rbp
+	cmp	r15,r9
+	jne	NEAR $L$1st
+
+	add	r13,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r13,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+	mov	r11,r10
+
+	xor	rdx,rdx
+	add	r13,r11
+	adc	rdx,0
+	mov	QWORD[((-8))+r9*8+rsp],r13
+	mov	QWORD[r9*8+rsp],rdx
+
+	lea	r14,[1+r14]
+	jmp	NEAR $L$outer
+ALIGN	16
+$L$outer:
+	mov	rbx,QWORD[r14*8+r12]
+	xor	r15,r15
+	mov	rbp,r8
+	mov	r10,QWORD[rsp]
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	r10,QWORD[8+rsp]
+	mov	r13,rdx
+
+	lea	r15,[1+r15]
+	jmp	NEAR $L$inner_enter
+
+ALIGN	16
+$L$inner:
+	add	r13,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	mov	r10,QWORD[r15*8+rsp]
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+$L$inner_enter:
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+	lea	r15,[1+r15]
+
+	mul	rbp
+	cmp	r15,r9
+	jne	NEAR $L$inner
+
+	add	r13,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r13,r10
+	mov	r10,QWORD[r15*8+rsp]
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+	xor	rdx,rdx
+	add	r13,r11
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-8))+r9*8+rsp],r13
+	mov	QWORD[r9*8+rsp],rdx
+
+	lea	r14,[1+r14]
+	cmp	r14,r9
+	jb	NEAR $L$outer
+
+	xor	r14,r14
+	mov	rax,QWORD[rsp]
+	lea	rsi,[rsp]
+	mov	r15,r9
+	jmp	NEAR $L$sub
+ALIGN	16
+$L$sub:	sbb	rax,QWORD[r14*8+rcx]
+	mov	QWORD[r14*8+rdi],rax
+	mov	rax,QWORD[8+r14*8+rsi]
+	lea	r14,[1+r14]
+	dec	r15
+	jnz	NEAR $L$sub
+
+	sbb	rax,0
+	xor	r14,r14
+	mov	r15,r9
+ALIGN	16
+$L$copy:
+	mov	rsi,QWORD[r14*8+rsp]
+	mov	rcx,QWORD[r14*8+rdi]
+	xor	rsi,rcx
+	and	rsi,rax
+	xor	rsi,rcx
+	mov	QWORD[r14*8+rsp],r14
+	mov	QWORD[r14*8+rdi],rsi
+	lea	r14,[1+r14]
+	sub	r15,1
+	jnz	NEAR $L$copy
+
+	mov	rsi,QWORD[8+r9*8+rsp]
+	mov	rax,1
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$mul_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_mul_mont:
+
+ALIGN	16
+bn_mul4x_mont:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_mul4x_mont:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+$L$mul4x_enter:
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	mov	r9d,r9d
+	lea	r10,[4+r9]
+	mov	r11,rsp
+	neg	r10
+	lea	rsp,[r10*8+rsp]
+	and	rsp,-1024
+
+	mov	QWORD[8+r9*8+rsp],r11
+$L$mul4x_body:
+	mov	QWORD[16+r9*8+rsp],rdi
+	mov	r12,rdx
+	mov	r8,QWORD[r8]
+	mov	rbx,QWORD[r12]
+	mov	rax,QWORD[rsi]
+
+	xor	r14,r14
+	xor	r15,r15
+
+	mov	rbp,r8
+	mul	rbx
+	mov	r10,rax
+	mov	rax,QWORD[rcx]
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[8+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	r15,[4+r15]
+	adc	rdx,0
+	mov	QWORD[rsp],rdi
+	mov	r13,rdx
+	jmp	NEAR $L$1st4x
+ALIGN	16
+$L$1st4x:
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-16))+r15*8+rcx]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-8))+r15*8+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],rdi
+	mov	r13,rdx
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[8+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-8))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[8+r15*8+rcx]
+	adc	rdx,0
+	lea	r15,[4+r15]
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[((-16))+r15*8+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-32))+r15*8+rsp],rdi
+	mov	r13,rdx
+	cmp	r15,r9
+	jb	NEAR $L$1st4x
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-16))+r15*8+rcx]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-8))+r15*8+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],rdi
+	mov	r13,rdx
+
+	xor	rdi,rdi
+	add	r13,r10
+	adc	rdi,0
+	mov	QWORD[((-8))+r15*8+rsp],r13
+	mov	QWORD[r15*8+rsp],rdi
+
+	lea	r14,[1+r14]
+ALIGN	4
+$L$outer4x:
+	mov	rbx,QWORD[r14*8+r12]
+	xor	r15,r15
+	mov	r10,QWORD[rsp]
+	mov	rbp,r8
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[8+rcx]
+	adc	rdx,0
+	add	r11,QWORD[8+rsp]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	r15,[4+r15]
+	adc	rdx,0
+	mov	QWORD[rsp],rdi
+	mov	r13,rdx
+	jmp	NEAR $L$inner4x
+ALIGN	16
+$L$inner4x:
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-16))+r15*8+rcx]
+	adc	rdx,0
+	add	r10,QWORD[((-16))+r15*8+rsp]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-8))+r15*8+rcx]
+	adc	rdx,0
+	add	r11,QWORD[((-8))+r15*8+rsp]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],rdi
+	mov	r13,rdx
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	add	r10,QWORD[r15*8+rsp]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[8+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-8))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[8+r15*8+rcx]
+	adc	rdx,0
+	add	r11,QWORD[8+r15*8+rsp]
+	adc	rdx,0
+	lea	r15,[4+r15]
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[((-16))+r15*8+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-32))+r15*8+rsp],rdi
+	mov	r13,rdx
+	cmp	r15,r9
+	jb	NEAR $L$inner4x
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-16))+r15*8+rcx]
+	adc	rdx,0
+	add	r10,QWORD[((-16))+r15*8+rsp]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r15*8+rsp],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-8))+r15*8+rcx]
+	adc	rdx,0
+	add	r11,QWORD[((-8))+r15*8+rsp]
+	adc	rdx,0
+	lea	r14,[1+r14]
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],rdi
+	mov	r13,rdx
+
+	xor	rdi,rdi
+	add	r13,r10
+	adc	rdi,0
+	add	r13,QWORD[r9*8+rsp]
+	adc	rdi,0
+	mov	QWORD[((-8))+r15*8+rsp],r13
+	mov	QWORD[r15*8+rsp],rdi
+
+	cmp	r14,r9
+	jb	NEAR $L$outer4x
+	mov	rdi,QWORD[16+r9*8+rsp]
+	mov	rax,QWORD[rsp]
+	mov	rdx,QWORD[8+rsp]
+	shr	r9,2
+	lea	rsi,[rsp]
+	xor	r14,r14
+
+	sub	rax,QWORD[rcx]
+	mov	rbx,QWORD[16+rsi]
+	mov	rbp,QWORD[24+rsi]
+	sbb	rdx,QWORD[8+rcx]
+	lea	r15,[((-1))+r9]
+	jmp	NEAR $L$sub4x
+ALIGN	16
+$L$sub4x:
+	mov	QWORD[r14*8+rdi],rax
+	mov	QWORD[8+r14*8+rdi],rdx
+	sbb	rbx,QWORD[16+r14*8+rcx]
+	mov	rax,QWORD[32+r14*8+rsi]
+	mov	rdx,QWORD[40+r14*8+rsi]
+	sbb	rbp,QWORD[24+r14*8+rcx]
+	mov	QWORD[16+r14*8+rdi],rbx
+	mov	QWORD[24+r14*8+rdi],rbp
+	sbb	rax,QWORD[32+r14*8+rcx]
+	mov	rbx,QWORD[48+r14*8+rsi]
+	mov	rbp,QWORD[56+r14*8+rsi]
+	sbb	rdx,QWORD[40+r14*8+rcx]
+	lea	r14,[4+r14]
+	dec	r15
+	jnz	NEAR $L$sub4x
+
+	mov	QWORD[r14*8+rdi],rax
+	mov	rax,QWORD[32+r14*8+rsi]
+	sbb	rbx,QWORD[16+r14*8+rcx]
+	mov	QWORD[8+r14*8+rdi],rdx
+	sbb	rbp,QWORD[24+r14*8+rcx]
+	mov	QWORD[16+r14*8+rdi],rbx
+
+	sbb	rax,0
+DB 66h, 48h, 0fh, 6eh, 0c0h
+	punpcklqdq	xmm0,xmm0
+	mov	QWORD[24+r14*8+rdi],rbp
+	xor	r14,r14
+
+	mov	r15,r9
+	pxor	xmm5,xmm5
+	jmp	NEAR $L$copy4x
+ALIGN	16
+$L$copy4x:
+	movdqu	xmm2,XMMWORD[r14*1+rsp]
+	movdqu	xmm4,XMMWORD[16+r14*1+rsp]
+	movdqu	xmm1,XMMWORD[r14*1+rdi]
+	movdqu	xmm3,XMMWORD[16+r14*1+rdi]
+	pxor	xmm2,xmm1
+	pxor	xmm4,xmm3
+	pand	xmm2,xmm0
+	pand	xmm4,xmm0
+	pxor	xmm2,xmm1
+	pxor	xmm4,xmm3
+	movdqu	XMMWORD[r14*1+rdi],xmm2
+	movdqu	XMMWORD[16+r14*1+rdi],xmm4
+	movdqa	XMMWORD[r14*1+rsp],xmm5
+	movdqa	XMMWORD[16+r14*1+rsp],xmm5
+
+	lea	r14,[32+r14]
+	dec	r15
+	jnz	NEAR $L$copy4x
+
+	shl	r9,2
+	mov	rsi,QWORD[8+r9*8+rsp]
+	mov	rax,1
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$mul4x_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_mul4x_mont:
+EXTERN	bn_sqr8x_internal
+
+
+ALIGN	32
+bn_sqr8x_mont:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_sqr8x_mont:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+$L$sqr8x_enter:
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+
+	mov	r10d,r9d
+	shl	r9d,3
+	shl	r10,3+2
+	neg	r9
+
+
+
+
+
+
+	lea	r11,[((-64))+r9*4+rsp]
+	mov	r8,QWORD[r8]
+	sub	r11,rsi
+	and	r11,4095
+	cmp	r10,r11
+	jb	NEAR $L$sqr8x_sp_alt
+	sub	rsp,r11
+	lea	rsp,[((-64))+r9*4+rsp]
+	jmp	NEAR $L$sqr8x_sp_done
+
+ALIGN	32
+$L$sqr8x_sp_alt:
+	lea	r10,[((4096-64))+r9*4]
+	lea	rsp,[((-64))+r9*4+rsp]
+	sub	r11,r10
+	mov	r10,0
+	cmovc	r11,r10
+	sub	rsp,r11
+$L$sqr8x_sp_done:
+	and	rsp,-64
+	mov	r10,r9
+	neg	r9
+
+	lea	r11,[64+r9*2+rsp]
+	mov	QWORD[32+rsp],r8
+	mov	QWORD[40+rsp],rax
+$L$sqr8x_body:
+
+	mov	rbp,r9
+DB	102,73,15,110,211
+	shr	rbp,3+2
+	mov	eax,DWORD[((OPENSSL_ia32cap_P+8))]
+	jmp	NEAR $L$sqr8x_copy_n
+
+ALIGN	32
+$L$sqr8x_copy_n:
+	movq	xmm0,QWORD[rcx]
+	movq	xmm1,QWORD[8+rcx]
+	movq	xmm3,QWORD[16+rcx]
+	movq	xmm4,QWORD[24+rcx]
+	lea	rcx,[32+rcx]
+	movdqa	XMMWORD[r11],xmm0
+	movdqa	XMMWORD[16+r11],xmm1
+	movdqa	XMMWORD[32+r11],xmm3
+	movdqa	XMMWORD[48+r11],xmm4
+	lea	r11,[64+r11]
+	dec	rbp
+	jnz	NEAR $L$sqr8x_copy_n
+
+	pxor	xmm0,xmm0
+DB	102,72,15,110,207
+DB	102,73,15,110,218
+	call	bn_sqr8x_internal
+
+	pxor	xmm0,xmm0
+	lea	rax,[48+rsp]
+	lea	rdx,[64+r9*2+rsp]
+	shr	r9,3+2
+	mov	rsi,QWORD[40+rsp]
+	jmp	NEAR $L$sqr8x_zero
+
+ALIGN	32
+$L$sqr8x_zero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	movdqa	XMMWORD[32+rax],xmm0
+	movdqa	XMMWORD[48+rax],xmm0
+	lea	rax,[64+rax]
+	movdqa	XMMWORD[rdx],xmm0
+	movdqa	XMMWORD[16+rdx],xmm0
+	movdqa	XMMWORD[32+rdx],xmm0
+	movdqa	XMMWORD[48+rdx],xmm0
+	lea	rdx,[64+rdx]
+	dec	r9
+	jnz	NEAR $L$sqr8x_zero
+
+	mov	rax,1
+	mov	r15,QWORD[((-48))+rsi]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$sqr8x_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_sqr8x_mont:
+DB	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
+DB	112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56
+DB	54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83
+DB	32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115
+DB	115,108,46,111,114,103,62,0
+ALIGN	16
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+mul_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	mov	r10,QWORD[192+r8]
+	mov	rax,QWORD[8+r10*8+rax]
+	lea	rax,[48+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+	jmp	NEAR $L$common_seh_tail
+
+
+
+ALIGN	16
+sqr_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[40+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$common_seh_tail:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_bn_mul_mont wrt ..imagebase
+	DD	$L$SEH_end_bn_mul_mont wrt ..imagebase
+	DD	$L$SEH_info_bn_mul_mont wrt ..imagebase
+
+	DD	$L$SEH_begin_bn_mul4x_mont wrt ..imagebase
+	DD	$L$SEH_end_bn_mul4x_mont wrt ..imagebase
+	DD	$L$SEH_info_bn_mul4x_mont wrt ..imagebase
+
+	DD	$L$SEH_begin_bn_sqr8x_mont wrt ..imagebase
+	DD	$L$SEH_end_bn_sqr8x_mont wrt ..imagebase
+	DD	$L$SEH_info_bn_sqr8x_mont wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_bn_mul_mont:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase
+$L$SEH_info_bn_mul4x_mont:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase
+$L$SEH_info_bn_sqr8x_mont:
+DB	9,0,0,0
+	DD	sqr_handler wrt ..imagebase
+	DD	$L$sqr8x_body wrt ..imagebase,$L$sqr8x_epilogue wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm
new file mode 100644
index 0000000..284318a
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/bn/x86_64-mont5.asm
@@ -0,0 +1,2056 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	bn_mul_mont_gather5
+
+ALIGN	64
+bn_mul_mont_gather5:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_mul_mont_gather5:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	test	r9d,7
+	jnz	NEAR $L$mul_enter
+	jmp	NEAR $L$mul4x_enter
+
+ALIGN	16
+$L$mul_enter:
+	mov	r9d,r9d
+	mov	rax,rsp
+	mov	r10d,DWORD[56+rsp]
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-40))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+	lea	r11,[2+r9]
+	neg	r11
+	lea	rsp,[r11*8+rsp]
+	and	rsp,-1024
+
+	mov	QWORD[8+r9*8+rsp],rax
+$L$mul_body:
+	mov	r12,rdx
+	mov	r11,r10
+	shr	r10,3
+	and	r11,7
+	not	r10
+	lea	rax,[$L$magic_masks]
+	and	r10,3
+	lea	r12,[96+r11*8+r12]
+	movq	xmm4,QWORD[r10*8+rax]
+	movq	xmm5,QWORD[8+r10*8+rax]
+	movq	xmm6,QWORD[16+r10*8+rax]
+	movq	xmm7,QWORD[24+r10*8+rax]
+
+	movq	xmm0,QWORD[(((-96)))+r12]
+	movq	xmm1,QWORD[((-32))+r12]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[32+r12]
+	pand	xmm1,xmm5
+	movq	xmm3,QWORD[96+r12]
+	pand	xmm2,xmm6
+	por	xmm0,xmm1
+	pand	xmm3,xmm7
+	por	xmm0,xmm2
+	lea	r12,[256+r12]
+	por	xmm0,xmm3
+
+DB	102,72,15,126,195
+
+	mov	r8,QWORD[r8]
+	mov	rax,QWORD[rsi]
+
+	xor	r14,r14
+	xor	r15,r15
+
+	movq	xmm0,QWORD[(((-96)))+r12]
+	movq	xmm1,QWORD[((-32))+r12]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[32+r12]
+	pand	xmm1,xmm5
+
+	mov	rbp,r8
+	mul	rbx
+	mov	r10,rax
+	mov	rax,QWORD[rcx]
+
+	movq	xmm3,QWORD[96+r12]
+	pand	xmm2,xmm6
+	por	xmm0,xmm1
+	pand	xmm3,xmm7
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	por	xmm0,xmm2
+	lea	r12,[256+r12]
+	por	xmm0,xmm3
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	r13,rdx
+
+	lea	r15,[1+r15]
+	jmp	NEAR $L$1st_enter
+
+ALIGN	16
+$L$1st:
+	add	r13,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	r13,r11
+	mov	r11,r10
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+$L$1st_enter:
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	lea	r15,[1+r15]
+	mov	r10,rdx
+
+	mul	rbp
+	cmp	r15,r9
+	jne	NEAR $L$1st
+
+DB	102,72,15,126,195
+
+	add	r13,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r13,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+	mov	r11,r10
+
+	xor	rdx,rdx
+	add	r13,r11
+	adc	rdx,0
+	mov	QWORD[((-8))+r9*8+rsp],r13
+	mov	QWORD[r9*8+rsp],rdx
+
+	lea	r14,[1+r14]
+	jmp	NEAR $L$outer
+ALIGN	16
+$L$outer:
+	xor	r15,r15
+	mov	rbp,r8
+	mov	r10,QWORD[rsp]
+
+	movq	xmm0,QWORD[(((-96)))+r12]
+	movq	xmm1,QWORD[((-32))+r12]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[32+r12]
+	pand	xmm1,xmm5
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+
+	movq	xmm3,QWORD[96+r12]
+	pand	xmm2,xmm6
+	por	xmm0,xmm1
+	pand	xmm3,xmm7
+
+	imul	rbp,r10
+	mov	r11,rdx
+
+	por	xmm0,xmm2
+	lea	r12,[256+r12]
+	por	xmm0,xmm3
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+rsi]
+	adc	rdx,0
+	mov	r10,QWORD[8+rsp]
+	mov	r13,rdx
+
+	lea	r15,[1+r15]
+	jmp	NEAR $L$inner_enter
+
+ALIGN	16
+$L$inner:
+	add	r13,rax
+	mov	rax,QWORD[r15*8+rsi]
+	adc	rdx,0
+	add	r13,r10
+	mov	r10,QWORD[r15*8+rsp]
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+$L$inner_enter:
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[r15*8+rcx]
+	adc	rdx,0
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+	lea	r15,[1+r15]
+
+	mul	rbp
+	cmp	r15,r9
+	jne	NEAR $L$inner
+
+DB	102,72,15,126,195
+
+	add	r13,rax
+	mov	rax,QWORD[rsi]
+	adc	rdx,0
+	add	r13,r10
+	mov	r10,QWORD[r15*8+rsp]
+	adc	rdx,0
+	mov	QWORD[((-16))+r15*8+rsp],r13
+	mov	r13,rdx
+
+	xor	rdx,rdx
+	add	r13,r11
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-8))+r9*8+rsp],r13
+	mov	QWORD[r9*8+rsp],rdx
+
+	lea	r14,[1+r14]
+	cmp	r14,r9
+	jb	NEAR $L$outer
+
+	xor	r14,r14
+	mov	rax,QWORD[rsp]
+	lea	rsi,[rsp]
+	mov	r15,r9
+	jmp	NEAR $L$sub
+ALIGN	16
+$L$sub:	sbb	rax,QWORD[r14*8+rcx]
+	mov	QWORD[r14*8+rdi],rax
+	mov	rax,QWORD[8+r14*8+rsi]
+	lea	r14,[1+r14]
+	dec	r15
+	jnz	NEAR $L$sub
+
+	sbb	rax,0
+	xor	r14,r14
+	mov	r15,r9
+ALIGN	16
+$L$copy:
+	mov	rsi,QWORD[r14*8+rsp]
+	mov	rcx,QWORD[r14*8+rdi]
+	xor	rsi,rcx
+	and	rsi,rax
+	xor	rsi,rcx
+	mov	QWORD[r14*8+rsp],r14
+	mov	QWORD[r14*8+rdi],rsi
+	lea	r14,[1+r14]
+	sub	r15,1
+	jnz	NEAR $L$copy
+
+	mov	rsi,QWORD[8+r9*8+rsp]
+	mov	rax,1
+	movaps	xmm6,XMMWORD[((-88))+rsi]
+	movaps	xmm7,XMMWORD[((-72))+rsi]
+	mov	r15,QWORD[((-48))+rsi]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$mul_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_mul_mont_gather5:
+
+ALIGN	32
+bn_mul4x_mont_gather5:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_mul4x_mont_gather5:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+$L$mul4x_enter:
+DB	0x67
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-40))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+DB	0x67
+	mov	r10d,r9d
+	shl	r9d,3
+	shl	r10d,3+2
+	neg	r9
+
+
+
+
+
+
+
+
+	lea	r11,[((-64))+r9*2+rsp]
+	sub	r11,rsi
+	and	r11,4095
+	cmp	r10,r11
+	jb	NEAR $L$mul4xsp_alt
+	sub	rsp,r11
+	lea	rsp,[((-64))+r9*2+rsp]
+	jmp	NEAR $L$mul4xsp_done
+
+ALIGN	32
+$L$mul4xsp_alt:
+	lea	r10,[((4096-64))+r9*2]
+	lea	rsp,[((-64))+r9*2+rsp]
+	sub	r11,r10
+	mov	r10,0
+	cmovc	r11,r10
+	sub	rsp,r11
+$L$mul4xsp_done:
+	and	rsp,-64
+	neg	r9
+
+	mov	QWORD[40+rsp],rax
+$L$mul4x_body:
+
+	call	mul4x_internal
+
+	mov	rsi,QWORD[40+rsp]
+	mov	rax,1
+	movaps	xmm6,XMMWORD[((-88))+rsi]
+	movaps	xmm7,XMMWORD[((-72))+rsi]
+	mov	r15,QWORD[((-48))+rsi]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$mul4x_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_mul4x_mont_gather5:
+
+
+ALIGN	32
+mul4x_internal:
+	shl	r9,5
+	mov	r10d,DWORD[56+rax]
+	lea	r13,[256+r9*1+rdx]
+	shr	r9,5
+	mov	r11,r10
+	shr	r10,3
+	and	r11,7
+	not	r10
+	lea	rax,[$L$magic_masks]
+	and	r10,3
+	lea	r12,[96+r11*8+rdx]
+	movq	xmm4,QWORD[r10*8+rax]
+	movq	xmm5,QWORD[8+r10*8+rax]
+	add	r11,7
+	movq	xmm6,QWORD[16+r10*8+rax]
+	movq	xmm7,QWORD[24+r10*8+rax]
+	and	r11,7
+
+	movq	xmm0,QWORD[(((-96)))+r12]
+	lea	r14,[256+r12]
+	movq	xmm1,QWORD[((-32))+r12]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[32+r12]
+	pand	xmm1,xmm5
+	movq	xmm3,QWORD[96+r12]
+	pand	xmm2,xmm6
+DB	0x67
+	por	xmm0,xmm1
+	movq	xmm1,QWORD[((-96))+r14]
+DB	0x67
+	pand	xmm3,xmm7
+DB	0x67
+	por	xmm0,xmm2
+	movq	xmm2,QWORD[((-32))+r14]
+DB	0x67
+	pand	xmm1,xmm4
+DB	0x67
+	por	xmm0,xmm3
+	movq	xmm3,QWORD[32+r14]
+
+DB	102,72,15,126,195
+	movq	xmm0,QWORD[96+r14]
+	mov	QWORD[((16+8))+rsp],r13
+	mov	QWORD[((56+8))+rsp],rdi
+
+	mov	r8,QWORD[r8]
+	mov	rax,QWORD[rsi]
+	lea	rsi,[r9*1+rsi]
+	neg	r9
+
+	mov	rbp,r8
+	mul	rbx
+	mov	r10,rax
+	mov	rax,QWORD[rcx]
+
+	pand	xmm2,xmm5
+	pand	xmm3,xmm6
+	por	xmm1,xmm2
+
+	imul	rbp,r10
+
+
+
+
+
+
+
+	lea	r14,[((64+8))+r11*8+rsp]
+	mov	r11,rdx
+
+	pand	xmm0,xmm7
+	por	xmm1,xmm3
+	lea	r12,[512+r12]
+	por	xmm0,xmm1
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+r9*1+rsi]
+	adc	rdx,0
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[16+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+r9*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	r15,[32+r9]
+	lea	rcx,[64+rcx]
+	adc	rdx,0
+	mov	QWORD[r14],rdi
+	mov	r13,rdx
+	jmp	NEAR $L$1st4x
+
+ALIGN	32
+$L$1st4x:
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-32))+rcx]
+	lea	r14,[32+r14]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*1+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r14],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-16))+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r15*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r14],rdi
+	mov	r13,rdx
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[8+r15*1+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-8))+r14],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[16+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+r15*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	rcx,[64+rcx]
+	adc	rdx,0
+	mov	QWORD[r14],rdi
+	mov	r13,rdx
+
+	add	r15,32
+	jnz	NEAR $L$1st4x
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-32))+rcx]
+	lea	r14,[32+r14]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-24))+r14],r13
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-16))+rcx]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r9*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-16))+r14],rdi
+	mov	r13,rdx
+
+DB	102,72,15,126,195
+	lea	rcx,[r9*2+rcx]
+
+	xor	rdi,rdi
+	add	r13,r10
+	adc	rdi,0
+	mov	QWORD[((-8))+r14],r13
+
+	jmp	NEAR $L$outer4x
+
+ALIGN	32
+$L$outer4x:
+	mov	r10,QWORD[r9*1+r14]
+	mov	rbp,r8
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+
+	movq	xmm0,QWORD[(((-96)))+r12]
+	movq	xmm1,QWORD[((-32))+r12]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[32+r12]
+	pand	xmm1,xmm5
+	movq	xmm3,QWORD[96+r12]
+
+	imul	rbp,r10
+DB	0x67
+	mov	r11,rdx
+	mov	QWORD[r14],rdi
+
+	pand	xmm2,xmm6
+	por	xmm0,xmm1
+	pand	xmm3,xmm7
+	por	xmm0,xmm2
+	lea	r14,[r9*1+r14]
+	lea	r12,[256+r12]
+	por	xmm0,xmm3
+
+	mul	rbp
+	add	r10,rax
+	mov	rax,QWORD[8+r9*1+rsi]
+	adc	rdx,0
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[16+rcx]
+	adc	rdx,0
+	add	r11,QWORD[8+r14]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+r9*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	r15,[32+r9]
+	lea	rcx,[64+rcx]
+	adc	rdx,0
+	mov	r13,rdx
+	jmp	NEAR $L$inner4x
+
+ALIGN	32
+$L$inner4x:
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-32))+rcx]
+	adc	rdx,0
+	add	r10,QWORD[16+r14]
+	lea	r14,[32+r14]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+r15*1+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-32))+r14],rdi
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[((-16))+rcx]
+	adc	rdx,0
+	add	r11,QWORD[((-8))+r14]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r15*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-24))+r14],r13
+	mov	r13,rdx
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[rcx]
+	adc	rdx,0
+	add	r10,QWORD[r14]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[8+r15*1+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-16))+r14],rdi
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[16+rcx]
+	adc	rdx,0
+	add	r11,QWORD[8+r14]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[16+r15*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	lea	rcx,[64+rcx]
+	adc	rdx,0
+	mov	QWORD[((-8))+r14],r13
+	mov	r13,rdx
+
+	add	r15,32
+	jnz	NEAR $L$inner4x
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[((-32))+rcx]
+	adc	rdx,0
+	add	r10,QWORD[16+r14]
+	lea	r14,[32+r14]
+	adc	rdx,0
+	mov	r11,rdx
+
+	mul	rbp
+	add	r13,rax
+	mov	rax,QWORD[((-8))+rsi]
+	adc	rdx,0
+	add	r13,r10
+	adc	rdx,0
+	mov	QWORD[((-32))+r14],rdi
+	mov	rdi,rdx
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,rbp
+	mov	rbp,QWORD[((-16))+rcx]
+	adc	rdx,0
+	add	r11,QWORD[((-8))+r14]
+	adc	rdx,0
+	mov	r10,rdx
+
+	mul	rbp
+	add	rdi,rax
+	mov	rax,QWORD[r9*1+rsi]
+	adc	rdx,0
+	add	rdi,r11
+	adc	rdx,0
+	mov	QWORD[((-24))+r14],r13
+	mov	r13,rdx
+
+DB	102,72,15,126,195
+	mov	QWORD[((-16))+r14],rdi
+	lea	rcx,[r9*2+rcx]
+
+	xor	rdi,rdi
+	add	r13,r10
+	adc	rdi,0
+	add	r13,QWORD[r14]
+	adc	rdi,0
+	mov	QWORD[((-8))+r14],r13
+
+	cmp	r12,QWORD[((16+8))+rsp]
+	jb	NEAR $L$outer4x
+	sub	rbp,r13
+	adc	r15,r15
+	or	rdi,r15
+	xor	rdi,1
+	lea	rbx,[r9*1+r14]
+	lea	rbp,[rdi*8+rcx]
+	mov	rcx,r9
+	sar	rcx,3+2
+	mov	rdi,QWORD[((56+8))+rsp]
+	jmp	NEAR $L$sqr4x_sub
+
+global	bn_power5
+
+ALIGN	32
+bn_power5:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_power5:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-40))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+	mov	r10d,r9d
+	shl	r9d,3
+	shl	r10d,3+2
+	neg	r9
+	mov	r8,QWORD[r8]
+
+
+
+
+
+
+
+	lea	r11,[((-64))+r9*2+rsp]
+	sub	r11,rsi
+	and	r11,4095
+	cmp	r10,r11
+	jb	NEAR $L$pwr_sp_alt
+	sub	rsp,r11
+	lea	rsp,[((-64))+r9*2+rsp]
+	jmp	NEAR $L$pwr_sp_done
+
+ALIGN	32
+$L$pwr_sp_alt:
+	lea	r10,[((4096-64))+r9*2]
+	lea	rsp,[((-64))+r9*2+rsp]
+	sub	r11,r10
+	mov	r10,0
+	cmovc	r11,r10
+	sub	rsp,r11
+$L$pwr_sp_done:
+	and	rsp,-64
+	mov	r10,r9
+	neg	r9
+
+
+
+
+
+
+
+
+
+
+	mov	QWORD[32+rsp],r8
+	mov	QWORD[40+rsp],rax
+$L$power5_body:
+DB	102,72,15,110,207
+DB	102,72,15,110,209
+DB	102,73,15,110,218
+DB	102,72,15,110,226
+
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+	call	__bn_sqr8x_internal
+
+DB	102,72,15,126,209
+DB	102,72,15,126,226
+	mov	rdi,rsi
+	mov	rax,QWORD[40+rsp]
+	lea	r8,[32+rsp]
+
+	call	mul4x_internal
+
+	mov	rsi,QWORD[40+rsp]
+	mov	rax,1
+	mov	r15,QWORD[((-48))+rsi]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$power5_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_power5:
+
+global	bn_sqr8x_internal
+
+
+ALIGN	32
+bn_sqr8x_internal:
+__bn_sqr8x_internal:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	lea	rbp,[32+r10]
+	lea	rsi,[r9*1+rsi]
+
+	mov	rcx,r9
+
+
+	mov	r14,QWORD[((-32))+rbp*1+rsi]
+	lea	rdi,[((48+8))+r9*2+rsp]
+	mov	rax,QWORD[((-24))+rbp*1+rsi]
+	lea	rdi,[((-32))+rbp*1+rdi]
+	mov	rbx,QWORD[((-16))+rbp*1+rsi]
+	mov	r15,rax
+
+	mul	r14
+	mov	r10,rax
+	mov	rax,rbx
+	mov	r11,rdx
+	mov	QWORD[((-24))+rbp*1+rdi],r10
+
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	adc	rdx,0
+	mov	QWORD[((-16))+rbp*1+rdi],r11
+	mov	r10,rdx
+
+
+	mov	rbx,QWORD[((-8))+rbp*1+rsi]
+	mul	r15
+	mov	r12,rax
+	mov	rax,rbx
+	mov	r13,rdx
+
+	lea	rcx,[rbp]
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	mov	r11,rdx
+	adc	r11,0
+	add	r10,r12
+	adc	r11,0
+	mov	QWORD[((-8))+rcx*1+rdi],r10
+	jmp	NEAR $L$sqr4x_1st
+
+ALIGN	32
+$L$sqr4x_1st:
+	mov	rbx,QWORD[rcx*1+rsi]
+	mul	r15
+	add	r13,rax
+	mov	rax,rbx
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	mov	rbx,QWORD[8+rcx*1+rsi]
+	mov	r10,rdx
+	adc	r10,0
+	add	r11,r13
+	adc	r10,0
+
+
+	mul	r15
+	add	r12,rax
+	mov	rax,rbx
+	mov	QWORD[rcx*1+rdi],r11
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	mov	rbx,QWORD[16+rcx*1+rsi]
+	mov	r11,rdx
+	adc	r11,0
+	add	r10,r12
+	adc	r11,0
+
+	mul	r15
+	add	r13,rax
+	mov	rax,rbx
+	mov	QWORD[8+rcx*1+rdi],r10
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	mov	rbx,QWORD[24+rcx*1+rsi]
+	mov	r10,rdx
+	adc	r10,0
+	add	r11,r13
+	adc	r10,0
+
+
+	mul	r15
+	add	r12,rax
+	mov	rax,rbx
+	mov	QWORD[16+rcx*1+rdi],r11
+	mov	r13,rdx
+	adc	r13,0
+	lea	rcx,[32+rcx]
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	mov	r11,rdx
+	adc	r11,0
+	add	r10,r12
+	adc	r11,0
+	mov	QWORD[((-8))+rcx*1+rdi],r10
+
+	cmp	rcx,0
+	jne	NEAR $L$sqr4x_1st
+
+	mul	r15
+	add	r13,rax
+	lea	rbp,[16+rbp]
+	adc	rdx,0
+	add	r13,r11
+	adc	rdx,0
+
+	mov	QWORD[rdi],r13
+	mov	r12,rdx
+	mov	QWORD[8+rdi],rdx
+	jmp	NEAR $L$sqr4x_outer
+
+ALIGN	32
+$L$sqr4x_outer:
+	mov	r14,QWORD[((-32))+rbp*1+rsi]
+	lea	rdi,[((48+8))+r9*2+rsp]
+	mov	rax,QWORD[((-24))+rbp*1+rsi]
+	lea	rdi,[((-32))+rbp*1+rdi]
+	mov	rbx,QWORD[((-16))+rbp*1+rsi]
+	mov	r15,rax
+
+	mul	r14
+	mov	r10,QWORD[((-24))+rbp*1+rdi]
+	add	r10,rax
+	mov	rax,rbx
+	adc	rdx,0
+	mov	QWORD[((-24))+rbp*1+rdi],r10
+	mov	r11,rdx
+
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	adc	rdx,0
+	add	r11,QWORD[((-16))+rbp*1+rdi]
+	mov	r10,rdx
+	adc	r10,0
+	mov	QWORD[((-16))+rbp*1+rdi],r11
+
+	xor	r12,r12
+
+	mov	rbx,QWORD[((-8))+rbp*1+rsi]
+	mul	r15
+	add	r12,rax
+	mov	rax,rbx
+	adc	rdx,0
+	add	r12,QWORD[((-8))+rbp*1+rdi]
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	adc	rdx,0
+	add	r10,r12
+	mov	r11,rdx
+	adc	r11,0
+	mov	QWORD[((-8))+rbp*1+rdi],r10
+
+	lea	rcx,[rbp]
+	jmp	NEAR $L$sqr4x_inner
+
+ALIGN	32
+$L$sqr4x_inner:
+	mov	rbx,QWORD[rcx*1+rsi]
+	mul	r15
+	add	r13,rax
+	mov	rax,rbx
+	mov	r12,rdx
+	adc	r12,0
+	add	r13,QWORD[rcx*1+rdi]
+	adc	r12,0
+
+DB	0x67
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	mov	rbx,QWORD[8+rcx*1+rsi]
+	mov	r10,rdx
+	adc	r10,0
+	add	r11,r13
+	adc	r10,0
+
+	mul	r15
+	add	r12,rax
+	mov	QWORD[rcx*1+rdi],r11
+	mov	rax,rbx
+	mov	r13,rdx
+	adc	r13,0
+	add	r12,QWORD[8+rcx*1+rdi]
+	lea	rcx,[16+rcx]
+	adc	r13,0
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	adc	rdx,0
+	add	r10,r12
+	mov	r11,rdx
+	adc	r11,0
+	mov	QWORD[((-8))+rcx*1+rdi],r10
+
+	cmp	rcx,0
+	jne	NEAR $L$sqr4x_inner
+
+DB	0x67
+	mul	r15
+	add	r13,rax
+	adc	rdx,0
+	add	r13,r11
+	adc	rdx,0
+
+	mov	QWORD[rdi],r13
+	mov	r12,rdx
+	mov	QWORD[8+rdi],rdx
+
+	add	rbp,16
+	jnz	NEAR $L$sqr4x_outer
+
+
+	mov	r14,QWORD[((-32))+rsi]
+	lea	rdi,[((48+8))+r9*2+rsp]
+	mov	rax,QWORD[((-24))+rsi]
+	lea	rdi,[((-32))+rbp*1+rdi]
+	mov	rbx,QWORD[((-16))+rsi]
+	mov	r15,rax
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	r14
+	add	r11,rax
+	mov	rax,rbx
+	mov	QWORD[((-24))+rdi],r10
+	mov	r10,rdx
+	adc	r10,0
+	add	r11,r13
+	mov	rbx,QWORD[((-8))+rsi]
+	adc	r10,0
+
+	mul	r15
+	add	r12,rax
+	mov	rax,rbx
+	mov	QWORD[((-16))+rdi],r11
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	r14
+	add	r10,rax
+	mov	rax,rbx
+	mov	r11,rdx
+	adc	r11,0
+	add	r10,r12
+	adc	r11,0
+	mov	QWORD[((-8))+rdi],r10
+
+	mul	r15
+	add	r13,rax
+	mov	rax,QWORD[((-16))+rsi]
+	adc	rdx,0
+	add	r13,r11
+	adc	rdx,0
+
+	mov	QWORD[rdi],r13
+	mov	r12,rdx
+	mov	QWORD[8+rdi],rdx
+
+	mul	rbx
+	add	rbp,16
+	xor	r14,r14
+	sub	rbp,r9
+	xor	r15,r15
+
+	add	rax,r12
+	adc	rdx,0
+	mov	QWORD[8+rdi],rax
+	mov	QWORD[16+rdi],rdx
+	mov	QWORD[24+rdi],r15
+
+	mov	rax,QWORD[((-16))+rbp*1+rsi]
+	lea	rdi,[((48+8))+rsp]
+	xor	r10,r10
+	mov	r11,QWORD[8+rdi]
+
+	lea	r12,[r10*2+r14]
+	shr	r10,63
+	lea	r13,[r11*2+rcx]
+	shr	r11,63
+	or	r13,r10
+	mov	r10,QWORD[16+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[24+rdi]
+	adc	r12,rax
+	mov	rax,QWORD[((-8))+rbp*1+rsi]
+	mov	QWORD[rdi],r12
+	adc	r13,rdx
+
+	lea	rbx,[r10*2+r14]
+	mov	QWORD[8+rdi],r13
+	sbb	r15,r15
+	shr	r10,63
+	lea	r8,[r11*2+rcx]
+	shr	r11,63
+	or	r8,r10
+	mov	r10,QWORD[32+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[40+rdi]
+	adc	rbx,rax
+	mov	rax,QWORD[rbp*1+rsi]
+	mov	QWORD[16+rdi],rbx
+	adc	r8,rdx
+	lea	rbp,[16+rbp]
+	mov	QWORD[24+rdi],r8
+	sbb	r15,r15
+	lea	rdi,[64+rdi]
+	jmp	NEAR $L$sqr4x_shift_n_add
+
+ALIGN	32
+$L$sqr4x_shift_n_add:
+	lea	r12,[r10*2+r14]
+	shr	r10,63
+	lea	r13,[r11*2+rcx]
+	shr	r11,63
+	or	r13,r10
+	mov	r10,QWORD[((-16))+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[((-8))+rdi]
+	adc	r12,rax
+	mov	rax,QWORD[((-8))+rbp*1+rsi]
+	mov	QWORD[((-32))+rdi],r12
+	adc	r13,rdx
+
+	lea	rbx,[r10*2+r14]
+	mov	QWORD[((-24))+rdi],r13
+	sbb	r15,r15
+	shr	r10,63
+	lea	r8,[r11*2+rcx]
+	shr	r11,63
+	or	r8,r10
+	mov	r10,QWORD[rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[8+rdi]
+	adc	rbx,rax
+	mov	rax,QWORD[rbp*1+rsi]
+	mov	QWORD[((-16))+rdi],rbx
+	adc	r8,rdx
+
+	lea	r12,[r10*2+r14]
+	mov	QWORD[((-8))+rdi],r8
+	sbb	r15,r15
+	shr	r10,63
+	lea	r13,[r11*2+rcx]
+	shr	r11,63
+	or	r13,r10
+	mov	r10,QWORD[16+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[24+rdi]
+	adc	r12,rax
+	mov	rax,QWORD[8+rbp*1+rsi]
+	mov	QWORD[rdi],r12
+	adc	r13,rdx
+
+	lea	rbx,[r10*2+r14]
+	mov	QWORD[8+rdi],r13
+	sbb	r15,r15
+	shr	r10,63
+	lea	r8,[r11*2+rcx]
+	shr	r11,63
+	or	r8,r10
+	mov	r10,QWORD[32+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[40+rdi]
+	adc	rbx,rax
+	mov	rax,QWORD[16+rbp*1+rsi]
+	mov	QWORD[16+rdi],rbx
+	adc	r8,rdx
+	mov	QWORD[24+rdi],r8
+	sbb	r15,r15
+	lea	rdi,[64+rdi]
+	add	rbp,32
+	jnz	NEAR $L$sqr4x_shift_n_add
+
+	lea	r12,[r10*2+r14]
+DB	0x67
+	shr	r10,63
+	lea	r13,[r11*2+rcx]
+	shr	r11,63
+	or	r13,r10
+	mov	r10,QWORD[((-16))+rdi]
+	mov	r14,r11
+	mul	rax
+	neg	r15
+	mov	r11,QWORD[((-8))+rdi]
+	adc	r12,rax
+	mov	rax,QWORD[((-8))+rsi]
+	mov	QWORD[((-32))+rdi],r12
+	adc	r13,rdx
+
+	lea	rbx,[r10*2+r14]
+	mov	QWORD[((-24))+rdi],r13
+	sbb	r15,r15
+	shr	r10,63
+	lea	r8,[r11*2+rcx]
+	shr	r11,63
+	or	r8,r10
+	mul	rax
+	neg	r15
+	adc	rbx,rax
+	adc	r8,rdx
+	mov	QWORD[((-16))+rdi],rbx
+	mov	QWORD[((-8))+rdi],r8
+DB	102,72,15,126,213
+sqr8x_reduction:
+	xor	rax,rax
+	lea	rcx,[r9*2+rbp]
+	lea	rdx,[((48+8))+r9*2+rsp]
+	mov	QWORD[((0+8))+rsp],rcx
+	lea	rdi,[((48+8))+r9*1+rsp]
+	mov	QWORD[((8+8))+rsp],rdx
+	neg	r9
+	jmp	NEAR $L$8x_reduction_loop
+
+ALIGN	32
+$L$8x_reduction_loop:
+	lea	rdi,[r9*1+rdi]
+DB	0x66
+	mov	rbx,QWORD[rdi]
+	mov	r9,QWORD[8+rdi]
+	mov	r10,QWORD[16+rdi]
+	mov	r11,QWORD[24+rdi]
+	mov	r12,QWORD[32+rdi]
+	mov	r13,QWORD[40+rdi]
+	mov	r14,QWORD[48+rdi]
+	mov	r15,QWORD[56+rdi]
+	mov	QWORD[rdx],rax
+	lea	rdi,[64+rdi]
+
+DB	0x67
+	mov	r8,rbx
+	imul	rbx,QWORD[((32+8))+rsp]
+	mov	rax,QWORD[rbp]
+	mov	ecx,8
+	jmp	NEAR $L$8x_reduce
+
+ALIGN	32
+$L$8x_reduce:
+	mul	rbx
+	mov	rax,QWORD[16+rbp]
+	neg	r8
+	mov	r8,rdx
+	adc	r8,0
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[32+rbp]
+	adc	rdx,0
+	add	r8,r9
+	mov	QWORD[((48-8+8))+rcx*8+rsp],rbx
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[48+rbp]
+	adc	rdx,0
+	add	r9,r10
+	mov	rsi,QWORD[((32+8))+rsp]
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[64+rbp]
+	adc	rdx,0
+	imul	rsi,r8
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[80+rbp]
+	adc	rdx,0
+	add	r11,r12
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[96+rbp]
+	adc	rdx,0
+	add	r12,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[112+rbp]
+	adc	rdx,0
+	add	r13,r14
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+	mov	rbx,rsi
+	add	r15,rax
+	mov	rax,QWORD[rbp]
+	adc	rdx,0
+	add	r14,r15
+	mov	r15,rdx
+	adc	r15,0
+
+	dec	ecx
+	jnz	NEAR $L$8x_reduce
+
+	lea	rbp,[128+rbp]
+	xor	rax,rax
+	mov	rdx,QWORD[((8+8))+rsp]
+	cmp	rbp,QWORD[((0+8))+rsp]
+	jae	NEAR $L$8x_no_tail
+
+DB	0x66
+	add	r8,QWORD[rdi]
+	adc	r9,QWORD[8+rdi]
+	adc	r10,QWORD[16+rdi]
+	adc	r11,QWORD[24+rdi]
+	adc	r12,QWORD[32+rdi]
+	adc	r13,QWORD[40+rdi]
+	adc	r14,QWORD[48+rdi]
+	adc	r15,QWORD[56+rdi]
+	sbb	rsi,rsi
+
+	mov	rbx,QWORD[((48+56+8))+rsp]
+	mov	ecx,8
+	mov	rax,QWORD[rbp]
+	jmp	NEAR $L$8x_tail
+
+ALIGN	32
+$L$8x_tail:
+	mul	rbx
+	add	r8,rax
+	mov	rax,QWORD[16+rbp]
+	mov	QWORD[rdi],r8
+	mov	r8,rdx
+	adc	r8,0
+
+	mul	rbx
+	add	r9,rax
+	mov	rax,QWORD[32+rbp]
+	adc	rdx,0
+	add	r8,r9
+	lea	rdi,[8+rdi]
+	mov	r9,rdx
+	adc	r9,0
+
+	mul	rbx
+	add	r10,rax
+	mov	rax,QWORD[48+rbp]
+	adc	rdx,0
+	add	r9,r10
+	mov	r10,rdx
+	adc	r10,0
+
+	mul	rbx
+	add	r11,rax
+	mov	rax,QWORD[64+rbp]
+	adc	rdx,0
+	add	r10,r11
+	mov	r11,rdx
+	adc	r11,0
+
+	mul	rbx
+	add	r12,rax
+	mov	rax,QWORD[80+rbp]
+	adc	rdx,0
+	add	r11,r12
+	mov	r12,rdx
+	adc	r12,0
+
+	mul	rbx
+	add	r13,rax
+	mov	rax,QWORD[96+rbp]
+	adc	rdx,0
+	add	r12,r13
+	mov	r13,rdx
+	adc	r13,0
+
+	mul	rbx
+	add	r14,rax
+	mov	rax,QWORD[112+rbp]
+	adc	rdx,0
+	add	r13,r14
+	mov	r14,rdx
+	adc	r14,0
+
+	mul	rbx
+	mov	rbx,QWORD[((48-16+8))+rcx*8+rsp]
+	add	r15,rax
+	adc	rdx,0
+	add	r14,r15
+	mov	rax,QWORD[rbp]
+	mov	r15,rdx
+	adc	r15,0
+
+	dec	ecx
+	jnz	NEAR $L$8x_tail
+
+	lea	rbp,[128+rbp]
+	mov	rdx,QWORD[((8+8))+rsp]
+	cmp	rbp,QWORD[((0+8))+rsp]
+	jae	NEAR $L$8x_tail_done
+
+	mov	rbx,QWORD[((48+56+8))+rsp]
+	neg	rsi
+	mov	rax,QWORD[rbp]
+	adc	r8,QWORD[rdi]
+	adc	r9,QWORD[8+rdi]
+	adc	r10,QWORD[16+rdi]
+	adc	r11,QWORD[24+rdi]
+	adc	r12,QWORD[32+rdi]
+	adc	r13,QWORD[40+rdi]
+	adc	r14,QWORD[48+rdi]
+	adc	r15,QWORD[56+rdi]
+	sbb	rsi,rsi
+
+	mov	ecx,8
+	jmp	NEAR $L$8x_tail
+
+ALIGN	32
+$L$8x_tail_done:
+	add	r8,QWORD[rdx]
+	xor	rax,rax
+
+	neg	rsi
+$L$8x_no_tail:
+	adc	r8,QWORD[rdi]
+	adc	r9,QWORD[8+rdi]
+	adc	r10,QWORD[16+rdi]
+	adc	r11,QWORD[24+rdi]
+	adc	r12,QWORD[32+rdi]
+	adc	r13,QWORD[40+rdi]
+	adc	r14,QWORD[48+rdi]
+	adc	r15,QWORD[56+rdi]
+	adc	rax,0
+	mov	rcx,QWORD[((-16))+rbp]
+	xor	rsi,rsi
+
+DB	102,72,15,126,213
+
+	mov	QWORD[rdi],r8
+	mov	QWORD[8+rdi],r9
+DB	102,73,15,126,217
+	mov	QWORD[16+rdi],r10
+	mov	QWORD[24+rdi],r11
+	mov	QWORD[32+rdi],r12
+	mov	QWORD[40+rdi],r13
+	mov	QWORD[48+rdi],r14
+	mov	QWORD[56+rdi],r15
+	lea	rdi,[64+rdi]
+
+	cmp	rdi,rdx
+	jb	NEAR $L$8x_reduction_loop
+
+	sub	rcx,r15
+	lea	rbx,[r9*1+rdi]
+	adc	rsi,rsi
+	mov	rcx,r9
+	or	rax,rsi
+DB	102,72,15,126,207
+	xor	rax,1
+DB	102,72,15,126,206
+	lea	rbp,[rax*8+rbp]
+	sar	rcx,3+2
+	jmp	NEAR $L$sqr4x_sub
+
+ALIGN	32
+$L$sqr4x_sub:
+DB	0x66
+	mov	r12,QWORD[rbx]
+	mov	r13,QWORD[8+rbx]
+	sbb	r12,QWORD[rbp]
+	mov	r14,QWORD[16+rbx]
+	sbb	r13,QWORD[16+rbp]
+	mov	r15,QWORD[24+rbx]
+	lea	rbx,[32+rbx]
+	sbb	r14,QWORD[32+rbp]
+	mov	QWORD[rdi],r12
+	sbb	r15,QWORD[48+rbp]
+	lea	rbp,[64+rbp]
+	mov	QWORD[8+rdi],r13
+	mov	QWORD[16+rdi],r14
+	mov	QWORD[24+rdi],r15
+	lea	rdi,[32+rdi]
+
+	inc	rcx
+	jnz	NEAR $L$sqr4x_sub
+	mov	r10,r9
+	neg	r9
+	DB	0F3h,0C3h		;repret
+
+global	bn_from_montgomery
+
+ALIGN	32
+bn_from_montgomery:
+	test	DWORD[48+rsp],7
+	jz	NEAR bn_from_mont8x
+	xor	eax,eax
+	DB	0F3h,0C3h		;repret
+
+
+
+ALIGN	32
+bn_from_mont8x:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_bn_from_mont8x:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+DB	0x67
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	lea	rsp,[((-40))+rsp]
+	movaps	XMMWORD[rsp],xmm6
+	movaps	XMMWORD[16+rsp],xmm7
+DB	0x67
+	mov	r10d,r9d
+	shl	r9d,3
+	shl	r10d,3+2
+	neg	r9
+	mov	r8,QWORD[r8]
+
+
+
+
+
+
+
+	lea	r11,[((-64))+r9*2+rsp]
+	sub	r11,rsi
+	and	r11,4095
+	cmp	r10,r11
+	jb	NEAR $L$from_sp_alt
+	sub	rsp,r11
+	lea	rsp,[((-64))+r9*2+rsp]
+	jmp	NEAR $L$from_sp_done
+
+ALIGN	32
+$L$from_sp_alt:
+	lea	r10,[((4096-64))+r9*2]
+	lea	rsp,[((-64))+r9*2+rsp]
+	sub	r11,r10
+	mov	r10,0
+	cmovc	r11,r10
+	sub	rsp,r11
+$L$from_sp_done:
+	and	rsp,-64
+	mov	r10,r9
+	neg	r9
+
+
+
+
+
+
+
+
+
+
+	mov	QWORD[32+rsp],r8
+	mov	QWORD[40+rsp],rax
+$L$from_body:
+	mov	r11,r9
+	lea	rax,[48+rsp]
+	pxor	xmm0,xmm0
+	jmp	NEAR $L$mul_by_1
+
+ALIGN	32
+$L$mul_by_1:
+	movdqu	xmm1,XMMWORD[rsi]
+	movdqu	xmm2,XMMWORD[16+rsi]
+	movdqu	xmm3,XMMWORD[32+rsi]
+	movdqa	XMMWORD[r9*1+rax],xmm0
+	movdqu	xmm4,XMMWORD[48+rsi]
+	movdqa	XMMWORD[16+r9*1+rax],xmm0
+DB	0x48,0x8d,0xb6,0x40,0x00,0x00,0x00
+	movdqa	XMMWORD[rax],xmm1
+	movdqa	XMMWORD[32+r9*1+rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm2
+	movdqa	XMMWORD[48+r9*1+rax],xmm0
+	movdqa	XMMWORD[32+rax],xmm3
+	movdqa	XMMWORD[48+rax],xmm4
+	lea	rax,[64+rax]
+	sub	r11,64
+	jnz	NEAR $L$mul_by_1
+
+DB	102,72,15,110,207
+DB	102,72,15,110,209
+DB	0x67
+	mov	rbp,rcx
+DB	102,73,15,110,218
+	call	sqr8x_reduction
+
+	pxor	xmm0,xmm0
+	lea	rax,[48+rsp]
+	mov	rsi,QWORD[40+rsp]
+	jmp	NEAR $L$from_mont_zero
+
+ALIGN	32
+$L$from_mont_zero:
+	movdqa	XMMWORD[rax],xmm0
+	movdqa	XMMWORD[16+rax],xmm0
+	movdqa	XMMWORD[32+rax],xmm0
+	movdqa	XMMWORD[48+rax],xmm0
+	lea	rax,[64+rax]
+	sub	r9,32
+	jnz	NEAR $L$from_mont_zero
+
+	mov	rax,1
+	mov	r15,QWORD[((-48))+rsi]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$from_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_from_mont8x:
+global	bn_scatter5
+
+ALIGN	16
+bn_scatter5:
+	cmp	edx,0
+	jz	NEAR $L$scatter_epilogue
+	lea	r8,[r9*8+r8]
+$L$scatter:
+	mov	rax,QWORD[rcx]
+	lea	rcx,[8+rcx]
+	mov	QWORD[r8],rax
+	lea	r8,[256+r8]
+	sub	edx,1
+	jnz	NEAR $L$scatter
+$L$scatter_epilogue:
+	DB	0F3h,0C3h		;repret
+
+
+global	bn_gather5
+
+ALIGN	16
+bn_gather5:
+$L$SEH_begin_bn_gather5:
+
+DB	0x48,0x83,0xec,0x28
+DB	0x0f,0x29,0x34,0x24
+DB	0x0f,0x29,0x7c,0x24,0x10
+	mov	r11d,r9d
+	shr	r9d,3
+	and	r11,7
+	not	r9d
+	lea	rax,[$L$magic_masks]
+	and	r9d,3
+	lea	r8,[128+r11*8+r8]
+	movq	xmm4,QWORD[r9*8+rax]
+	movq	xmm5,QWORD[8+r9*8+rax]
+	movq	xmm6,QWORD[16+r9*8+rax]
+	movq	xmm7,QWORD[24+r9*8+rax]
+	jmp	NEAR $L$gather
+ALIGN	16
+$L$gather:
+	movq	xmm0,QWORD[(((-128)))+r8]
+	movq	xmm1,QWORD[((-64))+r8]
+	pand	xmm0,xmm4
+	movq	xmm2,QWORD[r8]
+	pand	xmm1,xmm5
+	movq	xmm3,QWORD[64+r8]
+	pand	xmm2,xmm6
+	por	xmm0,xmm1
+	pand	xmm3,xmm7
+DB	0x67,0x67
+	por	xmm0,xmm2
+	lea	r8,[256+r8]
+	por	xmm0,xmm3
+
+	movq	QWORD[rcx],xmm0
+	lea	rcx,[8+rcx]
+	sub	edx,1
+	jnz	NEAR $L$gather
+	movaps	xmm6,XMMWORD[rsp]
+	movaps	xmm7,XMMWORD[16+rsp]
+	lea	rsp,[40+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_bn_gather5:
+
+ALIGN	64
+$L$magic_masks:
+	DD	0,0,0,0,0,0,-1,-1
+	DD	0,0,0,0,0,0,0,0
+DB	77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105
+DB	112,108,105,99,97,116,105,111,110,32,119,105,116,104,32,115
+DB	99,97,116,116,101,114,47,103,97,116,104,101,114,32,102,111
+DB	114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79
+DB	71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111
+DB	112,101,110,115,115,108,46,111,114,103,62,0
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+mul_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	lea	r10,[$L$mul_epilogue]
+	cmp	rbx,r10
+	jb	NEAR $L$body_40
+
+	mov	r10,QWORD[192+r8]
+	mov	rax,QWORD[8+r10*8+rax]
+	jmp	NEAR $L$body_proceed
+
+$L$body_40:
+	mov	rax,QWORD[40+rax]
+$L$body_proceed:
+
+	movaps	xmm0,XMMWORD[((-88))+rax]
+	movaps	xmm1,XMMWORD[((-72))+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+	movups	XMMWORD[512+r8],xmm0
+	movups	XMMWORD[528+r8],xmm1
+
+$L$common_seh_tail:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_bn_mul_mont_gather5 wrt ..imagebase
+	DD	$L$SEH_end_bn_mul_mont_gather5 wrt ..imagebase
+	DD	$L$SEH_info_bn_mul_mont_gather5 wrt ..imagebase
+
+	DD	$L$SEH_begin_bn_mul4x_mont_gather5 wrt ..imagebase
+	DD	$L$SEH_end_bn_mul4x_mont_gather5 wrt ..imagebase
+	DD	$L$SEH_info_bn_mul4x_mont_gather5 wrt ..imagebase
+
+	DD	$L$SEH_begin_bn_power5 wrt ..imagebase
+	DD	$L$SEH_end_bn_power5 wrt ..imagebase
+	DD	$L$SEH_info_bn_power5 wrt ..imagebase
+
+	DD	$L$SEH_begin_bn_from_mont8x wrt ..imagebase
+	DD	$L$SEH_end_bn_from_mont8x wrt ..imagebase
+	DD	$L$SEH_info_bn_from_mont8x wrt ..imagebase
+	DD	$L$SEH_begin_bn_gather5 wrt ..imagebase
+	DD	$L$SEH_end_bn_gather5 wrt ..imagebase
+	DD	$L$SEH_info_bn_gather5 wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_bn_mul_mont_gather5:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$mul_body wrt ..imagebase,$L$mul_epilogue wrt ..imagebase
+ALIGN	8
+$L$SEH_info_bn_mul4x_mont_gather5:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$mul4x_body wrt ..imagebase,$L$mul4x_epilogue wrt ..imagebase
+ALIGN	8
+$L$SEH_info_bn_power5:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$power5_body wrt ..imagebase,$L$power5_epilogue wrt ..imagebase
+ALIGN	8
+$L$SEH_info_bn_from_mont8x:
+DB	9,0,0,0
+	DD	mul_handler wrt ..imagebase
+	DD	$L$from_body wrt ..imagebase,$L$from_epilogue wrt ..imagebase
+ALIGN	8
+$L$SEH_info_bn_gather5:
+DB	0x01,0x0d,0x05,0x00
+DB	0x0d,0x78,0x01,0x00
+DB	0x08,0x68,0x00,0x00
+DB	0x04,0x42,0x00,0x00
+ALIGN	8
diff --git a/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm b/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm
new file mode 100644
index 0000000..c92d7bb
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/cpu-x86_64-asm.asm
@@ -0,0 +1,154 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+global	OPENSSL_ia32_cpuid
+
+ALIGN	16
+OPENSSL_ia32_cpuid:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_OPENSSL_ia32_cpuid:
+	mov	rdi,rcx
+
+
+
+
+	mov	rdi,rcx
+	mov	r8,rbx
+
+	xor	eax,eax
+	mov	DWORD[8+rdi],eax
+	cpuid
+	mov	r11d,eax
+
+	xor	eax,eax
+	cmp	ebx,0x756e6547
+	setne	al
+	mov	r9d,eax
+	cmp	edx,0x49656e69
+	setne	al
+	or	r9d,eax
+	cmp	ecx,0x6c65746e
+	setne	al
+	or	r9d,eax
+	jz	NEAR $L$intel
+
+	cmp	ebx,0x68747541
+	setne	al
+	mov	r10d,eax
+	cmp	edx,0x69746E65
+	setne	al
+	or	r10d,eax
+	cmp	ecx,0x444D4163
+	setne	al
+	or	r10d,eax
+	jnz	NEAR $L$intel
+
+
+
+
+	mov	eax,0x80000000
+	cpuid
+
+
+	cmp	eax,0x80000001
+	jb	NEAR $L$intel
+	mov	r10d,eax
+	mov	eax,0x80000001
+	cpuid
+
+
+	or	r9d,ecx
+	and	r9d,0x00000801
+
+	cmp	r10d,0x80000008
+	jb	NEAR $L$intel
+
+	mov	eax,0x80000008
+	cpuid
+
+	movzx	r10,cl
+	inc	r10
+
+	mov	eax,1
+	cpuid
+
+	bt	edx,28
+	jnc	NEAR $L$generic
+	shr	ebx,16
+	cmp	bl,r10b
+	ja	NEAR $L$generic
+	and	edx,0xefffffff
+	jmp	NEAR $L$generic
+
+$L$intel:
+	cmp	r11d,4
+	mov	r10d,-1
+	jb	NEAR $L$nocacheinfo
+
+	mov	eax,4
+	mov	ecx,0
+	cpuid
+	mov	r10d,eax
+	shr	r10d,14
+	and	r10d,0xfff
+
+	cmp	r11d,7
+	jb	NEAR $L$nocacheinfo
+
+	mov	eax,7
+	xor	ecx,ecx
+	cpuid
+	mov	DWORD[8+rdi],ebx
+
+$L$nocacheinfo:
+	mov	eax,1
+	cpuid
+
+	and	edx,0xbfefffff
+	cmp	r9d,0
+	jne	NEAR $L$notintel
+	or	edx,0x40000000
+$L$notintel:
+	bt	edx,28
+	jnc	NEAR $L$generic
+	and	edx,0xefffffff
+	cmp	r10d,0
+	je	NEAR $L$generic
+
+	or	edx,0x10000000
+	shr	ebx,16
+	cmp	bl,1
+	ja	NEAR $L$generic
+	and	edx,0xefffffff
+$L$generic:
+	and	r9d,0x00000800
+	and	ecx,0xfffff7ff
+	or	r9d,ecx
+
+	mov	r10d,edx
+	bt	r9d,27
+	jnc	NEAR $L$clear_avx
+	xor	ecx,ecx
+DB	0x0f,0x01,0xd0
+	and	eax,6
+	cmp	eax,6
+	je	NEAR $L$done
+$L$clear_avx:
+	mov	eax,0xefffe7ff
+	and	r9d,eax
+	and	DWORD[8+rdi],0xffffffdf
+$L$done:
+	mov	DWORD[4+rdi],r9d
+	mov	DWORD[rdi],r10d
+	mov	rbx,r8
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_OPENSSL_ia32_cpuid:
+
diff --git a/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm
new file mode 100644
index 0000000..0e9d2c6
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/md5/md5-x86_64.asm
@@ -0,0 +1,776 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+ALIGN	16
+
+global	md5_block_asm_data_order
+
+md5_block_asm_data_order:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_md5_block_asm_data_order:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbp
+	push	rbx
+	push	r12
+	push	r14
+	push	r15
+$L$prologue:
+
+
+
+
+	mov	rbp,rdi
+	shl	rdx,6
+	lea	rdi,[rdx*1+rsi]
+	mov	eax,DWORD[rbp]
+	mov	ebx,DWORD[4+rbp]
+	mov	ecx,DWORD[8+rbp]
+	mov	edx,DWORD[12+rbp]
+
+
+
+
+
+
+
+	cmp	rsi,rdi
+	je	NEAR $L$end
+
+
+$L$loop:
+	mov	r8d,eax
+	mov	r9d,ebx
+	mov	r14d,ecx
+	mov	r15d,edx
+	mov	r10d,DWORD[rsi]
+	mov	r11d,edx
+	xor	r11d,ecx
+	lea	eax,[((-680876936))+r10*1+rax]
+	and	r11d,ebx
+	xor	r11d,edx
+	mov	r10d,DWORD[4+rsi]
+	add	eax,r11d
+	rol	eax,7
+	mov	r11d,ecx
+	add	eax,ebx
+	xor	r11d,ebx
+	lea	edx,[((-389564586))+r10*1+rdx]
+	and	r11d,eax
+	xor	r11d,ecx
+	mov	r10d,DWORD[8+rsi]
+	add	edx,r11d
+	rol	edx,12
+	mov	r11d,ebx
+	add	edx,eax
+	xor	r11d,eax
+	lea	ecx,[606105819+r10*1+rcx]
+	and	r11d,edx
+	xor	r11d,ebx
+	mov	r10d,DWORD[12+rsi]
+	add	ecx,r11d
+	rol	ecx,17
+	mov	r11d,eax
+	add	ecx,edx
+	xor	r11d,edx
+	lea	ebx,[((-1044525330))+r10*1+rbx]
+	and	r11d,ecx
+	xor	r11d,eax
+	mov	r10d,DWORD[16+rsi]
+	add	ebx,r11d
+	rol	ebx,22
+	mov	r11d,edx
+	add	ebx,ecx
+	xor	r11d,ecx
+	lea	eax,[((-176418897))+r10*1+rax]
+	and	r11d,ebx
+	xor	r11d,edx
+	mov	r10d,DWORD[20+rsi]
+	add	eax,r11d
+	rol	eax,7
+	mov	r11d,ecx
+	add	eax,ebx
+	xor	r11d,ebx
+	lea	edx,[1200080426+r10*1+rdx]
+	and	r11d,eax
+	xor	r11d,ecx
+	mov	r10d,DWORD[24+rsi]
+	add	edx,r11d
+	rol	edx,12
+	mov	r11d,ebx
+	add	edx,eax
+	xor	r11d,eax
+	lea	ecx,[((-1473231341))+r10*1+rcx]
+	and	r11d,edx
+	xor	r11d,ebx
+	mov	r10d,DWORD[28+rsi]
+	add	ecx,r11d
+	rol	ecx,17
+	mov	r11d,eax
+	add	ecx,edx
+	xor	r11d,edx
+	lea	ebx,[((-45705983))+r10*1+rbx]
+	and	r11d,ecx
+	xor	r11d,eax
+	mov	r10d,DWORD[32+rsi]
+	add	ebx,r11d
+	rol	ebx,22
+	mov	r11d,edx
+	add	ebx,ecx
+	xor	r11d,ecx
+	lea	eax,[1770035416+r10*1+rax]
+	and	r11d,ebx
+	xor	r11d,edx
+	mov	r10d,DWORD[36+rsi]
+	add	eax,r11d
+	rol	eax,7
+	mov	r11d,ecx
+	add	eax,ebx
+	xor	r11d,ebx
+	lea	edx,[((-1958414417))+r10*1+rdx]
+	and	r11d,eax
+	xor	r11d,ecx
+	mov	r10d,DWORD[40+rsi]
+	add	edx,r11d
+	rol	edx,12
+	mov	r11d,ebx
+	add	edx,eax
+	xor	r11d,eax
+	lea	ecx,[((-42063))+r10*1+rcx]
+	and	r11d,edx
+	xor	r11d,ebx
+	mov	r10d,DWORD[44+rsi]
+	add	ecx,r11d
+	rol	ecx,17
+	mov	r11d,eax
+	add	ecx,edx
+	xor	r11d,edx
+	lea	ebx,[((-1990404162))+r10*1+rbx]
+	and	r11d,ecx
+	xor	r11d,eax
+	mov	r10d,DWORD[48+rsi]
+	add	ebx,r11d
+	rol	ebx,22
+	mov	r11d,edx
+	add	ebx,ecx
+	xor	r11d,ecx
+	lea	eax,[1804603682+r10*1+rax]
+	and	r11d,ebx
+	xor	r11d,edx
+	mov	r10d,DWORD[52+rsi]
+	add	eax,r11d
+	rol	eax,7
+	mov	r11d,ecx
+	add	eax,ebx
+	xor	r11d,ebx
+	lea	edx,[((-40341101))+r10*1+rdx]
+	and	r11d,eax
+	xor	r11d,ecx
+	mov	r10d,DWORD[56+rsi]
+	add	edx,r11d
+	rol	edx,12
+	mov	r11d,ebx
+	add	edx,eax
+	xor	r11d,eax
+	lea	ecx,[((-1502002290))+r10*1+rcx]
+	and	r11d,edx
+	xor	r11d,ebx
+	mov	r10d,DWORD[60+rsi]
+	add	ecx,r11d
+	rol	ecx,17
+	mov	r11d,eax
+	add	ecx,edx
+	xor	r11d,edx
+	lea	ebx,[1236535329+r10*1+rbx]
+	and	r11d,ecx
+	xor	r11d,eax
+	mov	r10d,DWORD[rsi]
+	add	ebx,r11d
+	rol	ebx,22
+	mov	r11d,edx
+	add	ebx,ecx
+	mov	r10d,DWORD[4+rsi]
+	mov	r11d,edx
+	mov	r12d,edx
+	not	r11d
+	lea	eax,[((-165796510))+r10*1+rax]
+	and	r12d,ebx
+	and	r11d,ecx
+	mov	r10d,DWORD[24+rsi]
+	or	r12d,r11d
+	mov	r11d,ecx
+	add	eax,r12d
+	mov	r12d,ecx
+	rol	eax,5
+	add	eax,ebx
+	not	r11d
+	lea	edx,[((-1069501632))+r10*1+rdx]
+	and	r12d,eax
+	and	r11d,ebx
+	mov	r10d,DWORD[44+rsi]
+	or	r12d,r11d
+	mov	r11d,ebx
+	add	edx,r12d
+	mov	r12d,ebx
+	rol	edx,9
+	add	edx,eax
+	not	r11d
+	lea	ecx,[643717713+r10*1+rcx]
+	and	r12d,edx
+	and	r11d,eax
+	mov	r10d,DWORD[rsi]
+	or	r12d,r11d
+	mov	r11d,eax
+	add	ecx,r12d
+	mov	r12d,eax
+	rol	ecx,14
+	add	ecx,edx
+	not	r11d
+	lea	ebx,[((-373897302))+r10*1+rbx]
+	and	r12d,ecx
+	and	r11d,edx
+	mov	r10d,DWORD[20+rsi]
+	or	r12d,r11d
+	mov	r11d,edx
+	add	ebx,r12d
+	mov	r12d,edx
+	rol	ebx,20
+	add	ebx,ecx
+	not	r11d
+	lea	eax,[((-701558691))+r10*1+rax]
+	and	r12d,ebx
+	and	r11d,ecx
+	mov	r10d,DWORD[40+rsi]
+	or	r12d,r11d
+	mov	r11d,ecx
+	add	eax,r12d
+	mov	r12d,ecx
+	rol	eax,5
+	add	eax,ebx
+	not	r11d
+	lea	edx,[38016083+r10*1+rdx]
+	and	r12d,eax
+	and	r11d,ebx
+	mov	r10d,DWORD[60+rsi]
+	or	r12d,r11d
+	mov	r11d,ebx
+	add	edx,r12d
+	mov	r12d,ebx
+	rol	edx,9
+	add	edx,eax
+	not	r11d
+	lea	ecx,[((-660478335))+r10*1+rcx]
+	and	r12d,edx
+	and	r11d,eax
+	mov	r10d,DWORD[16+rsi]
+	or	r12d,r11d
+	mov	r11d,eax
+	add	ecx,r12d
+	mov	r12d,eax
+	rol	ecx,14
+	add	ecx,edx
+	not	r11d
+	lea	ebx,[((-405537848))+r10*1+rbx]
+	and	r12d,ecx
+	and	r11d,edx
+	mov	r10d,DWORD[36+rsi]
+	or	r12d,r11d
+	mov	r11d,edx
+	add	ebx,r12d
+	mov	r12d,edx
+	rol	ebx,20
+	add	ebx,ecx
+	not	r11d
+	lea	eax,[568446438+r10*1+rax]
+	and	r12d,ebx
+	and	r11d,ecx
+	mov	r10d,DWORD[56+rsi]
+	or	r12d,r11d
+	mov	r11d,ecx
+	add	eax,r12d
+	mov	r12d,ecx
+	rol	eax,5
+	add	eax,ebx
+	not	r11d
+	lea	edx,[((-1019803690))+r10*1+rdx]
+	and	r12d,eax
+	and	r11d,ebx
+	mov	r10d,DWORD[12+rsi]
+	or	r12d,r11d
+	mov	r11d,ebx
+	add	edx,r12d
+	mov	r12d,ebx
+	rol	edx,9
+	add	edx,eax
+	not	r11d
+	lea	ecx,[((-187363961))+r10*1+rcx]
+	and	r12d,edx
+	and	r11d,eax
+	mov	r10d,DWORD[32+rsi]
+	or	r12d,r11d
+	mov	r11d,eax
+	add	ecx,r12d
+	mov	r12d,eax
+	rol	ecx,14
+	add	ecx,edx
+	not	r11d
+	lea	ebx,[1163531501+r10*1+rbx]
+	and	r12d,ecx
+	and	r11d,edx
+	mov	r10d,DWORD[52+rsi]
+	or	r12d,r11d
+	mov	r11d,edx
+	add	ebx,r12d
+	mov	r12d,edx
+	rol	ebx,20
+	add	ebx,ecx
+	not	r11d
+	lea	eax,[((-1444681467))+r10*1+rax]
+	and	r12d,ebx
+	and	r11d,ecx
+	mov	r10d,DWORD[8+rsi]
+	or	r12d,r11d
+	mov	r11d,ecx
+	add	eax,r12d
+	mov	r12d,ecx
+	rol	eax,5
+	add	eax,ebx
+	not	r11d
+	lea	edx,[((-51403784))+r10*1+rdx]
+	and	r12d,eax
+	and	r11d,ebx
+	mov	r10d,DWORD[28+rsi]
+	or	r12d,r11d
+	mov	r11d,ebx
+	add	edx,r12d
+	mov	r12d,ebx
+	rol	edx,9
+	add	edx,eax
+	not	r11d
+	lea	ecx,[1735328473+r10*1+rcx]
+	and	r12d,edx
+	and	r11d,eax
+	mov	r10d,DWORD[48+rsi]
+	or	r12d,r11d
+	mov	r11d,eax
+	add	ecx,r12d
+	mov	r12d,eax
+	rol	ecx,14
+	add	ecx,edx
+	not	r11d
+	lea	ebx,[((-1926607734))+r10*1+rbx]
+	and	r12d,ecx
+	and	r11d,edx
+	mov	r10d,DWORD[rsi]
+	or	r12d,r11d
+	mov	r11d,edx
+	add	ebx,r12d
+	mov	r12d,edx
+	rol	ebx,20
+	add	ebx,ecx
+	mov	r10d,DWORD[20+rsi]
+	mov	r11d,ecx
+	lea	eax,[((-378558))+r10*1+rax]
+	mov	r10d,DWORD[32+rsi]
+	xor	r11d,edx
+	xor	r11d,ebx
+	add	eax,r11d
+	rol	eax,4
+	mov	r11d,ebx
+	add	eax,ebx
+	lea	edx,[((-2022574463))+r10*1+rdx]
+	mov	r10d,DWORD[44+rsi]
+	xor	r11d,ecx
+	xor	r11d,eax
+	add	edx,r11d
+	rol	edx,11
+	mov	r11d,eax
+	add	edx,eax
+	lea	ecx,[1839030562+r10*1+rcx]
+	mov	r10d,DWORD[56+rsi]
+	xor	r11d,ebx
+	xor	r11d,edx
+	add	ecx,r11d
+	rol	ecx,16
+	mov	r11d,edx
+	add	ecx,edx
+	lea	ebx,[((-35309556))+r10*1+rbx]
+	mov	r10d,DWORD[4+rsi]
+	xor	r11d,eax
+	xor	r11d,ecx
+	add	ebx,r11d
+	rol	ebx,23
+	mov	r11d,ecx
+	add	ebx,ecx
+	lea	eax,[((-1530992060))+r10*1+rax]
+	mov	r10d,DWORD[16+rsi]
+	xor	r11d,edx
+	xor	r11d,ebx
+	add	eax,r11d
+	rol	eax,4
+	mov	r11d,ebx
+	add	eax,ebx
+	lea	edx,[1272893353+r10*1+rdx]
+	mov	r10d,DWORD[28+rsi]
+	xor	r11d,ecx
+	xor	r11d,eax
+	add	edx,r11d
+	rol	edx,11
+	mov	r11d,eax
+	add	edx,eax
+	lea	ecx,[((-155497632))+r10*1+rcx]
+	mov	r10d,DWORD[40+rsi]
+	xor	r11d,ebx
+	xor	r11d,edx
+	add	ecx,r11d
+	rol	ecx,16
+	mov	r11d,edx
+	add	ecx,edx
+	lea	ebx,[((-1094730640))+r10*1+rbx]
+	mov	r10d,DWORD[52+rsi]
+	xor	r11d,eax
+	xor	r11d,ecx
+	add	ebx,r11d
+	rol	ebx,23
+	mov	r11d,ecx
+	add	ebx,ecx
+	lea	eax,[681279174+r10*1+rax]
+	mov	r10d,DWORD[rsi]
+	xor	r11d,edx
+	xor	r11d,ebx
+	add	eax,r11d
+	rol	eax,4
+	mov	r11d,ebx
+	add	eax,ebx
+	lea	edx,[((-358537222))+r10*1+rdx]
+	mov	r10d,DWORD[12+rsi]
+	xor	r11d,ecx
+	xor	r11d,eax
+	add	edx,r11d
+	rol	edx,11
+	mov	r11d,eax
+	add	edx,eax
+	lea	ecx,[((-722521979))+r10*1+rcx]
+	mov	r10d,DWORD[24+rsi]
+	xor	r11d,ebx
+	xor	r11d,edx
+	add	ecx,r11d
+	rol	ecx,16
+	mov	r11d,edx
+	add	ecx,edx
+	lea	ebx,[76029189+r10*1+rbx]
+	mov	r10d,DWORD[36+rsi]
+	xor	r11d,eax
+	xor	r11d,ecx
+	add	ebx,r11d
+	rol	ebx,23
+	mov	r11d,ecx
+	add	ebx,ecx
+	lea	eax,[((-640364487))+r10*1+rax]
+	mov	r10d,DWORD[48+rsi]
+	xor	r11d,edx
+	xor	r11d,ebx
+	add	eax,r11d
+	rol	eax,4
+	mov	r11d,ebx
+	add	eax,ebx
+	lea	edx,[((-421815835))+r10*1+rdx]
+	mov	r10d,DWORD[60+rsi]
+	xor	r11d,ecx
+	xor	r11d,eax
+	add	edx,r11d
+	rol	edx,11
+	mov	r11d,eax
+	add	edx,eax
+	lea	ecx,[530742520+r10*1+rcx]
+	mov	r10d,DWORD[8+rsi]
+	xor	r11d,ebx
+	xor	r11d,edx
+	add	ecx,r11d
+	rol	ecx,16
+	mov	r11d,edx
+	add	ecx,edx
+	lea	ebx,[((-995338651))+r10*1+rbx]
+	mov	r10d,DWORD[rsi]
+	xor	r11d,eax
+	xor	r11d,ecx
+	add	ebx,r11d
+	rol	ebx,23
+	mov	r11d,ecx
+	add	ebx,ecx
+	mov	r10d,DWORD[rsi]
+	mov	r11d,0xffffffff
+	xor	r11d,edx
+	lea	eax,[((-198630844))+r10*1+rax]
+	or	r11d,ebx
+	xor	r11d,ecx
+	add	eax,r11d
+	mov	r10d,DWORD[28+rsi]
+	mov	r11d,0xffffffff
+	rol	eax,6
+	xor	r11d,ecx
+	add	eax,ebx
+	lea	edx,[1126891415+r10*1+rdx]
+	or	r11d,eax
+	xor	r11d,ebx
+	add	edx,r11d
+	mov	r10d,DWORD[56+rsi]
+	mov	r11d,0xffffffff
+	rol	edx,10
+	xor	r11d,ebx
+	add	edx,eax
+	lea	ecx,[((-1416354905))+r10*1+rcx]
+	or	r11d,edx
+	xor	r11d,eax
+	add	ecx,r11d
+	mov	r10d,DWORD[20+rsi]
+	mov	r11d,0xffffffff
+	rol	ecx,15
+	xor	r11d,eax
+	add	ecx,edx
+	lea	ebx,[((-57434055))+r10*1+rbx]
+	or	r11d,ecx
+	xor	r11d,edx
+	add	ebx,r11d
+	mov	r10d,DWORD[48+rsi]
+	mov	r11d,0xffffffff
+	rol	ebx,21
+	xor	r11d,edx
+	add	ebx,ecx
+	lea	eax,[1700485571+r10*1+rax]
+	or	r11d,ebx
+	xor	r11d,ecx
+	add	eax,r11d
+	mov	r10d,DWORD[12+rsi]
+	mov	r11d,0xffffffff
+	rol	eax,6
+	xor	r11d,ecx
+	add	eax,ebx
+	lea	edx,[((-1894986606))+r10*1+rdx]
+	or	r11d,eax
+	xor	r11d,ebx
+	add	edx,r11d
+	mov	r10d,DWORD[40+rsi]
+	mov	r11d,0xffffffff
+	rol	edx,10
+	xor	r11d,ebx
+	add	edx,eax
+	lea	ecx,[((-1051523))+r10*1+rcx]
+	or	r11d,edx
+	xor	r11d,eax
+	add	ecx,r11d
+	mov	r10d,DWORD[4+rsi]
+	mov	r11d,0xffffffff
+	rol	ecx,15
+	xor	r11d,eax
+	add	ecx,edx
+	lea	ebx,[((-2054922799))+r10*1+rbx]
+	or	r11d,ecx
+	xor	r11d,edx
+	add	ebx,r11d
+	mov	r10d,DWORD[32+rsi]
+	mov	r11d,0xffffffff
+	rol	ebx,21
+	xor	r11d,edx
+	add	ebx,ecx
+	lea	eax,[1873313359+r10*1+rax]
+	or	r11d,ebx
+	xor	r11d,ecx
+	add	eax,r11d
+	mov	r10d,DWORD[60+rsi]
+	mov	r11d,0xffffffff
+	rol	eax,6
+	xor	r11d,ecx
+	add	eax,ebx
+	lea	edx,[((-30611744))+r10*1+rdx]
+	or	r11d,eax
+	xor	r11d,ebx
+	add	edx,r11d
+	mov	r10d,DWORD[24+rsi]
+	mov	r11d,0xffffffff
+	rol	edx,10
+	xor	r11d,ebx
+	add	edx,eax
+	lea	ecx,[((-1560198380))+r10*1+rcx]
+	or	r11d,edx
+	xor	r11d,eax
+	add	ecx,r11d
+	mov	r10d,DWORD[52+rsi]
+	mov	r11d,0xffffffff
+	rol	ecx,15
+	xor	r11d,eax
+	add	ecx,edx
+	lea	ebx,[1309151649+r10*1+rbx]
+	or	r11d,ecx
+	xor	r11d,edx
+	add	ebx,r11d
+	mov	r10d,DWORD[16+rsi]
+	mov	r11d,0xffffffff
+	rol	ebx,21
+	xor	r11d,edx
+	add	ebx,ecx
+	lea	eax,[((-145523070))+r10*1+rax]
+	or	r11d,ebx
+	xor	r11d,ecx
+	add	eax,r11d
+	mov	r10d,DWORD[44+rsi]
+	mov	r11d,0xffffffff
+	rol	eax,6
+	xor	r11d,ecx
+	add	eax,ebx
+	lea	edx,[((-1120210379))+r10*1+rdx]
+	or	r11d,eax
+	xor	r11d,ebx
+	add	edx,r11d
+	mov	r10d,DWORD[8+rsi]
+	mov	r11d,0xffffffff
+	rol	edx,10
+	xor	r11d,ebx
+	add	edx,eax
+	lea	ecx,[718787259+r10*1+rcx]
+	or	r11d,edx
+	xor	r11d,eax
+	add	ecx,r11d
+	mov	r10d,DWORD[36+rsi]
+	mov	r11d,0xffffffff
+	rol	ecx,15
+	xor	r11d,eax
+	add	ecx,edx
+	lea	ebx,[((-343485551))+r10*1+rbx]
+	or	r11d,ecx
+	xor	r11d,edx
+	add	ebx,r11d
+	mov	r10d,DWORD[rsi]
+	mov	r11d,0xffffffff
+	rol	ebx,21
+	xor	r11d,edx
+	add	ebx,ecx
+
+	add	eax,r8d
+	add	ebx,r9d
+	add	ecx,r14d
+	add	edx,r15d
+
+
+	add	rsi,64
+	cmp	rsi,rdi
+	jb	NEAR $L$loop
+
+
+$L$end:
+	mov	DWORD[rbp],eax
+	mov	DWORD[4+rbp],ebx
+	mov	DWORD[8+rbp],ecx
+	mov	DWORD[12+rbp],edx
+
+	mov	r15,QWORD[rsp]
+	mov	r14,QWORD[8+rsp]
+	mov	r12,QWORD[16+rsp]
+	mov	rbx,QWORD[24+rsp]
+	mov	rbp,QWORD[32+rsp]
+	add	rsp,40
+$L$epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_md5_block_asm_data_order:
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$prologue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	lea	rax,[40+rax]
+
+	mov	rbp,QWORD[((-8))+rax]
+	mov	rbx,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r14,QWORD[((-32))+rax]
+	mov	r15,QWORD[((-40))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_md5_block_asm_data_order wrt ..imagebase
+	DD	$L$SEH_end_md5_block_asm_data_order wrt ..imagebase
+	DD	$L$SEH_info_md5_block_asm_data_order wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_md5_block_asm_data_order:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm
new file mode 100644
index 0000000..d7fff6a
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/modes/aesni-gcm-x86_64.asm
@@ -0,0 +1,20 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+global	aesni_gcm_encrypt
+
+aesni_gcm_encrypt:
+	xor	eax,eax
+	DB	0F3h,0C3h		;repret
+
+
+global	aesni_gcm_decrypt
+
+aesni_gcm_decrypt:
+	xor	eax,eax
+	DB	0F3h,0C3h		;repret
+
diff --git a/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm
new file mode 100644
index 0000000..5d8fadc
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/modes/ghash-x86_64.asm
@@ -0,0 +1,1507 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	gcm_gmult_4bit
+
+ALIGN	16
+gcm_gmult_4bit:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_gcm_gmult_4bit:
+	mov	rdi,rcx
+	mov	rsi,rdx
+
+
+	push	rbx
+	push	rbp
+	push	r12
+$L$gmult_prologue:
+
+	movzx	r8,BYTE[15+rdi]
+	lea	r11,[$L$rem_4bit]
+	xor	rax,rax
+	xor	rbx,rbx
+	mov	al,r8b
+	mov	bl,r8b
+	shl	al,4
+	mov	rcx,14
+	mov	r8,QWORD[8+rax*1+rsi]
+	mov	r9,QWORD[rax*1+rsi]
+	and	bl,0xf0
+	mov	rdx,r8
+	jmp	NEAR $L$oop1
+
+ALIGN	16
+$L$oop1:
+	shr	r8,4
+	and	rdx,0xf
+	mov	r10,r9
+	mov	al,BYTE[rcx*1+rdi]
+	shr	r9,4
+	xor	r8,QWORD[8+rbx*1+rsi]
+	shl	r10,60
+	xor	r9,QWORD[rbx*1+rsi]
+	mov	bl,al
+	xor	r9,QWORD[rdx*8+r11]
+	mov	rdx,r8
+	shl	al,4
+	xor	r8,r10
+	dec	rcx
+	js	NEAR $L$break1
+
+	shr	r8,4
+	and	rdx,0xf
+	mov	r10,r9
+	shr	r9,4
+	xor	r8,QWORD[8+rax*1+rsi]
+	shl	r10,60
+	xor	r9,QWORD[rax*1+rsi]
+	and	bl,0xf0
+	xor	r9,QWORD[rdx*8+r11]
+	mov	rdx,r8
+	xor	r8,r10
+	jmp	NEAR $L$oop1
+
+ALIGN	16
+$L$break1:
+	shr	r8,4
+	and	rdx,0xf
+	mov	r10,r9
+	shr	r9,4
+	xor	r8,QWORD[8+rax*1+rsi]
+	shl	r10,60
+	xor	r9,QWORD[rax*1+rsi]
+	and	bl,0xf0
+	xor	r9,QWORD[rdx*8+r11]
+	mov	rdx,r8
+	xor	r8,r10
+
+	shr	r8,4
+	and	rdx,0xf
+	mov	r10,r9
+	shr	r9,4
+	xor	r8,QWORD[8+rbx*1+rsi]
+	shl	r10,60
+	xor	r9,QWORD[rbx*1+rsi]
+	xor	r8,r10
+	xor	r9,QWORD[rdx*8+r11]
+
+	bswap	r8
+	bswap	r9
+	mov	QWORD[8+rdi],r8
+	mov	QWORD[rdi],r9
+
+	mov	rbx,QWORD[16+rsp]
+	lea	rsp,[24+rsp]
+$L$gmult_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_gcm_gmult_4bit:
+global	gcm_ghash_4bit
+
+ALIGN	16
+gcm_ghash_4bit:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_gcm_ghash_4bit:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	sub	rsp,280
+$L$ghash_prologue:
+	mov	r14,rdx
+	mov	r15,rcx
+	sub	rsi,-128
+	lea	rbp,[((16+128))+rsp]
+	xor	edx,edx
+	mov	r8,QWORD[((0+0-128))+rsi]
+	mov	rax,QWORD[((0+8-128))+rsi]
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	r9,QWORD[((16+0-128))+rsi]
+	shl	dl,4
+	mov	rbx,QWORD[((16+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[rbp],r8
+	mov	r8,QWORD[((32+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((0-128))+rbp],rax
+	mov	rax,QWORD[((32+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[1+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[8+rbp],r9
+	mov	r9,QWORD[((48+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((8-128))+rbp],rbx
+	mov	rbx,QWORD[((48+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[2+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[16+rbp],r8
+	mov	r8,QWORD[((64+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((16-128))+rbp],rax
+	mov	rax,QWORD[((64+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[3+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[24+rbp],r9
+	mov	r9,QWORD[((80+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((24-128))+rbp],rbx
+	mov	rbx,QWORD[((80+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[4+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[32+rbp],r8
+	mov	r8,QWORD[((96+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((32-128))+rbp],rax
+	mov	rax,QWORD[((96+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[5+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[40+rbp],r9
+	mov	r9,QWORD[((112+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((40-128))+rbp],rbx
+	mov	rbx,QWORD[((112+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[6+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[48+rbp],r8
+	mov	r8,QWORD[((128+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((48-128))+rbp],rax
+	mov	rax,QWORD[((128+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[7+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[56+rbp],r9
+	mov	r9,QWORD[((144+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((56-128))+rbp],rbx
+	mov	rbx,QWORD[((144+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[8+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[64+rbp],r8
+	mov	r8,QWORD[((160+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((64-128))+rbp],rax
+	mov	rax,QWORD[((160+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[9+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[72+rbp],r9
+	mov	r9,QWORD[((176+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((72-128))+rbp],rbx
+	mov	rbx,QWORD[((176+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[10+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[80+rbp],r8
+	mov	r8,QWORD[((192+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((80-128))+rbp],rax
+	mov	rax,QWORD[((192+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[11+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[88+rbp],r9
+	mov	r9,QWORD[((208+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((88-128))+rbp],rbx
+	mov	rbx,QWORD[((208+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[12+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[96+rbp],r8
+	mov	r8,QWORD[((224+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((96-128))+rbp],rax
+	mov	rax,QWORD[((224+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[13+rsp],dl
+	or	rbx,r10
+	mov	dl,al
+	shr	rax,4
+	mov	r10,r8
+	shr	r8,4
+	mov	QWORD[104+rbp],r9
+	mov	r9,QWORD[((240+0-128))+rsi]
+	shl	dl,4
+	mov	QWORD[((104-128))+rbp],rbx
+	mov	rbx,QWORD[((240+8-128))+rsi]
+	shl	r10,60
+	mov	BYTE[14+rsp],dl
+	or	rax,r10
+	mov	dl,bl
+	shr	rbx,4
+	mov	r10,r9
+	shr	r9,4
+	mov	QWORD[112+rbp],r8
+	shl	dl,4
+	mov	QWORD[((112-128))+rbp],rax
+	shl	r10,60
+	mov	BYTE[15+rsp],dl
+	or	rbx,r10
+	mov	QWORD[120+rbp],r9
+	mov	QWORD[((120-128))+rbp],rbx
+	add	rsi,-128
+	mov	r8,QWORD[8+rdi]
+	mov	r9,QWORD[rdi]
+	add	r15,r14
+	lea	r11,[$L$rem_8bit]
+	jmp	NEAR $L$outer_loop
+ALIGN	16
+$L$outer_loop:
+	xor	r9,QWORD[r14]
+	mov	rdx,QWORD[8+r14]
+	lea	r14,[16+r14]
+	xor	rdx,r8
+	mov	QWORD[rdi],r9
+	mov	QWORD[8+rdi],rdx
+	shr	rdx,32
+	xor	rax,rax
+	rol	edx,8
+	mov	al,dl
+	movzx	ebx,dl
+	shl	al,4
+	shr	ebx,4
+	rol	edx,8
+	mov	r8,QWORD[8+rax*1+rsi]
+	mov	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	xor	r12,r8
+	mov	r10,r9
+	shr	r8,8
+	movzx	r12,r12b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	mov	edx,DWORD[8+rdi]
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	mov	edx,DWORD[4+rdi]
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	mov	edx,DWORD[rdi]
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	shr	ecx,4
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r12,WORD[r12*2+r11]
+	movzx	ebx,dl
+	shl	al,4
+	movzx	r13,BYTE[rcx*1+rsp]
+	shr	ebx,4
+	shl	r12,48
+	xor	r13,r8
+	mov	r10,r9
+	xor	r9,r12
+	shr	r8,8
+	movzx	r13,r13b
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rcx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rcx*8+rbp]
+	rol	edx,8
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	mov	al,dl
+	xor	r8,r10
+	movzx	r13,WORD[r13*2+r11]
+	movzx	ecx,dl
+	shl	al,4
+	movzx	r12,BYTE[rbx*1+rsp]
+	and	ecx,240
+	shl	r13,48
+	xor	r12,r8
+	mov	r10,r9
+	xor	r9,r13
+	shr	r8,8
+	movzx	r12,r12b
+	mov	edx,DWORD[((-4))+rdi]
+	shr	r9,8
+	xor	r8,QWORD[((-128))+rbx*8+rbp]
+	shl	r10,56
+	xor	r9,QWORD[rbx*8+rbp]
+	movzx	r12,WORD[r12*2+r11]
+	xor	r8,QWORD[8+rax*1+rsi]
+	xor	r9,QWORD[rax*1+rsi]
+	shl	r12,48
+	xor	r8,r10
+	xor	r9,r12
+	movzx	r13,r8b
+	shr	r8,4
+	mov	r10,r9
+	shl	r13b,4
+	shr	r9,4
+	xor	r8,QWORD[8+rcx*1+rsi]
+	movzx	r13,WORD[r13*2+r11]
+	shl	r10,60
+	xor	r9,QWORD[rcx*1+rsi]
+	xor	r8,r10
+	shl	r13,48
+	bswap	r8
+	xor	r9,r13
+	bswap	r9
+	cmp	r14,r15
+	jb	NEAR $L$outer_loop
+	mov	QWORD[8+rdi],r8
+	mov	QWORD[rdi],r9
+
+	lea	rsi,[280+rsp]
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$ghash_epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_gcm_ghash_4bit:
+global	gcm_init_clmul
+
+ALIGN	16
+gcm_init_clmul:
+$L$_init_clmul:
+$L$SEH_begin_gcm_init_clmul:
+
+DB	0x48,0x83,0xec,0x18
+DB	0x0f,0x29,0x34,0x24
+	movdqu	xmm2,XMMWORD[rdx]
+	pshufd	xmm2,xmm2,78
+
+
+	pshufd	xmm4,xmm2,255
+	movdqa	xmm3,xmm2
+	psllq	xmm2,1
+	pxor	xmm5,xmm5
+	psrlq	xmm3,63
+	pcmpgtd	xmm5,xmm4
+	pslldq	xmm3,8
+	por	xmm2,xmm3
+
+
+	pand	xmm5,XMMWORD[$L$0x1c2_polynomial]
+	pxor	xmm2,xmm5
+
+
+	pshufd	xmm6,xmm2,78
+	movdqa	xmm0,xmm2
+	pxor	xmm6,xmm2
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+DB	102,15,58,68,194,0
+DB	102,15,58,68,202,17
+DB	102,15,58,68,222,0
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	pshufd	xmm3,xmm2,78
+	pshufd	xmm4,xmm0,78
+	pxor	xmm3,xmm2
+	movdqu	XMMWORD[rcx],xmm2
+	pxor	xmm4,xmm0
+	movdqu	XMMWORD[16+rcx],xmm0
+DB	102,15,58,15,227,8
+	movdqu	XMMWORD[32+rcx],xmm4
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+DB	102,15,58,68,194,0
+DB	102,15,58,68,202,17
+DB	102,15,58,68,222,0
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	movdqa	xmm5,xmm0
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+DB	102,15,58,68,194,0
+DB	102,15,58,68,202,17
+DB	102,15,58,68,222,0
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	pshufd	xmm3,xmm5,78
+	pshufd	xmm4,xmm0,78
+	pxor	xmm3,xmm5
+	movdqu	XMMWORD[48+rcx],xmm5
+	pxor	xmm4,xmm0
+	movdqu	XMMWORD[64+rcx],xmm0
+DB	102,15,58,15,227,8
+	movdqu	XMMWORD[80+rcx],xmm4
+	movaps	xmm6,XMMWORD[rsp]
+	lea	rsp,[24+rsp]
+$L$SEH_end_gcm_init_clmul:
+	DB	0F3h,0C3h		;repret
+
+global	gcm_gmult_clmul
+
+ALIGN	16
+gcm_gmult_clmul:
+$L$_gmult_clmul:
+	movdqu	xmm0,XMMWORD[rcx]
+	movdqa	xmm5,XMMWORD[$L$bswap_mask]
+	movdqu	xmm2,XMMWORD[rdx]
+	movdqu	xmm4,XMMWORD[32+rdx]
+DB	102,15,56,0,197
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+DB	102,15,58,68,194,0
+DB	102,15,58,68,202,17
+DB	102,15,58,68,220,0
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+DB	102,15,56,0,197
+	movdqu	XMMWORD[rcx],xmm0
+	DB	0F3h,0C3h		;repret
+
+global	gcm_ghash_clmul
+
+ALIGN	32
+gcm_ghash_clmul:
+$L$_ghash_clmul:
+	lea	rax,[((-136))+rsp]
+$L$SEH_begin_gcm_ghash_clmul:
+
+DB	0x48,0x8d,0x60,0xe0
+DB	0x0f,0x29,0x70,0xe0
+DB	0x0f,0x29,0x78,0xf0
+DB	0x44,0x0f,0x29,0x00
+DB	0x44,0x0f,0x29,0x48,0x10
+DB	0x44,0x0f,0x29,0x50,0x20
+DB	0x44,0x0f,0x29,0x58,0x30
+DB	0x44,0x0f,0x29,0x60,0x40
+DB	0x44,0x0f,0x29,0x68,0x50
+DB	0x44,0x0f,0x29,0x70,0x60
+DB	0x44,0x0f,0x29,0x78,0x70
+	movdqa	xmm10,XMMWORD[$L$bswap_mask]
+
+	movdqu	xmm0,XMMWORD[rcx]
+	movdqu	xmm2,XMMWORD[rdx]
+	movdqu	xmm7,XMMWORD[32+rdx]
+DB	102,65,15,56,0,194
+
+	sub	r9,0x10
+	jz	NEAR $L$odd_tail
+
+	movdqu	xmm6,XMMWORD[16+rdx]
+	mov	eax,DWORD[((OPENSSL_ia32cap_P+4))]
+	cmp	r9,0x30
+	jb	NEAR $L$skip4x
+
+	and	eax,71303168
+	cmp	eax,4194304
+	je	NEAR $L$skip4x
+
+	sub	r9,0x30
+	mov	rax,0xA040608020C0E000
+	movdqu	xmm14,XMMWORD[48+rdx]
+	movdqu	xmm15,XMMWORD[64+rdx]
+
+
+
+
+	movdqu	xmm3,XMMWORD[48+r8]
+	movdqu	xmm11,XMMWORD[32+r8]
+DB	102,65,15,56,0,218
+DB	102,69,15,56,0,218
+	movdqa	xmm5,xmm3
+	pshufd	xmm4,xmm3,78
+	pxor	xmm4,xmm3
+DB	102,15,58,68,218,0
+DB	102,15,58,68,234,17
+DB	102,15,58,68,231,0
+
+	movdqa	xmm13,xmm11
+	pshufd	xmm12,xmm11,78
+	pxor	xmm12,xmm11
+DB	102,68,15,58,68,222,0
+DB	102,68,15,58,68,238,17
+DB	102,68,15,58,68,231,16
+	xorps	xmm3,xmm11
+	xorps	xmm5,xmm13
+	movups	xmm7,XMMWORD[80+rdx]
+	xorps	xmm4,xmm12
+
+	movdqu	xmm11,XMMWORD[16+r8]
+	movdqu	xmm8,XMMWORD[r8]
+DB	102,69,15,56,0,218
+DB	102,69,15,56,0,194
+	movdqa	xmm13,xmm11
+	pshufd	xmm12,xmm11,78
+	pxor	xmm0,xmm8
+	pxor	xmm12,xmm11
+DB	102,69,15,58,68,222,0
+	movdqa	xmm1,xmm0
+	pshufd	xmm8,xmm0,78
+	pxor	xmm8,xmm0
+DB	102,69,15,58,68,238,17
+DB	102,68,15,58,68,231,0
+	xorps	xmm3,xmm11
+	xorps	xmm5,xmm13
+
+	lea	r8,[64+r8]
+	sub	r9,0x40
+	jc	NEAR $L$tail4x
+
+	jmp	NEAR $L$mod4_loop
+ALIGN	32
+$L$mod4_loop:
+DB	102,65,15,58,68,199,0
+	xorps	xmm4,xmm12
+	movdqu	xmm11,XMMWORD[48+r8]
+DB	102,69,15,56,0,218
+DB	102,65,15,58,68,207,17
+	xorps	xmm0,xmm3
+	movdqu	xmm3,XMMWORD[32+r8]
+	movdqa	xmm13,xmm11
+DB	102,68,15,58,68,199,16
+	pshufd	xmm12,xmm11,78
+	xorps	xmm1,xmm5
+	pxor	xmm12,xmm11
+DB	102,65,15,56,0,218
+	movups	xmm7,XMMWORD[32+rdx]
+	xorps	xmm8,xmm4
+DB	102,68,15,58,68,218,0
+	pshufd	xmm4,xmm3,78
+
+	pxor	xmm8,xmm0
+	movdqa	xmm5,xmm3
+	pxor	xmm8,xmm1
+	pxor	xmm4,xmm3
+	movdqa	xmm9,xmm8
+DB	102,68,15,58,68,234,17
+	pslldq	xmm8,8
+	psrldq	xmm9,8
+	pxor	xmm0,xmm8
+	movdqa	xmm8,XMMWORD[$L$7_mask]
+	pxor	xmm1,xmm9
+DB	102,76,15,110,200
+
+	pand	xmm8,xmm0
+DB	102,69,15,56,0,200
+	pxor	xmm9,xmm0
+DB	102,68,15,58,68,231,0
+	psllq	xmm9,57
+	movdqa	xmm8,xmm9
+	pslldq	xmm9,8
+DB	102,15,58,68,222,0
+	psrldq	xmm8,8
+	pxor	xmm0,xmm9
+	pxor	xmm1,xmm8
+	movdqu	xmm8,XMMWORD[r8]
+
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,1
+DB	102,15,58,68,238,17
+	xorps	xmm3,xmm11
+	movdqu	xmm11,XMMWORD[16+r8]
+DB	102,69,15,56,0,218
+DB	102,15,58,68,231,16
+	xorps	xmm5,xmm13
+	movups	xmm7,XMMWORD[80+rdx]
+DB	102,69,15,56,0,194
+	pxor	xmm1,xmm9
+	pxor	xmm9,xmm0
+	psrlq	xmm0,5
+
+	movdqa	xmm13,xmm11
+	pxor	xmm4,xmm12
+	pshufd	xmm12,xmm11,78
+	pxor	xmm0,xmm9
+	pxor	xmm1,xmm8
+	pxor	xmm12,xmm11
+DB	102,69,15,58,68,222,0
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	movdqa	xmm1,xmm0
+DB	102,69,15,58,68,238,17
+	xorps	xmm3,xmm11
+	pshufd	xmm8,xmm0,78
+	pxor	xmm8,xmm0
+
+DB	102,68,15,58,68,231,0
+	xorps	xmm5,xmm13
+
+	lea	r8,[64+r8]
+	sub	r9,0x40
+	jnc	NEAR $L$mod4_loop
+
+$L$tail4x:
+DB	102,65,15,58,68,199,0
+DB	102,65,15,58,68,207,17
+DB	102,68,15,58,68,199,16
+	xorps	xmm4,xmm12
+	xorps	xmm0,xmm3
+	xorps	xmm1,xmm5
+	pxor	xmm1,xmm0
+	pxor	xmm8,xmm4
+
+	pxor	xmm8,xmm1
+	pxor	xmm1,xmm0
+
+	movdqa	xmm9,xmm8
+	psrldq	xmm8,8
+	pslldq	xmm9,8
+	pxor	xmm1,xmm8
+	pxor	xmm0,xmm9
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	add	r9,0x40
+	jz	NEAR $L$done
+	movdqu	xmm7,XMMWORD[32+rdx]
+	sub	r9,0x10
+	jz	NEAR $L$odd_tail
+$L$skip4x:
+
+
+
+
+
+	movdqu	xmm8,XMMWORD[r8]
+	movdqu	xmm3,XMMWORD[16+r8]
+DB	102,69,15,56,0,194
+DB	102,65,15,56,0,218
+	pxor	xmm0,xmm8
+
+	movdqa	xmm5,xmm3
+	pshufd	xmm4,xmm3,78
+	pxor	xmm4,xmm3
+DB	102,15,58,68,218,0
+DB	102,15,58,68,234,17
+DB	102,15,58,68,231,0
+
+	lea	r8,[32+r8]
+	nop
+	sub	r9,0x20
+	jbe	NEAR $L$even_tail
+	nop
+	jmp	NEAR $L$mod_loop
+
+ALIGN	32
+$L$mod_loop:
+	movdqa	xmm1,xmm0
+	movdqa	xmm8,xmm4
+	pshufd	xmm4,xmm0,78
+	pxor	xmm4,xmm0
+
+DB	102,15,58,68,198,0
+DB	102,15,58,68,206,17
+DB	102,15,58,68,231,16
+
+	pxor	xmm0,xmm3
+	pxor	xmm1,xmm5
+	movdqu	xmm9,XMMWORD[r8]
+	pxor	xmm8,xmm0
+DB	102,69,15,56,0,202
+	movdqu	xmm3,XMMWORD[16+r8]
+
+	pxor	xmm8,xmm1
+	pxor	xmm1,xmm9
+	pxor	xmm4,xmm8
+DB	102,65,15,56,0,218
+	movdqa	xmm8,xmm4
+	psrldq	xmm8,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm8
+	pxor	xmm0,xmm4
+
+	movdqa	xmm5,xmm3
+
+	movdqa	xmm9,xmm0
+	movdqa	xmm8,xmm0
+	psllq	xmm0,5
+	pxor	xmm8,xmm0
+DB	102,15,58,68,218,0
+	psllq	xmm0,1
+	pxor	xmm0,xmm8
+	psllq	xmm0,57
+	movdqa	xmm8,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm8,8
+	pxor	xmm0,xmm9
+	pshufd	xmm4,xmm5,78
+	pxor	xmm1,xmm8
+	pxor	xmm4,xmm5
+
+	movdqa	xmm9,xmm0
+	psrlq	xmm0,1
+DB	102,15,58,68,234,17
+	pxor	xmm1,xmm9
+	pxor	xmm9,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm9
+	lea	r8,[32+r8]
+	psrlq	xmm0,1
+DB	102,15,58,68,231,0
+	pxor	xmm0,xmm1
+
+	sub	r9,0x20
+	ja	NEAR $L$mod_loop
+
+$L$even_tail:
+	movdqa	xmm1,xmm0
+	movdqa	xmm8,xmm4
+	pshufd	xmm4,xmm0,78
+	pxor	xmm4,xmm0
+
+DB	102,15,58,68,198,0
+DB	102,15,58,68,206,17
+DB	102,15,58,68,231,16
+
+	pxor	xmm0,xmm3
+	pxor	xmm1,xmm5
+	pxor	xmm8,xmm0
+	pxor	xmm8,xmm1
+	pxor	xmm4,xmm8
+	movdqa	xmm8,xmm4
+	psrldq	xmm8,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm8
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+	test	r9,r9
+	jnz	NEAR $L$done
+
+$L$odd_tail:
+	movdqu	xmm8,XMMWORD[r8]
+DB	102,69,15,56,0,194
+	pxor	xmm0,xmm8
+	movdqa	xmm1,xmm0
+	pshufd	xmm3,xmm0,78
+	pxor	xmm3,xmm0
+DB	102,15,58,68,194,0
+DB	102,15,58,68,202,17
+DB	102,15,58,68,223,0
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+
+	movdqa	xmm4,xmm3
+	psrldq	xmm3,8
+	pslldq	xmm4,8
+	pxor	xmm1,xmm3
+	pxor	xmm0,xmm4
+
+	movdqa	xmm4,xmm0
+	movdqa	xmm3,xmm0
+	psllq	xmm0,5
+	pxor	xmm3,xmm0
+	psllq	xmm0,1
+	pxor	xmm0,xmm3
+	psllq	xmm0,57
+	movdqa	xmm3,xmm0
+	pslldq	xmm0,8
+	psrldq	xmm3,8
+	pxor	xmm0,xmm4
+	pxor	xmm1,xmm3
+
+
+	movdqa	xmm4,xmm0
+	psrlq	xmm0,1
+	pxor	xmm1,xmm4
+	pxor	xmm4,xmm0
+	psrlq	xmm0,5
+	pxor	xmm0,xmm4
+	psrlq	xmm0,1
+	pxor	xmm0,xmm1
+$L$done:
+DB	102,65,15,56,0,194
+	movdqu	XMMWORD[rcx],xmm0
+	movaps	xmm6,XMMWORD[rsp]
+	movaps	xmm7,XMMWORD[16+rsp]
+	movaps	xmm8,XMMWORD[32+rsp]
+	movaps	xmm9,XMMWORD[48+rsp]
+	movaps	xmm10,XMMWORD[64+rsp]
+	movaps	xmm11,XMMWORD[80+rsp]
+	movaps	xmm12,XMMWORD[96+rsp]
+	movaps	xmm13,XMMWORD[112+rsp]
+	movaps	xmm14,XMMWORD[128+rsp]
+	movaps	xmm15,XMMWORD[144+rsp]
+	lea	rsp,[168+rsp]
+$L$SEH_end_gcm_ghash_clmul:
+	DB	0F3h,0C3h		;repret
+
+global	gcm_init_avx
+
+ALIGN	32
+gcm_init_avx:
+	jmp	NEAR $L$_init_clmul
+
+global	gcm_gmult_avx
+
+ALIGN	32
+gcm_gmult_avx:
+	jmp	NEAR $L$_gmult_clmul
+
+global	gcm_ghash_avx
+
+ALIGN	32
+gcm_ghash_avx:
+	jmp	NEAR $L$_ghash_clmul
+
+ALIGN	64
+$L$bswap_mask:
+DB	15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
+$L$0x1c2_polynomial:
+DB	1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0xc2
+$L$7_mask:
+	DD	7,0,7,0
+$L$7_mask_poly:
+	DD	7,0,450,0
+ALIGN	64
+
+$L$rem_4bit:
+	DD	0,0,0,471859200,0,943718400,0,610271232
+	DD	0,1887436800,0,1822425088,0,1220542464,0,1423966208
+	DD	0,3774873600,0,4246732800,0,3644850176,0,3311403008
+	DD	0,2441084928,0,2376073216,0,2847932416,0,3051356160
+
+$L$rem_8bit:
+	DW	0x0000,0x01C2,0x0384,0x0246,0x0708,0x06CA,0x048C,0x054E
+	DW	0x0E10,0x0FD2,0x0D94,0x0C56,0x0918,0x08DA,0x0A9C,0x0B5E
+	DW	0x1C20,0x1DE2,0x1FA4,0x1E66,0x1B28,0x1AEA,0x18AC,0x196E
+	DW	0x1230,0x13F2,0x11B4,0x1076,0x1538,0x14FA,0x16BC,0x177E
+	DW	0x3840,0x3982,0x3BC4,0x3A06,0x3F48,0x3E8A,0x3CCC,0x3D0E
+	DW	0x3650,0x3792,0x35D4,0x3416,0x3158,0x309A,0x32DC,0x331E
+	DW	0x2460,0x25A2,0x27E4,0x2626,0x2368,0x22AA,0x20EC,0x212E
+	DW	0x2A70,0x2BB2,0x29F4,0x2836,0x2D78,0x2CBA,0x2EFC,0x2F3E
+	DW	0x7080,0x7142,0x7304,0x72C6,0x7788,0x764A,0x740C,0x75CE
+	DW	0x7E90,0x7F52,0x7D14,0x7CD6,0x7998,0x785A,0x7A1C,0x7BDE
+	DW	0x6CA0,0x6D62,0x6F24,0x6EE6,0x6BA8,0x6A6A,0x682C,0x69EE
+	DW	0x62B0,0x6372,0x6134,0x60F6,0x65B8,0x647A,0x663C,0x67FE
+	DW	0x48C0,0x4902,0x4B44,0x4A86,0x4FC8,0x4E0A,0x4C4C,0x4D8E
+	DW	0x46D0,0x4712,0x4554,0x4496,0x41D8,0x401A,0x425C,0x439E
+	DW	0x54E0,0x5522,0x5764,0x56A6,0x53E8,0x522A,0x506C,0x51AE
+	DW	0x5AF0,0x5B32,0x5974,0x58B6,0x5DF8,0x5C3A,0x5E7C,0x5FBE
+	DW	0xE100,0xE0C2,0xE284,0xE346,0xE608,0xE7CA,0xE58C,0xE44E
+	DW	0xEF10,0xEED2,0xEC94,0xED56,0xE818,0xE9DA,0xEB9C,0xEA5E
+	DW	0xFD20,0xFCE2,0xFEA4,0xFF66,0xFA28,0xFBEA,0xF9AC,0xF86E
+	DW	0xF330,0xF2F2,0xF0B4,0xF176,0xF438,0xF5FA,0xF7BC,0xF67E
+	DW	0xD940,0xD882,0xDAC4,0xDB06,0xDE48,0xDF8A,0xDDCC,0xDC0E
+	DW	0xD750,0xD692,0xD4D4,0xD516,0xD058,0xD19A,0xD3DC,0xD21E
+	DW	0xC560,0xC4A2,0xC6E4,0xC726,0xC268,0xC3AA,0xC1EC,0xC02E
+	DW	0xCB70,0xCAB2,0xC8F4,0xC936,0xCC78,0xCDBA,0xCFFC,0xCE3E
+	DW	0x9180,0x9042,0x9204,0x93C6,0x9688,0x974A,0x950C,0x94CE
+	DW	0x9F90,0x9E52,0x9C14,0x9DD6,0x9898,0x995A,0x9B1C,0x9ADE
+	DW	0x8DA0,0x8C62,0x8E24,0x8FE6,0x8AA8,0x8B6A,0x892C,0x88EE
+	DW	0x83B0,0x8272,0x8034,0x81F6,0x84B8,0x857A,0x873C,0x86FE
+	DW	0xA9C0,0xA802,0xAA44,0xAB86,0xAEC8,0xAF0A,0xAD4C,0xAC8E
+	DW	0xA7D0,0xA612,0xA454,0xA596,0xA0D8,0xA11A,0xA35C,0xA29E
+	DW	0xB5E0,0xB422,0xB664,0xB7A6,0xB2E8,0xB32A,0xB16C,0xB0AE
+	DW	0xBBF0,0xBA32,0xB874,0xB9B6,0xBCF8,0xBD3A,0xBF7C,0xBEBE
+
+DB	71,72,65,83,72,32,102,111,114,32,120,56,54,95,54,52
+DB	44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32
+DB	60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111
+DB	114,103,62,0
+ALIGN	64
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	lea	rax,[24+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_gcm_gmult_4bit wrt ..imagebase
+	DD	$L$SEH_end_gcm_gmult_4bit wrt ..imagebase
+	DD	$L$SEH_info_gcm_gmult_4bit wrt ..imagebase
+
+	DD	$L$SEH_begin_gcm_ghash_4bit wrt ..imagebase
+	DD	$L$SEH_end_gcm_ghash_4bit wrt ..imagebase
+	DD	$L$SEH_info_gcm_ghash_4bit wrt ..imagebase
+
+	DD	$L$SEH_begin_gcm_init_clmul wrt ..imagebase
+	DD	$L$SEH_end_gcm_init_clmul wrt ..imagebase
+	DD	$L$SEH_info_gcm_init_clmul wrt ..imagebase
+
+	DD	$L$SEH_begin_gcm_ghash_clmul wrt ..imagebase
+	DD	$L$SEH_end_gcm_ghash_clmul wrt ..imagebase
+	DD	$L$SEH_info_gcm_ghash_clmul wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_gcm_gmult_4bit:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$gmult_prologue wrt ..imagebase,$L$gmult_epilogue wrt ..imagebase
+$L$SEH_info_gcm_ghash_4bit:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$ghash_prologue wrt ..imagebase,$L$ghash_epilogue wrt ..imagebase
+$L$SEH_info_gcm_init_clmul:
+DB	0x01,0x08,0x03,0x00
+DB	0x08,0x68,0x00,0x00
+DB	0x04,0x22,0x00,0x00
+$L$SEH_info_gcm_ghash_clmul:
+DB	0x01,0x33,0x16,0x00
+DB	0x33,0xf8,0x09,0x00
+DB	0x2e,0xe8,0x08,0x00
+DB	0x29,0xd8,0x07,0x00
+DB	0x24,0xc8,0x06,0x00
+DB	0x1f,0xb8,0x05,0x00
+DB	0x1a,0xa8,0x04,0x00
+DB	0x15,0x98,0x03,0x00
+DB	0x10,0x88,0x02,0x00
+DB	0x0c,0x78,0x01,0x00
+DB	0x08,0x68,0x00,0x00
+DB	0x04,0x01,0x15,0x00
diff --git a/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm
new file mode 100644
index 0000000..4c03791
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/rand/rdrand-x86_64.asm
@@ -0,0 +1,70 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+
+
+
+global	CRYPTO_rdrand
+
+ALIGN	16
+CRYPTO_rdrand:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_CRYPTO_rdrand:
+	mov	rdi,rcx
+
+
+	xor	rax,rax
+
+
+DB	0x48,0x0f,0xc7,0xf1
+
+	adc	rax,rax
+	mov	QWORD[rdi],rcx
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+
+
+
+
+
+global	CRYPTO_rdrand_multiple8_buf
+
+ALIGN	16
+CRYPTO_rdrand_multiple8_buf:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_CRYPTO_rdrand_multiple8_buf:
+	mov	rdi,rcx
+	mov	rsi,rdx
+
+
+	test	rsi,rsi
+	jz	NEAR $L$out
+	mov	rdx,8
+$L$loop:
+
+
+DB	0x48,0x0f,0xc7,0xf1
+	jnc	NEAR $L$err
+	mov	QWORD[rdi],rcx
+	add	rdi,rdx
+	sub	rsi,rdx
+	jnz	NEAR $L$loop
+$L$out:
+	mov	rax,1
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$err:
+	xor	rax,rax
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
diff --git a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm
new file mode 100644
index 0000000..f1ea965
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-md5-x86_64.asm
@@ -0,0 +1,1372 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+ALIGN	16
+
+global	rc4_md5_enc
+
+rc4_md5_enc:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_rc4_md5_enc:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+	mov	r8,QWORD[40+rsp]
+	mov	r9,QWORD[48+rsp]
+
+
+	cmp	r9,0
+	je	NEAR $L$abort
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	sub	rsp,40
+$L$body:
+	mov	r11,rcx
+	mov	r12,r9
+	mov	r13,rsi
+	mov	r14,rdx
+	mov	r15,r8
+	xor	rbp,rbp
+	xor	rcx,rcx
+
+	lea	rdi,[8+rdi]
+	mov	bpl,BYTE[((-8))+rdi]
+	mov	cl,BYTE[((-4))+rdi]
+
+	inc	bpl
+	sub	r14,r13
+	mov	eax,DWORD[rbp*4+rdi]
+	add	cl,al
+	lea	rsi,[rbp*4+rdi]
+	shl	r12,6
+	add	r12,r15
+	mov	QWORD[16+rsp],r12
+
+	mov	QWORD[24+rsp],r11
+	mov	r8d,DWORD[r11]
+	mov	r9d,DWORD[4+r11]
+	mov	r10d,DWORD[8+r11]
+	mov	r11d,DWORD[12+r11]
+	jmp	NEAR $L$oop
+
+ALIGN	16
+$L$oop:
+	mov	DWORD[rsp],r8d
+	mov	DWORD[4+rsp],r9d
+	mov	DWORD[8+rsp],r10d
+	mov	r12d,r11d
+	mov	DWORD[12+rsp],r11d
+	pxor	xmm0,xmm0
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r8d,DWORD[r15]
+	add	al,dl
+	mov	ebx,DWORD[4+rsi]
+	add	r8d,3614090360
+	xor	r12d,r11d
+	movzx	eax,al
+	mov	DWORD[rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,7
+	mov	r12d,r10d
+	movd	xmm0,DWORD[rax*4+rdi]
+
+	add	r8d,r9d
+	pxor	xmm1,xmm1
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r11d,DWORD[4+r15]
+	add	bl,dl
+	mov	eax,DWORD[8+rsi]
+	add	r11d,3905402710
+	xor	r12d,r10d
+	movzx	ebx,bl
+	mov	DWORD[4+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,12
+	mov	r12d,r9d
+	movd	xmm1,DWORD[rbx*4+rdi]
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r10d,DWORD[8+r15]
+	add	al,dl
+	mov	ebx,DWORD[12+rsi]
+	add	r10d,606105819
+	xor	r12d,r9d
+	movzx	eax,al
+	mov	DWORD[8+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,17
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],1
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r9d,DWORD[12+r15]
+	add	bl,dl
+	mov	eax,DWORD[16+rsi]
+	add	r9d,3250441966
+	xor	r12d,r8d
+	movzx	ebx,bl
+	mov	DWORD[12+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,22
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],1
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r8d,DWORD[16+r15]
+	add	al,dl
+	mov	ebx,DWORD[20+rsi]
+	add	r8d,4118548399
+	xor	r12d,r11d
+	movzx	eax,al
+	mov	DWORD[16+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,7
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],2
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r11d,DWORD[20+r15]
+	add	bl,dl
+	mov	eax,DWORD[24+rsi]
+	add	r11d,1200080426
+	xor	r12d,r10d
+	movzx	ebx,bl
+	mov	DWORD[20+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,12
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],2
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r10d,DWORD[24+r15]
+	add	al,dl
+	mov	ebx,DWORD[28+rsi]
+	add	r10d,2821735955
+	xor	r12d,r9d
+	movzx	eax,al
+	mov	DWORD[24+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,17
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],3
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r9d,DWORD[28+r15]
+	add	bl,dl
+	mov	eax,DWORD[32+rsi]
+	add	r9d,4249261313
+	xor	r12d,r8d
+	movzx	ebx,bl
+	mov	DWORD[28+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,22
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],3
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r8d,DWORD[32+r15]
+	add	al,dl
+	mov	ebx,DWORD[36+rsi]
+	add	r8d,1770035416
+	xor	r12d,r11d
+	movzx	eax,al
+	mov	DWORD[32+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,7
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],4
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r11d,DWORD[36+r15]
+	add	bl,dl
+	mov	eax,DWORD[40+rsi]
+	add	r11d,2336552879
+	xor	r12d,r10d
+	movzx	ebx,bl
+	mov	DWORD[36+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,12
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],4
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r10d,DWORD[40+r15]
+	add	al,dl
+	mov	ebx,DWORD[44+rsi]
+	add	r10d,4294925233
+	xor	r12d,r9d
+	movzx	eax,al
+	mov	DWORD[40+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,17
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],5
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r9d,DWORD[44+r15]
+	add	bl,dl
+	mov	eax,DWORD[48+rsi]
+	add	r9d,2304563134
+	xor	r12d,r8d
+	movzx	ebx,bl
+	mov	DWORD[44+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,22
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],5
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r8d,DWORD[48+r15]
+	add	al,dl
+	mov	ebx,DWORD[52+rsi]
+	add	r8d,1804603682
+	xor	r12d,r11d
+	movzx	eax,al
+	mov	DWORD[48+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,7
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],6
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r11d,DWORD[52+r15]
+	add	bl,dl
+	mov	eax,DWORD[56+rsi]
+	add	r11d,4254626195
+	xor	r12d,r10d
+	movzx	ebx,bl
+	mov	DWORD[52+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,12
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],6
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r10d,DWORD[56+r15]
+	add	al,dl
+	mov	ebx,DWORD[60+rsi]
+	add	r10d,2792965006
+	xor	r12d,r9d
+	movzx	eax,al
+	mov	DWORD[56+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,17
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],7
+
+	add	r10d,r11d
+	movdqu	xmm2,XMMWORD[r13]
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r9d,DWORD[60+r15]
+	add	bl,dl
+	mov	eax,DWORD[64+rsi]
+	add	r9d,1236535329
+	xor	r12d,r8d
+	movzx	ebx,bl
+	mov	DWORD[60+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,22
+	mov	r12d,r10d
+	pinsrw	xmm1,WORD[rbx*4+rdi],7
+
+	add	r9d,r10d
+	psllq	xmm1,8
+	pxor	xmm2,xmm0
+	pxor	xmm2,xmm1
+	pxor	xmm0,xmm0
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r8d,DWORD[4+r15]
+	add	al,dl
+	mov	ebx,DWORD[68+rsi]
+	add	r8d,4129170786
+	xor	r12d,r10d
+	movzx	eax,al
+	mov	DWORD[64+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,5
+	mov	r12d,r9d
+	movd	xmm0,DWORD[rax*4+rdi]
+
+	add	r8d,r9d
+	pxor	xmm1,xmm1
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r11d,DWORD[24+r15]
+	add	bl,dl
+	mov	eax,DWORD[72+rsi]
+	add	r11d,3225465664
+	xor	r12d,r9d
+	movzx	ebx,bl
+	mov	DWORD[68+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,9
+	mov	r12d,r8d
+	movd	xmm1,DWORD[rbx*4+rdi]
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r10d,DWORD[44+r15]
+	add	al,dl
+	mov	ebx,DWORD[76+rsi]
+	add	r10d,643717713
+	xor	r12d,r8d
+	movzx	eax,al
+	mov	DWORD[72+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,14
+	mov	r12d,r11d
+	pinsrw	xmm0,WORD[rax*4+rdi],1
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r9d,DWORD[r15]
+	add	bl,dl
+	mov	eax,DWORD[80+rsi]
+	add	r9d,3921069994
+	xor	r12d,r11d
+	movzx	ebx,bl
+	mov	DWORD[76+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,20
+	mov	r12d,r10d
+	pinsrw	xmm1,WORD[rbx*4+rdi],1
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r8d,DWORD[20+r15]
+	add	al,dl
+	mov	ebx,DWORD[84+rsi]
+	add	r8d,3593408605
+	xor	r12d,r10d
+	movzx	eax,al
+	mov	DWORD[80+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,5
+	mov	r12d,r9d
+	pinsrw	xmm0,WORD[rax*4+rdi],2
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r11d,DWORD[40+r15]
+	add	bl,dl
+	mov	eax,DWORD[88+rsi]
+	add	r11d,38016083
+	xor	r12d,r9d
+	movzx	ebx,bl
+	mov	DWORD[84+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,9
+	mov	r12d,r8d
+	pinsrw	xmm1,WORD[rbx*4+rdi],2
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r10d,DWORD[60+r15]
+	add	al,dl
+	mov	ebx,DWORD[92+rsi]
+	add	r10d,3634488961
+	xor	r12d,r8d
+	movzx	eax,al
+	mov	DWORD[88+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,14
+	mov	r12d,r11d
+	pinsrw	xmm0,WORD[rax*4+rdi],3
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r9d,DWORD[16+r15]
+	add	bl,dl
+	mov	eax,DWORD[96+rsi]
+	add	r9d,3889429448
+	xor	r12d,r11d
+	movzx	ebx,bl
+	mov	DWORD[92+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,20
+	mov	r12d,r10d
+	pinsrw	xmm1,WORD[rbx*4+rdi],3
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r8d,DWORD[36+r15]
+	add	al,dl
+	mov	ebx,DWORD[100+rsi]
+	add	r8d,568446438
+	xor	r12d,r10d
+	movzx	eax,al
+	mov	DWORD[96+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,5
+	mov	r12d,r9d
+	pinsrw	xmm0,WORD[rax*4+rdi],4
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r11d,DWORD[56+r15]
+	add	bl,dl
+	mov	eax,DWORD[104+rsi]
+	add	r11d,3275163606
+	xor	r12d,r9d
+	movzx	ebx,bl
+	mov	DWORD[100+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,9
+	mov	r12d,r8d
+	pinsrw	xmm1,WORD[rbx*4+rdi],4
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r10d,DWORD[12+r15]
+	add	al,dl
+	mov	ebx,DWORD[108+rsi]
+	add	r10d,4107603335
+	xor	r12d,r8d
+	movzx	eax,al
+	mov	DWORD[104+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,14
+	mov	r12d,r11d
+	pinsrw	xmm0,WORD[rax*4+rdi],5
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r9d,DWORD[32+r15]
+	add	bl,dl
+	mov	eax,DWORD[112+rsi]
+	add	r9d,1163531501
+	xor	r12d,r11d
+	movzx	ebx,bl
+	mov	DWORD[108+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,20
+	mov	r12d,r10d
+	pinsrw	xmm1,WORD[rbx*4+rdi],5
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r11d
+	add	r8d,DWORD[52+r15]
+	add	al,dl
+	mov	ebx,DWORD[116+rsi]
+	add	r8d,2850285829
+	xor	r12d,r10d
+	movzx	eax,al
+	mov	DWORD[112+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,5
+	mov	r12d,r9d
+	pinsrw	xmm0,WORD[rax*4+rdi],6
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r10d
+	add	r11d,DWORD[8+r15]
+	add	bl,dl
+	mov	eax,DWORD[120+rsi]
+	add	r11d,4243563512
+	xor	r12d,r9d
+	movzx	ebx,bl
+	mov	DWORD[116+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,9
+	mov	r12d,r8d
+	pinsrw	xmm1,WORD[rbx*4+rdi],6
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	and	r12d,r9d
+	add	r10d,DWORD[28+r15]
+	add	al,dl
+	mov	ebx,DWORD[124+rsi]
+	add	r10d,1735328473
+	xor	r12d,r8d
+	movzx	eax,al
+	mov	DWORD[120+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,14
+	mov	r12d,r11d
+	pinsrw	xmm0,WORD[rax*4+rdi],7
+
+	add	r10d,r11d
+	movdqu	xmm3,XMMWORD[16+r13]
+	add	bpl,32
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	and	r12d,r8d
+	add	r9d,DWORD[48+r15]
+	add	bl,dl
+	mov	eax,DWORD[rbp*4+rdi]
+	add	r9d,2368359562
+	xor	r12d,r11d
+	movzx	ebx,bl
+	mov	DWORD[124+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,20
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],7
+
+	add	r9d,r10d
+	mov	rsi,rcx
+	xor	rcx,rcx
+	mov	cl,sil
+	lea	rsi,[rbp*4+rdi]
+	psllq	xmm1,8
+	pxor	xmm3,xmm0
+	pxor	xmm3,xmm1
+	pxor	xmm0,xmm0
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r9d
+	add	r8d,DWORD[20+r15]
+	add	al,dl
+	mov	ebx,DWORD[4+rsi]
+	add	r8d,4294588738
+	movzx	eax,al
+	add	r8d,r12d
+	mov	DWORD[rsi],edx
+	add	cl,bl
+	rol	r8d,4
+	mov	r12d,r10d
+	movd	xmm0,DWORD[rax*4+rdi]
+
+	add	r8d,r9d
+	pxor	xmm1,xmm1
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r8d
+	add	r11d,DWORD[32+r15]
+	add	bl,dl
+	mov	eax,DWORD[8+rsi]
+	add	r11d,2272392833
+	movzx	ebx,bl
+	add	r11d,r12d
+	mov	DWORD[4+rsi],edx
+	add	cl,al
+	rol	r11d,11
+	mov	r12d,r9d
+	movd	xmm1,DWORD[rbx*4+rdi]
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r11d
+	add	r10d,DWORD[44+r15]
+	add	al,dl
+	mov	ebx,DWORD[12+rsi]
+	add	r10d,1839030562
+	movzx	eax,al
+	add	r10d,r12d
+	mov	DWORD[8+rsi],edx
+	add	cl,bl
+	rol	r10d,16
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],1
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r10d
+	add	r9d,DWORD[56+r15]
+	add	bl,dl
+	mov	eax,DWORD[16+rsi]
+	add	r9d,4259657740
+	movzx	ebx,bl
+	add	r9d,r12d
+	mov	DWORD[12+rsi],edx
+	add	cl,al
+	rol	r9d,23
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],1
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r9d
+	add	r8d,DWORD[4+r15]
+	add	al,dl
+	mov	ebx,DWORD[20+rsi]
+	add	r8d,2763975236
+	movzx	eax,al
+	add	r8d,r12d
+	mov	DWORD[16+rsi],edx
+	add	cl,bl
+	rol	r8d,4
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],2
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r8d
+	add	r11d,DWORD[16+r15]
+	add	bl,dl
+	mov	eax,DWORD[24+rsi]
+	add	r11d,1272893353
+	movzx	ebx,bl
+	add	r11d,r12d
+	mov	DWORD[20+rsi],edx
+	add	cl,al
+	rol	r11d,11
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],2
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r11d
+	add	r10d,DWORD[28+r15]
+	add	al,dl
+	mov	ebx,DWORD[28+rsi]
+	add	r10d,4139469664
+	movzx	eax,al
+	add	r10d,r12d
+	mov	DWORD[24+rsi],edx
+	add	cl,bl
+	rol	r10d,16
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],3
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r10d
+	add	r9d,DWORD[40+r15]
+	add	bl,dl
+	mov	eax,DWORD[32+rsi]
+	add	r9d,3200236656
+	movzx	ebx,bl
+	add	r9d,r12d
+	mov	DWORD[28+rsi],edx
+	add	cl,al
+	rol	r9d,23
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],3
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r9d
+	add	r8d,DWORD[52+r15]
+	add	al,dl
+	mov	ebx,DWORD[36+rsi]
+	add	r8d,681279174
+	movzx	eax,al
+	add	r8d,r12d
+	mov	DWORD[32+rsi],edx
+	add	cl,bl
+	rol	r8d,4
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],4
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r8d
+	add	r11d,DWORD[r15]
+	add	bl,dl
+	mov	eax,DWORD[40+rsi]
+	add	r11d,3936430074
+	movzx	ebx,bl
+	add	r11d,r12d
+	mov	DWORD[36+rsi],edx
+	add	cl,al
+	rol	r11d,11
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],4
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r11d
+	add	r10d,DWORD[12+r15]
+	add	al,dl
+	mov	ebx,DWORD[44+rsi]
+	add	r10d,3572445317
+	movzx	eax,al
+	add	r10d,r12d
+	mov	DWORD[40+rsi],edx
+	add	cl,bl
+	rol	r10d,16
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],5
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r10d
+	add	r9d,DWORD[24+r15]
+	add	bl,dl
+	mov	eax,DWORD[48+rsi]
+	add	r9d,76029189
+	movzx	ebx,bl
+	add	r9d,r12d
+	mov	DWORD[44+rsi],edx
+	add	cl,al
+	rol	r9d,23
+	mov	r12d,r11d
+	pinsrw	xmm1,WORD[rbx*4+rdi],5
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r9d
+	add	r8d,DWORD[36+r15]
+	add	al,dl
+	mov	ebx,DWORD[52+rsi]
+	add	r8d,3654602809
+	movzx	eax,al
+	add	r8d,r12d
+	mov	DWORD[48+rsi],edx
+	add	cl,bl
+	rol	r8d,4
+	mov	r12d,r10d
+	pinsrw	xmm0,WORD[rax*4+rdi],6
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r8d
+	add	r11d,DWORD[48+r15]
+	add	bl,dl
+	mov	eax,DWORD[56+rsi]
+	add	r11d,3873151461
+	movzx	ebx,bl
+	add	r11d,r12d
+	mov	DWORD[52+rsi],edx
+	add	cl,al
+	rol	r11d,11
+	mov	r12d,r9d
+	pinsrw	xmm1,WORD[rbx*4+rdi],6
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],eax
+	xor	r12d,r11d
+	add	r10d,DWORD[60+r15]
+	add	al,dl
+	mov	ebx,DWORD[60+rsi]
+	add	r10d,530742520
+	movzx	eax,al
+	add	r10d,r12d
+	mov	DWORD[56+rsi],edx
+	add	cl,bl
+	rol	r10d,16
+	mov	r12d,r8d
+	pinsrw	xmm0,WORD[rax*4+rdi],7
+
+	add	r10d,r11d
+	movdqu	xmm4,XMMWORD[32+r13]
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],ebx
+	xor	r12d,r10d
+	add	r9d,DWORD[8+r15]
+	add	bl,dl
+	mov	eax,DWORD[64+rsi]
+	add	r9d,3299628645
+	movzx	ebx,bl
+	add	r9d,r12d
+	mov	DWORD[60+rsi],edx
+	add	cl,al
+	rol	r9d,23
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],7
+
+	add	r9d,r10d
+	psllq	xmm1,8
+	pxor	xmm4,xmm0
+	pxor	xmm4,xmm1
+	pxor	xmm0,xmm0
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r9d
+	add	r8d,DWORD[r15]
+	add	al,dl
+	mov	ebx,DWORD[68+rsi]
+	add	r8d,4096336452
+	movzx	eax,al
+	xor	r12d,r10d
+	mov	DWORD[64+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,6
+	mov	r12d,-1
+	movd	xmm0,DWORD[rax*4+rdi]
+
+	add	r8d,r9d
+	pxor	xmm1,xmm1
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r8d
+	add	r11d,DWORD[28+r15]
+	add	bl,dl
+	mov	eax,DWORD[72+rsi]
+	add	r11d,1126891415
+	movzx	ebx,bl
+	xor	r12d,r9d
+	mov	DWORD[68+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,10
+	mov	r12d,-1
+	movd	xmm1,DWORD[rbx*4+rdi]
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r11d
+	add	r10d,DWORD[56+r15]
+	add	al,dl
+	mov	ebx,DWORD[76+rsi]
+	add	r10d,2878612391
+	movzx	eax,al
+	xor	r12d,r8d
+	mov	DWORD[72+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,15
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],1
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r10d
+	add	r9d,DWORD[20+r15]
+	add	bl,dl
+	mov	eax,DWORD[80+rsi]
+	add	r9d,4237533241
+	movzx	ebx,bl
+	xor	r12d,r11d
+	mov	DWORD[76+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,21
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],1
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r9d
+	add	r8d,DWORD[48+r15]
+	add	al,dl
+	mov	ebx,DWORD[84+rsi]
+	add	r8d,1700485571
+	movzx	eax,al
+	xor	r12d,r10d
+	mov	DWORD[80+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,6
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],2
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r8d
+	add	r11d,DWORD[12+r15]
+	add	bl,dl
+	mov	eax,DWORD[88+rsi]
+	add	r11d,2399980690
+	movzx	ebx,bl
+	xor	r12d,r9d
+	mov	DWORD[84+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,10
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],2
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r11d
+	add	r10d,DWORD[40+r15]
+	add	al,dl
+	mov	ebx,DWORD[92+rsi]
+	add	r10d,4293915773
+	movzx	eax,al
+	xor	r12d,r8d
+	mov	DWORD[88+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,15
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],3
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r10d
+	add	r9d,DWORD[4+r15]
+	add	bl,dl
+	mov	eax,DWORD[96+rsi]
+	add	r9d,2240044497
+	movzx	ebx,bl
+	xor	r12d,r11d
+	mov	DWORD[92+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,21
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],3
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r9d
+	add	r8d,DWORD[32+r15]
+	add	al,dl
+	mov	ebx,DWORD[100+rsi]
+	add	r8d,1873313359
+	movzx	eax,al
+	xor	r12d,r10d
+	mov	DWORD[96+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,6
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],4
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r8d
+	add	r11d,DWORD[60+r15]
+	add	bl,dl
+	mov	eax,DWORD[104+rsi]
+	add	r11d,4264355552
+	movzx	ebx,bl
+	xor	r12d,r9d
+	mov	DWORD[100+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,10
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],4
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r11d
+	add	r10d,DWORD[24+r15]
+	add	al,dl
+	mov	ebx,DWORD[108+rsi]
+	add	r10d,2734768916
+	movzx	eax,al
+	xor	r12d,r8d
+	mov	DWORD[104+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,15
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],5
+
+	add	r10d,r11d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r10d
+	add	r9d,DWORD[52+r15]
+	add	bl,dl
+	mov	eax,DWORD[112+rsi]
+	add	r9d,1309151649
+	movzx	ebx,bl
+	xor	r12d,r11d
+	mov	DWORD[108+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,21
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],5
+
+	add	r9d,r10d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r11d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r9d
+	add	r8d,DWORD[16+r15]
+	add	al,dl
+	mov	ebx,DWORD[116+rsi]
+	add	r8d,4149444226
+	movzx	eax,al
+	xor	r12d,r10d
+	mov	DWORD[112+rsi],edx
+	add	r8d,r12d
+	add	cl,bl
+	rol	r8d,6
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],6
+
+	add	r8d,r9d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r10d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r8d
+	add	r11d,DWORD[44+r15]
+	add	bl,dl
+	mov	eax,DWORD[120+rsi]
+	add	r11d,3174756917
+	movzx	ebx,bl
+	xor	r12d,r9d
+	mov	DWORD[116+rsi],edx
+	add	r11d,r12d
+	add	cl,al
+	rol	r11d,10
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],6
+
+	add	r11d,r8d
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r9d
+	mov	DWORD[rcx*4+rdi],eax
+	or	r12d,r11d
+	add	r10d,DWORD[8+r15]
+	add	al,dl
+	mov	ebx,DWORD[124+rsi]
+	add	r10d,718787259
+	movzx	eax,al
+	xor	r12d,r8d
+	mov	DWORD[120+rsi],edx
+	add	r10d,r12d
+	add	cl,bl
+	rol	r10d,15
+	mov	r12d,-1
+	pinsrw	xmm0,WORD[rax*4+rdi],7
+
+	add	r10d,r11d
+	movdqu	xmm5,XMMWORD[48+r13]
+	add	bpl,32
+	mov	edx,DWORD[rcx*4+rdi]
+	xor	r12d,r8d
+	mov	DWORD[rcx*4+rdi],ebx
+	or	r12d,r10d
+	add	r9d,DWORD[36+r15]
+	add	bl,dl
+	mov	eax,DWORD[rbp*4+rdi]
+	add	r9d,3951481745
+	movzx	ebx,bl
+	xor	r12d,r11d
+	mov	DWORD[124+rsi],edx
+	add	r9d,r12d
+	add	cl,al
+	rol	r9d,21
+	mov	r12d,-1
+	pinsrw	xmm1,WORD[rbx*4+rdi],7
+
+	add	r9d,r10d
+	mov	rsi,rbp
+	xor	rbp,rbp
+	mov	bpl,sil
+	mov	rsi,rcx
+	xor	rcx,rcx
+	mov	cl,sil
+	lea	rsi,[rbp*4+rdi]
+	psllq	xmm1,8
+	pxor	xmm5,xmm0
+	pxor	xmm5,xmm1
+	add	r8d,DWORD[rsp]
+	add	r9d,DWORD[4+rsp]
+	add	r10d,DWORD[8+rsp]
+	add	r11d,DWORD[12+rsp]
+
+	movdqu	XMMWORD[r13*1+r14],xmm2
+	movdqu	XMMWORD[16+r13*1+r14],xmm3
+	movdqu	XMMWORD[32+r13*1+r14],xmm4
+	movdqu	XMMWORD[48+r13*1+r14],xmm5
+	lea	r15,[64+r15]
+	lea	r13,[64+r13]
+	cmp	r15,QWORD[16+rsp]
+	jb	NEAR $L$oop
+
+	mov	r12,QWORD[24+rsp]
+	sub	cl,al
+	mov	DWORD[r12],r8d
+	mov	DWORD[4+r12],r9d
+	mov	DWORD[8+r12],r10d
+	mov	DWORD[12+r12],r11d
+	sub	bpl,1
+	mov	DWORD[((-8))+rdi],ebp
+	mov	DWORD[((-4))+rdi],ecx
+
+	mov	r15,QWORD[40+rsp]
+	mov	r14,QWORD[48+rsp]
+	mov	r13,QWORD[56+rsp]
+	mov	r12,QWORD[64+rsp]
+	mov	rbp,QWORD[72+rsp]
+	mov	rbx,QWORD[80+rsp]
+	lea	rsp,[88+rsp]
+$L$epilogue:
+$L$abort:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_rc4_md5_enc:
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$body]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	mov	r15,QWORD[40+rax]
+	mov	r14,QWORD[48+rax]
+	mov	r13,QWORD[56+rax]
+	mov	r12,QWORD[64+rax]
+	mov	rbp,QWORD[72+rax]
+	mov	rbx,QWORD[80+rax]
+	lea	rax,[88+rax]
+
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_rc4_md5_enc wrt ..imagebase
+	DD	$L$SEH_end_rc4_md5_enc wrt ..imagebase
+	DD	$L$SEH_info_rc4_md5_enc wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_rc4_md5_enc:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm
new file mode 100644
index 0000000..c7c3b7b
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/rc4/rc4-x86_64.asm
@@ -0,0 +1,741 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	asm_RC4
+
+ALIGN	16
+asm_RC4:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_RC4:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+	mov	rcx,r9
+
+
+	or	rsi,rsi
+	jne	NEAR $L$entry
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$entry:
+	push	rbx
+	push	r12
+	push	r13
+$L$prologue:
+	mov	r11,rsi
+	mov	r12,rdx
+	mov	r13,rcx
+	xor	r10,r10
+	xor	rcx,rcx
+
+	lea	rdi,[8+rdi]
+	mov	r10b,BYTE[((-8))+rdi]
+	mov	cl,BYTE[((-4))+rdi]
+	cmp	DWORD[256+rdi],-1
+	je	NEAR $L$RC4_CHAR
+	mov	r8d,DWORD[OPENSSL_ia32cap_P]
+	xor	rbx,rbx
+	inc	r10b
+	sub	rbx,r10
+	sub	r13,r12
+	mov	eax,DWORD[r10*4+rdi]
+	test	r11,-16
+	jz	NEAR $L$loop1
+	bt	r8d,30
+	jc	NEAR $L$intel
+	and	rbx,7
+	lea	rsi,[1+r10]
+	jz	NEAR $L$oop8
+	sub	r11,rbx
+$L$oop8_warmup:
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	DWORD[r10*4+rdi],edx
+	add	al,dl
+	inc	r10b
+	mov	edx,DWORD[rax*4+rdi]
+	mov	eax,DWORD[r10*4+rdi]
+	xor	dl,BYTE[r12]
+	mov	BYTE[r13*1+r12],dl
+	lea	r12,[1+r12]
+	dec	rbx
+	jnz	NEAR $L$oop8_warmup
+
+	lea	rsi,[1+r10]
+	jmp	NEAR $L$oop8
+ALIGN	16
+$L$oop8:
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	ebx,DWORD[rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[r10*4+rdi],edx
+	add	dl,al
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,bl
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	mov	eax,DWORD[4+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[4+r10*4+rdi],edx
+	add	dl,bl
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	ebx,DWORD[8+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[8+r10*4+rdi],edx
+	add	dl,al
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,bl
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	mov	eax,DWORD[12+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[12+r10*4+rdi],edx
+	add	dl,bl
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	ebx,DWORD[16+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[16+r10*4+rdi],edx
+	add	dl,al
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,bl
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	mov	eax,DWORD[20+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[20+r10*4+rdi],edx
+	add	dl,bl
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	ebx,DWORD[24+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[24+r10*4+rdi],edx
+	add	dl,al
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	sil,8
+	add	cl,bl
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	mov	eax,DWORD[((-4))+rsi*4+rdi]
+	ror	r8,8
+	mov	DWORD[28+r10*4+rdi],edx
+	add	dl,bl
+	mov	r8b,BYTE[rdx*4+rdi]
+	add	r10b,8
+	ror	r8,8
+	sub	r11,8
+
+	xor	r8,QWORD[r12]
+	mov	QWORD[r13*1+r12],r8
+	lea	r12,[8+r12]
+
+	test	r11,-8
+	jnz	NEAR $L$oop8
+	cmp	r11,0
+	jne	NEAR $L$loop1
+	jmp	NEAR $L$exit
+
+ALIGN	16
+$L$intel:
+	test	r11,-32
+	jz	NEAR $L$loop1
+	and	rbx,15
+	jz	NEAR $L$oop16_is_hot
+	sub	r11,rbx
+$L$oop16_warmup:
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	DWORD[r10*4+rdi],edx
+	add	al,dl
+	inc	r10b
+	mov	edx,DWORD[rax*4+rdi]
+	mov	eax,DWORD[r10*4+rdi]
+	xor	dl,BYTE[r12]
+	mov	BYTE[r13*1+r12],dl
+	lea	r12,[1+r12]
+	dec	rbx
+	jnz	NEAR $L$oop16_warmup
+
+	mov	rbx,rcx
+	xor	rcx,rcx
+	mov	cl,bl
+
+$L$oop16_is_hot:
+	lea	rsi,[r10*4+rdi]
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	pxor	xmm0,xmm0
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[4+rsi]
+	movzx	eax,al
+	mov	DWORD[rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],0
+	jmp	NEAR $L$oop16_enter
+ALIGN	16
+$L$oop16:
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	pxor	xmm2,xmm0
+	psllq	xmm1,8
+	pxor	xmm0,xmm0
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[4+rsi]
+	movzx	eax,al
+	mov	DWORD[rsi],edx
+	pxor	xmm2,xmm1
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],0
+	movdqu	XMMWORD[r13*1+r12],xmm2
+	lea	r12,[16+r12]
+$L$oop16_enter:
+	mov	edx,DWORD[rcx*4+rdi]
+	pxor	xmm1,xmm1
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[8+rsi]
+	movzx	ebx,bl
+	mov	DWORD[4+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],0
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[12+rsi]
+	movzx	eax,al
+	mov	DWORD[8+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],1
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[16+rsi]
+	movzx	ebx,bl
+	mov	DWORD[12+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],1
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[20+rsi]
+	movzx	eax,al
+	mov	DWORD[16+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],2
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[24+rsi]
+	movzx	ebx,bl
+	mov	DWORD[20+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],2
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[28+rsi]
+	movzx	eax,al
+	mov	DWORD[24+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],3
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[32+rsi]
+	movzx	ebx,bl
+	mov	DWORD[28+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],3
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[36+rsi]
+	movzx	eax,al
+	mov	DWORD[32+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],4
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[40+rsi]
+	movzx	ebx,bl
+	mov	DWORD[36+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],4
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[44+rsi]
+	movzx	eax,al
+	mov	DWORD[40+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],5
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[48+rsi]
+	movzx	ebx,bl
+	mov	DWORD[44+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],5
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[52+rsi]
+	movzx	eax,al
+	mov	DWORD[48+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],6
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	mov	eax,DWORD[56+rsi]
+	movzx	ebx,bl
+	mov	DWORD[52+rsi],edx
+	add	cl,al
+	pinsrw	xmm1,WORD[rbx*4+rdi],6
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	add	al,dl
+	mov	ebx,DWORD[60+rsi]
+	movzx	eax,al
+	mov	DWORD[56+rsi],edx
+	add	cl,bl
+	pinsrw	xmm0,WORD[rax*4+rdi],7
+	add	r10b,16
+	movdqu	xmm2,XMMWORD[r12]
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],ebx
+	add	bl,dl
+	movzx	ebx,bl
+	mov	DWORD[60+rsi],edx
+	lea	rsi,[r10*4+rdi]
+	pinsrw	xmm1,WORD[rbx*4+rdi],7
+	mov	eax,DWORD[rsi]
+	mov	rbx,rcx
+	xor	rcx,rcx
+	sub	r11,16
+	mov	cl,bl
+	test	r11,-16
+	jnz	NEAR $L$oop16
+
+	psllq	xmm1,8
+	pxor	xmm2,xmm0
+	pxor	xmm2,xmm1
+	movdqu	XMMWORD[r13*1+r12],xmm2
+	lea	r12,[16+r12]
+
+	cmp	r11,0
+	jne	NEAR $L$loop1
+	jmp	NEAR $L$exit
+
+ALIGN	16
+$L$loop1:
+	add	cl,al
+	mov	edx,DWORD[rcx*4+rdi]
+	mov	DWORD[rcx*4+rdi],eax
+	mov	DWORD[r10*4+rdi],edx
+	add	al,dl
+	inc	r10b
+	mov	edx,DWORD[rax*4+rdi]
+	mov	eax,DWORD[r10*4+rdi]
+	xor	dl,BYTE[r12]
+	mov	BYTE[r13*1+r12],dl
+	lea	r12,[1+r12]
+	dec	r11
+	jnz	NEAR $L$loop1
+	jmp	NEAR $L$exit
+
+ALIGN	16
+$L$RC4_CHAR:
+	add	r10b,1
+	movzx	eax,BYTE[r10*1+rdi]
+	test	r11,-8
+	jz	NEAR $L$cloop1
+	jmp	NEAR $L$cloop8
+ALIGN	16
+$L$cloop8:
+	mov	r8d,DWORD[r12]
+	mov	r9d,DWORD[4+r12]
+	add	cl,al
+	lea	rsi,[1+r10]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	esi,sil
+	movzx	ebx,BYTE[rsi*1+rdi]
+	mov	BYTE[rcx*1+rdi],al
+	cmp	rcx,rsi
+	mov	BYTE[r10*1+rdi],dl
+	jne	NEAR $L$cmov0
+	mov	rbx,rax
+$L$cmov0:
+	add	dl,al
+	xor	r8b,BYTE[rdx*1+rdi]
+	ror	r8d,8
+	add	cl,bl
+	lea	r10,[1+rsi]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	r10d,r10b
+	movzx	eax,BYTE[r10*1+rdi]
+	mov	BYTE[rcx*1+rdi],bl
+	cmp	rcx,r10
+	mov	BYTE[rsi*1+rdi],dl
+	jne	NEAR $L$cmov1
+	mov	rax,rbx
+$L$cmov1:
+	add	dl,bl
+	xor	r8b,BYTE[rdx*1+rdi]
+	ror	r8d,8
+	add	cl,al
+	lea	rsi,[1+r10]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	esi,sil
+	movzx	ebx,BYTE[rsi*1+rdi]
+	mov	BYTE[rcx*1+rdi],al
+	cmp	rcx,rsi
+	mov	BYTE[r10*1+rdi],dl
+	jne	NEAR $L$cmov2
+	mov	rbx,rax
+$L$cmov2:
+	add	dl,al
+	xor	r8b,BYTE[rdx*1+rdi]
+	ror	r8d,8
+	add	cl,bl
+	lea	r10,[1+rsi]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	r10d,r10b
+	movzx	eax,BYTE[r10*1+rdi]
+	mov	BYTE[rcx*1+rdi],bl
+	cmp	rcx,r10
+	mov	BYTE[rsi*1+rdi],dl
+	jne	NEAR $L$cmov3
+	mov	rax,rbx
+$L$cmov3:
+	add	dl,bl
+	xor	r8b,BYTE[rdx*1+rdi]
+	ror	r8d,8
+	add	cl,al
+	lea	rsi,[1+r10]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	esi,sil
+	movzx	ebx,BYTE[rsi*1+rdi]
+	mov	BYTE[rcx*1+rdi],al
+	cmp	rcx,rsi
+	mov	BYTE[r10*1+rdi],dl
+	jne	NEAR $L$cmov4
+	mov	rbx,rax
+$L$cmov4:
+	add	dl,al
+	xor	r9b,BYTE[rdx*1+rdi]
+	ror	r9d,8
+	add	cl,bl
+	lea	r10,[1+rsi]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	r10d,r10b
+	movzx	eax,BYTE[r10*1+rdi]
+	mov	BYTE[rcx*1+rdi],bl
+	cmp	rcx,r10
+	mov	BYTE[rsi*1+rdi],dl
+	jne	NEAR $L$cmov5
+	mov	rax,rbx
+$L$cmov5:
+	add	dl,bl
+	xor	r9b,BYTE[rdx*1+rdi]
+	ror	r9d,8
+	add	cl,al
+	lea	rsi,[1+r10]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	esi,sil
+	movzx	ebx,BYTE[rsi*1+rdi]
+	mov	BYTE[rcx*1+rdi],al
+	cmp	rcx,rsi
+	mov	BYTE[r10*1+rdi],dl
+	jne	NEAR $L$cmov6
+	mov	rbx,rax
+$L$cmov6:
+	add	dl,al
+	xor	r9b,BYTE[rdx*1+rdi]
+	ror	r9d,8
+	add	cl,bl
+	lea	r10,[1+rsi]
+	movzx	edx,BYTE[rcx*1+rdi]
+	movzx	r10d,r10b
+	movzx	eax,BYTE[r10*1+rdi]
+	mov	BYTE[rcx*1+rdi],bl
+	cmp	rcx,r10
+	mov	BYTE[rsi*1+rdi],dl
+	jne	NEAR $L$cmov7
+	mov	rax,rbx
+$L$cmov7:
+	add	dl,bl
+	xor	r9b,BYTE[rdx*1+rdi]
+	ror	r9d,8
+	lea	r11,[((-8))+r11]
+	mov	DWORD[r13],r8d
+	lea	r12,[8+r12]
+	mov	DWORD[4+r13],r9d
+	lea	r13,[8+r13]
+
+	test	r11,-8
+	jnz	NEAR $L$cloop8
+	cmp	r11,0
+	jne	NEAR $L$cloop1
+	jmp	NEAR $L$exit
+ALIGN	16
+$L$cloop1:
+	add	cl,al
+	movzx	ecx,cl
+	movzx	edx,BYTE[rcx*1+rdi]
+	mov	BYTE[rcx*1+rdi],al
+	mov	BYTE[r10*1+rdi],dl
+	add	dl,al
+	add	r10b,1
+	movzx	edx,dl
+	movzx	r10d,r10b
+	movzx	edx,BYTE[rdx*1+rdi]
+	movzx	eax,BYTE[r10*1+rdi]
+	xor	dl,BYTE[r12]
+	lea	r12,[1+r12]
+	mov	BYTE[r13],dl
+	lea	r13,[1+r13]
+	sub	r11,1
+	jnz	NEAR $L$cloop1
+	jmp	NEAR $L$exit
+
+ALIGN	16
+$L$exit:
+	sub	r10b,1
+	mov	DWORD[((-8))+rdi],r10d
+	mov	DWORD[((-4))+rdi],ecx
+
+	mov	r13,QWORD[rsp]
+	mov	r12,QWORD[8+rsp]
+	mov	rbx,QWORD[16+rsp]
+	add	rsp,24
+$L$epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_RC4:
+global	asm_RC4_set_key
+
+ALIGN	16
+asm_RC4_set_key:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_asm_RC4_set_key:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	rdi,[8+rdi]
+	lea	rdx,[rsi*1+rdx]
+	neg	rsi
+	mov	rcx,rsi
+	xor	eax,eax
+	xor	r9,r9
+	xor	r10,r10
+	xor	r11,r11
+
+	mov	r8d,DWORD[OPENSSL_ia32cap_P]
+	bt	r8d,20
+	jc	NEAR $L$c1stloop
+	jmp	NEAR $L$w1stloop
+
+ALIGN	16
+$L$w1stloop:
+	mov	DWORD[rax*4+rdi],eax
+	add	al,1
+	jnc	NEAR $L$w1stloop
+
+	xor	r9,r9
+	xor	r8,r8
+ALIGN	16
+$L$w2ndloop:
+	mov	r10d,DWORD[r9*4+rdi]
+	add	r8b,BYTE[rsi*1+rdx]
+	add	r8b,r10b
+	add	rsi,1
+	mov	r11d,DWORD[r8*4+rdi]
+	cmovz	rsi,rcx
+	mov	DWORD[r8*4+rdi],r10d
+	mov	DWORD[r9*4+rdi],r11d
+	add	r9b,1
+	jnc	NEAR $L$w2ndloop
+	jmp	NEAR $L$exit_key
+
+ALIGN	16
+$L$c1stloop:
+	mov	BYTE[rax*1+rdi],al
+	add	al,1
+	jnc	NEAR $L$c1stloop
+
+	xor	r9,r9
+	xor	r8,r8
+ALIGN	16
+$L$c2ndloop:
+	mov	r10b,BYTE[r9*1+rdi]
+	add	r8b,BYTE[rsi*1+rdx]
+	add	r8b,r10b
+	add	rsi,1
+	mov	r11b,BYTE[r8*1+rdi]
+	jnz	NEAR $L$cnowrap
+	mov	rsi,rcx
+$L$cnowrap:
+	mov	BYTE[r8*1+rdi],r10b
+	mov	BYTE[r9*1+rdi],r11b
+	add	r9b,1
+	jnc	NEAR $L$c2ndloop
+	mov	DWORD[256+rdi],-1
+
+ALIGN	16
+$L$exit_key:
+	xor	eax,eax
+	mov	DWORD[((-8))+rdi],eax
+	mov	DWORD[((-4))+rdi],eax
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_asm_RC4_set_key:
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+stream_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$prologue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+
+	lea	rax,[24+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	r12,QWORD[((-16))+rax]
+	mov	r13,QWORD[((-24))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	jmp	NEAR $L$common_seh_exit
+
+
+
+ALIGN	16
+key_se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[152+r8]
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+$L$common_seh_exit:
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_asm_RC4 wrt ..imagebase
+	DD	$L$SEH_end_asm_RC4 wrt ..imagebase
+	DD	$L$SEH_info_asm_RC4 wrt ..imagebase
+
+	DD	$L$SEH_begin_asm_RC4_set_key wrt ..imagebase
+	DD	$L$SEH_end_asm_RC4_set_key wrt ..imagebase
+	DD	$L$SEH_info_asm_RC4_set_key wrt ..imagebase
+
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_asm_RC4:
+DB	9,0,0,0
+	DD	stream_se_handler wrt ..imagebase
+$L$SEH_info_asm_RC4_set_key:
+DB	9,0,0,0
+	DD	key_se_handler wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm
new file mode 100644
index 0000000..0f5361a
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/sha/sha1-x86_64.asm
@@ -0,0 +1,2616 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+EXTERN	OPENSSL_ia32cap_P
+
+global	sha1_block_data_order
+
+ALIGN	16
+sha1_block_data_order:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_sha1_block_data_order:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	mov	r9d,DWORD[((OPENSSL_ia32cap_P+0))]
+	mov	r8d,DWORD[((OPENSSL_ia32cap_P+4))]
+	mov	r10d,DWORD[((OPENSSL_ia32cap_P+8))]
+	test	r8d,512
+	jz	NEAR $L$ialu
+	jmp	NEAR _ssse3_shortcut
+
+ALIGN	16
+$L$ialu:
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	mov	r8,rdi
+	sub	rsp,72
+	mov	r9,rsi
+	and	rsp,-64
+	mov	r10,rdx
+	mov	QWORD[64+rsp],rax
+$L$prologue:
+
+	mov	esi,DWORD[r8]
+	mov	edi,DWORD[4+r8]
+	mov	r11d,DWORD[8+r8]
+	mov	r12d,DWORD[12+r8]
+	mov	r13d,DWORD[16+r8]
+	jmp	NEAR $L$loop
+
+ALIGN	16
+$L$loop:
+	mov	edx,DWORD[r9]
+	bswap	edx
+	mov	ebp,DWORD[4+r9]
+	mov	eax,r12d
+	mov	DWORD[rsp],edx
+	mov	ecx,esi
+	bswap	ebp
+	xor	eax,r11d
+	rol	ecx,5
+	and	eax,edi
+	lea	r13d,[1518500249+r13*1+rdx]
+	add	r13d,ecx
+	xor	eax,r12d
+	rol	edi,30
+	add	r13d,eax
+	mov	r14d,DWORD[8+r9]
+	mov	eax,r11d
+	mov	DWORD[4+rsp],ebp
+	mov	ecx,r13d
+	bswap	r14d
+	xor	eax,edi
+	rol	ecx,5
+	and	eax,esi
+	lea	r12d,[1518500249+r12*1+rbp]
+	add	r12d,ecx
+	xor	eax,r11d
+	rol	esi,30
+	add	r12d,eax
+	mov	edx,DWORD[12+r9]
+	mov	eax,edi
+	mov	DWORD[8+rsp],r14d
+	mov	ecx,r12d
+	bswap	edx
+	xor	eax,esi
+	rol	ecx,5
+	and	eax,r13d
+	lea	r11d,[1518500249+r11*1+r14]
+	add	r11d,ecx
+	xor	eax,edi
+	rol	r13d,30
+	add	r11d,eax
+	mov	ebp,DWORD[16+r9]
+	mov	eax,esi
+	mov	DWORD[12+rsp],edx
+	mov	ecx,r11d
+	bswap	ebp
+	xor	eax,r13d
+	rol	ecx,5
+	and	eax,r12d
+	lea	edi,[1518500249+rdi*1+rdx]
+	add	edi,ecx
+	xor	eax,esi
+	rol	r12d,30
+	add	edi,eax
+	mov	r14d,DWORD[20+r9]
+	mov	eax,r13d
+	mov	DWORD[16+rsp],ebp
+	mov	ecx,edi
+	bswap	r14d
+	xor	eax,r12d
+	rol	ecx,5
+	and	eax,r11d
+	lea	esi,[1518500249+rsi*1+rbp]
+	add	esi,ecx
+	xor	eax,r13d
+	rol	r11d,30
+	add	esi,eax
+	mov	edx,DWORD[24+r9]
+	mov	eax,r12d
+	mov	DWORD[20+rsp],r14d
+	mov	ecx,esi
+	bswap	edx
+	xor	eax,r11d
+	rol	ecx,5
+	and	eax,edi
+	lea	r13d,[1518500249+r13*1+r14]
+	add	r13d,ecx
+	xor	eax,r12d
+	rol	edi,30
+	add	r13d,eax
+	mov	ebp,DWORD[28+r9]
+	mov	eax,r11d
+	mov	DWORD[24+rsp],edx
+	mov	ecx,r13d
+	bswap	ebp
+	xor	eax,edi
+	rol	ecx,5
+	and	eax,esi
+	lea	r12d,[1518500249+r12*1+rdx]
+	add	r12d,ecx
+	xor	eax,r11d
+	rol	esi,30
+	add	r12d,eax
+	mov	r14d,DWORD[32+r9]
+	mov	eax,edi
+	mov	DWORD[28+rsp],ebp
+	mov	ecx,r12d
+	bswap	r14d
+	xor	eax,esi
+	rol	ecx,5
+	and	eax,r13d
+	lea	r11d,[1518500249+r11*1+rbp]
+	add	r11d,ecx
+	xor	eax,edi
+	rol	r13d,30
+	add	r11d,eax
+	mov	edx,DWORD[36+r9]
+	mov	eax,esi
+	mov	DWORD[32+rsp],r14d
+	mov	ecx,r11d
+	bswap	edx
+	xor	eax,r13d
+	rol	ecx,5
+	and	eax,r12d
+	lea	edi,[1518500249+rdi*1+r14]
+	add	edi,ecx
+	xor	eax,esi
+	rol	r12d,30
+	add	edi,eax
+	mov	ebp,DWORD[40+r9]
+	mov	eax,r13d
+	mov	DWORD[36+rsp],edx
+	mov	ecx,edi
+	bswap	ebp
+	xor	eax,r12d
+	rol	ecx,5
+	and	eax,r11d
+	lea	esi,[1518500249+rsi*1+rdx]
+	add	esi,ecx
+	xor	eax,r13d
+	rol	r11d,30
+	add	esi,eax
+	mov	r14d,DWORD[44+r9]
+	mov	eax,r12d
+	mov	DWORD[40+rsp],ebp
+	mov	ecx,esi
+	bswap	r14d
+	xor	eax,r11d
+	rol	ecx,5
+	and	eax,edi
+	lea	r13d,[1518500249+r13*1+rbp]
+	add	r13d,ecx
+	xor	eax,r12d
+	rol	edi,30
+	add	r13d,eax
+	mov	edx,DWORD[48+r9]
+	mov	eax,r11d
+	mov	DWORD[44+rsp],r14d
+	mov	ecx,r13d
+	bswap	edx
+	xor	eax,edi
+	rol	ecx,5
+	and	eax,esi
+	lea	r12d,[1518500249+r12*1+r14]
+	add	r12d,ecx
+	xor	eax,r11d
+	rol	esi,30
+	add	r12d,eax
+	mov	ebp,DWORD[52+r9]
+	mov	eax,edi
+	mov	DWORD[48+rsp],edx
+	mov	ecx,r12d
+	bswap	ebp
+	xor	eax,esi
+	rol	ecx,5
+	and	eax,r13d
+	lea	r11d,[1518500249+r11*1+rdx]
+	add	r11d,ecx
+	xor	eax,edi
+	rol	r13d,30
+	add	r11d,eax
+	mov	r14d,DWORD[56+r9]
+	mov	eax,esi
+	mov	DWORD[52+rsp],ebp
+	mov	ecx,r11d
+	bswap	r14d
+	xor	eax,r13d
+	rol	ecx,5
+	and	eax,r12d
+	lea	edi,[1518500249+rdi*1+rbp]
+	add	edi,ecx
+	xor	eax,esi
+	rol	r12d,30
+	add	edi,eax
+	mov	edx,DWORD[60+r9]
+	mov	eax,r13d
+	mov	DWORD[56+rsp],r14d
+	mov	ecx,edi
+	bswap	edx
+	xor	eax,r12d
+	rol	ecx,5
+	and	eax,r11d
+	lea	esi,[1518500249+rsi*1+r14]
+	add	esi,ecx
+	xor	eax,r13d
+	rol	r11d,30
+	add	esi,eax
+	xor	ebp,DWORD[rsp]
+	mov	eax,r12d
+	mov	DWORD[60+rsp],edx
+	mov	ecx,esi
+	xor	ebp,DWORD[8+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	ebp,DWORD[32+rsp]
+	and	eax,edi
+	lea	r13d,[1518500249+r13*1+rdx]
+	rol	edi,30
+	xor	eax,r12d
+	add	r13d,ecx
+	rol	ebp,1
+	add	r13d,eax
+	xor	r14d,DWORD[4+rsp]
+	mov	eax,r11d
+	mov	DWORD[rsp],ebp
+	mov	ecx,r13d
+	xor	r14d,DWORD[12+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	r14d,DWORD[36+rsp]
+	and	eax,esi
+	lea	r12d,[1518500249+r12*1+rbp]
+	rol	esi,30
+	xor	eax,r11d
+	add	r12d,ecx
+	rol	r14d,1
+	add	r12d,eax
+	xor	edx,DWORD[8+rsp]
+	mov	eax,edi
+	mov	DWORD[4+rsp],r14d
+	mov	ecx,r12d
+	xor	edx,DWORD[16+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	edx,DWORD[40+rsp]
+	and	eax,r13d
+	lea	r11d,[1518500249+r11*1+r14]
+	rol	r13d,30
+	xor	eax,edi
+	add	r11d,ecx
+	rol	edx,1
+	add	r11d,eax
+	xor	ebp,DWORD[12+rsp]
+	mov	eax,esi
+	mov	DWORD[8+rsp],edx
+	mov	ecx,r11d
+	xor	ebp,DWORD[20+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	ebp,DWORD[44+rsp]
+	and	eax,r12d
+	lea	edi,[1518500249+rdi*1+rdx]
+	rol	r12d,30
+	xor	eax,esi
+	add	edi,ecx
+	rol	ebp,1
+	add	edi,eax
+	xor	r14d,DWORD[16+rsp]
+	mov	eax,r13d
+	mov	DWORD[12+rsp],ebp
+	mov	ecx,edi
+	xor	r14d,DWORD[24+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	r14d,DWORD[48+rsp]
+	and	eax,r11d
+	lea	esi,[1518500249+rsi*1+rbp]
+	rol	r11d,30
+	xor	eax,r13d
+	add	esi,ecx
+	rol	r14d,1
+	add	esi,eax
+	xor	edx,DWORD[20+rsp]
+	mov	eax,edi
+	mov	DWORD[16+rsp],r14d
+	mov	ecx,esi
+	xor	edx,DWORD[28+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	edx,DWORD[52+rsp]
+	lea	r13d,[1859775393+r13*1+r14]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	edx,1
+	xor	ebp,DWORD[24+rsp]
+	mov	eax,esi
+	mov	DWORD[20+rsp],edx
+	mov	ecx,r13d
+	xor	ebp,DWORD[32+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	ebp,DWORD[56+rsp]
+	lea	r12d,[1859775393+r12*1+rdx]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[28+rsp]
+	mov	eax,r13d
+	mov	DWORD[24+rsp],ebp
+	mov	ecx,r12d
+	xor	r14d,DWORD[36+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	r14d,DWORD[60+rsp]
+	lea	r11d,[1859775393+r11*1+rbp]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	r14d,1
+	xor	edx,DWORD[32+rsp]
+	mov	eax,r12d
+	mov	DWORD[28+rsp],r14d
+	mov	ecx,r11d
+	xor	edx,DWORD[40+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	edx,DWORD[rsp]
+	lea	edi,[1859775393+rdi*1+r14]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	edx,1
+	xor	ebp,DWORD[36+rsp]
+	mov	eax,r11d
+	mov	DWORD[32+rsp],edx
+	mov	ecx,edi
+	xor	ebp,DWORD[44+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	ebp,DWORD[4+rsp]
+	lea	esi,[1859775393+rsi*1+rdx]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	ebp,1
+	xor	r14d,DWORD[40+rsp]
+	mov	eax,edi
+	mov	DWORD[36+rsp],ebp
+	mov	ecx,esi
+	xor	r14d,DWORD[48+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	r14d,DWORD[8+rsp]
+	lea	r13d,[1859775393+r13*1+rbp]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	r14d,1
+	xor	edx,DWORD[44+rsp]
+	mov	eax,esi
+	mov	DWORD[40+rsp],r14d
+	mov	ecx,r13d
+	xor	edx,DWORD[52+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	edx,DWORD[12+rsp]
+	lea	r12d,[1859775393+r12*1+r14]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	edx,1
+	xor	ebp,DWORD[48+rsp]
+	mov	eax,r13d
+	mov	DWORD[44+rsp],edx
+	mov	ecx,r12d
+	xor	ebp,DWORD[56+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	ebp,DWORD[16+rsp]
+	lea	r11d,[1859775393+r11*1+rdx]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[52+rsp]
+	mov	eax,r12d
+	mov	DWORD[48+rsp],ebp
+	mov	ecx,r11d
+	xor	r14d,DWORD[60+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	r14d,DWORD[20+rsp]
+	lea	edi,[1859775393+rdi*1+rbp]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	r14d,1
+	xor	edx,DWORD[56+rsp]
+	mov	eax,r11d
+	mov	DWORD[52+rsp],r14d
+	mov	ecx,edi
+	xor	edx,DWORD[rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	edx,DWORD[24+rsp]
+	lea	esi,[1859775393+rsi*1+r14]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	edx,1
+	xor	ebp,DWORD[60+rsp]
+	mov	eax,edi
+	mov	DWORD[56+rsp],edx
+	mov	ecx,esi
+	xor	ebp,DWORD[4+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	ebp,DWORD[28+rsp]
+	lea	r13d,[1859775393+r13*1+rdx]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[rsp]
+	mov	eax,esi
+	mov	DWORD[60+rsp],ebp
+	mov	ecx,r13d
+	xor	r14d,DWORD[8+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	r14d,DWORD[32+rsp]
+	lea	r12d,[1859775393+r12*1+rbp]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	r14d,1
+	xor	edx,DWORD[4+rsp]
+	mov	eax,r13d
+	mov	DWORD[rsp],r14d
+	mov	ecx,r12d
+	xor	edx,DWORD[12+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	edx,DWORD[36+rsp]
+	lea	r11d,[1859775393+r11*1+r14]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	edx,1
+	xor	ebp,DWORD[8+rsp]
+	mov	eax,r12d
+	mov	DWORD[4+rsp],edx
+	mov	ecx,r11d
+	xor	ebp,DWORD[16+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	ebp,DWORD[40+rsp]
+	lea	edi,[1859775393+rdi*1+rdx]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	ebp,1
+	xor	r14d,DWORD[12+rsp]
+	mov	eax,r11d
+	mov	DWORD[8+rsp],ebp
+	mov	ecx,edi
+	xor	r14d,DWORD[20+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	r14d,DWORD[44+rsp]
+	lea	esi,[1859775393+rsi*1+rbp]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	r14d,1
+	xor	edx,DWORD[16+rsp]
+	mov	eax,edi
+	mov	DWORD[12+rsp],r14d
+	mov	ecx,esi
+	xor	edx,DWORD[24+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	edx,DWORD[48+rsp]
+	lea	r13d,[1859775393+r13*1+r14]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	edx,1
+	xor	ebp,DWORD[20+rsp]
+	mov	eax,esi
+	mov	DWORD[16+rsp],edx
+	mov	ecx,r13d
+	xor	ebp,DWORD[28+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	ebp,DWORD[52+rsp]
+	lea	r12d,[1859775393+r12*1+rdx]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[24+rsp]
+	mov	eax,r13d
+	mov	DWORD[20+rsp],ebp
+	mov	ecx,r12d
+	xor	r14d,DWORD[32+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	r14d,DWORD[56+rsp]
+	lea	r11d,[1859775393+r11*1+rbp]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	r14d,1
+	xor	edx,DWORD[28+rsp]
+	mov	eax,r12d
+	mov	DWORD[24+rsp],r14d
+	mov	ecx,r11d
+	xor	edx,DWORD[36+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	edx,DWORD[60+rsp]
+	lea	edi,[1859775393+rdi*1+r14]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	edx,1
+	xor	ebp,DWORD[32+rsp]
+	mov	eax,r11d
+	mov	DWORD[28+rsp],edx
+	mov	ecx,edi
+	xor	ebp,DWORD[40+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	ebp,DWORD[rsp]
+	lea	esi,[1859775393+rsi*1+rdx]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	ebp,1
+	xor	r14d,DWORD[36+rsp]
+	mov	eax,r12d
+	mov	DWORD[32+rsp],ebp
+	mov	ebx,r12d
+	xor	r14d,DWORD[44+rsp]
+	and	eax,r11d
+	mov	ecx,esi
+	xor	r14d,DWORD[4+rsp]
+	lea	r13d,[((-1894007588))+r13*1+rbp]
+	xor	ebx,r11d
+	rol	ecx,5
+	add	r13d,eax
+	rol	r14d,1
+	and	ebx,edi
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,ebx
+	xor	edx,DWORD[40+rsp]
+	mov	eax,r11d
+	mov	DWORD[36+rsp],r14d
+	mov	ebx,r11d
+	xor	edx,DWORD[48+rsp]
+	and	eax,edi
+	mov	ecx,r13d
+	xor	edx,DWORD[8+rsp]
+	lea	r12d,[((-1894007588))+r12*1+r14]
+	xor	ebx,edi
+	rol	ecx,5
+	add	r12d,eax
+	rol	edx,1
+	and	ebx,esi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,ebx
+	xor	ebp,DWORD[44+rsp]
+	mov	eax,edi
+	mov	DWORD[40+rsp],edx
+	mov	ebx,edi
+	xor	ebp,DWORD[52+rsp]
+	and	eax,esi
+	mov	ecx,r12d
+	xor	ebp,DWORD[12+rsp]
+	lea	r11d,[((-1894007588))+r11*1+rdx]
+	xor	ebx,esi
+	rol	ecx,5
+	add	r11d,eax
+	rol	ebp,1
+	and	ebx,r13d
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,ebx
+	xor	r14d,DWORD[48+rsp]
+	mov	eax,esi
+	mov	DWORD[44+rsp],ebp
+	mov	ebx,esi
+	xor	r14d,DWORD[56+rsp]
+	and	eax,r13d
+	mov	ecx,r11d
+	xor	r14d,DWORD[16+rsp]
+	lea	edi,[((-1894007588))+rdi*1+rbp]
+	xor	ebx,r13d
+	rol	ecx,5
+	add	edi,eax
+	rol	r14d,1
+	and	ebx,r12d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,ebx
+	xor	edx,DWORD[52+rsp]
+	mov	eax,r13d
+	mov	DWORD[48+rsp],r14d
+	mov	ebx,r13d
+	xor	edx,DWORD[60+rsp]
+	and	eax,r12d
+	mov	ecx,edi
+	xor	edx,DWORD[20+rsp]
+	lea	esi,[((-1894007588))+rsi*1+r14]
+	xor	ebx,r12d
+	rol	ecx,5
+	add	esi,eax
+	rol	edx,1
+	and	ebx,r11d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,ebx
+	xor	ebp,DWORD[56+rsp]
+	mov	eax,r12d
+	mov	DWORD[52+rsp],edx
+	mov	ebx,r12d
+	xor	ebp,DWORD[rsp]
+	and	eax,r11d
+	mov	ecx,esi
+	xor	ebp,DWORD[24+rsp]
+	lea	r13d,[((-1894007588))+r13*1+rdx]
+	xor	ebx,r11d
+	rol	ecx,5
+	add	r13d,eax
+	rol	ebp,1
+	and	ebx,edi
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,ebx
+	xor	r14d,DWORD[60+rsp]
+	mov	eax,r11d
+	mov	DWORD[56+rsp],ebp
+	mov	ebx,r11d
+	xor	r14d,DWORD[4+rsp]
+	and	eax,edi
+	mov	ecx,r13d
+	xor	r14d,DWORD[28+rsp]
+	lea	r12d,[((-1894007588))+r12*1+rbp]
+	xor	ebx,edi
+	rol	ecx,5
+	add	r12d,eax
+	rol	r14d,1
+	and	ebx,esi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,ebx
+	xor	edx,DWORD[rsp]
+	mov	eax,edi
+	mov	DWORD[60+rsp],r14d
+	mov	ebx,edi
+	xor	edx,DWORD[8+rsp]
+	and	eax,esi
+	mov	ecx,r12d
+	xor	edx,DWORD[32+rsp]
+	lea	r11d,[((-1894007588))+r11*1+r14]
+	xor	ebx,esi
+	rol	ecx,5
+	add	r11d,eax
+	rol	edx,1
+	and	ebx,r13d
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,ebx
+	xor	ebp,DWORD[4+rsp]
+	mov	eax,esi
+	mov	DWORD[rsp],edx
+	mov	ebx,esi
+	xor	ebp,DWORD[12+rsp]
+	and	eax,r13d
+	mov	ecx,r11d
+	xor	ebp,DWORD[36+rsp]
+	lea	edi,[((-1894007588))+rdi*1+rdx]
+	xor	ebx,r13d
+	rol	ecx,5
+	add	edi,eax
+	rol	ebp,1
+	and	ebx,r12d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,ebx
+	xor	r14d,DWORD[8+rsp]
+	mov	eax,r13d
+	mov	DWORD[4+rsp],ebp
+	mov	ebx,r13d
+	xor	r14d,DWORD[16+rsp]
+	and	eax,r12d
+	mov	ecx,edi
+	xor	r14d,DWORD[40+rsp]
+	lea	esi,[((-1894007588))+rsi*1+rbp]
+	xor	ebx,r12d
+	rol	ecx,5
+	add	esi,eax
+	rol	r14d,1
+	and	ebx,r11d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,ebx
+	xor	edx,DWORD[12+rsp]
+	mov	eax,r12d
+	mov	DWORD[8+rsp],r14d
+	mov	ebx,r12d
+	xor	edx,DWORD[20+rsp]
+	and	eax,r11d
+	mov	ecx,esi
+	xor	edx,DWORD[44+rsp]
+	lea	r13d,[((-1894007588))+r13*1+r14]
+	xor	ebx,r11d
+	rol	ecx,5
+	add	r13d,eax
+	rol	edx,1
+	and	ebx,edi
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,ebx
+	xor	ebp,DWORD[16+rsp]
+	mov	eax,r11d
+	mov	DWORD[12+rsp],edx
+	mov	ebx,r11d
+	xor	ebp,DWORD[24+rsp]
+	and	eax,edi
+	mov	ecx,r13d
+	xor	ebp,DWORD[48+rsp]
+	lea	r12d,[((-1894007588))+r12*1+rdx]
+	xor	ebx,edi
+	rol	ecx,5
+	add	r12d,eax
+	rol	ebp,1
+	and	ebx,esi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,ebx
+	xor	r14d,DWORD[20+rsp]
+	mov	eax,edi
+	mov	DWORD[16+rsp],ebp
+	mov	ebx,edi
+	xor	r14d,DWORD[28+rsp]
+	and	eax,esi
+	mov	ecx,r12d
+	xor	r14d,DWORD[52+rsp]
+	lea	r11d,[((-1894007588))+r11*1+rbp]
+	xor	ebx,esi
+	rol	ecx,5
+	add	r11d,eax
+	rol	r14d,1
+	and	ebx,r13d
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,ebx
+	xor	edx,DWORD[24+rsp]
+	mov	eax,esi
+	mov	DWORD[20+rsp],r14d
+	mov	ebx,esi
+	xor	edx,DWORD[32+rsp]
+	and	eax,r13d
+	mov	ecx,r11d
+	xor	edx,DWORD[56+rsp]
+	lea	edi,[((-1894007588))+rdi*1+r14]
+	xor	ebx,r13d
+	rol	ecx,5
+	add	edi,eax
+	rol	edx,1
+	and	ebx,r12d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,ebx
+	xor	ebp,DWORD[28+rsp]
+	mov	eax,r13d
+	mov	DWORD[24+rsp],edx
+	mov	ebx,r13d
+	xor	ebp,DWORD[36+rsp]
+	and	eax,r12d
+	mov	ecx,edi
+	xor	ebp,DWORD[60+rsp]
+	lea	esi,[((-1894007588))+rsi*1+rdx]
+	xor	ebx,r12d
+	rol	ecx,5
+	add	esi,eax
+	rol	ebp,1
+	and	ebx,r11d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,ebx
+	xor	r14d,DWORD[32+rsp]
+	mov	eax,r12d
+	mov	DWORD[28+rsp],ebp
+	mov	ebx,r12d
+	xor	r14d,DWORD[40+rsp]
+	and	eax,r11d
+	mov	ecx,esi
+	xor	r14d,DWORD[rsp]
+	lea	r13d,[((-1894007588))+r13*1+rbp]
+	xor	ebx,r11d
+	rol	ecx,5
+	add	r13d,eax
+	rol	r14d,1
+	and	ebx,edi
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,ebx
+	xor	edx,DWORD[36+rsp]
+	mov	eax,r11d
+	mov	DWORD[32+rsp],r14d
+	mov	ebx,r11d
+	xor	edx,DWORD[44+rsp]
+	and	eax,edi
+	mov	ecx,r13d
+	xor	edx,DWORD[4+rsp]
+	lea	r12d,[((-1894007588))+r12*1+r14]
+	xor	ebx,edi
+	rol	ecx,5
+	add	r12d,eax
+	rol	edx,1
+	and	ebx,esi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,ebx
+	xor	ebp,DWORD[40+rsp]
+	mov	eax,edi
+	mov	DWORD[36+rsp],edx
+	mov	ebx,edi
+	xor	ebp,DWORD[48+rsp]
+	and	eax,esi
+	mov	ecx,r12d
+	xor	ebp,DWORD[8+rsp]
+	lea	r11d,[((-1894007588))+r11*1+rdx]
+	xor	ebx,esi
+	rol	ecx,5
+	add	r11d,eax
+	rol	ebp,1
+	and	ebx,r13d
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,ebx
+	xor	r14d,DWORD[44+rsp]
+	mov	eax,esi
+	mov	DWORD[40+rsp],ebp
+	mov	ebx,esi
+	xor	r14d,DWORD[52+rsp]
+	and	eax,r13d
+	mov	ecx,r11d
+	xor	r14d,DWORD[12+rsp]
+	lea	edi,[((-1894007588))+rdi*1+rbp]
+	xor	ebx,r13d
+	rol	ecx,5
+	add	edi,eax
+	rol	r14d,1
+	and	ebx,r12d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,ebx
+	xor	edx,DWORD[48+rsp]
+	mov	eax,r13d
+	mov	DWORD[44+rsp],r14d
+	mov	ebx,r13d
+	xor	edx,DWORD[56+rsp]
+	and	eax,r12d
+	mov	ecx,edi
+	xor	edx,DWORD[16+rsp]
+	lea	esi,[((-1894007588))+rsi*1+r14]
+	xor	ebx,r12d
+	rol	ecx,5
+	add	esi,eax
+	rol	edx,1
+	and	ebx,r11d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,ebx
+	xor	ebp,DWORD[52+rsp]
+	mov	eax,edi
+	mov	DWORD[48+rsp],edx
+	mov	ecx,esi
+	xor	ebp,DWORD[60+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	ebp,DWORD[20+rsp]
+	lea	r13d,[((-899497514))+r13*1+rdx]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[56+rsp]
+	mov	eax,esi
+	mov	DWORD[52+rsp],ebp
+	mov	ecx,r13d
+	xor	r14d,DWORD[rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	r14d,DWORD[24+rsp]
+	lea	r12d,[((-899497514))+r12*1+rbp]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	r14d,1
+	xor	edx,DWORD[60+rsp]
+	mov	eax,r13d
+	mov	DWORD[56+rsp],r14d
+	mov	ecx,r12d
+	xor	edx,DWORD[4+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	edx,DWORD[28+rsp]
+	lea	r11d,[((-899497514))+r11*1+r14]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	edx,1
+	xor	ebp,DWORD[rsp]
+	mov	eax,r12d
+	mov	DWORD[60+rsp],edx
+	mov	ecx,r11d
+	xor	ebp,DWORD[8+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	ebp,DWORD[32+rsp]
+	lea	edi,[((-899497514))+rdi*1+rdx]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	ebp,1
+	xor	r14d,DWORD[4+rsp]
+	mov	eax,r11d
+	mov	DWORD[rsp],ebp
+	mov	ecx,edi
+	xor	r14d,DWORD[12+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	r14d,DWORD[36+rsp]
+	lea	esi,[((-899497514))+rsi*1+rbp]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	r14d,1
+	xor	edx,DWORD[8+rsp]
+	mov	eax,edi
+	mov	DWORD[4+rsp],r14d
+	mov	ecx,esi
+	xor	edx,DWORD[16+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	edx,DWORD[40+rsp]
+	lea	r13d,[((-899497514))+r13*1+r14]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	edx,1
+	xor	ebp,DWORD[12+rsp]
+	mov	eax,esi
+	mov	DWORD[8+rsp],edx
+	mov	ecx,r13d
+	xor	ebp,DWORD[20+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	ebp,DWORD[44+rsp]
+	lea	r12d,[((-899497514))+r12*1+rdx]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[16+rsp]
+	mov	eax,r13d
+	mov	DWORD[12+rsp],ebp
+	mov	ecx,r12d
+	xor	r14d,DWORD[24+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	r14d,DWORD[48+rsp]
+	lea	r11d,[((-899497514))+r11*1+rbp]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	r14d,1
+	xor	edx,DWORD[20+rsp]
+	mov	eax,r12d
+	mov	DWORD[16+rsp],r14d
+	mov	ecx,r11d
+	xor	edx,DWORD[28+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	edx,DWORD[52+rsp]
+	lea	edi,[((-899497514))+rdi*1+r14]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	edx,1
+	xor	ebp,DWORD[24+rsp]
+	mov	eax,r11d
+	mov	DWORD[20+rsp],edx
+	mov	ecx,edi
+	xor	ebp,DWORD[32+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	ebp,DWORD[56+rsp]
+	lea	esi,[((-899497514))+rsi*1+rdx]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	ebp,1
+	xor	r14d,DWORD[28+rsp]
+	mov	eax,edi
+	mov	DWORD[24+rsp],ebp
+	mov	ecx,esi
+	xor	r14d,DWORD[36+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	r14d,DWORD[60+rsp]
+	lea	r13d,[((-899497514))+r13*1+rbp]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	r14d,1
+	xor	edx,DWORD[32+rsp]
+	mov	eax,esi
+	mov	DWORD[28+rsp],r14d
+	mov	ecx,r13d
+	xor	edx,DWORD[40+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	edx,DWORD[rsp]
+	lea	r12d,[((-899497514))+r12*1+r14]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	edx,1
+	xor	ebp,DWORD[36+rsp]
+	mov	eax,r13d
+
+	mov	ecx,r12d
+	xor	ebp,DWORD[44+rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	ebp,DWORD[4+rsp]
+	lea	r11d,[((-899497514))+r11*1+rdx]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[40+rsp]
+	mov	eax,r12d
+
+	mov	ecx,r11d
+	xor	r14d,DWORD[48+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	r14d,DWORD[8+rsp]
+	lea	edi,[((-899497514))+rdi*1+rbp]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	r14d,1
+	xor	edx,DWORD[44+rsp]
+	mov	eax,r11d
+
+	mov	ecx,edi
+	xor	edx,DWORD[52+rsp]
+	xor	eax,r13d
+	rol	ecx,5
+	xor	edx,DWORD[12+rsp]
+	lea	esi,[((-899497514))+rsi*1+r14]
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	rol	edx,1
+	xor	ebp,DWORD[48+rsp]
+	mov	eax,edi
+
+	mov	ecx,esi
+	xor	ebp,DWORD[56+rsp]
+	xor	eax,r12d
+	rol	ecx,5
+	xor	ebp,DWORD[16+rsp]
+	lea	r13d,[((-899497514))+r13*1+rdx]
+	xor	eax,r11d
+	add	r13d,ecx
+	rol	edi,30
+	add	r13d,eax
+	rol	ebp,1
+	xor	r14d,DWORD[52+rsp]
+	mov	eax,esi
+
+	mov	ecx,r13d
+	xor	r14d,DWORD[60+rsp]
+	xor	eax,r11d
+	rol	ecx,5
+	xor	r14d,DWORD[20+rsp]
+	lea	r12d,[((-899497514))+r12*1+rbp]
+	xor	eax,edi
+	add	r12d,ecx
+	rol	esi,30
+	add	r12d,eax
+	rol	r14d,1
+	xor	edx,DWORD[56+rsp]
+	mov	eax,r13d
+
+	mov	ecx,r12d
+	xor	edx,DWORD[rsp]
+	xor	eax,edi
+	rol	ecx,5
+	xor	edx,DWORD[24+rsp]
+	lea	r11d,[((-899497514))+r11*1+r14]
+	xor	eax,esi
+	add	r11d,ecx
+	rol	r13d,30
+	add	r11d,eax
+	rol	edx,1
+	xor	ebp,DWORD[60+rsp]
+	mov	eax,r12d
+
+	mov	ecx,r11d
+	xor	ebp,DWORD[4+rsp]
+	xor	eax,esi
+	rol	ecx,5
+	xor	ebp,DWORD[28+rsp]
+	lea	edi,[((-899497514))+rdi*1+rdx]
+	xor	eax,r13d
+	add	edi,ecx
+	rol	r12d,30
+	add	edi,eax
+	rol	ebp,1
+	mov	eax,r11d
+	mov	ecx,edi
+	xor	eax,r13d
+	lea	esi,[((-899497514))+rsi*1+rbp]
+	rol	ecx,5
+	xor	eax,r12d
+	add	esi,ecx
+	rol	r11d,30
+	add	esi,eax
+	add	esi,DWORD[r8]
+	add	edi,DWORD[4+r8]
+	add	r11d,DWORD[8+r8]
+	add	r12d,DWORD[12+r8]
+	add	r13d,DWORD[16+r8]
+	mov	DWORD[r8],esi
+	mov	DWORD[4+r8],edi
+	mov	DWORD[8+r8],r11d
+	mov	DWORD[12+r8],r12d
+	mov	DWORD[16+r8],r13d
+
+	sub	r10,1
+	lea	r9,[64+r9]
+	jnz	NEAR $L$loop
+
+	mov	rsi,QWORD[64+rsp]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_sha1_block_data_order:
+
+ALIGN	16
+sha1_block_data_order_ssse3:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_sha1_block_data_order_ssse3:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+_ssse3_shortcut:
+	mov	rax,rsp
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	lea	rsp,[((-160))+rsp]
+	movaps	XMMWORD[(-40-96)+rax],xmm6
+	movaps	XMMWORD[(-40-80)+rax],xmm7
+	movaps	XMMWORD[(-40-64)+rax],xmm8
+	movaps	XMMWORD[(-40-48)+rax],xmm9
+	movaps	XMMWORD[(-40-32)+rax],xmm10
+	movaps	XMMWORD[(-40-16)+rax],xmm11
+$L$prologue_ssse3:
+	mov	r14,rax
+	and	rsp,-64
+	mov	r8,rdi
+	mov	r9,rsi
+	mov	r10,rdx
+
+	shl	r10,6
+	add	r10,r9
+	lea	r11,[((K_XX_XX+64))]
+
+	mov	eax,DWORD[r8]
+	mov	ebx,DWORD[4+r8]
+	mov	ecx,DWORD[8+r8]
+	mov	edx,DWORD[12+r8]
+	mov	esi,ebx
+	mov	ebp,DWORD[16+r8]
+	mov	edi,ecx
+	xor	edi,edx
+	and	esi,edi
+
+	movdqa	xmm6,XMMWORD[64+r11]
+	movdqa	xmm9,XMMWORD[((-64))+r11]
+	movdqu	xmm0,XMMWORD[r9]
+	movdqu	xmm1,XMMWORD[16+r9]
+	movdqu	xmm2,XMMWORD[32+r9]
+	movdqu	xmm3,XMMWORD[48+r9]
+DB	102,15,56,0,198
+DB	102,15,56,0,206
+DB	102,15,56,0,214
+	add	r9,64
+	paddd	xmm0,xmm9
+DB	102,15,56,0,222
+	paddd	xmm1,xmm9
+	paddd	xmm2,xmm9
+	movdqa	XMMWORD[rsp],xmm0
+	psubd	xmm0,xmm9
+	movdqa	XMMWORD[16+rsp],xmm1
+	psubd	xmm1,xmm9
+	movdqa	XMMWORD[32+rsp],xmm2
+	psubd	xmm2,xmm9
+	jmp	NEAR $L$oop_ssse3
+ALIGN	16
+$L$oop_ssse3:
+	ror	ebx,2
+	pshufd	xmm4,xmm0,238
+	xor	esi,edx
+	movdqa	xmm8,xmm3
+	paddd	xmm9,xmm3
+	mov	edi,eax
+	add	ebp,DWORD[rsp]
+	punpcklqdq	xmm4,xmm1
+	xor	ebx,ecx
+	rol	eax,5
+	add	ebp,esi
+	psrldq	xmm8,4
+	and	edi,ebx
+	xor	ebx,ecx
+	pxor	xmm4,xmm0
+	add	ebp,eax
+	ror	eax,7
+	pxor	xmm8,xmm2
+	xor	edi,ecx
+	mov	esi,ebp
+	add	edx,DWORD[4+rsp]
+	pxor	xmm4,xmm8
+	xor	eax,ebx
+	rol	ebp,5
+	movdqa	XMMWORD[48+rsp],xmm9
+	add	edx,edi
+	and	esi,eax
+	movdqa	xmm10,xmm4
+	xor	eax,ebx
+	add	edx,ebp
+	ror	ebp,7
+	movdqa	xmm8,xmm4
+	xor	esi,ebx
+	pslldq	xmm10,12
+	paddd	xmm4,xmm4
+	mov	edi,edx
+	add	ecx,DWORD[8+rsp]
+	psrld	xmm8,31
+	xor	ebp,eax
+	rol	edx,5
+	add	ecx,esi
+	movdqa	xmm9,xmm10
+	and	edi,ebp
+	xor	ebp,eax
+	psrld	xmm10,30
+	add	ecx,edx
+	ror	edx,7
+	por	xmm4,xmm8
+	xor	edi,eax
+	mov	esi,ecx
+	add	ebx,DWORD[12+rsp]
+	pslld	xmm9,2
+	pxor	xmm4,xmm10
+	xor	edx,ebp
+	movdqa	xmm10,XMMWORD[((-64))+r11]
+	rol	ecx,5
+	add	ebx,edi
+	and	esi,edx
+	pxor	xmm4,xmm9
+	xor	edx,ebp
+	add	ebx,ecx
+	ror	ecx,7
+	pshufd	xmm5,xmm1,238
+	xor	esi,ebp
+	movdqa	xmm9,xmm4
+	paddd	xmm10,xmm4
+	mov	edi,ebx
+	add	eax,DWORD[16+rsp]
+	punpcklqdq	xmm5,xmm2
+	xor	ecx,edx
+	rol	ebx,5
+	add	eax,esi
+	psrldq	xmm9,4
+	and	edi,ecx
+	xor	ecx,edx
+	pxor	xmm5,xmm1
+	add	eax,ebx
+	ror	ebx,7
+	pxor	xmm9,xmm3
+	xor	edi,edx
+	mov	esi,eax
+	add	ebp,DWORD[20+rsp]
+	pxor	xmm5,xmm9
+	xor	ebx,ecx
+	rol	eax,5
+	movdqa	XMMWORD[rsp],xmm10
+	add	ebp,edi
+	and	esi,ebx
+	movdqa	xmm8,xmm5
+	xor	ebx,ecx
+	add	ebp,eax
+	ror	eax,7
+	movdqa	xmm9,xmm5
+	xor	esi,ecx
+	pslldq	xmm8,12
+	paddd	xmm5,xmm5
+	mov	edi,ebp
+	add	edx,DWORD[24+rsp]
+	psrld	xmm9,31
+	xor	eax,ebx
+	rol	ebp,5
+	add	edx,esi
+	movdqa	xmm10,xmm8
+	and	edi,eax
+	xor	eax,ebx
+	psrld	xmm8,30
+	add	edx,ebp
+	ror	ebp,7
+	por	xmm5,xmm9
+	xor	edi,ebx
+	mov	esi,edx
+	add	ecx,DWORD[28+rsp]
+	pslld	xmm10,2
+	pxor	xmm5,xmm8
+	xor	ebp,eax
+	movdqa	xmm8,XMMWORD[((-32))+r11]
+	rol	edx,5
+	add	ecx,edi
+	and	esi,ebp
+	pxor	xmm5,xmm10
+	xor	ebp,eax
+	add	ecx,edx
+	ror	edx,7
+	pshufd	xmm6,xmm2,238
+	xor	esi,eax
+	movdqa	xmm10,xmm5
+	paddd	xmm8,xmm5
+	mov	edi,ecx
+	add	ebx,DWORD[32+rsp]
+	punpcklqdq	xmm6,xmm3
+	xor	edx,ebp
+	rol	ecx,5
+	add	ebx,esi
+	psrldq	xmm10,4
+	and	edi,edx
+	xor	edx,ebp
+	pxor	xmm6,xmm2
+	add	ebx,ecx
+	ror	ecx,7
+	pxor	xmm10,xmm4
+	xor	edi,ebp
+	mov	esi,ebx
+	add	eax,DWORD[36+rsp]
+	pxor	xmm6,xmm10
+	xor	ecx,edx
+	rol	ebx,5
+	movdqa	XMMWORD[16+rsp],xmm8
+	add	eax,edi
+	and	esi,ecx
+	movdqa	xmm9,xmm6
+	xor	ecx,edx
+	add	eax,ebx
+	ror	ebx,7
+	movdqa	xmm10,xmm6
+	xor	esi,edx
+	pslldq	xmm9,12
+	paddd	xmm6,xmm6
+	mov	edi,eax
+	add	ebp,DWORD[40+rsp]
+	psrld	xmm10,31
+	xor	ebx,ecx
+	rol	eax,5
+	add	ebp,esi
+	movdqa	xmm8,xmm9
+	and	edi,ebx
+	xor	ebx,ecx
+	psrld	xmm9,30
+	add	ebp,eax
+	ror	eax,7
+	por	xmm6,xmm10
+	xor	edi,ecx
+	mov	esi,ebp
+	add	edx,DWORD[44+rsp]
+	pslld	xmm8,2
+	pxor	xmm6,xmm9
+	xor	eax,ebx
+	movdqa	xmm9,XMMWORD[((-32))+r11]
+	rol	ebp,5
+	add	edx,edi
+	and	esi,eax
+	pxor	xmm6,xmm8
+	xor	eax,ebx
+	add	edx,ebp
+	ror	ebp,7
+	pshufd	xmm7,xmm3,238
+	xor	esi,ebx
+	movdqa	xmm8,xmm6
+	paddd	xmm9,xmm6
+	mov	edi,edx
+	add	ecx,DWORD[48+rsp]
+	punpcklqdq	xmm7,xmm4
+	xor	ebp,eax
+	rol	edx,5
+	add	ecx,esi
+	psrldq	xmm8,4
+	and	edi,ebp
+	xor	ebp,eax
+	pxor	xmm7,xmm3
+	add	ecx,edx
+	ror	edx,7
+	pxor	xmm8,xmm5
+	xor	edi,eax
+	mov	esi,ecx
+	add	ebx,DWORD[52+rsp]
+	pxor	xmm7,xmm8
+	xor	edx,ebp
+	rol	ecx,5
+	movdqa	XMMWORD[32+rsp],xmm9
+	add	ebx,edi
+	and	esi,edx
+	movdqa	xmm10,xmm7
+	xor	edx,ebp
+	add	ebx,ecx
+	ror	ecx,7
+	movdqa	xmm8,xmm7
+	xor	esi,ebp
+	pslldq	xmm10,12
+	paddd	xmm7,xmm7
+	mov	edi,ebx
+	add	eax,DWORD[56+rsp]
+	psrld	xmm8,31
+	xor	ecx,edx
+	rol	ebx,5
+	add	eax,esi
+	movdqa	xmm9,xmm10
+	and	edi,ecx
+	xor	ecx,edx
+	psrld	xmm10,30
+	add	eax,ebx
+	ror	ebx,7
+	por	xmm7,xmm8
+	xor	edi,edx
+	mov	esi,eax
+	add	ebp,DWORD[60+rsp]
+	pslld	xmm9,2
+	pxor	xmm7,xmm10
+	xor	ebx,ecx
+	movdqa	xmm10,XMMWORD[((-32))+r11]
+	rol	eax,5
+	add	ebp,edi
+	and	esi,ebx
+	pxor	xmm7,xmm9
+	pshufd	xmm9,xmm6,238
+	xor	ebx,ecx
+	add	ebp,eax
+	ror	eax,7
+	pxor	xmm0,xmm4
+	xor	esi,ecx
+	mov	edi,ebp
+	add	edx,DWORD[rsp]
+	punpcklqdq	xmm9,xmm7
+	xor	eax,ebx
+	rol	ebp,5
+	pxor	xmm0,xmm1
+	add	edx,esi
+	and	edi,eax
+	movdqa	xmm8,xmm10
+	xor	eax,ebx
+	paddd	xmm10,xmm7
+	add	edx,ebp
+	pxor	xmm0,xmm9
+	ror	ebp,7
+	xor	edi,ebx
+	mov	esi,edx
+	add	ecx,DWORD[4+rsp]
+	movdqa	xmm9,xmm0
+	xor	ebp,eax
+	rol	edx,5
+	movdqa	XMMWORD[48+rsp],xmm10
+	add	ecx,edi
+	and	esi,ebp
+	xor	ebp,eax
+	pslld	xmm0,2
+	add	ecx,edx
+	ror	edx,7
+	psrld	xmm9,30
+	xor	esi,eax
+	mov	edi,ecx
+	add	ebx,DWORD[8+rsp]
+	por	xmm0,xmm9
+	xor	edx,ebp
+	rol	ecx,5
+	pshufd	xmm10,xmm7,238
+	add	ebx,esi
+	and	edi,edx
+	xor	edx,ebp
+	add	ebx,ecx
+	add	eax,DWORD[12+rsp]
+	xor	edi,ebp
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,edx
+	ror	ecx,7
+	add	eax,ebx
+	pxor	xmm1,xmm5
+	add	ebp,DWORD[16+rsp]
+	xor	esi,ecx
+	punpcklqdq	xmm10,xmm0
+	mov	edi,eax
+	rol	eax,5
+	pxor	xmm1,xmm2
+	add	ebp,esi
+	xor	edi,ecx
+	movdqa	xmm9,xmm8
+	ror	ebx,7
+	paddd	xmm8,xmm0
+	add	ebp,eax
+	pxor	xmm1,xmm10
+	add	edx,DWORD[20+rsp]
+	xor	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	movdqa	xmm10,xmm1
+	add	edx,edi
+	xor	esi,ebx
+	movdqa	XMMWORD[rsp],xmm8
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[24+rsp]
+	pslld	xmm1,2
+	xor	esi,eax
+	mov	edi,edx
+	psrld	xmm10,30
+	rol	edx,5
+	add	ecx,esi
+	xor	edi,eax
+	ror	ebp,7
+	por	xmm1,xmm10
+	add	ecx,edx
+	add	ebx,DWORD[28+rsp]
+	pshufd	xmm8,xmm0,238
+	xor	edi,ebp
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	pxor	xmm2,xmm6
+	add	eax,DWORD[32+rsp]
+	xor	esi,edx
+	punpcklqdq	xmm8,xmm1
+	mov	edi,ebx
+	rol	ebx,5
+	pxor	xmm2,xmm3
+	add	eax,esi
+	xor	edi,edx
+	movdqa	xmm10,XMMWORD[r11]
+	ror	ecx,7
+	paddd	xmm9,xmm1
+	add	eax,ebx
+	pxor	xmm2,xmm8
+	add	ebp,DWORD[36+rsp]
+	xor	edi,ecx
+	mov	esi,eax
+	rol	eax,5
+	movdqa	xmm8,xmm2
+	add	ebp,edi
+	xor	esi,ecx
+	movdqa	XMMWORD[16+rsp],xmm9
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[40+rsp]
+	pslld	xmm2,2
+	xor	esi,ebx
+	mov	edi,ebp
+	psrld	xmm8,30
+	rol	ebp,5
+	add	edx,esi
+	xor	edi,ebx
+	ror	eax,7
+	por	xmm2,xmm8
+	add	edx,ebp
+	add	ecx,DWORD[44+rsp]
+	pshufd	xmm9,xmm1,238
+	xor	edi,eax
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,eax
+	ror	ebp,7
+	add	ecx,edx
+	pxor	xmm3,xmm7
+	add	ebx,DWORD[48+rsp]
+	xor	esi,ebp
+	punpcklqdq	xmm9,xmm2
+	mov	edi,ecx
+	rol	ecx,5
+	pxor	xmm3,xmm4
+	add	ebx,esi
+	xor	edi,ebp
+	movdqa	xmm8,xmm10
+	ror	edx,7
+	paddd	xmm10,xmm2
+	add	ebx,ecx
+	pxor	xmm3,xmm9
+	add	eax,DWORD[52+rsp]
+	xor	edi,edx
+	mov	esi,ebx
+	rol	ebx,5
+	movdqa	xmm9,xmm3
+	add	eax,edi
+	xor	esi,edx
+	movdqa	XMMWORD[32+rsp],xmm10
+	ror	ecx,7
+	add	eax,ebx
+	add	ebp,DWORD[56+rsp]
+	pslld	xmm3,2
+	xor	esi,ecx
+	mov	edi,eax
+	psrld	xmm9,30
+	rol	eax,5
+	add	ebp,esi
+	xor	edi,ecx
+	ror	ebx,7
+	por	xmm3,xmm9
+	add	ebp,eax
+	add	edx,DWORD[60+rsp]
+	pshufd	xmm10,xmm2,238
+	xor	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	add	edx,edi
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,ebp
+	pxor	xmm4,xmm0
+	add	ecx,DWORD[rsp]
+	xor	esi,eax
+	punpcklqdq	xmm10,xmm3
+	mov	edi,edx
+	rol	edx,5
+	pxor	xmm4,xmm5
+	add	ecx,esi
+	xor	edi,eax
+	movdqa	xmm9,xmm8
+	ror	ebp,7
+	paddd	xmm8,xmm3
+	add	ecx,edx
+	pxor	xmm4,xmm10
+	add	ebx,DWORD[4+rsp]
+	xor	edi,ebp
+	mov	esi,ecx
+	rol	ecx,5
+	movdqa	xmm10,xmm4
+	add	ebx,edi
+	xor	esi,ebp
+	movdqa	XMMWORD[48+rsp],xmm8
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[8+rsp]
+	pslld	xmm4,2
+	xor	esi,edx
+	mov	edi,ebx
+	psrld	xmm10,30
+	rol	ebx,5
+	add	eax,esi
+	xor	edi,edx
+	ror	ecx,7
+	por	xmm4,xmm10
+	add	eax,ebx
+	add	ebp,DWORD[12+rsp]
+	pshufd	xmm8,xmm3,238
+	xor	edi,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	pxor	xmm5,xmm1
+	add	edx,DWORD[16+rsp]
+	xor	esi,ebx
+	punpcklqdq	xmm8,xmm4
+	mov	edi,ebp
+	rol	ebp,5
+	pxor	xmm5,xmm6
+	add	edx,esi
+	xor	edi,ebx
+	movdqa	xmm10,xmm9
+	ror	eax,7
+	paddd	xmm9,xmm4
+	add	edx,ebp
+	pxor	xmm5,xmm8
+	add	ecx,DWORD[20+rsp]
+	xor	edi,eax
+	mov	esi,edx
+	rol	edx,5
+	movdqa	xmm8,xmm5
+	add	ecx,edi
+	xor	esi,eax
+	movdqa	XMMWORD[rsp],xmm9
+	ror	ebp,7
+	add	ecx,edx
+	add	ebx,DWORD[24+rsp]
+	pslld	xmm5,2
+	xor	esi,ebp
+	mov	edi,ecx
+	psrld	xmm8,30
+	rol	ecx,5
+	add	ebx,esi
+	xor	edi,ebp
+	ror	edx,7
+	por	xmm5,xmm8
+	add	ebx,ecx
+	add	eax,DWORD[28+rsp]
+	pshufd	xmm9,xmm4,238
+	ror	ecx,7
+	mov	esi,ebx
+	xor	edi,edx
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,ecx
+	xor	ecx,edx
+	add	eax,ebx
+	pxor	xmm6,xmm2
+	add	ebp,DWORD[32+rsp]
+	and	esi,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	punpcklqdq	xmm9,xmm5
+	mov	edi,eax
+	xor	esi,ecx
+	pxor	xmm6,xmm7
+	rol	eax,5
+	add	ebp,esi
+	movdqa	xmm8,xmm10
+	xor	edi,ebx
+	paddd	xmm10,xmm5
+	xor	ebx,ecx
+	pxor	xmm6,xmm9
+	add	ebp,eax
+	add	edx,DWORD[36+rsp]
+	and	edi,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	movdqa	xmm9,xmm6
+	mov	esi,ebp
+	xor	edi,ebx
+	movdqa	XMMWORD[16+rsp],xmm10
+	rol	ebp,5
+	add	edx,edi
+	xor	esi,eax
+	pslld	xmm6,2
+	xor	eax,ebx
+	add	edx,ebp
+	psrld	xmm9,30
+	add	ecx,DWORD[40+rsp]
+	and	esi,eax
+	xor	eax,ebx
+	por	xmm6,xmm9
+	ror	ebp,7
+	mov	edi,edx
+	xor	esi,eax
+	rol	edx,5
+	pshufd	xmm10,xmm5,238
+	add	ecx,esi
+	xor	edi,ebp
+	xor	ebp,eax
+	add	ecx,edx
+	add	ebx,DWORD[44+rsp]
+	and	edi,ebp
+	xor	ebp,eax
+	ror	edx,7
+	mov	esi,ecx
+	xor	edi,ebp
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,edx
+	xor	edx,ebp
+	add	ebx,ecx
+	pxor	xmm7,xmm3
+	add	eax,DWORD[48+rsp]
+	and	esi,edx
+	xor	edx,ebp
+	ror	ecx,7
+	punpcklqdq	xmm10,xmm6
+	mov	edi,ebx
+	xor	esi,edx
+	pxor	xmm7,xmm0
+	rol	ebx,5
+	add	eax,esi
+	movdqa	xmm9,XMMWORD[32+r11]
+	xor	edi,ecx
+	paddd	xmm8,xmm6
+	xor	ecx,edx
+	pxor	xmm7,xmm10
+	add	eax,ebx
+	add	ebp,DWORD[52+rsp]
+	and	edi,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	movdqa	xmm10,xmm7
+	mov	esi,eax
+	xor	edi,ecx
+	movdqa	XMMWORD[32+rsp],xmm8
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ebx
+	pslld	xmm7,2
+	xor	ebx,ecx
+	add	ebp,eax
+	psrld	xmm10,30
+	add	edx,DWORD[56+rsp]
+	and	esi,ebx
+	xor	ebx,ecx
+	por	xmm7,xmm10
+	ror	eax,7
+	mov	edi,ebp
+	xor	esi,ebx
+	rol	ebp,5
+	pshufd	xmm8,xmm6,238
+	add	edx,esi
+	xor	edi,eax
+	xor	eax,ebx
+	add	edx,ebp
+	add	ecx,DWORD[60+rsp]
+	and	edi,eax
+	xor	eax,ebx
+	ror	ebp,7
+	mov	esi,edx
+	xor	edi,eax
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,ebp
+	xor	ebp,eax
+	add	ecx,edx
+	pxor	xmm0,xmm4
+	add	ebx,DWORD[rsp]
+	and	esi,ebp
+	xor	ebp,eax
+	ror	edx,7
+	punpcklqdq	xmm8,xmm7
+	mov	edi,ecx
+	xor	esi,ebp
+	pxor	xmm0,xmm1
+	rol	ecx,5
+	add	ebx,esi
+	movdqa	xmm10,xmm9
+	xor	edi,edx
+	paddd	xmm9,xmm7
+	xor	edx,ebp
+	pxor	xmm0,xmm8
+	add	ebx,ecx
+	add	eax,DWORD[4+rsp]
+	and	edi,edx
+	xor	edx,ebp
+	ror	ecx,7
+	movdqa	xmm8,xmm0
+	mov	esi,ebx
+	xor	edi,edx
+	movdqa	XMMWORD[48+rsp],xmm9
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,ecx
+	pslld	xmm0,2
+	xor	ecx,edx
+	add	eax,ebx
+	psrld	xmm8,30
+	add	ebp,DWORD[8+rsp]
+	and	esi,ecx
+	xor	ecx,edx
+	por	xmm0,xmm8
+	ror	ebx,7
+	mov	edi,eax
+	xor	esi,ecx
+	rol	eax,5
+	pshufd	xmm9,xmm7,238
+	add	ebp,esi
+	xor	edi,ebx
+	xor	ebx,ecx
+	add	ebp,eax
+	add	edx,DWORD[12+rsp]
+	and	edi,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	mov	esi,ebp
+	xor	edi,ebx
+	rol	ebp,5
+	add	edx,edi
+	xor	esi,eax
+	xor	eax,ebx
+	add	edx,ebp
+	pxor	xmm1,xmm5
+	add	ecx,DWORD[16+rsp]
+	and	esi,eax
+	xor	eax,ebx
+	ror	ebp,7
+	punpcklqdq	xmm9,xmm0
+	mov	edi,edx
+	xor	esi,eax
+	pxor	xmm1,xmm2
+	rol	edx,5
+	add	ecx,esi
+	movdqa	xmm8,xmm10
+	xor	edi,ebp
+	paddd	xmm10,xmm0
+	xor	ebp,eax
+	pxor	xmm1,xmm9
+	add	ecx,edx
+	add	ebx,DWORD[20+rsp]
+	and	edi,ebp
+	xor	ebp,eax
+	ror	edx,7
+	movdqa	xmm9,xmm1
+	mov	esi,ecx
+	xor	edi,ebp
+	movdqa	XMMWORD[rsp],xmm10
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,edx
+	pslld	xmm1,2
+	xor	edx,ebp
+	add	ebx,ecx
+	psrld	xmm9,30
+	add	eax,DWORD[24+rsp]
+	and	esi,edx
+	xor	edx,ebp
+	por	xmm1,xmm9
+	ror	ecx,7
+	mov	edi,ebx
+	xor	esi,edx
+	rol	ebx,5
+	pshufd	xmm10,xmm0,238
+	add	eax,esi
+	xor	edi,ecx
+	xor	ecx,edx
+	add	eax,ebx
+	add	ebp,DWORD[28+rsp]
+	and	edi,ecx
+	xor	ecx,edx
+	ror	ebx,7
+	mov	esi,eax
+	xor	edi,ecx
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ebx
+	xor	ebx,ecx
+	add	ebp,eax
+	pxor	xmm2,xmm6
+	add	edx,DWORD[32+rsp]
+	and	esi,ebx
+	xor	ebx,ecx
+	ror	eax,7
+	punpcklqdq	xmm10,xmm1
+	mov	edi,ebp
+	xor	esi,ebx
+	pxor	xmm2,xmm3
+	rol	ebp,5
+	add	edx,esi
+	movdqa	xmm9,xmm8
+	xor	edi,eax
+	paddd	xmm8,xmm1
+	xor	eax,ebx
+	pxor	xmm2,xmm10
+	add	edx,ebp
+	add	ecx,DWORD[36+rsp]
+	and	edi,eax
+	xor	eax,ebx
+	ror	ebp,7
+	movdqa	xmm10,xmm2
+	mov	esi,edx
+	xor	edi,eax
+	movdqa	XMMWORD[16+rsp],xmm8
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,ebp
+	pslld	xmm2,2
+	xor	ebp,eax
+	add	ecx,edx
+	psrld	xmm10,30
+	add	ebx,DWORD[40+rsp]
+	and	esi,ebp
+	xor	ebp,eax
+	por	xmm2,xmm10
+	ror	edx,7
+	mov	edi,ecx
+	xor	esi,ebp
+	rol	ecx,5
+	pshufd	xmm8,xmm1,238
+	add	ebx,esi
+	xor	edi,edx
+	xor	edx,ebp
+	add	ebx,ecx
+	add	eax,DWORD[44+rsp]
+	and	edi,edx
+	xor	edx,ebp
+	ror	ecx,7
+	mov	esi,ebx
+	xor	edi,edx
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,edx
+	add	eax,ebx
+	pxor	xmm3,xmm7
+	add	ebp,DWORD[48+rsp]
+	xor	esi,ecx
+	punpcklqdq	xmm8,xmm2
+	mov	edi,eax
+	rol	eax,5
+	pxor	xmm3,xmm4
+	add	ebp,esi
+	xor	edi,ecx
+	movdqa	xmm10,xmm9
+	ror	ebx,7
+	paddd	xmm9,xmm2
+	add	ebp,eax
+	pxor	xmm3,xmm8
+	add	edx,DWORD[52+rsp]
+	xor	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	movdqa	xmm8,xmm3
+	add	edx,edi
+	xor	esi,ebx
+	movdqa	XMMWORD[32+rsp],xmm9
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[56+rsp]
+	pslld	xmm3,2
+	xor	esi,eax
+	mov	edi,edx
+	psrld	xmm8,30
+	rol	edx,5
+	add	ecx,esi
+	xor	edi,eax
+	ror	ebp,7
+	por	xmm3,xmm8
+	add	ecx,edx
+	add	ebx,DWORD[60+rsp]
+	xor	edi,ebp
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[rsp]
+	xor	esi,edx
+	mov	edi,ebx
+	rol	ebx,5
+	paddd	xmm10,xmm3
+	add	eax,esi
+	xor	edi,edx
+	movdqa	XMMWORD[48+rsp],xmm10
+	ror	ecx,7
+	add	eax,ebx
+	add	ebp,DWORD[4+rsp]
+	xor	edi,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[8+rsp]
+	xor	esi,ebx
+	mov	edi,ebp
+	rol	ebp,5
+	add	edx,esi
+	xor	edi,ebx
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[12+rsp]
+	xor	edi,eax
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,eax
+	ror	ebp,7
+	add	ecx,edx
+	cmp	r9,r10
+	je	NEAR $L$done_ssse3
+	movdqa	xmm6,XMMWORD[64+r11]
+	movdqa	xmm9,XMMWORD[((-64))+r11]
+	movdqu	xmm0,XMMWORD[r9]
+	movdqu	xmm1,XMMWORD[16+r9]
+	movdqu	xmm2,XMMWORD[32+r9]
+	movdqu	xmm3,XMMWORD[48+r9]
+DB	102,15,56,0,198
+	add	r9,64
+	add	ebx,DWORD[16+rsp]
+	xor	esi,ebp
+	mov	edi,ecx
+DB	102,15,56,0,206
+	rol	ecx,5
+	add	ebx,esi
+	xor	edi,ebp
+	ror	edx,7
+	paddd	xmm0,xmm9
+	add	ebx,ecx
+	add	eax,DWORD[20+rsp]
+	xor	edi,edx
+	mov	esi,ebx
+	movdqa	XMMWORD[rsp],xmm0
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,edx
+	ror	ecx,7
+	psubd	xmm0,xmm9
+	add	eax,ebx
+	add	ebp,DWORD[24+rsp]
+	xor	esi,ecx
+	mov	edi,eax
+	rol	eax,5
+	add	ebp,esi
+	xor	edi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[28+rsp]
+	xor	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	add	edx,edi
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[32+rsp]
+	xor	esi,eax
+	mov	edi,edx
+DB	102,15,56,0,214
+	rol	edx,5
+	add	ecx,esi
+	xor	edi,eax
+	ror	ebp,7
+	paddd	xmm1,xmm9
+	add	ecx,edx
+	add	ebx,DWORD[36+rsp]
+	xor	edi,ebp
+	mov	esi,ecx
+	movdqa	XMMWORD[16+rsp],xmm1
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,ebp
+	ror	edx,7
+	psubd	xmm1,xmm9
+	add	ebx,ecx
+	add	eax,DWORD[40+rsp]
+	xor	esi,edx
+	mov	edi,ebx
+	rol	ebx,5
+	add	eax,esi
+	xor	edi,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	ebp,DWORD[44+rsp]
+	xor	edi,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[48+rsp]
+	xor	esi,ebx
+	mov	edi,ebp
+DB	102,15,56,0,222
+	rol	ebp,5
+	add	edx,esi
+	xor	edi,ebx
+	ror	eax,7
+	paddd	xmm2,xmm9
+	add	edx,ebp
+	add	ecx,DWORD[52+rsp]
+	xor	edi,eax
+	mov	esi,edx
+	movdqa	XMMWORD[32+rsp],xmm2
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,eax
+	ror	ebp,7
+	psubd	xmm2,xmm9
+	add	ecx,edx
+	add	ebx,DWORD[56+rsp]
+	xor	esi,ebp
+	mov	edi,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	edi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[60+rsp]
+	xor	edi,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,edi
+	ror	ecx,7
+	add	eax,ebx
+	add	eax,DWORD[r8]
+	add	esi,DWORD[4+r8]
+	add	ecx,DWORD[8+r8]
+	add	edx,DWORD[12+r8]
+	mov	DWORD[r8],eax
+	add	ebp,DWORD[16+r8]
+	mov	DWORD[4+r8],esi
+	mov	ebx,esi
+	mov	DWORD[8+r8],ecx
+	mov	edi,ecx
+	mov	DWORD[12+r8],edx
+	xor	edi,edx
+	mov	DWORD[16+r8],ebp
+	and	esi,edi
+	jmp	NEAR $L$oop_ssse3
+
+ALIGN	16
+$L$done_ssse3:
+	add	ebx,DWORD[16+rsp]
+	xor	esi,ebp
+	mov	edi,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	edi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[20+rsp]
+	xor	edi,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,edi
+	xor	esi,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	ebp,DWORD[24+rsp]
+	xor	esi,ecx
+	mov	edi,eax
+	rol	eax,5
+	add	ebp,esi
+	xor	edi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[28+rsp]
+	xor	edi,ebx
+	mov	esi,ebp
+	rol	ebp,5
+	add	edx,edi
+	xor	esi,ebx
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[32+rsp]
+	xor	esi,eax
+	mov	edi,edx
+	rol	edx,5
+	add	ecx,esi
+	xor	edi,eax
+	ror	ebp,7
+	add	ecx,edx
+	add	ebx,DWORD[36+rsp]
+	xor	edi,ebp
+	mov	esi,ecx
+	rol	ecx,5
+	add	ebx,edi
+	xor	esi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[40+rsp]
+	xor	esi,edx
+	mov	edi,ebx
+	rol	ebx,5
+	add	eax,esi
+	xor	edi,edx
+	ror	ecx,7
+	add	eax,ebx
+	add	ebp,DWORD[44+rsp]
+	xor	edi,ecx
+	mov	esi,eax
+	rol	eax,5
+	add	ebp,edi
+	xor	esi,ecx
+	ror	ebx,7
+	add	ebp,eax
+	add	edx,DWORD[48+rsp]
+	xor	esi,ebx
+	mov	edi,ebp
+	rol	ebp,5
+	add	edx,esi
+	xor	edi,ebx
+	ror	eax,7
+	add	edx,ebp
+	add	ecx,DWORD[52+rsp]
+	xor	edi,eax
+	mov	esi,edx
+	rol	edx,5
+	add	ecx,edi
+	xor	esi,eax
+	ror	ebp,7
+	add	ecx,edx
+	add	ebx,DWORD[56+rsp]
+	xor	esi,ebp
+	mov	edi,ecx
+	rol	ecx,5
+	add	ebx,esi
+	xor	edi,ebp
+	ror	edx,7
+	add	ebx,ecx
+	add	eax,DWORD[60+rsp]
+	xor	edi,edx
+	mov	esi,ebx
+	rol	ebx,5
+	add	eax,edi
+	ror	ecx,7
+	add	eax,ebx
+	add	eax,DWORD[r8]
+	add	esi,DWORD[4+r8]
+	add	ecx,DWORD[8+r8]
+	mov	DWORD[r8],eax
+	add	edx,DWORD[12+r8]
+	mov	DWORD[4+r8],esi
+	add	ebp,DWORD[16+r8]
+	mov	DWORD[8+r8],ecx
+	mov	DWORD[12+r8],edx
+	mov	DWORD[16+r8],ebp
+	movaps	xmm6,XMMWORD[((-40-96))+r14]
+	movaps	xmm7,XMMWORD[((-40-80))+r14]
+	movaps	xmm8,XMMWORD[((-40-64))+r14]
+	movaps	xmm9,XMMWORD[((-40-48))+r14]
+	movaps	xmm10,XMMWORD[((-40-32))+r14]
+	movaps	xmm11,XMMWORD[((-40-16))+r14]
+	lea	rsi,[r14]
+	mov	r14,QWORD[((-40))+rsi]
+	mov	r13,QWORD[((-32))+rsi]
+	mov	r12,QWORD[((-24))+rsi]
+	mov	rbp,QWORD[((-16))+rsi]
+	mov	rbx,QWORD[((-8))+rsi]
+	lea	rsp,[rsi]
+$L$epilogue_ssse3:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_sha1_block_data_order_ssse3:
+ALIGN	64
+K_XX_XX:
+	DD	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+	DD	0x5a827999,0x5a827999,0x5a827999,0x5a827999
+	DD	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+	DD	0x6ed9eba1,0x6ed9eba1,0x6ed9eba1,0x6ed9eba1
+	DD	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+	DD	0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc,0x8f1bbcdc
+	DD	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+	DD	0xca62c1d6,0xca62c1d6,0xca62c1d6,0xca62c1d6
+	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+DB	0xf,0xe,0xd,0xc,0xb,0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0x0
+DB	83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115
+DB	102,111,114,109,32,102,111,114,32,120,56,54,95,54,52,44
+DB	32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60
+DB	97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114
+DB	103,62,0
+ALIGN	64
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	lea	r10,[$L$prologue]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[64+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+
+	jmp	NEAR $L$common_seh_tail
+
+
+ALIGN	16
+ssse3_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$common_seh_tail
+
+	mov	rax,QWORD[232+r8]
+
+	lea	rsi,[((-40-96))+rax]
+	lea	rdi,[512+r8]
+	mov	ecx,12
+	DD	0xa548f3fc
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+
+$L$common_seh_tail:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_sha1_block_data_order wrt ..imagebase
+	DD	$L$SEH_end_sha1_block_data_order wrt ..imagebase
+	DD	$L$SEH_info_sha1_block_data_order wrt ..imagebase
+	DD	$L$SEH_begin_sha1_block_data_order_ssse3 wrt ..imagebase
+	DD	$L$SEH_end_sha1_block_data_order_ssse3 wrt ..imagebase
+	DD	$L$SEH_info_sha1_block_data_order_ssse3 wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_sha1_block_data_order:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+$L$SEH_info_sha1_block_data_order_ssse3:
+DB	9,0,0,0
+	DD	ssse3_handler wrt ..imagebase
+	DD	$L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm
new file mode 100644
index 0000000..e6193c5
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/sha/sha256-x86_64.asm
@@ -0,0 +1,2994 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	OPENSSL_ia32cap_P
+global	sha256_block_data_order
+
+ALIGN	16
+sha256_block_data_order:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_sha256_block_data_order:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	lea	r11,[OPENSSL_ia32cap_P]
+	mov	r9d,DWORD[r11]
+	mov	r10d,DWORD[4+r11]
+	mov	r11d,DWORD[8+r11]
+	test	r10d,512
+	jnz	NEAR $L$ssse3_shortcut
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	mov	r11,rsp
+	shl	rdx,4
+	sub	rsp,16*4+4*8
+	lea	rdx,[rdx*4+rsi]
+	and	rsp,-64
+	mov	QWORD[((64+0))+rsp],rdi
+	mov	QWORD[((64+8))+rsp],rsi
+	mov	QWORD[((64+16))+rsp],rdx
+	mov	QWORD[((64+24))+rsp],r11
+$L$prologue:
+
+	mov	eax,DWORD[rdi]
+	mov	ebx,DWORD[4+rdi]
+	mov	ecx,DWORD[8+rdi]
+	mov	edx,DWORD[12+rdi]
+	mov	r8d,DWORD[16+rdi]
+	mov	r9d,DWORD[20+rdi]
+	mov	r10d,DWORD[24+rdi]
+	mov	r11d,DWORD[28+rdi]
+	jmp	NEAR $L$loop
+
+ALIGN	16
+$L$loop:
+	mov	edi,ebx
+	lea	rbp,[K256]
+	xor	edi,ecx
+	mov	r12d,DWORD[rsi]
+	mov	r13d,r8d
+	mov	r14d,eax
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,r9d
+
+	xor	r13d,r8d
+	ror	r14d,9
+	xor	r15d,r10d
+
+	mov	DWORD[rsp],r12d
+	xor	r14d,eax
+	and	r15d,r8d
+
+	ror	r13d,5
+	add	r12d,r11d
+	xor	r15d,r10d
+
+	ror	r14d,11
+	xor	r13d,r8d
+	add	r12d,r15d
+
+	mov	r15d,eax
+	add	r12d,DWORD[rbp]
+	xor	r14d,eax
+
+	xor	r15d,ebx
+	ror	r13d,6
+	mov	r11d,ebx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r11d,edi
+	add	edx,r12d
+	add	r11d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r11d,r14d
+	mov	r12d,DWORD[4+rsi]
+	mov	r13d,edx
+	mov	r14d,r11d
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,r8d
+
+	xor	r13d,edx
+	ror	r14d,9
+	xor	edi,r9d
+
+	mov	DWORD[4+rsp],r12d
+	xor	r14d,r11d
+	and	edi,edx
+
+	ror	r13d,5
+	add	r12d,r10d
+	xor	edi,r9d
+
+	ror	r14d,11
+	xor	r13d,edx
+	add	r12d,edi
+
+	mov	edi,r11d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r11d
+
+	xor	edi,eax
+	ror	r13d,6
+	mov	r10d,eax
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r10d,r15d
+	add	ecx,r12d
+	add	r10d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r10d,r14d
+	mov	r12d,DWORD[8+rsi]
+	mov	r13d,ecx
+	mov	r14d,r10d
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,edx
+
+	xor	r13d,ecx
+	ror	r14d,9
+	xor	r15d,r8d
+
+	mov	DWORD[8+rsp],r12d
+	xor	r14d,r10d
+	and	r15d,ecx
+
+	ror	r13d,5
+	add	r12d,r9d
+	xor	r15d,r8d
+
+	ror	r14d,11
+	xor	r13d,ecx
+	add	r12d,r15d
+
+	mov	r15d,r10d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r10d
+
+	xor	r15d,r11d
+	ror	r13d,6
+	mov	r9d,r11d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r9d,edi
+	add	ebx,r12d
+	add	r9d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r9d,r14d
+	mov	r12d,DWORD[12+rsi]
+	mov	r13d,ebx
+	mov	r14d,r9d
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,ecx
+
+	xor	r13d,ebx
+	ror	r14d,9
+	xor	edi,edx
+
+	mov	DWORD[12+rsp],r12d
+	xor	r14d,r9d
+	and	edi,ebx
+
+	ror	r13d,5
+	add	r12d,r8d
+	xor	edi,edx
+
+	ror	r14d,11
+	xor	r13d,ebx
+	add	r12d,edi
+
+	mov	edi,r9d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r9d
+
+	xor	edi,r10d
+	ror	r13d,6
+	mov	r8d,r10d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r8d,r15d
+	add	eax,r12d
+	add	r8d,r12d
+
+	lea	rbp,[20+rbp]
+	add	r8d,r14d
+	mov	r12d,DWORD[16+rsi]
+	mov	r13d,eax
+	mov	r14d,r8d
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,ebx
+
+	xor	r13d,eax
+	ror	r14d,9
+	xor	r15d,ecx
+
+	mov	DWORD[16+rsp],r12d
+	xor	r14d,r8d
+	and	r15d,eax
+
+	ror	r13d,5
+	add	r12d,edx
+	xor	r15d,ecx
+
+	ror	r14d,11
+	xor	r13d,eax
+	add	r12d,r15d
+
+	mov	r15d,r8d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r8d
+
+	xor	r15d,r9d
+	ror	r13d,6
+	mov	edx,r9d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	edx,edi
+	add	r11d,r12d
+	add	edx,r12d
+
+	lea	rbp,[4+rbp]
+	add	edx,r14d
+	mov	r12d,DWORD[20+rsi]
+	mov	r13d,r11d
+	mov	r14d,edx
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,eax
+
+	xor	r13d,r11d
+	ror	r14d,9
+	xor	edi,ebx
+
+	mov	DWORD[20+rsp],r12d
+	xor	r14d,edx
+	and	edi,r11d
+
+	ror	r13d,5
+	add	r12d,ecx
+	xor	edi,ebx
+
+	ror	r14d,11
+	xor	r13d,r11d
+	add	r12d,edi
+
+	mov	edi,edx
+	add	r12d,DWORD[rbp]
+	xor	r14d,edx
+
+	xor	edi,r8d
+	ror	r13d,6
+	mov	ecx,r8d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ecx,r15d
+	add	r10d,r12d
+	add	ecx,r12d
+
+	lea	rbp,[4+rbp]
+	add	ecx,r14d
+	mov	r12d,DWORD[24+rsi]
+	mov	r13d,r10d
+	mov	r14d,ecx
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,r11d
+
+	xor	r13d,r10d
+	ror	r14d,9
+	xor	r15d,eax
+
+	mov	DWORD[24+rsp],r12d
+	xor	r14d,ecx
+	and	r15d,r10d
+
+	ror	r13d,5
+	add	r12d,ebx
+	xor	r15d,eax
+
+	ror	r14d,11
+	xor	r13d,r10d
+	add	r12d,r15d
+
+	mov	r15d,ecx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ecx
+
+	xor	r15d,edx
+	ror	r13d,6
+	mov	ebx,edx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ebx,edi
+	add	r9d,r12d
+	add	ebx,r12d
+
+	lea	rbp,[4+rbp]
+	add	ebx,r14d
+	mov	r12d,DWORD[28+rsi]
+	mov	r13d,r9d
+	mov	r14d,ebx
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,r10d
+
+	xor	r13d,r9d
+	ror	r14d,9
+	xor	edi,r11d
+
+	mov	DWORD[28+rsp],r12d
+	xor	r14d,ebx
+	and	edi,r9d
+
+	ror	r13d,5
+	add	r12d,eax
+	xor	edi,r11d
+
+	ror	r14d,11
+	xor	r13d,r9d
+	add	r12d,edi
+
+	mov	edi,ebx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ebx
+
+	xor	edi,ecx
+	ror	r13d,6
+	mov	eax,ecx
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	eax,r15d
+	add	r8d,r12d
+	add	eax,r12d
+
+	lea	rbp,[20+rbp]
+	add	eax,r14d
+	mov	r12d,DWORD[32+rsi]
+	mov	r13d,r8d
+	mov	r14d,eax
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,r9d
+
+	xor	r13d,r8d
+	ror	r14d,9
+	xor	r15d,r10d
+
+	mov	DWORD[32+rsp],r12d
+	xor	r14d,eax
+	and	r15d,r8d
+
+	ror	r13d,5
+	add	r12d,r11d
+	xor	r15d,r10d
+
+	ror	r14d,11
+	xor	r13d,r8d
+	add	r12d,r15d
+
+	mov	r15d,eax
+	add	r12d,DWORD[rbp]
+	xor	r14d,eax
+
+	xor	r15d,ebx
+	ror	r13d,6
+	mov	r11d,ebx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r11d,edi
+	add	edx,r12d
+	add	r11d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r11d,r14d
+	mov	r12d,DWORD[36+rsi]
+	mov	r13d,edx
+	mov	r14d,r11d
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,r8d
+
+	xor	r13d,edx
+	ror	r14d,9
+	xor	edi,r9d
+
+	mov	DWORD[36+rsp],r12d
+	xor	r14d,r11d
+	and	edi,edx
+
+	ror	r13d,5
+	add	r12d,r10d
+	xor	edi,r9d
+
+	ror	r14d,11
+	xor	r13d,edx
+	add	r12d,edi
+
+	mov	edi,r11d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r11d
+
+	xor	edi,eax
+	ror	r13d,6
+	mov	r10d,eax
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r10d,r15d
+	add	ecx,r12d
+	add	r10d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r10d,r14d
+	mov	r12d,DWORD[40+rsi]
+	mov	r13d,ecx
+	mov	r14d,r10d
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,edx
+
+	xor	r13d,ecx
+	ror	r14d,9
+	xor	r15d,r8d
+
+	mov	DWORD[40+rsp],r12d
+	xor	r14d,r10d
+	and	r15d,ecx
+
+	ror	r13d,5
+	add	r12d,r9d
+	xor	r15d,r8d
+
+	ror	r14d,11
+	xor	r13d,ecx
+	add	r12d,r15d
+
+	mov	r15d,r10d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r10d
+
+	xor	r15d,r11d
+	ror	r13d,6
+	mov	r9d,r11d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r9d,edi
+	add	ebx,r12d
+	add	r9d,r12d
+
+	lea	rbp,[4+rbp]
+	add	r9d,r14d
+	mov	r12d,DWORD[44+rsi]
+	mov	r13d,ebx
+	mov	r14d,r9d
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,ecx
+
+	xor	r13d,ebx
+	ror	r14d,9
+	xor	edi,edx
+
+	mov	DWORD[44+rsp],r12d
+	xor	r14d,r9d
+	and	edi,ebx
+
+	ror	r13d,5
+	add	r12d,r8d
+	xor	edi,edx
+
+	ror	r14d,11
+	xor	r13d,ebx
+	add	r12d,edi
+
+	mov	edi,r9d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r9d
+
+	xor	edi,r10d
+	ror	r13d,6
+	mov	r8d,r10d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r8d,r15d
+	add	eax,r12d
+	add	r8d,r12d
+
+	lea	rbp,[20+rbp]
+	add	r8d,r14d
+	mov	r12d,DWORD[48+rsi]
+	mov	r13d,eax
+	mov	r14d,r8d
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,ebx
+
+	xor	r13d,eax
+	ror	r14d,9
+	xor	r15d,ecx
+
+	mov	DWORD[48+rsp],r12d
+	xor	r14d,r8d
+	and	r15d,eax
+
+	ror	r13d,5
+	add	r12d,edx
+	xor	r15d,ecx
+
+	ror	r14d,11
+	xor	r13d,eax
+	add	r12d,r15d
+
+	mov	r15d,r8d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r8d
+
+	xor	r15d,r9d
+	ror	r13d,6
+	mov	edx,r9d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	edx,edi
+	add	r11d,r12d
+	add	edx,r12d
+
+	lea	rbp,[4+rbp]
+	add	edx,r14d
+	mov	r12d,DWORD[52+rsi]
+	mov	r13d,r11d
+	mov	r14d,edx
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,eax
+
+	xor	r13d,r11d
+	ror	r14d,9
+	xor	edi,ebx
+
+	mov	DWORD[52+rsp],r12d
+	xor	r14d,edx
+	and	edi,r11d
+
+	ror	r13d,5
+	add	r12d,ecx
+	xor	edi,ebx
+
+	ror	r14d,11
+	xor	r13d,r11d
+	add	r12d,edi
+
+	mov	edi,edx
+	add	r12d,DWORD[rbp]
+	xor	r14d,edx
+
+	xor	edi,r8d
+	ror	r13d,6
+	mov	ecx,r8d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ecx,r15d
+	add	r10d,r12d
+	add	ecx,r12d
+
+	lea	rbp,[4+rbp]
+	add	ecx,r14d
+	mov	r12d,DWORD[56+rsi]
+	mov	r13d,r10d
+	mov	r14d,ecx
+	bswap	r12d
+	ror	r13d,14
+	mov	r15d,r11d
+
+	xor	r13d,r10d
+	ror	r14d,9
+	xor	r15d,eax
+
+	mov	DWORD[56+rsp],r12d
+	xor	r14d,ecx
+	and	r15d,r10d
+
+	ror	r13d,5
+	add	r12d,ebx
+	xor	r15d,eax
+
+	ror	r14d,11
+	xor	r13d,r10d
+	add	r12d,r15d
+
+	mov	r15d,ecx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ecx
+
+	xor	r15d,edx
+	ror	r13d,6
+	mov	ebx,edx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ebx,edi
+	add	r9d,r12d
+	add	ebx,r12d
+
+	lea	rbp,[4+rbp]
+	add	ebx,r14d
+	mov	r12d,DWORD[60+rsi]
+	mov	r13d,r9d
+	mov	r14d,ebx
+	bswap	r12d
+	ror	r13d,14
+	mov	edi,r10d
+
+	xor	r13d,r9d
+	ror	r14d,9
+	xor	edi,r11d
+
+	mov	DWORD[60+rsp],r12d
+	xor	r14d,ebx
+	and	edi,r9d
+
+	ror	r13d,5
+	add	r12d,eax
+	xor	edi,r11d
+
+	ror	r14d,11
+	xor	r13d,r9d
+	add	r12d,edi
+
+	mov	edi,ebx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ebx
+
+	xor	edi,ecx
+	ror	r13d,6
+	mov	eax,ecx
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	eax,r15d
+	add	r8d,r12d
+	add	eax,r12d
+
+	lea	rbp,[20+rbp]
+	jmp	NEAR $L$rounds_16_xx
+ALIGN	16
+$L$rounds_16_xx:
+	mov	r13d,DWORD[4+rsp]
+	mov	r15d,DWORD[56+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	eax,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[36+rsp]
+
+	add	r12d,DWORD[rsp]
+	mov	r13d,r8d
+	add	r12d,r15d
+	mov	r14d,eax
+	ror	r13d,14
+	mov	r15d,r9d
+
+	xor	r13d,r8d
+	ror	r14d,9
+	xor	r15d,r10d
+
+	mov	DWORD[rsp],r12d
+	xor	r14d,eax
+	and	r15d,r8d
+
+	ror	r13d,5
+	add	r12d,r11d
+	xor	r15d,r10d
+
+	ror	r14d,11
+	xor	r13d,r8d
+	add	r12d,r15d
+
+	mov	r15d,eax
+	add	r12d,DWORD[rbp]
+	xor	r14d,eax
+
+	xor	r15d,ebx
+	ror	r13d,6
+	mov	r11d,ebx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r11d,edi
+	add	edx,r12d
+	add	r11d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[8+rsp]
+	mov	edi,DWORD[60+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r11d,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[40+rsp]
+
+	add	r12d,DWORD[4+rsp]
+	mov	r13d,edx
+	add	r12d,edi
+	mov	r14d,r11d
+	ror	r13d,14
+	mov	edi,r8d
+
+	xor	r13d,edx
+	ror	r14d,9
+	xor	edi,r9d
+
+	mov	DWORD[4+rsp],r12d
+	xor	r14d,r11d
+	and	edi,edx
+
+	ror	r13d,5
+	add	r12d,r10d
+	xor	edi,r9d
+
+	ror	r14d,11
+	xor	r13d,edx
+	add	r12d,edi
+
+	mov	edi,r11d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r11d
+
+	xor	edi,eax
+	ror	r13d,6
+	mov	r10d,eax
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r10d,r15d
+	add	ecx,r12d
+	add	r10d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[12+rsp]
+	mov	r15d,DWORD[rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r10d,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[44+rsp]
+
+	add	r12d,DWORD[8+rsp]
+	mov	r13d,ecx
+	add	r12d,r15d
+	mov	r14d,r10d
+	ror	r13d,14
+	mov	r15d,edx
+
+	xor	r13d,ecx
+	ror	r14d,9
+	xor	r15d,r8d
+
+	mov	DWORD[8+rsp],r12d
+	xor	r14d,r10d
+	and	r15d,ecx
+
+	ror	r13d,5
+	add	r12d,r9d
+	xor	r15d,r8d
+
+	ror	r14d,11
+	xor	r13d,ecx
+	add	r12d,r15d
+
+	mov	r15d,r10d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r10d
+
+	xor	r15d,r11d
+	ror	r13d,6
+	mov	r9d,r11d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r9d,edi
+	add	ebx,r12d
+	add	r9d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[16+rsp]
+	mov	edi,DWORD[4+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r9d,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[48+rsp]
+
+	add	r12d,DWORD[12+rsp]
+	mov	r13d,ebx
+	add	r12d,edi
+	mov	r14d,r9d
+	ror	r13d,14
+	mov	edi,ecx
+
+	xor	r13d,ebx
+	ror	r14d,9
+	xor	edi,edx
+
+	mov	DWORD[12+rsp],r12d
+	xor	r14d,r9d
+	and	edi,ebx
+
+	ror	r13d,5
+	add	r12d,r8d
+	xor	edi,edx
+
+	ror	r14d,11
+	xor	r13d,ebx
+	add	r12d,edi
+
+	mov	edi,r9d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r9d
+
+	xor	edi,r10d
+	ror	r13d,6
+	mov	r8d,r10d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r8d,r15d
+	add	eax,r12d
+	add	r8d,r12d
+
+	lea	rbp,[20+rbp]
+	mov	r13d,DWORD[20+rsp]
+	mov	r15d,DWORD[8+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r8d,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[52+rsp]
+
+	add	r12d,DWORD[16+rsp]
+	mov	r13d,eax
+	add	r12d,r15d
+	mov	r14d,r8d
+	ror	r13d,14
+	mov	r15d,ebx
+
+	xor	r13d,eax
+	ror	r14d,9
+	xor	r15d,ecx
+
+	mov	DWORD[16+rsp],r12d
+	xor	r14d,r8d
+	and	r15d,eax
+
+	ror	r13d,5
+	add	r12d,edx
+	xor	r15d,ecx
+
+	ror	r14d,11
+	xor	r13d,eax
+	add	r12d,r15d
+
+	mov	r15d,r8d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r8d
+
+	xor	r15d,r9d
+	ror	r13d,6
+	mov	edx,r9d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	edx,edi
+	add	r11d,r12d
+	add	edx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[24+rsp]
+	mov	edi,DWORD[12+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	edx,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[56+rsp]
+
+	add	r12d,DWORD[20+rsp]
+	mov	r13d,r11d
+	add	r12d,edi
+	mov	r14d,edx
+	ror	r13d,14
+	mov	edi,eax
+
+	xor	r13d,r11d
+	ror	r14d,9
+	xor	edi,ebx
+
+	mov	DWORD[20+rsp],r12d
+	xor	r14d,edx
+	and	edi,r11d
+
+	ror	r13d,5
+	add	r12d,ecx
+	xor	edi,ebx
+
+	ror	r14d,11
+	xor	r13d,r11d
+	add	r12d,edi
+
+	mov	edi,edx
+	add	r12d,DWORD[rbp]
+	xor	r14d,edx
+
+	xor	edi,r8d
+	ror	r13d,6
+	mov	ecx,r8d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ecx,r15d
+	add	r10d,r12d
+	add	ecx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[28+rsp]
+	mov	r15d,DWORD[16+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	ecx,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[60+rsp]
+
+	add	r12d,DWORD[24+rsp]
+	mov	r13d,r10d
+	add	r12d,r15d
+	mov	r14d,ecx
+	ror	r13d,14
+	mov	r15d,r11d
+
+	xor	r13d,r10d
+	ror	r14d,9
+	xor	r15d,eax
+
+	mov	DWORD[24+rsp],r12d
+	xor	r14d,ecx
+	and	r15d,r10d
+
+	ror	r13d,5
+	add	r12d,ebx
+	xor	r15d,eax
+
+	ror	r14d,11
+	xor	r13d,r10d
+	add	r12d,r15d
+
+	mov	r15d,ecx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ecx
+
+	xor	r15d,edx
+	ror	r13d,6
+	mov	ebx,edx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ebx,edi
+	add	r9d,r12d
+	add	ebx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[32+rsp]
+	mov	edi,DWORD[20+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	ebx,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[rsp]
+
+	add	r12d,DWORD[28+rsp]
+	mov	r13d,r9d
+	add	r12d,edi
+	mov	r14d,ebx
+	ror	r13d,14
+	mov	edi,r10d
+
+	xor	r13d,r9d
+	ror	r14d,9
+	xor	edi,r11d
+
+	mov	DWORD[28+rsp],r12d
+	xor	r14d,ebx
+	and	edi,r9d
+
+	ror	r13d,5
+	add	r12d,eax
+	xor	edi,r11d
+
+	ror	r14d,11
+	xor	r13d,r9d
+	add	r12d,edi
+
+	mov	edi,ebx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ebx
+
+	xor	edi,ecx
+	ror	r13d,6
+	mov	eax,ecx
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	eax,r15d
+	add	r8d,r12d
+	add	eax,r12d
+
+	lea	rbp,[20+rbp]
+	mov	r13d,DWORD[36+rsp]
+	mov	r15d,DWORD[24+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	eax,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[4+rsp]
+
+	add	r12d,DWORD[32+rsp]
+	mov	r13d,r8d
+	add	r12d,r15d
+	mov	r14d,eax
+	ror	r13d,14
+	mov	r15d,r9d
+
+	xor	r13d,r8d
+	ror	r14d,9
+	xor	r15d,r10d
+
+	mov	DWORD[32+rsp],r12d
+	xor	r14d,eax
+	and	r15d,r8d
+
+	ror	r13d,5
+	add	r12d,r11d
+	xor	r15d,r10d
+
+	ror	r14d,11
+	xor	r13d,r8d
+	add	r12d,r15d
+
+	mov	r15d,eax
+	add	r12d,DWORD[rbp]
+	xor	r14d,eax
+
+	xor	r15d,ebx
+	ror	r13d,6
+	mov	r11d,ebx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r11d,edi
+	add	edx,r12d
+	add	r11d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[40+rsp]
+	mov	edi,DWORD[28+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r11d,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[8+rsp]
+
+	add	r12d,DWORD[36+rsp]
+	mov	r13d,edx
+	add	r12d,edi
+	mov	r14d,r11d
+	ror	r13d,14
+	mov	edi,r8d
+
+	xor	r13d,edx
+	ror	r14d,9
+	xor	edi,r9d
+
+	mov	DWORD[36+rsp],r12d
+	xor	r14d,r11d
+	and	edi,edx
+
+	ror	r13d,5
+	add	r12d,r10d
+	xor	edi,r9d
+
+	ror	r14d,11
+	xor	r13d,edx
+	add	r12d,edi
+
+	mov	edi,r11d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r11d
+
+	xor	edi,eax
+	ror	r13d,6
+	mov	r10d,eax
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r10d,r15d
+	add	ecx,r12d
+	add	r10d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[44+rsp]
+	mov	r15d,DWORD[32+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r10d,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[12+rsp]
+
+	add	r12d,DWORD[40+rsp]
+	mov	r13d,ecx
+	add	r12d,r15d
+	mov	r14d,r10d
+	ror	r13d,14
+	mov	r15d,edx
+
+	xor	r13d,ecx
+	ror	r14d,9
+	xor	r15d,r8d
+
+	mov	DWORD[40+rsp],r12d
+	xor	r14d,r10d
+	and	r15d,ecx
+
+	ror	r13d,5
+	add	r12d,r9d
+	xor	r15d,r8d
+
+	ror	r14d,11
+	xor	r13d,ecx
+	add	r12d,r15d
+
+	mov	r15d,r10d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r10d
+
+	xor	r15d,r11d
+	ror	r13d,6
+	mov	r9d,r11d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r9d,edi
+	add	ebx,r12d
+	add	r9d,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[48+rsp]
+	mov	edi,DWORD[36+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r9d,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[16+rsp]
+
+	add	r12d,DWORD[44+rsp]
+	mov	r13d,ebx
+	add	r12d,edi
+	mov	r14d,r9d
+	ror	r13d,14
+	mov	edi,ecx
+
+	xor	r13d,ebx
+	ror	r14d,9
+	xor	edi,edx
+
+	mov	DWORD[44+rsp],r12d
+	xor	r14d,r9d
+	and	edi,ebx
+
+	ror	r13d,5
+	add	r12d,r8d
+	xor	edi,edx
+
+	ror	r14d,11
+	xor	r13d,ebx
+	add	r12d,edi
+
+	mov	edi,r9d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r9d
+
+	xor	edi,r10d
+	ror	r13d,6
+	mov	r8d,r10d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	r8d,r15d
+	add	eax,r12d
+	add	r8d,r12d
+
+	lea	rbp,[20+rbp]
+	mov	r13d,DWORD[52+rsp]
+	mov	r15d,DWORD[40+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	r8d,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[20+rsp]
+
+	add	r12d,DWORD[48+rsp]
+	mov	r13d,eax
+	add	r12d,r15d
+	mov	r14d,r8d
+	ror	r13d,14
+	mov	r15d,ebx
+
+	xor	r13d,eax
+	ror	r14d,9
+	xor	r15d,ecx
+
+	mov	DWORD[48+rsp],r12d
+	xor	r14d,r8d
+	and	r15d,eax
+
+	ror	r13d,5
+	add	r12d,edx
+	xor	r15d,ecx
+
+	ror	r14d,11
+	xor	r13d,eax
+	add	r12d,r15d
+
+	mov	r15d,r8d
+	add	r12d,DWORD[rbp]
+	xor	r14d,r8d
+
+	xor	r15d,r9d
+	ror	r13d,6
+	mov	edx,r9d
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	edx,edi
+	add	r11d,r12d
+	add	edx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[56+rsp]
+	mov	edi,DWORD[44+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	edx,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[24+rsp]
+
+	add	r12d,DWORD[52+rsp]
+	mov	r13d,r11d
+	add	r12d,edi
+	mov	r14d,edx
+	ror	r13d,14
+	mov	edi,eax
+
+	xor	r13d,r11d
+	ror	r14d,9
+	xor	edi,ebx
+
+	mov	DWORD[52+rsp],r12d
+	xor	r14d,edx
+	and	edi,r11d
+
+	ror	r13d,5
+	add	r12d,ecx
+	xor	edi,ebx
+
+	ror	r14d,11
+	xor	r13d,r11d
+	add	r12d,edi
+
+	mov	edi,edx
+	add	r12d,DWORD[rbp]
+	xor	r14d,edx
+
+	xor	edi,r8d
+	ror	r13d,6
+	mov	ecx,r8d
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ecx,r15d
+	add	r10d,r12d
+	add	ecx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[60+rsp]
+	mov	r15d,DWORD[48+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	ecx,r14d
+	mov	r14d,r15d
+	ror	r15d,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	r15d,r14d
+	shr	r14d,10
+
+	ror	r15d,17
+	xor	r12d,r13d
+	xor	r15d,r14d
+	add	r12d,DWORD[28+rsp]
+
+	add	r12d,DWORD[56+rsp]
+	mov	r13d,r10d
+	add	r12d,r15d
+	mov	r14d,ecx
+	ror	r13d,14
+	mov	r15d,r11d
+
+	xor	r13d,r10d
+	ror	r14d,9
+	xor	r15d,eax
+
+	mov	DWORD[56+rsp],r12d
+	xor	r14d,ecx
+	and	r15d,r10d
+
+	ror	r13d,5
+	add	r12d,ebx
+	xor	r15d,eax
+
+	ror	r14d,11
+	xor	r13d,r10d
+	add	r12d,r15d
+
+	mov	r15d,ecx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ecx
+
+	xor	r15d,edx
+	ror	r13d,6
+	mov	ebx,edx
+
+	and	edi,r15d
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	ebx,edi
+	add	r9d,r12d
+	add	ebx,r12d
+
+	lea	rbp,[4+rbp]
+	mov	r13d,DWORD[rsp]
+	mov	edi,DWORD[52+rsp]
+
+	mov	r12d,r13d
+	ror	r13d,11
+	add	ebx,r14d
+	mov	r14d,edi
+	ror	edi,2
+
+	xor	r13d,r12d
+	shr	r12d,3
+	ror	r13d,7
+	xor	edi,r14d
+	shr	r14d,10
+
+	ror	edi,17
+	xor	r12d,r13d
+	xor	edi,r14d
+	add	r12d,DWORD[32+rsp]
+
+	add	r12d,DWORD[60+rsp]
+	mov	r13d,r9d
+	add	r12d,edi
+	mov	r14d,ebx
+	ror	r13d,14
+	mov	edi,r10d
+
+	xor	r13d,r9d
+	ror	r14d,9
+	xor	edi,r11d
+
+	mov	DWORD[60+rsp],r12d
+	xor	r14d,ebx
+	and	edi,r9d
+
+	ror	r13d,5
+	add	r12d,eax
+	xor	edi,r11d
+
+	ror	r14d,11
+	xor	r13d,r9d
+	add	r12d,edi
+
+	mov	edi,ebx
+	add	r12d,DWORD[rbp]
+	xor	r14d,ebx
+
+	xor	edi,ecx
+	ror	r13d,6
+	mov	eax,ecx
+
+	and	r15d,edi
+	ror	r14d,2
+	add	r12d,r13d
+
+	xor	eax,r15d
+	add	r8d,r12d
+	add	eax,r12d
+
+	lea	rbp,[20+rbp]
+	cmp	BYTE[3+rbp],0
+	jnz	NEAR $L$rounds_16_xx
+
+	mov	rdi,QWORD[((64+0))+rsp]
+	add	eax,r14d
+	lea	rsi,[64+rsi]
+
+	add	eax,DWORD[rdi]
+	add	ebx,DWORD[4+rdi]
+	add	ecx,DWORD[8+rdi]
+	add	edx,DWORD[12+rdi]
+	add	r8d,DWORD[16+rdi]
+	add	r9d,DWORD[20+rdi]
+	add	r10d,DWORD[24+rdi]
+	add	r11d,DWORD[28+rdi]
+
+	cmp	rsi,QWORD[((64+16))+rsp]
+
+	mov	DWORD[rdi],eax
+	mov	DWORD[4+rdi],ebx
+	mov	DWORD[8+rdi],ecx
+	mov	DWORD[12+rdi],edx
+	mov	DWORD[16+rdi],r8d
+	mov	DWORD[20+rdi],r9d
+	mov	DWORD[24+rdi],r10d
+	mov	DWORD[28+rdi],r11d
+	jb	NEAR $L$loop
+
+	mov	rsi,QWORD[((64+24))+rsp]
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_sha256_block_data_order:
+ALIGN	64
+
+K256:
+	DD	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+	DD	0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
+	DD	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+	DD	0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
+	DD	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+	DD	0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
+	DD	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+	DD	0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
+	DD	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+	DD	0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
+	DD	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+	DD	0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
+	DD	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+	DD	0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
+	DD	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+	DD	0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
+	DD	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+	DD	0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
+	DD	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+	DD	0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
+	DD	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+	DD	0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
+	DD	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+	DD	0xd192e819,0xd6990624,0xf40e3585,0x106aa070
+	DD	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+	DD	0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
+	DD	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+	DD	0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
+	DD	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+	DD	0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
+	DD	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+	DD	0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
+
+	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+	DD	0x00010203,0x04050607,0x08090a0b,0x0c0d0e0f
+	DD	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+	DD	0x03020100,0x0b0a0908,0xffffffff,0xffffffff
+	DD	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+	DD	0xffffffff,0xffffffff,0x03020100,0x0b0a0908
+DB	83,72,65,50,53,54,32,98,108,111,99,107,32,116,114,97
+DB	110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
+DB	52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+DB	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+DB	111,114,103,62,0
+
+ALIGN	64
+sha256_block_data_order_ssse3:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_sha256_block_data_order_ssse3:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+$L$ssse3_shortcut:
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	mov	r11,rsp
+	shl	rdx,4
+	sub	rsp,160
+	lea	rdx,[rdx*4+rsi]
+	and	rsp,-64
+	mov	QWORD[((64+0))+rsp],rdi
+	mov	QWORD[((64+8))+rsp],rsi
+	mov	QWORD[((64+16))+rsp],rdx
+	mov	QWORD[((64+24))+rsp],r11
+	movaps	XMMWORD[(64+32)+rsp],xmm6
+	movaps	XMMWORD[(64+48)+rsp],xmm7
+	movaps	XMMWORD[(64+64)+rsp],xmm8
+	movaps	XMMWORD[(64+80)+rsp],xmm9
+$L$prologue_ssse3:
+
+	mov	eax,DWORD[rdi]
+	mov	ebx,DWORD[4+rdi]
+	mov	ecx,DWORD[8+rdi]
+	mov	edx,DWORD[12+rdi]
+	mov	r8d,DWORD[16+rdi]
+	mov	r9d,DWORD[20+rdi]
+	mov	r10d,DWORD[24+rdi]
+	mov	r11d,DWORD[28+rdi]
+
+
+	jmp	NEAR $L$loop_ssse3
+ALIGN	16
+$L$loop_ssse3:
+	movdqa	xmm7,XMMWORD[((K256+512))]
+	movdqu	xmm0,XMMWORD[rsi]
+	movdqu	xmm1,XMMWORD[16+rsi]
+	movdqu	xmm2,XMMWORD[32+rsi]
+DB	102,15,56,0,199
+	movdqu	xmm3,XMMWORD[48+rsi]
+	lea	rbp,[K256]
+DB	102,15,56,0,207
+	movdqa	xmm4,XMMWORD[rbp]
+	movdqa	xmm5,XMMWORD[32+rbp]
+DB	102,15,56,0,215
+	paddd	xmm4,xmm0
+	movdqa	xmm6,XMMWORD[64+rbp]
+DB	102,15,56,0,223
+	movdqa	xmm7,XMMWORD[96+rbp]
+	paddd	xmm5,xmm1
+	paddd	xmm6,xmm2
+	paddd	xmm7,xmm3
+	movdqa	XMMWORD[rsp],xmm4
+	mov	r14d,eax
+	movdqa	XMMWORD[16+rsp],xmm5
+	mov	edi,ebx
+	movdqa	XMMWORD[32+rsp],xmm6
+	xor	edi,ecx
+	movdqa	XMMWORD[48+rsp],xmm7
+	mov	r13d,r8d
+	jmp	NEAR $L$ssse3_00_47
+
+ALIGN	16
+$L$ssse3_00_47:
+	sub	rbp,-128
+	ror	r13d,14
+	movdqa	xmm4,xmm1
+	mov	eax,r14d
+	mov	r12d,r9d
+	movdqa	xmm7,xmm3
+	ror	r14d,9
+	xor	r13d,r8d
+	xor	r12d,r10d
+	ror	r13d,5
+	xor	r14d,eax
+DB	102,15,58,15,224,4
+	and	r12d,r8d
+	xor	r13d,r8d
+DB	102,15,58,15,250,4
+	add	r11d,DWORD[rsp]
+	mov	r15d,eax
+	xor	r12d,r10d
+	ror	r14d,11
+	movdqa	xmm5,xmm4
+	xor	r15d,ebx
+	add	r11d,r12d
+	movdqa	xmm6,xmm4
+	ror	r13d,6
+	and	edi,r15d
+	psrld	xmm4,3
+	xor	r14d,eax
+	add	r11d,r13d
+	xor	edi,ebx
+	paddd	xmm0,xmm7
+	ror	r14d,2
+	add	edx,r11d
+	psrld	xmm6,7
+	add	r11d,edi
+	mov	r13d,edx
+	pshufd	xmm7,xmm3,250
+	add	r14d,r11d
+	ror	r13d,14
+	pslld	xmm5,14
+	mov	r11d,r14d
+	mov	r12d,r8d
+	pxor	xmm4,xmm6
+	ror	r14d,9
+	xor	r13d,edx
+	xor	r12d,r9d
+	ror	r13d,5
+	psrld	xmm6,11
+	xor	r14d,r11d
+	pxor	xmm4,xmm5
+	and	r12d,edx
+	xor	r13d,edx
+	pslld	xmm5,11
+	add	r10d,DWORD[4+rsp]
+	mov	edi,r11d
+	pxor	xmm4,xmm6
+	xor	r12d,r9d
+	ror	r14d,11
+	movdqa	xmm6,xmm7
+	xor	edi,eax
+	add	r10d,r12d
+	pxor	xmm4,xmm5
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r11d
+	psrld	xmm7,10
+	add	r10d,r13d
+	xor	r15d,eax
+	paddd	xmm0,xmm4
+	ror	r14d,2
+	add	ecx,r10d
+	psrlq	xmm6,17
+	add	r10d,r15d
+	mov	r13d,ecx
+	add	r14d,r10d
+	pxor	xmm7,xmm6
+	ror	r13d,14
+	mov	r10d,r14d
+	mov	r12d,edx
+	ror	r14d,9
+	psrlq	xmm6,2
+	xor	r13d,ecx
+	xor	r12d,r8d
+	pxor	xmm7,xmm6
+	ror	r13d,5
+	xor	r14d,r10d
+	and	r12d,ecx
+	pshufd	xmm7,xmm7,128
+	xor	r13d,ecx
+	add	r9d,DWORD[8+rsp]
+	mov	r15d,r10d
+	psrldq	xmm7,8
+	xor	r12d,r8d
+	ror	r14d,11
+	xor	r15d,r11d
+	add	r9d,r12d
+	ror	r13d,6
+	paddd	xmm0,xmm7
+	and	edi,r15d
+	xor	r14d,r10d
+	add	r9d,r13d
+	pshufd	xmm7,xmm0,80
+	xor	edi,r11d
+	ror	r14d,2
+	add	ebx,r9d
+	movdqa	xmm6,xmm7
+	add	r9d,edi
+	mov	r13d,ebx
+	psrld	xmm7,10
+	add	r14d,r9d
+	ror	r13d,14
+	psrlq	xmm6,17
+	mov	r9d,r14d
+	mov	r12d,ecx
+	pxor	xmm7,xmm6
+	ror	r14d,9
+	xor	r13d,ebx
+	xor	r12d,edx
+	ror	r13d,5
+	xor	r14d,r9d
+	psrlq	xmm6,2
+	and	r12d,ebx
+	xor	r13d,ebx
+	add	r8d,DWORD[12+rsp]
+	pxor	xmm7,xmm6
+	mov	edi,r9d
+	xor	r12d,edx
+	ror	r14d,11
+	pshufd	xmm7,xmm7,8
+	xor	edi,r10d
+	add	r8d,r12d
+	movdqa	xmm6,XMMWORD[rbp]
+	ror	r13d,6
+	and	r15d,edi
+	pslldq	xmm7,8
+	xor	r14d,r9d
+	add	r8d,r13d
+	xor	r15d,r10d
+	paddd	xmm0,xmm7
+	ror	r14d,2
+	add	eax,r8d
+	add	r8d,r15d
+	paddd	xmm6,xmm0
+	mov	r13d,eax
+	add	r14d,r8d
+	movdqa	XMMWORD[rsp],xmm6
+	ror	r13d,14
+	movdqa	xmm4,xmm2
+	mov	r8d,r14d
+	mov	r12d,ebx
+	movdqa	xmm7,xmm0
+	ror	r14d,9
+	xor	r13d,eax
+	xor	r12d,ecx
+	ror	r13d,5
+	xor	r14d,r8d
+DB	102,15,58,15,225,4
+	and	r12d,eax
+	xor	r13d,eax
+DB	102,15,58,15,251,4
+	add	edx,DWORD[16+rsp]
+	mov	r15d,r8d
+	xor	r12d,ecx
+	ror	r14d,11
+	movdqa	xmm5,xmm4
+	xor	r15d,r9d
+	add	edx,r12d
+	movdqa	xmm6,xmm4
+	ror	r13d,6
+	and	edi,r15d
+	psrld	xmm4,3
+	xor	r14d,r8d
+	add	edx,r13d
+	xor	edi,r9d
+	paddd	xmm1,xmm7
+	ror	r14d,2
+	add	r11d,edx
+	psrld	xmm6,7
+	add	edx,edi
+	mov	r13d,r11d
+	pshufd	xmm7,xmm0,250
+	add	r14d,edx
+	ror	r13d,14
+	pslld	xmm5,14
+	mov	edx,r14d
+	mov	r12d,eax
+	pxor	xmm4,xmm6
+	ror	r14d,9
+	xor	r13d,r11d
+	xor	r12d,ebx
+	ror	r13d,5
+	psrld	xmm6,11
+	xor	r14d,edx
+	pxor	xmm4,xmm5
+	and	r12d,r11d
+	xor	r13d,r11d
+	pslld	xmm5,11
+	add	ecx,DWORD[20+rsp]
+	mov	edi,edx
+	pxor	xmm4,xmm6
+	xor	r12d,ebx
+	ror	r14d,11
+	movdqa	xmm6,xmm7
+	xor	edi,r8d
+	add	ecx,r12d
+	pxor	xmm4,xmm5
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,edx
+	psrld	xmm7,10
+	add	ecx,r13d
+	xor	r15d,r8d
+	paddd	xmm1,xmm4
+	ror	r14d,2
+	add	r10d,ecx
+	psrlq	xmm6,17
+	add	ecx,r15d
+	mov	r13d,r10d
+	add	r14d,ecx
+	pxor	xmm7,xmm6
+	ror	r13d,14
+	mov	ecx,r14d
+	mov	r12d,r11d
+	ror	r14d,9
+	psrlq	xmm6,2
+	xor	r13d,r10d
+	xor	r12d,eax
+	pxor	xmm7,xmm6
+	ror	r13d,5
+	xor	r14d,ecx
+	and	r12d,r10d
+	pshufd	xmm7,xmm7,128
+	xor	r13d,r10d
+	add	ebx,DWORD[24+rsp]
+	mov	r15d,ecx
+	psrldq	xmm7,8
+	xor	r12d,eax
+	ror	r14d,11
+	xor	r15d,edx
+	add	ebx,r12d
+	ror	r13d,6
+	paddd	xmm1,xmm7
+	and	edi,r15d
+	xor	r14d,ecx
+	add	ebx,r13d
+	pshufd	xmm7,xmm1,80
+	xor	edi,edx
+	ror	r14d,2
+	add	r9d,ebx
+	movdqa	xmm6,xmm7
+	add	ebx,edi
+	mov	r13d,r9d
+	psrld	xmm7,10
+	add	r14d,ebx
+	ror	r13d,14
+	psrlq	xmm6,17
+	mov	ebx,r14d
+	mov	r12d,r10d
+	pxor	xmm7,xmm6
+	ror	r14d,9
+	xor	r13d,r9d
+	xor	r12d,r11d
+	ror	r13d,5
+	xor	r14d,ebx
+	psrlq	xmm6,2
+	and	r12d,r9d
+	xor	r13d,r9d
+	add	eax,DWORD[28+rsp]
+	pxor	xmm7,xmm6
+	mov	edi,ebx
+	xor	r12d,r11d
+	ror	r14d,11
+	pshufd	xmm7,xmm7,8
+	xor	edi,ecx
+	add	eax,r12d
+	movdqa	xmm6,XMMWORD[32+rbp]
+	ror	r13d,6
+	and	r15d,edi
+	pslldq	xmm7,8
+	xor	r14d,ebx
+	add	eax,r13d
+	xor	r15d,ecx
+	paddd	xmm1,xmm7
+	ror	r14d,2
+	add	r8d,eax
+	add	eax,r15d
+	paddd	xmm6,xmm1
+	mov	r13d,r8d
+	add	r14d,eax
+	movdqa	XMMWORD[16+rsp],xmm6
+	ror	r13d,14
+	movdqa	xmm4,xmm3
+	mov	eax,r14d
+	mov	r12d,r9d
+	movdqa	xmm7,xmm1
+	ror	r14d,9
+	xor	r13d,r8d
+	xor	r12d,r10d
+	ror	r13d,5
+	xor	r14d,eax
+DB	102,15,58,15,226,4
+	and	r12d,r8d
+	xor	r13d,r8d
+DB	102,15,58,15,248,4
+	add	r11d,DWORD[32+rsp]
+	mov	r15d,eax
+	xor	r12d,r10d
+	ror	r14d,11
+	movdqa	xmm5,xmm4
+	xor	r15d,ebx
+	add	r11d,r12d
+	movdqa	xmm6,xmm4
+	ror	r13d,6
+	and	edi,r15d
+	psrld	xmm4,3
+	xor	r14d,eax
+	add	r11d,r13d
+	xor	edi,ebx
+	paddd	xmm2,xmm7
+	ror	r14d,2
+	add	edx,r11d
+	psrld	xmm6,7
+	add	r11d,edi
+	mov	r13d,edx
+	pshufd	xmm7,xmm1,250
+	add	r14d,r11d
+	ror	r13d,14
+	pslld	xmm5,14
+	mov	r11d,r14d
+	mov	r12d,r8d
+	pxor	xmm4,xmm6
+	ror	r14d,9
+	xor	r13d,edx
+	xor	r12d,r9d
+	ror	r13d,5
+	psrld	xmm6,11
+	xor	r14d,r11d
+	pxor	xmm4,xmm5
+	and	r12d,edx
+	xor	r13d,edx
+	pslld	xmm5,11
+	add	r10d,DWORD[36+rsp]
+	mov	edi,r11d
+	pxor	xmm4,xmm6
+	xor	r12d,r9d
+	ror	r14d,11
+	movdqa	xmm6,xmm7
+	xor	edi,eax
+	add	r10d,r12d
+	pxor	xmm4,xmm5
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r11d
+	psrld	xmm7,10
+	add	r10d,r13d
+	xor	r15d,eax
+	paddd	xmm2,xmm4
+	ror	r14d,2
+	add	ecx,r10d
+	psrlq	xmm6,17
+	add	r10d,r15d
+	mov	r13d,ecx
+	add	r14d,r10d
+	pxor	xmm7,xmm6
+	ror	r13d,14
+	mov	r10d,r14d
+	mov	r12d,edx
+	ror	r14d,9
+	psrlq	xmm6,2
+	xor	r13d,ecx
+	xor	r12d,r8d
+	pxor	xmm7,xmm6
+	ror	r13d,5
+	xor	r14d,r10d
+	and	r12d,ecx
+	pshufd	xmm7,xmm7,128
+	xor	r13d,ecx
+	add	r9d,DWORD[40+rsp]
+	mov	r15d,r10d
+	psrldq	xmm7,8
+	xor	r12d,r8d
+	ror	r14d,11
+	xor	r15d,r11d
+	add	r9d,r12d
+	ror	r13d,6
+	paddd	xmm2,xmm7
+	and	edi,r15d
+	xor	r14d,r10d
+	add	r9d,r13d
+	pshufd	xmm7,xmm2,80
+	xor	edi,r11d
+	ror	r14d,2
+	add	ebx,r9d
+	movdqa	xmm6,xmm7
+	add	r9d,edi
+	mov	r13d,ebx
+	psrld	xmm7,10
+	add	r14d,r9d
+	ror	r13d,14
+	psrlq	xmm6,17
+	mov	r9d,r14d
+	mov	r12d,ecx
+	pxor	xmm7,xmm6
+	ror	r14d,9
+	xor	r13d,ebx
+	xor	r12d,edx
+	ror	r13d,5
+	xor	r14d,r9d
+	psrlq	xmm6,2
+	and	r12d,ebx
+	xor	r13d,ebx
+	add	r8d,DWORD[44+rsp]
+	pxor	xmm7,xmm6
+	mov	edi,r9d
+	xor	r12d,edx
+	ror	r14d,11
+	pshufd	xmm7,xmm7,8
+	xor	edi,r10d
+	add	r8d,r12d
+	movdqa	xmm6,XMMWORD[64+rbp]
+	ror	r13d,6
+	and	r15d,edi
+	pslldq	xmm7,8
+	xor	r14d,r9d
+	add	r8d,r13d
+	xor	r15d,r10d
+	paddd	xmm2,xmm7
+	ror	r14d,2
+	add	eax,r8d
+	add	r8d,r15d
+	paddd	xmm6,xmm2
+	mov	r13d,eax
+	add	r14d,r8d
+	movdqa	XMMWORD[32+rsp],xmm6
+	ror	r13d,14
+	movdqa	xmm4,xmm0
+	mov	r8d,r14d
+	mov	r12d,ebx
+	movdqa	xmm7,xmm2
+	ror	r14d,9
+	xor	r13d,eax
+	xor	r12d,ecx
+	ror	r13d,5
+	xor	r14d,r8d
+DB	102,15,58,15,227,4
+	and	r12d,eax
+	xor	r13d,eax
+DB	102,15,58,15,249,4
+	add	edx,DWORD[48+rsp]
+	mov	r15d,r8d
+	xor	r12d,ecx
+	ror	r14d,11
+	movdqa	xmm5,xmm4
+	xor	r15d,r9d
+	add	edx,r12d
+	movdqa	xmm6,xmm4
+	ror	r13d,6
+	and	edi,r15d
+	psrld	xmm4,3
+	xor	r14d,r8d
+	add	edx,r13d
+	xor	edi,r9d
+	paddd	xmm3,xmm7
+	ror	r14d,2
+	add	r11d,edx
+	psrld	xmm6,7
+	add	edx,edi
+	mov	r13d,r11d
+	pshufd	xmm7,xmm2,250
+	add	r14d,edx
+	ror	r13d,14
+	pslld	xmm5,14
+	mov	edx,r14d
+	mov	r12d,eax
+	pxor	xmm4,xmm6
+	ror	r14d,9
+	xor	r13d,r11d
+	xor	r12d,ebx
+	ror	r13d,5
+	psrld	xmm6,11
+	xor	r14d,edx
+	pxor	xmm4,xmm5
+	and	r12d,r11d
+	xor	r13d,r11d
+	pslld	xmm5,11
+	add	ecx,DWORD[52+rsp]
+	mov	edi,edx
+	pxor	xmm4,xmm6
+	xor	r12d,ebx
+	ror	r14d,11
+	movdqa	xmm6,xmm7
+	xor	edi,r8d
+	add	ecx,r12d
+	pxor	xmm4,xmm5
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,edx
+	psrld	xmm7,10
+	add	ecx,r13d
+	xor	r15d,r8d
+	paddd	xmm3,xmm4
+	ror	r14d,2
+	add	r10d,ecx
+	psrlq	xmm6,17
+	add	ecx,r15d
+	mov	r13d,r10d
+	add	r14d,ecx
+	pxor	xmm7,xmm6
+	ror	r13d,14
+	mov	ecx,r14d
+	mov	r12d,r11d
+	ror	r14d,9
+	psrlq	xmm6,2
+	xor	r13d,r10d
+	xor	r12d,eax
+	pxor	xmm7,xmm6
+	ror	r13d,5
+	xor	r14d,ecx
+	and	r12d,r10d
+	pshufd	xmm7,xmm7,128
+	xor	r13d,r10d
+	add	ebx,DWORD[56+rsp]
+	mov	r15d,ecx
+	psrldq	xmm7,8
+	xor	r12d,eax
+	ror	r14d,11
+	xor	r15d,edx
+	add	ebx,r12d
+	ror	r13d,6
+	paddd	xmm3,xmm7
+	and	edi,r15d
+	xor	r14d,ecx
+	add	ebx,r13d
+	pshufd	xmm7,xmm3,80
+	xor	edi,edx
+	ror	r14d,2
+	add	r9d,ebx
+	movdqa	xmm6,xmm7
+	add	ebx,edi
+	mov	r13d,r9d
+	psrld	xmm7,10
+	add	r14d,ebx
+	ror	r13d,14
+	psrlq	xmm6,17
+	mov	ebx,r14d
+	mov	r12d,r10d
+	pxor	xmm7,xmm6
+	ror	r14d,9
+	xor	r13d,r9d
+	xor	r12d,r11d
+	ror	r13d,5
+	xor	r14d,ebx
+	psrlq	xmm6,2
+	and	r12d,r9d
+	xor	r13d,r9d
+	add	eax,DWORD[60+rsp]
+	pxor	xmm7,xmm6
+	mov	edi,ebx
+	xor	r12d,r11d
+	ror	r14d,11
+	pshufd	xmm7,xmm7,8
+	xor	edi,ecx
+	add	eax,r12d
+	movdqa	xmm6,XMMWORD[96+rbp]
+	ror	r13d,6
+	and	r15d,edi
+	pslldq	xmm7,8
+	xor	r14d,ebx
+	add	eax,r13d
+	xor	r15d,ecx
+	paddd	xmm3,xmm7
+	ror	r14d,2
+	add	r8d,eax
+	add	eax,r15d
+	paddd	xmm6,xmm3
+	mov	r13d,r8d
+	add	r14d,eax
+	movdqa	XMMWORD[48+rsp],xmm6
+	cmp	BYTE[131+rbp],0
+	jne	NEAR $L$ssse3_00_47
+	ror	r13d,14
+	mov	eax,r14d
+	mov	r12d,r9d
+	ror	r14d,9
+	xor	r13d,r8d
+	xor	r12d,r10d
+	ror	r13d,5
+	xor	r14d,eax
+	and	r12d,r8d
+	xor	r13d,r8d
+	add	r11d,DWORD[rsp]
+	mov	r15d,eax
+	xor	r12d,r10d
+	ror	r14d,11
+	xor	r15d,ebx
+	add	r11d,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,eax
+	add	r11d,r13d
+	xor	edi,ebx
+	ror	r14d,2
+	add	edx,r11d
+	add	r11d,edi
+	mov	r13d,edx
+	add	r14d,r11d
+	ror	r13d,14
+	mov	r11d,r14d
+	mov	r12d,r8d
+	ror	r14d,9
+	xor	r13d,edx
+	xor	r12d,r9d
+	ror	r13d,5
+	xor	r14d,r11d
+	and	r12d,edx
+	xor	r13d,edx
+	add	r10d,DWORD[4+rsp]
+	mov	edi,r11d
+	xor	r12d,r9d
+	ror	r14d,11
+	xor	edi,eax
+	add	r10d,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r11d
+	add	r10d,r13d
+	xor	r15d,eax
+	ror	r14d,2
+	add	ecx,r10d
+	add	r10d,r15d
+	mov	r13d,ecx
+	add	r14d,r10d
+	ror	r13d,14
+	mov	r10d,r14d
+	mov	r12d,edx
+	ror	r14d,9
+	xor	r13d,ecx
+	xor	r12d,r8d
+	ror	r13d,5
+	xor	r14d,r10d
+	and	r12d,ecx
+	xor	r13d,ecx
+	add	r9d,DWORD[8+rsp]
+	mov	r15d,r10d
+	xor	r12d,r8d
+	ror	r14d,11
+	xor	r15d,r11d
+	add	r9d,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,r10d
+	add	r9d,r13d
+	xor	edi,r11d
+	ror	r14d,2
+	add	ebx,r9d
+	add	r9d,edi
+	mov	r13d,ebx
+	add	r14d,r9d
+	ror	r13d,14
+	mov	r9d,r14d
+	mov	r12d,ecx
+	ror	r14d,9
+	xor	r13d,ebx
+	xor	r12d,edx
+	ror	r13d,5
+	xor	r14d,r9d
+	and	r12d,ebx
+	xor	r13d,ebx
+	add	r8d,DWORD[12+rsp]
+	mov	edi,r9d
+	xor	r12d,edx
+	ror	r14d,11
+	xor	edi,r10d
+	add	r8d,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r9d
+	add	r8d,r13d
+	xor	r15d,r10d
+	ror	r14d,2
+	add	eax,r8d
+	add	r8d,r15d
+	mov	r13d,eax
+	add	r14d,r8d
+	ror	r13d,14
+	mov	r8d,r14d
+	mov	r12d,ebx
+	ror	r14d,9
+	xor	r13d,eax
+	xor	r12d,ecx
+	ror	r13d,5
+	xor	r14d,r8d
+	and	r12d,eax
+	xor	r13d,eax
+	add	edx,DWORD[16+rsp]
+	mov	r15d,r8d
+	xor	r12d,ecx
+	ror	r14d,11
+	xor	r15d,r9d
+	add	edx,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,r8d
+	add	edx,r13d
+	xor	edi,r9d
+	ror	r14d,2
+	add	r11d,edx
+	add	edx,edi
+	mov	r13d,r11d
+	add	r14d,edx
+	ror	r13d,14
+	mov	edx,r14d
+	mov	r12d,eax
+	ror	r14d,9
+	xor	r13d,r11d
+	xor	r12d,ebx
+	ror	r13d,5
+	xor	r14d,edx
+	and	r12d,r11d
+	xor	r13d,r11d
+	add	ecx,DWORD[20+rsp]
+	mov	edi,edx
+	xor	r12d,ebx
+	ror	r14d,11
+	xor	edi,r8d
+	add	ecx,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,edx
+	add	ecx,r13d
+	xor	r15d,r8d
+	ror	r14d,2
+	add	r10d,ecx
+	add	ecx,r15d
+	mov	r13d,r10d
+	add	r14d,ecx
+	ror	r13d,14
+	mov	ecx,r14d
+	mov	r12d,r11d
+	ror	r14d,9
+	xor	r13d,r10d
+	xor	r12d,eax
+	ror	r13d,5
+	xor	r14d,ecx
+	and	r12d,r10d
+	xor	r13d,r10d
+	add	ebx,DWORD[24+rsp]
+	mov	r15d,ecx
+	xor	r12d,eax
+	ror	r14d,11
+	xor	r15d,edx
+	add	ebx,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,ecx
+	add	ebx,r13d
+	xor	edi,edx
+	ror	r14d,2
+	add	r9d,ebx
+	add	ebx,edi
+	mov	r13d,r9d
+	add	r14d,ebx
+	ror	r13d,14
+	mov	ebx,r14d
+	mov	r12d,r10d
+	ror	r14d,9
+	xor	r13d,r9d
+	xor	r12d,r11d
+	ror	r13d,5
+	xor	r14d,ebx
+	and	r12d,r9d
+	xor	r13d,r9d
+	add	eax,DWORD[28+rsp]
+	mov	edi,ebx
+	xor	r12d,r11d
+	ror	r14d,11
+	xor	edi,ecx
+	add	eax,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,ebx
+	add	eax,r13d
+	xor	r15d,ecx
+	ror	r14d,2
+	add	r8d,eax
+	add	eax,r15d
+	mov	r13d,r8d
+	add	r14d,eax
+	ror	r13d,14
+	mov	eax,r14d
+	mov	r12d,r9d
+	ror	r14d,9
+	xor	r13d,r8d
+	xor	r12d,r10d
+	ror	r13d,5
+	xor	r14d,eax
+	and	r12d,r8d
+	xor	r13d,r8d
+	add	r11d,DWORD[32+rsp]
+	mov	r15d,eax
+	xor	r12d,r10d
+	ror	r14d,11
+	xor	r15d,ebx
+	add	r11d,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,eax
+	add	r11d,r13d
+	xor	edi,ebx
+	ror	r14d,2
+	add	edx,r11d
+	add	r11d,edi
+	mov	r13d,edx
+	add	r14d,r11d
+	ror	r13d,14
+	mov	r11d,r14d
+	mov	r12d,r8d
+	ror	r14d,9
+	xor	r13d,edx
+	xor	r12d,r9d
+	ror	r13d,5
+	xor	r14d,r11d
+	and	r12d,edx
+	xor	r13d,edx
+	add	r10d,DWORD[36+rsp]
+	mov	edi,r11d
+	xor	r12d,r9d
+	ror	r14d,11
+	xor	edi,eax
+	add	r10d,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r11d
+	add	r10d,r13d
+	xor	r15d,eax
+	ror	r14d,2
+	add	ecx,r10d
+	add	r10d,r15d
+	mov	r13d,ecx
+	add	r14d,r10d
+	ror	r13d,14
+	mov	r10d,r14d
+	mov	r12d,edx
+	ror	r14d,9
+	xor	r13d,ecx
+	xor	r12d,r8d
+	ror	r13d,5
+	xor	r14d,r10d
+	and	r12d,ecx
+	xor	r13d,ecx
+	add	r9d,DWORD[40+rsp]
+	mov	r15d,r10d
+	xor	r12d,r8d
+	ror	r14d,11
+	xor	r15d,r11d
+	add	r9d,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,r10d
+	add	r9d,r13d
+	xor	edi,r11d
+	ror	r14d,2
+	add	ebx,r9d
+	add	r9d,edi
+	mov	r13d,ebx
+	add	r14d,r9d
+	ror	r13d,14
+	mov	r9d,r14d
+	mov	r12d,ecx
+	ror	r14d,9
+	xor	r13d,ebx
+	xor	r12d,edx
+	ror	r13d,5
+	xor	r14d,r9d
+	and	r12d,ebx
+	xor	r13d,ebx
+	add	r8d,DWORD[44+rsp]
+	mov	edi,r9d
+	xor	r12d,edx
+	ror	r14d,11
+	xor	edi,r10d
+	add	r8d,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,r9d
+	add	r8d,r13d
+	xor	r15d,r10d
+	ror	r14d,2
+	add	eax,r8d
+	add	r8d,r15d
+	mov	r13d,eax
+	add	r14d,r8d
+	ror	r13d,14
+	mov	r8d,r14d
+	mov	r12d,ebx
+	ror	r14d,9
+	xor	r13d,eax
+	xor	r12d,ecx
+	ror	r13d,5
+	xor	r14d,r8d
+	and	r12d,eax
+	xor	r13d,eax
+	add	edx,DWORD[48+rsp]
+	mov	r15d,r8d
+	xor	r12d,ecx
+	ror	r14d,11
+	xor	r15d,r9d
+	add	edx,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,r8d
+	add	edx,r13d
+	xor	edi,r9d
+	ror	r14d,2
+	add	r11d,edx
+	add	edx,edi
+	mov	r13d,r11d
+	add	r14d,edx
+	ror	r13d,14
+	mov	edx,r14d
+	mov	r12d,eax
+	ror	r14d,9
+	xor	r13d,r11d
+	xor	r12d,ebx
+	ror	r13d,5
+	xor	r14d,edx
+	and	r12d,r11d
+	xor	r13d,r11d
+	add	ecx,DWORD[52+rsp]
+	mov	edi,edx
+	xor	r12d,ebx
+	ror	r14d,11
+	xor	edi,r8d
+	add	ecx,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,edx
+	add	ecx,r13d
+	xor	r15d,r8d
+	ror	r14d,2
+	add	r10d,ecx
+	add	ecx,r15d
+	mov	r13d,r10d
+	add	r14d,ecx
+	ror	r13d,14
+	mov	ecx,r14d
+	mov	r12d,r11d
+	ror	r14d,9
+	xor	r13d,r10d
+	xor	r12d,eax
+	ror	r13d,5
+	xor	r14d,ecx
+	and	r12d,r10d
+	xor	r13d,r10d
+	add	ebx,DWORD[56+rsp]
+	mov	r15d,ecx
+	xor	r12d,eax
+	ror	r14d,11
+	xor	r15d,edx
+	add	ebx,r12d
+	ror	r13d,6
+	and	edi,r15d
+	xor	r14d,ecx
+	add	ebx,r13d
+	xor	edi,edx
+	ror	r14d,2
+	add	r9d,ebx
+	add	ebx,edi
+	mov	r13d,r9d
+	add	r14d,ebx
+	ror	r13d,14
+	mov	ebx,r14d
+	mov	r12d,r10d
+	ror	r14d,9
+	xor	r13d,r9d
+	xor	r12d,r11d
+	ror	r13d,5
+	xor	r14d,ebx
+	and	r12d,r9d
+	xor	r13d,r9d
+	add	eax,DWORD[60+rsp]
+	mov	edi,ebx
+	xor	r12d,r11d
+	ror	r14d,11
+	xor	edi,ecx
+	add	eax,r12d
+	ror	r13d,6
+	and	r15d,edi
+	xor	r14d,ebx
+	add	eax,r13d
+	xor	r15d,ecx
+	ror	r14d,2
+	add	r8d,eax
+	add	eax,r15d
+	mov	r13d,r8d
+	add	r14d,eax
+	mov	rdi,QWORD[((64+0))+rsp]
+	mov	eax,r14d
+
+	add	eax,DWORD[rdi]
+	lea	rsi,[64+rsi]
+	add	ebx,DWORD[4+rdi]
+	add	ecx,DWORD[8+rdi]
+	add	edx,DWORD[12+rdi]
+	add	r8d,DWORD[16+rdi]
+	add	r9d,DWORD[20+rdi]
+	add	r10d,DWORD[24+rdi]
+	add	r11d,DWORD[28+rdi]
+
+	cmp	rsi,QWORD[((64+16))+rsp]
+
+	mov	DWORD[rdi],eax
+	mov	DWORD[4+rdi],ebx
+	mov	DWORD[8+rdi],ecx
+	mov	DWORD[12+rdi],edx
+	mov	DWORD[16+rdi],r8d
+	mov	DWORD[20+rdi],r9d
+	mov	DWORD[24+rdi],r10d
+	mov	DWORD[28+rdi],r11d
+	jb	NEAR $L$loop_ssse3
+
+	mov	rsi,QWORD[((64+24))+rsp]
+	movaps	xmm6,XMMWORD[((64+32))+rsp]
+	movaps	xmm7,XMMWORD[((64+48))+rsp]
+	movaps	xmm8,XMMWORD[((64+64))+rsp]
+	movaps	xmm9,XMMWORD[((64+80))+rsp]
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$epilogue_ssse3:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_sha256_block_data_order_ssse3:
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+	mov	rsi,rax
+	mov	rax,QWORD[((64+24))+rax]
+	lea	rax,[48+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	lea	rsi,[((64+32))+rsi]
+	lea	rdi,[512+r8]
+	mov	ecx,8
+	DD	0xa548f3fc
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_sha256_block_data_order wrt ..imagebase
+	DD	$L$SEH_end_sha256_block_data_order wrt ..imagebase
+	DD	$L$SEH_info_sha256_block_data_order wrt ..imagebase
+	DD	$L$SEH_begin_sha256_block_data_order_ssse3 wrt ..imagebase
+	DD	$L$SEH_end_sha256_block_data_order_ssse3 wrt ..imagebase
+	DD	$L$SEH_info_sha256_block_data_order_ssse3 wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_sha256_block_data_order:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
+$L$SEH_info_sha256_block_data_order_ssse3:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$prologue_ssse3 wrt ..imagebase,$L$epilogue_ssse3 wrt ..imagebase
diff --git a/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm b/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm
new file mode 100644
index 0000000..b76cc0e
--- /dev/null
+++ b/third_party/boringssl/win-x86_64/crypto/sha/sha512-x86_64.asm
@@ -0,0 +1,1911 @@
+default	rel
+%define XMMWORD
+%define YMMWORD
+%define ZMMWORD
+section	.text code align=64
+
+
+EXTERN	OPENSSL_ia32cap_P
+global	sha512_block_data_order
+
+ALIGN	16
+sha512_block_data_order:
+	mov	QWORD[8+rsp],rdi	;WIN64 prologue
+	mov	QWORD[16+rsp],rsi
+	mov	rax,rsp
+$L$SEH_begin_sha512_block_data_order:
+	mov	rdi,rcx
+	mov	rsi,rdx
+	mov	rdx,r8
+
+
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	mov	r11,rsp
+	shl	rdx,4
+	sub	rsp,16*8+4*8
+	lea	rdx,[rdx*8+rsi]
+	and	rsp,-64
+	mov	QWORD[((128+0))+rsp],rdi
+	mov	QWORD[((128+8))+rsp],rsi
+	mov	QWORD[((128+16))+rsp],rdx
+	mov	QWORD[((128+24))+rsp],r11
+$L$prologue:
+
+	mov	rax,QWORD[rdi]
+	mov	rbx,QWORD[8+rdi]
+	mov	rcx,QWORD[16+rdi]
+	mov	rdx,QWORD[24+rdi]
+	mov	r8,QWORD[32+rdi]
+	mov	r9,QWORD[40+rdi]
+	mov	r10,QWORD[48+rdi]
+	mov	r11,QWORD[56+rdi]
+	jmp	NEAR $L$loop
+
+ALIGN	16
+$L$loop:
+	mov	rdi,rbx
+	lea	rbp,[K512]
+	xor	rdi,rcx
+	mov	r12,QWORD[rsi]
+	mov	r13,r8
+	mov	r14,rax
+	bswap	r12
+	ror	r13,23
+	mov	r15,r9
+
+	xor	r13,r8
+	ror	r14,5
+	xor	r15,r10
+
+	mov	QWORD[rsp],r12
+	xor	r14,rax
+	and	r15,r8
+
+	ror	r13,4
+	add	r12,r11
+	xor	r15,r10
+
+	ror	r14,6
+	xor	r13,r8
+	add	r12,r15
+
+	mov	r15,rax
+	add	r12,QWORD[rbp]
+	xor	r14,rax
+
+	xor	r15,rbx
+	ror	r13,14
+	mov	r11,rbx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r11,rdi
+	add	rdx,r12
+	add	r11,r12
+
+	lea	rbp,[8+rbp]
+	add	r11,r14
+	mov	r12,QWORD[8+rsi]
+	mov	r13,rdx
+	mov	r14,r11
+	bswap	r12
+	ror	r13,23
+	mov	rdi,r8
+
+	xor	r13,rdx
+	ror	r14,5
+	xor	rdi,r9
+
+	mov	QWORD[8+rsp],r12
+	xor	r14,r11
+	and	rdi,rdx
+
+	ror	r13,4
+	add	r12,r10
+	xor	rdi,r9
+
+	ror	r14,6
+	xor	r13,rdx
+	add	r12,rdi
+
+	mov	rdi,r11
+	add	r12,QWORD[rbp]
+	xor	r14,r11
+
+	xor	rdi,rax
+	ror	r13,14
+	mov	r10,rax
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r10,r15
+	add	rcx,r12
+	add	r10,r12
+
+	lea	rbp,[24+rbp]
+	add	r10,r14
+	mov	r12,QWORD[16+rsi]
+	mov	r13,rcx
+	mov	r14,r10
+	bswap	r12
+	ror	r13,23
+	mov	r15,rdx
+
+	xor	r13,rcx
+	ror	r14,5
+	xor	r15,r8
+
+	mov	QWORD[16+rsp],r12
+	xor	r14,r10
+	and	r15,rcx
+
+	ror	r13,4
+	add	r12,r9
+	xor	r15,r8
+
+	ror	r14,6
+	xor	r13,rcx
+	add	r12,r15
+
+	mov	r15,r10
+	add	r12,QWORD[rbp]
+	xor	r14,r10
+
+	xor	r15,r11
+	ror	r13,14
+	mov	r9,r11
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r9,rdi
+	add	rbx,r12
+	add	r9,r12
+
+	lea	rbp,[8+rbp]
+	add	r9,r14
+	mov	r12,QWORD[24+rsi]
+	mov	r13,rbx
+	mov	r14,r9
+	bswap	r12
+	ror	r13,23
+	mov	rdi,rcx
+
+	xor	r13,rbx
+	ror	r14,5
+	xor	rdi,rdx
+
+	mov	QWORD[24+rsp],r12
+	xor	r14,r9
+	and	rdi,rbx
+
+	ror	r13,4
+	add	r12,r8
+	xor	rdi,rdx
+
+	ror	r14,6
+	xor	r13,rbx
+	add	r12,rdi
+
+	mov	rdi,r9
+	add	r12,QWORD[rbp]
+	xor	r14,r9
+
+	xor	rdi,r10
+	ror	r13,14
+	mov	r8,r10
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r8,r15
+	add	rax,r12
+	add	r8,r12
+
+	lea	rbp,[24+rbp]
+	add	r8,r14
+	mov	r12,QWORD[32+rsi]
+	mov	r13,rax
+	mov	r14,r8
+	bswap	r12
+	ror	r13,23
+	mov	r15,rbx
+
+	xor	r13,rax
+	ror	r14,5
+	xor	r15,rcx
+
+	mov	QWORD[32+rsp],r12
+	xor	r14,r8
+	and	r15,rax
+
+	ror	r13,4
+	add	r12,rdx
+	xor	r15,rcx
+
+	ror	r14,6
+	xor	r13,rax
+	add	r12,r15
+
+	mov	r15,r8
+	add	r12,QWORD[rbp]
+	xor	r14,r8
+
+	xor	r15,r9
+	ror	r13,14
+	mov	rdx,r9
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rdx,rdi
+	add	r11,r12
+	add	rdx,r12
+
+	lea	rbp,[8+rbp]
+	add	rdx,r14
+	mov	r12,QWORD[40+rsi]
+	mov	r13,r11
+	mov	r14,rdx
+	bswap	r12
+	ror	r13,23
+	mov	rdi,rax
+
+	xor	r13,r11
+	ror	r14,5
+	xor	rdi,rbx
+
+	mov	QWORD[40+rsp],r12
+	xor	r14,rdx
+	and	rdi,r11
+
+	ror	r13,4
+	add	r12,rcx
+	xor	rdi,rbx
+
+	ror	r14,6
+	xor	r13,r11
+	add	r12,rdi
+
+	mov	rdi,rdx
+	add	r12,QWORD[rbp]
+	xor	r14,rdx
+
+	xor	rdi,r8
+	ror	r13,14
+	mov	rcx,r8
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rcx,r15
+	add	r10,r12
+	add	rcx,r12
+
+	lea	rbp,[24+rbp]
+	add	rcx,r14
+	mov	r12,QWORD[48+rsi]
+	mov	r13,r10
+	mov	r14,rcx
+	bswap	r12
+	ror	r13,23
+	mov	r15,r11
+
+	xor	r13,r10
+	ror	r14,5
+	xor	r15,rax
+
+	mov	QWORD[48+rsp],r12
+	xor	r14,rcx
+	and	r15,r10
+
+	ror	r13,4
+	add	r12,rbx
+	xor	r15,rax
+
+	ror	r14,6
+	xor	r13,r10
+	add	r12,r15
+
+	mov	r15,rcx
+	add	r12,QWORD[rbp]
+	xor	r14,rcx
+
+	xor	r15,rdx
+	ror	r13,14
+	mov	rbx,rdx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rbx,rdi
+	add	r9,r12
+	add	rbx,r12
+
+	lea	rbp,[8+rbp]
+	add	rbx,r14
+	mov	r12,QWORD[56+rsi]
+	mov	r13,r9
+	mov	r14,rbx
+	bswap	r12
+	ror	r13,23
+	mov	rdi,r10
+
+	xor	r13,r9
+	ror	r14,5
+	xor	rdi,r11
+
+	mov	QWORD[56+rsp],r12
+	xor	r14,rbx
+	and	rdi,r9
+
+	ror	r13,4
+	add	r12,rax
+	xor	rdi,r11
+
+	ror	r14,6
+	xor	r13,r9
+	add	r12,rdi
+
+	mov	rdi,rbx
+	add	r12,QWORD[rbp]
+	xor	r14,rbx
+
+	xor	rdi,rcx
+	ror	r13,14
+	mov	rax,rcx
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rax,r15
+	add	r8,r12
+	add	rax,r12
+
+	lea	rbp,[24+rbp]
+	add	rax,r14
+	mov	r12,QWORD[64+rsi]
+	mov	r13,r8
+	mov	r14,rax
+	bswap	r12
+	ror	r13,23
+	mov	r15,r9
+
+	xor	r13,r8
+	ror	r14,5
+	xor	r15,r10
+
+	mov	QWORD[64+rsp],r12
+	xor	r14,rax
+	and	r15,r8
+
+	ror	r13,4
+	add	r12,r11
+	xor	r15,r10
+
+	ror	r14,6
+	xor	r13,r8
+	add	r12,r15
+
+	mov	r15,rax
+	add	r12,QWORD[rbp]
+	xor	r14,rax
+
+	xor	r15,rbx
+	ror	r13,14
+	mov	r11,rbx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r11,rdi
+	add	rdx,r12
+	add	r11,r12
+
+	lea	rbp,[8+rbp]
+	add	r11,r14
+	mov	r12,QWORD[72+rsi]
+	mov	r13,rdx
+	mov	r14,r11
+	bswap	r12
+	ror	r13,23
+	mov	rdi,r8
+
+	xor	r13,rdx
+	ror	r14,5
+	xor	rdi,r9
+
+	mov	QWORD[72+rsp],r12
+	xor	r14,r11
+	and	rdi,rdx
+
+	ror	r13,4
+	add	r12,r10
+	xor	rdi,r9
+
+	ror	r14,6
+	xor	r13,rdx
+	add	r12,rdi
+
+	mov	rdi,r11
+	add	r12,QWORD[rbp]
+	xor	r14,r11
+
+	xor	rdi,rax
+	ror	r13,14
+	mov	r10,rax
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r10,r15
+	add	rcx,r12
+	add	r10,r12
+
+	lea	rbp,[24+rbp]
+	add	r10,r14
+	mov	r12,QWORD[80+rsi]
+	mov	r13,rcx
+	mov	r14,r10
+	bswap	r12
+	ror	r13,23
+	mov	r15,rdx
+
+	xor	r13,rcx
+	ror	r14,5
+	xor	r15,r8
+
+	mov	QWORD[80+rsp],r12
+	xor	r14,r10
+	and	r15,rcx
+
+	ror	r13,4
+	add	r12,r9
+	xor	r15,r8
+
+	ror	r14,6
+	xor	r13,rcx
+	add	r12,r15
+
+	mov	r15,r10
+	add	r12,QWORD[rbp]
+	xor	r14,r10
+
+	xor	r15,r11
+	ror	r13,14
+	mov	r9,r11
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r9,rdi
+	add	rbx,r12
+	add	r9,r12
+
+	lea	rbp,[8+rbp]
+	add	r9,r14
+	mov	r12,QWORD[88+rsi]
+	mov	r13,rbx
+	mov	r14,r9
+	bswap	r12
+	ror	r13,23
+	mov	rdi,rcx
+
+	xor	r13,rbx
+	ror	r14,5
+	xor	rdi,rdx
+
+	mov	QWORD[88+rsp],r12
+	xor	r14,r9
+	and	rdi,rbx
+
+	ror	r13,4
+	add	r12,r8
+	xor	rdi,rdx
+
+	ror	r14,6
+	xor	r13,rbx
+	add	r12,rdi
+
+	mov	rdi,r9
+	add	r12,QWORD[rbp]
+	xor	r14,r9
+
+	xor	rdi,r10
+	ror	r13,14
+	mov	r8,r10
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r8,r15
+	add	rax,r12
+	add	r8,r12
+
+	lea	rbp,[24+rbp]
+	add	r8,r14
+	mov	r12,QWORD[96+rsi]
+	mov	r13,rax
+	mov	r14,r8
+	bswap	r12
+	ror	r13,23
+	mov	r15,rbx
+
+	xor	r13,rax
+	ror	r14,5
+	xor	r15,rcx
+
+	mov	QWORD[96+rsp],r12
+	xor	r14,r8
+	and	r15,rax
+
+	ror	r13,4
+	add	r12,rdx
+	xor	r15,rcx
+
+	ror	r14,6
+	xor	r13,rax
+	add	r12,r15
+
+	mov	r15,r8
+	add	r12,QWORD[rbp]
+	xor	r14,r8
+
+	xor	r15,r9
+	ror	r13,14
+	mov	rdx,r9
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rdx,rdi
+	add	r11,r12
+	add	rdx,r12
+
+	lea	rbp,[8+rbp]
+	add	rdx,r14
+	mov	r12,QWORD[104+rsi]
+	mov	r13,r11
+	mov	r14,rdx
+	bswap	r12
+	ror	r13,23
+	mov	rdi,rax
+
+	xor	r13,r11
+	ror	r14,5
+	xor	rdi,rbx
+
+	mov	QWORD[104+rsp],r12
+	xor	r14,rdx
+	and	rdi,r11
+
+	ror	r13,4
+	add	r12,rcx
+	xor	rdi,rbx
+
+	ror	r14,6
+	xor	r13,r11
+	add	r12,rdi
+
+	mov	rdi,rdx
+	add	r12,QWORD[rbp]
+	xor	r14,rdx
+
+	xor	rdi,r8
+	ror	r13,14
+	mov	rcx,r8
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rcx,r15
+	add	r10,r12
+	add	rcx,r12
+
+	lea	rbp,[24+rbp]
+	add	rcx,r14
+	mov	r12,QWORD[112+rsi]
+	mov	r13,r10
+	mov	r14,rcx
+	bswap	r12
+	ror	r13,23
+	mov	r15,r11
+
+	xor	r13,r10
+	ror	r14,5
+	xor	r15,rax
+
+	mov	QWORD[112+rsp],r12
+	xor	r14,rcx
+	and	r15,r10
+
+	ror	r13,4
+	add	r12,rbx
+	xor	r15,rax
+
+	ror	r14,6
+	xor	r13,r10
+	add	r12,r15
+
+	mov	r15,rcx
+	add	r12,QWORD[rbp]
+	xor	r14,rcx
+
+	xor	r15,rdx
+	ror	r13,14
+	mov	rbx,rdx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rbx,rdi
+	add	r9,r12
+	add	rbx,r12
+
+	lea	rbp,[8+rbp]
+	add	rbx,r14
+	mov	r12,QWORD[120+rsi]
+	mov	r13,r9
+	mov	r14,rbx
+	bswap	r12
+	ror	r13,23
+	mov	rdi,r10
+
+	xor	r13,r9
+	ror	r14,5
+	xor	rdi,r11
+
+	mov	QWORD[120+rsp],r12
+	xor	r14,rbx
+	and	rdi,r9
+
+	ror	r13,4
+	add	r12,rax
+	xor	rdi,r11
+
+	ror	r14,6
+	xor	r13,r9
+	add	r12,rdi
+
+	mov	rdi,rbx
+	add	r12,QWORD[rbp]
+	xor	r14,rbx
+
+	xor	rdi,rcx
+	ror	r13,14
+	mov	rax,rcx
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rax,r15
+	add	r8,r12
+	add	rax,r12
+
+	lea	rbp,[24+rbp]
+	jmp	NEAR $L$rounds_16_xx
+ALIGN	16
+$L$rounds_16_xx:
+	mov	r13,QWORD[8+rsp]
+	mov	r15,QWORD[112+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rax,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[72+rsp]
+
+	add	r12,QWORD[rsp]
+	mov	r13,r8
+	add	r12,r15
+	mov	r14,rax
+	ror	r13,23
+	mov	r15,r9
+
+	xor	r13,r8
+	ror	r14,5
+	xor	r15,r10
+
+	mov	QWORD[rsp],r12
+	xor	r14,rax
+	and	r15,r8
+
+	ror	r13,4
+	add	r12,r11
+	xor	r15,r10
+
+	ror	r14,6
+	xor	r13,r8
+	add	r12,r15
+
+	mov	r15,rax
+	add	r12,QWORD[rbp]
+	xor	r14,rax
+
+	xor	r15,rbx
+	ror	r13,14
+	mov	r11,rbx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r11,rdi
+	add	rdx,r12
+	add	r11,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[16+rsp]
+	mov	rdi,QWORD[120+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r11,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[80+rsp]
+
+	add	r12,QWORD[8+rsp]
+	mov	r13,rdx
+	add	r12,rdi
+	mov	r14,r11
+	ror	r13,23
+	mov	rdi,r8
+
+	xor	r13,rdx
+	ror	r14,5
+	xor	rdi,r9
+
+	mov	QWORD[8+rsp],r12
+	xor	r14,r11
+	and	rdi,rdx
+
+	ror	r13,4
+	add	r12,r10
+	xor	rdi,r9
+
+	ror	r14,6
+	xor	r13,rdx
+	add	r12,rdi
+
+	mov	rdi,r11
+	add	r12,QWORD[rbp]
+	xor	r14,r11
+
+	xor	rdi,rax
+	ror	r13,14
+	mov	r10,rax
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r10,r15
+	add	rcx,r12
+	add	r10,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[24+rsp]
+	mov	r15,QWORD[rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r10,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[88+rsp]
+
+	add	r12,QWORD[16+rsp]
+	mov	r13,rcx
+	add	r12,r15
+	mov	r14,r10
+	ror	r13,23
+	mov	r15,rdx
+
+	xor	r13,rcx
+	ror	r14,5
+	xor	r15,r8
+
+	mov	QWORD[16+rsp],r12
+	xor	r14,r10
+	and	r15,rcx
+
+	ror	r13,4
+	add	r12,r9
+	xor	r15,r8
+
+	ror	r14,6
+	xor	r13,rcx
+	add	r12,r15
+
+	mov	r15,r10
+	add	r12,QWORD[rbp]
+	xor	r14,r10
+
+	xor	r15,r11
+	ror	r13,14
+	mov	r9,r11
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r9,rdi
+	add	rbx,r12
+	add	r9,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[32+rsp]
+	mov	rdi,QWORD[8+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r9,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[96+rsp]
+
+	add	r12,QWORD[24+rsp]
+	mov	r13,rbx
+	add	r12,rdi
+	mov	r14,r9
+	ror	r13,23
+	mov	rdi,rcx
+
+	xor	r13,rbx
+	ror	r14,5
+	xor	rdi,rdx
+
+	mov	QWORD[24+rsp],r12
+	xor	r14,r9
+	and	rdi,rbx
+
+	ror	r13,4
+	add	r12,r8
+	xor	rdi,rdx
+
+	ror	r14,6
+	xor	r13,rbx
+	add	r12,rdi
+
+	mov	rdi,r9
+	add	r12,QWORD[rbp]
+	xor	r14,r9
+
+	xor	rdi,r10
+	ror	r13,14
+	mov	r8,r10
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r8,r15
+	add	rax,r12
+	add	r8,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[40+rsp]
+	mov	r15,QWORD[16+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r8,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[104+rsp]
+
+	add	r12,QWORD[32+rsp]
+	mov	r13,rax
+	add	r12,r15
+	mov	r14,r8
+	ror	r13,23
+	mov	r15,rbx
+
+	xor	r13,rax
+	ror	r14,5
+	xor	r15,rcx
+
+	mov	QWORD[32+rsp],r12
+	xor	r14,r8
+	and	r15,rax
+
+	ror	r13,4
+	add	r12,rdx
+	xor	r15,rcx
+
+	ror	r14,6
+	xor	r13,rax
+	add	r12,r15
+
+	mov	r15,r8
+	add	r12,QWORD[rbp]
+	xor	r14,r8
+
+	xor	r15,r9
+	ror	r13,14
+	mov	rdx,r9
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rdx,rdi
+	add	r11,r12
+	add	rdx,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[48+rsp]
+	mov	rdi,QWORD[24+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rdx,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[112+rsp]
+
+	add	r12,QWORD[40+rsp]
+	mov	r13,r11
+	add	r12,rdi
+	mov	r14,rdx
+	ror	r13,23
+	mov	rdi,rax
+
+	xor	r13,r11
+	ror	r14,5
+	xor	rdi,rbx
+
+	mov	QWORD[40+rsp],r12
+	xor	r14,rdx
+	and	rdi,r11
+
+	ror	r13,4
+	add	r12,rcx
+	xor	rdi,rbx
+
+	ror	r14,6
+	xor	r13,r11
+	add	r12,rdi
+
+	mov	rdi,rdx
+	add	r12,QWORD[rbp]
+	xor	r14,rdx
+
+	xor	rdi,r8
+	ror	r13,14
+	mov	rcx,r8
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rcx,r15
+	add	r10,r12
+	add	rcx,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[56+rsp]
+	mov	r15,QWORD[32+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rcx,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[120+rsp]
+
+	add	r12,QWORD[48+rsp]
+	mov	r13,r10
+	add	r12,r15
+	mov	r14,rcx
+	ror	r13,23
+	mov	r15,r11
+
+	xor	r13,r10
+	ror	r14,5
+	xor	r15,rax
+
+	mov	QWORD[48+rsp],r12
+	xor	r14,rcx
+	and	r15,r10
+
+	ror	r13,4
+	add	r12,rbx
+	xor	r15,rax
+
+	ror	r14,6
+	xor	r13,r10
+	add	r12,r15
+
+	mov	r15,rcx
+	add	r12,QWORD[rbp]
+	xor	r14,rcx
+
+	xor	r15,rdx
+	ror	r13,14
+	mov	rbx,rdx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rbx,rdi
+	add	r9,r12
+	add	rbx,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[64+rsp]
+	mov	rdi,QWORD[40+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rbx,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[rsp]
+
+	add	r12,QWORD[56+rsp]
+	mov	r13,r9
+	add	r12,rdi
+	mov	r14,rbx
+	ror	r13,23
+	mov	rdi,r10
+
+	xor	r13,r9
+	ror	r14,5
+	xor	rdi,r11
+
+	mov	QWORD[56+rsp],r12
+	xor	r14,rbx
+	and	rdi,r9
+
+	ror	r13,4
+	add	r12,rax
+	xor	rdi,r11
+
+	ror	r14,6
+	xor	r13,r9
+	add	r12,rdi
+
+	mov	rdi,rbx
+	add	r12,QWORD[rbp]
+	xor	r14,rbx
+
+	xor	rdi,rcx
+	ror	r13,14
+	mov	rax,rcx
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rax,r15
+	add	r8,r12
+	add	rax,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[72+rsp]
+	mov	r15,QWORD[48+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rax,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[8+rsp]
+
+	add	r12,QWORD[64+rsp]
+	mov	r13,r8
+	add	r12,r15
+	mov	r14,rax
+	ror	r13,23
+	mov	r15,r9
+
+	xor	r13,r8
+	ror	r14,5
+	xor	r15,r10
+
+	mov	QWORD[64+rsp],r12
+	xor	r14,rax
+	and	r15,r8
+
+	ror	r13,4
+	add	r12,r11
+	xor	r15,r10
+
+	ror	r14,6
+	xor	r13,r8
+	add	r12,r15
+
+	mov	r15,rax
+	add	r12,QWORD[rbp]
+	xor	r14,rax
+
+	xor	r15,rbx
+	ror	r13,14
+	mov	r11,rbx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r11,rdi
+	add	rdx,r12
+	add	r11,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[80+rsp]
+	mov	rdi,QWORD[56+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r11,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[16+rsp]
+
+	add	r12,QWORD[72+rsp]
+	mov	r13,rdx
+	add	r12,rdi
+	mov	r14,r11
+	ror	r13,23
+	mov	rdi,r8
+
+	xor	r13,rdx
+	ror	r14,5
+	xor	rdi,r9
+
+	mov	QWORD[72+rsp],r12
+	xor	r14,r11
+	and	rdi,rdx
+
+	ror	r13,4
+	add	r12,r10
+	xor	rdi,r9
+
+	ror	r14,6
+	xor	r13,rdx
+	add	r12,rdi
+
+	mov	rdi,r11
+	add	r12,QWORD[rbp]
+	xor	r14,r11
+
+	xor	rdi,rax
+	ror	r13,14
+	mov	r10,rax
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r10,r15
+	add	rcx,r12
+	add	r10,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[88+rsp]
+	mov	r15,QWORD[64+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r10,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[24+rsp]
+
+	add	r12,QWORD[80+rsp]
+	mov	r13,rcx
+	add	r12,r15
+	mov	r14,r10
+	ror	r13,23
+	mov	r15,rdx
+
+	xor	r13,rcx
+	ror	r14,5
+	xor	r15,r8
+
+	mov	QWORD[80+rsp],r12
+	xor	r14,r10
+	and	r15,rcx
+
+	ror	r13,4
+	add	r12,r9
+	xor	r15,r8
+
+	ror	r14,6
+	xor	r13,rcx
+	add	r12,r15
+
+	mov	r15,r10
+	add	r12,QWORD[rbp]
+	xor	r14,r10
+
+	xor	r15,r11
+	ror	r13,14
+	mov	r9,r11
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	r9,rdi
+	add	rbx,r12
+	add	r9,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[96+rsp]
+	mov	rdi,QWORD[72+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r9,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[32+rsp]
+
+	add	r12,QWORD[88+rsp]
+	mov	r13,rbx
+	add	r12,rdi
+	mov	r14,r9
+	ror	r13,23
+	mov	rdi,rcx
+
+	xor	r13,rbx
+	ror	r14,5
+	xor	rdi,rdx
+
+	mov	QWORD[88+rsp],r12
+	xor	r14,r9
+	and	rdi,rbx
+
+	ror	r13,4
+	add	r12,r8
+	xor	rdi,rdx
+
+	ror	r14,6
+	xor	r13,rbx
+	add	r12,rdi
+
+	mov	rdi,r9
+	add	r12,QWORD[rbp]
+	xor	r14,r9
+
+	xor	rdi,r10
+	ror	r13,14
+	mov	r8,r10
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	r8,r15
+	add	rax,r12
+	add	r8,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[104+rsp]
+	mov	r15,QWORD[80+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	r8,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[40+rsp]
+
+	add	r12,QWORD[96+rsp]
+	mov	r13,rax
+	add	r12,r15
+	mov	r14,r8
+	ror	r13,23
+	mov	r15,rbx
+
+	xor	r13,rax
+	ror	r14,5
+	xor	r15,rcx
+
+	mov	QWORD[96+rsp],r12
+	xor	r14,r8
+	and	r15,rax
+
+	ror	r13,4
+	add	r12,rdx
+	xor	r15,rcx
+
+	ror	r14,6
+	xor	r13,rax
+	add	r12,r15
+
+	mov	r15,r8
+	add	r12,QWORD[rbp]
+	xor	r14,r8
+
+	xor	r15,r9
+	ror	r13,14
+	mov	rdx,r9
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rdx,rdi
+	add	r11,r12
+	add	rdx,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[112+rsp]
+	mov	rdi,QWORD[88+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rdx,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[48+rsp]
+
+	add	r12,QWORD[104+rsp]
+	mov	r13,r11
+	add	r12,rdi
+	mov	r14,rdx
+	ror	r13,23
+	mov	rdi,rax
+
+	xor	r13,r11
+	ror	r14,5
+	xor	rdi,rbx
+
+	mov	QWORD[104+rsp],r12
+	xor	r14,rdx
+	and	rdi,r11
+
+	ror	r13,4
+	add	r12,rcx
+	xor	rdi,rbx
+
+	ror	r14,6
+	xor	r13,r11
+	add	r12,rdi
+
+	mov	rdi,rdx
+	add	r12,QWORD[rbp]
+	xor	r14,rdx
+
+	xor	rdi,r8
+	ror	r13,14
+	mov	rcx,r8
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rcx,r15
+	add	r10,r12
+	add	rcx,r12
+
+	lea	rbp,[24+rbp]
+	mov	r13,QWORD[120+rsp]
+	mov	r15,QWORD[96+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rcx,r14
+	mov	r14,r15
+	ror	r15,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	r15,r14
+	shr	r14,6
+
+	ror	r15,19
+	xor	r12,r13
+	xor	r15,r14
+	add	r12,QWORD[56+rsp]
+
+	add	r12,QWORD[112+rsp]
+	mov	r13,r10
+	add	r12,r15
+	mov	r14,rcx
+	ror	r13,23
+	mov	r15,r11
+
+	xor	r13,r10
+	ror	r14,5
+	xor	r15,rax
+
+	mov	QWORD[112+rsp],r12
+	xor	r14,rcx
+	and	r15,r10
+
+	ror	r13,4
+	add	r12,rbx
+	xor	r15,rax
+
+	ror	r14,6
+	xor	r13,r10
+	add	r12,r15
+
+	mov	r15,rcx
+	add	r12,QWORD[rbp]
+	xor	r14,rcx
+
+	xor	r15,rdx
+	ror	r13,14
+	mov	rbx,rdx
+
+	and	rdi,r15
+	ror	r14,28
+	add	r12,r13
+
+	xor	rbx,rdi
+	add	r9,r12
+	add	rbx,r12
+
+	lea	rbp,[8+rbp]
+	mov	r13,QWORD[rsp]
+	mov	rdi,QWORD[104+rsp]
+
+	mov	r12,r13
+	ror	r13,7
+	add	rbx,r14
+	mov	r14,rdi
+	ror	rdi,42
+
+	xor	r13,r12
+	shr	r12,7
+	ror	r13,1
+	xor	rdi,r14
+	shr	r14,6
+
+	ror	rdi,19
+	xor	r12,r13
+	xor	rdi,r14
+	add	r12,QWORD[64+rsp]
+
+	add	r12,QWORD[120+rsp]
+	mov	r13,r9
+	add	r12,rdi
+	mov	r14,rbx
+	ror	r13,23
+	mov	rdi,r10
+
+	xor	r13,r9
+	ror	r14,5
+	xor	rdi,r11
+
+	mov	QWORD[120+rsp],r12
+	xor	r14,rbx
+	and	rdi,r9
+
+	ror	r13,4
+	add	r12,rax
+	xor	rdi,r11
+
+	ror	r14,6
+	xor	r13,r9
+	add	r12,rdi
+
+	mov	rdi,rbx
+	add	r12,QWORD[rbp]
+	xor	r14,rbx
+
+	xor	rdi,rcx
+	ror	r13,14
+	mov	rax,rcx
+
+	and	r15,rdi
+	ror	r14,28
+	add	r12,r13
+
+	xor	rax,r15
+	add	r8,r12
+	add	rax,r12
+
+	lea	rbp,[24+rbp]
+	cmp	BYTE[7+rbp],0
+	jnz	NEAR $L$rounds_16_xx
+
+	mov	rdi,QWORD[((128+0))+rsp]
+	add	rax,r14
+	lea	rsi,[128+rsi]
+
+	add	rax,QWORD[rdi]
+	add	rbx,QWORD[8+rdi]
+	add	rcx,QWORD[16+rdi]
+	add	rdx,QWORD[24+rdi]
+	add	r8,QWORD[32+rdi]
+	add	r9,QWORD[40+rdi]
+	add	r10,QWORD[48+rdi]
+	add	r11,QWORD[56+rdi]
+
+	cmp	rsi,QWORD[((128+16))+rsp]
+
+	mov	QWORD[rdi],rax
+	mov	QWORD[8+rdi],rbx
+	mov	QWORD[16+rdi],rcx
+	mov	QWORD[24+rdi],rdx
+	mov	QWORD[32+rdi],r8
+	mov	QWORD[40+rdi],r9
+	mov	QWORD[48+rdi],r10
+	mov	QWORD[56+rdi],r11
+	jb	NEAR $L$loop
+
+	mov	rsi,QWORD[((128+24))+rsp]
+	mov	r15,QWORD[rsi]
+	mov	r14,QWORD[8+rsi]
+	mov	r13,QWORD[16+rsi]
+	mov	r12,QWORD[24+rsi]
+	mov	rbp,QWORD[32+rsi]
+	mov	rbx,QWORD[40+rsi]
+	lea	rsp,[48+rsi]
+$L$epilogue:
+	mov	rdi,QWORD[8+rsp]	;WIN64 epilogue
+	mov	rsi,QWORD[16+rsp]
+	DB	0F3h,0C3h		;repret
+$L$SEH_end_sha512_block_data_order:
+ALIGN	64
+
+K512:
+	DQ	0x428a2f98d728ae22,0x7137449123ef65cd
+	DQ	0x428a2f98d728ae22,0x7137449123ef65cd
+	DQ	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+	DQ	0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
+	DQ	0x3956c25bf348b538,0x59f111f1b605d019
+	DQ	0x3956c25bf348b538,0x59f111f1b605d019
+	DQ	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+	DQ	0x923f82a4af194f9b,0xab1c5ed5da6d8118
+	DQ	0xd807aa98a3030242,0x12835b0145706fbe
+	DQ	0xd807aa98a3030242,0x12835b0145706fbe
+	DQ	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+	DQ	0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
+	DQ	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+	DQ	0x72be5d74f27b896f,0x80deb1fe3b1696b1
+	DQ	0x9bdc06a725c71235,0xc19bf174cf692694
+	DQ	0x9bdc06a725c71235,0xc19bf174cf692694
+	DQ	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+	DQ	0xe49b69c19ef14ad2,0xefbe4786384f25e3
+	DQ	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+	DQ	0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
+	DQ	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+	DQ	0x2de92c6f592b0275,0x4a7484aa6ea6e483
+	DQ	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+	DQ	0x5cb0a9dcbd41fbd4,0x76f988da831153b5
+	DQ	0x983e5152ee66dfab,0xa831c66d2db43210
+	DQ	0x983e5152ee66dfab,0xa831c66d2db43210
+	DQ	0xb00327c898fb213f,0xbf597fc7beef0ee4
+	DQ	0xb00327c898fb213f,0xbf597fc7beef0ee4
+	DQ	0xc6e00bf33da88fc2,0xd5a79147930aa725
+	DQ	0xc6e00bf33da88fc2,0xd5a79147930aa725
+	DQ	0x06ca6351e003826f,0x142929670a0e6e70
+	DQ	0x06ca6351e003826f,0x142929670a0e6e70
+	DQ	0x27b70a8546d22ffc,0x2e1b21385c26c926
+	DQ	0x27b70a8546d22ffc,0x2e1b21385c26c926
+	DQ	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+	DQ	0x4d2c6dfc5ac42aed,0x53380d139d95b3df
+	DQ	0x650a73548baf63de,0x766a0abb3c77b2a8
+	DQ	0x650a73548baf63de,0x766a0abb3c77b2a8
+	DQ	0x81c2c92e47edaee6,0x92722c851482353b
+	DQ	0x81c2c92e47edaee6,0x92722c851482353b
+	DQ	0xa2bfe8a14cf10364,0xa81a664bbc423001
+	DQ	0xa2bfe8a14cf10364,0xa81a664bbc423001
+	DQ	0xc24b8b70d0f89791,0xc76c51a30654be30
+	DQ	0xc24b8b70d0f89791,0xc76c51a30654be30
+	DQ	0xd192e819d6ef5218,0xd69906245565a910
+	DQ	0xd192e819d6ef5218,0xd69906245565a910
+	DQ	0xf40e35855771202a,0x106aa07032bbd1b8
+	DQ	0xf40e35855771202a,0x106aa07032bbd1b8
+	DQ	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+	DQ	0x19a4c116b8d2d0c8,0x1e376c085141ab53
+	DQ	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+	DQ	0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
+	DQ	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+	DQ	0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
+	DQ	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+	DQ	0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
+	DQ	0x748f82ee5defb2fc,0x78a5636f43172f60
+	DQ	0x748f82ee5defb2fc,0x78a5636f43172f60
+	DQ	0x84c87814a1f0ab72,0x8cc702081a6439ec
+	DQ	0x84c87814a1f0ab72,0x8cc702081a6439ec
+	DQ	0x90befffa23631e28,0xa4506cebde82bde9
+	DQ	0x90befffa23631e28,0xa4506cebde82bde9
+	DQ	0xbef9a3f7b2c67915,0xc67178f2e372532b
+	DQ	0xbef9a3f7b2c67915,0xc67178f2e372532b
+	DQ	0xca273eceea26619c,0xd186b8c721c0c207
+	DQ	0xca273eceea26619c,0xd186b8c721c0c207
+	DQ	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+	DQ	0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
+	DQ	0x06f067aa72176fba,0x0a637dc5a2c898a6
+	DQ	0x06f067aa72176fba,0x0a637dc5a2c898a6
+	DQ	0x113f9804bef90dae,0x1b710b35131c471b
+	DQ	0x113f9804bef90dae,0x1b710b35131c471b
+	DQ	0x28db77f523047d84,0x32caab7b40c72493
+	DQ	0x28db77f523047d84,0x32caab7b40c72493
+	DQ	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+	DQ	0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
+	DQ	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+	DQ	0x4cc5d4becb3e42b6,0x597f299cfc657e2a
+	DQ	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+	DQ	0x5fcb6fab3ad6faec,0x6c44198c4a475817
+
+	DQ	0x0001020304050607,0x08090a0b0c0d0e0f
+	DQ	0x0001020304050607,0x08090a0b0c0d0e0f
+DB	83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
+DB	110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
+DB	52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
+DB	32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
+DB	111,114,103,62,0
+EXTERN	__imp_RtlVirtualUnwind
+
+ALIGN	16
+se_handler:
+	push	rsi
+	push	rdi
+	push	rbx
+	push	rbp
+	push	r12
+	push	r13
+	push	r14
+	push	r15
+	pushfq
+	sub	rsp,64
+
+	mov	rax,QWORD[120+r8]
+	mov	rbx,QWORD[248+r8]
+
+	mov	rsi,QWORD[8+r9]
+	mov	r11,QWORD[56+r9]
+
+	mov	r10d,DWORD[r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	mov	rax,QWORD[152+r8]
+
+	mov	r10d,DWORD[4+r11]
+	lea	r10,[r10*1+rsi]
+	cmp	rbx,r10
+	jae	NEAR $L$in_prologue
+	mov	rsi,rax
+	mov	rax,QWORD[((128+24))+rax]
+	lea	rax,[48+rax]
+
+	mov	rbx,QWORD[((-8))+rax]
+	mov	rbp,QWORD[((-16))+rax]
+	mov	r12,QWORD[((-24))+rax]
+	mov	r13,QWORD[((-32))+rax]
+	mov	r14,QWORD[((-40))+rax]
+	mov	r15,QWORD[((-48))+rax]
+	mov	QWORD[144+r8],rbx
+	mov	QWORD[160+r8],rbp
+	mov	QWORD[216+r8],r12
+	mov	QWORD[224+r8],r13
+	mov	QWORD[232+r8],r14
+	mov	QWORD[240+r8],r15
+
+	lea	r10,[$L$epilogue]
+	cmp	rbx,r10
+	jb	NEAR $L$in_prologue
+
+	lea	rsi,[((128+32))+rsi]
+	lea	rdi,[512+r8]
+	mov	ecx,12
+	DD	0xa548f3fc
+
+$L$in_prologue:
+	mov	rdi,QWORD[8+rax]
+	mov	rsi,QWORD[16+rax]
+	mov	QWORD[152+r8],rax
+	mov	QWORD[168+r8],rsi
+	mov	QWORD[176+r8],rdi
+
+	mov	rdi,QWORD[40+r9]
+	mov	rsi,r8
+	mov	ecx,154
+	DD	0xa548f3fc
+
+	mov	rsi,r9
+	xor	rcx,rcx
+	mov	rdx,QWORD[8+rsi]
+	mov	r8,QWORD[rsi]
+	mov	r9,QWORD[16+rsi]
+	mov	r10,QWORD[40+rsi]
+	lea	r11,[56+rsi]
+	lea	r12,[24+rsi]
+	mov	QWORD[32+rsp],r10
+	mov	QWORD[40+rsp],r11
+	mov	QWORD[48+rsp],r12
+	mov	QWORD[56+rsp],rcx
+	call	QWORD[__imp_RtlVirtualUnwind]
+
+	mov	eax,1
+	add	rsp,64
+	popfq
+	pop	r15
+	pop	r14
+	pop	r13
+	pop	r12
+	pop	rbp
+	pop	rbx
+	pop	rdi
+	pop	rsi
+	DB	0F3h,0C3h		;repret
+
+section	.pdata rdata align=4
+ALIGN	4
+	DD	$L$SEH_begin_sha512_block_data_order wrt ..imagebase
+	DD	$L$SEH_end_sha512_block_data_order wrt ..imagebase
+	DD	$L$SEH_info_sha512_block_data_order wrt ..imagebase
+section	.xdata rdata align=8
+ALIGN	8
+$L$SEH_info_sha512_block_data_order:
+DB	9,0,0,0
+	DD	se_handler wrt ..imagebase
+	DD	$L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
diff --git a/tools/VERSION b/tools/VERSION
index 0922b88..aeb856f 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -25,7 +25,7 @@
 #
 CHANNEL dev
 MAJOR 1
-MINOR 12
+MINOR 13
 PATCH 0
-PRERELEASE 5
-PRERELEASE_PATCH 10
+PRERELEASE 0
+PRERELEASE_PATCH 0
diff --git a/tools/apps/update_homebrew/bin/update_homebrew.dart b/tools/apps/update_homebrew/bin/update_homebrew.dart
index d87631a..dbf10ab 100644
--- a/tools/apps/update_homebrew/bin/update_homebrew.dart
+++ b/tools/apps/update_homebrew/bin/update_homebrew.dart
@@ -107,74 +107,11 @@
 
   var stableVersion = await getVersion('stable', revisions['stable']);
 
-  await new File('$repository/dartium.rb').writeAsString(
-      createDartiumFormula(revisions, hashes, devVersion, stableVersion),
-      flush: true);
   await new File('$repository/dart.rb').writeAsString(
       createDartFormula(revisions, hashes, devVersion, stableVersion),
       flush: true);
 }
 
-String createDartiumFormula(
-    Map revisions, Map hashes, String devVersion, String stableVersion) => '''
-require 'formula'
-
-class Dartium < Formula
-  homepage "https://www.dartlang.org"
-
-  version '$stableVersion'
-  url '$urlBase/stable/release/${revisions['stable']}/$dartiumFile'
-  sha256 '${hashes['stable'][dartiumFile]}'
-
-  devel do
-    version '$devVersion'
-    url '$urlBase/dev/release/${revisions['dev']}/$dartiumFile'
-    sha256 '${hashes['dev'][dartiumFile]}'
-
-    resource 'content_shell' do
-      url '$urlBase/dev/release/${revisions['dev']}/$contentShellFile'
-      sha256 '${hashes['dev'][contentShellFile]}'
-    end
-  end
-
-  resource 'content_shell' do
-    url '$urlBase/stable/release/${revisions['stable']}/$contentShellFile'
-    sha256 '${hashes['stable'][contentShellFile]}'
-  end
-
-  def shim_script target
-    <<-EOS.undent
-      #!/bin/bash
-      exec "#{prefix}/#{target}" "\$@"
-    EOS
-  end
-
-  def install
-    dartium_binary = 'Chromium.app/Contents/MacOS/Chromium'
-    prefix.install Dir['*']
-    (bin+"dartium").write shim_script dartium_binary
-
-    content_shell_binary = 'Content Shell.app/Contents/MacOS/Content Shell'
-    prefix.install resource('content_shell')
-    (bin+"content_shell").write shim_script content_shell_binary
-  end
-
-  def caveats; <<-EOS.undent
-    DEPRECATED
-      In the future, use the `dart` formula using
-      `--with-dartium` and/or `--with-content-shell`
-
-    To use with IntelliJ, set the Dartium execute home to:
-        #{prefix}/Chromium.app
-    EOS
-  end
-
-  test do
-    system "#{bin}/dartium"
-  end
-end
-''';
-
 String createDartFormula(
     Map revisions, Map hashes, String devVersion, String stableVersion) => '''
 require 'formula'
diff --git a/tools/bots/bot_utils.py b/tools/bots/bot_utils.py
index 8262462..e5f5de2 100644
--- a/tools/bots/bot_utils.py
+++ b/tools/bots/bot_utils.py
@@ -263,25 +263,12 @@
   def execute(self, gsutil_args):
     self._layzCalculateGSUtilPath()
 
-    env = dict(os.environ)
-    # If we're on the buildbot, we use a specific boto file.
-    user_name = os.environ.get(
-        'USERNAME' if sys.platform == 'win32' else 'USER', '')
-    if user_name == 'chrome-bot':
-      boto_config = {
-        'Linux': '/mnt/data/b/build/site_config/.boto',
-        'Darwin': '/Volumes/data/b/build/site_config/.boto',
-        'Windows': r'e:\b\build\site_config\.boto',
-      }[platform.system()]
-      env['AWS_CREDENTIAL_FILE'] = boto_config
-      env['BOTO_CONFIG'] = boto_config
-
     if GSUtil.GSUTIL_IS_SHELL_SCRIPT:
       gsutil_command = [GSUtil.GSUTIL_PATH]
     else:
       gsutil_command = [sys.executable, GSUtil.GSUTIL_PATH]
 
-    return run(gsutil_command + gsutil_args, env=env,
+    return run(gsutil_command + gsutil_args,
                shell=(GSUtil.GSUTIL_IS_SHELL_SCRIPT and
                       sys.platform == 'win32'))
 
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 40244cb..3356940 100644
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -47,7 +47,7 @@
   with bot.BuildStep('Build API docs by dartdoc'):
     subprocess.call([dart_exe, '--package-root=' + packages_dir, dartdoc_dart, 
                     '--sdk-docs','--output', dirname, '--dart-sdk', dart_sdk, 
-                    '--footer' , footer_file, '--package-root=%s' % packages_dir], 
+                    '--footer' , footer_file], 
                      stdout=open(os.devnull, 'wb'))
 
 def CreateUploadVersionFile():
diff --git a/tools/dart2js/angular2_testing_deps/CURRENT_ANGULAR_DEPS b/tools/dart2js/angular2_testing_deps/CURRENT_ANGULAR_DEPS
index 8886d26..844cf2e 100644
--- a/tools/dart2js/angular2_testing_deps/CURRENT_ANGULAR_DEPS
+++ b/tools/dart2js/angular2_testing_deps/CURRENT_ANGULAR_DEPS
@@ -1 +1 @@
-0c282e826a3e35e6b6aa2dd430f899d159eaf458
+be0739085976bbdbcf8f560475e87b07343f464d
diff --git a/tools/deps/dartium.deps/DEPS b/tools/deps/dartium.deps/DEPS
index 44cfb744..38f937d5 100644
--- a/tools/deps/dartium.deps/DEPS
+++ b/tools/deps/dartium.deps/DEPS
@@ -13,7 +13,21 @@
   "dartium_chromium_commit": "62a7524d4f71c9e0858d24b0aa1bbff3a2d09bff",
   "chromium_base_revision": "297060",
   "dartium_webkit_branch": "/blink/branches/dart/2171_3/dartium",
-  "dartium_webkit_revision": "199763",
+  "dartium_webkit_revision": "201240",
+
+  # We use mirrors of all github repos to guarantee reproducibility and
+  # consistency between what users see and what the bots see.
+  # We need the mirrors to not have 100+ bots pulling github constantly.
+  # We mirror our github repos on chromium git servers.
+  # DO NOT use this var if you don't see a mirror here:
+  #   https://chromium.googlesource.com/
+  # named like:
+  #   external/github.com/dart-lang/NAME
+  # It is ok to add a dependency directly on dart-lang (dart-lang only)
+  # github repo until the mirror has been created, but please do file a bug
+  # against infra to make that happen.
+  "github_mirror":
+      "https://chromium.googlesource.com/external/github.com/dart-lang/%s.git",
 
   "args_tag": "@0.13.0",
   "barback_rev" : "@29ee90dbcf77cfd64632fa2797a4c8a4f29a4b51",
@@ -21,6 +35,7 @@
   "collection_rev": "@1da9a07f32efa2ba0c391b289e2037391e31da0e",
   "crypto_rev" : "@2df57a1e26dd88e8d0614207d4b062c73209917d",
   "csslib_tag" : "@0.12.0",
+  "dart2js_info_rev" : "@bad01369f1f605ab688d505c135db54de927318f",
   "glob_rev": "@704cf75e4f26b417505c5c611bdaacd8808467dd",
   "html_tag" : "@0.12.1+1",
   "http_rev" : "@9b93e1542c753090c50b46ef1592d44bc858bfe7",
@@ -34,7 +49,7 @@
   "metatest_rev": "@e5aa8e4e19fc4188ac2f6d38368a47d8f07c3df1",
   "oauth2_rev": "@1bff41f4d54505c36f2d1a001b83b8b745c452f5",
   "observatory_pub_packages_rev": "@cdc4b3d4c15b9c0c8e7702dff127b440afbb7485",
-  "package_config_tag": "@0.1.3",
+  "package_config_rev": "@0.1.3",
   "path_rev": "@b657c0854d1cf41c014986fa9d2321f1173df805",
   "plugin_tag": "@0.1.0",
   "pool_rev": "@22e12aeb16ad0b626900dbe79e4a25391ddfb28c",
@@ -53,7 +68,7 @@
   "zlib_rev": "@c3d0a6190f2f8c924a05ab6cc97b8f975bddd33f",
   "web_components_rev": "@0e636b534d9b12c9e96f841e6679398e91a986ec",
 
-  "co19_rev": "@801",
+  "co19_rev": "@f95f109fea67127a220958794ef5200a63cb454c",
   "fake_async_rev": "@38614",
 })
 
@@ -86,89 +101,84 @@
     Var("dartium_base") + Var("dartium_webkit_branch") + "@" +
         Var("dartium_webkit_revision"),
 
-  # Needed to run pub.
+  "src/dart/third_party/pkg/args":
+      (Var("github_mirror") % "args") + Var("args_tag"),
   "src/dart/third_party/pkg/barback":
-      "https://github.com/dart-lang/barback.git" + Var("barback_rev"),
+      (Var("github_mirror") % "barback") + Var("barback_rev"),
+  "src/dart/third_party/pkg/charcode":
+      (Var("github_mirror") % "charcode") + Var("charcode_tag"),
   "src/dart/third_party/pkg/crypto":
-      "https://github.com/dart-lang/crypto.git" + Var("crypto_rev"),
+      (Var("github_mirror") % "crypto") + Var("crypto_rev"),
   "src/dart/third_party/pkg/csslib":
-      "https://github.com/dart-lang/csslib.git" + Var("csslib_tag"),
+      (Var("github_mirror") % "csslib") + Var("csslib_tag"),
+  "src/dart/third_party/pkg/dart2js_info":
+      (Var("github_mirror") % "dart2js_info") + Var("dart2js_info_rev"),
   "src/dart/third_party/pkg/collection":
-      "https://github.com/dart-lang/collection.git" + Var("collection_rev"),
+      (Var("github_mirror") % "collection") + Var("collection_rev"),
   "src/dart/third_party/pkg/glob":
-      "https://github.com/dart-lang/glob.git" + Var("glob_rev"),
+      (Var("github_mirror") % "glob") + Var("glob_rev"),
   "src/dart/third_party/pkg/html":
-      "https://github.com/dart-lang/html.git" + Var("html_tag"),
+      (Var("github_mirror") % "html") + Var("html_tag"),
   "src/dart/third_party/pkg/json_rpc_2":
-      "https://github.com/dart-lang/json_rpc_2.git" + Var("json_rpc_2_rev"),
+      (Var("github_mirror") % "json_rpc_2") + Var("json_rpc_2_rev"),
   "src/dart/third_party/pkg/http":
-      "https://github.com/dart-lang/http.git" + Var("http_rev"),
+      (Var("github_mirror") % "http") + Var("http_rev"),
   "src/dart/third_party/pkg/http_multi_server":
-      "https://github.com/dart-lang/http_multi_server.git" +
+      (Var("github_mirror") % "http_multi_server") +
       Var("http_multi_server_tag"),
   "src/dart/third_party/pkg/http_parser":
-      "https://github.com/dart-lang/http_parser.git" + Var("http_parser_rev"),
+      (Var("github_mirror") % "http_parser") + Var("http_parser_rev"),
   "src/dart/third_party/pkg/http_throttle":
-      "https://github.com/dart-lang/http_throttle.git" + Var("http_throttle_rev"),
+      (Var("github_mirror") % "http_throttle") + Var("http_throttle_rev"),
   "src/dart/third_party/pkg/logging":
-      "https://github.com/dart-lang/logging.git" + Var("logging_rev"),
-  "src/dart/third_party/pkg/mime":
-      "https://github.com/dart-lang/mime.git" + Var("mime_rev"),
-  "src/dart/third_party/pkg/oauth2":
-    "https://github.com/dart-lang/oauth2.git" + Var("oauth2_rev"),
-  "src/dart/third_party/pkg/plugin":
-      "https://github.com/dart-lang/plugin.git" + Var("plugin_tag"),
-  "src/dart/third_party/pkg/pool":
-      "https://github.com/dart-lang/pool.git" + Var("pool_rev"),
-  "src/dart/third_party/pkg/pub":
-      "https://github.com/dart-lang/pub.git" + Var("pub_rev"),
-  "src/dart/third_party/pkg/pub_semver":
-      "https://github.com/dart-lang/pub_semver.git" + Var("pub_semver_tag"),
-  "src/dart/third_party/pkg/shelf":
-      "https://github.com/dart-lang/shelf.git" + Var("shelf_rev"),
-  "src/dart/third_party/pkg/shelf_web_socket":
-      "https://github.com/dart-lang/shelf_web_socket.git" +
-      Var("shelf_web_socket_rev"),
-  "src/dart/third_party/pkg/utf":
-      "https://github.com/dart-lang/utf.git" + Var("utf_rev"),
-  "src/dart/third_party/pkg/watcher":
-      "https://github.com/dart-lang/watcher.git" + Var("watcher_tag"),
-  "src/dart/third_party/pkg/yaml":
-      "https://github.com/dart-lang/yaml.git" + Var("yaml_rev"),
-
-  "src/dart/third_party/pkg/args":
-      "https://github.com/dart-lang/args.git" + Var("args_tag"),
-  "src/dart/third_party/pkg/charcode":
-      "https://github.com/dart-lang/charcode.git" + Var("charcode_tag"),
-  "src/dart/third_party/pkg/http_parser":
-      "https://github.com/dart-lang/http_parser.git" + Var("http_parser_rev"),
+      (Var("github_mirror") % "logging") + Var("logging_rev"),
   "src/dart/third_party/pkg/matcher":
-      "https://github.com/dart-lang/matcher.git" + Var("matcher_tag"),
+      (Var("github_mirror") % "matcher") + Var("matcher_tag"),
   "src/dart/third_party/pkg/metatest":
-      "https://github.com/dart-lang/metatest.git" + Var("metatest_rev"),
+      (Var("github_mirror") % "metatest") + Var("metatest_rev"),
+  "src/dart/third_party/pkg/mime":
+      (Var("github_mirror") % "mime") + Var("mime_rev"),
+  "src/dart/third_party/pkg/oauth2":
+      (Var("github_mirror") % "oauth2") + Var("oauth2_rev"),
   "src/dart/third_party/observatory_pub_packages":
-      "https://github.com/dart-lang/observatory_pub_packages.git"
-      + Var("observatory_pub_packages_rev"),
-  "src/dart/third_party/pkg/path":
-      "https://github.com/dart-lang/path.git" + Var("path_rev"),
+      (Var("github_mirror") % "observatory_pub_packages") +
+      Var("observatory_pub_packages_rev"),
   "src/dart/third_party/pkg/package_config":
-      "https://github.com/dart-lang/package_config.git" +
-      Var("package_config_tag"),
+      (Var("github_mirror") % "package_config") + Var("package_config_rev"),
+  "src/dart/third_party/pkg/path":
+      (Var("github_mirror") % "path") + Var("path_rev"),
+  "src/dart/third_party/pkg/plugin":
+      (Var("github_mirror") % "plugin") + Var("plugin_tag"),
+  "src/dart/third_party/pkg/pool":
+      (Var("github_mirror") % "pool") + Var("pool_rev"),
+  "src/dart/third_party/pkg/pub":
+      (Var("github_mirror") % "pub") + Var("pub_rev"),
+  "src/dart/third_party/pkg/pub_semver":
+      (Var("github_mirror") % "pub_semver") + Var("pub_semver_tag"),
+  "src/dart/third_party/pkg/shelf":
+      (Var("github_mirror") % "shelf") + Var("shelf_rev"),
+  "src/dart/third_party/pkg/shelf_web_socket":
+      (Var("github_mirror") % "shelf_web_socket") + Var("shelf_web_socket_rev"),
   "src/dart/third_party/pkg/source_span":
-      "https://github.com/dart-lang/source_span.git" + Var("source_span_rev"),
+      (Var("github_mirror") % "source_span") + Var("source_span_rev"),
   "src/dart/third_party/pkg/stack_trace":
-      "https://github.com/dart-lang/stack_trace.git" + Var("stack_trace_tag"),
+      (Var("github_mirror") % "stack_trace") + Var("stack_trace_tag"),
   "src/dart/third_party/pkg/string_scanner":
-      "https://github.com/dart-lang/string_scanner.git" +
-      Var("string_scanner_rev"),
+      (Var("github_mirror") % "string_scanner") + Var("string_scanner_rev"),
   "src/dart/third_party/pkg/test":
-      "https://github.com/dart-lang/test.git" + Var("test_tag"),
+      (Var("github_mirror") % "test") + Var("test_tag"),
+  "src/dart/third_party/pkg/utf":
+      (Var("github_mirror") % "utf") + Var("utf_rev"),
+  "src/dart/third_party/pkg/watcher":
+      (Var("github_mirror") % "watcher") + Var("watcher_tag"),
+  "src/dart/third_party/pkg/web_components":
+      (Var("github_mirror") % "web-components") + Var("web_components_rev"),
+  "src/dart/third_party/pkg/yaml":
+      (Var("github_mirror") % "yaml") + Var("yaml_rev"),
+
   # TODO(sigmund): should be src/dart/third_party/pkg/unittest (dartbug.com/21949)
   "src/dart/pkg/unittest":
-      "https://github.com/dart-lang/test.git" + Var("unittest_tag"),
-  "src/dart/third_party/pkg/web_components":
-      "https://github.com/dart-lang/web-components.git" +
-      Var("web_components_rev"),
+      (Var("github_mirror") % "test") + Var("unittest_tag"),
 
   "src/dart/third_party/WebCore":
     "http://dart.googlecode.com/svn/third_party/WebCore",
@@ -177,8 +187,8 @@
     "http://dart.googlecode.com/svn/third_party/fake_async" +
     Var("fake_async_rev"),
 
-  "src/dart/tests/co19/src": ((Var("googlecode_url") % "co19") +
-    "/trunk/co19/tests/co19/src" + Var("co19_rev")),
+  "src/dart/tests/co19/src":
+      (Var("github_mirror") % "co19") + Var("co19_rev"),
 
   "src/dart/third_party/zlib":
       Var("chromium_git") + "/chromium/src/third_party/zlib.git" +
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 2a751d7..47382cf 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -291,8 +291,6 @@
    */
   @DomName('Node.childNodes')
   @DocsEditable()
-  @Returns('NodeList')
-  @Creates('NodeList')
   List<Node> get childNodes {
     if (_childNodes == null) {
        List<Node> nodes = new List<Node>();
@@ -318,8 +316,6 @@
    */
   @DomName('Node.childNodes')
   @DocsEditable()
-  @Returns('NodeList')
-  @Creates('NodeList')
   List<Node> get childNodes => _blink.BlinkNode.instance.childNodes_Getter_(this);
   $else
   /**
diff --git a/tools/make_links.py b/tools/make_links.py
index 5599e99..58bc9cb 100644
--- a/tools/make_links.py
+++ b/tools/make_links.py
@@ -28,6 +28,9 @@
 import sys
 import utils
 
+# Useful messages when we find orphaned checkouts.
+old_directories = {'package_config':
+  'Please remove third_party/pkg/package_config.'}
 
 def get_options():
   result = optparse.OptionParser()
@@ -86,6 +89,7 @@
         os.remove(full_link)
   else:
     os.makedirs(target)
+  linked_names = {}; 
   for source in args[1:]:
     # Assume the source directory is named ".../NAME/lib".
     split = source.split(':')
@@ -98,6 +102,15 @@
     # Remove any additional path components preceding NAME, if one wasn't
     # specified explicitly.
     if not name: (_, name) = os.path.split(path)
+    # We have an issue with left-behind checkouts in third_party/pkg and
+    # third_party/pkg_tested when we move entries in DEPS. This reports them.
+    if name in linked_names:
+      print 'Duplicate directory %s is linked to both %s and %s.' % (
+          name, linked_names[name], path)
+      if name in old_directories:
+        print old_directories[name]
+      return 1
+    linked_names[name] = path
     orig_source = source
     if utils.GuessOS() == 'win32':
       source = os.path.relpath(source)
diff --git a/tools/observatory_tool.py b/tools/observatory_tool.py
index fab2183..6626143 100755
--- a/tools/observatory_tool.py
+++ b/tools/observatory_tool.py
@@ -96,6 +96,8 @@
 def Deploy(input_dir, output_dir):
   shutil.rmtree(output_dir)
   shutil.copytree(input_dir, output_dir, ignore=IGNORE_PATTERNS)
+  index_file = os.path.join(output_dir, 'web', 'index.html')
+  os.utime(index_file, None)
   return 0
 
 def RewritePubSpec(input_path, output_path, search, replace):
diff --git a/tools/task_kill.py b/tools/task_kill.py
index a091164..4a54965 100755
--- a/tools/task_kill.py
+++ b/tools/task_kill.py
@@ -30,7 +30,9 @@
     'iexplore': 'iexplore.exe',
     'firefox': 'firefox.exe',
     'git': 'git.exe',
-    'svn': 'svn.exe'
+    'svn': 'svn.exe',
+    'fletch': 'fletch.exe',
+    'fletch-vm': 'fletch-vm.exe',
   },
   'linux': {
     'chrome': 'chrome',
@@ -38,7 +40,9 @@
     'dart': 'dart',
     'firefox': 'firefox.exe',
     'git': 'git',
-    'svn': 'svn'
+    'svn': 'svn',
+    'fletch': 'fletch',
+    'fletch-vm': 'fletch-vm',
   },
   'macos': {
     'chrome': 'Chrome',
@@ -47,7 +51,9 @@
     'firefox': 'firefox',
     'safari': 'Safari',
     'git': 'git',
-    'svn': 'svn'
+    'svn': 'svn',
+    'fletch': 'fletch',
+    'fletch-vm': 'fletch-vm',
   }
 }
 
@@ -61,6 +67,8 @@
   parser = optparse.OptionParser("usage: %prog [options]")
   parser.add_option("--kill_dart", default=True,
                     help="Kill all dart processes")
+  parser.add_option("--kill_fletch", default=True,
+                    help="Kill all fletch and fletch-vm processes")
   parser.add_option("--kill_vc", default=True,
                     help="Kill all git and svn processes")
   parser.add_option("--kill_browsers", default=False,
@@ -189,11 +197,18 @@
   status = Kill("dart")
   return status
 
+def KillFletch():
+  status = Kill("fletch")
+  status += Kill("fletch-vm")
+  return status
+
 def Main():
   options = GetOptions()
   status = 0
   if options.kill_dart:
     status += KillDart()
+  if options.kill_fletch:
+    status += KillFletch()
   if options.kill_vc:
     status += KillVCSystems()
   if options.kill_browsers:
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 2304b5c..aef5b3f 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1468,6 +1468,8 @@
     String packageRoot =
       packageRootArgument(optionsFromFile['packageRoot']);
     if (packageRoot != null) args.add(packageRoot);
+    String packages = packagesArgument(optionsFromFile['packages']);
+    if (packages != null) args.add(packages);
     args.add('--out=$outputFile');
     args.add(inputFile);
     List<String> options = optionsFromFile['sharedOptions'];
@@ -1483,6 +1485,8 @@
     List<String> args = [];
     String packageRoot = packageRootArgument(optionsFromFile['packageRoot']);
     if (packageRoot != null) args.add(packageRoot);
+    String packages = packagesArgument(optionsFromFile['packages']);
+    if (packages != null) args.add(packages);
     args..add('package:polymer/deploy.dart')
         ..add('--test')..add(inputFile)
         ..add('--out')..add(outputDir)
@@ -1537,6 +1541,10 @@
     if (packageRoot != null) {
       args.add(packageRoot);
     }
+    String packages = packagesArgument(optionsFromFile['packages']);
+    if (packages != null) {
+      args.add(packages);
+    }
     args.addAll(additionalOptions(filePath));
     if (configuration['analyzer']) {
       args.add('--machine');
@@ -1581,6 +1589,13 @@
     return "--package-root=$packageRootPath";
   }
 
+  String packagesArgument(String packagesFromFile) {
+    if (packagesFromFile == null || packagesFromFile == "none") {
+      return null;
+    }
+    return "--packages=$packagesFromFile";
+  }
+
   /**
    * Special options for individual tests are currently specified in various
    * ways: with comments directly in test files, by using certain imports, or by
@@ -1655,6 +1670,7 @@
     RegExp dartOptionsRegExp = new RegExp(r"// DartOptions=(.*)");
     RegExp otherScriptsRegExp = new RegExp(r"// OtherScripts=(.*)");
     RegExp packageRootRegExp = new RegExp(r"// PackageRoot=(.*)");
+    RegExp packagesRegExp = new RegExp(r"// Packages=(.*)");
     RegExp isolateStubsRegExp = new RegExp(r"// IsolateStubs=(.*)");
     // TODO(gram) Clean these up once the old directives are not supported.
     RegExp domImportRegExp =
@@ -1670,6 +1686,7 @@
     List<String> dartOptions;
     List<String> sharedOptions;
     String packageRoot;
+    String packages;
 
     Iterable<Match> matches = testOptionsRegExp.allMatches(contents);
     for (var match in matches) {
@@ -1708,6 +1725,19 @@
       }
     }
 
+    matches = packagesRegExp.allMatches(contents);
+    for (var match in matches) {
+      if (packages != null) {
+        throw new Exception(
+            'More than one "// Packages=" line in test $filePath');
+      }
+      packages = match[1];
+      if (packages != 'none') {
+        // Packages=none means that no packages option should be given.
+        packages = '${filePath.directoryPath.join(new Path(packages))}';
+      }
+    }
+
     List<String> otherScripts = new List<String>();
     matches = otherScriptsRegExp.allMatches(contents);
     for (var match in matches) {
@@ -1732,6 +1762,7 @@
              "sharedOptions": sharedOptions == null ? [] : sharedOptions,
              "dartOptions": dartOptions,
              "packageRoot": packageRoot,
+             "packages": packages,
              "hasCompileError": false,
              "hasRuntimeError": false,
              "hasStaticWarning" : false,
diff --git a/utils/dartdoc/.gitignore b/utils/dartdoc/.gitignore
new file mode 100644
index 0000000..ce5803f
--- /dev/null
+++ b/utils/dartdoc/.gitignore
@@ -0,0 +1,2 @@
+/dartdoc.Makefile
+/dartdoc.target.mk